Vector story shorts
One style, any story: a flat illustrated world in stacked layers, seen through a slowly drifting camera, with a line of narration on screen at a time. A viewer decides in the first second whether to keep watching, so every frame has to read at a glance on a phone: one subject, one light source, one phrase.
This skill teaches the method. The story, palette, characters and shots come from the brief and are yours to
design. assets/template/ is a working project (a 12-second example film plus the kit); the kit in
assets/template/lib/storykit.js is plumbing you import as it is, and scene.js is a worked example to read and
then replace, never a parts bin.
1. What makes the style read
Each line says why, so you can bend it when the brief asks.
- Flat shapes, no outlines. Form comes from silhouette and from one shape laid over another, the way cut vinyl would be. Each shape is one colour or one soft top-to-bottom gradient. Outlines, textures and many small gradients make it look like clip art.
- Symmetry and geometry in figures. Characters face the camera (or stand square from behind), built on a
centre line from mirrored shapes: circles, rounded triangles, tapered rectangles. Symmetry reads as iconic and
calm, which suits told stories, and it is what lets code draw a convincing figure. Detail is ornament in
small repeated shapes (dots, chevrons, bands), never anatomy. See
references/characters.md. - One light, placed behind the subject. A sun, moon, lamp or halo sits behind or beside the hero. That gives three things that carry the whole look: a big soft glow, a thin warm rim on the figure's edges, and a sky gradient running from the light's colour to a dark opposite. A figure lit from the front looks pasted on.
- A two-temperature palette. One warm family for light, one cool family for shadow and distance, six to nine
colours for the whole film, plus one accent kept for the caption highlight. Shadows are a darker, cooler hue,
never grey or black. See
references/look.mdfor palettes by mood. - Depth from layers, not perspective. Five to eight layers per shot: sky, light source, far cloud, near cloud, ground or sea, subject, foreground motes. Farther layers are lighter and closer to the sky colour, and move less when the camera moves. That parallax is what makes a flat frame feel deep.
- Nothing is ever still, nothing moves fast. Every shot has a slow camera move (a 6-14 % push-in or a small drift), a breathing subject, drifting cloud and floating motes. A frozen frame looks like a slideshow; quick motion fights the narration. Real movement is saved for one beat per shot (a turn of the head, a reveal).
- One phrase on screen. Two to five words, uppercase, heavy weight, white with a soft dark shadow, one keyword in the accent colour, placed about 70 % down the frame. People watch muted; the caption is the story.
2. Setting the direction
Read the brief for: the story and its source, the length (default 30-45 s), the format (default 1080x1920), the mood, and whether narration audio exists.
- A reference video or image sets the look target. Take frames from it (
ffmpeg -i ref.mp4 -vf "fps=1/5,scale=270:-1,tile=6x1" sheet.jpg) and read off the palette, the layer count, where the light is, how figures are constructed, caption placement and shot lengths. Learn its craft and build your own designs; do not trace its characters or compositions. - A traditional, religious or historical story: keep to the source's events and names, say which telling you followed, and draw figures with their recognised attributes, treated with respect.
- No reference: pick the palette from the mood (
look.md) and state it in the spec.
3. Before code: write the story spec
Write this down and show it to the user before building, because a wrong beat is cheap to fix here and expensive after eight shots are drawn.
Story one sentence, and the source
Format 1080x1920, 30 fps, ~40 s
Palette light: ... shadow: ... accent: ... (hex values)
Cast each figure: silhouette in five words, its 3-4 colours, its one ornament
Shots # | seconds | framing | what is seen | the one movement | caption phrases (KEYWORD in caps)
Pacing that holds attention: about 2.3-2.8 spoken words per second, a new shot every 4-7 seconds, a new caption
every 1.5-2.5 seconds, and the first shot must pose the question the last shot answers. Vary the framing from shot
to shot (wide from behind, two-shot, symmetric close-up, a flashback in a different palette, a low-angle hero
reveal); two similar framings in a row read as one long shot. references/storytelling.md has the shot grammar
and a script template.
4. Build
- Copy
assets/template/to the project folder. Keeplib/storykit.jsandindex.html; rewritescene.js. - Write the palette object first, then the world pieces shared by several shots (sky, cloud, ground), then each figure as a function that returns its joints, then the shots.
- A shot is
{ name, dur, captions, build(S) }.buildmakes layers back to front withS.layer(parallax), adds pieces, and returnsupdate(t, u), which sets everything from the time alone. No state may carry between frames, since capture renders frames by seeking; usebreathe,prog,settle,blinkand seededrng. - Serve the folder (
python3 -m http.server) and open it.?shot=nameloops one shot,?t=3.2holds a frame.
The kit's whole surface is documented in comments at the top of each function in lib/storykit.js; read that
file once before writing a scene. references/motion-captions.md covers camera moves, idle motion, reveals, cuts,
caption timing and syncing to narration audio.
5. Check the render
Look at frames before calling anything done; code that runs is not a film that reads.
python3 scripts/capture.py <project> --sheet sheet.jpg # the middle of every shot, on one sheet
python3 scripts/capture.py <project> --out film.mp4 --audio voice.mp3
Open the sheet and check each frame, small, as a phone viewer would see it:
- Can you name the subject in one second? If not, the silhouette is too busy or too close in value to what is behind it; separate them with the rim, the glow, or a lighter far layer.
- Is the light source visible or clearly implied, and is the rim on the side facing it?
- Do the layers step from pale and far to dark and near, with no flat bottom edge of a cloud or hill showing?
- Is the caption clear of the subject's face, inside the safe area, and never more than two lines?
- Does each shot look different from the one before it?
Then watch the MP4 once at full speed for motion: nothing frozen, nothing jittering, cuts landing on phrase boundaries. capture.py fails the run on any page or console error; fix those rather than working around them.
6. Tells to avoid
Black outlines; grey shadows; pure white or pure black; more than one accent colour; a figure in three-quarter view next to symmetric ones; text smaller than about 4 % of the frame width; captions in the bottom fifth (app buttons cover it) or top eighth; a shot with no camera move; easing that stops dead (use ease-in-out or a settle); a cloud bank with opacity below 1 (its bumps overlap and the overlap shows).
7. Starting values
| Thing | Value |
|---|---|
| Frame | short side = 9 units, origin at centre; 9:16 is x -4.5..4.5, y -8..8 |
| Push-in | zoom 1.00 to 1.08-1.14 across a shot, ease-in-out |
| Parallax | sky 0, light 0.05, clouds 0.15-0.35, sea or far ground 0.5, subject 1, motes 1.25 |
| Breathing | 3-4 s period, 1-2 % scale or 0.02-0.05 units |
| Rim | 0.05-0.08 units, the light's colour, 0.9 opacity |
| Glow | radius 3-4x the light's disc, additive, 0.5-0.6 opacity |
| Motes | 20-35, radius 0.05-0.25, rising 0.25-0.5 units/s |
| Caption | 0.42 units tall (about 50 px at 1080 wide), 72 % down, pops in over 0.2 s |
| Cut | 0.3 s dip through the darkest palette colour; a hard cut for a shock |
8. Gotchas
- Hang parts on
node(), neverTHREE.Group: three.js resets draw order under a Group, and layers rely on it. - Draw order inside a layer is creation order: make the thing behind first (a beam before the tower it shines past).
rim()grows a copy of the shape about its own centre, so it suits compact shapes; on a long thin or hooked shape it drifts, and a slightly larger hand-made shape behind works better.- Keep one phrase under about 30 characters; the kit warns in the console when a caption is long or overlaps another.
- Fonts: captions fall back through system fonts. For a specific face, add a
<link>to it inindex.html; the film waits for fonts before reporting ready.