@algorisys/tinyfly 0.100.0 → 0.101.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.
Files changed (58) hide show
  1. package/README.md +5 -5
  2. package/bin/tinyfly.mjs +7 -3
  3. package/docs/character-appearance.md +26 -0
  4. package/docs/editor-guide.md +1 -1
  5. package/docs/examples.md +1 -1
  6. package/docs/getting-started.md +1 -1
  7. package/docs/gsap-compat.md +1 -1
  8. package/docs/llm-guide.md +14 -2
  9. package/docs/maps.md +2 -2
  10. package/docs/scene-3d.md +23 -4
  11. package/docs/teaching.md +1 -1
  12. package/docs/video-rendering.md +154 -0
  13. package/lib/addons/adapters.js +387 -333
  14. package/lib/addons/characters.js +4467 -4448
  15. package/lib/addons/load-scene-oWNsYYC1.js +372 -0
  16. package/lib/addons/scene-3d-webgl.js +1 -1
  17. package/lib/addons/scene-3d.js +323 -277
  18. package/lib/addons/shading-0lPgnXmD.js +96 -0
  19. package/lib/browser/tinyfly-scene-3d.iife.js +2 -2
  20. package/lib/browser/tinyfly.iife.js +14 -14
  21. package/lib/browser/tinyfly.js +5888 -5511
  22. package/lib/browser/tinyfly.umd.js +14 -14
  23. package/lib/engine/tinyfly-engine.js +1389 -1031
  24. package/lib/engine/tinyfly-engine.umd.cjs +2 -2
  25. package/lib/headless/headless.js +39 -0
  26. package/lib/types/adapters/canvas/impossible.d.ts +15 -0
  27. package/lib/types/adapters/canvas/index.d.ts +3 -0
  28. package/lib/types/adapters/canvas/nested-zoom.d.ts +40 -0
  29. package/lib/types/adapters/canvas/zoom-blur.d.ts +49 -0
  30. package/lib/types/characters/character.d.ts +23 -3
  31. package/lib/types/characters/head/face.d.ts +19 -2
  32. package/lib/types/engine/authoring/beat-loop.d.ts +46 -0
  33. package/lib/types/engine/authoring/curve.d.ts +26 -0
  34. package/lib/types/engine/authoring/index.d.ts +3 -0
  35. package/lib/types/engine/authoring/periodic.d.ts +89 -0
  36. package/lib/types/engine/path/goo.d.ts +103 -0
  37. package/lib/types/engine/path/impossible.d.ts +92 -0
  38. package/lib/types/engine/path/index.d.ts +6 -0
  39. package/lib/types/engine/path/similarity.d.ts +48 -0
  40. package/lib/types/headless/index.d.ts +1 -0
  41. package/lib/types/headless/loop-audio.d.ts +21 -0
  42. package/lib/types/headless/node-audio.d.ts +20 -0
  43. package/lib/types/headless/video-scene.d.ts +9 -0
  44. package/lib/types/scene-3d/camera.d.ts +11 -2
  45. package/lib/types/scene-3d/geometry/mesh.d.ts +2 -0
  46. package/lib/types/scene-3d/geometry/primitives.d.ts +7 -0
  47. package/lib/types/scene-3d/impossible-3d.d.ts +29 -0
  48. package/lib/types/scene-3d/index.d.ts +4 -3
  49. package/lib/types/scene-3d/resolve-scene.d.ts +13 -1
  50. package/lib/types/scene-3d/scene-3d-adapter.d.ts +2 -0
  51. package/lib/types/scene-3d/scene-types.d.ts +29 -4
  52. package/lib/types/scene-3d/shading.d.ts +2 -0
  53. package/llms-full.txt +226 -15
  54. package/llms.txt +29 -29
  55. package/package.json +1 -1
  56. package/skills/tinyfly/SKILL.md +7 -0
  57. package/lib/addons/load-scene-CQvcFWGJ.js +0 -331
  58. package/lib/addons/shading-o5T_v9DT.js +0 -89
