@algorisys/tinyfly 0.106.1 → 0.108.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 (47) hide show
  1. package/README.md +31 -13
  2. package/docs/character-appearance.md +187 -1
  3. package/docs/editor-guide.md +1 -1
  4. package/docs/examples.md +1 -1
  5. package/docs/getting-started.md +1 -1
  6. package/docs/gsap-compat.md +1 -1
  7. package/docs/llm-guide.md +45 -2
  8. package/docs/maps.md +2 -2
  9. package/docs/teaching.md +1 -1
  10. package/lib/addons/characters.js +4985 -4280
  11. package/lib/browser/tinyfly.iife.js +14 -14
  12. package/lib/browser/tinyfly.js +7155 -6450
  13. package/lib/browser/tinyfly.umd.js +14 -14
  14. package/lib/types/characters/body/organic-body.d.ts +56 -0
  15. package/lib/types/characters/body/organic-draw.d.ts +5 -0
  16. package/lib/types/characters/body/organic-geometry.d.ts +25 -0
  17. package/lib/types/characters/capabilities.d.ts +2 -0
  18. package/lib/types/characters/character.d.ts +15 -2
  19. package/lib/types/characters/hair-follow.d.ts +3 -2
  20. package/lib/types/characters/hands/draw-cartoon-hand.d.ts +4 -0
  21. package/lib/types/characters/head/ears.d.ts +2 -0
  22. package/lib/types/characters/head/face.d.ts +8 -4
  23. package/lib/types/characters/head/facial-hair.d.ts +4 -0
  24. package/lib/types/characters/head/flowing-hair.d.ts +55 -0
  25. package/lib/types/characters/head/glasses.d.ts +2 -0
  26. package/lib/types/characters/head/hair-lock-draw.d.ts +5 -0
  27. package/lib/types/characters/head/hair-lock.d.ts +36 -0
  28. package/lib/types/characters/head/hair.d.ts +67 -3
  29. package/lib/types/characters/head/head-look.d.ts +6 -2
  30. package/lib/types/characters/head/head-shape.d.ts +4 -0
  31. package/lib/types/characters/head/index.d.ts +1 -0
  32. package/lib/types/characters/head/shell.d.ts +2 -2
  33. package/lib/types/characters/index.d.ts +5 -0
  34. package/lib/types/characters/look/pen.d.ts +1 -0
  35. package/lib/types/characters/look/skin-shading.d.ts +4 -0
  36. package/lib/types/characters/polyline.d.ts +12 -0
  37. package/lib/types/characters/rig/skeleton.d.ts +2 -0
  38. package/lib/types/characters/sketch.d.ts +54 -0
  39. package/lib/types/characters/soft-cartoon-cast.d.ts +166 -0
  40. package/lib/types/characters/wardrobe/basic-outfit.d.ts +5 -1
  41. package/lib/types/characters/wardrobe/leaf-outfit.d.ts +18 -0
  42. package/lib/types/characters/wardrobe/outfit-preset.d.ts +6 -0
  43. package/lib/types/compat/gsap/playhead-crossings.d.ts +47 -0
  44. package/llms-full.txt +251 -14
  45. package/llms.txt +29 -29
  46. package/package.json +1 -1
  47. package/skills/tinyfly/SKILL.md +32 -1
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.106.1/cdn/tinyfly.iife.js"></script>
207
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.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.106.1/cdn/tinyfly.iife.js"></script>
415
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly.iife.js"></script>
416
416
  <script>
417
417
  tinyfly.to('.box', { x: 200, duration: 1 })
418
418
  </script>
@@ -2327,7 +2327,7 @@ For simple website embedding without a build system.
2327
2327
  </html>
2328
2328
  ```
2329
2329
 
2330
- 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.106.1/cdn/tinyfly-player.iife.js`.
2330
+ 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.108.0/cdn/tinyfly-player.iife.js`.
2331
2331
 
2332
2332
  ---
2333
2333
 
@@ -6680,7 +6680,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
6680
6680
  **Steps to embed:**
6681
6681
  1. Build the player: `npm run build:player`
6682
6682
  2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
6683
- `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly-player.iife.js`
6683
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-player.iife.js`
6684
6684
  instead; see [Deployment](DEPLOYMENT.md))
6685
6685
  3. Copy the generated code into your HTML
6686
6686
  4. Adjust the script `src` path if needed
@@ -7921,6 +7921,38 @@ bakes. See `docs/dance.md`.
7921
7921
 
7922
7922
  ## Characters with a look
7923
7923
 
7924
+ For original soft cartoon story characters, opt into `figure: 'organic'`.
7925
+ Its default `face.projection: 'volume'` moves eyes/mouth around the head and
7926
+ lets hair occlude them, with a flatter profile facial plane and a nose above
7927
+ the mouth; classic `cartoon` projection remains available. Foreground organic
7928
+ arms/hands draw together over lower garments, preserving the wrist at the waist.
7929
+ `body` owns JSON half-width profiles (`torso`, `arm`, `leg`, `neck`): increasing
7930
+ arrays of `{ at: 0..1, width: fractionOfHeight }` spanning 0 to 1. Set `skin`
7931
+ once for exposed body, head and hands; `body.fill` overrides it.
7932
+ Use `body.fill: 'none'` for outline-only exposed skin, including both hand
7933
+ variants in every look. In 3D, only foreground arms use garment depths for
7934
+ painter ordering; other organic parts retain physical world-object occlusion.
7935
+ `body.outline: { color, width }` is independent of anatomy. Optional
7936
+ `body.shading: { mode: 'cel' | 'none', light: [x,y], shadow, opacity, highlight }`
7937
+ is deterministic and clipped to skin. Defaults include small natural hands.
7938
+ `softCartoonCharacter('youngMan' | 'youngWoman' | 'childBoy' | 'childGirl', options)`
7939
+ provides editable original actors; `SOFT_CARTOON_CAST` contains their source
7940
+ options. Children default to shorter heights, larger head proportions, shorter
7941
+ limbs and rounded torsos. Override `height` to change size while preserving
7942
+ their anatomy. Use `outfitPreset('everyday' | 'formal' | 'casual', overrides)`
7943
+ for owned JSON wardrobe defaults. `outfit.top` is `tshirt | shirt | blouse |
7944
+ dress`; `trouserStyle` is `plain | jeans | cargo`; `shirt` and `trousers`
7945
+ remain colour fields. Bottoms are `trousers | shorts | skirt`; sleeves,
7946
+ collar and tie colour are editable. Dresses force a skirt in the top colour.
7947
+ All garments are available for every actor. `outfit` adapts to organic contours; organic-only `leafOutfit` accepts
7948
+ `{ top?, color?, accent?, length? }`. Use the existing `characterScript`,
7949
+ `characterPoseTracks`, `reachCharacter`, hand pose and `hairFollowTracks`
7950
+ APIs for motion. Avoid a foreground whole-body overlay. An unrigged PNG
7951
+ is not a posable character. The interactive example is
7952
+ `/examples/live-organic-characters`; a headless study is
7953
+ `examples/headless-video/organic-characters.mjs`. Child proportions and poses
7954
+ are shown in `examples/headless-video/child-characters.mjs`.
7955
+
7924
7956
  A v2 character's appearance is plain options to `character()`, never drawing
7925
7957
  code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
7926
7958
  `{ style, color, length, … }`), `facialHair`, `glasses`, `hat`, `ears: true`,
@@ -7929,6 +7961,9 @@ code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
7929
7961
  'cardigan' | 'overalls' | 'sari' | 'apron' | 'labCoat', shoes: 'boots' }`.
7930
7962
  Built-in tops hide thighs and trouser roots under their hem during turns;
7931
7963
  garments spanning both legs use the resolved body order in camera views too.
7964
+ Custom camera-view garment details should use `joints.bodyForward` (view-space
7965
+ body axis: `z` front visibility, `x` side offset), independent of head yaw.
7966
+ `joints.turn` remains authored; flat joints omit `bodyForward`.
7932
7967
  For custom clothes, `layers.parts[id].clip` clips only the bare body before
7933
7968
  `over` draws, and `joints.parts[id].order` gives the drawing index.
7934
7969
  `castMember('grandpa', 300)` gives a whole ready-made character to start
@@ -7946,8 +7981,15 @@ and the close-up fields `pupil`, `lid` and `bulge`, so any face goes with any
7946
7981
  action or view; `drawCharacterHead(ctx, who, pose, { x, y, radius })` draws
7947
7982
  just the head big, and `face: { nose, inPupil }` adds a nose and a drawing in
7948
7983
  the pupils. Hair and hats turn with the head:
7949
- don't draw a different hairstyle per view. Hanging hair swings on its own:
7950
- after the character's tracks add `hairFollowTracks(target, tracks, who)` (or,
7984
+ don't draw a different hairstyle per view.
7985
+ `softSweep`, `flowingBob` and `cascadingWaves` provide flowing cartoon hair
7986
+ with editable cubic `locks: [{ path, width, follow? }]`. Each path is a root
7987
+ plus groups of three `{ around, up, lift? }` points (degrees around the head,
7988
+ head radii up/out); the root has up 0..1 and lift 0. `follow: 0` pins a lock.
7989
+ `length` changes the supporting mass; edit the path to change a lock's length.
7990
+ These styles work with the same acting and story tracks as other characters.
7991
+ Hanging hair and flexible locks, including short sweeps, follow motion through
7992
+ the same API: after the character's tracks add `hairFollowTracks(target, tracks, who)` (or,
7951
7993
  posing per frame, `hairFollow` once and `hairMotionAt(keys, t)` each frame)
7952
7994
  rather than keying `hair.swing` by hand. Put things in hands with `holding`
7953
7995
  (`{ right: 'mug' }`, `{ both: 'parcel' }`; the pose field `held.both` lets go),
@@ -8103,6 +8145,7 @@ or link `llms-full.txt`.
8103
8145
 
8104
8146
  `MANGA_CAST` supplies four original young adult presets through `castMember`.
8105
8147
  `face.shape: 'angular'`, `jawWidth` and `chinWidth` shape the projected pen head;
8148
+ `jawRoundness: 1` rounds cheek/chin corners (default `0` preserves sharp jaws).
8106
8149
  `eyeScale` and `eyeAspect` shape anime eyes. Hair and outfit overrides remain
8107
8150
  independent; spread the preset's face when changing one nested field.
8108
8151
  `mangaSpikes` / `mangaSweep` contain editable `hair.spikes` tufts as JSON
@@ -8151,7 +8194,7 @@ path for all of that:
8151
8194
  </figure>
8152
8195
 
8153
8196
  <!-- once, anywhere on the page (a site-wide footer is fine) -->
8154
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
8197
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
8155
8198
  ```
