@algorisys/tinyfly 0.106.0 → 0.107.1

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.
@@ -34,6 +34,8 @@ export interface CharacterLayers {
34
34
  /** Around a part ('leg.left', 'spine', 'neck', 'arm.right', 'head'…): drawn at that part's depth */
35
35
  parts?: Record<string, {
36
36
  under?: CharacterLayer;
37
+ /** Clips the bare body part only; clothing and other `over` layers draw afterward. */
38
+ clip?: CharacterLayer;
37
39
  over?: CharacterLayer;
38
40
  }>;
39
41
  /** After everything (a prop in front) */
@@ -136,6 +138,7 @@ export interface CharacterJoints {
136
138
  parts: Record<string, {
137
139
  points: Point[];
138
140
  depth: number;
141
+ order: number;
139
142
  }>;
140
143
  /** The head: centre, radii, screen angle and its own axes (use `pointOnHead`) */
141
144
  head: SolvedHead;
@@ -3,7 +3,7 @@ import type { Pose } from './rig/body-plan';
3
3
  import { type Character } from './character';
4
4
  import type { Gait } from './gaits';
5
5
  /**
6
- * Hair follow-through: hanging hair (long hair, ponytails, braids) lags
6
+ * Hair follow-through: hanging hair and flexible curved locks lag
7
7
  * behind the head, swinging round it after a turn, streaming back on a run,
8
8
  * dropping on a jump and lifting on the landing. The drawing stays stateless:
9
9
  * the lag is three pose fields (`hair.swing`, `hair.trail`, `hair.lift`), and
@@ -76,7 +76,8 @@ export interface HairFollowTrackOptions extends Pick<HairFollowOptions, 'step' |
76
76
  * its head is (the target's `x` and `y`, plus the head's place in the pose,
77
77
  * so a gait's bob, a crouch and a jump all move it), and the pose's `turn`
78
78
  * and `head.turn`. Nothing is added for hair that has nothing to swing
79
- * (short hair, a bun, no hair). Hair fields the tracks already key (a flick
79
+ * (ordinary short hair, a bun, no hair). Flexible short locks do get lag.
80
+ * Hair fields the tracks already key (a flick
80
81
  * written by hand) keep their values, with the lag added on.
81
82
  */
82
83
  export declare function hairFollowTracks(target: string, tracks: Track[], who: Character, options?: HairFollowTrackOptions): Track[];
@@ -1,6 +1,8 @@
1
+ import type { Point } from '../../adapters/canvas/sketch';
1
2
  import type { SolvedHead } from '../rig/skeleton';
2
3
  import type { Pen } from '../look/pen';
3
4
  export interface EarDrawOptions {
5
+ headOutline?: Point[];
4
6
  lineWidth: number;
5
7
  skin: string;
6
8
  }
@@ -33,6 +33,8 @@ export interface FaceOptions {
33
33
  jawWidth?: number;
34
34
  /** Angular chin half-width in head radii, 0.03..0.35 (default 0.14). */
35
35
  chinWidth?: number;
36
+ /** Round angular jaw corners, 0..1 (default 0: keep the sharp outline). */
37
+ jawRoundness?: number;
36
38
  /** Anime eye size, 0.5..1.2 (default 1). */
37
39
  eyeScale?: number;
38
40
  /** Anime eye height relative to width, 0.45..1.2 (default 1). */
@@ -1,3 +1,4 @@
1
+ import type { Point } from '../../adapters/canvas/sketch';
1
2
  import type { SolvedHead } from '../rig/skeleton';
2
3
  import type { Pen } from '../look/pen';
3
4
  import { type ShellRegion } from './shell';
@@ -107,6 +108,7 @@ export type FacialHairStyleName = keyof typeof FACIAL_HAIR_STYLES;
107
108
  export declare function resolveFacialHair(spec: FacialHairSpec | FacialHairStyleName, hairColor?: string): FacialHair;
108
109
  export declare function beardRegion(style: BeardStyle, pad: number): ShellRegion | null;
109
110
  export interface FacialHairDrawOptions {
111
+ headOutline?: Point[];
110
112
  lineWidth: number;
111
113
  skin: string;
112
114
  }
@@ -0,0 +1,55 @@
1
+ import type { HairLock } from './hair-lock';
2
+ /** Original flowing cartoon styles: a fitted cap with broad curved locks, rather than a straight curtain. */
3
+ export declare const FLOWING_HAIR_STYLES: {
4
+ softSweep: {
5
+ volume: number;
6
+ shine: number;
7
+ part: number;
8
+ strands: "part";
9
+ sweep: number;
10
+ hairline: {
11
+ front: number;
12
+ side: number;
13
+ back: number;
14
+ };
15
+ locks: HairLock[];
16
+ };
17
+ flowingBob: {
18
+ volume: number;
19
+ shine: number;
20
+ length: number;
21
+ fall: {
22
+ taper: number;
23
+ wave: number;
24
+ };
25
+ part: number;
26
+ strands: "part";
27
+ sweep: number;
28
+ hairline: {
29
+ front: number;
30
+ side: number;
31
+ back: number;
32
+ };
33
+ coversEars: true;
34
+ locks: HairLock[];
35
+ };
36
+ cascadingWaves: {
37
+ volume: number;
38
+ shine: number;
39
+ length: number;
40
+ fall: {
41
+ taper: number;
42
+ wave: number;
43
+ };
44
+ part: number;
45
+ strands: "part";
46
+ sweep: number;
47
+ hairline: {
48
+ front: number;
49
+ side: number;
50
+ back: number;
51
+ };
52
+ coversEars: true;
53
+ locks: HairLock[];
54
+ };
55
+ };
@@ -0,0 +1,5 @@
1
+ import type { SolvedHead } from '../rig/skeleton';
2
+ import type { Pen } from '../look/pen';
3
+ import type { Hair, HairMotion } from './hair';
4
+ /** Broad flowing locks, ordered by depth and drawn in the head's two passes. */
5
+ export declare function drawHairLocks(pen: Pen, head: SolvedHead, hair: Hair, pad: number, motion: HairMotion, lineWidth: number, near: boolean): void;
@@ -0,0 +1,36 @@
1
+ import type { Vec3 } from '../rig/body-plan';
2
+ import type { HairMotion } from './hair';
3
+ /** A point on a lock's curve, in the head's own coordinates. */
4
+ export interface HairLockPoint {
5
+ /** Degrees round from the face toward the character's left; use continuous angles across the back. */
6
+ around: number;
7
+ /** Head radii up from the centre; negative values hang below the scalp. */
8
+ up: number;
9
+ /** Extra distance out from the hair cap, head radii (default 0). */
10
+ lift?: number;
11
+ }
12
+ /** A broad, curved section of hair, as editable, serializable data. */
13
+ export interface HairLock {
14
+ /** Root, two controls, tip; append groups of three points for more cubic segments. */
15
+ path: HairLockPoint[];
16
+ /** Maximum width, head radii. Roots blend into the cap and tips taper. */
17
+ width: number;
18
+ /** How much the ends follow hair.swing/trail/lift (default 1; 0 pins the lock). */
19
+ follow?: number;
20
+ }
21
+ export interface HairLockSample {
22
+ center: Vec3;
23
+ left: Vec3;
24
+ right: Vec3;
25
+ normal: Vec3;
26
+ t: number;
27
+ }
28
+ /** Reject malformed paths before they reach a renderer or a saved character. */
29
+ export declare function copyHairLock(lock: HairLock): HairLock;
30
+ /**
31
+ * Sample a lock as a ribbon on the scalp, then hanging off it. Curves are
32
+ * evaluated in scalp coordinates, so a sweep never cuts through the skull.
33
+ * Motion bends the ends progressively and leaves the root fixed. No clock,
34
+ * renderer or previous frame is needed.
35
+ */
36
+ export declare function sampleHairLock(lock: HairLock, volume: number, pad: number, motion: HairMotion): HairLockSample[];
@@ -1,12 +1,14 @@
1
+ import type { Point } from '../../adapters/canvas/sketch';
1
2
  import type { Pose } from '../rig/body-plan';
2
3
  import type { SolvedHead } from '../rig/skeleton';
3
4
  import type { Pen } from '../look/pen';
4
5
  import { type ShellRegion } from './shell';
6
+ import { type HairLock } from './hair-lock';
5
7
  /**
6
8
  * Hair for the human character, as plain data: a cap of hair on the head
7
9
  * (how far it stands off the head, where its hairline runs, its texture),
8
- * optional length that hangs below the head, and ties (ponytails, buns,
9
- * braids). Every style is the same handful of numbers, so a style is a
10
+ * optional length that hangs below the head, curved locks and ties (ponytails,
11
+ * buns, braids). Every style is plain data, so a style is a
10
12
  * preset of them and any field can be changed on its own.
11
13
  *
12
14
  * Hair is a region on the head's surface (see `shell.ts`), so it turns with
@@ -36,7 +38,7 @@ export interface HairMotion {
36
38
  export declare const HAIR_STILL: HairMotion;
37
39
  /** The hair motion a pose carries (`hair.swing`, `hair.trail`, `hair.lift`; missing fields are still). */
38
40
  export declare function hairMotionOf(pose: Pose | undefined): HairMotion;
39
- /** Whether a style has anything that swings: hair hanging below the head, or a ponytail or braid. */
41
+ /** Whether a style has anything that swings: hanging hair, a ponytail/braid, or flexible locks. */
40
42
  export declare function hairHangs(hair: Hair): boolean;
41
43
  export type HairTexture = 'smooth' | 'spiky' | 'curly' | 'wavy' | 'locs';
42
44
  /** Detail lines drawn on the hair: none, a parting, strands swept from a parting, combed back, hanging strands, a few thin strands */
@@ -95,6 +97,15 @@ export interface Hair {
95
97
  ties: HairTie[];
96
98
  /** Optional pointed tufts; their silhouette follows every head turn. */
97
99
  spikes?: HairSpike[];
100
+ /** Broad curved locks, rooted on the cap, with tapered tips and individual flexibility. */
101
+ locks?: HairLock[];
102
+ /** Hanging mass: narrowing toward the tips and a soft uneven hem, in head radii. */
103
+ fall?: {
104
+ taper: number;
105
+ wave: number;
106
+ };
107
+ /** Soft highlight opacity on flowing locks, 0..1 (default 0). */
108
+ shine?: number;
98
109
  /** Hair falls over the ears, so the ears are hidden */
99
110
  coversEars: boolean;
100
111
  }
@@ -592,6 +603,57 @@ export declare const HAIR_STYLES: {
592
603
  })[];
593
604
  coversEars: true;
594
605
  };
606
+ softSweep: {
607
+ volume: number;
608
+ shine: number;
609
+ part: number;
610
+ strands: "part";
611
+ sweep: number;
612
+ hairline: {
613
+ front: number;
614
+ side: number;
615
+ back: number;
616
+ };
617
+ locks: HairLock[];
618
+ };
619
+ flowingBob: {
620
+ volume: number;
621
+ shine: number;
622
+ length: number;
623
+ fall: {
624
+ taper: number;
625
+ wave: number;
626
+ };
627
+ part: number;
628
+ strands: "part";
629
+ sweep: number;
630
+ hairline: {
631
+ front: number;
632
+ side: number;
633
+ back: number;
634
+ };
635
+ coversEars: true;
636
+ locks: HairLock[];
637
+ };
638
+ cascadingWaves: {
639
+ volume: number;
640
+ shine: number;
641
+ length: number;
642
+ fall: {
643
+ taper: number;
644
+ wave: number;
645
+ };
646
+ part: number;
647
+ strands: "part";
648
+ sweep: number;
649
+ hairline: {
650
+ front: number;
651
+ side: number;
652
+ back: number;
653
+ };
654
+ coversEars: true;
655
+ locks: HairLock[];
656
+ };
595
657
  };
