@algorisys/tinyfly 0.98.0 → 0.100.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 (48) hide show
  1. package/README.md +10 -10
  2. package/docs/acting.md +81 -14
  3. package/docs/character-appearance.md +96 -10
  4. package/docs/editor-guide.md +76 -4
  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 +29 -9
  9. package/docs/maps.md +2 -2
  10. package/docs/props.md +61 -1
  11. package/docs/scene-3d.md +3 -1
  12. package/docs/teaching.md +1 -1
  13. package/lib/addons/characters.js +6709 -5248
  14. package/lib/browser/tinyfly.iife.js +15 -15
  15. package/lib/browser/tinyfly.js +7532 -6071
  16. package/lib/browser/tinyfly.umd.js +15 -15
  17. package/lib/types/characters/acting/character-script.d.ts +56 -0
  18. package/lib/types/characters/acting/index.d.ts +1 -0
  19. package/lib/types/characters/acting/script.d.ts +9 -0
  20. package/lib/types/characters/capabilities.d.ts +2 -0
  21. package/lib/types/characters/character.d.ts +21 -2
  22. package/lib/types/characters/chart.d.ts +52 -14
  23. package/lib/types/characters/hair-follow.d.ts +82 -0
  24. package/lib/types/characters/hands/held-items.d.ts +6 -2
  25. package/lib/types/characters/head/face.d.ts +6 -1
  26. package/lib/types/characters/head/hair.d.ts +27 -1
  27. package/lib/types/characters/head/head-look.d.ts +5 -2
  28. package/lib/types/characters/head/index.d.ts +1 -1
  29. package/lib/types/characters/index.d.ts +4 -2
  30. package/lib/types/characters/interactions.d.ts +60 -0
  31. package/lib/types/characters/props/draw.d.ts +9 -0
  32. package/lib/types/characters/props/families/animals.d.ts +6 -0
  33. package/lib/types/characters/props/families/birds.d.ts +16 -0
  34. package/lib/types/characters/props/families/furniture.d.ts +102 -0
  35. package/lib/types/characters/props/index.d.ts +1 -0
  36. package/lib/types/characters/props/presets.d.ts +15 -2
  37. package/lib/types/characters/props/prop-surface.d.ts +14 -3
  38. package/lib/types/characters/props/ride-3d.d.ts +34 -2
  39. package/lib/types/characters/props/target.d.ts +5 -1
  40. package/lib/types/characters/scenery.d.ts +126 -0
  41. package/lib/types/characters/species/human-motion.d.ts +17 -0
  42. package/lib/types/characters/species/human.d.ts +8 -0
  43. package/lib/types/characters/wardrobe/basic-outfit.d.ts +16 -5
  44. package/lib/types/characters/whiteboard.d.ts +13 -1
  45. package/llms-full.txt +400 -70
  46. package/llms.txt +29 -29
  47. package/package.json +2 -2
  48. package/skills/tinyfly/SKILL.md +22 -10
package/llms-full.txt CHANGED
@@ -204,7 +204,7 @@ with a GSAP-style call (durations are in seconds here):
204
204
  ```html
205
205
  <div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
206
206
 
207
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.0/cdn/tinyfly.iife.js"></script>
207
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly.iife.js"></script>
208
208
  <script>
209
209
  tinyfly.to('.box', { x: 200, duration: 1 })
210
210
  </script>
@@ -412,7 +412,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
412
412
  global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
413
413
 
414
414
  ```html
415
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.0/cdn/tinyfly.iife.js"></script>
415
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly.iife.js"></script>
416
416
  <script>
417
417
  tinyfly.to('.box', { x: 200, duration: 1 })
418
418
  </script>
@@ -2278,7 +2278,7 @@ For simple website embedding without a build system.
2278
2278
  </html>
2279
2279
  ```
2280
2280
 
2281
- Build the player with `npm run build:player` to generate `lib/player/tinyfly-player.iife.js`, or load it from the CDN: `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.0/cdn/tinyfly-player.iife.js`.
2281
+ Build the player with `npm run build:player` to generate `lib/player/tinyfly-player.iife.js`, or load it from the CDN: `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly-player.iife.js`.
2282
2282
 
2283
2283
  ---
2284
2284
 
@@ -5451,7 +5451,9 @@ left to right:
5451
5451
  is a reassuring, tap-friendly manual save (handy on tablets).
5452
5452
  - **New** — start a fresh project (prompts if you have unsaved changes).
5453
5453
  - **AI** — show or hide the AI prompt bar, where you describe an animation and
5454
- click **Generate**.
5454
+ click **Generate**. A brief with a story in it ("grandma walks up to a ticking
5455
+ box, jumps, and runs off") gets a 🧍 Character from the cast with a beat
5456
+ script, compiled into its tracks on load (the beats stay on the element).
5455
5457
  - **My Animations** — open the gallery of every project you've saved (thumbnails,
5456
5458
  open / duplicate / delete). See [Project Management](#project-management).
5457
5459
  - **Examples** — every ready-made animation on one page (`/examples`). Open one in
@@ -5486,6 +5488,9 @@ Shapes, text, images, video, lines, arrows and paths are added from the
5486
5488
  | **Group** | Container that groups multiple elements |
5487
5489
  | **🧍 Character** | A posable figure: pick a view, a pose and a face, and keyframe them to animate (see [Characters](#characters)) |
5488
5490
  | **🗺 Map** | An animated map: places, a route between them, and a camera (see [Maps](#maps)) |
5491
+ | **🧊 3D Scene** | A real 3D scene seen through its camera: meshes, lights, characters and props (see [3D Scenes](#3d-scenes)) |
5492
+ | **⌨ Code** | A code panel whose lines a Character's beats aim at and change (see [Code](#code)) |
5493
+ | **📊 Chart** | A bar, line, pie or donut chart from data, whose bars and slices beats aim at, change and ride (see [Charts](#charts-1)) |
5489
5494
 
5490
5495
  Polygon and star are **parametric** paths: change the sides/points/inner ratio in
5491
5496
  the Property Panel and the shape regenerates, and they rescale cleanly when you
@@ -5621,12 +5626,41 @@ Dances and flips are written as they are, and turn acting off.
5621
5626
  (`drawingRate` in the JSON), so previews, players and exports all hold the
5622
5627
  same way.
5623
5628
 
5629
+ - **Beats**: a story written as beats, compiled in the chosen style into the
5630
+ character's tracks and kept on the element (`beats` in the JSON). Write them
5631
+ as JSON (`[{ "do": "walk", "to": 320, "mood": "happy" }, { "do": "say",
5632
+ "say": "Hello!" }, { "do": "take" }]`) and click **🎬 Run beats**; the
5633
+ timeline grows to fit. A beat can aim at a **⌨ Code** element's lines or a
5634
+ **📊 Chart** element's bars, points and slices
5635
+ (`"target": { "surface": "Code 1", "anchor": "line:2" }`, also for `to`,
5636
+ `toward` and `onto`) and change them (`"then": { "surface": "Code 1",
5637
+ "edit": "highlight", "anchor": "line:2", "at": "contact" }`): the edits
5638
+ become tracks on that element, and a figure standing on a bar or a line
5639
+ rides it as it moves. Problems are named by beat (an unknown
5640
+ action, mood or place) before anything is written. The AI prompt bar writes
5641
+ beats this way too.
5642
+
5624
5643
  See [Cartoon Acting](acting.md).
5625
5644
 
5626
5645
  Characters show in the DOM and Canvas previews and in GIF / WebP / MP4
5627
5646
  export. They are not part of exported HTML or embeds yet, and the SVG preview
5628
5647
  does not draw them.
5629
5648
 
5649
+ ### Code
5650
+
5651
+ A **⌨ Code** element is a code panel (`codePanel()` from code): a listing with
5652
+ line numbers, drawn by code into its box, which grows to fit its lines. In the
5653
+ property panel: the **Language** (JavaScript, TypeScript, Python, Go, Rust,
5654
+ C#, plain), **Font size**, **Line numbers**, **Hidden lines** (typed in later)
5655
+ and the **Listing** itself.
5656
+
5657
+ Its lines are places. A Character's **Beats** aim at them and change them
5658
+ (highlight, strike, remove, type, fling a token…), and those edits are tracks
5659
+ on the Code element named `line.N.highlight`, `line.N.strike`, `line.N.wipe`,
5660
+ `line.N.reveal` and so on, which you can also key by hand. Code panels show in
5661
+ the DOM and Canvas previews and in GIF / WebP / MP4 export. See [Acting on
5662
+ code](acting.md#acting-on-code) for the same from code.
5663
+
5630
5664
  ### Maps
5631
5665
 
5632
5666
  A **🗺 Map** fills the canvas with a map of the world. In the property panel:
@@ -5661,8 +5695,8 @@ camera: it starts with a camera at three-quarters, a key light, a floor and a
5661
5695
  red box. In the property panel:
5662
5696
 
5663
5697
  - **Objects**: pick one to edit. **Add** puts a box, sphere, cylinder, cone,
5664
- ring, star (an extruded path), character or light on the next free spot;
5665
- ✕ removes the picked one (not the scene's camera).
5698
+ ring, star (an extruded path), character, prop or light on the next free
5699
+ spot; ✕ removes the picked one (not the scene's camera).
5666
5700
  - **Transform**: X, Y, Z (metres, +y up), Tilt X, Turn Y, Roll Z and Scale.
5667
5701
  **◆ Key transform at playhead** keys all of them; once a value is animated
5668
5702
  (◆ by its name), changing it keys it at the playhead.
@@ -5671,6 +5705,12 @@ red box. In the property panel:
5671
5705
  - **Characters**: a look (*Clean*, *Pencil*, *Silhouette* drawn by their pens
5672
5706
  in perspective, or *Solid*) and **🕺 Dance from playhead** with any dance
5673
5707
  style.
5708
+ - **Props**: which prop from the catalog (car, truck, bus, tractor, cart, train
5709
+ car, bike, motorbike, tree, house, helicopter, airplane, horse, dog, cat, cow,
5710
+ songbird, crow, chicken), its look (*Clean*, *Pencil*, *Silhouette*, or
5711
+ *Mesh*, lit with the scene) and style (*Solid* or *Stick* line art). Its
5712
+ controls (`car.door`, `car.wheelSpin`, `dog.tail`…) are tracks on the
5713
+ element.
5674
5714
  - **Cameras**: field of view, **Look through this camera**, and **✂ Cut to
5675
5715
  this camera at playhead**, which keys the shot change.
5676
5716
  - **Camera** view presets (*Front*, *¾*, *Side*, *Top*) and the scene's
@@ -5681,6 +5721,28 @@ Its tracks are on the element, named `object.property` (`box.rotateY`,
5681
5721
  DOM and Canvas previews and in GIF / WebP / MP4 export. See [3D
5682
5722
  Scenes](scene-3d.md) for the same from code.
5683
5723
 
5724
+ ### Charts
5725
+
5726
+ A **📊 Chart** element is a `chart()` from code: a bar, line, pie or donut
5727
+ chart drawn by code into its box. In the property panel: the **Kind**,
5728
+ **Title**, **Theme** (light or dark), **Max** (the top of the scale; blank
5729
+ for a round number above the data), **Value labels** (a prefix, a suffix,
5730
+ decimal places, and whether to show them), **Axis titles**, the **Data** as
5731
+ JSON (`[{ "id": "q1", "label": "Q1", "value": 45 }, …]`; `"hidden": true`
5732
+ starts a bar, point or slice out of sight) and, for several series, the
5733
+ **Series** (`[{ "id": "plan", "label": "Plan" }, …]`, each datum then with
5734
+ `"values": { "plan": 40, … }`). Bad data is named under the fields instead of
5735
+ breaking the stage.
5736
+
5737
+ Its bars, points and slices are places. A Character's **Beats** aim at them
5738
+ (`{ "surface": "Chart 1", "anchor": "bar:q2" }`), change them (`set` to a
5739
+ value, `show` a hidden one, `highlight`, `pull` a slice out) and ride them:
5740
+ a figure that leaps `onto` a bar is carried up as the bar grows. The edits are
5741
+ tracks on the Chart element named `bar.q2.value`, `slice.a.pull` and so on,
5742
+ which you can also key by hand. Charts show in the DOM and Canvas previews and
5743
+ in GIF / WebP / MP4 export. See [Charts](acting.md#charts) for the same from
5744
+ code.
5745
+
5684
5746
  ### Selecting Elements
5685
5747
 
5686
5748
  - **Click** an element to select it
@@ -6474,7 +6536,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
6474
6536
  **Steps to embed:**
6475
6537
  1. Build the player: `npm run build:player`
6476
6538
  2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
6477
- `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.0/cdn/tinyfly-player.iife.js`
6539
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly-player.iife.js`
6478
6540
  instead; see [Deployment](DEPLOYMENT.md))
