scrollscape — Turn Any Brand Into a Scrollable 3D World
Problem
Scroll-driven product pages that fly a camera through a connected world are usually built from AI-generated video clips scrubbed by scroll position. Each scene costs render credits, takes minutes to generate, and every edit means a re-render and re-encode. The result is tens of MB of video that you cannot relight or reframe.
Business Impact
Brand and marketing teams that want a cinematic scroll story usually pay per rendered clip and wait for each change. scrollscape shows the same effect can run live in the browser from a config file, so a copy edit or a new scene is a code change rather than a re-render. It is a starting point for developers building brand sites, and the demo brand (Altura, a coffee world) shows the idea end to end.
System Approach
- The world is data: lib/world.ts lists each section's position, copy and accent colour
- The camera flight is derived from that data: two anchors per scene, a high establishing view and a dive-in, chained into one Catmull-Rom curve
- A requestAnimationFrame loop maps scroll position to a 0..1 progress value and the camera eases toward that point on the curve; scrolling up plays the flight in reverse
- Each island is built from primitive meshes in components/Dioramas.tsx, with emissive windows and signs
- Post-processing adds selective bloom and a vignette; fog fades distant islands so each one appears as the camera approaches
- A key light follows the camera so the active scene keeps crisp shadows
Key Decisions & Trade-offs
- Real-time Three.js instead of scrubbed video, so there is no render cost per scene and no video weight
- The world is a config file, so a new brand means editing sections rather than touching scene code
- Per-scene camScale and focus values let sparse scenes get a closer dive and tall subjects like the hero cup get a higher look-at point
- Easing is delta-time aware, so the motion stays smooth on a throttled tab or a weak device
- Emissive materials are not tone-mapped so they bloom cleanly
- Reduced-motion and small screens are handled by hiding the side rail and calming animations
Current Status
Public and open source under the MIT license. No backend and no API keys. Install with npm install and run npm run dev. No automated tests are in the repository.
Roadmap
- More diorama kinds for other industries, such as a fab line, a vineyard or a data center
- Load the world config from a file or CMS instead of editing code
- Add tests for the flight-path maths
What I'd Improve Next
- Scenes are built from primitive shapes, so the look is low-poly clay rather than detailed models, and every new kind of scene needs hand-written geometry
- It needs WebGL and gets heavy on weak GPUs, since everything is drawn live in the browser
Explore More
- Toast — Behavioral Diffing For AI-Generated Pull Requests — AI-written code is often almost right but not quite, and that kind of bug reads as correct, so a human review does not catch it.
- MyFinancial — Personal Financial Advisor — Financial planning in India is fragmented across banks, insurance, and tax documents.
- PropCheck — AI Property Trust Score for India — Indian property buyers lose lakhs to fraudulent listings on Magicbricks, 99acres, Housing.
- StellarMIND — Chat-to-SQL with RAG — Business users need to query databases without knowing SQL.
- All 47 projects — the full catalogue, with live links and repos.