@algorisys/tinyfly 0.94.0 → 0.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +6 -6
  2. package/docs/acting.md +170 -0
  3. package/docs/api-reference.md +3 -1
  4. package/docs/editor-guide.md +1 -1
  5. package/docs/examples.md +1 -1
  6. package/docs/getting-started.md +1 -1
  7. package/docs/gsap-compat.md +1 -1
  8. package/docs/llm-guide.md +41 -2
  9. package/docs/maps.md +2 -2
  10. package/docs/props.md +202 -0
  11. package/docs/scene-3d.md +141 -0
  12. package/docs/teaching.md +1 -1
  13. package/lib/addons/characters.js +6188 -2261
  14. package/lib/addons/scene-3d.js +140 -138
  15. package/lib/browser/tinyfly-scene-3d.iife.js +1 -1
  16. package/lib/browser/tinyfly.iife.js +17 -9
  17. package/lib/browser/tinyfly.js +8077 -4095
  18. package/lib/browser/tinyfly.umd.js +17 -9
  19. package/lib/engine/tinyfly-engine.js +612 -600
  20. package/lib/engine/tinyfly-engine.umd.cjs +2 -2
  21. package/lib/types/characters/acting/index.d.ts +1 -0
  22. package/lib/types/characters/acting/surface-script.d.ts +92 -0
  23. package/lib/types/characters/capabilities.d.ts +22 -0
  24. package/lib/types/characters/character-script-3d.d.ts +80 -0
  25. package/lib/types/characters/character.d.ts +19 -0
  26. package/lib/types/characters/chart.d.ts +108 -0
  27. package/lib/types/characters/code-panel.d.ts +21 -46
  28. package/lib/types/characters/ground-path.d.ts +32 -0
  29. package/lib/types/characters/index.d.ts +6 -0
  30. package/lib/types/characters/props/clip.d.ts +5 -0
  31. package/lib/types/characters/props/draw.d.ts +60 -0
  32. package/lib/types/characters/props/effects.d.ts +12 -0
  33. package/lib/types/characters/props/families/aircraft.d.ts +37 -0
  34. package/lib/types/characters/props/families/animals.d.ts +156 -0
  35. package/lib/types/characters/props/families/birds.d.ts +86 -0
  36. package/lib/types/characters/props/families/environment.d.ts +71 -0
  37. package/lib/types/characters/props/families/vehicle.d.ts +129 -0
  38. package/lib/types/characters/props/hidden.d.ts +49 -0
  39. package/lib/types/characters/props/index.d.ts +24 -0
  40. package/lib/types/characters/props/mesh-3d.d.ts +24 -0
  41. package/lib/types/characters/props/presets.d.ts +34 -0
  42. package/lib/types/characters/props/prop-surface.d.ts +63 -0
  43. package/lib/types/characters/props/ride-3d.d.ts +71 -0
  44. package/lib/types/characters/props/ride.d.ts +79 -0
  45. package/lib/types/characters/props/rig.d.ts +224 -0
  46. package/lib/types/characters/props/scene-objects.d.ts +2 -0
  47. package/lib/types/characters/props/script-3d.d.ts +85 -0
  48. package/lib/types/characters/props/script.d.ts +145 -0
  49. package/lib/types/characters/props/shapes.d.ts +96 -0
  50. package/lib/types/characters/props/slice.d.ts +66 -0
  51. package/lib/types/characters/props/target.d.ts +129 -0
  52. package/lib/types/characters/surface/edit-log.d.ts +47 -0
  53. package/lib/types/characters/surface/index.d.ts +11 -0
  54. package/lib/types/characters/surface/pieces.d.ts +61 -0
  55. package/lib/types/characters/surface/ride.d.ts +31 -0
  56. package/lib/types/characters/surface/surface-box.d.ts +18 -0
  57. package/lib/types/characters/surface/surface.d.ts +79 -0
  58. package/lib/types/characters/whiteboard.d.ts +131 -0
  59. package/lib/types/engine/authoring/index.d.ts +1 -0
  60. package/lib/types/engine/authoring/spring-follow.d.ts +25 -0
  61. package/lib/types/scene-3d/object-kind.d.ts +4 -1
  62. package/lib/types/scene-3d/scene-types.d.ts +41 -1
  63. package/llms-full.txt +699 -11
  64. package/llms.txt +28 -27
  65. package/package.json +1 -1
  66. package/skills/tinyfly/SKILL.md +37 -9
