@algorisys/tinyfly 0.107.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 (36) hide show
  1. package/README.md +17 -12
  2. package/docs/character-appearance.md +148 -0
  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 +35 -0
  8. package/docs/maps.md +2 -2
  9. package/docs/teaching.md +1 -1
  10. package/lib/addons/characters.js +5469 -4932
  11. package/lib/browser/tinyfly.iife.js +14 -14
  12. package/lib/browser/tinyfly.js +6742 -6205
  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/hands/draw-cartoon-hand.d.ts +4 -0
  20. package/lib/types/characters/head/face.d.ts +6 -4
  21. package/lib/types/characters/head/facial-hair.d.ts +2 -0
  22. package/lib/types/characters/head/glasses.d.ts +2 -0
  23. package/lib/types/characters/head/head-look.d.ts +4 -2
  24. package/lib/types/characters/head/head-shape.d.ts +4 -0
  25. package/lib/types/characters/index.d.ts +5 -0
  26. package/lib/types/characters/look/pen.d.ts +1 -0
  27. package/lib/types/characters/look/skin-shading.d.ts +4 -0
  28. package/lib/types/characters/rig/skeleton.d.ts +2 -0
  29. package/lib/types/characters/soft-cartoon-cast.d.ts +166 -0
  30. package/lib/types/characters/wardrobe/basic-outfit.d.ts +5 -1
  31. package/lib/types/characters/wardrobe/leaf-outfit.d.ts +18 -0
  32. package/lib/types/characters/wardrobe/outfit-preset.d.ts +6 -0
  33. package/llms-full.txt +199 -9
  34. package/llms.txt +29 -29
  35. package/package.json +1 -1
  36. package/skills/tinyfly/SKILL.md +30 -0
package/README.md CHANGED
@@ -54,6 +54,7 @@ A lightweight, API-driven animation engine and visual editor for creating high-p
54
54
  - **Code-drawn targets** - A `custom` canvas target draws with code (characters, charts, props) while the timeline animates its position, opacity and its own `props`, so drawing stays code and timing stays JSON
55
55
  - **Immediate mode too** - A scene's `background` and `draw(ctx, { time })` functions paint each frame directly, Cairo/Processing-style, and mix freely with timeline targets
56
56
  - **Timing from narration** - `planNarration()` lays spoken lines out from their clip lengths (lead, gap, tail) into cues, scene spans and markers; `voiceNarration()` measures recorded clips with ffmpeg and writes the sample-aligned narration WAV
