kinescript

Paths, masks and morphs.

2D is drawn by the same Skia renderer as everything else, and each frame is still a function of the scene and its number alone.

Motion along paths
along rides a layer along SVG path data or a path layer ("#route"), turned with the path when orient is set. position takes keyframes of points, and keys with "smooth": true pass through every key without stopping and without overshooting it.
Groups with their own time
A group's enter with a stagger brings its children in one by one, in an order: start, end, center, edges or random. speed, loop and timeRemap run a group's children on a clock of their own.
Vector shapes
d takes keyframes and morphs any path into any other. Strokes take dash and a dashOffset that marches, corner rounds every corner, and rough wobbles an outline as if drawn by hand, with boil to redraw it several times a second. combine merges a group's shapes and text into one shape.
Gradients
Linear at any angle, radial and sweep, on shapes, text and strokes, and animated from one gradient to another of the same kind.
Masks and blends
mask shows a layer through another by its alpha or luma, or their inverse, with a feather. The mask moves on its own clock, so a lens can slide over a layer that holds still. Blend modes now include hardLight, colorDodge, colorBurn, exclusion, hue, saturation and luminosity.
Layer effects
glow, outline, innerShadow and displace, a warp by noise that slides over time, each sized by values that animate.
Many at once
repeat copies a shape, text, image or group up to 10,000 times, each copy placed and coloured by an expression of its number i. A particles layer emits by rate or burst, with presets for confetti, sparks, snow, dust and bubbles, and works each particle out from its number and a seed, so any frame renders on its own. Images play frame by frame from numbered files or a sheet.
Type on curves
textPath lays text along a path, each letter turned to it, and offset slides it along. unitFill and unitBlur colour and blur each letter by an expression, and sweep(i, n, p, soft) runs a highlight across a line.
SVG files
An .svg in an image layer draws as vectors, sharp at any size. An svg layer turns the file's shapes into layers named by their ids, so each piece can draw on, enter in turn, morph or take a mask.
Motion library
Twelve more enter and exit motions, ten emphasis motions for the middle of a layer's life, once, repeated or looped, five more sequence transitions, and barChart, lineChart and pieChart.
Built-ins
A layer with "use" expands into a finished piece: titleCard, lowerThird, callout (a ring and a label), focus (dims all but one region), progress (a bar that fills over the scene), kinetic, the three charts, and from a brand logo, bug, sting and endCard.

Masks and effects draw in offscreen layers only as large as what the layer draws. A glowing 220 px title adds 0.6 ms to a 1080p frame on the GPU. On the CPU a blur over a whole 1080p layer takes about 0.44 s, and kine check warns slow-effects when a frame's effects pass 0.25 s.

Kinetic type

The title's letters rise from the middle out, then pop in a random order. The version badge is a rect with its text cut out by combine, a line drops from behind the rule through a mask, and squares loop on a marching dashed track in a group with its own clock.

