@algorisys/tinyfly 0.112.0 → 0.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/docs/cricket.md +59 -1
- 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 +9 -0
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +1043 -1041
- package/lib/addons/cricket-play-DQqoiwTG.js +4936 -0
- package/lib/addons/scene-3d.js +114 -112
- package/lib/addons/sports.js +23 -19
- package/lib/browser/tinyfly-scene-3d.iife.js +2 -2
- package/lib/browser/tinyfly.iife.js +14 -14
- package/lib/browser/tinyfly.js +5863 -5753
- package/lib/browser/tinyfly.umd.js +14 -14
- package/lib/types/characters/capabilities.d.ts +2 -0
- package/lib/types/scene-3d/resolve-scene.d.ts +1 -1
- package/lib/types/sports/cricket/cricket-camera-review.d.ts +34 -0
- package/lib/types/sports/cricket/cricket-camera.d.ts +22 -4
- package/lib/types/sports/cricket/index.d.ts +2 -1
- package/llms-full.txt +79 -10
- package/llms.txt +30 -30
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +9 -0
- package/lib/addons/cricket-play-Zm5cghdV.js +0 -4828
|
@@ -2,6 +2,7 @@ import { type PropertyInfo } from '../adapters/canvas/target-properties';
|
|
|
2
2
|
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
|
+
import { CRICKET_DECISION_VIEWS } from '../sports/cricket/cricket-camera-review';
|
|
5
6
|
import { CRICKET_VIEWS } from '../sports/cricket/cricket-camera';
|
|
6
7
|
import { CRICKET_PLAY_COMPONENTS, CRICKET_PLAY_EXAMPLES } from '../sports/cricket/cricket-play';
|
|
7
8
|
import { CRICKET_MARKING_PROFILES } from '../sports/cricket/cricket-markings';
|
|
@@ -17,6 +18,7 @@ export interface Capabilities {
|
|
|
17
18
|
fieldingPositions: typeof CRICKET_FIELDING_POSITIONS;
|
|
18
19
|
markingProfiles: typeof CRICKET_MARKING_PROFILES;
|
|
19
20
|
cameras: typeof CRICKET_VIEWS;
|
|
21
|
+
decisionCameras: typeof CRICKET_DECISION_VIEWS;
|
|
20
22
|
playComponents: typeof CRICKET_PLAY_COMPONENTS;
|
|
21
23
|
playExamples: typeof CRICKET_PLAY_EXAMPLES;
|
|
22
24
|
};
|
|
@@ -15,7 +15,7 @@ import type { Drawable } from './object-kind';
|
|
|
15
15
|
* `scaleX` / `scaleY` / `scaleZ`; `visible` (0 or 1); `opacity`;
|
|
16
16
|
* - meshes and lights: `color`; lights: `intensity`, `target`;
|
|
17
17
|
* - lines and trails: `color`, `width`, `opacity`; trails: `length`;
|
|
18
|
-
* - cameras: `fov` (perspective), `height` (orthographic), `lookAt`;
|
|
18
|
+
* - cameras: `fov` (perspective), `height` (orthographic), `lookAt`, `far`;
|
|
19
19
|
* - the scene itself, `<sceneId>`: `activeCamera` (a camera's id: a cut is one keyframe).
|
|
20
20
|
*/
|
|
21
21
|
/** Animated values by target, then property: an `AnimationState`'s `values`. */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Object3D } from '../../scene-3d/scene-types';
|
|
2
|
+
import type { Vec3 } from '../../engine/math';
|
|
3
|
+
import type { CricketClip, CricketEvent } from './cricket-types';
|
|
4
|
+
export type CricketDecisionView = 'front-foot' | 'striker-crease' | 'bowler-crease';
|
|
5
|
+
export declare const CRICKET_DECISION_VIEWS: Readonly<{
|
|
6
|
+
'front-foot': Readonly<{
|
|
7
|
+
name: "Front-foot review";
|
|
8
|
+
summary: "A fixed side view of the landing front foot and bowler’s popping crease at release.";
|
|
9
|
+
}>;
|
|
10
|
+
'striker-crease': Readonly<{
|
|
11
|
+
name: "Striker crease";
|
|
12
|
+
summary: "A fixed side view of the striker’s popping crease, wicket and keeper arrival.";
|
|
13
|
+
}>;
|
|
14
|
+
'bowler-crease': Readonly<{
|
|
15
|
+
name: "Bowler crease";
|
|
16
|
+
summary: "A fixed side view of the other crease and wicket for a running batter and return throw.";
|
|
17
|
+
}>;
|
|
18
|
+
}>;
|
|
19
|
+
export declare function isCricketDecisionView(view: string): view is CricketDecisionView;
|
|
20
|
+
/** Choose a physical event; this never seeks playback or changes a ruling. */
|
|
21
|
+
export declare function cricketCameraReview(clip: CricketClip, view: string): CricketEvent | undefined;
|
|
22
|
+
/** Evaluate only one stock actor's baked numeric pose/position channels. */
|
|
23
|
+
export declare function cricketReviewActor(clip: CricketClip, id: string, time: number): {
|
|
24
|
+
actor: import("./cricket-motion").CricketActor;
|
|
25
|
+
sample: import("./cricket-motion").CricketSample;
|
|
26
|
+
};
|
|
27
|
+
/** Front ankle at authored release, using the native pose/position tracks. */
|
|
28
|
+
export declare function cricketFrontFoot(clip: CricketClip): {
|
|
29
|
+
point: Vec3;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
32
|
+
export declare function cricketReviewCrease(clip: CricketClip, view: CricketDecisionView): Vec3;
|
|
33
|
+
/** Static crease reference; does not classify feet, bat grounding or dismissals. */
|
|
34
|
+
export declare function cricketDecisionOverlay(clip: CricketClip, view: string): Object3D[];
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
import type { Track } from '../../engine/types';
|
|
2
|
+
import type { Vec3 } from '../../engine/math';
|
|
3
|
+
import { type CricketDecisionView } from './cricket-camera-review';
|
|
2
4
|
import { type CricketClip } from './cricket-types';
|
|
3
|
-
export type CricketView = 'pitch' | 'batter' | 'bowler' | 'keeper' | 'field' | 'overhead' | 'orbit' | 'follow-ball';
|
|
5
|
+
export type CricketView = 'pitch' | 'batter' | 'bowler' | 'keeper' | 'field' | 'overhead' | 'orbit' | 'follow-ball' | CricketDecisionView;
|
|
4
6
|
export declare const CRICKET_VIEWS: Readonly<Record<CricketView, string>>;
|
|
5
7
|
export declare const CRICKET_CAMERA_ANGLES: Readonly<Record<CricketView, number>>;
|
|
6
8
|
export interface CricketCameraOptions {
|
|
7
9
|
view?: CricketView;
|
|
8
|
-
/**
|
|
10
|
+
/** Fixed-view azimuth, degrees; orbit adds 360°. Follow rotates its default offset relative to 75°. */
|
|
9
11
|
yaw?: number;
|
|
10
|
-
/** Optical magnification, 0.25–4; 1 preserves
|
|
12
|
+
/** Optical magnification, 0.25–4; 1 preserves default framing. */
|
|
11
13
|
zoom?: number;
|
|
14
|
+
/** Elevation above level, degrees, 0–89, including ball-follow. */
|
|
15
|
+
pitch?: number;
|
|
16
|
+
/** Camera-to-target distance in metres, 0.5–2000. */
|
|
17
|
+
distance?: number;
|
|
18
|
+
/** Base vertical field of view before optical zoom, degrees, 10–100. */
|
|
19
|
+
fov?: number;
|
|
20
|
+
/** Fixed-view target override; not supported by follow-ball. */
|
|
21
|
+
target?: Vec3;
|
|
12
22
|
every?: number;
|
|
13
23
|
}
|
|
14
|
-
|
|
24
|
+
export interface CricketCameraFraming {
|
|
25
|
+
target?: Vec3;
|
|
26
|
+
pitch: number;
|
|
27
|
+
distance: number;
|
|
28
|
+
fov: number;
|
|
29
|
+
}
|
|
30
|
+
/** Owned preset framing for controls and programmatic stories. Ball-follow has no fixed target. */
|
|
31
|
+
export declare function cricketCameraFraming(clip: CricketClip, selected?: CricketView): CricketCameraFraming;
|
|
32
|
+
/** Public JSON camera tracks; no seeking, playback or motion changes. */
|
|
15
33
|
export declare function cricketCameraTracks(clip: CricketClip, options?: CricketCameraOptions): Track[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { cricketPlayer, cricketField, CRICKET_PITCH } from './cricket-field';
|
|
2
2
|
export { CRICKET_MARKING_PROFILES, cricketFieldingAreaContains, cricketFieldingPositions, cricketFieldingOverlay } from './cricket-markings';
|
|
3
3
|
export { cricketAction, cricketClip, cricketEventAt } from './cricket-action';
|
|
4
|
-
export { cricketCameraTracks, CRICKET_VIEWS, CRICKET_CAMERA_ANGLES, type CricketView, type CricketCameraOptions } from './cricket-camera';
|
|
4
|
+
export { cricketCameraTracks, cricketCameraFraming, type CricketCameraFraming, 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
7
|
export { cricketPlay, cricketPlayClip, CRICKET_PLAY_COMPONENTS, CRICKET_PLAY_EXAMPLES, type CricketPlayExample } from './cricket-play';
|
|
8
8
|
export type { CricketDismissal, CricketShot, CricketFinish, CricketFielding, CricketDelivery, CricketPlayOptions, CricketPlay, CricketRuling, CricketPlayResult, CricketPlayClip } from './cricket-types';
|
|
9
|
+
export { cricketCameraReview, cricketDecisionOverlay, CRICKET_DECISION_VIEWS, type CricketDecisionView } from './cricket-camera-review';
|
package/llms-full.txt
CHANGED
|
@@ -61,7 +61,7 @@ See [getting started](getting-started.md) for the versioned CDN URLs.
|
|
|
61
61
|
| `cricketPlay(field, options)` | Composes independent delivery, shot, finish, fielding, context and candidate decision; returns `play`, `ruling`, timeline, events and result. |
|
|
62
62
|
| `cricketPlayClip(options)` | Builds a field and composed play together. |
|
|
63
63
|
| `cricketClip(options)` | Combines field and action; default T20, adult cast, pace bowling, 6000 ms. |
|
|
64
|
-
| `cricketCameraTracks(clip, { view?, yaw?, zoom?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
64
|
+
| `cricketCameraTracks(clip, { view?, yaw?, zoom?, pitch?, distance?, target?, fov?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
65
65
|
| `cricketEventAt(events, time)` | Most recent event at that time, including when seeking backward. |
|
|
66
66
|
| `ballFlightPoint(options, time)`, `ballFlightTracks(options)` | Shared sampled arcs for other sports too. `from`, `to`, `arc`, `curve`, `start`, `end`, `target`; exact endpoints. |
|
|
67
67
|
|
|
@@ -225,6 +225,64 @@ spacing without evaluating actor tracks.
|
|
|
225
225
|
Development full-page previews load the local browser API and scene add-ons;
|
|
226
226
|
production previews and copied HTML retain the versioned CDN bundles.
|
|
227
227
|
|
|
228
|
+
## Decision-focused camera review
|
|
229
|
+
|
|
230
|
+
Select **Front-foot review**, **Striker crease** or **Bowler crease** in the
|
|
231
|
+
example's Camera control. These are fixed views, so scrubbing before/after the
|
|
232
|
+
event compares positions without a moving viewpoint. Front-foot framing uses
|
|
233
|
+
the native front ankle at authored release; crease views include the wicket
|
|
234
|
+
and popping crease. Run-out framing includes the approaching batter at the
|
|
235
|
+
wicket-break event. Wide-delivery framing also includes the keeper’s sideways
|
|
236
|
+
collection position, the batter and the crease.
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
import { cricketPlayClip, cricketCameraTracks, cricketCameraFraming,
|
|
240
|
+
cricketCameraReview, cricketDecisionOverlay } from '@algorisys/tinyfly/sports'
|
|
241
|
+
|
|
242
|
+
const clip = cricketPlayClip({
|
|
243
|
+
delivery: { legality: 'no-ball' }, finish: 'stumps',
|
|
244
|
+
decision: { dismissal: 'bowled' },
|
|
245
|
+
})
|
|
246
|
+
const view = 'front-foot'
|
|
247
|
+
const defaults = cricketCameraFraming(clip, view)
|
|
248
|
+
const camera = cricketCameraTracks(clip, { view, pitch: 30, distance: 3, zoom: 1.25 })
|
|
249
|
+
const moment = cricketCameraReview(clip, view) // physical event; no seeking
|
|
250
|
+
const scene = { ...clip.scene,
|
|
251
|
+
objects: [...clip.scene.objects, ...cricketDecisionOverlay(clip, view)] }
|
|
252
|
+
const timeline = { ...clip.timeline, tracks: [...clip.timeline.tracks, ...camera] }
|
|
253
|
+
// Your playback controls can explicitly seek to moment?.time.
|
|
254
|
+
// The no-ball ruling remains not out.
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
CRICKET_DECISION_VIEWS exports labels and descriptions. cricketCameraReview
|
|
258
|
+
returns an owned physical event or undefined for other views. Front-foot uses
|
|
259
|
+
release; striker crease prefers its wicket break, completed run, keeper gather,
|
|
260
|
+
return received or contact. Bowler crease uses run-out wicket break, completed run or release.
|
|
261
|
+
Times come from events and follow duration scaling. Changing cameras does not
|
|
262
|
+
seek or pause; **Framing & review → Inspect moment** explicitly seeks and pauses.
|
|
263
|
+
Optional gold overlays mark the crease reference, without classifying whole
|
|
264
|
+
feet, bat grounding or dismissals.
|
|
265
|
+
|
|
266
|
+
Camera pitch accepts 0–89 degrees above level; distance 0.5–2000 metres; fov
|
|
267
|
+
10–100 degrees before existing 0.25–4 optical zoom. target overrides a fixed-view
|
|
268
|
+
world target and is rejected for ball-follow. cricketCameraFraming returns
|
|
269
|
+
owned defaults; ball-follow omits a fixed target, since the actual target
|
|
270
|
+
follows the ball. Fixed views use absolute yaw; orbit adds 360 degrees.
|
|
271
|
+
Ball-follow rotates its original [5, 3, 6] offset relative to the default
|
|
272
|
+
75-degree control angle, with elevation/distance overrides too. Default geometry
|
|
273
|
+
for the original eight views is retained.
|
|
274
|
+
|
|
275
|
+
Explicit distance/target framing adds a conservative camera far-plane track.
|
|
276
|
+
Scene projection and clipping now respect animated camera far; it must be finite
|
|
277
|
+
and greater than the camera's static near plane. Camera changes leave player
|
|
278
|
+
motion and authored decisions untouched.
|
|
279
|
+
|
|
280
|
+
Essential controls stay above collapsed **Framing & review** controls. Elevation,
|
|
281
|
+
relative distance, lens, reset and highlight controls preserve playback/time.
|
|
282
|
+
Camera selection resets framing to that preset. A play/cast/format change resets
|
|
283
|
+
preset framing, while marking changes retain it. Downloads include cameraOptions,
|
|
284
|
+
camera tracks and any review overlay.
|
|
285
|
+
|
|
228
286
|
## Composed plays and authored decisions
|
|
229
287
|
|
|
230
288
|
Use `cricketPlay` on an existing field or `cricketPlayClip` for a new scene.
|
|
@@ -533,7 +591,7 @@ with a GSAP-style call (durations are in seconds here):
|
|
|
533
591
|
```html
|
|
534
592
|
<div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
|
|
535
593
|
|
|
536
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
594
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.113.0/cdn/tinyfly.iife.js"></script>
|
|
537
595
|
<script>
|
|
538
596
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
539
597
|
</script>
|
|
@@ -741,7 +799,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
|
|
|
741
799
|
global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
|
|
742
800
|
|
|
743
801
|
```html
|
|
744
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
802
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.113.0/cdn/tinyfly.iife.js"></script>
|
|
745
803
|
<script>
|
|
746
804
|
tinyfly.to('.box', { x: 200, duration: 1 })
|
|
747
805
|
</script>
|
|
@@ -2656,7 +2714,7 @@ For simple website embedding without a build system.
|
|
|
2656
2714
|
</html>
|
|
2657
2715
|
```
|
|
2658
2716
|
|
|
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.
|
|
2717
|
+
Build the player with `npm run build:player` to generate `lib/player/tinyfly-player.iife.js`, or load it from the CDN: `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.113.0/cdn/tinyfly-player.iife.js`.
|
|
2660
2718
|
|
|
2661
2719
|
---
|
|
2662
2720
|
|
|
@@ -7009,7 +7067,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
|
|
|
7009
7067
|
**Steps to embed:**
|
|
7010
7068
|
1. Build the player: `npm run build:player`
|
|
7011
7069
|
2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
|
|
7012
|
-
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
7070
|
+
`https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.113.0/cdn/tinyfly-player.iife.js`
|
|
7013
7071
|
instead; see [Deployment](DEPLOYMENT.md))
|
|
7014
7072
|
3. Copy the generated code into your HTML
|
|
7015
7073
|
4. Adjust the script `src` path if needed
|
|
@@ -8262,6 +8320,15 @@ demonstrations, not collision-based umpiring or an innings simulator. Do not
|
|
|
8262
8320
|
infer new outcomes from the illustrative arcs. See `docs/cricket.md` and
|
|
8263
8321
|
`examples/headless-video/cricket-story.mjs`; `/examples/live-cricket-story`
|
|
8264
8322
|
has event seeking and downloadable scene/action/camera JSON.
|
|
8323
|
+
Decision camera views are front-foot, striker-crease and bowler-crease.
|
|
8324
|
+
Use cricketCameraFraming(clip, view) for owned preset defaults;
|
|
8325
|
+
cricketCameraReview(clip, view) returns a physical event without seeking.
|
|
8326
|
+
cricketDecisionOverlay adds optional static crease references, without umpiring.
|
|
8327
|
+
Camera options pitch (0–89), distance (0.5–2000), fov (10–100 before zoom) and
|
|
8328
|
+
fixed-view target customize framing. Follow-ball rejects target and rotates its
|
|
8329
|
+
default offset with yaw; pitch/distance apply there too. Default 75-degree yaw
|
|
8330
|
+
retains the original offset. Export all camera tracks, including far for distant
|
|
8331
|
+
framing; the 3D resolver respects animated far. Keep motion/rulings untouched.
|
|
8265
8332
|
For composed plays use `cricketPlay(field, options)` / `cricketPlayClip(options)`.
|
|
8266
8333
|
Separate `delivery: { style, legality }`, `shot`, `finish`, `fielding`,
|
|
8267
8334
|
`context: { freeHit }` and `decision: { dismissal }`. Omitted/null dismissal
|
|
@@ -8589,7 +8656,7 @@ path for all of that:
|
|
|
8589
8656
|
</figure>
|
|
8590
8657
|
|
|
8591
8658
|
<!-- once, anywhere on the page (a site-wide footer is fine) -->
|
|
8592
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
8659
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.113.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
8593
8660
|
```
|
|
8594
8661
|
|
|
8595
8662
|
Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
|
|
@@ -9861,8 +9928,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
|
|
|
9861
9928
|
adds to the same `tinyfly` global:
|
|
9862
9929
|
|
|
9863
9930
|
```html
|
|
9864
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9865
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
9931
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.113.0/cdn/tinyfly.iife.js"></script>
|
|
9932
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.113.0/cdn/tinyfly-maps.iife.js"></script>
|
|
9866
9933
|
```
|
|
9867
9934
|
|
|
9868
9935
|
It is a separate script because the offline world map it carries adds about
|
|
@@ -15040,7 +15107,7 @@ magnet.addEventListener('pointerleave', () => {
|
|
|
15040
15107
|
|
|
15041
15108
|
<!-- capabilities: generated from the library -->
|
|
15042
15109
|
|
|
15043
|
-
# tinyfly capabilities (v0.
|
|
15110
|
+
# tinyfly capabilities (v0.113.0)
|
|
15044
15111
|
|
|
15045
15112
|
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).
|
|
15046
15113
|
|
|
@@ -15492,10 +15559,12 @@ Play dismissals: `caught`, `bowled`, `lbw`, `stumped`, `run-out`
|
|
|
15492
15559
|
- `no-ball`: The landing front foot oversteps the popping crease at release; one extra, no legal ball.
|
|
15493
15560
|
- `wide`: An untouched delivery passes beyond reach for a normal stroke; one extra, no legal ball.
|
|
15494
15561
|
|
|
15495
|
-
Formats: `test`, `odi`, `t20`. Casts: `adults`, `men`, `children`, `mixed`. Cameras: `pitch`, `batter`, `bowler`, `keeper`, `field`, `overhead`, `orbit`, `follow-ball`. Orbit turns 360° around the whole ground. `cricketCameraTracks(clip, { view, zoom })` supports 0.25–4× optical magnification (default 1) in every view.
|
|
15562
|
+
Formats: `test`, `odi`, `t20`. Casts: `adults`, `men`, `children`, `mixed`. Cameras: `pitch`, `batter`, `bowler`, `keeper`, `field`, `overhead`, `orbit`, `follow-ball`, `front-foot`, `striker-crease`, `bowler-crease`. Orbit turns 360° around the whole ground. `cricketCameraTracks(clip, { view, zoom })` supports 0.25–4× optical magnification (default 1) in every view.
|
|
15496
15563
|
|
|
15497
15564
|
Stock fielding labels (`CRICKET_FIELDING_POSITIONS`): `bowler`: Bowler, `keeper`: Wicketkeeper, `fielder`: Extra cover, `slip`: Slip, `point`: Point, `cover`: Cover, `mid-off`: Mid-off, `mid-on`: Mid-on, `square-leg`: Square leg, `fine-leg`: Fine leg, `third-man`: Third man. Eleven fielders, two on-field batters and two umpires; nine batting teammates wait off-field. Mid-on is closer to the pitch; long-on is its deeper boundary alternative, not an extra stock fielder. For the right-handed striker, +x is off side and -x is on/leg side.
|
|
15498
15565
|
|
|
15566
|
+
Decision review cameras: front-foot, striker-crease, bowler-crease. cricketCameraFraming returns owned defaults; cricketCameraReview returns a physical event without seeking. Optional cricketDecisionOverlay marks the crease reference. pitch 0–89, distance 0.5–2000, fov 10–100 before zoom, and fixed-view target customize framing. Ball-follow yaw rotates its default offset relative to 75 degrees; pitch/distance apply too. Export all camera tracks, including far for distant framing. These APIs never alter motion or rulings.
|
|
15567
|
+
|
|
15499
15568
|
## Camera shots (`cameraTracks(shots, { stage })`)
|
|
15500
15569
|
|
|
15501
15570
|
- **frame**: `{ at, duration?, easing?, frame: { focus?: { x, y }, scale?, rotate? } }: push in, pull out, or cut (duration 0)`
|
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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.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.113.0/README.md): Feature overview, project layout and development setup.
|
|
60
|
+
- [Release notes](https://raw.githubusercontent.com/algorisys-oss/tinyfly/v0.113.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.113.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,15 @@ 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
|
+
Decision camera views are front-foot, striker-crease and bowler-crease.
|
|
175
|
+
Use cricketCameraFraming(clip, view) for owned preset defaults;
|
|
176
|
+
cricketCameraReview(clip, view) returns a physical event without seeking.
|
|
177
|
+
cricketDecisionOverlay adds optional static crease references, without umpiring.
|
|
178
|
+
Camera options pitch (0–89), distance (0.5–2000), fov (10–100 before zoom) and
|
|
179
|
+
fixed-view target customize framing. Follow-ball rejects target and rotates its
|
|
180
|
+
default offset with yaw; pitch/distance apply there too. Default 75-degree yaw
|
|
181
|
+
retains the original offset. Export all camera tracks, including far for distant
|
|
182
|
+
framing; the 3D resolver respects animated far. Keep motion/rulings untouched.
|
|
174
183
|
For composed plays use `cricketPlay(field, options)` / `cricketPlayClip(options)`.
|
|
175
184
|
Separate `delivery: { style, legality }`, `shot`, `finish`, `fielding`,
|
|
176
185
|
`context: { freeHit }` and `decision: { dismissal }`. Omitted/null dismissal
|