@algorisys/tinyfly 0.105.0 → 0.106.1
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 +11 -4
- package/docs/character-appearance.md +11 -0
- package/docs/editor-guide.md +1 -1
- package/docs/examples.md +10 -1
- package/docs/getting-started.md +1 -1
- package/docs/gsap-compat.md +1 -1
- package/docs/llm-guide.md +12 -0
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +3292 -3274
- package/lib/browser/tinyfly.iife.js +12 -12
- package/lib/browser/tinyfly.js +3983 -3965
- package/lib/browser/tinyfly.umd.js +12 -12
- package/lib/types/characters/character.d.ts +3 -0
- package/lib/types/characters/rig/skeleton.d.ts +2 -0
- package/llms-full.txt +40 -8
- package/llms.txt +29 -29
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +11 -2
package/README.md
CHANGED
|
@@ -154,6 +154,13 @@ and pointed hair tufts. Use `MANGA_CAST` or `castMember('mangaYoungMan', 300)`;
|
|
|
154
154
|
change hair, face proportions and clothes independently. The original
|
|
155
155
|
stick figure also supports `style.armLength` (default `1`).
|
|
156
156
|
|
|
157
|
+
Clothed characters keep their upper legs behind shirt hems through turns and
|
|
158
|
+
moving poses; shared garments follow the same order in 2D and camera views.
|
|
159
|
+
|
|
160
|
+
Every catalog example has an **Open full page** action. It opens a shareable
|
|
161
|
+
`/examples/<id>/full` URL in a new tab, with the animation and its controls
|
|
162
|
+
filling the page. [Open the manga example full page](https://tinyfly.app/examples/live-manga-cast/full).
|
|
163
|
+
|
|
157
164
|
## Documentation
|
|
158
165
|
|
|
159
166
|
- [Getting Started](docs/getting-started.md) — Installation, setup, and your first animation
|
|
@@ -254,7 +261,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
|
|
|
254
261
|
itself.
|
|
255
262
|
|
|
256
263
|
```html
|
|
257
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
264
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly.iife.js"></script>
|
|
258
265
|
<script>
|
|
259
266
|
tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
|
|
260
267
|
|
|
@@ -290,7 +297,7 @@ A teaching figure needs no code at all:
|
|
|
290
297
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
|
|
291
298
|
<figcaption>Appending to a full slice</figcaption>
|
|
292
299
|
</figure>
|
|
293
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
300
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
|
|
294
301
|
```
|
|
295
302
|
|
|
296
303
|
See [Teaching Animations](docs/teaching.md).
|
|
@@ -389,7 +396,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
|
|
|
389
396
|
<div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
|
|
390
397
|
</div>
|
|
391
398
|
|
|
392
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
399
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly-player.iife.js"></script>
|
|
393
400
|
<script>
|
|
394
401
|
tinyfly.play('#animation', './animation.json', { loop: -1 })
|
|
395
402
|
</script>
|
|
@@ -498,7 +505,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
|
|
|
498
505
|
<svg viewBox="0 0 720 200">…</svg>
|
|
499
506
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
|
|
500
507
|
</figure>
|
|
501
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
508
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
502
509
|
```
|
|
503
510
|
|
|
504
511
|
### Audio / Video Sync
|
|
@@ -243,6 +243,17 @@ The front details (collar, tie, apron, the coat's opening) show from the
|
|
|
243
243
|
front and turn away with the body; from behind an apron shows its ties.
|
|
244
244
|
`basicOutfit(options)` gives the same clothes as layers.
|
|
245
245
|
|
|
246
|
+
Tops keep the upper thighs and trouser roots behind their hem through turns
|
|
247
|
+
and moving poses. The waist makes room for wider hips. Skirts, sari drapes,
|
|
248
|
+
aprons and coat skirts follow the body's resolved drawing order, including
|
|
249
|
+
camera views and rendering the character part by part.
|
|
250
|
+
|
|
251
|
+
Custom `layers.parts[id].clip(ctx, joints, pen, time, pose)` can clip the bare
|
|
252
|
+
body part before it draws. Set the canvas clipping path in this hook; it is
|
|
253
|
+
restored before the part's `over` layers and the next part. The built-in outfit
|
|
254
|
+
uses this to hide thighs under tops. `joints.parts[id].order` is the resolved
|
|
255
|
+
far-to-near drawing index; use it when a garment spans several parts.
|
|
256
|
+
|
|
246
257
|
## The cast
|
|
247
258
|
|
|
248
259
|
`castMember(name, height, changes?)` returns character options for a recurring
|
package/docs/editor-guide.md
CHANGED
|
@@ -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.
|
|
1146
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/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
|
@@ -2,6 +2,15 @@
|
|
|
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
|
+
|
|
5
14
|
## Young Adult Manga Cast
|
|
6
15
|
|
|
7
16
|
[Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast) shows
|
|
@@ -734,7 +743,7 @@ For simple website embedding without a build system.
|
|
|
734
743
|
</html>
|
|
735
744
|
```
|
|
736
745
|
|
|
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.
|
|
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.1/cdn/tinyfly-player.iife.js`.
|
|
738
747
|
|
|
739
748
|
---
|
|
740
749
|
|
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.106.1/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.106.1/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
|
@@ -94,6 +94,10 @@ code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
|
|
|
94
94
|
`face: { teeth, tongue }` (shown when the mouth opens), `feet` (`round`,
|
|
95
95
|
`flat`, `pointed`, `big`) and `outfit: { shirt, trousers, over: 'hoodie' |
|
|
96
96
|
'cardigan' | 'overalls' | 'sari' | 'apron' | 'labCoat', shoes: 'boots' }`.
|
|
97
|
+
Built-in tops hide thighs and trouser roots under their hem during turns;
|
|
98
|
+
garments spanning both legs use the resolved body order in camera views too.
|
|
99
|
+
For custom clothes, `layers.parts[id].clip` clips only the bare body before
|
|
100
|
+
`over` draws, and `joints.parts[id].order` gives the drawing index.
|
|
97
101
|
`castMember('grandpa', 300)` gives a whole ready-made character to start
|
|
98
102
|
from. The eight presets in `ANIME_CAST` (`animeBoy`, `animeGirl`,
|
|
99
103
|
`animeYoungMan`, `animeYoungWoman`, `animeMan`, `animeWoman`,
|
|
@@ -274,3 +278,11 @@ The solid mesh head and contact bounds retain their existing geometry.
|
|
|
274
278
|
For the original stick figure use `style.armLength` (positive finite, default 1)
|
|
275
279
|
in `drawStickFigure`, `stickFigureJoints` or `stickFigureTarget`; it changes
|
|
276
280
|
both arm segments, with hands and the rest of the body keeping their sizes.
|
|
281
|
+
|
|
282
|
+
### Full-page example previews
|
|
283
|
+
|
|
284
|
+
Catalog cards offer **Open full page** at `/examples/<id>/full`: a shareable
|
|
285
|
+
new-tab player using the same standalone HTML as Copy code. Live demos,
|
|
286
|
+
timeline examples and editable sample scenes play with their own controls
|
|
287
|
+
and scrolling, without the gallery panels. Use these URLs when sharing an
|
|
288
|
+
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.
|
|
18
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/cdn/tinyfly.iife.js"></script>
|
|
18
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.1/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.106.1/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
|