0.0 s
  1. line1
  2. line2
  3. badge
  4. rule
  5. below
  6. sub
  7. track
  8. beat
{  "canvas": {"w": 1920, "h": 1080, "fps": 30, "duration": 6, "bg": "#0a0c10"},  "layers": [    {"id": "line1", "type": "text", "text": "Write it", "x": 960, "y": 330, "size": 180, "weight": 700,     "letterSpacing": -4, "split": "chars",     "enter": {"name": "rise", "dur": 0.6, "stagger": 0.05, "order": "center", "dist": 90}},    {"id": "line2", "type": "text", "text": "as **data.**", "x": 960, "y": 520, "size": 180, "weight": 700,     "letterSpacing": -4, "emph": "#ff633f", "split": "chars", "at": 0.5,     "enter": {"name": "pop", "dur": 0.5, "stagger": 0.06, "order": "random", "seed": 4}},    {"id": "badge", "type": "group", "x": 1560, "y": 300, "rotate": -8, "combine": "subtract", "fill": "#ff633f",     "at": 1.4, "enter": {"name": "pop", "dur": 0.5},     "children": [       {"id": "plate", "type": "rect", "w": 250, "h": 130, "radius": 40},       {"id": "version", "type": "text", "text": "1.6", "size": 96, "weight": 700}     ]},    {"id": "rule", "type": "line", "points": [[-560, 0], [560, 0]], "x": 960, "y": 690, "stroke": "#242832",     "strokeWidth": 4, "at": 1.0, "enter": {"name": "draw", "dur": 0.7}},    {"id": "below", "type": "rect", "anchor": "top", "x": 960, "y": 694, "w": 1400, "h": 220, "fill": "#ffffff"},    {"id": "sub", "type": "text", "text": "One file. Every frame. Any diff.", "x": 960, "size": 56, "weight": 500,     "fill": "#9299a8", "mask": "below", "at": 1.6, "y": [[0, 640], [0.7, 770, "outCubic"]]},    {"id": "track", "type": "line", "points": [[-600, 0], [600, 0]], "x": 960, "y": 940, "stroke": "#242832",     "strokeWidth": 6, "dash": [18, 12], "dashOffset": "=-T * 60", "at": 1.2, "enter": "fade"},    {"id": "beat", "type": "group", "x": 960, "y": 940, "loop": 1.6, "at": 1.8,     "children": [       {"id": "key1", "type": "rect", "x": -300, "w": 28, "h": 28, "rotate": 45, "fill": "#b9f45d",        "scale": [[0, 0], [0.3, 1, "outBack"], [1.2, 1], [1.5, 0]]},       {"id": "key2", "type": "rect", "x": 0, "w": 28, "h": 28, "rotate": 45, "fill": "#b9f45d",        "scale": [[0.15, 0], [0.45, 1, "outBack"], [1.2, 1], [1.5, 0]]},       {"id": "key3", "type": "rect", "x": 300, "w": 28, "h": 28, "rotate": 45, "fill": "#b9f45d",        "scale": [[0.3, 0], [0.6, 1, "outBack"], [1.2, 1], [1.5, 0]]}     ]}  ]}

Explainer

Hand-drawn boxes that boil, and a dot that rides a dashed route with along through the check box, which glows, into the video box. A lens mask lights the route round the dot.

0.0 s
  1. title
  2. route
  3. lens
  4. lit
  5. rider
  6. scene
  7. check
  8. video
  9. scene-label
  10. check-label
  11. video-label
  12. caption
{  "canvas": {"w": 1920, "h": 1080, "fps": 30, "duration": 6, "bg": "#0a0c10"},  "layers": [    {"id": "title", "type": "text", "text": "From JSON to video.", "x": 960, "y": 200, "size": 84, "weight": 700,     "enter": {"name": "rise", "dur": 0.6}},    {"id": "route", "type": "path", "d": "M570 540 C 650 660 730 660 810 540 L 1110 540 C 1190 420 1270 420 1350 540",     "stroke": "#9299a8", "strokeWidth": 5, "dash": [14, 10], "at": 1.2, "draw": [[0, 0], [1.0, 1, "linear"]]},    {"id": "lens", "type": "circle", "r": 90, "at": 2.2,     "along": {"d": "#route", "p": [[0, 0], [1.0, 0.5], [1.6, 0.5], [2.6, 1]]}},    {"id": "lit", "type": "path", "d": "M570 540 C 650 660 730 660 810 540 L 1110 540 C 1190 420 1270 420 1350 540",     "stroke": "#b9f45d", "strokeWidth": 7, "at": 2.2, "mask": {"layer": "lens", "feather": 30}},    {"id": "rider", "type": "circle", "r": 18, "fill": "#ff633f", "at": 2.2,     "along": {"d": "#route", "p": [[0, 0], [1.0, 0.5], [1.6, 0.5], [2.6, 1]]}},    {"id": "scene", "type": "rect", "x": 420, "y": 540, "w": 300, "h": 170, "radius": 24, "fill": "#12151b",     "stroke": "#f2f0e8", "strokeWidth": 5, "rough": {"amount": 4, "length": 16, "seed": 1, "boil": 6},     "at": 0.3, "enter": {"name": "draw", "dur": 0.8}},    {"id": "check", "type": "rect", "x": 960, "y": 540, "w": 300, "h": 170, "radius": 24, "fill": "#12151b",     "stroke": [[2.65, "#f2f0e8"], [2.95, "#b9f45d"]], "strokeWidth": 5,     "rough": {"amount": 4, "length": 16, "seed": 2, "boil": 6},     "glow": {"color": "#b9f45d", "size": [[2.65, 0], [2.95, 28], [3.4, 0]]},     "at": 0.45, "enter": {"name": "draw", "dur": 0.8}},    {"id": "video", "type": "rect", "x": 1500, "y": 540, "w": 300, "h": 170, "radius": 24,     "fill": [[4.0, "#12151b"], [4.3, "#ff633f"]], "stroke": "#f2f0e8", "strokeWidth": 5,     "rough": {"amount": 4, "length": 16, "seed": 3, "boil": 6},     "at": 0.6, "enter": {"name": "draw", "dur": 0.8}},    {"id": "scene-label", "type": "text", "text": "scene.json", "x": 420, "y": 540, "size": 40, "weight": 500,     "font": "IBM Plex Mono", "at": 0.9, "enter": "fade"},    {"id": "check-label", "type": "text", "text": "kine check", "x": 960, "y": 540, "size": 40, "weight": 500,     "font": "IBM Plex Mono", "at": 1.05, "enter": "fade"},    {"id": "video-label", "type": "text", "text": "video", "x": 1500, "y": 540, "size": 44, "weight": 700,     "fill": [[3.45, "#f2f0e8"], [3.7, "#0a0c10"]], "at": 1.2, "enter": "fade"},    {"id": "caption", "type": "text", "text": "Checked before it renders.", "x": 960, "y": 860, "size": 48,     "weight": 500, "fill": "#9299a8", "at": 4.4, "enter": {"name": "rise", "dur": 0.5}}  ]}

