webstory · v1.2
A story told through scroll, in one of five types. Chapters are never separate sections: the camera travels one world, one object changes in place, or each scene opens out of the last one. Every earlier build taught something here; the inputs and the engines turn those lessons into choices.
| Type | The scroll | Best for | Read first |
|---|---|---|---|
Dunia turun · vertical (default) | the camera descends a world along a zigzag road | journeys, history, legends, a hero | references/engine.md, references/vertical-world.md |
Gulungan samping · horizontal | the camera slides sideways like a handscroll | the same, when asked for sideways | references/one-scroll-world.md |
Objek berubah · object | the screen holds; one object changes form each chapter | products, food, crafts, processes, brands | references/engine.md §12 |
Slider adegan · slides | one full scene per screen; each scroll step opens the next one out of it | destinations, collections, moods, a set of places or products | references/engine.md §13 |
Poster bab · poster | numbered sections, dense motion, a pinned transformation | profiles, teams, showcases | references/poster-site.md, references/study.md |
references/types.md is the menu: previews, how each input reads per type, and how to suggest a type.
1. Intake: always ask first, in two cards
Before anything else (no folder, no files, no renders), ask. Every time the skill runs, including the first run after it is installed in a new agent.
Card 1 (AskUserQuestion, four questions):
| Question | Options (recommended first) | Minimal version |
|---|---|---|
| Tipe story | four of the five types (a question holds four options: drop the one that fits the prompt least, usually Gulungan samping unless the prompt says sideways), each with its preview sketch from types.md and an example name; say in the question that the fifth can be typed | suggested from the prompt |
| Kreativitas | low · medium · high | low |
| Kedalaman | low = 4 chapters · medium = 6 · high = 8–10 (or the user types a number) | low (4) |
| Development | nyala (the hero or object changes, rising or falling) · mati | mati |
Card 2 (one question), after card 1: Style. A question holds four options, so offer the three styles that fit this type and subject best (each with a one-line "looks like …") plus "Pilihin aja"; the user can type any of the nine. Put the best fit first.
Skip a card only for inputs the prompt already answers. If the user says to just run it ("udah jalanin aja", "terserah", "langsung aja", "skip"), use the minimal version (suggested type, low, 4 chapters, development off, a style you pick) and say so in one line. Infer language and subject from the prompt; ask only if there is no subject at all.
Then send one short message in the user's language with every decision, and keep going:
Tipe: objek berubah
Input: kreativitas high · kedalaman 5 babak · development nyala · style collage
Cerita: <one sentence>
Acuan: <the style's concrete object: "montase foto produk melayang di langit pink">
Bahasa: Indonesia
2. What each input changes
Creativity: which effects exist (the engine reads creativity and gates everything)
| low | medium | high | |
|---|---|---|---|
| Parallax, light by the hour, text reveal, menu, route | ✓ | ✓ | ✓ |
| Particles (petals, rain, embers, fireflies) | none | signature kinds only, 2–3 chapters | every kind, every chapter |
| Title figure breathes, eyes blink | no | yes | yes |
| Travellers bounce, lean, flip at bends | glide, turn instantly | yes | yes |
| Asides | plain notes | turn over on click | turn over on click |
| Headings lean with scroll speed, label scramble, pointer depth | no | yes | stronger |
| Per-scroll effects (flash, shake, glitch, zoom) | no | no | yes, one or more per chapter |
| Buildings follow the pointer at their own depth, slow zoom | no | yes | yes |
| Chapter hand-off: the world skews and blurs for a moment | no | no | yes |
| Giant place names leaving | sink | sink | scatter |
| Character stage change | hidden swap behind an occluder | flash + quick crossfade | scrubbed transformation on screen |
| object type: change between forms | crossfade | scale, blur, sparkle burst | the old form explodes into its own pixels, the new one rises out of blur |
| slides type: change between scenes | fade, words rise | the scene's own transition (iris, blinds, zoom-through, skew push), cut-outs rise out of blur, pointer depth, float, particles, light leaks | + the subject explodes into its own pixels, letters scatter, giant scene numbers, a custom cursor |
Creativity is effects only. The look comes from the style. The pointer depth, slow zoom, exploding
exit and skew hand-off come from the study of a parallax slider (webstory-study, Nov 2026).
Depth: number of chapters, which sets the length
| Chapters | Levels (bends) | Scroll length | Text | Pictures | |
|---|---|---|---|---|---|
| low | 4 | 9 | ~9 screens | 2 beats per chapter, 1–2 asides | ~6 |
| medium | 6 | 13 | ~13 screens | 2 beats + asides | ~9 |
| high | 8–10 | 17–21 | ~17–21 screens | 2–3 beats + asides + facts in the coda | ~11–14 |
A number ("kedalaman 5") is the chapter count. levels = chapters × 2 + 1.
For the slides type a chapter is a scene: one screen of scroll each, and one full plate plus one to three
cut-outs per scene (low ~8 pictures, medium ~12, high ~16–24).
Development: does the main character (or the object) change?
- mati (off) — one look from start to end; only the world changes. For the object type: one form; only background, decor and words change.
- nyala (on) — 2–4 stages tied to chapters. Pick the kind the story has: companions join (a band
forms), the vehicle changes (horse → boat), the look evolves (armour adds up, rank, age), or power grows
(glow). It may fall too: companions leave, the horse is lost, the armour cracks. How the change is
shown follows creativity (table above). Each stage is a separate render chained from the previous one;
see
references/art.md. - object type, nyala — the object changes form every chapter (a fruit → a bar of chocolate; coals → a kebab). One chained render per chapter, all on the same canvas.
- slides type — off: every scene has its own subject (Biro Mimpi: a car, a planet, a whale, a stair, an island). On: one traveller appears in every scene and changes along the way (gains a suitcase, gets older, loses the hat), each look a cut-out chained from the previous one.
Style: nine that work for this kind of site
| Style | Fits | Built |
|---|---|---|
papercut | history, folklore, journeys; the safe default | Iga Crossing, Diponegoro |
engraving | documentary, old places, nature, expeditions | Sumbu Merapi |
cyberpunk | heroes, sci-fi, cities at night | Topeng Jalak |
retro-futurism | science, space, invention | Astronout (poster) |
art-deco | travel, cities, trains, ships, heritage brands | – |
ink-wash | quiet, spiritual, mountains and rivers | – |
pixel | games, nostalgia, kids | – |
claymation | children's stories, cheerful brands | – |
collage | products, food, brands, dreamy subjects; partner of the object and slides types | cokelat (object), Biro Mimpi (slides) |
Each has a file in references/styles/ with the Codex style block, inks, typefaces, texture, light
system and motion character. Read only the chosen one. Styles that are pure UI layouts (glass, bento,
swiss, brutalism) are left out on purpose: this site needs a world to paint.
Never reuse a previous build's palette and typefaces; the style is a family, the acuan makes it new.
3. The run
Roughly 40–70 minutes, most of it Codex rendering in the background. Keep the Mac awake
(caffeinate -i -t <seconds> &) and stop it at the end. Build locally unless the user asks to deploy.
S=~/.claude/skills/webstory/scripts # the scripts/ folder beside this SKILL.md
Needs Node 18+ with Playwright and a Chromium (found automatically; PW_CORE / PW_EXE override),
ImageMagick, Python 3, Codex CLI signed in, and wrangler only for deploying.
- Scaffold.
$S/new_site.sh <project-dir> <scroll-v|object|slides|scroll|poster> <name>copies the right engine, a page template, the vendored libraries and the worked examples into the project. - Storyboard in
story.jsfirst. Vertical: chapters, levels, every beat and aside, the light keyframes, the cast and its stages. Object: one entry per chapter with its form, background pair, ink and text. Slides: one entry per scene with its plate, transition, particles, ink, words and cut-outs. If the story is real: follow a named account, check facts on the web when you can, otherwise sort them into sure / soften and list / leave out, and put a "catatan soal kebenaran" in the coda. If the subject is someone else's character or brand, make an original one in the same genre and say so. - Order the art (
references/art.md): vertical needs a hero, cast stages and one set per chapter; object needs one chained form per chapter (1:1, same framing) and two or three decor cut-outs; slides needs one full-bleed plate per scene (every scene a different place, hour and colour) plus its cut-outs. All briefs inprompts/,order.txthero first, then start$S/render_all.shin the background. One queue only: two sites rendering at once must share one queue. Look at the first picture before the rest land. - Theme (
theme.cssfrom the style file) and fonts ($S/fetch_fonts.py). - Process each render as it lands (
$S/process.sh,--keep-canvasfor stage images; slides plates are only resized, never keyed) and refresh. - Look, test, fix (
references/ship.md):$S/shots.cjs … --unit cam,$S/sheet.sh, read the sheets; desktop and phone;$S/smoke.cjsmust say "all clear";$S/interact.cjs <url>checks the tier, the stages at three points, the aside flip and the menu and route jumps; on a slides site it checks that one wheel gesture moves one scene, plus keys, arrows, rail, menu, swipes and the coda. Slides:shots.cjs --unit vh --at 0,0.3,0.6,1,…(1 = scene 2 at rest, 1.5 = halfway to scene 3). - Report: what was built, the decisions you made, what was not tested. Deploy only on request.
If they only want the plan ("storyboard dulu", "jangan build dulu"): stop after step 2, with the intake
decisions at the top of story.js or a storyboard.md, and the art list ready to render.
4. What went wrong before, so it does not again
- Copied motion missed most of it. The first poster build copied screenshots and missed nine effects. Measure with
study.cjs. - Giant type on top of the story. Keep giant place names tone-on-tone with the sky.
- Tall foreground objects parked on the paragraph being read. Place them between blocks; on phones drop edge trunks.
- Text unreadable at dusk. Flip the ink where the sky crosses mid-grey (
darkranges), checked on screenshots. - Travellers invisible at night. Lift the bottom of the night light and outline the cut-outs (
--cast-filter). - Lamps glowing at noon. Never keyframe
opacityon something driven by a variable. - Words that never appeared. GSAP reads CSS
translateY(110%)as px; animateyPercentwithfromTo. - Two Codex renders came back as the same picture. One queue, one image at a time.
- A render came back transparent instead of on green.
process.shhandles both. - The phone page was wider than the phone. Clip what waits off-screen;
smoke.cjscatches it. - A frame-rate number that meant nothing. Headless has no GPU; report only measurements from a visible tab.
- Every chapter on the same background. The cokelat site changed only a gradient pair, and the user called it boring. Slides gives every scene its own photographed or painted plate; in the other types, change the light, the place or the hour, never just the tint.
- A trackpad flick that skipped three scenes. The inertia tail kept stepping once a move ended. The slides wheel stays locked until the stream pauses or a clearly stronger push starts a new gesture.
Files
references/types.md— the five types: previews for the intake card, how each input reads per type, which four to show.references/engine.md— every field ofstory.jsfor all three engines, the hooks, the index.html contract.references/styles/*.md— the nine styles.references/vertical-world.md— the vertical world's design rules (road, mist, columns, last frame).references/one-scroll-world.md— shared ideas and the horizontal variant.references/poster-site.md,references/study.md— the poster type and how to measure a reference.references/art.md— what to order, how to brief Codex, cut-outs, stage chains, fonts.references/ship.md— screenshots, tests, the report, optional Cloudflare deploy.scripts/—new_site.sh,render_all.sh,render.sh,process.sh(Q=sets WebP quality),fetch_fonts.py,shots.cjs,sheet.sh,smoke.cjs,interact.cjs(+interact-slides.cjs),study.cjs,scrub.cjs,pw.cjs.assets/engine/—engine.js+engine.css(vertical),engine-object.js+engine-object.css(object),index.template.html,theme.template.css;engine-slides.js+engine-slides.css,index-slides.template.html,theme-slides.template.css(slides).assets/example-low/,assets/example-high/— Sumbu Merapi and Topeng Jalak (vertical).assets/example-object/— cokelat.assets/example-slides/— Biro Mimpi.assets/example-scroll-vertical/,assets/example-scroll/,assets/example-poster/— the three earlier hand-built sites.