Build an interactive 3D physical paper movie ticket with a checkout flow, using Vite, TypeScript, Three.js, GLSL shaders.
No image, audio or 3D model files: every texture and every sound is generated in code.
1. Event, Layout & Themes
- The ticket is for a midnight screening: MERIDIAN FILM FESTIVAL · NIGHT 27 · MIDNIGHT REEL, "The Last Reel", SAT 31 OCT 2026, doors 23:30, show 00:00, ALDERMERE HALL, SCREEN 3.
- Default theme: Dark Concert Hall. Optional light theme: Warm Gallery Alabaster with a hairline dot grid and soft radial studio lighting. Toggle in the header (L).
- Left column: a checkout card with
- seat picker: 3 zones (Stalls $32, Dress Circle $26, Balcony $19), rows A–D, 12 seats per row
- window print selector (4 prints, see section 4): Rosette included, Flip +$6, Motion +$9, Holo 3D +$14
- foil edition selector: 01 Silver Holo, 02 Founders Gold Leaf (+$18), 03 Ultraviolet Prism (+$12). The edition changes paper colour, ink and foil together.
- live order summary (+$3.50 service fee), a 25/25 perforation fiber meter, and a primary button
- a serial number hashed from seat + edition + print, printed on the ticket
- Centre stage: a 2 : 3.4 vertical pass floating in 3D, casting a soft contact shadow that deforms with the paper.
- Typography: Limelight (marquee title), Yellowtail (script), Instrument Serif, Archivo, Geist and Geist Mono.
2. Verlet Card-Stock Physics & Curved Split Seam
- 900-vertex (25 x 36) Verlet solver, 10 constraint iterations per frame.
- Structural 0.94, shear 0.82, 2-hop bend 0.76, 4-hop bend 0.56, so it bends like heavy 350gsm card, not cloth.
- The perforation is a gentle arc (bowed 44 px upward at the centre) about 74% down the card. Split the mesh at rows 24 / 25 with no shared indices across the seam, and bridge it only with 25 breakable seam fibers.
- When fiber c snaps, disable every spring crossing the seam at column c and add a small curl impulse so the torn edge opens into a 3D V-gap.
3. Interaction
- Pointer tilts the card (this is what drives the lenticular frames and holo parallax). Dragging the body bends it, with damped elastic recoil. A bent card shows two lens frames at once, because the viewing angle changes across the paper.
- Slice along the arc or pull the QR stub down to snap fibers one by one. After the 25th, the stub falls with air-drag flutter and tumble, and the panel switches to "TICKET VERIFIED · ADMIT ONE".
- F / double-click flips the card, R issues a fresh pass, X toggles the X-ray view, M mutes, L switches theme.
4. The Window: 4 Prints
A large rounded window at the top of the ticket, sitting over an illustrated cinema facade with a bulb-lit marquee. Lenticular prints use 88 lenses and hysteresis so frames don't flicker at the boundaries.
- Rosette: thin-film diffraction foil + guilloche rosette + Voronoi micro-glitter.
- Flip: the same cinema at night (navy sky, neon, glowing bulbs) ↔ by day (blue sky, sun).
- Motion: a film-leader countdown 8 → 1 across the viewing angle.
- Holo 3D: a ray-marched faceted star floating inside the paper, with a tunnel of rings receding behind it and real parallax.
5. Showtime (after the stub is torn)
The window plays its print once, holds on the last frame, then an ADMITTED stamp lands on the ticket in the print's ink colour.
- Motion: counts 8 → 1 on its own (a projector tick per number, a 1 kHz sync beep on 1), a beat of black, then the projector lamp strikes: a white flash spills out of the window, the stage lights up, the card jolts, and the flash fades to reveal the title card.
- Flip: flips to day, then sunset back to night; the neon flickers on and the marquee bulbs chase around.
- Holo: the star spins a full turn while rings ripple outward, over a rising glass arpeggio.
- Rosette: a highlight sweeps across and the glitter flashes all at once.
Hold for at least 1 s, then hand control back to the pointer smoothly over 0.6 s.
6. Shaders & Textures
- Procedural 1024 x 1740 canvas textures for front and back: diffuse + alpha (typography, rosette, QR and barcode stub, rounded corners, side notches, 24 punched holes discarded in the fragment shader), plus an RGB mask (R = foil, G = emboss heightfield for finite-difference normals, B = phase offset).
- Positions and normals recomputed every frame after the Verlet step. Each print has its own surface: ridge strength of the lens lines, gloss, roughness.
7. Procedural Audio
- Tearing: a continuous paper-rip layer whose band moves from 520 Hz narrow (taut card) to 3.4 kHz wide (dry paper sliding), with grain on top, plus a snap per fiber that pitches up as the tear progresses.
- Lens frames: plastic click for Flip, projector tick for Motion, glass notes for Holo.
- Admission chord: E5 · A5 · D6 stacked fourths.
8. X-Ray Mode
X overlays a live THREE.LineSegments lattice of every active spring, colour-coded by type and strain (cyan = structural, indigo = shear/bend, amber → red = seam fibers).