596
658
  export type HairStyleName = keyof typeof HAIR_STYLES;
597
659
  /** Hair colours that read well against the default ink, by name. */
@@ -615,6 +677,8 @@ export declare function hairlineAt(hair: Hair, around: number): number;
615
677
  */
616
678
  export declare function hairRegion(hair: Hair, pad: number, motion?: HairMotion): ShellRegion;
617
679
  export interface HairDrawOptions {
680
+ /** Projected face outline for clipping behind angular heads. */
681
+ headOutline?: Point[];
618
682
  /** The character's line width, px */
619
683
  lineWidth: number;
620
684
  /** Skin colour, for the scalp under close-cropped hair */
@@ -1,6 +1,7 @@
1
1
  import type { Pose } from '../rig/body-plan';
2
2
  import type { SolvedHead } from '../rig/skeleton';
3
3
  import type { Pen } from '../look/pen';
4
+ import type { FaceOptions } from './face';
4
5
  import { type Hair, type HairSpec, type HairStyleName } from './hair';
5
6
  import { type FacialHair, type FacialHairSpec, type FacialHairStyleName } from './facial-hair';
6
7
  import { type Glasses, type GlassesSpec, type GlassesStyle } from './glasses';
@@ -46,6 +47,7 @@ export interface HeadLook {
46
47
  }
47
48
  export declare function resolveHeadLook(options: HeadLookOptions): HeadLook;
48
49
  export interface HeadDrawOptions {
50
+ face?: FaceOptions;
49
51
  lineWidth: number;
50
52
  skin: string;
51
53
  }
@@ -3,3 +3,4 @@ export { FACIAL_HAIR_STYLES, resolveFacialHair, type FacialHair, type FacialHair
3
3
  export { GLASSES_STYLES, resolveGlasses, type Glasses, type GlassesSpec, type GlassesStyle } from './glasses';
4
4
  export { HAT_STYLES, resolveHat, type Hat, type HatSpec, type HatStyle } from './hats';
5
5
  export { resolveHeadLook, type HeadLook, type HeadLookOptions } from './head-look';
6
+ export type { HairLock, HairLockPoint } from './hair-lock';
@@ -56,9 +56,9 @@ export declare function aroundDistance(a: number, b: number): number;
56
56
  export declare function shellOutlines(head: SolvedHead, region: ShellRegion, columns?: number): ShellOutlines;
57
57
  export declare function cachedOutlines(head: SolvedHead, key: unknown, make: () => ShellOutlines): ShellOutlines;
58
58
  /**
59
- * Run `draw` with the head's disc cut out of the canvas, for things behind
59
+ * Run `draw` with the projected face outline (or default oval) cut out, for things behind
60
60
  * the head: they show only around it, even when the head is see-through.
61
61
  */
62
- export declare function behindHead(ctx: CanvasRenderingContext2D, head: SolvedHead, draw: () => void): void;
62
+ export declare function behindHead(ctx: CanvasRenderingContext2D, head: SolvedHead, draw: () => void, outline?: Point[]): void;
63
63
  /** Split a head-space polyline into the runs that face the viewer, on the screen. */
64
64
  export declare function visibleRuns(head: SolvedHead, points: Vec3[], normals: Vec3[], threshold?: number): Point[][];
@@ -0,0 +1,12 @@
1
+ import type { Point } from './sketch';
2
+ /**
3
+ * Polyline helpers measured by length, so `progress` 0..1 means "this much of
4
+ * the way along", whatever the spacing of the points. Drawing on, erasing and
5
+ * the hand that follows a stroke all use them.
6
+ */
7
+ /** Total length of a polyline. */
8
+ export declare function pathLength(points: Point[]): number;
9
+ /** The start of a polyline, up to `progress` (0..1) of its length. */
10
+ export declare function partialPath(points: Point[], progress: number): Point[];
11
+ /** Where along a polyline `progress` (0..1) of its length is. */
12
+ export declare function pointAlong(points: Point[], progress: number): Point;
@@ -46,6 +46,8 @@ export interface Skeleton {
46
46
  head: SolvedHead;
47
47
  /** The hips on screen */
48
48
  hip: Point;
49
+ /** Root depth in the same px units as the chains, for relative part ordering. */
50
+ hipDepth: number;
49
51
  /** Every contact point on screen, and which one is lowest */
50
52
  contacts: Array<{
51
53
  spec: ContactSpec;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Hand-drawn strokes for canvas drawing: each line is drawn a few times, a
3
+ * little off and a little bowed, the way a pencil line is. "Line boil" redraws
4
+ * the wobble a few times a second, so a still drawing looks alive.
5
+ *
6
+ * The wobble comes from a seeded generator keyed to the seed, the boil frame
7
+ * and the stroke's place in the drawing order, never from Math.random, so the
8
+ * same time always draws the same lines: a frame rendered twice, in a browser
9
+ * or headless, is identical.
10
+ *
11
+ * Every stroke takes a `progress` (0..1) to draw it on, as a pencil would: the
12
+ * part drawn so far lies exactly on the finished stroke, so it grows without
13
+ * jumping.
14
+ */
15
+ export interface SketchStyle {
16
+ /** Largest wobble, px (default 2) */
17
+ roughness?: number;
18
+ /** Strokes per line: 1 is clean, 2 or 3 look sketched (default 2) */
19
+ passes?: number;
20
+ /** Redraws per second; 0 holds the wobble still (default 8, about "on threes" at 24 fps) */
21
+ boil?: number;
22
+ /** Seed for the wobble, so two drawings with the same style do not boil in step (default 1) */
23
+ seed?: number;
24
+ }
25
+ export interface Point {
26
+ x: number;
27
+ y: number;
28
+ }
29
+ /** Which redraw is showing at `time` ms. */
30
+ export declare function boilFrame(time: number, boil: number): number;
31
+ /**
32
+ * Strokes in the context's current stroke style and line width. Each stroke's
33
+ * wobble is seeded by its place in the drawing order, so draw them in the same
34
+ * order every frame; a stroke drawn on partway wobbles exactly as it will when
35
+ * it is finished, and does not disturb the strokes after it.
36
+ */
37
+ export interface SketchPen {
38
+ /** A line through the points, each segment slightly bowed; `progress` draws it on (default 1) */
39
+ line(points: Point[], progress?: number): void;
40
+ /**
41
+ * A smooth curve through the points (a limb drawn as a curve). The wobble
42
+ * is spread along the whole curve rather than added at every point, so a
43
+ * finely sampled curve stays smooth instead of turning lumpy.
44
+ */
45
+ curve(points: Point[], progress?: number): void;
46
+ /** A circle whose end overshoots its start, as a quick pencil circle does */
47
+ circle(cx: number, cy: number, r: number, progress?: number): void;
48
+ /** An ellipse drawn the same way as `circle` */
49
+ ellipse(cx: number, cy: number, rx: number, ry: number, progress?: number): void;
50
+ /** A small random offset, up to `scale` × roughness, for nudging details (a face) with the boil */
51
+ nudge(scale?: number): Point;
52
+ }
53
+ /** A pen whose wobble is fixed for the boil frame showing at `time` ms. */
54
+ export declare function sketchPen(ctx: CanvasRenderingContext2D, style: SketchStyle, time: number): SketchPen;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Which points in time a playhead passed between two frames — the pure part of
3
+ * timeline callbacks (`call`, `addPause`, per-tween `onStart` / `onComplete`,
4
+ * `onRepeat`).
5
+ *
6
+ * A frame moves the playhead from one place to another, possibly across loop
7
+ * boundaries: a plain repeat wraps back to the start, a yoyo turns around. The
8
+ * movement is split into passes, and each pass reports the event times inside it
9
+ * in the order they were crossed:
10
+ *
11
+ * - forward, `(from, to]` — an event exactly where the playhead already was has
12
+ * fired before; a pass that starts a loop (or a first play) includes its start;
13
+ * - reverse, `[to, from)`.
14
+ */
15
+ export type Direction = 'forward' | 'reverse';
16
+ export interface Playhead {
17
+ /** Milliseconds within the current loop */
18
+ time: number;
19
+ /** Loops completed */
20
+ iteration: number;
21
+ direction: Direction;
22
+ /** The playhead is at the very start of a pass, so an event at its position has not fired */
23
+ fresh?: boolean;
24
+ }
25
+ export type Crossing = {
26
+ kind: 'event';
27
+ index: number;
28
+ direction: Direction;
29
+ } | {
30
+ kind: 'repeat';
31
+ };
32
+ export interface CrossingResult {
33
+ crossings: Crossing[];
34
+ /** Every stretch of time covered, in order, as [from, to] (to < from when reversing) */
35
+ passes: Array<[number, number]>;
36
+ }
37
+ export interface LoopShape {
38
+ duration: number;
39
+ /** Yoyo: every other loop plays backwards */
40
+ alternate: boolean;
41
+ /**
42
+ * The frame ended waiting out a repeat delay at a boundary. A plain repeat has
43
+ * not wrapped yet, so the last pass (the new loop) has not started.
44
+ */
45
+ holding?: boolean;
46
+ }
47
+ export declare function playheadCrossings(times: readonly number[], from: Playhead, to: Playhead, shape: LoopShape): CrossingResult;
package/llms-full.txt CHANGED
@@ -204,7 +204,7 @@ with a GSAP-style call (durations are in seconds here):
204
204
  ```html
205
205
  <div class="box" style="width:60px;height:60px;background:#4a9eff"></div>
206
206
 
207
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly.iife.js"></script>
207
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js"></script>
208
208
  <script>
209
209
  tinyfly.to('.box', { x: 200, duration: 1 })
210
210
  </script>
@@ -412,7 +412,7 @@ Without a build step, the all-in-one bundle exposes the same functions on a
412
412
  global — `tinyfly.to()`, `tinyfly.timeline()` and so on:
413
413
 
414
414
  ```html
415
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly.iife.js"></script>
415
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js"></script>
416
416
  <script>
417
417
  tinyfly.to('.box', { x: 200, duration: 1 })
418
418
  </script>
@@ -2327,7 +2327,7 @@ For simple website embedding without a build system.
2327
2327
  </html>
2328
2328
  ```
2329
2329
 
2330
- 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.106.0/cdn/tinyfly-player.iife.js`.
2330
+ 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.107.1/cdn/tinyfly-player.iife.js`.
2331
2331
 
2332
2332
  ---
2333
2333
 
@@ -6680,7 +6680,7 @@ The dialog shows the generated HTML/JavaScript code with a **Copy Code** button.
6680
6680
  **Steps to embed:**
6681
6681
  1. Build the player: `npm run build:player`
6682
6682
  2. Copy `lib/player/tinyfly-player.iife.js` to your project (or load
6683
- `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly-player.iife.js`
6683
+ `https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-player.iife.js`
6684
6684
  instead; see [Deployment](DEPLOYMENT.md))
6685
6685
  3. Copy the generated code into your HTML
6686
6686
  4. Adjust the script `src` path if needed
@@ -7927,6 +7927,10 @@ code: `build` (`child`, `tall`, `short`…), `hair` (a style name, or
7927
7927
  `face: { teeth, tongue }` (shown when the mouth opens), `feet` (`round`,
7928
7928
  `flat`, `pointed`, `big`) and `outfit: { shirt, trousers, over: 'hoodie' |
7929
7929
  'cardigan' | 'overalls' | 'sari' | 'apron' | 'labCoat', shoes: 'boots' }`.
7930
+ Built-in tops hide thighs and trouser roots under their hem during turns;
7931
+ garments spanning both legs use the resolved body order in camera views too.
7932
+ For custom clothes, `layers.parts[id].clip` clips only the bare body before
7933
+ `over` draws, and `joints.parts[id].order` gives the drawing index.
7930
7934
  `castMember('grandpa', 300)` gives a whole ready-made character to start
7931
7935
  from. The eight presets in `ANIME_CAST` (`animeBoy`, `animeGirl`,
7932
7936
  `animeYoungMan`, `animeYoungWoman`, `animeMan`, `animeWoman`,
@@ -7942,8 +7946,15 @@ and the close-up fields `pupil`, `lid` and `bulge`, so any face goes with any
7942
7946
  action or view; `drawCharacterHead(ctx, who, pose, { x, y, radius })` draws
7943
7947
  just the head big, and `face: { nose, inPupil }` adds a nose and a drawing in
7944
7948
  the pupils. Hair and hats turn with the head:
7945
- don't draw a different hairstyle per view. Hanging hair swings on its own:
7946
- after the character's tracks add `hairFollowTracks(target, tracks, who)` (or,
7949
+ don't draw a different hairstyle per view.
7950
+ `softSweep`, `flowingBob` and `cascadingWaves` provide flowing cartoon hair
7951
+ with editable cubic `locks: [{ path, width, follow? }]`. Each path is a root
7952
+ plus groups of three `{ around, up, lift? }` points (degrees around the head,
7953
+ head radii up/out); the root has up 0..1 and lift 0. `follow: 0` pins a lock.
7954
+ `length` changes the supporting mass; edit the path to change a lock's length.
7955
+ These styles work with the same acting and story tracks as other characters.
7956
+ Hanging hair and flexible locks, including short sweeps, follow motion through
7957
+ the same API: after the character's tracks add `hairFollowTracks(target, tracks, who)` (or,
7947
7958
  posing per frame, `hairFollow` once and `hairMotionAt(keys, t)` each frame)
7948
7959
  rather than keying `hair.swing` by hand. Put things in hands with `holding`
7949
7960
  (`{ right: 'mug' }`, `{ both: 'parcel' }`; the pose field `held.both` lets go),
@@ -8099,6 +8110,7 @@ or link `llms-full.txt`.
8099
8110
 
8100
8111
  `MANGA_CAST` supplies four original young adult presets through `castMember`.
8101
8112
  `face.shape: 'angular'`, `jawWidth` and `chinWidth` shape the projected pen head;
8113
+ `jawRoundness: 1` rounds cheek/chin corners (default `0` preserves sharp jaws).
8102
8114
  `eyeScale` and `eyeAspect` shape anime eyes. Hair and outfit overrides remain
8103
8115
  independent; spread the preset's face when changing one nested field.
8104
8116
  `mangaSpikes` / `mangaSweep` contain editable `hair.spikes` tufts as JSON
@@ -8147,7 +8159,7 @@ path for all of that:
8147
8159
  </figure>
8148
8160
 
8149
8161
  <!-- once, anywhere on the page (a site-wide footer is fine) -->
8150
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
8162
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-embed.iife.js" data-tinyfly-auto></script>
8151
8163
  ```
8152
8164
 
8153
8165
  Every `[data-tinyfly-embed]` mounts when the page is ready, with no per-post
@@ -9419,8 +9431,8 @@ On a page with no build step, load the maps add-on after the browser bundle; it
9419
9431
  adds to the same `tinyfly` global:
9420
9432
 
9421
9433
  ```html
9422
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly.iife.js"></script>
9423
- <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.106.0/cdn/tinyfly-maps.iife.js"></script>
9434
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly.iife.js"></script>
9435
+ <script src="https://cdn.jsdelivr.net/gh/algorisys-oss/tinyfly@v0.107.1/cdn/tinyfly-maps.iife.js"></script>
9424
9436
  ```
9425
9437
 
9426
9438
  It is a separate script because the offline world map it carries adds about
@@ -9724,6 +9736,11 @@ Medium and long hair: `pixie`, `bob`, `longBob`, `wavyBob`, `shoulderStraight`,
9724
9736
  `lowPonytail`, `highPonytail`, `ponytail`, `sidePonytail`, `topBun`, `lowBun`,
9725
9737
  `singleBraid`, `twinBraids`, `braids`.
9726
9738
 
9739
+ Flowing cartoon hair: `softSweep`, `flowingBob`, `cascadingWaves`. These use
9740
+ broad curved locks over a fitted scalp cap, with soft tapered ends and gentle
9741
+ asymmetry. The bob and long waves include a narrowing supporting mass so the
9742
+ locks overlap without gaps. Each description serves every head angle.
9743
+
9727
9744
  Every style is the same few fields (`resolveHair(spec)` fills them all in):
9728
9745
 
9729
9746
  | Field | Meaning |
@@ -9740,16 +9757,45 @@ Every style is the same few fields (`resolveHair(spec)` fills them all in):
9740
9757
  | `part`, `strands` | A parting (degrees round from the middle of the face) and the detail lines: `none`, `part`, `sweep`, `combed`, `hanging`, `thin` |
9741
9758
  | `fill` | `solid`, or `stipple` (close-cropped: dots on the scalp) |
9742
9759
  | `ties` | Ponytails, buns and braids: `{ kind: 'ponytail' \| 'bun' \| 'braid', at: 'top' \| 'high' \| 'low' \| 'left' \| 'right', length?, size? }` |
9760
+ | `locks` | Curved sections: `{ path, width, follow? }`; `width` is in head radii; `follow` scales their flex (default 1, 0 pins a lock) |
9761
+ | `fall` | Hanging mass: `{ taper, wave }`, narrowing toward the ends (0..1 head radii) and a soft uneven hem (nonnegative head radii) |
9762
+ | `shine` | Soft highlight opacity on the locks, 0..1 (default 0); drawn in the clean look |
9743
9763
  | `coversEars` | The hair hides the ears |
9744
9764
 
9745
9765
  A style stays a starting point: any style suits anyone.
9746
9766
 
9767
+ A lock's `path` has a root, two controls and a tip for a cubic curve; append
9768
+ groups of three points for additional segments. Each point is
9769
+ `{ around, up, lift? }`: `around` is degrees from the face toward the character's
9770
+ left, `up` is head radii from the centre (at most 1), and nonnegative `lift`
9771
+ adds distance outside the cap. The root must have `up` between 0 and 1 and no
9772
+ extra lift. Sweeps follow the scalp rather than cutting through the skull.
9773
+ Use continuous angles across the back, such as 160, 190, 220. Invalid lock
9774
+ paths, widths, flexibility, shine and fall values throw during `resolveHair`.
9775
+
9776
+ ```js
9777
+ const hair = resolveHair({ style: 'cascadingWaves', color: '#985b32' })
9778
+ // Edit the resolved data; presets and other characters keep their own paths.
9779
+ hair.locks[0].follow = 0.65
9780
+ character({ hair })
9781
+ // Remove the sculpted locks, keeping the cap and supporting mass:
9782
+ character({ hair: { style: 'flowingBob', locks: [], shine: 0 } })
9783
+ ```
9784
+
9785
+ `length` changes the supporting mass; edit lock path points to change their
9786
+ individual lengths and curls. Public types: `HairLock`, `HairLockPoint`.
9787
+ See the **Flowing Cartoon Hair** example and the
9788
+ [eight-view reference sheet](model-sheet/flowing-hair.png).
9789
+
9747
9790
  ## Hair in motion
9748
9791
 
9749
9792
  Hair that hangs (long hair, ponytails, braids) lags behind the head: it swings
9750
9793
  round after a turn, streams back on a run, drops on a jump and lifts on the
9751
9794
  landing. The roots stay on the head; the ends move, more the further they hang.
9752
- Short hair, buns, beards and hats stay put.
9795
+ Ordinary short hair, buns, beards and hats stay put. Flowing locks also flex,
9796
+ including the short `softSweep`: their roots remain fixed while their ends
9797
+ respond by each lock's `follow` amount. The presets use smaller amounts on
9798
+ the fringe and larger, varied amounts on the hanging locks.
9753
9799
 
9754
9800
  The lag is three pose fields, so it keys, saves and mirrors like any other:
9755
9801
 
@@ -9870,6 +9916,17 @@ The front details (collar, tie, apron, the coat's opening) show from the
9870
9916
  front and turn away with the body; from behind an apron shows its ties.
9871
9917
  `basicOutfit(options)` gives the same clothes as layers.
9872
9918
 
9919
+ Tops keep the upper thighs and trouser roots behind their hem through turns
9920
+ and moving poses. The waist makes room for wider hips. Skirts, sari drapes,
9921
+ aprons and coat skirts follow the body's resolved drawing order, including
9922
+ camera views and rendering the character part by part.
9923
+
9924
+ Custom `layers.parts[id].clip(ctx, joints, pen, time, pose)` can clip the bare
9925
+ body part before it draws. Set the canvas clipping path in this hook; it is
9926
+ restored before the part's `over` layers and the next part. The built-in outfit
9927
+ uses this to hide thighs under tops. `joints.parts[id].order` is the resolved
9928
+ far-to-near drawing index; use it when a garment spans several parts.
9929
+
9873
9930
  ## The cast
9874
9931
 
9875
9932
  `castMember(name, height, changes?)` returns character options for a recurring
@@ -9940,6 +9997,10 @@ const hero = character(castMember('mangaYoungMan', 300, {
9940
9997
  projected 3D tapered head, following yaw, nod and roll. `jawWidth` is the
9941
9998
  half-width at the jaw (clamped to 0.55–0.95 head radii, default 0.74);
9942
9999
  `chinWidth` is the half-width just above the chin (0.03–0.35, default 0.14).
10000
+ `jawRoundness` softens angular cheek and chin corners (0–1, default 0 keeps
10001
+ the sharp outline). The Flowing Cartoon Hair demo's soft angular face uses
10002
+ `jawWidth: 0.8`, `chinWidth: 0.28` and `jawRoundness: 1` for a fuller,
10003
+ rounded chin. Behind-head hair, ears and beards clip to this same outline.
9943
10004
  `shape: 'round'` is the original default. The underlying rig and contact
9944
10005
  geometry retain their original head bounds; solid mesh characters retain
9945
10006
  their existing mesh head.
@@ -14398,7 +14459,7 @@ magnet.addEventListener('pointerleave', () => {
14398
14459
 
14399
14460
  <!-- capabilities: generated from the library -->
14400
14461
 
14401
- # tinyfly capabilities (v0.106.0)
14462
+ # tinyfly capabilities (v0.107.1)
14402
14463
 
14403
14464
  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).
14404
14465
 
@@ -14682,14 +14743,15 @@ Native dances: `garba`, `garbaThreeClap`, `dandiya`; `humanDanceFrame(style, bea
14682
14743
  Appearance options of `character({ … })`, all plain data that turns with the head (see docs/character-appearance.md):
14683
14744
 
14684
14745
  - `build`: `standard`, `slim`, `tall`, `short`, `broad`, `curvy`, `stocky`, `kid`, `child`, `toddler`
14685
- - `hair`: `bald`, `buzzCut`, `crewCut`, `short`, `sidePart`, `sideSwept`, `slickBack`, `quiff`, `spiky`, `mangaSpikes`, `mangaSweep`, `undercut`, `curlyCrop`, `afro`, `wavyCrop`, `shortLocs`, `flatTop`, `receding`, `thinning`, `pixie`, `bob`, `longBob`, `wavyBob`, `shoulderStraight`, `shoulderWaves`, `longStraight`, `longWaves`, `longCurls`, `longLocs`, `lowPonytail`, `highPonytail`, `ponytail`, `sidePonytail`, `topBun`, `lowBun`, `singleBraid`, `twinBraids`, `braids` (colours: `black`, `brown`, `chestnut`, `auburn`, `blond`, `ginger`, `gray`, `white` in `HAIR_COLORS`)
14746
+ - `hair`: `softSweep`, `flowingBob`, `cascadingWaves`, `bald`, `buzzCut`, `crewCut`, `short`, `sidePart`, `sideSwept`, `slickBack`, `quiff`, `spiky`, `mangaSpikes`, `mangaSweep`, `undercut`, `curlyCrop`, `afro`, `wavyCrop`, `shortLocs`, `flatTop`, `receding`, `thinning`, `pixie`, `bob`, `longBob`, `wavyBob`, `shoulderStraight`, `shoulderWaves`, `longStraight`, `longWaves`, `longCurls`, `longLocs`, `lowPonytail`, `highPonytail`, `ponytail`, `sidePonytail`, `topBun`, `lowBun`, `singleBraid`, `twinBraids`, `braids` (colours: `black`, `brown`, `chestnut`, `auburn`, `blond`, `ginger`, `gray`, `white` in `HAIR_COLORS`)
14747
+ - Flowing hair: `softSweep`, `flowingBob`, `cascadingWaves`; editable `locks: [{ path, width, follow? }]` with cubic `{ around, up, lift? }` points (around in degrees, dimensions in head radii), `fall: { taper, wave }` and `shine` (0–1). Roots stay attached; `hairFollowTracks` also drives flexible short locks.
14686
14748
  - `facialHair`: `cleanShaven`, `stubble`, `pencilMoustache`, `shortMoustache`, `chevron`, `handlebar`, `walrus`, `goatee`, `vanDyke`, `circleBeard`, `shortBoxed`, `fullBeard`, `longBeard`, `roundedBeard`, `pointedBeard`, `chinStrap`, `soulPatch`, `sideburns`, `muttonChops`, `moustacheStubble`
14687
14749
  - `glasses`: `round`, `square`, `sunglasses`; `hat`: `cap`, `beanie`, `hardHat`, `sunHat`, `bowler`; `ears: true`; `face: { teeth, tongue }` (shown when the mouth opens); `feet`: `round`, `flat`, `pointed`, `big`
14688
14750
  - `outfit`: `{ shirt, trousers, sleeves: short | long | none, bottom: trousers | shorts | skirt, collar, tie: colour, over: apron | labCoat | hoodie | cardigan | overalls | sari, overColor, shoes: boots, shoeColor }`
14689
14751
  - `castMember(name, height)`: `boy`, `girl`, `youngMan`, `youngWoman`, `man`, `woman`, `grandpa`, `grandma`, `doctor`, `cook`, `builder`, `courier`, `teacher`, `farmer`, `animeBoy`, `animeGirl`, `animeYoungMan`, `animeYoungWoman`, `animeMan`, `animeWoman`, `animeOlderMan`, `animeOlderWoman`, `mangaYoungMan`, `mangaYoungWoman`, `mangaRival`, `mangaHeroine`
14690
14752
  - Face marks (pose fields, 0–1): `blush`, `tears`, `sweat`; close-up fields `pupil` (size, 1 usual), `lid` (upper lids lowered, 0–1), `bulge` (eyes out of the head, 0–1); `face: { nose: true, inPupil(ctx, pupil) }`; `drawCharacterHead(ctx, who, pose, { x, y, radius })` draws just the head big
14691
14753
  - Face styles: `simple`, `anime`; `face: { style: 'anime', iris: '#4b7fce', lashes: true, ageLines: 0.8 }` uses coloured eyes and the same expressions, blinks and gaze. `ANIME_CAST` contains eight age presets, also available through `castMember`.
14692
- - Face shapes: `round`, `angular`; `face: { shape: 'angular', jawWidth: 0.74, chinWidth: 0.14, eyeScale: 0.8, eyeAspect: 0.65 }` sets a tapered 3D jaw and narrower anime eyes. `MANGA_CAST` contains four original young adult presets; hair styles `mangaSpikes` and `mangaSweep` remain editable.
14754
+ - Face shapes: `round`, `angular`; `face: { shape: 'angular', jawWidth: 0.74, chinWidth: 0.14, eyeScale: 0.8, eyeAspect: 0.65 }` sets a tapered 3D jaw and narrower anime eyes; `jawRoundness: 1` softens the cheek/chin corners (default 0 keeps sharp jaws). `MANGA_CAST` contains four original young adult presets; hair styles `mangaSpikes` and `mangaSweep` remain editable.
14693
14755
  - Hair in motion (pose fields): `hair.swing` (degrees round the head, + toward its left), `hair.trail` (head radii back), `hair.lift` (head radii up); key them with `hairFollowTracks(target, tracks, who)` after the character's tracks, or `hairFollow` + `hairMotionAt` when posing per frame
14694
14756
  - `holding`: `mug` (left or right), `phone` (left or right), `book` (one hand or both), `bag` (left or right), `briefcase` (left or right), `umbrella` (left or right), `broom` (left or right), `cane` (left or right), `parcel` (both); pose fields `held.left`, `held.right`, `held.both` (below 0.5 lets go); `handGrip(joints, side)`
14695
14757
  - `meetHands(kind, a, b)` (stand them `meetingSpacing(kind, a, b)` apart): `handshake`, `highFive`, `fistBump`, `handOver`; `embrace(a, b)` (a hug, `embraceSpacing` apart); `helpUp(helper, sitter, progress)` (0 on the floor, hand taken; 1 standing; `helpUpSpacing` apart)