57
+ - **Soft cartoon story characters** - Opt-in `figure: 'organic'` adds filled shoulders, chest/waist/hip contours, supple limbs, small posed hands and deterministic cel shading on the existing rig. JSON body profiles keep anatomy independent of outline width; one skin colour covers body, face and hands under scene lighting and fog, and cel shading respects inherited opacity. Foreground arms stay over waist garments in 2D and globally sorted 3D scenes, with only foreground arms promoted to garment depths so leaning head, neck, torso and legs retain world-object occlusion. Transparent organic skin keeps exposed body, head and both hand variants outline-only in every look. Editor Skin and Line controls resolve and edit imported body colour overrides. Leaf garment options are validated and copied at construction. Actor names are checked at runtime, and each head contour is reused for filling, shading and face clipping within a draw. Editable adult and child `softCartoonCharacter` presets, flowing hair, editable everyday/formal/casual/leaf clothing and the existing script, reach and lip-sync APIs support original stories. Try [**Soft Cartoon Characters**](https://tinyfly.app/examples/live-organic-characters): adults, children or an adult and child, with seven actions, face/hair controls and independent outfit editing. `outfitPreset()` supplies JSON wardrobe defaults; shirts, T-shirts, blouses, dresses, trousers, jeans, cargo, shorts, skirts, sleeves, collars, ties and colours remain editable. See [the appearance guide](docs/character-appearance.md).
57
58
  - **Characters** - A poseable stick figure (`@algorisys/tinyfly/characters`): named poses, facial expressions (brows, eyes that widen, close and look around, mouth shapes), squash and stretch, rubber-hose limbs, blending, walk cycles and talking, all driven by timeline tracks. **Characters v2**: one skeleton in 3D drawn flat, turning front to side to back, resting on whatever touches the ground, reaching for points, in clean, pencil or silhouette looks, and a 🧍 Character element in the editor you pose and keyframe. **Character appearance**: 41 hairstyles, including soft sweeps, flowing bobs and cascading waves with scalp-attached curved locks and individual flexibility, 20 facial-hair styles, glasses, hats and ears as plain data on the head (they turn with it through all eight views), builds from toddler to tall, a recurring cast (`castMember`), 30 expressions with blush, tears and sweat, and hair that swings after a turn or a run and settles (`hairFollowTracks` keys the lag from the character's own tracks, so drawing stays stateless); four-legged animals' ears lay back on a run the way their tails already trail. Clothes are data too (`outfit.over`: an apron, a lab coat, a hoodie, a cardigan, overalls, a sari; boots), a mouth opens on teeth and a tongue, feet come in shapes, two people hug and help each other up (`embrace`, `helpUp`), and a cane in the hand or a wheelchair to ride are accessories any character can have, not part of an age ([guide](docs/character-appearance.md))
58
59
  - **Dance and flips** - The stick figure dances disco, hip hop, breaking toprock, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap (foot strikes as data, for tap sounds) and popping (side glide, moonwalk, forward glide, which travel with the planted foot staying put), and does front, back, layout, scissor and side flips, cartwheels, back handsprings, split leaps, toe touches and full splits. Wrists, ankles, foot turn-out, whole-body `spin` and `rise` are pose fields; moves are keyed in beats, so any tempo plays them; styles, grooves and routines are plain JSON (`danceFrame()`, `danceTracks()`, `flipPose()`, `flipTracks()`). In the editor a 🧍 Character dances from the playhead, in time with the music: an Audio element's tempo is detected (`detectTempo()`) or tapped, the timeline shows its beats and bars, and keyframes snap to them. Native v2 garba (two/three clap) and dandiya add body-local poses, circle formations with planted toes, paired stick-tip contacts, and timed full spins (`humanDanceFrame`, `danceCircleTracks`, `meetDandiya`, `characterScript3D`). Sparse custom keys keep numeric hand and pose values through JSON playback; rolled circles preserve native yaw-before-roll and foot grounding. Foot IK preserves authored hip turn-out for ankle and toe plants. Scripted dance entry preserves relaxed or explicitly posed hands through preceding holds. Script action boundaries retain preceding easing; festive examples solve contacts with their rendered body options. See [docs/dance.md](docs/dance.md)
59
60
  - **Maps** - Animated maps on OpenStreetMap tiles or an offline world outline (also in pencil): the camera flies in, pins drop, routes draw themselves while a marker travels them; a 🗺 Map element in the editor with a one-click trip
@@ -274,7 +275,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
274
275
  itself.
275
276
 
276
277
  ```html
277
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js"></script>
278
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly.iife.js"></script>
278
279
  <script>
279
280
  tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
280
281
 
@@ -310,7 +311,7 @@ A teaching figure needs no code at all:
310
311
  <script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
311
312
  <figcaption>Appending to a full slice</figcaption>
312
313
  </figure>
313
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
314
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
314
315
  ```
315
316
 
316
317
  See [Teaching Animations](docs/teaching.md).
@@ -409,7 +410,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
409
410
  <div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
410
411
  </div>
411
412
 
412
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-player.iife.js"></script>
413
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-player.iife.js"></script>
413
414
  <script>
414
415
  tinyfly.play('#animation', './animation.json', { loop: -1 })
415
416
  </script>
@@ -518,7 +519,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
518
519
  <svg viewBox="0 0 720 200">…</svg>
519
520
  <script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
520
521
  </figure>
521
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
522
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
522
523
  ```
523
524
 
524
525
  ### Audio / Video Sync
@@ -762,7 +763,7 @@ npm run build
762
763
  ```
763
764
 
764
765
  The private repository's `.no-mistakes.yaml` selects the Codex reviewer and
765
- uses `npm run test:run -- --maxWorkers 2` for tests and
766
+ builds the add-on bundles before `npm run test:run -- --maxWorkers 2` for tests and
766
767
  `npx tsc -p tsconfig.app.json --noEmit` for its lint/type check.
767
768
  It is excluded from the OSS mirror; the project needs no runtime configuration
768
769
  for this validation.
@@ -808,20 +809,24 @@ load.
808
809
 
809
810
  ### Test Coverage
810
811
 
811
- `npm test` runs 2,197 unit tests in 127 files, all passing:
812
+ `npm test` runs 3,610 unit tests in 234 files, all passing. The Organic
813
+ Characters browser suite checks 74 desktop/mobile scenarios per browser.
812
814
 
813
815
  | Area | Tests |
814
816
  |---|---|
815
- | Engine (`src/engine`: timeline, easing, paths, text, exports, serialization) | 521 |
816
- | Editor (`src/editor`: stores, utils, presets, AI, samples) | 409 |
817
- | GSAP-style API (`src/compat/gsap`) | 332 |
818
- | Examples page, GSAP-style demos and showcases (`src/examples`) | 302 |
819
- | Render adapters (`src/adapters`) | 134 |
817
+ | Engine (`src/engine`: timeline, easing, paths, text, exports, serialization) | 601 |
818
+ | Editor (`src/editor`: stores, utils, presets, AI, samples) | 600 |
819
+ | GSAP-style API (`src/compat/gsap`) | 335 |
820
+ | Examples page, GSAP-style demos and showcases (`src/examples`) | 436 |
821
+ | Render adapters (`src/adapters`) | 197 |
822
+ | Characters, maps and 3D scenes (`src/characters`, `src/maps`, `src/scene-3d`) | 865 |
820
823
  | Interactive course (`src/learn`) | 211 |
821
824
  | Drivers and interaction (`src/drivers`, `src/interaction`) | 136 |
822
825
  | Player, media sync, sequencer, teaching and scenarios (`src/player`) | 103 |
823
- | Docs viewer and `llms.txt` (`src/docs`) | 16 |
826
+ | Docs viewer and `llms.txt` (`src/docs`) | 18 |
824
827
  | Embeds, teaching kit, framework hooks, landing (`src/embed`, `src/teach`, `src/frameworks`, `src/landing`) | 33 |
828
+ | Headless rendering and audio (`src/headless`) | 63 |
829
+ | Entry boundaries | 2 |
825
830
 
826
831
  ## Contributing
827
832
 
@@ -35,6 +35,147 @@ drawCharacter(ctx, maya, humanPose({ ...HUMAN_EXPRESSIONS.embarrassed, turn: 0.5
35
35
  A plain figure (no `hair`, `facialHair`, `glasses`, `hat` or `ears`) draws
36
36
  exactly as it did before these options existed.
37
37
 
38
+ ## Organic cartoon bodies
39
+
40
+ Use `figure: 'organic'` for original, softly drawn story characters. The
41
+ existing human skeleton controls poses, reaching, ground contact and part
42
+ order. Filled contours supply shoulders, chest, waist, hips and shaped
43
+ limbs; dimensions are independent of the outline width.
44
+
45
+ ```js
46
+ import { character, softCartoonCharacter, characterScript, hairFollowTracks } from '@algorisys/tinyfly/characters'
47
+
48
+ const actor = character({
49
+ figure: 'organic', height: 320, skin: '#efbd96',
50
+ body: {
51
+ arm: [{ at: 0, width: 0.028 }, { at: 0.5, width: 0.018 },
52
+ { at: 0.7, width: 0.023 }, { at: 1, width: 0.012 }],
53
+ outline: { color: '#53372d', width: 1.5 },
54
+ shading: { mode: 'cel', light: [-0.8, -0.6], opacity: 0.17 },
55
+ },
56
+ face: { style: 'anime', shape: 'angular', jawRoundness: 1 },
57
+ hair: { style: 'flowingBob', color: '#38291f' },
58
+ outfit: { shirt: '#72958b', trousers: '#495a67' },
59
+ })
60
+ const friend = softCartoonCharacter('youngWoman', { height: 300 })
61
+ const story = characterScript('actor', actor, [
62
+ { do: 'walk', to: 240, for: 2200 },
63
+ { do: 'say', say: 'Let us explore!', for: 1800, mood: 'happy' },
64
+ ], { from: 60 })
65
+ story.tracks.push(...hairFollowTracks('actor', story.tracks, actor))
66
+ ```
67
+
68
+ `softCartoonCharacter` accepts only `youngMan`, `youngWoman`, `childBoy`
69
+ and `childGirl`; unknown actor names throw an error, including inherited
70
+ object keys such as `constructor`.
71
+
72
+ `body.torso`, `arm`, `leg` and `neck` are arrays of `{ at, width }`.
73
+ `at` increases from 0 to 1; `width` is a half-width fraction of character
74
+ height. Torso positions run hip to neck, arms shoulder to wrist, and legs
75
+ hip to ankle. Cubic centerlines pass through native elbow/knee joints with
76
+ interpolated width profiles. Options are copied at construction and can
77
+ travel as JSON. `body.depth` (0.2–1, default 0.55) sets torso side thickness.
78
+ `body.fill` overrides `skin` for all exposed body, face and palms; omit it
79
+ to keep one `skin` colour control. The editor's Skin and Line controls show
80
+ the resolved fill and outline colour; editing them also updates any existing
81
+ `body.fill` or `body.outline.color` override without changing other body options.
82
+
83
+ Default organic hands are small natural five-finger hands (`handSize: 0.073`).
84
+ Existing `hand.left.*` / `hand.right.*` tracks control palms, fists, pointing,
85
+ bends and wrist rolls. Foreground organic arms and hands draw together after
86
+ the torso and lower garments; rear arms remain behind them. Attached borders at shoulders, hips, wrists and ankles are hidden
87
+ where connected contours meet. This ordering also survives the 3D scene's
88
+ global depth sort, while separate world objects can still occlude the figure.
89
+ `characterPartsInView()` retains each part's physical `depth` and supplies
90
+ an organic `sortDepth` for painter ordering. Only foreground arms are promoted
91
+ to the nearest torso/leg garment depth; head, neck, torso, legs and rear arms
92
+ keep their physical depths. Scene integrations sort by `sortDepth ?? depth`, retaining array
93
+ order for ties. Fluid and stick parts retain their existing depth ordering.
94
+
95
+ Organic faces default to `face.projection: 'volume'`: feature centres follow
96
+ the head's 3D axes, both eyes stay readable in three-quarter views, the far
97
+ eye narrows toward profile, and opaque hair covers
98
+ eyes and brows. Features stay clipped inside the head through turns and nods.
99
+ The facial plane is flatter than the rounded rear cranium in profile.
100
+ With `face.nose: true`, a small nose projects from above the mouth and shapes
101
+ the turned silhouette without extending the chin.
102
+ `projection: 'cartoon'` retains the classic face slide used by fluid/stick.
103
+
104
+ Cel shading is clipped to moving skin in the clean look. `body.shading`
105
+ accepts `mode: 'cel' | 'none'`, screen-space `light: [x, y]`, `shadow`,
106
+ `opacity` and `highlight`. Seeking and headless rendering are deterministic.
107
+ Pencil and silhouette use their existing pens. Artist-authored painted
108
+ meshes remain a separate future capability.
109
+
110
+ Set `body.fill: 'none'` (or `skin: 'none'` without a body fill override) for
111
+ outline-only exposed body, head and hands in every look. Dot and articulated
112
+ hands omit skin fills and shading; clothing retains its own material.
113
+
114
+ Everyday shirts, sleeves, trousers, shorts and skirts follow organic anatomy.
115
+ `leafOutfit: { top: true, color: '#638c39', accent: '#87ae4e', length: 0.32 }`
116
+ selects attached leaf garments with curved shapes and veins; `top: false`
117
+ leaves the upper body uncovered. It requires organic mode.
118
+ `leafOutfitContours(joints, options)` exposes plain coverage geometry for
119
+ custom layers and exporters. Both wardrobes use native part depths.
120
+
121
+ `softCartoonCharacter('childBoy')` and `softCartoonCharacter('childGirl')`
122
+ provide original child presets with a larger head/body ratio, shorter arms
123
+ and legs, rounded torsos and smaller default heights (230 and 225 px).
124
+ All face, hair, clothes, skin and proportions remain editable; changing
125
+ `height` preserves the child anatomy. The same pose, script, hand, reaching
126
+ and lip-sync APIs work for adults and children.
127
+
128
+ The example at `/examples/live-organic-characters` includes adult, child and
129
+ adult/child pairs, face/hair
130
+ choices, independently editable everyday/formal/casual/leaf garments, seven actions, outline and skin controls,
131
+ shading, playback and scrubbing. Available in v0.108.0. See the
132
+ [contact sheet](model-sheet/organic-characters.png) and
133
+ [child character sheet](model-sheet/child-characters.png).
134
+ Close-up [head turns](model-sheet/organic-head-turns.png) exercise independent
135
+ `head.turn` at the story's body orientation.
136
+ `fluid` and `stick` keep their existing defaults and ink-based dimensions.
137
+
138
+ ## Everyday, Formal and Casual clothing
139
+
140
+ `outfitPreset(category, overrides)` returns fresh plain JSON options for
141
+ `character({ outfit })` or `softCartoonCharacter(name, { outfit })`.
142
+ The categories are `everyday`, `formal` and `casual`. Every garment works
143
+ with adult and child actors, regardless of gender.
144
+
145
+ ```js
146
+ import { softCartoonCharacter, outfitPreset } from '@algorisys/tinyfly/characters'
147
+
148
+ const formal = softCartoonCharacter('youngMan', {
149
+ outfit: outfitPreset('formal', { shirt: '#ece6db', trousers: '#354456', tie: '#7b3955' }),
150
+ })
151
+ const casual = softCartoonCharacter('youngWoman', {
152
+ outfit: outfitPreset('casual', { top: 'tshirt', bottom: 'shorts', trouserStyle: 'cargo' }),
153
+ })
154
+ const dress = softCartoonCharacter('childGirl', {
155
+ outfit: outfitPreset('formal', { top: 'dress', shirt: '#aa6b91', sleeves: 'none' }),
156
+ })
157
+ ```
158
+
159
+ - `top`: `tshirt`, `shirt` (button placket), `blouse` (V neckline) or `dress`.
160
+ Omit it to retain the original plain T-shirt. Shirts default to a collar;
161
+ an explicit `collar: false` removes it.
162
+ - `bottom`: `trousers`, `shorts` or `skirt`; `trouserStyle`: `plain`, `jeans`
163
+ (pockets and stitching) or `cargo` (thigh pockets). Details follow the
164
+ limbs and stay clipped inside the fabric.
165
+ - `shirt` and `trousers` remain top and bottom colours. A dress uses
166
+ `shirt` for both its bodice and skirt, overriding `bottom` and ignoring
167
+ the separate bottom colour. `sleeves` accepts `short`, `long` or `none`.
168
+ - `collar` is a boolean; `tie` is a colour or `null` to remove it. Changing a
169
+ formal preset to a different top removes its default collar and tie;
170
+ explicit accessory overrides take precedence.
171
+
172
+ The example's **Edit outfit** choice edits both characters or either actor
173
+ separately. Formal starts with a shirt/tie or blouse/skirt; Casual starts
174
+ with a T-shirt/jeans. All cuts remain selectable for either character.
175
+ The editor exposes the same presets and garment choices, saved with scene
176
+ JSON. [Clothing sheet](model-sheet/clothing-options.png), reproduced by
177
+ `examples/headless-video/clothing-options.mjs`.
178
+
38
179
  ## How it turns
39
180
 
40
181
  Hair, beards and hats are not flat drawings pasted on the face. Each is a
@@ -287,6 +428,13 @@ body part before it draws. Set the canvas clipping path in this hook; it is
287
428
  restored before the part's `over` layers and the next part. The built-in outfit
288
429
  uses this to hide thighs under tops. `joints.parts[id].order` is the resolved
289
430
  far-to-near drawing index; use it when a garment spans several parts.
431
+ Camera-projected joints also provide `bodyForward: [x,y,z]` in view space:
432
+ `z` is front visibility and `x` is the side offset for front details. This
433
+ axis follows the body and camera independently of head yaw. `joints.turn`
434
+ retains the authored body turn; flat drawing omits `bodyForward`, so use
435
+ `cos(turn * Math.PI / 2)` and `sin(turn * Math.PI / 2)` there.
436
+ The built-in wardrobe uses this direction for front buttons, necklines,
437
+ pockets, collars, ties and outer-garment details.
290
438
 
291
439
  ## The cast
292
440
 
@@ -1143,7 +1143,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
1143
1143
  **Steps to embed:**
1144
1144
  1. Build the player: `npm run build:player`
1145
1145
  2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
1146
- `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-player.iife.js`
1146
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-player.iife.js`
1147
1147
  instead; see [Deployment](DEPLOYMENT.md))
1148
1148
  3. Copy the generated code into your HTML
1149
1149
  4. Adjust the script `src` path if needed
package/docs/examples.md CHANGED
@@ -743,7 +743,7 @@ For simple website embedding without a build system.
743
743
  </html>
744
744
  ```
745
745
 
746
- 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.107.1/cdn/tinyfly-player.iife.js`.
746
+ 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`.
747
747
 
748
748
  ---
749
749
 
@@ -185,7 +185,7 @@ with a GSAP-style call (durations are in seconds here):
185
185
  ```html
186
186
  <div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
187
187
 
188
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js"></script>
188
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly.iife.js"></script>
189
189
  <script>
190
190
  tinyfly.to('.box', { x: 200, duration: 1 })
191
191
  </script>
@@ -74,7 +74,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
74
74
  global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
75
75
 
76
76
  ```html
77
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js"></script>
77
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly.iife.js"></script>
78
78
  <script>
79
79
  tinyfly.to('.box', { x: 200, duration: 1 })
80
80
  </script>
package/docs/llm-guide.md CHANGED
@@ -88,6 +88,38 @@ bakes. See `docs/dance.md`.
88
88
 
89
89
  ## Characters with a look
90
90
 
91
+ For original soft cartoon story characters, opt into `figure: 'organic'`.
92
+ Its default `face.projection: 'volume'` moves eyes/mouth around the head and
93
+ lets hair occlude them, with a flatter profile facial plane and a nose above
94
+ the mouth; classic `cartoon` projection remains available. Foreground organic
95
+ arms/hands draw together over lower garments, preserving the wrist at the waist.
96
+ `body` owns JSON half-width profiles (`torso`, `arm`, `leg`, `neck`): increasing
97
+ arrays of `{ at: 0..1, width: fractionOfHeight }` spanning 0 to 1. Set `skin`
98
+ once for exposed body, head and hands; `body.fill` overrides it.
99
+ Use `body.fill: 'none'` for outline-only exposed skin, including both hand
100
+ variants in every look. In 3D, only foreground arms use garment depths for
101
+ painter ordering; other organic parts retain physical world-object occlusion.
102
+ `body.outline: { color, width }` is independent of anatomy. Optional
103
+ `body.shading: { mode: 'cel' | 'none', light: [x,y], shadow, opacity, highlight }`
104
+ is deterministic and clipped to skin. Defaults include small natural hands.
105
+ `softCartoonCharacter('youngMan' | 'youngWoman' | 'childBoy' | 'childGirl', options)`
106
+ provides editable original actors; `SOFT_CARTOON_CAST` contains their source
107
+ options. Children default to shorter heights, larger head proportions, shorter
108
+ limbs and rounded torsos. Override `height` to change size while preserving
109
+ their anatomy. Use `outfitPreset('everyday' | 'formal' | 'casual', overrides)`
110
+ for owned JSON wardrobe defaults. `outfit.top` is `tshirt | shirt | blouse |
111
+ dress`; `trouserStyle` is `plain | jeans | cargo`; `shirt` and `trousers`
112
+ remain colour fields. Bottoms are `trousers | shorts | skirt`; sleeves,
113
+ collar and tie colour are editable. Dresses force a skirt in the top colour.
114
+ All garments are available for every actor. `outfit` adapts to organic contours; organic-only `leafOutfit` accepts
115
+ `{ top?, color?, accent?, length? }`. Use the existing `characterScript`,
116
+ `characterPoseTracks`, `reachCharacter`, hand pose and `hairFollowTracks`
117
+ APIs for motion. Avoid a foreground whole-body overlay. An unrigged PNG
118
+ is not a posable character. The interactive example is
119
+ `/examples/live-organic-characters`; a headless study is
120
+ `examples/headless-video/organic-characters.mjs`. Child proportions and poses
121
+ are shown in `examples/headless-video/child-characters.mjs`.
122
+
91
123
  A v2 character's appearance is plain options to `character()`, never drawing
92
124
  code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
93
125
  `{ style, color, length, … }`), `facialHair`, `glasses`, `hat`, `ears: true`,
@@ -96,6 +128,9 @@ code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
96
128
  'cardigan' | 'overalls' | 'sari' | 'apron' | 'labCoat', shoes: 'boots' }`.
97
129
  Built-in tops hide thighs and trouser roots under their hem during turns;
98
130
  garments spanning both legs use the resolved body order in camera views too.
131
+ Custom camera-view garment details should use `joints.bodyForward` (view-space
132
+ body axis: `z` front visibility, `x` side offset), independent of head yaw.
133
+ `joints.turn` remains authored; flat joints omit `bodyForward`.
99
134
  For custom clothes, `layers.parts[id].clip` clips only the bare body before
100
135
  `over` draws, and `joints.parts[id].order` gives the drawing index.
101
136
  `castMember('grandpa', 300)` gives a whole ready-made character to start
package/docs/maps.md CHANGED
@@ -14,8 +14,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
14
14
  adds to the same `tinyfly` global:
15
15
 
16
16
  ```html
17
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js"></script>
18
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-maps.iife.js"></script>
17
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly.iife.js"></script>
18
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-maps.iife.js"></script>
19
19
  ```
20
20
 
21
21
  It is a separate script because the offline world map it carries adds about
package/docs/teaching.md CHANGED
@@ -25,7 +25,7 @@ path for all of that:
25
25
  </figure>
26
26
 
27
27
  <!-- once, anywhere on the page (a site-wide footer is fine) -->
28
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
28
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.108.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
29
29
  ```
30
30
 
31
31
  Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post