@algorisys/tinyfly 0.95.0 → 0.98.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 +8 -8
- package/docs/acting.md +165 -0
- package/docs/character-appearance.md +281 -0
- package/docs/editor-guide.md +14 -6
- package/docs/examples.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/gsap-compat.md +1 -1
- package/docs/llm-guide.md +44 -2
- package/docs/maps.md +2 -2
- package/docs/props.md +8 -6
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +6266 -4087
- package/lib/browser/tinyfly.iife.js +16 -14
- package/lib/browser/tinyfly.js +8441 -6262
- package/lib/browser/tinyfly.umd.js +16 -14
- package/lib/types/characters/acting/index.d.ts +1 -0
- package/lib/types/characters/acting/surface-script.d.ts +92 -0
- package/lib/types/characters/capabilities.d.ts +20 -0
- package/lib/types/characters/cast.d.ts +284 -0
- package/lib/types/characters/character.d.ts +22 -4
- package/lib/types/characters/chart.d.ts +108 -0
- package/lib/types/characters/code-panel.d.ts +21 -46
- package/lib/types/characters/hands/held-items.d.ts +88 -0
- package/lib/types/characters/hands/index.d.ts +1 -0
- package/lib/types/characters/head/ears.d.ts +10 -0
- package/lib/types/characters/head/facial-hair.d.ts +118 -0
- package/lib/types/characters/head/glasses.d.ts +24 -0
- package/lib/types/characters/head/hair.d.ts +560 -0
- package/lib/types/characters/head/hats.d.ts +58 -0
- package/lib/types/characters/head/head-look.d.ts +53 -0
- package/lib/types/characters/head/index.d.ts +5 -0
- package/lib/types/characters/head/shell.d.ts +64 -0
- package/lib/types/characters/index.d.ts +7 -1
- package/lib/types/characters/interactions.d.ts +69 -0
- package/lib/types/characters/props/families/animals.d.ts +6 -0
- package/lib/types/characters/props/index.d.ts +1 -0
- package/lib/types/characters/props/prop-surface.d.ts +63 -0
- package/lib/types/characters/species/human-motion.d.ts +5 -2
- package/lib/types/characters/species/human.d.ts +111 -4
- package/lib/types/characters/surface/edit-log.d.ts +47 -0
- package/lib/types/characters/surface/index.d.ts +11 -0
- package/lib/types/characters/surface/pieces.d.ts +61 -0
- package/lib/types/characters/surface/ride.d.ts +31 -0
- package/lib/types/characters/surface/surface-box.d.ts +18 -0
- package/lib/types/characters/surface/surface.d.ts +79 -0
- package/lib/types/characters/wardrobe/basic-outfit.d.ts +19 -5
- package/lib/types/characters/whiteboard.d.ts +131 -0
- package/llms-full.txt +625 -28
- package/llms.txt +29 -28
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +38 -9
package/docs/llm-guide.md
CHANGED
|
@@ -18,8 +18,10 @@ npx @algorisys/tinyfly capabilities --json # the same as data
|
|
|
18
18
|
It lists the easings, track kinds, every property each canvas shape can
|
|
19
19
|
animate (with units and ranges), the stick figure's joints, poses,
|
|
20
20
|
expressions, gags, gaits, beat actions, dances, flips and hand shapes, the v2
|
|
21
|
-
character's poses,
|
|
22
|
-
|
|
21
|
+
character's poses, expressions, builds, hairstyles, facial hair, glasses,
|
|
22
|
+
hats and cast, the code panel's languages, every surface's anchors and
|
|
23
|
+
edits (code panel, whiteboard, chart), camera shots and the teaching
|
|
24
|
+
helpers. It is generated from the code, so it can't
|
|
23
25
|
fall behind: **a name in it is accepted, and a name not in it is rejected.**
|
|
24
26
|
It is also the last part of `llms-full.txt`.
|
|
25
27
|
|
|
@@ -43,6 +45,34 @@ Characters in a 3D scene walk the same way with `characterScript3D`
|
|
|
43
45
|
(`{ do: 'walk', to: [x, z] }`, `pose`, `gag`, `face`, `place`); a rider is
|
|
44
46
|
seated with `propRide3D` and spliced into its script with `spliceTracks`. See `docs/props.md`.
|
|
45
47
|
|
|
48
|
+
## Characters with a look
|
|
49
|
+
|
|
50
|
+
A v2 character's appearance is plain options to `character()`, never drawing
|
|
51
|
+
code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
|
|
52
|
+
`{ style, color, length, … }`), `facialHair`, `glasses`, `hat`, `ears: true`
|
|
53
|
+
and `outfit: { shirt, trousers }`. `castMember('grandpa', 300)` gives a whole
|
|
54
|
+
ready-made character to start from. Expressions come from `HUMAN_EXPRESSIONS`
|
|
55
|
+
and are pose fields, as are the face marks `blush`, `tears` and `sweat` (0–1),
|
|
56
|
+
so any face goes with any action or view. Hair and hats turn with the head:
|
|
57
|
+
don't draw a different hairstyle per view. Put things in hands with `holding`
|
|
58
|
+
(`{ right: 'mug' }`, `{ both: 'parcel' }`; the pose field `held.both` lets go),
|
|
59
|
+
and for two characters touching use `meetHands('handshake', a, b)` with the
|
|
60
|
+
two standing `meetingSpacing(…)` apart, never two separate clips. See
|
|
61
|
+
`docs/character-appearance.md`.
|
|
62
|
+
|
|
63
|
+
## Surfaces
|
|
64
|
+
|
|
65
|
+
Code panels (`codePanel()`), whiteboards (`whiteboard()`), charts
|
|
66
|
+
(`chart()`) and props (`propSurface(propTarget(…))`) are surfaces: their places have names (`line:7`,
|
|
67
|
+
`token:4:Println`, `text:eq`, `term:eq:+ 4`, `bar:q4`) and their edits are
|
|
68
|
+
called by name (`surface.edit('highlight', 'line:4', { at })`). Write a scene
|
|
69
|
+
on one with `surfaceScript()`: beats aim at `{ surface, anchor }` and say what
|
|
70
|
+
the surface does in answer with `then`, at a moment of the beat (`at:
|
|
71
|
+
'contact'`, `'release'`…). A whiteboard's texts and marks and a chart's data
|
|
72
|
+
are declared up front, each with an id the places use. The catalog lists each
|
|
73
|
+
surface's places and edits. See "A whole scene as data", "Whiteboards" and
|
|
74
|
+
"Charts" in `docs/acting.md`.
|
|
75
|
+
|
|
46
76
|
## Your own behaviours
|
|
47
77
|
|
|
48
78
|
Write new actions with `defineAction()` (from beats, or as timed pose steps),
|
|
@@ -109,14 +139,26 @@ Fix, render again.
|
|
|
109
139
|
positions. A beat script's `to` is a scene x, and its tracks are offsets
|
|
110
140
|
from `from` (and `ground` for y).
|
|
111
141
|
- **Scene y grows downward.** A floor higher up the screen has a smaller y.
|
|
142
|
+
- **Walk figures in front of props, not through them.** A prop stands on its
|
|
143
|
+
middle; its front comes forward of that. Use its front line as the
|
|
144
|
+
figure's `ground` (a house's `anchor:doorstep`).
|
|
112
145
|
- **Angles are degrees.** Stick-figure arms: 0 hangs down, 90 straight out,
|
|
113
146
|
180 straight up; in profile the left arm's forward is negative.
|
|
147
|
+
- **A character's look is data, and names are checked.** `hair: 'bob'`, not
|
|
148
|
+
a drawing in `layers`; a style name not in the catalog throws (`hair:
|
|
149
|
+
unknown style`). Side names (`at: 'left'`, `arm.left`) are the character's
|
|
150
|
+
own: from the front its left is on screen right.
|
|
114
151
|
- **Aim beats at anchors, not guessed numbers**: `code.line(7)`,
|
|
115
152
|
`code.token(3, 'var')`, `code.spot(2, 8, 4)`, `piece.home`.
|
|
116
153
|
- **Key reactions to contact times.** Beats that touch something report
|
|
117
154
|
`result.beats[i].contact` (and `release`): wipe the line, fling the word or
|
|
118
155
|
type the text at those times.
|
|
119
156
|
- **Record panel edits before `code.ride()`**, which reads the moves they make.
|
|
157
|
+
- **Or write it all as data with `surfaceScript`**: name places
|
|
158
|
+
(`target: { surface: 'code', anchor: 'token:3:var' }`) and put the surface's
|
|
159
|
+
answer on the beat (`then: { surface: 'code', edit: 'fling', anchor: 'token:3:var', at: 'release' }`).
|
|
160
|
+
A cue's `at` is a moment name (`start`, `contact`, `release`, `end`), never
|
|
161
|
+
ms. It records the edits and rides the lines for you, in beat order.
|
|
120
162
|
|
|
121
163
|
## Set up your assistant
|
|
122
164
|
|
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.98.0/cdn/tinyfly.iife.js"></script>
|
|
18
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.98.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/props.md
CHANGED
|
@@ -109,11 +109,11 @@ one probably meant, and `propScript` throws on them.
|
|
|
109
109
|
| `house()` | `door` (`open`), `lights` (`on`), `smoke` (`for`, runs in the background), `shake` |
|
|
110
110
|
| `helicopter()` | `takeOff` (`height`), `fly` (`to`, `height`), `hover`, `land` |
|
|
111
111
|
| `airplane()` | `takeOff` (`to`, `height`), `fly` (`to`, `height`), `loop`, `land` (`to`) |
|
|
112
|
-
| `horse()` | `walk`, `trot`, `canter`, `gallop` (`to`), `rear`, `buck`, `neigh`, `graze`, `sit`, `jump`, `nod`, `swish` |
|
|
113
|
-
| `dog()` | `walk`, `trot`, `run` (`to`), `bark`, `wag`, `sniff`, `sit`, `jump`, `nod`, `swish` |
|
|
114
|
-
| `cat()` | `walk`, `trot`, `run` (`to`), `meow`, `arch`, `pounce` (`to`), `sit`, `jump`, `nod`, `swish` |
|
|
115
|
-
| `cow()` | `walk`, `trot` (`to`), `moo`, `graze`, `sit`, `jump`, `nod`, `swish` |
|
|
116
|
-
| `songbird()`, `crow()` | `hop`, `walk` (`to`), `peck` (`for`), `flap` (`for`), `fly` (`to`, `height`), `land` (`height`, `to`), `tweet` / `caw` |
|
|
112
|
+
| `horse()` | `walk`, `trot`, `canter`, `gallop` (`to`), `rear`, `buck`, `neigh`, `graze`, `sit`, `lie`, `jump`, `nod`, `swish` |
|
|
113
|
+
| `dog()` | `walk`, `trot`, `run` (`to`), `bark`, `wag`, `sniff`, `sit`, `lie`, `jump`, `nod`, `swish` |
|
|
114
|
+
| `cat()` | `walk`, `trot`, `run` (`to`), `meow`, `arch`, `pounce` (`to`), `sit`, `lie`, `jump`, `nod`, `swish` |
|
|
115
|
+
| `cow()` | `walk`, `trot` (`to`), `moo`, `graze`, `sit`, `lie`, `jump`, `nod`, `swish` |
|
|
116
|
+
| `songbird()`, `crow()` | `hop`, `walk` (`to`), `peck` (`for`), `flap` (`for`), `fly` (`to`, `height`), `glide` (`to`, `height`), `land` (`height`, `to`), `tweet` / `caw` |
|
|
117
117
|
| `chicken()` | `walk` (`to`), `peck`, `flap`, `flutter`, `cluck` (it cannot fly) |
|
|
118
118
|
|
|
119
119
|
**Line art.** `propTarget({ …, style: 'stick' })` (or `drawSolvedProp(…, { style: 'stick' })`)
|
|
@@ -138,7 +138,9 @@ and while `flapping` is on, the rig's `derive` beats them from a phase,
|
|
|
138
138
|
a second, a crow four). Its head pecks from a neck joint (`peck`; a chicken's
|
|
139
139
|
neck stretches down to reach), and it walks with its head bobbing or hops.
|
|
140
140
|
`fly` takes off with a crouch and a leap (no crouch if it is already in the
|
|
141
|
-
air) and flies to `height` metres; `
|
|
141
|
+
air) and flies to `height` metres; `glide` holds the wings out still and sinks
|
|
142
|
+
gently toward `height` on the way to `to` (from the ground it flies the first
|
|
143
|
+
stretch); `land` comes down to the ground or to a
|
|
142
144
|
perch (`height`). Perch it with anchors:
|
|
143
145
|
|
|
144
146
|
```js
|
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.98.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
|