Skip to content

Add three new style packs and shared motion/shot utilities - #2

Merged
runanshao merged 3 commits into
mainfrom
claude/exciting-johnson-64owsd
Oct 5, 2026
Merged

runanshao merged 3 commits into
mainfrom
claude/exciting-johnson-64owsd

Conversation

@runanshao

Copy link
Copy Markdown
Owner

Expand the template with three additional style packs (paper, neon, editorial) and refactor common animation patterns into reusable core utilities.

Summary

This PR adds three new visual style packs for different narrative contexts, extracts motion and shot-cutting logic into shared core modules, and extends the demo to showcase all five styles across a ~2-minute video.

Key Changes

New Style Packs:

  • Paper (src/paper/): Hand-drawn notebook aesthetic with jittered strokes that draw on and "boil" (re-jitter) like stop-motion animation, sticky notes, and highlighter swipes
  • Neon (src/neon/): Dark tech terminal style with perspective grid floor, CRT scanlines, glowing text with flicker-on, full-frame glitch effects, and node graph visualization
  • Editorial (src/editorial/): Magazine layout with masked headlines that slide up line-by-line, kinetic type, color block wipes, and impact slams

Core Utilities (refactored from film pack):

  • src/core/motion.ts: Shared easing presets (EASE, SPRING), tweens, springs, idle drift, pulse, punch, and deterministic PRNG
  • src/core/shots.tsx: Shot-based scene structure with cue-driven cuts and transition types (fade, cut, black, flash, push, zoom, wipe, whip, etc.)
  • src/core/Spoken.tsx: Text synchronized to narration via per-character frame boundaries from word timings
  • src/core/Strip.tsx: Motion review tool for tiling frames around cues into contact sheets

Demo Expansion:

  • Added scenes s03, s04, s05 showcasing paper, neon, and editorial packs
  • Extended tts/script.json with three new chapters
  • Generated audio and timing data for all five scenes (~2 minutes total)
  • Updated README to reflect the expanded demo

Supporting Changes:

  • src/film/film.tsx: Removed duplicate motion utilities (now imported from core)
  • src/core/index.ts: Exported new motion, shots, and Spoken APIs
  • src/core/look.ts: Added subtitle styling for box backgrounds
  • src/scenes/index.ts: Registered new scenes with their looks
  • tools/strip.mjs: New tool for motion review (frame tiling)
  • package.json: Added strip script

Implementation Notes

  • All motion functions are pure (frame-based) to support parallel rendering
  • Hand-drawn strokes use Catmull-Rom splines with deterministic jitter seeding
  • Glitch effect uses band-based RGB splits with configurable amplitude
  • Shot transitions are composable and layer correctly for complex cuts
  • Spoken text caching uses WeakMap keyed to TIMINGS objects for live updates during development

https://claude.ai/code/session_01Hf6CivwFE1rx9Hf8pbNvaS

claude added 3 commits October 4, 2026 18:13
Motion (src/core):
- motion.ts: easing presets, life()/move() enter+exit, stagger, spring
  presets, idle drift/pulse, punch and shake, deterministic noise
- Spoken: on-screen text revealed per character exactly when the
  narrator says it (same word timings as the subtitles)
- Shots moved to core with new transitions: push, up, zoom, wipe, whip
- subtitles: line rise-in, boxColor/dim for light looks, per-scene
  overrides (hideQuotes)

Style packs:
- paper: hand-drawn strokes that draw on and boil, sticky notes, marker
- neon: scrolling grid floor, scanlines, glow type, terminal, node graph
  with flowing pulses, glitch, HUD brackets
- editorial: masked kinetic headlines, slammed numbers, block wipes,
  rules, ticker

Demo: s03-s05 show the new packs; s01/s02 fixed for dead air, quote
typed out of sync with the voice, crossfade ghosting and static frames.

Review: tools/strip.mjs tiles frames around a cue into one image (via a
Strip composition) to judge motion; tools honour REMOTION_BROWSER.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6CivwFE1rx9Hf8pbNvaS
- math: Manim-style plane that fans out from the origin, traced plots,
  a tangent riding the curve with live readouts, step-by-step TeX
- keynote: one shape morphing through states via summed springs, a
  cursor that glides and clicks, liquid glass, screen-studio zoom
- pixel: 320x180 canvas upscaled with hard pixels (text thresholded to
  1-bit), parallax world, walking hero, coins, EXP bar, RPG dialog
  typed along with the narration
- ink: rice paper, ink-wash mountains bleeding in through mist, dry
  brush stroke, ink drop, vertical calligraphy, red seal
- Shots gains an 'iris' transition
- demo s06-s09 (one scene per new pack); README documents the packs,
  when to use which, and motion principles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6CivwFE1rx9Hf8pbNvaS
…and automation

Sound
- tools/sfx.py synthesizes 14 effects into public/sfx (numpy, no samples)
- <Sfx>/<SfxAt> in core; Shots adds a sound to moving transitions
- every demo scene places its hits (stamps, clicks, coins, slams, typing)
- music.py plays a quiet pulse on a music.bpm grid; useBeat() exposes
  next/nearest/pulse so visuals can land on it (neon horizon, pixel bob)

Formats
- kit.config.json "formats" adds <id>-9x16 and <id>-1x1 compositions;
  the shell lays the 16:9 picture out with a title band, captions sized
  to the line length, a cover background and a progress bar
- per-scene portrait {zoom, focus}; strip/overview tools take a format
- tools/render.mjs picks the composition (plain `remotion render` would
  now prompt), mix.py takes a format

Brand
- brand {name, accent, accent2} + theme.<pack> overrides; every pack
  palette goes through themed() with declared accent slots

Automation
- tools/new-scene.mjs, new-pack.mjs scaffold runnable scenes and packs
- tools/publish.mjs: tts -> render all formats -> score -> mix
- tools/overview.mjs (one frame per scene), listen.mjs (render audio,
  list sound events by cue); sandbox browser is auto-detected
- .claude/skills: new-scene, review, new-style-pack, publish
- tests check sfx names, recipes and files agree

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6CivwFE1rx9Hf8pbNvaS
@runanshao
runanshao merged commit 11fb549 into main Oct 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants