@algorisys/tinyfly 0.86.2 → 0.88.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 +7 -4
- package/bin/tinyfly.mjs +44 -6
- package/lib/addons/adapters.js +389 -281
- package/lib/addons/characters.js +3 -3
- package/lib/addons/load-scene-CQvcFWGJ.js +331 -0
- package/lib/addons/maps.js +1 -1
- package/lib/addons/scene-3d-webgl.js +52 -49
- package/lib/addons/scene-3d.js +299 -215
- package/lib/addons/shading-o5T_v9DT.js +89 -0
- package/lib/addons/{sketch-CA8ZXhxI.js → sketch-CYPUbk3Q.js} +2 -2
- package/lib/browser/tinyfly-scene-3d-webgl.iife.js +4 -2
- package/lib/browser/tinyfly-scene-3d.iife.js +2 -2
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +2204 -2043
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/engine/tinyfly-engine.js +149 -106
- package/lib/engine/tinyfly-engine.umd.cjs +2 -2
- package/lib/headless/headless.js +165 -18
- package/lib/types/adapters/canvas/bloom.d.ts +33 -0
- package/lib/types/adapters/canvas/index.d.ts +3 -0
- package/lib/types/adapters/canvas/offscreen.d.ts +13 -0
- package/lib/types/adapters/canvas/trail.d.ts +57 -0
- package/lib/types/browser/index.d.ts +4 -0
- package/lib/types/engine/path/index.d.ts +2 -0
- package/lib/types/engine/path/trail.d.ts +79 -0
- package/lib/types/headless/index.d.ts +1 -0
- package/lib/types/headless/loop-check.d.ts +41 -0
- package/lib/types/headless/node-video.d.ts +8 -0
- package/lib/types/headless/video-scene.d.ts +9 -1
- package/lib/types/scene-3d/resolve-scene.d.ts +6 -0
- package/lib/types/scene-3d/scene-3d-adapter.d.ts +9 -1
- package/lib/types/scene-3d/scene-types.d.ts +42 -2
- package/lib/types/scene-3d/strokes.d.ts +30 -0
- package/lib/types/scene-3d/webgl/gl-data.d.ts +1 -0
- package/lib/types/scene-3d/webgl/shaders.d.ts +1 -1
- package/package.json +1 -1
- package/lib/addons/load-scene-vp14_Jj-.js +0 -324
- package/lib/addons/shading-ByG9UXd0.js +0 -85
|
@@ -20,13 +20,13 @@ function j(t) {
|
|
|
20
20
|
function re(t) {
|
|
21
21
|
return t.property === "motionPath" && "motionPathConfig" in t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Sr(t) {
|
|
24
24
|
return typeof t == "object" && t !== null && "x" in t && "y" in t && "angle" in t;
|
|
25
25
|
}
|
|
26
26
|
function Le(t) {
|
|
27
27
|
return "keyframes" in t;
|
|
28
28
|
}
|
|
29
|
-
class
|
|
29
|
+
class Ar {
|
|
30
30
|
_currentTime = 0;
|
|
31
31
|
_isRunning = !1;
|
|
32
32
|
onTick = null;
|
|
@@ -52,7 +52,7 @@ class Sr {
|
|
|
52
52
|
this._currentTime = e;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
class
|
|
55
|
+
class wr {
|
|
56
56
|
_currentTime = 0;
|
|
57
57
|
_isRunning = !1;
|
|
58
58
|
_lastFrameTime = null;
|
|
@@ -145,7 +145,7 @@ const tt = 1, ie = 6e4, st = ie / tt, L = {
|
|
|
145
145
|
velocity: 0,
|
|
146
146
|
restDelta: 0.01,
|
|
147
147
|
restSpeed: 0.1
|
|
148
|
-
},
|
|
148
|
+
}, vr = {
|
|
149
149
|
gentle: { stiffness: 120, damping: 18, mass: 1 },
|
|
150
150
|
default: { stiffness: 180, damping: 12, mass: 1 },
|
|
151
151
|
snappy: { stiffness: 280, damping: 20, mass: 1 },
|
|
@@ -225,17 +225,17 @@ class ut {
|
|
|
225
225
|
this.samples.length > st && (this.settledStep = st);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function Pr(t, e) {
|
|
229
229
|
return new ut(t).valueAt(e);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function $r(t) {
|
|
232
232
|
return new ut(t).settleTime();
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Rr(t) {
|
|
235
235
|
const e = t.stiffness ?? L.stiffness, n = t.damping ?? L.damping, r = t.mass ?? L.mass;
|
|
236
236
|
return n < 2 * Math.sqrt(e * r);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function Dr(t) {
|
|
239
239
|
const e = t.stiffness ?? L.stiffness, n = t.mass ?? L.mass;
|
|
240
240
|
return 2 * Math.sqrt(e * n);
|
|
241
241
|
}
|
|
@@ -276,7 +276,7 @@ function kt(t, e) {
|
|
|
276
276
|
const r = lt(t);
|
|
277
277
|
return t.from + (n - t.from) * (1 - Math.exp(-r * e / 1e3));
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Cr(t, e) {
|
|
280
280
|
const n = lt(t), r = ht(t);
|
|
281
281
|
return e >= ft(t) ? 0 : (r - t.from) * n * Math.exp(-n * Math.max(0, e) / 1e3);
|
|
282
282
|
}
|
|
@@ -617,13 +617,13 @@ function hn(t, e) {
|
|
|
617
617
|
const { segments: n, totalLength: r } = G(t);
|
|
618
618
|
return he(n, Math.max(0, Math.min(1, e)) * r);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function Ir() {
|
|
621
621
|
W.clear();
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function Er(t) {
|
|
624
624
|
return G(t).totalLength;
|
|
625
625
|
}
|
|
626
|
-
const fn = 24, pn = 320, dn = 2.5, J = 72,
|
|
626
|
+
const fn = 24, pn = 320, dn = 2.5, J = 72, Lr = 64, gn = 0.2, mn = 128, et = /* @__PURE__ */ new Map();
|
|
627
627
|
let it = 0, X;
|
|
628
628
|
const Vt = (t) => Math.round(t * 100) / 100;
|
|
629
629
|
function jt(t, e) {
|
|
@@ -755,7 +755,7 @@ function kn(t, e, n, r = {}) {
|
|
|
755
755
|
}
|
|
756
756
|
return i;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function Or() {
|
|
759
759
|
et.clear(), it = 0, X = void 0;
|
|
760
760
|
}
|
|
761
761
|
function Sn(t) {
|
|
@@ -822,7 +822,7 @@ function $n(t, e) {
|
|
|
822
822
|
const [n, r, s, o] = Y(t), i = 2 * (r * e[2] - s * e[1]), a = 2 * (s * e[0] - n * e[2]), c = 2 * (n * e[1] - r * e[0]);
|
|
823
823
|
return [e[0] + o * i + (r * c - s * a), e[1] + o * a + (s * i - n * c), e[2] + o * c + (n * a - r * i)];
|
|
824
824
|
}
|
|
825
|
-
const
|
|
825
|
+
const Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
826
826
|
__proto__: null,
|
|
827
827
|
conjugate: Pn,
|
|
828
828
|
dot: fe,
|
|
@@ -931,7 +931,7 @@ function On(t, e, n, r = {}) {
|
|
|
931
931
|
const u = o(1);
|
|
932
932
|
return c.push({ ...e, ...u !== 1 && { value: i(t.value, e.value, u) }, easing: "linear" }), c;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Nr(t, e) {
|
|
935
935
|
return j(t) ? Me(t, e) : V(t) ? _e(t, e) : t;
|
|
936
936
|
}
|
|
937
937
|
function Fn(t, e = {}) {
|
|
@@ -944,7 +944,7 @@ function Fn(t, e = {}) {
|
|
|
944
944
|
}
|
|
945
945
|
return { ...t, keyframes: r };
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function Xr(t, e) {
|
|
948
948
|
return t.filter(Le).map((n) => Fn(n, e)).concat(
|
|
949
949
|
t.filter(j).map((n) => Me(n, e)),
|
|
950
950
|
t.filter(V).map((n) => _e(n, e))
|
|
@@ -1113,7 +1113,7 @@ function Te(t, e) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
return t.autoRotate && t.rotateOffset && (n.angle += t.rotateOffset), n;
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function zr(t, e, n, r) {
|
|
1117
1117
|
const s = e + (n - e) * r;
|
|
1118
1118
|
return Te(t, s);
|
|
1119
1119
|
}
|
|
@@ -1564,7 +1564,7 @@ class Bn {
|
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
const Wn = 100;
|
|
1567
|
-
function
|
|
1567
|
+
function Yr(t, e, n, r) {
|
|
1568
1568
|
const s = [], o = [], { duration: i, alternate: a } = r, c = (p, M, d, g) => {
|
|
1569
1569
|
o.push([p, M]);
|
|
1570
1570
|
const _ = [];
|
|
@@ -1724,14 +1724,14 @@ function Zn(t) {
|
|
|
1724
1724
|
captions: t.captions
|
|
1725
1725
|
});
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function Ur(t) {
|
|
1728
1728
|
return JSON.stringify(Kn(t));
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function Vr(t) {
|
|
1731
1731
|
const e = JSON.parse(t);
|
|
1732
1732
|
return Zn(e);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function jr(t) {
|
|
1735
1735
|
let e = 2166136261;
|
|
1736
1736
|
for (let n = 0; n < t.length; n++)
|
|
1737
1737
|
e ^= t.charCodeAt(n), e = Math.imul(e, 16777619);
|
|
@@ -1754,12 +1754,12 @@ function Jn(t, e, n, r) {
|
|
|
1754
1754
|
const s = Math.floor((n - e) / r), o = Math.round(t.next() * s);
|
|
1755
1755
|
return e + o * r;
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function Hr(t, e) {
|
|
1758
1758
|
if (e.length !== 0)
|
|
1759
1759
|
return e[Math.floor(t.next() * e.length)];
|
|
1760
1760
|
}
|
|
1761
1761
|
const Se = /^([+\-*/])=\s*(-?[\d.]+)$/, Ae = /^random\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*(?:,\s*(-?[\d.]+)\s*)?\)$/i;
|
|
1762
|
-
function
|
|
1762
|
+
function Br(t) {
|
|
1763
1763
|
return typeof t != "string" ? !1 : Se.test(t.trim()) || Ae.test(t.trim());
|
|
1764
1764
|
}
|
|
1765
1765
|
function we(t, e = {}) {
|
|
@@ -1798,7 +1798,7 @@ function tr(t, e = 0, n) {
|
|
|
1798
1798
|
}
|
|
1799
1799
|
return r;
|
|
1800
1800
|
}
|
|
1801
|
-
class
|
|
1801
|
+
class Wr {
|
|
1802
1802
|
random;
|
|
1803
1803
|
constructor(e) {
|
|
1804
1804
|
this.random = qn(e);
|
|
@@ -1815,7 +1815,7 @@ class Br {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
1817
|
const er = 600;
|
|
1818
|
-
function
|
|
1818
|
+
function Qr(t) {
|
|
1819
1819
|
if (Array.isArray(t)) {
|
|
1820
1820
|
const [f, p, M, d] = t;
|
|
1821
1821
|
return { fn: ee(f, p, M, d), bezier: [f, p, M, d] };
|
|
@@ -1837,7 +1837,7 @@ function Wr(t) {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
return { fn: rr(u, l) };
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function Gr(t = {}) {
|
|
1841
1841
|
const n = 0.1 + Math.max(0, Math.min(1, t.strength ?? 0.7)) * 0.7, r = [1];
|
|
1842
1842
|
for (let o = n; o > 2e-3; o *= n) r.push(2 * Math.sqrt(o));
|
|
1843
1843
|
const s = r.reduce((o, i) => o + i, 0);
|
|
@@ -1856,7 +1856,7 @@ function Qr(t = {}) {
|
|
|
1856
1856
|
return 1;
|
|
1857
1857
|
};
|
|
1858
1858
|
}
|
|
1859
|
-
function
|
|
1859
|
+
function Kr(t = {}) {
|
|
1860
1860
|
const e = Math.max(1, t.wiggles ?? 10), n = t.type ?? "easeOut", r = (s) => n === "uniform" ? 1 : n === "easeInOut" ? Math.sin(Math.PI * s) : (1 - s) ** 2;
|
|
1861
1861
|
return (s) => s <= 0 || s >= 1 ? 0 : Math.sin(s * e * Math.PI * 2) * r(s);
|
|
1862
1862
|
}
|
|
@@ -1904,7 +1904,7 @@ function ee(t, e, n, r) {
|
|
|
1904
1904
|
};
|
|
1905
1905
|
}
|
|
1906
1906
|
const sr = 350, or = 300, ir = 550;
|
|
1907
|
-
function
|
|
1907
|
+
function Zr(t, e = {}) {
|
|
1908
1908
|
const n = e.lead ?? sr, r = e.gap ?? or, s = e.tail ?? ir, o = [];
|
|
1909
1909
|
let i = 0;
|
|
1910
1910
|
return t.forEach((a, c) => {
|
|
@@ -1926,10 +1926,10 @@ function Kr(t, e = {}) {
|
|
|
1926
1926
|
o.push({ id: a.id ?? `s${c}`, start: i, duration: h - i, cues: u }), i = h;
|
|
1927
1927
|
}), { duration: i, scenes: o, cues: o.flatMap((a) => a.cues) };
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function qr(t) {
|
|
1930
1930
|
return t.cues.map((e) => ({ id: e.id, time: e.start, label: e.text }));
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Jr(t, e) {
|
|
1933
1933
|
let n = t.scenes[0];
|
|
1934
1934
|
for (const r of t.scenes)
|
|
1935
1935
|
if (e >= r.start) n = r;
|
|
@@ -1943,13 +1943,13 @@ function Ct(t, e) {
|
|
|
1943
1943
|
function It(t, e) {
|
|
1944
1944
|
return (e - t.offset) / ve(t);
|
|
1945
1945
|
}
|
|
1946
|
-
function
|
|
1946
|
+
function ts(t, e) {
|
|
1947
1947
|
return Ct(t, Math.round(It(t, e)));
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function es(t, e) {
|
|
1950
1950
|
return Ct(t, Math.ceil(It(t, e) - 1e-9));
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function ns(t, e, n) {
|
|
1953
1953
|
const r = Math.max(1, Math.round(t.beatsPerBar ?? 4)), s = [];
|
|
1954
1954
|
if (!(t.bpm > 0) || n < e) return s;
|
|
1955
1955
|
for (let o = Math.ceil(It(t, e) - 1e-9); ; o++) {
|
|
@@ -1960,7 +1960,7 @@ function es(t, e, n) {
|
|
|
1960
1960
|
return s;
|
|
1961
1961
|
}
|
|
1962
1962
|
const B = 100;
|
|
1963
|
-
function
|
|
1963
|
+
function rs(t, e, n = {}) {
|
|
1964
1964
|
const r = n.minBpm ?? 70, s = n.maxBpm ?? 180, o = Math.max(1, Math.round(e / B)), i = Math.min(t.length, Math.round((n.maxSeconds ?? 60) * e)), a = Math.floor(i / o);
|
|
1965
1965
|
if (a < 4) return { bpm: 120, offset: 0, confidence: 0 };
|
|
1966
1966
|
const c = new Float64Array(a);
|
|
@@ -2007,7 +2007,7 @@ function ns(t, e, n = {}) {
|
|
|
2007
2007
|
return { bpm: Math.round(v * 100) / 100, offset: Math.round(D % (6e4 / v)), confidence: A };
|
|
2008
2008
|
}
|
|
2009
2009
|
const O = (t) => Math.round(t * 1e3) / 1e3;
|
|
2010
|
-
function
|
|
2010
|
+
function ss(t, e = {}) {
|
|
2011
2011
|
if (t.length === 0) return "";
|
|
2012
2012
|
const n = e.curviness ?? 1, r = e.closed ?? !1, s = t.length;
|
|
2013
2013
|
let o = `M${O(t[0].x)} ${O(t[0].y)}`;
|
|
@@ -2033,7 +2033,7 @@ function ar(t) {
|
|
|
2033
2033
|
for (let r = 0; r + 1 < e.length; r += 2) n.push({ x: e[r], y: e[r + 1] });
|
|
2034
2034
|
return n;
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function os(t) {
|
|
2037
2037
|
const e = t.attributes;
|
|
2038
2038
|
switch (t.tag.toLowerCase()) {
|
|
2039
2039
|
case "path":
|
|
@@ -2061,7 +2061,47 @@ function ss(t) {
|
|
|
2061
2061
|
return null;
|
|
2062
2062
|
}
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2064
|
+
function is(t, e, n) {
|
|
2065
|
+
const r = Math.max(2, Math.round(n.samples ?? 32)), s = Math.max(0, n.length), o = n.since !== void 0 ? Math.max(e - s, n.since) : e - s;
|
|
2066
|
+
if (o >= e) return [];
|
|
2067
|
+
const i = n.period, a = [];
|
|
2068
|
+
for (let c = 0; c < r; c++) {
|
|
2069
|
+
const u = o + (e - o) * c / (r - 1), l = i && i > 0 && c < r - 1 ? (u % i + i) % i : u;
|
|
2070
|
+
a.push({ at: t(l), time: u, age: s > 0 ? (e - u) / s : 0 });
|
|
2071
|
+
}
|
|
2072
|
+
return a;
|
|
2073
|
+
}
|
|
2074
|
+
const cr = 2.5;
|
|
2075
|
+
function as(t) {
|
|
2076
|
+
const e = [], n = [], r = t.length, s = (o, i) => {
|
|
2077
|
+
for (let a = o + i; a >= 0 && a < r; a += i) {
|
|
2078
|
+
const c = (t[a].x - t[o].x) * i, u = (t[a].y - t[o].y) * i, l = Math.hypot(c, u);
|
|
2079
|
+
if (l > 1e-9) return [c / l, u / l];
|
|
2080
|
+
}
|
|
2081
|
+
return null;
|
|
2082
|
+
};
|
|
2083
|
+
for (let o = 0; o < r; o++) {
|
|
2084
|
+
const i = t[o], a = s(o, -1), c = s(o, 1), u = a ?? c ?? [1, 0], l = c ?? a ?? [1, 0];
|
|
2085
|
+
let h = u[0] + l[0], f = u[1] + l[1];
|
|
2086
|
+
const p = Math.hypot(h, f);
|
|
2087
|
+
p < 1e-9 ? (h = u[0], f = u[1]) : (h /= p, f /= p);
|
|
2088
|
+
const M = h * u[0] + f * u[1], d = Math.min(cr, 1 / Math.max(M, 1e-6)), g = i.width / 2 * d;
|
|
2089
|
+
e.push({ x: i.x - f * g, y: i.y + h * g }), n.push({ x: i.x + f * g, y: i.y - h * g });
|
|
2090
|
+
}
|
|
2091
|
+
return { left: e, right: n };
|
|
2092
|
+
}
|
|
2093
|
+
function cs(t) {
|
|
2094
|
+
const e = t.length;
|
|
2095
|
+
if (e < 2) return null;
|
|
2096
|
+
const n = t[e - 1];
|
|
2097
|
+
for (let r = e - 2; r >= 0; r--) {
|
|
2098
|
+
const s = n.x - t[r].x, o = n.y - t[r].y, i = Math.hypot(s, o);
|
|
2099
|
+
if (i > 1e-9)
|
|
2100
|
+
return { x: n.x, y: n.y, radius: n.width / 2, start: Math.atan2(s / i, -o / i) };
|
|
2101
|
+
}
|
|
2102
|
+
return null;
|
|
2103
|
+
}
|
|
2104
|
+
function ur(t, e) {
|
|
2065
2105
|
return [t[0] + e[0], t[1] + e[1], t[2] + e[2]];
|
|
2066
2106
|
}
|
|
2067
2107
|
function Et(t, e) {
|
|
@@ -2079,32 +2119,32 @@ function vt(t, e) {
|
|
|
2079
2119
|
function Lt(t) {
|
|
2080
2120
|
return Math.hypot(t[0], t[1], t[2]);
|
|
2081
2121
|
}
|
|
2082
|
-
function
|
|
2122
|
+
function lr(t, e) {
|
|
2083
2123
|
return Lt(Et(t, e));
|
|
2084
2124
|
}
|
|
2085
2125
|
function Pt(t) {
|
|
2086
2126
|
const e = Lt(t);
|
|
2087
2127
|
return e === 0 ? [0, 0, 0] : Pe(t, 1 / e);
|
|
2088
2128
|
}
|
|
2089
|
-
function
|
|
2129
|
+
function hr(t, e, n) {
|
|
2090
2130
|
return [t[0] + (e[0] - t[0]) * n, t[1] + (e[1] - t[1]) * n, t[2] + (e[2] - t[2]) * n];
|
|
2091
2131
|
}
|
|
2092
|
-
const
|
|
2132
|
+
const us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2093
2133
|
__proto__: null,
|
|
2094
|
-
add:
|
|
2134
|
+
add: ur,
|
|
2095
2135
|
cross: vt,
|
|
2096
|
-
distance:
|
|
2136
|
+
distance: lr,
|
|
2097
2137
|
dot: ct,
|
|
2098
2138
|
length: Lt,
|
|
2099
|
-
lerp:
|
|
2139
|
+
lerp: hr,
|
|
2100
2140
|
normalize: Pt,
|
|
2101
2141
|
scale: Pe,
|
|
2102
2142
|
subtract: Et
|
|
2103
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2104
|
-
function
|
|
2143
|
+
}, Symbol.toStringTag, { value: "Module" })), fr = Math.PI / 180;
|
|
2144
|
+
function pr() {
|
|
2105
2145
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
2106
2146
|
}
|
|
2107
|
-
function
|
|
2147
|
+
function dr(t, e) {
|
|
2108
2148
|
const n = new Array(16);
|
|
2109
2149
|
for (let r = 0; r < 4; r++)
|
|
2110
2150
|
for (let s = 0; s < 4; s++) {
|
|
@@ -2114,10 +2154,10 @@ function pr(t, e) {
|
|
|
2114
2154
|
}
|
|
2115
2155
|
return n;
|
|
2116
2156
|
}
|
|
2117
|
-
function
|
|
2157
|
+
function gr(t) {
|
|
2118
2158
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t[0], t[1], t[2], 1];
|
|
2119
2159
|
}
|
|
2120
|
-
function
|
|
2160
|
+
function mr(t) {
|
|
2121
2161
|
return [t[0], 0, 0, 0, 0, t[1], 0, 0, 0, 0, t[2], 0, 0, 0, 0, 1];
|
|
2122
2162
|
}
|
|
2123
2163
|
function $e(t) {
|
|
@@ -2141,18 +2181,18 @@ function $e(t) {
|
|
|
2141
2181
|
1
|
|
2142
2182
|
];
|
|
2143
2183
|
}
|
|
2144
|
-
function
|
|
2184
|
+
function yr(t, e, n) {
|
|
2145
2185
|
const r = $e(e);
|
|
2146
2186
|
for (let s = 0; s < 3; s++)
|
|
2147
2187
|
r[s] *= n[0], r[4 + s] *= n[1], r[8 + s] *= n[2];
|
|
2148
2188
|
return r[12] = t[0], r[13] = t[1], r[14] = t[2], r;
|
|
2149
2189
|
}
|
|
2150
|
-
function
|
|
2190
|
+
function Mr(t) {
|
|
2151
2191
|
const e = new Array(16);
|
|
2152
2192
|
for (let n = 0; n < 4; n++) for (let r = 0; r < 4; r++) e[r * 4 + n] = t[n * 4 + r];
|
|
2153
2193
|
return e;
|
|
2154
2194
|
}
|
|
2155
|
-
function
|
|
2195
|
+
function _r(t) {
|
|
2156
2196
|
const [e, n, r, s, o, i, a, c, u, l, h, f, p, M, d, g] = t, _ = e * i - n * o, b = e * a - r * o, k = e * c - s * o, w = n * a - r * i, y = n * c - s * i, v = r * c - s * a, A = u * M - l * p, D = u * d - h * p, m = u * g - f * p, T = l * d - h * M, x = l * g - f * M, S = h * g - f * d, $ = _ * S - b * x + k * T + w * m - y * D + v * A;
|
|
2157
2197
|
if (Math.abs($) < 1e-12) return null;
|
|
2158
2198
|
const P = 1 / $;
|
|
@@ -2175,15 +2215,15 @@ function Mr(t) {
|
|
|
2175
2215
|
(u * w - l * b + h * _) * P
|
|
2176
2216
|
];
|
|
2177
2217
|
}
|
|
2178
|
-
function
|
|
2179
|
-
const s = 1 / Math.tan(t *
|
|
2218
|
+
function br(t, e, n, r) {
|
|
2219
|
+
const s = 1 / Math.tan(t * fr / 2), o = 1 / (n - r);
|
|
2180
2220
|
return [s / e, 0, 0, 0, 0, s, 0, 0, 0, 0, (r + n) * o, -1, 0, 0, 2 * r * n * o, 0];
|
|
2181
2221
|
}
|
|
2182
|
-
function
|
|
2222
|
+
function Tr(t, e, n, r, s, o) {
|
|
2183
2223
|
const i = 1 / (e - t), a = 1 / (r - n), c = 1 / (o - s);
|
|
2184
2224
|
return [2 * i, 0, 0, 0, 0, 2 * a, 0, 0, 0, 0, -2 * c, 0, -(e + t) * i, -(r + n) * a, -(o + s) * c, 1];
|
|
2185
2225
|
}
|
|
2186
|
-
function
|
|
2226
|
+
function xr(t, e, n = [0, 1, 0]) {
|
|
2187
2227
|
const r = Pt(Et(t, e)), s = Pt(vt(n, r)), o = vt(r, s);
|
|
2188
2228
|
return [
|
|
2189
2229
|
s[0],
|
|
@@ -2204,43 +2244,43 @@ function Tr(t, e, n = [0, 1, 0]) {
|
|
|
2204
2244
|
1
|
|
2205
2245
|
];
|
|
2206
2246
|
}
|
|
2207
|
-
function
|
|
2247
|
+
function kr(t, e) {
|
|
2208
2248
|
const n = t[0] * e[0] + t[4] * e[1] + t[8] * e[2] + t[12], r = t[1] * e[0] + t[5] * e[1] + t[9] * e[2] + t[13], s = t[2] * e[0] + t[6] * e[1] + t[10] * e[2] + t[14], o = t[3] * e[0] + t[7] * e[1] + t[11] * e[2] + t[15];
|
|
2209
2249
|
return o === 1 || o === 0 ? [n, r, s] : [n / o, r / o, s / o];
|
|
2210
2250
|
}
|
|
2211
|
-
const
|
|
2251
|
+
const ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2212
2252
|
__proto__: null,
|
|
2213
|
-
compose:
|
|
2253
|
+
compose: yr,
|
|
2214
2254
|
fromQuat: $e,
|
|
2215
|
-
identity:
|
|
2216
|
-
invert:
|
|
2217
|
-
lookAt:
|
|
2218
|
-
multiply:
|
|
2219
|
-
orthographic:
|
|
2220
|
-
perspective:
|
|
2221
|
-
scaling:
|
|
2222
|
-
transformPoint:
|
|
2223
|
-
translation:
|
|
2224
|
-
transpose:
|
|
2255
|
+
identity: pr,
|
|
2256
|
+
invert: _r,
|
|
2257
|
+
lookAt: xr,
|
|
2258
|
+
multiply: dr,
|
|
2259
|
+
orthographic: Tr,
|
|
2260
|
+
perspective: br,
|
|
2261
|
+
scaling: mr,
|
|
2262
|
+
transformPoint: kr,
|
|
2263
|
+
translation: gr,
|
|
2264
|
+
transpose: Mr
|
|
2225
2265
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2226
2266
|
export {
|
|
2227
|
-
|
|
2267
|
+
wr as Clock,
|
|
2228
2268
|
ye as DEFAULT_BAKE_INTERVAL_MS,
|
|
2229
2269
|
zt as DEFAULT_INERTIA_FRICTION,
|
|
2230
2270
|
L as DEFAULT_SPRING,
|
|
2231
2271
|
Xt as FORMAT_VERSION,
|
|
2232
2272
|
ze as INERTIA_MAX_DURATION_MS,
|
|
2233
2273
|
Yn as InertiaTrackPlayer,
|
|
2234
|
-
|
|
2235
|
-
|
|
2274
|
+
Lr as MORPH_SAMPLES,
|
|
2275
|
+
Ar as ManualClock,
|
|
2236
2276
|
ie as SPRING_MAX_DURATION_MS,
|
|
2237
|
-
|
|
2277
|
+
vr as SPRING_PRESETS,
|
|
2238
2278
|
tt as SPRING_STEP_MS,
|
|
2239
2279
|
ut as SpringSampler,
|
|
2240
2280
|
zn as SpringTrackPlayer,
|
|
2241
2281
|
Bn as Timeline,
|
|
2242
2282
|
_t as TrackPlayer,
|
|
2243
|
-
|
|
2283
|
+
Wr as ValueResolver,
|
|
2244
2284
|
Je as backOut,
|
|
2245
2285
|
On as bakeEasing,
|
|
2246
2286
|
_e as bakeInertiaTrack,
|
|
@@ -2248,21 +2288,21 @@ export {
|
|
|
2248
2288
|
It as beatAtTime,
|
|
2249
2289
|
ve as beatLength,
|
|
2250
2290
|
Ct as beatTime,
|
|
2251
|
-
|
|
2291
|
+
ns as beatsBetween,
|
|
2252
2292
|
qe as bounceOut,
|
|
2253
2293
|
Vn as charactersFor,
|
|
2254
|
-
|
|
2255
|
-
|
|
2294
|
+
Or as clearMorphCache,
|
|
2295
|
+
Ir as clearPathCache,
|
|
2256
2296
|
Ke as createCubicBezier,
|
|
2257
2297
|
qn as createRandom,
|
|
2258
2298
|
Xn as createTrack,
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2299
|
+
Dr as criticalDamping,
|
|
2300
|
+
Gr as customBounce,
|
|
2301
|
+
Qr as customEase,
|
|
2302
|
+
Kr as customWiggle,
|
|
2263
2303
|
Zn as deserializeTimeline,
|
|
2264
2304
|
Gn as deserializeTrack,
|
|
2265
|
-
|
|
2305
|
+
rs as detectTempo,
|
|
2266
2306
|
Be as easeIn,
|
|
2267
2307
|
ae as easeInCubic,
|
|
2268
2308
|
Qe as easeInOut,
|
|
@@ -2275,71 +2315,74 @@ export {
|
|
|
2275
2315
|
Ze as elasticOut,
|
|
2276
2316
|
Fn as expandParametricEasings,
|
|
2277
2317
|
ne as formatVersionFor,
|
|
2278
|
-
|
|
2318
|
+
Vr as fromJSON,
|
|
2279
2319
|
le as getEasingFunction,
|
|
2280
2320
|
me as getInterpolator,
|
|
2281
2321
|
Te as getMotionPathPoint,
|
|
2282
|
-
|
|
2322
|
+
Er as getPathLength,
|
|
2283
2323
|
hn as getPointAtProgress,
|
|
2284
2324
|
Le as hasKeyframes,
|
|
2285
|
-
|
|
2325
|
+
jr as hashSeed,
|
|
2286
2326
|
ft as inertiaDuration,
|
|
2287
2327
|
ht as inertiaRest,
|
|
2288
2328
|
kt as inertiaValueAt,
|
|
2289
|
-
|
|
2329
|
+
Cr as inertiaVelocityAt,
|
|
2290
2330
|
In as interpolateArray,
|
|
2291
2331
|
Cn as interpolateColor,
|
|
2292
|
-
|
|
2332
|
+
zr as interpolateMotionPath,
|
|
2293
2333
|
N as interpolateNumber,
|
|
2294
2334
|
Ln as interpolatePathString,
|
|
2295
2335
|
En as interpolateQuaternion,
|
|
2296
2336
|
te as interpolateString,
|
|
2297
2337
|
Ee as isCubicBezierEasing,
|
|
2298
2338
|
V as isInertiaTrack,
|
|
2299
|
-
|
|
2339
|
+
Sr as isMotionPathPoint,
|
|
2300
2340
|
re as isMotionPathTrack,
|
|
2301
2341
|
xt as isParametricEasing,
|
|
2302
2342
|
Sn as isPathData,
|
|
2303
2343
|
j as isSpringTrack,
|
|
2304
2344
|
$t as isTextTrack,
|
|
2305
|
-
|
|
2306
|
-
|
|
2345
|
+
Rr as isUnderdamped,
|
|
2346
|
+
Br as isUnresolved,
|
|
2307
2347
|
St as linear,
|
|
2308
|
-
|
|
2348
|
+
ls as mat4,
|
|
2309
2349
|
Oe as maxStaggerDistance,
|
|
2310
2350
|
kn as morphPath,
|
|
2311
|
-
|
|
2312
|
-
|
|
2351
|
+
qr as narrationMarkers,
|
|
2352
|
+
Jr as narrationSceneAt,
|
|
2313
2353
|
Ye as naturalRest,
|
|
2314
|
-
|
|
2315
|
-
|
|
2354
|
+
ts as nearestBeat,
|
|
2355
|
+
es as nextBeat,
|
|
2316
2356
|
en as parametricEasing,
|
|
2317
2357
|
G as parsePath,
|
|
2318
|
-
|
|
2319
|
-
|
|
2358
|
+
Zr as planNarration,
|
|
2359
|
+
Yr as playheadCrossings,
|
|
2320
2360
|
he as pointAtDistance,
|
|
2321
|
-
|
|
2322
|
-
|
|
2361
|
+
ss as pointsToPath,
|
|
2362
|
+
Fr as quat,
|
|
2323
2363
|
ke as randomBetween,
|
|
2324
|
-
|
|
2364
|
+
Hr as randomChoice,
|
|
2325
2365
|
Jn as randomSnapped,
|
|
2326
2366
|
tr as resolveSequence,
|
|
2327
2367
|
we as resolveValue,
|
|
2368
|
+
as as ribbon,
|
|
2369
|
+
cs as ribbonHeadCap,
|
|
2328
2370
|
Kn as serializeTimeline,
|
|
2329
2371
|
Qn as serializeTrack,
|
|
2330
|
-
|
|
2372
|
+
os as shapeToPathData,
|
|
2331
2373
|
Nn as simplifyKeyframes,
|
|
2332
|
-
|
|
2333
|
-
|
|
2374
|
+
$r as springDuration,
|
|
2375
|
+
Pr as springValueAt,
|
|
2334
2376
|
se as staggerDistance,
|
|
2335
2377
|
oe as staggerOffset,
|
|
2336
2378
|
Fe as staggerOffsets,
|
|
2337
2379
|
Rt as staggerSpan,
|
|
2338
2380
|
tn as stepsEasing,
|
|
2339
2381
|
Hn as textAt,
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2382
|
+
Ur as toJSON,
|
|
2383
|
+
Nr as toKeyframedTrack,
|
|
2384
|
+
Xr as toKeyframedTracks,
|
|
2343
2385
|
U as trackTargets,
|
|
2344
|
-
|
|
2386
|
+
is as trailSamples,
|
|
2387
|
+
us as vec3
|
|
2345
2388
|
};
|