Motions

Twelve cards, each brought on by one of the motions 1.6.1 adds: land and squash drop in and bounce, swing hangs from its top edge, iris, clock and blinds reveal, and scramble, glitch and whip settle, break up and slide in. The title rises from behind its own edge with rise-mask.

0.0 s
  1. title
  2. subtitle
  3. land
  4. squash
  5. swing
  6. elastic
  7. stretch
  8. iris
  9. clock
  10. blinds
  11. rise-mask
  12. scramble
  13. glitch
  14. whip
{  "canvas": {"w": 1920, "h": 1080, "fps": 30, "duration": 7, "bg": "#0a0c10"},  "layers": [    {"id": "title", "type": "text", "text": "TWELVE WAYS IN", "x": "50%", "y": "11%", "size": 72, "weight": 700,     "letterSpacing": 8, "fill": "$sheet", "at": 0.1, "enter": {"name": "rise-mask", "dur": 0.7}},    {"id": "subtitle", "type": "text", "text": "one word in \"enter\" or \"exit\"", "font": "$mono", "size": 30,     "x": "50%", "y": "19%", "fill": "$annotation", "at": 0.4, "enter": {"name": "scramble", "dur": 1.2, "seed": 1}},     {"id": "land", "type": "group", "x": "20%", "y": "37%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$cue", "at": 0.7, "enter": "land", "children": [      {"id": "land-name", "type": "text", "text": "land", "font": "$mono", "size": 44, "fill": "$void"}]},    {"id": "squash", "type": "group", "x": "40%", "y": "37%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$sheet", "at": 1.05, "enter": "squash", "children": [      {"id": "squash-name", "type": "text", "text": "squash", "font": "$mono", "size": 44, "fill": "$void"}]},    {"id": "swing", "type": "group", "x": "60%", "y": "37%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$key", "at": 1.4, "enter": "swing", "children": [      {"id": "swing-name", "type": "text", "text": "swing", "font": "$mono", "size": 44, "fill": "$void"}]},    {"id": "elastic", "type": "group", "x": "80%", "y": "37%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$track", "at": 1.75, "enter": "elastic", "children": [      {"id": "elastic-name", "type": "text", "text": "elastic", "font": "$mono", "size": 44, "fill": "$sheet"}]},     {"id": "stretch", "type": "group", "x": "20%", "y": "59%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$sheet", "at": 2.1, "enter": "stretch", "children": [      {"id": "stretch-name", "type": "text", "text": "stretch", "font": "$mono", "size": 44, "fill": "$void"}]},    {"id": "iris", "type": "group", "x": "40%", "y": "59%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$key", "at": 2.45, "enter": "iris", "children": [      {"id": "iris-name", "type": "text", "text": "iris", "font": "$mono", "size": 44, "fill": "$void"}]},    {"id": "clock", "type": "group", "x": "60%", "y": "59%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$track", "at": 2.8, "enter": "clock", "children": [      {"id": "clock-name", "type": "text", "text": "clock", "font": "$mono", "size": 44, "fill": "$sheet"}]},    {"id": "blinds", "type": "group", "x": "80%", "y": "59%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$cue", "at": 3.15, "enter": "blinds", "children": [      {"id": "blinds-name", "type": "text", "text": "blinds", "font": "$mono", "size": 44, "fill": "$void"}]},     {"id": "rise-mask", "type": "group", "x": "20%", "y": "81%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$key", "at": 3.5, "enter": {"name": "fade", "dur": 0.3}, "children": [      {"id": "rise-mask-name", "type": "text", "text": "rise-mask", "font": "$mono", "size": 44,       "fill": "$void", "at": 0.2, "enter": {"name": "rise-mask", "dur": 0.7}}]},    {"id": "scramble", "type": "group", "x": "40%", "y": "81%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$track", "at": 3.85, "enter": {"name": "fade", "dur": 0.3}, "children": [      {"id": "scramble-name", "type": "text", "text": "scramble", "font": "$mono", "size": 44,       "fill": "$sheet", "at": 0.2, "enter": {"name": "scramble", "dur": 1, "seed": 4}}]},    {"id": "glitch", "type": "group", "x": "60%", "y": "81%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$cue", "at": 4.2, "enter": {"name": "glitch", "dur": 0.7}, "children": [      {"id": "glitch-name", "type": "text", "text": "glitch", "font": "$mono", "size": 44, "fill": "$void"}]},    {"id": "whip", "type": "group", "x": "80%", "y": "81%", "anchor": "center", "w": 360, "h": 170,     "radius": 22, "fill": "$sheet", "at": 4.55, "enter": "whip", "children": [      {"id": "whip-name", "type": "text", "text": "whip", "font": "$mono", "size": 44, "fill": "$void"}]}  ]}

