RenderStats props
RenderStats props
OptionalclassName?: stringOptional class name applied to the overlay container (for custom styling).
Optionalgpu?: booleanMeasure real GPU time via EXT_disjoint_timer_query_webgl2. When the extension
is unavailable (e.g. some browsers, or the WebGPU renderer) the GPU row shows
n/a. Default true.
Optionalinterval?: numberUI refresh interval in milliseconds (the metrics themselves sample every frame).
Optionaloffset?: [number, number]Pixel offset [x, y] from the anchored corner.
Optionalorigin?: "top-left" | "top-right" | "bottom-left" | "bottom-right"Corner the overlay is anchored to.
Optionalparent?: HTMLElement | nullDOM element the overlay is appended to. Defaults to the renderer canvas'
parent element (falling back to document.body).
A lightweight render-statistics overlay for R3F. It reports metrics that the usual FPS/frame-time counters miss and that matter most when profiling large scenes:
EXT_disjoint_timer_query_webgl2), which — unlike frame time — is not hidden by the vsync cap, so you can compare GPU cost even at a locked 60 fps.renderer.info.autoReset = falsewhile mounted and resets once per frame), so multi-pass pipelines report a true per-frame total.Measurement is non-invasive: it brackets the whole frame with global R3F before/after callbacks rather than taking over the render loop, so it works with the default loop, custom pipelines and effect composers alike.
Place it inside a
<Canvas>(it needs the renderer). It renders no 3D content — only a DOM overlay appended to RenderStatsProps.parent.