Skip to content

About

Three.js scroll-driven showcase scenes.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Threejs-scroll-showcases

Ten cinematic, scroll-driven three.js worlds you can drop into any website. Every tree, temple, wave and star is generated by code: no 3D models, no image assets, no build step.

Live demo three.js r180 MIT License Contributors wanted

The ten worlds: Nature, Japanese, Cyberpunk, Gaming, Health, Space, Underwater, Mythology, Fantasy, Jaipur

Open the gallery →


Why this exists

Scroll-driven 3D is everywhere on award-winning sites, but every studio builds it from scratch. This library gives you finished worlds with a camera journey already art-directed: you scroll, the camera flies, the light changes, the story unfolds. Point it at your own scroll position and it fits your page.

  • One call to use: mount(canvas, 'space', { progress }) and feed it 0 → 1.
  • Zero assets: geometry, textures, foliage, skies and particles are all procedural, so the whole library is about 1 MB of source.
  • Film-style rendering: HDR pipeline with bloom, light shafts, ambient occlusion, ACES grading, film grain, planar water reflections, aerial haze and drifting cloud shadows.
  • Built to stay smooth: tiled culling, distance level-of-detail for grass and trees, cached shadow maps and a resolution that adapts to the GPU.
  • No build tools: plain ES modules. Open it with any static server.

The worlds

01 · Nature — Verdant

Nature showcase Dawn to full day over an alpine valley: grown spruce and birch, grass you can walk through, wildflowers and a lake that mirrors the mountains.

02 · Japanese — Yoizakura

Japanese showcase A corridor of vermilion torii, stone lanterns, night sakura and a five-storey pagoda doubled in a moonlit pond.

03 · Cyberpunk — Neon Rain

Cyberpunk showcase A wet megacity street with real reflections, stacked neon signage, noodle stalls, hover traffic, holographic koi and a rise above the grid.

04 · Gaming — Level Up

Gaming showcase Floating voxel islands over a synthwave grid, a coin trail, pixel-art sprites, a controller moon and a portal to the next level.

05 · Health — Vital

Health showcase DNA, a living cell, the bloodstream, firing neurons and a beating heart with its ECG trace.

06 · Space — Event Horizon

Space showcase A living planet, an asteroid belt, a ringed giant, a stellar nursery and the edge of a black hole.

07 · Underwater — Abyss

Underwater showcase A reef under dancing caustics, schools of fish, a kelp forest, a passing whale and bioluminescent jellyfish in the midnight zone.

08 · Mythology — Olympus

Mythology showcase A marble temple above a sea of cloud, a thunderstorm, an eternal flame and the constellations of heroes.

09 · Fantasy — Arcanum

Fantasy showcase Floating isles under an aurora, an elder tree of light, a crystal spire, a rune circle and a gate to another world.

10 · Jaipur — Gulabi Nagar

Jaipur showcase The Palace of Winds over a busy bazaar, decorated elephants, a painted gate of cusped arches, a blooming rangoli and a stepwell lit by a thousand diyas.

Full-size stills
Nature Japanese
Cyberpunk Gaming
Health Space
Underwater Mythology
Fantasy Jaipur

Quick start

git clone https://github.com/JayDev-27/Threejs-scroll-showcases.git
cd Threejs-scroll-showcases
python3 serve.py

Open http://localhost:4173/ for the gallery, or http://localhost:4173/showcase.html?s=jaipur for one world. Add &autoplay=60 to let the journey play by itself.

Any static server works (npx serve, python3 -m http.server); serve.py just disables caching while you edit.

Use a world in your own site

<canvas id="world" style="position:fixed;inset:0;width:100vw;height:100vh"></canvas>
<script type="module">
  import { mount } from './lib/engine.js';

  const world = await mount(document.querySelector('#world'), 'underwater', {
    // 0 at the top of your story, 1 at the end. Native scroll, Lenis or GSAP ScrollTrigger all work.
    progress: () => scrollY / (document.documentElement.scrollHeight - innerHeight),
  });

  // world.setScene('space')   swap worlds in place
  // world.pause() · world.play() · world.dispose()
</script>
Option What it does
progress () => number from 0 to 1. The camera eases toward it, so raw scroll is fine
autoplay Seconds per pass when there is no progress
damping How quickly the camera follows the scroll (default 3.2)
pointer false turns off the pointer parallax
quality Starting resolution scale, 0.5–1 (adapts automatically)

showcase.html is a complete scrolling page built on that call, with chapter copy, per-theme typography, progress bar and chapter dots. Theme names, fonts, colours and copy live in scenes/index.js.

How it is built