@@ -13,6 +13,8 @@ export declare function parseColor(color: string): Rgb;
13
13
  export declare function lightAt(p: Vec3, n: Vec3, lights: ResolvedLight[]): Rgb;
14
14
  /** How much fog covers a point `distance` metres from the camera, 0..1. */
15
15
  export declare function fogAmount(fog: ResolvedScene3D['fog'], distance: number): number;
16
+ /** An outline's colour at a distance: faded toward the fog's colour like the surfaces it edges. */
17
+ export declare function inkColor(color: string, fog: ResolvedScene3D['fog'], distance: number): string;
16
18
  /** The fill of one triangle: a CSS colour and its opacity. */
17
19
  export declare function shadeTriangle(triangle: DrawTriangle, lights: ResolvedLight[], camera: ResolvedCamera, fog?: ResolvedScene3D['fog']): {
18
20
  color: string;
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.100.0/cdn/tinyfly.iife.js"></script>
207
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.101.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.100.0/cdn/tinyfly.iife.js"></script>
415
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.101.0/cdn/tinyfly.iife.js"></script>
416
416
  <script>
417
417
  tinyfly.to('.box', { x: 200, duration: 1 })
418
418
  </script>
@@ -2278,7 +2278,7 @@ For simple website embedding without a build system.
2278
2278
  </html>
2279
2279
  ```
2280
2280
 
2281
- 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.100.0/cdn/tinyfly-player.iife.js`.
2281
+ 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.101.0/cdn/tinyfly-player.iife.js`.
2282
2282
 
2283
2283
  ---
2284
2284
 
@@ -6536,7 +6536,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
6536
6536
  **Steps to embed:**
6537
6537
  1. Build the player: `npm run build:player`
6538
6538
  2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
6539
- `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly-player.iife.js`
6539
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.101.0/cdn/tinyfly-player.iife.js`
6540
6540
  instead; see [Deployment](DEPLOYMENT.md))
6541
6541
  3. Copy the generated code into your HTML
6542
6542
  4. Adjust the script `src` path if needed
@@ -7752,8 +7752,11 @@ code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
7752
7752
  from. Age is hair, glasses and clothes, never a stoop; a `cane` in a hand or
7753
7753
  a `wheelchair()` to ride (`RIDING_POSES.wheeling`) is an accessory any
7754
7754
  character can have. Expressions come from `HUMAN_EXPRESSIONS`
7755
- and are pose fields, as are the face marks `blush`, `tears` and `sweat` (0–1),
7756
- so any face goes with any action or view. Hair and hats turn with the head:
7755
+ and are pose fields, as are the face marks `blush`, `tears` and `sweat` (0–1)
7756
+ and the close-up fields `pupil`, `lid` and `bulge`, so any face goes with any
7757
+ action or view; `drawCharacterHead(ctx, who, pose, { x, y, radius })` draws
7758
+ just the head big, and `face: { nose, inPupil }` adds a nose and a drawing in
7759
+ the pupils. Hair and hats turn with the head:
7757
7760
  don't draw a different hairstyle per view. Hanging hair swings on its own:
7758
7761
  after the character's tracks add `hairFollowTracks(target, tracks, who)` (or,
7759
7762
  posing per frame, `hairFollow` once and `hairMotionAt(keys, t)` each frame)
@@ -7834,12 +7837,21 @@ them before calling it done:
7834
7837
 
7835
7838
  ```bash
7836
7839
  npx @algorisys/tinyfly video scene.mjs --stills frames --times 0,800,1600,2400
7840
+ npx @algorisys/tinyfly video scene.mjs --loop-check # a looping video: does the frame at the duration match the first?
7837
7841
  ```
7838
7842
 
7839
7843
  A model that can read images should look at the PNGs: is the hand on the
7840
7844
  word, does the figure stand on the line, does the text land where it should?
7841
7845
  Fix, render again.
7842
7846
 
