@algorisys/tinyfly 0.104.0 → 0.106.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
@@ -148,6 +148,16 @@ Coloured irises, highlights, lids and age creases use the same expressions,
148
148
  head turns and motion APIs. Choose a preset in the editor's Cast picker or
149
149
  use `character(castMember('animeYoungWoman', 300))` in code.
150
150
 
151
+ The [Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast)
152
+ adds four original presets with angular jaws, tapered chins, narrower eyes
153
+ and pointed hair tufts. Use `MANGA_CAST` or `castMember('mangaYoungMan', 300)`;
154
+ change hair, face proportions and clothes independently. The original
155
+ stick figure also supports `style.armLength` (default `1`).
156
+
157
+ Every catalog example has an **Open full page** action. It opens a shareable
158
+ `/examples/<id>/full` URL in a new tab, with the animation and its controls
159
+ filling the page. [Open the manga example full page](https://tinyfly.app/examples/live-manga-cast/full).
160
+
151
161
  ## Documentation
152
162
 
153
163
  - [Getting Started](docs/getting-started.md) — Installation, setup, and your first animation
@@ -248,7 +258,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
248
258
  itself.
249
259
 
250
260
  ```html
251
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.104.0/cdn/tinyfly.iife.js"></script>
261
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly.iife.js"></script>
252
262
  <script>
253
263
  tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
254
264
 
@@ -284,7 +294,7 @@ A teaching figure needs no code at all:
284
294
  <script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
285
295
  <figcaption>Appending to a full slice</figcaption>
286
296
  </figure>
287
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.104.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
297
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
288
298
  ```
289
299
 
290
300
  See [Teaching Animations](docs/teaching.md).
@@ -383,7 +393,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
383
393
  <div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
384
394
  </div>
385
395
 
386
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.104.0/cdn/tinyfly-player.iife.js"></script>
396
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly-player.iife.js"></script>
387
397
  <script>
388
398
  tinyfly.play('#animation', './animation.json', { loop: -1 })
389
399
  </script>
@@ -492,7 +502,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
492
502
  <svg viewBox="0 0 720 200">…</svg>
493
503
  <script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
494
504
  </figure>
495
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.104.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
505
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
496
506
  ```
497
507
 
498
508
  ### Audio / Video Sync
@@ -4,6 +4,7 @@ Complete reference for the tinyfly animation engine, player, and adapters.
4
4
 
5
5
  ## Table of Contents
6
6
 
7
+ - [Character Cast and Proportions](#character-cast-and-proportions)
7
8
  - [Core Types](#core-types)
8
9
  - [Timeline](#timeline)
9
10
  - [Track](#track)
@@ -2414,3 +2415,21 @@ another is running takes over each element from where it appears.
2414
2415
  `tinyfly`) re-exports the engine, player, drivers, interaction, `tf`, `live`,
2415
2416
  `Stage` and `quickPlay`, with `to`, `from`, `fromTo`, `set`, `timeline`,
2416
2417
  `ticker` and `splitText` at the top level bound to `live`.
2418
+
2419
+ ## Character Cast and Proportions
2420
+
2421
+ Import these APIs from `@algorisys/tinyfly/characters` (or the browser bundle's
2422
+ `tinyfly` global).
2423
+
2424
+ | API | Purpose |
2425
+ |---|---|
2426
+ | `ANIME_CAST`, `MANGA_CAST`, `CHARACTER_CAST` | Editable character option presets and their labels, groups and height scales |
2427
+ | `castMember(name, height, changes)` | Resolve a preset, scaled to the adult height, with optional option overrides |
2428
+ | `character(options)` | Create the native human rig with editable face, hair, build and clothing |
2429
+ | `FaceOptions` | Simple/anime style, iris, lashes, age creases; round/angular shape, jaw/chin widths, eye scale/aspect, nose and mouth extras |
2430
+ | `HairSpec`, `HairSpike` | Editable hair fields and pointed tufts that follow the head's turn |
2431
+ | `StickStyle.armLength` | Positive finite multiplier of both original stick-figure arm bones, default 1; used by draw, target and joints APIs |
2432
+
2433
+ See [Character Appearance](character-appearance.md#young-adult-manga-cast)
2434
+ for parameter ranges, examples and JSON semantics. `AnimeCastName` and
2435
+ `MangaCastName` type the preset names.
@@ -250,7 +250,7 @@ cast member at an adult `height` (each stands at their own scale of it). The
250
250
  family: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`,
251
251
  `grandma`; at work (from the occupations sheet): `doctor`, `cook`, `builder`,
252
252
  `courier`, `teacher`, `farmer`. `CHARACTER_CAST` has each one's `label`,
253
- `group` (`family`, `work` or `anime`), `scale` and `options`.
253
+ `group` (`family`, `work`, `anime` or `manga`), `scale` and `options`.
254
254
 
255
255
  ```js
256
256
  const family = ['man', 'woman', 'girl', 'grandma'].map((name) => character(castMember(name, 280)))
@@ -293,6 +293,70 @@ face close-ups and a complete turnaround. Both the Character and 3D Scene
293
293
  editors offer these presets in their Cast picker. The Character editor also
294
294
  has Face style, Iris colour, Eyelashes and Age creases controls, saved in project JSON.
295
295
 
296
+ ### Young adult manga cast
297
+
298
+ `MANGA_CAST` supplies four original archetypes: `mangaYoungMan`,
299
+ `mangaYoungWoman`, `mangaRival`, and `mangaHeroine`. They also belong to
300
+ `CHARACTER_CAST` and use the shared expression, pose, dance and turnaround APIs.
301
+ These presets use lighter line widths, angular jaws and smaller, narrower eyes.
302
+ Hair, skin, clothing and every face option remain editable.
303
+
304
+ ```js
305
+ const preset = MANGA_CAST.mangaYoungMan.options
306
+ const hero = character(castMember('mangaYoungMan', 300, {
307
+ hair: { style: 'bob', color: '#446688' },
308
+ face: { ...preset.face, jawWidth: 0.8, chinWidth: 0.12, iris: '#987546' }
309
+ }))
310
+ ```
311
+
312
+ `face.shape: 'angular'` changes the pen character's head outline into a
313
+ projected 3D tapered head, following yaw, nod and roll. `jawWidth` is the
314
+ half-width at the jaw (clamped to 0.55–0.95 head radii, default 0.74);
315
+ `chinWidth` is the half-width just above the chin (0.03–0.35, default 0.14).
316
+ `shape: 'round'` is the original default. The underlying rig and contact
317
+ geometry retain their original head bounds; solid mesh characters retain
318
+ their existing mesh head.
319
+
320
+ Anime `eyeScale` changes eye size (0.5–1.2, default 1), and `eyeAspect`
321
+ changes eye height relative to width (0.45–1.2, default 1). Smaller aspect
322
+ values produce narrower manga eyes; expressions, blink, lids and gaze still
323
+ animate them. These face options are independent of the hairstyle.
324
+
325
+ `mangaSpikes` and `mangaSweep` are editable hair presets with pointed 3D
326
+ tufts. A `hair.spikes` array contains `{ around, up, length, width }`:
327
+ `around` is degrees from the front, `up` the scalp height from -1 to 1,
328
+ and `length` and `width` are tuft length and base radius in head radii.
329
+ Use `spikes: []` to remove the tufts, or choose any other hairstyle.
330
+ The editor retains custom hair fields in saved JSON; picking a different
331
+ hairstyle clears the preceding preset's hair overrides.
332
+
333
+ The [Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast)
334
+ example lets you change hair, jaw, chin and eye height while expressions and
335
+ turnarounds animate. The Character editor offers matching face controls,
336
+ nose and line width; both editor Cast pickers include these presets.
337
+
338
+ ### Original stick-figure arm proportions
339
+
340
+ The original stick-figure API now accepts `StickStyle.armLength`: a positive
341
+ finite multiplier, default 1, of both upper-arm and forearm lengths.
342
+ Hands keep their size; torso, shoulder positions, legs and head stay unchanged.
343
+ It composes with squash/stretch, mirroring, wrist bends and rubber limbs.
344
+ This is an appearance option, rather than a pose track.
345
+
346
+ ```js
347
+ const person = stickFigureTarget({
348
+ x: 200, y: 400,
349
+ style: { height: 300, armLength: 0.85 }
350
+ })
351
+ const joints = stickFigureJoints(POSES.wave, { height: 300, armLength: 1.2 })
352
+ drawStickFigure(ctx, POSES.wave, { height: 300, armLength: 1.2 })
353
+ ```
354
+
355
+ `stickFigureAt` and costume/prop drawing hooks see the adjusted wrists.
356
+ The [Stick Figure example](https://tinyfly.app/examples/live-stick-figure)
357
+ includes an arm-length slider. The newer human rig keeps its existing
358
+ `CharacterOptions.armLength` setting.
359
+
296
360
  ## Hugs, help-ups and everyday cycles
297
361
 
298
362
  Two people, more than hands: `embrace(a, b)` is a hug. Both turn toward each
@@ -172,7 +172,10 @@ its box; resize the box to change its height. In the property panel:
172
172
  **Iris colour** and **Eyelashes** toggle; **Age creases** adds subtle facial
173
173
  lines. The Cast picker includes eight colour anime presets for boys, girls,
174
174
  young adults, adults and older adults. The 3D Scene character's Cast picker
175
- uses the same presets.
175
+ uses the same presets. The manga presets add angular faces and pointed hair;
176
+ **Face shape**, **Jaw width**, **Chin width**, **Eye size** and **Eye height**
177
+ edit those features. **Nose** and **Line width** control the remaining details.
178
+ Picking another hairstyle keeps the face and clears custom hair overrides.
176
179
 
177
180
  To animate a character, pick a view, a pose and a face, and click
178
181
  **◆ Keyframe pose at playhead**. Move the playhead, pick the next pose, and
@@ -1140,7 +1143,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
1140
1143
  **Steps to embed:**
1141
1144
  1. Build the player: `npm run build:player`
1142
1145
  2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
1143
- `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.104.0/cdn/tinyfly-player.iife.js`
1146
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly-player.iife.js`
1144
1147
  instead; see [Deployment](DEPLOYMENT.md))