File Role
lib/engine.js Renderer, scroll-to-camera rail, HDR post chain, planar mirror, adaptive quality, ground clearance
lib/kit.js Noise, geometry builder, sky dome (sun, moon, stars, clouds, nebula, aurora), particles, water, ground and rock materials, aerial haze, caustics, tiled instancing
lib/flora.js Grown trees with branching limbs and leaf, needle or blossom sprays, shrubs, grass clumps, kelp, boulders
scenes/*.js One world per file: build(ctx) returns a camera rail and an update(time, progress)
scenes/index.js The registry: names, fonts, colours, chapter copy
tools/ Capture helpers used to make the stills and GIFs in this README

A new world is one file in scenes/ plus one entry in scenes/index.js:

export default {
  build({ scene, camera, look, env, mirror }) {
    // add meshes, lights and particles to `scene`
    return {
      rail: [{ p: 0, pos: [0, 2, 20], look: [0, 1, 0], fov: 50 }, /* … */ { p: 1, pos: [0, 30, 60], look: [0, 0, 0] }],
      floor: (x, z) => 0,           // optional: the camera never sinks below this ground
      update(time, progress) { },   // animate light, sky and uniforms
    };
  },
};

🚀 We are growing this library — come build with us

Ten worlds is the beginning. The goal is the go-to open collection of scroll-driven 3D scenes for the web, and we need contributors: 3D artists, shader writers, creative developers, designers and people who just love beautiful websites.

Ways to help

  • Build a new world from the roadmap below, or propose your own theme in an issue.
  • Polish an existing one: better foliage, characters, lighting, more life in the crowd.
  • Make it faster: profiling on mid-range laptops and phones is especially welcome.
  • Integrations: React Three Fiber wrapper, Lenis and GSAP recipes, a Framer or Webflow embed.
  • Docs and demos: example landing pages that use a world in context.

How to contribute

  1. Fork the repo and create a branch: git checkout -b world/desert.
  2. Run python3 serve.py and develop against showcase.html?s=<your-world>.
  3. Keep it procedural (no model or image files) and keep it smooth (check the frame time with await __perf(0.5) in the browser console).
  4. Add a still and GIF to docs/media/ (see tools/capture.js and tools/gif.sh) and open a pull request.

Not sure where to start? Open an issue with your idea and we will help you scope it.

🗺️ Roadmap: worlds we plan to add

Theme The scroll journey we imagine
🏜️ Desert — Sahara dunes Wind-carved dunes, a camel caravan at sunset, an oasis, a night sky full of stars
❄️ Arctic — Polar night Ice shelves, a frozen sea cracking, polar bears, aurora over an igloo village
🏛️ Egypt — Valley of the Kings The Nile at dawn, pyramids, torch-lit tomb corridors, hieroglyph walls
🌋 Volcano — Ring of fire Lava rivers, ash storms, cooling basalt columns, a caldera lake
🌆 Steampunk — Brass city Airships, gears the size of buildings, steam vents, a clocktower
🕌 Islamic architecture — Taj and Alhambra Mirror pools, muqarnas domes, geometric tilework, lantern-lit courtyards
🐉 Chinese — Lantern festival Mountain temples, a dragon dance, thousands of rising sky lanterns
🌳 Rainforest — Amazon canopy Waterfalls, mist, giant trees, macaws, a river at dusk
🏰 Medieval — Castle siege Village, drawbridge, banners, torch-lit great hall, battlements at night
🤖 Sci-fi — Orbital station Docking bay, hydroponic gardens, a ring habitat spinning over a planet
🏙️ Architecture — Modern villa A product-style walkthrough of a glass house for real-estate sites
🚗 Automotive — Studio reveal A procedural car on a turntable with studio lighting for product launches
🍣 Food — Kitchen story Ingredients, steam, a plated dish built step by step for restaurant sites
🎵 Music — Audio-reactive stage A concert stage that reacts to the Web Audio API
💍 Luxury — Jewellery showcase Gems, caustics and gold for high-end product pages
🌸 Seasons — One valley, four seasons The same place through spring, summer, autumn and winter as you scroll

Library features on the list too: a React Three Fiber package, an npm release, mobile quality presets, a world editor for camera rails, and audio.

Requirements

  • A browser with WebGL 2 and float render targets (any current desktop browser).
  • The heaviest worlds (Nature, Jaipur, Underwater) build their geometry on load, which takes a few seconds.
  • Page typography loads from Google Fonts; everything inside the 3D scenes is local.

License

MIT. three.js is MIT licensed by the three.js authors; its licence is in lib/THREE-LICENSE.


If these worlds inspire you, star the repo and help us build the next ten.

About

Three.js scroll-driven showcase scenes.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages