@algorisys/tinyfly 0.107.1 → 0.109.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 +22 -12
- package/docs/character-appearance.md +148 -0
- package/docs/cricket.md +127 -0
- package/docs/editor-guide.md +1 -1
- 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 +58 -0
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +4674 -8156
- package/lib/addons/cricket-camera-BWByoNgz.js +4205 -0
- package/lib/addons/scene-3d.js +436 -540
- package/lib/addons/shots-DR_ViiAC.js +125 -0
- package/lib/addons/sports.js +390 -0
- package/lib/browser/tinyfly.iife.js +14 -14
- package/lib/browser/tinyfly.js +9334 -8322
- package/lib/browser/tinyfly.umd.js +14 -14
- package/lib/types/browser/index.d.ts +1 -0
- package/lib/types/characters/body/organic-body.d.ts +56 -0
- package/lib/types/characters/body/organic-draw.d.ts +5 -0
- package/lib/types/characters/body/organic-geometry.d.ts +25 -0
- package/lib/types/characters/capabilities.d.ts +14 -0
- package/lib/types/characters/character.d.ts +15 -2
- package/lib/types/characters/hands/draw-cartoon-hand.d.ts +4 -0
- package/lib/types/characters/head/face.d.ts +6 -4
- package/lib/types/characters/head/facial-hair.d.ts +2 -0
- package/lib/types/characters/head/glasses.d.ts +2 -0
- package/lib/types/characters/head/head-look.d.ts +4 -2
- package/lib/types/characters/head/head-shape.d.ts +4 -0
- package/lib/types/characters/index.d.ts +5 -0
- package/lib/types/characters/look/pen.d.ts +1 -0
- package/lib/types/characters/look/skin-shading.d.ts +4 -0
- package/lib/types/characters/rig/skeleton.d.ts +2 -0
- package/lib/types/characters/soft-cartoon-cast.d.ts +166 -0
- package/lib/types/characters/wardrobe/basic-outfit.d.ts +5 -1
- package/lib/types/characters/wardrobe/leaf-outfit.d.ts +18 -0
- package/lib/types/characters/wardrobe/outfit-preset.d.ts +6 -0
- package/lib/types/sports/ball-flight.d.ts +22 -0
- package/lib/types/sports/cricket/cricket-action.d.ts +7 -0
- package/lib/types/sports/cricket/cricket-camera.d.ts +13 -0
- package/lib/types/sports/cricket/cricket-field.d.ts +13 -0
- package/lib/types/sports/cricket/cricket-motion.d.ts +36 -0
- package/lib/types/sports/cricket/cricket-types.d.ts +84 -0
- package/lib/types/sports/cricket/index.d.ts +5 -0
- package/lib/types/sports/index.d.ts +3 -0
- package/llms-full.txt +377 -9
- package/llms.txt +30 -29
- package/package.json +5 -1
- package/skills/tinyfly/SKILL.md +49 -0
package/llms.txt
CHANGED
|
@@ -13,47 +13,48 @@ 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.109.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.109.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.109.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.109.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.109.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.109.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.109.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.109.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.109.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.109.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.109.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.109.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.109.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.109.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
|
-
- [
|
|
43
|
-
- [
|
|
44
|
-
- [
|
|
45
|
-
- [
|
|
46
|
-
- [
|
|
47
|
-
- [
|
|
48
|
-
- [
|
|
49
|
-
- [
|
|
50
|
-
- [
|
|
51
|
-
- [
|
|
52
|
-
- [3D
|
|
53
|
-
- [
|
|
54
|
-
- [
|
|
42
|
+
- [Cricket Stories](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.0/docs/cricket.md): Reusable sports APIs, organic adult/child players, sixteen cricket plays, Test/ODI/T20 facts, contact-keyed JSON, captions, headless video and a 360° ground camera.
|
|
43
|
+
- [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.0/docs/scroll-animation.md): Scroll-driven and play-when-visible animation with ScrollDriver and VisibilityDriver.
|
|
44
|
+
- [Props: Everyday Objects with Behaviours](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
45
|
+
- [Teaching Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
46
|
+
- [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
47
|
+
- [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
48
|
+
- [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
49
|
+
- [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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).
|
|
50
|
+
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
51
|
+
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
52
|
+
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
53
|
+
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
54
|
+
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.
|
|
55
|
+
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
|
|
55
56
|
|
|
56
57
|
## Optional
|
|
57
58
|
|
|
58
|
-
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
59
|
-
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
59
|
+
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.0/README.md): Feature overview, project layout and development setup.
|
|
60
|
+
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.109.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.109.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",
|
|
@@ -101,6 +101,10 @@
|
|
|
101
101
|
"types": "./lib/types/characters/index.d.ts",
|
|
102
102
|
"import": "./lib/addons/characters.js"
|
|
103
103
|
},
|
|
104
|
+
"./sports": {
|
|
105
|
+
"types": "./lib/types/sports/index.d.ts",
|
|
106
|
+
"import": "./lib/addons/sports.js"
|
|
107
|
+
},
|
|
104
108
|
"./maps": {
|
|
105
109
|
"types": "./lib/types/maps/index.d.ts",
|
|
106
110
|
"import": "./lib/addons/maps.js"
|
package/skills/tinyfly/SKILL.md
CHANGED
|
@@ -129,9 +129,58 @@ names.
|
|
|
129
129
|
- For recurring characters, make a `persona()` (look, acting, gait, mood,
|
|
130
130
|
stance) and use `persona.script()`; for a move the catalog lacks, write it
|
|
131
131
|
with `defineAction()` rather than hand-keying joints in many places.
|
|
132
|
+
- Soft cartoon bodies: `figure: 'organic'` defaults to
|
|
133
|
+
`face.projection: 'volume'` for head turns with hair occlusion, a flatter
|
|
134
|
+
profile face and a nose projecting from above the mouth;
|
|
135
|
+
`face.projection: 'cartoon'` keeps the classic face slide. Optional JSON
|
|
136
|
+
`body` profiles (`torso`, `arm`, `leg`, `neck`) use increasing `{ at, width }`
|
|
137
|
+
from 0 to 1, with half-width fractions of height. Use `skin` for the whole exposed character;
|
|
138
|
+
`body.fill` overrides it; `'none'` makes exposed body/head/hands outline-only
|
|
139
|
+
in every look. Organic 3D painter ordering promotes only foreground arms to
|
|
140
|
+
torso/leg garment depths, leaving other parts at physical depths.
|
|
141
|
+
`body.outline: { color, width }` changes ink
|
|
142
|
+
independently of anatomy; `body.shading: { mode: 'cel' | 'none', light: [x,y],
|
|
143
|
+
shadow, opacity, highlight }` clips deterministic shading to skin. Start
|
|
144
|
+
from `softCartoonCharacter('youngMan' | 'youngWoman' | 'childBoy' | 'childGirl', options)`
|
|
145
|
+
or custom character options. Child presets have larger relative heads,
|
|
146
|
+
shorter limbs and rounded torsos, with a smaller default height. Override
|
|
147
|
+
`height` without replacing the child proportions. Hands are small natural hands by default; existing
|
|
148
|
+
pose/hand/script/reach/hair APIs drive them. `outfit` follows organic
|
|
149
|
+
anatomy. `outfitPreset('everyday' | 'formal' | 'casual', overrides)` returns
|
|
150
|
+
fresh wardrobe JSON. `outfit.top` selects `tshirt | shirt | blouse | dress`;
|
|
151
|
+
`trouserStyle` selects `plain | jeans | cargo`; `shirt` and `trousers` are
|
|
152
|
+
colour fields. Bottoms, sleeves, collars and tie colours work on every
|
|
153
|
+
actor. Dresses force a skirt in the top colour. `leafOutfit: { top?, color?, accent?, length? }` requires organic
|
|
154
|
+
mode. Use the resolved part order for occlusion: foreground organic arms
|
|
155
|
+
and hands draw together over lower garments.
|
|
156
|
+
Camera-view garment details use `joints.bodyForward` (`z` front visibility,
|
|
157
|
+
`x` side offset), independently of head yaw. `joints.turn` remains authored;
|
|
158
|
+
flat drawing omits that camera axis. The interactive example is
|
|
159
|
+
`/examples/live-organic-characters` and headless
|
|
160
|
+
`examples/headless-video/organic-characters.mjs` and
|
|
161
|
+
`examples/headless-video/child-characters.mjs` examples.
|
|
132
162
|
|
|
133
163
|
## 3. Check
|
|
134
164
|
|
|
165
|
+
Cricket stories use `@algorisys/tinyfly/sports`: `cricketClip` gives owned JSON
|
|
166
|
+
scene/timeline/events/result; `cricketCameraTracks` adds pitch, close-up,
|
|
167
|
+
overhead, ground orbit or ball-follow camera tracks. Use scene-3d with
|
|
168
|
+
`kinds: [characterObjects]` for the existing organic adult/child players.
|
|
169
|
+
Formats are `test | odi | t20`; cast `adults | children | mixed`; select plays
|
|
170
|
+
from `CRICKET_ACTIONS`. Results and arcs are authored teaching examples, not
|
|
171
|
+
physics, automatic umpiring or a complete innings. Preserve exact contact keys
|
|
172
|
+
and merge the selected camera tracks when exporting. See `docs/cricket.md`,
|
|
173
|
+
`/examples/live-cricket-story` and `examples/headless-video/cricket-story.mjs`.
|
|
174
|
+
Wide cameras scale their clipping range for 24–250 m boundaries; equivalent
|
|
175
|
+
azimuths use identical geometry. Ball-follow generation samples only the three
|
|
176
|
+
ball position channels. Headless output uses `tinyfly video <scene.mjs> -o <output.mp4>`.
|
|
177
|
+
Development full-page live previews use local APIs and add-ons; copied pages
|
|
178
|
+
and production previews keep versioned CDN bundles.
|
|
179
|
+
Keep `defend` in the bat-contact plays, preserving its two-hand downward block
|
|
180
|
+
and `contact` event. Pace/spin/no-ball/stumping deliveries pass outside the off
|
|
181
|
+
stump before palm collection; geometric checks must include the displayed ball
|
|
182
|
+
and stump radii. Preserve bowled's collision and stumping's later wicket break.
|
|
183
|
+
|
|
135
184
|
- Beat scripts: `npx @algorisys/tinyfly check beats.json` (or `checkBeats()`;
|
|
136
185
|
`scriptTracks()` throws on the same errors). Beats with surface places and
|
|
137
186
|
cues: `checkSurfaceBeats(beats, surfaces)` (`surfaceScript()` throws on the
|