1145
1148
  3. Copy the generated code into your HTML
1146
1149
  4. Adjust the script `src` path if needed
package/docs/examples.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  Practical examples for common animation patterns using the tinyfly API.
4
4
 
5
+ ## Open examples full page
6
+
7
+ Click **Open full page** on any live, timeline or editable example card,
8
+ including its individual example page. It opens a separate tab at the
9
+ shareable URL `/examples/<id>/full`. The example plays immediately, with
10
+ its own controls and scrolling in a full viewport; gallery panels and code
11
+ sections remain in the original tab. **Copy code** exports the same standalone
12
+ HTML. [Try the manga example](https://tinyfly.app/examples/live-manga-cast/full).
13
+
14
+ ## Young Adult Manga Cast
15
+
16
+ [Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast) shows
17
+ four original presets with angular jaws, tapered chins, narrower eyes and
18
+ pointed hair. Change hair, face shape, jaw/chin widths, eye height and expression,
19
+ view the whole body or close-up, and enable a complete turnaround. The controls
20
+ use the public `MANGA_CAST`, `castMember` and face/hair options; Copy as page
21
+ exports the same working example. The original Stick Figure example also
22
+ has an arm-length slider.
23
+
5
24
  ## Colour Anime Cast
6
25
 
7
26
  Open [Colour Anime Cast](https://tinyfly.app/examples/live-anime-cast) to inspect
@@ -724,7 +743,7 @@ For simple website embedding without a build system.
724
743
  </html>
725
744
  ```
726
745
 
727
- 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.104.0/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.106.0/cdn/tinyfly-player.iife.js`.
728
747
 
729
748
  ---
730
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.104.0/cdn/tinyfly.iife.js"></script>
188
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.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.104.0/cdn/tinyfly.iife.js"></script>
77
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.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
@@ -261,3 +261,24 @@ When writing tinyfly animations, follow node_modules/@algorisys/tinyfly/skills/t
261
261
 
262
262
  **A chat window**: paste the output of `npx @algorisys/tinyfly capabilities`,
263
263
  or link `llms-full.txt`.
264
+
265
+ ### Manga faces and original stick-figure proportions
266
+
267
+ `MANGA_CAST` supplies four original young adult presets through `castMember`.
268
+ `face.shape: 'angular'`, `jawWidth` and `chinWidth` shape the projected pen head;
269
+ `eyeScale` and `eyeAspect` shape anime eyes. Hair and outfit overrides remain
270
+ independent; spread the preset's face when changing one nested field.
271
+ `mangaSpikes` / `mangaSweep` contain editable `hair.spikes` tufts as JSON
272
+ (`around` degrees, `up` scalp height, `length` and `width` head radii).
273
+ The solid mesh head and contact bounds retain their existing geometry.
274
+ For the original stick figure use `style.armLength` (positive finite, default 1)
275
+ in `drawStickFigure`, `stickFigureJoints` or `stickFigureTarget`; it changes
276
+ both arm segments, with hands and the rest of the body keeping their sizes.
277
+
278
+ ### Full-page example previews
279
+
280
+ Catalog cards offer **Open full page** at `/examples/<id>/full`: a shareable
281
+ new-tab player using the same standalone HTML as Copy code. Live demos,
282
+ timeline examples and editable sample scenes play with their own controls
283
+ and scrolling, without the gallery panels. Use these URLs when sharing an
284
+ example for visual review.
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.104.0/cdn/tinyfly.iife.js"></script>
18
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.104.0/cdn/tinyfly-maps.iife.js"></script>
17
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly.iife.js"></script>
18
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.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.104.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
28
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.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