Charts

Each chart is one layer, {"use": "barChart", "data": [["Q1", 42], ...]}: the bars grow in turn under values that count up, the line draws on with a dot at each point as it gets there, and the doughnut's slices sweep round from twelve o'clock.

0.0 s
  1. title
  2. bars-head
  3. bars
  4. line-head
  5. line
  6. pie-head
  7. pie
{  "canvas": {"w": 1920, "h": 1080, "fps": 30, "duration": 5, "bg": "#0a0c10"},  "layers": [    {"id": "title", "type": "text", "text": "THREE CHARTS", "x": "50%", "y": "11%", "size": 72, "weight": 700,     "letterSpacing": 8, "fill": "$sheet", "at": 0.1, "enter": {"name": "rise-mask", "dur": 0.7}},    {"id": "bars-head", "type": "text", "text": "barChart", "font": "$mono", "size": 30, "x": 350, "y": 330,     "fill": "$annotation", "at": 0.3, "enter": "fade"},    {"use": "barChart", "id": "bars", "x": 350, "y": 620, "w": 480, "h": 340, "size": 24, "valueSize": 30,     "data": [["Q1", 42], ["Q2", 58], ["Q3", 71], ["Q4", 64]], "highlight": "Q3", "at": 0.5},    {"id": "line-head", "type": "text", "text": "lineChart", "font": "$mono", "size": 30, "x": 960, "y": 330,     "fill": "$annotation", "at": 0.3, "enter": "fade"},    {"use": "lineChart", "id": "line", "x": 960, "y": 620, "w": 440, "h": 300, "size": 24, "color": "$key",     "data": [["Mon", 12], ["Tue", 19], ["Wed", 15], ["Thu", 27], ["Fri", 34]], "at": 0.7},    {"id": "pie-head", "type": "text", "text": "pieChart", "font": "$mono", "size": 30, "x": 1530, "y": 330,     "fill": "$annotation", "at": 0.3, "enter": "fade"},    {"use": "pieChart", "id": "pie", "x": 1530, "y": 650, "r": 140, "inner": 0.55, "size": 24,     "data": [["Video", 46], ["Web", 31], ["Print", 23]], "at": 0.9}  ]}