@algorisys/tinyfly 0.115.0 → 0.116.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 +11 -6
- package/docs/api-reference.md +2 -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 +16 -0
- package/docs/maps.md +2 -2
- package/docs/math.md +280 -0
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +2607 -2548
- package/lib/addons/math.js +2864 -0
- package/lib/browser/tinyfly-math.iife.js +53 -0
- package/lib/browser/tinyfly.iife.js +3 -3
- package/lib/browser/tinyfly.js +705 -638
- package/lib/browser/tinyfly.umd.js +3 -3
- package/lib/embed/tinyfly-embed.iife.js +1 -1
- package/lib/embed/tinyfly-embed.js +8 -0
- package/lib/player/tinyfly-player.es.js +8 -0
- package/lib/player/tinyfly-player.iife.js +1 -1
- package/lib/player/tinyfly-player.umd.js +1 -1
- package/lib/types/characters/capabilities.d.ts +8 -0
- package/lib/types/math/browser-entry.d.ts +3 -0
- package/lib/types/math/embed/auto-mount-math.d.ts +7 -0
- package/lib/types/math/embed/explorable.d.ts +46 -0
- package/lib/types/math/embed/mount-math.d.ts +31 -0
- package/lib/types/math/expr/differentiate.d.ts +7 -0
- package/lib/types/math/expr/evaluate.d.ts +21 -0
- package/lib/types/math/expr/parse-expression.d.ts +50 -0
- package/lib/types/math/figure/derived.d.ts +17 -0
- package/lib/types/math/figure/display-list.d.ts +87 -0
- package/lib/types/math/figure/figure-spec.d.ts +239 -0
- package/lib/types/math/figure/item-context.d.ts +33 -0
- package/lib/types/math/figure/items/calculus.d.ts +7 -0
- package/lib/types/math/figure/items/curves.d.ts +7 -0
- package/lib/types/math/figure/items/grid.d.ts +5 -0
- package/lib/types/math/figure/items/regions.d.ts +5 -0
- package/lib/types/math/figure/items/text.d.ts +5 -0
- package/lib/types/math/figure/items/vectors.d.ts +9 -0
- package/lib/types/math/figure/layout-figure.d.ts +13 -0
- package/lib/types/math/figure/plane.d.ts +20 -0
- package/lib/types/math/figure/validate-spec.d.ts +2 -0
- package/lib/types/math/index.d.ts +43 -0
- package/lib/types/math/linear/mat2.d.ts +41 -0
- package/lib/types/math/linear/vec2.d.ts +18 -0
- package/lib/types/math/presets/calculus.d.ts +59 -0
- package/lib/types/math/presets/linear-algebra.d.ts +42 -0
- package/lib/types/math/render/arrow.d.ts +10 -0
- package/lib/types/math/render/display-list-to-svg.d.ts +10 -0
- package/lib/types/math/render/draw-display-list.d.ts +6 -0
- package/lib/types/math/steps/math-steps.d.ts +34 -0
- package/lib/types/math/targets/math-target.d.ts +43 -0
- package/lib/types/math/tex/equation-morph.d.ts +21 -0
- package/lib/types/math/tex/glyph-metrics.d.ts +24 -0
- package/lib/types/math/tex/tex-layout.d.ts +59 -0
- package/lib/types/math/tex/tex-parser.d.ts +88 -0
- package/lib/types/player/player.d.ts +6 -0
- package/llms-full.txt +358 -10
- package/llms.txt +32 -31
- package/package.json +6 -2
- package/skills/tinyfly/SKILL.md +10 -0
package/lib/browser/tinyfly.js
CHANGED
|
@@ -450,8 +450,8 @@ function up(t, e, n, s, o, r, i, a, l) {
|
|
|
450
450
|
return [d * D - f * Y, f * D + d * Y];
|
|
451
451
|
}, G = [];
|
|
452
452
|
for (let R = 0; R < C; R++) {
|
|
453
|
-
const D = P + R * W, Y = D + W, [_, j] = V(D), [nt, $] = R === C - 1 ? [a, l] : V(Y), [I, B] = tt(D), [K,
|
|
454
|
-
G.push([_ + q * I, j + q * B, nt - q * K, $ - q *
|
|
453
|
+
const D = P + R * W, Y = D + W, [_, j] = V(D), [nt, $] = R === C - 1 ? [a, l] : V(Y), [I, B] = tt(D), [K, L] = tt(Y);
|
|
454
|
+
G.push([_ + q * I, j + q * B, nt - q * K, $ - q * L, nt, $]);
|
|
455
455
|
}
|
|
456
456
|
return G;
|
|
457
457
|
}
|
|
@@ -883,9 +883,9 @@ const Hp = (t, e, n) => {
|
|
|
883
883
|
for (let r = 0; r < s; r++)
|
|
884
884
|
o.push(Ie(t[r], e[r], n));
|
|
885
885
|
return o;
|
|
886
|
-
},
|
|
886
|
+
}, Fp = (t, e, n) => Au(t, e, n), Sc = (t, e, n) => n < 1 ? t : e, Lp = (t, e, n) => Ep(t, e, n);
|
|
887
887
|
function nr(t, e) {
|
|
888
|
-
return e === "slerp" ?
|
|
888
|
+
return e === "slerp" ? Fp : typeof t == "number" ? Ie : Array.isArray(t) ? Rp : typeof t == "string" ? t.startsWith("#") || t.startsWith("rgb") ? Hp : io(t) ? Lp : Sc : Sc;
|
|
889
889
|
}
|
|
890
890
|
const Pu = 1e3 / 60;
|
|
891
891
|
function Ou(t, e = {}) {
|
|
@@ -1154,7 +1154,7 @@ function Yp(t, e, n = 0) {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
return y;
|
|
1156
1156
|
}
|
|
1157
|
-
class
|
|
1157
|
+
class Ft {
|
|
1158
1158
|
id;
|
|
1159
1159
|
name;
|
|
1160
1160
|
_captions;
|
|
@@ -1600,7 +1600,7 @@ function Xp(t) {
|
|
|
1600
1600
|
target: t.target,
|
|
1601
1601
|
property: t.property,
|
|
1602
1602
|
kind: "inertia",
|
|
1603
|
-
inertia:
|
|
1603
|
+
inertia: Fu(t.inertia),
|
|
1604
1604
|
...ve(t)
|
|
1605
1605
|
} : kn(t) ? {
|
|
1606
1606
|
id: t.id,
|
|
@@ -1632,7 +1632,7 @@ function Xp(t) {
|
|
|
1632
1632
|
...ve(t)
|
|
1633
1633
|
};
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Fu(t) {
|
|
1636
1636
|
return { ...t, ...Array.isArray(t.end) && { end: [...t.end] } };
|
|
1637
1637
|
}
|
|
1638
1638
|
function hi(t) {
|
|
@@ -1659,7 +1659,7 @@ function Up(t) {
|
|
|
1659
1659
|
target: e.target,
|
|
1660
1660
|
property: e.property,
|
|
1661
1661
|
kind: "inertia",
|
|
1662
|
-
inertia:
|
|
1662
|
+
inertia: Fu(e.inertia),
|
|
1663
1663
|
...ve(e)
|
|
1664
1664
|
};
|
|
1665
1665
|
}
|
|
@@ -1730,7 +1730,7 @@ function zs(t) {
|
|
|
1730
1730
|
throw new Error(
|
|
1731
1731
|
`tinyfly: this animation uses format version ${e}, but this tinyfly reads up to version ${cc}. Update tinyfly to play it.`
|
|
1732
1732
|
);
|
|
1733
|
-
return new
|
|
1733
|
+
return new Ft({
|
|
1734
1734
|
id: t.id,
|
|
1735
1735
|
name: t.name,
|
|
1736
1736
|
config: t.config,
|
|
@@ -1760,11 +1760,11 @@ function Mn(t) {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
};
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function Lu(t, e, n) {
|
|
1764
1764
|
return e + t.next() * (n - e);
|
|
1765
1765
|
}
|
|
1766
1766
|
function Vp(t, e, n, s) {
|
|
1767
|
-
if (s <= 0) return
|
|
1767
|
+
if (s <= 0) return Lu(t, e, n);
|
|
1768
1768
|
const o = Math.floor((n - e) / s), r = Math.round(t.next() * o);
|
|
1769
1769
|
return e + r * s;
|
|
1770
1770
|
}
|
|
@@ -1799,7 +1799,7 @@ function Du(t, e = {}) {
|
|
|
1799
1799
|
`resolveValue: "${n}" needs a random source — pass one via context.random`
|
|
1800
1800
|
);
|
|
1801
1801
|
const r = Number.parseFloat(o[1]), i = Number.parseFloat(o[2]), a = o[3] !== void 0 ? Number.parseFloat(o[3]) : void 0;
|
|
1802
|
-
return a !== void 0 ? Vp(e.random, r, i, a) :
|
|
1802
|
+
return a !== void 0 ? Vp(e.random, r, i, a) : Lu(e.random, r, i);
|
|
1803
1803
|
}
|
|
1804
1804
|
return t;
|
|
1805
1805
|
}
|
|
@@ -2051,7 +2051,7 @@ function vS(t, e) {
|
|
|
2051
2051
|
rotate: u.frame.rotate ?? 0
|
|
2052
2052
|
}, a(u.at + d, l, u.easing ?? (d > Ec ? "ease-in-out" : void 0));
|
|
2053
2053
|
} else {
|
|
2054
|
-
const { follow: d } = u, f = d.lag ?? lm, p = new
|
|
2054
|
+
const { follow: d } = u, f = d.lag ?? lm, p = new Ft({ id: "follow", tracks: [{ id: "x", target: "s", property: "x", keyframes: d.x }] }), g = (k) => p.getStateAtTime(k).values.get("s")?.get("x") ?? l.focusX, m = [u.at, ...d.x.map((k) => k.time).filter((k) => k > u.at && k < u.until), u.until];
|
|
2055
2055
|
a(u.at, l);
|
|
2056
2056
|
const y = (k) => ({
|
|
2057
2057
|
focusX: g(k) + (d.lead ?? 0),
|
|
@@ -2335,16 +2335,16 @@ function ym(t) {
|
|
|
2335
2335
|
}
|
|
2336
2336
|
return null;
|
|
2337
2337
|
}
|
|
2338
|
-
const
|
|
2339
|
-
function
|
|
2338
|
+
const FS = { scale: 1, turn: 0, x: 0, y: 0 };
|
|
2339
|
+
function LS(t = {}) {
|
|
2340
2340
|
return { scale: t.scale ?? 1, turn: t.turn ?? 0, x: t.x ?? 0, y: t.y ?? 0 };
|
|
2341
2341
|
}
|
|
2342
2342
|
function bm(t, e, n) {
|
|
2343
|
-
const { ax: s, ay: o } =
|
|
2343
|
+
const { ax: s, ay: o } = Fr(t, e);
|
|
2344
2344
|
return { scale: t, turn: e, x: n.x - (s * n.x - o * n.y), y: n.y - (o * n.x + s * n.y) };
|
|
2345
2345
|
}
|
|
2346
2346
|
function Yu(t, e) {
|
|
2347
|
-
const { ax: n, ay: s } =
|
|
2347
|
+
const { ax: n, ay: s } = Fr(t.scale, t.turn);
|
|
2348
2348
|
return { x: n * e.x - s * e.y + t.x, y: s * e.x + n * e.y + t.y };
|
|
2349
2349
|
}
|
|
2350
2350
|
function WS(t, e) {
|
|
@@ -2357,7 +2357,7 @@ function NS(t) {
|
|
|
2357
2357
|
return { ...e, x: -n.x, y: -n.y };
|
|
2358
2358
|
}
|
|
2359
2359
|
function wm(t) {
|
|
2360
|
-
const { ax: e, ay: n } =
|
|
2360
|
+
const { ax: e, ay: n } = Fr(t.scale, t.turn), s = 1 - e, o = -n, r = s * s + o * o;
|
|
2361
2361
|
return r < 1e-18 ? null : { x: (t.x * s + t.y * o) / r, y: (t.y * s - t.x * o) / r };
|
|
2362
2362
|
}
|
|
2363
2363
|
function DS(t, e) {
|
|
@@ -2366,10 +2366,10 @@ function DS(t, e) {
|
|
|
2366
2366
|
return o ? bm(n, s, o) : { scale: n, turn: s, x: t.x * e, y: t.y * e };
|
|
2367
2367
|
}
|
|
2368
2368
|
function BS(t) {
|
|
2369
|
-
const { ax: e, ay: n } =
|
|
2369
|
+
const { ax: e, ay: n } = Fr(t.scale, t.turn);
|
|
2370
2370
|
return [e, n, -n, e, t.x, t.y];
|
|
2371
2371
|
}
|
|
2372
|
-
const
|
|
2372
|
+
const Fr = (t, e) => {
|
|
2373
2373
|
const n = e * Math.PI / 180;
|
|
2374
2374
|
return { ax: t * Math.cos(n), ay: t * Math.sin(n) };
|
|
2375
2375
|
};
|
|
@@ -2576,14 +2576,14 @@ function Ce(t, e) {
|
|
|
2576
2576
|
function qs(t, e) {
|
|
2577
2577
|
return [t[1] * e[2] - t[2] * e[1], t[2] * e[0] - t[0] * e[2], t[0] * e[1] - t[1] * e[0]];
|
|
2578
2578
|
}
|
|
2579
|
-
function
|
|
2579
|
+
function Lr(t) {
|
|
2580
2580
|
return Math.hypot(t[0], t[1], t[2]);
|
|
2581
2581
|
}
|
|
2582
2582
|
function ao(t, e) {
|
|
2583
|
-
return
|
|
2583
|
+
return Lr(oe(t, e));
|
|
2584
2584
|
}
|
|
2585
2585
|
function Zt(t) {
|
|
2586
|
-
const e =
|
|
2586
|
+
const e = Lr(t);
|
|
2587
2587
|
return e === 0 ? [0, 0, 0] : fn(t, 1 / e);
|
|
2588
2588
|
}
|
|
2589
2589
|
function sn(t, e, n) {
|
|
@@ -2595,7 +2595,7 @@ const VS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2595
2595
|
cross: qs,
|
|
2596
2596
|
distance: ao,
|
|
2597
2597
|
dot: Ce,
|
|
2598
|
-
length:
|
|
2598
|
+
length: Lr,
|
|
2599
2599
|
lerp: sn,
|
|
2600
2600
|
normalize: Zt,
|
|
2601
2601
|
scale: fn,
|
|
@@ -3026,7 +3026,7 @@ const Rm = {
|
|
|
3026
3026
|
function Zu(t) {
|
|
3027
3027
|
return Rm[t];
|
|
3028
3028
|
}
|
|
3029
|
-
function
|
|
3029
|
+
function Fm(t) {
|
|
3030
3030
|
const e = typeof t == "string" || Array.isArray(t) ? { path: t } : t;
|
|
3031
3031
|
if (!e || typeof e.path != "string" && !Array.isArray(e.path))
|
|
3032
3032
|
throw new Error("gsap-compat: motionPath needs a path — SVG path data or an array of { x, y } points.");
|
|
@@ -3042,7 +3042,7 @@ function Lm(t) {
|
|
|
3042
3042
|
const s = { pathData: n };
|
|
3043
3043
|
return e.autoRotate !== void 0 && e.autoRotate !== !1 && (s.autoRotate = !0, typeof e.autoRotate == "number" && (s.rotateOffset = e.autoRotate)), e.matrix && (s.matrix = e.matrix), { config: s, start: e.start ?? 0, end: e.end ?? 1 };
|
|
3044
3044
|
}
|
|
3045
|
-
function
|
|
3045
|
+
function Lm(t) {
|
|
3046
3046
|
const e = typeof t == "string" || Array.isArray(t) ? { path: t } : { ...t };
|
|
3047
3047
|
return { ...e, start: e.end ?? 1, end: e.start ?? 0 };
|
|
3048
3048
|
}
|
|
@@ -3172,7 +3172,7 @@ class Xn {
|
|
|
3172
3172
|
/** Last authored value per "target|property", for the resolution chain. */
|
|
3173
3173
|
lastValues = /* @__PURE__ */ new Map();
|
|
3174
3174
|
constructor(e = {}) {
|
|
3175
|
-
this.options = e, this.timeline = new
|
|
3175
|
+
this.options = e, this.timeline = new Ft({
|
|
3176
3176
|
// A timestamped default would make the same script compile to different
|
|
3177
3177
|
// JSON on every run, which breaks the determinism contract. Callers that
|
|
3178
3178
|
// need distinct ids pass one.
|
|
@@ -3196,7 +3196,7 @@ class Xn {
|
|
|
3196
3196
|
const { config: o, properties: r } = qo(ws(n)), { motionPath: i, text: a, scrambleText: l, ...c } = r, h = this.targetsOf(e)[0], u = { ...o };
|
|
3197
3197
|
for (const p of Object.keys(c))
|
|
3198
3198
|
u[p] = this.resolveStart(h, p);
|
|
3199
|
-
i !== void 0 && (u.motionPath =
|
|
3199
|
+
i !== void 0 && (u.motionPath = Lm(i));
|
|
3200
3200
|
const d = {}, f = String(this.resolveStart(h, "text"));
|
|
3201
3201
|
return a !== void 0 && (d.text = ui(a), u.text = typeof a == "object" ? { ...a, value: f } : f), l !== void 0 && (d.text = ui(l), u.scrambleText = typeof l == "object" ? { ...l, text: f } : f), this.build(e, { ...c, ...d }, u, s);
|
|
3202
3202
|
}
|
|
@@ -3387,7 +3387,7 @@ class Xn {
|
|
|
3387
3387
|
for (const W of d) this.lastValues.set(`${W}|text`, E.to);
|
|
3388
3388
|
}
|
|
3389
3389
|
if (a !== void 0) {
|
|
3390
|
-
const { config: A, start: P, end: O } =
|
|
3390
|
+
const { config: A, start: P, end: O } = Fm(a), C = this.nextTrackId(`${d[0]}-motionPath`), W = {
|
|
3391
3391
|
id: C,
|
|
3392
3392
|
target: d[0],
|
|
3393
3393
|
...d.length > 1 && { targets: d },
|
|
@@ -3527,7 +3527,7 @@ function Qm(t) {
|
|
|
3527
3527
|
}
|
|
3528
3528
|
return e.length > 0 ? e.join(" ") : null;
|
|
3529
3529
|
}
|
|
3530
|
-
function
|
|
3530
|
+
function ty(t, e) {
|
|
3531
3531
|
const n = t.childNodes.length === 1 ? t.firstChild : null;
|
|
3532
3532
|
if (n && n.nodeType === 3) {
|
|
3533
3533
|
const s = n;
|
|
@@ -3536,7 +3536,7 @@ function t1(t, e) {
|
|
|
3536
3536
|
}
|
|
3537
3537
|
t.textContent !== e && (t.textContent = e);
|
|
3538
3538
|
}
|
|
3539
|
-
function
|
|
3539
|
+
function ey(t) {
|
|
3540
3540
|
if (!("ownerSVGElement" in t)) return;
|
|
3541
3541
|
const e = t.style;
|
|
3542
3542
|
!e || e.transformBox || (e.transformBox = "fill-box", e.transformOrigin || (e.transformOrigin = "50% 50%"));
|
|
@@ -3567,7 +3567,7 @@ const Ic = /* @__PURE__ */ new Set([
|
|
|
3567
3567
|
"gap",
|
|
3568
3568
|
"rowGap",
|
|
3569
3569
|
"columnGap"
|
|
3570
|
-
]),
|
|
3570
|
+
]), ny = /* @__PURE__ */ new Set([
|
|
3571
3571
|
"x",
|
|
3572
3572
|
"y",
|
|
3573
3573
|
"z",
|
|
@@ -3587,7 +3587,7 @@ const Ic = /* @__PURE__ */ new Set([
|
|
|
3587
3587
|
"motionPathX",
|
|
3588
3588
|
"motionPathY",
|
|
3589
3589
|
"motionPathRotate"
|
|
3590
|
-
]),
|
|
3590
|
+
]), sy = [
|
|
3591
3591
|
"x",
|
|
3592
3592
|
"motionPathX",
|
|
3593
3593
|
"y",
|
|
@@ -3605,7 +3605,7 @@ const Ic = /* @__PURE__ */ new Set([
|
|
|
3605
3605
|
"scaleZ",
|
|
3606
3606
|
"skewX",
|
|
3607
3607
|
"skewY"
|
|
3608
|
-
],
|
|
3608
|
+
], oy = /* @__PURE__ */ new Set(["childPerspective", "perspectiveOriginX", "perspectiveOriginY"]), ry = /* @__PURE__ */ new Set(["originX", "originY"]), iy = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]), ay = /* @__PURE__ */ new Set(["drawOn"]), ly = {
|
|
3609
3609
|
fill: "backgroundColor",
|
|
3610
3610
|
stroke: "borderColor",
|
|
3611
3611
|
strokeWidth: "borderWidth",
|
|
@@ -3620,7 +3620,7 @@ const Ic = /* @__PURE__ */ new Set([
|
|
|
3620
3620
|
strokeDashoffset: "strokeDashoffset",
|
|
3621
3621
|
fillOpacity: "fillOpacity",
|
|
3622
3622
|
strokeOpacity: "strokeOpacity"
|
|
3623
|
-
},
|
|
3623
|
+
}, cy = "http://www.w3.org/2000/svg";
|
|
3624
3624
|
class pn {
|
|
3625
3625
|
targets = /* @__PURE__ */ new Map();
|
|
3626
3626
|
/**
|
|
@@ -3663,20 +3663,20 @@ class pn {
|
|
|
3663
3663
|
let s = null, o = null, r = null, i = null, a = null;
|
|
3664
3664
|
const l = n.has("motionPathX"), c = n.has("motionPathY"), h = n.has("motionPathRotate");
|
|
3665
3665
|
for (const [p, g] of n)
|
|
3666
|
-
if (!(p === "x" && l) && !(p === "y" && c) && !((p === "rotate" || p === "rotateZ") && h) && !
|
|
3667
|
-
if (
|
|
3666
|
+
if (!(p === "x" && l) && !(p === "y" && c) && !((p === "rotate" || p === "rotateZ") && h) && !ay.has(p)) {
|
|
3667
|
+
if (ny.has(p))
|
|
3668
3668
|
(s ??= {})[p] = g;
|
|
3669
|
-
else if (
|
|
3669
|
+
else if (oy.has(p))
|
|
3670
3670
|
typeof g == "number" && ((o ??= {})[p] = g);
|
|
3671
|
-
else if (
|
|
3671
|
+
else if (ry.has(p))
|
|
3672
3672
|
typeof g == "number" && ((r ??= {})[p] = g);
|
|
3673
|
-
else if (
|
|
3673
|
+
else if (iy.has(p))
|
|
3674
3674
|
typeof g == "number" && ((i ??= {})[p] = g);
|
|
3675
3675
|
else if (Vm.has(p))
|
|
3676
3676
|
(a ??= {})[p] = g;
|
|
3677
3677
|
else if (p !== "perspective") {
|
|
3678
3678
|
if (p !== "shine") if (p === "text" && typeof g == "string")
|
|
3679
|
-
|
|
3679
|
+
ty(e, g);
|
|
3680
3680
|
else if (p === "d" && typeof g == "string") {
|
|
3681
3681
|
const m = e;
|
|
3682
3682
|
(m.tagName?.toLowerCase() === "path" ? m : m.querySelector?.("path"))?.setAttribute?.("d", g);
|
|
@@ -3688,13 +3688,13 @@ class pn {
|
|
|
3688
3688
|
typeof u == "number" && this.applyShine(e, u);
|
|
3689
3689
|
const d = [], f = n.get("perspective");
|
|
3690
3690
|
if (typeof f == "number" && f > 0 && d.push(`perspective(${f}px)`), s)
|
|
3691
|
-
for (const p of
|
|
3691
|
+
for (const p of sy) {
|
|
3692
3692
|
const g = s[p];
|
|
3693
3693
|
if (g === void 0) continue;
|
|
3694
3694
|
const m = this.buildTransformPart(p, g);
|
|
3695
3695
|
m && d.push(m);
|
|
3696
3696
|
}
|
|
3697
|
-
if (d.length > 0 && (e.style.transform = d.join(" "),
|
|
3697
|
+
if (d.length > 0 && (e.style.transform = d.join(" "), ey(e)), o && (o.childPerspective !== void 0 && (e.style.perspective = `${o.childPerspective}px`), (o.perspectiveOriginX !== void 0 || o.perspectiveOriginY !== void 0) && (e.style.perspectiveOrigin = `${o.perspectiveOriginX ?? 50}% ${o.perspectiveOriginY ?? 50}%`)), r) {
|
|
3698
3698
|
const p = r.originX ?? 50, g = r.originY ?? 50;
|
|
3699
3699
|
e.style.transformOrigin = `${p}% ${g}%`;
|
|
3700
3700
|
}
|
|
@@ -3764,20 +3764,20 @@ class pn {
|
|
|
3764
3764
|
*/
|
|
3765
3765
|
applyStyleProperty(e, n, s) {
|
|
3766
3766
|
let o;
|
|
3767
|
-
if (e.namespaceURI ===
|
|
3767
|
+
if (e.namespaceURI === cy && n in _c) {
|
|
3768
3768
|
const a = Array.isArray(s) ? s.join(", ") : String(s);
|
|
3769
3769
|
e.style[_c[n]] = a;
|
|
3770
3770
|
return;
|
|
3771
|
-
} else n === "fill" && e.dataset?.elementType === "text" ? o = "color" : o =
|
|
3771
|
+
} else n === "fill" && e.dataset?.elementType === "text" ? o = "color" : o = ly[n] ?? n;
|
|
3772
3772
|
let i;
|
|
3773
3773
|
typeof s == "number" ? Ic.has(n) || Ic.has(o) ? i = `${s}px` : i = String(s) : Array.isArray(s) ? i = s.join(", ") : i = s, e.style[o] = i;
|
|
3774
3774
|
}
|
|
3775
3775
|
}
|
|
3776
|
-
const
|
|
3776
|
+
const hy = {
|
|
3777
3777
|
request: (t) => requestAnimationFrame(t),
|
|
3778
3778
|
cancel: (t) => cancelAnimationFrame(t)
|
|
3779
3779
|
};
|
|
3780
|
-
class
|
|
3780
|
+
class uy {
|
|
3781
3781
|
adapter = new pn();
|
|
3782
3782
|
scheduler;
|
|
3783
3783
|
rootOption;
|
|
@@ -3813,7 +3813,7 @@ class u1 {
|
|
|
3813
3813
|
lastTimestamp = null;
|
|
3814
3814
|
destroyed = !1;
|
|
3815
3815
|
constructor(e = {}) {
|
|
3816
|
-
this.scheduler = e.scheduler ??
|
|
3816
|
+
this.scheduler = e.scheduler ?? hy, this.rootOption = e.root, this.onWarning = e.onWarning;
|
|
3817
3817
|
}
|
|
3818
3818
|
// --- targets ------------------------------------------------------------
|
|
3819
3819
|
/**
|
|
@@ -4010,7 +4010,7 @@ class u1 {
|
|
|
4010
4010
|
if (typeof e == "string")
|
|
4011
4011
|
return Array.from(this.selectorRoot.querySelectorAll(e));
|
|
4012
4012
|
if (di(e)) return [e];
|
|
4013
|
-
if (!
|
|
4013
|
+
if (!dy(e)) return [e];
|
|
4014
4014
|
const n = [];
|
|
4015
4015
|
for (const s of Array.from(e))
|
|
4016
4016
|
n.push(...this.targetsOf(s));
|
|
@@ -4042,7 +4042,7 @@ class u1 {
|
|
|
4042
4042
|
function di(t) {
|
|
4043
4043
|
return typeof t == "object" && t !== null && t.nodeType === 1;
|
|
4044
4044
|
}
|
|
4045
|
-
function
|
|
4045
|
+
function dy(t) {
|
|
4046
4046
|
if (Array.isArray(t)) return !0;
|
|
4047
4047
|
const e = t;
|
|
4048
4048
|
return typeof e.length == "number" && typeof e.item == "function";
|
|
@@ -4056,18 +4056,18 @@ function ir(t) {
|
|
|
4056
4056
|
return e.transform = n, s;
|
|
4057
4057
|
}
|
|
4058
4058
|
const Cc = (t) => typeof t == "object" && t !== null && t.nodeType === 1;
|
|
4059
|
-
function
|
|
4059
|
+
function fy(t) {
|
|
4060
4060
|
const e = {};
|
|
4061
4061
|
for (const n of Array.from(t.attributes)) e[n.name] = n.value;
|
|
4062
4062
|
return e;
|
|
4063
4063
|
}
|
|
4064
|
-
function
|
|
4064
|
+
function gy(t) {
|
|
4065
4065
|
const e = t.getScreenCTM?.();
|
|
4066
4066
|
if (e) return [e.a, e.b, e.c, e.d, e.e, e.f];
|
|
4067
4067
|
const n = t.getBoundingClientRect();
|
|
4068
4068
|
return [1, 0, 0, 1, n.left, n.top];
|
|
4069
4069
|
}
|
|
4070
|
-
function
|
|
4070
|
+
function py(t, e) {
|
|
4071
4071
|
const n = typeof t == "string" || Array.isArray(t) || Cc(t) ? { path: t } : t, { align: s, alignOrigin: o, path: r, ...i } = n, a = (E) => {
|
|
4072
4072
|
const v = Cc(E) ? E : e.query(E);
|
|
4073
4073
|
return v || e.warn(`gsap-compat: motionPath could not find "${String(E)}"`), v;
|
|
@@ -4077,7 +4077,7 @@ function p1(t, e) {
|
|
|
4077
4077
|
c = r;
|
|
4078
4078
|
else {
|
|
4079
4079
|
l = a(r);
|
|
4080
|
-
const E = l && fl({ tag: l.localName, attributes:
|
|
4080
|
+
const E = l && fl({ tag: l.localName, attributes: fy(l) });
|
|
4081
4081
|
l && !E && e.warn(`gsap-compat: motionPath element <${l.localName}> has no path geometry`), c = E ?? "";
|
|
4082
4082
|
}
|
|
4083
4083
|
const h = { ...i, path: c };
|
|
@@ -4087,7 +4087,7 @@ function p1(t, e) {
|
|
|
4087
4087
|
return s === !0 && e.warn("gsap-compat: motionPath align: true needs the path to be an element"), h;
|
|
4088
4088
|
const d = e.targets[0];
|
|
4089
4089
|
if (!d) return h;
|
|
4090
|
-
const [f, p, g, m, y, k] =
|
|
4090
|
+
const [f, p, g, m, y, k] = gy(u), w = ir(d), [b, S] = o ?? [0.5, 0.5];
|
|
4091
4091
|
for (const E of e.targets.slice(1)) {
|
|
4092
4092
|
const v = ir(E);
|
|
4093
4093
|
if (Math.abs(v.left - w.left) > 0.5 || Math.abs(v.top - w.top) > 0.5) {
|
|
@@ -4108,26 +4108,26 @@ function nd(t) {
|
|
|
4108
4108
|
const e = fl({ tag: t.localName, attributes: ed(t) });
|
|
4109
4109
|
return e || (t.querySelector("path")?.getAttribute("d") ?? null);
|
|
4110
4110
|
}
|
|
4111
|
-
function
|
|
4111
|
+
function my(t, e, n) {
|
|
4112
4112
|
const s = Qu(t);
|
|
4113
4113
|
if (typeof s == "string" && io(s)) return s;
|
|
4114
4114
|
const o = td(s) ? s : typeof s == "string" ? e(s) : null, r = nd(o);
|
|
4115
4115
|
return r || (n(`gsap-compat: morphSVG could not find a shape for "${String(s)}"`), "");
|
|
4116
4116
|
}
|
|
4117
|
-
const
|
|
4118
|
-
function
|
|
4117
|
+
const yy = /* @__PURE__ */ new Set(["cx", "cy", "r", "rx", "ry", "x", "y", "width", "height", "x1", "y1", "x2", "y2", "points"]);
|
|
4118
|
+
function by(t, e = document) {
|
|
4119
4119
|
return (typeof t == "string" ? Array.from(e.querySelectorAll(t)) : td(t) ? [t] : Array.from(t)).map((s) => {
|
|
4120
4120
|
if (s.localName === "path") return s;
|
|
4121
4121
|
const o = fl({ tag: s.localName, attributes: ed(s) });
|
|
4122
4122
|
if (!o || !s.parentNode) return s;
|
|
4123
4123
|
const r = s.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4124
4124
|
for (const i of Array.from(s.attributes))
|
|
4125
|
-
|
|
4125
|
+
yy.has(i.name) || r.setAttribute(i.name, i.value);
|
|
4126
4126
|
return r.setAttribute("d", o), s.parentNode.replaceChild(r, s), r;
|
|
4127
4127
|
});
|
|
4128
4128
|
}
|
|
4129
4129
|
const Hc = 0.3;
|
|
4130
|
-
class
|
|
4130
|
+
class wy {
|
|
4131
4131
|
options;
|
|
4132
4132
|
target;
|
|
4133
4133
|
running = !1;
|
|
@@ -4236,7 +4236,7 @@ class w1 {
|
|
|
4236
4236
|
function Rc() {
|
|
4237
4237
|
return typeof performance < "u" ? performance.now() : Date.now();
|
|
4238
4238
|
}
|
|
4239
|
-
function
|
|
4239
|
+
function ky(t, e, n) {
|
|
4240
4240
|
let s = { delta: 0, line: null }, o = n;
|
|
4241
4241
|
for (const r of t)
|
|
4242
4242
|
for (const i of e) {
|
|
@@ -4245,7 +4245,7 @@ function k1(t, e, n) {
|
|
|
4245
4245
|
}
|
|
4246
4246
|
return s;
|
|
4247
4247
|
}
|
|
4248
|
-
function
|
|
4248
|
+
function vy(t, e) {
|
|
4249
4249
|
return e <= 0 ? [] : t.map((n) => Math.round(n / e) * e);
|
|
4250
4250
|
}
|
|
4251
4251
|
class sd {
|
|
@@ -4260,7 +4260,7 @@ class sd {
|
|
|
4260
4260
|
snappedX = null;
|
|
4261
4261
|
snappedY = null;
|
|
4262
4262
|
constructor(e) {
|
|
4263
|
-
this.options = e, this.x = e.initialX ?? 0, this.y = e.initialY ?? 0, this.observer = new
|
|
4263
|
+
this.options = e, this.x = e.initialX ?? 0, this.y = e.initialY ?? 0, this.observer = new wy({
|
|
4264
4264
|
target: e.target,
|
|
4265
4265
|
onPress: (n) => {
|
|
4266
4266
|
const s = e.getPosition?.();
|
|
@@ -4313,7 +4313,7 @@ class sd {
|
|
|
4313
4313
|
if (n <= 0) return;
|
|
4314
4314
|
const s = this.options.scrubDistance ?? 500;
|
|
4315
4315
|
if (s === 0) return;
|
|
4316
|
-
const o = (this.options.axis ?? "both") === "y" ? this.y : this.x, r =
|
|
4316
|
+
const o = (this.options.axis ?? "both") === "y" ? this.y : this.x, r = My(o / s);
|
|
4317
4317
|
e.pause(), e.seek(r * n);
|
|
4318
4318
|
}
|
|
4319
4319
|
/**
|
|
@@ -4326,9 +4326,9 @@ class sd {
|
|
|
4326
4326
|
applyConstraints(e, n) {
|
|
4327
4327
|
let s = e;
|
|
4328
4328
|
const o = [
|
|
4329
|
-
...
|
|
4329
|
+
...vy([s], this.options.snap ?? 0),
|
|
4330
4330
|
...(n === "x" ? this.options.snapLinesX : this.options.snapLinesY) ?? []
|
|
4331
|
-
], r =
|
|
4331
|
+
], r = ky([s], o, this.snapThreshold());
|
|
4332
4332
|
s += r.delta, n === "x" ? this.snappedX = r.line : this.snappedY = r.line;
|
|
4333
4333
|
const i = this.options.bounds;
|
|
4334
4334
|
if (i) {
|
|
@@ -4338,15 +4338,15 @@ class sd {
|
|
|
4338
4338
|
return s;
|
|
4339
4339
|
}
|
|
4340
4340
|
}
|
|
4341
|
-
function
|
|
4341
|
+
function My(t) {
|
|
4342
4342
|
return t < 0 ? 0 : t > 1 ? 1 : t;
|
|
4343
4343
|
}
|
|
4344
4344
|
function ZS(t) {
|
|
4345
4345
|
const e = new sd(t);
|
|
4346
4346
|
return e.start(), e;
|
|
4347
4347
|
}
|
|
4348
|
-
const
|
|
4349
|
-
function
|
|
4348
|
+
const xy = { x: "x", y: "y", "x,y": "both" }, va = (t) => typeof t == "object" && t !== null && t.nodeType === 1;
|
|
4349
|
+
function Fc(t, e) {
|
|
4350
4350
|
const n = ir(t), s = e.getBoundingClientRect();
|
|
4351
4351
|
return {
|
|
4352
4352
|
minX: s.left - n.left,
|
|
@@ -4355,18 +4355,18 @@ function Lc(t, e) {
|
|
|
4355
4355
|
maxY: s.bottom - n.bottom
|
|
4356
4356
|
};
|
|
4357
4357
|
}
|
|
4358
|
-
function
|
|
4358
|
+
function Lc(t) {
|
|
4359
4359
|
return Array.isArray(t) ? [...t] : t;
|
|
4360
4360
|
}
|
|
4361
|
-
function
|
|
4361
|
+
function Sy(t, e, n, s = {}) {
|
|
4362
4362
|
const [o] = e.resolveTargets(n), r = o ? e.elementFor(o) : void 0;
|
|
4363
4363
|
if (!o || !r)
|
|
4364
4364
|
throw new Error(`gsap-compat: live.draggable could not find ${String(n)}`);
|
|
4365
|
-
if (s.type === "rotation") return
|
|
4366
|
-
const i =
|
|
4365
|
+
if (s.type === "rotation") return Ty(t, e, o, r, s);
|
|
4366
|
+
const i = xy[s.type ?? "x,y"], a = () => {
|
|
4367
4367
|
const g = e.appliedValue(o, "x"), m = e.appliedValue(o, "y");
|
|
4368
4368
|
return { x: typeof g == "number" ? g : 0, y: typeof m == "number" ? m : 0 };
|
|
4369
|
-
}, l = typeof s.bounds == "string" ? e.query(s.bounds) : va(s.bounds) ? s.bounds : null, h = { bounds: (!l && s.bounds && !va(s.bounds) ? s.bounds : void 0) ?? (l ?
|
|
4369
|
+
}, l = typeof s.bounds == "string" ? e.query(s.bounds) : va(s.bounds) ? s.bounds : null, h = { bounds: (!l && s.bounds && !va(s.bounds) ? s.bounds : void 0) ?? (l ? Fc(r, l) : void 0) };
|
|
4370
4370
|
let u = null;
|
|
4371
4371
|
const d = () => {
|
|
4372
4372
|
u?.kill(), u = null;
|
|
@@ -4380,7 +4380,7 @@ function S1(t, e, n, s = {}) {
|
|
|
4380
4380
|
for (const A of E)
|
|
4381
4381
|
Math.hypot(A.x - x, A.y - M) < Math.hypot(T.x - x, T.y - M) && (T = A);
|
|
4382
4382
|
T && (b = [T.x], S = [T.y]);
|
|
4383
|
-
} else typeof E == "number" ? (b = E, S = E) : E && (b =
|
|
4383
|
+
} else typeof E == "number" ? (b = E, S = E) : E && (b = Lc(E.x), S = Lc(E.y));
|
|
4384
4384
|
const v = {};
|
|
4385
4385
|
i !== "y" && (v.x = { velocity: g.x, friction: y, min: w.minX, max: w.maxX, end: b }), i !== "x" && (v.y = { velocity: g.y, friction: y, min: w.minY, max: w.maxY, end: S }), u = t.to(r, { inertia: v, onComplete: () => s.onThrowComplete?.() });
|
|
4386
4386
|
}, p = new sd({
|
|
@@ -4392,7 +4392,7 @@ function S1(t, e, n, s = {}) {
|
|
|
4392
4392
|
},
|
|
4393
4393
|
getPosition: a,
|
|
4394
4394
|
onPress: () => {
|
|
4395
|
-
d(), l && (h.bounds =
|
|
4395
|
+
d(), l && (h.bounds = Fc(r, l)), s.onPress?.();
|
|
4396
4396
|
},
|
|
4397
4397
|
onDrag: (g) => {
|
|
4398
4398
|
e.apply(o, i === "x" ? { x: g.x } : i === "y" ? { y: g.y } : { x: g.x, y: g.y }), s.onDrag?.(g);
|
|
@@ -4416,7 +4416,7 @@ function S1(t, e, n, s = {}) {
|
|
|
4416
4416
|
}
|
|
4417
4417
|
};
|
|
4418
4418
|
}
|
|
4419
|
-
function
|
|
4419
|
+
function Ty(t, e, n, s, o) {
|
|
4420
4420
|
const r = typeof o.bounds == "object" && o.bounds !== null && !va(o.bounds) ? o.bounds : {}, i = () => {
|
|
4421
4421
|
const w = e.appliedValue(n, "rotate");
|
|
4422
4422
|
return typeof w == "number" ? w : 0;
|
|
@@ -4468,8 +4468,8 @@ function T1(t, e, n, s, o) {
|
|
|
4468
4468
|
}
|
|
4469
4469
|
};
|
|
4470
4470
|
}
|
|
4471
|
-
const
|
|
4472
|
-
function
|
|
4471
|
+
const Ey = { opacity: 0, scale: 0.6 };
|
|
4472
|
+
function Ay(t) {
|
|
4473
4473
|
const e = t.getBoundingClientRect();
|
|
4474
4474
|
return e.width === 0 && e.height === 0 ? null : { cx: e.left + e.width / 2, cy: e.top + e.height / 2, width: e.width, height: e.height };
|
|
4475
4475
|
}
|
|
@@ -4480,7 +4480,7 @@ function Wc(t) {
|
|
|
4480
4480
|
function Ma(t, e) {
|
|
4481
4481
|
const s = t.resolveTargets(e).map((i) => t.elementFor(i)).filter((i) => !!i), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
4482
4482
|
for (const i of s) {
|
|
4483
|
-
const a =
|
|
4483
|
+
const a = Ay(i);
|
|
4484
4484
|
o.set(i, a);
|
|
4485
4485
|
const l = od(i);
|
|
4486
4486
|
a && l !== void 0 && !r.has(l) && r.set(l, { element: i, box: a });
|
|
@@ -4489,7 +4489,7 @@ function Ma(t, e) {
|
|
|
4489
4489
|
}
|
|
4490
4490
|
const fi = /* @__PURE__ */ new WeakMap();
|
|
4491
4491
|
function xa(t, e, n, s = {}) {
|
|
4492
|
-
const o = s.duration ?? 0.6, r = s.ease ?? "power2.inOut", i = s.stagger ?? 0, a = s.scale !== !1, l = s.enter === void 0 ?
|
|
4492
|
+
const o = s.duration ?? 0.6, r = s.ease ?? "power2.inOut", i = s.stagger ?? 0, a = s.scale !== !1, l = s.enter === void 0 ? Ey : s.enter, c = new Set(n.elements);
|
|
4493
4493
|
if (s.targets !== void 0)
|
|
4494
4494
|
for (const f of t.resolveTargets(s.targets)) {
|
|
4495
4495
|
const p = t.elementFor(f);
|
|
@@ -4541,7 +4541,7 @@ function rd(t) {
|
|
|
4541
4541
|
e[n] = n === "opacity" || n.startsWith("scale") ? 1 : 0;
|
|
4542
4542
|
return e;
|
|
4543
4543
|
}
|
|
4544
|
-
function $
|
|
4544
|
+
function $y(t, e = {}) {
|
|
4545
4545
|
const n = new Set((e.type ?? "chars,words,lines").split(",").map((g) => g.trim())), s = {
|
|
4546
4546
|
chars: e.charsClass ?? "char",
|
|
4547
4547
|
words: e.wordsClass ?? "word",
|
|
@@ -4560,7 +4560,7 @@ function $1(t, e = {}) {
|
|
|
4560
4560
|
}, d = () => {
|
|
4561
4561
|
const g = { chars: [], words: [], lines: [], masks: [] };
|
|
4562
4562
|
for (const { element: m } of r) {
|
|
4563
|
-
const y = (m.textContent ?? "").replace(/\s+/g, " ").trim(), k =
|
|
4563
|
+
const y = (m.textContent ?? "").replace(/\s+/g, " ").trim(), k = Py(m, s.words), w = n.has("chars") ? k.flatMap((E) => Oy(E, s.chars)) : [], b = n.has("lines") ? _y(m, k, s.lines) : [];
|
|
4564
4564
|
if (o) {
|
|
4565
4565
|
!m.hasAttribute("aria-label") && y && m.setAttribute("aria-label", y);
|
|
4566
4566
|
for (const E of k) E.setAttribute("aria-hidden", "true");
|
|
@@ -4569,7 +4569,7 @@ function $1(t, e = {}) {
|
|
|
4569
4569
|
else for (const E of k) E.removeAttribute("class");
|
|
4570
4570
|
g.chars.push(...w), g.lines.push(...b);
|
|
4571
4571
|
const S = e.mask === "lines" ? b : e.mask === "words" ? k : e.mask === "chars" ? w : [];
|
|
4572
|
-
for (const E of S) g.masks.push(
|
|
4572
|
+
for (const E of S) g.masks.push(Cy(E, `${s[e.mask]}-mask`));
|
|
4573
4573
|
}
|
|
4574
4574
|
i = g;
|
|
4575
4575
|
}, f = {
|
|
@@ -4621,7 +4621,7 @@ function $1(t, e = {}) {
|
|
|
4621
4621
|
}
|
|
4622
4622
|
return f;
|
|
4623
4623
|
}
|
|
4624
|
-
function
|
|
4624
|
+
function Py(t, e) {
|
|
4625
4625
|
const n = t.ownerDocument, s = [], o = n.createTreeWalker(
|
|
4626
4626
|
t,
|
|
4627
4627
|
4
|
|
@@ -4644,18 +4644,18 @@ function P1(t, e) {
|
|
|
4644
4644
|
}
|
|
4645
4645
|
return s;
|
|
4646
4646
|
}
|
|
4647
|
-
function
|
|
4648
|
-
const n = t.ownerDocument, s =
|
|
4647
|
+
function Oy(t, e) {
|
|
4648
|
+
const n = t.ownerDocument, s = Iy(t.textContent ?? "").map((o) => {
|
|
4649
4649
|
const r = n.createElement("span");
|
|
4650
4650
|
return r.className = e, r.style.display = "inline-block", r.textContent = o, r;
|
|
4651
4651
|
});
|
|
4652
4652
|
return t.replaceChildren(...s), s;
|
|
4653
4653
|
}
|
|
4654
|
-
function
|
|
4654
|
+
function Iy(t) {
|
|
4655
4655
|
const e = Intl.Segmenter;
|
|
4656
4656
|
return e ? Array.from(new e(void 0, { granularity: "grapheme" }).segment(t), (n) => n.segment) : Array.from(t);
|
|
4657
4657
|
}
|
|
4658
|
-
function
|
|
4658
|
+
function _y(t, e, n) {
|
|
4659
4659
|
const s = t.ownerDocument, o = new Map(e.map((p) => [p, p.getBoundingClientRect()])), r = [], i = (p) => {
|
|
4660
4660
|
for (const g of Array.from(p.childNodes))
|
|
4661
4661
|
g.nodeType === 3 || o.has(g) || g.tagName === "BR" ? r.push(g) : i(g);
|
|
@@ -4687,7 +4687,7 @@ function _1(t, e, n) {
|
|
|
4687
4687
|
}
|
|
4688
4688
|
return t.replaceChildren(...a), a;
|
|
4689
4689
|
}
|
|
4690
|
-
function
|
|
4690
|
+
function Cy(t, e) {
|
|
4691
4691
|
const n = t.ownerDocument.createElement("span");
|
|
4692
4692
|
return n.className = e, n.style.display = t.style.display === "block" ? "block" : "inline-block", n.style.overflow = "clip", n.style.paddingBottom = "0.12em", n.style.marginBottom = "-0.12em", t.replaceWith(n), n.appendChild(t), n;
|
|
4693
4693
|
}
|
|
@@ -4740,7 +4740,7 @@ function QS(t, e, n, s) {
|
|
|
4740
4740
|
function ad(t) {
|
|
4741
4741
|
return t < 0 ? 0 : t > 1 ? 1 : t === 0 ? 0 : t;
|
|
4742
4742
|
}
|
|
4743
|
-
function
|
|
4743
|
+
function Hy(t, e, n, s) {
|
|
4744
4744
|
if (n <= 0) return e;
|
|
4745
4745
|
const o = 1 - Math.exp(-(s / 1e3) / n);
|
|
4746
4746
|
return t + (e - t) * o;
|
|
@@ -4756,7 +4756,7 @@ function Bc(t, e, n, s, o) {
|
|
|
4756
4756
|
}
|
|
4757
4757
|
return (l + c) / 2;
|
|
4758
4758
|
}
|
|
4759
|
-
class
|
|
4759
|
+
class Ry {
|
|
4760
4760
|
timeline;
|
|
4761
4761
|
trigger;
|
|
4762
4762
|
behaviour;
|
|
@@ -4804,10 +4804,10 @@ class R1 {
|
|
|
4804
4804
|
}
|
|
4805
4805
|
}
|
|
4806
4806
|
function t4(t) {
|
|
4807
|
-
const e = new
|
|
4807
|
+
const e = new Ry(t);
|
|
4808
4808
|
return e.start(), e;
|
|
4809
4809
|
}
|
|
4810
|
-
class
|
|
4810
|
+
class Fy {
|
|
4811
4811
|
element;
|
|
4812
4812
|
spacer;
|
|
4813
4813
|
saved;
|
|
@@ -4836,12 +4836,12 @@ class L1 {
|
|
|
4836
4836
|
this.element.style.position = this.saved.position, this.element.style.top = this.saved.top, this.element.style.left = this.saved.left, this.spacer.parentNode && this.spacer.replaceWith(this.element);
|
|
4837
4837
|
}
|
|
4838
4838
|
}
|
|
4839
|
-
const
|
|
4840
|
-
function
|
|
4839
|
+
const Ly = 0.15;
|
|
4840
|
+
function Wy(t) {
|
|
4841
4841
|
return typeof t == "object" && !Array.isArray(t) ? t : { snapTo: t };
|
|
4842
4842
|
}
|
|
4843
|
-
function
|
|
4844
|
-
const s = wo(t + e *
|
|
4843
|
+
function Ny(t, e, n) {
|
|
4844
|
+
const s = wo(t + e * Ly);
|
|
4845
4845
|
if (typeof n == "function") return wo(n(s));
|
|
4846
4846
|
if (typeof n == "number")
|
|
4847
4847
|
return n <= 0 ? t : wo(Math.round(s / n) * n);
|
|
@@ -4851,13 +4851,13 @@ function N1(t, e, n) {
|
|
|
4851
4851
|
Math.abs(r - s) < Math.abs(o - s) && (o = r);
|
|
4852
4852
|
return wo(o);
|
|
4853
4853
|
}
|
|
4854
|
-
function
|
|
4854
|
+
function Dy(t, e, n) {
|
|
4855
4855
|
const s = t.duration ?? { min: 0.2, max: 0.8 };
|
|
4856
4856
|
if (typeof s == "number") return s;
|
|
4857
4857
|
const o = Math.min(1, Math.abs(e) / Math.max(1, n));
|
|
4858
4858
|
return s.min + (s.max - s.min) * o;
|
|
4859
4859
|
}
|
|
4860
|
-
class
|
|
4860
|
+
class By {
|
|
4861
4861
|
rafId = null;
|
|
4862
4862
|
cancelEvents = ["wheel", "touchstart", "pointerdown", "keydown"];
|
|
4863
4863
|
onInterrupt = () => this.cancel();
|
|
@@ -4893,7 +4893,7 @@ class B1 {
|
|
|
4893
4893
|
function wo(t) {
|
|
4894
4894
|
return Math.max(0, Math.min(1, t));
|
|
4895
4895
|
}
|
|
4896
|
-
class
|
|
4896
|
+
class zy {
|
|
4897
4897
|
options;
|
|
4898
4898
|
scroller;
|
|
4899
4899
|
nodes = [];
|
|
@@ -4934,9 +4934,9 @@ class z1 {
|
|
|
4934
4934
|
for (const e of this.nodes.splice(0)) e.remove();
|
|
4935
4935
|
}
|
|
4936
4936
|
}
|
|
4937
|
-
const
|
|
4937
|
+
const qy = 120, Bn = [], is = /* @__PURE__ */ new Set();
|
|
4938
4938
|
let gi = !1;
|
|
4939
|
-
const
|
|
4939
|
+
const jy = () => {
|
|
4940
4940
|
gi || is.size === 0 || (gi = !0, queueMicrotask(() => {
|
|
4941
4941
|
gi = !1;
|
|
4942
4942
|
for (const t of is) t.afterRefresh();
|
|
@@ -4981,13 +4981,13 @@ class Nr {
|
|
|
4981
4981
|
markers = null;
|
|
4982
4982
|
markerGeometry = null;
|
|
4983
4983
|
constructor(e) {
|
|
4984
|
-
this.timeline = e.timeline, this.options = e, this.snapper = new
|
|
4984
|
+
this.timeline = e.timeline, this.options = e, this.snapper = new By((n) => this.scrollTo(n), typeof window < "u" ? window : null);
|
|
4985
4985
|
}
|
|
4986
4986
|
start() {
|
|
4987
4987
|
if (this.running) return;
|
|
4988
4988
|
this.running = !0, this.timeline?.pause();
|
|
4989
4989
|
const e = this.options.pin === !0 ? this.options.trigger : this.options.pin || null;
|
|
4990
|
-
e && !this.options.container && (this.pin = new
|
|
4990
|
+
e && !this.options.container && (this.pin = new Fy(e, { axis: this.options.horizontal ? "x" : "y", spacing: this.options.pinSpacing !== !1 })), this.options.markers && !this.options.horizontal && typeof document < "u" && (this.markers = new zy(document, this.options.scroller ?? null, this.options.markers)), this.scrollTarget()?.addEventListener("scroll", this.onScroll, { passive: !0 }), Bn.length === 0 && typeof window < "u" && (zn = { width: window.innerWidth, height: window.innerHeight }, window.addEventListener("resize", zc, { passive: !0 })), Bn.push(this), this.refresh();
|
|
4991
4991
|
}
|
|
4992
4992
|
stop() {
|
|
4993
4993
|
this.running && (this.running = !1, this.scrollTarget()?.removeEventListener("scroll", this.onScroll), Bn.splice(Bn.indexOf(this), 1), Bn.length === 0 && typeof window < "u" && window.removeEventListener("resize", zc), this.stopSmoothing(), this.idleTimer !== null && clearTimeout(this.idleTimer), this.idleTimer = null, this.snapTimer !== null && clearTimeout(this.snapTimer), this.snapTimer = null, this.snapper.cancel());
|
|
@@ -5044,7 +5044,7 @@ class Nr {
|
|
|
5044
5044
|
}
|
|
5045
5045
|
this.markerGeometry = this.markers ? this.markersFor(s) : null;
|
|
5046
5046
|
}
|
|
5047
|
-
this.markers && this.markerGeometry && this.markers.place(this.markerGeometry, e), this.lastScroll = null, this.updateFrom(e, !this.measured), this.measured = !0,
|
|
5047
|
+
this.markers && this.markerGeometry && this.markers.place(this.markerGeometry, e), this.lastScroll = null, this.updateFrom(e, !this.measured), this.measured = !0, jy();
|
|
5048
5048
|
}
|
|
5049
5049
|
/** Same as `refresh()`. */
|
|
5050
5050
|
sample() {
|
|
@@ -5090,7 +5090,7 @@ class Nr {
|
|
|
5090
5090
|
const n = typeof performance < "u" ? performance.now() : Date.now();
|
|
5091
5091
|
this.lastScroll !== null && n > this.lastScrollTime && e !== this.lastScroll && (this.velocityPxPerSecond = (e - this.lastScroll) / (n - this.lastScrollTime) * 1e3), (this.lastScroll === null || e !== this.lastScroll) && (this.lastScroll = e, this.lastScrollTime = n), !(this.velocityPxPerSecond === 0 || typeof setTimeout > "u") && (this.idleTimer !== null && clearTimeout(this.idleTimer), this.idleTimer = setTimeout(() => {
|
|
5092
5092
|
this.idleTimer = null, this.releaseVelocity = this.velocityPxPerSecond, this.velocityPxPerSecond = 0, this.emitUpdate(), this.scheduleSnap();
|
|
5093
|
-
},
|
|
5093
|
+
}, qy));
|
|
5094
5094
|
}
|
|
5095
5095
|
/**
|
|
5096
5096
|
* Emit enter/leave callbacks as the scroll position moves between zones. A jump
|
|
@@ -5106,12 +5106,12 @@ class Nr {
|
|
|
5106
5106
|
scheduleSnap() {
|
|
5107
5107
|
const e = this.options.snap;
|
|
5108
5108
|
if (e === void 0 || this.snapper.active) return;
|
|
5109
|
-
const n =
|
|
5109
|
+
const n = Wy(e), s = () => {
|
|
5110
5110
|
this.snapTimer = null;
|
|
5111
5111
|
const o = this.endPx - this.startPx, r = this.scrollPosition();
|
|
5112
5112
|
if (!this.running || o <= 0 || r <= this.startPx || r >= this.endPx) return;
|
|
5113
|
-
const i = (r - this.startPx) / o, a = this.startPx +
|
|
5114
|
-
Math.abs(a - r) < 1 || this.snapper.animate(r, a,
|
|
5113
|
+
const i = (r - this.startPx) / o, a = this.startPx + Ny(i, this.releaseVelocity / o, n.snapTo) * o;
|
|
5114
|
+
Math.abs(a - r) < 1 || this.snapper.animate(r, a, Dy(n, a - r, this.viewportHeight()), n.ease);
|
|
5115
5115
|
};
|
|
5116
5116
|
n.delay ? this.snapTimer = setTimeout(s, n.delay * 1e3) : s();
|
|
5117
5117
|
}
|
|
@@ -5153,7 +5153,7 @@ class Nr {
|
|
|
5153
5153
|
const e = (n) => {
|
|
5154
5154
|
if (this.rafId = null, !this.running) return;
|
|
5155
5155
|
const s = this.lastFrameTime === null ? 16.67 : n - this.lastFrameTime;
|
|
5156
|
-
this.lastFrameTime = n, this.displayProgress =
|
|
5156
|
+
this.lastFrameTime = n, this.displayProgress = Hy(this.displayProgress, this.targetProgress, this.smoothing(), s);
|
|
5157
5157
|
const o = Math.abs(this.targetProgress - this.displayProgress) < 1e-4;
|
|
5158
5158
|
o && (this.displayProgress = this.targetProgress), this.applyProgress(), o ? this.lastFrameTime = null : this.rafId = requestAnimationFrame(e);
|
|
5159
5159
|
};
|
|
@@ -5198,7 +5198,7 @@ function e4(t) {
|
|
|
5198
5198
|
const e = new Nr(t);
|
|
5199
5199
|
return e.start(), e;
|
|
5200
5200
|
}
|
|
5201
|
-
const pi = /* @__PURE__ */ new Set(),
|
|
5201
|
+
const pi = /* @__PURE__ */ new Set(), Yy = 16, qc = 0.5, Ky = 2;
|
|
5202
5202
|
class jc {
|
|
5203
5203
|
options;
|
|
5204
5204
|
frames;
|
|
@@ -5301,13 +5301,13 @@ class jc {
|
|
|
5301
5301
|
// --- input ----------------------------------------------------------------
|
|
5302
5302
|
wheel(e) {
|
|
5303
5303
|
if (this.pausedState || this.reduced || (this.options.smooth ?? 0.8) <= 0 || e.ctrlKey || Math.abs(e.deltaX) > Math.abs(e.deltaY) || this.nestedScrollerTakes(e)) return;
|
|
5304
|
-
const n = e.deltaMode === 1 ?
|
|
5304
|
+
const n = e.deltaMode === 1 ? Yy : e.deltaMode === 2 ? this.viewportHeight() : 1, s = e.deltaY * n * (this.options.wheelMultiplier ?? 1), o = this.clamp(this.target + s);
|
|
5305
5305
|
o === this.target && o === this.current || (e.preventDefault(), this.journey = null, this.target = o, this.requestFrame());
|
|
5306
5306
|
}
|
|
5307
5307
|
/** A scroll that this smoother did not write: follow it. */
|
|
5308
5308
|
nativeScroll() {
|
|
5309
5309
|
const e = this.position();
|
|
5310
|
-
this.written !== null && Math.abs(e - this.written) <=
|
|
5310
|
+
this.written !== null && Math.abs(e - this.written) <= Ky || (this.written = null, this.journey = null, this.cancelFrame(), this.current = this.target = e, this.requestFrame());
|
|
5311
5311
|
}
|
|
5312
5312
|
nestedScrollerTakes(e) {
|
|
5313
5313
|
const n = this.options.scroller ?? document.documentElement;
|
|
@@ -5354,7 +5354,7 @@ class jc {
|
|
|
5354
5354
|
const i = o.lag * 1e3 / 3;
|
|
5355
5355
|
o.lagged = e === 0 ? s : o.lagged + (s - o.lagged) * (1 - Math.exp(-e / i)), Math.abs(s - o.lagged) < qc ? o.lagged = s : n = !0, r += s - o.lagged;
|
|
5356
5356
|
}
|
|
5357
|
-
mi(o.element, r === 0 ? o.saved : `0 ${
|
|
5357
|
+
mi(o.element, r === 0 ? o.saved : `0 ${Xy(r)}px`), o.shift = r;
|
|
5358
5358
|
}
|
|
5359
5359
|
return n;
|
|
5360
5360
|
}
|
|
@@ -5391,10 +5391,10 @@ class jc {
|
|
|
5391
5391
|
function mi(t, e) {
|
|
5392
5392
|
e ? t.style.setProperty("translate", e) : t.style.removeProperty("translate");
|
|
5393
5393
|
}
|
|
5394
|
-
function
|
|
5394
|
+
function Xy(t) {
|
|
5395
5395
|
return Math.round(t * 100) / 100;
|
|
5396
5396
|
}
|
|
5397
|
-
function
|
|
5397
|
+
function Uy(t, e) {
|
|
5398
5398
|
switch (e) {
|
|
5399
5399
|
// Play forward from wherever it is; reverse() flips a reversed timeline and plays.
|
|
5400
5400
|
// Neither restarts an animation that is already at that end.
|
|
@@ -5433,8 +5433,8 @@ function kl(t, e, n, s, o = () => {
|
|
|
5433
5433
|
const a = e.scrub === void 0 || e.scrub === !1 ? !1 : e.scrub, l = (e.toggleActions ?? "play none none none").trim().split(/\s+/);
|
|
5434
5434
|
let c = 0, h;
|
|
5435
5435
|
const u = (f, p) => () => {
|
|
5436
|
-
p?.(), n && !a &&
|
|
5437
|
-
}, d = e.containerAnimation ?
|
|
5436
|
+
p?.(), n && !a && Uy(n, l[f] ?? "none"), e.once && f === 0 && queueMicrotask(() => h.destroy());
|
|
5437
|
+
}, d = e.containerAnimation ? Jy(t, e.containerAnimation, i, o) : void 0;
|
|
5438
5438
|
return h = new Nr({
|
|
5439
5439
|
trigger: i,
|
|
5440
5440
|
start: e.start,
|
|
@@ -5445,7 +5445,7 @@ function kl(t, e, n, s, o = () => {
|
|
|
5445
5445
|
horizontal: e.horizontal,
|
|
5446
5446
|
pinSpacing: e.pinSpacing,
|
|
5447
5447
|
onRefresh: e.invalidateOnRefresh && n?.invalidate ? () => n.invalidate() : void 0,
|
|
5448
|
-
snap: e.snap === void 0 ? void 0 :
|
|
5448
|
+
snap: e.snap === void 0 ? void 0 : Gy(e.snap, n),
|
|
5449
5449
|
markers: e.markers,
|
|
5450
5450
|
container: d,
|
|
5451
5451
|
onUpdate: (f, p) => {
|
|
@@ -5461,8 +5461,8 @@ function kl(t, e, n, s, o = () => {
|
|
|
5461
5461
|
onLeaveBack: u(3, e.onLeaveBack)
|
|
5462
5462
|
}), n && a === !1 && n.progress(0), h.start(), t.own(h);
|
|
5463
5463
|
}
|
|
5464
|
-
function
|
|
5465
|
-
const n = (o) => o === "labels" ? (r) =>
|
|
5464
|
+
function Gy(t, e) {
|
|
5465
|
+
const n = (o) => o === "labels" ? (r) => Vy(r, e?.labelProgresses?.() ?? []) : o;
|
|
5466
5466
|
if (typeof t != "object" || Array.isArray(t)) return n(t);
|
|
5467
5467
|
const s = t.ease ? or(t.ease) : void 0;
|
|
5468
5468
|
return {
|
|
@@ -5472,10 +5472,10 @@ function G1(t, e) {
|
|
|
5472
5472
|
ease: s ? s.fn ?? zt(s.easing) : void 0
|
|
5473
5473
|
};
|
|
5474
5474
|
}
|
|
5475
|
-
function
|
|
5475
|
+
function Vy(t, e) {
|
|
5476
5476
|
return e.reduce((n, s) => Math.abs(s - t) < Math.abs(n - t) ? s : n, e[0] ?? t);
|
|
5477
5477
|
}
|
|
5478
|
-
function
|
|
5478
|
+
function Jy(t, e, n, s) {
|
|
5479
5479
|
const o = () => e.timeline.getTracks({ property: "x" }).map((r) => r.target).filter((r) => {
|
|
5480
5480
|
const i = t.elementFor(r);
|
|
5481
5481
|
return !!i && i !== n && i.contains(n);
|
|
@@ -5540,7 +5540,7 @@ class cd {
|
|
|
5540
5540
|
this.revert();
|
|
5541
5541
|
}
|
|
5542
5542
|
}
|
|
5543
|
-
class
|
|
5543
|
+
class Zy {
|
|
5544
5544
|
host;
|
|
5545
5545
|
scope;
|
|
5546
5546
|
entries = [];
|
|
@@ -5584,7 +5584,7 @@ class Z1 {
|
|
|
5584
5584
|
r.conditions = n, r.add(() => e.setup(r)), e.context = r;
|
|
5585
5585
|
}
|
|
5586
5586
|
}
|
|
5587
|
-
class
|
|
5587
|
+
class Qy {
|
|
5588
5588
|
frames;
|
|
5589
5589
|
canvas;
|
|
5590
5590
|
context;
|
|
@@ -5658,22 +5658,22 @@ class Q1 {
|
|
|
5658
5658
|
n.onload = () => s(!0), n.onerror = () => s(!1), n.src = this.options.url(e);
|
|
5659
5659
|
}
|
|
5660
5660
|
}
|
|
5661
|
-
const
|
|
5662
|
-
async function
|
|
5661
|
+
const t1 = { opacity: 0, y: -16 }, e1 = { opacity: 0, y: 16 };
|
|
5662
|
+
async function n1(t, e, n, s) {
|
|
5663
5663
|
const o = e.collector?.scope ?? e.root, r = o.ownerDocument ?? o, i = () => s.shared ? [...o.querySelectorAll(s.shared)] : [];
|
|
5664
5664
|
if (s.native && typeof r.startViewTransition == "function")
|
|
5665
|
-
return
|
|
5665
|
+
return s1(r, s, i);
|
|
5666
5666
|
const a = s.duration ?? 0.35, l = s.ease ?? "power2.inOut", c = (m) => new Promise((y) => {
|
|
5667
5667
|
m(y) || y();
|
|
5668
5668
|
}), h = i(), u = h.length ? Ma(e, h) : void 0, d = s.from !== void 0 ? Yc(e, s.from, s.shared) : [];
|
|
5669
5669
|
if (d.length && s.leave !== !1) {
|
|
5670
|
-
const m = s.leave ??
|
|
5670
|
+
const m = s.leave ?? t1;
|
|
5671
5671
|
await c((y) => t.to(d, { ...m, duration: a, ease: l, onComplete: y }));
|
|
5672
5672
|
}
|
|
5673
5673
|
await s.update();
|
|
5674
5674
|
const f = [], p = typeof s.to == "function" ? s.to() : s.to, g = p !== void 0 ? Yc(e, p, s.shared) : [];
|
|
5675
5675
|
if (g.length && s.enter !== !1) {
|
|
5676
|
-
const m = s.enter ??
|
|
5676
|
+
const m = s.enter ?? e1;
|
|
5677
5677
|
f.push(c((y) => t.fromTo(g, m, { ...rd(m), duration: a, ease: l, onComplete: y })));
|
|
5678
5678
|
}
|
|
5679
5679
|
if (u) {
|
|
@@ -5696,7 +5696,7 @@ function Yc(t, e, n) {
|
|
|
5696
5696
|
const s = t.resolveTargets(e).map((o) => t.elementFor(o)).filter((o) => !!o);
|
|
5697
5697
|
return n ? s.flatMap((o) => !o.querySelector(n) && !o.matches(n) ? [o] : [...o.children].filter((r) => !r.matches(n) && !r.querySelector(n))) : s;
|
|
5698
5698
|
}
|
|
5699
|
-
async function
|
|
5699
|
+
async function s1(t, e, n) {
|
|
5700
5700
|
const s = (a, l) => {
|
|
5701
5701
|
const c = a.dataset?.flipId;
|
|
5702
5702
|
c && a.style.setProperty("view-transition-name", l ? `tf-${c.replace(/[^\w-]/g, "-")}` : "");
|
|
@@ -5707,16 +5707,16 @@ async function sy(t, e, n) {
|
|
|
5707
5707
|
o.forEach((a) => s(a, !1)), await e.update(), r = n(), r.forEach((a) => s(a, !0));
|
|
5708
5708
|
}).finished, r.forEach((a) => s(a, !1));
|
|
5709
5709
|
}
|
|
5710
|
-
const
|
|
5710
|
+
const o1 = {
|
|
5711
5711
|
/** Register a curve from SVG path data or bezier points. Returns the name. */
|
|
5712
5712
|
create: (t, e) => yl(t, Qp(e))
|
|
5713
|
-
},
|
|
5713
|
+
}, r1 = {
|
|
5714
5714
|
/** Register a bouncing ease that lands and settles on the end value. Returns the name. */
|
|
5715
5715
|
create: (t, e) => yl(t, { fn: tm(e) })
|
|
5716
|
-
},
|
|
5716
|
+
}, i1 = {
|
|
5717
5717
|
/** Register a wiggle that swings around the start value and returns to it. Returns the name. */
|
|
5718
5718
|
create: (t, e) => yl(t, { fn: em(e) })
|
|
5719
|
-
},
|
|
5719
|
+
}, a1 = /* @__PURE__ */ new Set([
|
|
5720
5720
|
"keyframes",
|
|
5721
5721
|
"duration",
|
|
5722
5722
|
"delay",
|
|
@@ -5735,20 +5735,20 @@ const oy = {
|
|
|
5735
5735
|
"onRepeat",
|
|
5736
5736
|
"onReverseComplete",
|
|
5737
5737
|
"scrollTrigger"
|
|
5738
|
-
]), Kc = 0.5,
|
|
5739
|
-
function
|
|
5738
|
+
]), Kc = 0.5, l1 = "power1.inOut";
|
|
5739
|
+
function c1(t) {
|
|
5740
5740
|
return t.keyframes !== void 0 && t.keyframes !== null;
|
|
5741
5741
|
}
|
|
5742
|
-
function
|
|
5742
|
+
function h1(t) {
|
|
5743
5743
|
const e = t.keyframes, n = {};
|
|
5744
|
-
for (const [c, h] of Object.entries(t))
|
|
5744
|
+
for (const [c, h] of Object.entries(t)) a1.has(c) || (n[c] = h);
|
|
5745
5745
|
if (Array.isArray(e))
|
|
5746
5746
|
return e.map((c) => ({
|
|
5747
5747
|
...n,
|
|
5748
5748
|
...c,
|
|
5749
5749
|
duration: c.duration ?? t.duration ?? Kc
|
|
5750
5750
|
}));
|
|
5751
|
-
const s = Object.entries(e), o = t.duration ?? Kc, r = e.easeEach ?? t.easeEach ??
|
|
5751
|
+
const s = Object.entries(e), o = t.duration ?? Kc, r = e.easeEach ?? t.easeEach ?? l1;
|
|
5752
5752
|
if (s.length > 0 && s.every(([c]) => /^\s*-?\d+(\.\d+)?\s*%\s*$/.test(c) || c === "easeEach")) {
|
|
5753
5753
|
const c = s.filter(([d]) => d !== "easeEach").map(([d, f]) => ({ at: Number.parseFloat(d) / 100, step: f })).sort((d, f) => d.at - f.at), h = [];
|
|
5754
5754
|
let u = 0;
|
|
@@ -5804,7 +5804,7 @@ function Xc(t, e, n, s = {}) {
|
|
|
5804
5804
|
if (s.autoKill !== !1) for (const k of f) p.addEventListener(k, g, { passive: !0 });
|
|
5805
5805
|
return y;
|
|
5806
5806
|
}
|
|
5807
|
-
function
|
|
5807
|
+
function u1(t, e, n) {
|
|
5808
5808
|
const s = t.collector?.scope ?? t.root, o = typeof e == "string" ? [...s.querySelectorAll(e)] : "nodeType" in e ? [e] : Array.from(e), { interval: r = 0.1, batchMax: i, onEnter: a, onLeave: l, onEnterBack: c, onLeaveBack: h, ...u } = n, d = { onEnter: a, onLeave: l, onEnterBack: c, onLeaveBack: h }, f = { onEnter: [], onLeave: [], onEnterBack: [], onLeaveBack: [] }, p = {}, g = (y) => {
|
|
5809
5809
|
p[y] !== void 0 && clearTimeout(p[y]), p[y] = void 0;
|
|
5810
5810
|
const k = f[y].splice(0);
|
|
@@ -5858,7 +5858,7 @@ class _e {
|
|
|
5858
5858
|
...s,
|
|
5859
5859
|
startValue: (o, r) => {
|
|
5860
5860
|
const i = e.objectFor(o);
|
|
5861
|
-
if (i) return
|
|
5861
|
+
if (i) return p1(i[r]);
|
|
5862
5862
|
const a = e.appliedValue(o, r);
|
|
5863
5863
|
if (a !== void 0) return a;
|
|
5864
5864
|
if (r === "d") return nd(e.elementFor(o)) ?? void 0;
|
|
@@ -5893,7 +5893,7 @@ class _e {
|
|
|
5893
5893
|
}
|
|
5894
5894
|
// --- building -----------------------------------------------------------
|
|
5895
5895
|
to(e, n, s) {
|
|
5896
|
-
return
|
|
5896
|
+
return c1(n) ? this.record(() => this.keyframed(e, n, s)) : this.record(() => this.tween(e, [n], s, ([o], r, i) => this.compat.to(r, o, i)));
|
|
5897
5897
|
}
|
|
5898
5898
|
from(e, n, s) {
|
|
5899
5899
|
return this.record(() => this.tween(e, [n], s, ([o], r, i) => this.compat.from(r, o, i)));
|
|
@@ -6150,7 +6150,7 @@ class _e {
|
|
|
6150
6150
|
keyframed(e, n, s) {
|
|
6151
6151
|
const o = this.resolve(e);
|
|
6152
6152
|
if (!o) return;
|
|
6153
|
-
const r =
|
|
6153
|
+
const r = h1(n);
|
|
6154
6154
|
if (r.length === 0) return;
|
|
6155
6155
|
const i = o.length > 1 ? ka(n.stagger, this.staggerContext(o)) : void 0, a = o.map((m) => this.targetFor(m)).filter((m) => m !== void 0), l = i ? a.map((m) => [m]) : [a], c = i ? fa(o.length, i).map((m) => m / 1e3) : [0], h = this.compat.timeOf(s) / 1e3 + rr(n.delay, 0) / 1e3;
|
|
6156
6156
|
let u = 1 / 0, d = -1 / 0;
|
|
@@ -6172,7 +6172,7 @@ class _e {
|
|
|
6172
6172
|
}
|
|
6173
6173
|
buildTween(e, n, s, o) {
|
|
6174
6174
|
const r = e.map((d) => this.targetFor(d));
|
|
6175
|
-
if (!(e.length > 1 && (n.some(
|
|
6175
|
+
if (!(e.length > 1 && (n.some(g1) || e.some((d) => this.stage.objectFor(d) !== void 0)))) {
|
|
6176
6176
|
const d = this.targetFor(e[0]);
|
|
6177
6177
|
o(n.map((f) => this.prepare(Uc(f, 0, d, this.stage.utils, r), e)), e, s);
|
|
6178
6178
|
return;
|
|
@@ -6195,7 +6195,7 @@ class _e {
|
|
|
6195
6195
|
const s = (i) => this.options.onWarning?.(i), o = (i) => this.stage.query(i);
|
|
6196
6196
|
let r = e;
|
|
6197
6197
|
if (e.motionPath !== void 0) {
|
|
6198
|
-
const i =
|
|
6198
|
+
const i = py(e.motionPath, {
|
|
6199
6199
|
query: o,
|
|
6200
6200
|
targets: n.map((a) => this.stage.elementFor(a)).filter((a) => !!a),
|
|
6201
6201
|
warn: s
|
|
@@ -6203,7 +6203,7 @@ class _e {
|
|
|
6203
6203
|
r = { ...r, motionPath: i };
|
|
6204
6204
|
}
|
|
6205
6205
|
if (e.morphSVG !== void 0) {
|
|
6206
|
-
const i =
|
|
6206
|
+
const i = my(e.morphSVG, o, s), { morphSVG: a, ...l } = r;
|
|
6207
6207
|
r = i ? { ...r, morphSVG: i } : l;
|
|
6208
6208
|
}
|
|
6209
6209
|
if (e.drawSVG !== void 0) {
|
|
@@ -6220,13 +6220,13 @@ class _e {
|
|
|
6220
6220
|
resolve(e) {
|
|
6221
6221
|
const n = this.stage.resolveTargets(e);
|
|
6222
6222
|
if (n.length === 0) {
|
|
6223
|
-
this.options.onWarning?.(`gsap-compat: no elements found for target ${
|
|
6223
|
+
this.options.onWarning?.(`gsap-compat: no elements found for target ${m1(e)}`);
|
|
6224
6224
|
return;
|
|
6225
6225
|
}
|
|
6226
6226
|
return this.firstElement ??= n.map((s) => this.stage.elementFor(s)).find((s) => s !== void 0), n;
|
|
6227
6227
|
}
|
|
6228
6228
|
}
|
|
6229
|
-
function
|
|
6229
|
+
function d1(t = new uy()) {
|
|
6230
6230
|
const e = (r) => {
|
|
6231
6231
|
const { config: i } = qo(r);
|
|
6232
6232
|
return new _e(t, {
|
|
@@ -6256,7 +6256,7 @@ function dy(t = new u1()) {
|
|
|
6256
6256
|
return l ? l[i] : t.appliedValue(a, i) ?? Zu(i);
|
|
6257
6257
|
},
|
|
6258
6258
|
scrollTrigger: (r) => s(kl(t, r)),
|
|
6259
|
-
scrollBatch: (r, i) =>
|
|
6259
|
+
scrollBatch: (r, i) => u1(t, r, i).map((a) => s(a)),
|
|
6260
6260
|
scrollTo: (r, i) => Xc(o, t, r, i),
|
|
6261
6261
|
refreshScroll: () => {
|
|
6262
6262
|
Nr.refreshAll(), jc.refreshAll();
|
|
@@ -6269,15 +6269,15 @@ function dy(t = new u1()) {
|
|
|
6269
6269
|
const a = new cd(t, i);
|
|
6270
6270
|
return r && a.add(() => r(a)), a;
|
|
6271
6271
|
},
|
|
6272
|
-
matchMedia: (r) => new
|
|
6273
|
-
customEase:
|
|
6274
|
-
customBounce:
|
|
6275
|
-
customWiggle:
|
|
6276
|
-
pageTransition: (r) =>
|
|
6272
|
+
matchMedia: (r) => new Zy(t, r),
|
|
6273
|
+
customEase: o1.create,
|
|
6274
|
+
customBounce: r1.create,
|
|
6275
|
+
customWiggle: i1.create,
|
|
6276
|
+
pageTransition: (r) => n1(o, t, (i) => new _e(t, i), r),
|
|
6277
6277
|
imageSequence: (r, i) => {
|
|
6278
6278
|
const a = typeof r == "string" ? (t.collector?.scope ?? t.root).querySelector(r) : r;
|
|
6279
6279
|
if (!(a instanceof HTMLCanvasElement)) throw new Error(`gsap-compat: imageSequence needs a <canvas>, got ${String(r)}`);
|
|
6280
|
-
return s(new
|
|
6280
|
+
return s(new Qy(a, i));
|
|
6281
6281
|
},
|
|
6282
6282
|
quickTo: (r, i, a = {}) => {
|
|
6283
6283
|
const l = new _e(t, { paused: !0 }), [c] = t.resolveTargets(r);
|
|
@@ -6288,7 +6288,7 @@ function dy(t = new u1()) {
|
|
|
6288
6288
|
[i]: u,
|
|
6289
6289
|
duration: a.duration ?? 0.4,
|
|
6290
6290
|
ease: a.ease ?? "power3.out",
|
|
6291
|
-
...a.spring !== void 0 && { spring:
|
|
6291
|
+
...a.spring !== void 0 && { spring: f1(a.spring, i, d) }
|
|
6292
6292
|
}), l.timeline.stop(), l.timeline.play(), t.activate(l.timeline);
|
|
6293
6293
|
}, { tween: l, kill: () => l.kill() });
|
|
6294
6294
|
},
|
|
@@ -6314,12 +6314,12 @@ function dy(t = new u1()) {
|
|
|
6314
6314
|
const a = t.resolveTargets(r), l = typeof i == "string" ? i.split(",").map((c) => c.trim()).filter(Boolean) : i;
|
|
6315
6315
|
for (const c of [...t.liveTimelines]) c.killTweensOf(a, l);
|
|
6316
6316
|
},
|
|
6317
|
-
convertToPath: (r) =>
|
|
6317
|
+
convertToPath: (r) => by(r, t.root),
|
|
6318
6318
|
splitText: (r, i) => {
|
|
6319
6319
|
const a = t.collector?.scope ?? t.root, l = typeof r == "string" ? Array.from(a.querySelectorAll(r)) : "nodeType" in r ? [r] : Array.from(r);
|
|
6320
|
-
return s($
|
|
6320
|
+
return s($y(l, i));
|
|
6321
6321
|
},
|
|
6322
|
-
draggable: (r, i) => s(
|
|
6322
|
+
draggable: (r, i) => s(Sy(o, t, r, i)),
|
|
6323
6323
|
getFlipState: (r) => Ma(t, r),
|
|
6324
6324
|
flipFrom: (r, i) => xa(t, (a) => new _e(t, a), r, i),
|
|
6325
6325
|
flip: (r, i, a) => {
|
|
@@ -6329,11 +6329,11 @@ function dy(t = new u1()) {
|
|
|
6329
6329
|
};
|
|
6330
6330
|
return o;
|
|
6331
6331
|
}
|
|
6332
|
-
const de = /* @__PURE__ */
|
|
6333
|
-
function
|
|
6332
|
+
const de = /* @__PURE__ */ d1();
|
|
6333
|
+
function f1(t, e, n) {
|
|
6334
6334
|
return t === !0 ? { velocity: { [e]: n } } : typeof t == "string" ? { preset: t, velocity: { [e]: n } } : { ...t, velocity: { [e]: n } };
|
|
6335
6335
|
}
|
|
6336
|
-
function
|
|
6336
|
+
function g1(t) {
|
|
6337
6337
|
return t.morphSVG !== void 0 || t.drawSVG !== void 0 || t.text !== void 0 || t.scrambleText !== void 0 || hd(t);
|
|
6338
6338
|
}
|
|
6339
6339
|
function hd(t) {
|
|
@@ -6361,10 +6361,10 @@ function Vc(t) {
|
|
|
6361
6361
|
if (typeof e?.getTotalLength == "function")
|
|
6362
6362
|
return e.getTotalLength();
|
|
6363
6363
|
}
|
|
6364
|
-
function
|
|
6364
|
+
function p1(t) {
|
|
6365
6365
|
if (typeof t == "number" || typeof t == "string" || Array.isArray(t) && t.every((e) => typeof e == "number")) return t;
|
|
6366
6366
|
}
|
|
6367
|
-
function
|
|
6367
|
+
function m1(t) {
|
|
6368
6368
|
return typeof t == "string" ? `"${t}"` : String(t);
|
|
6369
6369
|
}
|
|
6370
6370
|
class Jc {
|
|
@@ -6406,7 +6406,7 @@ class Jc {
|
|
|
6406
6406
|
});
|
|
6407
6407
|
}
|
|
6408
6408
|
}
|
|
6409
|
-
function
|
|
6409
|
+
function y1(t, e, n, s, o) {
|
|
6410
6410
|
const r = n - o;
|
|
6411
6411
|
if (r < 0) {
|
|
6412
6412
|
e.paused || e.pause(), e.currentTime = 0;
|
|
@@ -6652,7 +6652,7 @@ class vl {
|
|
|
6652
6652
|
/** Sync all discovered media targets to a timeline time. */
|
|
6653
6653
|
syncAllMedia(e, n) {
|
|
6654
6654
|
for (const s of this.mediaTargets)
|
|
6655
|
-
|
|
6655
|
+
y1(s.sync, s.el, e, n, s.startTime);
|
|
6656
6656
|
}
|
|
6657
6657
|
/**
|
|
6658
6658
|
* Load animation from inline JSON string.
|
|
@@ -6769,6 +6769,14 @@ class vl {
|
|
|
6769
6769
|
get currentTime() {
|
|
6770
6770
|
return this.timeline?.currentTime ?? 0;
|
|
6771
6771
|
}
|
|
6772
|
+
/**
|
|
6773
|
+
* The animated values at the playhead, for renderers that draw from values
|
|
6774
|
+
* rather than DOM elements (a canvas, or an SVG rebuilt each frame). Read it
|
|
6775
|
+
* from a `subscribe` listener. Undefined before a timeline loads.
|
|
6776
|
+
*/
|
|
6777
|
+
get state() {
|
|
6778
|
+
return this.timeline?.getStateAtTime(this.timeline.currentTime);
|
|
6779
|
+
}
|
|
6772
6780
|
/**
|
|
6773
6781
|
* Get total duration.
|
|
6774
6782
|
*/
|
|
@@ -6850,7 +6858,7 @@ async function n4(t, e, n = {}) {
|
|
|
6850
6858
|
function s4(t, e = {}) {
|
|
6851
6859
|
return new vl(t, e);
|
|
6852
6860
|
}
|
|
6853
|
-
const
|
|
6861
|
+
const b1 = {
|
|
6854
6862
|
play: "Play",
|
|
6855
6863
|
pause: "Pause",
|
|
6856
6864
|
prev: "Previous step",
|
|
@@ -6865,7 +6873,7 @@ const by = {
|
|
|
6865
6873
|
scenario: "Scenario",
|
|
6866
6874
|
fullscreen: "Full screen",
|
|
6867
6875
|
exitFullscreen: "Exit full screen"
|
|
6868
|
-
}, Zc = "tinyfly-controls-style",
|
|
6876
|
+
}, Zc = "tinyfly-controls-style", w1 = `
|
|
6869
6877
|
.tf-ctl { --tf-ctl-fg: #1d1d1f; --tf-ctl-bg: #f4f2ee; --tf-ctl-accent: #c2410c; --tf-ctl-radius: 8px;
|
|
6870
6878
|
font: 14px/1.4 var(--tf-ctl-font, system-ui, sans-serif); color: var(--tf-ctl-fg); margin-top: 8px; }
|
|
6871
6879
|
.tf-ctl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: var(--tf-ctl-radius); background: var(--tf-ctl-bg); }
|
|
@@ -6914,16 +6922,16 @@ const by = {
|
|
|
6914
6922
|
.tf-fullscreen > :not(svg):not(canvas) { grid-column: 2; }
|
|
6915
6923
|
}
|
|
6916
6924
|
`;
|
|
6917
|
-
let
|
|
6918
|
-
function
|
|
6925
|
+
let k1 = 0;
|
|
6926
|
+
function v1(t) {
|
|
6919
6927
|
if (t.getElementById(Zc)) return;
|
|
6920
6928
|
const e = t.createElement("style");
|
|
6921
|
-
e.id = Zc, e.textContent =
|
|
6929
|
+
e.id = Zc, e.textContent = w1, t.head.appendChild(e);
|
|
6922
6930
|
}
|
|
6923
|
-
function
|
|
6931
|
+
function M1(t, e, n = {}) {
|
|
6924
6932
|
const s = e.ownerDocument;
|
|
6925
|
-
|
|
6926
|
-
const o = { ...
|
|
6933
|
+
v1(s);
|
|
6934
|
+
const o = { ...b1, ...n.labels }, r = n.speeds ?? [0.5, 1, 2], i = () => t.markers.length > 0, a = () => t.markers.some((W) => W.label !== void 0 || t.caption(W.id) !== void 0), l = s.createElement("div");
|
|
6927
6935
|
l.className = "tf-ctl";
|
|
6928
6936
|
const c = s.createElement("div");
|
|
6929
6937
|
c.className = "tf-ctl-bar", c.setAttribute("role", "group");
|
|
@@ -6947,7 +6955,7 @@ function My(t, e, n = {}) {
|
|
|
6947
6955
|
q.value = String(W), q.textContent = `${W}×`, W === 1 && (q.selected = !0), k.appendChild(q);
|
|
6948
6956
|
}
|
|
6949
6957
|
k.addEventListener("change", () => t.setSpeed(Number(k.value))), c.append(u, d, f, p, m, y), r.length > 0 && c.append(k), l.append(c);
|
|
6950
|
-
const w = n.fullscreen ?
|
|
6958
|
+
const w = n.fullscreen ? E1(e, s, o) : void 0;
|
|
6951
6959
|
w && c.append(w.button);
|
|
6952
6960
|
const b = s.createElement("p");
|
|
6953
6961
|
b.className = "tf-ctl-caption", b.setAttribute("aria-live", "polite"), n.captions !== !1 && l.append(b);
|
|
@@ -6955,7 +6963,7 @@ function My(t, e, n = {}) {
|
|
|
6955
6963
|
S.className = "tf-ctl-question", S.hidden = !0;
|
|
6956
6964
|
const E = s.createElement("span"), v = h(o.reveal, o.reveal, () => t.play(), "tf-ctl-primary");
|
|
6957
6965
|
S.append(E, v), l.append(S);
|
|
6958
|
-
const x =
|
|
6966
|
+
const x = x1(t, s, o.scenario, n.scenarioControl ?? "buttons");
|
|
6959
6967
|
x && l.append(x.element);
|
|
6960
6968
|
const M = n.mount;
|
|
6961
6969
|
M ? M.appendChild(l) : e.insertAdjacentElement("afterend", l);
|
|
@@ -7019,7 +7027,7 @@ function My(t, e, n = {}) {
|
|
|
7019
7027
|
}
|
|
7020
7028
|
};
|
|
7021
7029
|
}
|
|
7022
|
-
function
|
|
7030
|
+
function x1(t, e, n, s) {
|
|
7023
7031
|
const o = t.scenarios;
|
|
7024
7032
|
if (o.length < 2) return;
|
|
7025
7033
|
if (s === "slider") {
|
|
@@ -7044,7 +7052,7 @@ function xy(t, e, n, s) {
|
|
|
7044
7052
|
r.className = "tf-ctl-choices";
|
|
7045
7053
|
const i = e.createElement("legend");
|
|
7046
7054
|
i.textContent = n, r.append(i);
|
|
7047
|
-
const a = `tf-ctl-scenario-${++
|
|
7055
|
+
const a = `tf-ctl-scenario-${++k1}`, l = o.map((h) => {
|
|
7048
7056
|
const u = e.createElement("label");
|
|
7049
7057
|
u.className = "tf-ctl-choice";
|
|
7050
7058
|
const d = e.createElement("input");
|
|
@@ -7061,14 +7069,14 @@ function xy(t, e, n, s) {
|
|
|
7061
7069
|
}
|
|
7062
7070
|
} };
|
|
7063
7071
|
}
|
|
7064
|
-
const
|
|
7065
|
-
function
|
|
7072
|
+
const S1 = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>', T1 = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"/></svg>';
|
|
7073
|
+
function E1(t, e, n) {
|
|
7066
7074
|
const s = e, o = t, r = e.createElement("button");
|
|
7067
7075
|
r.type = "button", r.className = "tf-ctl-btn tf-ctl-fullscreen";
|
|
7068
7076
|
let i, a = "";
|
|
7069
7077
|
const l = () => {
|
|
7070
7078
|
const g = i !== void 0;
|
|
7071
|
-
r.innerHTML = g ?
|
|
7079
|
+
r.innerHTML = g ? T1 : S1;
|
|
7072
7080
|
const m = g ? n.exitFullscreen : n.fullscreen;
|
|
7073
7081
|
r.setAttribute("aria-label", m), r.title = m, r.setAttribute("aria-pressed", String(g)), t.classList.toggle("tf-fullscreen", g), t.classList.toggle("tf-fullscreen-overlay", i === "overlay");
|
|
7074
7082
|
}, c = () => s.fullscreenElement ?? s.webkitFullscreenElement ?? null, h = () => {
|
|
@@ -7114,20 +7122,20 @@ function Ey(t, e, n) {
|
|
|
7114
7122
|
}
|
|
7115
7123
|
};
|
|
7116
7124
|
}
|
|
7117
|
-
const Qc = "tinyfly-choices-style",
|
|
7125
|
+
const Qc = "tinyfly-choices-style", A1 = `
|
|
7118
7126
|
[data-tinyfly-choose] { cursor: pointer; }
|
|
7119
7127
|
[data-tinyfly-choose]:focus-visible { outline: 2px solid var(--tf-ctl-accent, #c2410c); outline-offset: 2px; }
|
|
7120
7128
|
`;
|
|
7121
|
-
function $
|
|
7129
|
+
function $1(t) {
|
|
7122
7130
|
if (t.getElementById(Qc)) return;
|
|
7123
7131
|
const e = t.createElement("style");
|
|
7124
|
-
e.id = Qc, e.textContent =
|
|
7132
|
+
e.id = Qc, e.textContent = A1, t.head.appendChild(e);
|
|
7125
7133
|
}
|
|
7126
|
-
function
|
|
7134
|
+
function P1(t, e) {
|
|
7127
7135
|
const n = Array.from(e.querySelectorAll("[data-tinyfly-choose]"));
|
|
7128
7136
|
if (n.length === 0) return () => {
|
|
7129
7137
|
};
|
|
7130
|
-
$
|
|
7138
|
+
$1(e.ownerDocument);
|
|
7131
7139
|
const s = [], o = [];
|
|
7132
7140
|
for (const a of n) {
|
|
7133
7141
|
const l = a.getAttribute("data-tinyfly-choose") ?? "", c = [], h = (p, g) => {
|
|
@@ -7155,7 +7163,7 @@ function Py(t, e) {
|
|
|
7155
7163
|
};
|
|
7156
7164
|
}
|
|
7157
7165
|
const ar = /* @__PURE__ */ new WeakMap(), Sa = /* @__PURE__ */ new WeakMap();
|
|
7158
|
-
let
|
|
7166
|
+
let O1 = 0;
|
|
7159
7167
|
function Is(t, e, n) {
|
|
7160
7168
|
if (t)
|
|
7161
7169
|
try {
|
|
@@ -7165,10 +7173,10 @@ function Is(t, e, n) {
|
|
|
7165
7173
|
return;
|
|
7166
7174
|
}
|
|
7167
7175
|
}
|
|
7168
|
-
async function
|
|
7176
|
+
async function I1(t, e = {}) {
|
|
7169
7177
|
const n = ar.get(t);
|
|
7170
7178
|
if (n) return n;
|
|
7171
|
-
const s = Array.from(t.querySelectorAll("script[data-tinyfly-timeline]")), o = s[0], r = t.getAttribute("data-src"), i =
|
|
7179
|
+
const s = Array.from(t.querySelectorAll("script[data-tinyfly-timeline]")), o = s[0], r = t.getAttribute("data-src"), i = C1(t.getAttribute("data-markers")), a = s.length > 1 || o?.hasAttribute("data-scenario") ? _1(s, i, t) : void 0;
|
|
7172
7180
|
if (a && a.length === 0) return;
|
|
7173
7181
|
let l = o && !a ? Is(o.textContent, "timeline", t) : void 0;
|
|
7174
7182
|
if (!l && r && i) {
|
|
@@ -7185,16 +7193,16 @@ async function Iy(t, e = {}) {
|
|
|
7185
7193
|
...c && { captions: c },
|
|
7186
7194
|
...Is(t.getAttribute("data-options"), "data-options", t)
|
|
7187
7195
|
};
|
|
7188
|
-
|
|
7196
|
+
R1(t);
|
|
7189
7197
|
const u = new vl(t, h), d = { element: t, player: u };
|
|
7190
7198
|
if (ar.set(t, d), t.setAttribute("data-tinyfly-mounted", ""), a) {
|
|
7191
7199
|
const f = t.getAttribute("data-scenario") ?? void 0;
|
|
7192
|
-
await u.loadScenarios(a, { initial: a.some((p) => p.id === f) ? f : void 0 }), Sa.set(t,
|
|
7200
|
+
await u.loadScenarios(a, { initial: a.some((p) => p.id === f) ? f : void 0 }), Sa.set(t, P1(u, t));
|
|
7193
7201
|
} else
|
|
7194
7202
|
await u.load(l ?? r);
|
|
7195
7203
|
if (t.getAttribute("data-controls") !== "false") {
|
|
7196
7204
|
const f = Is(t.getAttribute("data-labels"), "data-labels", t), p = t.querySelector("figcaption"), g = t.getAttribute("data-scenario-legend"), m = t.getAttribute("data-scenario-control");
|
|
7197
|
-
d.controls =
|
|
7205
|
+
d.controls = M1(u, t, {
|
|
7198
7206
|
...e.controls,
|
|
7199
7207
|
...t.getAttribute("data-fullscreen") === "true" ? { fullscreen: !0 } : {},
|
|
7200
7208
|
...m === "slider" || m === "buttons" ? { scenarioControl: m } : {},
|
|
@@ -7205,7 +7213,7 @@ async function Iy(t, e = {}) {
|
|
|
7205
7213
|
}
|
|
7206
7214
|
return d;
|
|
7207
7215
|
}
|
|
7208
|
-
function
|
|
7216
|
+
function _1(t, e, n) {
|
|
7209
7217
|
const s = [];
|
|
7210
7218
|
return t.forEach((o, r) => {
|
|
7211
7219
|
const i = Is(o.textContent, "timeline", n);
|
|
@@ -7222,33 +7230,33 @@ function _y(t, e, n) {
|
|
|
7222
7230
|
function ud(t, e) {
|
|
7223
7231
|
return t.config.markers?.length ? t : { ...t, config: { ...t.config, markers: e.map((n, s) => ({ id: `step-${s + 1}`, time: n })) } };
|
|
7224
7232
|
}
|
|
7225
|
-
function
|
|
7233
|
+
function C1(t) {
|
|
7226
7234
|
if (!t) return;
|
|
7227
7235
|
const e = t.split(/[\s,]+/).filter(Boolean).map(Number).filter((n) => Number.isFinite(n) && n >= 0).sort((n, s) => n - s);
|
|
7228
7236
|
return e.length > 0 ? e : void 0;
|
|
7229
7237
|
}
|
|
7230
|
-
async function
|
|
7238
|
+
async function H1(t = document, e = {}) {
|
|
7231
7239
|
const n = Array.from(t.querySelectorAll("[data-tinyfly-embed]"));
|
|
7232
|
-
return (await Promise.all(n.map((o) =>
|
|
7240
|
+
return (await Promise.all(n.map((o) => I1(o, e)))).filter((o) => o !== void 0);
|
|
7233
7241
|
}
|
|
7234
7242
|
function o4(t) {
|
|
7235
7243
|
const e = ar.get(t);
|
|
7236
7244
|
e && (Sa.get(t)?.(), Sa.delete(t), e.controls?.destroy(), e.player.destroy(), ar.delete(t), t.removeAttribute("data-tinyfly-mounted"));
|
|
7237
7245
|
}
|
|
7238
|
-
function
|
|
7246
|
+
function R1(t) {
|
|
7239
7247
|
const e = t.querySelector("svg");
|
|
7240
7248
|
if (!e || e.hasAttribute("role") || e.hasAttribute("aria-hidden")) return;
|
|
7241
7249
|
const n = t.getAttribute("data-alt"), s = t.querySelector("figcaption");
|
|
7242
|
-
e.setAttribute("role", "img"), n ? e.setAttribute("aria-label", n) : s && (s.id ||= `tinyfly-caption-${++
|
|
7250
|
+
e.setAttribute("role", "img"), n ? e.setAttribute("aria-label", n) : s && (s.id ||= `tinyfly-caption-${++O1}`, e.setAttribute("aria-labelledby", s.id));
|
|
7243
7251
|
}
|
|
7244
|
-
function
|
|
7252
|
+
function F1() {
|
|
7245
7253
|
if (!(typeof document < "u" ? document.currentScript : null)?.hasAttribute("data-tinyfly-auto")) return;
|
|
7246
7254
|
const e = () => {
|
|
7247
|
-
|
|
7255
|
+
H1();
|
|
7248
7256
|
};
|
|
7249
7257
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e, { once: !0 }) : e();
|
|
7250
7258
|
}
|
|
7251
|
-
class
|
|
7259
|
+
class L1 {
|
|
7252
7260
|
container;
|
|
7253
7261
|
containerA;
|
|
7254
7262
|
containerB;
|
|
@@ -7518,7 +7526,7 @@ class Fy {
|
|
|
7518
7526
|
}
|
|
7519
7527
|
}
|
|
7520
7528
|
async function r4(t, e, n = {}) {
|
|
7521
|
-
const s = new
|
|
7529
|
+
const s = new L1(t, { ...n, autoplay: !0 });
|
|
7522
7530
|
return await s.load(e), s;
|
|
7523
7531
|
}
|
|
7524
7532
|
const i4 = { type: "none", duration: 0 }, Ct = (t) => ({ description: t, unit: "degrees" }), At = (t, e = 0, n = 1) => ({ description: t, unit: `${e}..${n}`, min: e, max: n }), dd = {
|
|
@@ -7578,13 +7586,13 @@ const i4 = { type: "none", duration: 0 }, Ct = (t) => ({ description: t, unit: "
|
|
|
7578
7586
|
roll: Ct("Hand rolled to show the back or the palm")
|
|
7579
7587
|
};
|
|
7580
7588
|
let pd;
|
|
7581
|
-
function
|
|
7589
|
+
function W1(t) {
|
|
7582
7590
|
pd = t;
|
|
7583
7591
|
}
|
|
7584
|
-
function
|
|
7592
|
+
function N1(t) {
|
|
7585
7593
|
return pd?.(t) ?? {};
|
|
7586
7594
|
}
|
|
7587
|
-
function
|
|
7595
|
+
function D1(t) {
|
|
7588
7596
|
let e = 0;
|
|
7589
7597
|
for (let n = 1; n < t.length; n++) e += Math.hypot(t[n].x - t[n - 1].x, t[n].y - t[n - 1].y);
|
|
7590
7598
|
return e;
|
|
@@ -7593,7 +7601,7 @@ function Ys(t, e) {
|
|
|
7593
7601
|
const n = Math.min(1, Math.max(0, e));
|
|
7594
7602
|
if (t.length < 2 || n === 1) return t.slice();
|
|
7595
7603
|
if (n === 0) return t.slice(0, 1);
|
|
7596
|
-
let s =
|
|
7604
|
+
let s = D1(t) * n;
|
|
7597
7605
|
const o = [t[0]];
|
|
7598
7606
|
for (let r = 1; r < t.length; r++) {
|
|
7599
7607
|
const i = t[r - 1], a = t[r], l = Math.hypot(a.x - i.x, a.y - i.y);
|
|
@@ -7634,12 +7642,12 @@ function Ta(t, e, n) {
|
|
|
7634
7642
|
t.beginPath(), t.moveTo(y[0].x, y[0].y);
|
|
7635
7643
|
let w = 0;
|
|
7636
7644
|
for (let b = 1; b < y.length; b++) {
|
|
7637
|
-
const S =
|
|
7645
|
+
const S = B1(y[b - 1], y[b], s, k[b - 1]), E = p[b - 1];
|
|
7638
7646
|
if (w + E <= g) {
|
|
7639
7647
|
t.bezierCurveTo(S[1].x, S[1].y, S[2].x, S[2].y, S[3].x, S[3].y), w += E;
|
|
7640
7648
|
continue;
|
|
7641
7649
|
}
|
|
7642
|
-
const v =
|
|
7650
|
+
const v = z1(S, E === 0 ? 1 : (g - w) / E);
|
|
7643
7651
|
t.bezierCurveTo(v[1].x, v[1].y, v[2].x, v[2].y, v[3].x, v[3].y);
|
|
7644
7652
|
break;
|
|
7645
7653
|
}
|
|
@@ -7682,7 +7690,7 @@ function Ta(t, e, n) {
|
|
|
7682
7690
|
}
|
|
7683
7691
|
};
|
|
7684
7692
|
}
|
|
7685
|
-
function
|
|
7693
|
+
function B1(t, e, n, s) {
|
|
7686
7694
|
const o = e.x - t.x, r = e.y - t.y, i = Math.hypot(o, r) || 1, a = n * Math.min(1.5, Math.max(0.3, i / 80)), l = -r / i, c = o / i;
|
|
7687
7695
|
return [
|
|
7688
7696
|
t,
|
|
@@ -7691,7 +7699,7 @@ function By(t, e, n, s) {
|
|
|
7691
7699
|
e
|
|
7692
7700
|
];
|
|
7693
7701
|
}
|
|
7694
|
-
function
|
|
7702
|
+
function z1([t, e, n, s], o) {
|
|
7695
7703
|
const r = (u, d) => ({ x: u.x + (d.x - u.x) * o, y: u.y + (d.y - u.y) * o }), i = r(t, e), a = r(e, n), l = r(n, s), c = r(i, a), h = r(a, l);
|
|
7696
7704
|
return [t, i, c, r(c, h)];
|
|
7697
7705
|
}
|
|
@@ -7750,7 +7758,7 @@ function yd(t) {
|
|
|
7750
7758
|
return yi.size < 512 && yi.set(t, n), n;
|
|
7751
7759
|
}
|
|
7752
7760
|
Zt([-3, -5, -4]);
|
|
7753
|
-
const
|
|
7761
|
+
const q1 = (t, e, n) => {
|
|
7754
7762
|
const s = Math.min(1, Math.max(0, (n - t) / (e - t)));
|
|
7755
7763
|
return s * s * (3 - 2 * s);
|
|
7756
7764
|
};
|
|
@@ -7764,10 +7772,10 @@ function bd(t, e, n) {
|
|
|
7764
7772
|
else if (o.light === "directional")
|
|
7765
7773
|
i = o.intensity * Math.max(0, -Ce(e, o.direction));
|
|
7766
7774
|
else {
|
|
7767
|
-
const a = oe(o.position, t), l =
|
|
7775
|
+
const a = oe(o.position, t), l = Lr(a), c = l > 0 ? fn(a, 1 / l) : e, h = o.range ? Math.max(0, 1 - l / o.range) ** 2 : 1;
|
|
7768
7776
|
if (i = o.intensity * Math.max(0, Ce(e, c)) * h, o.light === "spot") {
|
|
7769
7777
|
const u = Math.cos(o.angle * Math.PI / 180), d = Math.cos(o.angle * 0.8 * Math.PI / 180);
|
|
7770
|
-
i *=
|
|
7778
|
+
i *= q1(u, d, -Ce(c, o.direction));
|
|
7771
7779
|
}
|
|
7772
7780
|
}
|
|
7773
7781
|
s[0] += r[0] * i, s[1] += r[1] * i, s[2] += r[2] * i;
|
|
@@ -7777,7 +7785,7 @@ function bd(t, e, n) {
|
|
|
7777
7785
|
function wd(t, e) {
|
|
7778
7786
|
return t ? Math.min(1, Math.max(0, (e - t.near) / (t.far - t.near))) : 0;
|
|
7779
7787
|
}
|
|
7780
|
-
function
|
|
7788
|
+
function j1([t, e, n]) {
|
|
7781
7789
|
const s = Math.max(t, e, n), o = Math.min(t, e, n), r = (s + o) / 2;
|
|
7782
7790
|
if (s === o) return [0, 0, r];
|
|
7783
7791
|
const i = s - o, a = r > 0.5 ? i / (2 - s - o) : i / (s + o);
|
|
@@ -7791,16 +7799,16 @@ function wi(t, e, n) {
|
|
|
7791
7799
|
const s = (e - t + 540) % 360 - 180;
|
|
7792
7800
|
return t + Math.sign(s) * Math.min(Math.abs(s), n);
|
|
7793
7801
|
}
|
|
7794
|
-
const eh = 335,
|
|
7802
|
+
const eh = 335, Y1 = 50, ki = /* @__PURE__ */ new Map();
|
|
7795
7803
|
function kd(t) {
|
|
7796
7804
|
const e = ki.get(t);
|
|
7797
7805
|
if (e) return e;
|
|
7798
7806
|
const n = t.trim();
|
|
7799
7807
|
if (!/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(n) && !n.startsWith("rgb(")) return;
|
|
7800
|
-
const [s, o, r] =
|
|
7808
|
+
const [s, o, r] = j1(yd(n)), i = o < 0.08, a = {
|
|
7801
7809
|
shadow: bi(i ? [230, 0.1, r * 0.82] : [wi(s, eh, 8), o * 0.82 + 0.02, r * 0.8]),
|
|
7802
7810
|
core: bi(i ? [235, 0.14, r * 0.66] : [wi(s, eh, 14), o * 0.85 + 0.04, r * 0.64]),
|
|
7803
|
-
highlight: bi(i ? [s, o, r + (1 - r) * 0.5] : [wi(s,
|
|
7811
|
+
highlight: bi(i ? [s, o, r + (1 - r) * 0.5] : [wi(s, Y1, 8), o * 0.9, r + (1 - r) * 0.4])
|
|
7804
7812
|
};
|
|
7805
7813
|
return ki.size < 512 && ki.set(t, a), a;
|
|
7806
7814
|
}
|
|
@@ -7808,7 +7816,7 @@ const ko = (t, e) => {
|
|
|
7808
7816
|
if (!Number.isFinite(t) || t < 0 || t > 1) throw new Error(`illustrated: ${e} must be 0..1`);
|
|
7809
7817
|
return t;
|
|
7810
7818
|
};
|
|
7811
|
-
function
|
|
7819
|
+
function K1(t = {}, e = [-0.8, -0.6]) {
|
|
7812
7820
|
const n = t.light ?? e;
|
|
7813
7821
|
if (n.length !== 2 || !n.every(Number.isFinite) || Math.hypot(...n) === 0)
|
|
7814
7822
|
throw new Error("illustrated: light must be a finite nonzero 2D vector");
|
|
@@ -7844,7 +7852,7 @@ function nh(t, e) {
|
|
|
7844
7852
|
const n = t.reduce((r, i) => r + i.x, 0) / t.length, s = t.reduce((r, i) => r + i.y, 0) / t.length;
|
|
7845
7853
|
return t.reduce((r, i, a) => r + e[a].x * (i.x - n) + e[a].y * (i.y - s), 0) >= 0 ? 1 : -1;
|
|
7846
7854
|
}
|
|
7847
|
-
function
|
|
7855
|
+
function X1(t) {
|
|
7848
7856
|
let e = 0, n = 0;
|
|
7849
7857
|
return t.forEach((s, o) => {
|
|
7850
7858
|
const r = t[(o + 1) % t.length];
|
|
@@ -7856,7 +7864,7 @@ function vo(t, e) {
|
|
|
7856
7864
|
for (const n of e.slice(1)) t.lineTo(n.x, n.y);
|
|
7857
7865
|
t.closePath();
|
|
7858
7866
|
}
|
|
7859
|
-
function
|
|
7867
|
+
function U1(t, e, n, s) {
|
|
7860
7868
|
const [o, r] = s.light, i = (u) => {
|
|
7861
7869
|
const d = u.x * o + u.y * r;
|
|
7862
7870
|
return 1 - s.weight * d * (d > 0 ? 0.55 : 1);
|
|
@@ -7870,7 +7878,7 @@ function Uy(t, e, n, s) {
|
|
|
7870
7878
|
for (const y of [0, u.length - 1])
|
|
7871
7879
|
t.beginPath(), t.arc(u[y].x, u[y].y, f[y] / 2, 0, Math.PI * 2), t.fill();
|
|
7872
7880
|
}, l = (u, d) => {
|
|
7873
|
-
const f = kd(d), p =
|
|
7881
|
+
const f = kd(d), p = X1(u);
|
|
7874
7882
|
if (!f || p < n * 1.5) return;
|
|
7875
7883
|
const g = xi(u, Math.max(2, p * 0.25), !0), m = Si(g, !0), y = nh(g, m), k = m.map((v) => ({ x: v.x * y, y: v.y * y })), w = k.map((v) => v.x * o + v.y * r), b = t.globalAlpha, S = (v, x, M, T) => {
|
|
7876
7884
|
if (T <= 0) return;
|
|
@@ -7926,10 +7934,10 @@ function lr(t, e, n, s, o, r = 0, i = 1, a = 40) {
|
|
|
7926
7934
|
});
|
|
7927
7935
|
}
|
|
7928
7936
|
function Br(t, e) {
|
|
7929
|
-
if (e.look === "pencil") return
|
|
7937
|
+
if (e.look === "pencil") return J1(t, e);
|
|
7930
7938
|
if (e.look === "illustrated") {
|
|
7931
7939
|
if (!e.illustrated) throw new Error("createPen: the illustrated look needs its resolved style");
|
|
7932
|
-
return
|
|
7940
|
+
return U1(t, e.ink, e.lineWidth, e.illustrated);
|
|
7933
7941
|
}
|
|
7934
7942
|
return vd(t, e.ink, e.look);
|
|
7935
7943
|
}
|
|
@@ -7967,7 +7975,7 @@ function vd(t, e, n, s = !0) {
|
|
|
7967
7975
|
}
|
|
7968
7976
|
};
|
|
7969
7977
|
}
|
|
7970
|
-
function
|
|
7978
|
+
function G1(t, e) {
|
|
7971
7979
|
const n = [t[0]];
|
|
7972
7980
|
let s = 0;
|
|
7973
7981
|
for (let i = 1; i < t.length; i++) {
|
|
@@ -7982,7 +7990,7 @@ function Gy(t, e) {
|
|
|
7982
7990
|
const o = t[t.length - 1], r = n[n.length - 1];
|
|
7983
7991
|
return Math.hypot(o.x - r.x, o.y - r.y) > e * 0.25 ? n.push(o) : n[n.length - 1] = o, n;
|
|
7984
7992
|
}
|
|
7985
|
-
function
|
|
7993
|
+
function V1(t, e) {
|
|
7986
7994
|
const n = t.length;
|
|
7987
7995
|
return t.map((s, o) => {
|
|
7988
7996
|
const r = t[Math.max(0, o - 1)], i = t[Math.min(n - 1, o + 1)], a = Math.hypot(i.x - r.x, i.y - r.y) || 1, l = e(n === 1 ? 0 : o / (n - 1));
|
|
@@ -7997,13 +8005,13 @@ function sh(t) {
|
|
|
7997
8005
|
})), n = e.reduce((s, o) => s + o.amount, 0);
|
|
7998
8006
|
return (s) => e.reduce((o, r) => o + r.amount * Math.sin(Math.PI * 2 * r.frequency * s + r.phase), 0) / n;
|
|
7999
8007
|
}
|
|
8000
|
-
function
|
|
8008
|
+
function J1(t, e) {
|
|
8001
8009
|
const n = e.pencil ?? {}, s = e.ink, o = n.roughness ?? Math.max(1, e.lineWidth * 0.12), r = Math.max(1, Math.round(n.passes ?? 2)), i = Math.min(1, Math.max(0, n.pressure ?? 0.25)), a = Math.min(1, Math.max(0, n.rubbedOut ?? 0.15)), l = md(e.time, n.boil ?? 8);
|
|
8002
8010
|
let c = 0;
|
|
8003
8011
|
const h = (p, g, m = !1) => Mn(ue(`${e.seed}:${m ? "paper" : l}:${p}:${g}`)), u = (p, g, m, y, k, w = 0) => {
|
|
8004
8012
|
if (p.length < 2) return;
|
|
8005
8013
|
const b = p.slice(1).reduce((A, P, O) => A + Math.hypot(P.x - p[O].x, P.y - p[O].y), 0);
|
|
8006
|
-
let S =
|
|
8014
|
+
let S = G1(p, Math.max(1.5, Math.min(e.lineWidth * 0.8, b / 24)));
|
|
8007
8015
|
if (w > 0 && S.length >= 2) {
|
|
8008
8016
|
const [A, P] = [S[S.length - 2], S[S.length - 1]], O = Math.hypot(P.x - A.x, P.y - A.y) || 1;
|
|
8009
8017
|
S = [...S, { x: P.x + (P.x - A.x) / O * w, y: P.y + (P.y - A.y) / O * w }];
|
|
@@ -8023,7 +8031,7 @@ function Jy(t, e) {
|
|
|
8023
8031
|
for (let S = 0; S < r; S++) {
|
|
8024
8032
|
const E = S === 0;
|
|
8025
8033
|
b.forEach((v, x) => {
|
|
8026
|
-
const M = h(m, S * 10 + x), T = v === 0 ? p :
|
|
8034
|
+
const M = h(m, S * 10 + x), T = v === 0 ? p : V1(p, (P) => g(P) * v * Math.sqrt(Math.sin(Math.PI * P))), A = !E && v === 0 ? e.lineWidth * (0.3 + M.next() * 0.8) : 0;
|
|
8027
8035
|
u(T, (P) => g(P) * (w ? 0.5 : 1) * (E ? 1 : 0.6), M, E ? 0.85 : 0.45, o * (E ? 0.6 : 1), A);
|
|
8028
8036
|
});
|
|
8029
8037
|
}
|
|
@@ -8061,7 +8069,7 @@ function Jy(t, e) {
|
|
|
8061
8069
|
}
|
|
8062
8070
|
};
|
|
8063
8071
|
}
|
|
8064
|
-
const
|
|
8072
|
+
const Z1 = ["thumb", "index", "middle", "ring", "pinky"], Rt = {
|
|
8065
8073
|
"thumb.curl": 0.15,
|
|
8066
8074
|
"thumb.across": 0.15,
|
|
8067
8075
|
"index.curl": 0.12,
|
|
@@ -8074,7 +8082,7 @@ const Zy = ["thumb", "index", "middle", "ring", "pinky"], Rt = {
|
|
|
8074
8082
|
tilt: 0,
|
|
8075
8083
|
roll: 0
|
|
8076
8084
|
};
|
|
8077
|
-
function
|
|
8085
|
+
function Lt(t = {}) {
|
|
8078
8086
|
return { ...Rt, ...t };
|
|
8079
8087
|
}
|
|
8080
8088
|
const ee = (t, e, n, s, o) => ({
|
|
@@ -8085,22 +8093,22 @@ const ee = (t, e, n, s, o) => ({
|
|
|
8085
8093
|
"pinky.curl": o
|
|
8086
8094
|
}), Tt = {
|
|
8087
8095
|
relaxed: Rt,
|
|
8088
|
-
open:
|
|
8089
|
-
spread:
|
|
8090
|
-
flat:
|
|
8091
|
-
fist:
|
|
8092
|
-
point:
|
|
8096
|
+
open: Lt({ ...ee(0, 0, 0, 0, 0), "thumb.across": 0, spread: 0.55 }),
|
|
8097
|
+
spread: Lt({ ...ee(0, 0, 0, 0, 0), "thumb.across": 0, spread: 1 }),
|
|
8098
|
+
flat: Lt({ ...ee(0, 0, 0, 0, 0), "thumb.across": 0.35, spread: 0 }),
|
|
8099
|
+
fist: Lt({ ...ee(0.7, 1, 1, 1, 1), "thumb.across": 0.9, spread: 0 }),
|
|
8100
|
+
point: Lt({ ...ee(0.75, 0, 1, 1, 1), "thumb.across": 0.9, spread: 0 }),
|
|
8093
8101
|
/** The fist on its side, knuckles toward the viewer, the thumb up */
|
|
8094
|
-
thumbsUp:
|
|
8095
|
-
peace:
|
|
8096
|
-
ok:
|
|
8097
|
-
pinch:
|
|
8098
|
-
cupped:
|
|
8099
|
-
wave:
|
|
8102
|
+
thumbsUp: Lt({ ...ee(0, 1, 1, 1, 1), "thumb.across": 0, spread: 0, roll: 70 }),
|
|
8103
|
+
peace: Lt({ ...ee(0.75, 0, 0, 1, 1), "thumb.across": 0.9, spread: 1 }),
|
|
8104
|
+
ok: Lt({ ...ee(0.12, 0.6, 0.1, 0.15, 0.2), "thumb.across": 0.55, spread: 0.6 }),
|
|
8105
|
+
pinch: Lt({ ...ee(0.1, 0.65, 0.75, 0.85, 0.9), "thumb.across": 0.55, spread: 0 }),
|
|
8106
|
+
cupped: Lt({ ...ee(0.25, 0.4, 0.4, 0.4, 0.4), "thumb.across": 0.4, spread: 0.05, turn: 2 }),
|
|
8107
|
+
wave: Lt({ ...ee(0, 0.05, 0.05, 0.1, 0.12), "thumb.across": 0, spread: 0.7, turn: 2 }),
|
|
8100
8108
|
/** Holding a pencil to write: thumb and middle finger pinch it, the index finger rests on top */
|
|
8101
|
-
pencilGrip:
|
|
8109
|
+
pencilGrip: Lt({ ...ee(0.1, 0.6, 0.72, 0.88, 0.95), "thumb.across": 0.5, spread: 0, turn: 0.8, bend: 10 }),
|
|
8102
8110
|
/** Holding a handle, a cup or a bar: every finger wrapped round it */
|
|
8103
|
-
hold:
|
|
8111
|
+
hold: Lt({ ...ee(0.5, 0.7, 0.72, 0.74, 0.76), "thumb.across": 0.75, spread: 0, turn: 1 })
|
|
8104
8112
|
};
|
|
8105
8113
|
function Ks(t, e, n) {
|
|
8106
8114
|
const s = { ...t };
|
|
@@ -8110,7 +8118,7 @@ function Ks(t, e, n) {
|
|
|
8110
8118
|
}
|
|
8111
8119
|
return s;
|
|
8112
8120
|
}
|
|
8113
|
-
const
|
|
8121
|
+
const Q1 = {
|
|
8114
8122
|
index: { knuckle: [-0.16, 0.47, -0.02], bones: [0.2, 0.125, 0.1], width: 0.125, fan: -1 },
|
|
8115
8123
|
middle: { knuckle: [-0.055, 0.49, -0.02], bones: [0.22, 0.135, 0.1], width: 0.13, fan: -0.2 },
|
|
8116
8124
|
ring: { knuckle: [0.05, 0.475, -0.02], bones: [0.2, 0.125, 0.1], width: 0.122, fan: 0.55 },
|
|
@@ -8183,8 +8191,8 @@ function $a(t, e = {}) {
|
|
|
8183
8191
|
return C > 1e-6 * s ? { x: O.x / C, y: O.y / C } : { x: 0, y: 0 };
|
|
8184
8192
|
}, E = {
|
|
8185
8193
|
thumb: cb(n["thumb.curl"] ?? 0, n["thumb.across"] ?? 0, l, c)
|
|
8186
|
-
}, v = a ? tb :
|
|
8187
|
-
for (const P of
|
|
8194
|
+
}, v = a ? tb : Q1;
|
|
8195
|
+
for (const P of Z1) {
|
|
8188
8196
|
const O = v[P];
|
|
8189
8197
|
O && (E[P] = lb(h(O), n[`${P}.curl`] ?? 0, n.spread ?? 0));
|
|
8190
8198
|
}
|
|
@@ -8529,7 +8537,7 @@ function xb(t) {
|
|
|
8529
8537
|
const e = Math.abs(Math.sin(t / 65)), n = 0.55 + 0.45 * Math.sin(t / 310);
|
|
8530
8538
|
return e * n;
|
|
8531
8539
|
}
|
|
8532
|
-
const Td = 0.12, lh = 0.46, Sb = 1 - 2 * Td, Tb = 0.1, Eb = 0.21, Ab = 0.19, Ia = 0.24, hr = 0.22, Ed = 0.12, $b = 0.14, Ad = 0.33, ch = 0.7, hh = 0.3, Pb = 0.35, Ob = [1.7, 1.05], Ib = [1.3, 0.75], uh = [1.45, 0.85], _b = [1.15, 0.75], dh = 0.06, Cb = 0.7, Hb = 0.65, $d = 0.075, Rb = 0.3,
|
|
8540
|
+
const Td = 0.12, lh = 0.46, Sb = 1 - 2 * Td, Tb = 0.1, Eb = 0.21, Ab = 0.19, Ia = 0.24, hr = 0.22, Ed = 0.12, $b = 0.14, Ad = 0.33, ch = 0.7, hh = 0.3, Pb = 0.35, Ob = [1.7, 1.05], Ib = [1.3, 0.75], uh = [1.45, 0.85], _b = [1.15, 0.75], dh = 0.06, Cb = 0.7, Hb = 0.65, $d = 0.075, Rb = 0.3, Fb = 0.02, Lb = 0.012, Wb = 12, Nb = 0.25, Mo = 90, Db = 0.25, Bb = 0.04, Pd = 0.01, an = (t) => Math.min(1, Math.max(0, t ?? 0));
|
|
8533
8541
|
function a4(t, e = 1) {
|
|
8534
8542
|
return hr * t * e;
|
|
8535
8543
|
}
|
|
@@ -8580,7 +8588,7 @@ function Cd(t, e) {
|
|
|
8580
8588
|
), D = 1 - an((t.rise ?? 0) / Bb), Y = (p ? Math.min(1, c / Db) : 1) * D;
|
|
8581
8589
|
w = (lh - R) * Y * n * s;
|
|
8582
8590
|
}
|
|
8583
|
-
const b = -lh * n * s + w, S = -a * n * s + w, E = p ? 0 : (
|
|
8591
|
+
const b = -lh * n * s + w, S = -a * n * s + w, E = p ? 0 : (Fb * an(t.turn) + Lb * c) * n * s, v = le(t.bend ?? 0), x = { end: gh(b, S, v, 1), bend: v };
|
|
8584
8592
|
let M;
|
|
8585
8593
|
if (v !== 0) {
|
|
8586
8594
|
M = [];
|
|
@@ -8850,7 +8858,7 @@ function Ub(t, e, n = {}, s = 0) {
|
|
|
8850
8858
|
t.translate(0, v), t.scale(o.headRx / o.r, o.headRy / o.r), qb(t, e, o.r, 0, r, o.lineWidth);
|
|
8851
8859
|
}), u(i.overHead), u(i.front), t.restore(), n.label && (t.save(), t.fillStyle = r, t.font = n.labelFont ?? `700 ${Math.round(o.height * 0.11)}px sans-serif`, t.textAlign = "center", t.textBaseline = "bottom", t.fillText(n.label, 0, -o.height * o.stretch - 0.04 * o.height + o.drop), t.restore());
|
|
8852
8860
|
}
|
|
8853
|
-
function
|
|
8861
|
+
function Fd(t, e, n, s) {
|
|
8854
8862
|
const o = { ...t }, r = t.gait && s?.[t.gait] || t.gait;
|
|
8855
8863
|
let i = t.walking > 0 ? Xs(o, wb(r, t.walk, o), t.walking) : o, a = Vb(t);
|
|
8856
8864
|
const l = t.dancing ?? 0;
|
|
@@ -8864,9 +8872,9 @@ function Ld(t, e, n, s) {
|
|
|
8864
8872
|
return t.talk > 0 && (i = { ...i, mouth: Math.max(i.mouth, t.talk * xb(e)) }), { pose: i, hands: a };
|
|
8865
8873
|
}
|
|
8866
8874
|
function Gb(t, e, n, s) {
|
|
8867
|
-
return
|
|
8875
|
+
return Fd(t, e, n, s).pose;
|
|
8868
8876
|
}
|
|
8869
|
-
const
|
|
8877
|
+
const Ld = (t, e) => (t.facing ?? e.facing ?? 1) < 0 ? -1 : 1, ur = (t, e) => `hand.${t}.${e}`;
|
|
8870
8878
|
function Vb(t) {
|
|
8871
8879
|
const e = (o) => {
|
|
8872
8880
|
if (typeof t[ur(o, "spread")] == "number")
|
|
@@ -8896,8 +8904,8 @@ function Wd(t) {
|
|
|
8896
8904
|
figureDance: t.dance,
|
|
8897
8905
|
figureGaits: t.cast?.gaits,
|
|
8898
8906
|
draw(i, a, l) {
|
|
8899
|
-
const c = a.props, h =
|
|
8900
|
-
i.translate(s / 2, n), Ub(i, h.pose, Jb({ ...e, rubber: c.rubber, facing:
|
|
8907
|
+
const c = a.props, h = Fd(c, l, t.dance, t.cast?.gaits);
|
|
8908
|
+
i.translate(s / 2, n), Ub(i, h.pose, Jb({ ...e, rubber: c.rubber, facing: Ld(c, e) }, h.hands), l);
|
|
8901
8909
|
}
|
|
8902
8910
|
};
|
|
8903
8911
|
}
|
|
@@ -8913,7 +8921,7 @@ function Zb(t, e) {
|
|
|
8913
8921
|
props: n,
|
|
8914
8922
|
// Read when asked: the list is registered by the acting module (see figure-actions).
|
|
8915
8923
|
get actions() {
|
|
8916
|
-
return
|
|
8924
|
+
return N1(e);
|
|
8917
8925
|
}
|
|
8918
8926
|
};
|
|
8919
8927
|
}
|
|
@@ -8924,7 +8932,7 @@ function Nd(t, e, n) {
|
|
|
8924
8932
|
let r = 0, i = 0;
|
|
8925
8933
|
for (const [c, h] of e.state?.values.get(n) ?? [])
|
|
8926
8934
|
c === "gait" && typeof h == "string" && (o.gait = h), typeof h == "number" && (c === "x" || c === "motionPathX" ? r = h : c === "y" || c === "motionPathY" ? i = h : c in o && (o[c] = h));
|
|
8927
|
-
const a = Gb(o, e.time, t.figureDance, t.figureGaits), l = ke(a, { ...s, rubber: o.rubber, facing:
|
|
8935
|
+
const a = Gb(o, e.time, t.figureDance, t.figureGaits), l = ke(a, { ...s, rubber: o.rubber, facing: Ld(o, s) });
|
|
8928
8936
|
return { pose: a, joints: Xb(l, t.x + r + t.width / 2, t.y + i + t.height) };
|
|
8929
8937
|
}
|
|
8930
8938
|
function Sl(t) {
|
|
@@ -8949,19 +8957,19 @@ function c4(t, e) {
|
|
|
8949
8957
|
}
|
|
8950
8958
|
const Ti = 0.5, Ca = {
|
|
8951
8959
|
/** Flag: fingers together and straight, thumb bent in */
|
|
8952
|
-
pataka:
|
|
8960
|
+
pataka: Lt({ "thumb.curl": 0.3, "thumb.across": 0.6, "index.curl": 0, "middle.curl": 0, "ring.curl": 0, "pinky.curl": 0, spread: 0, turn: 2 }),
|
|
8953
8961
|
/** Pataka with the ring finger bent */
|
|
8954
|
-
tripataka:
|
|
8962
|
+
tripataka: Lt({ "thumb.curl": 0.3, "thumb.across": 0.6, "index.curl": 0, "middle.curl": 0, "ring.curl": 1, "pinky.curl": 0, spread: 0, turn: 2 }),
|
|
8955
8963
|
/** Lotus in bloom: fingers fanned, each a little more curled than the last */
|
|
8956
|
-
alapadma:
|
|
8964
|
+
alapadma: Lt({ "thumb.curl": 0.1, "thumb.across": 0, "index.curl": 0.05, "middle.curl": 0.15, "ring.curl": 0.25, "pinky.curl": 0.35, spread: 1, turn: 2 }),
|
|
8957
8965
|
/** Fist */
|
|
8958
8966
|
mushti: Tt.fist,
|
|
8959
8967
|
/** Fist, thumb up */
|
|
8960
8968
|
shikhara: Tt.thumbsUp,
|
|
8961
8969
|
/** Swan's beak: thumb and index touch, the others fanned */
|
|
8962
|
-
hamsasya:
|
|
8970
|
+
hamsasya: Lt({ "thumb.curl": 0.15, "thumb.across": 0.6, "index.curl": 0.6, "middle.curl": 0, "ring.curl": 0, "pinky.curl": 0, spread: 0.7, turn: 2 }),
|
|
8963
8971
|
/** Bracelet: thumb, index and middle meet, ring and little finger out */
|
|
8964
|
-
katakamukha:
|
|
8972
|
+
katakamukha: Lt({ "thumb.curl": 0.2, "thumb.across": 0.6, "index.curl": 0.65, "middle.curl": 0.7, "ring.curl": 0, "pinky.curl": 0, spread: 0.4, turn: 2 })
|
|
8965
8973
|
};
|
|
8966
8974
|
function dr(t) {
|
|
8967
8975
|
return typeof t != "string" ? t : t in Ca ? Ca[t] : Tt[t];
|
|
@@ -9190,7 +9198,7 @@ function p4(t, e, n = {}) {
|
|
|
9190
9198
|
}
|
|
9191
9199
|
return [...d, ...p];
|
|
9192
9200
|
}
|
|
9193
|
-
const
|
|
9201
|
+
const Fs = { type: "back", mode: "out", overshoot: 1.1 }, Vt = "ease-out-cubic", hw = {
|
|
9194
9202
|
label: "Disco",
|
|
9195
9203
|
bpm: 120,
|
|
9196
9204
|
stance: { leftHip: 10, rightHip: 10, leftKnee: 6, rightKnee: 6 },
|
|
@@ -9320,7 +9328,7 @@ const Ls = { type: "back", mode: "out", overshoot: 1.1 }, Vt = "ease-out-cubic",
|
|
|
9320
9328
|
label: "B-boy stance",
|
|
9321
9329
|
beats: 4,
|
|
9322
9330
|
keys: [
|
|
9323
|
-
{ beat: 0, reset: !0, pose: { leftShoulder: 26, leftElbow: -122, rightShoulder: 22, rightElbow: -118, leftHip: 18, rightHip: 18, leftKnee: 6, rightKnee: 6, lean: -4, headTilt: 10, smile: 0.6, leftEye: 0.6, rightEye: 0.6 }, easing:
|
|
9331
|
+
{ beat: 0, reset: !0, pose: { leftShoulder: 26, leftElbow: -122, rightShoulder: 22, rightElbow: -118, leftHip: 18, rightHip: 18, leftKnee: 6, rightKnee: 6, lean: -4, headTilt: 10, smile: 0.6, leftEye: 0.6, rightEye: 0.6 }, easing: Fs },
|
|
9324
9332
|
{ beat: 2, pose: { headTilt: 14, lean: -6 } }
|
|
9325
9333
|
]
|
|
9326
9334
|
}
|
|
@@ -9403,7 +9411,7 @@ const Ls = { type: "back", mode: "out", overshoot: 1.1 }, Vt = "ease-out-cubic",
|
|
|
9403
9411
|
pointCombo: {
|
|
9404
9412
|
label: "Point combo",
|
|
9405
9413
|
beats: 4,
|
|
9406
|
-
easing:
|
|
9414
|
+
easing: Fs,
|
|
9407
9415
|
keys: [
|
|
9408
9416
|
{ beat: 0, reset: !0, pose: { rightShoulder: 142, rightElbow: 0, leftShoulder: 25, leftElbow: -125, headTilt: 6, lean: -3, lookX: 0.6, lookY: -0.6 }, hands: { right: "point", left: "flat" } },
|
|
9409
9417
|
{ beat: 1, pose: { rightShoulder: -38, headTilt: -6, lean: 3, lookX: -0.3, lookY: 0.5, rightHip: 18 } },
|
|
@@ -9415,9 +9423,9 @@ const Ls = { type: "back", mode: "out", overshoot: 1.1 }, Vt = "ease-out-cubic",
|
|
|
9415
9423
|
label: "Big heart, finger heart",
|
|
9416
9424
|
beats: 4,
|
|
9417
9425
|
keys: [
|
|
9418
|
-
{ beat: 0, reset: !0, pose: { leftShoulder: 165, rightShoulder: 165, leftElbow: 46, rightElbow: 46, headTilt: -8, lean: -4 }, hands: { left: "cupped", right: "cupped" }, easing:
|
|
9426
|
+
{ beat: 0, reset: !0, pose: { leftShoulder: 165, rightShoulder: 165, leftElbow: 46, rightElbow: 46, headTilt: -8, lean: -4 }, hands: { left: "cupped", right: "cupped" }, easing: Fs },
|
|
9419
9427
|
{ beat: 1, pose: { headTilt: 8, lean: 4 } },
|
|
9420
|
-
{ beat: 2, reset: !0, pose: { rightShoulder: 32, rightElbow: 112, rightWrist: 10, leftShoulder: 20, leftElbow: -30, headTilt: 10, leftEye: 0, smile: 1 }, hands: { right: "pinch", left: "relaxed" }, easing:
|
|
9428
|
+
{ beat: 2, reset: !0, pose: { rightShoulder: 32, rightElbow: 112, rightWrist: 10, leftShoulder: 20, leftElbow: -30, headTilt: 10, leftEye: 0, smile: 1 }, hands: { right: "pinch", left: "relaxed" }, easing: Fs },
|
|
9421
9429
|
{ beat: 3, pose: { headTilt: 4 } }
|
|
9422
9430
|
]
|
|
9423
9431
|
},
|
|
@@ -9774,7 +9782,7 @@ const Ls = { type: "back", mode: "out", overshoot: 1.1 }, Vt = "ease-out-cubic",
|
|
|
9774
9782
|
reset: !0,
|
|
9775
9783
|
pose: { leftHip: 6, rightHip: 6, leftKnee: 0, rightKnee: 0, leftAnkle: 65, rightAnkle: 65, rightShoulder: 150, rightElbow: 75, leftShoulder: 30, leftElbow: 20, headTilt: -10, lookY: 0.4 },
|
|
9776
9784
|
hands: { right: "fist", left: "fist" },
|
|
9777
|
-
easing:
|
|
9785
|
+
easing: Fs
|
|
9778
9786
|
},
|
|
9779
9787
|
{ beat: 2, pose: { headTilt: -14, lean: -2 } }
|
|
9780
9788
|
]
|
|
@@ -10218,14 +10226,14 @@ function Pl(t, e, n) {
|
|
|
10218
10226
|
groundY: Math.max(...x.map((M) => M.point.y))
|
|
10219
10227
|
};
|
|
10220
10228
|
}
|
|
10221
|
-
const gr = (t, e) => [t[0] - e[0], t[1] - e[1], t[2] - e[2]],
|
|
10229
|
+
const gr = (t, e) => [t[0] - e[0], t[1] - e[1], t[2] - e[2]], Fa = (t) => {
|
|
10222
10230
|
const e = Math.hypot(t[0], t[1], t[2]) || 1;
|
|
10223
10231
|
return [t[0] / e, t[1] / e, t[2] / e];
|
|
10224
10232
|
};
|
|
10225
10233
|
function Tn(t, e, n) {
|
|
10226
10234
|
const s = n.height, o = ae(90 * (e.turn ?? 0)), r = ae(e.roll ?? 0), i = co(t, e, s), a = Jt(i.root, o), l = (m) => He(gs(gr(Jt(m, o), a), -r), a), c = {};
|
|
10227
10235
|
for (const m of t.chains) c[m.id] = i.chains[m.id].joints3.map(l);
|
|
10228
|
-
const h = l(i.head.center), u = (m) =>
|
|
10236
|
+
const h = l(i.head.center), u = (m) => Fa(gr(l(He(i.head.center, i.head.toBody(m))), h)), d = [u([1, 0, 0]), u([0, 1, 0]), u([0, 0, 1])], f = (m) => {
|
|
10229
10237
|
if ("head" in m) return He(h, fr(d[1], i.head.ry));
|
|
10230
10238
|
const y = c[m.chain];
|
|
10231
10239
|
return y[Math.min(m.joint, y.length - 1)];
|
|
@@ -10245,7 +10253,7 @@ function Ol(t, e, n, s) {
|
|
|
10245
10253
|
if ("head" in A) return He(h, fr(a.head.axes[1], a.head.ry));
|
|
10246
10254
|
const P = c[A.chain];
|
|
10247
10255
|
return P[Math.min(A.joint, P.length - 1)];
|
|
10248
|
-
}, d = s.toView(l), f = gs(Jt([0, 0, 1], r), -ae(e.roll ?? 0)), p =
|
|
10256
|
+
}, d = s.toView(l), f = gs(Jt([0, 0, 1], r), -ae(e.roll ?? 0)), p = Fa(gr(s.toView(He(l, f)), d)), g = s.toScreen(d), m = s.toScreen([d[0] + 1, d[1], d[2]]), y = Math.hypot(m.x - g.x, m.y - g.y), k = (A) => {
|
|
10249
10257
|
const P = s.toView(A);
|
|
10250
10258
|
return { point: s.toScreen(P), depth: P[2] * y };
|
|
10251
10259
|
}, w = {};
|
|
@@ -10259,7 +10267,7 @@ function Ol(t, e, n, s) {
|
|
|
10259
10267
|
depths: P.map((O) => O.depth)
|
|
10260
10268
|
};
|
|
10261
10269
|
}
|
|
10262
|
-
const b = s.toView(h), S = s.toScreen(b), E = s.toScreen([b[0] + 1, b[1], b[2]]), v = Math.hypot(E.x - S.x, E.y - S.y), x = a.head.axes.map((A) =>
|
|
10270
|
+
const b = s.toView(h), S = s.toScreen(b), E = s.toScreen([b[0] + 1, b[1], b[2]]), v = Math.hypot(E.x - S.x, E.y - S.y), x = a.head.axes.map((A) => Fa(gr(s.toView(He(h, A)), b))), M = {
|
|
10263
10271
|
center: S,
|
|
10264
10272
|
depth: b[2] * y,
|
|
10265
10273
|
rx: i.head.rx * v,
|
|
@@ -10287,12 +10295,12 @@ function ls(t, [e, n, s]) {
|
|
|
10287
10295
|
], l = Math.hypot(e, n, s) || 1, c = (o[2] * e + r[2] * n + i[2] * s) / l;
|
|
10288
10296
|
return { point: { x: t.center.x + a[0], y: t.center.y - a[1] }, depth: t.depth + a[2], facing: c };
|
|
10289
10297
|
}
|
|
10290
|
-
const So = (t) => t * 180 / Math.PI, Je = (t, e) => [t[0] - e[0], t[1] - e[1], t[2] - e[2]], Oi = (t, e) => t[0] * e[0] + t[1] * e[1] + t[2] * e[2], qn = (t) => Math.hypot(t[0], t[1], t[2]),
|
|
10298
|
+
const So = (t) => t * 180 / Math.PI, Je = (t, e) => [t[0] - e[0], t[1] - e[1], t[2] - e[2]], Oi = (t, e) => t[0] * e[0] + t[1] * e[1] + t[2] * e[2], qn = (t) => Math.hypot(t[0], t[1], t[2]), La = (t) => {
|
|
10291
10299
|
const e = qn(t) || 1;
|
|
10292
10300
|
return [t[0] / e, t[1] / e, t[2] / e];
|
|
10293
10301
|
}, To = (t) => Math.atan2(Math.sin(t), Math.cos(t));
|
|
10294
10302
|
function bh(t) {
|
|
10295
|
-
const [e, n, s] =
|
|
10303
|
+
const [e, n, s] = La(t);
|
|
10296
10304
|
return { swing: Math.asin(Math.max(-1, Math.min(1, s))), spread: Math.atan2(e, -n) };
|
|
10297
10305
|
}
|
|
10298
10306
|
function Gs(t, e, n, s, o) {
|
|
@@ -10302,9 +10310,9 @@ function Gs(t, e, n, s, o) {
|
|
|
10302
10310
|
if (!t.withAngles) throw new Error(`reach: the ${t.id} plan cannot set angles`);
|
|
10303
10311
|
const i = Pl(t, { ...e, turn: 0, roll: 0, lift: 0 }, { height: o.height, contact: "none" }), a = i.chains[n];
|
|
10304
10312
|
if (qn(Je(s, a.joints3[2])) < o.height * 1e-12) return e;
|
|
10305
|
-
const l = a.joints3[0], c = qn(Je(a.joints3[1], a.joints3[0])), h = qn(Je(a.joints3[2], a.joints3[1])), u = r.parent ? i.chains[r.parent].frames[Math.max(0, (r.at ?? i.chains[r.parent].joints3.length - 1) - 1)] : { swing: 0, spread: 0 }, d = Je(s, l), f = t.angles(e, r), p = (P) => (f[P]?.yaw ?? 0) * Math.PI / 180, g = Math.min(c + h - 1e-6, Math.max(Math.abs(c - h) + 1e-6, qn(d))), m =
|
|
10313
|
+
const l = a.joints3[0], c = qn(Je(a.joints3[1], a.joints3[0])), h = qn(Je(a.joints3[2], a.joints3[1])), u = r.parent ? i.chains[r.parent].frames[Math.max(0, (r.at ?? i.chains[r.parent].joints3.length - 1) - 1)] : { swing: 0, spread: 0 }, d = Je(s, l), f = t.angles(e, r), p = (P) => (f[P]?.yaw ?? 0) * Math.PI / 180, g = Math.min(c + h - 1e-6, Math.max(Math.abs(c - h) + 1e-6, qn(d))), m = La(d), y = r.parent !== null, k = Jt(Yo(r.pole ?? (y ? [0, -0.35, -1] : [0, 0, 1]), u), p(0));
|
|
10306
10314
|
let w = Je(k, [m[0] * Oi(k, m), m[1] * Oi(k, m), m[2] * Oi(k, m)]);
|
|
10307
|
-
qn(w) < 1e-6 && (w = Jt([1, 0, 0], p(0))), w =
|
|
10315
|
+
qn(w) < 1e-6 && (w = Jt([1, 0, 0], p(0))), w = La(w);
|
|
10308
10316
|
const b = (c * c + g * g - h * h) / (2 * c * g), S = Math.sqrt(Math.max(0, 1 - b * b)), E = [
|
|
10309
10317
|
l[0] + c * (b * m[0] + S * w[0]),
|
|
10310
10318
|
l[1] + c * (b * m[1] + S * w[1]),
|
|
@@ -10315,7 +10323,7 @@ function Gs(t, e, n, s, o) {
|
|
|
10315
10323
|
];
|
|
10316
10324
|
return t.withAngles(e, r, A);
|
|
10317
10325
|
}
|
|
10318
|
-
const Un = (t, e) => (t % e + e) % e, wh = (t) => t * t * (3 - 2 * t),
|
|
10326
|
+
const Un = (t, e) => (t % e + e) % e, wh = (t) => t * t * (3 - 2 * t), Fw = (t) => Object.fromEntries(
|
|
10319
10327
|
["left", "right"].flatMap((e) => Object.entries(Tt[t]).map(([n, s]) => [`hand.${e}.${n}`, s]))
|
|
10320
10328
|
);
|
|
10321
10329
|
function Ii(t, e = !1) {
|
|
@@ -10341,7 +10349,7 @@ function Ii(t, e = !1) {
|
|
|
10341
10349
|
"arm.left.bend": -35 * d,
|
|
10342
10350
|
"arm.right.bend": -35 * d,
|
|
10343
10351
|
smile: 0.9,
|
|
10344
|
-
...
|
|
10352
|
+
...Fw(e ? "hold" : "spread")
|
|
10345
10353
|
};
|
|
10346
10354
|
if (!e)
|
|
10347
10355
|
for (const p of Object.keys(o)) p.startsWith("arm.") && (f[p] += (o[p] - f[p]) * d);
|
|
@@ -10391,7 +10399,7 @@ const Wa = {
|
|
|
10391
10399
|
rectangle: { height: 165, bust: 86, underbust: 76, waist: 76, hip: 89 },
|
|
10392
10400
|
invertedTriangle: { height: 165, bust: 98, underbust: 86, waist: 78, hip: 90 },
|
|
10393
10401
|
round: { height: 165, bust: 104, underbust: 92, waist: 98, hip: 104 }
|
|
10394
|
-
}, kh = 0.72, vh = 0.72, Na = 0.68,
|
|
10402
|
+
}, kh = 0.72, vh = 0.72, Na = 0.68, Lw = 0.33, _i = 0.2, Mh = 1.04, Ci = 0.024, Kd = 0.54, Ms = 0.66, Xd = 0.86, Eo = 0.18, Ww = 0.6, Nw = 0.02;
|
|
10395
10403
|
function xh(t, e, n) {
|
|
10396
10404
|
const s = Math.round((e - t) / Nw);
|
|
10397
10405
|
return Array.from({ length: s + 1 }, (o, r) => {
|
|
@@ -10428,7 +10436,7 @@ function Ud(t) {
|
|
|
10428
10436
|
return { height: e, bust: n, underbust: r, waist: s, hip: o };
|
|
10429
10437
|
}
|
|
10430
10438
|
function zw(t, e) {
|
|
10431
|
-
const n = Ud(t), s = (d) => d / n.height, o = Ko(s(n.hip), Na), r = Ko(s(n.waist), vh), i = Ko(s(n.underbust), kh), a = o * Na, l = r * vh, c = i * kh, h = s(n.bust - n.underbust) *
|
|
10439
|
+
const n = Ud(t), s = (d) => d / n.height, o = Ko(s(n.hip), Na), r = Ko(s(n.waist), vh), i = Ko(s(n.underbust), kh), a = o * Na, l = r * vh, c = i * kh, h = s(n.bust - n.underbust) * Lw, u = Math.min(0.25, Math.max(0, n.waist / n.hip - 0.8));
|
|
10432
10440
|
return {
|
|
10433
10441
|
torso: [
|
|
10434
10442
|
{ at: 0, width: o },
|
|
@@ -10527,7 +10535,7 @@ function Xo(t, e) {
|
|
|
10527
10535
|
const Sh = 8, Yw = (t, e, n) => ({ x: t.x + (e.x - t.x) * n, y: t.y + (e.y - t.y) * n }), tn = (t, e) => {
|
|
10528
10536
|
const n = Math.hypot(e.x - t.x, e.y - t.y) || 1;
|
|
10529
10537
|
return { x: (e.x - t.x) / n, y: (e.y - t.y) / n };
|
|
10530
|
-
},
|
|
10538
|
+
}, Ls = (t, e, n) => ({ x: t.x + e.x * n, y: t.y + e.y * n });
|
|
10531
10539
|
function Ao(t, e = 12) {
|
|
10532
10540
|
if (!Number.isInteger(e) || e < 1 || e > 128) throw new Error("organicCenterLine: steps must be an integer from 1 to 128");
|
|
10533
10541
|
if (t.length < 2) return t.map((o) => ({ ...o }));
|
|
@@ -10536,7 +10544,7 @@ function Ao(t, e = 12) {
|
|
|
10536
10544
|
return l > 1e-6 ? { x: (i.x + a.x) / l, y: (i.y + a.y) / l } : a;
|
|
10537
10545
|
}), s = [];
|
|
10538
10546
|
for (let o = 0; o < t.length - 1; o++) {
|
|
10539
|
-
const r = t[o], i = t[o + 1], a = Math.hypot(i.x - r.x, i.y - r.y) * 0.28, l =
|
|
10547
|
+
const r = t[o], i = t[o + 1], a = Math.hypot(i.x - r.x, i.y - r.y) * 0.28, l = Ls(r, n[o], a), c = Ls(i, n[o + 1], -a);
|
|
10540
10548
|
for (let h = o === 0 ? 0 : 1; h <= e; h++) {
|
|
10541
10549
|
const u = h / e, d = 1 - u;
|
|
10542
10550
|
s.push({
|
|
@@ -10557,13 +10565,13 @@ function $o(t, e, n = 1) {
|
|
|
10557
10565
|
let d = tn(h, u);
|
|
10558
10566
|
Math.hypot(d.x, d.y) < 1e-6 && (d = { x: 0, y: 1 });
|
|
10559
10567
|
const f = { x: -d.y, y: d.x }, p = c / Math.max(1, t.length - 1), { left: g, right: m } = e(p), y = tn(h, l), k = tn(l, u), w = y.x * k.y - y.y * k.x, b = Math.acos(Math.min(1, Math.max(-1, y.x * k.x + y.y * k.y))), S = (Math.hypot(l.x - h.x, l.y - h.y) + Math.hypot(u.x - l.x, u.y - l.y)) / (2 * Math.max(1e-6, b)), E = (v) => Math.min(v, Math.max(v * 0.2, S * 0.8));
|
|
10560
|
-
return { center: l, width: (g + m) / 2, at: p, left:
|
|
10568
|
+
return { center: l, width: (g + m) / 2, at: p, left: Ls(l, f, w > 0 ? E(g) : g), right: Ls(l, f, w < 0 ? -E(m) : -m) };
|
|
10561
10569
|
}), o = [], r = [], i = (l, c) => {
|
|
10562
10570
|
o.push(l), r.push(c);
|
|
10563
10571
|
};
|
|
10564
10572
|
for (const l of s) i(l.left, l.at);
|
|
10565
10573
|
const a = (l, c, h) => {
|
|
10566
|
-
const u = { x: -c.y, y: c.x }, { left: d, right: f } = e(l.at), p =
|
|
10574
|
+
const u = { x: -c.y, y: c.x }, { left: d, right: f } = e(l.at), p = Ls(l.center, u, (d - f) / 2), g = (d + f) / 2;
|
|
10567
10575
|
for (let m = 1; m < Sh; m++) {
|
|
10568
10576
|
const y = m * Math.PI / Sh, k = (h ? 1 : -1) * Math.cos(y), w = (h ? 1 : -n) * Math.sin(y);
|
|
10569
10577
|
i({
|
|
@@ -10807,12 +10815,12 @@ function r2(t, e, n, s, o = {}, r) {
|
|
|
10807
10815
|
Y && t.shape(a(pe(W, Kt, _ * 0.85, _), q), "#ffffff", i, !0);
|
|
10808
10816
|
const j = (V > 1.2 ? 0.075 : 0.1) * p * (1 + m * 0.3), nt = W + u * 0.08, $ = Kt - d * 0.07, I = pe(nt, $, j, j * 1.1 * Math.min(V, 1));
|
|
10809
10817
|
if (t.shape(a(I, q), t.ink, 0, !0), o.inPupil && r) {
|
|
10810
|
-
const [B] = a([{ x: nt, y: $ }], q), K = a(I, q),
|
|
10811
|
-
|
|
10818
|
+
const [B] = a([{ x: nt, y: $ }], q), K = a(I, q), L = Math.min(...K.map((F) => Math.hypot(F.x - B.x, F.y - B.y)));
|
|
10819
|
+
L > 0.5 && (r.save(), r.beginPath(), r.arc(B.x, B.y, L, 0, Math.PI * 2), r.clip(), o.inPupil(r, { x: B.x, y: B.y, r: L, side: C }), r.restore());
|
|
10812
10820
|
}
|
|
10813
10821
|
if (g > 0.02) {
|
|
10814
|
-
const B = Y ? _ * 1.15 : j * 1.4, K = Kt + B,
|
|
10815
|
-
t.shape(a([{ x: W -
|
|
10822
|
+
const B = Y ? _ * 1.15 : j * 1.4, K = Kt + B, L = K - B * 2 * g, F = B * 1.1;
|
|
10823
|
+
t.shape(a([{ x: W - F, y: K + 0.02 }, { x: W + F, y: K + 0.02 }, { x: W + F, y: L }, { x: W - F, y: L }], q), o.skin ?? "#ffffff", 0, !0), t.line(a([{ x: W - F, y: L }, { x: W + F, y: L }], q), i);
|
|
10816
10824
|
}
|
|
10817
10825
|
}
|
|
10818
10826
|
const tt = Kt + (o.style === "anime" ? 0.38 : 0.3) + Yt(n, `brow.${C}`, 0) * 0.14 + Math.max(0, V - 1) * 0.12, G = { x: W + O * 0.13, y: tt }, R = { x: W - O * 0.13, y: tt + f * 0.1 }, D = y ? 0.035 : 0;
|
|
@@ -11079,7 +11087,7 @@ const Ih = (t) => t * Math.PI / 180, Da = (t) => {
|
|
|
11079
11087
|
function _h(t, e, n) {
|
|
11080
11088
|
return t >= e + n ? t : t <= e - n ? e : e + (t - e + n) ** 2 / (4 * n);
|
|
11081
11089
|
}
|
|
11082
|
-
function
|
|
11090
|
+
function Fi(t, e, n) {
|
|
11083
11091
|
const s = Da(n), o = t.reduce((c, h, u) => c + h * s[u], 0), i = t.map((c, h) => c - o * s[h]).reduce((c, h) => c + h * h, 0), a = Math.sqrt(_h(1 - i, e * e, e * e)), l = _h(o, a, e) - o;
|
|
11084
11092
|
return l === 0 ? t : t.map((c, h) => c + s[h] * l);
|
|
11085
11093
|
}
|
|
@@ -11097,12 +11105,12 @@ function g2(t) {
|
|
|
11097
11105
|
function p2(t, e, n, s) {
|
|
11098
11106
|
const o = (t.path.length - 1) / 3, r = o * 20, i = [], a = [], l = s.trail !== 0 || s.lift !== 0, c = Math.max(0, e + n);
|
|
11099
11107
|
for (let h = 0; h <= r; h++) {
|
|
11100
|
-
const u = h / r, d = Math.min(o - 1, Math.floor(u * o)), f = u * o - d, p = 1 - f, g = [p ** 3, 3 * p * p * f, 3 * p * f * f, f ** 3], m = t.path.slice(d * 3, d * 3 + 4), y = Ih(m.reduce((C, W, q) => C + W.around * g[q], 0)), k = m.reduce((C, W, q) => C + W.up * g[q], 0), w = m.reduce((C, W, q) => C + (W.lift ?? 0) * g[q], 0), b = 1 + e + n + w, S = k >= 0 ? Math.sqrt(Math.max(0, 1 - k * k)) : 1, E = u * u * (t.follow ?? 1), v = Ih(s.swing) * E, x = y - v, M = [Math.sin(x) * S * b, k * (k >= 0 ? b : 1), Math.cos(x) * S * b], T = [M[0], M[1] + s.lift * E, M[2] - s.trail * E], A = [Math.sin(x) * S, Math.max(0, k), Math.cos(x) * S], P = Da(M), O = l && E > 0 ?
|
|
11108
|
+
const u = h / r, d = Math.min(o - 1, Math.floor(u * o)), f = u * o - d, p = 1 - f, g = [p ** 3, 3 * p * p * f, 3 * p * f * f, f ** 3], m = t.path.slice(d * 3, d * 3 + 4), y = Ih(m.reduce((C, W, q) => C + W.around * g[q], 0)), k = m.reduce((C, W, q) => C + W.up * g[q], 0), w = m.reduce((C, W, q) => C + (W.lift ?? 0) * g[q], 0), b = 1 + e + n + w, S = k >= 0 ? Math.sqrt(Math.max(0, 1 - k * k)) : 1, E = u * u * (t.follow ?? 1), v = Ih(s.swing) * E, x = y - v, M = [Math.sin(x) * S * b, k * (k >= 0 ? b : 1), Math.cos(x) * S * b], T = [M[0], M[1] + s.lift * E, M[2] - s.trail * E], A = [Math.sin(x) * S, Math.max(0, k), Math.cos(x) * S], P = Da(M), O = l && E > 0 ? Fi(T, c, P) : T;
|
|
11101
11109
|
a.push(P), i.push({ center: O, normal: A, left: O, right: O, t: u });
|
|
11102
11110
|
}
|
|
11103
11111
|
return i.forEach((h, u) => {
|
|
11104
11112
|
const d = i[Math.max(0, u - 1)].center, p = i[Math.min(r, u + 1)].center.map((y, k) => y - d[k]), g = Da(f2(h.normal, p)), m = t.width * Math.sin(Math.PI * h.t) ** 0.6 * 0.5;
|
|
11105
|
-
h.left = h.center.map((y, k) => y + g[k] * m), h.right = h.center.map((y, k) => y - g[k] * m), l && h.t > 0 && (t.follow ?? 1) > 0 && (h.left =
|
|
11113
|
+
h.left = h.center.map((y, k) => y + g[k] * m), h.right = h.center.map((y, k) => y - g[k] * m), l && h.t > 0 && (t.follow ?? 1) > 0 && (h.left = Fi(h.left, c, a[u]), h.right = Fi(h.right, c, a[u]));
|
|
11106
11114
|
}), i;
|
|
11107
11115
|
}
|
|
11108
11116
|
const Vn = (t, e, n) => t.map((s, o) => s + (e[o] - s) * n);
|
|
@@ -11149,7 +11157,7 @@ function nf(t, e, n, s, o, r, i) {
|
|
|
11149
11157
|
p.length >= 2 && t.line(p.map((g) => It(e, g.left)), c);
|
|
11150
11158
|
}
|
|
11151
11159
|
}
|
|
11152
|
-
const $t = (t, e, n = 0) => ({ around: t, up: e, lift: n }),
|
|
11160
|
+
const $t = (t, e, n = 0) => ({ around: t, up: e, lift: n }), Li = () => [
|
|
11153
11161
|
{ width: 0.66, follow: 0.22, path: [$t(-38, 0.88), $t(-12, 0.94, 0.08), $t(58, 0.76, 0.09), $t(94, 0.16, 0.03)] },
|
|
11154
11162
|
{ width: 0.58, follow: 0.3, path: [$t(-42, 0.8), $t(-24, 0.7, 0.12), $t(18, 0.57, 0.09), $t(64, 0.3)] },
|
|
11155
11163
|
{ width: 0.36, follow: 0.18, path: [$t(-58, 0.76), $t(-76, 0.56, 0.07), $t(-90, 0.12, 0.06), $t(-102, -0.36)] }
|
|
@@ -11185,7 +11193,7 @@ const y2 = {
|
|
|
11185
11193
|
strands: "part",
|
|
11186
11194
|
sweep: -0.08,
|
|
11187
11195
|
hairline: { front: 0.64, side: 0.12, back: -0.8 },
|
|
11188
|
-
locks:
|
|
11196
|
+
locks: Li()
|
|
11189
11197
|
},
|
|
11190
11198
|
flowingBob: {
|
|
11191
11199
|
volume: 0.15,
|
|
@@ -11197,7 +11205,7 @@ const y2 = {
|
|
|
11197
11205
|
sweep: -0.08,
|
|
11198
11206
|
hairline: { front: 0.64, side: 0.08, back: -0.8 },
|
|
11199
11207
|
coversEars: !0,
|
|
11200
|
-
locks: [...Ch(!1), ...
|
|
11208
|
+
locks: [...Ch(!1), ...Li()]
|
|
11201
11209
|
},
|
|
11202
11210
|
cascadingWaves: {
|
|
11203
11211
|
volume: 0.16,
|
|
@@ -11209,7 +11217,7 @@ const y2 = {
|
|
|
11209
11217
|
sweep: -0.08,
|
|
11210
11218
|
hairline: { front: 0.64, side: 0.08, back: -0.8 },
|
|
11211
11219
|
coversEars: !0,
|
|
11212
|
-
locks: [...Ch(!0), ...
|
|
11220
|
+
locks: [...Ch(!0), ...Li()]
|
|
11213
11221
|
}
|
|
11214
11222
|
}, Vs = { swing: 0, trail: 0, lift: 0 };
|
|
11215
11223
|
function yr(t) {
|
|
@@ -11335,7 +11343,7 @@ function br(t, e) {
|
|
|
11335
11343
|
let h = a + r * Math.cos(e) + l * Math.cos(2 * e);
|
|
11336
11344
|
return h -= t.sweep * Math.sin(e) * c, h += t.recede * Math.exp(-(((Math.abs(e) - 0.75) / 0.32) ** 2)), (t.texture === "spiky" || t.texture === "curly") && (h -= t.textureAmount * 0.6 * za(e * 11 / (Math.PI * 2)) * c), h;
|
|
11337
11345
|
}
|
|
11338
|
-
function
|
|
11346
|
+
function Fh(t, e, n) {
|
|
11339
11347
|
const s = t.textureAmount;
|
|
11340
11348
|
switch (t.texture) {
|
|
11341
11349
|
case "spiky":
|
|
@@ -11369,10 +11377,10 @@ function rf(t, e, n = Vs) {
|
|
|
11369
11377
|
},
|
|
11370
11378
|
position(h, u) {
|
|
11371
11379
|
if (s && u < 0) {
|
|
11372
|
-
const w = t.length < 1.5 ? 0.14 * Jn(-t.length + 0.45, -t.length - 0.1, u) : 0, b = (t.fall?.taper ?? 0) * Jn(0, -Math.max(0.1, a(h)), u), S = 1 + e + t.volume * (1 - w * 2.5) +
|
|
11380
|
+
const w = t.length < 1.5 ? 0.14 * Jn(-t.length + 0.45, -t.length - 0.1, u) : 0, b = (t.fall?.taper ?? 0) * Jn(0, -Math.max(0.1, a(h)), u), S = 1 + e + t.volume * (1 - w * 2.5) + Fh(t, h, u) - w - b;
|
|
11373
11381
|
return [S * Math.sin(h), u, S * Math.cos(h)];
|
|
11374
11382
|
}
|
|
11375
|
-
const d = 0.4 + 0.6 * Jn(0, 0.3, u - br(t, h)), f = 1 + e + (t.volume +
|
|
11383
|
+
const d = 0.4 + 0.6 * Jn(0, 0.3, u - br(t, h)), f = 1 + e + (t.volume + Fh(t, h, u)) * d, p = l(h, u, f);
|
|
11376
11384
|
if (p) return p;
|
|
11377
11385
|
const [g, m, y] = Te(h, u), k = [g * f, m * f, y * f];
|
|
11378
11386
|
if (t.quiff > 0) {
|
|
@@ -11406,12 +11414,12 @@ const v2 = (t) => t.texture === "spiky" || t.texture === "curly" || t.texture ==
|
|
|
11406
11414
|
function af(t, e, n, s) {
|
|
11407
11415
|
return _l(t, x2(e, s), () => qr(t, n, v2(e)));
|
|
11408
11416
|
}
|
|
11409
|
-
const
|
|
11417
|
+
const Lh = /* @__PURE__ */ new WeakMap();
|
|
11410
11418
|
let M2 = 1;
|
|
11411
11419
|
function x2(t, e) {
|
|
11412
11420
|
if (sf(e)) return t;
|
|
11413
|
-
let n =
|
|
11414
|
-
return n ||
|
|
11421
|
+
let n = Lh.get(t);
|
|
11422
|
+
return n || Lh.set(t, n = M2++), `${n}:${e.swing}:${e.trail}:${e.lift}`;
|
|
11415
11423
|
}
|
|
11416
11424
|
function lf(t) {
|
|
11417
11425
|
switch (t) {
|
|
@@ -11689,7 +11697,7 @@ function R2(t, e, n, s, o) {
|
|
|
11689
11697
|
for (const a of i) t.shape(a, s.color, Js(o.lineWidth));
|
|
11690
11698
|
}, o.headOutline);
|
|
11691
11699
|
}
|
|
11692
|
-
function
|
|
11700
|
+
function F2(t, e, n, s, o) {
|
|
11693
11701
|
if (n.beard === "none") return;
|
|
11694
11702
|
const r = s.lineWidth * 0.45 / e.rx;
|
|
11695
11703
|
if (n.beard === "stubble") {
|
|
@@ -11713,7 +11721,7 @@ function L2(t, e, n, s, o) {
|
|
|
11713
11721
|
u > -0.05 && t.shape(h, s.skin === "none" ? "#ffffff" : s.skin, 0);
|
|
11714
11722
|
}
|
|
11715
11723
|
}
|
|
11716
|
-
function
|
|
11724
|
+
function L2(t, e, n, s) {
|
|
11717
11725
|
if (n.moustache === "none") return;
|
|
11718
11726
|
const o = { x: 0, y: -0.24 };
|
|
11719
11727
|
if (n.moustache === "pencil") {
|
|
@@ -11865,7 +11873,7 @@ function X2(t, e, n, s, o, r, i) {
|
|
|
11865
11873
|
return;
|
|
11866
11874
|
}
|
|
11867
11875
|
const a = kf(s);
|
|
11868
|
-
vf(n) && P2(e, s, r), n.hair && !a && !r.faceUnderHair && qa(e, s, n.hair, { ...r, motion: yr(o) }), n.facialHair &&
|
|
11876
|
+
vf(n) && P2(e, s, r), n.hair && !a && !r.faceUnderHair && qa(e, s, n.hair, { ...r, motion: yr(o) }), n.facialHair && F2(e, s, n.facialHair, r, o.mouthWidth ?? 1), i(), n.hair && !a && r.faceUnderHair && qa(e, s, n.hair, { ...r, motion: yr(o) }), n.facialHair && L2(e, s, n.facialHair, r), n.glasses && B2(e, s, n.glasses, r), n.hat && !a && bf(e, s, n.hat, { lineWidth: r.lineWidth, hairVolume: n.hair?.volume ?? 0 });
|
|
11869
11877
|
}
|
|
11870
11878
|
function xf(t, e, n, s, o, r) {
|
|
11871
11879
|
kf(s) && (n.hair && qa(e, s, n.hair, { ...r, motion: yr(o) }), n.hat && bf(e, s, n.hat, { lineWidth: r.lineWidth, hairVolume: n.hair?.volume ?? 0 }));
|
|
@@ -11875,14 +11883,14 @@ const Nh = 40, U2 = 0.215 + 0.205, ne = (t, e) => {
|
|
|
11875
11883
|
for (const s of ["left", "right"]) for (const [o, r] of Object.entries(e)) n[`${t}.${s}.${o}`] = r;
|
|
11876
11884
|
return n;
|
|
11877
11885
|
}, ft = (t, e) => t[e] ?? at[e] ?? 0;
|
|
11878
|
-
function
|
|
11886
|
+
function Fl(t, e, n = at, s = 1) {
|
|
11879
11887
|
const o = zr(t), r = e * Math.PI * 2, i = Math.sin(r) * s, a = Math.cos(r) * s, l = (1 + Math.cos(r * 2 * (o.bounces ?? 1))) / 2, c = o.crouch ?? 0, h = o.shoulder ?? 0, u = o.forearm ?? 0, d = { ...at, ...n };
|
|
11880
11888
|
d["leg.left.swing"] = o.swing * i + c * 0.6, d["leg.right.swing"] = -o.swing * i + c * 0.6, d["leg.left.knee"] = o.knee * Math.max(0, a) + c * 1.2, d["leg.right.knee"] = o.knee * Math.max(0, -a) + c * 1.2, d["leg.left.ankle"] = ft(n, "leg.left.ankle") - (o.tiptoe ?? 0), d["leg.right.ankle"] = ft(n, "leg.right.ankle") - (o.tiptoe ?? 0);
|
|
11881
11889
|
for (const [f, p] of [["left", -1], ["right", 1]])
|
|
11882
11890
|
ft(n, `arm.${f}.spread`) > Nh || ft(n, `arm.${f}.swing`) > Nh || (d[`arm.${f}.swing`] = h + p * o.arm * i, d[`arm.${f}.elbow`] = ft(n, `arm.${f}.elbow`) + u + o.elbow * Math.max(0, p * i));
|
|
11883
11891
|
return d.lean = ft(n, "lean") + o.lean * s, d.bend = ft(n, "bend") + (o.bend ?? 0), d["head.nod"] = ft(n, "head.nod") - o.lean * 0.5 * s + (o.headTilt ?? 0), d.side = ft(n, "side") + (o.sway ?? 0) * Math.sin(r), d.lift = ft(n, "lift") + (o.bounce ?? 0) * s * l, d.stretch = ft(n, "stretch") * (1 + (o.squash ?? 0) * (l - 0.5)), d;
|
|
11884
11892
|
}
|
|
11885
|
-
function
|
|
11893
|
+
function Ll(t, e, n = 1, s = 1) {
|
|
11886
11894
|
const o = zr(t);
|
|
11887
11895
|
return 4 * U2 * s * e * Math.sin(o.swing * n * Math.PI / 180);
|
|
11888
11896
|
}
|
|
@@ -12102,13 +12110,13 @@ function sk(t = {}) {
|
|
|
12102
12110
|
if (t = { ...t }, t.top !== void 0 && !["tshirt", "shirt", "blouse", "dress"].includes(t.top)) throw new Error(`basicOutfit: unknown top '${t.top}'`);
|
|
12103
12111
|
if (t.trouserStyle !== void 0 && !["plain", "jeans", "cargo"].includes(t.trouserStyle)) throw new Error(`basicOutfit: unknown trouser style '${t.trouserStyle}'`);
|
|
12104
12112
|
const e = t.top, n = t.trouserStyle ?? "plain", s = t.collar ?? e === "shirt", o = t.shirt ?? "#e2493b", r = e === "dress" ? o : t.trousers ?? "#24476b", i = t.sleeves ?? "short", a = e === "dress" ? "skirt" : t.bottom ?? "trousers", l = t.over === "labCoat", c = t.over === "hoodie", h = t.over === "cardigan", u = t.over === "overalls", d = t.over === "sari", f = t.overColor ?? (t.over && t.over !== "overalls" ? ek[t.over] : r), p = t.shoes === "boots", g = t.shoeColor ?? "#3b2a1e", m = ($) => $.lineWidth * 0.45, y = ($, I, B, K) => {
|
|
12105
|
-
const
|
|
12113
|
+
const L = I.parts[`leg.${K}`].points;
|
|
12106
12114
|
if (a === "skirt" && !u) return;
|
|
12107
|
-
const
|
|
12115
|
+
const F = a === "shorts" && !u, N = I.bodyContours?.[`leg.${K}`], X = N ? Ri(N, 0, F ? 0.5 : 1, I.height * 6e-3) : jt(F ? Ni(L, 0, 0.5) : L, I.height * (F ? 0.085 : 0.08), I.height * (F ? 0.07 : 0.05));
|
|
12108
12116
|
B.shape(X, r, m(I)), !(n === "plain" || Ut(I) < 0.15) && Yh($, X, () => {
|
|
12109
|
-
const z = (J, Q = 0) => Kh(
|
|
12117
|
+
const z = (J, Q = 0) => Kh(L, J, Q * I.height);
|
|
12110
12118
|
if (n === "jeans")
|
|
12111
|
-
B.line([z(0.07, -0.018), z(0.17, -0.02), z(0.23, 0), z(0.17, 0.02), z(0.07, 0.018)], m(I) * 0.65), B.line([z(0.27, 0.013), ...[0.4, 0.55, 0.7, 0.85, 0.96].filter((J) => !
|
|
12119
|
+
B.line([z(0.07, -0.018), z(0.17, -0.02), z(0.23, 0), z(0.17, 0.02), z(0.07, 0.018)], m(I) * 0.65), B.line([z(0.27, 0.013), ...[0.4, 0.55, 0.7, 0.85, 0.96].filter((J) => !F || J < 0.5).map((J) => z(J, 0.013))], m(I) * 0.5);
|
|
12112
12120
|
else {
|
|
12113
12121
|
const J = [z(0.25, -0.024), z(0.25, 0.024), z(0.43, 0.024), z(0.43, -0.024)];
|
|
12114
12122
|
B.shape(J, r, m(I) * 0.65), B.line([z(0.28, -0.024), z(0.32, 0), z(0.28, 0.024)], m(I) * 0.65);
|
|
@@ -12117,22 +12125,22 @@ function sk(t = {}) {
|
|
|
12117
12125
|
}
|
|
12118
12126
|
});
|
|
12119
12127
|
}, k = ($, I, B) => {
|
|
12120
|
-
const K = $.parts[`leg.${B}`].points,
|
|
12121
|
-
if (
|
|
12122
|
-
I.shape(jt(
|
|
12123
|
-
const
|
|
12124
|
-
I.line([{ x:
|
|
12128
|
+
const K = $.parts[`leg.${B}`].points, L = Ni(K, 0.7, 1);
|
|
12129
|
+
if (L.length < 2) return;
|
|
12130
|
+
I.shape(jt(L, $.height * 0.075, $.height * 0.07), g, m($));
|
|
12131
|
+
const F = L[0], N = L[1], X = N.x - F.x, z = N.y - F.y, J = Math.hypot(X, z) || 1, Q = $.height * 0.04;
|
|
12132
|
+
I.line([{ x: F.x - z / J * Q, y: F.y + X / J * Q }, { x: F.x + z / J * Q, y: F.y - X / J * Q }], m($) * 0.9);
|
|
12125
12133
|
}, w = ($) => {
|
|
12126
|
-
const I = $.chains.spine, B = I[0], K = I[I.length - 1],
|
|
12127
|
-
return { hip: B, top: K, below:
|
|
12134
|
+
const I = $.chains.spine, B = I[0], K = I[I.length - 1], L = { x: B.x - (K.x - B.x) * 0.25, y: B.y - (K.y - B.y) * 0.25 };
|
|
12135
|
+
return { hip: B, top: K, below: L, line: [L, ...$.parts.spine.points] };
|
|
12128
12136
|
}, b = ($) => {
|
|
12129
12137
|
if ($.bodyContours?.spine) return Ri($.bodyContours.spine, 0, 0.97, $.height * (c ? 0.014 : 6e-3));
|
|
12130
12138
|
const I = c ? 1.14 : 1, B = Math.hypot($.points["hip.left"].x - $.points["hip.right"].x, $.points["hip.left"].y - $.points["hip.right"].y), K = Math.max($.height * 0.15 * I, B + Math.max($.height * 0.08, $.lineWidth * 1.45) + m($));
|
|
12131
12139
|
return jt(w($).line, K, $.height * 0.14 * I);
|
|
12132
12140
|
}, S = ($, I) => {
|
|
12133
|
-
const B = [b(I)], { top: K, hip:
|
|
12134
|
-
h && B.push(jt([K, mt(K,
|
|
12135
|
-
const
|
|
12141
|
+
const B = [b(I)], { top: K, hip: L } = w(I);
|
|
12142
|
+
h && B.push(jt([K, mt(K, L, 0.5), mt(K, L, 1.08)], I.height * 0.155, I.height * 0.15)), l && B.push(jt([K, mt(K, L, 0.5), L], I.height * 0.14, I.height * 0.15));
|
|
12143
|
+
const F = Object.values(I.points), N = Math.min(...F.map((Q) => Q.x)) - I.height, X = Math.min(...F.map((Q) => Q.y)) - I.height, z = Math.max(...F.map((Q) => Q.x)) + I.height, J = Math.max(...F.map((Q) => Q.y)) + I.height;
|
|
12136
12144
|
for (const Q of B) {
|
|
12137
12145
|
$.beginPath(), $.rect(N, X, z - N, J - X), $.moveTo(Q[0].x, Q[0].y);
|
|
12138
12146
|
for (const H of Q.slice(1)) $.lineTo(H.x, H.y);
|
|
@@ -12144,7 +12152,7 @@ function sk(t = {}) {
|
|
|
12144
12152
|
}, v = ($, I, B) => {
|
|
12145
12153
|
const K = Ut(I);
|
|
12146
12154
|
if (!e || K < 0.2 || c) return;
|
|
12147
|
-
const { top:
|
|
12155
|
+
const { top: L, hip: F } = w(I), N = Ae(I) * I.height * 0.025, X = [L, F], z = (J, Q = 0) => Kh(X, J, N + Q * I.height * K);
|
|
12148
12156
|
Yh($, b(I), () => {
|
|
12149
12157
|
if (e === "shirt") {
|
|
12150
12158
|
B.line([z(0.12), z(0.92)], m(I) * 0.65);
|
|
@@ -12159,29 +12167,29 @@ function sk(t = {}) {
|
|
|
12159
12167
|
} else e === "dress" ? B.line([z(0.04, -0.035), z(0.17, -0.028), z(0.17, 0.028), z(0.04, 0.035)], m(I) * 0.75) : B.line([z(0.025, -0.035), z(0.1, -0.02), z(0.12), z(0.1, 0.02), z(0.025, 0.035)], m(I) * 0.65);
|
|
12160
12168
|
});
|
|
12161
12169
|
}, x = ($, I) => {
|
|
12162
|
-
const B = Ut($), { top: K, hip:
|
|
12170
|
+
const B = Ut($), { top: K, hip: L } = w($), F = $.height * 0.07, N = { x: (K.x - L.x) * 0.16, y: (K.y - L.y) * 0.16 };
|
|
12163
12171
|
if (B >= 0) {
|
|
12164
12172
|
I.shape(
|
|
12165
12173
|
[
|
|
12166
|
-
{ x: K.x -
|
|
12167
|
-
{ x: K.x -
|
|
12174
|
+
{ x: K.x - F, y: K.y + N.y * 0.25 },
|
|
12175
|
+
{ x: K.x - F * 0.8 + N.x, y: K.y + N.y },
|
|
12168
12176
|
{ x: K.x + N.x * 1.2, y: K.y + N.y * 1.35 },
|
|
12169
|
-
{ x: K.x +
|
|
12170
|
-
{ x: K.x +
|
|
12177
|
+
{ x: K.x + F * 0.8 + N.x, y: K.y + N.y },
|
|
12178
|
+
{ x: K.x + F, y: K.y + N.y * 0.25 }
|
|
12171
12179
|
],
|
|
12172
12180
|
f,
|
|
12173
12181
|
m($)
|
|
12174
12182
|
);
|
|
12175
12183
|
return;
|
|
12176
12184
|
}
|
|
12177
|
-
const X = mt(K,
|
|
12185
|
+
const X = mt(K, L, 0.42);
|
|
12178
12186
|
I.shape(
|
|
12179
12187
|
[
|
|
12180
|
-
{ x: K.x -
|
|
12181
|
-
{ x: K.x +
|
|
12182
|
-
{ x: X.x +
|
|
12188
|
+
{ x: K.x - F * 0.9, y: K.y },
|
|
12189
|
+
{ x: K.x + F * 0.9, y: K.y },
|
|
12190
|
+
{ x: X.x + F * 0.7, y: X.y },
|
|
12183
12191
|
{ x: X.x, y: X.y + $.height * 0.02 },
|
|
12184
|
-
{ x: X.x -
|
|
12192
|
+
{ x: X.x - F * 0.7, y: X.y }
|
|
12185
12193
|
],
|
|
12186
12194
|
f,
|
|
12187
12195
|
m($)
|
|
@@ -12189,21 +12197,21 @@ function sk(t = {}) {
|
|
|
12189
12197
|
}, M = ($, I) => {
|
|
12190
12198
|
const B = Ut($);
|
|
12191
12199
|
if (B < 0.2) return;
|
|
12192
|
-
const { top: K, hip:
|
|
12193
|
-
I.line([{ x: X.x +
|
|
12194
|
-
const J = mt(K,
|
|
12195
|
-
for (const Q of [-1, 1]) I.line([{ x: J.x +
|
|
12200
|
+
const { top: K, hip: L } = w($), F = Ae($) * $.height * 0.03, N = $.height * 0.06 * B, X = mt(K, L, 0.62), z = mt(K, L, 0.9);
|
|
12201
|
+
I.line([{ x: X.x + F - N, y: X.y }, { x: z.x + F - N * 1.1, y: z.y }], m($) * 0.7), I.line([{ x: X.x + F + N, y: X.y }, { x: z.x + F + N * 1.1, y: z.y }], m($) * 0.7);
|
|
12202
|
+
const J = mt(K, L, 0.1);
|
|
12203
|
+
for (const Q of [-1, 1]) I.line([{ x: J.x + F + Q * N * 0.2, y: J.y }, { x: J.x + F + Q * N * 0.35, y: J.y + $.height * 0.07 }], m($) * 0.6);
|
|
12196
12204
|
}, T = ($, I) => {
|
|
12197
|
-
const { top: B, hip: K } = w($),
|
|
12198
|
-
if (I.shape(jt([B, mt(B, K, 0.5), mt(B, K, 1.08)], $.height * 0.155, $.height * 0.15), f, m($)),
|
|
12199
|
-
const
|
|
12200
|
-
I.shape([{ x: X.x +
|
|
12205
|
+
const { top: B, hip: K } = w($), L = Ut($);
|
|
12206
|
+
if (I.shape(jt([B, mt(B, K, 0.5), mt(B, K, 1.08)], $.height * 0.155, $.height * 0.15), f, m($)), L < 0.2) return;
|
|
12207
|
+
const F = Ae($) * $.height * 0.03, N = $.height * 0.02 * L, X = mt(B, K, 0.12), z = mt(B, K, 1.05);
|
|
12208
|
+
I.shape([{ x: X.x + F - N, y: X.y }, { x: X.x + F + N, y: X.y }, { x: z.x + F + N * 1.3, y: z.y }, { x: z.x + F - N * 1.3, y: z.y }], o, m($) * 0.7);
|
|
12201
12209
|
for (const J of [0.35, 0.55, 0.75]) {
|
|
12202
12210
|
const Q = mt(B, K, J);
|
|
12203
|
-
I.dot(Q.x +
|
|
12211
|
+
I.dot(Q.x + F + N * 1.6, Q.y, m($) * 1.2);
|
|
12204
12212
|
}
|
|
12205
12213
|
}, A = ($, I) => {
|
|
12206
|
-
const B = Ut($), { top: K, hip:
|
|
12214
|
+
const B = Ut($), { top: K, hip: L } = w($), F = Ae($) * $.height * 0.04, N = mt(L, K, 0.12), X = mt(L, K, 0.74);
|
|
12207
12215
|
if (B < 0.15) {
|
|
12208
12216
|
if (B < -0.3) {
|
|
12209
12217
|
const H = $.points["shoulder.left"], U = $.points["shoulder.right"];
|
|
@@ -12214,28 +12222,28 @@ function sk(t = {}) {
|
|
|
12214
12222
|
const z = $.height * 0.07 * B;
|
|
12215
12223
|
I.shape(
|
|
12216
12224
|
[
|
|
12217
|
-
{ x: X.x +
|
|
12218
|
-
{ x: X.x +
|
|
12219
|
-
{ x: N.x +
|
|
12220
|
-
{ x: N.x +
|
|
12225
|
+
{ x: X.x + F - z * 0.75, y: X.y },
|
|
12226
|
+
{ x: X.x + F + z * 0.75, y: X.y },
|
|
12227
|
+
{ x: N.x + F + z * 1.1, y: N.y },
|
|
12228
|
+
{ x: N.x + F - z * 1.1, y: N.y }
|
|
12221
12229
|
],
|
|
12222
12230
|
r,
|
|
12223
12231
|
m($)
|
|
12224
12232
|
);
|
|
12225
12233
|
for (const H of ["left", "right"]) {
|
|
12226
|
-
const U = $.points[`shoulder.${H}`], et = { x: X.x +
|
|
12234
|
+
const U = $.points[`shoulder.${H}`], et = { x: X.x + F + (U.x > X.x + F ? 1 : -1) * z * 0.55, y: X.y };
|
|
12227
12235
|
I.line([et, { x: U.x + (et.x - U.x) * 0.15, y: U.y + (et.y - U.y) * 0.15 }], m($) * 1.6);
|
|
12228
12236
|
}
|
|
12229
12237
|
const J = mt(X, N, 0.3), Q = z * 0.4;
|
|
12230
|
-
I.line([{ x: J.x +
|
|
12238
|
+
I.line([{ x: J.x + F - Q, y: J.y }, { x: J.x + F - Q, y: J.y + Q * 1.4 }, { x: J.x + F + Q, y: J.y + Q * 1.4 }, { x: J.x + F + Q, y: J.y }], m($) * 0.6);
|
|
12231
12239
|
}, P = ($, I) => {
|
|
12232
|
-
const { hip: B, top: K } = w($),
|
|
12240
|
+
const { hip: B, top: K } = w($), L = mt(B, K, 0.2), F = [$.points["ankle.left"], $.points["ankle.right"]], N = mt(B, { x: (F[0].x + F[1].x) / 2, y: (F[0].y + F[1].y) / 2 }, 0.98), X = $.height * 0.075, z = Math.max($.height * 0.12, Math.abs(F[0].x - F[1].x) / 2 + $.height * 0.07), J = N.x - L.x, Q = N.y - L.y, H = Math.hypot(J, Q) || 1, U = { x: -Q / H, y: J / H };
|
|
12233
12241
|
if (I.shape(
|
|
12234
12242
|
[
|
|
12235
|
-
{ x:
|
|
12243
|
+
{ x: L.x + U.x * X, y: L.y + U.y * X },
|
|
12236
12244
|
{ x: N.x + U.x * z, y: N.y + U.y * z },
|
|
12237
12245
|
{ x: N.x - U.x * z, y: N.y - U.y * z },
|
|
12238
|
-
{ x:
|
|
12246
|
+
{ x: L.x - U.x * X, y: L.y - U.y * X }
|
|
12239
12247
|
],
|
|
12240
12248
|
f,
|
|
12241
12249
|
m($)
|
|
@@ -12243,32 +12251,32 @@ function sk(t = {}) {
|
|
|
12243
12251
|
const it = Ae($) * $.height * 0.03;
|
|
12244
12252
|
for (const ot of [-0.35, 0, 0.35]) {
|
|
12245
12253
|
const lt = X * 0.5 * ot, st = z * 0.45 * ot;
|
|
12246
|
-
I.line([{ x:
|
|
12254
|
+
I.line([{ x: L.x + it + U.x * lt, y: L.y + U.y * lt + $.height * 0.02 }, { x: N.x + it + U.x * st, y: N.y + U.y * st }], m($) * 0.5);
|
|
12247
12255
|
}
|
|
12248
12256
|
}
|
|
12249
12257
|
}, O = ($, I) => {
|
|
12250
|
-
const B = Ut($), { top: K, hip:
|
|
12258
|
+
const B = Ut($), { top: K, hip: L } = w($), F = Ae($), N = F >= 0 ? "left" : "right", X = N === "left" ? "right" : "left", z = $.points[`shoulder.${N}`], J = $.height * 0.035;
|
|
12251
12259
|
if (B < 0.15) {
|
|
12252
|
-
const U = mt(K,
|
|
12260
|
+
const U = mt(K, L, 0.9);
|
|
12253
12261
|
I.shape(jt([z, { x: U.x + (z.x - K.x) * 0.5, y: U.y }], J * 2.2, J * 2.6), f, m($));
|
|
12254
12262
|
return;
|
|
12255
12263
|
}
|
|
12256
|
-
const Q = { x:
|
|
12264
|
+
const Q = { x: L.x + ($.points[`hip.${X}`].x - L.x) * 1.2, y: mt(L, K, 0.08).y };
|
|
12257
12265
|
I.shape(jt([Q, mt(Q, z, 0.5), z], J * 2.4, J * 2), f, m($));
|
|
12258
|
-
const H = { x: z.x - (
|
|
12266
|
+
const H = { x: z.x - (L.x - z.x) * 0.05 - F * $.height * 0.03, y: z.y + $.height * 0.16 };
|
|
12259
12267
|
I.shape(jt([z, H], J * 2, J * 1.6), f, m($));
|
|
12260
12268
|
}, C = ($, I) => {
|
|
12261
12269
|
if ($.bodyContours) {
|
|
12262
12270
|
I.shape(Tf($, { top: !1, length: 0.45 }).skirt, r, m($));
|
|
12263
12271
|
return;
|
|
12264
12272
|
}
|
|
12265
|
-
const { hip: B, top: K } = w($),
|
|
12273
|
+
const { hip: B, top: K } = w($), L = mt(B, K, 0.18), F = [$.points["knee.left"], $.points["knee.right"]], N = mt(B, { x: (F[0].x + F[1].x) / 2, y: (F[0].y + F[1].y) / 2 }, 1.05), X = $.height * 0.075, z = Math.max($.height * 0.13, Math.abs(F[0].x - F[1].x) / 2 + $.height * 0.08), J = N.x - L.x, Q = N.y - L.y, H = Math.hypot(J, Q) || 1, U = { x: -Q / H, y: J / H };
|
|
12266
12274
|
I.shape(
|
|
12267
12275
|
[
|
|
12268
|
-
{ x:
|
|
12276
|
+
{ x: L.x + U.x * X, y: L.y + U.y * X },
|
|
12269
12277
|
{ x: N.x + U.x * z, y: N.y + U.y * z },
|
|
12270
12278
|
{ x: N.x - U.x * z, y: N.y - U.y * z },
|
|
12271
|
-
{ x:
|
|
12279
|
+
{ x: L.x - U.x * X, y: L.y - U.y * X }
|
|
12272
12280
|
],
|
|
12273
12281
|
r,
|
|
12274
12282
|
m($)
|
|
@@ -12276,13 +12284,13 @@ function sk(t = {}) {
|
|
|
12276
12284
|
}, W = ($, I) => {
|
|
12277
12285
|
const B = Ut($);
|
|
12278
12286
|
if (B < 0.2) return;
|
|
12279
|
-
const { top: K, hip:
|
|
12287
|
+
const { top: K, hip: L } = w($), F = { x: (L.x - K.x) * 0.12, y: (L.y - K.y) * 0.12 }, N = $.height * 0.045 * B;
|
|
12280
12288
|
for (const X of [-1, 1])
|
|
12281
12289
|
I.shape(
|
|
12282
12290
|
[
|
|
12283
|
-
{ x: K.x + X * N * 0.2, y: K.y +
|
|
12284
|
-
{ x: K.x + X * N * 1.3, y: K.y -
|
|
12285
|
-
{ x: K.x + X * N * 0.6 +
|
|
12291
|
+
{ x: K.x + X * N * 0.2, y: K.y + F.y * 0.1 },
|
|
12292
|
+
{ x: K.x + X * N * 1.3, y: K.y - F.y * 0.1 },
|
|
12293
|
+
{ x: K.x + X * N * 0.6 + F.x, y: K.y + F.y }
|
|
12286
12294
|
],
|
|
12287
12295
|
o,
|
|
12288
12296
|
m($) * 0.8
|
|
@@ -12290,20 +12298,20 @@ function sk(t = {}) {
|
|
|
12290
12298
|
}, q = ($, I, B) => {
|
|
12291
12299
|
const K = Ut($);
|
|
12292
12300
|
if (K < 0.25) return;
|
|
12293
|
-
const { top:
|
|
12301
|
+
const { top: L, hip: F } = w($), N = Ae($) * $.height * 0.03, X = (H) => ({ x: mt(L, F, H).x + N, y: mt(L, F, H).y }), z = $.height * 0.022 * K, J = X(0.08), Q = X(0.62);
|
|
12294
12302
|
I.shape([{ x: J.x - z, y: J.y - z }, { x: J.x + z, y: J.y - z }, { x: J.x + z * 0.6, y: J.y + z }, { x: J.x - z * 0.6, y: J.y + z }], B, m($) * 0.7), I.shape([{ x: J.x - z * 0.6, y: J.y + z }, { x: J.x + z * 0.6, y: J.y + z }, { x: Q.x + z * 1.4, y: Q.y - z * 2 }, Q, { x: Q.x - z * 1.4, y: Q.y - z * 2 }], B, m($) * 0.7);
|
|
12295
12303
|
}, V = ($, I) => {
|
|
12296
|
-
const B = Ut($), { top: K, hip:
|
|
12304
|
+
const B = Ut($), { top: K, hip: L } = w($), F = mt(L, K, 0.72), N = [$.points["knee.left"], $.points["knee.right"]], X = mt(L, { x: (N[0].x + N[1].x) / 2, y: (N[0].y + N[1].y) / 2 }, 0.9), z = Ae($) * $.height * 0.04;
|
|
12297
12305
|
if (B < 0.15) {
|
|
12298
|
-
const H = mt(
|
|
12306
|
+
const H = mt(L, K, 0.2);
|
|
12299
12307
|
B < -0.3 && I.line([{ x: H.x - $.height * 0.05, y: H.y }, { x: H.x + $.height * 0.05, y: H.y }], m($));
|
|
12300
12308
|
return;
|
|
12301
12309
|
}
|
|
12302
|
-
const J = $.height * 0.075 * B, Q = mt(
|
|
12310
|
+
const J = $.height * 0.075 * B, Q = mt(L, K, 0.2);
|
|
12303
12311
|
I.shape(
|
|
12304
12312
|
[
|
|
12305
|
-
{ x:
|
|
12306
|
-
{ x:
|
|
12313
|
+
{ x: F.x + z - J * 0.7, y: F.y },
|
|
12314
|
+
{ x: F.x + z + J * 0.7, y: F.y },
|
|
12307
12315
|
{ x: Q.x + z + J, y: Q.y },
|
|
12308
12316
|
{ x: X.x + z + J * 1.15, y: X.y },
|
|
12309
12317
|
{ x: X.x + z - J * 1.15, y: X.y },
|
|
@@ -12311,22 +12319,22 @@ function sk(t = {}) {
|
|
|
12311
12319
|
],
|
|
12312
12320
|
f,
|
|
12313
12321
|
m($)
|
|
12314
|
-
), I.line([{ x:
|
|
12322
|
+
), I.line([{ x: F.x + z - J * 0.6, y: F.y }, { x: K.x - J * 0.2, y: K.y }, { x: F.x + z + J * 0.6, y: F.y }], m($) * 0.8);
|
|
12315
12323
|
}, tt = ($, I, B) => {
|
|
12316
|
-
const { top: K, hip:
|
|
12317
|
-
B ? I.shape(jt([mt(K,
|
|
12324
|
+
const { top: K, hip: L } = w($), F = [$.points["knee.left"], $.points["knee.right"]], N = mt(L, { x: (F[0].x + F[1].x) / 2, y: (F[0].y + F[1].y) / 2 }, 0.95);
|
|
12325
|
+
B ? I.shape(jt([mt(K, L, 0.8), L, N], $.height * 0.145, $.height * 0.17), f, m($)) : I.shape(jt([K, mt(K, L, 0.5), L], $.height * 0.14, $.height * 0.15), f, m($));
|
|
12318
12326
|
const X = Ut($);
|
|
12319
12327
|
if (X > 0.2) {
|
|
12320
|
-
const z = Ae($) * $.height * 0.03, [J, Q] = B ? [
|
|
12328
|
+
const z = Ae($) * $.height * 0.03, [J, Q] = B ? [L, N] : [K, L];
|
|
12321
12329
|
if (I.line([{ x: J.x + z, y: J.y }, { x: Q.x + z, y: Q.y }], m($) * 0.8), !B) {
|
|
12322
|
-
const H = mt(K,
|
|
12330
|
+
const H = mt(K, L, 0.35), U = $.height * 0.025 * X;
|
|
12323
12331
|
I.shape([{ x: H.x + z - U * 2.4, y: H.y }, { x: H.x + z - U * 0.6, y: H.y }, { x: H.x + z - U * 0.6, y: H.y + U * 1.6 }, { x: H.x + z - U * 2.4, y: H.y + U * 1.6 }], f, m($) * 0.6);
|
|
12324
12332
|
}
|
|
12325
12333
|
}
|
|
12326
|
-
}, G = ($, I, B, K,
|
|
12327
|
-
const
|
|
12328
|
-
if (
|
|
12329
|
-
const Z = Ri(
|
|
12334
|
+
}, G = ($, I, B, K, L) => {
|
|
12335
|
+
const F = $.bodyContours?.[`arm.${B}`];
|
|
12336
|
+
if (F) {
|
|
12337
|
+
const Z = Ri(F, 0, L, $.height * 6e-3);
|
|
12330
12338
|
I.shape(Z, K, 0);
|
|
12331
12339
|
const rt = b($);
|
|
12332
12340
|
for (let ct = 0; ct < Z.length; ct++) {
|
|
@@ -12335,7 +12343,7 @@ function sk(t = {}) {
|
|
|
12335
12343
|
}
|
|
12336
12344
|
return;
|
|
12337
12345
|
}
|
|
12338
|
-
const N = $.parts[`arm.${B}`].points, X = N[0], z = $.chains.spine[$.chains.spine.length - 1], Q = [{ x: X.x + (z.x - X.x) * 0.45, y: X.y + (z.y - X.y) * 0.45 }, ...Ni(N, 0,
|
|
12346
|
+
const N = $.parts[`arm.${B}`].points, X = N[0], z = $.chains.spine[$.chains.spine.length - 1], Q = [{ x: X.x + (z.x - X.x) * 0.45, y: X.y + (z.y - X.y) * 0.45 }, ...Ni(N, 0, L)], H = jt(Q, $.height * 0.085, $.height * (L > 0.6 ? 0.045 : 0.06)), U = Q.length, et = H.slice(0, U), it = H.slice(U).reverse();
|
|
12339
12347
|
I.shape(H, K, 0);
|
|
12340
12348
|
const ot = (Z) => Math.hypot(Z[1].x - z.x, Z[1].y - z.y), [lt, st] = ot(et) > ot(it) ? [et, it] : [it, et];
|
|
12341
12349
|
I.line(lt.slice(1), m($)), I.line(st.slice(Math.ceil(U * 0.45)), m($)), I.line([et[U - 1], it[U - 1]], m($));
|
|
@@ -12523,7 +12531,7 @@ function ho(t = {}) {
|
|
|
12523
12531
|
figure: s,
|
|
12524
12532
|
...p ? { body: p } : {},
|
|
12525
12533
|
look: o,
|
|
12526
|
-
illustrated:
|
|
12534
|
+
illustrated: K1(t.illustrated, p?.shading.light),
|
|
12527
12535
|
height: r,
|
|
12528
12536
|
lineWidth: p?.outline.width ?? u,
|
|
12529
12537
|
ink: p?.outline.color ?? d,
|
|
@@ -12756,7 +12764,7 @@ function Dl(t, e = at, n) {
|
|
|
12756
12764
|
typeof i == "number" && !Of.has(r) && (s[r] = i);
|
|
12757
12765
|
const o = Math.max(0, Math.min(1, typeof t.walking == "number" ? t.walking : 0));
|
|
12758
12766
|
if (o > 0) {
|
|
12759
|
-
const r = typeof t.gait == "string" ? t.gait : void 0, i = r ? n?.[r] ?? r : void 0, a =
|
|
12767
|
+
const r = typeof t.gait == "string" ? t.gait : void 0, i = r ? n?.[r] ?? r : void 0, a = Fl(i, typeof t.walk == "number" ? t.walk : 0, s);
|
|
12760
12768
|
s = Object.fromEntries(Object.keys({ ...s, ...a }).map((l) => [l, (s[l] ?? 0) + ((a[l] ?? 0) - (s[l] ?? 0)) * o]));
|
|
12761
12769
|
}
|
|
12762
12770
|
return s;
|
|
@@ -13246,11 +13254,11 @@ function vr(t) {
|
|
|
13246
13254
|
}
|
|
13247
13255
|
return { ...t, faceEdges: e };
|
|
13248
13256
|
}
|
|
13249
|
-
function
|
|
13257
|
+
function Ff(t, e, n = {}) {
|
|
13250
13258
|
t.save(), Ok(t, e, n), t.restore();
|
|
13251
13259
|
}
|
|
13252
13260
|
function Ok(t, e, n) {
|
|
13253
|
-
const s =
|
|
13261
|
+
const s = Lf(e, n);
|
|
13254
13262
|
n.shadow !== !1 && Wf(t, e, n);
|
|
13255
13263
|
for (const o of e.under) Qh(t, o, s, n);
|
|
13256
13264
|
if (n.rider) {
|
|
@@ -13279,7 +13287,7 @@ function Qh(t, e, n, s) {
|
|
|
13279
13287
|
const i = r.map((c) => c.x), a = r.map((c) => c.y), l = { x: (Math.min(...i) + Math.max(...i)) / 2, y: (Math.min(...a) + Math.max(...a)) / 2 };
|
|
13280
13288
|
t.save(), t.globalAlpha *= Math.min(1, o.opacity), t.translate(l.x + o.x, l.y + o.y), t.rotate(o.rotate * Math.PI / 180), t.translate(-l.x, -l.y), Ka(t, e, n, s), t.restore();
|
|
13281
13289
|
}
|
|
13282
|
-
function
|
|
13290
|
+
function Lf(t, e = {}) {
|
|
13283
13291
|
return e.lineWidth ?? Math.max(1.3, t.sizePx * 0.022);
|
|
13284
13292
|
}
|
|
13285
13293
|
function Wf(t, e, n = {}) {
|
|
@@ -13433,7 +13441,7 @@ const Rk = /* @__PURE__ */ new Set([
|
|
|
13433
13441
|
"visible",
|
|
13434
13442
|
"opacity",
|
|
13435
13443
|
"color"
|
|
13436
|
-
]),
|
|
13444
|
+
]), Fk = /* @__PURE__ */ new Set(["walk", "walking", "gait"]), n0 = (t) => typeof t == "number" ? t : void 0, Lk = 1.7;
|
|
13437
13445
|
function Wk(t, e, n) {
|
|
13438
13446
|
const s = Array.from({ length: 24 }, (o, r) => {
|
|
13439
13447
|
const i = r / 24 * Math.PI * 2, a = e.toView([Math.cos(i) * n, 0, Math.sin(i) * n * 0.8]);
|
|
@@ -13487,13 +13495,13 @@ const O4 = {
|
|
|
13487
13495
|
const l = t, c = e, h = c.who;
|
|
13488
13496
|
let u = { ...at, ...l.pose };
|
|
13489
13497
|
for (const [x, M] of n)
|
|
13490
|
-
typeof M == "number" && !Rk.has(x) && !
|
|
13498
|
+
typeof M == "number" && !Rk.has(x) && !Fk.has(x) && (u[x] = M);
|
|
13491
13499
|
const d = Math.max(0, Math.min(1, n0(n.get("walking")) ?? l.walking ?? 0));
|
|
13492
13500
|
if (d > 0) {
|
|
13493
|
-
const x = typeof n.get("gait") == "string" ? n.get("gait") : l.gait, M =
|
|
13501
|
+
const x = typeof n.get("gait") == "string" ? n.get("gait") : l.gait, M = Fl(x, n0(n.get("walk")) ?? 0, u);
|
|
13494
13502
|
u = Object.fromEntries(Object.keys({ ...u, ...M }).map((T) => [T, (u[T] ?? 0) + ((M[T] ?? 0) - (u[T] ?? 0)) * d]));
|
|
13495
13503
|
}
|
|
13496
|
-
const f = l.height ??
|
|
13504
|
+
const f = l.height ?? Lk, p = Ht(o.view, s), g = {
|
|
13497
13505
|
toView: (x) => se(p, x),
|
|
13498
13506
|
toScreen: (x) => a(x)
|
|
13499
13507
|
}, y = -g.toView([0, f / 2, 0])[2];
|
|
@@ -13625,7 +13633,7 @@ function I4(t, e, n = {}) {
|
|
|
13625
13633
|
}
|
|
13626
13634
|
function Ul(t, e, n, s = {}) {
|
|
13627
13635
|
if (n.length === 0) return e;
|
|
13628
|
-
const o = s.fields?.mouth ?? "mouth", r = s.fields?.mouthWidth ?? "mouthWidth", i = { [o]: en.rest.mouth, [r]: en.rest.mouthWidth, ...s.rest }, a = new
|
|
13636
|
+
const o = s.fields?.mouth ?? "mouth", r = s.fields?.mouthWidth ?? "mouthWidth", i = { [o]: en.rest.mouth, [r]: en.rest.mouthWidth, ...s.rest }, a = new Ft({ id: "before-speech", tracks: e }), l = (u, d) => a.getStateAtTime(d).values.get(t)?.get(u) ?? i[u], c = [o, r], h = e.filter((u) => u.target !== t || !c.includes(u.property));
|
|
13629
13637
|
for (const u of c) {
|
|
13630
13638
|
const d = e.find((p) => p.target === t && p.property === u);
|
|
13631
13639
|
let f = d ? [...d.keyframes] : [{ time: 0, value: l(u, 0) }];
|
|
@@ -13901,7 +13909,7 @@ ${s.map((v) => ` beat ${v.beat}: ${v.message}`).join(`
|
|
|
13901
13909
|
}, y = (v, x, M) => {
|
|
13902
13910
|
const T = Yf([[a, l], ...x.through ?? [x.to]]);
|
|
13903
13911
|
if (T.length < 2) return M;
|
|
13904
|
-
const A = g(M, Qn(T[0].point, T[1].point)), P = T[T.length - 1].at, O = x.speed ?? e5[v] * Math.sqrt(o / 1.7), C = x.for ?? P / O * 1e3, W =
|
|
13912
|
+
const A = g(M, Qn(T[0].point, T[1].point)), P = T[T.length - 1].at, O = x.speed ?? e5[v] * Math.sqrt(o / 1.7), C = x.for ?? P / O * 1e3, W = Ll(v, o), q = zt("ease-in-out"), V = Math.min(r5, C / 4);
|
|
13905
13913
|
d.push({ time: A, value: v }), p("walking", A, 0), f("walking", A + V, 1, "ease-out"), f("walking", A + C - V, 1), f("walking", A + C, 0, "ease-in");
|
|
13906
13914
|
const tt = h;
|
|
13907
13915
|
let G = c;
|
|
@@ -13965,7 +13973,7 @@ ${s.map((v) => ` beat ${v.beat}: ${v.message}`).join(`
|
|
|
13965
13973
|
return d.length > 0 && E.push({ id: `${t}-gait`, target: S, property: "gait", keyframes: d }), w.length > 0 && (E = Ul(S, E, w, { rest: { mouth: n.pose?.mouth ?? at.mouth ?? 0, mouthWidth: n.pose?.mouthWidth ?? at.mouthWidth ?? 1 } })), { tracks: E, duration: b, beats: k, end: { position: [a, l], heading: c, pose: { ...r } } };
|
|
13966
13974
|
}
|
|
13967
13975
|
function g0(t, e, n = [0, 0, 0]) {
|
|
13968
|
-
const s = t.filter((r) => r.target === e), o = new
|
|
13976
|
+
const s = t.filter((r) => r.target === e), o = new Ft({ id: `${e}-position`, tracks: s });
|
|
13969
13977
|
return (r) => {
|
|
13970
13978
|
const i = o.getStateAtTime(r).values.get(e), a = i?.get("position");
|
|
13971
13979
|
if (Array.isArray(a) && a.length === 3) return [a[0], a[1], a[2]];
|
|
@@ -13977,7 +13985,7 @@ function g0(t, e, n = [0, 0, 0]) {
|
|
|
13977
13985
|
};
|
|
13978
13986
|
}
|
|
13979
13987
|
function C4(t, e) {
|
|
13980
|
-
const n = `${e.scene}/${e.character}`, s = e.height ?? 1.7, o = Math.max(1, e.every ?? 66), r = e.objects?.[e.character] ?? [0, 0, 0], i = new
|
|
13988
|
+
const n = `${e.scene}/${e.character}`, s = e.height ?? 1.7, o = Math.max(1, e.every ?? 66), r = e.objects?.[e.character] ?? [0, 0, 0], i = new Ft({ id: `${n}-own`, tracks: t.filter((u) => u.target === n) }), a = e.at, l = typeof a == "function" ? a : Array.isArray(a) ? () => a : "camera" in a ? g0(t, `${e.scene}/${a.camera}`, e.objects?.[a.camera] ?? [0, 1.6, 8]) : (() => {
|
|
13981
13989
|
const u = g0(t, `${e.scene}/${a.object}`, e.objects?.[a.object] ?? [0, 0, 0]), d = a.eyeHeight ?? s * 0.9;
|
|
13982
13990
|
return (f) => {
|
|
13983
13991
|
const p = u(f);
|
|
@@ -14045,11 +14053,11 @@ function R4(t) {
|
|
|
14045
14053
|
shakeRotate: e("shakeRotate")
|
|
14046
14054
|
};
|
|
14047
14055
|
}
|
|
14048
|
-
function
|
|
14056
|
+
function F4(t, e, n) {
|
|
14049
14057
|
const s = n.width / 2, o = n.height / 2, i = 1 + 2 * Math.max(Math.abs(e.shakeX), Math.abs(e.shakeY)) / Math.max(1, Math.min(n.width, n.height));
|
|
14050
14058
|
t.translate(s + e.x + e.shakeX, o + e.y + e.shakeY), t.rotate((e.rotate + e.shakeRotate) * Math.PI / 180), t.scale(e.scale * i, e.scale * i), t.translate(-s, -o);
|
|
14051
14059
|
}
|
|
14052
|
-
function
|
|
14060
|
+
function L4(t, e, n) {
|
|
14053
14061
|
const s = e.width / 2, o = e.height / 2, r = (t.rotate + t.shakeRotate) * Math.PI / 180, i = (n.x - s) * t.scale, a = (n.y - o) * t.scale;
|
|
14054
14062
|
return {
|
|
14055
14063
|
x: s + t.x + t.shakeX + i * Math.cos(r) - a * Math.sin(r),
|
|
@@ -14310,7 +14318,7 @@ function Jr(t) {
|
|
|
14310
14318
|
}
|
|
14311
14319
|
function Vl(t, e, { ground: n, every: s, floors: o }) {
|
|
14312
14320
|
if (o.every((w) => w.windows.length === 0)) return t;
|
|
14313
|
-
const r = t.find((w) => w.target === e && w.property === "y"), i = new
|
|
14321
|
+
const r = t.find((w) => w.target === e && w.property === "y"), i = new Ft({ id: `${e}-ride`, tracks: r ? [r] : [] }), a = (w) => r ? Number(i.getStateAtTime(w).values.get(e)?.get("y") ?? 0) : 0, l = (w) => {
|
|
14314
14322
|
const b = n + a(w);
|
|
14315
14323
|
return o.findIndex((S) => Math.abs(S.top - b) < 0.5);
|
|
14316
14324
|
}, c = (r?.keyframes ?? []).map((w) => w.time), h = (w) => {
|
|
@@ -14426,18 +14434,18 @@ function j4(t) {
|
|
|
14426
14434
|
draw(R, D) {
|
|
14427
14435
|
const Y = D.props ?? {}, _ = (I) => Number(Y[I] ?? C[I]), j = i + a, nt = (I) => i + (I - 1) * o - _(`line.${I}.shift`) * o;
|
|
14428
14436
|
R.fillStyle = e.background, m0(R, 0, 0, c, h, 8), R.fill(), R.font = `${s}px ${e.font}`, R.textBaseline = "middle", R.textAlign = "left";
|
|
14429
|
-
const $ = (I, B, K,
|
|
14437
|
+
const $ = (I, B, K, L, F) => {
|
|
14430
14438
|
const N = n[I - 1];
|
|
14431
14439
|
for (let X = B; X < K; X++)
|
|
14432
|
-
N[X] !== " " && (R.fillStyle = p[I - 1][X], R.fillText(N[X],
|
|
14440
|
+
N[X] !== " " && (R.fillStyle = p[I - 1][X], R.fillText(N[X], L + (X - B) * r, F));
|
|
14433
14441
|
};
|
|
14434
14442
|
R.save(), m0(R, 0, 0, c, h, 8), R.clip(), n.forEach((I, B) => {
|
|
14435
|
-
const K = B + 1,
|
|
14436
|
-
if (
|
|
14437
|
-
const
|
|
14438
|
-
R.save(),
|
|
14443
|
+
const K = B + 1, L = _(`line.${K}.wipe`);
|
|
14444
|
+
if (L >= 1) return;
|
|
14445
|
+
const F = nt(K), N = F + o / 2, X = Math.max(1, I.length) * r, z = Math.round(_(`line.${K}.reveal`) * I.length), J = k.get(K) ?? { style: "wipe", from: "left" };
|
|
14446
|
+
R.save(), L > 0 && b5(R, J, L, { left: j - a, top: F, width: a + X + r, height: o }, c);
|
|
14439
14447
|
const Q = _(`line.${K}.highlight`);
|
|
14440
|
-
Q > 0 && (R.globalAlpha *= Math.min(1, Q), R.fillStyle = e.highlight, R.fillRect(j - r / 2,
|
|
14448
|
+
Q > 0 && (R.globalAlpha *= Math.min(1, Q), R.fillStyle = e.highlight, R.fillRect(j - r / 2, F, X + r, o), R.globalAlpha /= Math.min(1, Q)), a > 0 && z > 0 && (R.fillStyle = e.gutter, R.textAlign = "right", R.fillText(String(K), j - r, N), R.textAlign = "left");
|
|
14441
14449
|
const H = [
|
|
14442
14450
|
...w.filter((ot) => ot.line === K).map((ot) => ({ column: ot.column, length: ot.text.length, piece: ot, insert: void 0 })),
|
|
14443
14451
|
...b.filter((ot) => ot.line === K).map((ot) => ({ column: ot.column, length: 0, piece: void 0, insert: ot }))
|
|
@@ -14461,8 +14469,8 @@ function j4(t) {
|
|
|
14461
14469
|
for (const I of w) {
|
|
14462
14470
|
const B = _(`piece.${I.id}.opacity`);
|
|
14463
14471
|
if (B <= 0 || _(`line.${I.line}.wipe`) >= 1) continue;
|
|
14464
|
-
const K = j + (I.column + I.text.length / 2) * r + _(`piece.${I.id}.x`),
|
|
14465
|
-
R.save(), R.globalAlpha = Math.min(1, B), R.translate(K,
|
|
14472
|
+
const K = j + (I.column + I.text.length / 2) * r + _(`piece.${I.id}.x`), L = nt(I.line) + o / 2 + _(`piece.${I.id}.y`);
|
|
14473
|
+
R.save(), R.globalAlpha = Math.min(1, B), R.translate(K, L), R.rotate(_(`piece.${I.id}.rotate`) * Math.PI / 180), $(I.line, I.column, I.column + I.text.length, -I.text.length * r / 2, 0), R.restore();
|
|
14466
14474
|
}
|
|
14467
14475
|
R.restore();
|
|
14468
14476
|
}
|
|
@@ -14531,7 +14539,7 @@ function j4(t) {
|
|
|
14531
14539
|
x(I, "wipe", 0, 1, { ...D, easing: D.easing ?? (_ === "fly" ? "ease-in" : void 0) }, j), k.set(I, { style: _, from: D.from ?? "left" }), y.push({ line: I, closed: nt + $ });
|
|
14532
14540
|
for (let I = 1; I <= n.length; I++) {
|
|
14533
14541
|
if (Y.includes(I)) continue;
|
|
14534
|
-
const B = Y.filter((
|
|
14542
|
+
const B = Y.filter((L) => L < I).length;
|
|
14535
14543
|
if (B === 0) continue;
|
|
14536
14544
|
const K = v(`line.${I}.shift`, 0);
|
|
14537
14545
|
x(I, "shift", K, K + B, { at: nt, duration: $, easing: "ease-in-out" });
|
|
@@ -15229,7 +15237,7 @@ function K4(t) {
|
|
|
15229
15237
|
if (o) {
|
|
15230
15238
|
const st = I(U).get(H.id), Z = Math.max(g * 1.5, q.r * 0.42);
|
|
15231
15239
|
if (H.kind === "slice") return kt(st.centre.x - Z / 2, st.centre.y - Z / 2, Z, Z);
|
|
15232
|
-
const rt =
|
|
15240
|
+
const rt = L(st);
|
|
15233
15241
|
return H.kind === "label" ? rt : st.sweep >= 0.3 ? kt(st.centre.x - g * 1.6, st.centre.y - g * 0.65, g * 3.2, g * 1.3) : kt(rt.left, rt.bottom, rt.width, g * 1.3);
|
|
15234
15242
|
}
|
|
15235
15243
|
const et = H.kind === "label" ? P(H.id) : C(H.id, H.series), it = b.bottom - nt(H.id, H.series, U);
|
|
@@ -15238,10 +15246,10 @@ function K4(t) {
|
|
|
15238
15246
|
if (H.kind === "label") return kt(et - E / 2, b.bottom + g * 0.4, E, g * 1.4);
|
|
15239
15247
|
const ot = it - (s === "line" ? M : 0) - g * 0.3, lt = r && s === "bar" ? v : E;
|
|
15240
15248
|
return kt((s === "line" ? P(H.id) : et) - lt / 2, ot - g * 1.3, lt, g * 1.3);
|
|
15241
|
-
},
|
|
15249
|
+
}, L = (H) => {
|
|
15242
15250
|
const U = q.r + H.out + g * 0.9, et = { x: q.cx + Math.cos(H.mid) * U, y: q.cy + Math.sin(H.mid) * U }, it = g * 4.2, ot = Math.cos(H.mid), lt = ot > 0.2 ? et.x : ot < -0.2 ? et.x - it : et.x - it / 2;
|
|
15243
15251
|
return kt(lt, et.y - g * 0.7, it, g * 1.4);
|
|
15244
|
-
},
|
|
15252
|
+
}, F = (H) => kt(t.x + H.left, t.y + H.top, H.width, H.height), N = (H) => `${t.prefix ?? ""}${H.toFixed(t.decimals ?? 0)}${t.suffix ?? ""}`, X = /* @__PURE__ */ new Map(), z = {
|
|
15245
15253
|
type: "custom",
|
|
15246
15254
|
x: t.x,
|
|
15247
15255
|
y: t.y,
|
|
@@ -15251,7 +15259,7 @@ function K4(t) {
|
|
|
15251
15259
|
about: {
|
|
15252
15260
|
kind: `${s} chart`,
|
|
15253
15261
|
summary: `A ${s} chart of ${t.data.length} values (${t.data.map((H) => H.id).join(", ")})${r ? ` in ${i.length} series (${i.map((H) => H.id).join(", ")})` : ""}${o ? "" : `, scaled to ${p}`}. Its ${d}s and labels are places in the scene (anchor()); its edits record tracks (edit(), tracks()).`,
|
|
15254
|
-
props: Object.fromEntries(Object.keys(Y).map((H) => [H,
|
|
15262
|
+
props: Object.fromEntries(Object.keys(Y).map((H) => [H, L5(H)])),
|
|
15255
15263
|
actions: jn.edits
|
|
15256
15264
|
},
|
|
15257
15265
|
draw(H, U) {
|
|
@@ -15293,7 +15301,7 @@ function K4(t) {
|
|
|
15293
15301
|
for (const st of t.data) {
|
|
15294
15302
|
for (const Z of i) {
|
|
15295
15303
|
const rt = s === "bar" ? C(st.id, Z.id) : P(st.id), ct = ot(st.id, Z.id), ut = it(_(st.id, Z.id, "show"));
|
|
15296
|
-
if (H.fillStyle = lt(st.id, Z.id), s === "bar" ? ct > 0.5 && (
|
|
15304
|
+
if (H.fillStyle = lt(st.id, Z.id), s === "bar" ? ct > 0.5 && (F5(H, rt - x / 2, b.bottom - ct, x, ct, Math.min(6, x / 4)), H.fill()) : ut > 0 && (H.beginPath(), H.arc(rt, b.bottom - ct, M * Math.min(1, ut * 1.5) * (1 + 0.3 * it(_(st.id, Z.id, "highlight"))), 0, Math.PI * 2), H.fill()), t.values !== !1 && ut > 0) {
|
|
15297
15305
|
H.globalAlpha = Math.min(1, ut * 2), H.font = `600 ${r ? g * 0.85 : g}px ${n.font}`, H.fillStyle = Ki(n.text, n.highlight, it(_(st.id, Z.id, "highlight")));
|
|
15298
15306
|
const yt = b.bottom - ct - (s === "line" ? M : 0) - g * 0.95;
|
|
15299
15307
|
H.fillText(N(it(_(st.id, Z.id, "value"))), rt, yt), H.font = `${g}px ${n.font}`, H.globalAlpha = 1;
|
|
@@ -15314,7 +15322,7 @@ function K4(t) {
|
|
|
15314
15322
|
H.save(), H.globalAlpha = ut;
|
|
15315
15323
|
const yt = { x: q.cx + Math.cos(st.mid) * st.out, y: q.cy + Math.sin(st.mid) * st.out };
|
|
15316
15324
|
H.translate(st.centre.x + rt.x, st.centre.y + rt.y), H.rotate(ct), H.translate(-st.centre.x, -st.centre.y), H.beginPath(), H.arc(yt.x, yt.y, q.r, st.start, st.start + st.sweep), V > 0 ? H.arc(yt.x, yt.y, V, st.start + st.sweep, st.start, !0) : H.lineTo(yt.x, yt.y), H.closePath(), H.fillStyle = Ki(n.palette[lt % n.palette.length], n.highlight, U(_(ot.id, et, "highlight"))), H.fill(), H.strokeStyle = n.background, H.lineWidth = Math.max(1.5, g * 0.15), H.stroke(), t.values !== !1 && st.sweep >= 0.3 && (H.fillStyle = n.background, H.font = `600 ${g}px ${n.font}`, H.textAlign = "center", H.fillText(N(U(_(ot.id, et, "value"))), st.centre.x, st.centre.y), H.font = `${g}px ${n.font}`), H.restore();
|
|
15317
|
-
const bt =
|
|
15325
|
+
const bt = L(st), re = Math.cos(st.mid);
|
|
15318
15326
|
H.globalAlpha = ut, H.fillStyle = n.text, H.textAlign = re > 0.2 ? "left" : re < -0.2 ? "right" : "center";
|
|
15319
15327
|
const ps = re > 0.2 ? bt.left : re < -0.2 ? bt.right : bt.left + bt.width / 2;
|
|
15320
15328
|
H.fillText(ot.label ?? ot.id, ps, bt.top + bt.height / 2), t.values !== !1 && st.sweep < 0.3 && (H.globalAlpha = ut * 0.8, H.fillText(N(U(_(ot.id, et, "value"))), ps, bt.bottom + g * 0.65)), H.globalAlpha = 1;
|
|
@@ -15328,7 +15336,7 @@ function K4(t) {
|
|
|
15328
15336
|
max: p,
|
|
15329
15337
|
box: kt(t.x, t.y, t.width, t.height),
|
|
15330
15338
|
anchor(H, U = 1 / 0) {
|
|
15331
|
-
return
|
|
15339
|
+
return F(K(B(H), U));
|
|
15332
15340
|
},
|
|
15333
15341
|
piece(H) {
|
|
15334
15342
|
const U = B(H);
|
|
@@ -15336,7 +15344,7 @@ function K4(t) {
|
|
|
15336
15344
|
throw new Error(o ? `chart: a piece is a slice, slice:ID, not "${H}"` : `chart: a ${d} is not a piece; slices of a pie or donut are (slice:ID). Change a ${d} with edit('set' | 'show' | 'highlight', …)`);
|
|
15337
15345
|
const et = X.get(U.id);
|
|
15338
15346
|
if (et) return et;
|
|
15339
|
-
const it = { id: X.size + 1, datum: U.id, home:
|
|
15347
|
+
const it = { id: X.size + 1, datum: U.id, home: F(K(U, 0)) };
|
|
15340
15348
|
X.set(U.id, it);
|
|
15341
15349
|
for (const ot of ["x", "y", "rotate"]) Y[`piece.${it.id}.${ot}`] = 0;
|
|
15342
15350
|
return Y[`piece.${it.id}.opacity`] = 1, it;
|
|
@@ -15403,11 +15411,11 @@ function Ki(t, e, n) {
|
|
|
15403
15411
|
function T0(t, e, n, s, o, r) {
|
|
15404
15412
|
t.beginPath(), t.moveTo(e + r, n), t.arcTo(e + s, n, e + s, n + o, r), t.arcTo(e + s, n + o, e, n + o, r), t.arcTo(e, n + o, e, n, r), t.arcTo(e, n, e + s, n, r), t.closePath();
|
|
15405
15413
|
}
|
|
15406
|
-
function
|
|
15414
|
+
function F5(t, e, n, s, o, r) {
|
|
15407
15415
|
const i = Math.min(r, o);
|
|
15408
15416
|
t.beginPath(), t.moveTo(e, n + o), t.lineTo(e, n + i), t.arcTo(e, n, e + i, n, i), t.lineTo(e + s - i, n), t.arcTo(e + s, n, e + s, n + i, i), t.lineTo(e + s, n + o), t.closePath();
|
|
15409
15417
|
}
|
|
15410
|
-
function
|
|
15418
|
+
function L5(t) {
|
|
15411
15419
|
return t.endsWith(".value") ? { description: "Its value (the bar’s height, the point’s, or the slice’s share, and its value label)", unit: "value" } : t.endsWith(".show") ? { description: "How much of it is shown: a bar grown in from the axis, the line drawn out to the point, a slice opened", unit: "0..1", min: 0, max: 1 } : t.endsWith(".pull") ? { description: "How far the slice is pulled out from the centre", unit: "0..1", min: 0, max: 1 } : t.startsWith("piece.") ? { description: t.endsWith(".opacity") ? "The loose slice’s opacity" : t.endsWith(".rotate") ? "The loose slice’s turn, degrees" : "The loose slice’s offset from home, px", unit: t.endsWith(".rotate") ? "degrees" : t.endsWith(".opacity") ? "0..1" : "px" } : { description: "How much it is coloured out", unit: "0..1", min: 0, max: 1 };
|
|
15412
15420
|
}
|
|
15413
15421
|
function E0() {
|
|
@@ -15951,10 +15959,10 @@ const P0 = (t) => ({ "hair.swing": t.swing, "hair.trail": t.trail, "hair.lift":
|
|
|
15951
15959
|
function nT(t, e, n, s = {}) {
|
|
15952
15960
|
const o = n.head.hair;
|
|
15953
15961
|
if (!o || !b2(o)) return [];
|
|
15954
|
-
const r = e.filter((k) => k.target === t), i = r.reduce((k, w) => w.keyframes.reduce((b, S) => Math.max(b, S.time), k), 0), a = at, l = /* @__PURE__ */ new Set(["x", "y", "turn", "head.turn"]), c = new
|
|
15962
|
+
const r = e.filter((k) => k.target === t), i = r.reduce((k, w) => w.keyframes.reduce((b, S) => Math.max(b, S.time), k), 0), a = at, l = /* @__PURE__ */ new Set(["x", "y", "turn", "head.turn"]), c = new Ft({ id: `${t}-hair-follow`, tracks: r.filter((k) => l.has(k.property)) }), h = (k, w, b) => {
|
|
15955
15963
|
const S = c.getStateAtTime(k).values.get(t)?.get(w);
|
|
15956
15964
|
return typeof S == "number" ? S : b;
|
|
15957
|
-
}, u = new
|
|
15965
|
+
}, u = new Ft({ id: `${t}-hair-pose`, tracks: r }), d = (k) => u.getStateAtTime(k).values.get(t), f = /* @__PURE__ */ new Map(), p = (k) => {
|
|
15958
15966
|
const w = Math.round(k / Rn);
|
|
15959
15967
|
let b = f.get(w);
|
|
15960
15968
|
if (!b) {
|
|
@@ -15994,7 +16002,7 @@ function nT(t, e, n, s = {}) {
|
|
|
15994
16002
|
if (b.every((E) => Math.abs(E.value) < 1e-3)) continue;
|
|
15995
16003
|
const S = r.find((E) => E.property === k);
|
|
15996
16004
|
if (S) {
|
|
15997
|
-
const E = new
|
|
16005
|
+
const E = new Ft({ id: `${t}-${k}-own`, tracks: [S] }), v = (x) => Number(E.getStateAtTime(x).values.get(t)?.get(k) ?? 0);
|
|
15998
16006
|
b = b.map((x) => ({ time: x.time, value: x.value + v(x.time) }));
|
|
15999
16007
|
}
|
|
16000
16008
|
y.push({ id: `${t}-${k}`, target: t, property: k, keyframes: b });
|
|
@@ -16541,7 +16549,7 @@ function _0(t, e = {}, n = "scriptTracks") {
|
|
|
16541
16549
|
${s.map((o) => ` ${o.beat >= 0 ? `beat ${o.beat}: ` : ""}${o.message}`).join(`
|
|
16542
16550
|
`)}`);
|
|
16543
16551
|
}
|
|
16544
|
-
|
|
16552
|
+
W1(ag);
|
|
16545
16553
|
function rT(t) {
|
|
16546
16554
|
const e = "steps" in t && typeof t.steps == "function", n = "beats" in t && typeof t.beats == "function";
|
|
16547
16555
|
if (e === n) throw new Error("defineAction: give either `steps: (from, beat) => [...]` or `beats: (beat) => [...]`");
|
|
@@ -16578,9 +16586,9 @@ const H0 = {
|
|
|
16578
16586
|
tired: 1500,
|
|
16579
16587
|
shove: 1300,
|
|
16580
16588
|
run: 560
|
|
16581
|
-
}, yv = 450, bv = 2.4, wv = 160, R0 = 2.5, kv = 200, vv = 340, Mv = 1.1,
|
|
16589
|
+
}, yv = 450, bv = 2.4, wv = 160, R0 = 2.5, kv = 200, vv = 340, Mv = 1.1, F0 = [380, 900], xv = 0.35, Fo = 300, Gi = 150, Sv = 260, Tv = 1.2, Vi = 160, L0 = 400, Ts = 300, Ev = 450, W0 = 500, Ji = 350, N0 = 150, Av = 120, Zi = 180, D0 = 420, $v = 300, B0 = 300, Pv = 140, Qi = 150, z0 = 450, Ov = 450, ta = 150, q0 = 350, j0 = 400, Iv = 12, _v = 600, Y0 = 90, K0 = 400, Cv = 200, Hv = 0.09, X0 = 350, $e = 450, ea = 1200, Rv = 700, Fn = 320, Pe = 220, Fv = 65, Lv = 700, U0 = (t) => t in vn, Wv = (t) => t in he;
|
|
16582
16590
|
function Nv(t) {
|
|
16583
|
-
return Math.max(
|
|
16591
|
+
return Math.max(Lv, Array.from(t).length * Fv);
|
|
16584
16592
|
}
|
|
16585
16593
|
function Ql(t, e, n = {}) {
|
|
16586
16594
|
const s = { actions: n.actions, gaits: n.gaits };
|
|
@@ -16594,17 +16602,17 @@ function Ql(t, e, n = {}) {
|
|
|
16594
16602
|
let d = c, f = h, p = n.facing ?? 1, g = n.start ?? ht, m = 0, y = 0;
|
|
16595
16603
|
const k = [{ time: 0, pose: g }], w = [{ time: 0, value: 0 }], b = [{ time: 0, value: 0 }], S = [{ time: 0, value: 0 }], E = [{ time: 0, value: 0 }], v = [{ time: 0, value: "walk" }], x = [{ time: 0, value: p }], M = [], T = [], A = [], P = (_, j, nt, $) => {
|
|
16596
16604
|
g = { ...g, ...j }, nt && (g = rn(g, nt)), k.push({ time: _, pose: g, ...$ === !1 ? { act: $ } : {} });
|
|
16597
|
-
}, O = (_, j, nt) => (P(_ +
|
|
16598
|
-
const I = $ === "arm", B = ke({ ..._, ...I ? { rightShoulder: 0, rightElbow: 0 } : { rightHip: 0, rightKnee: 0 } }, { height: u, facing: p }), K = I ? B.shoulders.right : B.hip,
|
|
16605
|
+
}, O = (_, j, nt) => (P(_ + Fn / 2, { turn: 0 }, nt), x.push({ time: _ + Fn / 2, value: p }, { time: _ + Fn / 2 + 1, value: j }), p = j, P(_ + Fn, { turn: 1 }), _ + Fn), C = (_) => _ < d ? -1 : 1, W = (_, j, nt) => C(j) !== p ? O(_, C(j), nt) : _, q = (_, j, nt, $ = "arm") => {
|
|
16606
|
+
const I = $ === "arm", B = ke({ ..._, ...I ? { rightShoulder: 0, rightElbow: 0 } : { rightHip: 0, rightKnee: 0 } }, { height: u, facing: p }), K = I ? B.shoulders.right : B.hip, L = I ? B.elbows.right : B.knees.right, F = (z, J) => Math.atan2(p * z, J) * 180 / Math.PI, X = ((F(j - (d + K.x), nt - (f + K.y)) - F(L.x - K.x, L.y - K.y)) % 360 + 360) % 360;
|
|
16599
16607
|
return X > 270 ? X - 360 : X;
|
|
16600
16608
|
}, V = (_, j, nt, $) => {
|
|
16601
|
-
const I = $ === "arm", B = ke({ ..._, ...I ? { rightShoulder: 90, rightElbow: 0, rightWrist: 0 } : { rightHip: 90, rightKnee: 0 } }, { height: u, facing: p }), K = I ? B.shoulders.right : B.hip,
|
|
16609
|
+
const I = $ === "arm", B = ke({ ..._, ...I ? { rightShoulder: 90, rightElbow: 0, rightWrist: 0 } : { rightHip: 90, rightKnee: 0 } }, { height: u, facing: p }), K = I ? B.shoulders.right : B.hip, L = I ? { x: (B.hands.right.x + B.fingertips.right.x) / 2, y: (B.hands.right.y + B.fingertips.right.y) / 2 } : B.feet.right, F = Math.hypot(L.x - K.x, L.y - K.y) * ((I ? n.reach?.arm : n.reach?.leg) ?? 1), N = nt - (f + K.y), X = Math.abs(N) < F ? Math.sqrt(F * F - N * N) : F * 0.1;
|
|
16602
16610
|
return j - K.x - p * X;
|
|
16603
16611
|
}, tt = (_) => {
|
|
16604
16612
|
const j = ke(_, { height: u, facing: p });
|
|
16605
16613
|
return { x: d + (j.hands.right.x + j.fingertips.right.x) / 2, y: f + (j.hands.right.y + j.fingertips.right.y) / 2 };
|
|
16606
16614
|
}, G = (_, j, nt) => {
|
|
16607
|
-
const $ = { ..._, rightWrist: 0, rightElbow: 0, rightShoulder: q(_, j, nt) }, I = ke($, { height: u, facing: p }), B = { x: d + I.shoulders.right.x, y: f + I.shoulders.right.y }, K = { x: d + I.elbows.right.x, y: f + I.elbows.right.y },
|
|
16615
|
+
const $ = { ..._, rightWrist: 0, rightElbow: 0, rightShoulder: q(_, j, nt) }, I = ke($, { height: u, facing: p }), B = { x: d + I.shoulders.right.x, y: f + I.shoulders.right.y }, K = { x: d + I.elbows.right.x, y: f + I.elbows.right.y }, L = tt($), F = Math.hypot(K.x - B.x, K.y - B.y), N = Math.hypot(L.x - K.x, L.y - K.y), X = Math.min(F + N - 0.01, Math.max(Math.abs(F - N) + 0.01, Math.hypot(j - B.x, nt - B.y))), z = (et) => et * 180 / Math.PI, J = z(Math.acos((F * F + X * X - N * N) / (2 * F * X))), Q = 180 - z(Math.acos((F * F + N * N - X * X) / (2 * F * N)));
|
|
16608
16616
|
let H = { rightShoulder: $.rightShoulder, rightElbow: 0 }, U = 1 / 0;
|
|
16609
16617
|
for (const et of [1, -1])
|
|
16610
16618
|
for (const it of [1, -1]) {
|
|
@@ -16618,47 +16626,47 @@ function Ql(t, e, n = {}) {
|
|
|
16618
16626
|
let nt = j, $, I;
|
|
16619
16627
|
const B = _.pose ?? {}, K = l(_.do);
|
|
16620
16628
|
if (i(_.do)) {
|
|
16621
|
-
const
|
|
16629
|
+
const L = _.to ?? d, F = L === d ? p : C(L);
|
|
16622
16630
|
let N = j;
|
|
16623
|
-
|
|
16624
|
-
const z = Math.abs(
|
|
16625
|
-
v.push({ time: N, value: _.do }), E.push({ time: N, value: 0 }, { time: N + Pe, value: 1, easing: "ease-out" }), E.push({ time: Q - Pe, value: 1 }, { time: Q, value: 0, easing: "ease-in" }), S.push({ time: N, value: m }, { time: Q, value: m + z }), w.push({ time: N, value: d - c }, { time: Q, value:
|
|
16631
|
+
F !== p ? N = O(j, F, _.mood) : g.turn < 1 ? (N = j + Pe, P(N, { turn: 1, ...B }, _.mood)) : (_.mood || _.pose) && P(j + Pe, B, _.mood);
|
|
16632
|
+
const z = Math.abs(L - d) / Pa(i(_.do), u), J = _.for ?? Math.max(Pe * 2, z * a(_.do)), Q = N + J;
|
|
16633
|
+
v.push({ time: N, value: _.do }), E.push({ time: N, value: 0 }, { time: N + Pe, value: 1, easing: "ease-out" }), E.push({ time: Q - Pe, value: 1 }, { time: Q, value: 0, easing: "ease-in" }), S.push({ time: N, value: m }, { time: Q, value: m + z }), w.push({ time: N, value: d - c }, { time: Q, value: L - c }), m += z, d = L, P(Q, {}), nt = Q;
|
|
16626
16634
|
} else if (_.do === "zip") {
|
|
16627
|
-
const
|
|
16635
|
+
const L = _.to ?? d, F = L === d ? p : C(L);
|
|
16628
16636
|
let N = j;
|
|
16629
|
-
|
|
16637
|
+
F !== p ? N = O(j, F, _.mood) : g.turn < 1 && (N = j + Pe, P(N, { turn: 1 }, _.mood));
|
|
16630
16638
|
const X = I0("windUp", { at: N, from: _.mood ? rn(g, _.mood) : g });
|
|
16631
16639
|
k.push(...X), g = X[X.length - 1].pose;
|
|
16632
|
-
const z = N + Er("windUp"), J = z + yv, Q = J + Math.max(wv, Math.abs(
|
|
16633
|
-
v.push({ time: z, value: "run" }), E.push({ time: z, value: 0 }, { time: z + 80, value: 1, easing: "ease-out" }, { time: Q, value: 1 }, { time: Q + 120, value: 0 }), S.push({ time: z, value: m }, { time: J, value: m + R0, easing: "ease-in" }), m += R0 + (Q - J) / H0.run * 1.5, S.push({ time: Q, value: m }), w.push({ time: J, value: d - c }, { time: Q, value:
|
|
16640
|
+
const z = N + Er("windUp"), J = z + yv, Q = J + Math.max(wv, Math.abs(L - d) / bv);
|
|
16641
|
+
v.push({ time: z, value: "run" }), E.push({ time: z, value: 0 }, { time: z + 80, value: 1, easing: "ease-out" }, { time: Q, value: 1 }, { time: Q + 120, value: 0 }), S.push({ time: z, value: m }, { time: J, value: m + R0, easing: "ease-in" }), m += R0 + (Q - J) / H0.run * 1.5, S.push({ time: Q, value: m }), w.push({ time: J, value: d - c }, { time: Q, value: L - c, easing: "ease-in" }), A.push({ kind: "dust", time: J, x: d, y: f, length: 900 }), d = L, P(Q, {}), nt = Q;
|
|
16634
16642
|
} else if (_.do === "leap") {
|
|
16635
|
-
const
|
|
16636
|
-
let N =
|
|
16643
|
+
const L = _.to ?? d, F = _.onto ?? f;
|
|
16644
|
+
let N = L === d ? j : W(j, L, _.mood);
|
|
16637
16645
|
g.turn < 1 && (N += Pe, P(N, { turn: 1 }, _.mood));
|
|
16638
16646
|
const X = { leftShoulder: 35, rightShoulder: 35, leftElbow: -50, rightElbow: -50 };
|
|
16639
16647
|
P(N + kv, { stretch: 0.75, bend: 12, leftHip: 22, rightHip: 22, ...X }, _.mood, !1);
|
|
16640
16648
|
const z = N + vv;
|
|
16641
16649
|
P(z - 40, { stretch: 0.72 }, void 0, !1), P(z, { stretch: 1.2, bend: -6, leftShoulder: 140, rightShoulder: 140, leftElbow: 20, rightElbow: 20, leftHip: 4, rightHip: 4 }, void 0, !1);
|
|
16642
|
-
const J = Math.hypot(
|
|
16643
|
-
P(it, { stretch: 1, bend: 4, leftHip: -55, leftKnee: -80, rightHip: 55, rightKnee: 80, leftShoulder: 110, rightShoulder: 110 }, void 0, !1), P(ot, { stretch: 0.72, bend: 12, leftShoulder: 75, rightShoulder: 75, leftElbow: 0, rightElbow: 0, leftHip: 18, rightHip: 18, leftKnee: 0, rightKnee: 0 }, void 0, !1), P(ot + 180, { stretch: 1.05, bend: -3 }, void 0, !1), P(ot + 340, { stretch: 1, bend: 0, leftHip: ht.leftHip, rightHip: ht.rightHip, leftShoulder: ht.leftShoulder, rightShoulder: ht.rightShoulder, leftElbow: ht.leftElbow, rightElbow: ht.rightElbow }, void 0, !1), w.push({ time: z, value: d - c }, { time: ot, value:
|
|
16650
|
+
const J = Math.hypot(L - d, F - f), Q = _.for ?? Math.min(F0[1], Math.max(F0[0], 300 + J * Mv)), H = Math.min(f, F) - xv * u, U = Math.sqrt(f - H), et = Math.sqrt(F - H), it = z + Q * U / (U + et), ot = z + Q;
|
|
16651
|
+
P(it, { stretch: 1, bend: 4, leftHip: -55, leftKnee: -80, rightHip: 55, rightKnee: 80, leftShoulder: 110, rightShoulder: 110 }, void 0, !1), P(ot, { stretch: 0.72, bend: 12, leftShoulder: 75, rightShoulder: 75, leftElbow: 0, rightElbow: 0, leftHip: 18, rightHip: 18, leftKnee: 0, rightKnee: 0 }, void 0, !1), P(ot + 180, { stretch: 1.05, bend: -3 }, void 0, !1), P(ot + 340, { stretch: 1, bend: 0, leftHip: ht.leftHip, rightHip: ht.rightHip, leftShoulder: ht.leftShoulder, rightShoulder: ht.rightShoulder, leftElbow: ht.leftElbow, rightElbow: ht.rightElbow }, void 0, !1), w.push({ time: z, value: d - c }, { time: ot, value: L - c }), b.push(
|
|
16644
16652
|
{ time: z, value: f - h },
|
|
16645
16653
|
{ time: it, value: H - h, easing: "ease-out-quad" },
|
|
16646
|
-
{ time: ot, value:
|
|
16647
|
-
), d =
|
|
16654
|
+
{ time: ot, value: F - h, easing: "ease-in-quad" }
|
|
16655
|
+
), d = L, f = F, A.push({ kind: "dust", time: ot, x: d, y: f, length: 500 }), nt = ot + 340, $ = ot;
|
|
16648
16656
|
} else if (_.do === "point" && _.target) {
|
|
16649
|
-
const
|
|
16650
|
-
P(Q, { ...N, rightShoulder: q(N,
|
|
16657
|
+
const L = _.target, F = W(j, L.x, _.mood), N = { ...g, ..._.mood ? vt[_.mood] : {}, turn: Math.max(g.turn, 0.6), rightElbow: 0, rightWrist: 0, ...B }, X = ke(N, { height: u, facing: p }).head.center, z = Math.abs(L.x - (d + X.x)), J = L.y - (f + X.y), Q = F + $e;
|
|
16658
|
+
P(Q, { ...N, rightShoulder: q(N, L.x, L.y), lookX: 1, lookY: Dv(J / Math.max(1, Math.hypot(z, J))) * 0.8 }), nt = Q + (_.for ?? ea), $ = Q, I = nt;
|
|
16651
16659
|
} else if (_.do === "swipe") {
|
|
16652
|
-
const
|
|
16653
|
-
P(N +
|
|
16660
|
+
const L = _.target ?? { x: d + p * u * 0.5, y: f - u * 0.6 }, F = C(L.x), N = W(j, L.x, _.mood), X = F === 1 ? L.left ?? L.x : L.right ?? L.x, z = F === 1 ? L.right ?? L.x : L.left ?? L.x, J = { ...g, turn: 1, lean: -10, bend: -8, rightElbow: 40, lookX: 1, ...B };
|
|
16661
|
+
P(N + Fo, { ...J, rightShoulder: q(J, d - p * u * 0.3, f - u * 1.1) }, _.mood, !1);
|
|
16654
16662
|
const Q = { ...g, lean: 6, bend: 4, rightElbow: 0, rightWrist: 0 }, H = { ...g, lean: 14, bend: 12, rightElbow: 0, rightWrist: 0 };
|
|
16655
|
-
R(N, V(Q, X,
|
|
16656
|
-
const U = N +
|
|
16657
|
-
P(U, { ...Q, rightShoulder: q(Q, X,
|
|
16663
|
+
R(N, V(Q, X, L.y, "arm"), Fo + Gi), P(N + Fo + Gi, { lean: -12 }, void 0, !1);
|
|
16664
|
+
const U = N + Fo + Gi + 80;
|
|
16665
|
+
P(U, { ...Q, rightShoulder: q(Q, X, L.y) }, void 0, !1);
|
|
16658
16666
|
const et = U + (_.for ?? Math.max(Sv, Math.abs(z - X) / Tv));
|
|
16659
|
-
w.push({ time: U, value: d - c }), d = V(H, z,
|
|
16667
|
+
w.push({ time: U, value: d - c }), d = V(H, z, L.y, "arm"), w.push({ time: et, value: d - c }), P(et, { ...H, rightShoulder: q(H, z, L.y) }, void 0, !1), P(et + Vi, { lean: 16, bend: 14, rightShoulder: q(g, z + F * u * 0.4, L.y + u * 0.25) }, void 0, !1), P(et + Vi + L0, { lean: 0, bend: 0, rightShoulder: ht.rightShoulder, rightElbow: ht.rightElbow }), nt = et + Vi + L0, $ = U, I = et;
|
|
16660
16668
|
} else if (_.do === "grab" && _.target) {
|
|
16661
|
-
const
|
|
16669
|
+
const L = _.target, F = W(j, L.x, _.mood), N = L.y > f - u * 0.5, X = {
|
|
16662
16670
|
...g,
|
|
16663
16671
|
turn: 1,
|
|
16664
16672
|
rightElbow: 0,
|
|
@@ -16668,17 +16676,17 @@ function Ql(t, e, n = {}) {
|
|
|
16668
16676
|
lookX: 1,
|
|
16669
16677
|
lookY: N ? 0.8 : 0,
|
|
16670
16678
|
...B
|
|
16671
|
-
}, J = R(
|
|
16672
|
-
P(J, { ...X, rightShoulder: q(X,
|
|
16679
|
+
}, J = R(F, V(X, L.x, L.y, "arm"), Ts) + Ev;
|
|
16680
|
+
P(J, { ...X, rightShoulder: q(X, L.x, L.y) }, _.mood, !1), P(J + 120, {}, void 0, !1), P(J + W0, { bend: 0, lean: -3, stretch: 1, rightShoulder: 165, rightElbow: 20, lookY: -0.6 }), nt = J + W0 + 150, $ = J;
|
|
16673
16681
|
} else if (_.do === "throw") {
|
|
16674
|
-
const
|
|
16675
|
-
P(
|
|
16676
|
-
const X =
|
|
16682
|
+
const L = _.target?.x ?? _.to ?? d + p * u, F = W(j, L, _.mood), N = { ...g, turn: 1, lean: -12, bend: -10, rightElbow: 60, stretch: 0.95, lookX: 1, lookY: -0.3, ...B };
|
|
16683
|
+
P(F + Ji, { ...N, rightShoulder: q(N, d - p * u * 0.4, f - u * 1.05) }, _.mood, !1), P(F + Ji + N0, { lean: -14 }, void 0, !1);
|
|
16684
|
+
const X = F + Ji + N0 + Av, z = { ...g, lean: 14, bend: 12, rightElbow: 0, stretch: 1.04 };
|
|
16677
16685
|
k.push({ time: X, pose: g = { ...z, rightShoulder: q(z, d + p * u, f - u * 1.1) }, easing: "ease-in", act: !1 }), P(X + Zi, { lean: 18, bend: 14, rightShoulder: 55, stretch: 1 }, void 0, !1), P(X + Zi + D0, { lean: 0, bend: 0, rightShoulder: ht.rightShoulder, rightElbow: ht.rightElbow, lookY: 0 }), nt = X + Zi + D0, $ = X, I = X;
|
|
16678
16686
|
} else if (_.do === "kick" && _.target) {
|
|
16679
|
-
const
|
|
16687
|
+
const L = _.target, F = W(j, L.x, _.mood), N = { ...g, turn: 1, lean: -12, bend: -6, rightKnee: 0, leftShoulder: 100, rightShoulder: 70 }, X = R(F, V(N, L.x, L.y, "leg"), $v), z = { leftShoulder: 70, rightShoulder: 50, leftElbow: -20, rightElbow: 20 };
|
|
16680
16688
|
P(X + B0, { turn: 1, lean: 8, bend: 6, rightHip: -40, rightKnee: 80, lookX: 1, lookY: 0.7, ...z, ...B }, _.mood, !1);
|
|
16681
|
-
const J = X + B0 + Pv, Q = q(N,
|
|
16689
|
+
const J = X + B0 + Pv, Q = q(N, L.x, L.y, "leg");
|
|
16682
16690
|
k.push({ time: J, pose: g = { ...g, ...N, rightHip: Q }, easing: "ease-in", act: !1 }), P(J + Qi, { lean: -15, rightHip: Q + 20 }, void 0, !1), P(J + Qi + z0, {
|
|
16683
16691
|
lean: 0,
|
|
16684
16692
|
bend: 0,
|
|
@@ -16691,55 +16699,55 @@ function Ql(t, e, n = {}) {
|
|
|
16691
16699
|
lookY: 0
|
|
16692
16700
|
}), nt = J + Qi + z0, $ = J;
|
|
16693
16701
|
} else if (_.do === "put" && _.target) {
|
|
16694
|
-
const
|
|
16695
|
-
P(J, { ...X, rightShoulder: q(X,
|
|
16702
|
+
const L = _.target, F = W(j, L.x, _.mood), N = L.y > f - u * 0.5, X = { ...g, turn: 1, rightElbow: 0, rightWrist: 0, bend: N ? 35 : 0, lean: N ? 12 : 0, stretch: N ? 0.75 : 1, lookX: 1, lookY: N ? 0.8 : 0, ...B }, J = R(F, V(X, L.x, L.y, "arm"), Ts) + Ov;
|
|
16703
|
+
P(J, { ...X, rightShoulder: q(X, L.x, L.y) }, _.mood, !1), P(J + ta, {}, void 0, !1), P(J + ta + q0, { bend: 0, lean: 0, stretch: 1, rightShoulder: ht.rightShoulder, rightElbow: ht.rightElbow, lookY: 0 }), nt = J + ta + q0, $ = J;
|
|
16696
16704
|
} else if (_.do === "write" && _.target) {
|
|
16697
|
-
const
|
|
16698
|
-
const Z = tt({ ...z, ...G(z, st,
|
|
16699
|
-
return Math.hypot(Z.x - st, Z.y -
|
|
16700
|
-
}, H = p === 1 ?
|
|
16701
|
-
P(it, { ...z, ...G(z, et ?
|
|
16702
|
-
const ot = _.for ?? Math.max(_v, Math.abs(N -
|
|
16705
|
+
const L = _.target, F = L.left ?? L.x, N = L.right ?? L.x, X = W(j, (F + N) / 2, _.mood), z = { ...g, turn: 1, rightElbow: 0, rightWrist: 0, ...vt.thinking, lookX: 1, lookY: 0, ...B }, J = (st) => V(z, st, L.y, "arm") + p * u * 0.08, Q = (st) => {
|
|
16706
|
+
const Z = tt({ ...z, ...G(z, st, L.y), rightWrist: 0 });
|
|
16707
|
+
return Math.hypot(Z.x - st, Z.y - L.y) < 2;
|
|
16708
|
+
}, H = p === 1 ? F : N, U = R(X, J((F + N) / 2), Ts), et = !Q(F) || !Q(N), it = et ? R(U, J(F), Ts) + j0 : U + j0;
|
|
16709
|
+
P(it, { ...z, ...G(z, et ? F : H, L.y) }, _.mood, !1);
|
|
16710
|
+
const ot = _.for ?? Math.max(_v, Math.abs(N - F) * Iv);
|
|
16703
16711
|
et && w.push({ time: it, value: d - c });
|
|
16704
16712
|
for (let st = Y0, Z = 0; st <= ot; st += Y0, Z++) {
|
|
16705
|
-
const rt =
|
|
16713
|
+
const rt = F + (N - F) * Math.min(st, ot) / ot;
|
|
16706
16714
|
et && (d = J(rt), w.push({ time: it + st, value: d - c }));
|
|
16707
16715
|
const ct = (Z % 2 === 0 ? -1 : 1) * u * 0.02;
|
|
16708
|
-
P(it + st, G(z, rt,
|
|
16716
|
+
P(it + st, G(z, rt, L.y + ct), void 0, !1);
|
|
16709
16717
|
}
|
|
16710
16718
|
const lt = it + ot;
|
|
16711
|
-
P(lt, G(z, N,
|
|
16719
|
+
P(lt, G(z, N, L.y), void 0, !1), P(lt + K0, { rightShoulder: ht.rightShoulder, rightElbow: ht.rightElbow, ...vt.happy }), nt = lt + K0, $ = it, I = lt;
|
|
16712
16720
|
} else if (_.do === "push" && _.target) {
|
|
16713
|
-
const
|
|
16721
|
+
const L = _.target, F = _.to ?? L.x, N = W(j, d + (F >= L.x ? 1 : -1), _.mood), X = p === 1 ? L.left ?? L.x : L.right ?? L.x, z = { ...g, turn: 1, lean: 16, bend: 8, rightWrist: 0, leftWrist: 0, lookX: 1, ...B }, J = V(z, X, L.y, "arm"), Q = R(N, J + p * u * 0.06, Ts), H = G(z, X, L.y), U = { ...z, ...H, leftShoulder: -H.rightShoulder, leftElbow: -H.rightElbow }, et = Q + Cv;
|
|
16714
16722
|
P(et, U, _.mood, !1);
|
|
16715
|
-
const it = Math.abs(
|
|
16716
|
-
v.push({ time: et, value: "shove" }), E.push({ time: et, value: 0 }, { time: et + Pe, value: 1, easing: "ease-out" }, { time: ot - Pe, value: 1 }, { time: ot, value: 0, easing: "ease-in" }), S.push({ time: et, value: m }, { time: ot, value: m + lt }), m += lt, w.push({ time: et, value: d - c }, { time: ot, value: d + (
|
|
16723
|
+
const it = Math.abs(F - L.x), ot = et + (_.for ?? Math.max(600, it / Hv)), lt = it / Pa("shove", u);
|
|
16724
|
+
v.push({ time: et, value: "shove" }), E.push({ time: et, value: 0 }, { time: et + Pe, value: 1, easing: "ease-out" }, { time: ot - Pe, value: 1 }, { time: ot, value: 0, easing: "ease-in" }), S.push({ time: et, value: m }, { time: ot, value: m + lt }), m += lt, w.push({ time: et, value: d - c }, { time: ot, value: d + (F - L.x) - c }), d += F - L.x, P(ot, {}, void 0, !1), P(ot + X0, { lean: 0, bend: 0, rightShoulder: ht.rightShoulder, leftShoulder: ht.leftShoulder, rightElbow: ht.rightElbow, leftElbow: ht.leftElbow }), nt = ot + X0, $ = et, I = ot;
|
|
16717
16725
|
} else if (K) {
|
|
16718
|
-
const
|
|
16719
|
-
k.push(...N), g = N[N.length - 1].pose, nt = j + Math.max(mv(
|
|
16726
|
+
const L = _.mood ? rn(g, _.mood) : g, F = K.steps(L, _), N = og(F, { at: j, from: L });
|
|
16727
|
+
k.push(...N), g = N[N.length - 1].pose, nt = j + Math.max(mv(F), _.for ?? 0);
|
|
16720
16728
|
} else if (U0(_.do)) {
|
|
16721
|
-
const
|
|
16722
|
-
k.push(...
|
|
16729
|
+
const L = I0(_.do, { at: j, from: _.mood ? rn(g, _.mood) : g });
|
|
16730
|
+
k.push(...L), g = L[L.length - 1].pose, nt = j + Er(_.do), _.do === "take" && A.push({ kind: "dust", time: j + 900, x: d, y: f, length: 500 }), _.do === "land" && A.push({ kind: "dust", time: j + 120, x: d, y: f, length: 500 });
|
|
16723
16731
|
} else if (_.do === "look" || _.do === "face") {
|
|
16724
|
-
const
|
|
16725
|
-
if (
|
|
16726
|
-
else if (
|
|
16727
|
-
else if (
|
|
16732
|
+
const L = _.toward ?? "viewer", F = _.for ?? Rv;
|
|
16733
|
+
if (L === "viewer") P(j + $e, { turn: 0, lookX: 0, lookY: 0, ...B }, _.mood);
|
|
16734
|
+
else if (L === "ahead") P(j + $e, { turn: _.do === "face" ? 1 : 0.6, lookX: 1, ...B }, _.mood);
|
|
16735
|
+
else if (L === "back") P(j + $e, { turn: 0.2, lookX: -1, ...B }, _.mood);
|
|
16728
16736
|
else {
|
|
16729
|
-
const N = C(
|
|
16730
|
-
N !== p && _.do === "face" ? (O(j, N, _.mood), P(j +
|
|
16737
|
+
const N = C(L);
|
|
16738
|
+
N !== p && _.do === "face" ? (O(j, N, _.mood), P(j + Fn + 1, { lookX: 1, ...B })) : N !== p ? P(j + $e, { turn: 0.25, lookX: -1, ...B }, _.mood) : P(j + $e, { turn: _.do === "face" ? 1 : 0.6, lookX: 1, ...B }, _.mood);
|
|
16731
16739
|
}
|
|
16732
|
-
nt = j + Math.max(
|
|
16740
|
+
nt = j + Math.max(F, $e);
|
|
16733
16741
|
} else if (Wv(_.do) || _.do === "stand") {
|
|
16734
|
-
const
|
|
16735
|
-
P(j + $e, { ...
|
|
16742
|
+
const L = _.do === "stand" ? n.rest ?? ht : he[_.do], F = L.turn !== ht.turn ? L.turn : g.turn, N = _.mood ? vt[_.mood] : { lookX: g.lookX, lookY: g.lookY };
|
|
16743
|
+
P(j + $e, { ...L, turn: F, ...N, ...B }), nt = j + (_.for ?? ea);
|
|
16736
16744
|
} else {
|
|
16737
|
-
const
|
|
16738
|
-
(_.mood || _.pose) && P(j + Math.min($e,
|
|
16745
|
+
const L = _.for ?? (_.say ? Nv(_.say) : ea);
|
|
16746
|
+
(_.mood || _.pose) && P(j + Math.min($e, L / 2), B, _.mood), nt = j + L;
|
|
16739
16747
|
}
|
|
16740
16748
|
if (_.say) {
|
|
16741
|
-
const
|
|
16742
|
-
M.push({ text: _.say, start:
|
|
16749
|
+
const L = i(_.do) || U0(_.do) || K ? j : j + Math.min(150, (nt - j) / 4), F = i(_.do) ? nt : Math.max(L + 200, nt - 100);
|
|
16750
|
+
M.push({ text: _.say, start: L, end: F }), _.do === "say" && qv(k, g, L, F);
|
|
16743
16751
|
}
|
|
16744
16752
|
_.onto !== void 0 && _.do !== "leap" && _.onto !== f && (b.push({ time: j, value: f - h }, { time: nt, value: _.onto - h, easing: "ease-in-out" }), f = _.onto), nt > k[k.length - 1].time && k.push({ time: nt, pose: g }), T.push({ start: j, end: nt, ...$ !== void 0 ? { contact: $ } : {}, ...I !== void 0 ? { release: I } : {} }), y = nt;
|
|
16745
16753
|
}
|
|
@@ -16781,7 +16789,7 @@ function qv(t, e, n, s) {
|
|
|
16781
16789
|
a.length > 0 && a.push({ time: s, pose: e }), t.length = 0, t.push(...i, ...a.filter((l) => !r.some((c) => Math.abs(c.time - l.time) < 60)), ...r), t.sort((l, c) => l.time - c.time);
|
|
16782
16790
|
}
|
|
16783
16791
|
function lg(t, e, n) {
|
|
16784
|
-
const s = new
|
|
16792
|
+
const s = new Ft({ id: `${t}-hand`, tracks: e.filter((l) => l.target === t) }), o = Wd({ x: n.x, y: n.y, style: n.style, cast: n.cast }), r = n.side ?? "right", i = n.every ?? 33, a = [];
|
|
16785
16793
|
for (let l = n.start; ; l = Math.min(n.end, l + i)) {
|
|
16786
16794
|
const { joints: c } = Nd(o, { time: l, state: s.getStateAtTime(l) }, t), h = c.hands[r], u = c.fingertips[r];
|
|
16787
16795
|
if (a.push({ time: l, x: (h.x + u.x) / 2, y: (h.y + u.y) / 2 }), l >= n.end) break;
|
|
@@ -16955,7 +16963,7 @@ function lT(t) {
|
|
|
16955
16963
|
const Gv = /* @__PURE__ */ new Set(["x", "y", "walking", "gait"]), G0 = 0.215 + 0.205;
|
|
16956
16964
|
function Vv(t, e, n = 1) {
|
|
16957
16965
|
const { points: s } = ye(t, at), o = s["hip.left"], r = s["knee.left"], i = s["ankle.left"], a = o && r && i ? Math.hypot(r.x - o.x, r.y - o.y) + Math.hypot(i.x - r.x, i.y - r.y) : G0 * t.height;
|
|
16958
|
-
return
|
|
16966
|
+
return Ll(e, a / G0, n);
|
|
16959
16967
|
}
|
|
16960
16968
|
function cT(t, e, n, s = {}) {
|
|
16961
16969
|
const o = Ql(t, n, { ...s, height: e.height, reach: s.reach ?? Jv(e) }), r = o.tracks.find((y) => y.property === "facing")?.keyframes ?? [], i = (y) => {
|
|
@@ -16983,7 +16991,7 @@ const Zv = { point: "arm", grab: "arm", put: "arm", write: "arm", swipe: "arm",
|
|
|
16983
16991
|
function tM(t, e, n, s, o, r, i) {
|
|
16984
16992
|
const a = s.beats;
|
|
16985
16993
|
if (n.length !== a.length) return;
|
|
16986
|
-
const l = new
|
|
16994
|
+
const l = new Ft({ id: "placed", tracks: s.tracks.filter((h) => h.property === "x" || h.property === "y") }), c = (h) => {
|
|
16987
16995
|
const u = l.getStateAtTime(h).values.get(s.tracks[0]?.target ?? "");
|
|
16988
16996
|
return { x: (i.from ?? 0) + Number(u?.get("x") ?? 0), y: (i.ground ?? 0) + Number(u?.get("y") ?? 0) };
|
|
16989
16997
|
};
|
|
@@ -17025,7 +17033,7 @@ function rM(t, e, n, s) {
|
|
|
17025
17033
|
return i;
|
|
17026
17034
|
}
|
|
17027
17035
|
function iM(t, e, n, s, o) {
|
|
17028
|
-
const r = n.find((u) => u.property === "gait"), i = r ? new
|
|
17036
|
+
const r = n.find((u) => u.property === "gait"), i = r ? new Ft({ id: `${t}-gait-of`, tracks: [r] }) : void 0, a = (u) => {
|
|
17029
17037
|
const d = i?.getStateAtTime(u).values.get(t)?.get("gait");
|
|
17030
17038
|
if (typeof d == "string")
|
|
17031
17039
|
return Qt[d] ?? o.gaits?.[d] ?? d;
|
|
@@ -17187,7 +17195,7 @@ function fM(t, e) {
|
|
|
17187
17195
|
};
|
|
17188
17196
|
return { ...t, vertices: t.vertices.map((s) => se(e, s)), faces: t.faces.map((s) => ({ corners: s.corners, normal: n(s.normal) })) };
|
|
17189
17197
|
}
|
|
17190
|
-
function
|
|
17198
|
+
function Lo(t, e, n, s) {
|
|
17191
17199
|
const o = (i) => (i[e] - n) * s >= 0;
|
|
17192
17200
|
if (t.every(o)) return t;
|
|
17193
17201
|
const r = [];
|
|
@@ -17211,7 +17219,7 @@ function gM(t, e, n) {
|
|
|
17211
17219
|
}, u = [], d = (p) => p === 0, f = (p, g) => p + 2 === g.length;
|
|
17212
17220
|
for (const p of s) {
|
|
17213
17221
|
let g = p.points;
|
|
17214
|
-
d(i) || (g =
|
|
17222
|
+
d(i) || (g = Lo(g, 0, e[i], 1)), g.length && !f(i, e) && (g = Lo(g, 0, e[i + 1], -1)), g.length && !d(a) && (g = Lo(g, 2, n[a], 1)), g.length && !f(a, n) && (g = Lo(g, 2, n[a + 1], -1)), g.length >= 3 && u.push({ corners: g.map(h), normal: p.normal });
|
|
17215
17223
|
}
|
|
17216
17224
|
u.length > 0 && o.push({ cell: [i, a], mesh: { vertices: l, faces: u, creases: t.creases, joined: t.joined, walls: r } });
|
|
17217
17225
|
}
|
|
@@ -17365,17 +17373,17 @@ function gg(t, e, n, s, o = {}) {
|
|
|
17365
17373
|
if (!o.perspective) return Z[2] > 1e-6;
|
|
17366
17374
|
const ut = W.faces[rt].corners.reduce((yt, bt) => [yt[0] + G[bt][0], yt[1] + G[bt][1], yt[2] + G[bt][2]], [0, 0, 0]);
|
|
17367
17375
|
return -(Z[0] * ut[0] + Z[1] * ut[1] + Z[2] * ut[2]) > 1e-9;
|
|
17368
|
-
}),
|
|
17376
|
+
}), L = (Z) => W.faces[Z].corners.reduce((rt, ct) => rt + G[ct][2], 0) / W.faces[Z].corners.length, F = W.faces.map((Z, rt) => ({ face: Z, i: rt })).filter(({ i: Z }) => K[Z]).map(({ face: Z, i: rt }) => ({
|
|
17369
17377
|
i: rt,
|
|
17370
17378
|
solved: {
|
|
17371
17379
|
points: D === void 0 ? Z.corners.map((ct) => R[ct]) : Y(_(Z.corners.map((ct) => G[ct]))),
|
|
17372
|
-
depth:
|
|
17380
|
+
depth: L(rt),
|
|
17373
17381
|
tone: 0.72 + 0.33 * Math.max(0, $[rt][0] * sa[0] + $[rt][1] * sa[1] + $[rt][2] * sa[2])
|
|
17374
17382
|
}
|
|
17375
17383
|
})).filter((Z) => Z.solved.points.length >= 3).sort((Z, rt) => Z.solved.depth - rt.solved.depth);
|
|
17376
17384
|
if (o.light) {
|
|
17377
17385
|
const Z = l(q);
|
|
17378
|
-
for (const { i: rt, solved: ct } of
|
|
17386
|
+
for (const { i: rt, solved: ct } of F) {
|
|
17379
17387
|
const ut = W.faces[rt].corners, yt = ut.reduce((ni, Wg) => {
|
|
17380
17388
|
const si = se(q, W.vertices[Wg]);
|
|
17381
17389
|
return [ni[0] + si[0] / ut.length, ni[1] + si[1] / ut.length, ni[2] + si[2] / ut.length];
|
|
@@ -17383,22 +17391,22 @@ function gg(t, e, n, s, o = {}) {
|
|
|
17383
17391
|
ct.light = ps.light, ct.fog = ps.fog;
|
|
17384
17392
|
}
|
|
17385
17393
|
}
|
|
17386
|
-
const N =
|
|
17394
|
+
const N = F.map((Z) => Z.solved), X = xM(W), z = [], J = [];
|
|
17387
17395
|
for (const [Z, rt] of X) {
|
|
17388
17396
|
const ct = rt.filter((yt) => K[yt]).length;
|
|
17389
17397
|
if (ct === 0) continue;
|
|
17390
17398
|
const ut = rt.length === 2 && ct === 2 && W.creases !== !1 && $[rt[0]][0] * $[rt[1]][0] + $[rt[0]][1] * $[rt[1]][1] + $[rt[0]][2] * $[rt[1]][2] < MM;
|
|
17391
|
-
rt.length === 1 && (W.joined || EM(W, Z)) || (rt.length === 1 || ct === 1 || ut) && (z.push(Z.split("-").map(Number)), J.push(rt.filter((yt) => K[yt]).reduce((yt, bt) =>
|
|
17399
|
+
rt.length === 1 && (W.joined || EM(W, Z)) || (rt.length === 1 || ct === 1 || ut) && (z.push(Z.split("-").map(Number)), J.push(rt.filter((yt) => K[yt]).reduce((yt, bt) => L(bt) > L(yt) ? bt : yt)));
|
|
17392
17400
|
}
|
|
17393
17401
|
const Q = (Z) => W.faces.findIndex((rt) => rt.corners.length > 4 && Math.sign($M(W.vertices[Z], rt.normal)) > 0), H = (W.marks ?? []).filter(([Z]) => Q(Z) < 0 || K[Q(Z)]), U = ([Z, rt]) => D === void 0 ? [[R[Z], R[rt]]] : j([G[Z], G[rt]]).map(Y), et = H.flatMap(U), it = (Z) => D === void 0 ? [Z.map((rt) => R[rt])] : j(Z.map((rt) => G[rt])).map(Y);
|
|
17394
17402
|
if (o.slice !== void 0) {
|
|
17395
17403
|
const Z = /* @__PURE__ */ new Map();
|
|
17396
17404
|
z.forEach((rt, ct) => Z.set(J[ct], [...Z.get(J[ct]) ?? [], rt]));
|
|
17397
|
-
for (const { i: rt, solved: ct } of
|
|
17405
|
+
for (const { i: rt, solved: ct } of F) {
|
|
17398
17406
|
ct.edges = ou(Z.get(rt) ?? []).flatMap(it);
|
|
17399
17407
|
const ut = W.faces[rt].corners;
|
|
17400
17408
|
ct.center = ut.reduce((bt, re) => [bt[0] + G[re][0] / ut.length, bt[1] + G[re][1] / ut.length, bt[2] + G[re][2] / ut.length], [0, 0, 0]), ct.normal = $[rt];
|
|
17401
|
-
const yt =
|
|
17409
|
+
const yt = F[F.length - 1].i;
|
|
17402
17410
|
ct.marks = H.filter(([bt]) => (Q(bt) >= 0 ? Q(bt) : yt) === rt).flatMap(U);
|
|
17403
17411
|
}
|
|
17404
17412
|
}
|
|
@@ -17556,7 +17564,7 @@ function PM(t) {
|
|
|
17556
17564
|
},
|
|
17557
17565
|
draw(l, c, h) {
|
|
17558
17566
|
const u = c.props ?? {};
|
|
17559
|
-
l.translate(s / 2, o),
|
|
17567
|
+
l.translate(s / 2, o), Ff(l, go(e, u, n), { ...a, time: h, loose: pg(c, u) });
|
|
17560
17568
|
}
|
|
17561
17569
|
};
|
|
17562
17570
|
}
|
|
@@ -17583,7 +17591,7 @@ function sc(t, e, n) {
|
|
|
17583
17591
|
}
|
|
17584
17592
|
function uT(t, e, n, s, o = {}) {
|
|
17585
17593
|
const r = sc(e, n, s);
|
|
17586
|
-
return t.save(), t.translate(r.origin.x, r.origin.y),
|
|
17594
|
+
return t.save(), t.translate(r.origin.x, r.origin.y), Ff(t, r.solved, {
|
|
17587
17595
|
...e.propDraw,
|
|
17588
17596
|
time: n.time,
|
|
17589
17597
|
loose: pg(e, r.values),
|
|
@@ -17610,7 +17618,7 @@ const Cs = {
|
|
|
17610
17618
|
}
|
|
17611
17619
|
}, OM = 400, IM = 0.2;
|
|
17612
17620
|
function dT(t, e = {}) {
|
|
17613
|
-
const { prop: n } = t, s = mg(n), o = Object.keys(s), r = Object.keys(n.rig.anchors ?? {}), i = n.rig.parts.map((E) => E.id), a = uo(), l = Jr(a), c = e.tracks?.length ? new
|
|
17621
|
+
const { prop: n } = t, s = mg(n), o = Object.keys(s), r = Object.keys(n.rig.anchors ?? {}), i = n.rig.parts.map((E) => E.id), a = uo(), l = Jr(a), c = e.tracks?.length ? new Ft({ id: `${n.kind}-surface`, tracks: e.tracks }) : void 0, h = Math.max(0, ...(e.tracks ?? []).flatMap((E) => E.keyframes.map((v) => v.time))), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
17614
17622
|
t.loose = d;
|
|
17615
17623
|
const f = t.props, p = (E) => {
|
|
17616
17624
|
const v = { ...t.props };
|
|
@@ -18002,7 +18010,7 @@ function RM(t = {}) {
|
|
|
18002
18010
|
colors: t.colors
|
|
18003
18011
|
});
|
|
18004
18012
|
}
|
|
18005
|
-
function
|
|
18013
|
+
function FM(t = {}) {
|
|
18006
18014
|
return Ve({
|
|
18007
18015
|
kind: "truck",
|
|
18008
18016
|
summary: "A box truck: drives, brakes, bumps, honks, opens its cab doors, lights up, turns toward the camera.",
|
|
@@ -18021,7 +18029,7 @@ function LM(t = {}) {
|
|
|
18021
18029
|
colors: { body: "#2f6fb7", ...t.colors }
|
|
18022
18030
|
});
|
|
18023
18031
|
}
|
|
18024
|
-
function
|
|
18032
|
+
function LM(t = {}) {
|
|
18025
18033
|
return Ve({
|
|
18026
18034
|
kind: "bus",
|
|
18027
18035
|
summary: "A bus: drives, brakes, bumps, honks, opens its front doors, lights its windows, turns toward the camera.",
|
|
@@ -19394,7 +19402,7 @@ function Sx(t = {}) {
|
|
|
19394
19402
|
grazes: !0
|
|
19395
19403
|
});
|
|
19396
19404
|
}
|
|
19397
|
-
const
|
|
19405
|
+
const Fe = 0.6, Mg = 75, oa = 80;
|
|
19398
19406
|
function An(t) {
|
|
19399
19407
|
const { colors: e } = t, [n, s, o] = t.body.radii, r = (t.tail.raised ?? 15) * Math.PI / 180, i = t.tail.length * 0.4, a = [
|
|
19400
19408
|
{ id: "body", shape: { type: "ellipsoid", radii: t.body.radii, segments: 16 }, at: [0, t.body.height, 0], fill: e.body },
|
|
@@ -19436,8 +19444,8 @@ function An(t) {
|
|
|
19436
19444
|
}), a.push({
|
|
19437
19445
|
id: `wing-${u}-blade`,
|
|
19438
19446
|
parent: `wing-${u}`,
|
|
19439
|
-
shape: { type: "ellipsoid", radii: [t.wing.span *
|
|
19440
|
-
at: [h * t.wing.span *
|
|
19447
|
+
shape: { type: "ellipsoid", radii: [t.wing.span * Fe / 2, t.wing.chord * 0.1, t.wing.chord / 2], segments: 12 },
|
|
19448
|
+
at: [h * t.wing.span * Fe / 2, 0, -t.wing.chord * 0.1],
|
|
19441
19449
|
// Folded, the blade is rolled about its length so it lies flat against the body's side.
|
|
19442
19450
|
rotate: [-oa, 0, 0],
|
|
19443
19451
|
fill: e.wing,
|
|
@@ -19445,8 +19453,8 @@ function An(t) {
|
|
|
19445
19453
|
}), a.push({
|
|
19446
19454
|
id: `wing-${u}-tip`,
|
|
19447
19455
|
parent: `wing-${u}-blade`,
|
|
19448
|
-
shape: { type: "ellipsoid", radii: [t.wing.span *
|
|
19449
|
-
at: [h * t.wing.span *
|
|
19456
|
+
shape: { type: "ellipsoid", radii: [t.wing.span * Fe / 2.4, t.wing.chord * 0.06, t.wing.chord * 0.3], segments: 10 },
|
|
19457
|
+
at: [h * t.wing.span * Fe / 4, 0, -t.wing.chord * 0.3],
|
|
19450
19458
|
rotate: [0, h * 14, 0],
|
|
19451
19459
|
fill: e.wing,
|
|
19452
19460
|
outline: 0.8
|
|
@@ -19461,8 +19469,8 @@ function An(t) {
|
|
|
19461
19469
|
bind: [
|
|
19462
19470
|
{ parts: ["wing-left"], rotate: { axis: "y", degrees: -90 } },
|
|
19463
19471
|
{ parts: ["wing-right"], rotate: { axis: "y", degrees: 90 } },
|
|
19464
|
-
{ parts: ["wing-left-blade"], translate: [t.wing.span * (1 -
|
|
19465
|
-
{ parts: ["wing-right-blade"], translate: [-t.wing.span * (1 -
|
|
19472
|
+
{ parts: ["wing-left-blade"], translate: [t.wing.span * (1 - Fe) / 2, 0, 0], rotate: { axis: "x", degrees: oa }, scale: [1 / Fe, 1, 1] },
|
|
19473
|
+
{ parts: ["wing-right-blade"], translate: [-t.wing.span * (1 - Fe) / 2, 0, 0], rotate: { axis: "x", degrees: oa }, scale: [1 / Fe, 1, 1] }
|
|
19466
19474
|
]
|
|
19467
19475
|
},
|
|
19468
19476
|
flap: {
|
|
@@ -19740,7 +19748,7 @@ function Hx(t = {}) {
|
|
|
19740
19748
|
stoop: 10
|
|
19741
19749
|
});
|
|
19742
19750
|
}
|
|
19743
|
-
const eo = { car: RM, truck:
|
|
19751
|
+
const eo = { car: RM, truck: FM, bus: LM, tractor: WM, cart: NM, trainCar: DM, bike: BM, motorbike: zM, tree: qM, house: KM, chair: GM, desk: ZM, bed: tx, door: nx, wheelchair: rx, helicopter: lx, airplane: hx, horse: bx, dog: wx, cat: kx, cow: vx, goat: Mx, rabbit: xx, squirrel: Sx, songbird: $x, crow: Px, chicken: Ox, pigeon: Ix, duck: _x, owl: Cx, parrot: Hx };
|
|
19744
19752
|
function xg(t, e = {}) {
|
|
19745
19753
|
const n = eo[t];
|
|
19746
19754
|
if (!n) throw new Error(dt("prop preset", t, Object.keys(eo)));
|
|
@@ -19777,7 +19785,7 @@ function rc(t) {
|
|
|
19777
19785
|
return { ...Sg, ...t.actions };
|
|
19778
19786
|
}
|
|
19779
19787
|
const ra = (t) => typeof t == "number" && Number.isFinite(t);
|
|
19780
|
-
function
|
|
19788
|
+
function Fx(t, e) {
|
|
19781
19789
|
if (!Array.isArray(t)) return [{ level: "error", beat: -1, message: `Beats must be an array of { do: … } objects (got ${typeof t}).` }];
|
|
19782
19790
|
const n = rc(e), s = Object.keys(n), o = [];
|
|
19783
19791
|
return t.forEach((r, i) => {
|
|
@@ -19798,8 +19806,8 @@ function Lx(t, e) {
|
|
|
19798
19806
|
l[c] !== void 0 && typeof l[c] != "boolean" && a(`\`${c}\` is true or false (got ${JSON.stringify(l[c])}).`);
|
|
19799
19807
|
}), o;
|
|
19800
19808
|
}
|
|
19801
|
-
function
|
|
19802
|
-
const o =
|
|
19809
|
+
function Lx(t, e, n, s = {}) {
|
|
19810
|
+
const o = Fx(n, e).filter((M) => M.level === "error");
|
|
19803
19811
|
if (o.length > 0) throw new Error(`propScript (${e.kind}): ${o.length} problem(s) in the beats:
|
|
19804
19812
|
${o.map((M) => ` beat ${M.beat}: ${M.message}`).join(`
|
|
19805
19813
|
`)}`);
|
|
@@ -19868,7 +19876,7 @@ ${o.map((M) => ` beat ${M.beat}: ${M.message}`).join(`
|
|
|
19868
19876
|
x.push(M);
|
|
19869
19877
|
continue;
|
|
19870
19878
|
}
|
|
19871
|
-
const A = new
|
|
19879
|
+
const A = new Ft({ id: `${t}-own`, tracks: [x[T]] }), P = (O) => Number(A.getStateAtTime(O).values.get(t)?.get(M.property) ?? 0);
|
|
19872
19880
|
x[T] = { ...M, keyframes: M.keyframes.map((O) => ({ time: O.time, value: Number(O.value) + P(O.time) })) };
|
|
19873
19881
|
}
|
|
19874
19882
|
return { tracks: x, duration: b, beats: w, effects: f };
|
|
@@ -19876,7 +19884,7 @@ ${o.map((M) => ` beat ${M.beat}: ${M.message}`).join(`
|
|
|
19876
19884
|
const Wx = 1500;
|
|
19877
19885
|
function Nx(t, e, n, s, o) {
|
|
19878
19886
|
if (!e.follow?.length) return [];
|
|
19879
|
-
const r = new
|
|
19887
|
+
const r = new Ft({ id: `${t}-follow`, tracks: n.filter((a) => a.property === "turn" || e.follow.some((l) => l.of === a.property)) }), i = (a, l) => {
|
|
19880
19888
|
const c = r.getStateAtTime(a).values.get(t)?.get(l);
|
|
19881
19889
|
return typeof c == "number" ? c : o[l] ?? 0;
|
|
19882
19890
|
};
|
|
@@ -20370,9 +20378,9 @@ function Hg(t = {}) {
|
|
|
20370
20378
|
}
|
|
20371
20379
|
} };
|
|
20372
20380
|
}
|
|
20373
|
-
const qt = 1900, Es = 2450, xt = 2900, As = 4100,
|
|
20381
|
+
const qt = 1900, Es = 2450, xt = 2900, As = 4100, Le = 4200, Ln = 4600, No = 5300, ua = 5500;
|
|
20374
20382
|
function Do(t, e, n, s, o, r, i = t.object.pose?.turn ?? 0) {
|
|
20375
|
-
const a = Pt(e, n, s), l = ao(o, r), c = Zn(o, r, i), h = i + (c - i) * _t(Pt(e, n, n + 200)), u = { ...at, ...t.object.pose, turn: h }, d =
|
|
20383
|
+
const a = Pt(e, n, s), l = ao(o, r), c = Zn(o, r, i), h = i + (c - i) * _t(Pt(e, n, n + 200)), u = { ...at, ...t.object.pose, turn: h }, d = Ll("run", t.who.height, 1, t.object.character?.legLength ?? 1), f = Fl("run", l * a / d, u), p = Math.min(a * 12, (1 - a) * 12, 1);
|
|
20376
20384
|
return { position: sn(o, r, a), pose: Pr(u, f, Math.max(0, p)) };
|
|
20377
20385
|
}
|
|
20378
20386
|
function da(t, e, n) {
|
|
@@ -20417,15 +20425,15 @@ function Rg(t, e, n) {
|
|
|
20417
20425
|
B || (B = /* @__PURE__ */ new Map(), w.set($, B));
|
|
20418
20426
|
const K = B.get(I);
|
|
20419
20427
|
if (K) return K;
|
|
20420
|
-
const
|
|
20421
|
-
let
|
|
20428
|
+
const L = h[$];
|
|
20429
|
+
let F = d($);
|
|
20422
20430
|
if ($ === "bowler") {
|
|
20423
|
-
const N =
|
|
20431
|
+
const N = F.position;
|
|
20424
20432
|
if (I < 1400) {
|
|
20425
20433
|
const X = St(b, [0, 0, -0.65]);
|
|
20426
|
-
|
|
20434
|
+
F = Do(L, I, 0, 1400, N, X), F.pose["arm.right.swing"] = 45, F.pose["arm.right.elbow"] = 80;
|
|
20427
20435
|
} else
|
|
20428
|
-
|
|
20436
|
+
F.position = I <= qt ? sn(St(b, [0, 0, -0.65]), b, _t(Pt(I, 1400, qt))) : St(b, [0, 0, 0.8 * _t(Pt(I, qt, 2600))]), F.pose = ia(I, [
|
|
20429
20437
|
[1400, { turn: 0, "arm.right.swing": 285, "arm.right.elbow": 8, "arm.left.swing": 115, "leg.right.swing": 15, "leg.left.knee": 45 }],
|
|
20430
20438
|
[1800, { turn: 0, "arm.right.swing": 180, "arm.right.elbow": 0, "arm.left.swing": 80, "leg.right.swing": 25, "leg.right.knee": 0, "leg.left.swing": -25, "leg.left.knee": 60 }],
|
|
20431
20439
|
[qt, { turn: 0, lean: 8, "arm.right.swing": 155, "arm.right.elbow": 0, "arm.left.swing": 45, "leg.right.swing": 25, "leg.right.knee": 0, "leg.left.swing": -25, "leg.left.knee": 60 }],
|
|
@@ -20433,47 +20441,47 @@ function Rg(t, e, n) {
|
|
|
20433
20441
|
[3e3, { turn: 0, "head.turn": 10 }],
|
|
20434
20442
|
[6e3, { turn: 0, "head.turn": 10 }]
|
|
20435
20443
|
]);
|
|
20436
|
-
i && (
|
|
20437
|
-
for (const [X, z] of Object.entries(I < qt ? Tt.hold : Tt.open))
|
|
20444
|
+
i && (F.pose = { ...F.pose, "arm.right.spread": 18, "head.tilt": -5 });
|
|
20445
|
+
for (const [X, z] of Object.entries(I < qt ? Tt.hold : Tt.open)) F.pose[`hand.right.${X}`] = z;
|
|
20438
20446
|
} else if ($ === "batter" || $ === "non-striker") {
|
|
20439
20447
|
const N = u($);
|
|
20440
|
-
if (s === "lbw" && $ === "batter" && (
|
|
20448
|
+
if (s === "lbw" && $ === "batter" && (F.position[0] = 0), s === "stumping" && $ === "batter" && (F.position[2] -= 1.1 * _t(Pt(I, 2150, 2800))), k && I > 3050) {
|
|
20441
20449
|
const X = v($, 3050), z = $ === "batter" ? [1, 0, -9.5] : [-1, 0, 9.5];
|
|
20442
|
-
|
|
20443
|
-
const Q = so(
|
|
20444
|
-
|
|
20450
|
+
F = Do(L, I, 3050, s === "run-out" ? 6e3 : ua, X.position, z, X.pose.turn);
|
|
20451
|
+
const Q = so(L, F, "right");
|
|
20452
|
+
F.bat = { grip: Q, axis: Zt([0.7, -0.35, 0.5]), scale: N / 1.78 };
|
|
20445
20453
|
} else {
|
|
20446
|
-
|
|
20447
|
-
let z = [0, -1, $ === "batter" ? 0.05 : 0.12], J = St(
|
|
20448
|
-
if ($ === "non-striker" && (J = St(
|
|
20454
|
+
F.pose = { ...F.pose, ...$ === "batter" ? Eg() : { turn: 0.15, "leg.left.knee": 8, "leg.right.knee": 8 } };
|
|
20455
|
+
let z = [0, -1, $ === "batter" ? 0.05 : 0.12], J = St(F.position, [N * 0.15, N * 0.44, N * 0.04]);
|
|
20456
|
+
if ($ === "non-striker" && (J = St(F.position, [N * 0.08, N * 0.44, N * 0.17])), $ === "batter") {
|
|
20449
20457
|
const Q = _t(Pt(I, 2100, 2600)) * (1 - _t(Pt(I, 2600, xt))), H = _t(Pt(I, 2600, xt)) * (1 - _t(Pt(I, xt, 3800))), U = _t(Pt(I, xt, 3250)) * (1 - _t(Pt(I, 3250, 4e3)));
|
|
20450
20458
|
if (g) {
|
|
20451
|
-
J = St(
|
|
20459
|
+
J = St(F.position, [N * (0.15 + 0.03 * Q - 0.02 * H - 0.03 * U), N * (0.44 + 0.14 * Q + 0.07 * H + 0.23 * U), N * (0.04 + 0.16 * Q - 0.12 * H - 0.06 * U)]), z = Zt([0.15 * Q + 0.25 * U, -1 + 1.85 * Q + 1.6 * U, 0.05 + 0.55 * Q - 0.4 * H - 0.8 * U]), F.pose.turn = 1 + 0.12 * H + 0.3 * U, F.pose.lean = 3 + 4 * H;
|
|
20452
20460
|
const et = 12 + 4 * H;
|
|
20453
|
-
|
|
20461
|
+
F.pose["leg.left.spread"] = et, F.pose["leg.right.spread"] = et, s === "defend" && (z = [0, -1, -0.08], J = St(F.position, [N * 0.1, N * 0.5, -N * 0.12]));
|
|
20454
20462
|
} else if (["stumping", "bowled", "lbw"].includes(s)) {
|
|
20455
20463
|
const et = _t(Pt(I, 2100, 2700)) * (1 - _t(Pt(I, 4e3, 4500)));
|
|
20456
|
-
z = Zt([0.15 * et, -1 + 1.85 * et, 0.05 + 0.55 * et]), J = St(
|
|
20464
|
+
z = Zt([0.15 * et, -1 + 1.85 * et, 0.05 + 0.55 * et]), J = St(F.position, [N * (0.15 + 0.03 * et), N * (0.44 + 0.14 * et), N * (0.04 + 0.16 * et)]);
|
|
20457
20465
|
}
|
|
20458
20466
|
}
|
|
20459
|
-
|
|
20467
|
+
F = jx(L, F, J, z);
|
|
20460
20468
|
}
|
|
20461
20469
|
} else if ($ === "keeper") {
|
|
20462
|
-
|
|
20463
|
-
const N = da(
|
|
20470
|
+
F.pose = { ...F.pose, turn: Zn(F.position, d("bowler").position, 2), lean: 20, "leg.left.swing": 22, "leg.right.swing": 22, "leg.left.knee": 50, "leg.right.knee": 50 }, r && (F.position[0] = 2.15 * _t(Pt(I, 2900, 3500))), s === "stumping" && (F.position[2] -= 0.85 * _t(Pt(I, 3400, 3900)));
|
|
20471
|
+
const N = da(F, u($) * 0.27, u($) * 0.44);
|
|
20464
20472
|
if (s === "stumping" && I >= 3500) {
|
|
20465
|
-
const X = da({ ...
|
|
20466
|
-
|
|
20473
|
+
const X = da({ ...F, position: d($).position }, u($) * 0.27, u($) * 0.44), z = [0, Xt.stumpHeight, Xt.length / 2], J = sn(X, z, _t(Pt(I, 3500, 3900)));
|
|
20474
|
+
F = qe(L, F, "right", J), F = qe(L, F, "left", St(J, [0.045, 0, 0]));
|
|
20467
20475
|
} else
|
|
20468
|
-
|
|
20476
|
+
F = qe(L, F, "right", N), F = qe(L, F, "left", St(N, [0.045, 0, 0]));
|
|
20469
20477
|
} else if ($ === "fielder" && y) {
|
|
20470
|
-
if (
|
|
20471
|
-
const N = { ...at, turn: Zn(S, d("batter").position,
|
|
20472
|
-
|
|
20473
|
-
const X = da(
|
|
20474
|
-
if (
|
|
20475
|
-
const z = { ...at, turn: Zn(S, s === "throw" ? d("keeper").position : t.landmarks["bowler-wicket"],
|
|
20476
|
-
|
|
20478
|
+
if (F = Do(L, I, 3050, s === "catch" ? 3800 : 3950, E, S), I >= 3800) {
|
|
20479
|
+
const N = { ...at, turn: Zn(S, d("batter").position, F.pose.turn), lean: s === "catch" ? 5 : 42, bend: s === "catch" ? 0 : 18, "leg.left.swing": s === "catch" ? 0 : 45, "leg.right.swing": s === "catch" ? 0 : 45, "leg.left.knee": s === "catch" ? 0 : 85, "leg.right.knee": s === "catch" ? 0 : 85, smile: 0.7 };
|
|
20480
|
+
F.pose = Pr(F.pose, N, _t(Pt(I, 3800, Le)));
|
|
20481
|
+
const X = da(F, u($) * 0.22, u($) * (s === "catch" ? 0.73 : 0.2));
|
|
20482
|
+
if (F = qe(L, F, "right", X), F = qe(L, F, "left", St(X, [0.035, 0, 0])), (s === "throw" || s === "run-out") && I > Le) {
|
|
20483
|
+
const z = { ...at, turn: Zn(S, s === "throw" ? d("keeper").position : t.landmarks["bowler-wicket"], F.pose.turn), "arm.right.swing": 225, "arm.right.elbow": 60, "arm.left.spread": 70, "leg.left.swing": 15 }, J = { ...z, "arm.right.swing": 110, "arm.right.elbow": 0, lean: 15 };
|
|
20484
|
+
F.pose = ia(I, [[Le, F.pose], [4450, z], [Ln, J], [4900, { ...at, turn: z.turn, "arm.right.swing": 25, lean: 22 }], [6e3, { ...at, turn: z.turn }]]);
|
|
20477
20485
|
}
|
|
20478
20486
|
}
|
|
20479
20487
|
} else if ($ === "umpire") {
|
|
@@ -20503,12 +20511,12 @@ function Rg(t, e, n) {
|
|
|
20503
20511
|
}
|
|
20504
20512
|
J.push([H, Q], [H + 350, U]);
|
|
20505
20513
|
}
|
|
20506
|
-
|
|
20514
|
+
F.pose = ia(I, J);
|
|
20507
20515
|
} else
|
|
20508
|
-
|
|
20516
|
+
F.pose = Pr(F.pose, N, _t(Pt(I, s === "no-ball" ? qt : s === "wide" ? 3100 : X, (s === "no-ball" ? qt : s === "wide" ? 3100 : X) + 350)));
|
|
20509
20517
|
}
|
|
20510
|
-
return B.set(I,
|
|
20511
|
-
}, x = ($, I) => so(h[$], v($, I), "right"), M = g ? Yx(v("batter", xt).bat) : s === "lbw" ? sn(fs(h.batter, v("batter", xt), "leg.right", 1), fs(h.batter, v("batter", xt), "leg.right", 2), 0.6) : [m ? Xt.wicketWidth / 2 + 0.075 + 0.15 : 0, 0.45, 9.25], T = x("bowler", qt), A = [r ? 0.85 : i ? -0.35 : s === "lbw" ? M[0] * 0.6 : 0, 0.075, 3.9], P = x("keeper", s === "stumping" ? 3400 : 3500), O = x("fielder", As), C = x("fielder",
|
|
20518
|
+
return B.set(I, F), F;
|
|
20519
|
+
}, x = ($, I) => so(h[$], v($, I), "right"), M = g ? Yx(v("batter", xt).bat) : s === "lbw" ? sn(fs(h.batter, v("batter", xt), "leg.right", 1), fs(h.batter, v("batter", xt), "leg.right", 2), 0.6) : [m ? Xt.wicketWidth / 2 + 0.075 + 0.15 : 0, 0.45, 9.25], T = x("bowler", qt), A = [r ? 0.85 : i ? -0.35 : s === "lbw" ? M[0] * 0.6 : 0, 0.075, 3.9], P = x("keeper", s === "stumping" ? 3400 : 3500), O = x("fielder", As), C = x("fielder", Le), W = s === "run-out" ? "bowler" : "striker", q = s === "run-out" ? 5e3 : s === "stumping" ? 3900 : 3200, V = [t.boundaryRadius * 0.8, s === "six" ? 2.1 : 0.075, -t.boundaryRadius * 0.6], tt = ($, I, B, K, L, F = 0, N = 0) => Og({ target: `${c}/ball`, start: I, end: B, from: K, to: L, arc: F, curve: N }, $), G = ($) => {
|
|
20512
20520
|
if ($ <= qt) return x("bowler", $);
|
|
20513
20521
|
if ($ <= Es) return tt($, qt, Es, T, A, 0.15, i ? 0.35 : 0);
|
|
20514
20522
|
const I = r ? St(P, [0, 0, -0.6]) : M;
|
|
@@ -20521,8 +20529,8 @@ function Rg(t, e, n) {
|
|
|
20521
20529
|
if (["bowling", "spin", "no-ball", "wide", "stumping"].includes(s)) {
|
|
20522
20530
|
const K = s === "stumping" ? 3400 : 3500;
|
|
20523
20531
|
if (m && $ <= K) {
|
|
20524
|
-
const
|
|
20525
|
-
return $ <= 3200 ? tt($, xt, 3200, I,
|
|
20532
|
+
const L = [I[0], P[1], Xt.length / 2 + 0.2];
|
|
20533
|
+
return $ <= 3200 ? tt($, xt, 3200, I, L, 0.04) : tt($, 3200, K, L, P, 0.04);
|
|
20526
20534
|
}
|
|
20527
20535
|
return $ <= K ? tt($, xt, K, I, P, 0.04) : x("keeper", $);
|
|
20528
20536
|
}
|
|
@@ -20535,15 +20543,15 @@ function Rg(t, e, n) {
|
|
|
20535
20543
|
if (s === "catch") return $ <= As ? tt($, xt, As, M, O, 5) : x("fielder", $);
|
|
20536
20544
|
const B = [4, 0.075, 5];
|
|
20537
20545
|
if ($ <= 3300) return tt($, xt, 3300, M, B, 0.8);
|
|
20538
|
-
if ($ <=
|
|
20546
|
+
if ($ <= Le) return tt($, 3300, Le, B, C);
|
|
20539
20547
|
if (s === "throw" || s === "run-out") {
|
|
20540
|
-
if ($ <=
|
|
20541
|
-
const K = x("fielder",
|
|
20542
|
-
return $ <=
|
|
20548
|
+
if ($ <= Ln) return x("fielder", $);
|
|
20549
|
+
const K = x("fielder", Ln), L = s === "run-out" ? [0, 0.42, -Xt.length / 2] : x("keeper", No), F = s === "run-out" ? q : No;
|
|
20550
|
+
return $ <= F ? tt($, Ln, F, K, L, 1.2) : s === "run-out" ? tt($, F, 5700, L, [0, 0.075, -12], 0.18) : x("keeper", $);
|
|
20543
20551
|
}
|
|
20544
20552
|
return [...C];
|
|
20545
|
-
}, R = [], D = ($, I, B, K,
|
|
20546
|
-
if (D("setup", 0, "setup", Y, n ? `${n.delivery.style} delivery · ${n.delivery.legality}${n.freeHit ? " · free hit" : ""}. ${Kn[s].summary.replace("A legal delivery", "A delivery")}` : Kn[s].summary), D("release", qt, "release", "Ball released", o ? "The front foot has landed beyond the popping crease. No-ball." : "The bowler releases the ball; the front foot is behind the popping crease."), D("bounce", Es, "bounce", "Pitch bounce", i ? "The curved flight is illustrative. Spin can change the ball’s path after it bounces." : "The delivery bounces on the pitch on its way to the striker."), g ? D("contact", xt, "contact", "Bat contact", "The ball meets the blade. The bat is keyed from the same two hand grips.") : s === "lbw" ? D("pad-contact", xt, "contact", "Pad contact", n ? "The ball contacts the pad. The highlighted path is illustrative; the authored decision is resolved separately." : "The highlighted path illustrates a ball that would hit the stumps. This is an authored LBW example.") : D("miss", xt, "contact", s === "wide" ? "Beyond normal reach" : "The batter misses", s === "wide" ? "The untouched ball is too far away for a normal stroke. The umpire calls Wide." : "The untouched delivery passes the striker."), s === "catch" && D("catch", As, "collect", "Catch controlled", n ? "The fielder controls the ball before it touches the ground. The authored decision is resolved separately." : "The fielder controls the ball before it touches the ground: caught."), ["fielding", "throw", "run-out", "batting", "running"].includes(s) && D("gather",
|
|
20553
|
+
}, R = [], D = ($, I, B, K, L) => R.push({ id: $, time: p(I), kind: B, label: K, caption: L }), Y = n ? { bowled: "Delivery hits stumps", lbw: "Pad contact", stumping: "Keeper breaks wicket", "run-out": "Throw breaks wicket" }[s] ?? Kn[s].name : Kn[s].name;
|
|
20554
|
+
if (D("setup", 0, "setup", Y, n ? `${n.delivery.style} delivery · ${n.delivery.legality}${n.freeHit ? " · free hit" : ""}. ${Kn[s].summary.replace("A legal delivery", "A delivery")}` : Kn[s].summary), D("release", qt, "release", "Ball released", o ? "The front foot has landed beyond the popping crease. No-ball." : "The bowler releases the ball; the front foot is behind the popping crease."), D("bounce", Es, "bounce", "Pitch bounce", i ? "The curved flight is illustrative. Spin can change the ball’s path after it bounces." : "The delivery bounces on the pitch on its way to the striker."), g ? D("contact", xt, "contact", "Bat contact", "The ball meets the blade. The bat is keyed from the same two hand grips.") : s === "lbw" ? D("pad-contact", xt, "contact", "Pad contact", n ? "The ball contacts the pad. The highlighted path is illustrative; the authored decision is resolved separately." : "The highlighted path illustrates a ball that would hit the stumps. This is an authored LBW example.") : D("miss", xt, "contact", s === "wide" ? "Beyond normal reach" : "The batter misses", s === "wide" ? "The untouched ball is too far away for a normal stroke. The umpire calls Wide." : "The untouched delivery passes the striker."), s === "catch" && D("catch", As, "collect", "Catch controlled", n ? "The fielder controls the ball before it touches the ground. The authored decision is resolved separately." : "The fielder controls the ball before it touches the ground: caught."), ["fielding", "throw", "run-out", "batting", "running"].includes(s) && D("gather", Le, "collect", "Ground ball gathered", "The ball has touched the ground. Gathering it is fielding, not a catch dismissal."), ["bowling", "spin", "wide", "no-ball", "stumping"].includes(s) && D("keeper", s === "stumping" ? 3400 : 3500, "collect", "Keeper gathers", "The keeper controls the ball behind the striker’s wicket."), (s === "throw" || s === "run-out") && D("throw", Ln, "throw", "Throw released", "The fielder releases the gathered ball toward the wicket."), s === "throw" && D("return", No, "collect", "Return received", "The keeper receives and controls the return throw."), s === "stumping" && D("wicket", q, "wicket", n ? "Wicket broken" : "Stumped", "Holding the ball, the keeper removes a bail. The striker is out of ground and is not attempting a run."), s === "run-out" && D("wicket", q, "wicket", n ? "Wicket broken" : "Run out", "The direct throw removes a bail before the running batter makes this ground."), s === "bowled" && D("wicket", q, "wicket", n ? "Stumps hit" : "Bowled", n ? "The delivery hits the wicket and removes a bail. A broken wicket does not by itself decide a dismissal." : "The legal delivery hits the wicket and removes a bail."), (s === "four" || s === "six") && D("boundary", 5e3, "boundary", s === "four" ? "Four runs" : "Six runs", s === "four" ? "The struck ball reaches the boundary after touching the ground: four." : "The struck ball clears the boundary without touching the ground: six."), s === "running" && D("run", ua, "result", "One run completed", "Both batters have reached the opposite ground. One run is completed."), D("result", 5700, "result", "Illustrated result", s === "no-ball" ? `One no-ball extra; it does not count in the over.${a.freeHitNext ? " The next legitimate delivery is a free hit." : " Test cricket has no automatic free hit."}` : s === "wide" ? "One wide extra; the delivery does not count in the over." : s === "lbw" ? "LBW is declared for this illustrated legal delivery. A full decision also checks pitching, impact and any bat contact." : `${a.runs} bat runs · ${a.extras} extras · ${a.wickets} wicket${a.wickets === 1 ? "" : "s"}.`), n) {
|
|
20547
20555
|
const $ = {
|
|
20548
20556
|
"no-dismissal": "No dismissal was authored for this play.",
|
|
20549
20557
|
dismissal: `The authored ${n.ruling.dismissal} decision is allowed in this delivery context.`,
|
|
@@ -20554,11 +20562,11 @@ function Rg(t, e, n) {
|
|
|
20554
20562
|
I.label = a.wickets ? "Out" : "Not out", I.caption = `${$[n.ruling.reason]} ${a.runs} bat runs · ${a.extras} extras · ${a.wickets} wickets. ${a.legalBall ? "Counts as a legal ball." : "Does not count in the over."}${a.freeHitNext ? " The next delivery is a free hit; an illegal delivery carries it forward." : n.freeHit ? " This legal delivery consumes the free hit." : ""}`;
|
|
20555
20563
|
}
|
|
20556
20564
|
R.sort(($, I) => $.time - I.time);
|
|
20557
|
-
const _ = Pg(0, l, e.every, [1400, 1800, qt, 2100, 2150, 2250, Es, 2600, 2800, xt, 3050, 3100, 3200, 3250, 3300, 3400, 3500, 3800, 3900, 3950, 4e3, As,
|
|
20565
|
+
const _ = Pg(0, l, e.every, [1400, 1800, qt, 2100, 2150, 2250, Es, 2600, 2800, xt, 3050, 3100, 3200, 3250, 3300, 3400, 3500, 3800, 3900, 3950, 4e3, As, Le, 4350, 4450, Ln, 4900, 5e3, 5100, 5150, No, ua, 5700].map(p)), j = _.map(($) => G(f($))), nt = [];
|
|
20558
20566
|
for (const [$, I] of Object.entries(h)) {
|
|
20559
20567
|
let B = I.object.pose?.turn ?? 0, K = B;
|
|
20560
|
-
const
|
|
20561
|
-
const X = f(
|
|
20568
|
+
const L = _.map((F, N) => {
|
|
20569
|
+
const X = f(F);
|
|
20562
20570
|
let z = $ === "fielder" && y && X > 3050 && X < 3250 ? Do(I, X, 3050, s === "catch" ? 3800 : 3950, E, S, K) : v($, X), J = j[N];
|
|
20563
20571
|
const Q = !["batter", "non-striker", "bowler", "keeper"].includes($);
|
|
20564
20572
|
if (Q) {
|
|
@@ -20571,12 +20579,12 @@ function Rg(t, e, n) {
|
|
|
20571
20579
|
}
|
|
20572
20580
|
return $ === "fielder" && y && (X === 3050 ? K = B : X > 3050 && (B = ol(z.pose.turn ?? 0, B), z = { ...z, pose: { ...z.pose, turn: B } })), qx(I, z, J);
|
|
20573
20581
|
});
|
|
20574
|
-
e3(nt, c, I, _,
|
|
20582
|
+
e3(nt, c, I, _, L);
|
|
20575
20583
|
}
|
|
20576
20584
|
for (const [$, I] of ["x", "y", "z"].entries()) nt.push({ id: `ball-${I}`, target: `${c}/ball`, property: I, keyframes: _.map((B, K) => ({ time: B, value: j[K][$] })) });
|
|
20577
20585
|
if (["bowled", "stumping", "run-out"].includes(s))
|
|
20578
20586
|
for (let $ = 0; $ < 2; $++) {
|
|
20579
|
-
const I = `${W}-bail-${$}`, K = t.scene.objects.find((
|
|
20587
|
+
const I = `${W}-bail-${$}`, K = t.scene.objects.find((L) => L.id === I).position;
|
|
20580
20588
|
nt.push({ id: `${I}-fall`, target: `${c}/${I}`, property: "position", keyframes: [{ time: 0, value: [...K] }, { time: p(q), value: [...K] }, { time: p(q + 180), value: St(K, [$ ? 0.25 : -0.25, 0.22, W === "striker" ? 0.22 : -0.22]), easing: "ease-out" }, { time: p(q + 650), value: [K[0] + ($ ? 0.4 : -0.4), 0.035, K[2] + (W === "striker" ? 0.45 : -0.45)], easing: "ease-in" }] }), nt.push({ id: `${I}-spin`, target: `${c}/${I}`, property: "rotateZ", keyframes: [{ time: 0, value: 0 }, { time: p(q), value: 0 }, { time: p(q + 650), value: $ ? 145 : -145 }] });
|
|
20581
20589
|
}
|
|
20582
20590
|
if (s === "lbw") {
|
|
@@ -20861,6 +20869,47 @@ function h3(t, e = {}) {
|
|
|
20861
20869
|
"cells, pointer, stack, queue, table, pipeline": "diagram primitives (SVG markup + step helpers)",
|
|
20862
20870
|
"figure({ width, height, children })": "the SVG holding the pieces"
|
|
20863
20871
|
},
|
|
20872
|
+
math: {
|
|
20873
|
+
api: {
|
|
20874
|
+
"mathFigure(spec)": "checks a figure (JSON: width, height, x?, y?, theme?: dark | light | chalk, values, items) and says how to fix it",
|
|
20875
|
+
"layoutFigure(spec, props)": "the figure at some values as shapes; drawDisplayList(ctx, list) or displayListToSvg(list) draws them",
|
|
20876
|
+
"mathTarget(spec, { x, y })": "a canvas target for videos and canvas pages; tracks animate its values and item props",
|
|
20877
|
+
"mathSteps(lesson, target, spec, { hidden })": "lesson steps: toValue, applyMatrix, drawOn, fadeIn, fadeOut, showStep (equations)",
|
|
20878
|
+
"mountMath(element) / mountAllMath()": "lesson-page embeds: <figure data-tinyfly-math> with data-tinyfly-figure and data-tinyfly-timeline JSON scripts, stepped like any embed",
|
|
20879
|
+
"mathExplorable(element, spec, { sliders, drag })": "reader-driven figures: sliders on number values, drag vector tips or matrix columns",
|
|
20880
|
+
"mathFigureToSvg(spec, props)": "a standalone SVG of a figure at some values",
|
|
20881
|
+
"linearMapFigure, determinantFigure, eigenFigure, vectorSumFigure, spanFigure": "ready linear algebra figures; the matrix is the value M",
|
|
20882
|
+
"tangentFigure, secantFigure, riemannFigure, areaFigure, taylorFigure, limitFigure": "ready calculus figures; their moving parts are number values (a, h, n, b, order, p)",
|
|
20883
|
+
"differentiate / compileDerivative / integrate": "exact symbolic derivatives of expressions; Simpson integration",
|
|
20884
|
+
"layoutTex(tex) / morphEquation(a, b, t)": "the built-in TeX subset, and term-by-term transitions",
|
|
20885
|
+
"vec2, mat2": "2D vectors and 2×2 matrices (apply, multiply, determinant, inverse, eigen)"
|
|
20886
|
+
},
|
|
20887
|
+
items: {
|
|
20888
|
+
grid: "{ step?, transform?: matrix value, ghost? }: lines of the plane, warped by a matrix",
|
|
20889
|
+
axes: "{ ticks?, labels? }",
|
|
20890
|
+
vector: "{ to, from?, transform?, label? (TeX), labelAt?: tip | middle }",
|
|
20891
|
+
basis: "{ transform? }: î and ĵ",
|
|
20892
|
+
point: "{ at, transform?, label?, hollow? } or { on: expr, x } (a point riding a curve)",
|
|
20893
|
+
function: '{ expr: "sin(k x)", domain?, derivative?, dashed? }: y = f(x); number values are its parameters',
|
|
20894
|
+
parametric: "{ x, y (expressions in t), t?, transform? }",
|
|
20895
|
+
polygon: "{ points? (default the unit square), transform?, label? }: \\val{M.det} shows the determinant",
|
|
20896
|
+
line: "{ along } or { eigen: matrix value }: a span, or eigenlines",
|
|
20897
|
+
label: "{ tex, at, screen?, size?, align?, backdrop? }",
|
|
20898
|
+
equation: "{ steps: [TeX…], at, screen? }: ITEM.step moves between steps, terms gliding",
|
|
20899
|
+
tangent: "{ expr, at, h? (secant), label? }: \\val{ID.slope} is the exact slope",
|
|
20900
|
+
riemann: "{ expr, from, to, n, rule?: left | right | midpoint | trapezoid }: \\val{ID.sum}, \\val{ID.exact}",
|
|
20901
|
+
area: "{ expr, from, to, lower? }: signed, coloured by sign; \\val{ID.value}",
|
|
20902
|
+
taylor: "{ expr, at, order }: exact Taylor polynomials; a fractional order grows the next term in"
|
|
20903
|
+
},
|
|
20904
|
+
props: {
|
|
20905
|
+
NAME: "a value: a number, [x, y] vector or [a, b, c, d] matrix (row by row; columns are where î and ĵ land)",
|
|
20906
|
+
"ITEM.draw": "0..1, draws an item on",
|
|
20907
|
+
"ITEM.opacity": "0..1",
|
|
20908
|
+
"ITEM.step": "an equation's step; fractional values are part way"
|
|
20909
|
+
},
|
|
20910
|
+
functions: ["sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "exp", "ln", "log", "log2", "sqrt", "abs", "floor", "ceil", "round", "sign", "min", "max", "sigmoid", "relu"],
|
|
20911
|
+
tex: "^ _ \\frac \\sqrt \\vec \\hat \\bar, \\sum \\prod \\int with limits, \\sin \\lim … , Greek, \\cdot \\times \\le \\to \\infty …, pmatrix / bmatrix / vmatrix, \\text, \\color{c}{…}, \\id{name}{…} (names a term for transitions), \\val{name:digits} (a live value)"
|
|
20912
|
+
},
|
|
20864
20913
|
cli: {
|
|
20865
20914
|
"tinyfly capabilities [--json]": "this catalog",
|
|
20866
20915
|
"tinyfly check <beats.json>": "check a beat script (names, fields) with suggestions",
|
|
@@ -21055,6 +21104,24 @@ function xT(t, e = {}) {
|
|
|
21055
21104
|
"",
|
|
21056
21105
|
...Object.entries(n.teach).map(([r, i]) => `- \`${r}\`: ${i}`),
|
|
21057
21106
|
"",
|
|
21107
|
+
"## Maths (`@algorisys/tinyfly/math`)",
|
|
21108
|
+
"",
|
|
21109
|
+
"A figure is JSON: a plane and items. Tracks on its target animate values by name and item props. One layout feeds a canvas (videos) and SVG (lesson embeds), so they match.",
|
|
21110
|
+
"",
|
|
21111
|
+
...Object.entries(n.math.api).map(([r, i]) => `- \`${r}\`: ${i}`),
|
|
21112
|
+
"",
|
|
21113
|
+
"Items (each has `id`, `kind`, and optional `color`, `draw`, `opacity`):",
|
|
21114
|
+
"",
|
|
21115
|
+
...Object.entries(n.math.items).map(([r, i]) => `- \`${r}\` ${i}`),
|
|
21116
|
+
"",
|
|
21117
|
+
"Props a timeline animates:",
|
|
21118
|
+
"",
|
|
21119
|
+
...Object.entries(n.math.props).map(([r, i]) => `- \`${r}\`: ${i}`),
|
|
21120
|
+
"",
|
|
21121
|
+
`Expression functions: ${n.math.functions.map((r) => `\`${r}\``).join(", ")}; constants \`pi\`, \`e\`, \`tau\`.`,
|
|
21122
|
+
"",
|
|
21123
|
+
`TeX subset: ${n.math.tex}`,
|
|
21124
|
+
"",
|
|
21058
21125
|
"## Command line",
|
|
21059
21126
|
"",
|
|
21060
21127
|
...Object.entries(n.cli).map(([r, i]) => `- \`${r}\`: ${i}`),
|
|
@@ -21120,7 +21187,7 @@ function p3(t, e, n, s, o) {
|
|
|
21120
21187
|
t.restore();
|
|
21121
21188
|
}
|
|
21122
21189
|
function TT(t) {
|
|
21123
|
-
const e = new
|
|
21190
|
+
const e = new Ft({ id: `${t.propId}-ride`, tracks: t.propTracks.filter((h) => h.target === t.propId) }), n = t.every ?? 33, s = [], o = [], r = [], i = [];
|
|
21124
21191
|
let a = 1;
|
|
21125
21192
|
for (let h = t.start; ; h = Math.min(t.end, h + n)) {
|
|
21126
21193
|
const u = sc(t.prop, { state: e.getStateAtTime(h) }, t.propId), d = u.anchor(t.anchor);
|
|
@@ -21153,7 +21220,7 @@ function ET(t, e, n) {
|
|
|
21153
21220
|
}), ...o.values()];
|
|
21154
21221
|
}
|
|
21155
21222
|
function AT(t) {
|
|
21156
|
-
const e = new
|
|
21223
|
+
const e = new Ft({ id: `${t.leaderId}-tow`, tracks: t.leaderTracks.filter((f) => f.target === t.leaderId) }), n = t.every ?? 33, s = t.towed, o = s.x + s.width / 2, r = s.props, i = s.prop.wheelRadius, a = [], l = [], c = [];
|
|
21157
21224
|
let h = r.wheelSpin ?? 0, u;
|
|
21158
21225
|
for (let f = t.start; ; f = Math.min(t.end, f + n)) {
|
|
21159
21226
|
const p = sc(t.leader, { state: e.getStateAtTime(f) }, t.leaderId), g = p.anchor(t.hitch), m = p.values.turn, y = go(s.prop, { ...r, turn: m }, s.propScale).anchors[t.anchor];
|
|
@@ -21270,7 +21337,7 @@ const M3 = /* @__PURE__ */ new Set([
|
|
|
21270
21337
|
const p = a(f), g = a(d.toView([0, c.rig.height / 2 + 1, 0])), m = Math.hypot(g.x - p.x, g.y - p.y), y = r.length === 0 ? void 0 : (v, x) => {
|
|
21271
21338
|
const M = se(s, v), T = [s[0] * x[0] + s[4] * x[1] + s[8] * x[2], s[1] * x[0] + s[5] * x[1] + s[9] * x[2], s[2] * x[0] + s[6] * x[1] + s[10] * x[2]], A = Math.hypot(...T) || 1;
|
|
21272
21339
|
return { light: bd(M, [T[0] / A, T[1] / A, T[2] / A], r), fog: wd(i, Math.hypot(M[0] - o.position[0], M[1] - o.position[1], M[2] - o.position[2])) };
|
|
21273
|
-
}, k = gg(c.rig, h, d, m, { perspective: !0, near: o.near, slice: x3, light: y }), w = { look: l.look, style: l.style, ink: l.ink, paper: l.paper, fog: i?.color }, b =
|
|
21340
|
+
}, k = gg(c.rig, h, d, m, { perspective: !0, near: o.near, slice: x3, light: y }), w = { look: l.look, style: l.style, ink: l.ink, paper: l.paper, fog: i?.color }, b = Lf(k), S = k.cells ?? [], E = Math.max(...S.map((v) => -v.depth), -f[2]);
|
|
21274
21341
|
return {
|
|
21275
21342
|
drawables: [
|
|
21276
21343
|
...l.shadow === !1 ? [] : [{ depth: E + c.rig.length, draw: (v) => Wf(v, k, w) }],
|
|
@@ -21344,7 +21411,7 @@ ${o.map((w) => ` beat ${w.beat}: ${w.message}`).join(`
|
|
|
21344
21411
|
for (const [V, tt] of Object.entries(w.perSecond ?? {})) r[V] = C[V] + M / 1e3 * tt;
|
|
21345
21412
|
return [i, a] = E[E.length - 1].point, l = W, v + M;
|
|
21346
21413
|
}, p = (w, b) => {
|
|
21347
|
-
const S = Object.fromEntries(Object.entries(w).filter(([v]) => !["at", "to", "through", "toward"].includes(v))), E =
|
|
21414
|
+
const S = Object.fromEntries(Object.entries(w).filter(([v]) => !["at", "to", "through", "toward"].includes(v))), E = Lx(t, e, [S], { start: { ...r, turn: 1 }, scale: 100, style: s.style, exaggeration: s.exaggeration });
|
|
21348
21415
|
for (const v of E.tracks) {
|
|
21349
21416
|
if (I3.includes(v.property)) continue;
|
|
21350
21417
|
const x = v.keyframes ?? [], M = r[v.property];
|
|
@@ -21371,14 +21438,14 @@ ${o.map((w) => ` beat ${w.beat}: ${w.message}`).join(`
|
|
|
21371
21438
|
keyframes: jf(b)
|
|
21372
21439
|
})), duration: m, beats: g, end: { position: [i, a], heading: l, values: { ...r } } };
|
|
21373
21440
|
}
|
|
21374
|
-
const I3 = ["x", "y", "turn", "facing", "tilt"], _3 = 0.35,
|
|
21441
|
+
const I3 = ["x", "y", "turn", "facing", "tilt"], _3 = 0.35, Fg = {
|
|
21375
21442
|
seated: Me.sit,
|
|
21376
21443
|
astride: { ...Me.sit, "leg.left.spread": 26, "leg.right.spread": 26, "leg.left.swing": 40, "leg.right.swing": 40, "leg.left.knee": 70, "leg.right.knee": 70 },
|
|
21377
21444
|
driving: { ...Me.sit, "arm.left.swing": 52, "arm.right.swing": 52, "arm.left.spread": 8, "arm.right.spread": 8, "arm.left.elbow": 38, "arm.right.elbow": 38, lean: 4 },
|
|
21378
21445
|
wheeling: { ...Me.sit, "arm.left.swing": -6, "arm.right.swing": -6, "arm.left.spread": 16, "arm.right.spread": 16, "arm.left.elbow": 28, "arm.right.elbow": 28, "leg.left.knee": 80, "leg.right.knee": 80 },
|
|
21379
21446
|
cycling: { ...Me.sit, lean: 22, bend: 10, "head.nod": -14, "arm.left.swing": 58, "arm.right.swing": 58, "arm.left.spread": 10, "arm.right.spread": 10, "arm.left.elbow": 22, "arm.right.elbow": 22, "leg.left.spread": 6, "leg.right.spread": 6 }
|
|
21380
21447
|
}, C3 = 22, du = 38;
|
|
21381
|
-
function fu(t, e =
|
|
21448
|
+
function fu(t, e = Fg.cycling) {
|
|
21382
21449
|
const n = t * Math.PI * 2, s = (i) => ({
|
|
21383
21450
|
swing: (e["leg.left.swing"] ?? 40) + C3 * Math.cos(n + i),
|
|
21384
21451
|
// The knee straightens as the foot pushes down and over the bottom of the stroke.
|
|
@@ -21406,7 +21473,7 @@ const gu = (t, e) => {
|
|
|
21406
21473
|
return [t[0] * Math.cos(n) + t[2] * Math.sin(n), t[1], -t[0] * Math.sin(n) + t[2] * Math.cos(n)];
|
|
21407
21474
|
};
|
|
21408
21475
|
function IT(t) {
|
|
21409
|
-
const e = `${t.scene}/${t.propId}`, n = new
|
|
21476
|
+
const e = `${t.scene}/${t.propId}`, n = new Ft({ id: `${t.propId}-ride-3d`, tracks: t.propTracks.filter((m) => m.target === e) }), s = t.placement ?? {}, [o, r, i] = s.position ?? [0, 0, 0], a = t.prop.rig, l = ho({ ...t.character, height: 1 }), c = { ...at, ...t.pose ?? Fg.seated }, h = Tn(l.plan, c, { height: t.height ?? 1.7, contact: l.contact }).hip, u = t.facing ?? 0, d = t.every ?? 33, f = { x: [], y: [], z: [], rotateY: [] };
|
|
21410
21477
|
for (let m = t.start; ; m = Math.min(t.end, m + d)) {
|
|
21411
21478
|
const y = n.getStateAtTime(m).values.get(e) ?? /* @__PURE__ */ new Map(), k = (C, W) => {
|
|
21412
21479
|
const q = y.get(C);
|
|
@@ -21457,7 +21524,7 @@ const H3 = {
|
|
|
21457
21524
|
const e = (t % 24 + 24) % 24;
|
|
21458
21525
|
return e < 5 || e > 20 ? 0 : e < 7 ? (e - 5) / 2 : e > 18 ? (20 - e) / 2 : 1;
|
|
21459
21526
|
};
|
|
21460
|
-
function
|
|
21527
|
+
function F3(t) {
|
|
21461
21528
|
const e = (t % 24 + 24) % 24;
|
|
21462
21529
|
for (let n = 1; n < $s.length; n++) {
|
|
21463
21530
|
const [s, o, r] = $s[n - 1], [i, a, l] = $s[n];
|
|
@@ -21468,7 +21535,7 @@ function L3(t) {
|
|
|
21468
21535
|
}
|
|
21469
21536
|
return { top: $s[0][1], bottom: $s[0][2] };
|
|
21470
21537
|
}
|
|
21471
|
-
const
|
|
21538
|
+
const L3 = (t, e) => {
|
|
21472
21539
|
const n = ((t - e) % 24 + 24) % 24;
|
|
21473
21540
|
return n <= 12 ? n / 12 : -1;
|
|
21474
21541
|
}, W3 = 9, N3 = 55, D3 = 28;
|
|
@@ -21480,10 +21547,10 @@ function B3(t) {
|
|
|
21480
21547
|
rain: t.rain ?? 0,
|
|
21481
21548
|
snow: t.snow ?? 0
|
|
21482
21549
|
}, w = uo(), b = (T, A) => w.keys(T)?.length ? w.valueAt(T, A) : k[T], S = (T, A) => {
|
|
21483
|
-
const P =
|
|
21550
|
+
const P = L3(T, A), O = P < 0 ? 0.5 : P, C = i - n;
|
|
21484
21551
|
return { x: 0.1 * s + 0.8 * s * O, y: P < 0 ? C + o * 0.2 : C - Math.sin(O * Math.PI) * C * 0.8, up: P >= 0 };
|
|
21485
21552
|
}, E = (T, A, P, O, C) => {
|
|
21486
|
-
const W = A("hour"), { top: q, bottom: V } =
|
|
21553
|
+
const W = A("hour"), { top: q, bottom: V } = F3(W), tt = T.createLinearGradient(0, O.y, 0, O.ground);
|
|
21487
21554
|
tt.addColorStop(0, q), tt.addColorStop(1, V), T.fillStyle = tt, T.fillRect(O.x, O.y, O.w, O.ground - O.y);
|
|
21488
21555
|
const G = R3(W);
|
|
21489
21556
|
if (G < 0.6) {
|
|
@@ -21500,9 +21567,9 @@ function B3(t) {
|
|
|
21500
21567
|
const _ = Math.max(0, Math.min(1, A("clouds"))), j = Math.max(-1, Math.min(1, A("wind"))), nt = Math.round(_ * d.length);
|
|
21501
21568
|
T.fillStyle = Bs("#ffffff", a.cloud === "#ffffff" ? "#ffffff" : a.cloud, 1), T.globalAlpha = 0.55 + 0.4 * G;
|
|
21502
21569
|
for (let I = 0; I < nt; I++) {
|
|
21503
|
-
const B = d[I], K = ((B.u * O.w + j * P * 0.012 * (0.6 + B.size * 0.5)) % (O.w * 1.4) + O.w * 1.4) % (O.w * 1.4) - O.w * 0.2,
|
|
21570
|
+
const B = d[I], K = ((B.u * O.w + j * P * 0.012 * (0.6 + B.size * 0.5)) % (O.w * 1.4) + O.w * 1.4) % (O.w * 1.4) - O.w * 0.2, L = O.x + K, F = O.y + (0.08 + B.v * 0.42) * (O.ground - O.y), N = Math.min(O.w, O.h) * 0.07 * B.size;
|
|
21504
21571
|
for (let X = 0; X < B.puffs; X++)
|
|
21505
|
-
T.beginPath(), T.ellipse(
|
|
21572
|
+
T.beginPath(), T.ellipse(L + (X - (B.puffs - 1) / 2) * N * 0.9, F + X % 2 * N * 0.25, N * (X % 2 ? 0.8 : 1), N * 0.62, 0, 0, Math.PI * 2), T.fill();
|
|
21506
21573
|
}
|
|
21507
21574
|
T.globalAlpha = 1;
|
|
21508
21575
|
const $ = (I) => Bs(Bs(I, "#0b1530", 0.65), I, G);
|
|
@@ -21511,8 +21578,8 @@ function B3(t) {
|
|
|
21511
21578
|
const I = 40;
|
|
21512
21579
|
for (let B = 0; B <= I; B++) {
|
|
21513
21580
|
const K = B / I;
|
|
21514
|
-
let
|
|
21515
|
-
m.forEach((
|
|
21581
|
+
let L = 0;
|
|
21582
|
+
m.forEach((F, N) => L += Math.sin(K * Math.PI * (1.5 + N * 0.7) + F.phase) * F.amp), T.lineTo(O.x + K * O.w, O.ground - Math.max(0, L) * O.h * 0.045 - O.h * 0.03);
|
|
21516
21583
|
}
|
|
21517
21584
|
T.lineTo(O.x + O.w, O.ground), T.closePath(), T.fill();
|
|
21518
21585
|
} else if (l === "city") {
|
|
@@ -21521,13 +21588,13 @@ function B3(t) {
|
|
|
21521
21588
|
const B = O.w / 18;
|
|
21522
21589
|
for (const K of y) {
|
|
21523
21590
|
if (I > O.x + O.w) break;
|
|
21524
|
-
const
|
|
21525
|
-
if (T.fillRect(I, O.ground - L, F
|
|
21591
|
+
const L = B * K.w, F = O.h * 0.22 * K.h;
|
|
21592
|
+
if (T.fillRect(I, O.ground - F, L, F), K.windows && G < 0.5) {
|
|
21526
21593
|
T.fillStyle = "#ffd66b", T.globalAlpha = 0.5 - G;
|
|
21527
|
-
for (let N = O.ground -
|
|
21594
|
+
for (let N = O.ground - F + 6; N < O.ground - 8; N += 9) for (let X = I + 4; X < I + L - 4; X += 8) T.fillRect(X, N, 3, 4);
|
|
21528
21595
|
T.globalAlpha = 1, T.fillStyle = $(a.city);
|
|
21529
21596
|
}
|
|
21530
|
-
I +=
|
|
21597
|
+
I += L + B * 0.15;
|
|
21531
21598
|
}
|
|
21532
21599
|
}
|
|
21533
21600
|
T.fillStyle = $(a.ground), T.fillRect(O.x, O.ground, O.w, O.y + O.h - O.ground);
|
|
@@ -21704,7 +21771,7 @@ const HT = {
|
|
|
21704
21771
|
return s.set(t, e), s;
|
|
21705
21772
|
}
|
|
21706
21773
|
};
|
|
21707
|
-
function
|
|
21774
|
+
function Lg(t, e, n) {
|
|
21708
21775
|
if (typeof OffscreenCanvas < "u") return new OffscreenCanvas(e, n);
|
|
21709
21776
|
const s = t.canvas;
|
|
21710
21777
|
if (s?.ownerDocument) {
|
|
@@ -21751,7 +21818,7 @@ function mu(t, e, n, s) {
|
|
|
21751
21818
|
function RT(t, e = {}) {
|
|
21752
21819
|
const n = t.canvas, s = n.width, o = n.height;
|
|
21753
21820
|
if (!(s > 0 && o > 0)) return;
|
|
21754
|
-
const r = Math.max(1, Math.round(e.downsample ?? 4)), i = Math.max(1, Math.ceil(s / r)), a = Math.max(1, Math.ceil(o / r)), l =
|
|
21821
|
+
const r = Math.max(1, Math.round(e.downsample ?? 4)), i = Math.max(1, Math.ceil(s / r)), a = Math.max(1, Math.ceil(o / r)), l = Lg(t, i, a), c = l?.getContext("2d");
|
|
21755
21822
|
if (!l || !c) return;
|
|
21756
21823
|
c.imageSmoothingEnabled = !0, c.drawImage(t.canvas, 0, 0, i, a);
|
|
21757
21824
|
const h = j3(c.getImageData(0, 0, i, a).data, e.threshold ?? 0.55), u = (e.radius ?? Math.max(s, o) * 0.02) / r, d = mu(h, i, a, u), f = mu(h, i, a, u * 3), p = e.halo ?? 0.6, g = c.createImageData(i, a);
|
|
@@ -21761,7 +21828,7 @@ function RT(t, e = {}) {
|
|
|
21761
21828
|
}
|
|
21762
21829
|
c.putImageData(g, 0, 0), t.save(), t.setTransform(1, 0, 0, 1, 0, 0), t.globalCompositeOperation = "lighter", t.globalAlpha = Math.max(0, e.strength ?? 0.9), t.imageSmoothingEnabled = !0, t.drawImage(l, 0, 0, s, o), t.restore();
|
|
21763
21830
|
}
|
|
21764
|
-
function
|
|
21831
|
+
function FT(t, e, n) {
|
|
21765
21832
|
const s = n.width ?? 6, o = n.taper ?? 1, r = n.fade ?? 1, i = n.opacity ?? 1, a = n.blend === "add";
|
|
21766
21833
|
if (t.save(), e.length >= 2) {
|
|
21767
21834
|
const c = K3(e, s, o, r, i);
|
|
@@ -21812,15 +21879,15 @@ function X3(t, e, n) {
|
|
|
21812
21879
|
a = Math.min(a, y.x), l = Math.min(l, y.y), c = Math.max(c, y.x), h = Math.max(h, y.y);
|
|
21813
21880
|
}
|
|
21814
21881
|
if (!(c > a && h > l)) return;
|
|
21815
|
-
const u = Math.floor(a) - 1, d = Math.floor(l) - 1, f = s ?
|
|
21882
|
+
const u = Math.floor(a) - 1, d = Math.floor(l) - 1, f = s ? Lg(t, Math.ceil(c) + 1 - u, Math.ceil(h) + 1 - d) : null, p = f?.getContext("2d");
|
|
21816
21883
|
if (!f || !p) {
|
|
21817
21884
|
ll(t, e, n);
|
|
21818
21885
|
return;
|
|
21819
21886
|
}
|
|
21820
21887
|
p.translate(-u, -d), p.globalCompositeOperation = "lighter", ll(p, i, n), t.save(), t.setTransform(1, 0, 0, 1, 0, 0), t.globalAlpha = 1, t.drawImage(f, u, d), t.restore();
|
|
21821
21888
|
}
|
|
21822
|
-
const
|
|
21823
|
-
|
|
21889
|
+
const LT = de.to, WT = de.from, NT = de.fromTo, DT = de.set, BT = de.timeline, zT = de.ticker, qT = de.splitText, jT = de.context, YT = de.matchMedia, KT = de.quickTo, XT = de.imageSequence, UT = de.pageTransition;
|
|
21890
|
+
F1();
|
|
21824
21891
|
export {
|
|
21825
21892
|
ts as ACTING_STYLES,
|
|
21826
21893
|
wg as AIRCRAFT_ACTING,
|
|
@@ -21858,13 +21925,13 @@ export {
|
|
|
21858
21925
|
lc as CRICKET_VIEWS,
|
|
21859
21926
|
V3 as Clock,
|
|
21860
21927
|
Xn as CompatTimeline,
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21928
|
+
r1 as CustomBounce,
|
|
21929
|
+
o1 as CustomEase,
|
|
21930
|
+
i1 as CustomWiggle,
|
|
21864
21931
|
xn as DANCE_STYLES,
|
|
21865
21932
|
Pu as DEFAULT_BAKE_INTERVAL_MS,
|
|
21866
21933
|
hc as DEFAULT_INERTIA_FRICTION,
|
|
21867
|
-
|
|
21934
|
+
b1 as DEFAULT_LABELS,
|
|
21868
21935
|
ge as DEFAULT_SPRING,
|
|
21869
21936
|
i4 as DEFAULT_TRANSITION,
|
|
21870
21937
|
QM as DESK_ACTING,
|
|
@@ -21873,7 +21940,7 @@ export {
|
|
|
21873
21940
|
Va as EMBRACE,
|
|
21874
21941
|
vt as EXPRESSIONS,
|
|
21875
21942
|
pf as FACIAL_HAIR_STYLES,
|
|
21876
|
-
|
|
21943
|
+
Z1 as FINGERS,
|
|
21877
21944
|
Gr as FLIPS,
|
|
21878
21945
|
_w as FOOT_SHAPES,
|
|
21879
21946
|
cc as FORMAT_VERSION,
|
|
@@ -21903,7 +21970,7 @@ export {
|
|
|
21903
21970
|
Me as HUMAN_POSES,
|
|
21904
21971
|
at as HUMAN_REST,
|
|
21905
21972
|
a5 as IDENTITY_CAMERA,
|
|
21906
|
-
|
|
21973
|
+
FS as IDENTITY_SIMILARITY,
|
|
21907
21974
|
Yg as INERTIA_MAX_DURATION_MS,
|
|
21908
21975
|
Bp as InertiaTrackPlayer,
|
|
21909
21976
|
_e as LiveTimeline,
|
|
@@ -21913,7 +21980,7 @@ export {
|
|
|
21913
21980
|
G3 as ManualClock,
|
|
21914
21981
|
Jc as MediaSync,
|
|
21915
21982
|
$0 as OUTFIT_PRESETS,
|
|
21916
|
-
|
|
21983
|
+
wy as Observer,
|
|
21917
21984
|
he as POSES,
|
|
21918
21985
|
uu as PROP_BEAT_3D_FIELDS,
|
|
21919
21986
|
nl as PROP_BEAT_FIELDS,
|
|
@@ -21924,7 +21991,7 @@ export {
|
|
|
21924
21991
|
vg as QUADRUPED_ACTING,
|
|
21925
21992
|
Ua as REMOVE_STYLES,
|
|
21926
21993
|
ht as REST_POSE,
|
|
21927
|
-
|
|
21994
|
+
Fg as RIDING_POSES,
|
|
21928
21995
|
cn as SAMPLE_STEP,
|
|
21929
21996
|
H3 as SCENERY_COLORS,
|
|
21930
21997
|
Qr as SCRIPT_ACTIONS,
|
|
@@ -21933,23 +22000,23 @@ export {
|
|
|
21933
22000
|
oi as SPRING_PRESETS,
|
|
21934
22001
|
Ps as SPRING_STEP_MS,
|
|
21935
22002
|
ov as STICK_ACTING_RIG,
|
|
21936
|
-
|
|
22003
|
+
By as ScrollAnimator,
|
|
21937
22004
|
Nr as ScrollDriver,
|
|
21938
|
-
|
|
21939
|
-
|
|
22005
|
+
zy as ScrollMarkers,
|
|
22006
|
+
Fy as ScrollPin,
|
|
21940
22007
|
jc as SmoothScroll,
|
|
21941
22008
|
Ir as SpringSampler,
|
|
21942
22009
|
Dp as SpringTrackPlayer,
|
|
21943
|
-
|
|
22010
|
+
uy as Stage,
|
|
21944
22011
|
jM as TREE_ACTING,
|
|
21945
|
-
|
|
22012
|
+
Ft as Timeline,
|
|
21946
22013
|
vl as TinyflyPlayer,
|
|
21947
|
-
|
|
22014
|
+
L1 as TinyflySequencer,
|
|
21948
22015
|
dn as TrackPlayer,
|
|
21949
22016
|
CM as VEHICLE_ACTING,
|
|
21950
22017
|
en as VISEMES,
|
|
21951
22018
|
fS as ValueResolver,
|
|
21952
|
-
|
|
22019
|
+
Ry as VisibilityDriver,
|
|
21953
22020
|
ix as WHEELCHAIR_ACTING,
|
|
21954
22021
|
Ne as WHITEBOARD_SURFACE,
|
|
21955
22022
|
cv as actCharacterTracks,
|
|
@@ -21961,7 +22028,7 @@ export {
|
|
|
21961
22028
|
oc as animalStrideLength,
|
|
21962
22029
|
hM as animatableProperties,
|
|
21963
22030
|
RT as applyBloom,
|
|
21964
|
-
|
|
22031
|
+
F4 as applyCamera,
|
|
21965
22032
|
rw as applyGroove,
|
|
21966
22033
|
Yu as applySimilarity,
|
|
21967
22034
|
ju as aspectOf,
|
|
@@ -21984,7 +22051,7 @@ export {
|
|
|
21984
22051
|
wS as beatsBetween,
|
|
21985
22052
|
tx as bed,
|
|
21986
22053
|
BM as bike,
|
|
21987
|
-
|
|
22054
|
+
P1 as bindChoiceHotspots,
|
|
21988
22055
|
An as bird,
|
|
21989
22056
|
Xs as blendPose,
|
|
21990
22057
|
Xo as bodyProfileWidth,
|
|
@@ -21996,9 +22063,9 @@ export {
|
|
|
21996
22063
|
KS as bubblePath,
|
|
21997
22064
|
XS as bubblePop,
|
|
21998
22065
|
_T as buildScene,
|
|
21999
|
-
|
|
22066
|
+
LM as bus,
|
|
22000
22067
|
R4 as cameraFromValues,
|
|
22001
|
-
|
|
22068
|
+
L4 as cameraPoint,
|
|
22002
22069
|
vS as cameraTracks,
|
|
22003
22070
|
h3 as capabilities,
|
|
22004
22071
|
xT as capabilitiesMarkdown,
|
|
@@ -22027,7 +22094,7 @@ export {
|
|
|
22027
22094
|
Ar as checkBeats,
|
|
22028
22095
|
ig as checkCast,
|
|
22029
22096
|
i5 as checkCharacterBeats3D,
|
|
22030
|
-
|
|
22097
|
+
Fx as checkPropBeats,
|
|
22031
22098
|
O3 as checkPropBeats3D,
|
|
22032
22099
|
Xv as checkSurfaceBeats,
|
|
22033
22100
|
hT as checkTracks,
|
|
@@ -22046,9 +22113,9 @@ export {
|
|
|
22046
22113
|
Ot as controlValue,
|
|
22047
22114
|
vx as cow,
|
|
22048
22115
|
s4 as create,
|
|
22049
|
-
|
|
22116
|
+
M1 as createControls,
|
|
22050
22117
|
tp as createCubicBezier,
|
|
22051
|
-
|
|
22118
|
+
d1 as createLive,
|
|
22052
22119
|
Br as createPen,
|
|
22053
22120
|
Mn as createRandom,
|
|
22054
22121
|
ba as createTrack,
|
|
@@ -22109,11 +22176,11 @@ export {
|
|
|
22109
22176
|
Wf as drawPropShadow,
|
|
22110
22177
|
Ik as drawSolvedFaces,
|
|
22111
22178
|
P4 as drawSolvedPart,
|
|
22112
|
-
|
|
22179
|
+
Ff as drawSolvedProp,
|
|
22113
22180
|
uv as drawSpeedLines,
|
|
22114
22181
|
Ub as drawStickFigure,
|
|
22115
22182
|
sT as drawStickSmear,
|
|
22116
|
-
|
|
22183
|
+
FT as drawTrail,
|
|
22117
22184
|
D4 as drawnPathTarget,
|
|
22118
22185
|
YS as dripPath,
|
|
22119
22186
|
_x as duck,
|
|
@@ -22158,7 +22225,7 @@ export {
|
|
|
22158
22225
|
nS as getPathLength,
|
|
22159
22226
|
gp as getPointAtProgress,
|
|
22160
22227
|
Mx as goat,
|
|
22161
|
-
|
|
22228
|
+
vy as gridLinesFor,
|
|
22162
22229
|
V5 as hairFollow,
|
|
22163
22230
|
nT as hairFollowTracks,
|
|
22164
22231
|
b2 as hairHangs,
|
|
@@ -22170,7 +22237,7 @@ export {
|
|
|
22170
22237
|
$a as handJoints,
|
|
22171
22238
|
hb as handJointsAt,
|
|
22172
22239
|
lg as handPath,
|
|
22173
|
-
|
|
22240
|
+
Lt as handPose,
|
|
22174
22241
|
ur as handProp,
|
|
22175
22242
|
Dg as hasKeyframes,
|
|
22176
22243
|
ue as hashSeed,
|
|
@@ -22188,8 +22255,8 @@ export {
|
|
|
22188
22255
|
y4 as humanDanceTracks,
|
|
22189
22256
|
m4 as humanFieldLabel,
|
|
22190
22257
|
G2 as humanGag,
|
|
22191
|
-
|
|
22192
|
-
|
|
22258
|
+
Fl as humanGaitPose,
|
|
22259
|
+
Ll as humanGaitStrideLength,
|
|
22193
22260
|
qd as humanPlan,
|
|
22194
22261
|
wt as humanPose,
|
|
22195
22262
|
kd as illustrationTones,
|
|
@@ -22202,8 +22269,8 @@ export {
|
|
|
22202
22269
|
Hp as interpolateColor,
|
|
22203
22270
|
lS as interpolateMotionPath,
|
|
22204
22271
|
Ie as interpolateNumber,
|
|
22205
|
-
|
|
22206
|
-
|
|
22272
|
+
Lp as interpolatePathString,
|
|
22273
|
+
Fp as interpolateQuaternion,
|
|
22207
22274
|
Sc as interpolateString,
|
|
22208
22275
|
NS as invertSimilarity,
|
|
22209
22276
|
Ng as isCubicBezierEasing,
|
|
@@ -22253,8 +22320,8 @@ export {
|
|
|
22253
22320
|
Pf as mixPoses,
|
|
22254
22321
|
Ep as morphPath,
|
|
22255
22322
|
zM as motorbike,
|
|
22256
|
-
|
|
22257
|
-
|
|
22323
|
+
I1 as mount,
|
|
22324
|
+
H1 as mountAll,
|
|
22258
22325
|
pS as narrationMarkers,
|
|
22259
22326
|
mS as narrationSceneAt,
|
|
22260
22327
|
er as naturalRest,
|
|
@@ -22275,7 +22342,7 @@ export {
|
|
|
22275
22342
|
ss as parsePath,
|
|
22276
22343
|
id as parseTrigger,
|
|
22277
22344
|
Ys as partialPath,
|
|
22278
|
-
|
|
22345
|
+
D1 as pathLength,
|
|
22279
22346
|
OT as pedallingKeys,
|
|
22280
22347
|
fu as pedallingPose,
|
|
22281
22348
|
qS as penroseStairs,
|
|
@@ -22303,13 +22370,13 @@ export {
|
|
|
22303
22370
|
TM as propAnchors3D,
|
|
22304
22371
|
sc as propAt,
|
|
22305
22372
|
mg as propControls,
|
|
22306
|
-
|
|
22373
|
+
Lf as propLineWidth,
|
|
22307
22374
|
$T as propObjects,
|
|
22308
22375
|
SM as propPartsInSpace,
|
|
22309
22376
|
xg as propPreset,
|
|
22310
22377
|
TT as propRide,
|
|
22311
22378
|
IT as propRide3D,
|
|
22312
|
-
|
|
22379
|
+
Lx as propScript,
|
|
22313
22380
|
PT as propScript3D,
|
|
22314
22381
|
$r as propShapeMesh,
|
|
22315
22382
|
dT as propSurface,
|
|
@@ -22321,7 +22388,7 @@ export {
|
|
|
22321
22388
|
CT as quickPlay,
|
|
22322
22389
|
KT as quickTo,
|
|
22323
22390
|
xx as rabbit,
|
|
22324
|
-
|
|
22391
|
+
Lu as randomBetween,
|
|
22325
22392
|
uS as randomChoice,
|
|
22326
22393
|
Vp as randomSnapped,
|
|
22327
22394
|
Ue as reachCharacter,
|
|
@@ -22335,12 +22402,12 @@ export {
|
|
|
22335
22402
|
z2 as resolveHat,
|
|
22336
22403
|
K2 as resolveHeadLook,
|
|
22337
22404
|
ok as resolveHolding,
|
|
22338
|
-
|
|
22405
|
+
K1 as resolveIllustration,
|
|
22339
22406
|
Ud as resolveMeasurements,
|
|
22340
22407
|
jw as resolveOrganicBody,
|
|
22341
22408
|
Sl as resolvePoseKeys,
|
|
22342
22409
|
Jp as resolveSequence,
|
|
22343
|
-
|
|
22410
|
+
Fd as resolveStickFrame,
|
|
22344
22411
|
Gb as resolveStickPose,
|
|
22345
22412
|
Du as resolveValue,
|
|
22346
22413
|
mm as ribbon,
|
|
@@ -22365,7 +22432,7 @@ export {
|
|
|
22365
22432
|
Xl as shade,
|
|
22366
22433
|
Qk as shapeMesh,
|
|
22367
22434
|
fl as shapeToPathData,
|
|
22368
|
-
|
|
22435
|
+
LS as similarity,
|
|
22369
22436
|
bm as similarityAbout,
|
|
22370
22437
|
wm as similarityFixedPoint,
|
|
22371
22438
|
BS as similarityMatrix,
|
|
@@ -22373,13 +22440,13 @@ export {
|
|
|
22373
22440
|
au as sittingPose,
|
|
22374
22441
|
Ol as skeletonInView,
|
|
22375
22442
|
Ta as sketchPen,
|
|
22376
|
-
|
|
22443
|
+
F3 as skyColors,
|
|
22377
22444
|
qf as smoothPath,
|
|
22378
|
-
|
|
22379
|
-
|
|
22380
|
-
|
|
22381
|
-
|
|
22382
|
-
|
|
22445
|
+
Hy as smoothToward,
|
|
22446
|
+
ky as snapAxis,
|
|
22447
|
+
Wy as snapConfig,
|
|
22448
|
+
Dy as snapDuration,
|
|
22449
|
+
Ny as snapProgress,
|
|
22383
22450
|
X4 as softCartoonCharacter,
|
|
22384
22451
|
go as solveAt,
|
|
22385
22452
|
co as solvePlanSpace,
|
|
@@ -22412,7 +22479,7 @@ export {
|
|
|
22412
22479
|
kt as surfaceBox,
|
|
22413
22480
|
aT as surfaceScript,
|
|
22414
22481
|
V2 as sweepingPose,
|
|
22415
|
-
|
|
22482
|
+
y1 as syncMediaElement,
|
|
22416
22483
|
xb as talkingMouth,
|
|
22417
22484
|
Dr as taperedLine,
|
|
22418
22485
|
jt as taperedOutline,
|
|
@@ -22420,7 +22487,7 @@ export {
|
|
|
22420
22487
|
HT as tf,
|
|
22421
22488
|
zT as ticker,
|
|
22422
22489
|
BT as timeline,
|
|
22423
|
-
|
|
22490
|
+
LT as to,
|
|
22424
22491
|
cS as toJSON,
|
|
22425
22492
|
iS as toKeyframedTrack,
|
|
22426
22493
|
aS as toKeyframedTracks,
|
|
@@ -22431,7 +22498,7 @@ export {
|
|
|
22431
22498
|
DM as trainCar,
|
|
22432
22499
|
qM as tree,
|
|
22433
22500
|
js as triggerDistance,
|
|
22434
|
-
|
|
22501
|
+
FM as truck,
|
|
22435
22502
|
Zk as tubeMesh,
|
|
22436
22503
|
dt as unknownName,
|
|
22437
22504
|
o4 as unmount,
|