@algorisys/tinyfly 0.103.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 +16 -4
- package/docs/api-reference.md +19 -0
- package/docs/character-appearance.md +102 -1
- package/docs/editor-guide.md +9 -1
- package/docs/examples.md +20 -1
- package/docs/getting-started.md +1 -1
- package/docs/gsap-compat.md +1 -1
- package/docs/llm-guide.md +20 -1
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +3456 -3107
- package/lib/browser/tinyfly.iife.js +13 -13
- package/lib/browser/tinyfly.js +4989 -4640
- package/lib/browser/tinyfly.umd.js +13 -13
- package/lib/types/characters/capabilities.d.ts +3 -0
- package/lib/types/characters/cast.d.ts +860 -2
- package/lib/types/characters/head/face.d.ts +18 -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 +2 -1
- package/lib/types/characters/stick-figure.d.ts +2 -0
- package/llms-full.txt +182 -12
- package/llms.txt +29 -29
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +14 -1
|
@@ -23,6 +23,24 @@ export interface PupilCircle {
|
|
|
23
23
|
}
|
|
24
24
|
/** What an open mouth shows: a row of upper teeth, and a tongue (default neither, as the plain face); a nose; what is in the pupils. */
|
|
25
25
|
export interface FaceOptions {
|
|
26
|
+
/** `simple` (default) or colour anime eyes with irises, highlights and expressive lids. Uses the same pose fields. */
|
|
27
|
+
style?: 'simple' | 'anime';
|
|
28
|
+
/** Anime iris colour (default blue); plain data, including in scene JSON. */
|
|
29
|
+
iris?: string;
|
|
30
|
+
/** Head outline: round (default) or angular cheeks, jaw and chin. */
|
|
31
|
+
shape?: 'round' | 'angular';
|
|
32
|
+
/** Angular jaw half-width in head radii, 0.55..0.95 (default 0.74). */
|
|
33
|
+
jawWidth?: number;
|
|
34
|
+
/** Angular chin half-width in head radii, 0.03..0.35 (default 0.14). */
|
|
35
|
+
chinWidth?: number;
|
|
36
|
+
/** Anime eye size, 0.5..1.2 (default 1). */
|
|
37
|
+
eyeScale?: number;
|
|
38
|
+
/** Anime eye height relative to width, 0.45..1.2 (default 1). */
|
|
39
|
+
eyeAspect?: number;
|
|
40
|
+
/** Anime outer lashes (default true). */
|
|
41
|
+
lashes?: boolean;
|
|
42
|
+
/** Subtle eye and smile creases, 0..1 (default 0); independent of expression and posture. */
|
|
43
|
+
ageLines?: number;
|
|
26
44
|
teeth?: boolean;
|
|
27
45
|
tongue?: boolean;
|
|
28
46
|
/** A small nose between the eyes and the mouth (default none) */
|
|
@@ -41,6 +41,16 @@ export declare function hairHangs(hair: Hair): boolean;
|
|
|
41
41
|
export type HairTexture = 'smooth' | 'spiky' | 'curly' | 'wavy' | 'locs';
|
|
42
42
|
/** Detail lines drawn on the hair: none, a parting, strands swept from a parting, combed back, hanging strands, a few thin strands */
|
|
43
43
|
export type HairStrands = 'none' | 'part' | 'sweep' | 'combed' | 'hanging' | 'thin';
|
|
44
|
+
/** A pointed 3D tuft anchored on the scalp. All dimensions are head radii. */
|
|
45
|
+
export interface HairSpike {
|
|
46
|
+
/** Degrees around the head from the face. */
|
|
47
|
+
around: number;
|
|
48
|
+
/** Height on the scalp, -1..1. */
|
|
49
|
+
up: number;
|
|
50
|
+
/** Length beyond the scalp and base radius. */
|
|
51
|
+
length: number;
|
|
52
|
+
width: number;
|
|
53
|
+
}
|
|
44
54
|
export interface HairTie {
|
|
45
55
|
kind: 'ponytail' | 'bun' | 'braid';
|
|
46
56
|
/** Where it is tied: on top, high at the back, low at the back, or over one ear (the character's left or right) */
|
|
@@ -83,6 +93,8 @@ export interface Hair {
|
|
|
83
93
|
/** `solid` filled hair; `stipple` close-cropped hair drawn as dots on the scalp */
|
|
84
94
|
fill: 'solid' | 'stipple';
|
|
85
95
|
ties: HairTie[];
|
|
96
|
+
/** Optional pointed tufts; their silhouette follows every head turn. */
|
|
97
|
+
spikes?: HairSpike[];
|
|
86
98
|
/** Hair falls over the ears, so the ears are hidden */
|
|
87
99
|
coversEars: boolean;
|
|
88
100
|
}
|
|
@@ -186,6 +198,39 @@ export declare const HAIR_STYLES: {
|
|
|
186
198
|
back: number;
|
|
187
199
|
};
|
|
188
200
|
};
|
|
201
|
+
mangaSpikes: {
|
|
202
|
+
volume: number;
|
|
203
|
+
texture: "spiky";
|
|
204
|
+
textureAmount: number;
|
|
205
|
+
hairline: {
|
|
206
|
+
front: number;
|
|
207
|
+
side: number;
|
|
208
|
+
back: number;
|
|
209
|
+
};
|
|
210
|
+
spikes: {
|
|
211
|
+
around: number;
|
|
212
|
+
up: number;
|
|
213
|
+
length: number;
|
|
214
|
+
width: number;
|
|
215
|
+
}[];
|
|
216
|
+
};
|
|
217
|
+
mangaSweep: {
|
|
218
|
+
volume: number;
|
|
219
|
+
texture: "spiky";
|
|
220
|
+
textureAmount: number;
|
|
221
|
+
sweep: number;
|
|
222
|
+
hairline: {
|
|
223
|
+
front: number;
|
|
224
|
+
side: number;
|
|
225
|
+
back: number;
|
|
226
|
+
};
|
|
227
|
+
spikes: {
|
|
228
|
+
around: number;
|
|
229
|
+
up: number;
|
|
230
|
+
length: number;
|
|
231
|
+
width: number;
|
|
232
|
+
}[];
|
|
233
|
+
};
|
|
189
234
|
undercut: {
|
|
190
235
|
volume: number;
|
|
191
236
|
quiff: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Point } from '../../adapters/canvas/sketch';
|
|
2
|
+
import { type SolvedHead } from '../rig/skeleton';
|
|
3
|
+
import type { FaceOptions } from './face';
|
|
4
|
+
/** Project a tapered 3D head, then take its silhouette: the jaw follows turn, nod and roll. */
|
|
5
|
+
export declare function angularHeadOutline(head: SolvedHead, face: FaceOptions): Point[];
|
|
6
|
+
/** Monotone chain. Dropping interior points preserves sharp jaw corners at any view. */
|
|
7
|
+
export declare function convexHull(points: Point[]): Point[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { HAIR_STYLES, HAIR_COLORS, HAIR_STILL, resolveHair, hairlineAt, hairHangs, hairMotionOf, type Hair, type HairMotion, type HairSpec, type HairStyleName, type HairTexture, type HairStrands, type HairTie } from './hair';
|
|
1
|
+
export { HAIR_STYLES, HAIR_COLORS, HAIR_STILL, resolveHair, hairlineAt, hairHangs, hairMotionOf, type Hair, type HairMotion, type HairSpec, type HairStyleName, type HairTexture, type HairStrands, type HairTie, type HairSpike } from './hair';
|
|
2
2
|
export { FACIAL_HAIR_STYLES, resolveFacialHair, type FacialHair, type FacialHairSpec, type FacialHairStyleName, type MoustacheStyle, type BeardStyle } from './facial-hair';
|
|
3
3
|
export { GLASSES_STYLES, resolveGlasses, type Glasses, type GlassesSpec, type GlassesStyle } from './glasses';
|
|
4
4
|
export { HAT_STYLES, resolveHat, type Hat, type HatSpec, type HatStyle } from './hats';
|
|
@@ -28,7 +28,8 @@ export * from '../adapters/canvas/polyline';
|
|
|
28
28
|
export * from './hand';
|
|
29
29
|
export * from './character';
|
|
30
30
|
export { humanPlan, humanPose, mirrorHumanPose, humanFieldLabel, HUMAN_REST, HUMAN_POSES, HUMAN_EXPRESSIONS, HUMAN_BUILDS, FOOT_SHAPES, type FootShape, type HumanBuild, type HumanBuildName, type HumanPoseName, type HumanExpressionName } from './species/human';
|
|
31
|
-
export { CHARACTER_CAST, castMember, type CastMember, type CastName } from './cast';
|
|
31
|
+
export { CHARACTER_CAST, ANIME_CAST, MANGA_CAST, castMember, type CastMember, type CastName, type AnimeCastName, type MangaCastName } from './cast';
|
|
32
|
+
export type { FaceOptions, PupilCircle } from './head/face';
|
|
32
33
|
export { meetHands, meetingSpacing, HAND_MEETINGS, embrace, embraceSpacing, EMBRACE, helpUp, helpUpSpacing, HELP_UP, type HandMeeting, type HandsMeet, type MeetingPartner, type MeetHandsOptions, type Embrace, type EmbraceOptions, type HelpUp, type HelpUpOptions } from './interactions';
|
|
33
34
|
export * from './species/human-motion';
|
|
34
35
|
export type { BodyPlan, ChainSpec, BoneSpec, BoneAngles, ContactSpec, HeadSpec, Pose as CharacterPose, Vec3 } from './rig/body-plan';
|
|
@@ -190,6 +190,8 @@ export interface StickStyle {
|
|
|
190
190
|
* takes its room from the torso: the feet and hips stay where they are.
|
|
191
191
|
*/
|
|
192
192
|
headSize?: number;
|
|
193
|
+
/** Both upper arms and forearms, as a multiplier of the usual length (default 1). Hands keep their size. */
|
|
194
|
+
armLength?: number;
|
|
193
195
|
/** Head fill; `none` leaves it see-through (default white) */
|
|
194
196
|
headFill?: string;
|
|
195
197
|
/** 1 faces right, -1 faces left: mirrors the figure and turns the eyes */
|
package/llms-full.txt
CHANGED
|
@@ -204,7 +204,7 @@ with a GSAP-style call (durations are in seconds here):
|
|
|
204
204
|
```html
|
|
205
205
|
<div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
|
|
206
206
|
|
|
207
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
207
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly.iife.js"></script>
|
|
208
208
|
<script>
|
|
209
209
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
210
210
|
</script>
|
|
@@ -412,7 +412,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
|
|
|
412
412
|
global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
|
|
413
413
|
|
|
414
414
|
```html
|
|
415
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
415
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly.iife.js"></script>
|
|
416
416
|
<script>
|
|
417
417
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
418
418
|
</script>
|
|
@@ -1586,6 +1586,25 @@ quickPlay({
|
|
|
1586
1586
|
|
|
1587
1587
|
Practical examples for common animation patterns using the tinyfly API.
|
|
1588
1588
|
|
|
1589
|
+
## Young Adult Manga Cast
|
|
1590
|
+
|
|
1591
|
+
[Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast) shows
|
|
1592
|
+
four original presets with angular jaws, tapered chins, narrower eyes and
|
|
1593
|
+
pointed hair. Change hair, face shape, jaw/chin widths, eye height and expression,
|
|
1594
|
+
view the whole body or close-up, and enable a complete turnaround. The controls
|
|
1595
|
+
use the public `MANGA_CAST`, `castMember` and face/hair options; Copy as page
|
|
1596
|
+
exports the same working example. The original Stick Figure example also
|
|
1597
|
+
has an arm-length slider.
|
|
1598
|
+
|
|
1599
|
+
## Colour Anime Cast
|
|
1600
|
+
|
|
1601
|
+
Open [Colour Anime Cast](https://tinyfly.app/examples/live-anime-cast) to inspect
|
|
1602
|
+
eight male and female characters across children, young adults, adults and
|
|
1603
|
+
older adults. Switch expressions, cycle moods, show face close-ups or enable
|
|
1604
|
+
a full turnaround. `ANIME_CAST` and `castMember` supply editable JSON options;
|
|
1605
|
+
`face.style: 'anime'` uses the same blink, gaze, brow and mouth fields as the
|
|
1606
|
+
original face. See [Character Appearance](character-appearance.md#colour-anime-cast).
|
|
1607
|
+
|
|
1589
1608
|
## Festive Garba and Dandiya
|
|
1590
1609
|
|
|
1591
1610
|
The [Navratri example](https://tinyfly.app/examples/live-festive-dandiya)
|
|
@@ -2299,7 +2318,7 @@ For simple website embedding without a build system.
|
|
|
2299
2318
|
</html>
|
|
2300
2319
|
```
|
|
2301
2320
|
|
|
2302
|
-
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.
|
|
2321
|
+
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`.
|
|
2303
2322
|
|
|
2304
2323
|
---
|
|
2305
2324
|
|
|
@@ -2378,6 +2397,7 @@ Complete reference for the tinyfly animation engine, player, and adapters.
|
|
|
2378
2397
|
|
|
2379
2398
|
## Table of Contents
|
|
2380
2399
|
|
|
2400
|
+
- [Character Cast and Proportions](#character-cast-and-proportions)
|
|
2381
2401
|
- [Core Types](#core-types)
|
|
2382
2402
|
- [Timeline](#timeline)
|
|
2383
2403
|
- [Track](#track)
|
|
@@ -4789,6 +4809,24 @@ another is running takes over each element from where it appears.
|
|
|
4789
4809
|
`Stage` and `quickPlay`, with `to`, `from`, `fromTo`, `set`, `timeline`,
|
|
4790
4810
|
`ticker` and `splitText` at the top level bound to `live`.
|
|
4791
4811
|
|
|
4812
|
+
## Character Cast and Proportions
|
|
4813
|
+
|
|
4814
|
+
Import these APIs from `@algorisys/tinyfly/characters` (or the browser bundle's
|
|
4815
|
+
`tinyfly` global).
|
|
4816
|
+
|
|
4817
|
+
| API | Purpose |
|
|
4818
|
+
|---|---|
|
|
4819
|
+
| `ANIME_CAST`, `MANGA_CAST`, `CHARACTER_CAST` | Editable character option presets and their labels, groups and height scales |
|
|
4820
|
+
| `castMember(name, height, changes)` | Resolve a preset, scaled to the adult height, with optional option overrides |
|
|
4821
|
+
| `character(options)` | Create the native human rig with editable face, hair, build and clothing |
|
|
4822
|
+
| `FaceOptions` | Simple/anime style, iris, lashes, age creases; round/angular shape, jaw/chin widths, eye scale/aspect, nose and mouth extras |
|
|
4823
|
+
| `HairSpec`, `HairSpike` | Editable hair fields and pointed tufts that follow the head's turn |
|
|
4824
|
+
| `StickStyle.armLength` | Positive finite multiplier of both original stick-figure arm bones, default 1; used by draw, target and joints APIs |
|
|
4825
|
+
|
|
4826
|
+
See [Character Appearance](character-appearance.md#young-adult-manga-cast)
|
|
4827
|
+
for parameter ranges, examples and JSON semantics. `AnimeCastName` and
|
|
4828
|
+
`MangaCastName` type the preset names.
|
|
4829
|
+
|
|
4792
4830
|
---
|
|
4793
4831
|
|
|
4794
4832
|
<!-- docs/file-format.md -->
|
|
@@ -5658,6 +5696,14 @@ its box; resize the box to change its height. In the property panel:
|
|
|
5658
5696
|
Poses that rest on a knee, the hands or the back are set down on the ground.
|
|
5659
5697
|
- **Face**: an expression (happy, sad, surprised, angry, embarrassed with a
|
|
5660
5698
|
blush, crying with tears, afraid with a bead of sweat…), or the pose's own.
|
|
5699
|
+
**Face style** switches between Simple and Colour anime. Anime faces have an
|
|
5700
|
+
**Iris colour** and **Eyelashes** toggle; **Age creases** adds subtle facial
|
|
5701
|
+
lines. The Cast picker includes eight colour anime presets for boys, girls,
|
|
5702
|
+
young adults, adults and older adults. The 3D Scene character's Cast picker
|
|
5703
|
+
uses the same presets. The manga presets add angular faces and pointed hair;
|
|
5704
|
+
**Face shape**, **Jaw width**, **Chin width**, **Eye size** and **Eye height**
|
|
5705
|
+
edit those features. **Nose** and **Line width** control the remaining details.
|
|
5706
|
+
Picking another hairstyle keeps the face and clears custom hair overrides.
|
|
5661
5707
|
|
|
5662
5708
|
To animate a character, pick a view, a pose and a face, and click
|
|
5663
5709
|
**◆ Keyframe pose at playhead**. Move the playhead, pick the next pose, and
|
|
@@ -6625,7 +6671,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
|
|
|
6625
6671
|
**Steps to embed:**
|
|
6626
6672
|
1. Build the player: `npm run build:player`
|
|
6627
6673
|
2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
|
|
6628
|
-
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
6674
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly-player.iife.js`
|
|
6629
6675
|
instead; see [Deployment](DEPLOYMENT.md))
|
|
6630
6676
|
3. Copy the generated code into your HTML
|
|
6631
6677
|
4. Adjust the script `src` path if needed
|
|
@@ -7873,7 +7919,13 @@ code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
|
|
|
7873
7919
|
`flat`, `pointed`, `big`) and `outfit: { shirt, trousers, over: 'hoodie' |
|
|
7874
7920
|
'cardigan' | 'overalls' | 'sari' | 'apron' | 'labCoat', shoes: 'boots' }`.
|
|
7875
7921
|
`castMember('grandpa', 300)` gives a whole ready-made character to start
|
|
7876
|
-
from.
|
|
7922
|
+
from. The eight presets in `ANIME_CAST` (`animeBoy`, `animeGirl`,
|
|
7923
|
+
`animeYoungMan`, `animeYoungWoman`, `animeMan`, `animeWoman`,
|
|
7924
|
+
`animeOlderMan`, `animeOlderWoman`) work through `castMember` too.
|
|
7925
|
+
Use `face: { style: 'anime', iris: '#4b7fce', lashes: true, ageLines: 0.6 }`
|
|
7926
|
+
for coloured expressive eyes and optional creases; this is a face style,
|
|
7927
|
+
not a `look` value. It uses the same expressions, blink, gaze and turn fields.
|
|
7928
|
+
Age is proportions, hair, creases and clothes, never a stoop; a `cane` in a hand or
|
|
7877
7929
|
a `wheelchair()` to ride (`RIDING_POSES.wheeling`) is an accessory any
|
|
7878
7930
|
character can have. Expressions come from `HUMAN_EXPRESSIONS`
|
|
7879
7931
|
and are pose fields, as are the face marks `blush`, `tears` and `sweat` (0–1)
|
|
@@ -8034,6 +8086,19 @@ When writing tinyfly animations, follow node_modules/@algorisys/tinyfly/skills/t
|
|
|
8034
8086
|
**A chat window**: paste the output of `npx @algorisys/tinyfly capabilities`,
|
|
8035
8087
|
or link `llms-full.txt`.
|
|
8036
8088
|
|
|
8089
|
+
### Manga faces and original stick-figure proportions
|
|
8090
|
+
|
|
8091
|
+
`MANGA_CAST` supplies four original young adult presets through `castMember`.
|
|
8092
|
+
`face.shape: 'angular'`, `jawWidth` and `chinWidth` shape the projected pen head;
|
|
8093
|
+
`eyeScale` and `eyeAspect` shape anime eyes. Hair and outfit overrides remain
|
|
8094
|
+
independent; spread the preset's face when changing one nested field.
|
|
8095
|
+
`mangaSpikes` / `mangaSweep` contain editable `hair.spikes` tufts as JSON
|
|
8096
|
+
(`around` degrees, `up` scalp height, `length` and `width` head radii).
|
|
8097
|
+
The solid mesh head and contact bounds retain their existing geometry.
|
|
8098
|
+
For the original stick figure use `style.armLength` (positive finite, default 1)
|
|
8099
|
+
in `drawStickFigure`, `stickFigureJoints` or `stickFigureTarget`; it changes
|
|
8100
|
+
both arm segments, with hands and the rest of the body keeping their sizes.
|
|
8101
|
+
|
|
8037
8102
|
---
|
|
8038
8103
|
|
|
8039
8104
|
<!-- docs/teaching.md -->
|
|
@@ -8065,7 +8130,7 @@ path for all of that:
|
|
|
8065
8130
|
</figure>
|
|
8066
8131
|
|
|
8067
8132
|
<!-- once, anywhere on the page (a site-wide footer is fine) -->
|
|
8068
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
8133
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
8069
8134
|
```
|
|
8070
8135
|
|
|
8071
8136
|
Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
|
|
@@ -9337,8 +9402,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
|
|
|
9337
9402
|
adds to the same `tinyfly` global:
|
|
9338
9403
|
|
|
9339
9404
|
```html
|
|
9340
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9341
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9405
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly.iife.js"></script>
|
|
9406
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.105.0/cdn/tinyfly-maps.iife.js"></script>
|
|
9342
9407
|
```
|
|
9343
9408
|
|
|
9344
9409
|
It is a separate script because the offline world map it carries adds about
|
|
@@ -9795,12 +9860,113 @@ cast member at an adult `height` (each stands at their own scale of it). The
|
|
|
9795
9860
|
family: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`,
|
|
9796
9861
|
`grandma`; at work (from the occupations sheet): `doctor`, `cook`, `builder`,
|
|
9797
9862
|
`courier`, `teacher`, `farmer`. `CHARACTER_CAST` has each one's `label`,
|
|
9798
|
-
`group` (`family` or `
|
|
9863
|
+
`group` (`family`, `work`, `anime` or `manga`), `scale` and `options`.
|
|
9799
9864
|
|
|
9800
9865
|
```js
|
|
9801
9866
|
const family = ['man', 'woman', 'girl', 'grandma'].map((name) => character(castMember(name, 280)))
|
|
9802
9867
|
```
|
|
9803
9868
|
|
|
9869
|
+
### Colour anime cast
|
|
9870
|
+
|
|
9871
|
+
`ANIME_CAST` contains eight editable presets, also included in `CHARACTER_CAST`:
|
|
9872
|
+
`animeBoy`, `animeGirl`, `animeYoungMan`, `animeYoungWoman`, `animeMan`,
|
|
9873
|
+
`animeWoman`, `animeOlderMan`, and `animeOlderWoman`. Children use shorter
|
|
9874
|
+
limbs and a larger head; older adults use grey hair and subtle face creases.
|
|
9875
|
+
All presets use the same human rig, so existing expressions, acting,
|
|
9876
|
+
hand gestures, gaits, dance, and full head/body turns work with them.
|
|
9877
|
+
The looks are starting points: any hair, outfit, iris colour or build can be changed.
|
|
9878
|
+
|
|
9879
|
+
```js
|
|
9880
|
+
const young = character(castMember('animeYoungWoman', 300))
|
|
9881
|
+
drawCharacter(ctx, young, humanPose({ ...HUMAN_EXPRESSIONS.surprised, turn: 0.5 }))
|
|
9882
|
+
const older = character(castMember('animeOlderMan', 300, {
|
|
9883
|
+
face: { style: 'anime', iris: '#94713e', lashes: false, ageLines: 0.6 }
|
|
9884
|
+
}))
|
|
9885
|
+
```
|
|
9886
|
+
|
|
9887
|
+
For any character, `face: { style: 'anime' }` draws almond-shaped eyes with
|
|
9888
|
+
coloured irises and highlights. `iris` sets their colour (default `#4b7fce`),
|
|
9889
|
+
`lashes` enables outer lashes (default true), and `ageLines` sets subtle eye
|
|
9890
|
+
and smile creases from 0 to 1 (default 0). `style: 'simple'` is the original
|
|
9891
|
+
face and remains the default. Face style is separate from the pen's `look`
|
|
9892
|
+
(`clean`, `pencil`, or `silhouette`); `look: 'anime'` is not a pen style.
|
|
9893
|
+
|
|
9894
|
+
The existing `eye.left`, `eye.right`, `blink`, `lookX`, `lookY`, `pupil`, `lid`,
|
|
9895
|
+
`bulge`, brows and mouth fields animate both styles. The coloured eye opening
|
|
9896
|
+
narrows with the lids; blink or a fully lowered lid closes it. Far-side eyes
|
|
9897
|
+
hide in profile and all face features hide from behind. The style and colours
|
|
9898
|
+
are plain JSON; `face.inPupil` remains an optional drawing hook for custom content.
|
|
9899
|
+
`castMember` changes replace option objects such as `face` or `outfit` as a whole.
|
|
9900
|
+
|
|
9901
|
+
The **Colour Anime Cast** example shows all eight presets, expressions,
|
|
9902
|
+
face close-ups and a complete turnaround. Both the Character and 3D Scene
|
|
9903
|
+
editors offer these presets in their Cast picker. The Character editor also
|
|
9904
|
+
has Face style, Iris colour, Eyelashes and Age creases controls, saved in project JSON.
|
|
9905
|
+
|
|
9906
|
+
### Young adult manga cast
|
|
9907
|
+
|
|
9908
|
+
`MANGA_CAST` supplies four original archetypes: `mangaYoungMan`,
|
|
9909
|
+
`mangaYoungWoman`, `mangaRival`, and `mangaHeroine`. They also belong to
|
|
9910
|
+
`CHARACTER_CAST` and use the shared expression, pose, dance and turnaround APIs.
|
|
9911
|
+
These presets use lighter line widths, angular jaws and smaller, narrower eyes.
|
|
9912
|
+
Hair, skin, clothing and every face option remain editable.
|
|
9913
|
+
|
|
9914
|
+
```js
|
|
9915
|
+
const preset = MANGA_CAST.mangaYoungMan.options
|
|
9916
|
+
const hero = character(castMember('mangaYoungMan', 300, {
|
|
9917
|
+
hair: { style: 'bob', color: '#446688' },
|
|
9918
|
+
face: { ...preset.face, jawWidth: 0.8, chinWidth: 0.12, iris: '#987546' }
|
|
9919
|
+
}))
|
|
9920
|
+
```
|
|
9921
|
+
|
|
9922
|
+
`face.shape: 'angular'` changes the pen character's head outline into a
|
|
9923
|
+
projected 3D tapered head, following yaw, nod and roll. `jawWidth` is the
|
|
9924
|
+
half-width at the jaw (clamped to 0.55–0.95 head radii, default 0.74);
|
|
9925
|
+
`chinWidth` is the half-width just above the chin (0.03–0.35, default 0.14).
|
|
9926
|
+
`shape: 'round'` is the original default. The underlying rig and contact
|
|
9927
|
+
geometry retain their original head bounds; solid mesh characters retain
|
|
9928
|
+
their existing mesh head.
|
|
9929
|
+
|
|
9930
|
+
Anime `eyeScale` changes eye size (0.5–1.2, default 1), and `eyeAspect`
|
|
9931
|
+
changes eye height relative to width (0.45–1.2, default 1). Smaller aspect
|
|
9932
|
+
values produce narrower manga eyes; expressions, blink, lids and gaze still
|
|
9933
|
+
animate them. These face options are independent of the hairstyle.
|
|
9934
|
+
|
|
9935
|
+
`mangaSpikes` and `mangaSweep` are editable hair presets with pointed 3D
|
|
9936
|
+
tufts. A `hair.spikes` array contains `{ around, up, length, width }`:
|
|
9937
|
+
`around` is degrees from the front, `up` the scalp height from -1 to 1,
|
|
9938
|
+
and `length` and `width` are tuft length and base radius in head radii.
|
|
9939
|
+
Use `spikes: []` to remove the tufts, or choose any other hairstyle.
|
|
9940
|
+
The editor retains custom hair fields in saved JSON; picking a different
|
|
9941
|
+
hairstyle clears the preceding preset's hair overrides.
|
|
9942
|
+
|
|
9943
|
+
The [Young Adult Manga Cast](https://tinyfly.app/examples/live-manga-cast)
|
|
9944
|
+
example lets you change hair, jaw, chin and eye height while expressions and
|
|
9945
|
+
turnarounds animate. The Character editor offers matching face controls,
|
|
9946
|
+
nose and line width; both editor Cast pickers include these presets.
|
|
9947
|
+
|
|
9948
|
+
### Original stick-figure arm proportions
|
|
9949
|
+
|
|
9950
|
+
The original stick-figure API now accepts `StickStyle.armLength`: a positive
|
|
9951
|
+
finite multiplier, default 1, of both upper-arm and forearm lengths.
|
|
9952
|
+
Hands keep their size; torso, shoulder positions, legs and head stay unchanged.
|
|
9953
|
+
It composes with squash/stretch, mirroring, wrist bends and rubber limbs.
|
|
9954
|
+
This is an appearance option, rather than a pose track.
|
|
9955
|
+
|
|
9956
|
+
```js
|
|
9957
|
+
const person = stickFigureTarget({
|
|
9958
|
+
x: 200, y: 400,
|
|
9959
|
+
style: { height: 300, armLength: 0.85 }
|
|
9960
|
+
})
|
|
9961
|
+
const joints = stickFigureJoints(POSES.wave, { height: 300, armLength: 1.2 })
|
|
9962
|
+
drawStickFigure(ctx, POSES.wave, { height: 300, armLength: 1.2 })
|
|
9963
|
+
```
|
|
9964
|
+
|
|
9965
|
+
`stickFigureAt` and costume/prop drawing hooks see the adjusted wrists.
|
|
9966
|
+
The [Stick Figure example](https://tinyfly.app/examples/live-stick-figure)
|
|
9967
|
+
includes an arm-length slider. The newer human rig keeps its existing
|
|
9968
|
+
`CharacterOptions.armLength` setting.
|
|
9969
|
+
|
|
9804
9970
|
## Hugs, help-ups and everyday cycles
|
|
9805
9971
|
|
|
9806
9972
|
Two people, more than hands: `embrace(a, b)` is a hug. Both turn toward each
|
|
@@ -14215,7 +14381,7 @@ magnet.addEventListener('pointerleave', () => {
|
|
|
14215
14381
|
|
|
14216
14382
|
<!-- capabilities: generated from the library -->
|
|
14217
14383
|
|
|
14218
|
-
# tinyfly capabilities (v0.
|
|
14384
|
+
# tinyfly capabilities (v0.105.0)
|
|
14219
14385
|
|
|
14220
14386
|
Generated from the library itself: every name below is accepted, and names not listed are rejected (beat scripts, code panels and `checkTracks` say which name was probably meant).
|
|
14221
14387
|
|
|
@@ -14294,6 +14460,8 @@ Types: `rect`, `circle`, `text`, `line`, `path`, `image`, `custom`. `describeTar
|
|
|
14294
14460
|
|
|
14295
14461
|
`stickFigureTarget({ x, y, style })` is a custom canvas target; its props are the pose fields and the props below. Pose it with tracks (`poseTracks`), or write beats (`scriptTracks`).
|
|
14296
14462
|
|
|
14463
|
+
Style proportions: `headSize` is a fraction of height; `armLength` multiplies both upper arm and forearm lengths (default 1, positive finite). Hands, shoulders, torso and legs retain their sizes.
|
|
14464
|
+
|
|
14297
14465
|
### Pose fields
|
|
14298
14466
|
|
|
14299
14467
|
| Field | Unit | What it does |
|
|
@@ -14497,12 +14665,14 @@ Native dances: `garba`, `garbaThreeClap`, `dandiya`; `humanDanceFrame(style, bea
|
|
|
14497
14665
|
Appearance options of `character({ … })`, all plain data that turns with the head (see docs/character-appearance.md):
|
|
14498
14666
|
|
|
14499
14667
|
- `build`: `standard`, `slim`, `tall`, `short`, `broad`, `curvy`, `stocky`, `kid`, `child`, `toddler`
|
|
14500
|
-
- `hair`: `bald`, `buzzCut`, `crewCut`, `short`, `sidePart`, `sideSwept`, `slickBack`, `quiff`, `spiky`, `undercut`, `curlyCrop`, `afro`, `wavyCrop`, `shortLocs`, `flatTop`, `receding`, `thinning`, `pixie`, `bob`, `longBob`, `wavyBob`, `shoulderStraight`, `shoulderWaves`, `longStraight`, `longWaves`, `longCurls`, `longLocs`, `lowPonytail`, `highPonytail`, `ponytail`, `sidePonytail`, `topBun`, `lowBun`, `singleBraid`, `twinBraids`, `braids` (colours: `black`, `brown`, `chestnut`, `auburn`, `blond`, `ginger`, `gray`, `white` in `HAIR_COLORS`)
|
|
14668
|
+
- `hair`: `bald`, `buzzCut`, `crewCut`, `short`, `sidePart`, `sideSwept`, `slickBack`, `quiff`, `spiky`, `mangaSpikes`, `mangaSweep`, `undercut`, `curlyCrop`, `afro`, `wavyCrop`, `shortLocs`, `flatTop`, `receding`, `thinning`, `pixie`, `bob`, `longBob`, `wavyBob`, `shoulderStraight`, `shoulderWaves`, `longStraight`, `longWaves`, `longCurls`, `longLocs`, `lowPonytail`, `highPonytail`, `ponytail`, `sidePonytail`, `topBun`, `lowBun`, `singleBraid`, `twinBraids`, `braids` (colours: `black`, `brown`, `chestnut`, `auburn`, `blond`, `ginger`, `gray`, `white` in `HAIR_COLORS`)
|
|
14501
14669
|
- `facialHair`: `cleanShaven`, `stubble`, `pencilMoustache`, `shortMoustache`, `chevron`, `handlebar`, `walrus`, `goatee`, `vanDyke`, `circleBeard`, `shortBoxed`, `fullBeard`, `longBeard`, `roundedBeard`, `pointedBeard`, `chinStrap`, `soulPatch`, `sideburns`, `muttonChops`, `moustacheStubble`
|
|
14502
14670
|
- `glasses`: `round`, `square`, `sunglasses`; `hat`: `cap`, `beanie`, `hardHat`, `sunHat`, `bowler`; `ears: true`; `face: { teeth, tongue }` (shown when the mouth opens); `feet`: `round`, `flat`, `pointed`, `big`
|
|
14503
14671
|
- `outfit`: `{ shirt, trousers, sleeves: short | long | none, bottom: trousers | shorts | skirt, collar, tie: colour, over: apron | labCoat | hoodie | cardigan | overalls | sari, overColor, shoes: boots, shoeColor }`
|
|
14504
|
-
- `castMember(name, height)`: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`, `grandma`, `doctor`, `cook`, `builder`, `courier`, `teacher`, `farmer`
|
|
14672
|
+
- `castMember(name, height)`: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`, `grandma`, `doctor`, `cook`, `builder`, `courier`, `teacher`, `farmer`, `animeBoy`, `animeGirl`, `animeYoungMan`, `animeYoungWoman`, `animeMan`, `animeWoman`, `animeOlderMan`, `animeOlderWoman`, `mangaYoungMan`, `mangaYoungWoman`, `mangaRival`, `mangaHeroine`
|
|
14505
14673
|
- Face marks (pose fields, 0–1): `blush`, `tears`, `sweat`; close-up fields `pupil` (size, 1 usual), `lid` (upper lids lowered, 0–1), `bulge` (eyes out of the head, 0–1); `face: { nose: true, inPupil(ctx, pupil) }`; `drawCharacterHead(ctx, who, pose, { x, y, radius })` draws just the head big
|
|
14674
|
+
- Face styles: `simple`, `anime`; `face: { style: 'anime', iris: '#4b7fce', lashes: true, ageLines: 0.8 }` uses coloured eyes and the same expressions, blinks and gaze. `ANIME_CAST` contains eight age presets, also available through `castMember`.
|
|
14675
|
+
- Face shapes: `round`, `angular`; `face: { shape: 'angular', jawWidth: 0.74, chinWidth: 0.14, eyeScale: 0.8, eyeAspect: 0.65 }` sets a tapered 3D jaw and narrower anime eyes. `MANGA_CAST` contains four original young adult presets; hair styles `mangaSpikes` and `mangaSweep` remain editable.
|
|
14506
14676
|
- Hair in motion (pose fields): `hair.swing` (degrees round the head, + toward its left), `hair.trail` (head radii back), `hair.lift` (head radii up); key them with `hairFollowTracks(target, tracks, who)` after the character's tracks, or `hairFollow` + `hairMotionAt` when posing per frame
|
|
14507
14677
|
- `holding`: `mug` (left or right), `phone` (left or right), `book` (one hand or both), `bag` (left or right), `briefcase` (left or right), `umbrella` (left or right), `broom` (left or right), `cane` (left or right), `parcel` (both); pose fields `held.left`, `held.right`, `held.both` (below 0.5 lets go); `handGrip(joints, side)`
|
|
14508
14678
|
- `meetHands(kind, a, b)` (stand them `meetingSpacing(kind, a, b)` apart): `handshake`, `highFive`, `fistBump`, `handOver`; `embrace(a, b)` (a hug, `embraceSpacing` apart); `helpUp(helper, sitter, progress)` (0 on the floor, hand taken; 1 standing; `helpUpSpacing` apart)
|
package/llms.txt
CHANGED
|
@@ -13,47 +13,47 @@ Key facts:
|
|
|
13
13
|
- For language models: read the capability catalog first (`npx @algorisys/tinyfly capabilities`, or the end of llms-full.txt). It is generated from the library, so every name in it (poses, expressions, gags, gaits, beat actions, canvas properties, code-panel edits) is accepted, and names not in it are rejected with the name probably meant. Check beat scripts with `npx @algorisys/tinyfly check beats.json`, tracks with `checkTracks(tracks, targets)`, and ask any target what it animates with `describeTarget(target)`. The npm package ships `docs/`, `llms.txt`, `llms-full.txt` and an agent skill (`skills/tinyfly/SKILL.md`); `docs/llm-guide.md` describes the workflow.
|
|
14
14
|
- Source: https://github.com/algorisys-oss/tinyfly. License: MIT.
|
|
15
15
|
|
|
16
|
-
All documentation and the interactive course in a single file: [llms-full.txt](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
16
|
+
All documentation and the interactive course in a single file: [llms-full.txt](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/llms-full.txt)
|
|
17
17
|
|
|
18
18
|
## Start here
|
|
19
19
|
|
|
20
|
-
- [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
21
|
-
- [GSAP Compatibility](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
22
|
-
- [Code Examples](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
23
|
-
- [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
20
|
+
- [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/getting-started.md): What tinyfly is, making a first animation in the editor, and using it from code, a script tag or the CDN.
|
|
21
|
+
- [GSAP Compatibility](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/gsap-compat.md): The GSAP-style API (`live.to`, `tf.timeline`): supported vars, motion paths, morphSVG, text, inertia, Draggable, Flip, and where it differs from GSAP.
|
|
22
|
+
- [Code Examples](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/examples.md): Recipes with the engine API: fades, loops, colour and bezier easing, loading JSON, canvas and SVG rendering, multi-scene sequences, motion paths and script-tag embeds; a festive garba/dandiya scene with partner contacts, circle travel and spins, also rendered to video.
|
|
23
|
+
- [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/llm-guide.md): For assistants and the people setting them up: read the capability catalog (`tinyfly capabilities`), ask targets what they animate (`describeTarget`), check beats and tracks with did-you-mean errors (`tinyfly check`, `checkTracks`), render stills to look at, and the agent skill shipped in the package.
|
|
24
24
|
|
|
25
25
|
## Reference
|
|
26
26
|
|
|
27
|
-
- [API Reference](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
28
|
-
- [File Format](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
27
|
+
- [API Reference](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/api-reference.md): Every public engine, player and adapter API: Timeline, tracks, keyframes, easing, drivers, serialization and exports.
|
|
28
|
+
- [File Format](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/file-format.md): The JSON animation format: timelines, every track kind, keyframes, easing and the project file — for generating or consuming animations.
|
|
29
29
|
|
|
30
30
|
## Editor features
|
|
31
31
|
|
|
32
|
-
- [Editor Guide](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
33
|
-
- [Shape Morphing](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
34
|
-
- [Pen Tool](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
35
|
-
- [Polygons & Stars](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
36
|
-
- [Grid & Snapping](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
37
|
-
- [Onion Skinning](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
38
|
-
- [Sprite-sheet Export](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
32
|
+
- [Editor Guide](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/editor-guide.md): Every panel and feature of the visual editor, from elements and keyframes to text and inertia tracks, preview and export.
|
|
33
|
+
- [Shape Morphing](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/shape-morph.md): Tweening one path into another, including shapes with different point counts and several subpaths.
|
|
34
|
+
- [Pen Tool](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/pen-tool.md): Drawing custom paths point by point with straight segments and bezier curves.
|
|
35
|
+
- [Polygons & Stars](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/polygon-star.md): Parametric polygon and star shapes that stay editable while animating like any path.
|
|
36
|
+
- [Grid & Snapping](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/grid-and-snapping.md): The grid overlay, snapping to grid, elements and artboard centre, and alignment guides.
|
|
37
|
+
- [Onion Skinning](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/onion-skinning.md): Ghost frames before and after the playhead for judging arcs and easing.
|
|
38
|
+
- [Sprite-sheet Export](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/sprite-sheet-export.md): Exporting frames as a PNG grid plus JSON metadata for game engines and canvas players.
|
|
39
39
|
|
|
40
40
|
## Guides
|
|
41
41
|
|
|
42
|
-
- [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
43
|
-
- [Props: Everyday Objects with Behaviours](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
44
|
-
- [Teaching Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
45
|
-
- [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
46
|
-
- [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
47
|
-
- [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
48
|
-
- [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
49
|
-
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
50
|
-
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
51
|
-
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
52
|
-
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
53
|
-
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
54
|
-
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
42
|
+
- [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/scroll-animation.md): Scroll-driven and play-when-visible animation with ScrollDriver and VisibilityDriver.
|
|
43
|
+
- [Props: Everyday Objects with Behaviours](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/props.md): Cars, trucks, buses, tractors, carts, train carriages, bikes, motorbikes, trees, houses, a helicopter and a plane: 3D rigs drawn with the characters’ pens (clean, pencil) that turn toward the camera, with beats acted through the 12 principles (anticipation, squash and stretch, follow-through, an exaggeration dial), wheels that roll exactly, effects, and figures riding them.
|
|
44
|
+
- [Teaching Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/teaching.md): Step-through explanatory figures: markers, captions in several languages, the teaching player, step controls, one-script declarative embeds, tinyfly/teach diagram primitives, and validate / render for build pipelines.
|
|
45
|
+
- [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/video-rendering.md): Rendering a scene to MP4 without a browser: `tinyfly video`, custom canvas targets drawn by code, timing from narration and recorded voice-over, the stick-figure character, SRT/WebVTT captions, stills, porting Cairo scripts, and a benchmark against pycairo.
|
|
46
|
+
- [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/maps.md): Maps that animate: a camera that flies in to a city, pins that drop in, routes that draw themselves while a marker travels them, on OpenStreetMap tiles or an offline world outline (also in pencil), in the browser and in headless video.
|
|
47
|
+
- [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/cartoon-hands.md): A hand you can pose: a palm and five fingers in 3D, posed by numbers (curls, thumb, spread, wrist turn), ready-made shapes from a fist to a pencil grip, left and right, four or five fingers, in clean, pencil and silhouette looks; the animator's hand and character gloves are built on it.
|
|
48
|
+
- [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/character-appearance.md): Hair (34 styles), facial hair (20), glasses, hats and ears for the v2 character as plain data on the head, so they turn with it through all eight views; builds (child, tall, short…), a recurring cast (castMember), expressions with blush, tears and sweat, everyday poses, held items (mug, phone, bags, umbrella, parcel) and two characters’ hands meeting (meetHands: handshake, high five, hand-over).
|
|
49
|
+
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/acting.md): actTracks(): the same key poses, acted: anticipation, overshoot and settle, overlapping joints, eyes that lead and blink, moving holds and jump squash, in full, snappy or limited styles; gags as data (take, double take, wind-up); a line of action (bend); gaits with personality; lip-sync from text (Latin and Devanagari); beat scripts compiled to acted tracks; your own actions (defineAction), gaits (defineGait) and personas (persona()); acting on code (codePanel lines and words as anchors: leap onto a line, point at it, swipe it away wiped, knocked off or blurred; grab, throw, kick, carry and drop words, push them along their line, write new text in by hand; ride a line as gaps close); camera shots (push in, cut, shake, follow); the cartoon zip; speed lines, dust puffs and impact stars; drawing on twos (a timeline setting); acting, gags, walks and lines in the editor.
|
|
50
|
+
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/dance.md): The stick figure dances disco, hip hop, breaking, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap and popping, and does flips, leaps and splits; native v2 garba (two/three clap) and dandiya add body-local routines, circle formations, world foot plants, paired stick-tip contacts and signed spins; JSON bakes, timing, contact limits and editor menus.
|
|
51
|
+
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/scene-3d.md): @algorisys/tinyfly/scene-3d: cameras, lights and meshes as JSON, in metres, animated by tracks at <scene>/<object> (cuts with activeCamera), drawn on a 2D canvas with flat, smooth or toon shading, ink outlines and fog, in browsers, Workers and Node (MP4 with tinyfly video); v2 characters in pen or solid looks, scripted native dances, timed signed spins and circle formations with foot contacts.
|
|
52
|
+
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/3d-rotations.md): CSS-style 3D for flat elements in every renderer (rotateX, rotateY, z, perspective, backface visibility; true perspective on Canvas and WebGL, matching CSS within a pixel), one documented transform order, the editor's 3D fields; smooth quaternion rotations with interpolation: "slerp"; the vec3, quat and mat4 helpers; format version 2.
|
|
53
|
+
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/extending.md): Writing a render adapter, animating any object with live and the ticker, custom and parametric eases, stagger offsets, adding a track kind, and contributing gallery examples.
|
|
54
|
+
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
|
|
55
55
|
|
|
56
56
|
## Optional
|
|
57
57
|
|
|
58
|
-
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
59
|
-
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
58
|
+
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/README.md): Feature overview, project layout and development setup.
|
|
59
|
+
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.105.0/release-notes/README.md): What changed in each version.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algorisys/tinyfly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.105.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lightweight, API-driven animation engine and editor. The engine is framework-agnostic and runs in browsers, Web Workers, and Node.",
|
|
6
6
|
"license": "MIT",
|
package/skills/tinyfly/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ before writing anything. It is generated from the installed library: easings,
|
|
|
16
16
|
track kinds, every canvas property with units and ranges, the stick figure's
|
|
17
17
|
joints, poses, expressions (moods), gags, gaits, beat actions (and the fields
|
|
18
18
|
each needs), dances, flips, hand shapes, the v2 character's builds, hairstyles,
|
|
19
|
-
facial hair, glasses, hats, cast and expressions, the code panel's languages, every surface's
|
|
19
|
+
facial hair, glasses, hats, cast, face styles and expressions, the code panel's languages, every surface's
|
|
20
20
|
anchors and edits (code, board, chart), camera shots, teaching helpers.
|
|
21
21
|
|
|
22
22
|
For the how-to, read the docs shipped with the package, at the installed
|
|
@@ -31,6 +31,12 @@ names.
|
|
|
31
31
|
|
|
32
32
|
## 2. Write
|
|
33
33
|
|
|
34
|
+
- Colour anime characters: use `castMember('animeYoungWoman', height)` or any
|
|
35
|
+
of the eight age presets in `ANIME_CAST`. For a custom character use
|
|
36
|
+
`face: { style: 'anime', iris: '#4b7fce', lashes: true, ageLines: 0.6 }`.
|
|
37
|
+
Keep `look` as `clean`, `pencil` or `silhouette`; anime is a face style.
|
|
38
|
+
The same `HUMAN_EXPRESSIONS`, blink, gaze, turn, acting and dance fields apply.
|
|
39
|
+
|
|
34
40
|
- Prefer the high-level builders: `scriptTracks()` beats for characters
|
|
35
41
|
(`characterScript(target, who, beats)` for the same beats on a v2
|
|
36
42
|
`character()`, then `hairFollowTracks`), `codePanel()` for code, `whiteboard()` for lessons on a board,
|
|
@@ -152,3 +158,10 @@ from `frame.time / frame.period` with helpers that repeat exactly (`wobble`,
|
|
|
152
158
|
`bubblePath` with `period`; sound via `cutAudioToLoop`), whole turns and
|
|
153
159
|
cycles only; then `npx @algorisys/tinyfly video scene.mjs --loop-check` must
|
|
154
160
|
say "closes".
|
|
161
|
+
|
|
162
|
+
### Manga cast and stick-figure arm proportions
|
|
163
|
+
|
|
164
|
+
- `MANGA_CAST` / `castMember('mangaYoungMan', height)` supply four original young adult presets. `face.shape: 'angular'`, `jawWidth`, `chinWidth`, `eyeScale` and `eyeAspect` customise them; keep expressions as pose fields.
|
|
165
|
+
- Hair styles `mangaSpikes` and `mangaSweep` use editable `spikes: [{ around, up, length, width }]` in head radii (around in degrees). Hair and clothes can be replaced independently of the face. Spread nested preset face options before changing one field.
|
|
166
|
+
- Pen head outlines follow yaw/nod/roll; contact bounds and the solid mesh head remain unchanged.
|
|
167
|
+
- The original stick figure takes `style.armLength` as a positive finite multiplier (default 1) in its draw, joints and target APIs. Both arm bones scale; hands and other body proportions retain their sizes. The newer human rig retains its `CharacterOptions.armLength`.
|