6479
6541
  3. Copy the generated code into your HTML
6480
6542
  4. Adjust the script `src` path if needed
@@ -6513,6 +6575,16 @@ The preview panel supports three rendering modes, switchable via the renderer se
6513
6575
 
6514
6576
  All three renderers play the same animation — switch between them to verify cross-renderer compatibility.
6515
6577
 
6578
+ Every renderer is editable on stage. The DOM preview's elements take the
6579
+ pointer themselves; the Canvas and SVG previews draw into one surface, so a
6580
+ transparent hit layer over the drawing carries the same boxes, handlers and
6581
+ selection chrome (resize and rotation handles, path points), placed by the
6582
+ animation and the camera exactly as the drawing is. Clicking selects (the
6583
+ topmost element first), dragging moves, handles resize and rotate, and the
6584
+ grid, snapping, rulers, guides, the pen tool and camera panning work the
6585
+ same whichever preview is on. Characters, charts, props and 3D scenes, which
6586
+ only the Canvas preview draws fully, can be arranged there directly.
6587
+
6516
6588
  ### Onion skinning
6517
6589
 
6518
6590
  In the **Canvas** renderer, click **🧅 Onion** to show faint **ghost frames**
@@ -7455,14 +7527,22 @@ one probably meant, and `propScript` throws on them.
7455
7527
  | `car()`, `truck()`, `bus()`, `tractor()`, `cart()`, `trainCar()`, `bike()`, `motorbike()` | `drive` (`to`), `brake` (`to`, a skid with locked wheels), `bump`, `honk`, `door` (`open`), `lights` (`on`) — doors and lights where it has them |
7456
7528
  | `tree()` | `sway` (`wind`, `for`), `shake`, `shedLeaves` |
7457
7529
  | `house()` | `door` (`open`), `lights` (`on`), `smoke` (`for`, runs in the background), `shake` |
7530
+ | `chair()` | `tip` (`for`: back on its rear legs, then settles), `fall` |
7531
+ | `desk()` | `drawer` (`open`) |
7532
+ | `bed()` | `bounce` (`for`: the mattress gives and springs back) |
7533
+ | `door()` | `open` (`open`, `for`), `slam`, `knock` (`for`) |
7534
+ | `wheelchair()` | `roll` (`to`; the wheels turn the distance), `brake` (`to`, wheels locked), `wheelie` (`for`) |
7458
7535
  | `helicopter()` | `takeOff` (`height`), `fly` (`to`, `height`), `hover`, `land` |
7459
7536
  | `airplane()` | `takeOff` (`to`, `height`), `fly` (`to`, `height`), `loop`, `land` (`to`) |
7460
7537
  | `horse()` | `walk`, `trot`, `canter`, `gallop` (`to`), `rear`, `buck`, `neigh`, `graze`, `sit`, `lie`, `jump`, `nod`, `swish` |
7461
7538
  | `dog()` | `walk`, `trot`, `run` (`to`), `bark`, `wag`, `sniff`, `sit`, `lie`, `jump`, `nod`, `swish` |
7462
7539
  | `cat()` | `walk`, `trot`, `run` (`to`), `meow`, `arch`, `pounce` (`to`), `sit`, `lie`, `jump`, `nod`, `swish` |
7463
7540
  | `cow()` | `walk`, `trot` (`to`), `moo`, `graze`, `sit`, `lie`, `jump`, `nod`, `swish` |
7541
+ | `goat()` | `walk`, `trot`, `gallop` (`to`), `bleat`, `graze`, `sit`, `lie`, `jump`, `nod`, `swish` |
7542
+ | `rabbit()`, `squirrel()` | `walk`, `gallop` (`to`: a hop, a scamper), `squeak` / `chatter`, `graze` (nibble), `sit`, `lie`, `jump`, `nod`, `swish` |
7464
7543
  | `songbird()`, `crow()` | `hop`, `walk` (`to`), `peck` (`for`), `flap` (`for`), `fly` (`to`, `height`), `glide` (`to`, `height`), `land` (`height`, `to`), `tweet` / `caw` |
7465
7544
  | `chicken()` | `walk` (`to`), `peck`, `flap`, `flutter`, `cluck` (it cannot fly) |
7545
+ | `pigeon()`, `duck()`, `owl()`, `parrot()` | As the songbird: `hop`, `walk`, `peck`, `flap`, `fly`, `glide`, `land`, and `coo` / `quack` / `hoot` / `squawk` |
7466
7546
 
7467
7547
  **Line art.** `propTarget({ …, style: 'stick' })` (or `drawSolvedProp(…, { style: 'stick' })`)
7468
7548
  draws a prop as line art to go with stick figures: tubes (legs, necks, tails,
@@ -7489,7 +7569,8 @@ neck stretches down to reach), and it walks with its head bobbing or hops.
7489
7569
  air) and flies to `height` metres; `glide` holds the wings out still and sinks
7490
7570
  gently toward `height` on the way to `to` (from the ground it flies the first
7491
7571
  stretch); `land` comes down to the ground or to a
7492
- perch (`height`). Perch it with anchors:
7572
+ perch (`height`), and landing above the ground its toes curl round the perch
7573
+ (`grip`, cleared as it takes off). Perch it with anchors:
7493
7574
 
