@algorisys/tinyfly 0.127.0 → 0.128.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.
package/README.md CHANGED
@@ -157,8 +157,8 @@ use `character(castMember('animeYoungWoman', 300))` in code.
157
157
 
158
158
  **Bean figures**: `figure: 'bean'` draws the white outlined stick-figure style natively:
159
159
  smooth outlined noodle limbs with no seams at the elbows, knees, shoulders, neck or hips (or
160
- bare line limbs with `bean: { limbs: 'line' }`), a shaped body, big oval eyes (`face.style: 'oval'`),
161
- mittens and cartoon shoes, plus detective gear (`coat`, `fedora`, aviator `shades`), on the same rig, so every pose, gait, dance and expression works.
160
+ bare line limbs with `bean: { limbs: 'line' }`), a shaped body, big oval eyes (`face.style: 'oval'`, sized with `eyeScale`/`eyeAspect`),
161
+ mittens and cartoon shoes, a `tie`, plus detective gear (`coat`, `fedora`, aviator `shades`), on the same rig, so every pose, gait, dance and expression works.
162
162
  Try `character(castMember('beanMan', 400))` or the other `BEAN_CAST` presets; see
163
163
  [the appearance guide](docs/character-appearance.md#bean-figures-white-outlined-stick-figures).
164
164
  Household clothes dress them too: a `skirt` (a sari, or a kurta's hem with `length`) that
@@ -179,7 +179,8 @@ saturated gradient skies, parallax dust and bokeh, flat-shaded shapes (`drawShad
179
179
  burned-in short captions two words at a time (`drawShortCaption`) and label chips; and sound effects made
180
180
  from numbers in `tinyfly/headless` (`soundWhoosh`, `soundPop`, `soundThud`, `soundShimmer`, `soundTick`,
181
181
  `soundClick`, `soundPad`) that `renderMix` takes as samples. See
182
- [Cosmic Explainer Scenes](docs/cosmic-explainer.md) and `examples/headless-video/cosmic-explainer.mjs`.
182
+ [Cosmic Explainer Scenes](docs/cosmic-explainer.md), the
183
+ [Cosmic Dive](https://tinyfly.app/examples/live-cosmic-dive) example and `examples/headless-video/cosmic-explainer.mjs`.
183
184
 
184
185
  The [Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast)
185
186
  adds four original presets with angular jaws, tapered chins, narrower eyes
@@ -310,7 +311,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
310
311
  itself.
311
312
 
312
313
  ```html
313
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.0/cdn/tinyfly.iife.js"></script>
314
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.0/cdn/tinyfly.iife.js"></script>
314
315
  <script>
315
316
  tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
316
317
 
@@ -347,7 +348,7 @@ A teaching figure needs no code at all:
347
348
  <script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
348
349
  <figcaption>Appending to a full slice</figcaption>
349
350
  </figure>
350
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
351
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
351
352
  ```
352
353
 
353
354
  See [Teaching Animations](docs/teaching.md).
@@ -446,7 +447,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
446
447
  <div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
447
448
  </div>
448
449
 
449
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.0/cdn/tinyfly-player.iife.js"></script>
450
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.0/cdn/tinyfly-player.iife.js"></script>
450
451
  <script>
451
452
  tinyfly.play('#animation', './animation.json', { loop: -1 })
452
453
  </script>
@@ -555,7 +556,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
555
556
  <svg viewBox="0 0 720 200">…</svg>
556
557
  <script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
557
558
  </figure>
558
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
559
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
559
560
  ```
560
561
 
561
562
  ### Audio / Video Sync
@@ -567,7 +567,7 @@ const stick = character(castMember('beanStick', 400)) // bare line limbs
567
567
  skirt over both), the neck, the body (with its drape, and coat), the near
568
568
  arm and the head (and fedora). A limb reaching toward the viewer
569
569
  (hands on the knees, seated thighs) draws over the body.
570
- - `bean: { limbs, torso, limbWidth, lineWidth, outlineWidth, fill, shirt, sleeves, trousers, shoes }`:
570
+ - `bean: { limbs, torso, limbWidth, lineWidth, outlineWidth, fill, shirt, sleeves, trousers, shoes, tie }`:
571
571
  `limbs: 'tube'` (default, outlined noodles) or `'line'` (bare round-capped
572
572
  ink lines for the arms, legs and neck; the body, eyes, mittens and shoes
573
573
  stay; `halo: '#f5f5f4'` adds a pale edge so they read on a dark set); the
@@ -575,9 +575,14 @@ const stick = character(castMember('beanStick', 400)) // bare line limbs
575
575
  (1; 1.3 chubby, 0.85 thin); widths as fractions of the height (0.024 tube,
576
576
  0.017 line, 0.0105 outline; `lineWidth` on the character also sets the
577
577
  outline); `fill` (white); a `shirt` colour with `sleeves: 'short' | 'long' | 'none'`;
578
- `trousers`; `shoes` (the fill; a dark shoe gets a shine and a dark sole).
579
- An `outfit`'s `shirt`, `trousers` and `sleeves` colour the bean too (its
578
+ `trousers`; `shoes` (the fill; a dark shoe gets a shine and a dark sole);
579
+ `tie` (a necktie down the chest: a knot at the collar and a pointed blade,
580
+ sliding toward the side the body turns to and hidden from behind; under a coat).
581
+ An `outfit`'s `shirt`, `trousers`, `sleeves` and `tie` colour the bean too (its
580
582
  layers are not used).
583
+ - Bigger comedy eyes: `face: { eyeScale: 1.2, eyeAspect: 0.8 }` makes the oval
584
+ eyes larger and rounder (scale 0.5–1.2, aspect 0.45–1.2); they move apart as
585
+ they grow, so they still nearly touch, and glasses grow round them.
581
586
  - Detective gear: `coat` (a trench coat in that colour: lapels, a belt and
582
587
  buckle, double-breasted buttons, a hem at the knee and sleeves to the
583
588
  wrist), `fedora` (a brim, a pinched crown and a band) and `shades: true`
@@ -38,7 +38,9 @@ function frame(ctx, time) {
38
38
  ```
39
39
 
40
40
  `examples/headless-video/cosmic-explainer.mjs` is a whole 9:16 short built
41
- this way, with its sound mix made entirely from the generators.
41
+ this way, with its sound mix made entirely from the generators, and the
42
+ [Cosmic Dive](https://tinyfly.app/examples/live-cosmic-dive) example plays the
43
+ same dive at 16:9 in the browser (pause and scrub it).
42
44
 
43
45
  ## Skies and depth
44
46
 
@@ -82,6 +84,8 @@ not drawn.
82
84
  | `levelPresence(depth, level)` | 0..1: how fully a level fills the screen, to show or fade its label. |
83
85
  | `drawPortalRim(ctx, x, y, radius, color?, width?)` | The glowing ring on its own (a lens edge, an inset). |
84
86
 
87
+ A level covers the frame once its portal reaches half the frame's diagonal: `portalRadius × factor^(depth − k) ≥ √(w² + h²) / 2`. With the defaults (520 px, ×14) that is depth `k + 0.28` on a 1920×1080 frame; a smaller `portalRadius` needs a deeper key before the level behind stops showing at the corners.
88
+
85
89
  Time the depth keys to the narration: put each level's arrival on the word
86
90
  that names it. For an endless, self-similar zoom (the same frame inside
87
91
  itself forever) use `nestedZoom` from `tinyfly/adapters` instead.
@@ -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.127.0/cdn/tinyfly-player.iife.js`
1146
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.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
@@ -754,7 +754,7 @@ For simple website embedding without a build system.
754
754
  </html>
755
755
  ```
756
756
 
757
- 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.127.0/cdn/tinyfly-player.iife.js`.
757
+ 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.128.0/cdn/tinyfly-player.iife.js`.
758
758
 
759
759
  ---
760
760
 
@@ -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.127.0/cdn/tinyfly.iife.js"></script>
188
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.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.127.0/cdn/tinyfly.iife.js"></script>
77
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.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
@@ -220,8 +220,9 @@ not a `look` value. It uses the same expressions, blink, gaze and turn fields.
220
220
  White outlined stick figures are `figure: 'bean'` (presets `beanMan`, `beanWoman`,
221
221
  `beanKid`, `beanBoss`, `beanDetective`, `beanStick` in `BEAN_CAST`): seamless outlined noodle limbs or bare
222
222
  lines (`bean: { limbs: 'tube' | 'line' }`), a shaped body (`bean.torso` fullness), big oval eyes
223
- (`face.style: 'oval'`, usable on any figure), `hands: 'mitten'` and cartoon shoes; colours from
224
- `bean: { shirt, sleeves, trousers, shoes }` or an `outfit`; detective gear `bean: { coat, fedora, shades: true }`
223
+ (`face.style: 'oval'`, usable on any figure; `face: { eyeScale: 1.2, eyeAspect: 0.8 }` makes them bigger
224
+ and rounder), `hands: 'mitten'` and cartoon shoes; colours from
225
+ `bean: { shirt, sleeves, trousers, shoes, tie }` or an `outfit` (its tie too); detective gear `bean: { coat, fedora, shades: true }`
225
226
  (aviators replace the eyes, brows still show); `halo` gives line limbs a pale edge. A bean is always drawn clean.
226
227
  Household clothes on a bean: `bean: { skirt: '#c2410c' }` (a sari to the ankle) or
227
228
  `skirt: { color, length: 0.45 }` (a kurta hem; pair it with `trousers`), `drape` (a pallu or dupatta sash)
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.127.0/cdn/tinyfly.iife.js"></script>
18
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.0/cdn/tinyfly-maps.iife.js"></script>
17
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.0/cdn/tinyfly.iife.js"></script>
18
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.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/math.md CHANGED
@@ -258,7 +258,7 @@ lesson's step options (`duration`, `easing`, `delay`).
258
258
  <figcaption>The determinant is the area of the unit square after the map.</figcaption>
259
259
  </figure>
260
260
 
261
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.0/cdn/tinyfly-math.iife.js" data-tinyfly-auto></script>
261
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.0/cdn/tinyfly-math.iife.js" data-tinyfly-auto></script>
262
262
  ```
263
263
 
264
264
  The figure draws itself into an SVG and redraws from the timeline whenever the
package/docs/props.md CHANGED
@@ -246,6 +246,8 @@ scenery and where the props stand) and `buildScene` builds it into targets:
246
246
  of the afternoon against the city: houses, a car, a tree), `office` (a room
247
247
  with a desk, a chair and a door) and `home` (a room at night with a bed, a
248
248
  chair and a door). The Park Day card plays a day over the park.
249
+ `buildScene(name, { width, height, ink: '#111', lineWidth: 5 })` outlines
250
+ every prop in that ink and width, so the set matches heavily inked characters.
249
251
 
250
252
  ## In 3D scenes
251
253
 
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.127.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
28
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.128.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