@algorisys/tinyfly 0.126.0 → 0.127.1

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.
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Zooming through scale: the signature science-explainer move (a hand →
3
+ * skin → cells → molecules → one atom). The levels are drawings, each
4
+ * `factor` times smaller than the one before; one number, the depth, drives
5
+ * them all. Level k is drawn at scale `factor ** (depth - k)` inside a
6
+ * circular portal centred on the screen, so the next level opens as a window
7
+ * in the middle of the current one and grows until it fills the frame. A
8
+ * level whose portal covers the frame stops drawing the levels behind it.
9
+ *
10
+ * Every function is pure: give it the time, it gives the same picture.
11
+ */
12
+ /** A key on a zoom or depth curve: a time (ms) and a value. */
13
+ export interface ZoomKey {
14
+ time: number;
15
+ value: number;
16
+ }
17
+ /**
18
+ * A zoom factor at `time`, interpolated in log space with an ease between
19
+ * keys (values must be > 0). Log space is what makes a dive feel steady: from
20
+ * 1x to 1000x, each tenfold step takes the same time.
21
+ */
22
+ export declare function zoomAt(time: number, keys: ReadonlyArray<ZoomKey>): number;
23
+ /** A depth (any number, e.g. 0 = the first level, 4 = the fifth) at `time`, eased between keys. */
24
+ export declare function depthAt(time: number, keys: ReadonlyArray<ZoomKey>): number;
25
+ /** Draws one level at scale 1, centred on the zoom centre, in its own coordinates. */
26
+ export type ZoomLevel = (ctx: CanvasRenderingContext2D, time: number) => void;
27
+ export interface ZoomLevelsOptions {
28
+ /** The frame, px */
29
+ width: number;
30
+ height: number;
31
+ /** The current depth: 0 shows level 0 at scale 1; 1.35 shows level 1 filling the frame */
32
+ depth: number;
33
+ /** One drawing per level, outermost first */
34
+ levels: ReadonlyArray<ZoomLevel>;
35
+ /** How many times smaller each level is than the one before (default 14) */
36
+ factor?: number;
37
+ /** The zoom centre, px (default the middle of the frame) */
38
+ center?: {
39
+ x: number;
40
+ y: number;
41
+ };
42
+ /** A level's portal radius at scale 1, px (default 520) */
43
+ portalRadius?: number;
44
+ /** Portal rim colour, or null for none (default white) */
45
+ rim?: string | null;
46
+ /** Rim width, px (default 5) */
47
+ rimWidth?: number;
48
+ }
49
+ /** Which levels are drawn at a depth and at what scale and portal radius (for tests and custom drawing). */
50
+ export declare function zoomLevelLayout(options: Omit<ZoomLevelsOptions, 'levels'> & {
51
+ levelCount: number;
52
+ }): Array<{
53
+ level: number;
54
+ scale: number;
55
+ portal: number;
56
+ }>;
57
+ /**
58
+ * Draw the levels for a depth: the outermost visible one full-frame, the
59
+ * deeper ones in growing portals at the centre. Each level draws itself at
60
+ * scale 1 around `center`; the zoom is applied for it.
61
+ */
62
+ export declare function drawZoomLevels(ctx: CanvasRenderingContext2D, time: number, options: ZoomLevelsOptions): void;
63
+ /** A glowing ring (a portal's rim, a lens edge): a wide faint stroke under a crisp one. */
64
+ export declare function drawPortalRim(ctx: CanvasRenderingContext2D, x: number, y: number, radius: number, color?: string, width?: number): void;
65
+ /** How much of a level's chip/label to show at a depth: 1 while it fills the frame, fading out as the next arrives. */
66
+ export declare function levelPresence(depth: number, level: number, settle?: number): number;
@@ -49,6 +49,7 @@ export { hairFollow, hairFollowTracks, hairMotionAt, type HairFollowSample, type
49
49
  export * from './hands';
50
50
  export * from './acting';
51
51
  export * from './noir';
52
+ export * from './cosmic';
52
53
  export * from './capabilities';
53
54
  export { describeTarget, checkTracks, animatableProperties, CANVAS_PROPERTIES, type PropertyInfo, type TargetAbout, type TargetDescription, type TrackProblem } from '../adapters/canvas/target-properties';
54
55
  export * from './props';
@@ -12,4 +12,5 @@ export * from './node-audio';
12
12
  export * from './loop-check';
13
13
  export * from './loop-audio';
14
14
  export * from './audio-mix';
15
+ export * from './sound-effects';
15
16
  export { toSRT, toWebVTT, captionCuesFromTimeline, type CaptionCue } from '../engine/export/captions';
@@ -60,10 +60,13 @@ export interface CutAudioToLoopOptions {
60
60
  * shorter), and write the WAV to pass as the scene's `audio`.
61
61
  */
62
62
  export declare function cutAudioToLoop(file: string, options: CutAudioToLoopOptions): Promise<string>;
63
- export interface MixFileLayer extends Omit<MixLayer, 'samples'> {
63
+ export type MixFileLayer = Omit<MixLayer, 'samples'> & ({
64
64
  /** The audio file, relative to `baseDir` (any format ffmpeg reads) */
65
65
  file: string;
66
- }
66
+ } | {
67
+ /** Samples already made at the mix's sample rate (e.g. soundPop(48000)) */
68
+ samples: Float32Array;
69
+ });
67
70
  export interface RenderMixOptions extends Omit<MixOptions, 'sampleRate'> {
68
71
  /** WAV file to write, relative to `baseDir` */
69
72
  output: string;
@@ -0,0 +1,36 @@
1
+ /** A filtered-noise swell for zooms, cuts and things flying past; `rise` sweeps up (false: down). */
2
+ export declare function soundWhoosh(sampleRate: number, options?: {
3
+ duration?: number;
4
+ rise?: boolean;
5
+ seed?: number;
6
+ }): Float32Array;
7
+ /** A short pitched blip for things appearing (chips, labels). */
8
+ export declare function soundPop(sampleRate: number, options?: {
9
+ frequency?: number;
10
+ duration?: number;
11
+ }): Float32Array;
12
+ /** A low hit for impacts, landings and bonks. */
13
+ export declare function soundThud(sampleRate: number, options?: {
14
+ duration?: number;
15
+ seed?: number;
16
+ }): Float32Array;
17
+ /** A bright sparkle for reveals: a few bell partials on a pentatonic-ish set of pitches. */
18
+ export declare function soundShimmer(sampleRate: number, options?: {
19
+ duration?: number;
20
+ seed?: number;
21
+ }): Float32Array;
22
+ /** A tiny click for counters ticking up. */
23
+ export declare function soundTick(sampleRate: number): Float32Array;
24
+ /** A latch snapping shut (a padlock, a switch): two short metallic transients. */
25
+ export declare function soundClick(sampleRate: number, options?: {
26
+ seed?: number;
27
+ }): Float32Array;
28
+ /**
29
+ * A slow ambient drone for under narration (a music bed without music):
30
+ * a soft chord with drifting detune and a breathing level, faded in and out.
31
+ * Mix it low (gain about 0.05 of the voice).
32
+ */
33
+ export declare function soundPad(sampleRate: number, options: {
34
+ duration: number;
35
+ seed?: number;
36
+ }): Float32Array;
package/llms-full.txt CHANGED
@@ -591,7 +591,7 @@ with a GSAP-style call (durations are in seconds here):
591
591
  ```html
592
592
  <div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
593
593
 
594
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.126.0/cdn/tinyfly.iife.js"></script>
594
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.1/cdn/tinyfly.iife.js"></script>
595
595
  <script>
596
596
  tinyfly.to('.box', { x: 200, duration: 1 })
597
597
  </script>
@@ -799,7 +799,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
799
799
  global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
800
800
 
801
801
  ```html
802
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.126.0/cdn/tinyfly.iife.js"></script>
802
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.1/cdn/tinyfly.iife.js"></script>
803
803
  <script>
804
804
  tinyfly.to('.box', { x: 200, duration: 1 })
805
805
  </script>
@@ -2725,7 +2725,7 @@ For simple website embedding without a build system.
2725
2725
  </html>
2726
2726
  ```
2727
2727
 
2728
- 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.126.0/cdn/tinyfly-player.iife.js`.
2728
+ 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.127.1/cdn/tinyfly-player.iife.js`.
2729
2729
 
2730
2730
  ---
2731
2731
 
@@ -7079,7 +7079,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
7079
7079
  **Steps to embed:**
7080
7080
  1. Build the player: `npm run build:player`
7081
7081
  2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
7082
- `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.126.0/cdn/tinyfly-player.iife.js`
7082
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.1/cdn/tinyfly-player.iife.js`
7083
7083
  instead; see [Deployment](DEPLOYMENT.md))
7084
7084
  3. Copy the generated code into your HTML
7085
7085
  4. Adjust the script `src` path if needed
@@ -8462,6 +8462,13 @@ lines (`bean: { limbs: 'tube' | 'line' }`), a shaped body (`bean.torso` fullness
8462
8462
  Household clothes on a bean: `bean: { skirt: '#c2410c' }` (a sari to the ankle) or
8463
8463
  `skirt: { color, length: 0.45 }` (a kurta hem; pair it with `trousers`), `drape` (a pallu or dupatta sash)
8464
8464
  and `bangles`; preset `beanSari`. The skirt follows the legs (flared standing, along the thighs seated).
8465
+ For science explainers use the cosmic kit (docs/cosmic-explainer.md): `drawSkyGradient` (one sky per scene),
8466
+ `drawDust` and `drawBokeh` (always on; pass the camera `offset`), flat-shaded `drawShadedBall`, `drawIsoCube`,
8467
+ `drawHaze`; a dive through scale with `drawZoomLevels(ctx, time, { width, height, depth: depthAt(time, keys), levels })`
8468
+ (each level function draws itself at scale 1 around the centre; put each level's arrival on the word that names it);
8469
+ burned-in `drawShortCaption(ctx, time, { lines, x, y })` and `drawLabelChip`. Sound effects come from
8470
+ tinyfly/headless (`soundWhoosh`, `soundPop`, `soundThud`, `soundShimmer`, `soundTick`, `soundClick`, `soundPad`)
8471
+ as `renderMix` layers `{ samples, at, gain }`; no files needed.
8465
8472
  For detective / noir scenes use the canvas kit (docs/noir-detective.md): `drawRain(ctx, time, box)`,
8466
8473
  `drawBlinds`, `drawDarkness(ctx, { amount, cones: [{ x, y, angle /* degrees */, length, width }], holes })`,
8467
8474
  `drawGlow`, `drawVignette`, `drawClueMarker(ctx, time, { x, y, at })`, `drawNameCard(ctx, time, { name, role, at, anchor })`,
@@ -8734,7 +8741,7 @@ path for all of that:
8734
8741
  </figure>
8735
8742
 
8736
8743
  <!-- once, anywhere on the page (a site-wide footer is fine) -->
8737
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.126.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
8744
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.1/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
8738
8745
  ```
8739
8746
 
8740
8747
  Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
@@ -9320,7 +9327,7 @@ lesson's step options (`duration`, `easing`, `delay`).
9320
9327
  <figcaption>The determinant is the area of the unit square after the map.</figcaption>
9321
9328
  </figure>
9322
9329
 
9323
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.126.0/cdn/tinyfly-math.iife.js" data-tinyfly-auto></script>
9330
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.1/cdn/tinyfly-math.iife.js" data-tinyfly-auto></script>
9324
9331
  ```
9325
9332
 
9326
9333
  The figure draws itself into an SVG and redraws from the timeline whenever the
@@ -10454,8 +10461,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
10454
10461
  adds to the same `tinyfly` global:
10455
10462
 
10456
10463
  ```html
10457
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.126.0/cdn/tinyfly.iife.js"></script>
10458
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.126.0/cdn/tinyfly-maps.iife.js"></script>
10464
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.1/cdn/tinyfly.iife.js"></script>
10465
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.127.1/cdn/tinyfly-maps.iife.js"></script>
10459
10466
  ```
10460
10467
 
10461
10468
  It is a separate script because the offline world map it carries adds about
@@ -10800,6 +10807,144 @@ figure's head from `characterJoints`.
10800
10807
 
10801
10808
  ---
10802
10809
 
10810
+ <!-- docs/cosmic-explainer.md -->
10811
+
10812
+ # Cosmic Explainer Scenes
10813
+
10814
+ A kit for animated science explainers in the bright, flat, glowing look of
10815
+ popular science channels: a saturated gradient sky per scene, drifting dust
10816
+ and soft bokeh for depth, flat-shaded shapes with no outlines (a sphere with a
10817
+ shadow crescent and a highlight, an isometric cube, a probability haze),
10818
+ zooming through scale with growing portals (a hand → skin → cells → one atom),
10819
+ burned-in short captions two words at a time, label chips, and sound effects
10820
+ made from numbers.
10821
+
10822
+ Every function draws on a Canvas 2D context, takes the time in ms and plain
10823
+ options, and draws the same thing for the same input: particles sit where a
10824
+ hash of their index puts them, never `Math.random`, so a frame looks the same
10825
+ whether it is rendered in order, out of order or scrubbed to. Text is yours
10826
+ (any script that separates words with spaces, Devanagari included) and so are
10827
+ the fonts. Pair it with the noir kit's `drawGlow` and `drawVignette`, the
10828
+ scene's `bloom`, and the characters.
10829
+
10830
+ ```js
10831
+ import { drawSkyGradient, drawDust, drawBokeh, drawShadedBall, drawHaze, drawZoomLevels,
10832
+ depthAt, levelPresence, drawShortCaption, drawLabelChip, drawGlow } from '@algorisys/tinyfly/characters'
10833
+
10834
+ const dive = [{ time: 1800, value: 0 }, { time: 3400, value: 1.35 }, { time: 5400, value: 2.35 }]
10835
+ const atom = (ctx, time) => {
10836
+ drawSkyGradient(ctx, { width: 720, height: 1280, sky: 'space' })
10837
+ drawHaze(ctx, time, { x: 360, y: 576, radius: 120 })
10838
+ drawGlow(ctx, { x: 360, y: 576, radius: 60, color: '#fb923c' })
10839
+ }
10840
+
10841
+ function frame(ctx, time) {
10842
+ const depth = depthAt(time, dive)
10843
+ drawZoomLevels(ctx, time, { width: 720, height: 1280, depth, levels: [hand, cells, atom], center: { x: 360, y: 576 } })
10844
+ drawBokeh(ctx, time, { width: 720, height: 1280, offset: { x: depth * 40, y: 0 } })
10845
+ drawDust(ctx, time, { width: 720, height: 1280, offset: { x: depth * 60, y: 0 } })
10846
+ if (levelPresence(depth, 2) > 0.5) drawLabelChip(ctx, time, { text: 'one atom', x: 360, y: 150, at: 5150 })
10847
+ drawShortCaption(ctx, time, { lines: narrationCues, x: 360, y: 920 })
10848
+ }
10849
+ ```
10850
+
10851
+ `examples/headless-video/cosmic-explainer.mjs` is a whole 9:16 short built
10852
+ this way, with its sound mix made entirely from the generators, and the
10853
+ [Cosmic Dive](https://tinyfly.app/examples/live-cosmic-dive) example plays the
10854
+ same dive at 16:9 in the browser (pause and scrub it).
10855
+
10856
+ ## Skies and depth
10857
+
10858
+ | Function | Draws |
10859
+ |---|---|
10860
+ | `drawSkyGradient(ctx, { width, height, sky?, top?, bottom? })` | A vertical gradient filling the frame. `sky` is one of `COSMIC_SKIES`: `space`, `micro`, `magenta`, `cyan`, `lime`, `sunset`, `ocean`; or give `top` and `bottom`. An unknown name throws with the list. |
10861
+ | `drawDust(ctx, time, { width, height, count?, color?, opacity?, size?, drift?, offset?, seed? })` | Twinkling specks in three parallax depths, wrapping round the frame. `drift` is px per second for the nearest layer; `offset` is the camera's shift (far specks move less). |
10862
+ | `drawBokeh(ctx, time, { width, height, count?, color?, opacity?, minRadius?, maxRadius?, drift?, offset?, seed? })` | Big soft out-of-focus discs drifting across (foreground depth); they move 1.6× the camera offset. |
10863
+
10864
+ Give each scene a different sky, so a scene change reads even without a hard
10865
+ cut, and keep dust and bokeh in every shot, so no frame is ever still.
10866
+
10867
+ ## Flat-shaded shapes
10868
+
10869
+ | Function | Draws |
10870
+ |---|---|
10871
+ | `drawShadedBall(ctx, { x, y, radius, color, light?, shadow?, highlight?, opacity? })` | A sphere: the base fill, a darker crescent away from `light` (each axis −1..1, default top left), a small white highlight. No outline. |
10872
+ | `drawIsoCube(ctx, { x, y, size, color, opacity?, sheen? })` | An isometric cube: lit top, a mid left face, a dark right face, an optional sparkle. `isoCubeFaces` gives the three polygons. |
10873
+ | `drawHaze(ctx, time, { x, y, radius, color?, dots?, dot?, opacity?, squash?, spin?, seed? })` | A probability cloud of flickering dots, densest on a ring at `radius` (an electron shell). |
10874
+ | `cosmicShade(color, amount, alpha?)` | The colour toward black (`amount` < 0) or white (> 0): the flat-shading palette from one base colour. |
10875
+
10876
+ Colours are `#rgb`, `#rrggbb` or `rgb()`; anything else throws, since the kit
10877
+ has to shade it.
10878
+
10879
+ ## Zooming through scale
10880
+
10881
+ The signature move: a dive from something you know down through levels of
10882
+ scale. The levels are drawings, each `factor` times smaller than the one
10883
+ before (default 14); one number, the **depth**, drives them all. Level *k* is
10884
+ drawn at scale `factor ** (depth − k)` inside a circular portal at the zoom
10885
+ centre, so the next level opens as a window in the middle of the current one
10886
+ and grows until it fills the frame; levels hidden behind a covering portal are
10887
+ not drawn.
10888
+
10889
+ | Function | |
10890
+ |---|---|
10891
+ | `depthAt(time, keys)` | The depth at a time, eased between `{ time, value }` keys. About `k + 0.35` shows level *k* filling the frame. |
10892
+ | `zoomAt(time, keys)` | A zoom factor eased in log space (values > 0): halfway between 1× and 100× is 10×, so a dive feels steady. |
10893
+ | `drawZoomLevels(ctx, time, { width, height, depth, levels, factor?, center?, portalRadius?, rim?, rimWidth? })` | Draw the visible levels; each level function draws itself at scale 1 around `center`. `rim: null` drops the glowing ring. |
10894
+ | `zoomLevelLayout({ width, height, depth, levelCount, factor?, portalRadius? })` | Which levels draw at a depth, with their scale and portal radius. |
10895
+ | `levelPresence(depth, level)` | 0..1: how fully a level fills the screen, to show or fade its label. |
10896
+ | `drawPortalRim(ctx, x, y, radius, color?, width?)` | The glowing ring on its own (a lens edge, an inset). |
10897
+
10898
+ A level covers the frame once its portal reaches half the frame's diagonal: `portalRadius × factor^(depth − k) ≥ √(w² + h²) / 2`. With the defaults (520 px, ×14) that is depth `k + 0.28` on a 1920×1080 frame; a smaller `portalRadius` needs a deeper key before the level behind stops showing at the corners.
10899
+
10900
+ Time the depth keys to the narration: put each level's arrival on the word
10901
+ that names it. For an endless, self-similar zoom (the same frame inside
10902
+ itself forever) use `nestedZoom` from `tinyfly/adapters` instead.
10903
+
10904
+ ## Short captions and chips
10905
+
10906
+ | Function | |
10907
+ |---|---|
10908
+ | `drawShortCaption(ctx, time, { lines, x, y, size?, font?, color?, shadow?, wordsPerChunk?, lowercase? })` | Burned-in captions one to three words at a time (default 2), lower case, boxless, with a drop shadow; returns the text drawn. `lines` are `{ text, start, end }` (narration cues fit as they are). Sit them at about 72% of the height in 9:16, 86% in 16:9. |
10909
+ | `captionChunkAt(line, time, wordsPerChunk?)` | The chunk showing at a time: each chunk gets its share of the line by its share of the characters, close enough for a few words at a time. |
10910
+ | `captionChunks(text, wordsPerChunk?)` | A line cut at spaces. |
10911
+ | `drawLabelChip(ctx, time, { text, x, y, size?, font?, fill?, color?, at?, pop? })` | A rounded chip that pops on at `at`; returns its width. |
10912
+ | `drawCornerNote(ctx, { text, x, y, size?, font?, color? })` | A small right-aligned note, such as `*not to scale`. |
10913
+
10914
+ ## Sound effects from numbers
10915
+
10916
+ `@algorisys/tinyfly/headless` makes sound effects as mono `Float32Array`
10917
+ samples, seeded and deterministic, with no files to find or license:
10918
+ `soundWhoosh(rate, { duration?, rise?, seed? })` for zooms and cuts,
10919
+ `soundPop(rate, { frequency?, duration? })` for chips, `soundThud(rate)` for
10920
+ impacts, `soundShimmer(rate)` for reveals, `soundTick(rate)` for counters,
10921
+ `soundClick(rate)` for a latch or padlock, and `soundPad(rate, { duration })`,
10922
+ a slow ambient drone to mix low under narration.
10923
+
10924
+ `renderMix` layers take `samples` as well as `file`, so a mix needs no ffmpeg
10925
+ decoding for them:
10926
+
10927
+ ```js
10928
+ import { renderMix, soundPad, soundWhoosh, soundPop } from '@algorisys/tinyfly/headless'
10929
+
10930
+ const audio = await renderMix([
10931
+ { id: 'voice', file: 'build/narration.wav' },
10932
+ { samples: soundPad(48000, { duration: END }), gain: 0.2, duck: { under: 'voice', amount: 0.5 } },
10933
+ { samples: soundWhoosh(48000), at: [3000, 5200], gain: 0.5 },
10934
+ { samples: soundPop(48000), at: [3300, 5500], gain: 0.4 },
10935
+ ], { output: 'build/mix.wav', duration: END, baseDir: here })
10936
+ ```
10937
+
10938
+ ## Style notes
10939
+
10940
+ - One sky per scene; dust and bokeh always on; a slow push-in on every shot.
10941
+ - A whoosh on every zoom or scene change, a pop on every chip, ticks for
10942
+ counters, a thud for impacts, a shimmer for reveals, a quiet pad under all.
10943
+ - Anything drawn at an illustrative scale gets a `drawCornerNote` saying so;
10944
+ anything that claims a scale is drawn to it.
10945
+
10946
+ ---
10947
+
10803
10948
  <!-- docs/character-appearance.md -->
10804
10949
 
10805
10950
  # Character Appearance
@@ -15917,7 +16062,7 @@ magnet.addEventListener('pointerleave', () => {
15917
16062
 
15918
16063
  <!-- capabilities: generated from the library -->
15919
16064
 
15920
- # tinyfly capabilities (v0.126.0)
16065
+ # tinyfly capabilities (v0.127.1)
15921
16066
 
15922
16067
  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).
15923
16068
 
@@ -16255,6 +16400,32 @@ Canvas drawing functions for detective and noir scenes (see docs/noir-detective.
16255
16400
 
16256
16401
  Case board cards: { id, x, y (its pin, relative to the board), kind?, title?, note?, width?, height?, angle?, color?, at?, highlight?: { at, duration } }, kinds `photo`, `note`. Strings: { from, to, at?, duration?, color? }. Marks: { on, kind, at, duration?, color?, width? }, kinds `cross` (two diagonals across the card, one after the other (ruled out)), `strike` (one diagonal, bottom-left to top-right (half ruled out)), `scribble` (a zigzag back and forth across the card (scribbled out)), `circle` (a loose ring round the card (this one)).
16257
16402
 
16403
+ ## Cosmic explainer kit
16404
+
16405
+ Canvas drawing functions for science-explainer scenes (see docs/cosmic-explainer.md): flat gradient skies, parallax dust and bokeh, flat-shaded shapes, zooming through scale with portals, burned-in short captions and label chips. Times are ms; every one is a pure function of its options and the time (particles are seeded), so frames draw the same in any order. Pair with the noir kit’s `drawGlow` and `drawVignette`.
16406
+
16407
+ - `drawSkyGradient(ctx, { width, height, sky?, top?, bottom? })`: a flat saturated gradient sky filling the frame (one per scene)
16408
+ - `drawDust(ctx, time, { width, height, count?, color?, opacity?, size?, drift?, offset?, seed? })`: twinkling specks in three parallax depths, wrapping round the frame (offset = camera shift)
16409
+ - `drawBokeh(ctx, time, { width, height, count?, color?, opacity?, minRadius?, maxRadius?, drift?, offset?, seed? })`: big soft out-of-focus discs drifting across the frame
16410
+ - `dustTwinkle(time, i, seed?)`: the twinkle 0..1 drawDust uses for speck i
16411
+ - `drawShadedBall(ctx, { x, y, radius, color, light?, shadow?, highlight?, opacity? })`: a flat sphere: base fill, a darker crescent away from the light, a small highlight; no outline
16412
+ - `drawIsoCube(ctx, { x, y, size, color, opacity?, sheen? })`: an isometric cube: lit top, mid left, dark right face (isoCubeFaces gives the polygons)
16413
+ - `drawHaze(ctx, time, { x, y, radius, color?, dots?, dot?, opacity?, squash?, spin?, seed? })`: a probability cloud of flickering dots, densest on a ring (an electron shell)
16414
+ - `cosmicShade(color, amount, alpha?)`: a colour toward black (amount < 0) or white (> 0), for flat shading
16415
+ - `zoomAt(time, [{ time, value }])`: a zoom factor eased in log space between keys (a steady dive from 1x to 1000x)
16416
+ - `depthAt(time, [{ time, value }])`: a depth eased between keys (0 = the first level)
16417
+ - `drawZoomLevels(ctx, time, { width, height, depth, levels: [(ctx, time) => void], factor?, center?, portalRadius?, rim?, rimWidth? })`: zoom through scale: each level factor times smaller, opening as a growing portal in the middle of the last; levels behind a covering portal are skipped
16418
+ - `zoomLevelLayout({ width, height, depth, levelCount, factor?, portalRadius? })`: which levels draw at a depth, their scale and portal radius
16419
+ - `drawPortalRim(ctx, x, y, radius, color?, width?)`: a glowing ring
16420
+ - `levelPresence(depth, level, settle?)`: 0..1: how much a level fills the screen (to fade its label)
16421
+ - `drawShortCaption(ctx, time, { lines: [{ text, start, end }], x, y, size?, font?, color?, shadow?, wordsPerChunk?, lowercase? })`: burned-in short captions: one to three words at a time in step with the voice (by character share)
16422
+ - `captionChunkAt({ text, start, end }, time, wordsPerChunk?)`: the chunk showing at a time, or null
16423
+ - `captionChunks(text, wordsPerChunk?)`: a line cut into chunks (split at spaces; works for Devanagari)
16424
+ - `drawLabelChip(ctx, time, { text, x, y, size?, font?, fill?, color?, at?, pop? })`: a rounded label chip that pops on; returns its width
16425
+ - `drawCornerNote(ctx, { text, x, y, size?, font?, color? })`: a small right-aligned note, e.g. "*not to scale"
16426
+
16427
+ Skies: `space`, `micro`, `magenta`, `cyan`, `lime`, `sunset`, `ocean`. Sounds: from tinyfly/headless: soundWhoosh, soundPop, soundThud, soundShimmer, soundTick, soundClick, soundPad (Float32Array samples for mixAudio / renderMix layers).
16428
+
16258
16429
  ## Code panel
16259
16430
 
16260
16431
  `codePanel({ code, language, x, y, fontSize?, lineHeight?, width? })`: a code listing as a scene object. Languages: `go`, `rust`, `csharp`, `javascript`, `typescript`, `python`, `plain`. Remove styles: `wipe`, `fly`, `blur`.
package/llms.txt CHANGED
@@ -13,50 +13,51 @@ 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.126.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.127.1/llms-full.txt)
17
17
 
18
18
  ## Start here
19
19
 
20
- - [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.126.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.126.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.126.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.127.1/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.127.1/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.127.1/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.127.1/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.126.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.126.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.127.1/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.127.1/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.126.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.126.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.126.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.126.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.126.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.126.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.126.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.127.1/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.127.1/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.127.1/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.127.1/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.127.1/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.127.1/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.127.1/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
- - [Cricket Stories](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.126.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.126.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.126.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
- - [Maths Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.0/docs/math.md): tinyfly/math: figures as JSON (grids a matrix warps, vectors, function plots, polygons, eigenlines, TeX labels and equations that rewrite step by step), animated by plain tracks, played in lesson-page embeds, explorables and videos from one layout; a built-in TeX subset and ready linear algebra figures.
47
- - [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
48
- - [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
49
- - [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
50
- - [Noir and Detective Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.0/docs/noir-detective.md): A canvas kit for detective stories: rain in a window, light through blinds, darkness with torch beams and holes, glow, vignette, lightning and a flickering bulb; the red clue magnifier, an evidence folder, a clock and time chip, a freeze-frame suspect name card, a typed narration box and speech bubbles; and a case board as data (pinned photo and note cards, red string, marker cross-outs, strikes, scribble-outs and rings drawn on over time, with the marker nib for a hand). Deterministic from time; text and fonts are yours.
51
- - [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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).
52
- - [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
53
- - [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
54
- - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
55
- - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
56
- - [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.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.
57
- - [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
42
+ - [Cricket Stories](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.127.1/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.127.1/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.127.1/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
+ - [Maths Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/docs/math.md): tinyfly/math: figures as JSON (grids a matrix warps, vectors, function plots, polygons, eigenlines, TeX labels and equations that rewrite step by step), animated by plain tracks, played in lesson-page embeds, explorables and videos from one layout; a built-in TeX subset and ready linear algebra figures.
47
+ - [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
48
+ - [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
49
+ - [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
50
+ - [Noir and Detective Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/docs/noir-detective.md): A canvas kit for detective stories: rain in a window, light through blinds, darkness with torch beams and holes, glow, vignette, lightning and a flickering bulb; the red clue magnifier, an evidence folder, a clock and time chip, a freeze-frame suspect name card, a typed narration box and speech bubbles; and a case board as data (pinned photo and note cards, red string, marker cross-outs, strikes, scribble-outs and rings drawn on over time, with the marker nib for a hand). Deterministic from time; text and fonts are yours.
51
+ - [Cosmic Explainer Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/docs/cosmic-explainer.md): A canvas kit for animated science explainers: saturated gradient skies, parallax dust and bokeh, flat-shaded shapes (a sphere with a shadow crescent, an isometric cube, a probability haze), zooming through scale in growing portals (drawZoomLevels, depthAt, zoomAt), burned-in short captions two words at a time and label chips; plus sound effects made from numbers (whoosh, pop, thud, shimmer, tick, click, an ambient pad) that renderMix takes as samples. Deterministic from time.
52
+ - [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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).
53
+ - [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
54
+ - [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
55
+ - [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
56
+ - [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
57
+ - [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.
58
+ - [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
58
59
 
59
60
  ## Optional
60
61
 
61
- - [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.0/README.md): Feature overview, project layout and development setup.
62
- - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.126.0/release-notes/README.md): What changed in each version.
62
+ - [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/README.md): Feature overview, project layout and development setup.
63
+ - [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.127.1/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.126.0",
3
+ "version": "0.127.1",
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",
@@ -44,6 +44,13 @@ names.
44
44
  detective gear `bean: { coat, fedora, shades: true }`; `halo` edges line limbs.
45
45
  It is always drawn clean; every pose, gait, dance and expression field works on it.
46
46
  Household clothes: `bean: { skirt, drape, bangles }` (`skirt` a colour or `{ color, length }`; preset `beanSari`).
47
+ - Science explainers (the cosmic kit, docs/cosmic-explainer.md): `drawSkyGradient(ctx, { width, height, sky })`,
48
+ `drawDust` / `drawBokeh` (pass the camera `offset` for parallax), `drawShadedBall`, `drawIsoCube`, `drawHaze`;
49
+ a dive through scale with `drawZoomLevels(ctx, time, { width, height, depth: depthAt(time, keys), levels })`
50
+ (level functions draw at scale 1 around the centre; about `k + 0.35` fills the frame with level k);
51
+ `drawShortCaption(ctx, time, { lines, x, y })` (two words at a time), `drawLabelChip`, `drawCornerNote`.
52
+ Sounds without files from tinyfly/headless: `soundWhoosh`, `soundPop`, `soundThud`, `soundShimmer`,
53
+ `soundTick`, `soundClick`, `soundPad`; pass them to `renderMix` as `{ samples, at, gain }` layers.
47
54
  - Detective / noir scenes: canvas functions, all pure in time (ms): `drawRain`, `drawBlinds`,
48
55
  `drawDarkness` (torch `cones` with `angle` in degrees, `holes`), `drawGlow`, `drawVignette`,
49
56
  `lightningFlash`, `lightFlicker`; overlays `drawClueMarker`, `drawEvidenceFolder`, `drawClockFace`,