Skip to content

Bookshelf Cascade

Rows of cloth-bound books lean against one another in a slow domino wave along a bookcase. Loops perfectly.

3D object, V2 Objects3DSeamless loop, verified120 lines of codev1.0.0

In Craft & heritage

Next: Cable KnitSurprise me

Bookshelf Cascade preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source at reduced resolution.

Your current settings go with it. Combine several clips and hand them over together from your sequence.

Effect controls

Presets

3
16
1
4

The preview runs the same code your AI receives. These settings travel with the hand-off.

Info

What it is

A bookcase with shelves of cloth-bound books of every thickness and height, gold bands on their spines, and a slow wave of leaning running through them like a row of dominoes: one book tips against the next, which tips against the next, a ripple that runs along each shelf (the shelves running in opposite directions) before every book settles upright again. Choose the number of shelves and books, the cloth colours (library, pastel, mono or jewel), how far the books lean, the seed, the backdrop and whether the camera drifts.

Reuse it in your own idea

  • Library or reading-app title: Library, three shelves.
  • Cheerful education loop: Pastel, cheerful.
  • Chain-reaction metaphor: Black and white.

Which part is reusable

src/bookshelf-cascade.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses chrome-material only for the demo.

Good to know

  • The books lean in a prescribed wave without collision: a leaning book may pass through its neighbour a little.
  • Books are plain boxes with a shared spine pattern, with no readable titles.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/bookshelf-cascade.js
Exports
  • createBookshelf({ shelves?, books?, palette?, lean?, seed? }) => { group, setProgress(progress), dispose() }
  • PALETTES: { library, pastel, mono, jewel }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer, geometry and shader materials.
  • chrome-material@1.1.0 (demo) — Studio environment light, backdrop and contact shadow.
  • apw-runtime@1.0.0 (demo) — Demo harness.
How it fits a scene

Coordinates: The case is 12 wide, each shelf 3.4 tall, standing on y = 0 with its back at z = -0.8; books tilt in the xy plane about their bottom corners.

Lighting: A warm key light with a shadow map and the studio environment.

Timing: setProgress(progress) sets every book; frames render in any order.

Output
1080×1080, 30 fps, 16 s · procedural (computed from the frame number) · seamless loop — A smooth window of lean passes along each shelf once per loop; every book's tilt is a function of its position and the loop's phase only, so the last frame meets the first.
Tested
Rendered 480 frames on 2026-10-06 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (WebGL 2 via SwiftShader (software)). Same frame twice from fresh pages: identical. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
One instanced mesh of up to 96 books and a few boxes, one shadow map. A few milliseconds a frame on an integrated Intel GPU. Software WebGL renders in about a second a frame.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- bookshelf-cascade/1.0.0 --out my-video.mp4Needs Node 18+, ffmpeg and Chrome/Chromium. Add --params my-settings.json (from Copy settings) for your own settings.
Version
1.0.0 · sha256:c18cabe836c65086… · other versions: 1.0.1
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
Adapted from the owner's threejs-sketches/objects-scenes/bookshelf-cascade (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original object: seeded books on an instanced shelf, a closed-form domino lean wave in opposite directions per shelf and an exact loop.
BinMore like this

Cable Knit

3D object3DSeamless loop16 seconds

Hourglass

3D object3DSeamless loop16 seconds

Book Flip

3D object3DSeamless loop16 seconds

Music Box

3D object3DSeamless loop12 seconds