@algorisys/tinyfly 0.110.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 +145 -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 +22 -0
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +1104 -1097
- package/lib/addons/cricket-play-Zm5cghdV.js +4828 -0
- package/lib/addons/sports.js +24 -443
- package/lib/browser/tinyfly.iife.js +14 -14
- package/lib/browser/tinyfly.js +8811 -8630
- package/lib/browser/tinyfly.umd.js +14 -14
- package/lib/types/characters/capabilities.d.ts +5 -0
- package/lib/types/sports/cricket/cricket-action.d.ts +9 -1
- package/lib/types/sports/cricket/cricket-markings.d.ts +35 -0
- package/lib/types/sports/cricket/cricket-play.d.ts +21 -0
- package/lib/types/sports/cricket/cricket-types.d.ts +68 -1
- package/lib/types/sports/cricket/index.d.ts +4 -1
- package/llms-full.txt +191 -10
- package/llms.txt +30 -30
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +22 -0
- package/lib/addons/cricket-camera-tMg3Ag3F.js +0 -4221
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ A lightweight, API-driven animation engine and visual editor for creating high-p
|
|
|
54
54
|
- **Code-drawn targets** - A `custom` canvas target draws with code (characters, charts, props) while the timeline animates its position, opacity and its own `props`, so drawing stays code and timing stays JSON
|
|
55
55
|
- **Immediate mode too** - A scene's `background` and `draw(ctx, { time })` functions paint each frame directly, Cairo/Processing-style, and mix freely with timeline targets
|
|
56
56
|
- **Timing from narration** - `planNarration()` lays spoken lines out from their clip lengths (lead, gap, tail) into cues, scene spans and markers; `voiceNarration()` measures recorded clips with ffmpeg and writes the sample-aligned narration WAV
|
|
57
|
-
- **Cricket stories** - Public `@algorisys/tinyfly/sports` builders create an organic adult/child cast, standard pitch, full fielding side, wickets and boundary. Sixteen authored plays cover deliveries, strokes, running, boundaries, catches, fielding, throws, dismissals, no-balls and wides for Test, ODI and T20. Exact contact keys, captions and results are JSON; eight camera views include a 360° ground orbit and ball follow, with 25%–400% review zoom and reset. Fielders watch the bowler, track the incoming delivery through its bounce, then follow the struck ball. Body turns stay continuous from strokes into batter runs, into collection runs and while following return throws. A side-on right-handed stance and Adults/Men/Children/Mixed casts reuse the organic rig. Keeper-bound misses clear the native legs and intact stumps before palm collection. Public `CRICKET_FIELDING_POSITIONS` labels name all eleven stock fielders, including Extra cover; the Teams and field positions guide explains the two on-field batters, nine waiting teammates and mid-on/long-on. Playback, scrubbing and camera controls sit beside the scene (above it on phones). Try [Cricket Stories](https://tinyfly.app/examples/live-cricket-story), download its scene/action/camera JSON, or render the headless example. See [the cricket guide](docs/cricket.md).
|
|
57
|
+
- **Cricket stories** - Public `@algorisys/tinyfly/sports` builders create an organic adult/child cast, standard pitch, full fielding side, wickets and boundary. Composable `cricketPlay`/`cricketPlayClip` builders separate legality/free-hit context, shot, fielding and candidate decisions; five interactive combinations include no-ball/stumps and free-hit/catch without a dismissal. Sixteen authored plays cover deliveries, strokes, running, boundaries, catches, fielding, throws, dismissals, no-balls and wides for Test, ODI and T20. Exact contact keys, captions and results are JSON; eight camera views include a 360° ground orbit and ball follow, with 25%–400% review zoom and reset. Select MCC, ICC men or ICC women field markings. ICC ODI/T20 restriction areas use wicket-centred capsule outlines; optional public setup markers classify the field. Fielders watch the bowler, track the incoming delivery through its bounce, then follow the struck ball. Body turns stay continuous from strokes into batter runs, into collection runs and while following return throws. A side-on right-handed stance and Adults/Men/Children/Mixed casts reuse the organic rig. Keeper-bound misses clear the native legs and intact stumps before palm collection. Public `CRICKET_FIELDING_POSITIONS` labels name all eleven stock fielders, including Extra cover; the Teams and field positions guide explains the two on-field batters, nine waiting teammates and mid-on/long-on. Playback, scrubbing and camera controls sit beside the scene (above it on phones). Try [Cricket Stories](https://tinyfly.app/examples/live-cricket-story), download its scene/action/camera JSON, or render the headless example. See [the cricket guide](docs/cricket.md).
|
|
58
58
|
Wide camera clipping scales for boundaries up to 250 m, and ball-follow generation reads only ball channels. Local full-page previews include add-ons before publication; copied pages keep their versioned CDN bundles.
|
|
59
59
|
Defensive blocks meet the blade with both hands on the bat. Keeper-bound deliveries pass outside the off stump with clearance for the displayed ball before collection.
|
|
60
60
|
|
|
@@ -233,7 +233,7 @@ for what you import:
|
|
|
233
233
|
| `@algorisys/tinyfly/maps` | Animated maps: OpenStreetMap tiles or an offline world outline, places, routes that draw on, a camera that flies (`mapTarget`, `mapFlyTracks`, `fitView`, `WORLD_CITIES`) | Anywhere with a Canvas 2D context (tiles need a network) |
|
|
234
234
|
| `@algorisys/tinyfly/characters` | Poseable stick figure: `stickFigureTarget`, `poseTracks`, `POSES`, `blendPose`, `walkPose`, `drawStickFigure`; `stickFigureJoints` and `layers` for costumes, hair and props; `turn`, `sit` and ground contact; an organic look by default (`classic` keeps the old one); **characters v2**: `character()` / `characterTarget()`, turnarounds front to back, contact, reaching, clean / pencil / silhouette looks; `hair`, `facialHair`, `glasses`, `hat`, `ears`, `face`, `feet`, `build`, `outfit` as data, `castMember()`, `HUMAN_EXPRESSIONS` with face marks; `embrace`, `helpUp`, `scenery` | Anywhere with a Canvas 2D context |
|
|
235
235
|
| `@algorisys/tinyfly/headless` | `renderVideo`, `renderStills`, `FrameRenderer`: render a scene to MP4 or PNGs (see [Rendering Video from Code](docs/video-rendering.md)) | Node (`@napi-rs/canvas` optional peer, ffmpeg) |
|
|
236
|
-
| `@algorisys/tinyfly/sports` | `cricketPlayer`, `cricketField`, `cricketAction`, `cricketClip`, `cricketCameraTracks`, `cricketEventAt`, shared `ballFlightTracks`; authored organic cricket stories and a 360° ground camera | Browser, Worker, Node; scene rendering through adapters |
|
|
236
|
+
| `@algorisys/tinyfly/sports` | `cricketPlayer`, `cricketField`, `cricketAction`, `cricketClip`, `cricketPlay`, `cricketPlayClip`, `cricketCameraTracks`, `cricketEventAt`, field marking profiles/classification/overlays, shared `ballFlightTracks`; authored organic cricket stories and a 360° ground camera | Browser, Worker, Node; scene rendering through adapters |
|
|
237
237
|
| `@algorisys/tinyfly/browser` | One script-tag bundle (`tinyfly.iife.js`): the engine, player, drivers, interaction, the GSAP-style `live` / `tf` facades, teaching-embed controls and mounting, and the `characters` stick figure. Not included: `export`, `adapters`, `teach`, the framework hooks, `headless` | Browser |
|
|
238
238
|
|
|
239
239
|
```js
|
|
@@ -280,7 +280,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
|
|
|
280
280
|
itself.
|
|
281
281
|
|
|
282
282
|
```html
|
|
283
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
283
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js"></script>
|
|
284
284
|
<script>
|
|
285
285
|
tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
|
|
286
286
|
|
|
@@ -316,7 +316,7 @@ A teaching figure needs no code at all:
|
|
|
316
316
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
|
|
317
317
|
<figcaption>Appending to a full slice</figcaption>
|
|
318
318
|
</figure>
|
|
319
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
319
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
|
|
320
320
|
```
|
|
321
321
|
|
|
322
322
|
See [Teaching Animations](docs/teaching.md).
|
|
@@ -415,7 +415,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
|
|
|
415
415
|
<div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
|
|
416
416
|
</div>
|
|
417
417
|
|
|
418
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
418
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-player.iife.js"></script>
|
|
419
419
|
<script>
|
|
420
420
|
tinyfly.play('#animation', './animation.json', { loop: -1 })
|
|
421
421
|
</script>
|
|
@@ -524,7 +524,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
|
|
|
524
524
|
<svg viewBox="0 0 720 200">…</svg>
|
|
525
525
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
|
|
526
526
|
</figure>
|
|
527
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
527
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
528
528
|
```
|
|
529
529
|
|
|
530
530
|
### Audio / Video Sync
|
|
@@ -773,6 +773,9 @@ builds the add-on bundles before `npm run test:run -- --maxWorkers 2` for tests
|
|
|
773
773
|
It is excluded from the OSS mirror; the project needs no runtime configuration
|
|
774
774
|
for this validation.
|
|
775
775
|
|
|
776
|
+
The organic contour determinism test allows 15 seconds to compare 60 native
|
|
777
|
+
canvas renders during concurrent suite runs.
|
|
778
|
+
|
|
776
779
|
### Publishing to npm
|
|
777
780
|
|
|
778
781
|
```bash
|
package/docs/cricket.md
CHANGED
|
@@ -34,10 +34,15 @@ See [getting started](getting-started.md) for the versioned CDN URLs.
|
|
|
34
34
|
| API | Result |
|
|
35
35
|
| --- | --- |
|
|
36
36
|
| `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. |
|
|
37
|
-
| `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. |
|
|
37
|
+
| `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. |
|
|
38
|
+
| `cricketFieldingAreaContains(field, point)` | `true` inside/on the ideal restriction-area capsule, `false` outside, `null` without region metadata. Uses x/z; point height is ignored. |
|
|
39
|
+
| `cricketFieldingPositions(field)` | Owned setup-position data for stock fielders: `id`, `name`, `position`, `inside`. |
|
|
40
|
+
| `cricketFieldingOverlay(field)` | Optional static JSON line markers, green inside/orange outside. Append to scene objects without changing motion. |
|
|
38
41
|
| `cricketAction(field, { action?, duration?, every? })` | A JSON timeline, timed events/captions and declared example result. Does not modify the field. |
|
|
42
|
+
| `cricketPlay(field, options)` | Composes independent delivery, shot, finish, fielding, context and candidate decision; returns `play`, `ruling`, timeline, events and result. |
|
|
43
|
+
| `cricketPlayClip(options)` | Builds a field and composed play together. |
|
|
39
44
|
| `cricketClip(options)` | Combines field and action; default T20, adult cast, pace bowling, 6000 ms. |
|
|
40
|
-
| `cricketCameraTracks(clip, { view?, yaw?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
45
|
+
| `cricketCameraTracks(clip, { view?, yaw?, zoom?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
41
46
|
| `cricketEventAt(events, time)` | Most recent event at that time, including when seeking backward. |
|
|
42
47
|
| `ballFlightPoint(options, time)`, `ballFlightTracks(options)` | Shared sampled arcs for other sports too. `from`, `to`, `arc`, `curve`, `start`, `end`, `target`; exact endpoints. |
|
|
43
48
|
|
|
@@ -93,6 +98,63 @@ before the ball arrives. Their native head poses aim at world targets,
|
|
|
93
98
|
independently of their body yaw and camera selection. The live example's
|
|
94
99
|
**Teams and field positions** disclosure uses the scene's JSON labels.
|
|
95
100
|
|
|
101
|
+
## Field marking profiles
|
|
102
|
+
|
|
103
|
+
`markingProfile` is `icc-men` (default), `icc-women` or `mcc`, independent of
|
|
104
|
+
`cast`. `CRICKET_MARKING_PROFILES` exports their names, dimensions and summaries.
|
|
105
|
+
These select field markings only; venue boundaries, player eligibility,
|
|
106
|
+
powerplay phases and the rest of a competition's conditions require separate
|
|
107
|
+
checks. A caller-selected small boundary remains an illustrative venue.
|
|
108
|
+
|
|
109
|
+
| Profile | Popping crease painted on each side | ODI/T20 restriction area |
|
|
110
|
+
| --- | --- | --- |
|
|
111
|
+
| `icc-men` | 7.5 m | Wicket-centred semicircles of radius 27.43 m, joined by straight sides |
|
|
112
|
+
| `icc-women` | 7.5 m | Wicket-centred semicircles of radius 23 m, joined by straight sides |
|
|
113
|
+
| `mcc` | 1.83 m minimum | None prescribed by the base Laws |
|
|
114
|
+
|
|
115
|
+
Test has no restriction-area line for any profile. All profiles retain the
|
|
116
|
+
20.12 m pitch, the 1.22 m popping-crease offset and the return-crease positions.
|
|
117
|
+
The painted popping crease is a finite visual mark; the actual crease is
|
|
118
|
+
considered unlimited in length. The existing object ID `fielding-circle` is
|
|
119
|
+
retained for the corrected capsule outline. For ICC men its extrema are
|
|
120
|
+
x = ±27.43 m and z = ±37.49 m; the two arc centres are z = ±10.06 m.
|
|
121
|
+
|
|
122
|
+
The dimensions follow MCC 2026 Law 7.3 and ICC October 2026 clauses 7.3/28.7.
|
|
123
|
+
Sources: [MCC Laws](https://www.lords.org/getmedia/a4ef9f77-2a25-4f5b-a286-4601f08e6334/Laws-of-Cricket-2017-Code-4th-Edition-%282026%29_5.pdf),
|
|
124
|
+
[ICC men Test](https://images.icc-cricket.com/image/upload/prd/a8114zro5tkioifz0jqg.pdf),
|
|
125
|
+
[ODI](https://images.icc-cricket.com/image/upload/prd/bxkzkcyvfn6tvi70zh0w.pdf),
|
|
126
|
+
[T20I](https://images.icc-cricket.com/image/upload/prd/bsxcho7ufe2pjban0wjp.pdf),
|
|
127
|
+
[ICC women Test](https://images.icc-cricket.com/image/upload/prd/hbwwi78pugzpdwft0v4v.pdf),
|
|
128
|
+
[ODI](https://images.icc-cricket.com/image/upload/prd/qunpw1kfh3ibxlz58jlw.pdf) and
|
|
129
|
+
[T20I](https://images.icc-cricket.com/image/upload/prd/o3vhm0zw7pppoxpgopke.pdf).
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
import { cricketField, cricketFieldingAreaContains, cricketFieldingPositions,
|
|
133
|
+
cricketFieldingOverlay } from '@algorisys/tinyfly/sports'
|
|
134
|
+
|
|
135
|
+
const field = cricketField({ format: 't20', markingProfile: 'icc-women' })
|
|
136
|
+
const inside = cricketFieldingAreaContains(field, [0, 0, 30]) // true
|
|
137
|
+
const setup = cricketFieldingPositions(field)
|
|
138
|
+
const outside = setup.filter(player => player.inside === false)
|
|
139
|
+
const sceneWithMarkers = { ...field.scene,
|
|
140
|
+
objects: [...field.scene.objects, ...cricketFieldingOverlay(field)] }
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Classification uses the ideal capsule rather than a midpoint circle. Points on
|
|
144
|
+
its boundary count as inside, with a 1 nm numeric tolerance. `null` distinguishes
|
|
145
|
+
an absent area from an outside point, including older/custom JSON fields with
|
|
146
|
+
no `fieldingArea` metadata. The query accepts world-ground x/z reference points;
|
|
147
|
+
it does not judge whole-player/foot placement or whether a field is legal.
|
|
148
|
+
The setup helpers read the stock players' unparented scene positions. Markers
|
|
149
|
+
stay there during playback. Both ICC stock layouts have nine reference points
|
|
150
|
+
inside and two outside (Fine leg and Third man), useful for a powerplay placement
|
|
151
|
+
illustration; this is not automatic umpiring.
|
|
152
|
+
|
|
153
|
+
Select **Markings** and **Setup field markers** in the example, then choose an
|
|
154
|
+
overhead/whole-ground camera. Profile and overlay changes preserve current
|
|
155
|
+
story time and playback; selected zoom is retained. Downloaded JSON includes
|
|
156
|
+
the profile, analytic region metadata, corrected line and optional markers.
|
|
157
|
+
|
|
96
158
|
## Review zoom
|
|
97
159
|
|
|
98
160
|
Pass `zoom` to `cricketCameraTracks(clip, { view: 'batter', zoom: 2 })` for
|
|
@@ -144,6 +206,87 @@ spacing without evaluating actor tracks.
|
|
|
144
206
|
Development full-page previews load the local browser API and scene add-ons;
|
|
145
207
|
production previews and copied HTML retain the versioned CDN bundles.
|
|
146
208
|
|
|
209
|
+
## Composed plays and authored decisions
|
|
210
|
+
|
|
211
|
+
Use `cricketPlay` on an existing field or `cricketPlayClip` for a new scene.
|
|
212
|
+
Delivery legality is authored, not calculated from foot geometry. No-ball uses
|
|
213
|
+
the stock front-foot overstep, while shots, catches and wicket breaks retain
|
|
214
|
+
their native contact keys. A candidate dismissal is separate from that motion;
|
|
215
|
+
omitted/null `decision.dismissal` means no dismissal.
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
import { cricketPlayClip } from '@algorisys/tinyfly/sports'
|
|
219
|
+
|
|
220
|
+
const first = cricketPlayClip({
|
|
221
|
+
format: 't20', delivery: { style: 'pace', legality: 'no-ball' },
|
|
222
|
+
shot: 'miss', finish: 'stumps', decision: { dismissal: 'bowled' },
|
|
223
|
+
})
|
|
224
|
+
// Bails fall, but ruling is { dismissal: null, reason: 'no-ball' }.
|
|
225
|
+
// result: 0 bat runs, 1 extra, 0 wickets, legalBall false, freeHitNext true.
|
|
226
|
+
const next = cricketPlayClip({
|
|
227
|
+
format: 't20', delivery: { style: 'spin', legality: 'legal' },
|
|
228
|
+
context: { freeHit: first.result.freeHitNext },
|
|
229
|
+
shot: 'drive', fielding: 'catch', decision: { dismissal: 'caught' },
|
|
230
|
+
})
|
|
231
|
+
// Catch stays visible. Not out; this legal delivery consumes the free hit.
|
|
232
|
+
// Store/advance innings, score, strike and lesson state in your application.
|
|
233
|
+
const again = JSON.stringify(next) // normalized play + ruling + all motion/events
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
`play` contains owned, normalized input. `action` identifies the compiled stock
|
|
237
|
+
motion recipe; it does not declare the composed verdict. `ruling` holds the
|
|
238
|
+
accepted dismissal or null and its reason. `result.dismissal` exists only for an
|
|
239
|
+
accepted dismissal. Decision changes preserve the ball/actor motion, apart from
|
|
240
|
+
the umpire signal. Physical catch, pad contact and wicket-break captions stay
|
|
241
|
+
separate from the final **Out** / **Not out** decision.
|
|
242
|
+
|
|
243
|
+
| Component | Choices/default |
|
|
244
|
+
| --- | --- |
|
|
245
|
+
| `delivery.style` | `pace` (default), `spin` |
|
|
246
|
+
| `delivery.legality` | `legal` (default), `no-ball`, `wide`; select the final call, with no-ball taking precedence over Wide |
|
|
247
|
+
| `shot` | `miss` (default), `drive`, `defend` |
|
|
248
|
+
| `finish` | `none` (default), `single`, `four`, `six`, `stumps`, `pad` |
|
|
249
|
+
| `fielding` | `none`, `keeper`, `catch`, `gather`, `throw`, `stumping`, `run-out`; defaults below |
|
|
250
|
+
| `context.freeHit` | Boolean, default false; ODI/T20 only |
|
|
251
|
+
| `decision.dismissal` | `caught`, `bowled`, `lbw`, `stumped`, `run-out`, null (default); candidate must match the physical recipe |
|
|
252
|
+
| `duration`, `every` | Same scaling and contact-preserving sampling as `cricketAction` |
|
|
253
|
+
|
|
254
|
+
Supported physical combinations:
|
|
255
|
+
|
|
256
|
+
| Shot | Finish | Fielding (default when omitted) |
|
|
257
|
+
| --- | --- | --- |
|
|
258
|
+
| `miss` | `none` | `keeper` (default) or explicit `stumping` |
|
|
259
|
+
| `miss` | `stumps` / `pad` | `none` (default) |
|
|
260
|
+
| `defend` | `none` | `none` (default) |
|
|
261
|
+
| `drive` | `none` | `gather` (default), `catch`, `throw`, `run-out` |
|
|
262
|
+
| `drive` | `single` | `gather` (default) |
|
|
263
|
+
| `drive` | `four` / `six` | `none` (default) |
|
|
264
|
+
|
|
265
|
+
Other combinations throw rather than silently substitute a different play.
|
|
266
|
+
Wide currently supports only an untouched miss gathered by the keeper; Wide
|
|
267
|
+
stumping/run-out and additional Wide runs require future motion recipes.
|
|
268
|
+
`single`/`four`/`six` score 1/4/6 bat runs; an illegal delivery adds one extra.
|
|
269
|
+
Run-out depicts an attempted, uncompleted run and scores no completed runs.
|
|
270
|
+
Byes, leg-byes, penalties and other dismissal modes are outside this subset.
|
|
271
|
+
|
|
272
|
+
No-ball/free-hit context suppresses caught, bowled, LBW and stumped candidates,
|
|
273
|
+
while the supported run-out candidate remains available. A no-ball arms the
|
|
274
|
+
next free hit in ODI/T20; an existing free hit carries over a Wide/no-ball and
|
|
275
|
+
is consumed by a legal delivery. Test has no automatic free hit and rejects an
|
|
276
|
+
explicit current free-hit context. These conditions follow clauses 21.12,
|
|
277
|
+
21.17–21.18 in [ICC ODI October 2026](https://images.icc-cricket.com/image/upload/prd/bxkzkcyvfn6tvi70zh0w.pdf)
|
|
278
|
+
and [ICC T20I October 2026](https://images.icc-cricket.com/image/upload/prd/bsxcho7ufe2pjban0wjp.pdf).
|
|
279
|
+
They cover the supported authored examples, not a complete umpiring engine.
|
|
280
|
+
|
|
281
|
+
`CRICKET_PLAY_COMPONENTS` and `CRICKET_PLAY_EXAMPLES` provide JSON discovery;
|
|
282
|
+
the latter has five frozen examples. In the live example's **Play** selector,
|
|
283
|
+
choose the **Composed plays** group: no-ball/stumps, free-hit/catch,
|
|
284
|
+
no-ball/four, free-hit/run-out or free-hit/Wide. Free-hit choices are disabled
|
|
285
|
+
in Test; switching to Test from one selects no-ball/stumps. Downloads include
|
|
286
|
+
normalized components, ruling, result, scene, camera tracks and captions.
|
|
287
|
+
The original sixteen `cricketAction`/`cricketClip` presets retain their original
|
|
288
|
+
motion, result shape and captions.
|
|
289
|
+
|
|
147
290
|
## Teaching scope
|
|
148
291
|
|
|
149
292
|
These are authored visual demonstrations. Arcs, the enlarged ball, timings,
|
package/docs/editor-guide.md
CHANGED
|
@@ -1143,7 +1143,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
|
|
|
1143
1143
|
**Steps to embed:**
|
|
1144
1144
|
1. Build the player: `npm run build:player`
|
|
1145
1145
|
2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
|
|
1146
|
-
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
1146
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-player.iife.js`
|
|
1147
1147
|
instead; see [Deployment](DEPLOYMENT.md))
|
|
1148
1148
|
3. Copy the generated code into your HTML
|
|
1149
1149
|
4. Adjust the script `src` path if needed
|
package/docs/examples.md
CHANGED
|
@@ -743,7 +743,7 @@ For simple website embedding without a build system.
|
|
|
743
743
|
</html>
|
|
744
744
|
```
|
|
745
745
|
|
|
746
|
-
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.
|
|
746
|
+
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`.
|
|
747
747
|
|
|
748
748
|
---
|
|
749
749
|
|
package/docs/getting-started.md
CHANGED
|
@@ -185,7 +185,7 @@ with a GSAP-style call (durations are in seconds here):
|
|
|
185
185
|
```html
|
|
186
186
|
<div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
|
|
187
187
|
|
|
188
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
188
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js"></script>
|
|
189
189
|
<script>
|
|
190
190
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
191
191
|
</script>
|
package/docs/gsap-compat.md
CHANGED
|
@@ -74,7 +74,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
|
|
|
74
74
|
global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
|
|
75
75
|
|
|
76
76
|
```html
|
|
77
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
77
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js"></script>
|
|
78
78
|
<script>
|
|
79
79
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
80
80
|
</script>
|
package/docs/llm-guide.md
CHANGED
|
@@ -100,6 +100,28 @@ demonstrations, not collision-based umpiring or an innings simulator. Do not
|
|
|
100
100
|
infer new outcomes from the illustrative arcs. See `docs/cricket.md` and
|
|
101
101
|
`examples/headless-video/cricket-story.mjs`; `/examples/live-cricket-story`
|
|
102
102
|
has event seeking and downloadable scene/action/camera JSON.
|
|
103
|
+
For composed plays use `cricketPlay(field, options)` / `cricketPlayClip(options)`.
|
|
104
|
+
Separate `delivery: { style, legality }`, `shot`, `finish`, `fielding`,
|
|
105
|
+
`context: { freeHit }` and `decision: { dismissal }`. Omitted/null dismissal
|
|
106
|
+
means no dismissal; never infer one from motion. Supported candidates are
|
|
107
|
+
caught/bowled/lbw/stumped/run-out; no-ball/free-hit protects the first four,
|
|
108
|
+
while run-out remains possible. Current illegal free hits carry forward, legal
|
|
109
|
+
ones consume context; Test rejects current free-hit context. Retain `play`,
|
|
110
|
+
`ruling`, `result`, contact keys and camera tracks in JSON. Keep innings/score/
|
|
111
|
+
strike/lesson state in the consuming app. `CRICKET_PLAY_COMPONENTS` discovers
|
|
112
|
+
choices; `CRICKET_PLAY_EXAMPLES` provides five examples. Unsupported physical
|
|
113
|
+
combinations throw; Wide currently only supports miss/keeper/no finish.
|
|
114
|
+
See docs/cricket.md for the combination table. Original sixteen presets remain.
|
|
115
|
+
Choose `markingProfile: 'icc-men' | 'icc-women' | 'mcc'` explicitly when
|
|
116
|
+
teaching field geography; default ICC men is independent of cast. These are
|
|
117
|
+
marking dimensions, not full competition profiles. ODI/T20 ICC areas are
|
|
118
|
+
wicket-centred capsules (27.43/23 m radii); Test/MCC have no restriction line.
|
|
119
|
+
ICC popping-crease marks extend 7.5 m on either side; MCC minimum is 1.83 m.
|
|
120
|
+
`cricketFieldingAreaContains(field, point)` returns true/false/null, with null
|
|
121
|
+
for absent metadata/areas. `cricketFieldingPositions`/`cricketFieldingOverlay`
|
|
122
|
+
provide owned static setup markers. Do not count null as outside or interpret
|
|
123
|
+
point classification as legal whole-player placement. Markers stay at setup
|
|
124
|
+
positions; append them to the scene and preserve them in exported JSON.
|
|
103
125
|
`CRICKET_FIELDING_POSITIONS` maps the eleven stock fielding IDs to public labels;
|
|
104
126
|
scene objects carry them in `name`. `fielder` is Extra cover. Keep eleven fielders,
|
|
105
127
|
two on-field batters and two umpires; nine batting teammates wait off-field.
|
package/docs/maps.md
CHANGED
|
@@ -14,8 +14,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
|
|
|
14
14
|
adds to the same `tinyfly` global:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
18
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly.iife.js"></script>
|
|
18
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-maps.iife.js"></script>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
It is a separate script because the offline world map it carries adds about
|
package/docs/teaching.md
CHANGED
|
@@ -25,7 +25,7 @@ path for all of that:
|
|
|
25
25
|
</figure>
|
|
26
26
|
|
|
27
27
|
<!-- once, anywhere on the page (a site-wide footer is fine) -->
|
|
28
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.112.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
|