build-threejs-scroll-worlds

Build scroll-driven real-time Three.js worlds with persistent scenes and authored camera chapters.

5.7k|685|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/MengTo/Skills --skill build-threejs-scroll-worlds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-threejs-scroll-worlds
Source: https://github.com/MengTo/Skills/tree/main/agent-skills/web-design/build-threejs-scroll-worlds
Command: npx skills add https://github.com/MengTo/Skills --skill build-threejs-scroll-worlds

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Building a scroll-driven 3D website often collapses into stacked sections, hijacked scrolling, or a disguised video, losing spatial continuity, performance control, and accessibility. This Skill provides a complete architecture for one persistent Three.js world where native scroll deterministically conducts camera, lighting, fog, materials, DOM story, and interactions across authored chapters.

Core Features & Use Cases

  • Persistent world architecture: One renderer, one scene graph, and a normalized reversible scroll state with separate exact and damped progress values, plus a portable scroll-conductor implementation.
  • Authored chapter system: Scene ledgers defining camera position/target/FOV waypoints, Catmull–Rom curves, world-state interpolation, responsive overrides, and per-chapter interaction gating.
  • Production-grade quality gates: Performance budgets (DPR, draw calls, triangles, transfer size), progressive asset loading, reduced-motion and WebGL fallbacks, and a full QA checklist covering seams, materials, accessibility, and teardown.
  • Use Case: Build an interactive product story or museum microsite where scrolling moves a camera through a continuous 3D environment—such as the bundled Kage Kyoto temple demo—while semantic DOM copy, keyboard-accessible hotspots, and a poster fallback keep the page usable without WebGL.

Quick Start

Use the build-threejs-scroll-worlds skill to turn this landing page concept into one persistent Three.js world with scroll-driven camera chapters, textured landmarks, and synchronized story sections.

Frequently Asked Questions about build-threejs-scroll-worlds

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a scroll-driven Three.js website with multiple scenes?

Keep one renderer, one scene, and one camera alive for the whole page, then convert native scrollY into a fractional chapter value that interpolates camera position, target, FOV, fog, and light between authored waypoints. Never create a renderer per chapter or rebuild the world at seams.

How to sync camera movement with native scroll position in Three.js?

Measure section anchors after fonts and media settle, map scrollY to exact chapter progress, and damp a separate smoothed value for rendering. Use exact progress for navigation and interaction gating, and the damped value only for camera and visual interpolation.

Should I use real-time Three.js or a scroll-scrubbed video for 3D storytelling?

Use real-time Three.js when objects must stay spatial and interactive with raycasting, live lighting, and camera control. Use a scroll-scrubbed video sequence when the content is pre-rendered and does not need true geometry, materials, or pointer interaction.

What performance budget should a mobile Three.js scroll site target?

Start with DPR capped at 1.25–1.5, 150k–300k visible triangles, 50–90 draw calls, 1–2 shadowed lights, and 3–6 MB critical transfer on mobile. Profile on the real device and lower DPR and post-processing before removing authored landmarks.

How do I keep a WebGL scroll experience accessible?

Keep all headings, copy, links, and controls as semantic DOM above the canvas, mirror every 3D hotspot with a real button or link, and never trap native scroll. For reduced motion, snap to composed chapter frames and provide a poster fallback when WebGL fails.

Why does my scroll animation land differently when scrolling backwards?

Reverse-scroll mismatches happen when wheel deltas or one-way triggers drive the story instead of measured scroll position. Derive all state from scrollY so the same position reproduces the same state forward, backward, after fast jumps, and after reload.