sochen/motion
9 effects. Every frame seekable.
launch-film.mp4Render
Render queued → done in 4.2 s
1920 × 1080 · 30 fps6.0 s
PlaygroundZero dependencies, coming to npm
Anime speed lines, impact frames, title slams, dithered skies and film grain. Each frame depends only on time, options and a seed, so what you scrub on a page is exactly what renders in video.
sochen/motion
9 effects. Every frame seekable.
launch-film.mp4Render
Render queued → done in 4.2 s
1920 × 1080 · 30 fps6.0 s
Seekable
Any frame renders on its own: scrub, jump, play backwards.
Deterministic
A pure function of time, options and a seed. Same input, same frame.
Zero dependencies
Plain TypeScript, ESM, no animation engine underneath.
Playground
Try every effect and its options right here, free.
Drag a scrub bar back and forth: every frame comes back exactly the same, because no effect reads the clock. Type your own headline or add your logo (it stays in your browser), turn the knobs, then copy the code or a link to what you made.
Made for video: pause any card and step it one frame at a time with ‹ ›. Those are the exact frames a video renderer captures.
Release · 2.0.0
Tessel 2.0 migrates while you're live.
$ tessel migrate --online
applying 41 of 41 · 0 locks held
Tessel 2.0Stable
41 migrations, 0 locks, 0 s down
✓ users.add_index_email1.8 s
✓ orders.split_address4.1 s
✓ invoices.backfill_currency12.6 s
✓ payments.drop_legacy_ids0.9 s
Ink streaks in a band behind the card's trailing edge, only while it slides in. Three seeded drawings swap 8 times a second.
import { speedLines, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
// A layer under the card; the lines stay in a band behind its trailing edge.
const lines = speedLines.mount(stage.querySelector(".under-card"), {
count: 22,
wedge: 1.1,
opacity: 0.6,
boilFps: 8,
angle: 0,
region: { x: 0.12, y: 0.55, w: 0.33, h: 0.26 },
seed: 7,
});
const tl = timeline({ duration: 2.4 }).add(lines);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();The build that took 11 minutes takes 48 seconds.
main · ci/build #4127a41c9e2
lint✓ 4 s
typecheck✓ 9 s
unit · 212 tests✗ 3 failing
e2e · checkoutskipped
✗ 3 failing
The build flips to passing: one inverted frame on the CI panel alone, held a frame, then a 6 px shake that dies in five frames.
import { impactFrame, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
// The inverted frame and the shake land on the CI panel, not the stage.
const hit = impactFrame.mount(stage, {
invertTarget: ".ci-panel",
invertFrames: 1,
whiteFrames: 0,
holdFrames: 1,
shake: 6,
shakeFrames: 5,
decay: 0.6,
seed: 3,
});
const tl = timeline({ duration: 2.4 }).add(hit, 1);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();Brindle 3.2 — invoices that chase themselves. Out 14 March.
brindle.app/invoices
Invoice 0417
Okafor & Daughters
£2,140.00 · due 1 March
Reminder 1 · 3 Marsent
Reminder 2 · 10 Marsent
Paid · 12 Marreminders off
v3.2
The chip lands from 1.25× in two held frames and kicks 3 px. Then a gold line draws on under it and boils.
import { snapZoom, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
const chip = stage.querySelector(".version-chip");
// Lands in held frames and kicks; no fringe, no flash.
const snap = snapZoom.mount(chip, { from: 1.25, frames: 2, kick: 3, ease: "ease-out" });
const tl = timeline({ duration: 2.4 }).add(snap, 0.4);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();Changelog · 3.2.0
Changed in 3.2: reminders stop when the client pays.
brindle / CHANGELOG.md
## 3.2.0 · 14 March
## 3.1.4 · 2 March
A cut under a single frame of paper-white brings a close crop of one line over the page. Then a gold leak crosses the page, and only the page.
import { flashCut, lightLeak, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
// Style the shots with [data-shot="a"] and [data-shot="b"] on the stage.
const cut = flashCut.mount(stage, { frames: 1, fadeFrames: 2, color: "#fbf7f0" });
// The leak crosses the page's box only.
const leak = lightLeak.mount(stage, {
duration: 0.9,
color: "#e8a33d",
width: 0.24,
opacity: 0.5,
blend: "multiply",
region: { x: 0.47, y: 0.07, w: 0.4, h: 0.93 },
});
const tl = timeline({ duration: 3.2 }).add(cut, 1.2).add(leak, 1.75);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();$
A night ramp dithered with an 8 × 8 Bayer matrix, a crescent moon and a few stars, drawn on a monitor's screen under its scanlines.
import { ditherSky, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
// The sky fills the monitor's screen element, at a fixed art size scaled up in whole pixels.
const sky = ditherSky.mount(stage.querySelector(".screen"), {
timeOfDay: "night",
matrix: 8,
width: 56,
height: 42,
sunX: 0.74,
sunY: 0.3,
sunRadius: 4,
halo: 0,
stars: 0.0075,
seed: 5,
});
const tl = timeline({ duration: 4 }).add(sky);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();Brindle archive
Every receipt from 2019, searchable.
Receipt · 12 Apr 2019 · £42.18
harrow hardware 2019
Receipt · 12 Apr 2019£42.18
Harrow Hardware · 1 of 3 results
Dark specks on the printed photo only, swapped 8 times a second, so the print has tooth and the page stays flat.
import { grain, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
// On the printed photo itself: the texture belongs to the print, not the frame.
const print = grain.mount(stage.querySelector(".receipt-photo"), { amount: 0.14, size: 1, stepFps: 8, tone: "dark", seed: 2 });
const tl = timeline({ duration: 3 }).add(print);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();Forty loose notes, filed by the time you sit down.
Ferrow NotesInbox 0
40 filed · 08:52
Call the accountant re Q3→ Work
Book the Brindle demo, Thu 11:00→ Work
Dry cleaning, ticket 0912→ Home
Gift idea: a fountain pen→ Ideas
Paper scraps fall above the stack of notes and disappear into it. The loop has no seam.
import { drifters, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
// Only above the notes, down to the front card's top edge.
const scraps = drifters.mount(stage, {
shape: "scrap",
count: 12,
size: 1.2,
windX: 6,
windY: 60,
sway: 10,
spin: 30,
colors: { 0: "#ffffff" },
stroke: "#645d54",
strokeWidth: 1.6,
region: { x: 0.45, y: 0, w: 0.48, h: 0.31 },
loop: 6,
seed: 4,
});
const tl = timeline({ duration: 6 }).add(scraps);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();Outbox · 09:14brindle
To accounts@okafor-daughters.co.uk
Re Invoice 0417 · reminder 3
Next reminder16 Nov, 09:00
Late feepaused · part paid
Sent 09:14
The reminder types on behind a caret, two characters a step, then an underline wipes in under the three words that matter.
import { kineticType, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
const line = stage.querySelector(".outbox-line");
const words = kineticType.mount(line, {
text: "Reminder sent to Okafor & Daughters — invoice 0417, 9 days late.",
mode: "type",
charsPerStep: 2,
stepFps: 24,
underline: "#8a5a1c",
underlineThickness: 0.12,
mark: "9 days late",
});
const tl = timeline({ duration: 3.6 }).add(words, 0.3);
// Any frame, in any order: tl.seek(0.5). Or play it:
tl.player().play();Most web effects run on the wall clock: they look right live and come out wrong when a renderer captures a page one frame at a time. These don’t. Each effect has a pure frame(t, options) that returns SVG, pixels or style values, and a mount(el, options) that gives you seek(t).
Drawings hold “on twos”, the way hand-drawn animation does: speed lines boil between three seeded drawings, grain swaps plates, type steps on. One seeded random source drives all of it, and the package has a test that fails if anything reads the time or an unseeded random number.
A tiny timeline() puts effects at times and seeks them together, with a play/pause player for the page and a window.__timelines hook for frame-capture renderers.
import { impactFrame, registerTimeline, speedLines, timeline } from "@sochen/motion";
const stage = document.querySelector("#stage");
const tl = timeline({ duration: 3 })
// Streaks in a band behind the card, and the hit on the card alone.
.add(speedLines.mount(stage, { region: { x: 0.12, y: 0.55, w: 0.33, h: 0.26 }, seed: 7 }))
.add(impactFrame.mount(stage, { invertTarget: ".card" }), 0.5); // lands at 0.5 s
// Frame-capture renderers such as HyperFrames seek window.__timelines.main once per frame.
registerTimeline(tl, "main");import { AbsoluteFill, useCurrentFrame, useVideoConfig } from "remotion";
import { speedLines } from "@sochen/motion";
export function LinesBehindCard() {
const frame = useCurrentFrame();
const { fps, width, height } = useVideoConfig();
// A pure function of time: the same frame every render, in any order.
// Streaks in a band behind the card's trailing edge, not across the frame.
const svg = speedLines.frame(frame / fps, {
width,
height,
region: { x: 0.12, y: 0.55, w: 0.33, h: 0.26 },
seed: 7,
});
return <AbsoluteFill dangerouslySetInnerHTML={{ __html: svg }} />;
}Where it comes from
Sochen’s video studio uses these effects to make launch videos from your product screenshots and brand.
The library is free and stays free. The studio is where Sochen exports the video, on your credits: each render is priced before it runs, about 6 credits for a 15-second video. Try the studio.
Just one launch video? The launch pack is $15, paid once.
One launch video of your product, made from your website, in 9:16, 16:9 and 1:1, with 4 stills and a share image, and no “Made with Sochen” card. No credits needed, and nothing renews. See the launch pack.