How it works
InstancedMesh with per-instance offsets baked into an attribute; the wave is computed in the vertex shader via onBeforeCompile.
Up to 40,000 cubes in one draw call, animated by a travelling wave.
InstancedMesh with per-instance offsets baked into an attribute; the wave is computed in the vertex shader via onBeforeCompile.
Renders through the single shared <Canvas> via drei <View> — no extra WebGL context, and the render loop only runs while a view is mounted. 1 draw call regardless of count — watch the HUD.
In reduced mode the scene renders on demand only: a static, fully lit frame with no idle motion.
// uCount: "10000" uniform float uAmp; // 0.6 uniform float uSpeed; // 1.5