forked from phenom/healer-man
Release Healer Man 0.1.9
This commit is contained in:
1 parent
c245a199b6
commit
d060296ade
74 files changed
+5901
-334
No files matched your search
@@ -1,9 +1,15 @@
|
||||
import { PerformanceMonitor } from "@react-three/drei";
|
||||
import { dprForPerformanceFactor } from "./adaptiveGraphicsQualityMath";
|
||||
import type { GameplayFrameRateLimit } from "../game/frameRateSettings";
|
||||
import {
|
||||
dprForPerformanceFactor,
|
||||
performanceBoundsForFrameRate,
|
||||
} from "./adaptiveGraphicsQualityMath";
|
||||
|
||||
export function AdaptiveGraphicsQuality({
|
||||
frameRateLimit,
|
||||
onDprChange,
|
||||
}: {
|
||||
readonly frameRateLimit: GameplayFrameRateLimit;
|
||||
readonly onDprChange: (dpr: number) => void;
|
||||
}) {
|
||||
return (
|
||||
@@ -13,7 +19,7 @@ export function AdaptiveGraphicsQuality({
|
||||
ms={250}
|
||||
step={0.25}
|
||||
threshold={0.75}
|
||||
bounds={(refreshRate) => refreshRate > 100 ? [60, 100] : [52, 58]}
|
||||
bounds={(refreshRate) => performanceBoundsForFrameRate(frameRateLimit, refreshRate)}
|
||||
onChange={({ factor }) => onDprChange(dprForPerformanceFactor(factor))}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user