Three.js 3D Videos in Under a Minute

By @SebastianHardyAI. Made with Claude Opus 5.5. Watch the original post.

Prompt

[OPTIONAL FIRST LINE: Before writing code, show me the scene plan as a table of seconds, camera move and text. Wait for my OK.]

Use Three.js to build a [LENGTH, e.g. 20]-second animated video scene that I can watch right here in the chat as an artifact.

THE WORLD
Subject: [WHAT THE VIDEO IS ABOUT, e.g. a glowing 3D phone showing my booking app]
Setting: [WHERE IT HAPPENS, e.g. a dark glossy studio floor with soft reflections]
Style: [THE LOOK, e.g. clean Apple-style product render, playful toy-like low-poly, or futuristic neon]
Objects in the scene: [LIST THE THINGS, e.g. a phone, three floating app cards, a small coffee cup]

LIGHTING AND COLOUR
Lighting: [e.g. soft key light from the top left, warm rim light from behind, light fog for depth]
Colour palette: background [HEX], main [HEX], accent [HEX], text [HEX]

CAMERA
Camera moves: [e.g. slow push-in, then a smooth half orbit to the right, then rise to a top-down view]
Every camera move eases in and out. No sudden jumps.

TIMELINE
0-3s: [SCENE 1, the opening]
3-8s: [SCENE 2]
8-14s: [SCENE 3]
14-20s: [SCENE 4, the payoff or the logo]

TEXT ON SCREEN
0.5-3s: "[HEADLINE, 6 words max]"
3.5-8s: "[LINE 2]"
8.5-14s: "[LINE 3]"
14.5-20s: "[FINAL LINE OR BRAND NAME]"
Text style: bold clean sans-serif, big enough to read on a phone, colour [HEX]. Each line fades and slides up in, then fades out. Keep all text between 15% and 85% of the screen height and away from the right edge, where Instagram's buttons sit.

ENDING
[Loop seamlessly so the last frame flows into the first] OR [Play once and hold the final frame for 2 seconds]
The video is exactly [LENGTH] seconds in total; if it holds the final frame, the last 2 seconds are the held final frame.

TECHNICAL RULES (keep these exactly as they are)
1. Vertical 9:16 video. Call renderer.setPixelRatio(1) and renderer.setSize(1080, 1920, false) so the drawing buffer is exactly 1080x1920. Scale the preview to fit the window with CSS only.
2. Load Three.js as an ES module from cdnjs and nothing else: https://cdnjs.cloudflare.com/ajax/libs/three.js/0.180.0/three.module.min.js
3. One single HTML file with the HTML, CSS and JavaScript together. No outside images, 3D models or font files. Build every object from Three.js shapes.
4. Render every text line with a 2D canvas into a CanvasTexture on a plane, either inside the Three.js scene or in a screen-space orthographic overlay scene rendered by the same WebGLRenderer right after the main scene. Use the overlay for captions so they stay flat and sharp. Text materials use toneMapped: false. The canvas you record must be the only canvas and must contain the text.
5. Run all motion from one master timeline clock in seconds, based on real elapsed time, so the animation always lasts exactly as long as planned.
6. Under the video, add a small control bar: Play/Pause, Restart, and a scrubber that shows the current second.
7. Add a "Record MP4" button. It restarts the animation from 0, records the canvas for the full length at 30 fps with the browser's built-in MediaRecorder (MP4 if the browser supports it, otherwise WebM, around 12 Mbps), then downloads the file automatically.
8. Use sRGB output with ACES filmic tone mapping for the 3D objects. Text, logo and background use MeshBasicMaterial (or scene.background) with toneMapped: false so they match my hex codes exactly. Keep it smooth on a normal laptop: pixel ratio stays at 1, shadow map size 1024 or less, shadows only where they really show, reuse geometries and materials.
9. Do not import any Three.js add-ons (no OrbitControls, EffectComposer, bloom, Reflector, loaders). Fake glow with emissive materials plus additive-blended sprites with a radial-gradient CanvasTexture. Fake depth with fog. Fake floor reflections with a mirrored copy of the objects under a semi-transparent floor.
10. Keep the scene 30 seconds or less and the code compact so it fits in one reply.

Browse all 1008 videos