@algorisys/tinyfly 0.110.0 → 0.111.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/cricket.md +62 -2
- 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 +10 -0
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +1093 -1091
- package/lib/addons/{cricket-camera-tMg3Ag3F.js → cricket-markings-KbMjP7r6.js} +1807 -1716
- package/lib/addons/sports.js +258 -289
- package/lib/browser/tinyfly.iife.js +12 -12
- package/lib/browser/tinyfly.js +4725 -4672
- package/lib/browser/tinyfly.umd.js +12 -12
- package/lib/types/characters/capabilities.d.ts +2 -0
- package/lib/types/sports/cricket/cricket-markings.d.ts +35 -0
- package/lib/types/sports/cricket/cricket-types.d.ts +18 -0
- package/lib/types/sports/cricket/index.d.ts +2 -1
- package/llms-full.txt +82 -10
- package/llms.txt +30 -30
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +10 -0
|
@@ -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_MARKING_PROFILES } from '../sports/cricket/cricket-markings';
|
|
6
7
|
export interface Capabilities {
|
|
7
8
|
sports: {
|
|
8
9
|
cricket: {
|
|
@@ -13,6 +14,7 @@ export interface Capabilities {
|
|
|
13
14
|
formats: typeof CRICKET_FORMATS;
|
|
14
15
|
casts: typeof CRICKET_CASTS;
|
|
15
16
|
fieldingPositions: typeof CRICKET_FIELDING_POSITIONS;
|
|
17
|
+
markingProfiles: typeof CRICKET_MARKING_PROFILES;
|
|
16
18
|
cameras: typeof CRICKET_VIEWS;
|
|
17
19
|
};
|
|
18
20
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Vec3 } from '../../engine/math';
|
|
2
|
+
import type { Object3D } from '../../scene-3d/scene-types';
|
|
3
|
+
import { type CricketField, type CricketFieldingArea, type CricketFieldingPosition } from './cricket-types';
|
|
4
|
+
/** MCC 2026 Law 7.3; ICC October 2026 clauses 7.3 and 28.7 (all formats). */
|
|
5
|
+
export declare const CRICKET_MARKING_PROFILES: Readonly<{
|
|
6
|
+
mcc: Readonly<{
|
|
7
|
+
name: "MCC";
|
|
8
|
+
poppingCreaseHalfWidth: 1.83;
|
|
9
|
+
fieldingRadius: null;
|
|
10
|
+
summary: "MCC minimum crease markings. The base Laws do not prescribe a limited-over restriction area.";
|
|
11
|
+
}>;
|
|
12
|
+
'icc-men': Readonly<{
|
|
13
|
+
name: "ICC men";
|
|
14
|
+
poppingCreaseHalfWidth: 7.5;
|
|
15
|
+
fieldingRadius: 27.43;
|
|
16
|
+
summary: "ICC men: extended crease markings; ODI/T20 restriction-area arcs have a 27.43 m radius.";
|
|
17
|
+
}>;
|
|
18
|
+
'icc-women': Readonly<{
|
|
19
|
+
name: "ICC women";
|
|
20
|
+
poppingCreaseHalfWidth: 7.5;
|
|
21
|
+
fieldingRadius: 23;
|
|
22
|
+
summary: "ICC women: extended crease markings; ODI/T20 restriction-area arcs have a 23 m radius.";
|
|
23
|
+
}>;
|
|
24
|
+
}>;
|
|
25
|
+
/** Draw the ideal region as a sampled closed line; both straight sides are exact. */
|
|
26
|
+
export declare function cricketFieldingOutline(area: CricketFieldingArea): Vec3[];
|
|
27
|
+
/** Classify an x/z point against the ideal capsule. Its boundary is included.
|
|
28
|
+
* null means the field has no region metadata (Test, MCC or older/custom JSON).
|
|
29
|
+
* This does not adjudicate a player's feet, a powerplay phase or a legal field.
|
|
30
|
+
*/
|
|
31
|
+
export declare function cricketFieldingAreaContains(field: CricketField, point: Vec3): boolean | null;
|
|
32
|
+
/** Owned setup-position data for stock fielders, suitable for teaching overlays. */
|
|
33
|
+
export declare function cricketFieldingPositions(field: CricketField): CricketFieldingPosition[];
|
|
34
|
+
/** Static ground markers for the setup positions; motion and field are untouched. */
|
|
35
|
+
export declare function cricketFieldingOverlay(field: CricketField): Object3D[];
|
|
@@ -6,6 +6,19 @@ import type { SoftCartoonName } from '../../characters/soft-cartoon-cast';
|
|
|
6
6
|
export type CricketFormat = 'test' | 'odi' | 't20';
|
|
7
7
|
export type CricketRole = 'batter' | 'bowler' | 'keeper' | 'fielder' | 'umpire';
|
|
8
8
|
export type CricketCast = 'adults' | 'men' | 'children' | 'mixed';
|
|
9
|
+
export type CricketMarkingProfile = 'mcc' | 'icc-men' | 'icc-women';
|
|
10
|
+
/** Ground-plane capsule: outward semicircles at the two middle stumps. */
|
|
11
|
+
export interface CricketFieldingArea {
|
|
12
|
+
radius: number;
|
|
13
|
+
centres: [Vec3, Vec3];
|
|
14
|
+
}
|
|
15
|
+
export interface CricketFieldingPosition {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
position: Vec3;
|
|
19
|
+
/** Reference point classification; null when no restriction area is defined. */
|
|
20
|
+
inside: boolean | null;
|
|
21
|
+
}
|
|
9
22
|
export type CricketAction = 'bowling' | 'spin' | 'batting' | 'defend' | 'running' | 'four' | 'six' | 'catch' | 'fielding' | 'throw' | 'bowled' | 'lbw' | 'stumping' | 'run-out' | 'no-ball' | 'wide';
|
|
10
23
|
export interface CricketFormatInfo {
|
|
11
24
|
name: string;
|
|
@@ -48,6 +61,8 @@ export interface CricketFieldOptions {
|
|
|
48
61
|
id?: string;
|
|
49
62
|
format?: CricketFormat;
|
|
50
63
|
cast?: CricketCast;
|
|
64
|
+
/** Marking dimensions only; default ICC men. Independent of character cast. */
|
|
65
|
+
markingProfile?: CricketMarkingProfile;
|
|
51
66
|
/** Circular illustrative boundary in metres, default 64; venues choose their own boundaries. */
|
|
52
67
|
boundaryRadius?: number;
|
|
53
68
|
battingColor?: string;
|
|
@@ -58,6 +73,9 @@ export interface CricketField {
|
|
|
58
73
|
format: CricketFormat;
|
|
59
74
|
boundaryRadius: number;
|
|
60
75
|
landmarks: Record<string, Vec3>;
|
|
76
|
+
/** Present on newly built fields; optional for pre-profile/custom JSON fields. */
|
|
77
|
+
markingProfile?: CricketMarkingProfile;
|
|
78
|
+
fieldingArea?: CricketFieldingArea | null;
|
|
61
79
|
}
|
|
62
80
|
export interface CricketEvent {
|
|
63
81
|
id: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { cricketPlayer, cricketField, CRICKET_PITCH } from './cricket-field';
|
|
2
|
+
export { CRICKET_MARKING_PROFILES, cricketFieldingAreaContains, cricketFieldingPositions, cricketFieldingOverlay } from './cricket-markings';
|
|
2
3
|
export { cricketAction, cricketClip, cricketEventAt } from './cricket-action';
|
|
3
4
|
export { cricketCameraTracks, CRICKET_VIEWS, CRICKET_CAMERA_ANGLES, type CricketView, type CricketCameraOptions } from './cricket-camera';
|
|
4
5
|
export { CRICKET_FORMATS, CRICKET_ACTIONS, CRICKET_CASTS, CRICKET_FIELDING_POSITIONS } from './cricket-types';
|
|
5
|
-
export type { CricketFormat, CricketRole, CricketCast, CricketAction, CricketFormatInfo, CricketPlayerOptions, CricketFieldOptions, CricketField, CricketEvent, CricketResult, CricketActionOptions, CricketActionResult, CricketClip, CricketPlayer } from './cricket-types';
|
|
6
|
+
export type { CricketFormat, CricketRole, CricketCast, CricketAction, CricketMarkingProfile, CricketFieldingArea, CricketFieldingPosition, CricketFormatInfo, CricketPlayerOptions, CricketFieldOptions, CricketField, CricketEvent, CricketResult, CricketActionOptions, CricketActionResult, CricketClip, CricketPlayer } from './cricket-types';
|
package/llms-full.txt
CHANGED
|
@@ -53,10 +53,13 @@ See [getting started](getting-started.md) for the versioned CDN URLs.
|
|
|
53
53
|
| API | Result |
|
|
54
54
|
| --- | --- |
|
|
55
55
|
| `cricketPlayer({ id, role, preset?, format?, height?, position?, color?, headwear?, appearance? })` | An owned JSON `character` scene object. Roles: batter, bowler, keeper, fielder, umpire. Presets include youngMan, youngWoman, childBoy, childGirl. |
|
|
56
|
-
| `cricketField({ id?, format?, cast?, boundaryRadius?, battingColor?, fieldingColor? })` | `scene`, `format`, `boundaryRadius`, `landmarks`; stock fielders have human-readable JSON `name` labels. A 20.12 × 3.05 metre pitch, standard creases, wickets/bails, two bats, ball, boundary, eleven fielding players, two batters and two umpires. |
|
|
56
|
+
| `cricketField({ id?, format?, cast?, boundaryRadius?, markingProfile?, battingColor?, fieldingColor? })` | `scene`, `format`, `boundaryRadius`, `landmarks`, `markingProfile`, `fieldingArea`; stock fielders have human-readable JSON `name` labels. A 20.12 × 3.05 metre pitch, standard creases, wickets/bails, two bats, ball, boundary, eleven fielding players, two batters and two umpires. |
|
|
57
|
+
| `cricketFieldingAreaContains(field, point)` | `true` inside/on the ideal restriction-area capsule, `false` outside, `null` without region metadata. Uses x/z; point height is ignored. |
|
|
58
|
+
| `cricketFieldingPositions(field)` | Owned setup-position data for stock fielders: `id`, `name`, `position`, `inside`. |
|
|
59
|
+
| `cricketFieldingOverlay(field)` | Optional static JSON line markers, green inside/orange outside. Append to scene objects without changing motion. |
|
|
57
60
|
| `cricketAction(field, { action?, duration?, every? })` | A JSON timeline, timed events/captions and declared example result. Does not modify the field. |
|
|
58
61
|
| `cricketClip(options)` | Combines field and action; default T20, adult cast, pace bowling, 6000 ms. |
|
|
59
|
-
| `cricketCameraTracks(clip, { view?, yaw?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
62
|
+
| `cricketCameraTracks(clip, { view?, yaw?, zoom?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
60
63
|
| `cricketEventAt(events, time)` | Most recent event at that time, including when seeking backward. |
|
|
61
64
|
| `ballFlightPoint(options, time)`, `ballFlightTracks(options)` | Shared sampled arcs for other sports too. `from`, `to`, `arc`, `curve`, `start`, `end`, `target`; exact endpoints. |
|
|
62
65
|
|
|
@@ -112,6 +115,63 @@ before the ball arrives. Their native head poses aim at world targets,
|
|
|
112
115
|
independently of their body yaw and camera selection. The live example's
|
|
113
116
|
**Teams and field positions** disclosure uses the scene's JSON labels.
|
|
114
117
|
|
|
118
|
+
## Field marking profiles
|
|
119
|
+
|
|
120
|
+
`markingProfile` is `icc-men` (default), `icc-women` or `mcc`, independent of
|
|
121
|
+
`cast`. `CRICKET_MARKING_PROFILES` exports their names, dimensions and summaries.
|
|
122
|
+
These select field markings only; venue boundaries, player eligibility,
|
|
123
|
+
powerplay phases and the rest of a competition's conditions require separate
|
|
124
|
+
checks. A caller-selected small boundary remains an illustrative venue.
|
|
125
|
+
|
|
126
|
+
| Profile | Popping crease painted on each side | ODI/T20 restriction area |
|
|
127
|
+
| --- | --- | --- |
|
|
128
|
+
| `icc-men` | 7.5 m | Wicket-centred semicircles of radius 27.43 m, joined by straight sides |
|
|
129
|
+
| `icc-women` | 7.5 m | Wicket-centred semicircles of radius 23 m, joined by straight sides |
|
|
130
|
+
| `mcc` | 1.83 m minimum | None prescribed by the base Laws |
|
|
131
|
+
|
|
132
|
+
Test has no restriction-area line for any profile. All profiles retain the
|
|
133
|
+
20.12 m pitch, the 1.22 m popping-crease offset and the return-crease positions.
|
|
134
|
+
The painted popping crease is a finite visual mark; the actual crease is
|
|
135
|
+
considered unlimited in length. The existing object ID `fielding-circle` is
|
|
136
|
+
retained for the corrected capsule outline. For ICC men its extrema are
|
|
137
|
+
x = ±27.43 m and z = ±37.49 m; the two arc centres are z = ±10.06 m.
|
|
138
|
+
|
|
139
|
+
The dimensions follow MCC 2026 Law 7.3 and ICC October 2026 clauses 7.3/28.7.
|
|
140
|
+
Sources: [MCC Laws](https://www.lords.org/getmedia/a4ef9f77-2a25-4f5b-a286-4601f08e6334/Laws-of-Cricket-2017-Code-4th-Edition-%282026%29_5.pdf),
|
|
141
|
+
[ICC men Test](https://images.icc-cricket.com/image/upload/prd/a8114zro5tkioifz0jqg.pdf),
|
|
142
|
+
[ODI](https://images.icc-cricket.com/image/upload/prd/bxkzkcyvfn6tvi70zh0w.pdf),
|
|
143
|
+
[T20I](https://images.icc-cricket.com/image/upload/prd/bsxcho7ufe2pjban0wjp.pdf),
|
|
144
|
+
[ICC women Test](https://images.icc-cricket.com/image/upload/prd/hbwwi78pugzpdwft0v4v.pdf),
|
|
145
|
+
[ODI](https://images.icc-cricket.com/image/upload/prd/qunpw1kfh3ibxlz58jlw.pdf) and
|
|
146
|
+
[T20I](https://images.icc-cricket.com/image/upload/prd/o3vhm0zw7pppoxpgopke.pdf).
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
import { cricketField, cricketFieldingAreaContains, cricketFieldingPositions,
|
|
150
|
+
cricketFieldingOverlay } from '@algorisys/tinyfly/sports'
|
|
151
|
+
|
|
152
|
+
const field = cricketField({ format: 't20', markingProfile: 'icc-women' })
|
|
153
|
+
const inside = cricketFieldingAreaContains(field, [0, 0, 30]) // true
|
|
154
|
+
const setup = cricketFieldingPositions(field)
|
|
155
|
+
const outside = setup.filter(player => player.inside === false)
|
|
156
|
+
const sceneWithMarkers = { ...field.scene,
|
|
157
|
+
objects: [...field.scene.objects, ...cricketFieldingOverlay(field)] }
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Classification uses the ideal capsule rather than a midpoint circle. Points on
|
|
161
|
+
its boundary count as inside, with a 1 nm numeric tolerance. `null` distinguishes
|
|
162
|
+
an absent area from an outside point, including older/custom JSON fields with
|
|
163
|
+
no `fieldingArea` metadata. The query accepts world-ground x/z reference points;
|
|
164
|
+
it does not judge whole-player/foot placement or whether a field is legal.
|
|
165
|
+
The setup helpers read the stock players' unparented scene positions. Markers
|
|
166
|
+
stay there during playback. Both ICC stock layouts have nine reference points
|
|
167
|
+
inside and two outside (Fine leg and Third man), useful for a powerplay placement
|
|
168
|
+
illustration; this is not automatic umpiring.
|
|
169
|
+
|
|
170
|
+
Select **Markings** and **Setup field markers** in the example, then choose an
|
|
171
|
+
overhead/whole-ground camera. Profile and overlay changes preserve current
|
|
172
|
+
story time and playback; selected zoom is retained. Downloaded JSON includes
|
|
173
|
+
the profile, analytic region metadata, corrected line and optional markers.
|
|
174
|
+
|
|
115
175
|
## Review zoom
|
|
116
176
|
|
|
117
177
|
Pass `zoom` to `cricketCameraTracks(clip, { view: 'batter', zoom: 2 })` for
|
|
@@ -390,7 +450,7 @@ with a GSAP-style call (durations are in seconds here):
|
|
|
390
450
|
```html
|
|
391
451
|
<div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
|
|
392
452
|
|
|
393
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
453
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.111.0/cdn/tinyfly.iife.js"></script>
|
|
394
454
|
<script>
|
|
395
455
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
396
456
|
</script>
|
|
@@ -598,7 +658,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
|
|
|
598
658
|
global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
|
|
599
659
|
|
|
600
660
|
```html
|
|
601
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
661
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.111.0/cdn/tinyfly.iife.js"></script>
|
|
602
662
|
<script>
|
|
603
663
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
604
664
|
</script>
|
|
@@ -2513,7 +2573,7 @@ For simple website embedding without a build system.
|
|
|
2513
2573
|
</html>
|
|
2514
2574
|
```
|
|
2515
2575
|
|
|
2516
|
-
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.
|
|
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.111.0/cdn/tinyfly-player.iife.js`.
|
|
2517
2577
|
|
|
2518
2578
|
---
|
|
2519
2579
|
|
|
@@ -6866,7 +6926,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
|
|
|
6866
6926
|
**Steps to embed:**
|
|
6867
6927
|
1. Build the player: `npm run build:player`
|
|
6868
6928
|
2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
|
|
6869
|
-
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
6929
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.111.0/cdn/tinyfly-player.iife.js`
|
|
6870
6930
|
instead; see [Deployment](DEPLOYMENT.md))
|
|
6871
6931
|
3. Copy the generated code into your HTML
|
|
6872
6932
|
4. Adjust the script `src` path if needed
|
|
@@ -8119,6 +8179,16 @@ demonstrations, not collision-based umpiring or an innings simulator. Do not
|
|
|
8119
8179
|
infer new outcomes from the illustrative arcs. See `docs/cricket.md` and
|
|
8120
8180
|
`examples/headless-video/cricket-story.mjs`; `/examples/live-cricket-story`
|
|
8121
8181
|
has event seeking and downloadable scene/action/camera JSON.
|
|
8182
|
+
Choose `markingProfile: 'icc-men' | 'icc-women' | 'mcc'` explicitly when
|
|
8183
|
+
teaching field geography; default ICC men is independent of cast. These are
|
|
8184
|
+
marking dimensions, not full competition profiles. ODI/T20 ICC areas are
|
|
8185
|
+
wicket-centred capsules (27.43/23 m radii); Test/MCC have no restriction line.
|
|
8186
|
+
ICC popping-crease marks extend 7.5 m on either side; MCC minimum is 1.83 m.
|
|
8187
|
+
`cricketFieldingAreaContains(field, point)` returns true/false/null, with null
|
|
8188
|
+
for absent metadata/areas. `cricketFieldingPositions`/`cricketFieldingOverlay`
|
|
8189
|
+
provide owned static setup markers. Do not count null as outside or interpret
|
|
8190
|
+
point classification as legal whole-player placement. Markers stay at setup
|
|
8191
|
+
positions; append them to the scene and preserve them in exported JSON.
|
|
8122
8192
|
`CRICKET_FIELDING_POSITIONS` maps the eleven stock fielding IDs to public labels;
|
|
8123
8193
|
scene objects carry them in `name`. `fielder` is Extra cover. Keep eleven fielders,
|
|
8124
8194
|
two on-field batters and two umpires; nine batting teammates wait off-field.
|
|
@@ -8424,7 +8494,7 @@ path for all of that:
|
|
|
8424
8494
|
</figure>
|
|
8425
8495
|
|
|
8426
8496
|
<!-- once, anywhere on the page (a site-wide footer is fine) -->
|
|
8427
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
8497
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.111.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
8428
8498
|
```
|
|
8429
8499
|
|
|
8430
8500
|
Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
|
|
@@ -9696,8 +9766,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
|
|
|
9696
9766
|
adds to the same `tinyfly` global:
|
|
9697
9767
|
|
|
9698
9768
|
```html
|
|
9699
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9700
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9769
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.111.0/cdn/tinyfly.iife.js"></script>
|
|
9770
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.111.0/cdn/tinyfly-maps.iife.js"></script>
|
|
9701
9771
|
```
|
|
9702
9772
|
|
|
9703
9773
|
It is a separate script because the offline world map it carries adds about
|
|
@@ -14875,7 +14945,7 @@ magnet.addEventListener('pointerleave', () => {
|
|
|
14875
14945
|
|
|
14876
14946
|
<!-- capabilities: generated from the library -->
|
|
14877
14947
|
|
|
14878
|
-
# tinyfly capabilities (v0.
|
|
14948
|
+
# tinyfly capabilities (v0.111.0)
|
|
14879
14949
|
|
|
14880
14950
|
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).
|
|
14881
14951
|
|
|
@@ -15294,6 +15364,8 @@ Edits:
|
|
|
15294
15364
|
|
|
15295
15365
|
`cricketClip({ format, action, cast })` returns an organic-player scene, JSON tracks, timed events/captions and a declared result. `cricketField`, `cricketPlayer` and `cricketAction` compose separately; `cricketCameraTracks` adds camera tracks. These are authored tutorial plays, not physics or automatic umpiring. See docs/cricket.md.
|
|
15296
15366
|
|
|
15367
|
+
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
|
+
|
|
15297
15369
|
- `bowling`: Run up, deliver with a straight arm, bounce and follow through.
|
|
15298
15370
|
- `spin`: A shorter approach and a curved illustrative flight before the bounce.
|
|
15299
15371
|
- `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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.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.111.0/README.md): Feature overview, project layout and development setup.
|
|
60
|
+
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.111.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.111.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,16 @@ 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
|
+
Choose `markingProfile: 'icc-men' | 'icc-women' | 'mcc'` explicitly when
|
|
175
|
+
teaching field geography; default ICC men is independent of cast. These are
|
|
176
|
+
marking dimensions, not full competition profiles. ODI/T20 ICC areas are
|
|
177
|
+
wicket-centred capsules (27.43/23 m radii); Test/MCC have no restriction line.
|
|
178
|
+
ICC popping-crease marks extend 7.5 m on either side; MCC minimum is 1.83 m.
|
|
179
|
+
`cricketFieldingAreaContains(field, point)` returns true/false/null, with null
|
|
180
|
+
for absent metadata/areas. `cricketFieldingPositions`/`cricketFieldingOverlay`
|
|
181
|
+
provide owned static setup markers. Do not count null as outside or interpret
|
|
182
|
+
point classification as legal whole-player placement. Markers stay at setup
|
|
183
|
+
positions; append them to the scene and preserve them in exported JSON.
|
|
174
184
|
`CRICKET_FIELDING_POSITIONS` maps the eleven stock fielding IDs to public labels;
|
|
175
185
|
scene objects carry them in `name`. `fielder` is Extra cover. Keep eleven fielders,
|
|
176
186
|
two on-field batters and two umpires; nine batting teammates wait off-field.
|