package/llms.txt CHANGED
@@ -13,45 +13,46 @@ Key facts:
13
13
  - For language models: read the capability catalog first (`npx @algorisys/tinyfly capabilities`, or the end of llms-full.txt). It is generated from the library, so every name in it (poses, expressions, gags, gaits, beat actions, canvas properties, code-panel edits) is accepted, and names not in it are rejected with the name probably meant. Check beat scripts with `npx @algorisys/tinyfly check beats.json`, tracks with `checkTracks(tracks, targets)`, and ask any target what it animates with `describeTarget(target)`. The npm package ships `docs/`, `llms.txt`, `llms-full.txt` and an agent skill (`skills/tinyfly/SKILL.md`); `docs/llm-guide.md` describes the workflow.
14
14
  - Source: https://github.com/algorisys-oss/tinyfly. License: MIT.
15
15
 
16
- All documentation and the interactive course in a single file: [llms-full.txt](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/llms-full.txt)
16
+ All documentation and the interactive course in a single file: [llms-full.txt](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/llms-full.txt)
17
17
 
18
18
  ## Start here
19
19
 
20
- - [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/getting-started.md): What tinyfly is, making a first animation in the editor, and using it from code, a script tag or the CDN.
21
- - [GSAP Compatibility](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/gsap-compat.md): The GSAP-style API (`live.to`, `tf.timeline`): supported vars, motion paths, morphSVG, text, inertia, Draggable, Flip, and where it differs from GSAP.
22
- - [Code Examples](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/examples.md): Recipes with the engine API: fades, loops, colour and bezier easing, loading JSON, canvas and SVG rendering, multi-scene sequences, motion paths and script-tag embeds.
23
- - [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/llm-guide.md): For assistants and the people setting them up: read the capability catalog (`tinyfly capabilities`), ask targets what they animate (`describeTarget`), check beats and tracks with did-you-mean errors (`tinyfly check`, `checkTracks`), render stills to look at, and the agent skill shipped in the package.
20
+ - [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/getting-started.md): What tinyfly is, making a first animation in the editor, and using it from code, a script tag or the CDN.
21
+ - [GSAP Compatibility](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/gsap-compat.md): The GSAP-style API (`live.to`, `tf.timeline`): supported vars, motion paths, morphSVG, text, inertia, Draggable, Flip, and where it differs from GSAP.
22
+ - [Code Examples](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/examples.md): Recipes with the engine API: fades, loops, colour and bezier easing, loading JSON, canvas and SVG rendering, multi-scene sequences, motion paths and script-tag embeds.
23
+ - [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/llm-guide.md): For assistants and the people setting them up: read the capability catalog (`tinyfly capabilities`), ask targets what they animate (`describeTarget`), check beats and tracks with did-you-mean errors (`tinyfly check`, `checkTracks`), render stills to look at, and the agent skill shipped in the package.
24
24
 
25
25
  ## Reference
26
26
 
27
- - [API Reference](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/api-reference.md): Every public engine, player and adapter API: Timeline, tracks, keyframes, easing, drivers, serialization and exports.
28
- - [File Format](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/file-format.md): The JSON animation format: timelines, every track kind, keyframes, easing and the project file — for generating or consuming animations.
27
+ - [API Reference](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/api-reference.md): Every public engine, player and adapter API: Timeline, tracks, keyframes, easing, drivers, serialization and exports.
28
+ - [File Format](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/file-format.md): The JSON animation format: timelines, every track kind, keyframes, easing and the project file — for generating or consuming animations.
29
29
 
30
30
  ## Editor features
31
31
 