7494
7575
  ```js
7495
7576
  const branch = propAt(treeTarget, { time: 0 }, 'tree').anchor('branch')
@@ -7513,6 +7594,26 @@ Make your own from the family generators: `vehicle(spec)` takes:
7513
7594
 
7514
7595
  `tree(spec)` and `house(spec)` take sizes and colours.
7515
7596
 
7597
+ **Furniture.** `chair()`, `desk()`, `bed()` and `door()` stand on the ground
7598
+ facing the viewer, and their places are anchors a figure uses them at: a
7599
+ chair's `seat` (ride it with `propRide({ anchor: 'seat' })`, a `seated` pose
7600
+ and `offset: { y: seatHeight(height) }`), `back` and `front`; a desk's `top`,
7601
+ `edge`, `drawer` and the `chair` spot in front; a bed's `mattress`, `pillow`,
7602
+ `foot` and `side`; a door's `handle`, `doorway`, `front` and `beyond` (a figure
7603
+ goes through from `front` to `beyond`, and the door is drawn over it until it
7604
+ opens). Each takes sizes and colours (`chair({ seatHeight: 0.5 })`, `door({
7605
+ hinge: 'right' })`). As surfaces (`propSurface`), their controls are edits a
7606
+ beat makes: `set` or `switch` `control:open`, `control:drawer`, `control:tip`.
7607
+
7608
+ A `wheelchair()` is furniture that moves: a seat and back on a frame, two big
7609
+ rimmed wheels, castors and footrests. It `roll`s to a place with its wheels
7610
+ turning exactly the distance (in 3D, its `roll` move does the same in
7611
+ metres), `brake`s with them locked, and tips back for a `wheelie`. Any
7612
+ character rides its `seat` in the `wheeling` pose (`RIDING_POSES.wheeling`:
7613
+ sitting up, hands down at the rims), and a pusher stands at `handles` in the
7614
+ `push` pose. It is an accessory, not an age or a build: who uses it is the
7615
+ story's choice, like a `cane` in a hand.
7616
+
7516
7617
  ## Figures with props
7517
7618
 
7518
7619
  - **Riding.** `propRide({ prop, propId, propTracks, anchor: 'seat', figure, figureId, start, end, offset })`
@@ -7531,6 +7632,37 @@ Make your own from the family generators: `vehicle(spec)` takes:
7531
7632
  See the gallery cards **Road Trip**, **Windy Day**, **Helicopter**,
7532
7633
  **Traffic**, **Horse & Cart**, **Farmyard**, **Birds** and **3D Scene: Village**.
7533
7634
 
7635
+ ## Scenery
7636
+
7637
+ `scenery(options)` is the world behind the figures: a canvas target that draws
7638
+ a sky (the sun and moon on their arcs, stars at night, clouds drifting on the
7639
+ wind, rain that slants with it, snow that drifts, hills or a city on the
7640
+ horizon, the ground) or a room (a wall, a floor and a window on that sky). Its
7641
+ values are tracks, so a day passes and weather comes and goes as keyframes,
7642
+ and every frame is drawn from its time alone:
7643
+
7644
+ ```js
7645
+ const sky = scenery({ x: 0, y: 0, width: 720, height: 400, hour: 9, clouds: 0.4, horizon: 'hills' })
7646
+ sky.set('hour', { at: 0, value: 20, duration: 12000 }) // dawn to night
7647
+ sky.set('wind', { at: 3000, value: 0.8, duration: 1000 })
7648
+ sky.set('rain', { at: 5000, value: 0.8, duration: 1500 })
7649
+ const tracks = sky.tracks('sky') // hour, wind, rain keys on 'sky'
7650
+ sky.anchor('sun', 4000) // where the sun is then
7651
+ ```
7652
+
7653
+ `hour` runs 0–24, `clouds`, `rain` and `snow` 0–1, `wind` −1 (from the right)
7654
+ to 1 (from the left). The same wind streams a character's hair:
7655
+ `hairFollowTracks(target, tracks, who, { wind })`. `kind: 'room'` draws a wall
7656
+ and a floor with a `window` on the sky; `horizon` is `hills`, `city` (lit
7657
+ windows at night) or `flat`; `colors` recolour any of it.
7658
+
7659
+ `scenePreset(name, { width, height })` lays out a scene as plain data (the
7660
+ scenery and where the props stand) and `buildScene` builds it into targets:
7661
+ `park` (a late-morning sky over hills, two trees and a bench), `street` (the end
7662
+ of the afternoon against the city: houses, a car, a tree), `office` (a room
7663
+ with a desk, a chair and a door) and `home` (a room at night with a bed, a
7664
+ chair and a door). The Park Day card plays a day over the park.
7665
+
7534
7666
  ## In 3D scenes
7535
7667
 
7536
7668
  Props stand in `@algorisys/tinyfly/scene-3d` scenes too:
@@ -7587,10 +7719,16 @@ in `@algorisys/tinyfly/characters`.
7587
7719
 
7588
7720
  ## Props
7589
7721
 
7590
- For objects in a story (vehicles, trees, houses, aircraft, animals, birds),
7591
- use the presets (`car()`, `tree()`, `helicopter()`, `dog()`, `crow()`…) with
7722
+ For objects in a story (vehicles, trees, houses, furniture, aircraft,
7723
+ animals, birds), use the presets (`car()`, `tree()`, `chair()`, `door()`,
7724
+ `wheelchair()`, `helicopter()`, `dog()`, `goat()`, `owl()`…) with
7592
7725
  `propTarget` and `propScript`; the catalog lists each preset's actions,
7593
- controls and anchors, and `checkPropBeats` checks prop beats. `style: 'stick'`
7726
+ controls and anchors, and `checkPropBeats` checks prop beats. Furniture has
7727
+ the places a figure uses it at as anchors (`seat`, `top`, `mattress`,
7728
+ `handle`, `doorway`): aim beats at them rather than guessing a spot. For a
7729
+ sky or a room behind everything use `scenery()` (or `scenePreset('park')`),
7730
+ whose `hour`, `clouds`, `wind`, `rain` and `snow` are tracks, not a drawing
7731
+ of your own. `style: 'stick'`
7594
7732
  draws any prop as line art to go with stick figures. A bird's `lift` is in
7595
7733
  metres: to perch it on a branch or a roof, work the height out from that
7596
7734
  prop's anchor (`propAt(tree, frame, 'tree').anchor('branch')`). In a 3D
@@ -7606,15 +7744,25 @@ seated with `propRide3D` and spliced into its script with `spliceTracks`. See `d
7606
7744
 
7607
7745
  A v2 character's appearance is plain options to `character()`, never drawing
7608
7746
  code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
7609
- `{ style, color, length, … }`), `facialHair`, `glasses`, `hat`, `ears: true`
7610
- and `outfit: { shirt, trousers }`. `castMember('grandpa', 300)` gives a whole
7611
- ready-made character to start from. Expressions come from `HUMAN_EXPRESSIONS`
7747
+ `{ style, color, length, … }`), `facialHair`, `glasses`, `hat`, `ears: true`,
7748
+ `face: { teeth, tongue }` (shown when the mouth opens), `feet` (`round`,
7749
+ `flat`, `pointed`, `big`) and `outfit: { shirt, trousers, over: 'hoodie' |
7750
+ 'cardigan' | 'overalls' | 'sari' | 'apron' | 'labCoat', shoes: 'boots' }`.
7751
+ `castMember('grandpa', 300)` gives a whole ready-made character to start
7752
+ from. Age is hair, glasses and clothes, never a stoop; a `cane` in a hand or
7753
+ a `wheelchair()` to ride (`RIDING_POSES.wheeling`) is an accessory any
7754
+ character can have. Expressions come from `HUMAN_EXPRESSIONS`
7612
7755
  and are pose fields, as are the face marks `blush`, `tears` and `sweat` (0–1),
7613
7756
  so any face goes with any action or view. Hair and hats turn with the head:
7614
- don't draw a different hairstyle per view. Put things in hands with `holding`
7757
+ don't draw a different hairstyle per view. Hanging hair swings on its own:
7758
+ after the character's tracks add `hairFollowTracks(target, tracks, who)` (or,
7759
+ posing per frame, `hairFollow` once and `hairMotionAt(keys, t)` each frame)
7760
+ rather than keying `hair.swing` by hand. Put things in hands with `holding`
7615
7761
  (`{ right: 'mug' }`, `{ both: 'parcel' }`; the pose field `held.both` lets go),
7616
7762
  and for two characters touching use `meetHands('handshake', a, b)` with the
7617
- two standing `meetingSpacing(…)` apart, never two separate clips. See
7763
+ two standing `meetingSpacing(…)` apart, `embrace(a, b)` for a hug at
7764
+ `embraceSpacing` and `helpUp(helper, sitter, progress)` for a help-up at
7765
+ `helpUpSpacing`, never two separate clips. See
7618
7766
  `docs/character-appearance.md`.
7619
7767
 
7620
7768
  ## Surfaces