7847
+ **A video that loops** (Shorts, Reels): say `loop: true` on the scene and
7848
+ make every motion a function of `frame.time / frame.period` that repeats
7849
+ exactly: `wobble`, `loopEase`, `loopNoise` for motion, `nestedZoom` for a
7850
+ zoom that steps one level per loop, `bubblePath` with `period`, `beatPulse`
7851
+ on a tempo from `loopBeats`, and `cutAudioToLoop` for the sound. Whole
7852
+ numbers of turns and cycles only; `--loop-check` must say "closes". See the
7853
+ Loops chapter of `docs/video-rendering.md`.
7854
+
7843
7855
  ## The rules that trip models up
7844
7856
 
7845
7857
  - **Milliseconds in JSON, seconds in the GSAP-style API.** Timeline keyframes
@@ -7929,7 +7941,7 @@ path for all of that:
7929
7941
  </figure>
7930
7942
 
7931
7943
  <!-- once, anywhere on the page (a site-wide footer is fine) -->
7932
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
7944
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.101.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
7933
7945
  ```
7934
7946
 
7935
7947
  Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
@@ -8814,6 +8826,141 @@ The numbers are PSNR (higher is more alike; fast or trembling motion makes
8814
8826
  every step lower). From code: `checkLoop(scene)` returns the same report, and
8815
8827
  `psnr(a, b)` / `loopReport(frames)` work on any RGBA frames.
8816
8828
 
8829
+ ### A scene that loops
8830
+
8831
+ Say so with `loop: true`: the duration is the period. `tinyfly video` then
8832
+ runs the loop check before it encodes anything and stops (exit 1) if the loop
8833
+ does not close; every frame carries `period`, which the periodic helpers and
8834
+ 3D trails without a `period` of their own use.
8835
+
8836
+ ```js
8837
+ import { wobble, loopNoise, loopEase } from '@algorisys/tinyfly'
8838
+
8839
+ export default {
8840
+ width: 1280, height: 720, duration: 4000, loop: true,
8841
+ draw(ctx, frame) {
8842
+ const sway = wobble(frame.time, { period: frame.period, cycles: 2, amplitude: 12 }) // a sine, two whole cycles
8843
+ const drift = loopNoise(frame.time, { period: frame.period, seed: 'tree' }) * 30 // smooth noise round a circle
8844
+ const breathe = loopEase(frame.time, { period: frame.period, easing: 'ease-in-out' }) // 0 → 1 → 0, eased
8845
+ },
8846
+ }
8847
+ ```
8848
+
8849
+ | Helper | Repeats exactly every `period` |
8850
+ |---|---|
8851
+ | `wobble(t, { period, cycles, amplitude, phase, shape })` | A sine (or `triangle`, `square`) with a whole number of cycles |
8852
+ | `loopEase(t, { period, cycles, easing, phase })` | 0 → 1 → 0, the easing on the way up and mirrored down |
8853
+ | `loopNoise(t, { period, seed, cycles, octaves, phase })` | Seeded value noise read round a circle, about −1..1: the end meets the start |
8854
+ | `torusNoise(t, along, { period, periodAlong, seed, … })` | Noise periodic in time and along a length (ripples, grass, a flag) |
8855
+ | `phaseOf(t, period, cycles)`, `pingPong(u)` | The building blocks: where in the cycle, and there-and-back |
8856
+
8857
+ Each is a pure function of time, so frames render in any order and the loop
8858
+ check reports "closes", not "seamless".
8859
+
8860
+ ### Sound for a loop
8861
+
8862
+ A loop's sound must come round with its picture. `cutAudioToLoop(file, {
8863
+ output, period, crossfade, fadeIn, fadeOut })` (Node) decodes a drone, a
8864
+ riser or a beat, trims it to the period with its end blended into its start
8865
+ (tiling it first if it is shorter) and writes the WAV to pass as the scene's
8866
+ `audio`; `loopSamples` is the pure step on samples. For motion on the beat,
8867
+ `loopBeats(period, grid)` cuts a tempo to the loop (the nearest whole number
8868
+ of beats, the bpm nudged to fit exactly), `beatPulse(time, grid, { attack,
8869
+ decay, barAccent })` spikes to 1 on every beat and decays, and
8870
+ `beatPeriod(grid, beats)` is the length of so many beats. For motion that
8871
+ follows the sound itself, `audioEnvelope(samples, sampleRate, { fps,
8872
+ smoothing })` gives a level per frame (rising at once, letting go slowly,
8873
+ loudest 1) and `envelopeAt(levels, time, fps, period)` reads it at any time,
8874
+ wrapped for the loop:
8875
+
8876
+ ```js
8877
+ import { decodeAudio, cutAudioToLoop } from '@algorisys/tinyfly/headless'
8878
+ import { audioEnvelope, envelopeAt, loopBeats, beatPulse, detectTempo } from '@algorisys/tinyfly'
8879
+
8880
+ const PERIOD = 4000
8881
+ const audio = await cutAudioToLoop('drone.wav', { output: 'build/drone-loop.wav', period: PERIOD, baseDir: here })
8882
+ const samples = await decodeAudio(audio, { sampleRate: 48000 })
8883
+ const levels = audioEnvelope(samples, 48000, { fps: 30 })
8884
+ const { grid } = loopBeats(PERIOD, detectTempo(samples, 48000))
8885
+ export default {
8886
+ width: 1280, height: 720, duration: PERIOD, loop: true, audio,
8887
+ draw(ctx, frame) {
8888
+ const level = envelopeAt(levels, frame.time, 30, frame.period) // 0..1 with the sound
8889
+ const pulse = beatPulse(frame.time, grid) // 1 on each beat, decaying
8890
+ },
8891
+ }
8892
+ ```
8893
+
8894
+ ### Nested zooms (Droste)
8895
+
8896
+ A picture inside itself, the camera diving in: after one step every level is
8897
+ where the next one was, so a video one step long loops. `similarityAbout(
8898
+ scale, turn, centre)` is the step (a scale, a turn and a move as one value;
8899
+ `powSimilarity(step, k)` is a fraction of it, `composeSimilarity` chains
8900
+ them, `similarityFixedPoint` is the centre everything converges on), and
8901
+ `nestedZoom` draws the levels:
8902
+
8903
+ ```js
8904
+ import { similarityAbout } from '@algorisys/tinyfly'
8905
+ import { nestedZoom } from '@algorisys/tinyfly/adapters'
8906
+
8907
+ const step = similarityAbout(0.5, 12, { x: 640, y: 360 })
8908
+ export default {
8909
+ width: 1280, height: 720, duration: 3000, loop: true, background: '#05030c',
8910
+ draw(ctx, frame) {
8911
+ nestedZoom(ctx, {
8912
+ step,
8913
+ phase: frame.time / frame.period, // 0..1: how far into one step
8914
+ extent: 1600, // how far a level's drawing reaches at level 0, px
8915
+ coversAbove: 1.1, // a level this big fills the frame: nothing behind it is drawn
8916
+ draw(ctx, level, scale) { drawFrame(ctx, level) }, // in level-0 coordinates
8917
+ })
8918
+ },
8919
+ }
8920
+ ```
8921
+
8922
+ Levels smaller than `minSize` px (default 1) are skipped, and so is
8923
+ everything behind a level at or above `coversAbove`, so a zoom of twenty
8924
+ levels draws the five or six that show. `draw` gets the level number (0 is
8925
+ the one at natural size at phase 0, 1 the one inside it) and its screen
8926
+ scale, to keep line widths readable; colour or detail that should travel with
8927
+ the zoom is a function of `level - phase`. `examples/headless-video/nested-zoom.mjs`
8928
+ is a looping neon zoom built this way; `nestedZoomTransform(step, level,
8929
+ phase)` gives a level's similarity for drawing it some other way.
8930
+
8931
+ A Droste *face*: `drawCharacterHead` draws a character's head big, and its
8932
+ `face.inPupil` hook draws inside each pupil, clipped to it, so the head can
8933
+ hold itself (see [Close-ups](character-appearance.md#close-ups)). Anything
8934
+ that should change with a level's size on screen rather than with time (the
8935
+ eyes opening as a head grows, a colour cooling with depth) is a `curve`:
8936
+ `curve([{ at: 20, value: 0 }, { at: 300, value: 1, easing: 'ease-out' }])(radius)`
8937
+ reads keyframes and easings at any input, holding beyond its ends.
8938
+
8939
+ ### Dives and impossible objects
8940
+
8941
+ Two post-effects for a dive, both deterministic. `applyZoomBlur(ctx, { centre,
8942
+ strength, samples, blend })` streaks the finished frame out from a point (a
8943
+ fixed set of scaled copies, averaged, or added with `blend: 'add'` for neon);
8944
+ `drawDiveLines(ctx, { centre, count, inner, outer, length, phase, seed, color,
8945
+ blend })` streams seeded lines past the camera, and `phase: phaseOf(time,
8946
+ period)` moves them one line along per loop so they repeat exactly.
8947
+
8948
+ The impossible objects are built the way the sculptures are: real boxes that
8949
+ line up from one viewpoint. `penroseTriangle({ size, thickness, centre, scale })`
8950
+ and `penroseStairs({ steps, tread, rise, width, base, centre, scale })` give
8951
+ boxes and their visible faces in drawing order for the isometric view (along
8952
+ the (1, 1, 1) diagonal, z up); `drawIsometricFaces(ctx, faces, { top, left,
8953
+ right, fill, outline })` fills them. The triangle's third beam ends one
8954
+ diagonal from where the first began, so on screen the loop closes (the first
8955
+ beam is drawn again over the third's end); the stairs climb all the way round
8956
+ and the last step meets the first. `projectIsometric`, `isometricBoxFaces`
8957
+ and `isometricFaces` are the building blocks for your own. In a 3D scene,
8958
+ `penroseTriangle3D({ length, thickness, material })` returns the three beams
8959
+ and an orthographic camera down the diagonal: from it the loop closes, from
8960
+ anywhere else it is three beams (its third corner shows the beams' ends,
8961
+ as a real sculpture's does; a `rotateY` track on a group round it breaks and
8962
+ remakes the illusion).
8963
+
8817
8964
  ## Bloom
8818
8965
 
8819
8966
  `bloom: true` (or options) adds a glow around everything bright, after each
@@ -8890,6 +9037,25 @@ beads where segments overlap and no seams between them. `ribbon(points)` and
8890
9037
  `line` and `trail` objects, sorted by depth among the meshes (see
8891
9038
  [3D Scenes](scene-3d.md#lines-and-trails)).
8892
9039
 
9040
+ ## Satisfying matter
9041
+
9042
+ Goo as geometry, every shape a pure function of its inputs:
9043
+
9044
+ | Helper | Gives |
9045
+ |---|---|
9046
+ | `metaballContours(balls, { threshold, cell, smooth })` | The outlines of balls (`{ x, y, r }`) that merge through necks as they near and split as they part, as closed polygons; `metaballField` is the field itself |
9047
+ | `dripPath({ x, y, length, width, progress })` | A drip under a surface: a neck thinning to a thread and a head swelling as `progress` runs 0 → 1 |
9048
+ | `bubblePath({ x, y, r, grow, time, period, wobble })` | A bubble growing from nothing (with a little swell on the way) whose surface quivers with the time; with `period` the quiver repeats exactly |
9049
+ | `bubblePop({ x, y, r, progress, pieces })` | The pop: arcs of the rim flying out and shrinking, gone at 1 |
9050
+ | `squashStretch(amount, { keep })`, `scalePoints(points, scale, about)` | Stretch taller (or squash, negative) with the width giving way so the area (or the `volume`) stays; apply it about the point a blob lands on |
9051
+
9052
+ ```js
9053
+ draw(ctx, frame) {
9054
+ const balls = [{ x: 400, y: 300, r: 60 }, { x: 400 + wobble(frame.time, { period: frame.period, amplitude: 90 }), y: 300, r: 40 }]
9055
+ for (const loop of metaballContours(balls, { cell: 3 })) fillPolygon(ctx, loop, '#b6ff3b')
9056
+ }
9057
+ ```
9058
+
8893
9059
  ## Camera, overlay and drawing on twos
8894
9060
 
8895
9061
  - `camera: true` sees the scene through the tracks of the `Camera` target:
@@ -9004,8 +9170,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
9004
9170
  adds to the same `tinyfly` global:
9005
9171
 
9006
9172
  ```html
