@algorisys/tinyfly 0.112.0 → 0.114.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 -5
- package/docs/character-appearance.md +26 -0
- 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 +15 -1
- package/docs/maps.md +2 -2
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +943 -935
- package/lib/addons/cricket-play-BZNhfgOK.js +5037 -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 +7087 -6874
- package/lib/browser/tinyfly.umd.js +14 -14
- package/lib/types/characters/body/body-shape.d.ts +86 -0
- package/lib/types/characters/body/organic-body.d.ts +16 -0
- package/lib/types/characters/capabilities.d.ts +2 -0
- package/lib/types/characters/index.d.ts +1 -0
- package/lib/types/characters/soft-cartoon-cast.d.ts +7 -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 +113 -11
- package/llms.txt +30 -30
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +14 -1
- package/lib/addons/cricket-play-Zm5cghdV.js +0 -4828
package/README.md
CHANGED
|
@@ -54,11 +54,12 @@ 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. 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;
|
|
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; eleven camera views include a 360° ground orbit and ball follow, with 25%–400% review zoom and reset. Fixed front-foot and striker/bowler crease shots inspect release, wicket breaks, completed runs or keeper arrivals, including return throws; public framing options set elevation, distance, target and lens. Optional crease references, Inspect moment and framing controls preserve normal playback. Wide review framing includes the sideways-moving keeper. Ball-follow yaw now rotates the camera offset. 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
|
|
|
61
61
|
- **Soft cartoon story characters** - Opt-in `figure: 'organic'` adds filled shoulders, chest/waist/hip contours, supple limbs, small posed hands and deterministic cel shading on the existing rig. JSON body profiles keep anatomy independent of outline width; one skin colour covers body, face and hands under scene lighting and fog, and cel shading respects inherited opacity. Rear scalp hair and hats stay with the head through camera-sorted turns and nods. Foreground arms stay over waist garments in 2D and globally sorted 3D scenes, with only foreground arms promoted to garment depths so leaning head, neck, torso and legs retain world-object occlusion. Transparent organic skin keeps exposed body, head and both hand variants outline-only in every look. Editor Skin and Line controls resolve and edit imported body colour overrides. Leaf garment options are validated and copied at construction. Actor names are checked at runtime, and each head contour is reused for filling, shading and face clipping within a draw. Editable adult and child `softCartoonCharacter` presets, flowing hair, editable everyday/formal/casual/leaf clothing and the existing script, reach and lip-sync APIs support original stories. Try [**Soft Cartoon Characters**](https://tinyfly.app/examples/live-organic-characters): adults, children or an adult and child, with seven actions, face/hair controls and independent outfit editing. `outfitPreset()` supplies JSON wardrobe defaults; shirts, T-shirts, blouses, dresses, trousers, jeans, cargo, shorts, skirts, sleeves, collars, ties and colours remain editable. See [the appearance guide](docs/character-appearance.md).
|
|
62
|
+
- **Body shapes and measurements** - `body: { measurements: 'hourglass' }` (or `pear`, `rectangle`, `invertedTriangle`, `round`), or real girths `{ height, bust, underbust, waist, hip }` in any unit, give organic characters proportions that hold up at every turn: the torso has a side-view depth, so the bust, seat and belly read in profile and three-quarter views as well as from the front. Legs and clothing follow the hips, and the editor has a Body shape picker. See [the appearance guide](docs/character-appearance.md#body-shape-and-measurements).
|
|
62
63
|
- **Characters** - A poseable stick figure (`@algorisys/tinyfly/characters`): named poses, facial expressions (brows, eyes that widen, close and look around, mouth shapes), squash and stretch, rubber-hose limbs, blending, walk cycles and talking, all driven by timeline tracks. **Characters v2**: one skeleton in 3D drawn flat, turning front to side to back, resting on whatever touches the ground, reaching for points, in clean, pencil or silhouette looks, and a 🧍 Character element in the editor you pose and keyframe. **Character appearance**: 41 hairstyles, including soft sweeps, flowing bobs and cascading waves with scalp-attached curved locks and individual flexibility, 20 facial-hair styles, glasses, hats and ears as plain data on the head (they turn with it through all eight views), builds from toddler to tall, a recurring cast (`castMember`), 30 expressions with blush, tears and sweat, and hair that swings after a turn or a run and settles (`hairFollowTracks` keys the lag from the character's own tracks, so drawing stays stateless); four-legged animals' ears lay back on a run the way their tails already trail. Clothes are data too (`outfit.over`: an apron, a lab coat, a hoodie, a cardigan, overalls, a sari; boots), a mouth opens on teeth and a tongue, feet come in shapes, two people hug and help each other up (`embrace`, `helpUp`), and a cane in the hand or a wheelchair to ride are accessories any character can have, not part of an age ([guide](docs/character-appearance.md))
|
|
63
64
|
- **Dance and flips** - The stick figure dances disco, hip hop, breaking toprock, jazz, K-pop, Bollywood, Bhangra, Bharatanatyam (with mudras), the Charleston, tap (foot strikes as data, for tap sounds) and popping (side glide, moonwalk, forward glide, which travel with the planted foot staying put), and does front, back, layout, scissor and side flips, cartwheels, back handsprings, split leaps, toe touches and full splits. Wrists, ankles, foot turn-out, whole-body `spin` and `rise` are pose fields; moves are keyed in beats, so any tempo plays them; styles, grooves and routines are plain JSON (`danceFrame()`, `danceTracks()`, `flipPose()`, `flipTracks()`). In the editor a 🧍 Character dances from the playhead, in time with the music: an Audio element's tempo is detected (`detectTempo()`) or tapped, the timeline shows its beats and bars, and keyframes snap to them. Native v2 garba (two/three clap) and dandiya add body-local poses, circle formations with planted toes, paired stick-tip contacts, and timed full spins (`humanDanceFrame`, `danceCircleTracks`, `meetDandiya`, `characterScript3D`). Sparse custom keys keep numeric hand and pose values through JSON playback; rolled circles preserve native yaw-before-roll and foot grounding. Foot IK preserves authored hip turn-out for ankle and toe plants. Scripted dance entry preserves relaxed or explicitly posed hands through preceding holds. Script action boundaries retain preceding easing; festive examples solve contacts with their rendered body options. See [docs/dance.md](docs/dance.md)
|
|
64
65
|
- **Maps** - Animated maps on OpenStreetMap tiles or an offline world outline (also in pencil): the camera flies in, pins drop, routes draw themselves while a marker travels them; a 🗺 Map element in the editor with a one-click trip
|
|
@@ -280,7 +281,7 @@ GSAP-shaped functions at the top level. Teaching embeds are included: add
|
|
|
280
281
|
itself.
|
|
281
282
|
|
|
282
283
|
```html
|
|
283
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
284
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.114.0/cdn/tinyfly.iife.js"></script>
|
|
284
285
|
<script>
|
|
285
286
|
tinyfly.to('.box', { x: 200, rotate: 90, duration: 1, ease: 'power2.out' })
|
|
286
287
|
|
|
@@ -316,7 +317,7 @@ A teaching figure needs no code at all:
|
|
|
316
317
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON with markers… }</script>
|
|
317
318
|
<figcaption>Appending to a full slice</figcaption>
|
|
318
319
|
</figure>
|
|
319
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
320
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.114.0/cdn/tinyfly.iife.js" data-tinyfly-auto></script>
|
|
320
321
|
```
|
|
321
322
|
|
|
322
323
|
See [Teaching Animations](docs/teaching.md).
|
|
@@ -415,7 +416,7 @@ Without a build step, the player bundle puts the same functions on a `tinyfly` g
|
|
|
415
416
|
<div data-tinyfly="box" style="width: 60px; height: 60px; background: #4a9eff;"></div>
|
|
416
417
|
</div>
|
|
417
418
|
|
|
418
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
419
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.114.0/cdn/tinyfly-player.iife.js"></script>
|
|
419
420
|
<script>
|
|
420
421
|
tinyfly.play('#animation', './animation.json', { loop: -1 })
|
|
421
422
|
</script>
|
|
@@ -524,7 +525,7 @@ Or skip the code entirely with declarative embeds (see [Teaching Animations](doc
|
|
|
524
525
|
<svg viewBox="0 0 720 200">…</svg>
|
|
525
526
|
<script type="application/json" data-tinyfly-timeline>{ …timeline JSON… }</script>
|
|
526
527
|
</figure>
|
|
527
|
-
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.
|
|
528
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.114.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
|
|
528
529
|
```
|
|
529
530
|
|
|
530
531
|
### Audio / Video Sync
|
|
@@ -75,6 +75,32 @@ height. Torso positions run hip to neck, arms shoulder to wrist, and legs
|
|
|
75
75
|
hip to ankle. Cubic centerlines pass through native elbow/knee joints with
|
|
76
76
|
interpolated width profiles. Options are copied at construction and can
|
|
77
77
|
travel as JSON. `body.depth` (0.2–1, default 0.55) sets torso side thickness.
|
|
78
|
+
`body.torsoFront` and `body.torsoBack` (same format) set the torso's side
|
|
79
|
+
view directly: its depth from the spine line toward the chest and belly, and
|
|
80
|
+
toward the back and seat. They default to `torso × depth` each way.
|
|
81
|
+
|
|
82
|
+
### Body shape and measurements
|
|
83
|
+
|
|
84
|
+
`body.measurements` describes the torso the way a size chart does, so women,
|
|
85
|
+
men and children of every build can be drawn in proportion:
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
character({ figure: 'organic', body: { measurements: 'hourglass' } })
|
|
89
|
+
character({ figure: 'organic', body: { measurements: { height: 165, bust: 94, underbust: 76, waist: 70, hip: 98 } } })
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The girths can be in any unit, as long as `height` uses the same one. `underbust`
|
|
93
|
+
defaults to 0.86 × `bust`, and the difference between the two is how far the bust
|
|
94
|
+
projects. Named shapes (`BODY_SHAPES`) are `hourglass`, `pear`, `rectangle`,
|
|
95
|
+
`invertedTriangle` and `round`. Measurements set the front width, the side depth
|
|
96
|
+
(the bust forward, the seat back, and a belly when the waist is close to the hips)
|
|
97
|
+
and the hip and thigh spacing. Because each torso section is projected from both
|
|
98
|
+
its width and its depth, the shape reads correctly at every `turn`, not only from
|
|
99
|
+
the front. Clothing follows the same contour. Any explicit `torso`, `torsoFront`,
|
|
100
|
+
`torsoBack` or `hipWidth` still wins. `softCartoonCharacter` drops its preset torso
|
|
101
|
+
when you pass new measurements. The shapes are kept as stylised silhouettes, in
|
|
102
|
+
proportion with the rest of the cast. In the editor, organic characters have a
|
|
103
|
+
**Body shape** picker.
|
|
78
104
|
`body.fill` overrides `skin` for all exposed body, face and palms; omit it
|
|
79
105
|
to keep one `skin` colour control. The editor's Skin and Line controls show
|
|
80
106
|
the resolved fill and outline colour; editing them also updates any existing
|
package/docs/cricket.md
CHANGED
|
@@ -42,7 +42,7 @@ See [getting started](getting-started.md) for the versioned CDN URLs.
|
|
|
42
42
|
| `cricketPlay(field, options)` | Composes independent delivery, shot, finish, fielding, context and candidate decision; returns `play`, `ruling`, timeline, events and result. |
|
|
43
43
|
| `cricketPlayClip(options)` | Builds a field and composed play together. |
|
|
44
44
|
| `cricketClip(options)` | Combines field and action; default T20, adult cast, pace bowling, 6000 ms. |
|
|
45
|
-
| `cricketCameraTracks(clip, { view?, yaw?, zoom?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
45
|
+
| `cricketCameraTracks(clip, { view?, yaw?, zoom?, pitch?, distance?, target?, fov?, every? })` | Ordinary scene camera tracks. Merge these with the action tracks. |
|
|
46
46
|
| `cricketEventAt(events, time)` | Most recent event at that time, including when seeking backward. |
|
|
47
47
|
| `ballFlightPoint(options, time)`, `ballFlightTracks(options)` | Shared sampled arcs for other sports too. `from`, `to`, `arc`, `curve`, `start`, `end`, `target`; exact endpoints. |
|
|
48
48
|
|
|
@@ -206,6 +206,64 @@ spacing without evaluating actor tracks.
|
|
|
206
206
|
Development full-page previews load the local browser API and scene add-ons;
|
|
207
207
|
production previews and copied HTML retain the versioned CDN bundles.
|
|
208
208
|
|
|
209
|
+
## Decision-focused camera review
|
|
210
|
+
|
|
211
|
+
Select **Front-foot review**, **Striker crease** or **Bowler crease** in the
|
|
212
|
+
example's Camera control. These are fixed views, so scrubbing before/after the
|
|
213
|
+
event compares positions without a moving viewpoint. Front-foot framing uses
|
|
214
|
+
the native front ankle at authored release; crease views include the wicket
|
|
215
|
+
and popping crease. Run-out framing includes the approaching batter at the
|
|
216
|
+
wicket-break event. Wide-delivery framing also includes the keeper’s sideways
|
|
217
|
+
collection position, the batter and the crease.
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import { cricketPlayClip, cricketCameraTracks, cricketCameraFraming,
|
|
221
|
+
cricketCameraReview, cricketDecisionOverlay } from '@algorisys/tinyfly/sports'
|
|
222
|
+
|
|
223
|
+
const clip = cricketPlayClip({
|
|
224
|
+
delivery: { legality: 'no-ball' }, finish: 'stumps',
|
|
225
|
+
decision: { dismissal: 'bowled' },
|
|
226
|
+
})
|
|
227
|
+
const view = 'front-foot'
|
|
228
|
+
const defaults = cricketCameraFraming(clip, view)
|
|
229
|
+
const camera = cricketCameraTracks(clip, { view, pitch: 30, distance: 3, zoom: 1.25 })
|
|
230
|
+
const moment = cricketCameraReview(clip, view) // physical event; no seeking
|
|
231
|
+
const scene = { ...clip.scene,
|
|
232
|
+
objects: [...clip.scene.objects, ...cricketDecisionOverlay(clip, view)] }
|
|
233
|
+
const timeline = { ...clip.timeline, tracks: [...clip.timeline.tracks, ...camera] }
|
|
234
|
+
// Your playback controls can explicitly seek to moment?.time.
|
|
235
|
+
// The no-ball ruling remains not out.
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
CRICKET_DECISION_VIEWS exports labels and descriptions. cricketCameraReview
|
|
239
|
+
returns an owned physical event or undefined for other views. Front-foot uses
|
|
240
|
+
release; striker crease prefers its wicket break, completed run, keeper gather,
|
|
241
|
+
return received or contact. Bowler crease uses run-out wicket break, completed run or release.
|
|
242
|
+
Times come from events and follow duration scaling. Changing cameras does not
|
|
243
|
+
seek or pause; **Framing & review → Inspect moment** explicitly seeks and pauses.
|
|
244
|
+
Optional gold overlays mark the crease reference, without classifying whole
|
|
245
|
+
feet, bat grounding or dismissals.
|
|
246
|
+
|
|
247
|
+
Camera pitch accepts 0–89 degrees above level; distance 0.5–2000 metres; fov
|
|
248
|
+
10–100 degrees before existing 0.25–4 optical zoom. target overrides a fixed-view
|
|
249
|
+
world target and is rejected for ball-follow. cricketCameraFraming returns
|
|
250
|
+
owned defaults; ball-follow omits a fixed target, since the actual target
|
|
251
|
+
follows the ball. Fixed views use absolute yaw; orbit adds 360 degrees.
|
|
252
|
+
Ball-follow rotates its original [5, 3, 6] offset relative to the default
|
|
253
|
+
75-degree control angle, with elevation/distance overrides too. Default geometry
|
|
254
|
+
for the original eight views is retained.
|
|
255
|
+
|
|
256
|
+
Explicit distance/target framing adds a conservative camera far-plane track.
|
|
257
|
+
Scene projection and clipping now respect animated camera far; it must be finite
|
|
258
|
+
and greater than the camera's static near plane. Camera changes leave player
|
|
259
|
+
motion and authored decisions untouched.
|
|
260
|
+
|
|
261
|
+
Essential controls stay above collapsed **Framing & review** controls. Elevation,
|
|
262
|
+
relative distance, lens, reset and highlight controls preserve playback/time.
|
|
263
|
+
Camera selection resets framing to that preset. A play/cast/format change resets
|
|
264
|
+
preset framing, while marking changes retain it. Downloads include cameraOptions,
|
|
265
|
+
camera tracks and any review overlay.
|
|
266
|
+
|
|
209
267
|
## Composed plays and authored decisions
|
|
210
268
|
|
|
211
269
|
Use `cricketPlay` on an existing field or `cricketPlayClip` for a new scene.
|
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.114.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.114.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.114.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.114.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,15 @@ 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
|
+
Decision camera views are front-foot, striker-crease and bowler-crease.
|
|
104
|
+
Use cricketCameraFraming(clip, view) for owned preset defaults;
|
|
105
|
+
cricketCameraReview(clip, view) returns a physical event without seeking.
|
|
106
|
+
cricketDecisionOverlay adds optional static crease references, without umpiring.
|
|
107
|
+
Camera options pitch (0–89), distance (0.5–2000), fov (10–100 before zoom) and
|
|
108
|
+
fixed-view target customize framing. Follow-ball rejects target and rotates its
|
|
109
|
+
default offset with yaw; pitch/distance apply there too. Default 75-degree yaw
|
|
110
|
+
retains the original offset. Export all camera tracks, including far for distant
|
|
111
|
+
framing; the 3D resolver respects animated far. Keep motion/rulings untouched.
|
|
103
112
|
For composed plays use `cricketPlay(field, options)` / `cricketPlayClip(options)`.
|
|
104
113
|
Separate `delivery: { style, legality }`, `shot`, `finish`, `fielding`,
|
|
105
114
|
`context: { freeHit }` and `decision: { dismissal }`. Omitted/null dismissal
|
|
@@ -157,7 +166,12 @@ lets hair occlude them, with a flatter profile facial plane and a nose above
|
|
|
157
166
|
the mouth; classic `cartoon` projection remains available. Foreground organic
|
|
158
167
|
arms/hands draw together over lower garments, preserving the wrist at the waist.
|
|
159
168
|
`body` owns JSON half-width profiles (`torso`, `arm`, `leg`, `neck`): increasing
|
|
160
|
-
arrays of `{ at: 0..1, width: fractionOfHeight }` spanning 0 to 1.
|
|
169
|
+
arrays of `{ at: 0..1, width: fractionOfHeight }` spanning 0 to 1. For a body
|
|
170
|
+
in proportion, prefer `body.measurements`: a shape name (`hourglass`, `pear`,
|
|
171
|
+
`rectangle`, `invertedTriangle`, `round`) or girths `{ height, bust, underbust?,
|
|
172
|
+
waist, hip }` in one unit. It sets the front width, the side depth (bust forward,
|
|
173
|
+
seat back) and the leg spacing, so the figure reads correctly at every `turn`.
|
|
174
|
+
Don't hand-tune `torso` to fake a side view; `torsoFront`/`torsoBack` set depth. Set `skin`
|
|
161
175
|
once for exposed body, head and hands; `body.fill` overrides it.
|
|
162
176
|
Use `body.fill: 'none'` for outline-only exposed skin, including both hand
|
|
163
177
|
variants in every look. In 3D, only foreground arms use garment depths for
|
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.114.0/cdn/tinyfly.iife.js"></script>
|
|
18
|
+
<script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.114.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.114.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
|