@@ -7667,7 +7815,11 @@ scriptTracks: 2 problem(s) in the beats:
7667
7815
 
7668
7816
  - **Beat scripts**: `scriptTracks()` throws on errors. `checkBeats(beats)`
7669
7817
  returns errors and warnings without throwing, and from the command line:
7670
- `npx @algorisys/tinyfly check beats.json`.
7818
+ `npx @algorisys/tinyfly check beats.json`. For a v2 `character()` use
7819
+ `characterScript(target, who, beats, options)`: the same beats and checks,
7820
+ compiled for the human body and a `characterTarget` (its `walk`, `walking`
7821
+ and `gait` tracks step the gait as it draws); add
7822
+ `hairFollowTracks(target, tracks, who)` after it.
7671
7823
  - **Tracks**: `checkTracks(tracks, targets)` finds tracks aimed at targets
7672
7824
  that aren't there, properties a target can't animate (`rotation` → `rotate`),
7673
7825
  keys out of time order, values of the wrong kind and values out of range.
@@ -7777,7 +7929,7 @@ path for all of that:
7777
7929
  </figure>
7778
7930
 
7779
7931
  <!-- once, anywhere on the page (a site-wide footer is fine) -->
7780
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
7932
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
7781
7933
  ```
7782
7934
 
7783
7935
  Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
@@ -8852,8 +9004,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
8852
9004
  adds to the same `tinyfly` global:
8853
9005
 
8854
9006
  ```html
8855
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.0/cdn/tinyfly.iife.js"></script>
8856
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.0/cdn/tinyfly-maps.iife.js"></script>
9007
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly.iife.js"></script>
9008
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly-maps.iife.js"></script>
8857
9009
  ```
8858
9010
 
8859
9011
  It is a separate script because the offline world map it carries adds about
@@ -9060,8 +9212,8 @@ prop, or the depths to slot it between fingers.
9060
9212
 
9061
9213
  # Character Appearance
9062
9214
 
9063
- Hair, facial hair, glasses, hats, ears, builds, a ready-made cast, held items
9064
- and meeting hands for the v2 character (`character()` in `@algorisys/tinyfly/characters`). Every choice
9215
+ Hair, facial hair, glasses, hats, ears, builds, a ready-made cast, held items,
9216
+ meeting hands and hair that swings for the v2 character (`character()` in `@algorisys/tinyfly/characters`). Every choice
9065
9217
  is plain data, so a character can be saved, synced, generated by a language
9066
9218
  model and changed one field at a time.
9067
9219
 
@@ -9177,6 +9329,52 @@ Every style is the same few fields (`resolveHair(spec)` fills them all in):
9177
9329
 
9178
9330
  A style stays a starting point: any style suits anyone.
9179
9331
 
9332
+ ## Hair in motion
9333
+
9334
+ Hair that hangs (long hair, ponytails, braids) lags behind the head: it swings
9335
+ round after a turn, streams back on a run, drops on a jump and lifts on the
9336
+ landing. The roots stay on the head; the ends move, more the further they hang.
9337
+ Short hair, buns, beards and hats stay put.
9338
+
9339
+ The lag is three pose fields, so it keys, saves and mirrors like any other:
9340
+
9341
+ | Field | Meaning |
9342
+ |---|---|
9343
+ | `hair.swing` | Swung round the head toward the character's left (+) or right (−), degrees |
9344
+ | `hair.trail` | Streaming back behind the head (+) or thrown forward (−), head radii |
9345
+ | `hair.lift` | Lifted (+) or dropped (−), head radii |
9346
+
9347
+ You rarely set them by hand. `hairFollowTracks` works them out from the
9348
+ character's own tracks (the target's `x` and `y`, the pose's `turn` and
9349
+ `head.turn`), each on a spring that chases the head, the way a prop's `follow`
9350
+ trails a car's antenna or a dog's tail:
9351
+
9352
+ ```js
9353
+ const tracks = characterPoseTracks('maya', keys)
9354
+ tracks.push(...hairFollowTracks('maya', tracks, maya))
9355
+ // Nothing is added for hair with nothing to swing. A `hair.swing` track written
9356
+ // by hand (a flick) keeps its values, with the lag added on.
9357
+ ```
9358
+
9359
+ Code that poses a character every frame keys the lag once for its loop, then
9360
+ reads it at each frame's time:
9361
+
9362
+ ```js
9363
+ const lag = hairFollow((t) => ({ x: xAt(t), y: yAt(t), turn: turnAt(t) }), { end: 8000, headRadius: 24 })
9364
+ drawCharacter(ctx, maya, humanPose({ turn: turnAt(t), ...hairMotionAt(lag, t) }), t)
9365
+ ```
9366
+
9367
+ `hairFollow` options: `stiffness` (default 70, higher follows the head more
9368
+ tightly), `damping` (6, lower swings longer), `amount` (1; 0 pins the hair) and
9369
+ `step` (33 ms between keys). `hairFollowTracks` also takes `settle`, how long
9370
+ the hair keeps moving after the last key (1500 ms). The springs step in fixed
9371
+ 1 ms steps, so the same motion always gives the same keys, and the drawing
9372
+ itself keeps no state between frames.
9373
+
9374
+ Four-legged animals get the same treatment for free: their `ears` control
9375
+ (pricked forward +, laid back −) and `tail` both trail the animal's motion on a
9376
+ spring in every `propScript`.
9377
+
9180
9378
  ## Facial hair
9181
9379
 
9182
9380
  `facialHair` takes a style name or `{ moustache, beard, color }` (the colour
@@ -9199,6 +9397,11 @@ Beards: `none`, `stubble`, `goatee`, `soulPatch`, `chinStrap`, `circle`,
9199
9397
  The crown sits over the hair; hair below the brim still shows.
9200
9398
  - `ears: true` adds ears: they stick out past the head from the front and
9201
9399
  behind, and sit on the head with a curl when turned toward the viewer.
9400
+ - `face: { teeth: true, tongue: true }` shows a row of upper teeth hanging
9401
+ from the top of the mouth, and a tongue lying in the bottom of it, whenever
9402
+ the mouth opens past 0.3 (a laugh, a shout, a wail). The mouth's shape is
9403
+ still the pose's `mouth`, `smile` and `mouthWidth`; a closed or barely open
9404
+ mouth shows neither. Default: neither, so a plain face draws as before.
9202
9405
 
9203
9406
  ## Builds
9204
9407
 
@@ -9215,9 +9418,16 @@ field can still be set on its own (`headSize`, `shoulderWidth`, `hipWidth`,
9215
9418
  | `broad`, `curvy`, `stocky` | Shoulder and hip widths (stocky: a larger head) |
9216
9419
  | `kid`, `child`, `toddler` | Larger head, shorter limbs |
9217
9420
 
9421
+ `feet` sets the feet's shape: `round` (the default blob), `flat` (a shoe,
9422
+ longer and even), `pointed` (a slipper, tapering to the toe) or `big` (clown's
9423
+ feet, half as long again and wide). The shape is clearest in profile, where
9424
+ the foot points along the ground; from the front it points at the viewer.
9425
+
9218
9426
  Age, posture and accessories are separate choices: a child build is only
9219
9427
  proportions, and an older character is shown by hair and glasses, never by a
9220
- stoop unless one is posed. The same poses, gaits and actions work on every
9428
+ stoop unless one is posed. A cane (`holding: { right: 'cane' }`) and a
9429
+ wheelchair (the `wheelchair()` prop, ridden in the `wheeling` pose) are
9430
+ accessories any character can have, not part of an age. The same poses, gaits and actions work on every
9221
9431
  build; `humanGaitStrideLength(gait, height, stride, legLength)` gives a build's
9222
9432
  stride so its feet stay planted.
9223
9433
 
@@ -9238,7 +9448,8 @@ character({ outfit: { over: 'labCoat' } })
9238
9448
  | `bottom` | `trousers` (default), `shorts`, `skirt` |
9239
9449
  | `collar` | `true` for a shirt collar |
9240
9450
  | `tie` | A colour, for a tie down the front |
9241
- | `over`, `overColor` | `apron` or `labCoat`, and its colour |
9451
+ | `over`, `overColor` | `apron`, `labCoat`, `hoodie` (a loose top with a hood at the back, a front pocket and long sleeves), `cardigan` (open down the front, buttoned), `overalls` (a bib with straps, in the trousers' colour) or `sari` (a drape to the ankles with the pallu over the near shoulder), and its colour |
9452
+ | `shoes`, `shoeColor` | `boots` to above the ankle, and their colour |
9242
9453
 
9243
9454
  The front details (collar, tie, apron, the coat's opening) show from the
9244
9455
  front and turn away with the body; from behind an apron shows its ties.
@@ -9257,6 +9468,28 @@ family: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`,
9257
9468
  const family = ['man', 'woman', 'girl', 'grandma'].map((name) => character(castMember(name, 280)))
