Single-file HTML woodgrain slider with animated cabin micro-scene
Single-file HTML woodgrain slider with animated cabin micro-scene is a 14.7-second Claude Opus motion design reference by @vib3coded, built around Web Audio, WebGL. [Note: the creator shared a partial prompt. Copy this UI motion prompt, keep the creator's frame counts and palette, and adapt the subject for your own launch film.
@vib3codedView post
Prompt
[Note: the creator shared a partial prompt. Wording below is theirs.]
GOAL:
Build a single-file HTML page titled "Knock on Wood Switch" (Material Studies No.
MOTION:
076 · WebGL + Web Audio): a horizontal pill-shaped slider whose track is a 176×50 pixel-art scene and whose knob is a drop of clear amber.
LOOK & LAYOUT
- The pixel scene is redrawn every frame on the CPU into albedo + emission buffers. Sprites are filled into masks and stamped with an automatic outline, a lighter top and a darker bottom.
- Light is per pixel with Bayer-dithered bands.
- A WebGL2 fragment shader draws the page shadow, a varnished walnut bezel with a little grain, and the scene with nearest-sampling.
- The knob is a domed amber pill that magnifies and bends what lies under it. It splits colours slightly at the rim, catches a long highlight and a dot highlight, and is tinted amber (deeper at the top). It lags the finger on a spring, stretches with speed and wobbles when it stops.
- The page is dark warm brown and warms further for the finale.
- Header caption: "Wake the cabin, knock by knock: a woodpecker, a hammer, a saw, the cuckoo, a fist on the door — then one groove, and a barn dance."
- Footer readouts: Cabin (status), Knocks (a live counter of every knock), Track. A hint text, a Sound on/off button, and a 2D fallback without WebGL 2.
THE SCENE: a log-cabin workshop on a snowy night
- Log walls with chinks and knots, a ceiling beam, a plank floor, a braided rug.
- A pot-belly stove with a flickering fire behind its grate, and a stack of six logs end-on with rings.
- A tree-trunk post with a woodpecker's hole.
- A pegboard of tools with painted outlines where the hammer and saw hang.
- A cuckoo clock with a pendulum on the beat, pine-cone weights and a bird that pops out.
- A workbench where a beagle in a flat cap with a pencil behind its ear builds a birdhouse; the birdhouse grows with every nail and is painted for the party. A jar of nails.
- A sawhorse with a plank and a tuxedo cat in safety goggles, and a clamp work-lamp.
- A window on snowy pines, the moon, falling snow and a blinking owl.
- A plank door with iron straps and a ring knocker.
- A hanging lantern that swings when the door is pounded.
KNOB BEHAVIOUR (0 → 1)
- Warm lamplight fills the cabin up to just past the knob.
- Stages, in order:
- asleep (z's, fire, wind);
- lantern on (match strike), clock tick-tock;
- the woodpecker drums on the post: rolls of 10–18 pecks with wood chips flying;
- the dog hammers nails: 4–5 blows, the ring rising each blow, the last one a dull thock;
- the cat saws: alternating rasping strokes, then a cut piece drops with a CLONK;
- the cuckoo;
- someone knocks: polite knuckles, then a fist, then BAM with the iron knocker, the door shaking, dust falling, feet in the light under the door; the dog barks back;
Author original
Build a single-file HTML page titled "Knock on Wood Switch" (Material Studies No. 076 · WebGL + Web Audio): a horizontal pill-shaped slider whose track is a 176×50 pixel-art scene and whose knob is a drop of clear amber.
LOOK & LAYOUT
- The pixel scene is redrawn every frame on the CPU into albedo + emission buffers. Sprites are filled into masks and stamped with an automatic outline, a lighter top and a darker bottom.
- Light is per pixel with Bayer-dithered bands.
- A WebGL2 fragment shader draws the page shadow, a varnished walnut bezel with a little grain, and the scene with nearest-sampling.
- The knob is a domed amber pill that magnifies and bends what lies under it. It splits colours slightly at the rim, catches a long highlight and a dot highlight, and is tinted amber (deeper at the top). It lags the finger on a spring, stretches with speed and wobbles when it stops.
- The page is dark warm brown and warms further for the finale.
- Header caption: "Wake the cabin, knock by knock: a woodpecker, a hammer, a saw, the cuckoo, a fist on the door — then one groove, and a barn dance."
- Footer readouts: Cabin (status), Knocks (a live counter of every knock), Track. A hint text, a Sound on/off button, and a 2D fallback without WebGL 2.
THE SCENE: a log-cabin workshop on a snowy night
- Log walls with chinks and knots, a ceiling beam, a plank floor, a braided rug.
- A pot-belly stove with a flickering fire behind its grate, and a stack of six logs end-on with rings.
- A tree-trunk post with a woodpecker's hole.
- A pegboard of tools with painted outlines where the hammer and saw hang.
- A cuckoo clock with a pendulum on the beat, pine-cone weights and a bird that pops out.
- A workbench where a beagle in a flat cap with a pencil behind its ear builds a birdhouse; the birdhouse grows with every nail and is painted for the party. A jar of nails.
- A sawhorse with a plank and a tuxedo cat in safety goggles, and a clamp work-lamp.
- A window on snowy pines, the moon, falling snow and a blinking owl.
- A plank door with iron straps and a ring knocker.
- A hanging lantern that swings when the door is pounded.
KNOB BEHAVIOUR (0 → 1)
- Warm lamplight fills the cabin up to just past the knob.
- Stages, in order:
- asleep (z's, fire, wind);
- lantern on (match strike), clock tick-tock;
- the woodpecker drums on the post: rolls of 10–18 pecks with wood chips flying;
- the dog hammers nails: 4–5 blows, the ring rising each blow, the last one a dull thock;
- the cat saws: alternating rasping strokes, then a cut piece drops with a CLONK;
- the cuckoo;
- someone knocks: polite knuckles, then a fist, then BAM with the iron knocker, the door shaking, dust falling, feet in the light under the door; the dog barks back;
Questions
What is this ui motion prompt for?
It is a Claude Opus motion design brief for “Single-file HTML woodgrain slider with animated cabin micro-scene”. Paste it into Claude and keep the timings already written in the prompt.
Where is the original film?
The creator is @vib3coded. Use View post to open the X video this prompt belongs to.