import { PerformanceMonitor } from "@react-three/drei"; 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 ( performanceBoundsForFrameRate(frameRateLimit, refreshRate)} onChange={({ factor }) => onDprChange(dprForPerformanceFactor(factor))} /> ); }