9258
9469
  ```
9259
9470
 
9471
+ ## Hugs, help-ups and everyday cycles
9472
+
9473
+ Two people, more than hands: `embrace(a, b)` is a hug. Both turn toward each
9474
+ other, lean in and tilt their heads together, and each reaches its right arm
9475
+ over the other's shoulder and its left round the other's waist, exactly, from
9476
+ where the two stand (`embraceSpacing(a, b)` apart). `helpUp(helper, sitter,
9477
+ progress)` is one person helping another up off the floor as a function of how
9478
+ far along it is: at 0 the sitter sits on the floor and the helper bows to take
9479
+ its hand, at 1 both stand, and in between the hands stay joined at a point
9480
+ that rises with them (`helpUpSpacing(helper, sitter)` apart). Both return
9481
+ plain poses (`a`, `b`, or `helper`, `sitter`) and whether they `reached`.
9482
+
9483
+ ```js
9484
+ const hug = embrace({ character: cook, x: 300 }, { character: grandpa, x: 300 + embraceSpacing(cook, grandpa) })
9485
+ const rising = helpUp({ character: cook, x: 300 }, { character: grandpa, x: 300 + helpUpSpacing(cook, grandpa) }, 0.5)
9486
+ ```
9487
+
9488
+ Everyday actions as cycles, like a gait: `humanCyclePose('sweeping', phase,
9489
+ base)` sweeps a broom side to side (hold one: `holding: { right: 'broom' }`)
9490
+ and `'brushing'` works a hand across a surface in front at chest height; `phase`
9491
+ 0 → 1 is one stroke and back. The Help Up card shows all three.
9492
+
9260
9493
  ## Expressions and face marks
9261
9494
 
9262
9495
  `HUMAN_EXPRESSIONS` sets every face field, so applying one replaces the whole
@@ -9287,11 +9520,14 @@ character({ holding: { left: 'bag', right: 'bag' } }) // carry
9287
9520
  character({ holding: { both: { item: 'parcel', color: '#c9a06a' } } })
9288
9521
  ```
9289
9522
 
9290
- Items: `mug`, `phone`, `briefcase`, `bag`, `umbrella` and `broom` (one hand,
9291
- `left` or `right`), `book` (one hand or `both`) and `parcel` (`both`). Each is
9523
+ Items: `mug`, `phone`, `briefcase`, `bag`, `umbrella`, `broom` and `cane` (one
9524
+ hand, `left` or `right`), `book` (one hand or `both`) and `parcel` (`both`). Each is
9292
9525
  drawn at the hand's grip, so it follows the hand through any pose, gait or
9293
9526
  turn, and sorts with that arm (a mug goes behind the body with the far arm).
9294
- An umbrella's canopy sits just over the head. `handGrip(joints, side)` gives
9527
+ An umbrella's canopy sits just over the head. A cane's crook is in the hand
9528
+ and its shaft reaches the ground while the hand hangs, lifting with the hand
9529
+ once it rises; `HUMAN_POSES.cane` stands leaning on it (the arm straight, a
9530
+ little ahead), and any gait walks with it. `handGrip(joints, side)` gives
9295
9531
  the grip point and the forearm's direction for drawing anything else in a
9296
9532
  hand.
9297
9533
 
