Skip to content

Book Flip

An open book whose pages turn one after another in a gentle breeze, then turn back. Loops perfectly.

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

In Craft & heritage

Next: Bookshelf CascadeSurprise me

Book Flip 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

8

Leaves in the book; each has two printed sides.

1

How much a page bends as it turns.

4

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

Info

What it is

An open book on a desk in lamplight: each page rises, curls over the spine in a soft arc and settles on the left, revealing the next spread of printed lines, drop capitals, little pictures and page numbers; when the last page has turned they all turn back, one after another, and the book is where it began. Choose the number of pages, the cover cloth (oxblood, navy, forest or black), the paper, how much the pages curl, the seed, the backdrop and whether the camera drifts.

Reuse it in your own idea

  • Reading-app or library title: Oxblood, eight leaves.
  • Documentation backdrop: Navy, cream paper.
  • Storybook opener: Forest, many pages.

Which part is reusable

src/book-flip.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 pages turn on a hinge without collision, so a turning page may pass through its neighbours by a hair.
  • The text is suggested by bars, not real letters.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/book-flip.js
Exports
  • createBook({ pages?, cover?, curl?, seed?, paper? }) => { group, setProgress(progress), dispose() }
  • COVERS: { oxblood, navy, forest, black }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer, geometry and 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 spine is on the y axis, each page is 3 wide (x) and 4 deep (z); unturned pages lie to the right, turned ones to the left.

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

Timing: setProgress(progress) sets every page's turn; frames render in any order.

Output
1080×1080, 30 fps, 16 s · procedural (computed from the frame number) · seamless loop — In the first half of the loop the pages turn forward one after another and in the second half they turn back in the same order; each page's angle and curl are smooth functions of the loop, so the book ends where it began.
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
Up to ten 56-vertex strips rebuilt on the CPU each frame, a few boxes and 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 -- book-flip/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:45006221ab73d57a…
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/book-flip (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original object: curling page strips as closed forms of the loop, procedurally printed page textures and a forward-then-back turn sequence for an exact loop.
BinMore like this

Cable Knit

3D object3DSeamless loop16 seconds

Hourglass

3D object3DSeamless loop16 seconds

Music Box

3D object3DSeamless loop12 seconds