Single-file three.js pixel-art samurai shrine duel diorama with weather controls
Single-file three.js pixel-art samurai shrine duel diorama with weather controls is a 16-second Claude Opus motion design reference by @N1njaCodex, built around Three.js, Web Audio. GOAL: Build a single-file three.js (r170 via importmap from jsDelivr) pixel-art diorama called "Duel in the Rain": a mountain Shinto… Copy this interactive motion prompt, keep the creator's frame counts and palette, and adapt the…
@N1njaCodexView post
Prompt
GOAL:
Build a single-file three.js (r170 via importmap from jsDelivr) pixel-art diorama called "Duel in the Rain": a mountain Shinto shrine at night in the rain where six samurai duel two at a time.
MOTION:
Nobody dies — the loser kneels, the winner sheathes.
Scene (real 3D from boxes, cones and extrusions): a hall on a stone plinth with a veranda, six vermilion pillars, a tiled roof with crossed ridge boards and logs, a sacred rope with paper zigzags, a gate at the top of stone steps, six stone lanterns, a paved 12×7 m court, a koi pond, a water pavilion, a cedar, a maple and bamboo.
Fighters: each is a rig of ~30 boxes posed every frame with two-bone IK — kimono, wide hakama, sash, sleeves hanging or tied back, topknot or ponytail. Swordwork: five stances and six cuts (overhead, diagonal, rising, across the body, thrust, wrist cut), each a path for hilt and point with a sliding step. The defender parries, slips back or is only grazed (a sleeve or sash cut, no blood). Blades bind guard to guard and the stronger cuts as they part; one fighter can draw and cut in one motion. Ending: when one is spent they step back and stand still, lightning flashes, they run past each other with one cut each and stand back to back; then a sword flies and sticks point-down in the earth, or a hair cord is cut, or a blade stops at the neck. The loser kneels and bows, the winner shakes the rain off the blade and sheathes it. Then the next pair comes up the steps.
Rain: up to 1,250 streaks leaning with the wind that stop on roofs, trees and umbrellas, splash where they land, leave rings in puddles and the pond; drips off the eaves and down rain chains; wet stones show mirrored reflections of lanterns and pillars.
Rendering: orthographic isometric camera into a ~480×300 target, no anti-aliasing, snapped to whole pixels; a hard moon shadow, flickering lanterns, outlines from the depth buffer, and every pixel quantized to the nearest of 72 colours in OKLab, with optional dithering and a "Raw 3D" toggle.
UI (English, Material-Studies-style editorial panel): click a swordsman to will him on, "Call down the lightning", a win–loss roll, weather (dusk / night / drizzle / rain / storm) and wind, a veranda view, turn left/right, pause, ×3 speed, sound on, close-up, pixel size, palette / dither / outline toggles. Drag to orbit, scroll to zoom, keys L (lightning) and F (close-up). All sound is procedural WebAudio (rain, thunder, steel), nothing loaded. Original content only, works at phone width, with a WebGL 2 fallback message.
Author original
Build a single-file three.js (r170 via importmap from jsDelivr) pixel-art diorama called "Duel in the Rain": a mountain Shinto shrine at night in the rain where six samurai duel two at a time. Nobody dies — the loser kneels, the winner sheathes.
Scene (real 3D from boxes, cones and extrusions): a hall on a stone plinth with a veranda, six vermilion pillars, a tiled roof with crossed ridge boards and logs, a sacred rope with paper zigzags, a gate at the top of stone steps, six stone lanterns, a paved 12×7 m court, a koi pond, a water pavilion, a cedar, a maple and bamboo.
Fighters: each is a rig of ~30 boxes posed every frame with two-bone IK — kimono, wide hakama, sash, sleeves hanging or tied back, topknot or ponytail. Swordwork: five stances and six cuts (overhead, diagonal, rising, across the body, thrust, wrist cut), each a path for hilt and point with a sliding step. The defender parries, slips back or is only grazed (a sleeve or sash cut, no blood). Blades bind guard to guard and the stronger cuts as they part; one fighter can draw and cut in one motion. Ending: when one is spent they step back and stand still, lightning flashes, they run past each other with one cut each and stand back to back; then a sword flies and sticks point-down in the earth, or a hair cord is cut, or a blade stops at the neck. The loser kneels and bows, the winner shakes the rain off the blade and sheathes it. Then the next pair comes up the steps.
Rain: up to 1,250 streaks leaning with the wind that stop on roofs, trees and umbrellas, splash where they land, leave rings in puddles and the pond; drips off the eaves and down rain chains; wet stones show mirrored reflections of lanterns and pillars.
Rendering: orthographic isometric camera into a ~480×300 target, no anti-aliasing, snapped to whole pixels; a hard moon shadow, flickering lanterns, outlines from the depth buffer, and every pixel quantized to the nearest of 72 colours in OKLab, with optional dithering and a "Raw 3D" toggle.
UI (English, Material-Studies-style editorial panel): click a swordsman to will him on, "Call down the lightning", a win–loss roll, weather (dusk / night / drizzle / rain / storm) and wind, a veranda view, turn left/right, pause, ×3 speed, sound on, close-up, pixel size, palette / dither / outline toggles. Drag to orbit, scroll to zoom, keys L (lightning) and F (close-up). All sound is procedural WebAudio (rain, thunder, steel), nothing loaded. Original content only, works at phone width, with a WebGL 2 fallback message.
Questions
What is this games prompt for?
It is a Claude Opus motion design brief for “Single-file three.js pixel-art samurai shrine duel diorama with weather controls”. Paste it into Claude and keep the timings already written in the prompt.
Where is the original film?
The creator is @N1njaCodex. Use View post to open the X video this prompt belongs to.