@algorisys/tinyfly 0.95.0 → 0.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/docs/acting.md +165 -0
- package/docs/editor-guide.md +1 -1
- package/docs/examples.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/gsap-compat.md +1 -1
- package/docs/llm-guide.md +24 -2
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +4517 -3582
- package/lib/browser/tinyfly.iife.js +16 -14
- package/lib/browser/tinyfly.js +5788 -4853
- package/lib/browser/tinyfly.umd.js +16 -14
- package/lib/types/characters/acting/index.d.ts +1 -0
- package/lib/types/characters/acting/surface-script.d.ts +92 -0
- package/lib/types/characters/capabilities.d.ts +5 -0
- package/lib/types/characters/chart.d.ts +108 -0
- package/lib/types/characters/code-panel.d.ts +21 -46
- package/lib/types/characters/index.d.ts +3 -0
- package/lib/types/characters/props/index.d.ts +1 -0
- package/lib/types/characters/props/prop-surface.d.ts +63 -0
- package/lib/types/characters/surface/edit-log.d.ts +47 -0
- package/lib/types/characters/surface/index.d.ts +11 -0
- package/lib/types/characters/surface/pieces.d.ts +61 -0
- package/lib/types/characters/surface/ride.d.ts +31 -0
- package/lib/types/characters/surface/surface-box.d.ts +18 -0
- package/lib/types/characters/surface/surface.d.ts +79 -0
- package/lib/types/characters/whiteboard.d.ts +131 -0
- package/llms-full.txt +279 -10
- package/llms.txt +28 -28
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +29 -9
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { CustomTarget } from '../adapters/canvas/canvas-adapter';
|
|
2
|
+
import type { Track } from '../engine/types';
|
|
3
|
+
import { type EditOptions } from './surface/edit-log';
|
|
4
|
+
import { type FlingOptions, type SurfacePiece, type TimedPoint } from './surface/pieces';
|
|
5
|
+
import { type Surface, type SurfaceAbout, type SurfaceEditOptions } from './surface/surface';
|
|
6
|
+
import { type SurfaceBox } from './surface/surface-box';
|
|
7
|
+
/**
|
|
8
|
+
* A whiteboard (or a chalkboard) as a scene object figures act on: they
|
|
9
|
+
* write on it, circle and underline what matters, strike terms out, carry a
|
|
10
|
+
* term across the equals sign and erase it all.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* const board = whiteboard({
|
|
14
|
+
* x: 40, y: 30, width: 600, height: 340, theme: 'chalkboard',
|
|
15
|
+
* items: [
|
|
16
|
+
* { id: 'eq', text: '2x + 4 = 10', at: [60, 80] },
|
|
17
|
+
* { id: 'step', text: '2x = 6', at: [60, 160], hidden: true },
|
|
18
|
+
* { id: 'ring', mark: 'circle', around: 'term:eq:+ 4', hidden: true },
|
|
19
|
+
* ],
|
|
20
|
+
* })
|
|
21
|
+
* board.edit('draw', 'mark:ring', { at: 800 })
|
|
22
|
+
* board.edit('fling', 'term:eq:+ 4', { at: 1600 })
|
|
23
|
+
* board.edit('write', 'text:step', { at: 2400 })
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* Everything on it is declared up front as plain data (`items`), so its
|
|
27
|
+
* places are known before anything plays. Text is laid out by arithmetic
|
|
28
|
+
* (each character a fixed `charWidth` em cell, drawn centred in it), never
|
|
29
|
+
* measured from a font, and marks get a hand-drawn wobble from a seed made
|
|
30
|
+
* of their id, so the same board is drawn the same everywhere. Items with
|
|
31
|
+
* `hidden: true` start unwritten (text) or undrawn (marks).
|
|
32
|
+
*
|
|
33
|
+
* Its places: `box`, `text:ID`, `term:ID:TEXT` (the first TEXT in that
|
|
34
|
+
* text; `term:ID#K:TEXT` for the Kth), `mark:ID`. A term can come loose as a
|
|
35
|
+
* piece. Edits are recorded as keys on its props (`text.ID.write`,
|
|
36
|
+
* `mark.ID.draw`, `strike.K.draw`, `piece.K.x`…) and written out by
|
|
37
|
+
* `tracks()`.
|
|
38
|
+
*/
|
|
39
|
+
export type BoardThemeName = 'whiteboard' | 'chalkboard';
|
|
40
|
+
export interface BoardTheme {
|
|
41
|
+
background: string;
|
|
42
|
+
frame: string;
|
|
43
|
+
/** The default colour of text and marks */
|
|
44
|
+
ink: string;
|
|
45
|
+
/** Named colours an item's `color` can use (any CSS colour works too) */
|
|
46
|
+
colors: Record<string, string>;
|
|
47
|
+
font: string;
|
|
48
|
+
/** Mark line width, as a fraction of the font size */
|
|
49
|
+
stroke: number;
|
|
50
|
+
/** Ink opacity (chalk is a little see-through) */
|
|
51
|
+
opacity: number;
|
|
52
|
+
}
|
|
53
|
+
export declare const BOARD_THEMES: Record<BoardThemeName, BoardTheme>;
|
|
54
|
+
/** The marks a board can draw. */
|
|
55
|
+
export type BoardMarkKind = 'circle' | 'box' | 'underline' | 'arrow';
|
|
56
|
+
export declare const BOARD_MARKS: readonly BoardMarkKind[];
|
|
57
|
+
/** Text on the board. */
|
|
58
|
+
export interface BoardText {
|
|
59
|
+
id: string;
|
|
60
|
+
text: string;
|
|
61
|
+
/** Its top-left corner, px from the board's top-left */
|
|
62
|
+
at: [number, number];
|
|
63
|
+
/** Font size, px (default the board's `fontSize`) */
|
|
64
|
+
size?: number;
|
|
65
|
+
/** A theme colour name (`red`, `blue`…) or any CSS colour (default the theme's ink) */
|
|
66
|
+
color?: string;
|
|
67
|
+
/** Start unwritten, to be written in with the `write` edit */
|
|
68
|
+
hidden?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** A hand-drawn mark: a circle, box or underline around a place, or an arrow from one place to another. */
|
|
71
|
+
export interface BoardMark {
|
|
72
|
+
id: string;
|
|
73
|
+
mark: BoardMarkKind;
|
|
74
|
+
/** `circle`, `box`, `underline`: the place it goes around (an item before it: `text:ID`, `term:ID:TEXT`, `mark:ID`) */
|
|
75
|
+
around?: string;
|
|
76
|
+
/** `arrow`: from one place to another */
|
|
77
|
+
from?: string;
|
|
78
|
+
to?: string;
|
|
79
|
+
color?: string;
|
|
80
|
+
/** Start undrawn, to be drawn in with the `draw` edit */
|
|
81
|
+
hidden?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export type BoardItem = BoardText | BoardMark;
|
|
84
|
+
export interface WhiteboardOptions {
|
|
85
|
+
/** Top-left corner, scene px */
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
theme?: BoardThemeName | Partial<BoardTheme>;
|
|
91
|
+
/** px (default 28) */
|
|
92
|
+
fontSize?: number;
|
|
93
|
+
/** Width of a character cell, em (default 0.55) */
|
|
94
|
+
charWidth?: number;
|
|
95
|
+
items?: BoardItem[];
|
|
96
|
+
}
|
|
97
|
+
/** A term that can come loose from its text: made by `piece()`. */
|
|
98
|
+
export interface BoardPiece extends SurfacePiece {
|
|
99
|
+
readonly text: string;
|
|
100
|
+
/** The text item it is part of, and where in it */
|
|
101
|
+
readonly item: string;
|
|
102
|
+
readonly column: number;
|
|
103
|
+
}
|
|
104
|
+
export interface Whiteboard extends Surface {
|
|
105
|
+
readonly kind: 'board';
|
|
106
|
+
readonly target: CustomTarget;
|
|
107
|
+
readonly box: SurfaceBox;
|
|
108
|
+
/** The box at a named place: `box`, `text:ID`, `term:ID:TEXT` (`term:ID#K:TEXT` for the Kth), `mark:ID` */
|
|
109
|
+
anchor(name: string, time?: number): SurfaceBox;
|
|
110
|
+
/** Make the term at a `term:` place a piece that can come loose */
|
|
111
|
+
piece(anchor: string): BoardPiece;
|
|
112
|
+
/** Change the board at a time by name, at named places (see `WHITEBOARD_SURFACE.edits`) */
|
|
113
|
+
edit(name: string, anchor: string | string[], options: SurfaceEditOptions): Whiteboard;
|
|
114
|
+
follow(piece: SurfacePiece, path: TimedPoint[]): Whiteboard;
|
|
115
|
+
fling(piece: SurfacePiece, options: FlingOptions): Whiteboard;
|
|
116
|
+
move(piece: SurfacePiece, options: EditOptions & {
|
|
117
|
+
to: {
|
|
118
|
+
x: number;
|
|
119
|
+
y: number;
|
|
120
|
+
};
|
|
121
|
+
}): Whiteboard;
|
|
122
|
+
/** A board has nothing to stand on that moves: the tracks come back as they are */
|
|
123
|
+
ride(tracks: Track[], target: string, options: {
|
|
124
|
+
ground: number;
|
|
125
|
+
every?: number;
|
|
126
|
+
}): Track[];
|
|
127
|
+
tracks(target: string): Track[];
|
|
128
|
+
}
|
|
129
|
+
/** A board's anchors and edits, as data: for its `about`, the capability catalog and the checks. */
|
|
130
|
+
export declare const WHITEBOARD_SURFACE: SurfaceAbout;
|
|
131
|
+
export declare function whiteboard(options: WhiteboardOptions): Whiteboard;
|
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.
|
|
207
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.97.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.
|
|
415
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.97.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.
|
|
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.97.0/cdn/tinyfly-player.iife.js`.
|
|
2282
2282
|
|
|
2283
2283
|
---
|
|
2284
2284
|
|
|
@@ -6466,7 +6466,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
|
|
|
6466
6466
|
**Steps to embed:**
|
|
6467
6467
|
1. Build the player: `npm run build:player`
|
|
6468
6468
|
2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
|
|
6469
|
-
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
6469
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.97.0/cdn/tinyfly-player.iife.js`
|
|
6470
6470
|
instead; see [Deployment](DEPLOYMENT.md))
|
|
6471
6471
|
3. Copy the generated code into your HTML
|
|
6472
6472
|
4. Adjust the script `src` path if needed
|
|
@@ -7565,8 +7565,9 @@ npx @algorisys/tinyfly capabilities --json # the same as data
|
|
|
7565
7565
|
It lists the easings, track kinds, every property each canvas shape can
|
|
7566
7566
|
animate (with units and ranges), the stick figure's joints, poses,
|
|
7567
7567
|
expressions, gags, gaits, beat actions, dances, flips and hand shapes, the v2
|
|
7568
|
-
character's poses, the code panel's languages, anchors and
|
|
7569
|
-
|
|
7568
|
+
character's poses, the code panel's languages, every surface's anchors and
|
|
7569
|
+
edits (code panel, whiteboard, chart), camera shots and the teaching
|
|
7570
|
+
helpers. It is generated from the code, so it can't
|
|
7570
7571
|
fall behind: **a name in it is accepted, and a name not in it is rejected.**
|
|
7571
7572
|
It is also the last part of `llms-full.txt`.
|
|
7572
7573
|
|
|
@@ -7590,6 +7591,19 @@ Characters in a 3D scene walk the same way with `characterScript3D`
|
|
|
7590
7591
|
(`{ do: 'walk', to: [x, z] }`, `pose`, `gag`, `face`, `place`); a rider is
|
|
7591
7592
|
seated with `propRide3D` and spliced into its script with `spliceTracks`. See `docs/props.md`.
|
|
7592
7593
|
|
|
7594
|
+
## Surfaces
|
|
7595
|
+
|
|
7596
|
+
Code panels (`codePanel()`), whiteboards (`whiteboard()`), charts
|
|
7597
|
+
(`chart()`) and props (`propSurface(propTarget(…))`) are surfaces: their places have names (`line:7`,
|
|
7598
|
+
`token:4:Println`, `text:eq`, `term:eq:+ 4`, `bar:q4`) and their edits are
|
|
7599
|
+
called by name (`surface.edit('highlight', 'line:4', { at })`). Write a scene
|
|
7600
|
+
on one with `surfaceScript()`: beats aim at `{ surface, anchor }` and say what
|
|
7601
|
+
the surface does in answer with `then`, at a moment of the beat (`at:
|
|
7602
|
+
'contact'`, `'release'`…). A whiteboard's texts and marks and a chart's data
|
|
7603
|
+
are declared up front, each with an id the places use. The catalog lists each
|
|
7604
|
+
surface's places and edits. See "A whole scene as data", "Whiteboards" and
|
|
7605
|
+
"Charts" in `docs/acting.md`.
|
|
7606
|
+
|
|
7593
7607
|
## Your own behaviours
|
|
7594
7608
|
|
|
7595
7609
|
Write new actions with `defineAction()` (from beats, or as timed pose steps),
|
|
@@ -7656,6 +7670,9 @@ Fix, render again.
|
|
|
7656
7670
|
positions. A beat script's `to` is a scene x, and its tracks are offsets
|
|
7657
7671
|
from `from` (and `ground` for y).
|
|
7658
7672
|
- **Scene y grows downward.** A floor higher up the screen has a smaller y.
|
|
7673
|
+
- **Walk figures in front of props, not through them.** A prop stands on its
|
|
7674
|
+
middle; its front comes forward of that. Use its front line as the
|
|
7675
|
+
figure's `ground` (a house's `anchor:doorstep`).
|
|
7659
7676
|
- **Angles are degrees.** Stick-figure arms: 0 hangs down, 90 straight out,
|
|
7660
7677
|
180 straight up; in profile the left arm's forward is negative.
|
|
7661
7678
|
- **Aim beats at anchors, not guessed numbers**: `code.line(7)`,
|
|
@@ -7664,6 +7681,11 @@ Fix, render again.
|
|
|
7664
7681
|
`result.beats[i].contact` (and `release`): wipe the line, fling the word or
|
|
7665
7682
|
type the text at those times.
|
|
7666
7683
|
- **Record panel edits before `code.ride()`**, which reads the moves they make.
|
|
7684
|
+
- **Or write it all as data with `surfaceScript`**: name places
|
|
7685
|
+
(`target: { surface: 'code', anchor: 'token:3:var' }`) and put the surface's
|
|
7686
|
+
answer on the beat (`then: { surface: 'code', edit: 'fling', anchor: 'token:3:var', at: 'release' }`).
|
|
7687
|
+
A cue's `at` is a moment name (`start`, `contact`, `release`, `end`), never
|
|
7688
|
+
ms. It records the edits and rides the lines for you, in beat order.
|
|
7667
7689
|
|
|
7668
7690
|
## Set up your assistant
|
|
7669
7691
|
|
|
@@ -7725,7 +7747,7 @@ path for all of that:
|
|
|
7725
7747
|
</figure>
|
|
7726
7748
|
|
|
7727
7749
|
<!-- once, anywhere on the page (a site-wide footer is fine) -->
|
|
7728
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
7750
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.97.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
7729
7751
|
```
|
|
7730
7752
|
|
|
7731
7753
|
Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
|
|
@@ -8800,8 +8822,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
|
|
|
8800
8822
|
adds to the same `tinyfly` global:
|
|
8801
8823
|
|
|
8802
8824
|
```html
|
|
8803
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
8804
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
8825
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.97.0/cdn/tinyfly.iife.js"></script>
|
|
8826
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.97.0/cdn/tinyfly-maps.iife.js"></script>
|
|
8805
8827
|
```
|
|
8806
8828
|
|
|
8807
8829
|
It is a separate script because the offline world map it carries adds about
|
|
@@ -9445,6 +9467,171 @@ writes them out as one track per prop (`line.N.highlight`, `line.N.strike`,
|
|
|
9445
9467
|
keyword lists for Go, Rust, C#, JavaScript, TypeScript and Python (strings,
|
|
9446
9468
|
numbers and line comments too); `plain` leaves the text uncoloured.
|
|
9447
9469
|
|
|
9470
|
+
### Places and edits by name
|
|
9471
|
+
|
|
9472
|
+
A code panel is a *surface*: every place on it has a name, so a scene can be
|
|
9473
|
+
written as plain data. `anchor(name)` gives the box there, `piece(name)` the
|
|
9474
|
+
word there, and `edit(name, anchor, options)` does the same as the methods
|
|
9475
|
+
above:
|
|
9476
|
+
|
|
9477
|
+
```js
|
|
9478
|
+
code.anchor('line:7') // = code.line(7)
|
|
9479
|
+
code.anchor('token:4:Println') // = code.token(4, 'Println'); token:4#2:x is the second x
|
|
9480
|
+
code.anchor('spot:3:4') // = code.spot(3, 4)
|
|
9481
|
+
|
|
9482
|
+
code.edit('highlight', ['line:2', 'line:3'], { at: 100 })
|
|
9483
|
+
code.edit('fling', 'token:4:Println', { at: grab.release })
|
|
9484
|
+
code.edit('drop', 'token:1:int', { at: 1600, into: 'spot:3:2' })
|
|
9485
|
+
code.edit('move', 'token:4:fmt.', { at: 600, to: 'box' })
|
|
9486
|
+
```
|
|
9487
|
+
|
|
9488
|
+
A wrong name says what it meant (`Unknown anchor "lin": did you mean "line"?`),
|
|
9489
|
+
and an edit given the wrong kind of place says which kind it takes. The
|
|
9490
|
+
anchors and edits are listed under "Surfaces" in `capabilities()`. Boards,
|
|
9491
|
+
charts and props that change state are planned as surfaces that work the
|
|
9492
|
+
same way.
|
|
9493
|
+
|
|
9494
|
+
### A whole scene as data
|
|
9495
|
+
|
|
9496
|
+
`surfaceScript()` takes beats that name places and say what the surface does
|
|
9497
|
+
in answer, so the reactions above need no wiring by hand. A beat's `target`,
|
|
9498
|
+
`to` and `onto` can be a place (`{ surface, anchor }`: its box, its centre x,
|
|
9499
|
+
its top), and `then` holds the surface's cues, each at a moment of the beat:
|
|
9500
|
+
|
|
9501
|
+
```js
|
|
9502
|
+
const result = surfaceScript('hero', { code }, [
|
|
9503
|
+
{ do: 'leap', to: 300, onto: { surface: 'code', anchor: 'line:5' } },
|
|
9504
|
+
{ do: 'grab', target: { surface: 'code', anchor: 'token:4:Println' },
|
|
9505
|
+
then: { surface: 'code', edit: 'carry', anchor: 'token:4:Println', until: { beat: 2, at: 'release' } } },
|
|
9506
|
+
{ do: 'throw', to: 700,
|
|
9507
|
+
then: { surface: 'code', edit: 'fling', anchor: 'token:4:Println', at: 'release' } },
|
|
9508
|
+
{ do: 'swipe', target: { surface: 'code', anchor: 'line:2' },
|
|
9509
|
+
then: { surface: 'code', edit: 'remove', anchor: 'line:2', style: 'blur', duration: 600 } },
|
|
9510
|
+
], { from: 600, ground: code.box.bottom, height: 100 })
|
|
9511
|
+
|
|
9512
|
+
const timeline = deserializeTimeline({ id: 'scene', tracks: result.tracks })
|
|
9513
|
+
```
|
|
9514
|
+
|
|
9515
|
+
A cue's `at` is `start`, `contact`, `release` or `end` (default: the beat's
|
|
9516
|
+
contact, or its start when it has none). `until` ends it at a moment of the
|
|
9517
|
+
same beat or of a later one (`{ beat: 2, at: 'release' }`) and sets the
|
|
9518
|
+
edit's duration. Every other field is the edit's own option (`text`, `into`,
|
|
9519
|
+
`style`, `on`). `carry` is the one cue that is not a surface edit: the piece
|
|
9520
|
+
follows the figure's hand (`handPath`) until `until`; pass `figureStyle` when
|
|
9521
|
+
the figure is drawn with more than a `height`.
|
|
9522
|
+
|
|
9523
|
+
It does what the hand-wired version does, in the same order: the beats go to
|
|
9524
|
+
`scriptTracks` with places swapped for their boxes as laid out, each cue runs
|
|
9525
|
+
`surface.edit()` in beat order, and the figure rides the surfaces it stands
|
|
9526
|
+
on (`ride: false` turns that off). The Code Tidy demo written this way gives
|
|
9527
|
+
the same tracks, key for key. `result.tracks` holds the figure's tracks and
|
|
9528
|
+
every surface's (named by its key in `{ code }`); `checkSurfaceBeats(beats, surfaces)`
|
|
9529
|
+
lists the problems without compiling.
|
|
9530
|
+
|
|
9531
|
+
### Whiteboards
|
|
9532
|
+
|
|
9533
|
+
`whiteboard()` is a second surface, for lessons that are not code: a board
|
|
9534
|
+
(or `theme: 'chalkboard'`) whose texts and hand-drawn marks are declared as
|
|
9535
|
+
data, each with an id, and named as places like a code panel's lines:
|
|
9536
|
+
|
|
9537
|
+
```js
|
|
9538
|
+
const board = whiteboard({
|
|
9539
|
+
x: 20, y: 20, width: 470, height: 300, theme: 'chalkboard', fontSize: 30,
|
|
9540
|
+
items: [
|
|
9541
|
+
{ id: 'eq', text: '2x + 4 = 12', at: [40, 30] },
|
|
9542
|
+
{ id: 'move', text: '2x = 12 - 4', at: [40, 100], hidden: true },
|
|
9543
|
+
{ id: 'ring', mark: 'circle', around: 'term:eq:+ 4', hidden: true },
|
|
9544
|
+
{ id: 'across', mark: 'arrow', from: 'mark:ring', to: 'term:move:- 4', color: 'orange', hidden: true },
|
|
9545
|
+
],
|
|
9546
|
+
})
|
|
9547
|
+
|
|
9548
|
+
surfaceScript('teacher', { board }, [
|
|
9549
|
+
{ do: 'point', target: { surface: 'board', anchor: 'term:eq:+ 4' },
|
|
9550
|
+
then: { surface: 'board', edit: 'draw', anchor: 'mark:ring', until: 'end' } },
|
|
9551
|
+
{ do: 'write', target: { surface: 'board', anchor: 'text:move' },
|
|
9552
|
+
then: { surface: 'board', edit: 'write', anchor: 'text:move', until: 'release' } },
|
|
9553
|
+
], { from: 640, ground: 400, height: 190, facing: -1 })
|
|
9554
|
+
```
|
|
9555
|
+
|
|
9556
|
+
Its places are `box`, `text:ID`, `term:ID:TEXT` (part of a text; `term:ID#K:TEXT`
|
|
9557
|
+
for the Kth) and `mark:ID`. Marks are `circle`, `box`, `underline` (each
|
|
9558
|
+
`around` a place) and `arrow` (`from` one place `to` another), and can only
|
|
9559
|
+
name items declared before them. Its edits: `write` (a hidden text, by hand;
|
|
9560
|
+
or new `text` into a term's place), `draw` (a hidden mark), `erase`, `strike`,
|
|
9561
|
+
and `move` and `fling` for a term, which comes loose as a piece (`carry` works
|
|
9562
|
+
too). Text is laid out in fixed-width cells, never measured, and each mark's
|
|
9563
|
+
wobble comes from a seed made of its id, so a board is drawn the same
|
|
9564
|
+
everywhere. Colours are theme names (`red`, `blue`, `green`, `orange`, and
|
|
9565
|
+
`yellow` on chalk) or any CSS colour. The Board Lesson demo solves an
|
|
9566
|
+
equation this way.
|
|
9567
|
+
|
|
9568
|
+
### Charts
|
|
9569
|
+
|
|
9570
|
+
`chart()` is a surface for talking through data: a bar or line chart whose
|
|
9571
|
+
values are declared as data, scaled once when it is made (`max`, or a round
|
|
9572
|
+
number above the largest value).
|
|
9573
|
+
|
|
9574
|
+
```js
|
|
9575
|
+
const sales = chart({
|
|
9576
|
+
x: 20, y: 20, width: 480, height: 340, kind: 'bar', theme: 'dark', title: 'Sales', max: 100, suffix: 'k',
|
|
9577
|
+
data: [
|
|
9578
|
+
{ id: 'q3', label: 'Q3', value: 30 },
|
|
9579
|
+
{ id: 'q4', label: 'Q4', value: 20 },
|
|
9580
|
+
],
|
|
9581
|
+
})
|
|
9582
|
+
|
|
9583
|
+
surfaceScript('hero', { sales }, [
|
|
9584
|
+
{ do: 'point', target: { surface: 'sales', anchor: 'bar:q3' },
|
|
9585
|
+
then: { surface: 'sales', edit: 'highlight', anchor: 'bar:q3' } },
|
|
9586
|
+
{ do: 'leap', to: { surface: 'sales', anchor: 'bar:q4' }, onto: { surface: 'sales', anchor: 'bar:q4' } },
|
|
9587
|
+
{ do: 'cheer', for: 1600,
|
|
9588
|
+
then: { surface: 'sales', edit: 'set', anchor: 'bar:q4', value: 85, at: 'start', until: 'end' } },
|
|
9589
|
+
], { from: 640, ground: 400, height: 90, facing: -1 })
|
|
9590
|
+
```
|
|
9591
|
+
|
|
9592
|
+
Its places are `bar:ID` (on a bar chart) or `point:ID` (on a line chart),
|
|
9593
|
+
`label:ID`, `value:ID` and `box`, and they follow the values:
|
|
9594
|
+
`sales.anchor('bar:q4', time)` is the bar as it stands then. Its edits:
|
|
9595
|
+
`set` (a new `value`; the value label counts along), `show` (grow a
|
|
9596
|
+
`hidden` bar in from the axis, or draw the line out to a point; `on: false`
|
|
9597
|
+
takes it back) and `highlight`. A bar's top is a floor: a figure standing on
|
|
9598
|
+
it is carried up and down as it grows and shrinks, as in the Chart Talk demo.
|
|
9599
|
+
|
|
9600
|
+
### Props as surfaces
|
|
9601
|
+
|
|
9602
|
+
A prop's controls are state a figure can change: `propSurface(propTarget(…))`
|
|
9603
|
+
makes a car, a house or a tree a surface. Its places are `anchor:NAME` (the
|
|
9604
|
+
rig's anchors: `door`, `doorstep`, `seat`, `branch`…), `part:ID` (one part as
|
|
9605
|
+
seen: `window-1`, `wheel-0-left`), `control:NAME` (where the parts a control
|
|
9606
|
+
moves or lights are) and `box`. Its edits are `set` (a control to a `value`)
|
|
9607
|
+
and `switch` (a control to its full value, open or on, or back to rest with
|
|
9608
|
+
`on: false`).
|
|
9609
|
+
|
|
9610
|
+
```js
|
|
9611
|
+
const home = propTarget({ x: 430, y: 320, prop: house(), values: { turn: 0.25 } })
|
|
9612
|
+
const homeSurface = propSurface(home)
|
|
9613
|
+
const floor = homeSurface.anchor('anchor:doorstep').y
|
|
9614
|
+
|
|
9615
|
+
surfaceScript('hero', { home: homeSurface }, [
|
|
9616
|
+
{ do: 'walk', to: homeSurface.anchor('anchor:door').x - 70 },
|
|
9617
|
+
{ do: 'grab', target: { surface: 'home', anchor: 'anchor:door' },
|
|
9618
|
+
then: { surface: 'home', edit: 'switch', anchor: 'control:door', until: 'end' } },
|
|
9619
|
+
{ do: 'point', target: { surface: 'home', anchor: 'part:window-1' },
|
|
9620
|
+
then: { surface: 'home', edit: 'switch', anchor: 'control:lights' } },
|
|
9621
|
+
], { from: 40, ground: floor, height: 100 })
|
|
9622
|
+
```
|
|
9623
|
+
|
|
9624
|
+
A prop stands on its middle, and seen from a little above its front comes
|
|
9625
|
+
forward of that line. A figure that walks on the prop's own `y` is inside
|
|
9626
|
+
its footprint and seems to walk through the wall; walk it on the prop's
|
|
9627
|
+
front line instead (a house's `doorstep`, as above). Places are worked out
|
|
9628
|
+
from the prop's values at a time, so they follow a door as it swings; pass
|
|
9629
|
+
the prop's own script as `propSurface(target, { tracks })` and they follow
|
|
9630
|
+
it as it drives off. Do not key a control both in its own script and here.
|
|
9631
|
+
A part turned away from the viewer has no place on screen (a car's
|
|
9632
|
+
headlights in profile); the error names the anchors to aim at instead. The
|
|
9633
|
+
Home Time demo is this scene.
|
|
9634
|
+
|
|
9448
9635
|
## Camera
|
|
9449
9636
|
|
|
9450
9637
|
Video scenes can be seen through a camera: `camera: true` reads the tracks of
|
|
@@ -12744,7 +12931,7 @@ magnet.addEventListener('pointerleave', () => {
|
|
|
12744
12931
|
|
|
12745
12932
|
<!-- capabilities: generated from the library -->
|
|
12746
12933
|
|
|
12747
|
-
# tinyfly capabilities (v0.
|
|
12934
|
+
# tinyfly capabilities (v0.97.0)
|
|
12748
12935
|
|
|
12749
12936
|
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).
|
|
12750
12937
|
|
|
@@ -13029,6 +13216,88 @@ Poses: `rest`, `wave`, `cheer`, `point`, `handsOnHips`, `think`, `shrug`, `sit`,
|
|
|
13029
13216
|
- `drop(piece, n, column, { at, duration? })`: put a piece into a line (into its own line it slides, the text closing behind it)
|
|
13030
13217
|
- `ride(tracks, figureId, { ground })`: a figure’s tracks with it carried by the line it stands on
|
|
13031
13218
|
|
|
13219
|
+
## Surfaces
|
|
13220
|
+
|
|
13221
|
+
Scene objects figures act on. Places are named `kind:args`: `surface.anchor(name)` gives the box there (stand on `top`, point at `x`, `y`; pass it as a beat `target`), `surface.piece(name)` makes the part there come loose, and `surface.edit(name, anchor, options)` changes the surface at a time (`at`, ms).
|
|
13222
|
+
|
|
13223
|
+
Beats name places and say what surfaces do in answer (`surfaceScript`):
|
|
13224
|
+
|
|
13225
|
+
- `surfaceScript(figureId, { name: surface }, beats, options)`: compiles beats that act on surfaces: returns the script result with `tracks` (the figure’s, ridden, then every surface’s, keyed by its name) and `figureTracks`; options are scriptTracks’ plus `figureStyle` (for carry) and `ride` (default true)
|
|
13226
|
+
- `checkSurfaceBeats(beats, surfaces, cast?)`: every problem checkBeats finds, plus unknown surfaces, places, edits and moments, with suggestions
|
|
13227
|
+
- `{ surface, anchor }`: a named place, where a beat takes `target` (its box), `to` (its centre x) or `onto` (its top); as laid out, before any edit moves it
|
|
13228
|
+
- `then: { surface, edit, anchor, at?, until?, …options }`: what the surface does in answer to the beat (or a list of them): one of its edits, or `carry` (the piece follows the hand until `until`); the other fields are the edit’s options
|
|
13229
|
+
- `at`: a moment of the beat: start, contact, release, end (default contact, or start when the beat has none); not ms
|
|
13230
|
+
- `until`: a moment of this beat, or { beat: index, at? } of a later one; sets the edit’s duration (carry needs it)
|
|
13231
|
+
|
|
13232
|
+
### code
|
|
13233
|
+
|
|
13234
|
+
`codePanel({ code, language?, x, y, fontSize?, lineHeight?, width?, hidden? })`
|
|
13235
|
+
|
|
13236
|
+
Anchors:
|
|
13237
|
+
- `box`: the whole panel
|
|
13238
|
+
- `line:N`: line N’s text (lines count from 1): stand on top, point at x, y, swipe left to right
|
|
13239
|
+
- `token:N:TEXT`: the first TEXT on line N (token:N#K:TEXT for the Kth): a word, which can come loose as a piece
|
|
13240
|
+
- `spot:N:C`: a place in line N before column C (0 is before its first character); spot:N:C:W is W characters wide. Aim a put or a write here
|
|
13241
|
+
|
|
13242
|
+
Edits:
|
|
13243
|
+
- `highlight`: line anchors; { at, duration?, on? }: tint lines (on: false clears)
|
|
13244
|
+
- `strike`: line anchors; { at, duration? }: strike lines through, left to right
|
|
13245
|
+
- `remove`: line anchors; { at, duration?, style?: wipe | fly | blur, from?: left | right, close? }: take lines away; the lines below close the gap
|
|
13246
|
+
- `type`: line anchors given in `hidden`; { at, duration? }: type them in
|
|
13247
|
+
- `insert`: a spot; { at, text, duration? }: type new text into the line there; the line makes room
|
|
13248
|
+
- `write`: a token; { at, text, duration? }: write new text into the word’s place
|
|
13249
|
+
- `drop`: a token; { at, into: a spot, duration? }: put the word into a line there
|
|
13250
|
+
- `move`: a token; { at, to: an anchor name or { x, y }, duration? }: move the word there
|
|
13251
|
+
- `fling`: a token; { at, velocity?, spin?, gravity?, duration? }: throw or kick the word away on a spinning arc
|
|
13252
|
+
|
|
13253
|
+
### board
|
|
13254
|
+
|
|
13255
|
+
`whiteboard({ x, y, width, height, theme?: whiteboard | chalkboard, fontSize?, items: [{ id, text, at: [x, y], size?, color?, hidden? } | { id, mark: circle | box | underline | arrow, around? | from?, to?, color?, hidden? }] })`
|
|
13256
|
+
|
|
13257
|
+
Anchors:
|
|
13258
|
+
- `box`: the whole board
|
|
13259
|
+
- `text:ID`: a text item: write along it from left to right, point at it
|
|
13260
|
+
- `term:ID:TEXT`: the first TEXT in text ID (term:ID#K:TEXT for the Kth): a term, which can come loose as a piece
|
|
13261
|
+
- `mark:ID`: a mark (circle, box, underline or arrow)
|
|
13262
|
+
|
|
13263
|
+
Edits:
|
|
13264
|
+
- `write`: text anchors given `hidden`; { at, duration? }: write them in by hand. Or a term; { at, text, duration? }: write new text in its place (move or erase the term first)
|
|
13265
|
+
- `draw`: mark anchors given `hidden`; { at, duration? }: draw them in
|
|
13266
|
+
- `erase`: text, term or mark anchors; { at, duration? }: wipe them off
|
|
13267
|
+
- `strike`: text or term anchors; { at, duration? }: cross them out
|
|
13268
|
+
- `move`: a term; { at, to: an anchor name or { x, y }, duration? }: move the term there
|
|
13269
|
+
- `fling`: a term; { at, velocity?, spin?, gravity?, duration? }: throw or knock the term off on a spinning arc
|
|
13270
|
+
|
|
13271
|
+
### chart
|
|
13272
|
+
|
|
13273
|
+
`chart({ x, y, width, height, kind: bar | line, data: [{ id, label?, value, hidden? }], max?, title?, theme?: light | dark, decimals?, prefix?, suffix?, values? })`
|
|
13274
|
+
|
|
13275
|
+
Anchors:
|
|
13276
|
+
- `box`: the whole chart
|
|
13277
|
+
- `bar:ID`: a bar (bar charts), as it stands at the time: stand on its top (it carries a figure as it grows), point at it
|
|
13278
|
+
- `point:ID`: a point on the line (line charts), as it stands at the time
|
|
13279
|
+
- `label:ID`: its label under the axis
|
|
13280
|
+
- `value:ID`: its value label, above it
|
|
13281
|
+
|
|
13282
|
+
Edits:
|
|
13283
|
+
- `set`: bar or point anchors; { at, value, duration? }: animate to a new value; its value label counts along
|
|
13284
|
+
- `show`: bar or point anchors given `hidden`; { at, duration?, on? }: grow a bar in from the axis, or draw the line out to a point (on: false takes it back)
|
|
13285
|
+
- `highlight`: bar or point anchors; { at, duration?, on? }: colour it out (on: false clears)
|
|
13286
|
+
|
|
13287
|
+
### prop
|
|
13288
|
+
|
|
13289
|
+
`propSurface(propTarget({ x, y, prop }), { tracks? }): its controls and anchors are those the catalog lists for its preset`
|
|
13290
|
+
|
|
13291
|
+
Anchors:
|
|
13292
|
+
- `box`: the prop’s whole box
|
|
13293
|
+
- `anchor:NAME`: one of its rig’s anchors (door, seat, branch, ridge…), as posed at the time
|
|
13294
|
+
- `part:ID`: one of its parts as seen at the time (window-1, door-left, wheel-0-left…)
|
|
13295
|
+
- `control:NAME`: where the parts a control moves or lights are (control:door is the doors, control:lights the lamps)
|
|
13296
|
+
|
|
13297
|
+
Edits:
|
|
13298
|
+
- `set`: control anchors; { at, value, duration? }: move a control to a value
|
|
13299
|
+
- `switch`: control anchors; { at, on?, duration? }: a control to its full value (open, on), or back to its rest value with on: false
|
|
13300
|
+
|
|
13032
13301
|
## Camera shots (`cameraTracks(shots, { stage })`)
|
|
13033
13302
|
|
|
13034
13303
|
- **frame**: `{ at, duration?, easing?, frame: { focus?: { x, y }, scale?, rotate? } }: push in, pull out, or cut (duration 0)`
|
package/llms.txt
CHANGED
|
@@ -13,46 +13,46 @@ Key facts:
|
|
|
13
13
|
- For language models: read the capability catalog first (`npx @algorisys/tinyfly capabilities`, or the end of llms-full.txt). It is generated from the library, so every name in it (poses, expressions, gags, gaits, beat actions, canvas properties, code-panel edits) is accepted, and names not in it are rejected with the name probably meant. Check beat scripts with `npx @algorisys/tinyfly check beats.json`, tracks with `checkTracks(tracks, targets)`, and ask any target what it animates with `describeTarget(target)`. The npm package ships `docs/`, `llms.txt`, `llms-full.txt` and an agent skill (`skills/tinyfly/SKILL.md`); `docs/llm-guide.md` describes the workflow.
|
|
14
14
|
- Source: https://github.com/algorisys-oss/tinyfly. License: MIT.
|
|
15
15
|
|
|
16
|
-
All documentation and the interactive course in a single file: [llms-full.txt](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
16
|
+
All documentation and the interactive course in a single file: [llms-full.txt](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/llms-full.txt)
|
|
17
17
|
|
|
18
18
|
## Start here
|
|
19
19
|
|
|
20
|
-
- [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
21
|
-
- [GSAP Compatibility](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
22
|
-
- [Code Examples](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
23
|
-
- [Building Animations with an LLM](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
20
|
+
- [Getting Started](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.97.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.97.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.97.0/docs/llm-guide.md): For assistants and the people setting them up: read the capability catalog (`tinyfly capabilities`), ask targets what they animate (`describeTarget`), check beats and tracks with did-you-mean errors (`tinyfly check`, `checkTracks`), render stills to look at, and the agent skill shipped in the package.
|
|
24
24
|
|
|
25
25
|
## Reference
|
|
26
26
|
|
|
27
|
-
- [API Reference](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
28
|
-
- [File Format](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
27
|
+
- [API Reference](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.97.0/docs/file-format.md): The JSON animation format: timelines, every track kind, keyframes, easing and the project file — for generating or consuming animations.
|
|
29
29
|
|
|
30
30
|
## Editor features
|
|
31
31
|
|
|
32
|
-
- [Editor Guide](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
33
|
-
- [Shape Morphing](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
34
|
-
- [Pen Tool](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
35
|
-
- [Polygons & Stars](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
36
|
-
- [Grid & Snapping](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
37
|
-
- [Onion Skinning](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
38
|
-
- [Sprite-sheet Export](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
32
|
+
- [Editor Guide](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.97.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.97.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.97.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.97.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.97.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.97.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.
|
|
43
|
-
- [Props: Everyday Objects with Behaviours](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
44
|
-
- [Teaching Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
45
|
-
- [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
46
|
-
- [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
47
|
-
- [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
48
|
-
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
49
|
-
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
50
|
-
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
51
|
-
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
52
|
-
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
53
|
-
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
42
|
+
- [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.97.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.97.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.97.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.97.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.97.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
|
+
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.
|
|
49
|
+
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.
|
|
50
|
+
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.
|
|
51
|
+
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.
|
|
52
|
+
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.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.
|
|
53
|
+
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
|
|
54
54
|
|
|
55
55
|
## Optional
|
|
56
56
|
|
|
57
|
-
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
58
|
-
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
57
|
+
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/README.md): Feature overview, project layout and development setup.
|
|
58
|
+
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.97.0/release-notes/README.md): What changed in each version.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algorisys/tinyfly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.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",
|