PerfOptions
Options for makePerf.
Defined in: perf.ts:28
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
adaptEveryMs? | number | How often the controller may change the scale (default 500 ms). | perf.ts:40 |
enabled | boolean | Show the overlay. The controller adapts either way. | perf.ts:30 |
gpuTimings? | () => Record<string, number> | null | GPU milliseconds per pass to show in the overlay, e.g. () => renderer.gpuTimings() (null when the device has no timestamp queries). | perf.ts:65 |
label? | string | Extra text shown in the overlay (adapter name, quality preset, ...). | perf.ts:60 |
locked? | boolean | Fixed scale: disables adaptation when true. | perf.ts:50 |
maxSampleMs? | number | Frame gaps longer than this are treated as idle (tab hidden, render-on- demand waiting) and ignored. Default 250 ms. A scene that renders continuously and may legitimately be slower than that must raise it, or every frame is discarded: the readout then sits at its initial value, reporting 60 fps, and the scale controller never sees a sample. | perf.ts:58 |
maxScale? | number | Highest scale (default 1). | perf.ts:36 |
minScale? | number | Lowest scale the controller will go to (default 0.35). | perf.ts:34 |
retryAfterMs? | number | After a step up proves too slow, that scale is off limits for this long (default 30 s). Frame times arrive in whole vsync intervals, so a frame that fits reads the same as one with room to spare; without this memory the controller climbs, misses, drops and climbs again every second, and each change visibly resamples the image. | perf.ts:48 |
scale | number | Starting scale (usually gpu.renderScale). | perf.ts:32 |
targetMs? | number | Frame-time target in ms (default 16.7 = 60 fps). | perf.ts:38 |