The classic render loop
In the browser the loop runs through requestAnimationFrame: the browser calls a function before the next repaint, usually matching the display refresh rate, commonly 60 times a second and 120 or more on some devices [1]. For games and continuous animation that is right.
Why constant drawing is wasteful for products
A configurator is still most of the time: the visitor reads, compares, chooses. Recalculating every frame anyway loads the GPU and the battery, warms up phones and takes processing time from other work on the page.
How render on demand works
- A flag ("redraw needed") is set whenever something changes: the camera moves, an option is chosen, the window is resized, an animation runs.
- The loop checks the flag and only then draws a frame.
- When nothing moves, the GPU stays idle.
Expensive steps such as shadow maps are also recalculated only on change. Note camera inertia: it requires the controls to be updated every frame while the movement eases out [3].
Not visible, not drawn
Most browsers pause requestAnimationFrame in background tabs [1]. If the 3D view is scrolled out of view, the application can detect this with the Intersection Observer and pause as well [2].
From our library
The spiral stair configurator only draws when the camera, the selection or an animation changes, and only then updates its shadows. The planetary gearhead additionally pauses as soon as it is scrolled out of view (both fictional products). The 3D product viewer page covers performance on product pages.