@algorisys/tinyfly 0.76.0 → 0.78.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 -6
- package/lib/addons/adapters.js +2 -2
- package/lib/addons/characters.js +1205 -416
- package/lib/addons/maps.js +442 -0
- package/lib/addons/{sketch-CB6VNfnR.js → sketch-CA8ZXhxI.js} +2 -2
- package/lib/browser/tinyfly-maps.iife.js +1 -0
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +3715 -2927
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/types/characters/character.d.ts +165 -0
- package/lib/types/characters/head/face.d.ts +17 -0
- package/lib/types/characters/index.d.ts +5 -0
- package/lib/types/characters/look/curves.d.ts +7 -0
- package/lib/types/characters/look/pen.d.ts +59 -0
- package/lib/types/characters/look/tapered-line.d.ts +13 -0
- package/lib/types/characters/rig/body-plan.d.ts +89 -0
- package/lib/types/characters/rig/reach.d.ts +11 -0
- package/lib/types/characters/rig/skeleton.d.ts +71 -0
- package/lib/types/characters/species/human.d.ts +59 -0
- package/lib/types/characters/stick-figure.d.ts +6 -13
- package/lib/types/characters/wardrobe/basic-outfit.d.ts +14 -0
- package/lib/types/maps/cities.d.ts +13 -0
- package/lib/types/maps/index.d.ts +12 -0
- package/lib/types/maps/map-target.d.ts +125 -0
- package/lib/types/maps/projection.d.ts +66 -0
- package/lib/types/maps/tiles.d.ts +67 -0
- package/lib/types/maps/world-110m.d.ts +13 -0
- package/lib/types/maps/world.d.ts +53 -0
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -49,7 +49,8 @@ A lightweight, API-driven animation engine and visual editor for creating high-p
|
|
|
49
49
|
- **Code-drawn targets** - A `custom` canvas target draws with code (characters, charts, props) while the timeline animates its position, opacity and its own `props`, so drawing stays code and timing stays JSON
|
|
50
50
|
- **Immediate mode too** - A scene's `background` and `draw(ctx, { time })` functions paint each frame directly, Cairo/Processing-style, and mix freely with timeline targets
|
|
51
51
|
- **Timing from narration** - `planNarration()` lays spoken lines out from their clip lengths (lead, gap, tail) into cues, scene spans and markers; `voiceNarration()` measures recorded clips with ffmpeg and writes the sample-aligned narration WAV
|
|
52
|
-
- **Characters** - A poseable stick figure (`@algorisys/tinyfly/characters`): named poses, facial expressions (brows, eyes that widen, close and look around, mouth shapes), squash and stretch, rubber-hose limbs, blending, walk cycles and talking, all driven by timeline tracks
|
|
52
|
+
- **Characters** - A poseable stick figure (`@algorisys/tinyfly/characters`): named poses, facial expressions (brows, eyes that widen, close and look around, mouth shapes), squash and stretch, rubber-hose limbs, blending, walk cycles and talking, all driven by timeline tracks. **Characters v2**: one skeleton in 3D drawn flat, turning front to side to back, resting on whatever touches the ground, reaching for points, in clean, pencil or silhouette looks, and a 🧍 Character element in the editor you pose and keyframe
|
|
53
|
+
- **Maps** - Animated maps on OpenStreetMap tiles or an offline world outline (also in pencil): the camera flies in, pins drop, routes draw themselves while a marker travels them; a 🗺 Map element in the editor with a one-click trip
|
|
53
54
|
- **Pencil sketch style** - Hand-drawn strokes with line boil (`sketch` style, `sketchPen`) for a pencil-test, Pencilmation-like look, on the stick figure and on canvas rect / circle / line / path shapes (also from the editor's Properties panel); a `drawOn` track draws any of those shapes on; the wobble is seeded by time, so renders stay deterministic
|
|
54
55
|
- **The drawing hand** - `drawnPathTarget()` draws a sketched stroke on from a `draw` track while a cartoon hand holds the pencil at its end; the same hand can hold the eraser
|
|
55
56
|
- **Erasing** - An eraser rubs out part of a target (`erasable()`, animated by an `erase` track) or of anything drawn in code (`withErased()`); clip-based, so it works in the browser and headless alike
|
|
@@ -172,7 +173,8 @@ for what you import:
|
|
|
172
173
|
| `@algorisys/tinyfly/embed` | Teaching embeds: the player with step controls, captions, scenarios and one-script `[data-tinyfly-embed]` mounting; `validateEmbed`, `validateScenarios`, `renderFrame` | Browser (tools anywhere) |
|
|
173
174
|
| `@algorisys/tinyfly/teach` | `lesson()` step builder and diagram primitives (cells, pointer, stack, queue, table, pipeline) | Anywhere |
|
|
174
175
|
| `@algorisys/tinyfly/react`, `@algorisys/tinyfly/vue`, `@algorisys/tinyfly/svelte`, `@algorisys/tinyfly/solid` | `useTinyfly` hooks, a Svelte action and a Solid primitive: `live` animations scoped to a component and reverted on unmount | Browser (frameworks are optional peer dependencies) |
|
|
175
|
-
| `@algorisys/tinyfly/
|
|
176
|
+
| `@algorisys/tinyfly/maps` | Animated maps: OpenStreetMap tiles or an offline world outline, places, routes that draw on, a camera that flies (`mapTarget`, `mapFlyTracks`, `fitView`, `WORLD_CITIES`) | Anywhere with a Canvas 2D context (tiles need a network) |
|
|
177
|
+
| `@algorisys/tinyfly/characters` | Poseable stick figure: `stickFigureTarget`, `poseTracks`, `POSES`, `blendPose`, `walkPose`, `drawStickFigure`; `stickFigureJoints` and `layers` for costumes, hair and props; `turn`, `sit` and ground contact; an organic look by default (`classic` keeps the old one); **characters v2**: `character()` / `characterTarget()`, turnarounds front to back, contact, reaching, clean / pencil / silhouette looks | Anywhere with a Canvas 2D context |
|
|
176
178
|
| `@algorisys/tinyfly/headless` | `renderVideo`, `renderStills`, `FrameRenderer`: render a scene to MP4 or PNGs (see [Rendering Video from Code](docs/video-rendering.md)) | Node (`@napi-rs/canvas` optional peer, ffmpeg) |
|
|
177
179
|
| `@algorisys/tinyfly/browser` | One script-tag bundle (`tinyfly.iife.js`): the engine, player, drivers, interaction, the GSAP-style `live` / `tf` facades, teaching-embed controls and mounting, and the `characters` stick figure. Not included: `export`, `adapters`, `teach`, the framework hooks, `headless` | Browser |
|
|
178
180
|
|
|
@@ -220,7 +222,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
|
|
|
220
222
|
itself.
|
|
221
223
|
|
|
222
224
|
```html
|
|
223
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
225
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.78.0/cdn/tinyfly.iife.js"></script>
|
|
224
226
|
<script>
|
|
225
227
|
tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
|
|
226
228
|
|
|
@@ -256,7 +258,7 @@ A teaching figure needs no code at all:
|
|
|
256
258
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
|
|
257
259
|
<figcaption>Appending to a full slice</figcaption>
|
|
258
260
|
</figure>
|
|
259
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
261
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.78.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
|
|
260
262
|
```
|
|
261
263
|
|
|
262
264
|
See [Teaching Animations](docs/teaching.md).
|
|
@@ -355,7 +357,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
|
|
|
355
357
|
<div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
|
|
356
358
|
</div>
|
|
357
359
|
|
|
358
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
360
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.78.0/cdn/tinyfly-player.iife.js"></script>
|
|
359
361
|
<script>
|
|
360
362
|
tinyfly.play('#animation', './animation.json', { loop: -1 })
|
|
361
363
|
</script>
|
|
@@ -464,7 +466,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
|
|
|
464
466
|
<svg viewBox="0 0 720 200">…</svg>
|
|
465
467
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
|
|
466
468
|
</figure>
|
|
467
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
469
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.78.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
468
470
|
```
|
|
469
471
|
|
|
470
472
|
### Audio / Video Sync
|
package/lib/addons/adapters.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as _, F as O, s as C, e as I } from "./dom-adapter-CrNwoomd.js";
|
|
2
2
|
import { D as ae } from "./dom-adapter-CrNwoomd.js";
|
|
3
3
|
import { createTrack as B, parsePath as L } from "@algorisys/tinyfly";
|
|
4
|
-
import { p as F, s as G } from "./sketch-
|
|
5
|
-
import { b as le,
|
|
4
|
+
import { p as F, s as G } from "./sketch-CA8ZXhxI.js";
|
|
5
|
+
import { b as le, a as he, c as fe } from "./sketch-CA8ZXhxI.js";
|
|
6
6
|
function g(c) {
|
|
7
7
|
const e = /* @__PURE__ */ new Map();
|
|
8
8
|
for (const { name: t, element: i } of c)
|