Skip to content
MotionLab

Scroll Camera Flythrough

The camera flies along a spline through a field of monoliths as you scroll.

sketchR3FGSAPScrollTrigger

How it works

CatmullRomCurve3 path; progress from ScrollTrigger → curve.getPointAt(p); camera looks slightly ahead on the curve.

Performance

Renders through the single shared <Canvas> via drei <View> — no extra WebGL context, and the render loop only runs while a view is mounted. Monoliths are one InstancedMesh (1 draw call).

Accessibility & reduced motion

In reduced mode the scene renders on demand only: a static, fully lit frame with no idle motion.

Playgroundscroll
Export
{
  "lerp": 0.1,
  "scrub": 1.5,
  "markers": false
}