@algorisys/tinyfly 0.104.0 → 0.105.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 +10 -4
- package/docs/api-reference.md +19 -0
- package/docs/character-appearance.md +65 -1
- package/docs/editor-guide.md +5 -2
- package/docs/examples.md +11 -1
- package/docs/getting-started.md +1 -1
- package/docs/gsap-compat.md +1 -1
- package/docs/llm-guide.md +13 -0
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +3055 -2907
- package/lib/browser/tinyfly.iife.js +13 -13
- package/lib/browser/tinyfly.js +4347 -4199
- package/lib/browser/tinyfly.umd.js +13 -13
- package/lib/types/characters/capabilities.d.ts +1 -0
- package/lib/types/characters/cast.d.ts +326 -2
- package/lib/types/characters/head/face.d.ts +10 -0
- package/lib/types/characters/head/hair.d.ts +45 -0
- package/lib/types/characters/head/head-shape.d.ts +7 -0
- package/lib/types/characters/head/index.d.ts +1 -1
- package/lib/types/characters/index.d.ts +1 -1
- package/lib/types/characters/stick-figure.d.ts +2 -0
- package/llms-full.txt +124 -12
- package/llms.txt +29 -29
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +7 -0
package/README.md
CHANGED
|
@@ -148,6 +148,12 @@ 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
|
+
|
|
151
157
|
## Documentation
|
|
152
158
|
|
|
153
159
|
- [Getting Started](docs/getting-started.md) — Installation, setup, and your first animation
|
|
@@ -248,7 +254,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
|
|
|
248
254
|
itself.
|
|
249
255
|
|
|
250
256
|
```html
|
|
251
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
257
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly.iife.js"></script>
|
|
252
258
|
<script>
|
|
253
259
|
tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
|
|
254
260
|
|
|
@@ -284,7 +290,7 @@ A teaching figure needs no code at all:
|
|
|
284
290
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
|
|
285
291
|
<figcaption>Appending to a full slice</figcaption>
|
|
286
292
|
</figure>
|
|
287
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
293
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
|
|
288
294
|
```
|
|
289
295
|
|
|
290
296
|
See [Teaching Animations](docs/teaching.md).
|
|
@@ -383,7 +389,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
|
|
|
383
389
|
<div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
|
|
384
390
|
</div>
|
|
385
391
|
|
|
386
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
392
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly-player.iife.js"></script>
|
|
387
393
|
<script>
|
|
388
394
|
tinyfly.play('#animation', './animation.json', { loop: -1 })
|
|
389
395
|
</script>
|
|
@@ -492,7 +498,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
|
|
|
492
498
|
<svg viewBox="0 0 720 200">…</svg>
|
|
493
499
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
|
|
494
500
|
</figure>
|
|
495
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
501
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
496
502
|
```
|
|
497
503
|
|
|
498
504
|
### Audio / Video Sync
|
package/docs/api-reference.md
CHANGED
|
@@ -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 `
|
|
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
|
package/docs/editor-guide.md
CHANGED
|
@@ -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.
|
|
1146
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.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,16 @@
|
|
|
2
2
|
|
|
3
3
|
Practical examples for common animation patterns using the tinyfly API.
|
|
4
4
|
|
|
5
|
+
## Young Adult Manga Cast
|
|
6
|
+
|
|
7
|
+
[Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast) shows
|
|
8
|
+
four original presets with angular jaws, tapered chins, narrower eyes and
|
|
9
|
+
pointed hair. Change hair, face shape, jaw/chin widths, eye height and expression,
|
|
10
|
+
view the whole body or close-up, and enable a complete turnaround. The controls
|
|
11
|
+
use the public `MANGA_CAST`, `castMember` and face/hair options; Copy as page
|
|
12
|
+
exports the same working example. The original Stick Figure example also
|
|
13
|
+
has an arm-length slider.
|
|
14
|
+
|
|
5
15
|
## Colour Anime Cast
|
|
6
16
|
|
|
7
17
|
Open [Colour Anime Cast](https://tinyfly.app/examples/live-anime-cast) to inspect
|
|
@@ -724,7 +734,7 @@ For simple website embedding without a build system.
|
|
|
724
734
|
</html>
|
|
725
735
|
```
|
|
726
736
|
|
|
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.
|
|
737
|
+
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.105.0/cdn/tinyfly-player.iife.js`.
|
|
728
738
|
|
|
729
739
|
---
|
|
730
740
|
|
package/docs/getting-started.md
CHANGED
|
@@ -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.
|
|
188
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly.iife.js"></script>
|
|
189
189
|
<script>
|
|
190
190
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
191
191
|
</script>
|
package/docs/gsap-compat.md
CHANGED
|
@@ -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.
|
|
77
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.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,16 @@ 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.
|
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.
|
|
18
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly.iife.js"></script>
|
|
18
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.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.
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.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
|