9007
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly.iife.js"></script>
9008
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.100.0/cdn/tinyfly-maps.iife.js"></script>
9173
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.101.0/cdn/tinyfly.iife.js"></script>
9174
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.101.0/cdn/tinyfly-maps.iife.js"></script>
9009
9175
  ```
9010
9176
 
9011
9177
  It is a separate script because the offline world map it carries adds about
@@ -9505,6 +9671,32 @@ tracks animate them): `blush` (rosy cheeks, with hatch lines past 0.5),
9505
9671
  `tears` (a drop under each eye, running down past 0.6) and `sweat` (a bead at
9506
9672
  the temple).
9507
9673
 
9674
+ ## Close-ups
9675
+
9676
+ For a face filling the frame there are three more pose fields and a bigger
9677
+ drawing:
9678
+
9679
+ - `pupil` (1 the usual size): bigger for excitement or a dive into it,
9680
+ smaller for fear. `lid` (0..1) lowers the upper lids over the eye (sleepy,
9681
+ suspicious, bored). `bulge` (0..1) pops the eyes out of the head, whites and
9682
+ all. `scared`, `afraid`, `sleepy`, `suspicious` and `excited` use them.
9683
+ - `face: { nose: true }` adds a small nose; `face: { teeth, tongue }` are
9684
+ above.
9685
+ - `drawCharacterHead(ctx, who, pose, { x, y, radius, time })` draws just the
9686
+ head (hair, hat, glasses, ears, the face), its centre at `x`, `y` and its
9687
+ radius `radius` px, in the character's look with the line weight scaled to
9688
+ the size. The pose turns and nods it and sets the face.
9689
+ - `face: { inPupil(ctx, pupil) }` draws inside each pupil, the context
9690
+ clipped to its circle on screen (`{ x, y, r, side }`): another scene, or the
9691
+ same head again for a Droste face:
9692
+
9693
+ ```js
9694
+ function head(ctx, x, y, r, depth = 0) {
9695
+ const who = character({ hair: 'spiky', face: { nose: true, inPupil: depth < 4 ? (c, p) => head(c, p.x, p.y, p.r, depth + 1) : undefined } })
9696
+ drawCharacterHead(ctx, who, humanPose({ bulge: 0.9, pupil: 1.5 }), { x, y, radius: r })
9697
+ }
9698
+ ```
9699
+
9508
9700
  ## Everyday actions, held items and meeting hands
9509
9701
 
9510
9702
  The motion and everyday-life sheets add poses to `HUMAN_POSES`: `sleep`,
@@ -10732,7 +10924,7 @@ number or three), `parent` (an earlier object it moves with), `visible`, and
10732
10924
  |---|---|
10733
10925
  | `group` | (just a transform: move several objects together, or carry a camera) |
10734
10926
  | `mesh` | `geometry`, `material` (a key of `materials`) |
10735
- | `camera` | `projection: 'perspective'` with `fov` (vertical, degrees), or `'orthographic'` with `height` (metres); `near`, `far`; optional `lookAt: [x, y, z]` |
10927
+ | `camera` | `projection: 'perspective'` with `fov` (vertical, degrees), or `'orthographic'` with `height` (metres); `near`, `far`; optional `lookAt: [x, y, z]`, `up` (which way is up for it, default +y) and `roll` (degrees about the view axis, clockwise on screen) |
10736
10928
  | `light` | `light: 'ambient' \| 'directional' \| 'point' \| 'spot'`, `color`, `intensity` (1 is full light); directional and spot shine from their position toward `target` (default the origin); point and spot fade to nothing at `range`; spot's cone is `angle` (half-angle, default 30°) |
10737
10929
 
10738
10930
  **Geometry**: `box` (`size: [w, h, d]`), `sphere` (`radius`, `segments`),
@@ -10742,7 +10934,11 @@ facing up, `segments` per side), and `extrude`: any SVG `path` made solid,
10742
10934
  `depth` metres thick and scaled to `width` metres wide (default 1), with
10743
10935
  `curveSegments` points per curve (default 12). Subpaths inside others are
10744
10936
  holes (an "o", a ring); outlines inside holes are solid again. The path's y
10745
- (down) is flipped to 3D's y (up). All centred on the origin.
10937
+ (down) is flipped to 3D's y (up). All centred on the origin. A raw `mesh`
10938
+ takes `positions` (flat x, y, z runs), `indices` (triples, counter-clockwise
10939
+ from outside), optional `normals` per vertex (flat ones are computed) and
10940
+ `colors`, one per face or one per vertex (blended per face), over the
10941
+ material's colour: warped beams, terrain, anything exported from a tool.
10746
10942
 
10747
10943
  ```js