32
- - [Editor Guide](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/editor-guide.md): Every panel and feature of the visual editor, from elements and keyframes to text and inertia tracks, preview and export.
33
- - [Shape Morphing](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/shape-morph.md): Tweening one path into another, including shapes with different point counts and several subpaths.
34
- - [Pen Tool](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/pen-tool.md): Drawing custom paths point by point with straight segments and bezier curves.
35
- - [Polygons & Stars](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/polygon-star.md): Parametric polygon and star shapes that stay editable while animating like any path.
36
- - [Grid & Snapping](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/grid-and-snapping.md): The grid overlay, snapping to grid, elements and artboard centre, and alignment guides.
37
- - [Onion Skinning](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/onion-skinning.md): Ghost frames before and after the playhead for judging arcs and easing.
38
- - [Sprite-sheet Export](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/sprite-sheet-export.md): Exporting frames as a PNG grid plus JSON metadata for game engines and canvas players.
32
+ - [Editor Guide](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/editor-guide.md): Every panel and feature of the visual editor, from elements and keyframes to text and inertia tracks, preview and export.
33
+ - [Shape Morphing](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/shape-morph.md): Tweening one path into another, including shapes with different point counts and several subpaths.
34
+ - [Pen Tool](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/pen-tool.md): Drawing custom paths point by point with straight segments and bezier curves.
35
+ - [Polygons & Stars](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/polygon-star.md): Parametric polygon and star shapes that stay editable while animating like any path.
36
+ - [Grid & Snapping](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/grid-and-snapping.md): The grid overlay, snapping to grid, elements and artboard centre, and alignment guides.
37
+ - [Onion Skinning](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/onion-skinning.md): Ghost frames before and after the playhead for judging arcs and easing.
38
+ - [Sprite-sheet Export](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/sprite-sheet-export.md): Exporting frames as a PNG grid plus JSON metadata for game engines and canvas players.
39
39
 
40
40
  ## Guides
41
41
 
