@algorisys/tinyfly 0.117.0 → 0.118.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 +6 -6
- 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 +3 -1
- package/docs/maps.md +2 -2
- package/docs/math.md +35 -9
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +1654 -1649
- package/lib/addons/math.js +1684 -1254
- package/lib/browser/tinyfly-math.iife.js +4 -4
- package/lib/browser/tinyfly.iife.js +1 -1
- package/lib/browser/tinyfly.js +6 -1
- package/lib/browser/tinyfly.umd.js +1 -1
- package/lib/types/math/discrete/graph-search.d.ts +38 -0
- package/lib/types/math/discrete/set-expression.d.ts +33 -0
- package/lib/types/math/figure/display-list.d.ts +8 -0
- package/lib/types/math/figure/figure-spec.d.ts +68 -1
- package/lib/types/math/figure/items/discrete.d.ts +23 -0
- package/lib/types/math/figure/items/shapes.d.ts +3 -0
- package/lib/types/math/index.d.ts +4 -1
- package/lib/types/math/presets/discrete.d.ts +49 -0
- package/lib/types/math/tex/glyph-metrics.d.ts +8 -0
- package/lib/types/math/tex/tex-parser.d.ts +2 -1
- package/llms-full.txt +51 -18
- package/llms.txt +31 -31
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +2 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph searches as lists of events, so a figure can show any moment of
|
|
3
|
+
* one: which nodes are done, what waits in the queue or stack, and which
|
|
4
|
+
* edges the search used to reach each node. Pure and deterministic:
|
|
5
|
+
* neighbours are taken in the order the nodes are listed, so the same
|
|
6
|
+
* graph always gives the same story.
|
|
7
|
+
*/
|
|
8
|
+
export interface GraphEdge {
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
/** For shortest paths (default 1) */
|
|
12
|
+
weight?: number;
|
|
13
|
+
}
|
|
14
|
+
export type SearchKind = 'bfs' | 'dfs' | 'dijkstra';
|
|
15
|
+
export declare const SEARCH_KINDS: readonly SearchKind[];
|
|
16
|
+
/** One step: a node is reached (and finished) through an edge from `parent`. */
|
|
17
|
+
export interface SearchEvent {
|
|
18
|
+
node: string;
|
|
19
|
+
/** The node it was reached from (none for the start) */
|
|
20
|
+
parent?: string;
|
|
21
|
+
/** What waits to be visited after this step: the queue (bfs), the stack (dfs) or the open set (dijkstra) */
|
|
22
|
+
frontier: string[];
|
|
23
|
+
/** Shortest distances known after this step (dijkstra only; Infinity when unknown) */
|
|
24
|
+
distances?: Record<string, number>;
|
|
25
|
+
}
|
|
26
|
+
/** Neighbours of each node, in the order the nodes are listed. */
|
|
27
|
+
export declare function adjacency(nodes: string[], edges: GraphEdge[], directed: boolean): Map<string, {
|
|
28
|
+
to: string;
|
|
29
|
+
weight: number;
|
|
30
|
+
}[]>;
|
|
31
|
+
/** Every step of a search from `start`; nodes it cannot reach never appear. */
|
|
32
|
+
export declare function searchEvents(kind: SearchKind, start: string, nodes: string[], edges: GraphEdge[], directed?: boolean): SearchEvent[];
|
|
33
|
+
/**
|
|
34
|
+
* Positions for a tree drawn top down from `root`: each level one unit lower,
|
|
35
|
+
* leaves one unit apart, each parent centred over its children. Nodes the
|
|
36
|
+
* root cannot reach are left out.
|
|
37
|
+
*/
|
|
38
|
+
export declare function treeLayout(root: string, nodes: string[], edges: GraphEdge[]): Map<string, [number, number]>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set expressions over named sets, for shading Venn diagrams:
|
|
3
|
+
*
|
|
4
|
+
* A | B union A & B intersection
|
|
5
|
+
* A - B difference A ^ B symmetric difference
|
|
6
|
+
* A' or !A complement (within the universe)
|
|
7
|
+
*
|
|
8
|
+
* with brackets and the usual precedence (complement, then &, then | - ^,
|
|
9
|
+
* left to right). `∪ ∩ ∖ △ ¬` are accepted too. An expression is
|
|
10
|
+
* evaluated per Venn cell: given which sets a point is in, is it in the region?
|
|
11
|
+
*/
|
|
12
|
+
export type SetExpression = {
|
|
13
|
+
type: 'set';
|
|
14
|
+
name: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'not';
|
|
17
|
+
operand: SetExpression;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'op';
|
|
20
|
+
operator: '&' | '|' | '-' | '^';
|
|
21
|
+
left: SetExpression;
|
|
22
|
+
right: SetExpression;
|
|
23
|
+
};
|
|
24
|
+
export declare function parseSetExpression(source: string): SetExpression;
|
|
25
|
+
/** Every set name an expression uses. */
|
|
26
|
+
export declare function setNames(e: SetExpression): string[];
|
|
27
|
+
/** Is a point that lies in exactly the sets in `inside` within the region? */
|
|
28
|
+
export declare function inRegion(e: SetExpression, inside: ReadonlySet<string>): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The Venn cells (which sets a point is in) that make up the region, as
|
|
31
|
+
* lists of set names: `[]` is the cell outside every set.
|
|
32
|
+
*/
|
|
33
|
+
export declare function regionCells(e: SetExpression, sets: string[]): string[][];
|
|
@@ -16,6 +16,14 @@ export type Shape = {
|
|
|
16
16
|
fill?: string;
|
|
17
17
|
opacity?: number;
|
|
18
18
|
dash?: number[];
|
|
19
|
+
/**
|
|
20
|
+
* Draw only inside every one of these polygons (or, with `outside`,
|
|
21
|
+
* only outside it): how a Venn diagram shades A ∩ B or A − B.
|
|
22
|
+
*/
|
|
23
|
+
clip?: {
|
|
24
|
+
points: Vec2[];
|
|
25
|
+
outside?: boolean;
|
|
26
|
+
}[];
|
|
19
27
|
} | {
|
|
20
28
|
type: 'arrow';
|
|
21
29
|
id: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Vec2 } from '../linear/vec2';
|
|
2
|
+
import type { SearchKind } from '../discrete/graph-search';
|
|
2
3
|
/**
|
|
3
4
|
* A maths figure as plain JSON: a coordinate plane and the items drawn on it.
|
|
4
5
|
*
|
|
@@ -328,7 +329,73 @@ export interface BayesItem extends ItemBase {
|
|
|
328
329
|
/** Label the four regions (default true) */
|
|
329
330
|
labels?: boolean;
|
|
330
331
|
}
|
|
331
|
-
|
|
332
|
+
/** A node of a graph: where it is (world units; optional when the graph is a tree) and its TeX label (default its id). */
|
|
333
|
+
export interface GraphNode {
|
|
334
|
+
id: string;
|
|
335
|
+
at?: Vec2;
|
|
336
|
+
label?: string;
|
|
337
|
+
}
|
|
338
|
+
/** An edge: `{ from, to, weight? }` or the shorthand `[from, to]` / `[from, to, weight]`. */
|
|
339
|
+
export type GraphEdgeSpec = {
|
|
340
|
+
from: string;
|
|
341
|
+
to: string;
|
|
342
|
+
weight?: number;
|
|
343
|
+
} | [string, string] | [string, string, number];
|
|
344
|
+
/** Nodes and edges, optionally searched step by step (breadth first, depth first, or shortest paths). */
|
|
345
|
+
export interface GraphItem extends ItemBase {
|
|
346
|
+
kind: 'graph';
|
|
347
|
+
nodes: GraphNode[];
|
|
348
|
+
edges: GraphEdgeSpec[];
|
|
349
|
+
/** Arrows instead of lines; searches follow edge direction (default false) */
|
|
350
|
+
directed?: boolean;
|
|
351
|
+
/** Lay the nodes out as a tree from `root`, top down (`spacing` [across, down] world units, `at` the root) */
|
|
352
|
+
tree?: {
|
|
353
|
+
root: string;
|
|
354
|
+
spacing?: [number, number];
|
|
355
|
+
at?: Vec2;
|
|
356
|
+
};
|
|
357
|
+
/** The search to show */
|
|
358
|
+
search?: {
|
|
359
|
+
kind: SearchKind;
|
|
360
|
+
start: string;
|
|
361
|
+
};
|
|
362
|
+
/** How many search steps are done; the fractional part is the next node being reached (default all) */
|
|
363
|
+
step?: NumRef;
|
|
364
|
+
/** Show the queue / stack / open set as a row of labels, at this screen position (px) */
|
|
365
|
+
frontier?: Vec2;
|
|
366
|
+
/** Show edge weights (default: when a shortest-path search is shown) */
|
|
367
|
+
weights?: boolean;
|
|
368
|
+
/** Node radius, px at a 600 px figure (default 18) */
|
|
369
|
+
radius?: number;
|
|
370
|
+
}
|
|
371
|
+
/** Two or three sets as circles, with a set expression shaded: `A & B`, `(A | B)'`, `A ^ B`. */
|
|
372
|
+
export interface VennItem extends ItemBase {
|
|
373
|
+
kind: 'venn';
|
|
374
|
+
sets: {
|
|
375
|
+
id: string;
|
|
376
|
+
label?: string;
|
|
377
|
+
color?: string;
|
|
378
|
+
}[];
|
|
379
|
+
/** The region to shade, a set expression over the set ids */
|
|
380
|
+
highlight?: string;
|
|
381
|
+
highlightColor?: string;
|
|
382
|
+
/** Centre, world units (default the origin) */
|
|
383
|
+
at?: Vec2;
|
|
384
|
+
/** Circle radius, world units (default 1.5) */
|
|
385
|
+
radius?: number;
|
|
386
|
+
/** Draw the universe as a box around them (default true) */
|
|
387
|
+
universe?: boolean;
|
|
388
|
+
}
|
|
389
|
+
/** A clock of `modulus` hours: clock arithmetic. The hand points at `value` mod `modulus`, gliding between hours. */
|
|
390
|
+
export interface ClockItem extends ItemBase {
|
|
391
|
+
kind: 'clock';
|
|
392
|
+
modulus: number;
|
|
393
|
+
value: NumRef;
|
|
394
|
+
at?: Vec2;
|
|
395
|
+
/** World units (default 2) */
|
|
396
|
+
radius?: number;
|
|
397
|
+
}
|
|
398
|
+
export type MathItem = GridItem | AxesItem | VectorItem | BasisItem | PointItem | FunctionItem | ParametricItem | PolygonItem | LineItem | LabelItem | EquationItem | TangentItem | RiemannItem | AreaItem | TaylorItem | HistogramItem | DistributionItem | GaltonItem | ScatterItem | BayesItem | GraphItem | VennItem | ClockItem;
|
|
332
399
|
export type MathItemKind = MathItem['kind'];
|
|
333
400
|
export declare const ITEM_KINDS: readonly MathItemKind[];
|
|
334
401
|
export type MathThemeName = 'dark' | 'light' | 'chalk';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type GraphEdge, type SearchEvent } from '../../discrete/graph-search';
|
|
2
|
+
import { type Vec2 } from '../../linear/vec2';
|
|
3
|
+
import type { ClockItem, GraphItem, VennItem } from '../figure-spec';
|
|
4
|
+
import { type Shape } from '../display-list';
|
|
5
|
+
import { type ItemContext, type Values } from '../item-context';
|
|
6
|
+
/** A graph's edges in object form. */
|
|
7
|
+
export declare function graphEdges(item: GraphItem): GraphEdge[];
|
|
8
|
+
/** Where each node is, in world units: its own `at`, else its place in the tree layout. */
|
|
9
|
+
export declare function graphPositions(item: GraphItem): Map<string, Vec2>;
|
|
10
|
+
export interface SearchState {
|
|
11
|
+
events: SearchEvent[];
|
|
12
|
+
/** Events fully done */
|
|
13
|
+
done: number;
|
|
14
|
+
/** How far the next event is, 0..1 */
|
|
15
|
+
partial: number;
|
|
16
|
+
}
|
|
17
|
+
/** The search shown at the current `step` (all of it when no step is given). */
|
|
18
|
+
export declare function searchState(item: GraphItem, values: Values): SearchState | undefined;
|
|
19
|
+
export declare function layoutGraph(item: GraphItem, ctx: ItemContext): Shape[];
|
|
20
|
+
export declare function layoutVenn(item: VennItem, ctx: ItemContext): Shape[];
|
|
21
|
+
/** The hour a clock value shows: value mod modulus, in 0..modulus − 1. */
|
|
22
|
+
export declare const clockHour: (value: number, modulus: number) => number;
|
|
23
|
+
export declare function layoutClock(item: ClockItem, ctx: ItemContext): Shape[];
|
|
@@ -21,10 +21,12 @@ export { binSamples, defaultBins, summary, type Bin } from './prob/histogram';
|
|
|
21
21
|
export { scatterPoints, leastSquares, type PointsSpec } from './prob/scatter';
|
|
22
22
|
export { ballPath, ballAt, binOf } from './prob/galton';
|
|
23
23
|
export { bayesAreas, type BayesAreas } from './prob/bayes';
|
|
24
|
+
export { searchEvents, treeLayout, adjacency, SEARCH_KINDS, type SearchKind, type SearchEvent, type GraphEdge } from './discrete/graph-search';
|
|
25
|
+
export { parseSetExpression, inRegion, regionCells, setNames, type SetExpression } from './discrete/set-expression';
|
|
24
26
|
export { parseTex, TexError, TEX_COMMANDS, SYMBOLS, type TexNode, type TexClass } from './tex/tex-parser';
|
|
25
27
|
export { layoutTex, type TexLayout, type TexPiece, type TexGlyph, type TexRule, type TexStroke, type TexLayoutOptions } from './tex/tex-layout';
|
|
26
28
|
export { morphEquation, type MorphPiece, type PlacedLayout } from './tex/equation-morph';
|
|
27
|
-
export { MATH_FONT } from './tex/glyph-metrics';
|
|
29
|
+
export { MATH_FONT, MATH_SYMBOL_FONT } from './tex/glyph-metrics';
|
|
28
30
|
export * from './figure/figure-spec';
|
|
29
31
|
export { validateMathFigure } from './figure/validate-spec';
|
|
30
32
|
export { layoutFigure, type MathProps } from './figure/layout-figure';
|
|
@@ -39,6 +41,7 @@ export { mathExplorable, type MathExplorable, type ExplorableOptions, type Slide
|
|
|
39
41
|
export { linearMapFigure, determinantFigure, eigenFigure, vectorSumFigure, spanFigure, MATRIX_TEX, type PresetOptions, } from './presets/linear-algebra';
|
|
40
42
|
export { tangentFigure, secantFigure, riemannFigure, areaFigure, taylorFigure, limitFigure, type CalculusOptions } from './presets/calculus';
|
|
41
43
|
export { normalFigure, binomialFigure, cltFigure, galtonFigure, monteCarloPiFigure, regressionFigure, bayesFigure, type ProbabilityOptions } from './presets/probability';
|
|
44
|
+
export { graphSearchFigure, shortestPathFigure, recursionTreeFigure, vennFigure, clockFigure, SAMPLE_GRAPH, type DiscreteOptions } from './presets/discrete';
|
|
42
45
|
import type { MathFigureSpec } from './figure/figure-spec';
|
|
43
46
|
import { type MathProps } from './figure/layout-figure';
|
|
44
47
|
/** A figure checked up front: returns it unchanged, or throws a message that says how to fix it. */
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { GraphEdgeSpec, GraphNode, MathFigureSpec, MathThemeName } from '../figure/figure-spec';
|
|
2
|
+
/**
|
|
3
|
+
* Ready-made discrete maths figures. Each returns a plain MathFigureSpec
|
|
4
|
+
* whose moving part is a number value:
|
|
5
|
+
*
|
|
6
|
+
* - graphSearchFigure / shortestPathFigure / recursionTreeFigure: `step`,
|
|
7
|
+
* how many search steps are done (fractional: the next node being reached)
|
|
8
|
+
* - clockFigure: `value`, the number the hand points at (mod the modulus)
|
|
9
|
+
* - vennFigure: no values; animate the item's draw, or show one figure per region
|
|
10
|
+
*/
|
|
11
|
+
export interface DiscreteOptions {
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
theme?: MathThemeName;
|
|
15
|
+
}
|
|
16
|
+
/** A small graph of eight nodes (A–H), for searches. */
|
|
17
|
+
export declare const SAMPLE_GRAPH: {
|
|
18
|
+
nodes: GraphNode[];
|
|
19
|
+
edges: [string, string, number][];
|
|
20
|
+
};
|
|
21
|
+
/** Breadth-first or depth-first search on a graph, step by step, with its queue or stack. */
|
|
22
|
+
export declare function graphSearchFigure(options?: DiscreteOptions & {
|
|
23
|
+
search?: 'bfs' | 'dfs';
|
|
24
|
+
start?: string;
|
|
25
|
+
nodes?: GraphNode[];
|
|
26
|
+
edges?: GraphEdgeSpec[];
|
|
27
|
+
}): MathFigureSpec;
|
|
28
|
+
/** Dijkstra's shortest paths on a weighted graph: each node settles at its distance from the start. */
|
|
29
|
+
export declare function shortestPathFigure(options?: DiscreteOptions & {
|
|
30
|
+
start?: string;
|
|
31
|
+
target?: string;
|
|
32
|
+
nodes?: GraphNode[];
|
|
33
|
+
edges?: GraphEdgeSpec[];
|
|
34
|
+
}): MathFigureSpec;
|
|
35
|
+
/** The call tree of a naive recursive Fibonacci, F(n) = F(n − 1) + F(n − 2), visited in call order. */
|
|
36
|
+
export declare function recursionTreeFigure(options?: DiscreteOptions & {
|
|
37
|
+
n?: number;
|
|
38
|
+
}): MathFigureSpec;
|
|
39
|
+
/** Two or three sets as a Venn diagram with a set expression shaded. */
|
|
40
|
+
export declare function vennFigure(options?: DiscreteOptions & {
|
|
41
|
+
sets?: string[];
|
|
42
|
+
highlight?: string;
|
|
43
|
+
label?: string;
|
|
44
|
+
}): MathFigureSpec;
|
|
45
|
+
/** A clock of `modulus` hours with the hand at `value` (mod modulus). */
|
|
46
|
+
export declare function clockFigure(options?: DiscreteOptions & {
|
|
47
|
+
modulus?: number;
|
|
48
|
+
value?: number;
|
|
49
|
+
}): MathFigureSpec;
|
|
@@ -11,6 +11,14 @@
|
|
|
11
11
|
* first in MATH_FONT.
|
|
12
12
|
*/
|
|
13
13
|
export declare const MATH_FONT = "\"Latin Modern Math\", \"STIX Two Math\", \"Cambria Math\", \"Times New Roman\", \"Liberation Serif\", \"Noto Serif\", Times, serif";
|
|
14
|
+
/**
|
|
15
|
+
* Font for operators and symbols (∪ ∩ △ ∈ ≤ ∑ …): maths faces first, then
|
|
16
|
+
* DejaVu, whose serif and maths faces cover them where text serifs such as
|
|
17
|
+
* Liberation Serif do not. Letters, digits and Greek use MATH_FONT.
|
|
18
|
+
*/
|
|
19
|
+
export declare const MATH_SYMBOL_FONT = "\"Latin Modern Math\", \"STIX Two Math\", \"Cambria Math\", \"DejaVu Math TeX Gyre\", \"DejaVu Serif\", serif";
|
|
20
|
+
/** The font a glyph is drawn in: MATH_FONT for letters, digits and Greek, MATH_SYMBOL_FONT for the rest. */
|
|
21
|
+
export declare const fontFor: (text: string) => "\"Latin Modern Math\", \"STIX Two Math\", \"Cambria Math\", \"Times New Roman\", \"Liberation Serif\", \"Noto Serif\", Times, serif" | "\"Latin Modern Math\", \"STIX Two Math\", \"Cambria Math\", \"DejaVu Math TeX Gyre\", \"DejaVu Serif\", serif";
|
|
14
22
|
/** Height above the baseline of the maths axis (where fraction bars and − sit). */
|
|
15
23
|
export declare const AXIS_HEIGHT = 0.25;
|
|
16
24
|
/** Rule thickness for fraction bars and radicals. */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Supported:
|
|
5
5
|
* - Letters (italic), digits, `+ - = < > ( ) [ ] | , . ; : ! '`
|
|
6
6
|
* - `^` and `_` with a single token or a `{group}`
|
|
7
|
-
* - `\frac{a}{b}`, `\sqrt{x}`, `\vec{v}`, `\hat{x}`, `\bar{x}`
|
|
7
|
+
* - `\frac{a}{b}`, `\binom{n}{k}`, `\sqrt{x}`, `\vec{v}`, `\hat{x}`, `\bar{x}`
|
|
8
8
|
* - Big operators `\sum \prod \int` (limits from `_` and `^`), and named
|
|
9
9
|
* operators `\sin \cos \tan \log \ln \exp \det \lim \max \min \arg`
|
|
10
10
|
* - Greek letters and the symbols in SYMBOLS (`\cdot \times \le \to \infty` …)
|
|
@@ -36,6 +36,7 @@ export type TexNode = {
|
|
|
36
36
|
type: 'frac';
|
|
37
37
|
num: TexNode;
|
|
38
38
|
den: TexNode;
|
|
39
|
+
bar?: boolean;
|
|
39
40
|
} | {
|
|
40
41
|
type: 'sqrt';
|
|
41
42
|
body: TexNode;
|
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.
|
|
594
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.118.0/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.
|
|
802
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.118.0/cdn/tinyfly.iife.js"></script>
|
|
803
803
|
<script>
|
|
804
804
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
805
805
|
</script>
|
|
@@ -2714,7 +2714,7 @@ For simple website embedding without a build system.
|
|
|
2714
2714
|
</html>
|
|
2715
2715
|
```
|
|
2716
2716
|
|
|
2717
|
-
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.
|
|
2717
|
+
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.118.0/cdn/tinyfly-player.iife.js`.
|
|
2718
2718
|
|
|
2719
2719
|
---
|
|
2720
2720
|
|
|
@@ -7068,7 +7068,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
|
|
|
7068
7068
|
**Steps to embed:**
|
|
7069
7069
|
1. Build the player: `npm run build:player`
|
|
7070
7070
|
2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
|
|
7071
|
-
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
7071
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.118.0/cdn/tinyfly-player.iife.js`
|
|
7072
7072
|
instead; see [Deployment](DEPLOYMENT.md))
|
|
7073
7073
|
3. Copy the generated code into your HTML
|
|
7074
7074
|
4. Adjust the script `src` path if needed
|
|
@@ -8495,7 +8495,9 @@ lesson page (`<figure data-tinyfly-math>`), an explorable and a video
|
|
|
8495
8495
|
`point` with `on` and `x`) take numbers or number-value names for `at`, `n`,
|
|
8496
8496
|
`to`, `order`, and publish `\\val{ID.slope}`, `ID.sum`, `ID.value` for TeX. Probability items
|
|
8497
8497
|
(`histogram`, `distribution`, `galton`, `scatter`, `bayes`) take a distribution as data
|
|
8498
|
-
(`{ kind: 'normal', mean: 'mu', sd: 1 }`) and draw seeded samples, never `Math.random`.
|
|
8498
|
+
(`{ kind: 'normal', mean: 'mu', sd: 1 }`) and draw seeded samples, never `Math.random`. Discrete:
|
|
8499
|
+
`graph` (nodes with `at`, or `tree: { root }`; `search` stepped by `step`), `venn` (`highlight: "(A | B)'"`),
|
|
8500
|
+
`clock` (`modulus`, `value`). See `docs/math.md`.
|
|
8499
8501
|
|
|
8500
8502
|
## Your own behaviours
|
|
8501
8503
|
|
|
@@ -8682,7 +8684,7 @@ path for all of that:
|
|
|
8682
8684
|
</figure>
|
|
8683
8685
|
|
|
8684
8686
|
<!-- once, anywhere on the page (a site-wide footer is fine) -->
|
|
8685
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
8687
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.118.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
8686
8688
|
```
|
|
8687
8689
|
|
|
8688
8690
|
Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
|
|
@@ -9093,6 +9095,9 @@ Some names are reserved, because a track on them would move the whole figure:
|
|
|
9093
9095
|
| `galton` | `rows?`, `balls` (fractional: the next ball on its way), `spacing?`, `top?`, `seed?` |
|
|
9094
9096
|
| `scatter` | `points: { kind: 'uniform', x, y }` or `{ kind: 'linear', slope, intercept, noise, x }`, `count`, `inside?` (an expression in x and y, true when ≤ 0), `fit?`, `seed?` |
|
|
9095
9097
|
| `bayes` | `prior`, `truePositive`, `falsePositive`, `at?`, `size?`, `labels?` |
|
|
9098
|
+
| `graph` | `nodes: [{ id, at?, label? }]`, `edges` (`[from, to, weight?]` or objects), `directed?`, `tree?: { root, spacing?, at? }`, `search?: { kind: 'bfs' \| 'dfs' \| 'dijkstra', start }`, `step?`, `frontier?` (screen px), `weights?`, `radius?` |
|
|
9099
|
+
| `venn` | `sets` (two or three `{ id, label?, color? }`), `highlight?` (a set expression), `highlightColor?`, `at?`, `radius?`, `universe?` |
|
|
9100
|
+
| `clock` | `modulus`, `value`, `at?`, `radius?` |
|
|
9096
9101
|
|
|
9097
9102
|
`point` also rides a curve: `{ on: 'sin(x)', x: 'p' }` is the point (p, sin p), and
|
|
9098
9103
|
`hollow: true` draws an open circle for a hole or a limit. `function` takes
|
|
@@ -9118,6 +9123,23 @@ Items work out numbers that TeX can show with `\val{…}`:
|
|
|
9118
9123
|
| `galton` | `ID.landed` |
|
|
9119
9124
|
| `scatter` | `ID.count`, `ID.inside`, `ID.ratio`, `ID.slope`, `ID.intercept`, `ID.r` |
|
|
9120
9125
|
| `bayes` | `ID.prior`, `ID.posterior`, `ID.positive`, `ID.truePositive`, `ID.falsePositive` |
|
|
9126
|
+
| `graph` with a search | `ID.visited`, `ID.steps`, and for Dijkstra `ID.d.NODE` (∞ until known) |
|
|
9127
|
+
| `clock` | `ID.hour` (value mod modulus), `ID.turns` |
|
|
9128
|
+
|
|
9129
|
+
### Graphs, searches and sets
|
|
9130
|
+
|
|
9131
|
+
A search is shown step by step: `step` counts the nodes finished, and its
|
|
9132
|
+
fractional part draws the edge the search is crossing to the next one. Finished
|
|
9133
|
+
nodes are yellow; nodes waiting in the queue (breadth first), the stack (depth
|
|
9134
|
+
first) or the open set (Dijkstra) are blue; yellow edges are how each node was
|
|
9135
|
+
reached. Neighbours are taken in the order the nodes are listed, so a search
|
|
9136
|
+
always tells the same story (`searchEvents` returns it as data). A tree lays
|
|
9137
|
+
itself out from its root when nodes have no `at` (`treeLayout`), which is how
|
|
9138
|
+
`recursionTreeFigure` draws the calls a recursive function makes.
|
|
9139
|
+
|
|
9140
|
+
Venn regions are set expressions: `A | B`, `A & B`, `A - B`, `A ^ B`, `A'` (or
|
|
9141
|
+
`!A`), with brackets; `∪ ∩ ∖ △ ¬` work too. Each cell of the region is drawn as
|
|
9142
|
+
the universe clipped inside and outside the circles, the same in canvas and SVG.
|
|
9121
9143
|
|
|
9122
9144
|
### Distributions and randomness
|
|
9123
9145
|
|
|
@@ -9197,7 +9219,7 @@ lesson's step options (`duration`, `easing`, `delay`).
|
|
|
9197
9219
|
<figcaption>The determinant is the area of the unit square after the map.</figcaption>
|
|
9198
9220
|
</figure>
|
|
9199
9221
|
|
|
9200
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9222
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.118.0/cdn/tinyfly-math.iife.js" data-tinyfly-auto></script>
|
|
9201
9223
|
```
|
|
9202
9224
|
|
|
9203
9225
|
The figure draws itself into an SVG and redraws from the timeline whenever the
|
|
@@ -9263,9 +9285,9 @@ Equations are typeset by a built-in TeX subset, with no KaTeX or MathJax:
|
|
|
9263
9285
|
- `\sum`, `\prod` and `\int`, with limits above and below in display style
|
|
9264
9286
|
- Named operators: `\sin \cos \tan \log \ln \exp \det \lim \max \min` …
|
|
9265
9287
|
- Greek letters
|
|
9266
|
-
- Symbols: `\cdot \times \pm \le \ge \ne \approx \to \infty \partial \nabla \in` …
|
|
9288
|
+
- Symbols: `\cdot \times \pm \le \ge \ne \approx \to \infty \partial \nabla \in \cup \cap \triangle \varnothing` …
|
|
9267
9289
|
- Matrices: `\begin{pmatrix|bmatrix|vmatrix|matrix} … \end{…}`
|
|
9268
|
-
- `\text{…}`, `\color{name}{…}`, and spacing `\, \; \quad`
|
|
9290
|
+
- `\binom{n}{k}`, `\text{…}`, `\color{name}{…}`, and spacing `\, \; \quad`
|
|
9269
9291
|
- `\left( … \right)`, with delimiters at their natural size
|
|
9270
9292
|
- `\id{name}{…}`, which names a term
|
|
9271
9293
|
- `\val{name}` and `\val{name:digits}` for live values
|
|
@@ -9303,6 +9325,11 @@ their own.
|
|
|
9303
9325
|
| `monteCarloPiFigure({ count })` | Points in a square; the share inside the circle ≈ π/4 |
|
|
9304
9326
|
| `regressionFigure({ slope, intercept, noise, count })` | Noisy points and the least-squares line |
|
|
9305
9327
|
| `bayesFigure({ prior, sensitivity, falsePositive })` | A medical test as areas: P(condition given a positive) |
|
|
9328
|
+
| `graphSearchFigure({ search, start })` | Breadth- or depth-first search on a sample graph, with its queue or stack (`step`) |
|
|
9329
|
+
| `shortestPathFigure({ start, target })` | Dijkstra on the weighted sample graph, distances shown (`step`) |
|
|
9330
|
+
| `recursionTreeFigure({ n })` | The call tree of naive recursive Fibonacci, in call order (`step`) |
|
|
9331
|
+
| `vennFigure({ sets, highlight, label })` | Two or three sets with a region shaded |
|
|
9332
|
+
| `clockFigure({ modulus, value })` | Clock arithmetic (`value`) |
|
|
9306
9333
|
|
|
9307
9334
|
Each returns a plain figure to change or extend. In each, `M` starts at the
|
|
9308
9335
|
identity unless `matrix` is given.
|
|
@@ -9311,15 +9338,16 @@ identity unless `matrix` is given.
|
|
|
9311
9338
|
|
|
9312
9339
|
- Gallery: **Linear Map**, **Eigenvectors**, **Equation Steps**, **Matrix Lesson**,
|
|
9313
9340
|
**Derivative**, **Riemann Sums**, **Taylor Series**, **Galton Board**, **Central Limit
|
|
9314
|
-
Theorem**, **Monte Carlo
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
`
|
|
9341
|
+
Theorem**, **Monte Carlo π**, **Bayes: a Positive Test**, **Graph Search**, **Recursion
|
|
9342
|
+
Tree**, **Set Operations** and **Clock Arithmetic**.
|
|
9343
|
+
- Videos: `linear-map-short.mjs`, `riemann-short.mjs`, `galton-short.mjs` and
|
|
9344
|
+
`graph-search-short.mjs` (9:16); `eigen-explainer.mjs`, `taylor-explainer.mjs`,
|
|
9345
|
+
`clt-explainer.mjs` and `de-morgan-explainer.mjs` (16:9), in `examples/headless-video/`.
|
|
9318
9346
|
|
|
9319
9347
|
## Next
|
|
9320
9348
|
|
|
9321
|
-
|
|
9322
|
-
|
|
9349
|
+
AI/ML (networks with flowing activations, gradient descent on a loss surface,
|
|
9350
|
+
decision boundaries) builds on the same figure model.
|
|
9323
9351
|
See `todo.md` for their status.
|
|
9324
9352
|
|
|
9325
9353
|
---
|
|
@@ -10272,8 +10300,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
|
|
|
10272
10300
|
adds to the same `tinyfly` global:
|
|
10273
10301
|
|
|
10274
10302
|
```html
|
|
10275
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
10276
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
10303
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.118.0/cdn/tinyfly.iife.js"></script>
|
|
10304
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.118.0/cdn/tinyfly-maps.iife.js"></script>
|
|
10277
10305
|
```
|
|
10278
10306
|
|
|
10279
10307
|
It is a separate script because the offline world map it carries adds about
|
|
@@ -15502,7 +15530,7 @@ magnet.addEventListener('pointerleave', () => {
|
|
|
15502
15530
|
|
|
15503
15531
|
<!-- capabilities: generated from the library -->
|
|
15504
15532
|
|
|
15505
|
-
# tinyfly capabilities (v0.
|
|
15533
|
+
# tinyfly capabilities (v0.118.0)
|
|
15506
15534
|
|
|
15507
15535
|
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).
|
|
15508
15536
|
|
|
@@ -15990,6 +16018,8 @@ A figure is JSON: a plane and items. Tracks on its target animate values by name
|
|
|
15990
16018
|
- `tangentFigure, secantFigure, riemannFigure, areaFigure, taylorFigure, limitFigure`: ready calculus figures; their moving parts are number values (a, h, n, b, order, p)
|
|
15991
16019
|
- `differentiate / compileDerivative / integrate`: exact symbolic derivatives of expressions; Simpson integration
|
|
15992
16020
|
- `normalFigure, binomialFigure, cltFigure, galtonFigure, monteCarloPiFigure, regressionFigure, bayesFigure`: ready probability and statistics figures
|
|
16021
|
+
- `graphSearchFigure, shortestPathFigure, recursionTreeFigure, vennFigure, clockFigure`: ready discrete maths figures; searches move with the value step
|
|
16022
|
+
- `searchEvents / parseSetExpression / regionCells`: graph searches as data; set expressions and their Venn cells
|
|
15993
16023
|
- `distributions`: { kind: normal | uniform | exponential | binomial | poisson | dice | mean, …numbers or value names }; density, meanOf, sdOf, samples (seeded)
|
|
15994
16024
|
- `layoutTex(tex) / morphEquation(a, b, t)`: the built-in TeX subset, and term-by-term transitions
|
|
15995
16025
|
- `vec2, mat2`: 2D vectors and 2×2 matrices (apply, multiply, determinant, inverse, eigen)
|
|
@@ -16016,6 +16046,9 @@ Items (each has `id`, `kind`, and optional `color`, `draw`, `opacity`):
|
|
|
16016
16046
|
- `galton` { rows?, balls, spacing?, top?, seed? }: a Galton board; fractional balls = the next one falling
|
|
16017
16047
|
- `scatter` { points: uniform | linear, count, inside?, fit?, seed? }: Monte Carlo and regression; \val{ID.ratio}, \val{ID.r}
|
|
16018
16048
|
- `bayes` { prior, truePositive, falsePositive }: Bayes as areas; \val{ID.posterior}
|
|
16049
|
+
- `graph` { nodes, edges, directed?, tree?, search?: { kind: bfs | dfs | dijkstra, start }, step?, frontier? }: searches step by step
|
|
16050
|
+
- `venn` { sets (2 or 3), highlight?: set expression like (A | B)' }: shaded by clipping
|
|
16051
|
+
- `clock` { modulus, value }: clock arithmetic; \val{ID.hour}
|
|
16019
16052
|
|
|
16020
16053
|
Props a timeline animates:
|
|
16021
16054
|
|
package/llms.txt
CHANGED
|
@@ -13,49 +13,49 @@ 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.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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
|
-
- [Cricket Stories](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
43
|
-
- [Scroll Animation](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
44
|
-
- [Props: Everyday Objects with Behaviours](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
45
|
-
- [Teaching Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
46
|
-
- [Maths Animations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
47
|
-
- [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
48
|
-
- [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
49
|
-
- [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
50
|
-
- [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
51
|
-
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
52
|
-
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
53
|
-
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
54
|
-
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
55
|
-
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
56
|
-
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
42
|
+
- [Cricket Stories](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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.118.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.118.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.118.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.118.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.118.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.118.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.118.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
|
+
- [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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).
|
|
51
|
+
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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.
|
|
52
|
+
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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.
|
|
53
|
+
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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.
|
|
54
|
+
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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.
|
|
55
|
+
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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.
|
|
56
|
+
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
|
|
57
57
|
|
|
58
58
|
## Optional
|
|
59
59
|
|
|
60
|
-
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
61
|
-
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
60
|
+
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.0/README.md): Feature overview, project layout and development setup.
|
|
61
|
+
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.118.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.118.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",
|
package/skills/tinyfly/SKILL.md
CHANGED
|
@@ -176,7 +176,8 @@ names.
|
|
|
176
176
|
(`h` makes a secant), `riemann`, `area`, `taylor`; animate `at` / `n` / `to` /
|
|
177
177
|
`order` through number values. Probability: `histogram`, `distribution`,
|
|
178
178
|
`galton`, `scatter`, `bayes`; distributions are data and samples are seeded.
|
|
179
|
-
|
|
179
|
+
Discrete: `graph` (searches stepped by `step`), `venn` (set expressions),
|
|
180
|
+
`clock`. See `docs/math.md`.
|
|
180
181
|
|
|
181
182
|
## 3. Check
|
|
182
183
|
|