10748
10944
  { id: 'star', kind: 'mesh', material: 'gold',
@@ -10768,7 +10964,9 @@ milestone); the stylized renderers ignore them, so one material serves both.
10768
10964
 
10769
10965
  The scene can have `background` and `fog: { color, near, far }` (metres from
10770
10966
  the camera). A scene with no lights gets a soft default (ambient plus a key
10771
- light from upper right).
10967
+ light from upper right). Outlines fade into the fog too. `nearFade: { from, to }` fades geometry
10968
+ nearer the camera than `to` metres, gone at `from`, so a dive passes through
10969
+ things as if they were glass (also an option of `resolveScene3D`).
10772
10970
 
10773
10971
  ## Animating it
10774
10972
 
@@ -10783,8 +10981,9 @@ live in the same timeline as everything else.
10783
10981
  | `visible` | any object | 0 or 1 (children hide with their parent) |
10784
10982
  | `opacity` | meshes | 0..1, times the material's |
10785
10983
  | `color` | meshes, lights | a colour, over the material's or light's |
10984
+ | `outlineWidth`, `outlineColor` | meshes | px and a colour, over the material's outline (0 switches it off) |
10786
10985
  | `intensity`, `target` | lights | |
10787
- | `fov` / `height`, `lookAt` | cameras | |
10986
+ | `fov` / `height`, `lookAt`, `roll` | cameras | |
10788
10987
  | `color`, `width`, `opacity` | lines, trails | |