42
- - [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/scroll-animation.md): Scroll-driven and play-when-visible animation with ScrollDriver and VisibilityDriver.
43
- - [Teaching Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/teaching.md): Step-through explanatory figures: markers, captions in several languages, the teaching player, step controls, one-script declarative embeds, tinyfly/teach diagram primitives, and validate / render for build pipelines.
44
- - [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/video-rendering.md): Rendering a scene to MP4 without a browser: `tinyfly video`, custom canvas targets drawn by code, timing from narration and recorded voice-over, the stick-figure character, SRT/WebVTT captions, stills, porting Cairo scripts, and a benchmark against pycairo.
45
- - [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/maps.md): Maps that animate: a camera that flies in to a city, pins that drop in, routes that draw themselves while a marker travels them, on OpenStreetMap tiles or an offline world outline (also in pencil), in the browser and in headless video.
46
- - [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/cartoon-hands.md): A hand you can pose: a palm and five fingers in 3D, posed by numbers (curls, thumb, spread, wrist turn), ready-made shapes from a fist to a pencil grip, left and right, four or five fingers, in clean, pencil and silhouette looks; the animator's hand and character gloves are built on it.
47
- - [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/acting.md): actTracks(): the same key poses, acted: anticipation, overshoot and settle, overlapping joints, eyes that lead and blink, moving holds and jump squash, in full, snappy or limited styles; gags as data (take, double take, wind-up); a line of action (bend); gaits with personality; lip-sync from text (Latin and Devanagari); beat scripts compiled to acted tracks; your own actions (defineAction), gaits (defineGait) and personas (persona()); acting on code (codePanel lines and words as anchors: leap onto a line, point at it, swipe it away wiped, knocked off or blurred; grab, throw, kick, carry and drop words, push them along their line, write new text in by hand; ride a line as gaps close); camera shots (push in, cut, shake, follow); the cartoon zip; speed lines, dust puffs and impact stars; drawing on twos (a timeline setting); acting, gags, walks and lines in the editor.
48
- - [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/dance.md): The stick figure dances disco, hip hop, breaking, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap (with tap sounds) and popping (side glide, moonwalk), and does front, back, layout and scissor flips, cartwheels, handsprings, split leaps and full splits: wrists, ankles, turn-out, spin and rise as pose fields; moves keyed in beats; styles, grooves and routines as plain data.
49
- - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/scene-3d.md): @algorisys/tinyfly/scene-3d: cameras, lights and meshes as JSON, in metres, animated by tracks at <scene>/<object> (cuts with activeCamera), drawn on a 2D canvas with flat, smooth or toon shading, ink outlines and fog, in browsers, Workers and Node (MP4 with tinyfly video); v2 characters in scenes, dancing, in their pen looks or as solid figures, seen by any camera.
50
- - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/3d-rotations.md): CSS-style 3D for flat elements in every renderer (rotateX, rotateY, z, perspective, backface visibility; true perspective on Canvas and WebGL, matching CSS within a pixel), one documented transform order, the editor's 3D fields; smooth quaternion rotations with interpolation: "slerp"; the vec3, quat and mat4 helpers; format version 2.
51
- - [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/extending.md): Writing a render adapter, animating any object with live and the ticker, custom and parametric eases, stagger offsets, adding a track kind, and contributing gallery examples.
52
- - [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
42
+ - [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/scroll-animation.md): Scroll-driven and play-when-visible animation with ScrollDriver and VisibilityDriver.
43
+ - [Props: Everyday Objects with Behaviours](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/props.md): Cars, trucks, buses, tractors, carts, train carriages, bikes, motorbikes, trees, houses, a helicopter and a plane: 3D rigs drawn with the characters’ pens (clean, pencil) that turn toward the camera, with beats acted through the 12 principles (anticipation, squash and stretch, follow-through, an exaggeration dial), wheels that roll exactly, effects, and figures riding them.
44
+ - [Teaching Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/teaching.md): Step-through explanatory figures: markers, captions in several languages, the teaching player, step controls, one-script declarative embeds, tinyfly/teach diagram primitives, and validate / render for build pipelines.
45
+ - [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/video-rendering.md): Rendering a scene to MP4 without a browser: `tinyfly video`, custom canvas targets drawn by code, timing from narration and recorded voice-over, the stick-figure character, SRT/WebVTT captions, stills, porting Cairo scripts, and a benchmark against pycairo.
46
+ - [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/maps.md): Maps that animate: a camera that flies in to a city, pins that drop in, routes that draw themselves while a marker travels them, on OpenStreetMap tiles or an offline world outline (also in pencil), in the browser and in headless video.
47
+ - [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/cartoon-hands.md): A hand you can pose: a palm and five fingers in 3D, posed by numbers (curls, thumb, spread, wrist turn), ready-made shapes from a fist to a pencil grip, left and right, four or five fingers, in clean, pencil and silhouette looks; the animator's hand and character gloves are built on it.
48
+ - [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/acting.md): actTracks(): the same key poses, acted: anticipation, overshoot and settle, overlapping joints, eyes that lead and blink, moving holds and jump squash, in full, snappy or limited styles; gags as data (take, double take, wind-up); a line of action (bend); gaits with personality; lip-sync from text (Latin and Devanagari); beat scripts compiled to acted tracks; your own actions (defineAction), gaits (defineGait) and personas (persona()); acting on code (codePanel lines and words as anchors: leap onto a line, point at it, swipe it away wiped, knocked off or blurred; grab, throw, kick, carry and drop words, push them along their line, write new text in by hand; ride a line as gaps close); camera shots (push in, cut, shake, follow); the cartoon zip; speed lines, dust puffs and impact stars; drawing on twos (a timeline setting); acting, gags, walks and lines in the editor.
49
+ - [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/dance.md): The stick figure dances disco, hip hop, breaking, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap (with tap sounds) and popping (side glide, moonwalk), and does front, back, layout and scissor flips, cartwheels, handsprings, split leaps and full splits: wrists, ankles, turn-out, spin and rise as pose fields; moves keyed in beats; styles, grooves and routines as plain data.
50
+ - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/scene-3d.md): @algorisys/tinyfly/scene-3d: cameras, lights and meshes as JSON, in metres, animated by tracks at <scene>/<object> (cuts with activeCamera), drawn on a 2D canvas with flat, smooth or toon shading, ink outlines and fog, in browsers, Workers and Node (MP4 with tinyfly video); v2 characters in scenes, dancing, in their pen looks or as solid figures, seen by any camera.
51
+ - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/3d-rotations.md): CSS-style 3D for flat elements in every renderer (rotateX, rotateY, z, perspective, backface visibility; true perspective on Canvas and WebGL, matching CSS within a pixel), one documented transform order, the editor's 3D fields; smooth quaternion rotations with interpolation: "slerp"; the vec3, quat and mat4 helpers; format version 2.
52
+ - [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/extending.md): Writing a render adapter, animating any object with live and the ticker, custom and parametric eases, stagger offsets, adding a track kind, and contributing gallery examples.
53
+ - [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
53
54
 
54
55
  ## Optional
55
56
 
56
- - [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/README.md): Feature overview, project layout and development setup.
57
- - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.94.0/release-notes/README.md): What changed in each version.
57
+ - [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/README.md): Feature overview, project layout and development setup.
58
+ - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/release-notes/README.md): What changed in each version.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algorisys/tinyfly",
3
- "version": "0.94.0",
3
+ "version": "0.97.0",
4
4
  "type": "module",