8156
8199
 
8157
8200
  Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
@@ -9423,8 +9466,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
9423
9466
  adds to the same `tinyfly` global:
9424
9467
 
9425
9468
  ```html
9426
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly.iife.js"></script>
9427
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly-maps.iife.js"></script>
9469
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly.iife.js"></script>
9470
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-maps.iife.js"></script>
9428
9471
  ```
9429
9472
 
9430
9473
  It is a separate script because the offline world map it carries adds about
@@ -9666,6 +9709,147 @@ drawCharacter(ctx, maya, humanPose({ ...HUMAN_EXPRESSIONS.embarrassed, turn: 0.5
9666
9709
  A plain figure (no `hair`, `facialHair`, `glasses`, `hat` or `ears`) draws
9667
9710
  exactly as it did before these options existed.
9668
9711
 
9712
+ ## Organic cartoon bodies
9713
+
9714
+ Use `figure: 'organic'` for original, softly drawn story characters. The
9715
+ existing human skeleton controls poses, reaching, ground contact and part
9716
+ order. Filled contours supply shoulders, chest, waist, hips and shaped
9717
+ limbs; dimensions are independent of the outline width.
9718
+
9719
+ ```js
9720
+ import { character, softCartoonCharacter, characterScript, hairFollowTracks } from '@algorisys/tinyfly/characters'
9721
+
9722
+ const actor = character({
9723
+ figure: 'organic', height: 320, skin: '#efbd96',
9724
+ body: {
9725
+ arm: [{ at: 0, width: 0.028 }, { at: 0.5, width: 0.018 },
9726
+ { at: 0.7, width: 0.023 }, { at: 1, width: 0.012 }],
9727
+ outline: { color: '#53372d', width: 1.5 },
9728
+ shading: { mode: 'cel', light: [-0.8, -0.6], opacity: 0.17 },
9729
+ },
9730
+ face: { style: 'anime', shape: 'angular', jawRoundness: 1 },
9731
+ hair: { style: 'flowingBob', color: '#38291f' },
9732
+ outfit: { shirt: '#72958b', trousers: '#495a67' },
9733
+ })
9734
+ const friend = softCartoonCharacter('youngWoman', { height: 300 })
9735
+ const story = characterScript('actor', actor, [
9736
+ { do: 'walk', to: 240, for: 2200 },
9737
+ { do: 'say', say: 'Let us explore!', for: 1800, mood: 'happy' },
9738
+ ], { from: 60 })
9739
+ story.tracks.push(...hairFollowTracks('actor', story.tracks, actor))
9740
+ ```
9741
+
9742
+ `softCartoonCharacter` accepts only `youngMan`, `youngWoman`, `childBoy`
9743
+ and `childGirl`; unknown actor names throw an error, including inherited
9744
+ object keys such as `constructor`.
9745
+
9746
+ `body.torso`, `arm`, `leg` and `neck` are arrays of `{ at, width }`.
9747
+ `at` increases from 0 to 1; `width` is a half-width fraction of character
9748
+ height. Torso positions run hip to neck, arms shoulder to wrist, and legs
9749
+ hip to ankle. Cubic centerlines pass through native elbow/knee joints with
9750
+ interpolated width profiles. Options are copied at construction and can
9751
+ travel as JSON. `body.depth` (0.2–1, default 0.55) sets torso side thickness.
9752
+ `body.fill` overrides `skin` for all exposed body, face and palms; omit it
9753
+ to keep one `skin` colour control. The editor's Skin and Line controls show
9754
+ the resolved fill and outline colour; editing them also updates any existing
9755
+ `body.fill` or `body.outline.color` override without changing other body options.
9756
+
9757
+ Default organic hands are small natural five-finger hands (`handSize: 0.073`).
9758
+ Existing `hand.left.*` / `hand.right.*` tracks control palms, fists, pointing,
9759
+ bends and wrist rolls. Foreground organic arms and hands draw together after
9760
+ the torso and lower garments; rear arms remain behind them. Attached borders at shoulders, hips, wrists and ankles are hidden
9761
+ where connected contours meet. This ordering also survives the 3D scene's
9762
+ global depth sort, while separate world objects can still occlude the figure.
9763
+ `characterPartsInView()` retains each part's physical `depth` and supplies
9764
+ an organic `sortDepth` for painter ordering. Only foreground arms are promoted
9765
+ to the nearest torso/leg garment depth; head, neck, torso, legs and rear arms
9766
+ keep their physical depths. Scene integrations sort by `sortDepth ?? depth`, retaining array
9767
+ order for ties. Fluid and stick parts retain their existing depth ordering.
9768
+
9769
+ Organic faces default to `face.projection: 'volume'`: feature centres follow
9770
+ the head's 3D axes, both eyes stay readable in three-quarter views, the far
9771
+ eye narrows toward profile, and opaque hair covers
9772
+ eyes and brows. Features stay clipped inside the head through turns and nods.
9773
+ The facial plane is flatter than the rounded rear cranium in profile.
9774
+ With `face.nose: true`, a small nose projects from above the mouth and shapes
9775
+ the turned silhouette without extending the chin.
9776
+ `projection: 'cartoon'` retains the classic face slide used by fluid/stick.
9777
+
9778
+ Cel shading is clipped to moving skin in the clean look. `body.shading`
9779
+ accepts `mode: 'cel' | 'none'`, screen-space `light: [x, y]`, `shadow`,
9780
+ `opacity` and `highlight`. Seeking and headless rendering are deterministic.
9781
+ Pencil and silhouette use their existing pens. Artist-authored painted
9782
+ meshes remain a separate future capability.
9783
+
9784
+ Set `body.fill: 'none'` (or `skin: 'none'` without a body fill override) for
9785
+ outline-only exposed body, head and hands in every look. Dot and articulated
9786
+ hands omit skin fills and shading; clothing retains its own material.
9787
+
9788
+ Everyday shirts, sleeves, trousers, shorts and skirts follow organic anatomy.
9789
+ `leafOutfit: { top: true, color: '#638c39', accent: '#87ae4e', length: 0.32 }`
9790
+ selects attached leaf garments with curved shapes and veins; `top: false`
9791
+ leaves the upper body uncovered. It requires organic mode.
9792
+ `leafOutfitContours(joints, options)` exposes plain coverage geometry for
9793
+ custom layers and exporters. Both wardrobes use native part depths.
9794
+
9795
+ `softCartoonCharacter('childBoy')` and `softCartoonCharacter('childGirl')`
9796
+ provide original child presets with a larger head/body ratio, shorter arms
9797
+ and legs, rounded torsos and smaller default heights (230 and 225 px).
9798
+ All face, hair, clothes, skin and proportions remain editable; changing
9799
+ `height` preserves the child anatomy. The same pose, script, hand, reaching
9800
+ and lip-sync APIs work for adults and children.
9801
+
9802
+ The example at `/examples/live-organic-characters` includes adult, child and
9803
+ adult/child pairs, face/hair
9804
+ choices, independently editable everyday/formal/casual/leaf garments, seven actions, outline and skin controls,
9805
+ shading, playback and scrubbing. Available in v0.108.0. See the
9806
+ [contact sheet](model-sheet/organic-characters.png) and
9807
+ [child character sheet](model-sheet/child-characters.png).
9808
+ Close-up [head turns](model-sheet/organic-head-turns.png) exercise independent
9809
+ `head.turn` at the story's body orientation.
9810
+ `fluid` and `stick` keep their existing defaults and ink-based dimensions.
9811
+
9812
+ ## Everyday, Formal and Casual clothing
9813
+
9814
+ `outfitPreset(category, overrides)` returns fresh plain JSON options for
9815
+ `character({ outfit })` or `softCartoonCharacter(name, { outfit })`.
9816
+ The categories are `everyday`, `formal` and `casual`. Every garment works
9817
+ with adult and child actors, regardless of gender.
9818
+
9819
+ ```js
9820
+ import { softCartoonCharacter, outfitPreset } from '@algorisys/tinyfly/characters'
9821
+
9822
+ const formal = softCartoonCharacter('youngMan', {
9823
+ outfit: outfitPreset('formal', { shirt: '#ece6db', trousers: '#354456', tie: '#7b3955' }),
9824
+ })
9825
+ const casual = softCartoonCharacter('youngWoman', {
9826
+ outfit: outfitPreset('casual', { top: 'tshirt', bottom: 'shorts', trouserStyle: 'cargo' }),
9827
+ })
9828
+ const dress = softCartoonCharacter('childGirl', {
9829
+ outfit: outfitPreset('formal', { top: 'dress', shirt: '#aa6b91', sleeves: 'none' }),
9830
+ })
9831
+ ```
9832
+
9833
+ - `top`: `tshirt`, `shirt` (button placket), `blouse` (V neckline) or `dress`.
9834
+ Omit it to retain the original plain T-shirt. Shirts default to a collar;
9835
+ an explicit `collar: false` removes it.
9836
+ - `bottom`: `trousers`, `shorts` or `skirt`; `trouserStyle`: `plain`, `jeans`
9837
+ (pockets and stitching) or `cargo` (thigh pockets). Details follow the
9838
+ limbs and stay clipped inside the fabric.
9839
+ - `shirt` and `trousers` remain top and bottom colours. A dress uses
9840
+ `shirt` for both its bodice and skirt, overriding `bottom` and ignoring
9841
+ the separate bottom colour. `sleeves` accepts `short`, `long` or `none`.
9842
+ - `collar` is a boolean; `tie` is a colour or `null` to remove it. Changing a
9843
+ formal preset to a different top removes its default collar and tie;
9844
+ explicit accessory overrides take precedence.
9845
+
9846
+ The example's **Edit outfit** choice edits both characters or either actor
9847
+ separately. Formal starts with a shirt/tie or blouse/skirt; Casual starts
9848
+ with a T-shirt/jeans. All cuts remain selectable for either character.
9849
+ The editor exposes the same presets and garment choices, saved with scene
9850
+ JSON. [Clothing sheet](model-sheet/clothing-options.png), reproduced by
9851
+ `examples/headless-video/clothing-options.mjs`.
9852
+
9669
9853
  ## How it turns
9670
9854
 
9671
9855
  Hair, beards and hats are not flat drawings pasted on the face. Each is a
@@ -9728,6 +9912,11 @@ Medium and long hair: `pixie`, `bob`, `longBob`, `wavyBob`, `shoulderStraight`,
9728
9912
  `lowPonytail`, `highPonytail`, `ponytail`, `sidePonytail`, `topBun`, `lowBun`,
9729
9913
  `singleBraid`, `twinBraids`, `braids`.
9730
9914
 
9915
+ Flowing cartoon hair: `softSweep`, `flowingBob`, `cascadingWaves`. These use
9916
+ broad curved locks over a fitted scalp cap, with soft tapered ends and gentle
9917
+ asymmetry. The bob and long waves include a narrowing supporting mass so the
9918
+ locks overlap without gaps. Each description serves every head angle.
9919
+
9731
9920
  Every style is the same few fields (`resolveHair(spec)` fills them all in):
9732
9921
 
9733
9922
  | Field | Meaning |
@@ -9744,16 +9933,45 @@ Every style is the same few fields (`resolveHair(spec)` fills them all in):
9744
9933
  | `part`, `strands` | A parting (degrees round from the middle of the face) and the detail lines: `none`, `part`, `sweep`, `combed`, `hanging`, `thin` |
9745
9934
  | `fill` | `solid`, or `stipple` (close-cropped: dots on the scalp) |
9746
9935
  | `ties` | Ponytails, buns and braids: `{ kind: 'ponytail' \| 'bun' \| 'braid', at: 'top' \| 'high' \| 'low' \| 'left' \| 'right', length?, size? }` |
9936
+ | `locks` | Curved sections: `{ path, width, follow? }`; `width` is in head radii; `follow` scales their flex (default 1, 0 pins a lock) |
9937
+ | `fall` | Hanging mass: `{ taper, wave }`, narrowing toward the ends (0..1 head radii) and a soft uneven hem (nonnegative head radii) |
9938
+ | `shine` | Soft highlight opacity on the locks, 0..1 (default 0); drawn in the clean look |
9747
9939
  | `coversEars` | The hair hides the ears |
9748
9940
 
9749
9941
  A style stays a starting point: any style suits anyone.
9750
9942
 
9943
+ A lock's `path` has a root, two controls and a tip for a cubic curve; append
9944
+ groups of three points for additional segments. Each point is
9945
+ `{ around, up, lift? }`: `around` is degrees from the face toward the character's
9946
+ left, `up` is head radii from the centre (at most 1), and nonnegative `lift`
9947
+ adds distance outside the cap. The root must have `up` between 0 and 1 and no
9948
+ extra lift. Sweeps follow the scalp rather than cutting through the skull.
9949
+ Use continuous angles across the back, such as 160, 190, 220. Invalid lock
9950
+ paths, widths, flexibility, shine and fall values throw during `resolveHair`.
9951
+
9952
+ ```js
9953
+ const hair = resolveHair({ style: 'cascadingWaves', color: '#985b32' })
9954
+ // Edit the resolved data; presets and other characters keep their own paths.
9955
+ hair.locks[0].follow = 0.65
9956
+ character({ hair })
9957
+ // Remove the sculpted locks, keeping the cap and supporting mass:
9958
+ character({ hair: { style: 'flowingBob', locks: [], shine: 0 } })
9959
+ ```
9960
+
9961
+ `length` changes the supporting mass; edit lock path points to change their
9962
+ individual lengths and curls. Public types: `HairLock`, `HairLockPoint`.
9963
+ See the **Flowing Cartoon Hair** example and the
9964
+ [eight-view reference sheet](model-sheet/flowing-hair.png).
9965
+
9751
9966
  ## Hair in motion
9752
9967
 
9753
9968
  Hair that hangs (long hair, ponytails, braids) lags behind the head: it swings
9754
9969
  round after a turn, streams back on a run, drops on a jump and lifts on the
9755
9970
  landing. The roots stay on the head; the ends move, more the further they hang.
9756
- Short hair, buns, beards and hats stay put.
9971
+ Ordinary short hair, buns, beards and hats stay put. Flowing locks also flex,
9972
+ including the short `softSweep`: their roots remain fixed while their ends
9973
+ respond by each lock's `follow` amount. The presets use smaller amounts on
9974
+ the fringe and larger, varied amounts on the hanging locks.
9757
9975
 
9758
9976
  The lag is three pose fields, so it keys, saves and mirrors like any other:
9759
9977
 
@@ -9884,6 +10102,13 @@ body part before it draws. Set the canvas clipping path in this hook; it is
9884
10102
  restored before the part's `over` layers and the next part. The built-in outfit
9885
10103
  uses this to hide thighs under tops. `joints.parts[id].order` is the resolved
9886
10104
  far-to-near drawing index; use it when a garment spans several parts.
10105
+ Camera-projected joints also provide `bodyForward: [x,y,z]` in view space:
10106
+ `z` is front visibility and `x` is the side offset for front details. This
10107
+ axis follows the body and camera independently of head yaw. `joints.turn`
10108
+ retains the authored body turn; flat drawing omits `bodyForward`, so use
10109
+ `cos(turn * Math.PI / 2)` and `sin(turn * Math.PI / 2)` there.
10110
+ The built-in wardrobe uses this direction for front buttons, necklines,
10111
+ pockets, collars, ties and outer-garment details.
9887
10112
 
9888
10113
  ## The cast
9889
10114
 
@@ -9955,6 +10180,10 @@ const hero = character(castMember('mangaYoungMan', 300, {
9955
10180
  projected 3D tapered head, following yaw, nod and roll. `jawWidth` is the
9956
10181
  half-width at the jaw (clamped to 0.55–0.95 head radii, default 0.74);
9957
10182
  `chinWidth` is the half-width just above the chin (0.03–0.35, default 0.14).
10183
+ `jawRoundness` softens angular cheek and chin corners (0–1, default 0 keeps
10184
+ the sharp outline). The Flowing Cartoon Hair demo's soft angular face uses
10185
+ `jawWidth: 0.8`, `chinWidth: 0.28` and `jawRoundness: 1` for a fuller,
10186
+ rounded chin. Behind-head hair, ears and beards clip to this same outline.
9958
10187
  `shape: 'round'` is the original default. The underlying rig and contact
9959
10188
  geometry retain their original head bounds; solid mesh characters retain
9960
10189
  their existing mesh head.
@@ -14413,7 +14642,7 @@ magnet.addEventListener('pointerleave', () => {
14413
14642
 
14414
14643
  <!-- capabilities: generated from the library -->
14415
14644
 
14416
- # tinyfly capabilities (v0.106.1)
14645
+ # tinyfly capabilities (v0.108.0)
14417
14646
 
14418
14647
  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).
14419
14648
 
@@ -14697,14 +14926,22 @@ Native dances: `garba`, `garbaThreeClap`, `dandiya`; `humanDanceFrame(style, bea
14697
14926
  Appearance options of `character({ … })`, all plain data that turns with the head (see docs/character-appearance.md):
14698
14927
 
14699
14928
  - `build`: `standard`, `slim`, `tall`, `short`, `broad`, `curvy`, `stocky`, `kid`, `child`, `toddler`
14700
- - `hair`: `bald`, `buzzCut`, `crewCut`, `short`, `sidePart`, `sideSwept`, `slickBack`, `quiff`, `spiky`, `mangaSpikes`, `mangaSweep`, `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`)
14929
+ - `figure`: `fluid`, `stick`, `organic`
14930
+ - `body.torso · body.arm · body.leg · body.neck`: Organic half-width profiles: [{ at: 0..1, width: fractionOfHeight }], increasing from 0 to 1; independent of ink width.
14931
+ - `body.fill · body.outline · body.shading`: Shared skin fill, outline { color, width }, cel material { mode: cel | none, light: [x,y], shadow, opacity, highlight }.
14932
+ - `softCartoonCharacter(name, options?)`: Original youngMan / youngWoman / childBoy / childGirl story presets. Children have larger head proportions, shorter limbs and rounded torsos; every face, hair, build, hand, clothing and material option can be overridden.
14933
+ - `face.projection`: Organic default volume follows the head axes, keeps both eyes in three-quarter views and projects a small nose above the mouth; opaque hair covers features. cartoon keeps the classic face slide.
14934
+ - `outfitPreset(category, overrides?)`: Fresh JSON Everyday / Formal / Casual wardrobe defaults for every actor; top: tshirt | shirt | blouse | dress, trouserStyle: plain | jeans | cargo, colours, sleeves, bottoms, collar and tie are editable.
14935
+ - `leafOutfit`: Organic-only JSON garment { top?, color?, accent?, length? }; curved leaves follow torso/thighs at native part depths. Everyday basicOutfit also follows organic contours.
14936
+ - `hair`: `softSweep`, `flowingBob`, `cascadingWaves`, `bald`, `buzzCut`, `crewCut`, `short`, `sidePart`, `sideSwept`, `slickBack`, `quiff`, `spiky`, `mangaSpikes`, `mangaSweep`, `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`)
14937
+ - Flowing hair: `softSweep`, `flowingBob`, `cascadingWaves`; editable `locks: [{ path, width, follow? }]` with cubic `{ around, up, lift? }` points (around in degrees, dimensions in head radii), `fall: { taper, wave }` and `shine` (0–1). Roots stay attached; `hairFollowTracks` also drives flexible short locks.
14701
14938
  - `facialHair`: `cleanShaven`, `stubble`, `pencilMoustache`, `shortMoustache`, `chevron`, `handlebar`, `walrus`, `goatee`, `vanDyke`, `circleBeard`, `shortBoxed`, `fullBeard`, `longBeard`, `roundedBeard`, `pointedBeard`, `chinStrap`, `soulPatch`, `sideburns`, `muttonChops`, `moustacheStubble`
14702
14939
  - `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`
14703
- - `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 }`
14940
+ - `outfit`: `{ top: tshirt | shirt | blouse | dress, trouserStyle: plain | jeans | cargo, shirt: top colour, trousers: bottom colour, sleeves: short | long | none, bottom: trousers | shorts | skirt, collar, tie: colour, over: apron | labCoat | hoodie | cardigan | overalls | sari, overColor, shoes: boots, shoeColor }`
14704
14941
  - `castMember(name, height)`: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`, `grandma`, `doctor`, `cook`, `builder`, `courier`, `teacher`, `farmer`, `animeBoy`, `animeGirl`, `animeYoungMan`, `animeYoungWoman`, `animeMan`, `animeWoman`, `animeOlderMan`, `animeOlderWoman`, `mangaYoungMan`, `mangaYoungWoman`, `mangaRival`, `mangaHeroine`
14705
14942
  - Face marks (pose fields, 0–1): `blush`, `tears`, `sweat`; close-up fields `pupil` (size, 1 usual), `lid` (upper lids lowered, 0–1), `bulge` (eyes out of the head, 0–1); `face: { nose: true, inPupil(ctx, pupil) }`; `drawCharacterHead(ctx, who, pose, { x, y, radius })` draws just the head big
14706
14943
  - Face styles: `simple`, `anime`; `face: { style: 'anime', iris: '#4b7fce', lashes: true, ageLines: 0.8 }` uses coloured eyes and the same expressions, blinks and gaze. `ANIME_CAST` contains eight age presets, also available through `castMember`.
14707
- - Face shapes: `round`, `angular`; `face: { shape: 'angular', jawWidth: 0.74, chinWidth: 0.14, eyeScale: 0.8, eyeAspect: 0.65 }` sets a tapered 3D jaw and narrower anime eyes. `MANGA_CAST` contains four original young adult presets; hair styles `mangaSpikes` and `mangaSweep` remain editable.
14944
+ - Face shapes: `round`, `angular`; `face: { shape: 'angular', jawWidth: 0.74, chinWidth: 0.14, eyeScale: 0.8, eyeAspect: 0.65 }` sets a tapered 3D jaw and narrower anime eyes; `jawRoundness: 1` softens the cheek/chin corners (default 0 keeps sharp jaws). `MANGA_CAST` contains four original young adult presets; hair styles `mangaSpikes` and `mangaSweep` remain editable.
14708
14945
  - 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
14709
14946
  - `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)`
14710
14947
  - `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)
package/llms.txt CHANGED
@@ -13,47 +13,47 @@ 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.106.1/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.108.0/llms-full.txt)
17
17
 
18
18
  ## Start here
19
19
 
20
- - [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/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.106.1/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.106.1/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; a festive garba/dandiya scene with partner contacts, circle travel and spins, also rendered to video.
23
- - [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/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.108.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.108.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.108.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; a festive garba/dandiya scene with partner contacts, circle travel and spins, also rendered to video.
23
+ - [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.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.106.1/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.106.1/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.108.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.108.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.106.1/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.106.1/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.106.1/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.106.1/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.106.1/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.106.1/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.106.1/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.108.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.108.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.108.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.108.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.108.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.108.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.108.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.106.1/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.106.1/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.106.1/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.106.1/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.106.1/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.106.1/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
- - [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/docs/character-appearance.md): Hair (34 styles), facial hair (20), glasses, hats and ears for the v2 character as plain data on the head, so they turn with it through all eight views; builds (child, tall, short…), a recurring cast (castMember), expressions with blush, tears and sweat, everyday poses, held items (mug, phone, bags, umbrella, parcel) and two characters’ hands meeting (meetHands: handshake, high five, hand-over).
49
- - [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/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.
50
- - [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/docs/dance.md): The stick figure dances disco, hip hop, breaking, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap and popping, and does flips, leaps and splits; native v2 garba (two/three clap) and dandiya add body-local routines, circle formations, world foot plants, paired stick-tip contacts and signed spins; JSON bakes, timing, contact limits and editor menus.
51
- - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/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 pen or solid looks, scripted native dances, timed signed spins and circle formations with foot contacts.
52
- - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/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.
53
- - [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/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.
54
- - [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
42
+ - [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.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.108.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.108.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.108.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.108.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.108.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
+ - [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.0/docs/character-appearance.md): Hair (34 styles), facial hair (20), glasses, hats and ears for the v2 character as plain data on the head, so they turn with it through all eight views; builds (child, tall, short…), a recurring cast (castMember), expressions with blush, tears and sweat, everyday poses, held items (mug, phone, bags, umbrella, parcel) and two characters’ hands meeting (meetHands: handshake, high five, hand-over).
49
+ - [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.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.
50
+ - [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.0/docs/dance.md): The stick figure dances disco, hip hop, breaking, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap and popping, and does flips, leaps and splits; native v2 garba (two/three clap) and dandiya add body-local routines, circle formations, world foot plants, paired stick-tip contacts and signed spins; JSON bakes, timing, contact limits and editor menus.
51
+ - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.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 pen or solid looks, scripted native dances, timed signed spins and circle formations with foot contacts.
52
+ - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.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.
53
+ - [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.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.
54
+ - [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
55
55
 
56
56
  ## Optional
57
57
 
58
- - [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/README.md): Feature overview, project layout and development setup.
59
- - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.106.1/release-notes/README.md): What changed in each version.
58
+ - [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.0/README.md): Feature overview, project layout and development setup.
59
+ - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.108.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.106.1",
3
+ "version": "0.108.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",
@@ -129,6 +129,36 @@ names.
129
129
  - For recurring characters, make a `persona()` (look, acting, gait, mood,
130
130
  stance) and use `persona.script()`; for a move the catalog lacks, write it
131
131
  with `defineAction()` rather than hand-keying joints in many places.
132
+ - Soft cartoon bodies: `figure: 'organic'` defaults to
133
+ `face.projection: 'volume'` for head turns with hair occlusion, a flatter
134
+ profile face and a nose projecting from above the mouth;
135
+ `face.projection: 'cartoon'` keeps the classic face slide. Optional JSON
136
+ `body` profiles (`torso`, `arm`, `leg`, `neck`) use increasing `{ at, width }`
137
+ from 0 to 1, with half-width fractions of height. Use `skin` for the whole exposed character;
138
+ `body.fill` overrides it; `'none'` makes exposed body/head/hands outline-only
139
+ in every look. Organic 3D painter ordering promotes only foreground arms to
140
+ torso/leg garment depths, leaving other parts at physical depths.
141
+ `body.outline: { color, width }` changes ink
142
+ independently of anatomy; `body.shading: { mode: 'cel' | 'none', light: [x,y],
143
+ shadow, opacity, highlight }` clips deterministic shading to skin. Start
144
+ from `softCartoonCharacter('youngMan' | 'youngWoman' | 'childBoy' | 'childGirl', options)`
145
+ or custom character options. Child presets have larger relative heads,
146
+ shorter limbs and rounded torsos, with a smaller default height. Override
147
+ `height` without replacing the child proportions. Hands are small natural hands by default; existing
148
+ pose/hand/script/reach/hair APIs drive them. `outfit` follows organic
149
+ anatomy. `outfitPreset('everyday' | 'formal' | 'casual', overrides)` returns
150
+ fresh wardrobe JSON. `outfit.top` selects `tshirt | shirt | blouse | dress`;
151
+ `trouserStyle` selects `plain | jeans | cargo`; `shirt` and `trousers` are
152
+ colour fields. Bottoms, sleeves, collars and tie colours work on every
153
+ actor. Dresses force a skirt in the top colour. `leafOutfit: { top?, color?, accent?, length? }` requires organic
154
+ mode. Use the resolved part order for occlusion: foreground organic arms
155
+ and hands draw together over lower garments.
156
+ Camera-view garment details use `joints.bodyForward` (`z` front visibility,
157
+ `x` side offset), independently of head yaw. `joints.turn` remains authored;
158
+ flat drawing omits that camera axis. The interactive example is
159
+ `/examples/live-organic-characters` and headless
160
+ `examples/headless-video/organic-characters.mjs` and
161
+ `examples/headless-video/child-characters.mjs` examples.
132
162
 
133
163
  ## 3. Check
134
164
 
@@ -163,8 +193,9 @@ say "closes".
163
193
 
164
194
  ### Manga cast and stick-figure arm proportions
165
195
 
166
- - `MANGA_CAST` / `castMember('mangaYoungMan', height)` supply four original young adult presets. `face.shape: 'angular'`, `jawWidth`, `chinWidth`, `eyeScale` and `eyeAspect` customise them; keep expressions as pose fields.
196
+ - `MANGA_CAST` / `castMember('mangaYoungMan', height)` supply four original young adult presets. `face.shape: 'angular'`, `jawWidth`, `chinWidth`, `jawRoundness`, `eyeScale` and `eyeAspect` customise them; `jawRoundness: 1` softens corners while its default `0` preserves sharp jaws. Keep expressions as pose fields.
167
197
  - Hair styles `mangaSpikes` and `mangaSweep` use editable `spikes: [{ around, up, length, width }]` in head radii (around in degrees). Hair and clothes can be replaced independently of the face. Spread nested preset face options before changing one field.
198
+ - Flowing cartoon styles: `softSweep`, `flowingBob`, `cascadingWaves`. `locks: [{ path, width, follow? }]` are cubic curves: a root plus groups of three `{ around, up, lift? }` points. Around is degrees; up, lift and width are head radii; the root has up 0..1 and lift 0. Edit paths for lock lengths; `length` controls the supporting mass. `follow: 0` pins a lock; `hairFollowTracks` drives flexible locks, including short sweeps, after the same acting/story tracks. `fall: { taper, wave }` softens the hanging mass and `shine` (0..1) adds clean-look highlights.
168
199
  - Pen head outlines follow yaw/nod/roll; contact bounds and the solid mesh head remain unchanged.
169
200
  - The original stick figure takes `style.armLength` as a positive finite multiplier (default 1) in its draw, joints and target APIs. Both arm bones scale; hands and other body proportions retain their sizes. The newer human rig retains its `CharacterOptions.armLength`.
170
201