10789
10988
  | `length` | trails | ms |
10790
10989
  | `activeCamera` | the scene, target `<sceneId>` | a camera's id: **a cut is one keyframe** |
@@ -11069,6 +11268,18 @@ objects, prepares them once, and each frame returns meshes (shaded and sorted
11069
11268
  with the scene's) and drawables (drawn whole at their depth). Pass it in
11070
11269
  `loadScene3D(scene, { kinds })`.
11071
11270
 
11271
+ ## Impossible objects
11272
+
11273
+ `penroseTriangle3D({ length, thickness, material, id, position, distance })`
11274
+ returns three box objects (beams along x, up y and along z, each starting
11275
+ where the last ends) and an orthographic camera on the (1, 1, 1) diagonal
11276
+ from which the third beam's end meets the first's start on screen. Add the
11277
+ objects with a material of that name and the camera, or place your own camera
11278
+ along the diagonal; from anywhere else the loop is open. The third corner
11279
+ shows the beams' ends as a real sculpture's does. For a clean drawing see the
11280
+ 2D `penroseTriangle` and `penroseStairs` in
11281
+ [Video from code](video-rendering.md#dives-and-impossible-objects).
11282
+
11072
11283
  ## The WebGL2 renderer
11073
11284
 
11074
11285
  `@algorisys/tinyfly/scene-3d/webgl` (`tinyfly-scene-3d-webgl.iife.js` for
@@ -13554,7 +13765,7 @@ magnet.addEventListener('pointerleave', () => {
13554
13765
 
13555
13766
  <!-- capabilities: generated from the library -->
13556
13767
 
13557
- # tinyfly capabilities (v0.100.0)
13768
+ # tinyfly capabilities (v0.101.0)
13558
13769
 
13559
13770
  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).
13560
13771
 
@@ -13840,7 +14051,7 @@ Appearance options of `character({ … })`, all plain data that turns with the h
13840
14051
  - `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`
13841
14052
  - `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 }`
13842
14053
  - `castMember(name, height)`: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`, `grandma`, `doctor`, `cook`, `builder`, `courier`, `teacher`, `farmer`
13843
- - Face marks (pose fields, 0–1): `blush`, `tears`, `sweat`
14054
+ - 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
13844
14055
  - 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
13845
14056
  - `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)`
13846
14057
  - `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.100.0/llms-full.txt)
16
+ All documentation and the interactive course in a single file: [llms-full.txt](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.0/llms-full.txt)
17
17
 
18
18
  ## Start here
19
19
 
20
- - [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.100.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.100.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.100.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.
23
- - [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.100.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.
20
+ - [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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.101.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.101.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.
23
+ - [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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.100.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.100.0/docs/file-format.md): The JSON animation format: timelines, every track kind, keyframes, easing and the project file — for generating or consuming animations.
27
+ - [API Reference](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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.101.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.100.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.100.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.100.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.100.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.100.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.100.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.100.0/docs/sprite-sheet-export.md): Exporting frames as a PNG grid plus JSON metadata for game engines and canvas players.
32
+ - [Editor Guide](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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.101.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.101.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.101.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.101.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.101.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.101.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.100.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.100.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.100.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.100.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.100.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.100.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.100.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.100.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.100.0/docs/dance.md): The stick figure dances disco, hip hop, breaking, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap (with tap sounds) and popping (side glide, moonwalk), and does front, back, layout and scissor flips, cartwheels, handsprings, split leaps and full splits: wrists, ankles, turn-out, spin and rise as pose fields; moves keyed in beats; styles, grooves and routines as plain data.
51
- - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.100.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 scenes, dancing, in their pen looks or as solid figures, seen by any camera.
52
- - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.100.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.100.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.100.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
42
+ - [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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.101.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.101.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.101.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.101.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.101.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.101.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.101.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.101.0/docs/dance.md): The stick figure dances disco, hip hop, breaking, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap (with tap sounds) and popping (side glide, moonwalk), and does front, back, layout and scissor flips, cartwheels, handsprings, split leaps and full splits: wrists, ankles, turn-out, spin and rise as pose fields; moves keyed in beats; styles, grooves and routines as plain data.
51
+ - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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 scenes, dancing, in their pen looks or as solid figures, seen by any camera.
52
+ - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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.101.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.101.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.100.0/README.md): Feature overview, project layout and development setup.
59
- - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.100.0/release-notes/README.md): What changed in each version.
58
+ - [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.0/README.md): Feature overview, project layout and development setup.
59
+ - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.101.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.100.0",
3
+ "version": "0.101.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",
@@ -114,3 +114,10 @@ npx @algorisys/tinyfly video scene.mjs --stills frames --times 0,800,1600
114
114
  Check that hands meet what they touch, figures face and point the right
115
115
  way, stand on their floors (and ride bars as they grow), text lands where it
116
116
  should and nothing leaves the frame. Fix and render again.
117
+
118
+ For a video that loops, set `loop: true` on the scene and drive every motion
119
+ from `frame.time / frame.period` with helpers that repeat exactly (`wobble`,
120
+ `loopEase`, `loopNoise`, `nestedZoom`, `beatPulse` on `loopBeats`,
121
+ `bubblePath` with `period`; sound via `cutAudioToLoop`), whole turns and
122
+ cycles only; then `npx @algorisys/tinyfly video scene.mjs --loop-check` must
123
+ say "closes".