5
5
  "description": "Lightweight, API-driven animation engine and editor. The engine is framework-agnostic and runs in browsers, Web Workers, and Node.",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tinyfly
3
- description: Write animations with tinyfly (@algorisys/tinyfly), the JSON-first animation engine — timelines and tracks, canvas shapes, stick-figure characters acting from beat scripts, code panels figures act on, teaching figures and headless video. Use when asked to create, edit or fix a tinyfly animation, a stick-figure scene, an animated code walkthrough or a tinyfly timeline.
3
+ description: Write animations with tinyfly (@algorisys/tinyfly), the JSON-first animation engine — timelines and tracks, canvas shapes, stick-figure characters acting from beat scripts, surfaces figures act on (code panels, whiteboards, charts, props), teaching figures and headless video. Use when asked to create, edit or fix a tinyfly animation, a stick-figure scene, an animated code walkthrough, a whiteboard lesson, a chart presentation or a tinyfly timeline.
4
4
  ---
5
5
 
6
6
  # Writing tinyfly animations
@@ -15,13 +15,14 @@ Run `npx @algorisys/tinyfly capabilities` (add `--json` for data) and read it
15
15
  before writing anything. It is generated from the installed library: easings,
16
16
  track kinds, every canvas property with units and ranges, the stick figure's
17
17
  joints, poses, expressions (moods), gags, gaits, beat actions (and the fields
18
- each needs), dances, flips, hand shapes, the code panel's languages, anchors
19
- and edits, camera shots, teaching helpers.
18
+ each needs), dances, flips, hand shapes, the code panel's languages, every surface's
19
+ anchors and edits (code, board, chart), camera shots, teaching helpers.
20
20
 
21
21
  For the how-to, read the docs shipped with the package, at the installed
22
22
  version: `node_modules/@algorisys/tinyfly/llms.txt` (index), `docs/*.md`, or