@@ -9319,8 +9555,8 @@ const give = meetHands('handOver', { character: courier, x: 300 }, { character:
9319
9555
 
9320
9556
  Select a 🧍 Character and open **Head** in the properties: **Cast** dresses it
9321
9557
  as a cast member (build, hair, facial hair, glasses and clothes in one step),
9322
- then **Hair**, **Hair colour**, **Facial hair**, **Glasses**, **Hat** and
9323
- **Ears** change one thing at a time; **Right hand**, **Left hand** and **Both
9558
+ then **Hair**, **Hair colour**, **Facial hair**, **Glasses**, **Hat**,
9559
+ **Ears**, **Teeth**, **Tongue** and **Feet** change one thing at a time; **Right hand**, **Left hand** and **Both
9324
9560
  hands** put an item in them. **Build** lists the builds, with **Legs** and
9325
9561
  **Arms** sliders. The new expressions and everyday poses are in the **Face**
9326
9562
  and **Body** lists. All of it is saved as plain fields on the element and
@@ -9338,7 +9574,9 @@ exported to video and GIF.
9338
9574
 
9339
9575
  Outlines are traced from the same numbers every time (no randomness, no state
9340
9576
  between frames), so a frame at a given time always draws the same, and the
9341
- pencil look's boil stays seeded as before.
9577
+ pencil look's boil stays seeded as before. Hair in motion keeps to this: the
9578
+ lag is keyed ahead of time from the motion (`hairFollow`), not accumulated
9579
+ while drawing.
9342
9580
 
9343
9581
  ---
9344
9582
 
@@ -9599,6 +9837,46 @@ leaves, with a time, a scene x and y and a length, ready for `drawDustPuff`.
9599
9837
  Any beat can also take `onto` (a scene y): the figure is carried to that floor
9600
9838
  over the beat, as when the line it stands on moves up.
9601
9839
 
9840
+ ### On a v2 character
9841
+
9842
+ `characterScript(target, who, beats, options)` compiles the same beats for a
9843
+ v2 `character()` (see [Character Appearance](character-appearance.md)), so a
9844
+ cast member acts the story the stick figure does:
9845
+
9846
+ ```js
9847
+ import { character, castMember, characterScript, characterTarget, hairFollowTracks } from '@algorisys/tinyfly/characters'
9848
+
9849
+ const amy = character(castMember('youngWoman', 170))
9850
+ const script = characterScript('amy', amy, [
9851
+ { do: 'walk', to: 330, mood: 'happy' },
9852
+ { do: 'say', say: 'Is that box ticking?', mood: 'worried' },
9853
+ { do: 'take' },
9854
+ { do: 'zip', to: -200 },
9855
+ ], { from: 90, style: 'snappy' })
9856
+ const tracks = [...script.tracks, ...hairFollowTracks('amy', script.tracks, amy)]
9857
+ const targets = { amy: characterTarget({ x: 90, y: 300, character: amy }) }
9858
+ ```
9859
+
9860
+ It takes every `scriptTracks` option but `height` (the character's own is
9861
+ used) and returns the same result: tracks, `duration`, `lines`, `beats`,
9862
+ `effects`, and the key poses on the human body. The stick-figure script plans
9863
+ the story (timing, where the figure is, which way it faces, its gait, its
9864
+ speech); its key poses are taken onto the human body, mirrored when it faces
9865
+ left (so `turn` runs negative that way); the human acting pass then winds up,
9866
+ overshoots and overlaps on this body, and the lines are lip-synced over its
9867
+ mouth. The walk phase is rekeyed to the character's own stride (its height and
9868
+ legs: a child takes shorter steps), so its feet stay planted. The `walk`,
9869
+ `walking` and `gait` tracks step the gait as the target draws
9870
+ (`characterPoseOf(props)` folds them into the pose, for drawing by hand). Reaches
9871
+ are planned for the character's own arms and legs (`reach`, the share of the
9872
+ stick figure's reach its limbs have, so it steps to where they reach), and
9873
+ while a beat's hand or foot is on its target the limb is re-aimed on the
9874
+ human body: a `point` aims at the spot, a `grab`, `put` or `kick` lands on it
9875
+ (leaning down to a low one), and a `swipe`, `write` or `push` follows where
9876
+ the stick figure's palm went. Your own gaits go in
9877
+ `options.gaits` for the script and `gaits` on `characterTarget` so the drawing
9878
+ knows them too.
9879
+
9602
9880
  ## Your own actions, gaits and personas
9603
9881
 
9604
9882
  Behaviours of your own are plain values passed where they are used; nothing
@@ -9847,7 +10125,7 @@ lists the problems without compiling.
9847
10125
  ### Whiteboards
9848
10126
 
9849
10127
  `whiteboard()` is a second surface, for lessons that are not code: a board
9850
- (or `theme: 'chalkboard'`) whose texts and hand-drawn marks are declared as
10128
+ (or `theme: 'chalkboard'`, or `'lines'`, ruled paper with a margin) whose texts and hand-drawn marks are declared as
9851
10129
  data, each with an id, and named as places like a code panel's lines:
9852
10130
 
9853
10131
  ```js
@@ -9881,11 +10159,17 @@ everywhere. Colours are theme names (`red`, `blue`, `green`, `orange`, and
9881
10159
  `yellow` on chalk) or any CSS colour. The Board Lesson demo solves an
9882
10160
  equation this way.
9883
10161
 
10162
+ The boards write in a handwriting font, Patrick Hand, when the page loads it
10163
+ (the editor and the examples do, from Google Fonts), else the system's own
10164
+ hand. An arrow bows a little as a hand draws it; it bends round any text it
10165
+ would cross, and `bend` (a fraction of its length, + to its left) sets the bow.
10166
+
9884
10167
  ### Charts
9885
10168
 
9886
- `chart()` is a surface for talking through data: a bar or line chart whose
9887
- values are declared as data, scaled once when it is made (`max`, or a round
9888
- number above the largest value).
10169
+ `chart()` is a surface for talking through data: a bar, line, pie or donut
10170
+ chart whose values are declared as data. Bar and line charts are scaled once
10171
+ when they are made (`max`, or a round number above the largest value); a pie
10172
+ shares its circle by value.
9889
10173
 
9890
10174
  ```js
9891
10175
  const sales = chart({
@@ -9905,13 +10189,26 @@ surfaceScript('hero', { sales }, [
9905
10189
  ], { from: 640, ground: 400, height: 90, facing: -1 })
9906
10190
  ```
9907
10191
 
9908
- Its places are `bar:ID` (on a bar chart) or `point:ID` (on a line chart),
9909
- `label:ID`, `value:ID` and `box`, and they follow the values:
9910
- `sales.anchor('bar:q4', time)` is the bar as it stands then. Its edits:
9911
- `set` (a new `value`; the value label counts along), `show` (grow a
9912
- `hidden` bar in from the axis, or draw the line out to a point; `on: false`
9913
- takes it back) and `highlight`. A bar's top is a floor: a figure standing on
9914
- it is carried up and down as it grows and shrinks, as in the Chart Talk demo.
10192
+ Its places are `bar:ID` (on a bar chart), `point:ID` (on a line chart) or
10193
+ `slice:ID` (on a pie or donut), `label:ID`, `value:ID` and `box`, and they
10194
+ follow the values: `sales.anchor('bar:q4', time)` is the bar as it stands
10195
+ then. Its edits: `set` (a new `value`; the value label counts along, and a
10196
+ pie re-shares its circle), `show` (grow a `hidden` bar in from the axis, draw
10197
+ the line out to a point, or open a slice; `on: false` takes it back),
10198
+ `highlight`, and on a pie `pull` (the slice stands out from the centre). A
10199
+ bar's top is a floor: a figure standing on it is carried up and down as it
10200
+ grows and shrinks, as in the Chart Talk demo.
10201
+
10202
+ A slice can come loose: `traffic.piece('slice:other')` is a piece, and
10203
+ `fling`, `follow` and `move` carry it off as they do a term on a board, so a
10204
+ figure can kick the smallest slice out of the pie.
10205
+
10206
+ Several series (`series: [{ id: 'plan' }, { id: 'actual', color }]`, each
10207
+ datum with `values: { plan: 40, actual: 46 }`) draw grouped bars or one line
10208
+ per series, with a legend (`legend:SERIES` is a place too). Their places and
10209
+ edits take the series after the id: `bar:q1:actual`. Axis titles go in
10210
+ `axis: { x, y }`. A pie shows one series. The Pies & Series card shows all of
10211
+ it.
9915
10212
 
9916
10213
  ### Props as surfaces
9917
10214
 
@@ -9937,6 +10234,14 @@ surfaceScript('hero', { home: homeSurface }, [
9937
10234
  ], { from: 40, ground: floor, height: 100 })
9938
10235
  ```
9939
10236
 
10237
+ A prop's parts come loose too: `carSurface.piece('part:wheel-0-left')` is a
10238
+ piece, and `fling`, `follow` and `move` carry it off, drawn where it went
10239
+ (or as edits from a beat: `then: { edit: 'fling', anchor: 'part:wheel-0-left',
10240
+ at: 'contact' }` on a `kick`). Every anchor and part is also a floor: a figure
10241
+ that leaps `onto: { surface: 'car', anchor: 'anchor:roof' }` is carried as the
10242
+ car lifts, drives or is squashed, the way a bar carries it on a chart. The Kick
10243
+ the Tyre card does both.
10244
+
9940
10245
  A prop stands on its middle, and seen from a little above its front comes
9941
10246
  forward of that line. A figure that walks on the prop's own `y` is inside
9942
10247
  its footprint and seems to walk through the wall; walk it on the prop's
@@ -10040,9 +10345,9 @@ timeline plays: editor previews, players, embeds and exports.
10040
10345
 
10041
10346
  ## Not yet
10042
10347
 
10043
- - A code panel in the editor (a Code element whose lines and words snap beats)
10044
- - Beat scripts for v2 characters (`scriptTracks` drives the stick figure)
10045
- - Follow-through on hair, tails and ears (character-system milestones 3 and 5)
10348
+ - Beat scripts for v2 characters acting on surfaces directly (`surfaceScript`
10349
+ drives the stick figure; in the editor, a Character's Beats box resolves
10350
+ surface places and cues for it)
10046
10351
 
10047
10352
  ---
10048
10353
 
@@ -10641,7 +10946,9 @@ a cart's `seat`) as the prop moves, turns, bobs with its stride and pitches,
10641
10946
  writing the rider's `x`, `y`, `z` and `rotateY`; `mount: { from: [x, z] }` and
10642
10947
  `dismount: { to: [x, z] }` hop it on and off. `spliceTracks(riderTracks, ride, { from, to })`
10643
10948
  puts the ride into the rider's script, which holds the riding pose
10644
- (`RIDING_POSES.astride` or `.seated`) meanwhile and `place`s it where it got
10949
+ (`RIDING_POSES.astride`, `.seated`, `.driving` with the hands on a wheel, or
10950
+ `.cycling`; `pedallingKeys({ start, end, cadence })` keys the legs round the
10951
+ pedals on the cycling pose) meanwhile and `place`s it where it got
10645
10952
  off. A character in a scene is drawn part by part, each part at its own depth
10646
10953
  (`characterPartsInView`), so a leg astride a horse shows on each side of it.
10647
10954
  A seat inside a closed cabin (a car's) is not handled yet: its glass is opaque
@@ -13247,7 +13554,7 @@ magnet.addEventListener('pointerleave', () => {
13247
13554
 
13248
13555
  <!-- capabilities: generated from the library -->
13249
13556
 
13250
- # tinyfly capabilities (v0.98.0)
13557
+ # tinyfly capabilities (v0.100.0)
13251
13558
 
13252
13559
  Generated from the library itself: every name below is accepted, and names not listed are rejected (beat scripts, code panels and `checkTracks` say which name was probably meant).
13253
13560
 
@@ -13391,6 +13698,8 @@ With `style.hands`, each hand has `hand.left.<field>` / `hand.right.<field>` pro
13391
13698
 
13392
13699
  `scriptTracks(target, beats, { from, ground, height, facing, style })`. A beat has these fields only: `do`, `at`, `for`, `to`, `toward`, `mood`, `say`, `pose`, `target`, `onto`. Times are ms; `to` and `target` are scene px; `onto` is a floor's scene y.
13393
13700
 
13701
+ `characterScript(target, who, beats, options)` compiles the same beats for a v2 `character()` on a `characterTarget` (every option but `height`; the same result, its key poses on the human body; the walk phase keyed to that character's stride, and `walk` / `walking` / `gait` tracks that step the gait as the target draws). Add `hairFollowTracks(target, tracks, who)` after it so hanging hair swings.
13702
+
13394
13703
  | `do` | Needs | What happens |
13395
13704
  |---|---|---|
13396
13705
  | `walk` | `to` | Walks to `to` in the walk gait. |
@@ -13469,7 +13778,7 @@ A prop is a 3D rig of simple parts drawn with the characters’ pens (clean, pen
13469
13778
  - `songbird() · crow() · chicken()`: birds (bird(spec) makes your own): hop, walk, peck, flap, fly and land (a chicken flutters), their calls; wings fold and beat in rhythm
13470
13779
  - `{ kind: 'prop', prop: 'car', position, rotation, values } with loadScene3D(scene, { kinds: [characterObjects, propObjects] })`: props in 3D scenes, by preset name, seen in perspective by the scene camera; controls are tracks on the object
13471
13780
  - `characterScript3D(id, beats, { scene, position?, heading?, height?, pose? })`: a v2 character in a 3D scene in world metres: gaits to [x, z] or through points (its walk phase keyed with the distance), face, hold, pose, gag; checkCharacterBeats3D checks the beats
13472
- - `propRide3D({ prop, propId, propTracks, scene, placement, anchor, riderId, pose, start, end, mount?, dismount? })`: a character riding a prop in a 3D scene: hips on a seat anchor (saddle, seat) as it moves, hopping on and off; RIDING_POSES.astride / .seated
13781
+ - `propRide3D({ prop, propId, propTracks, scene, placement, anchor, riderId, pose, start, end, mount?, dismount? })`: a character riding a prop in a 3D scene: hips on a seat anchor (saddle, seat) as it moves, hopping on and off; RIDING_POSES.astride / .seated / .driving / .cycling / .wheeling (a wheelchair)
13473
13782
  - `propScript3D(id, prop, beats, { scene, position?, heading?, values? })`: props scripted in world metres for 3D scenes: moves to [x, z] or through points (wheels and strides keyed with the distance), face, hold, and their actions; checkPropBeats3D checks the beats
13474
13783
  - `propPreset(name, options?)`: a prop preset by name (did-you-mean on a wrong one)
13475
13784
  - `propTarget({ …, style: 'stick' })`: line art to go with stick figures: tubes as single strokes, shapes outlined over paper
@@ -13483,6 +13792,8 @@ A prop is a 3D rig of simple parts drawn with the characters’ pens (clean, pen
13483
13792
 
13484
13793
  Prop beat fields: `do`, `at`, `for`, `to`, `toward`, `speed`, `open`, `on`, `height`, `wind`. Every prop has the controls `turn`, `tilt`, `pitch`, `roll`, `squash`, `lift`, `lean`, `size` and the actions `hold`, `turn`, `pop`, `vanish`.
13485
13794
 
13795
+ Scenery: `scenery({ x, y, width, height, kind: sky | room, hour, clouds, wind, rain, snow, horizon: hills | city | flat })` is a canvas target whose values `hour` (0–24), `clouds`, `rain`, `snow` (0–1) and `wind` (−1..1) are tracks (`set(prop, { at, value, duration })`, `tracks(id)`; `anchor('sun' | 'moon' | 'horizon' | 'ground', time)`); the same `wind` streams hair (`hairFollowTracks(…, { wind })`). `scenePreset('park' | 'street' | 'office' | 'home', { width, height })` lays out scenery and props as data; `buildScene` builds them into targets.
13796
+
13486
13797
  | Preset | Family | Actions (needs) | Controls | Anchors |
13487
13798
  |---|---|---|---|---|
13488
13799
  | `car()` | vehicle | `drive` (to), `brake` (to), `bump`, `honk`, `door` (open), `lights` (on) | `wheelSpin`, `door`, `lights`, `antenna` | seat, front, back, roof, door |
@@ -13495,31 +13806,45 @@ Prop beat fields: `do`, `at`, `for`, `to`, `toward`, `speed`, `open`, `on`, `hei
13495
13806
  | `motorbike()` | vehicle | `drive` (to), `brake` (to), `bump`, `honk`, `lights` (on) | `wheelSpin`, `lights` | seat, front, back, roof |
13496
13807
  | `tree()` | plant | `sway`, `shake`, `shedLeaves` | `sway`, `canopySway` | canopy, top, base, branch |
13497
13808
  | `house()` | building | `door` (open), `lights` (on), `shake`, `smoke` | `door`, `lights` | door, doorstep, ridge, chimney |
13809
+ | `chair()` | furniture | `tip`, `fall` | `tip` | seat, back, front |
13810
+ | `desk()` | furniture | `drawer` (open) | `drawer` | top, edge, drawer, chair |
13811
+ | `bed()` | furniture | `bounce` | `give` | mattress, pillow, foot, side |
13812
+ | `door()` | furniture | `open`, `slam`, `knock` | `open` | handle, doorway, front, beyond |
13813
+ | `wheelchair()` | furniture | `roll` (to), `brake` (to), `wheelie` | `wheelSpin`, `tip` | seat, handles, front, footrest |
13498
13814
  | `helicopter()` | aircraft | `takeOff`, `fly` (to), `hover`, `land` | `rotor`, `blur` | seat, door, rotor, skids, hook |
13499
13815
  | `airplane()` | aircraft | `takeOff` (to), `fly` (to), `loop`, `land` (to) | `rotor`, `blur` | seat, nose, tail, wingtip |
13500
- | `horse()` | animal | `walk` (to), `trot` (to), `canter` (to), `gallop` (to), `neigh`, `sit`, `lie`, `jump`, `nod`, `swish`, `graze`, `rear`, `buck` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front, hitch, saddle |
13501
- | `dog()` | animal | `walk` (to), `trot` (to), `run` (to), `gallop` (to), `bark`, `sit`, `lie`, `jump`, `nod`, `swish`, `wag`, `sniff` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front, leash |
13502
- | `cat()` | animal | `walk` (to), `trot` (to), `run` (to), `gallop` (to), `meow`, `sit`, `lie`, `jump`, `nod`, `swish`, `arch`, `pounce` (to) | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front |
13503
- | `cow()` | animal | `walk` (to), `trot` (to), `moo`, `sit`, `lie`, `jump`, `nod`, `swish`, `graze` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front |
13504
- | `songbird()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `tweet`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right` | beak, head, back, feet |
13505
- | `crow()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `caw`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right` | beak, head, back, feet |
13506
- | `chicken()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `cluck`, `flutter` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right` | beak, head, back, feet |
13816
+ | `horse()` | animal | `walk` (to), `trot` (to), `canter` (to), `gallop` (to), `neigh`, `sit`, `lie`, `jump`, `nod`, `swish`, `graze`, `rear`, `buck` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `ears`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front, hitch, saddle |
13817
+ | `dog()` | animal | `walk` (to), `trot` (to), `run` (to), `gallop` (to), `bark`, `sit`, `lie`, `jump`, `nod`, `swish`, `wag`, `sniff` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `ears`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front, leash |
13818
+ | `cat()` | animal | `walk` (to), `trot` (to), `run` (to), `gallop` (to), `meow`, `sit`, `lie`, `jump`, `nod`, `swish`, `arch`, `pounce` (to) | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `ears`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front |
13819
+ | `cow()` | animal | `walk` (to), `trot` (to), `moo`, `sit`, `lie`, `jump`, `nod`, `swish`, `graze` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `ears`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front |
13820
+ | `goat()` | animal | `walk` (to), `trot` (to), `run` (to), `gallop` (to), `bleat`, `sit`, `lie`, `jump`, `nod`, `swish`, `graze` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `ears`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front |
13821
+ | `rabbit()` | animal | `walk` (to), `run` (to), `gallop` (to), `squeak`, `sit`, `lie`, `jump`, `nod`, `swish`, `graze` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `ears`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front |
13822
+ | `squirrel()` | animal | `walk` (to), `run` (to), `gallop` (to), `chatter`, `sit`, `lie`, `jump`, `nod`, `swish`, `graze` | `walk`, `walking`, `gait`, `neck`, `tail`, `wag`, `ears`, `fl.swing`, `fl.knee`, `fl.ankle`, `fr.swing`, `fr.knee`, `fr.ankle`, `hl.swing`, `hl.knee`, `hl.ankle`, `hr.swing`, `hr.knee`, `hr.ankle` | back, head, mouth, front |
13823
+ | `songbird()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `tweet`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right`, `grip` | beak, head, back, feet |
13824
+ | `crow()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `caw`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right`, `grip` | beak, head, back, feet |
13825
+ | `chicken()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `cluck`, `flutter` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right`, `grip` | beak, head, back, feet |
13826
+ | `pigeon()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `coo`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right`, `grip` | beak, head, back, feet |
13827
+ | `duck()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `quack`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right`, `grip` | beak, head, back, feet |
13828
+ | `owl()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `hoot`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right`, `grip` | beak, head, back, feet |
13829
+ | `parrot()` | bird | `hop` (to), `walk` (to), `peck`, `flap`, `squawk`, `fly` (to), `glide` (to), `land` | `spread`, `flap`, `wingbeat`, `flapping`, `peck`, `step`, `stepping`, `leg.left`, `leg.right`, `grip` | beak, head, back, feet |
13507
13830
 
13508
13831
  ## Character (v2 human)
13509
13832
 
13510
- Poses: `rest`, `wave`, `cheer`, `point`, `handsOnHips`, `think`, `shrug`, `sit`, `kneel`, `crouch`, `crawl`, `lieDown`, `sleep`, `stretch`, `sitFloor`, `carry`, `lift`, `push`, `pull`, `drink`, `phone`, `read`, `type`. Expressions: `neutral`, `happy`, `joyful`, `sad`, `crying`, `surprised`, `shocked`, `angry`, `furious`, `worried`, `scared`, `confused`, `skeptical`, `thinking`, `sleepy`, `disgusted`, `smug`, `wink`, `laughing`, `afraid`, `bored`, `tired`, `embarrassed`, `proud`, `determined`, `affectionate`, `hurt`, `suspicious`, `relieved`, `excited`. Gags: `take`, `doubleTake`, `windUp`, `land`, `tremble`, `deflate`.
13833
+ Poses: `rest`, `wave`, `cheer`, `point`, `handsOnHips`, `think`, `shrug`, `sit`, `kneel`, `crouch`, `crawl`, `lieDown`, `sleep`, `stretch`, `sitFloor`, `carry`, `cane`, `lift`, `push`, `pull`, `drink`, `phone`, `read`, `type`. Expressions: `neutral`, `happy`, `joyful`, `sad`, `crying`, `surprised`, `shocked`, `angry`, `furious`, `worried`, `scared`, `confused`, `skeptical`, `thinking`, `sleepy`, `disgusted`, `smug`, `wink`, `laughing`, `afraid`, `bored`, `tired`, `embarrassed`, `proud`, `determined`, `affectionate`, `hurt`, `suspicious`, `relieved`, `excited`. Gags: `take`, `doubleTake`, `windUp`, `land`, `tremble`, `deflate`.
13511
13834
 
13512
13835
  Appearance options of `character({ … })`, all plain data that turns with the head (see docs/character-appearance.md):
13513
13836
 
13514
13837
  - `build`: `standard`, `slim`, `tall`, `short`, `broad`, `curvy`, `stocky`, `kid`, `child`, `toddler`
13515
13838
  - `hair`: `bald`, `buzzCut`, `crewCut`, `short`, `sidePart`, `sideSwept`, `slickBack`, `quiff`, `spiky`, `undercut`, `curlyCrop`, `afro`, `wavyCrop`, `shortLocs`, `flatTop`, `receding`, `thinning`, `pixie`, `bob`, `longBob`, `wavyBob`, `shoulderStraight`, `shoulderWaves`, `longStraight`, `longWaves`, `longCurls`, `longLocs`, `lowPonytail`, `highPonytail`, `ponytail`, `sidePonytail`, `topBun`, `lowBun`, `singleBraid`, `twinBraids`, `braids` (colours: `black`, `brown`, `chestnut`, `auburn`, `blond`, `ginger`, `gray`, `white` in `HAIR_COLORS`)
13516
13839
  - `facialHair`: `cleanShaven`, `stubble`, `pencilMoustache`, `shortMoustache`, `chevron`, `handlebar`, `walrus`, `goatee`, `vanDyke`, `circleBeard`, `shortBoxed`, `fullBeard`, `longBeard`, `roundedBeard`, `pointedBeard`, `chinStrap`, `soulPatch`, `sideburns`, `muttonChops`, `moustacheStubble`
13517
- - `glasses`: `round`, `square`, `sunglasses`; `hat`: `cap`, `beanie`, `hardHat`, `sunHat`, `bowler`; `ears: true`
13518
- - `outfit`: `{ shirt, trousers, sleeves: short | long | none, bottom: trousers | shorts | skirt, collar, tie: colour, over: apron | labCoat, overColor }`
13840
+ - `glasses`: `round`, `square`, `sunglasses`; `hat`: `cap`, `beanie`, `hardHat`, `sunHat`, `bowler`; `ears: true`; `face: { teeth, tongue }` (shown when the mouth opens); `feet`: `round`, `flat`, `pointed`, `big`
13841
+ - `outfit`: `{ shirt, trousers, sleeves: short | long | none, bottom: trousers | shorts | skirt, collar, tie: colour, over: apron | labCoat | hoodie | cardigan | overalls | sari, overColor, shoes: boots, shoeColor }`
13519
13842
  - `castMember(name, height)`: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`, `grandma`, `doctor`, `cook`, `builder`, `courier`, `teacher`, `farmer`
13520
13843
  - Face marks (pose fields, 0–1): `blush`, `tears`, `sweat`
13521
- - `holding`: `mug` (left or right), `phone` (left or right), `book` (one hand or both), `bag` (left or right), `briefcase` (left or right), `umbrella` (left or right), `broom` (left or right), `parcel` (both); pose fields `held.left`, `held.right`, `held.both` (below 0.5 lets go); `handGrip(joints, side)`
13522
- - `meetHands(kind, a, b)` (stand them `meetingSpacing(kind, a, b)` apart): `handshake`, `highFive`, `fistBump`, `handOver`
13844
+ - Hair in motion (pose fields): `hair.swing` (degrees round the head, + toward its left), `hair.trail` (head radii back), `hair.lift` (head radii up); key them with `hairFollowTracks(target, tracks, who)` after the character's tracks, or `hairFollow` + `hairMotionAt` when posing per frame
13845
+ - `holding`: `mug` (left or right), `phone` (left or right), `book` (one hand or both), `bag` (left or right), `briefcase` (left or right), `umbrella` (left or right), `broom` (left or right), `cane` (left or right), `parcel` (both); pose fields `held.left`, `held.right`, `held.both` (below 0.5 lets go); `handGrip(joints, side)`
13846
+ - `meetHands(kind, a, b)` (stand them `meetingSpacing(kind, a, b)` apart): `handshake`, `highFive`, `fistBump`, `handOver`; `embrace(a, b)` (a hug, `embraceSpacing` apart); `helpUp(helper, sitter, progress)` (0 on the floor, hand taken; 1 standing; `helpUpSpacing` apart)
13847
+ - Everyday cycles like a gait: `humanCyclePose('sweeping' | 'brushing', phase, base)` (0 → 1 is one stroke and back; sweeping with `holding: { right: 'broom' }`)
13523
13848
 
13524
13849
  ## Code panel
13525
13850
 
@@ -13580,7 +13905,7 @@ Edits:
13580
13905
 
13581
13906
  ### board
13582
13907
 
13583
- `whiteboard({ x, y, width, height, theme?: whiteboard | chalkboard, fontSize?, items: [{ id, text, at: [x, y], size?, color?, hidden? } | { id, mark: circle | box | underline | arrow, around? | from?, to?, color?, hidden? }] })`
13908
+ `whiteboard({ x, y, width, height, theme?: whiteboard | chalkboard | lines, fontSize?, items: [{ id, text, at: [x, y], size?, color?, hidden? } | { id, mark: circle | box | underline | arrow, around? | from?, to?, bend?, color?, hidden? }] })`
13584
13909
 
13585
13910
  Anchors:
13586
13911
  - `box`: the whole board
@@ -13598,19 +13923,22 @@ Edits:
13598
13923
 
13599
13924
  ### chart
13600
13925
 
13601
- `chart({ x, y, width, height, kind: bar | line, data: [{ id, label?, value, hidden? }], max?, title?, theme?: light | dark, decimals?, prefix?, suffix?, values? })`
13926
+ `chart({ x, y, width, height, kind: bar | line | pie | donut, data: [{ id, label?, value | values: { SERIES: value }, hidden? }], series?: [{ id, label?, color? }], max?, title?, axis?: { x?, y? }, legend?, theme?: light | dark, decimals?, prefix?, suffix?, values? })`
13602
13927
 
13603
13928
  Anchors:
13604
13929
  - `box`: the whole chart
13605
- - `bar:ID`: a bar (bar charts), as it stands at the time: stand on its top (it carries a figure as it grows), point at it
13606
- - `point:ID`: a point on the line (line charts), as it stands at the time
13607
- - `label:ID`: its label under the axis
13608
- - `value:ID`: its value label, above it
13930
+ - `bar:ID`: a bar (bar charts; bar:ID:SERIES with several series), as it stands at the time: stand on its top (it carries a figure as it grows), point at it
13931
+ - `point:ID`: a point on the line (line charts; point:ID:SERIES with several series), as it stands at the time
13932
+ - `slice:ID`: a slice of a pie or donut, as it stands at the time (its middle; pulled out, it moves): point at it, make it a piece
13933
+ - `label:ID`: its label: under the axis, or beside the slice
13934
+ - `value:ID`: its value label: above the bar or point (value:ID:SERIES), or on the slice
13935
+ - `legend:SERIES`: a series in the legend (several series)
13609
13936
 
13610
13937
  Edits:
13611
- - `set`: bar or point anchors; { at, value, duration? }: animate to a new value; its value label counts along
13612
- - `show`: bar or point anchors given `hidden`; { at, duration?, on? }: grow a bar in from the axis, or draw the line out to a point (on: false takes it back)
13613
- - `highlight`: bar or point anchors; { at, duration?, on? }: colour it out (on: false clears)
13938
+ - `set`: bar, point or slice anchors; { at, value, duration? }: animate to a new value; its value label counts along (a pie re-shares the circle)
13939
+ - `show`: bar, point or slice anchors given `hidden`; { at, duration?, on? }: grow a bar in from the axis, draw the line out to a point, or open a slice (on: false takes it back)
13940
+ - `highlight`: bar, point or slice anchors; { at, duration?, on? }: colour it out (on: false clears)
13941
+ - `pull`: slice anchors; { at, duration?, on? }: pull the slice out from the centre (on: false puts it back)
13614
13942
 
13615
13943
  ### prop
13616
13944
 
@@ -13619,12 +13947,14 @@ Edits:
13619
13947
  Anchors:
13620
13948
  - `box`: the prop’s whole box
13621
13949
  - `anchor:NAME`: one of its rig’s anchors (door, seat, branch, ridge…), as posed at the time
13622
- - `part:ID`: one of its parts as seen at the time (window-1, door-left, wheel-0-left…)
13623
- - `control:NAME`: where the parts a control moves or lights are (control:door is the doors, control:lights the lamps)
13950
+ - `part:ID`: one of its parts as seen at the time (window-1, door-left, wheel-0-left…); it can come loose as a piece
13951
+ - `control:NAME`: where the parts a control moves or lights are (control:door is the doors, control:lights the lamps; a control of the whole prop, like lift, is its box)
13624
13952
 
13625
13953
  Edits:
13626
13954
  - `set`: control anchors; { at, value, duration? }: move a control to a value
13627
13955
  - `switch`: control anchors; { at, on?, duration? }: a control to its full value (open, on), or back to its rest value with on: false
13956
+ - `move`: a part; { at, to: an anchor name or { x, y }, duration? }: carry the part there, loose
13957
+ - `fling`: a part; { at, velocity?, spin?, gravity?, duration? }: knock the part off on a spinning arc
13628
13958
 
13629
13959
  ## Camera shots (`cameraTracks(shots, { stage })`)
13630
13960