@algorisys/tinyfly 0.111.0 → 0.112.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 +9 -6
- package/docs/cricket.md +83 -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 +12 -0
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +909 -904
- package/lib/addons/cricket-play-Zm5cghdV.js +4828 -0
- package/lib/addons/sports.js +24 -412
- package/lib/browser/tinyfly.iife.js +14 -14
- package/lib/browser/tinyfly.js +8127 -7999
- package/lib/browser/tinyfly.umd.js +14 -14
- package/lib/types/characters/capabilities.d.ts +3 -0
- package/lib/types/sports/cricket/cricket-action.d.ts +9 -1
- package/lib/types/sports/cricket/cricket-play.d.ts +21 -0
- package/lib/types/sports/cricket/cricket-types.d.ts +50 -1
- package/lib/types/sports/cricket/index.d.ts +2 -0
- package/llms-full.txt +117 -8
- package/llms.txt +30 -30
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +12 -0
- package/lib/addons/cricket-markings-KbMjP7r6.js +0 -4312
|
@@ -3,6 +3,7 @@ import type { SurfaceAbout } from './surface/surface';
|
|
|
3
3
|
import type { Cast } from './acting/custom';
|
|
4
4
|
import { CRICKET_CASTS, CRICKET_FORMATS, CRICKET_FIELDING_POSITIONS } from '../sports/cricket/cricket-types';
|
|
5
5
|
import { CRICKET_VIEWS } from '../sports/cricket/cricket-camera';
|
|
6
|
+
import { CRICKET_PLAY_COMPONENTS, CRICKET_PLAY_EXAMPLES } from '../sports/cricket/cricket-play';
|
|
6
7
|
import { CRICKET_MARKING_PROFILES } from '../sports/cricket/cricket-markings';
|
|
7
8
|
export interface Capabilities {
|
|
8
9
|
sports: {
|
|
@@ -16,6 +17,8 @@ export interface Capabilities {
|
|
|
16
17
|
fieldingPositions: typeof CRICKET_FIELDING_POSITIONS;
|
|
17
18
|
markingProfiles: typeof CRICKET_MARKING_PROFILES;
|
|
18
19
|
cameras: typeof CRICKET_VIEWS;
|
|
20
|
+
playComponents: typeof CRICKET_PLAY_COMPONENTS;
|
|
21
|
+
playExamples: typeof CRICKET_PLAY_EXAMPLES;
|
|
19
22
|
};
|
|
20
23
|
};
|
|
21
24
|
version?: string;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { type CricketActionOptions, type CricketActionResult, type CricketClip, type CricketEvent, type CricketField, type CricketFieldOptions } from './cricket-types';
|
|
1
|
+
import { type CricketActionOptions, type CricketActionResult, type CricketClip, type CricketEvent, type CricketField, type CricketFieldOptions, type CricketResult, type CricketDelivery, type CricketRuling } from './cricket-types';
|
|
2
2
|
/** Compile an authored play on a cricketField into JSON tracks and narration events. No renderer or clock. */
|
|
3
3
|
export declare function cricketAction(field: CricketField, options?: CricketActionOptions): CricketActionResult;
|
|
4
|
+
/** Internal compiler context. Public consumers author components with cricketPlay. */
|
|
5
|
+
export interface CricketMotionContext {
|
|
6
|
+
delivery: CricketDelivery;
|
|
7
|
+
result: CricketResult;
|
|
8
|
+
ruling: CricketRuling;
|
|
9
|
+
freeHit: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function compileCricketMotion(field: CricketField, options: CricketActionOptions, composed?: CricketMotionContext): CricketActionResult;
|
|
4
12
|
/** An owned scene and timeline ready for browser/Worker/Node consumers. */
|
|
5
13
|
export declare function cricketClip(options?: CricketFieldOptions & CricketActionOptions): CricketClip;
|
|
6
14
|
/** Event/caption selection is time based, so seeking and reverse playback work too. */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type CricketField, type CricketFieldOptions, type CricketPlayOptions, type CricketPlayResult, type CricketPlayClip } from './cricket-types';
|
|
2
|
+
export declare const CRICKET_PLAY_COMPONENTS: Readonly<{
|
|
3
|
+
deliveryStyles: readonly ["pace", "spin"];
|
|
4
|
+
deliveryLegalities: readonly ["legal", "no-ball", "wide"];
|
|
5
|
+
shots: readonly ["miss", "drive", "defend"];
|
|
6
|
+
finishes: readonly ["none", "single", "four", "six", "stumps", "pad"];
|
|
7
|
+
fielding: readonly ["none", "keeper", "catch", "gather", "throw", "stumping", "run-out"];
|
|
8
|
+
dismissals: readonly ["caught", "bowled", "lbw", "stumped", "run-out"];
|
|
9
|
+
}>;
|
|
10
|
+
/** Compose motion, authored legality, current context and candidate decision as owned JSON.
|
|
11
|
+
* No innings ledger or geometric adjudication. Unsupported physical combinations throw.
|
|
12
|
+
*/
|
|
13
|
+
export declare function cricketPlay(field: CricketField, options?: CricketPlayOptions): CricketPlayResult;
|
|
14
|
+
/** Build a field and a composed play in one call. */
|
|
15
|
+
export declare function cricketPlayClip(options?: CricketFieldOptions & CricketPlayOptions): CricketPlayClip;
|
|
16
|
+
export type CricketPlayExample = 'no-ball-stumps' | 'free-hit-catch' | 'no-ball-four' | 'free-hit-run-out' | 'free-hit-wide';
|
|
17
|
+
/** Ready-to-compose educational examples. Test supports the two no-ball examples only. */
|
|
18
|
+
export declare const CRICKET_PLAY_EXAMPLES: Readonly<Record<CricketPlayExample, Readonly<{
|
|
19
|
+
name: string;
|
|
20
|
+
options: CricketPlayOptions;
|
|
21
|
+
}>>>;
|
|
@@ -84,13 +84,14 @@ export interface CricketEvent {
|
|
|
84
84
|
label: string;
|
|
85
85
|
caption: string;
|
|
86
86
|
}
|
|
87
|
+
export type CricketDismissal = 'caught' | 'bowled' | 'lbw' | 'stumped' | 'run-out';
|
|
87
88
|
export interface CricketResult {
|
|
88
89
|
runs: number;
|
|
89
90
|
extras: number;
|
|
90
91
|
wickets: number;
|
|
91
92
|
legalBall: boolean;
|
|
92
93
|
freeHitNext: boolean;
|
|
93
|
-
dismissal?:
|
|
94
|
+
dismissal?: CricketDismissal;
|
|
94
95
|
}
|
|
95
96
|
export interface CricketActionOptions {
|
|
96
97
|
action?: CricketAction;
|
|
@@ -114,3 +115,51 @@ export declare const CRICKET_ACTIONS: Readonly<Record<CricketAction, Readonly<{
|
|
|
114
115
|
summary: string;
|
|
115
116
|
}>>>;
|
|
116
117
|
export declare function cricketChoice<T extends string>(choices: Readonly<Record<T, unknown>>, value: T, name: string): T;
|
|
118
|
+
/** Components supported by the deterministic stock motion compiler. */
|
|
119
|
+
export type CricketShot = 'miss' | 'drive' | 'defend';
|
|
120
|
+
export type CricketFinish = 'none' | 'single' | 'four' | 'six' | 'stumps' | 'pad';
|
|
121
|
+
export type CricketFielding = 'none' | 'keeper' | 'catch' | 'gather' | 'throw' | 'stumping' | 'run-out';
|
|
122
|
+
export interface CricketDelivery {
|
|
123
|
+
style: 'pace' | 'spin';
|
|
124
|
+
/** Authored legality; no-ball uses the stock front-foot overstep motion. */
|
|
125
|
+
legality: 'legal' | 'no-ball' | 'wide';
|
|
126
|
+
}
|
|
127
|
+
export interface CricketPlayOptions {
|
|
128
|
+
delivery?: Partial<CricketDelivery>;
|
|
129
|
+
shot?: CricketShot;
|
|
130
|
+
finish?: CricketFinish;
|
|
131
|
+
/** Defaults to keeper for a miss, gather for a drive, none for a block/boundary/stumps/pad. */
|
|
132
|
+
fielding?: CricketFielding;
|
|
133
|
+
context?: {
|
|
134
|
+
freeHit?: boolean;
|
|
135
|
+
};
|
|
136
|
+
/** Explicit authored candidate; omitted/null means no dismissal. Geometry does not adjudicate. */
|
|
137
|
+
decision?: {
|
|
138
|
+
dismissal?: CricketDismissal | null;
|
|
139
|
+
};
|
|
140
|
+
duration?: number;
|
|
141
|
+
every?: number;
|
|
142
|
+
}
|
|
143
|
+
export interface CricketPlay {
|
|
144
|
+
delivery: CricketDelivery;
|
|
145
|
+
shot: CricketShot;
|
|
146
|
+
finish: CricketFinish;
|
|
147
|
+
fielding: CricketFielding;
|
|
148
|
+
context: {
|
|
149
|
+
freeHit: boolean;
|
|
150
|
+
};
|
|
151
|
+
decision: {
|
|
152
|
+
dismissal: CricketDismissal | null;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export interface CricketRuling {
|
|
156
|
+
dismissal: CricketDismissal | null;
|
|
157
|
+
reason: 'no-dismissal' | 'dismissal' | 'no-ball' | 'free-hit' | 'wide';
|
|
158
|
+
}
|
|
159
|
+
export interface CricketPlayResult extends CricketActionResult {
|
|
160
|
+
/** Normalized, owned JSON input; action names the compiled stock motion recipe. */
|
|
161
|
+
play: CricketPlay;
|
|
162
|
+
ruling: CricketRuling;
|
|
163
|
+
}
|
|
164
|
+
export interface CricketPlayClip extends CricketField, CricketPlayResult {
|
|
165
|
+
}
|
|
@@ -4,3 +4,5 @@ export { cricketAction, cricketClip, cricketEventAt } from './cricket-action';
|
|
|
4
4
|
export { cricketCameraTracks, CRICKET_VIEWS, CRICKET_CAMERA_ANGLES, type CricketView, type CricketCameraOptions } from './cricket-camera';
|
|
5
5
|
export { CRICKET_FORMATS, CRICKET_ACTIONS, CRICKET_CASTS, CRICKET_FIELDING_POSITIONS } from './cricket-types';
|
|
6
6
|
export type { CricketFormat, CricketRole, CricketCast, CricketAction, CricketMarkingProfile, CricketFieldingArea, CricketFieldingPosition, CricketFormatInfo, CricketPlayerOptions, CricketFieldOptions, CricketField, CricketEvent, CricketResult, CricketActionOptions, CricketActionResult, CricketClip, CricketPlayer } from './cricket-types';
|
|
7
|
+
export { cricketPlay, cricketPlayClip, CRICKET_PLAY_COMPONENTS, CRICKET_PLAY_EXAMPLES, type CricketPlayExample } from './cricket-play';
|
|
8
|
+
export type { CricketDismissal, CricketShot, CricketFinish, CricketFielding, CricketDelivery, CricketPlayOptions, CricketPlay, CricketRuling, CricketPlayResult, CricketPlayClip } from './cricket-types';
|
package/llms-full.txt
CHANGED
|
@@ -58,6 +58,8 @@ See [getting started](getting-started.md) for the versioned CDN URLs.
|
|
|
58
58
|
| `cricketFieldingPositions(field)` | Owned setup-position data for stock fielders: `id`, `name`, `position`, `inside`. |
|
|
59
59
|
| `cricketFieldingOverlay(field)` | Optional static JSON line markers, green inside/orange outside. Append to scene objects without changing motion. |
|
|
60
60
|
| `cricketAction(field, { action?, duration?, every? })` | A JSON timeline, timed events/captions and declared example result. Does not modify the field. |
|
|
61
|
+
| `cricketPlay(field, options)` | Composes independent delivery, shot, finish, fielding, context and candidate decision; returns `play`, `ruling`, timeline, events and result. |
|
|
62
|
+
| `cricketPlayClip(options)` | Builds a field and composed play together. |
|
|
61
63
|
| `cricketClip(options)` | Combines field and action; default T20, adult cast, pace bowling, 6000 ms. |
|
|
62
64
|
| `cricketCameraTracks(clip, { view?, yaw?, zoom?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
63
65
|
| `cricketEventAt(events, time)` | Most recent event at that time, including when seeking backward. |
|
|
@@ -223,6 +225,87 @@ spacing without evaluating actor tracks.
|
|
|
223
225
|
Development full-page previews load the local browser API and scene add-ons;
|
|
224
226
|
production previews and copied HTML retain the versioned CDN bundles.
|
|
225
227
|
|
|
228
|
+
## Composed plays and authored decisions
|
|
229
|
+
|
|
230
|
+
Use `cricketPlay` on an existing field or `cricketPlayClip` for a new scene.
|
|
231
|
+
Delivery legality is authored, not calculated from foot geometry. No-ball uses
|
|
232
|
+
the stock front-foot overstep, while shots, catches and wicket breaks retain
|
|
233
|
+
their native contact keys. A candidate dismissal is separate from that motion;
|
|
234
|
+
omitted/null `decision.dismissal` means no dismissal.
|
|
235
|
+
|
|
236
|
+
```ts
|
|
237
|
+
import { cricketPlayClip } from '@algorisys/tinyfly/sports'
|
|
238
|
+
|
|
239
|
+
const first = cricketPlayClip({
|
|
240
|
+
format: 't20', delivery: { style: 'pace', legality: 'no-ball' },
|
|
241
|
+
shot: 'miss', finish: 'stumps', decision: { dismissal: 'bowled' },
|
|
242
|
+
})
|
|
243
|
+
// Bails fall, but ruling is { dismissal: null, reason: 'no-ball' }.
|
|
244
|
+
// result: 0 bat runs, 1 extra, 0 wickets, legalBall false, freeHitNext true.
|
|
245
|
+
const next = cricketPlayClip({
|
|
246
|
+
format: 't20', delivery: { style: 'spin', legality: 'legal' },
|
|
247
|
+
context: { freeHit: first.result.freeHitNext },
|
|
248
|
+
shot: 'drive', fielding: 'catch', decision: { dismissal: 'caught' },
|
|
249
|
+
})
|
|
250
|
+
// Catch stays visible. Not out; this legal delivery consumes the free hit.
|
|
251
|
+
// Store/advance innings, score, strike and lesson state in your application.
|
|
252
|
+
const again = JSON.stringify(next) // normalized play + ruling + all motion/events
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
`play` contains owned, normalized input. `action` identifies the compiled stock
|
|
256
|
+
motion recipe; it does not declare the composed verdict. `ruling` holds the
|
|
257
|
+
accepted dismissal or null and its reason. `result.dismissal` exists only for an
|
|
258
|
+
accepted dismissal. Decision changes preserve the ball/actor motion, apart from
|
|
259
|
+
the umpire signal. Physical catch, pad contact and wicket-break captions stay
|
|
260
|
+
separate from the final **Out** / **Not out** decision.
|
|
261
|
+
|
|
262
|
+
| Component | Choices/default |
|
|
263
|
+
| --- | --- |
|
|
264
|
+
| `delivery.style` | `pace` (default), `spin` |
|
|
265
|
+
| `delivery.legality` | `legal` (default), `no-ball`, `wide`; select the final call, with no-ball taking precedence over Wide |
|
|
266
|
+
| `shot` | `miss` (default), `drive`, `defend` |
|
|
267
|
+
| `finish` | `none` (default), `single`, `four`, `six`, `stumps`, `pad` |
|
|
268
|
+
| `fielding` | `none`, `keeper`, `catch`, `gather`, `throw`, `stumping`, `run-out`; defaults below |
|
|
269
|
+
| `context.freeHit` | Boolean, default false; ODI/T20 only |
|
|
270
|
+
| `decision.dismissal` | `caught`, `bowled`, `lbw`, `stumped`, `run-out`, null (default); candidate must match the physical recipe |
|
|
271
|
+
| `duration`, `every` | Same scaling and contact-preserving sampling as `cricketAction` |
|
|
272
|
+
|
|
273
|
+
Supported physical combinations:
|
|
274
|
+
|
|
275
|
+
| Shot | Finish | Fielding (default when omitted) |
|
|
276
|
+
| --- | --- | --- |
|
|
277
|
+
| `miss` | `none` | `keeper` (default) or explicit `stumping` |
|
|
278
|
+
| `miss` | `stumps` / `pad` | `none` (default) |
|
|
279
|
+
| `defend` | `none` | `none` (default) |
|
|
280
|
+
| `drive` | `none` | `gather` (default), `catch`, `throw`, `run-out` |
|
|
281
|
+
| `drive` | `single` | `gather` (default) |
|
|
282
|
+
| `drive` | `four` / `six` | `none` (default) |
|
|
283
|
+
|
|
284
|
+
Other combinations throw rather than silently substitute a different play.
|
|
285
|
+
Wide currently supports only an untouched miss gathered by the keeper; Wide
|
|
286
|
+
stumping/run-out and additional Wide runs require future motion recipes.
|
|
287
|
+
`single`/`four`/`six` score 1/4/6 bat runs; an illegal delivery adds one extra.
|
|
288
|
+
Run-out depicts an attempted, uncompleted run and scores no completed runs.
|
|
289
|
+
Byes, leg-byes, penalties and other dismissal modes are outside this subset.
|
|
290
|
+
|
|
291
|
+
No-ball/free-hit context suppresses caught, bowled, LBW and stumped candidates,
|
|
292
|
+
while the supported run-out candidate remains available. A no-ball arms the
|
|
293
|
+
next free hit in ODI/T20; an existing free hit carries over a Wide/no-ball and
|
|
294
|
+
is consumed by a legal delivery. Test has no automatic free hit and rejects an
|
|
295
|
+
explicit current free-hit context. These conditions follow clauses 21.12,
|
|
296
|
+
21.17–21.18 in [ICC ODI October 2026](https://images.icc-cricket.com/image/upload/prd/bxkzkcyvfn6tvi70zh0w.pdf)
|
|
297
|
+
and [ICC T20I October 2026](https://images.icc-cricket.com/image/upload/prd/bsxcho7ufe2pjban0wjp.pdf).
|
|
298
|
+
They cover the supported authored examples, not a complete umpiring engine.
|
|
299
|
+
|
|
300
|
+
`CRICKET_PLAY_COMPONENTS` and `CRICKET_PLAY_EXAMPLES` provide JSON discovery;
|
|
301
|
+
the latter has five frozen examples. In the live example's **Play** selector,
|
|
302
|
+
choose the **Composed plays** group: no-ball/stumps, free-hit/catch,
|
|
303
|
+
no-ball/four, free-hit/run-out or free-hit/Wide. Free-hit choices are disabled
|
|
304
|
+
in Test; switching to Test from one selects no-ball/stumps. Downloads include
|
|
305
|
+
normalized components, ruling, result, scene, camera tracks and captions.
|
|
306
|
+
The original sixteen `cricketAction`/`cricketClip` presets retain their original
|
|
307
|
+
motion, result shape and captions.
|
|
308
|
+
|
|
226
309
|
## Teaching scope
|
|
227
310
|
|
|
228
311
|
These are authored visual demonstrations. Arcs, the enlarged ball, timings,
|
|
@@ -450,7 +533,7 @@ with a GSAP-style call (durations are in seconds here):
|
|
|
450
533
|
```html
|
|
451
534
|
<div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
|
|
452
535
|
|
|
453
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
536
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js"></script>
|
|
454
537
|
<script>
|
|
455
538
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
456
539
|
</script>
|
|
@@ -658,7 +741,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
|
|
|
658
741
|
global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
|
|
659
742
|
|
|
660
743
|
```html
|
|
661
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
744
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js"></script>
|
|
662
745
|
<script>
|
|
663
746
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
664
747
|
</script>
|
|
@@ -2573,7 +2656,7 @@ For simple website embedding without a build system.
|
|
|
2573
2656
|
</html>
|
|
2574
2657
|
```
|
|
2575
2658
|
|
|
2576
|
-
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.
|
|
2659
|
+
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.112.0/cdn/tinyfly-player.iife.js`.
|
|
2577
2660
|
|
|
2578
2661
|
---
|
|
2579
2662
|
|
|
@@ -6926,7 +7009,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
|
|
|
6926
7009
|
**Steps to embed:**
|
|
6927
7010
|
1. Build the player: `npm run build:player`
|
|
6928
7011
|
2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
|
|
6929
|
-
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
7012
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-player.iife.js`
|
|
6930
7013
|
instead; see [Deployment](DEPLOYMENT.md))
|
|
6931
7014
|
3. Copy the generated code into your HTML
|
|
6932
7015
|
4. Adjust the script `src` path if needed
|
|
@@ -8179,6 +8262,18 @@ demonstrations, not collision-based umpiring or an innings simulator. Do not
|
|
|
8179
8262
|
infer new outcomes from the illustrative arcs. See `docs/cricket.md` and
|
|
8180
8263
|
`examples/headless-video/cricket-story.mjs`; `/examples/live-cricket-story`
|
|
8181
8264
|
has event seeking and downloadable scene/action/camera JSON.
|
|
8265
|
+
For composed plays use `cricketPlay(field, options)` / `cricketPlayClip(options)`.
|
|
8266
|
+
Separate `delivery: { style, legality }`, `shot`, `finish`, `fielding`,
|
|
8267
|
+
`context: { freeHit }` and `decision: { dismissal }`. Omitted/null dismissal
|
|
8268
|
+
means no dismissal; never infer one from motion. Supported candidates are
|
|
8269
|
+
caught/bowled/lbw/stumped/run-out; no-ball/free-hit protects the first four,
|
|
8270
|
+
while run-out remains possible. Current illegal free hits carry forward, legal
|
|
8271
|
+
ones consume context; Test rejects current free-hit context. Retain `play`,
|
|
8272
|
+
`ruling`, `result`, contact keys and camera tracks in JSON. Keep innings/score/
|
|
8273
|
+
strike/lesson state in the consuming app. `CRICKET_PLAY_COMPONENTS` discovers
|
|
8274
|
+
choices; `CRICKET_PLAY_EXAMPLES` provides five examples. Unsupported physical
|
|
8275
|
+
combinations throw; Wide currently only supports miss/keeper/no finish.
|
|
8276
|
+
See docs/cricket.md for the combination table. Original sixteen presets remain.
|
|
8182
8277
|
Choose `markingProfile: 'icc-men' | 'icc-women' | 'mcc'` explicitly when
|
|
8183
8278
|
teaching field geography; default ICC men is independent of cast. These are
|
|
8184
8279
|
marking dimensions, not full competition profiles. ODI/T20 ICC areas are
|
|
@@ -8494,7 +8589,7 @@ path for all of that:
|
|
|
8494
8589
|
</figure>
|
|
8495
8590
|
|
|
8496
8591
|
<!-- once, anywhere on the page (a site-wide footer is fine) -->
|
|
8497
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
8592
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
8498
8593
|
```
|
|
8499
8594
|
|
|
8500
8595
|
Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
|
|
@@ -9766,8 +9861,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
|
|
|
9766
9861
|
adds to the same `tinyfly` global:
|
|
9767
9862
|
|
|
9768
9863
|
```html
|
|
9769
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9770
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9864
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js"></script>
|
|
9865
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-maps.iife.js"></script>
|
|
9771
9866
|
```
|
|
9772
9867
|
|
|
9773
9868
|
It is a separate script because the offline world map it carries adds about
|
|
@@ -14945,7 +15040,7 @@ magnet.addEventListener('pointerleave', () => {
|
|
|
14945
15040
|
|
|
14946
15041
|
<!-- capabilities: generated from the library -->
|
|
14947
15042
|
|
|
14948
|
-
# tinyfly capabilities (v0.
|
|
15043
|
+
# tinyfly capabilities (v0.112.0)
|
|
14949
15044
|
|
|
14950
15045
|
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).
|
|
14951
15046
|
|
|
@@ -15366,6 +15461,20 @@ Edits:
|
|
|
15366
15461
|
|
|
15367
15462
|
Marking profiles: `mcc`, `icc-men`, `icc-women`; default ICC men, independently of cast. Limited-over ICC profiles draw a wicket-centred capsule; Test/MCC have no restriction-area line. `cricketFieldingAreaContains(field, point)` returns true/false/null; `cricketFieldingPositions` and `cricketFieldingOverlay` provide owned setup markers, not umpiring decisions.
|
|
15368
15463
|
|
|
15464
|
+
`cricketPlay(field, options)` / `cricketPlayClip(options)` independently author delivery style/legality, shot, finish, fielding, current free-hit context and candidate dismissal. Omitted dismissal means no dismissal. Unsupported motion combinations throw; no-ball/free-hit protection changes result/signals without removing physical catches or wicket breaks. Run-out remains available. Illegal free hits carry forward; legal ones consume context. Test rejects free-hit context. Keep innings/score/strike in the consuming app.
|
|
15465
|
+
|
|
15466
|
+
Play deliveryStyles: `pace`, `spin`
|
|
15467
|
+
Play deliveryLegalities: `legal`, `no-ball`, `wide`
|
|
15468
|
+
Play shots: `miss`, `drive`, `defend`
|
|
15469
|
+
Play finishes: `none`, `single`, `four`, `six`, `stumps`, `pad`
|
|
15470
|
+
Play fielding: `none`, `keeper`, `catch`, `gather`, `throw`, `stumping`, `run-out`
|
|
15471
|
+
Play dismissals: `caught`, `bowled`, `lbw`, `stumped`, `run-out`
|
|
15472
|
+
- Composed example `no-ball-stumps`: No-ball + stumps hit
|
|
15473
|
+
- Composed example `free-hit-catch`: Free hit + catch
|
|
15474
|
+
- Composed example `no-ball-four`: No-ball + four
|
|
15475
|
+
- Composed example `free-hit-run-out`: Free hit + run-out
|
|
15476
|
+
- Composed example `free-hit-wide`: Free hit + Wide
|
|
15477
|
+
|
|
15369
15478
|
- `bowling`: Run up, deliver with a straight arm, bounce and follow through.
|
|
15370
15479
|
- `spin`: A shorter approach and a curved illustrative flight before the bounce.
|
|
15371
15480
|
- `batting`: Two hands on the bat, a backlift, contact and a follow-through.
|
package/llms.txt
CHANGED
|
@@ -13,48 +13,48 @@ 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.112.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.112.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.112.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.112.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.112.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.112.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.112.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.112.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.112.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.112.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.112.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.112.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.112.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.112.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
|
-
- [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
47
|
-
- [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
48
|
-
- [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
49
|
-
- [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
50
|
-
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
51
|
-
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
52
|
-
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
53
|
-
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
54
|
-
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
55
|
-
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
42
|
+
- [Cricket Stories](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.112.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.112.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.112.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
|
+
- [Rendering Video from Code](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
47
|
+
- [Animated Maps](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
48
|
+
- [Cartoon Hands](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
49
|
+
- [Character Appearance](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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).
|
|
50
|
+
- [Cartoon Acting](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
51
|
+
- [Dance and Flips](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
52
|
+
- [3D Scenes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
53
|
+
- [3D Transforms and Rotations](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
54
|
+
- [Extending tinyfly](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.
|
|
55
|
+
- [Deployment](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.0/docs/DEPLOYMENT.md): Building and hosting the editor, and serving the player bundles.
|
|
56
56
|
|
|
57
57
|
## Optional
|
|
58
58
|
|
|
59
|
-
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
60
|
-
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.
|
|
59
|
+
- [README](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.0/README.md): Feature overview, project layout and development setup.
|
|
60
|
+
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.112.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.112.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
|
@@ -171,6 +171,18 @@ from `CRICKET_ACTIONS`. Results and arcs are authored teaching examples, not
|
|
|
171
171
|
physics, automatic umpiring or a complete innings. Preserve exact contact keys
|
|
172
172
|
and merge the selected camera tracks when exporting. See `docs/cricket.md`,
|
|
173
173
|
`/examples/live-cricket-story` and `examples/headless-video/cricket-story.mjs`.
|
|
174
|
+
For composed plays use `cricketPlay(field, options)` / `cricketPlayClip(options)`.
|
|
175
|
+
Separate `delivery: { style, legality }`, `shot`, `finish`, `fielding`,
|
|
176
|
+
`context: { freeHit }` and `decision: { dismissal }`. Omitted/null dismissal
|
|
177
|
+
means no dismissal; never infer one from motion. Supported candidates are
|
|
178
|
+
caught/bowled/lbw/stumped/run-out; no-ball/free-hit protects the first four,
|
|
179
|
+
while run-out remains possible. Current illegal free hits carry forward, legal
|
|
180
|
+
ones consume context; Test rejects current free-hit context. Retain `play`,
|
|
181
|
+
`ruling`, `result`, contact keys and camera tracks in JSON. Keep innings/score/
|
|
182
|
+
strike/lesson state in the consuming app. `CRICKET_PLAY_COMPONENTS` discovers
|
|
183
|
+
choices; `CRICKET_PLAY_EXAMPLES` provides five examples. Unsupported physical
|
|
184
|
+
combinations throw; Wide currently only supports miss/keeper/no finish.
|
|
185
|
+
See docs/cricket.md for the combination table. Original sixteen presets remain.
|
|
174
186
|
Choose `markingProfile: 'icc-men' | 'icc-women' | 'mcc'` explicitly when
|
|
175
187
|
teaching field geography; default ICC men is independent of cast. These are
|
|
176
188
|
marking dimensions, not full competition profiles. ODI/T20 ICC areas are
|