23
- `llms-full.txt` (everything). For characters acting on code, read
24
- `docs/acting.md` ("Beat scripts" and "Acting on code").
23
+ `llms-full.txt` (everything). For characters acting on code, boards and
24
+ charts, read `docs/acting.md` ("Beat scripts", "Acting on code", "A whole
25
+ scene as data", "Whiteboards", "Charts").
25
26
 
26
27
  At runtime, `describeTarget(target)` says what any target animates (with its
27
28
  current values) and what it can do; `animatableProperties(target)` gives the
@@ -30,7 +31,8 @@ names.
30
31
  ## 2. Write
31
32
 
32
33
  - Prefer the high-level builders: `scriptTracks()` beats for characters,
33
- `codePanel()` for code, `lesson()` and the diagram primitives for teaching
34
+ `codePanel()` for code, `whiteboard()` for lessons on a board,
35
+ `chart()` for bar and line charts, `lesson()` and the diagram primitives for teaching
34
36
  figures, `cameraTracks()` for camera moves. They produce plain JSON tracks.
35
37
  - Aim beats at anchors, never guessed coordinates: `code.line(n)`,
36
38
  `code.token(n, 'word')`, `code.spot(n, column, width)`, `piece.home`,
@@ -41,6 +43,29 @@ names.
41
43
  Canvas `x`/`y` tracks are offsets from where a target was placed. Scene y
42
44
  grows downward. Angles are degrees.
43
45
  - Record code-panel edits before `code.ride(tracks, figureId, { ground })`.
46
+ - For a figure acting on a surface (code panel, whiteboard, chart), prefer
47
+ `surfaceScript(figureId, { name: surface }, beats, options)`: aim beats at
48
+ named places (`target: { surface: 'board', anchor: 'term:eq:+ 4' }`) and put
49
+ the surface's answer on the beat (`then: { surface, edit, anchor, at: 'release' }`).
50
+ A cue's `at` is a moment name (`start`, `contact`, `release`, `end`), never
51
+ ms; `until` sets its length. It records the edits in beat order and rides
52
+ the figure on bars and lines for you. Use `result.tracks` (figure and
53
+ surfaces). Places name items by id: declare them first (`items`, `data`).
54
+ - A figure that starts on the right walking left needs `facing: -1` in the
55
+ script options.
56
+ - A figure changes a prop's state through `propSurface(propTarget(…))`
57
+ (`switch` / `set` on `control:door`, `control:lights`; aim at `anchor:NAME`
58
+ or `part:ID`). Walk figures on a prop's front line (a house's
59
+ `anchor:doorstep` y), not on the prop's own `y`, or they pass through its
60
+ walls.
61
+ - For objects in the scene (vehicles, trees, houses, aircraft, animals,
62
+ birds) use the prop presets with `propScript()`; seat figures with
63
+ `propRide()`, tow with `propTow()`. Aim figure beats at prop anchors
64
+ (`propAt(...).anchor('door')`), and perch birds at them (`branch`, `ridge`).
65
+ `style: 'stick'` draws props as line art. In a 3D scene, place props with
66
+ `rotation: [0, deg, 0]` (`rotateY` is a track) and script them with
67
+ `propScript3D` (`to: [x, z]` metres), not `propScript` (screen px);
68
+ characters there with `characterScript3D`, riders with `propRide3D`.
44
69
  - For recurring characters, make a `persona()` (look, acting, gait, mood,
45
70
  stance) and use `persona.script()`; for a move the catalog lacks, write it
46
71
  with `defineAction()` rather than hand-keying joints in many places.
@@ -48,7 +73,9 @@ names.
48
73
  ## 3. Check
49
74
 
50
75
  - Beat scripts: `npx @algorisys/tinyfly check beats.json` (or `checkBeats()`;
51
- `scriptTracks()` throws on the same errors).
76
+ `scriptTracks()` throws on the same errors). Beats with surface places and
77
+ cues: `checkSurfaceBeats(beats, surfaces)` (`surfaceScript()` throws on the
78
+ same errors).
52
79
  - Tracks: `checkTracks(tracks, targets)` — unknown targets and properties,
53
80
  key order, value kinds and ranges.
54
81
  - Teaching timelines: `npx @algorisys/tinyfly validate timeline.json --markup figure.svg`.
@@ -63,5 +90,6 @@ Render stills and look at them before saying it works:
63
90
  npx @algorisys/tinyfly video scene.mjs --stills frames --times 0,800,1600
64
91
  ```
65
92
 
66
- Check that hands meet what they touch, figures stand on their floors, text
67
- lands where it should and nothing leaves the frame. Fix and render again.
93
+ Check that hands meet what they touch, figures face and point the right
94
+ way, stand on their floors (and ride bars as they grow), text lands where it
95
+ should and nothing leaves the frame. Fix and render again.