@algorisys/tinyfly 0.87.0 → 0.88.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 +5 -4
- package/lib/addons/adapters.js +370 -310
- package/lib/addons/characters.js +1 -1
- package/lib/addons/load-scene-CQvcFWGJ.js +331 -0
- package/lib/addons/scene-3d.js +299 -215
- package/lib/browser/tinyfly-scene-3d.iife.js +2 -2
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +2968 -2866
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/engine/tinyfly-engine.js +149 -106
- package/lib/engine/tinyfly-engine.umd.cjs +2 -2
- package/lib/headless/headless.js +3 -1
- package/lib/types/adapters/canvas/index.d.ts +1 -0
- package/lib/types/adapters/canvas/trail.d.ts +57 -0
- package/lib/types/browser/index.d.ts +2 -0
- package/lib/types/engine/path/index.d.ts +2 -0
- package/lib/types/engine/path/trail.d.ts +79 -0
- package/lib/types/headless/video-scene.d.ts +2 -0
- package/lib/types/scene-3d/resolve-scene.d.ts +6 -0
- package/lib/types/scene-3d/scene-3d-adapter.d.ts +9 -1
- package/lib/types/scene-3d/scene-types.d.ts +40 -1
- package/lib/types/scene-3d/strokes.d.ts +30 -0
- package/package.json +1 -1
- package/lib/addons/load-scene-vp14_Jj-.js +0 -324
package/README.md
CHANGED
|
@@ -98,6 +98,7 @@ A lightweight, API-driven animation engine and visual editor for creating high-p
|
|
|
98
98
|
- **Pen tool** - ✒️ Draw custom bezier paths: click for corners, click-drag for curves (Alt for a cusp), drag existing anchors/handles to adjust, snap points to grid/guides, click the first point or Enter to finish
|
|
99
99
|
- **Loop check** - `tinyfly video scene.mjs --loop-check` renders five frames and says whether a video loops: whether the frame at the duration matches the first, and whether the last → first seam looks like any other step (exit 1 when it does not). `--frames 0,79,88` renders stills at chosen frames. See [docs/video-rendering.md](docs/video-rendering.md#loops)
|
|
100
100
|
- **Bloom** - `bloom: true` on a video scene adds a deterministic glow around bright things (bright pass, blur, add; no `ctx.filter`), and 3D materials take `emissive` light that shines in the dark and feeds it. `applyBloom(ctx)` works on any 2D canvas. See [docs/video-rendering.md](docs/video-rendering.md#bloom)
|
|
101
|
+
- **Light trails** - `trailSamples` + `drawTrail` draw comets and light streaks on any 2D canvas: a tapering, fading band with a round head, smooth at any speed, and deterministic (the trail is where the thing was, asked of the timeline, not a frame history). 3D scenes get `line` and `trail` objects whose segments sort by depth among the meshes. See [docs/video-rendering.md](docs/video-rendering.md#light-trails) and [docs/scene-3d.md](docs/scene-3d.md#lines-and-trails)
|
|
101
102
|
- **3D scenes** - `@algorisys/tinyfly/scene-3d`: cameras, lights and meshes (box, sphere, cylinder, cone, torus, floor, any SVG path extruded) as JSON in metres, animated by ordinary tracks (`stage/box`), cut between cameras with one keyframe, drawn on a plain canvas with flat, smooth or toon shading, ink outlines and fog: in the browser, in Workers, and to MP4 in Node. Characters stand in scenes and dance, seen by any camera, in their pen looks (clean, pencil) or as solid figures (`characterObjects`). In the editor, a 🧊 3D Scene element builds them without code: add shapes, characters and lights, key them, dance from the playhead, cut between cameras. No WebGL needed (about 7 KB gzipped, its own entry and CDN script); for big or tangled scenes the optional WebGL2 renderer (`@algorisys/tinyfly/scene-3d/webgl`) adds a depth buffer and light per pixel. See [docs/scene-3d.md](docs/scene-3d.md)
|
|
102
103
|
- **3D transforms** - Cards, images, text and shapes turn in 3D (`rotateX`, `rotateY`, `z`, `perspective`, `backfaceVisibility`) and land on the same pixels in DOM, SVG, Canvas (true perspective, also headless) and WebGL, checked against each browser's own CSS. One documented transform order everywhere; Tilt / Turn / Depth / Perspective fields in the editor; 3D Card Flip and Cover Flow samples. Quaternion tracks with `interpolation: "slerp"` turn without gimbal lock; the engine's `vec3`, `quat` and `mat4` helpers are plain arrays. The first steps of [3D support](docs/3d-support-plan.md). See [docs/3d-rotations.md](docs/3d-rotations.md)
|
|
103
104
|
- **Shape morph** - 🌀 Tween one path into another over the timeline (engine-level path interpolation); plays in every renderer, export, and embed
|
|
@@ -234,7 +235,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
|
|
|
234
235
|
itself.
|
|
235
236
|
|
|
236
237
|
```html
|
|
237
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
238
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.88.0/cdn/tinyfly.iife.js"></script>
|
|
238
239
|
<script>
|
|
239
240
|
tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
|
|
240
241
|
|
|
@@ -270,7 +271,7 @@ A teaching figure needs no code at all:
|
|
|
270
271
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
|
|
271
272
|
<figcaption>Appending to a full slice</figcaption>
|
|
272
273
|
</figure>
|
|
273
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
274
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.88.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
|
|
274
275
|
```
|
|
275
276
|
|
|
276
277
|
See [Teaching Animations](docs/teaching.md).
|
|
@@ -369,7 +370,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
|
|
|
369
370
|
<div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
|
|
370
371
|
</div>
|
|
371
372
|
|
|
372
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
373
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.88.0/cdn/tinyfly-player.iife.js"></script>
|
|
373
374
|
<script>
|
|
374
375
|
tinyfly.play('#animation', './animation.json', { loop: -1 })
|
|
375
376
|
</script>
|
|
@@ -478,7 +479,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
|
|
|
478
479
|
<svg viewBox="0 0 720 200">…</svg>
|
|
479
480
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
|
|
480
481
|
</figure>
|
|
481
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
482
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.88.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
482
483
|
```
|
|
483
484
|
|
|
484
485
|
### Audio / Video Sync
|