exodeui 6.0.22 → 6.0.24
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/dist/index.d.ts +1 -1
- package/dist/index.js +13 -13
- package/dist/index.mjs +1112 -1105
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
var WQ = Object.defineProperty;
|
|
2
2
|
var ZQ = (B, A, I) => A in B ? WQ(B, A, { enumerable: !0, configurable: !0, writable: !0, value: I }) : B[A] = I;
|
|
3
|
-
var
|
|
3
|
+
var tA = (B, A, I) => ZQ(B, typeof A != "symbol" ? A + "" : A, I);
|
|
4
4
|
import { jsx as jQ } from "react/jsx-runtime";
|
|
5
5
|
import { forwardRef as XQ, useRef as rI, useImperativeHandle as vQ, useEffect as PA, useState as PQ, useCallback as $A } from "react";
|
|
6
|
-
var
|
|
7
|
-
function KC(B, A, I
|
|
8
|
-
let
|
|
9
|
-
if (
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
const
|
|
14
|
-
let
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
} else
|
|
20
|
-
}),
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
var Z = /* @__PURE__ */ ((B) => (B.Proximity = "Proximity", B.Magnetic = "Magnetic", B.Parallax = "Parallax", B.Velocity = "Velocity", B.Shear = "Shear", B.Repel = "Repel", B.Orbit = "Orbit", B.Elastic = "Elastic", B.Dilation = "Dilation", B.Vortex = "Vortex", B.Fluid = "Fluid", B.Holographic = "Holographic", B.Sticky = "Sticky", B.Spotlight = "Spotlight", B.Noise = "Noise", B.Draggable = "Draggable", B.Scroll = "Scroll", B.Follower = "Follower", B.Lens = "Lens", B.LookAt = "LookAt", B.Pulse = "Pulse", B.Wrap = "Wrap", B.Glint = "Glint", B.Gravity = "Gravity", B.Ratchet = "Ratchet", B.Jitter = "Jitter", B.Scan = "Scan", B.Float = "Float", B.Typewriter = "Typewriter", B.Scramble = "Scramble", B.Wave = "Wave", B.Bounce = "Bounce", B.GlitchText = "GlitchText", B.TextTrail = "TextTrail", B.Reveal3D = "Reveal3D", B.RevealSlide = "RevealSlide", B.RevealBlur = "RevealBlur", B.TextLiquid = "TextLiquid", B.TextVortex = "TextVortex", B.TextExplosion = "TextExplosion", B.TextRain = "TextRain", B.TextGravity = "TextGravity", B.TextElastic = "TextElastic", B.TextMatrix = "TextMatrix", B.TextNeon = "TextNeon", B.TextGlitch3D = "TextGlitch3D", B.TextDissolve = "TextDissolve", B.TextOrganic = "TextOrganic", B.TextBreathe = "TextBreathe", B.TextFloral = "TextFloral", B.TextSmoke = "TextSmoke", B.TextVariable = "TextVariable", B.TextMagnet = "TextMagnet", B.TextSpin = "TextSpin", B.TextZing = "TextZing", B.TextPerspective = "TextPerspective", B.TextMirror = "TextMirror", B))(Z || {}), TA = /* @__PURE__ */ ((B) => (B.Scale = "Scale", B.Opacity = "Opacity", B.RotateZ = "RotateZ", B.RotateX = "RotateX", B.RotateY = "RotateY", B.PositionX = "PositionX", B.PositionY = "PositionY", B.SkewX = "SkewX", B.Blur = "Blur", B.Exposure = "Exposure", B.HueShift = "HueShift", B.Negative = "Negative", B.CornerRadius = "CornerRadius", B.StrokeWidth = "StrokeWidth", B.BoxShadow = "BoxShadow", B.FontSize = "FontSize", B.LetterSpacing = "LetterSpacing", B))(TA || {}), VQ = /* @__PURE__ */ ((B) => (B.Equal = "Equal", B.NotEqual = "NotEqual", B.GreaterThan = "GreaterThan", B.LessThan = "LessThan", B.GreaterEqual = "GreaterEqual", B.LessEqual = "LessEqual", B.IsTrue = "IsTrue", B.IsFalse = "IsFalse", B))(VQ || {}), nI = /* @__PURE__ */ ((B) => (B.AND = "AND", B.OR = "OR", B.NOT = "NOT", B.XOR = "XOR", B))(nI || {});
|
|
7
|
+
function KC(B, A, I) {
|
|
8
|
+
let C = String(B || "").trim();
|
|
9
|
+
if (C && !isNaN(Number(C)) && !C.includes(" ") && !C.endsWith("fr") && !C.endsWith("px") && !C.endsWith("%")) {
|
|
10
|
+
const w = Math.max(1, parseInt(C));
|
|
11
|
+
C = new Array(w).fill("1fr").join(" ");
|
|
12
|
+
}
|
|
13
|
+
const g = C.split(/\s+/).filter(Boolean), Q = new Array(g.length).fill(0);
|
|
14
|
+
let E = A - (g.length - 1) * I, i = 0;
|
|
15
|
+
if (g.forEach((w, o) => {
|
|
16
|
+
if (w.endsWith("px")) {
|
|
17
|
+
const s = parseFloat(w);
|
|
18
|
+
Q[o] = s, E -= s;
|
|
19
|
+
} else w.endsWith("fr") ? i += parseFloat(w) : w === "auto" && (Q[o] = 100, E -= 100);
|
|
20
|
+
}), i > 0 && E > 0) {
|
|
21
|
+
const w = E / i;
|
|
22
|
+
g.forEach((o, s) => {
|
|
23
|
+
o.endsWith("fr") && (Q[s] = w * parseFloat(o));
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return Q;
|
|
27
27
|
}
|
|
28
28
|
function SC(B, A, I) {
|
|
29
29
|
try {
|
|
@@ -34,36 +34,36 @@ function SC(B, A, I) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
function zQ(B, A, I) {
|
|
37
|
-
var
|
|
38
|
-
const C = B.autoLayout, { direction: g, spacing: Q, padding: E, align: i, wrap: w } = C, o = g === "vertical", s = A.map((
|
|
39
|
-
const
|
|
40
|
-
let
|
|
37
|
+
var sA, EA;
|
|
38
|
+
const C = B.autoLayout, { direction: g, spacing: Q, padding: E, align: i, wrap: w } = C, o = g === "vertical", s = A.map((T) => {
|
|
39
|
+
const V = I(T.id), IA = T.geometry;
|
|
40
|
+
let x = (V == null ? void 0 : V.width) ?? IA.width ?? 100, d = (V == null ? void 0 : V.height) ?? IA.height ?? 100;
|
|
41
41
|
if (IA.type === "Ellipse" || IA.type === "Polygon" || IA.type === "Star") {
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const p = (V == null ? void 0 : V.radius) ?? IA.radius ?? (V == null ? void 0 : V.outer_radius) ?? IA.outer_radius ?? 50;
|
|
43
|
+
x = p * 2, d = p * 2;
|
|
44
44
|
}
|
|
45
|
-
return
|
|
45
|
+
return x *= T.transform.scale_x || 1, d *= T.transform.scale_y || 1, { id: T.id, w: x, h: d, original: T };
|
|
46
46
|
});
|
|
47
47
|
let h = B.width, a = B.height;
|
|
48
|
-
const G = ((
|
|
48
|
+
const G = ((sA = B.layoutProps) == null ? void 0 : sA.width) === "hug", t = ((EA = B.layoutProps) == null ? void 0 : EA.height) === "hug", K = [];
|
|
49
49
|
let S = [], y = 0, N = 0;
|
|
50
50
|
const M = h - E.left - E.right, e = a - E.top - E.bottom;
|
|
51
|
-
s.forEach((
|
|
52
|
-
w && S.length > 0 && (o ? N + Q +
|
|
53
|
-
}), S.length > 0 && K.push({ children: S, width: y, height: N }), G && !o && (h = Math.max(...K.map((
|
|
51
|
+
s.forEach((T) => {
|
|
52
|
+
w && S.length > 0 && (o ? N + Q + T.h > e : y + Q + T.w > M) ? (K.push({ children: S, width: y, height: N }), S = [T], y = T.w, N = T.h) : (S.push(T), o ? (y = Math.max(y, T.w), N += (S.length > 1 ? Q : 0) + T.h) : (y += (S.length > 1 ? Q : 0) + T.w, N = Math.max(N, T.h)));
|
|
53
|
+
}), S.length > 0 && K.push({ children: S, width: y, height: N }), G && !o && (h = Math.max(...K.map((T) => T.width), 0) + E.left + E.right), t && o && (a = Math.max(...K.map((T) => T.height), 0) + E.top + E.bottom);
|
|
54
54
|
const Y = [];
|
|
55
55
|
let j = E.left, l = E.top;
|
|
56
|
-
const r = i.toLowerCase(), v = r === "center" || r.endsWith("-center"), n = r.endsWith("-right"),
|
|
57
|
-
return K.forEach((
|
|
58
|
-
let
|
|
59
|
-
o ?
|
|
60
|
-
let
|
|
61
|
-
o ? v ?
|
|
62
|
-
id:
|
|
63
|
-
x:
|
|
64
|
-
y:
|
|
65
|
-
}), o ? IA +=
|
|
66
|
-
}), o ? j +=
|
|
56
|
+
const r = i.toLowerCase(), v = r === "center" || r.endsWith("-center"), n = r.endsWith("-right"), q = r === "center" || r.startsWith("center-"), P = r.startsWith("bottom-");
|
|
57
|
+
return K.forEach((T) => {
|
|
58
|
+
let V = j, IA = l;
|
|
59
|
+
o ? q ? IA = E.top + (a - E.top - E.bottom - T.height) / 2 : P && (IA = a - E.bottom - T.height) : v ? V = E.left + (h - E.left - E.right - T.width) / 2 : n && (V = h - E.right - T.width), T.children.forEach((x) => {
|
|
60
|
+
let d = V, p = IA;
|
|
61
|
+
o ? v ? d += (T.width - x.w) / 2 : n && (d += T.width - x.w) : q ? p += (T.height - x.h) / 2 : P && (p += T.height - x.h), Y.push({
|
|
62
|
+
id: x.id,
|
|
63
|
+
x: d + x.w / 2 - h / 2,
|
|
64
|
+
y: p + x.h / 2 - a / 2
|
|
65
|
+
}), o ? IA += x.h + Q : V += x.w + Q;
|
|
66
|
+
}), o ? j += T.width + Q : l += T.height + Q;
|
|
67
67
|
}), { frameWidth: G ? h : void 0, frameHeight: t ? a : void 0, childUpdates: Y };
|
|
68
68
|
}
|
|
69
69
|
function _Q(B, A, I) {
|
|
@@ -71,50 +71,50 @@ function _Q(B, A, I) {
|
|
|
71
71
|
if (!C) return { childUpdates: [] };
|
|
72
72
|
const { gridColumns: g, gridRows: Q, columnGap: E = 0, rowGap: i = 0, padding: w, align: o } = C;
|
|
73
73
|
let s = B.width, h = B.height;
|
|
74
|
-
const a = s - w.left - w.right, G = h - w.top - w.bottom, t = KC(g || "1fr", a, E), K = KC(Q || "auto", G, i), S = t.length > 0 ? t.reduce((n,
|
|
74
|
+
const a = s - w.left - w.right, G = h - w.top - w.bottom, t = KC(g || "1fr", a, E), K = KC(Q || "auto", G, i), S = t.length > 0 ? t.reduce((n, q) => n + q, 0) + (t.length - 1) * E : 0, y = K.length > 0 ? K.reduce((n, q) => n + q, 0) + (K.length - 1) * i : 0, N = o.toLowerCase(), M = N === "center" || N.endsWith("-center"), e = N.endsWith("-right"), Y = N === "center" || N.startsWith("center-"), j = N.startsWith("bottom-");
|
|
75
75
|
let l = 0, r = 0;
|
|
76
76
|
M ? l = (a - S) / 2 : e && (l = a - S), Y ? r = (G - y) / 2 : j && (r = G - y);
|
|
77
77
|
const v = [];
|
|
78
|
-
return A.forEach((n,
|
|
79
|
-
var
|
|
80
|
-
const P =
|
|
81
|
-
|
|
82
|
-
const EA = t[P],
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
let
|
|
92
|
-
M ?
|
|
78
|
+
return A.forEach((n, q) => {
|
|
79
|
+
var $, hA;
|
|
80
|
+
const P = q % t.length || 0, sA = Math.floor(q / t.length) || 0;
|
|
81
|
+
sA >= K.length && K.push(100);
|
|
82
|
+
const EA = t[P], T = K[sA];
|
|
83
|
+
let V = w.left + l + t.slice(0, P).reduce((KA, FA) => KA + FA + E, 0), IA = w.top + r + K.slice(0, sA).reduce((KA, FA) => KA + FA + i, 0);
|
|
84
|
+
const x = I(n.id), d = n.geometry;
|
|
85
|
+
let p = (x == null ? void 0 : x.width) ?? d.width ?? 100, U = (x == null ? void 0 : x.height) ?? d.height ?? 100;
|
|
86
|
+
if (d.type === "Ellipse" || d.type === "Polygon" || d.type === "Star") {
|
|
87
|
+
const KA = (x == null ? void 0 : x.radius) ?? d.radius ?? (x == null ? void 0 : x.outer_radius) ?? d.outer_radius ?? 50;
|
|
88
|
+
p = KA * 2, U = KA * 2;
|
|
89
|
+
}
|
|
90
|
+
p *= n.transform.scale_x || 1, U *= n.transform.scale_y || 1;
|
|
91
|
+
let _ = V, f = IA;
|
|
92
|
+
M ? _ += (EA - p) / 2 : e && (_ += EA - p), Y ? f += (T - U) / 2 : j && (f += T - U), v.push({
|
|
93
93
|
id: n.id,
|
|
94
|
-
x:
|
|
95
|
-
y:
|
|
96
|
-
width: ((
|
|
97
|
-
height: ((
|
|
94
|
+
x: _ + p / 2 - s / 2,
|
|
95
|
+
y: f + U / 2 - h / 2,
|
|
96
|
+
width: (($ = n.layoutProps) == null ? void 0 : $.width) === "fill" ? EA : void 0,
|
|
97
|
+
height: ((hA = n.layoutProps) == null ? void 0 : hA.height) === "fill" ? T : void 0
|
|
98
98
|
});
|
|
99
99
|
}), { childUpdates: v };
|
|
100
100
|
}
|
|
101
101
|
let D;
|
|
102
|
-
const
|
|
103
|
-
function
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
let HI =
|
|
108
|
-
function
|
|
109
|
-
HI ===
|
|
102
|
+
const eA = new Array(128).fill(void 0);
|
|
103
|
+
function MA(B) {
|
|
104
|
+
return eA[B];
|
|
105
|
+
}
|
|
106
|
+
eA.push(void 0, null, !0, !1);
|
|
107
|
+
let HI = eA.length;
|
|
108
|
+
function rA(B) {
|
|
109
|
+
HI === eA.length && eA.push(eA.length + 1);
|
|
110
110
|
const A = HI;
|
|
111
|
-
return HI =
|
|
111
|
+
return HI = eA[A], eA[A] = B, A;
|
|
112
112
|
}
|
|
113
113
|
function jI(B, A) {
|
|
114
114
|
try {
|
|
115
115
|
return B.apply(this, A);
|
|
116
116
|
} catch (I) {
|
|
117
|
-
D.__wbindgen_export_0(
|
|
117
|
+
D.__wbindgen_export_0(rA(I));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
const IQ = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) : { decode: () => {
|
|
@@ -125,7 +125,7 @@ let YI = null;
|
|
|
125
125
|
function Lg(B, A) {
|
|
126
126
|
return B >>>= 0, IQ.decode((YI !== null && YI.byteLength !== 0 || (YI = new Uint8Array(D.memory.buffer)), YI).subarray(B, B + A));
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function wA(B) {
|
|
129
129
|
return B == null;
|
|
130
130
|
}
|
|
131
131
|
let sI = null;
|
|
@@ -133,18 +133,18 @@ function fA() {
|
|
|
133
133
|
return (sI === null || sI.buffer.detached === !0 || sI.buffer.detached === void 0 && sI.buffer !== D.memory.buffer) && (sI = new DataView(D.memory.buffer)), sI;
|
|
134
134
|
}
|
|
135
135
|
function PI(B) {
|
|
136
|
-
const A =
|
|
136
|
+
const A = MA(B);
|
|
137
137
|
return function(I) {
|
|
138
|
-
I < 132 || (
|
|
138
|
+
I < 132 || (eA[I] = HI, HI = I);
|
|
139
139
|
}(B), A;
|
|
140
140
|
}
|
|
141
141
|
function k(B, A) {
|
|
142
142
|
if (!(B instanceof A)) throw new Error(`expected instance of ${A.name}`);
|
|
143
143
|
}
|
|
144
|
-
let
|
|
145
|
-
function
|
|
146
|
-
if (
|
|
147
|
-
return
|
|
144
|
+
let YA = 128;
|
|
145
|
+
function LA(B) {
|
|
146
|
+
if (YA == 1) throw new Error("out of js stack");
|
|
147
|
+
return eA[--YA] = B, YA;
|
|
148
148
|
}
|
|
149
149
|
let lI = null;
|
|
150
150
|
function $Q(B, A) {
|
|
@@ -193,85 +193,85 @@ class oI {
|
|
|
193
193
|
}
|
|
194
194
|
castRay(A, I, C, g, Q, E, i, w, o, s, h, a) {
|
|
195
195
|
try {
|
|
196
|
-
k(A, pA), k(I,
|
|
197
|
-
const G = D.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w,
|
|
196
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J);
|
|
197
|
+
const G = D.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w, wA(o) ? 4294967297 : o >>> 0, !wA(s), wA(s) ? 0 : s, !wA(h), wA(h) ? 0 : h, LA(a));
|
|
198
198
|
return G === 0 ? void 0 : Vg.__wrap(G);
|
|
199
199
|
} finally {
|
|
200
|
-
|
|
200
|
+
eA[YA++] = void 0;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
castRayAndGetNormal(A, I, C, g, Q, E, i, w, o, s, h, a) {
|
|
204
204
|
try {
|
|
205
|
-
k(A, pA), k(I,
|
|
206
|
-
const G = D.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w,
|
|
205
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J);
|
|
206
|
+
const G = D.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w, wA(o) ? 4294967297 : o >>> 0, !wA(s), wA(s) ? 0 : s, !wA(h), wA(h) ? 0 : h, LA(a));
|
|
207
207
|
return G === 0 ? void 0 : ig.__wrap(G);
|
|
208
208
|
} finally {
|
|
209
|
-
|
|
209
|
+
eA[YA++] = void 0;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
intersectionsWithRay(A, I, C, g, Q, E, i, w, o, s, h, a, G) {
|
|
213
213
|
try {
|
|
214
|
-
k(A, pA), k(I,
|
|
214
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J), D.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, LA(w), o, wA(s) ? 4294967297 : s >>> 0, !wA(h), wA(h) ? 0 : h, !wA(a), wA(a) ? 0 : a, LA(G));
|
|
215
215
|
} finally {
|
|
216
|
-
|
|
216
|
+
eA[YA++] = void 0, eA[YA++] = void 0;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
intersectionWithShape(A, I, C, g, Q, E, i, w, o, s, h) {
|
|
220
220
|
try {
|
|
221
221
|
const t = D.__wbindgen_add_to_stack_pointer(-16);
|
|
222
|
-
k(A, pA), k(I,
|
|
222
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, cA), k(E, yA), D.rawbroadphase_intersectionWithShape(t, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, wA(w) ? 4294967297 : w >>> 0, !wA(o), wA(o) ? 0 : o, !wA(s), wA(s) ? 0 : s, LA(h));
|
|
223
223
|
var a = fA().getInt32(t + 0, !0), G = fA().getFloat64(t + 8, !0);
|
|
224
224
|
return a === 0 ? void 0 : G;
|
|
225
225
|
} finally {
|
|
226
|
-
D.__wbindgen_add_to_stack_pointer(16),
|
|
226
|
+
D.__wbindgen_add_to_stack_pointer(16), eA[YA++] = void 0;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
projectPoint(A, I, C, g, Q, E, i, w, o, s) {
|
|
230
230
|
try {
|
|
231
|
-
k(A, pA), k(I,
|
|
232
|
-
const h = D.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E,
|
|
231
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J);
|
|
232
|
+
const h = D.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, wA(i) ? 4294967297 : i >>> 0, !wA(w), wA(w) ? 0 : w, !wA(o), wA(o) ? 0 : o, LA(s));
|
|
233
233
|
return h === 0 ? void 0 : VI.__wrap(h);
|
|
234
234
|
} finally {
|
|
235
|
-
|
|
235
|
+
eA[YA++] = void 0;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
projectPointAndGetFeature(A, I, C, g, Q, E, i, w, o) {
|
|
239
239
|
try {
|
|
240
|
-
k(A, pA), k(I,
|
|
241
|
-
const s = D.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q,
|
|
240
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J);
|
|
241
|
+
const s = D.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, wA(E) ? 4294967297 : E >>> 0, !wA(i), wA(i) ? 0 : i, !wA(w), wA(w) ? 0 : w, LA(o));
|
|
242
242
|
return s === 0 ? void 0 : VI.__wrap(s);
|
|
243
243
|
} finally {
|
|
244
|
-
|
|
244
|
+
eA[YA++] = void 0;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
intersectionsWithPoint(A, I, C, g, Q, E, i, w, o, s) {
|
|
248
248
|
try {
|
|
249
|
-
k(A, pA), k(I,
|
|
249
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), D.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, LA(Q), E, wA(i) ? 4294967297 : i >>> 0, !wA(w), wA(w) ? 0 : w, !wA(o), wA(o) ? 0 : o, LA(s));
|
|
250
250
|
} finally {
|
|
251
|
-
|
|
251
|
+
eA[YA++] = void 0, eA[YA++] = void 0;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
castShape(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K) {
|
|
255
255
|
try {
|
|
256
|
-
k(A, pA), k(I,
|
|
257
|
-
const S = D.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w, o, s, h,
|
|
256
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, cA), k(E, J), k(i, yA);
|
|
257
|
+
const S = D.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w, o, s, h, wA(a) ? 4294967297 : a >>> 0, !wA(G), wA(G) ? 0 : G, !wA(t), wA(t) ? 0 : t, LA(K));
|
|
258
258
|
return S === 0 ? void 0 : Bg.__wrap(S);
|
|
259
259
|
} finally {
|
|
260
|
-
|
|
260
|
+
eA[YA++] = void 0;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
intersectionsWithShape(A, I, C, g, Q, E, i, w, o, s, h, a) {
|
|
264
264
|
try {
|
|
265
|
-
k(A, pA), k(I,
|
|
265
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, cA), k(E, yA), D.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, LA(i), w, wA(o) ? 4294967297 : o >>> 0, !wA(s), wA(s) ? 0 : s, !wA(h), wA(h) ? 0 : h, LA(a));
|
|
266
266
|
} finally {
|
|
267
|
-
|
|
267
|
+
eA[YA++] = void 0, eA[YA++] = void 0;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
collidersWithAabbIntersectingAabb(A, I, C, g, Q, E) {
|
|
271
271
|
try {
|
|
272
|
-
k(A, pA), k(I,
|
|
272
|
+
k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J), D.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, LA(E));
|
|
273
273
|
} finally {
|
|
274
|
-
|
|
274
|
+
eA[YA++] = void 0;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -342,10 +342,10 @@ class QQ {
|
|
|
342
342
|
const kg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
343
343
|
}, unregister: () => {
|
|
344
344
|
} } : new FinalizationRegistry((B) => D.__wbg_rawcolliderset_free(B >>> 0, 1));
|
|
345
|
-
class
|
|
345
|
+
class qA {
|
|
346
346
|
static __wrap(A) {
|
|
347
347
|
A >>>= 0;
|
|
348
|
-
const I = Object.create(
|
|
348
|
+
const I = Object.create(qA.prototype);
|
|
349
349
|
return I.__wbg_ptr = A, kg.register(I, I.__wbg_ptr, I), I;
|
|
350
350
|
}
|
|
351
351
|
__destroy_into_raw() {
|
|
@@ -362,7 +362,7 @@ class LA {
|
|
|
362
362
|
}
|
|
363
363
|
coRotation(A) {
|
|
364
364
|
const I = D.rawcolliderset_coRotation(this.__wbg_ptr, A);
|
|
365
|
-
return
|
|
365
|
+
return cA.__wrap(I);
|
|
366
366
|
}
|
|
367
367
|
coTranslationWrtParent(A) {
|
|
368
368
|
const I = D.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr, A);
|
|
@@ -370,7 +370,7 @@ class LA {
|
|
|
370
370
|
}
|
|
371
371
|
coRotationWrtParent(A) {
|
|
372
372
|
const I = D.rawcolliderset_coRotationWrtParent(this.__wbg_ptr, A);
|
|
373
|
-
return I === 0 ? void 0 :
|
|
373
|
+
return I === 0 ? void 0 : cA.__wrap(I);
|
|
374
374
|
}
|
|
375
375
|
coSetTranslation(A, I, C) {
|
|
376
376
|
D.rawcolliderset_coSetTranslation(this.__wbg_ptr, A, I, C);
|
|
@@ -548,7 +548,7 @@ class LA {
|
|
|
548
548
|
return k(I, J), D.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
|
|
549
549
|
}
|
|
550
550
|
coCastShape(A, I, C, g, Q, E, i, w, o) {
|
|
551
|
-
k(I, J), k(C,
|
|
551
|
+
k(I, J), k(C, yA), k(g, J), k(Q, cA), k(E, J);
|
|
552
552
|
const s = D.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, w, o);
|
|
553
553
|
return s === 0 ? void 0 : Dg.__wrap(s);
|
|
554
554
|
}
|
|
@@ -558,10 +558,10 @@ class LA {
|
|
|
558
558
|
return w === 0 ? void 0 : Bg.__wrap(w);
|
|
559
559
|
}
|
|
560
560
|
coIntersectsShape(A, I, C, g) {
|
|
561
|
-
return k(I,
|
|
561
|
+
return k(I, yA), k(C, J), k(g, cA), D.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr) !== 0;
|
|
562
562
|
}
|
|
563
563
|
coContactShape(A, I, C, g, Q) {
|
|
564
|
-
k(I,
|
|
564
|
+
k(I, yA), k(C, J), k(g, cA);
|
|
565
565
|
const E = D.rawcolliderset_coContactShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q);
|
|
566
566
|
return E === 0 ? void 0 : dI.__wrap(E);
|
|
567
567
|
}
|
|
@@ -622,7 +622,7 @@ class LA {
|
|
|
622
622
|
D.rawcolliderset_coSetActiveCollisionTypes(this.__wbg_ptr, A, I);
|
|
623
623
|
}
|
|
624
624
|
coSetShape(A, I) {
|
|
625
|
-
k(I,
|
|
625
|
+
k(I, yA), D.rawcolliderset_coSetShape(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
626
626
|
}
|
|
627
627
|
coSetContactForceEventThreshold(A, I) {
|
|
628
628
|
D.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr, A, I);
|
|
@@ -648,25 +648,25 @@ class LA {
|
|
|
648
648
|
}
|
|
649
649
|
createCollider(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K, S, y, N, M, e, Y, j, l, r) {
|
|
650
650
|
try {
|
|
651
|
-
const
|
|
652
|
-
k(I,
|
|
653
|
-
var v = fA().getInt32(
|
|
651
|
+
const q = D.__wbindgen_add_to_stack_pointer(-16);
|
|
652
|
+
k(I, yA), k(C, J), k(g, cA), k(i, J), k(r, lA), D.rawcolliderset_createCollider(q, this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, i.__wbg_ptr, w, o, s, h, a, G, t, K, S, y, N, M, e, Y, j, l, r.__wbg_ptr);
|
|
653
|
+
var v = fA().getInt32(q + 0, !0), n = fA().getFloat64(q + 8, !0);
|
|
654
654
|
return v === 0 ? void 0 : n;
|
|
655
655
|
} finally {
|
|
656
656
|
D.__wbindgen_add_to_stack_pointer(16);
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
remove(A, I, C, g) {
|
|
660
|
-
k(I, II), k(C,
|
|
660
|
+
k(I, II), k(C, lA), D.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
661
661
|
}
|
|
662
662
|
isHandleValid(A) {
|
|
663
663
|
return D.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
|
|
664
664
|
}
|
|
665
665
|
forEachColliderHandle(A) {
|
|
666
666
|
try {
|
|
667
|
-
D.rawcolliderset_forEachColliderHandle(this.__wbg_ptr,
|
|
667
|
+
D.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, LA(A));
|
|
668
668
|
} finally {
|
|
669
|
-
|
|
669
|
+
eA[YA++] = void 0;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
}
|
|
@@ -885,9 +885,9 @@ class AB {
|
|
|
885
885
|
}
|
|
886
886
|
render(A, I, C, g, Q, E, i) {
|
|
887
887
|
try {
|
|
888
|
-
k(A,
|
|
888
|
+
k(A, lA), k(I, qA), k(C, AI), k(g, gI), k(Q, pA), D.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, LA(i));
|
|
889
889
|
} finally {
|
|
890
|
-
|
|
890
|
+
eA[YA++] = void 0;
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
}
|
|
@@ -930,11 +930,11 @@ class Pg {
|
|
|
930
930
|
}
|
|
931
931
|
takeBodies() {
|
|
932
932
|
const A = D.rawdeserializedworld_takeBodies(this.__wbg_ptr);
|
|
933
|
-
return A === 0 ? void 0 :
|
|
933
|
+
return A === 0 ? void 0 : lA.__wrap(A);
|
|
934
934
|
}
|
|
935
935
|
takeColliders() {
|
|
936
936
|
const A = D.rawdeserializedworld_takeColliders(this.__wbg_ptr);
|
|
937
|
-
return A === 0 ? void 0 :
|
|
937
|
+
return A === 0 ? void 0 : qA.__wrap(A);
|
|
938
938
|
}
|
|
939
939
|
takeImpulseJoints() {
|
|
940
940
|
const A = D.rawdeserializedworld_takeImpulseJoints(this.__wbg_ptr);
|
|
@@ -963,16 +963,16 @@ class BQ {
|
|
|
963
963
|
}
|
|
964
964
|
drainCollisionEvents(A) {
|
|
965
965
|
try {
|
|
966
|
-
D.raweventqueue_drainCollisionEvents(this.__wbg_ptr,
|
|
966
|
+
D.raweventqueue_drainCollisionEvents(this.__wbg_ptr, LA(A));
|
|
967
967
|
} finally {
|
|
968
|
-
|
|
968
|
+
eA[YA++] = void 0;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
drainContactForceEvents(A) {
|
|
972
972
|
try {
|
|
973
|
-
D.raweventqueue_drainContactForceEvents(this.__wbg_ptr,
|
|
973
|
+
D.raweventqueue_drainContactForceEvents(this.__wbg_ptr, LA(A));
|
|
974
974
|
} finally {
|
|
975
|
-
|
|
975
|
+
eA[YA++] = void 0;
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
clear() {
|
|
@@ -1012,7 +1012,7 @@ class xA {
|
|
|
1012
1012
|
return i === 0 ? void 0 : xA.__wrap(i);
|
|
1013
1013
|
}
|
|
1014
1014
|
static fixed(A, I, C, g) {
|
|
1015
|
-
k(A, J), k(I,
|
|
1015
|
+
k(A, J), k(I, cA), k(C, J), k(g, cA);
|
|
1016
1016
|
const Q = D.rawgenericjoint_fixed(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr);
|
|
1017
1017
|
return xA.__wrap(Q);
|
|
1018
1018
|
}
|
|
@@ -1050,11 +1050,11 @@ class AI {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
jointFrameX1(A) {
|
|
1052
1052
|
const I = D.rawimpulsejointset_jointFrameX1(this.__wbg_ptr, A);
|
|
1053
|
-
return
|
|
1053
|
+
return cA.__wrap(I);
|
|
1054
1054
|
}
|
|
1055
1055
|
jointFrameX2(A) {
|
|
1056
1056
|
const I = D.rawimpulsejointset_jointFrameX2(this.__wbg_ptr, A);
|
|
1057
|
-
return
|
|
1057
|
+
return cA.__wrap(I);
|
|
1058
1058
|
}
|
|
1059
1059
|
jointAnchor1(A) {
|
|
1060
1060
|
const I = D.rawimpulsejointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -1118,16 +1118,16 @@ class AI {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
forEachJointHandle(A) {
|
|
1120
1120
|
try {
|
|
1121
|
-
D.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr,
|
|
1121
|
+
D.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, LA(A));
|
|
1122
1122
|
} finally {
|
|
1123
|
-
|
|
1123
|
+
eA[YA++] = void 0;
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
1126
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1127
1127
|
try {
|
|
1128
|
-
D.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A,
|
|
1128
|
+
D.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, LA(I));
|
|
1129
1129
|
} finally {
|
|
1130
|
-
|
|
1130
|
+
eA[YA++] = void 0;
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
@@ -1230,9 +1230,9 @@ class II {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
forEachActiveRigidBodyHandle(A) {
|
|
1232
1232
|
try {
|
|
1233
|
-
D.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr,
|
|
1233
|
+
D.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, LA(A));
|
|
1234
1234
|
} finally {
|
|
1235
|
-
|
|
1235
|
+
eA[YA++] = void 0;
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
@@ -1325,9 +1325,9 @@ class IB {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
computeColliderMovement(A, I, C, g, Q, E, i, w, o, s, h, a) {
|
|
1327
1327
|
try {
|
|
1328
|
-
k(I, oI), k(C, pA), k(g,
|
|
1328
|
+
k(I, oI), k(C, pA), k(g, lA), k(Q, qA), k(i, J), D.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i.__wbg_ptr, w, wA(o) ? 4294967297 : Math.fround(o), s, wA(h) ? 4294967297 : h >>> 0, LA(a));
|
|
1329
1329
|
} finally {
|
|
1330
|
-
|
|
1330
|
+
eA[YA++] = void 0;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
1333
|
computedMovement() {
|
|
@@ -1366,11 +1366,11 @@ class gI {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
jointFrameX1(A) {
|
|
1368
1368
|
const I = D.rawmultibodyjointset_jointFrameX1(this.__wbg_ptr, A);
|
|
1369
|
-
return
|
|
1369
|
+
return cA.__wrap(I);
|
|
1370
1370
|
}
|
|
1371
1371
|
jointFrameX2(A) {
|
|
1372
1372
|
const I = D.rawmultibodyjointset_jointFrameX2(this.__wbg_ptr, A);
|
|
1373
|
-
return
|
|
1373
|
+
return cA.__wrap(I);
|
|
1374
1374
|
}
|
|
1375
1375
|
jointAnchor1(A) {
|
|
1376
1376
|
const I = D.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -1410,16 +1410,16 @@ class gI {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
forEachJointHandle(A) {
|
|
1412
1412
|
try {
|
|
1413
|
-
D.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr,
|
|
1413
|
+
D.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, LA(A));
|
|
1414
1414
|
} finally {
|
|
1415
|
-
|
|
1415
|
+
eA[YA++] = void 0;
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
1418
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1419
1419
|
try {
|
|
1420
|
-
D.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A,
|
|
1420
|
+
D.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, LA(I));
|
|
1421
1421
|
} finally {
|
|
1422
|
-
|
|
1422
|
+
eA[YA++] = void 0;
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
@@ -1445,14 +1445,14 @@ class pA {
|
|
|
1445
1445
|
return this.__wbg_ptr = A >>> 0, cg.register(this, this.__wbg_ptr, this), this;
|
|
1446
1446
|
}
|
|
1447
1447
|
contact_pairs_with(A, I) {
|
|
1448
|
-
D.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A,
|
|
1448
|
+
D.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, rA(I));
|
|
1449
1449
|
}
|
|
1450
1450
|
contact_pair(A, I) {
|
|
1451
1451
|
const C = D.rawnarrowphase_contact_pair(this.__wbg_ptr, A, I);
|
|
1452
1452
|
return C === 0 ? void 0 : vg.__wrap(C);
|
|
1453
1453
|
}
|
|
1454
1454
|
intersection_pairs_with(A, I) {
|
|
1455
|
-
D.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A,
|
|
1455
|
+
D.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A, rA(I));
|
|
1456
1456
|
}
|
|
1457
1457
|
intersection_pair(A, I) {
|
|
1458
1458
|
return D.rawnarrowphase_intersection_pair(this.__wbg_ptr, A, I) !== 0;
|
|
@@ -1529,10 +1529,10 @@ class gB {
|
|
|
1529
1529
|
return D.rawphysicspipeline_timing_user_changes(this.__wbg_ptr);
|
|
1530
1530
|
}
|
|
1531
1531
|
step(A, I, C, g, Q, E, i, w, o, s) {
|
|
1532
|
-
k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E,
|
|
1532
|
+
k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, lA), k(i, qA), k(w, AI), k(o, gI), k(s, qg), D.rawphysicspipeline_step(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr);
|
|
1533
1533
|
}
|
|
1534
1534
|
stepWithEvents(A, I, C, g, Q, E, i, w, o, s, h, a, G, t) {
|
|
1535
|
-
k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E,
|
|
1535
|
+
k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, lA), k(i, qA), k(w, AI), k(o, gI), k(s, qg), k(h, BQ), D.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr, h.__wbg_ptr, rA(a), rA(G), rA(t));
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
1538
|
const lC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1567,18 +1567,18 @@ class CB {
|
|
|
1567
1567
|
D.rawpidcontroller_reset_integrals(this.__wbg_ptr);
|
|
1568
1568
|
}
|
|
1569
1569
|
apply_linear_correction(A, I, C, g, Q) {
|
|
1570
|
-
k(I,
|
|
1570
|
+
k(I, lA), k(g, J), k(Q, J), D.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q.__wbg_ptr);
|
|
1571
1571
|
}
|
|
1572
1572
|
apply_angular_correction(A, I, C, g, Q) {
|
|
1573
|
-
k(I,
|
|
1573
|
+
k(I, lA), D.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
|
|
1574
1574
|
}
|
|
1575
1575
|
linear_correction(A, I, C, g, Q) {
|
|
1576
|
-
k(I,
|
|
1576
|
+
k(I, lA), k(g, J), k(Q, J);
|
|
1577
1577
|
const E = D.rawpidcontroller_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q.__wbg_ptr);
|
|
1578
1578
|
return J.__wrap(E);
|
|
1579
1579
|
}
|
|
1580
1580
|
angular_correction(A, I, C, g, Q) {
|
|
1581
|
-
return k(I,
|
|
1581
|
+
return k(I, lA), D.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
const LC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1735,10 +1735,10 @@ class og {
|
|
|
1735
1735
|
const Jg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1736
1736
|
}, unregister: () => {
|
|
1737
1737
|
} } : new FinalizationRegistry((B) => D.__wbg_rawrigidbodyset_free(B >>> 0, 1));
|
|
1738
|
-
class
|
|
1738
|
+
class lA {
|
|
1739
1739
|
static __wrap(A) {
|
|
1740
1740
|
A >>>= 0;
|
|
1741
|
-
const I = Object.create(
|
|
1741
|
+
const I = Object.create(lA.prototype);
|
|
1742
1742
|
return I.__wbg_ptr = A, Jg.register(I, I.__wbg_ptr, I), I;
|
|
1743
1743
|
}
|
|
1744
1744
|
__destroy_into_raw() {
|
|
@@ -1755,7 +1755,7 @@ class YA {
|
|
|
1755
1755
|
}
|
|
1756
1756
|
rbRotation(A) {
|
|
1757
1757
|
const I = D.rawrigidbodyset_rbRotation(this.__wbg_ptr, A);
|
|
1758
|
-
return
|
|
1758
|
+
return cA.__wrap(I);
|
|
1759
1759
|
}
|
|
1760
1760
|
rbSleep(A) {
|
|
1761
1761
|
D.rawrigidbodyset_rbSleep(this.__wbg_ptr, A);
|
|
@@ -1772,7 +1772,7 @@ class YA {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
rbNextRotation(A) {
|
|
1774
1774
|
const I = D.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, A);
|
|
1775
|
-
return
|
|
1775
|
+
return cA.__wrap(I);
|
|
1776
1776
|
}
|
|
1777
1777
|
rbSetTranslation(A, I, C, g) {
|
|
1778
1778
|
D.rawrigidbodyset_rbSetTranslation(this.__wbg_ptr, A, I, C, g);
|
|
@@ -1793,7 +1793,7 @@ class YA {
|
|
|
1793
1793
|
D.rawrigidbodyset_rbSetNextKinematicRotation(this.__wbg_ptr, A, I);
|
|
1794
1794
|
}
|
|
1795
1795
|
rbRecomputeMassPropertiesFromColliders(A, I) {
|
|
1796
|
-
k(I,
|
|
1796
|
+
k(I, qA), D.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1797
1797
|
}
|
|
1798
1798
|
rbSetAdditionalMass(A, I, C) {
|
|
1799
1799
|
D.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr, A, I, C);
|
|
@@ -1966,10 +1966,10 @@ class YA {
|
|
|
1966
1966
|
return this.__wbg_ptr = A >>> 0, Jg.register(this, this.__wbg_ptr, this), this;
|
|
1967
1967
|
}
|
|
1968
1968
|
createRigidBody(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K, S, y, N, M, e, Y, j) {
|
|
1969
|
-
return k(I, J), k(C,
|
|
1969
|
+
return k(I, J), k(C, cA), k(i, J), k(w, J), D.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g, Q, E, i.__wbg_ptr, w.__wbg_ptr, o, s, h, a, G, t, K, S, y, N, M, e, Y, j);
|
|
1970
1970
|
}
|
|
1971
1971
|
remove(A, I, C, g, Q) {
|
|
1972
|
-
k(I, II), k(C,
|
|
1972
|
+
k(I, II), k(C, qA), k(g, AI), k(Q, gI), D.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr);
|
|
1973
1973
|
}
|
|
1974
1974
|
len() {
|
|
1975
1975
|
return D.rawrigidbodyset_len(this.__wbg_ptr) >>> 0;
|
|
@@ -1979,22 +1979,22 @@ class YA {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
forEachRigidBodyHandle(A) {
|
|
1981
1981
|
try {
|
|
1982
|
-
D.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr,
|
|
1982
|
+
D.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, LA(A));
|
|
1983
1983
|
} finally {
|
|
1984
|
-
|
|
1984
|
+
eA[YA++] = void 0;
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
propagateModifiedBodyPositionsToColliders(A) {
|
|
1988
|
-
k(A,
|
|
1988
|
+
k(A, qA), D.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, A.__wbg_ptr);
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
const fC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1992
1992
|
}, unregister: () => {
|
|
1993
1993
|
} } : new FinalizationRegistry((B) => D.__wbg_rawrotation_free(B >>> 0, 1));
|
|
1994
|
-
class
|
|
1994
|
+
class cA {
|
|
1995
1995
|
static __wrap(A) {
|
|
1996
1996
|
A >>>= 0;
|
|
1997
|
-
const I = Object.create(
|
|
1997
|
+
const I = Object.create(cA.prototype);
|
|
1998
1998
|
return I.__wbg_ptr = A, fC.register(I, I.__wbg_ptr, I), I;
|
|
1999
1999
|
}
|
|
2000
2000
|
__destroy_into_raw() {
|
|
@@ -2007,11 +2007,11 @@ class eA {
|
|
|
2007
2007
|
}
|
|
2008
2008
|
static identity() {
|
|
2009
2009
|
const A = D.rawrotation_identity();
|
|
2010
|
-
return
|
|
2010
|
+
return cA.__wrap(A);
|
|
2011
2011
|
}
|
|
2012
2012
|
static fromAngle(A) {
|
|
2013
2013
|
const I = D.rawrotation_fromAngle(A);
|
|
2014
|
-
return
|
|
2014
|
+
return cA.__wrap(I);
|
|
2015
2015
|
}
|
|
2016
2016
|
get im() {
|
|
2017
2017
|
return D.rawkinematiccharactercontroller_offset(this.__wbg_ptr);
|
|
@@ -2040,20 +2040,20 @@ class QB {
|
|
|
2040
2040
|
return this.__wbg_ptr = A >>> 0, bC.register(this, this.__wbg_ptr, this), this;
|
|
2041
2041
|
}
|
|
2042
2042
|
serializeAll(A, I, C, g, Q, E, i, w, o) {
|
|
2043
|
-
return k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E,
|
|
2043
|
+
return k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, lA), k(i, qA), k(w, AI), k(o, gI), PI(D.rawserializationpipeline_serializeAll(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr));
|
|
2044
2044
|
}
|
|
2045
2045
|
deserializeAll(A) {
|
|
2046
|
-
const I = D.rawserializationpipeline_deserializeAll(this.__wbg_ptr,
|
|
2046
|
+
const I = D.rawserializationpipeline_deserializeAll(this.__wbg_ptr, rA(A));
|
|
2047
2047
|
return I === 0 ? void 0 : Pg.__wrap(I);
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
2050
|
const TC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
2051
2051
|
}, unregister: () => {
|
|
2052
2052
|
} } : new FinalizationRegistry((B) => D.__wbg_rawshape_free(B >>> 0, 1));
|
|
2053
|
-
class
|
|
2053
|
+
class yA {
|
|
2054
2054
|
static __wrap(A) {
|
|
2055
2055
|
A >>>= 0;
|
|
2056
|
-
const I = Object.create(
|
|
2056
|
+
const I = Object.create(yA.prototype);
|
|
2057
2057
|
return I.__wbg_ptr = A, TC.register(I, I.__wbg_ptr, I), I;
|
|
2058
2058
|
}
|
|
2059
2059
|
__destroy_into_raw() {
|
|
@@ -2066,109 +2066,109 @@ class SA {
|
|
|
2066
2066
|
}
|
|
2067
2067
|
static cuboid(A, I) {
|
|
2068
2068
|
const C = D.rawshape_cuboid(A, I);
|
|
2069
|
-
return
|
|
2069
|
+
return yA.__wrap(C);
|
|
2070
2070
|
}
|
|
2071
2071
|
static roundCuboid(A, I, C) {
|
|
2072
2072
|
const g = D.rawshape_roundCuboid(A, I, C);
|
|
2073
|
-
return
|
|
2073
|
+
return yA.__wrap(g);
|
|
2074
2074
|
}
|
|
2075
2075
|
static ball(A) {
|
|
2076
2076
|
const I = D.rawshape_ball(A);
|
|
2077
|
-
return
|
|
2077
|
+
return yA.__wrap(I);
|
|
2078
2078
|
}
|
|
2079
2079
|
static halfspace(A) {
|
|
2080
2080
|
k(A, J);
|
|
2081
2081
|
const I = D.rawshape_halfspace(A.__wbg_ptr);
|
|
2082
|
-
return
|
|
2082
|
+
return yA.__wrap(I);
|
|
2083
2083
|
}
|
|
2084
2084
|
static capsule(A, I) {
|
|
2085
2085
|
const C = D.rawshape_capsule(A, I);
|
|
2086
|
-
return
|
|
2086
|
+
return yA.__wrap(C);
|
|
2087
2087
|
}
|
|
2088
2088
|
static voxels(A, I) {
|
|
2089
2089
|
k(A, J);
|
|
2090
2090
|
const C = Sg(I, D.__wbindgen_export_2), g = WA, Q = D.rawshape_voxels(A.__wbg_ptr, C, g);
|
|
2091
|
-
return
|
|
2091
|
+
return yA.__wrap(Q);
|
|
2092
2092
|
}
|
|
2093
2093
|
static voxelsFromPoints(A, I) {
|
|
2094
2094
|
k(A, J);
|
|
2095
2095
|
const C = EI(I, D.__wbindgen_export_2), g = WA, Q = D.rawshape_voxelsFromPoints(A.__wbg_ptr, C, g);
|
|
2096
|
-
return
|
|
2096
|
+
return yA.__wrap(Q);
|
|
2097
2097
|
}
|
|
2098
2098
|
static polyline(A, I) {
|
|
2099
2099
|
const C = EI(A, D.__wbindgen_export_2), g = WA, Q = Sg(I, D.__wbindgen_export_2), E = WA, i = D.rawshape_polyline(C, g, Q, E);
|
|
2100
|
-
return
|
|
2100
|
+
return yA.__wrap(i);
|
|
2101
2101
|
}
|
|
2102
2102
|
static trimesh(A, I, C) {
|
|
2103
2103
|
const g = EI(A, D.__wbindgen_export_2), Q = WA, E = Sg(I, D.__wbindgen_export_2), i = WA, w = D.rawshape_trimesh(g, Q, E, i, C);
|
|
2104
|
-
return w === 0 ? void 0 :
|
|
2104
|
+
return w === 0 ? void 0 : yA.__wrap(w);
|
|
2105
2105
|
}
|
|
2106
2106
|
static heightfield(A, I) {
|
|
2107
2107
|
const C = EI(A, D.__wbindgen_export_2), g = WA;
|
|
2108
2108
|
k(I, J);
|
|
2109
2109
|
const Q = D.rawshape_heightfield(C, g, I.__wbg_ptr);
|
|
2110
|
-
return
|
|
2110
|
+
return yA.__wrap(Q);
|
|
2111
2111
|
}
|
|
2112
2112
|
static segment(A, I) {
|
|
2113
2113
|
k(A, J), k(I, J);
|
|
2114
2114
|
const C = D.rawshape_segment(A.__wbg_ptr, I.__wbg_ptr);
|
|
2115
|
-
return
|
|
2115
|
+
return yA.__wrap(C);
|
|
2116
2116
|
}
|
|
2117
2117
|
static triangle(A, I, C) {
|
|
2118
2118
|
k(A, J), k(I, J), k(C, J);
|
|
2119
2119
|
const g = D.rawshape_triangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr);
|
|
2120
|
-
return
|
|
2120
|
+
return yA.__wrap(g);
|
|
2121
2121
|
}
|
|
2122
2122
|
static roundTriangle(A, I, C, g) {
|
|
2123
2123
|
k(A, J), k(I, J), k(C, J);
|
|
2124
2124
|
const Q = D.rawshape_roundTriangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
2125
|
-
return
|
|
2125
|
+
return yA.__wrap(Q);
|
|
2126
2126
|
}
|
|
2127
2127
|
static convexHull(A) {
|
|
2128
2128
|
const I = EI(A, D.__wbindgen_export_2), C = WA, g = D.rawshape_convexHull(I, C);
|
|
2129
|
-
return g === 0 ? void 0 :
|
|
2129
|
+
return g === 0 ? void 0 : yA.__wrap(g);
|
|
2130
2130
|
}
|
|
2131
2131
|
static roundConvexHull(A, I) {
|
|
2132
2132
|
const C = EI(A, D.__wbindgen_export_2), g = WA, Q = D.rawshape_roundConvexHull(C, g, I);
|
|
2133
|
-
return Q === 0 ? void 0 :
|
|
2133
|
+
return Q === 0 ? void 0 : yA.__wrap(Q);
|
|
2134
2134
|
}
|
|
2135
2135
|
static convexPolyline(A) {
|
|
2136
2136
|
const I = EI(A, D.__wbindgen_export_2), C = WA, g = D.rawshape_convexPolyline(I, C);
|
|
2137
|
-
return g === 0 ? void 0 :
|
|
2137
|
+
return g === 0 ? void 0 : yA.__wrap(g);
|
|
2138
2138
|
}
|
|
2139
2139
|
static roundConvexPolyline(A, I) {
|
|
2140
2140
|
const C = EI(A, D.__wbindgen_export_2), g = WA, Q = D.rawshape_roundConvexPolyline(C, g, I);
|
|
2141
|
-
return Q === 0 ? void 0 :
|
|
2141
|
+
return Q === 0 ? void 0 : yA.__wrap(Q);
|
|
2142
2142
|
}
|
|
2143
2143
|
castShape(A, I, C, g, Q, E, i, w, o, s) {
|
|
2144
|
-
k(A, J), k(I,
|
|
2144
|
+
k(A, J), k(I, cA), k(C, J), k(g, yA), k(Q, J), k(E, cA), k(i, J);
|
|
2145
2145
|
const h = D.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w, o, s);
|
|
2146
2146
|
return h === 0 ? void 0 : Dg.__wrap(h);
|
|
2147
2147
|
}
|
|
2148
2148
|
intersectsShape(A, I, C, g, Q) {
|
|
2149
|
-
return k(A, J), k(I,
|
|
2149
|
+
return k(A, J), k(I, cA), k(C, yA), k(g, J), k(Q, cA), D.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr) !== 0;
|
|
2150
2150
|
}
|
|
2151
2151
|
contactShape(A, I, C, g, Q, E) {
|
|
2152
|
-
k(A, J), k(I,
|
|
2152
|
+
k(A, J), k(I, cA), k(C, yA), k(g, J), k(Q, cA);
|
|
2153
2153
|
const i = D.rawshape_contactShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E);
|
|
2154
2154
|
return i === 0 ? void 0 : dI.__wrap(i);
|
|
2155
2155
|
}
|
|
2156
2156
|
containsPoint(A, I, C) {
|
|
2157
|
-
return k(A, J), k(I,
|
|
2157
|
+
return k(A, J), k(I, cA), k(C, J), D.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr) !== 0;
|
|
2158
2158
|
}
|
|
2159
2159
|
projectPoint(A, I, C, g) {
|
|
2160
|
-
k(A, J), k(I,
|
|
2160
|
+
k(A, J), k(I, cA), k(C, J);
|
|
2161
2161
|
const Q = D.rawshape_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
2162
2162
|
return Eg.__wrap(Q);
|
|
2163
2163
|
}
|
|
2164
2164
|
intersectsRay(A, I, C, g, Q) {
|
|
2165
|
-
return k(A, J), k(I,
|
|
2165
|
+
return k(A, J), k(I, cA), k(C, J), k(g, J), D.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q) !== 0;
|
|
2166
2166
|
}
|
|
2167
2167
|
castRay(A, I, C, g, Q, E) {
|
|
2168
|
-
return k(A, J), k(I,
|
|
2168
|
+
return k(A, J), k(I, cA), k(C, J), k(g, J), D.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E);
|
|
2169
2169
|
}
|
|
2170
2170
|
castRayAndGetNormal(A, I, C, g, Q, E) {
|
|
2171
|
-
k(A, J), k(I,
|
|
2171
|
+
k(A, J), k(I, cA), k(C, J), k(g, J);
|
|
2172
2172
|
const i = D.rawshape_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E);
|
|
2173
2173
|
return i === 0 ? void 0 : og.__wrap(i);
|
|
2174
2174
|
}
|
|
@@ -2299,79 +2299,79 @@ async function EQ(B) {
|
|
|
2299
2299
|
const A = function() {
|
|
2300
2300
|
const g = { wbg: {} };
|
|
2301
2301
|
return g.wbg.__wbg_bind_c8359b1cba058168 = function(Q, E, i, w) {
|
|
2302
|
-
return
|
|
2302
|
+
return rA(MA(Q).bind(MA(E), MA(i), MA(w)));
|
|
2303
2303
|
}, g.wbg.__wbg_buffer_609cc3eee51ed158 = function(Q) {
|
|
2304
|
-
return
|
|
2304
|
+
return rA(MA(Q).buffer);
|
|
2305
2305
|
}, g.wbg.__wbg_call_672a4d21634d4a24 = function() {
|
|
2306
2306
|
return jI(function(Q, E) {
|
|
2307
|
-
return
|
|
2307
|
+
return rA(MA(Q).call(MA(E)));
|
|
2308
2308
|
}, arguments);
|
|
2309
2309
|
}, g.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
|
2310
2310
|
return jI(function(Q, E, i) {
|
|
2311
|
-
return
|
|
2311
|
+
return rA(MA(Q).call(MA(E), MA(i)));
|
|
2312
2312
|
}, arguments);
|
|
2313
2313
|
}, g.wbg.__wbg_call_833bed5770ea2041 = function() {
|
|
2314
2314
|
return jI(function(Q, E, i, w) {
|
|
2315
|
-
return
|
|
2315
|
+
return rA(MA(Q).call(MA(E), MA(i), MA(w)));
|
|
2316
2316
|
}, arguments);
|
|
2317
2317
|
}, g.wbg.__wbg_call_b8adc8b1d0a0d8eb = function() {
|
|
2318
2318
|
return jI(function(Q, E, i, w, o) {
|
|
2319
|
-
return
|
|
2319
|
+
return rA(MA(Q).call(MA(E), MA(i), MA(w), MA(o)));
|
|
2320
2320
|
}, arguments);
|
|
2321
2321
|
}, g.wbg.__wbg_length_3b4f022188ae8db6 = function(Q) {
|
|
2322
|
-
return
|
|
2322
|
+
return MA(Q).length;
|
|
2323
2323
|
}, g.wbg.__wbg_length_a446193dc22c12f8 = function(Q) {
|
|
2324
|
-
return
|
|
2324
|
+
return MA(Q).length;
|
|
2325
2325
|
}, g.wbg.__wbg_new_a12002a7f91c75be = function(Q) {
|
|
2326
|
-
return
|
|
2326
|
+
return rA(new Uint8Array(MA(Q)));
|
|
2327
2327
|
}, g.wbg.__wbg_newnoargs_105ed471475aaf50 = function(Q, E) {
|
|
2328
|
-
return
|
|
2328
|
+
return rA(new Function(Lg(Q, E)));
|
|
2329
2329
|
}, g.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(Q, E, i) {
|
|
2330
|
-
return
|
|
2330
|
+
return rA(new Uint8Array(MA(Q), E >>> 0, i >>> 0));
|
|
2331
2331
|
}, g.wbg.__wbg_newwithbyteoffsetandlength_e6b7e69acd4c7354 = function(Q, E, i) {
|
|
2332
|
-
return
|
|
2332
|
+
return rA(new Float32Array(MA(Q), E >>> 0, i >>> 0));
|
|
2333
2333
|
}, g.wbg.__wbg_newwithlength_5a5efe313cfd59f1 = function(Q) {
|
|
2334
|
-
return
|
|
2334
|
+
return rA(new Float32Array(Q >>> 0));
|
|
2335
2335
|
}, g.wbg.__wbg_now_2c95c9de01293173 = function(Q) {
|
|
2336
|
-
return
|
|
2336
|
+
return MA(Q).now();
|
|
2337
2337
|
}, g.wbg.__wbg_performance_7a3ffd0b17f663ad = function(Q) {
|
|
2338
|
-
return
|
|
2338
|
+
return rA(MA(Q).performance);
|
|
2339
2339
|
}, g.wbg.__wbg_rawcontactforceevent_new = function(Q) {
|
|
2340
|
-
return
|
|
2340
|
+
return rA(jg.__wrap(Q));
|
|
2341
2341
|
}, g.wbg.__wbg_rawraycolliderintersection_new = function(Q) {
|
|
2342
|
-
return
|
|
2342
|
+
return rA(ig.__wrap(Q));
|
|
2343
2343
|
}, g.wbg.__wbg_set_10bad9bee0e9c58b = function(Q, E, i) {
|
|
2344
|
-
|
|
2344
|
+
MA(Q).set(MA(E), i >>> 0);
|
|
2345
2345
|
}, g.wbg.__wbg_set_65595bdd868b3009 = function(Q, E, i) {
|
|
2346
|
-
|
|
2346
|
+
MA(Q).set(MA(E), i >>> 0);
|
|
2347
2347
|
}, g.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
2348
2348
|
const Q = typeof global > "u" ? null : global;
|
|
2349
|
-
return
|
|
2349
|
+
return wA(Q) ? 0 : rA(Q);
|
|
2350
2350
|
}, g.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
2351
2351
|
const Q = typeof globalThis > "u" ? null : globalThis;
|
|
2352
|
-
return
|
|
2352
|
+
return wA(Q) ? 0 : rA(Q);
|
|
2353
2353
|
}, g.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
2354
2354
|
const Q = typeof self > "u" ? null : self;
|
|
2355
|
-
return
|
|
2355
|
+
return wA(Q) ? 0 : rA(Q);
|
|
2356
2356
|
}, g.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
2357
2357
|
const Q = typeof window > "u" ? null : window;
|
|
2358
|
-
return
|
|
2358
|
+
return wA(Q) ? 0 : rA(Q);
|
|
2359
2359
|
}, g.wbg.__wbindgen_boolean_get = function(Q) {
|
|
2360
|
-
const E =
|
|
2360
|
+
const E = MA(Q);
|
|
2361
2361
|
return typeof E == "boolean" ? E ? 1 : 0 : 2;
|
|
2362
2362
|
}, g.wbg.__wbindgen_is_function = function(Q) {
|
|
2363
|
-
return typeof
|
|
2363
|
+
return typeof MA(Q) == "function";
|
|
2364
2364
|
}, g.wbg.__wbindgen_is_undefined = function(Q) {
|
|
2365
|
-
return
|
|
2365
|
+
return MA(Q) === void 0;
|
|
2366
2366
|
}, g.wbg.__wbindgen_memory = function() {
|
|
2367
|
-
return
|
|
2367
|
+
return rA(D.memory);
|
|
2368
2368
|
}, g.wbg.__wbindgen_number_get = function(Q, E) {
|
|
2369
|
-
const i =
|
|
2370
|
-
fA().setFloat64(Q + 8,
|
|
2369
|
+
const i = MA(E), w = typeof i == "number" ? i : void 0;
|
|
2370
|
+
fA().setFloat64(Q + 8, wA(w) ? 0 : w, !0), fA().setInt32(Q + 0, !wA(w), !0);
|
|
2371
2371
|
}, g.wbg.__wbindgen_number_new = function(Q) {
|
|
2372
|
-
return
|
|
2372
|
+
return rA(Q);
|
|
2373
2373
|
}, g.wbg.__wbindgen_object_clone_ref = function(Q) {
|
|
2374
|
-
return
|
|
2374
|
+
return rA(MA(Q));
|
|
2375
2375
|
}, g.wbg.__wbindgen_object_drop_ref = function(Q) {
|
|
2376
2376
|
PI(Q);
|
|
2377
2377
|
}, g.wbg.__wbindgen_throw = function(Q, E) {
|
|
@@ -2423,7 +2423,7 @@ class c {
|
|
|
2423
2423
|
A.x = I.x, A.y = I.y;
|
|
2424
2424
|
}
|
|
2425
2425
|
}
|
|
2426
|
-
class
|
|
2426
|
+
class nA {
|
|
2427
2427
|
static identity() {
|
|
2428
2428
|
return 0;
|
|
2429
2429
|
}
|
|
@@ -2433,7 +2433,7 @@ class rA {
|
|
|
2433
2433
|
return A.free(), I;
|
|
2434
2434
|
}
|
|
2435
2435
|
static intoRaw(A) {
|
|
2436
|
-
return
|
|
2436
|
+
return cA.fromAngle(A);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
var XA, ZA, pg, Hg, fI, eI, bA, dg, fg, zI, _I, bg, Tg, $I, tI;
|
|
@@ -2489,7 +2489,7 @@ class ug {
|
|
|
2489
2489
|
}
|
|
2490
2490
|
rotation() {
|
|
2491
2491
|
let A = this.rawSet.rbRotation(this.handle);
|
|
2492
|
-
return
|
|
2492
|
+
return nA.fromRaw(A);
|
|
2493
2493
|
}
|
|
2494
2494
|
nextTranslation() {
|
|
2495
2495
|
let A = this.rawSet.rbNextTranslation(this.handle);
|
|
@@ -2497,7 +2497,7 @@ class ug {
|
|
|
2497
2497
|
}
|
|
2498
2498
|
nextRotation() {
|
|
2499
2499
|
let A = this.rawSet.rbNextRotation(this.handle);
|
|
2500
|
-
return
|
|
2500
|
+
return nA.fromRaw(A);
|
|
2501
2501
|
}
|
|
2502
2502
|
setTranslation(A, I) {
|
|
2503
2503
|
this.rawSet.rbSetTranslation(this.handle, A.x, A.y, I);
|
|
@@ -2663,7 +2663,7 @@ class ug {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
class VA {
|
|
2665
2665
|
constructor(A) {
|
|
2666
|
-
this.enabled = !0, this.status = A, this.translation = c.zeros(), this.rotation =
|
|
2666
|
+
this.enabled = !0, this.status = A, this.translation = c.zeros(), this.rotation = nA.identity(), this.gravityScale = 1, this.linvel = c.zeros(), this.mass = 0, this.massOnly = !1, this.centerOfMass = c.zeros(), this.translationsEnabledX = !0, this.translationsEnabledY = !0, this.angvel = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0, this.linearDamping = 0, this.angularDamping = 0, this.canSleep = !0, this.sleeping = !1, this.ccdEnabled = !1, this.softCcdPrediction = 0, this.dominanceGroup = 0, this.additionalSolverIterations = 0;
|
|
2667
2667
|
}
|
|
2668
2668
|
static dynamic() {
|
|
2669
2669
|
return new VA(XA.Dynamic);
|
|
@@ -2790,7 +2790,7 @@ class wg {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
class oQ {
|
|
2792
2792
|
constructor(A) {
|
|
2793
|
-
this.raw = A || new
|
|
2793
|
+
this.raw = A || new lA(), this.map = new wg(), A && A.forEachRigidBodyHandle((I) => {
|
|
2794
2794
|
this.map.set(I, new ug(A, null, I));
|
|
2795
2795
|
});
|
|
2796
2796
|
}
|
|
@@ -2801,7 +2801,7 @@ class oQ {
|
|
|
2801
2801
|
this.map.forEach((I) => I.finalizeDeserialization(A));
|
|
2802
2802
|
}
|
|
2803
2803
|
createRigidBody(A, I) {
|
|
2804
|
-
let C = c.intoRaw(I.translation), g =
|
|
2804
|
+
let C = c.intoRaw(I.translation), g = nA.intoRaw(I.rotation), Q = c.intoRaw(I.linvel), E = c.intoRaw(I.centerOfMass), i = this.raw.createRigidBody(I.enabled, C, g, I.gravityScale, I.mass, I.massOnly, E, Q, I.angvel, I.principalAngularInertia, I.translationsEnabledX, I.translationsEnabledY, I.rotationsEnabled, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
|
|
2805
2805
|
C.free(), g.free(), Q.free(), E.free();
|
|
2806
2806
|
const w = new ug(this.raw, A, i);
|
|
2807
2807
|
return w.userData = I.userData, this.map.set(i, w), w;
|
|
@@ -3025,7 +3025,7 @@ class hI {
|
|
|
3025
3025
|
let A, I, C = c.intoRaw(this.anchor1), g = c.intoRaw(this.anchor2), Q = !1, E = 0, i = 0;
|
|
3026
3026
|
switch (this.jointType) {
|
|
3027
3027
|
case ZA.Fixed:
|
|
3028
|
-
let w =
|
|
3028
|
+
let w = nA.intoRaw(this.frame1), o = nA.intoRaw(this.frame2);
|
|
3029
3029
|
I = xA.fixed(C, w, g, o), w.free(), o.free();
|
|
3030
3030
|
break;
|
|
3031
3031
|
case ZA.Spring:
|
|
@@ -3289,7 +3289,7 @@ class MQ {
|
|
|
3289
3289
|
this.raw.intersectionsWithRay(A.raw, I.raw, C.raw, G, t, Q, E, (K) => i(bI.fromRaw(C, K)), w, o, s, h, a), G.free(), t.free();
|
|
3290
3290
|
}
|
|
3291
3291
|
intersectionWithShape(A, I, C, g, Q, E, i, w, o, s, h) {
|
|
3292
|
-
let a = c.intoRaw(g), G =
|
|
3292
|
+
let a = c.intoRaw(g), G = nA.intoRaw(Q), t = E.intoRaw(), K = this.raw.intersectionWithShape(A.raw, I.raw, C.raw, a, G, t, i, w, o, s, h);
|
|
3293
3293
|
return a.free(), G.free(), t.free(), K;
|
|
3294
3294
|
}
|
|
3295
3295
|
projectPoint(A, I, C, g, Q, E, i, w, o, s) {
|
|
@@ -3305,11 +3305,11 @@ class MQ {
|
|
|
3305
3305
|
this.raw.intersectionsWithPoint(A.raw, I.raw, C.raw, h, Q, E, i, w, o, s), h.free();
|
|
3306
3306
|
}
|
|
3307
3307
|
castShape(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K) {
|
|
3308
|
-
let S = c.intoRaw(g), y =
|
|
3308
|
+
let S = c.intoRaw(g), y = nA.intoRaw(Q), N = c.intoRaw(E), M = i.intoRaw(), e = xI.fromRaw(C, this.raw.castShape(A.raw, I.raw, C.raw, S, y, N, M, w, o, s, h, a, G, t, K));
|
|
3309
3309
|
return S.free(), y.free(), N.free(), M.free(), e;
|
|
3310
3310
|
}
|
|
3311
3311
|
intersectionsWithShape(A, I, C, g, Q, E, i, w, o, s, h, a) {
|
|
3312
|
-
let G = c.intoRaw(g), t =
|
|
3312
|
+
let G = c.intoRaw(g), t = nA.intoRaw(Q), K = E.intoRaw();
|
|
3313
3313
|
this.raw.intersectionsWithShape(A.raw, I.raw, C.raw, G, t, K, i, w, o, s, h, a), G.free(), t.free(), K.free();
|
|
3314
3314
|
}
|
|
3315
3315
|
collidersWithAabbIntersectingAabb(A, I, C, g, Q, E) {
|
|
@@ -3460,35 +3460,35 @@ class uA {
|
|
|
3460
3460
|
}
|
|
3461
3461
|
}
|
|
3462
3462
|
castShape(A, I, C, g, Q, E, i, w, o, s) {
|
|
3463
|
-
let h = c.intoRaw(A), a =
|
|
3463
|
+
let h = c.intoRaw(A), a = nA.intoRaw(I), G = c.intoRaw(C), t = c.intoRaw(Q), K = nA.intoRaw(E), S = c.intoRaw(i), y = this.intoRaw(), N = g.intoRaw(), M = JI.fromRaw(null, y.castShape(h, a, G, N, t, K, S, w, o, s));
|
|
3464
3464
|
return h.free(), a.free(), G.free(), t.free(), K.free(), S.free(), y.free(), N.free(), M;
|
|
3465
3465
|
}
|
|
3466
3466
|
intersectsShape(A, I, C, g, Q) {
|
|
3467
|
-
let E = c.intoRaw(A), i =
|
|
3467
|
+
let E = c.intoRaw(A), i = nA.intoRaw(I), w = c.intoRaw(g), o = nA.intoRaw(Q), s = this.intoRaw(), h = C.intoRaw(), a = s.intersectsShape(E, i, h, w, o);
|
|
3468
3468
|
return E.free(), i.free(), w.free(), o.free(), s.free(), h.free(), a;
|
|
3469
3469
|
}
|
|
3470
3470
|
contactShape(A, I, C, g, Q, E) {
|
|
3471
|
-
let i = c.intoRaw(A), w =
|
|
3471
|
+
let i = c.intoRaw(A), w = nA.intoRaw(I), o = c.intoRaw(g), s = nA.intoRaw(Q), h = this.intoRaw(), a = C.intoRaw(), G = cI.fromRaw(h.contactShape(i, w, a, o, s, E));
|
|
3472
3472
|
return i.free(), w.free(), o.free(), s.free(), h.free(), a.free(), G;
|
|
3473
3473
|
}
|
|
3474
3474
|
containsPoint(A, I, C) {
|
|
3475
|
-
let g = c.intoRaw(A), Q =
|
|
3475
|
+
let g = c.intoRaw(A), Q = nA.intoRaw(I), E = c.intoRaw(C), i = this.intoRaw(), w = i.containsPoint(g, Q, E);
|
|
3476
3476
|
return g.free(), Q.free(), E.free(), i.free(), w;
|
|
3477
3477
|
}
|
|
3478
3478
|
projectPoint(A, I, C, g) {
|
|
3479
|
-
let Q = c.intoRaw(A), E =
|
|
3479
|
+
let Q = c.intoRaw(A), E = nA.intoRaw(I), i = c.intoRaw(C), w = this.intoRaw(), o = mI.fromRaw(w.projectPoint(Q, E, i, g));
|
|
3480
3480
|
return Q.free(), E.free(), i.free(), w.free(), o;
|
|
3481
3481
|
}
|
|
3482
3482
|
intersectsRay(A, I, C, g) {
|
|
3483
|
-
let Q = c.intoRaw(I), E =
|
|
3483
|
+
let Q = c.intoRaw(I), E = nA.intoRaw(C), i = c.intoRaw(A.origin), w = c.intoRaw(A.dir), o = this.intoRaw(), s = o.intersectsRay(Q, E, i, w, g);
|
|
3484
3484
|
return Q.free(), E.free(), i.free(), w.free(), o.free(), s;
|
|
3485
3485
|
}
|
|
3486
3486
|
castRay(A, I, C, g, Q) {
|
|
3487
|
-
let E = c.intoRaw(I), i =
|
|
3487
|
+
let E = c.intoRaw(I), i = nA.intoRaw(C), w = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = s.castRay(E, i, w, o, g, Q);
|
|
3488
3488
|
return E.free(), i.free(), w.free(), o.free(), s.free(), h;
|
|
3489
3489
|
}
|
|
3490
3490
|
castRayAndGetNormal(A, I, C, g, Q) {
|
|
3491
|
-
let E = c.intoRaw(I), i =
|
|
3491
|
+
let E = c.intoRaw(I), i = nA.intoRaw(C), w = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = uI.fromRaw(s.castRayAndGetNormal(E, i, w, o, g, Q));
|
|
3492
3492
|
return E.free(), i.free(), w.free(), o.free(), s.free(), h;
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
@@ -3502,7 +3502,7 @@ class $g extends uA {
|
|
|
3502
3502
|
super(), this.type = bA.Ball, this.radius = A;
|
|
3503
3503
|
}
|
|
3504
3504
|
intoRaw() {
|
|
3505
|
-
return
|
|
3505
|
+
return yA.ball(this.radius);
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
3508
|
class AC extends uA {
|
|
@@ -3510,7 +3510,7 @@ class AC extends uA {
|
|
|
3510
3510
|
super(), this.type = bA.HalfSpace, this.normal = A;
|
|
3511
3511
|
}
|
|
3512
3512
|
intoRaw() {
|
|
3513
|
-
let A = c.intoRaw(this.normal), I =
|
|
3513
|
+
let A = c.intoRaw(this.normal), I = yA.halfspace(A);
|
|
3514
3514
|
return A.free(), I;
|
|
3515
3515
|
}
|
|
3516
3516
|
}
|
|
@@ -3519,7 +3519,7 @@ class IC extends uA {
|
|
|
3519
3519
|
super(), this.type = bA.Cuboid, this.halfExtents = c.new(A, I);
|
|
3520
3520
|
}
|
|
3521
3521
|
intoRaw() {
|
|
3522
|
-
return
|
|
3522
|
+
return yA.cuboid(this.halfExtents.x, this.halfExtents.y);
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
3525
|
class gC extends uA {
|
|
@@ -3527,7 +3527,7 @@ class gC extends uA {
|
|
|
3527
3527
|
super(), this.type = bA.RoundCuboid, this.halfExtents = c.new(A, I), this.borderRadius = C;
|
|
3528
3528
|
}
|
|
3529
3529
|
intoRaw() {
|
|
3530
|
-
return
|
|
3530
|
+
return yA.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
|
|
3531
3531
|
}
|
|
3532
3532
|
}
|
|
3533
3533
|
class CC extends uA {
|
|
@@ -3535,7 +3535,7 @@ class CC extends uA {
|
|
|
3535
3535
|
super(), this.type = bA.Capsule, this.halfHeight = A, this.radius = I;
|
|
3536
3536
|
}
|
|
3537
3537
|
intoRaw() {
|
|
3538
|
-
return
|
|
3538
|
+
return yA.capsule(this.halfHeight, this.radius);
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
3541
|
class QC extends uA {
|
|
@@ -3543,7 +3543,7 @@ class QC extends uA {
|
|
|
3543
3543
|
super(), this.type = bA.Segment, this.a = A, this.b = I;
|
|
3544
3544
|
}
|
|
3545
3545
|
intoRaw() {
|
|
3546
|
-
let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C =
|
|
3546
|
+
let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = yA.segment(A, I);
|
|
3547
3547
|
return A.free(), I.free(), C;
|
|
3548
3548
|
}
|
|
3549
3549
|
}
|
|
@@ -3552,7 +3552,7 @@ class BC extends uA {
|
|
|
3552
3552
|
super(), this.type = bA.Triangle, this.a = A, this.b = I, this.c = C;
|
|
3553
3553
|
}
|
|
3554
3554
|
intoRaw() {
|
|
3555
|
-
let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g =
|
|
3555
|
+
let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g = yA.triangle(A, I, C);
|
|
3556
3556
|
return A.free(), I.free(), C.free(), g;
|
|
3557
3557
|
}
|
|
3558
3558
|
}
|
|
@@ -3561,7 +3561,7 @@ class EC extends uA {
|
|
|
3561
3561
|
super(), this.type = bA.RoundTriangle, this.a = A, this.b = I, this.c = C, this.borderRadius = g;
|
|
3562
3562
|
}
|
|
3563
3563
|
intoRaw() {
|
|
3564
|
-
let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g =
|
|
3564
|
+
let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g = yA.roundTriangle(A, I, C, this.borderRadius);
|
|
3565
3565
|
return A.free(), I.free(), C.free(), g;
|
|
3566
3566
|
}
|
|
3567
3567
|
}
|
|
@@ -3570,7 +3570,7 @@ class iC extends uA {
|
|
|
3570
3570
|
super(), this.type = bA.Polyline, this.vertices = A, this.indices = I ?? new Uint32Array(0);
|
|
3571
3571
|
}
|
|
3572
3572
|
intoRaw() {
|
|
3573
|
-
return
|
|
3573
|
+
return yA.polyline(this.vertices, this.indices);
|
|
3574
3574
|
}
|
|
3575
3575
|
}
|
|
3576
3576
|
class oC extends uA {
|
|
@@ -3579,7 +3579,7 @@ class oC extends uA {
|
|
|
3579
3579
|
}
|
|
3580
3580
|
intoRaw() {
|
|
3581
3581
|
let A, I = c.intoRaw(this.voxelSize);
|
|
3582
|
-
return A = this.data instanceof Int32Array ?
|
|
3582
|
+
return A = this.data instanceof Int32Array ? yA.voxels(I, this.data) : yA.voxelsFromPoints(I, this.data), I.free(), A;
|
|
3583
3583
|
}
|
|
3584
3584
|
}
|
|
3585
3585
|
class DC extends uA {
|
|
@@ -3587,7 +3587,7 @@ class DC extends uA {
|
|
|
3587
3587
|
super(), this.type = bA.TriMesh, this.vertices = A, this.indices = I, this.flags = C;
|
|
3588
3588
|
}
|
|
3589
3589
|
intoRaw() {
|
|
3590
|
-
return
|
|
3590
|
+
return yA.trimesh(this.vertices, this.indices, this.flags);
|
|
3591
3591
|
}
|
|
3592
3592
|
}
|
|
3593
3593
|
class Ag extends uA {
|
|
@@ -3595,7 +3595,7 @@ class Ag extends uA {
|
|
|
3595
3595
|
super(), this.type = bA.ConvexPolygon, this.vertices = A, this.skipConvexHullComputation = !!I;
|
|
3596
3596
|
}
|
|
3597
3597
|
intoRaw() {
|
|
3598
|
-
return this.skipConvexHullComputation ?
|
|
3598
|
+
return this.skipConvexHullComputation ? yA.convexPolyline(this.vertices) : yA.convexHull(this.vertices);
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
3601
|
class Ig extends uA {
|
|
@@ -3603,7 +3603,7 @@ class Ig extends uA {
|
|
|
3603
3603
|
super(), this.type = bA.RoundConvexPolygon, this.vertices = A, this.borderRadius = I, this.skipConvexHullComputation = !!C;
|
|
3604
3604
|
}
|
|
3605
3605
|
intoRaw() {
|
|
3606
|
-
return this.skipConvexHullComputation ?
|
|
3606
|
+
return this.skipConvexHullComputation ? yA.roundConvexPolyline(this.vertices, this.borderRadius) : yA.roundConvexHull(this.vertices, this.borderRadius);
|
|
3607
3607
|
}
|
|
3608
3608
|
}
|
|
3609
3609
|
class wC extends uA {
|
|
@@ -3611,7 +3611,7 @@ class wC extends uA {
|
|
|
3611
3611
|
super(), this.type = bA.HeightField, this.heights = A, this.scale = I;
|
|
3612
3612
|
}
|
|
3613
3613
|
intoRaw() {
|
|
3614
|
-
let A = c.intoRaw(this.scale), I =
|
|
3614
|
+
let A = c.intoRaw(this.scale), I = yA.heightfield(this.heights, A);
|
|
3615
3615
|
return A.free(), I;
|
|
3616
3616
|
}
|
|
3617
3617
|
}
|
|
@@ -4102,10 +4102,10 @@ class xg {
|
|
|
4102
4102
|
return c.fromRaw(this.colliderSet.raw.coTranslationWrtParent(this.handle));
|
|
4103
4103
|
}
|
|
4104
4104
|
rotation() {
|
|
4105
|
-
return
|
|
4105
|
+
return nA.fromRaw(this.colliderSet.raw.coRotation(this.handle));
|
|
4106
4106
|
}
|
|
4107
4107
|
rotationWrtParent() {
|
|
4108
|
-
return
|
|
4108
|
+
return nA.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle));
|
|
4109
4109
|
}
|
|
4110
4110
|
isSensor() {
|
|
4111
4111
|
return this.colliderSet.raw.coIsSensor(this.handle);
|
|
@@ -4286,7 +4286,7 @@ class xg {
|
|
|
4286
4286
|
return C.free(), g.free(), Q;
|
|
4287
4287
|
}
|
|
4288
4288
|
castShape(A, I, C, g, Q, E, i, w) {
|
|
4289
|
-
let o = c.intoRaw(A), s = c.intoRaw(C), h =
|
|
4289
|
+
let o = c.intoRaw(A), s = c.intoRaw(C), h = nA.intoRaw(g), a = c.intoRaw(Q), G = I.intoRaw(), t = JI.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, o, G, s, h, a, E, i, w));
|
|
4290
4290
|
return o.free(), s.free(), h.free(), a.free(), G.free(), t;
|
|
4291
4291
|
}
|
|
4292
4292
|
castCollider(A, I, C, g, Q, E) {
|
|
@@ -4294,11 +4294,11 @@ class xg {
|
|
|
4294
4294
|
return i.free(), w.free(), o;
|
|
4295
4295
|
}
|
|
4296
4296
|
intersectsShape(A, I, C) {
|
|
4297
|
-
let g = c.intoRaw(I), Q =
|
|
4297
|
+
let g = c.intoRaw(I), Q = nA.intoRaw(C), E = A.intoRaw(), i = this.colliderSet.raw.coIntersectsShape(this.handle, E, g, Q);
|
|
4298
4298
|
return g.free(), Q.free(), E.free(), i;
|
|
4299
4299
|
}
|
|
4300
4300
|
contactShape(A, I, C, g) {
|
|
4301
|
-
let Q = c.intoRaw(I), E =
|
|
4301
|
+
let Q = c.intoRaw(I), E = nA.intoRaw(C), i = A.intoRaw(), w = cI.fromRaw(this.colliderSet.raw.coContactShape(this.handle, i, Q, E, g));
|
|
4302
4302
|
return Q.free(), E.free(), i.free(), w;
|
|
4303
4303
|
}
|
|
4304
4304
|
contactCollider(A, I) {
|
|
@@ -4318,7 +4318,7 @@ class xg {
|
|
|
4318
4318
|
})(tI || (tI = {}));
|
|
4319
4319
|
class dA {
|
|
4320
4320
|
constructor(A) {
|
|
4321
|
-
this.enabled = !0, this.shape = A, this.massPropsMode = tI.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation =
|
|
4321
|
+
this.enabled = !0, this.shape = A, this.massPropsMode = tI.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = nA.identity(), this.translation = c.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = fI.Average, this.restitutionCombineRule = fI.Average, this.activeCollisionTypes = $I.DEFAULT, this.activeEvents = zI.NONE, this.activeHooks = _I.NONE, this.mass = 0, this.centerOfMass = c.zeros(), this.contactForceEventThreshold = 0, this.contactSkin = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0;
|
|
4322
4322
|
}
|
|
4323
4323
|
static ball(A) {
|
|
4324
4324
|
const I = new $g(A);
|
|
@@ -4442,7 +4442,7 @@ class dA {
|
|
|
4442
4442
|
}
|
|
4443
4443
|
class LQ {
|
|
4444
4444
|
constructor(A) {
|
|
4445
|
-
this.raw = A || new
|
|
4445
|
+
this.raw = A || new qA(), this.map = new wg(), A && A.forEachColliderHandle((I) => {
|
|
4446
4446
|
this.map.set(I, new xg(this, I, null));
|
|
4447
4447
|
});
|
|
4448
4448
|
}
|
|
@@ -4458,7 +4458,7 @@ class LQ {
|
|
|
4458
4458
|
createCollider(A, I, C) {
|
|
4459
4459
|
let g = C != null && C != null;
|
|
4460
4460
|
if (g && isNaN(C)) throw Error("Cannot create a collider with a parent rigid-body handle that is not a number.");
|
|
4461
|
-
let Q = I.shape.intoRaw(), E = c.intoRaw(I.translation), i =
|
|
4461
|
+
let Q = I.shape.intoRaw(), E = c.intoRaw(I.translation), i = nA.intoRaw(I.rotation), w = c.intoRaw(I.centerOfMass), o = this.raw.createCollider(I.enabled, Q, E, i, I.massPropsMode, I.mass, w, I.principalAngularInertia, I.density, I.friction, I.restitution, I.frictionCombineRule, I.restitutionCombineRule, I.isSensor, I.collisionGroups, I.solverGroups, I.activeCollisionTypes, I.activeHooks, I.activeEvents, I.contactForceEventThreshold, I.contactSkin, g, g ? C : 0, A.raw);
|
|
4462
4462
|
Q.free(), E.free(), i.free(), w.free();
|
|
4463
4463
|
let s = g ? A.get(C) : null, h = new xg(this, o, s, I.shape);
|
|
4464
4464
|
return this.map.set(o, h), h;
|
|
@@ -4556,7 +4556,7 @@ function GB(B) {
|
|
|
4556
4556
|
A = B, D.reserve_memory(A);
|
|
4557
4557
|
}
|
|
4558
4558
|
jA[45] = 62, jA[95] = 63;
|
|
4559
|
-
var OA = Object.freeze({ __proto__: null, version: aB, reserveMemory: GB, Vector2: iQ, VectorOps: c, RotationOps:
|
|
4559
|
+
var OA = Object.freeze({ __proto__: null, version: aB, reserveMemory: GB, Vector2: iQ, VectorOps: c, RotationOps: nA, get RigidBodyType() {
|
|
4560
4560
|
return XA;
|
|
4561
4561
|
}, RigidBody: ug, RigidBodyDesc: VA, RigidBodySet: oQ, IntegrationParameters: DQ, get JointType() {
|
|
4562
4562
|
return ZA;
|
|
@@ -4589,10 +4589,10 @@ var OA = Object.freeze({ __proto__: null, version: aB, reserveMemory: GB, Vector
|
|
|
4589
4589
|
}, PidController: YQ });
|
|
4590
4590
|
class tB {
|
|
4591
4591
|
constructor() {
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4592
|
+
tA(this, "world", null);
|
|
4593
|
+
tA(this, "bodies", /* @__PURE__ */ new Map());
|
|
4594
|
+
tA(this, "colliders", /* @__PURE__ */ new Map());
|
|
4595
|
+
tA(this, "initialized", !1);
|
|
4596
4596
|
}
|
|
4597
4597
|
async init(A) {
|
|
4598
4598
|
this.initialized || (await OA.init(), this.world = new OA.World(new OA.Vector2(A.x, A.y)), this.initialized = !0);
|
|
@@ -5975,70 +5975,70 @@ function SE(B, A, I) {
|
|
|
5975
5975
|
function N() {
|
|
5976
5976
|
S = -1, y = 0;
|
|
5977
5977
|
}
|
|
5978
|
-
function M(
|
|
5978
|
+
function M(q = t, P = K, sA = s) {
|
|
5979
5979
|
o++, I == null || I({
|
|
5980
5980
|
startSegmentIndex: a,
|
|
5981
5981
|
startGraphemeIndex: G,
|
|
5982
|
-
endSegmentIndex:
|
|
5982
|
+
endSegmentIndex: q,
|
|
5983
5983
|
endGraphemeIndex: P,
|
|
5984
|
-
width:
|
|
5984
|
+
width: sA
|
|
5985
5985
|
}), s = 0, h = !1, N();
|
|
5986
5986
|
}
|
|
5987
|
-
function e(
|
|
5988
|
-
h = !0, a =
|
|
5987
|
+
function e(q, P) {
|
|
5988
|
+
h = !0, a = q, G = 0, t = q + 1, K = 0, s = P;
|
|
5989
5989
|
}
|
|
5990
|
-
function Y(
|
|
5991
|
-
h = !0, a =
|
|
5990
|
+
function Y(q, P, sA) {
|
|
5991
|
+
h = !0, a = q, G = P, t = q, K = P + 1, s = sA;
|
|
5992
5992
|
}
|
|
5993
|
-
function j(
|
|
5993
|
+
function j(q, P) {
|
|
5994
5994
|
if (!h) {
|
|
5995
|
-
e(
|
|
5995
|
+
e(q, P);
|
|
5996
5996
|
return;
|
|
5997
5997
|
}
|
|
5998
|
-
s += P, t =
|
|
5998
|
+
s += P, t = q + 1, K = 0;
|
|
5999
5999
|
}
|
|
6000
|
-
function l(
|
|
6001
|
-
gg(g[
|
|
6000
|
+
function l(q, P) {
|
|
6001
|
+
gg(g[q]) && (S = q + 1, y = s - P);
|
|
6002
6002
|
}
|
|
6003
|
-
function r(
|
|
6004
|
-
v(
|
|
6003
|
+
function r(q) {
|
|
6004
|
+
v(q, 0);
|
|
6005
6005
|
}
|
|
6006
|
-
function v(
|
|
6007
|
-
const
|
|
6008
|
-
for (let
|
|
6009
|
-
const
|
|
6006
|
+
function v(q, P) {
|
|
6007
|
+
const sA = Q[q], EA = E[q] ?? null;
|
|
6008
|
+
for (let T = P; T < sA.length; T++) {
|
|
6009
|
+
const V = fQ(sA, EA, T, i.preferPrefixWidthsForBreakableRuns);
|
|
6010
6010
|
if (!h) {
|
|
6011
|
-
Y(
|
|
6011
|
+
Y(q, T, V);
|
|
6012
6012
|
continue;
|
|
6013
6013
|
}
|
|
6014
|
-
s +
|
|
6014
|
+
s + V > A + w ? (M(), Y(q, T, V)) : (s += V, t = q, K = T + 1);
|
|
6015
6015
|
}
|
|
6016
|
-
h && t ===
|
|
6016
|
+
h && t === q && K === sA.length && (t = q + 1, K = 0);
|
|
6017
6017
|
}
|
|
6018
6018
|
let n = 0;
|
|
6019
6019
|
for (; n < C.length; ) {
|
|
6020
|
-
const
|
|
6020
|
+
const q = C[n], P = g[n];
|
|
6021
6021
|
if (!h) {
|
|
6022
|
-
|
|
6022
|
+
q > A && Q[n] !== null ? r(n) : e(n, q), l(n, q), n++;
|
|
6023
6023
|
continue;
|
|
6024
6024
|
}
|
|
6025
|
-
if (s +
|
|
6025
|
+
if (s + q > A + w) {
|
|
6026
6026
|
if (gg(P)) {
|
|
6027
|
-
j(n,
|
|
6027
|
+
j(n, q), M(n + 1, 0, s - q), n++;
|
|
6028
6028
|
continue;
|
|
6029
6029
|
}
|
|
6030
6030
|
if (S >= 0) {
|
|
6031
6031
|
M(S, 0, y);
|
|
6032
6032
|
continue;
|
|
6033
6033
|
}
|
|
6034
|
-
if (
|
|
6034
|
+
if (q > A && Q[n] !== null) {
|
|
6035
6035
|
M(), r(n), n++;
|
|
6036
6036
|
continue;
|
|
6037
6037
|
}
|
|
6038
6038
|
M();
|
|
6039
6039
|
continue;
|
|
6040
6040
|
}
|
|
6041
|
-
j(n,
|
|
6041
|
+
j(n, q), l(n, q), n++;
|
|
6042
6042
|
}
|
|
6043
6043
|
return h && M(), o;
|
|
6044
6044
|
}
|
|
@@ -6053,115 +6053,115 @@ function yE(B, A, I) {
|
|
|
6053
6053
|
function v() {
|
|
6054
6054
|
Y = -1, j = 0, l = 0, r = null;
|
|
6055
6055
|
}
|
|
6056
|
-
function n(
|
|
6056
|
+
function n(d = M, p = e, U = K) {
|
|
6057
6057
|
t++, I == null || I({
|
|
6058
6058
|
startSegmentIndex: y,
|
|
6059
6059
|
startGraphemeIndex: N,
|
|
6060
|
-
endSegmentIndex:
|
|
6061
|
-
endGraphemeIndex:
|
|
6062
|
-
width:
|
|
6060
|
+
endSegmentIndex: d,
|
|
6061
|
+
endGraphemeIndex: p,
|
|
6062
|
+
width: U
|
|
6063
6063
|
}), K = 0, S = !1, v();
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6066
|
-
S = !0, y =
|
|
6065
|
+
function q(d, p) {
|
|
6066
|
+
S = !0, y = d, N = 0, M = d + 1, e = 0, K = p;
|
|
6067
6067
|
}
|
|
6068
|
-
function P(
|
|
6069
|
-
S = !0, y =
|
|
6068
|
+
function P(d, p, U) {
|
|
6069
|
+
S = !0, y = d, N = p, M = d, e = p + 1, K = U;
|
|
6070
6070
|
}
|
|
6071
|
-
function
|
|
6071
|
+
function sA(d, p) {
|
|
6072
6072
|
if (!S) {
|
|
6073
|
-
|
|
6073
|
+
q(d, p);
|
|
6074
6074
|
return;
|
|
6075
6075
|
}
|
|
6076
|
-
K +=
|
|
6076
|
+
K += p, M = d + 1, e = 0;
|
|
6077
6077
|
}
|
|
6078
|
-
function EA(
|
|
6079
|
-
if (!gg(E[
|
|
6078
|
+
function EA(d, p) {
|
|
6079
|
+
if (!gg(E[d]))
|
|
6080
6080
|
return;
|
|
6081
|
-
const
|
|
6082
|
-
Y =
|
|
6081
|
+
const U = E[d] === "tab" ? 0 : g[d], _ = E[d] === "tab" ? p : Q[d];
|
|
6082
|
+
Y = d + 1, j = K - p + U, l = K - p + _, r = E[d];
|
|
6083
6083
|
}
|
|
6084
|
-
function
|
|
6085
|
-
|
|
6084
|
+
function T(d) {
|
|
6085
|
+
V(d, 0);
|
|
6086
6086
|
}
|
|
6087
|
-
function
|
|
6088
|
-
const
|
|
6089
|
-
for (let
|
|
6090
|
-
const
|
|
6087
|
+
function V(d, p) {
|
|
6088
|
+
const U = i[d], _ = w[d] ?? null;
|
|
6089
|
+
for (let f = p; f < U.length; f++) {
|
|
6090
|
+
const $ = fQ(U, _, f, a.preferPrefixWidthsForBreakableRuns);
|
|
6091
6091
|
if (!S) {
|
|
6092
|
-
P(
|
|
6092
|
+
P(d, f, $);
|
|
6093
6093
|
continue;
|
|
6094
6094
|
}
|
|
6095
|
-
K +
|
|
6095
|
+
K + $ > A + G ? (n(), P(d, f, $)) : (K += $, M = d, e = f + 1);
|
|
6096
6096
|
}
|
|
6097
|
-
S && M ===
|
|
6097
|
+
S && M === d && e === U.length && (M = d + 1, e = 0);
|
|
6098
6098
|
}
|
|
6099
|
-
function IA(
|
|
6099
|
+
function IA(d) {
|
|
6100
6100
|
if (r !== "soft-hyphen")
|
|
6101
6101
|
return !1;
|
|
6102
|
-
const
|
|
6103
|
-
if (
|
|
6102
|
+
const p = i[d];
|
|
6103
|
+
if (p === null)
|
|
6104
6104
|
return !1;
|
|
6105
|
-
const
|
|
6106
|
-
return
|
|
6105
|
+
const U = a.preferPrefixWidthsForBreakableRuns ? w[d] ?? p : p, _ = U !== p, { fitCount: f, fittedWidth: $ } = KE(U, K, A, G, o, _);
|
|
6106
|
+
return f === 0 ? !1 : (K = $, M = d, e = f, v(), f === p.length ? (M = d + 1, e = 0, !0) : (n(d, f, $ + o), V(d, f), !0));
|
|
6107
6107
|
}
|
|
6108
|
-
function
|
|
6108
|
+
function x(d) {
|
|
6109
6109
|
t++, I == null || I({
|
|
6110
|
-
startSegmentIndex:
|
|
6110
|
+
startSegmentIndex: d.startSegmentIndex,
|
|
6111
6111
|
startGraphemeIndex: 0,
|
|
6112
|
-
endSegmentIndex:
|
|
6112
|
+
endSegmentIndex: d.consumedEndSegmentIndex,
|
|
6113
6113
|
endGraphemeIndex: 0,
|
|
6114
6114
|
width: 0
|
|
6115
6115
|
}), v();
|
|
6116
6116
|
}
|
|
6117
|
-
for (let
|
|
6118
|
-
const
|
|
6119
|
-
if (
|
|
6120
|
-
|
|
6117
|
+
for (let d = 0; d < h.length; d++) {
|
|
6118
|
+
const p = h[d];
|
|
6119
|
+
if (p.startSegmentIndex === p.endSegmentIndex) {
|
|
6120
|
+
x(p);
|
|
6121
6121
|
continue;
|
|
6122
6122
|
}
|
|
6123
|
-
S = !1, K = 0, y =
|
|
6124
|
-
let
|
|
6125
|
-
for (;
|
|
6126
|
-
const
|
|
6127
|
-
if (
|
|
6128
|
-
S && (M =
|
|
6123
|
+
S = !1, K = 0, y = p.startSegmentIndex, N = 0, M = p.startSegmentIndex, e = 0, v();
|
|
6124
|
+
let U = p.startSegmentIndex;
|
|
6125
|
+
for (; U < p.endSegmentIndex; ) {
|
|
6126
|
+
const _ = E[U], f = _ === "tab" ? tE(K, s) : C[U];
|
|
6127
|
+
if (_ === "soft-hyphen") {
|
|
6128
|
+
S && (M = U + 1, e = 0, Y = U + 1, j = K + o, l = K + o, r = _), U++;
|
|
6129
6129
|
continue;
|
|
6130
6130
|
}
|
|
6131
6131
|
if (!S) {
|
|
6132
|
-
|
|
6132
|
+
f > A && i[U] !== null ? T(U) : q(U, f), EA(U, f), U++;
|
|
6133
6133
|
continue;
|
|
6134
6134
|
}
|
|
6135
|
-
if (K +
|
|
6136
|
-
const
|
|
6135
|
+
if (K + f > A + G) {
|
|
6136
|
+
const hA = K + (_ === "tab" ? 0 : g[U]), KA = K + (_ === "tab" ? f : Q[U]);
|
|
6137
6137
|
if (r === "soft-hyphen" && a.preferEarlySoftHyphenBreak && j <= A + G) {
|
|
6138
6138
|
n(Y, 0, l);
|
|
6139
6139
|
continue;
|
|
6140
6140
|
}
|
|
6141
|
-
if (r === "soft-hyphen" && IA(
|
|
6142
|
-
|
|
6141
|
+
if (r === "soft-hyphen" && IA(U)) {
|
|
6142
|
+
U++;
|
|
6143
6143
|
continue;
|
|
6144
6144
|
}
|
|
6145
|
-
if (gg(
|
|
6146
|
-
|
|
6145
|
+
if (gg(_) && hA <= A + G) {
|
|
6146
|
+
sA(U, f), n(U + 1, 0, KA), U++;
|
|
6147
6147
|
continue;
|
|
6148
6148
|
}
|
|
6149
6149
|
if (Y >= 0 && j <= A + G) {
|
|
6150
6150
|
n(Y, 0, l);
|
|
6151
6151
|
continue;
|
|
6152
6152
|
}
|
|
6153
|
-
if (
|
|
6154
|
-
n(),
|
|
6153
|
+
if (f > A && i[U] !== null) {
|
|
6154
|
+
n(), T(U), U++;
|
|
6155
6155
|
continue;
|
|
6156
6156
|
}
|
|
6157
6157
|
n();
|
|
6158
6158
|
continue;
|
|
6159
6159
|
}
|
|
6160
|
-
|
|
6160
|
+
sA(U, f), EA(U, f), U++;
|
|
6161
6161
|
}
|
|
6162
6162
|
if (S) {
|
|
6163
|
-
const
|
|
6164
|
-
n(
|
|
6163
|
+
const _ = Y === p.consumedEndSegmentIndex ? l : K;
|
|
6164
|
+
n(p.consumedEndSegmentIndex, 0, _);
|
|
6165
6165
|
}
|
|
6166
6166
|
}
|
|
6167
6167
|
return t;
|
|
@@ -6193,53 +6193,53 @@ function NE(B, A, I) {
|
|
|
6193
6193
|
const s = [], h = [], a = [], G = [];
|
|
6194
6194
|
let t = B.chunks.length <= 1;
|
|
6195
6195
|
const K = [], S = [], y = [], N = I ? [] : null, M = Array.from({ length: B.len }), e = Array.from({ length: B.len });
|
|
6196
|
-
function Y(r, v, n,
|
|
6197
|
-
P !== "text" && P !== "space" && P !== "zero-width-break" && (t = !1), s.push(v), h.push(n), a.push(
|
|
6196
|
+
function Y(r, v, n, q, P, sA, EA, T) {
|
|
6197
|
+
P !== "text" && P !== "space" && P !== "zero-width-break" && (t = !1), s.push(v), h.push(n), a.push(q), G.push(P), K == null || K.push(sA), S.push(EA), y.push(T), N !== null && N.push(r);
|
|
6198
6198
|
}
|
|
6199
6199
|
for (let r = 0; r < B.len; r++) {
|
|
6200
6200
|
M[r] = s.length;
|
|
6201
|
-
const v = B.texts[r], n = B.isWordLike[r],
|
|
6202
|
-
if (
|
|
6203
|
-
Y(v, 0, i, i,
|
|
6201
|
+
const v = B.texts[r], n = B.isWordLike[r], q = B.kinds[r], P = B.starts[r];
|
|
6202
|
+
if (q === "soft-hyphen") {
|
|
6203
|
+
Y(v, 0, i, i, q, P, null, null), e[r] = s.length;
|
|
6204
6204
|
continue;
|
|
6205
6205
|
}
|
|
6206
|
-
if (
|
|
6207
|
-
Y(v, 0, 0, 0,
|
|
6206
|
+
if (q === "hard-break") {
|
|
6207
|
+
Y(v, 0, 0, 0, q, P, null, null), e[r] = s.length;
|
|
6208
6208
|
continue;
|
|
6209
6209
|
}
|
|
6210
|
-
if (
|
|
6211
|
-
Y(v, 0, 0, 0,
|
|
6210
|
+
if (q === "tab") {
|
|
6211
|
+
Y(v, 0, 0, 0, q, P, null, null), e[r] = s.length;
|
|
6212
6212
|
continue;
|
|
6213
6213
|
}
|
|
6214
|
-
const
|
|
6215
|
-
if (
|
|
6216
|
-
let IA = "",
|
|
6217
|
-
for (const
|
|
6218
|
-
const
|
|
6214
|
+
const sA = aI(v, Q);
|
|
6215
|
+
if (q === "text" && sA.containsCJK) {
|
|
6216
|
+
let IA = "", x = 0;
|
|
6217
|
+
for (const d of C.segment(v)) {
|
|
6218
|
+
const p = d.segment;
|
|
6219
6219
|
if (IA.length === 0) {
|
|
6220
|
-
IA =
|
|
6220
|
+
IA = p, x = d.index;
|
|
6221
6221
|
continue;
|
|
6222
6222
|
}
|
|
6223
|
-
if (Gg.has(IA) || pQ.has(
|
|
6224
|
-
IA +=
|
|
6223
|
+
if (Gg.has(IA) || pQ.has(p) || OI.has(p) || g.carryCJKAfterClosingQuote && KI(p) && HQ(IA)) {
|
|
6224
|
+
IA += p;
|
|
6225
6225
|
continue;
|
|
6226
6226
|
}
|
|
6227
|
-
const
|
|
6228
|
-
Y(IA,
|
|
6227
|
+
const U = aI(IA, Q), _ = GI(IA, U, E);
|
|
6228
|
+
Y(IA, _, _, _, "text", P + x, null, null), IA = p, x = d.index;
|
|
6229
6229
|
}
|
|
6230
6230
|
if (IA.length > 0) {
|
|
6231
|
-
const
|
|
6232
|
-
Y(IA,
|
|
6231
|
+
const d = aI(IA, Q), p = GI(IA, d, E);
|
|
6232
|
+
Y(IA, p, p, p, "text", P + x, null, null);
|
|
6233
6233
|
}
|
|
6234
6234
|
e[r] = s.length;
|
|
6235
6235
|
continue;
|
|
6236
6236
|
}
|
|
6237
|
-
const EA = GI(v,
|
|
6237
|
+
const EA = GI(v, sA, E), T = q === "space" || q === "preserved-space" || q === "zero-width-break" ? 0 : EA, V = q === "space" || q === "zero-width-break" ? 0 : EA;
|
|
6238
6238
|
if (n && v.length > 1) {
|
|
6239
|
-
const IA = hE(v,
|
|
6240
|
-
Y(v, EA,
|
|
6239
|
+
const IA = hE(v, sA, Q, E), x = g.preferPrefixWidthsForBreakableRuns ? aE(v, sA, Q, E) : null;
|
|
6240
|
+
Y(v, EA, T, V, q, P, IA, x);
|
|
6241
6241
|
} else
|
|
6242
|
-
Y(v, EA,
|
|
6242
|
+
Y(v, EA, T, V, q, P, null, null);
|
|
6243
6243
|
e[r] = s.length;
|
|
6244
6244
|
}
|
|
6245
6245
|
const j = FE(B.chunks, M, e), l = K === null ? null : NB(B.normalized, K);
|
|
@@ -6485,57 +6485,57 @@ const TQ = (B) => B, YE = (B) => B > 0 ? 1 : 0, lE = (B) => B < 1 ? 0 : 1, vC =
|
|
|
6485
6485
|
};
|
|
6486
6486
|
class Ei {
|
|
6487
6487
|
constructor() {
|
|
6488
|
-
|
|
6489
|
-
|
|
6488
|
+
tA(this, "artboard", null);
|
|
6489
|
+
tA(this, "objectStates", /* @__PURE__ */ new Map());
|
|
6490
6490
|
// Physics State
|
|
6491
|
-
|
|
6491
|
+
tA(this, "physicsEngine", null);
|
|
6492
6492
|
// State Machine State
|
|
6493
|
-
|
|
6494
|
-
|
|
6493
|
+
tA(this, "activeStateMachine", null);
|
|
6494
|
+
tA(this, "inputs", /* @__PURE__ */ new Map());
|
|
6495
6495
|
// id -> value
|
|
6496
|
-
|
|
6496
|
+
tA(this, "inputNameMap", /* @__PURE__ */ new Map());
|
|
6497
6497
|
// name -> id[] mapping
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6498
|
+
tA(this, "layerStates", /* @__PURE__ */ new Map());
|
|
6499
|
+
tA(this, "pretextCache", /* @__PURE__ */ new Map());
|
|
6500
|
+
tA(this, "pointerHistory", []);
|
|
6501
|
+
tA(this, "MAX_HISTORY", 200);
|
|
6502
|
+
tA(this, "imageCache", /* @__PURE__ */ new Map());
|
|
6503
|
+
tA(this, "lastValidSvgImgMap", /* @__PURE__ */ new Map());
|
|
6504
|
+
tA(this, "maskBuffer", null);
|
|
6505
|
+
tA(this, "maskCtx", null);
|
|
6506
|
+
tA(this, "lumaBuffer", null);
|
|
6507
|
+
tA(this, "lumaCtx", null);
|
|
6508
|
+
tA(this, "layout", { fit: "Contain", alignment: "Center" });
|
|
6509
|
+
tA(this, "onTrigger");
|
|
6510
|
+
tA(this, "onInputUpdate");
|
|
6511
|
+
tA(this, "onComponentChange");
|
|
6512
6512
|
// Specific Component Listeners
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6513
|
+
tA(this, "onToggle");
|
|
6514
|
+
tA(this, "onInputChange");
|
|
6515
|
+
tA(this, "onInputFocus");
|
|
6516
|
+
tA(this, "onInputBlur");
|
|
6517
|
+
tA(this, "onLog");
|
|
6518
6518
|
// Track triggers that were just fired in the current frame
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6519
|
+
tA(this, "justFiredTriggers", /* @__PURE__ */ new Set());
|
|
6520
|
+
tA(this, "rootTransform", null);
|
|
6521
|
+
tA(this, "canvasWidth", 0);
|
|
6522
|
+
tA(this, "canvasHeight", 0);
|
|
6523
6523
|
// Track currently hovered object for Enter/Leave events
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6524
|
+
tA(this, "lastHoveredObjectId", null);
|
|
6525
|
+
tA(this, "_lastPointerPos", null);
|
|
6526
|
+
tA(this, "_prevPointerPos", null);
|
|
6527
6527
|
// Interaction State
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6528
|
+
tA(this, "focusedId", null);
|
|
6529
|
+
tA(this, "draggingSliderId", null);
|
|
6530
|
+
tA(this, "activeDropdownId", null);
|
|
6531
|
+
tA(this, "draggingListViewId", null);
|
|
6532
|
+
tA(this, "scrollOffset", { x: 0, y: 0 });
|
|
6533
|
+
tA(this, "draggingBehaviors", /* @__PURE__ */ new Set());
|
|
6534
6534
|
// Physics/Animation State
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6535
|
+
tA(this, "objectVelocities", /* @__PURE__ */ new Map());
|
|
6536
|
+
tA(this, "currentTime", 0);
|
|
6537
|
+
tA(this, "frameCount", 0);
|
|
6538
|
+
tA(this, "fontLeadingFactors", {
|
|
6539
6539
|
Inter: 0.35,
|
|
6540
6540
|
Roboto: 0.45,
|
|
6541
6541
|
Montserrat: 0.4,
|
|
@@ -6546,8 +6546,8 @@ class Ei {
|
|
|
6546
6546
|
Lora: 0.4
|
|
6547
6547
|
});
|
|
6548
6548
|
// Trigger Management
|
|
6549
|
-
|
|
6550
|
-
console.info("%c[ExodeUI Engine] Pixel-Perfect Parity Active (v6.0.
|
|
6549
|
+
tA(this, "activeTriggers", /* @__PURE__ */ new Map());
|
|
6550
|
+
console.info("%c[ExodeUI Engine] Pixel-Perfect Parity Active (v6.0.24) - SVG Fill & Gradient Parity Active", "color: #3b82f6; font-weight: bold; padding: 2px 4px; border-radius: 4px; background: rgba(59, 130, 246, 0.1)");
|
|
6551
6551
|
}
|
|
6552
6552
|
setTriggerCallback(A) {
|
|
6553
6553
|
this.onTrigger = A;
|
|
@@ -7203,20 +7203,20 @@ class Ei {
|
|
|
7203
7203
|
g && g.type === "Component" && g.variant === "listview" && this.updateListViewHoverFromPointer(g, I, C), i !== this.lastHoveredObjectId && (console.log(`[Engine] HOVER CHANGE: ${this.lastHoveredObjectId} -> ${i}`), this.lastHoveredObjectId && this.fireEventForObject(this.lastHoveredObjectId, "onPointerLeave"), i && this.fireEventForObject(i, "onPointerEnter"), this.lastHoveredObjectId = i);
|
|
7204
7204
|
return;
|
|
7205
7205
|
}
|
|
7206
|
-
if ((A === "up" || A === "blur") && (this.draggingSliderId = null, this.draggingListViewId = null, this.draggingBehaviors.clear()), A === "down" && g && ((w = g.behaviors) != null && w.some((G) => G.type ===
|
|
7206
|
+
if ((A === "up" || A === "blur") && (this.draggingSliderId = null, this.draggingListViewId = null, this.draggingBehaviors.clear()), A === "down" && g && ((w = g.behaviors) != null && w.some((G) => G.type === Z.Draggable)) && this.draggingBehaviors.add(i), this.activeDropdownId && A === "down") {
|
|
7207
7207
|
const G = this.artboard.objects.find((t) => t.id === this.activeDropdownId);
|
|
7208
7208
|
if (G && (G.type === "Dropdown" || G.variant === "dropdown")) {
|
|
7209
|
-
const t = this.objectStates.get(G.id), K = (t == null ? void 0 : t.options) || G.options || {}, S = G.geometry || {}, y = S.width ?? G.width ?? 200, N = S.height ?? G.height ?? 40, M = K.optionsList || [], e = K.itemHeight || 32, Y = K.listPadding ?? 4, j = M.length * e + Y * 2, l = this.getWorldTransform(G.id), r = y * Math.abs(l.scaleX), v = N * Math.abs(l.scaleY), n = l.y + v / 2 + 4,
|
|
7210
|
-
if (
|
|
7211
|
-
const
|
|
7212
|
-
if (
|
|
7213
|
-
const
|
|
7214
|
-
K.selectedOption =
|
|
7209
|
+
const t = this.objectStates.get(G.id), K = (t == null ? void 0 : t.options) || G.options || {}, S = G.geometry || {}, y = S.width ?? G.width ?? 200, N = S.height ?? G.height ?? 40, M = K.optionsList || [], e = K.itemHeight || 32, Y = K.listPadding ?? 4, j = M.length * e + Y * 2, l = this.getWorldTransform(G.id), r = y * Math.abs(l.scaleX), v = N * Math.abs(l.scaleY), n = l.y + v / 2 + 4, q = Math.abs(I - l.x) <= r / 2, P = C >= n && C <= n + j * Math.abs(l.scaleY);
|
|
7210
|
+
if (q && P) {
|
|
7211
|
+
const sA = Math.abs(l.scaleY), EA = C - (n + Y * sA), T = Math.floor(EA / (e * sA));
|
|
7212
|
+
if (T >= 0 && T < M.length) {
|
|
7213
|
+
const V = M[T];
|
|
7214
|
+
K.selectedOption = V, K.isOpen = !1, this.activeDropdownId = null, G.inputId && this.setInternalInput(G.inputId, V), this.onComponentChange && this.onComponentChange({
|
|
7215
7215
|
objectId: G.id,
|
|
7216
7216
|
componentName: G.name,
|
|
7217
7217
|
variant: "dropdown",
|
|
7218
7218
|
property: "selectedOption",
|
|
7219
|
-
value:
|
|
7219
|
+
value: V
|
|
7220
7220
|
});
|
|
7221
7221
|
}
|
|
7222
7222
|
return;
|
|
@@ -7612,32 +7612,32 @@ class Ei {
|
|
|
7612
7612
|
return 0.5;
|
|
7613
7613
|
}
|
|
7614
7614
|
renderObject(A, I, C) {
|
|
7615
|
-
var
|
|
7615
|
+
var x, d, p, U, _, f, $, hA, KA, FA, NA;
|
|
7616
7616
|
const g = this.objectStates.get(I.id);
|
|
7617
7617
|
if (!g) {
|
|
7618
7618
|
console.warn("No state for object:", I.id);
|
|
7619
7619
|
return;
|
|
7620
7620
|
}
|
|
7621
|
-
A.roundRect || (A.roundRect = (
|
|
7621
|
+
A.roundRect || (A.roundRect = (u, O, L, R, m) => (this.drawRoundRect(A, u, O, L, R, m), A));
|
|
7622
7622
|
const Q = g.geometry ? this.deepMerge(I.geometry, g.geometry) : I.geometry, E = g.style ? this.deepMerge(I.style, g.style) : I.style;
|
|
7623
|
-
let i = (Q == null ? void 0 : Q.width) || ((
|
|
7623
|
+
let i = (Q == null ? void 0 : Q.width) || ((x = I.geometry) == null ? void 0 : x.width) || I.width || 0, w = (Q == null ? void 0 : Q.height) || ((d = I.geometry) == null ? void 0 : d.height) || I.height || 0;
|
|
7624
7624
|
if ((i === 0 || w === 0) && (Q != null && Q.points) && Array.isArray(Q.points) && Q.points.length > 0) {
|
|
7625
|
-
let
|
|
7626
|
-
Q.points.forEach((
|
|
7627
|
-
|
|
7628
|
-
}), i === 0 && (i =
|
|
7629
|
-
}
|
|
7630
|
-
const o = (
|
|
7631
|
-
if (
|
|
7632
|
-
return
|
|
7625
|
+
let u = 1 / 0, O = -1 / 0, L = 1 / 0, R = -1 / 0;
|
|
7626
|
+
Q.points.forEach((m) => {
|
|
7627
|
+
u = Math.min(u, m.x), O = Math.max(O, m.x), L = Math.min(L, m.y), R = Math.max(R, m.y);
|
|
7628
|
+
}), i === 0 && (i = O - u), w === 0 && (w = R - L);
|
|
7629
|
+
}
|
|
7630
|
+
const o = (u) => {
|
|
7631
|
+
if (u)
|
|
7632
|
+
return u.corner_radius ?? u.cornerRadius;
|
|
7633
7633
|
}, s = o(g) ?? o(E) ?? o(Q) ?? o(I.style) ?? o(I.geometry) ?? 0, h = { ...Q, width: i, height: w };
|
|
7634
7634
|
if (delete h.cornerRadius, h.corner_radius = s, g.visible === !1)
|
|
7635
7635
|
return;
|
|
7636
7636
|
const a = g.x, G = g.y;
|
|
7637
7637
|
A.save();
|
|
7638
|
-
const t = [], K = E.blur || ((
|
|
7638
|
+
const t = [], K = E.blur || ((p = I.style) == null ? void 0 : p.blur);
|
|
7639
7639
|
K && K.amount > 0 && t.push(`blur(${K.amount}px)`);
|
|
7640
|
-
const S = ((
|
|
7640
|
+
const S = ((U = Q == null ? void 0 : Q.type) == null ? void 0 : U.toLowerCase().includes("image")) || ((_ = I.type) == null ? void 0 : _.toLowerCase().includes("image")), y = E.adjustments && Object.keys(E.adjustments).length > 0 ? E.adjustments : null, N = Q != null && Q.adjustments && Object.keys(Q.adjustments).length > 0 ? Q.adjustments : null, M = S ? N || y : y || N, e = S && !M ? {
|
|
7641
7641
|
exposure: 0,
|
|
7642
7642
|
contrast: 0,
|
|
7643
7643
|
saturation: 100,
|
|
@@ -7650,46 +7650,46 @@ class Ei {
|
|
|
7650
7650
|
hue: 0
|
|
7651
7651
|
} : M;
|
|
7652
7652
|
if (g && e && (g.geometry = g.geometry || {}, g.geometry.adjustments = { ...e }), e) {
|
|
7653
|
-
const
|
|
7654
|
-
let gA = "",
|
|
7655
|
-
if (
|
|
7656
|
-
<feComponentTransfer in="${
|
|
7657
|
-
<feFuncR type="linear" slope="1" intercept="${
|
|
7658
|
-
<feFuncG type="linear" slope="1" intercept="${
|
|
7659
|
-
<feFuncB type="linear" slope="1" intercept="${
|
|
7660
|
-
</feComponentTransfer>`,
|
|
7661
|
-
const CA = (
|
|
7653
|
+
const u = (e.exposure || 0) / 100, O = e.contrast || 0, L = 1 + (e.saturation || 0) / 100, R = (e.temperature || 0) / 200, m = (e.tint || 0) / 200, W = (e.highlights || 0) / 500, GA = (e.shadows || 0) / 500;
|
|
7654
|
+
let gA = "", DA = "SourceGraphic";
|
|
7655
|
+
if (u !== 0 && (gA += `
|
|
7656
|
+
<feComponentTransfer in="${DA}" result="exposure">
|
|
7657
|
+
<feFuncR type="linear" slope="1" intercept="${u}"/>
|
|
7658
|
+
<feFuncG type="linear" slope="1" intercept="${u}"/>
|
|
7659
|
+
<feFuncB type="linear" slope="1" intercept="${u}"/>
|
|
7660
|
+
</feComponentTransfer>`, DA = "exposure"), O !== 0) {
|
|
7661
|
+
const CA = (O + 100) / 100, F = 0.5 * (1 - CA);
|
|
7662
7662
|
gA += `
|
|
7663
|
-
<feComponentTransfer in="${
|
|
7663
|
+
<feComponentTransfer in="${DA}" result="contrast">
|
|
7664
7664
|
<feFuncR type="linear" slope="${CA}" intercept="${F}"/>
|
|
7665
7665
|
<feFuncG type="linear" slope="${CA}" intercept="${F}"/>
|
|
7666
7666
|
<feFuncB type="linear" slope="${CA}" intercept="${F}"/>
|
|
7667
|
-
</feComponentTransfer>`,
|
|
7667
|
+
</feComponentTransfer>`, DA = "contrast";
|
|
7668
7668
|
}
|
|
7669
|
-
if (
|
|
7669
|
+
if (L !== 1 && (gA += `<feColorMatrix in="${DA}" type="saturate" values="${L}" result="saturate"/>`, DA = "saturate"), e.hue && (gA += `<feColorMatrix in="${DA}" type="hueRotate" values="${e.hue}" result="hue"/>`, DA = "hue"), e.negative) {
|
|
7670
7670
|
const CA = 1 - e.negative / 50;
|
|
7671
7671
|
gA += `
|
|
7672
|
-
<feColorMatrix in="${
|
|
7672
|
+
<feColorMatrix in="${DA}" type="matrix" result="invert"
|
|
7673
7673
|
values="${CA} 0 0 0 ${1 - CA}
|
|
7674
7674
|
0 ${CA} 0 0 ${1 - CA}
|
|
7675
7675
|
0 0 ${CA} 0 ${1 - CA}
|
|
7676
|
-
0 0 0 1 0"/>`,
|
|
7676
|
+
0 0 0 1 0"/>`, DA = "invert";
|
|
7677
7677
|
}
|
|
7678
|
-
if (
|
|
7679
|
-
const CA = 1 +
|
|
7678
|
+
if (R !== 0 || m !== 0 || W !== 0 || GA !== 0) {
|
|
7679
|
+
const CA = 1 + W + GA, F = CA * (1 + R - m / 2), b = CA * (1 + m), H = CA * (1 - R - m / 2), iA = e.shadows * 0.1 / 255, RA = [
|
|
7680
7680
|
F,
|
|
7681
7681
|
0,
|
|
7682
7682
|
0,
|
|
7683
7683
|
0,
|
|
7684
7684
|
iA,
|
|
7685
7685
|
0,
|
|
7686
|
-
|
|
7686
|
+
b,
|
|
7687
7687
|
0,
|
|
7688
7688
|
0,
|
|
7689
7689
|
iA,
|
|
7690
7690
|
0,
|
|
7691
7691
|
0,
|
|
7692
|
-
|
|
7692
|
+
H,
|
|
7693
7693
|
0,
|
|
7694
7694
|
iA,
|
|
7695
7695
|
0,
|
|
@@ -7698,9 +7698,9 @@ class Ei {
|
|
|
7698
7698
|
1,
|
|
7699
7699
|
0
|
|
7700
7700
|
].join(" ");
|
|
7701
|
-
gA += `<feColorMatrix in="${
|
|
7701
|
+
gA += `<feColorMatrix in="${DA}" type="matrix" values="${RA}" result="advanced"/>`, DA = "advanced";
|
|
7702
7702
|
}
|
|
7703
|
-
if (e.blur && (gA += `<feGaussianBlur in="${
|
|
7703
|
+
if (e.blur && (gA += `<feGaussianBlur in="${DA}" stdDeviation="${e.blur}" result="blur"/>`, DA = "blur"), gA) {
|
|
7704
7704
|
const CA = `<svg xmlns="http://www.w3.org/2000/svg"><filter id="f" color-interpolation-filters="sRGB">${gA}</filter></svg>`, F = btoa(CA);
|
|
7705
7705
|
t.push(`url('data:image/svg+xml;base64,${F}#f')`);
|
|
7706
7706
|
}
|
|
@@ -7710,7 +7710,7 @@ class Ei {
|
|
|
7710
7710
|
A.globalAlpha = Y * j;
|
|
7711
7711
|
const l = g.compositeOperation || g.blendMode;
|
|
7712
7712
|
if (l && l !== "Normal") {
|
|
7713
|
-
const
|
|
7713
|
+
const u = l.toLowerCase();
|
|
7714
7714
|
[
|
|
7715
7715
|
"multiply",
|
|
7716
7716
|
"screen",
|
|
@@ -7740,7 +7740,7 @@ class Ei {
|
|
|
7740
7740
|
"xor",
|
|
7741
7741
|
"multiply",
|
|
7742
7742
|
"screen"
|
|
7743
|
-
].includes(
|
|
7743
|
+
].includes(u) && (A.globalCompositeOperation = u);
|
|
7744
7744
|
}
|
|
7745
7745
|
const r = A, v = g.masks || (I.maskedBy ? [{
|
|
7746
7746
|
maskId: I.maskedBy,
|
|
@@ -7751,258 +7751,259 @@ class Ei {
|
|
|
7751
7751
|
isVisible: !0
|
|
7752
7752
|
}] : []);
|
|
7753
7753
|
let n = !1;
|
|
7754
|
-
const
|
|
7755
|
-
if (
|
|
7756
|
-
const
|
|
7757
|
-
|
|
7754
|
+
const q = v.filter((u) => u.isVisible !== !1 && C.has(u.maskId));
|
|
7755
|
+
if (q.length > 0) {
|
|
7756
|
+
const u = q[0], O = C.get(u.maskId), L = this.objectStates.get(O.id);
|
|
7757
|
+
L && L.visible !== !1 && (n = !0, (!this.maskBuffer || this.maskBuffer.width !== this.canvasWidth || this.maskBuffer.height !== this.canvasHeight) && (this.maskBuffer = document.createElement("canvas"), this.maskBuffer.width = this.canvasWidth, this.maskBuffer.height = this.canvasHeight, this.maskCtx = this.maskBuffer.getContext("2d", { willReadFrequently: !0 }), this.maskCtx && (this.maskCtx.imageSmoothingEnabled = !0, this.maskCtx.imageSmoothingQuality = "high")), this.maskCtx.clearRect(0, 0, this.maskBuffer.width, this.maskBuffer.height), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), I.parentId && this.applyAbsoluteTransform(this.maskCtx, I.parentId, C), this.maskCtx.save(), this.maskCtx.globalAlpha = 1, A = this.maskCtx, A.filter = r.filter);
|
|
7758
7758
|
}
|
|
7759
7759
|
A.translate(Math.round(a), Math.round(G)), A.rotate(g.rotation * Math.PI / 180);
|
|
7760
|
-
const P = g.skew_x || 0,
|
|
7761
|
-
(P !== 0 ||
|
|
7760
|
+
const P = g.skew_x || 0, sA = g.skew_y || 0;
|
|
7761
|
+
(P !== 0 || sA !== 0) && A.transform(1, Math.tan(sA * Math.PI / 180), Math.tan(P * Math.PI / 180), 1, 0, 0), A.scale(
|
|
7762
7762
|
(g.scale_x ?? 1) * (g.flip_x === !0 ? -1 : 1),
|
|
7763
7763
|
(g.scale_y ?? 1) * (g.flip_y === !0 ? -1 : 1)
|
|
7764
7764
|
);
|
|
7765
7765
|
const EA = E.shadow;
|
|
7766
7766
|
if (EA && EA.isEnabled !== !1) {
|
|
7767
|
-
let
|
|
7768
|
-
(
|
|
7769
|
-
const
|
|
7770
|
-
let
|
|
7771
|
-
if (
|
|
7772
|
-
const
|
|
7773
|
-
|
|
7774
|
-
} else if (
|
|
7775
|
-
const
|
|
7776
|
-
if (
|
|
7777
|
-
const
|
|
7778
|
-
|
|
7767
|
+
let u = EA.color || "#000000";
|
|
7768
|
+
($ = (f = this.artboard) == null ? void 0 : f.tokens) != null && $.colors && this.artboard.tokens.colors[u] && (u = this.artboard.tokens.colors[u]);
|
|
7769
|
+
const O = this.normalizeOpacity(EA.opacity ?? 100), L = EA.spread || 0, m = (EA.blur || 0) + L * 1.5;
|
|
7770
|
+
let W = u;
|
|
7771
|
+
if (u.startsWith("#")) {
|
|
7772
|
+
const DA = u.replace("#", ""), kA = parseInt(DA.substring(0, 2), 16), CA = parseInt(DA.substring(2, 4), 16), F = parseInt(DA.substring(4, 6), 16);
|
|
7773
|
+
W = `rgba(${kA}, ${CA}, ${F}, ${O})`;
|
|
7774
|
+
} else if (u.startsWith("rgba")) {
|
|
7775
|
+
const DA = u.match(/[\d.]+/g);
|
|
7776
|
+
if (DA && DA.length >= 4) {
|
|
7777
|
+
const kA = DA[0], CA = DA[1], F = DA[2], b = DA[3];
|
|
7778
|
+
W = `rgba(${kA}, ${CA}, ${F}, ${parseFloat(b) * O})`;
|
|
7779
7779
|
}
|
|
7780
7780
|
}
|
|
7781
|
-
|
|
7781
|
+
const GA = A.getTransform(), gA = Math.sqrt(GA.a * GA.a + GA.b * GA.b) || 1;
|
|
7782
|
+
A.shadowColor = W, A.shadowBlur = m * gA, A.shadowOffsetX = (EA.offsetX || 0) * gA, A.shadowOffsetY = (EA.offsetY || 0) * gA;
|
|
7782
7783
|
}
|
|
7783
|
-
const
|
|
7784
|
-
if (
|
|
7784
|
+
const T = I.liquidFill || ((hA = I.style) == null ? void 0 : hA.liquidFill), V = I.artEffect || ((KA = I.style) == null ? void 0 : KA.artEffect);
|
|
7785
|
+
if (T && T.enabled) {
|
|
7785
7786
|
A.save();
|
|
7786
|
-
const
|
|
7787
|
+
const u = T.fillLevel ?? 0.5;
|
|
7787
7788
|
A.beginPath();
|
|
7788
|
-
const
|
|
7789
|
-
A.rect(-i / 2,
|
|
7789
|
+
const O = w / 2 - w * u;
|
|
7790
|
+
A.rect(-i / 2, O, i, w * u), A.clip(), A.fillStyle = T.color || "#3b82f6", A.globalAlpha = A.globalAlpha * (T.opacity ?? 1);
|
|
7790
7791
|
}
|
|
7791
|
-
const IA =
|
|
7792
|
+
const IA = V && V.enabled && V.type === "glitch";
|
|
7792
7793
|
if (IA) {
|
|
7793
7794
|
A.save();
|
|
7794
|
-
const
|
|
7795
|
-
A.shadowColor = "rgba(255, 0, 0, 0.5)", A.shadowBlur =
|
|
7795
|
+
const O = (V.intensity ?? 0.5) * 10, L = A.getTransform(), R = Math.sqrt(L.a * L.a + L.b * L.b) || 1;
|
|
7796
|
+
A.shadowColor = "rgba(255, 0, 0, 0.5)", A.shadowBlur = O * R, A.translate(O / 2, 0);
|
|
7796
7797
|
}
|
|
7797
7798
|
if (Q.type === "Text")
|
|
7798
7799
|
this._renderText(A, I, h, E, g, i, w);
|
|
7799
7800
|
else if (Q.type === "Image") {
|
|
7800
|
-
const
|
|
7801
|
-
if (
|
|
7802
|
-
let
|
|
7803
|
-
|
|
7804
|
-
},
|
|
7805
|
-
console.error(`[ExodeUI] Image load failed: ${
|
|
7806
|
-
},
|
|
7807
|
-
const
|
|
7808
|
-
if (
|
|
7801
|
+
const u = Q.src;
|
|
7802
|
+
if (u) {
|
|
7803
|
+
let O = this.imageCache.get(u);
|
|
7804
|
+
O || (O = new Image(), O.onload = () => {
|
|
7805
|
+
}, O.onerror = () => {
|
|
7806
|
+
console.error(`[ExodeUI] Image load failed: ${u.substring(0, 100)}${u.length > 100 ? "..." : ""}`);
|
|
7807
|
+
}, O.src = u, this.imageCache.set(u, O));
|
|
7808
|
+
const L = E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1, R = (((FA = E.stroke) == null ? void 0 : FA.alignment) || "center").toLowerCase();
|
|
7809
|
+
if (L && (R === "outside" || R === "center") && this.applyStrokeAlignment(A, E, h, i, w, s), E.fill && E.fill.type !== "None") {
|
|
7809
7810
|
A.save();
|
|
7810
|
-
const
|
|
7811
|
-
A.fillStyle =
|
|
7811
|
+
const m = A.globalAlpha, W = this.createCanvasFill(A, E.fill, i, w);
|
|
7812
|
+
A.fillStyle = W || E.fill.color || "transparent", A.globalAlpha = m * this.normalizeOpacity(E.fill.opacity ?? 100), s !== 0 ? (this.drawRoundRect(A, -i / 2, -w / 2, i, w, s), A.fill()) : A.fillRect(-i / 2, -w / 2, i, w), A.globalAlpha = m, A.restore();
|
|
7812
7813
|
}
|
|
7813
|
-
|
|
7814
|
+
O.complete && O.naturalWidth > 0 ? (s !== 0 ? (A.save(), this.drawRoundRect(A, -i / 2, -w / 2, i, w, s), A.clip(), A.drawImage(O, -i / 2, -w / 2, i, w), A.restore()) : A.drawImage(O, -i / 2, -w / 2, i, w), L && R === "inside" && this.applyStrokeAlignment(A, E, h, i, w, s)) : L && R === "inside" && this.applyStrokeAlignment(A, E, h, i, w, s);
|
|
7814
7815
|
}
|
|
7815
7816
|
} else if (Q.type === "SVG") {
|
|
7816
|
-
const
|
|
7817
|
-
if (
|
|
7818
|
-
const
|
|
7817
|
+
const u = Q.svgContent;
|
|
7818
|
+
if (u) {
|
|
7819
|
+
const O = E.palette || [], L = E.fill, R = E.stroke, m = L ? this.normalizeOpacity(L.opacity ?? 100) : 1, W = (L == null ? void 0 : L.type) === "Solid" && (!R || R.isEnabled === !1 || R.type === "Solid" && R.color === L.color), GA = L && L.type !== "None" ? W ? "monochrome" : L.type === "Solid" ? (L.color || "") + "|opacity:" + m : JSON.stringify(L.stops || []) + "|opacity:" + m : "", gA = R && R.isEnabled !== !1 && (R.width || 0) > 0 ? W ? [
|
|
7819
7820
|
"monochrome",
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7821
|
+
R.width || 0,
|
|
7822
|
+
R.trimStart ?? 0,
|
|
7823
|
+
R.trimEnd ?? 1,
|
|
7824
|
+
R.trimOffset ?? 0,
|
|
7825
|
+
R.dashOffset ?? 0
|
|
7825
7826
|
].join("|") : [
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
(
|
|
7827
|
+
R.width || 0,
|
|
7828
|
+
R.fill ? R.fill.type === "Solid" ? R.fill.color || "" : JSON.stringify(R.fill.stops || []) : R.color || "",
|
|
7829
|
+
R.opacity ?? 1,
|
|
7830
|
+
R.lineCap || "",
|
|
7831
|
+
R.lineJoin || "",
|
|
7832
|
+
(R.dashArray || []).join(","),
|
|
7832
7833
|
// [FIX] Include trim-path values so stroke-draw animations bust the cache
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
].join("|") : "nostroke",
|
|
7834
|
+
R.trimStart ?? 0,
|
|
7835
|
+
R.trimEnd ?? 1,
|
|
7836
|
+
R.trimOffset ?? 0,
|
|
7837
|
+
R.dashOffset ?? 0
|
|
7838
|
+
].join("|") : "nostroke", DA = [
|
|
7838
7839
|
I.id,
|
|
7839
|
-
|
|
7840
|
-
|
|
7840
|
+
O.join("_"),
|
|
7841
|
+
GA,
|
|
7841
7842
|
gA,
|
|
7842
7843
|
g.opacity ?? 100,
|
|
7843
7844
|
g.visible !== !1 ? "v" : "h"
|
|
7844
7845
|
].join("_");
|
|
7845
|
-
let
|
|
7846
|
-
if (!
|
|
7847
|
-
|
|
7848
|
-
let F =
|
|
7849
|
-
if (Q.colors && Q.colors.length > 0 &&
|
|
7850
|
-
if (
|
|
7851
|
-
const
|
|
7852
|
-
F = F.replace(oA,
|
|
7846
|
+
let kA = this.imageCache.get(DA);
|
|
7847
|
+
if (!kA) {
|
|
7848
|
+
kA = new Image(), kA.crossOrigin = "anonymous";
|
|
7849
|
+
let F = u;
|
|
7850
|
+
if (Q.colors && Q.colors.length > 0 && O.length > 0 && Q.colors.forEach((BA, z) => {
|
|
7851
|
+
if (O[z]) {
|
|
7852
|
+
const AA = BA.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), oA = new RegExp(AA, "gi");
|
|
7853
|
+
F = F.replace(oA, O[z]);
|
|
7853
7854
|
}
|
|
7854
|
-
}),
|
|
7855
|
-
if (
|
|
7856
|
-
const BA =
|
|
7857
|
-
F = F.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (
|
|
7858
|
-
} else if (
|
|
7859
|
-
const BA = "exode-fill",
|
|
7860
|
-
const X = QA.offset !== void 0 ? QA.offset : QA.pos ?? 0,
|
|
7861
|
-
return `<stop offset="${X * 100}%" stop-color="${QA.color || "#000"}" stop-opacity="${
|
|
7855
|
+
}), L && L.type && L.type !== "None") {
|
|
7856
|
+
if (L.type === "Solid" && L.color) {
|
|
7857
|
+
const BA = W ? "#FFFFFF" : L.color, z = W ? 1 : this.normalizeOpacity(L.opacity ?? 100);
|
|
7858
|
+
F = F.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (AA) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test(AA) ? AA : `fill="${BA}"`), F = F.replace(/fill\s*:\s*[^;"')]+/gi, (AA) => /fill\s*:\s*(none|transparent)/i.test(AA) ? AA : `fill:${BA}`), z < 1 && (F = F.replace(/\bfill-opacity\s*=\s*["'][^"']*["']/gi, `fill-opacity="${z}"`), F = F.replace(/fill-opacity\s*:\s*[^;"')]+/gi, `fill-opacity:${z}`), F.match(/\bfill-opacity\s*=/i) || (F = F.replace(/(<svg[^>]*>)/i, `$1<g fill-opacity="${z}">`), F = F.replace(/<\/svg>/i, "</g></svg>")));
|
|
7859
|
+
} else if (L.type === "LinearGradient" || L.type === "RadialGradient" || L.type === "Linear" || L.type === "Radial") {
|
|
7860
|
+
const BA = "exode-fill", z = this.normalizeOpacity(L.opacity ?? 100), AA = (L.stops || []).map((QA) => {
|
|
7861
|
+
const X = QA.offset !== void 0 ? QA.offset : QA.pos ?? 0, aA = this.normalizeOpacity(QA.opacity ?? 100) * z;
|
|
7862
|
+
return `<stop offset="${X * 100}%" stop-color="${QA.color || "#000"}" stop-opacity="${aA}"/>`;
|
|
7862
7863
|
}).join("");
|
|
7863
7864
|
let oA = "";
|
|
7864
|
-
if (
|
|
7865
|
-
const QA = (HA,
|
|
7866
|
-
oA = `<linearGradient id="${BA}" x1="${X}%" y1="${
|
|
7865
|
+
if (L.type === "LinearGradient" || L.type === "Linear") {
|
|
7866
|
+
const QA = (HA, JA) => Array.isArray(HA) ? HA[JA] ?? (JA === 0 ? 0 : 1) : HA && typeof HA == "object" ? HA[JA === 0 ? "x" : "y"] ?? (JA === 0 ? 0 : 1) : JA === 0 ? 0 : 1, X = QA(L.start, 0) * 100, aA = QA(L.start, 1) * 100, SA = QA(L.end, 0) * 100, UA = QA(L.end, 1) * 100;
|
|
7867
|
+
oA = `<linearGradient id="${BA}" x1="${X}%" y1="${aA}%" x2="${SA}%" y2="${UA}%" gradientUnits="objectBoundingBox">${AA}</linearGradient>`;
|
|
7867
7868
|
} else {
|
|
7868
|
-
const QA = (
|
|
7869
|
-
oA = `<radialGradient id="${BA}" cx="${X}%" cy="${
|
|
7869
|
+
const QA = (UA, HA) => Array.isArray(UA) ? UA[HA] ?? 0.5 : UA && typeof UA == "object" ? UA[HA === 0 ? "x" : "y"] ?? 0.5 : 0.5, X = QA(L.center, 0) * 100, aA = QA(L.center, 1) * 100, SA = (L.radius ?? 0.5) * 100;
|
|
7870
|
+
oA = `<radialGradient id="${BA}" cx="${X}%" cy="${aA}%" r="${SA}%" gradientUnits="objectBoundingBox">${AA}</radialGradient>`;
|
|
7870
7871
|
}
|
|
7871
7872
|
/<defs>/i.test(F) ? F = F.replace(/<defs>/i, `<defs>${oA}`) : F = F.replace(/<svg([^>]*)>/i, `<svg$1><defs>${oA}</defs>`), F = F.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (QA) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test(QA) ? QA : `fill="url(#${BA})"`), F = F.replace(/fill\s*:\s*[^;"')]+/gi, (QA) => /fill\s*:\s*(none|transparent)/i.test(QA) ? QA : `fill:url(#${BA})`);
|
|
7872
7873
|
}
|
|
7873
7874
|
}
|
|
7874
|
-
const
|
|
7875
|
-
const oA = (BA.stops || []).map((
|
|
7876
|
-
const HA =
|
|
7877
|
-
return `<stop offset="${HA * 100}%" stop-color="${
|
|
7878
|
-
}).join(""), QA = (
|
|
7875
|
+
const b = (BA, z, AA = 1) => {
|
|
7876
|
+
const oA = (BA.stops || []).map((UA) => {
|
|
7877
|
+
const HA = UA.offset !== void 0 ? UA.offset : UA.pos ?? 0, JA = this.normalizeOpacity(UA.opacity ?? 100) * AA;
|
|
7878
|
+
return `<stop offset="${HA * 100}%" stop-color="${UA.color || "#000"}" stop-opacity="${JA}"/>`;
|
|
7879
|
+
}).join(""), QA = (UA, HA, JA = 0.5) => Array.isArray(UA) ? UA[HA] ?? JA : UA && typeof UA == "object" ? UA[HA === 0 ? "x" : "y"] ?? JA : JA;
|
|
7879
7880
|
if (BA.type === "LinearGradient" || BA.type === "Linear") {
|
|
7880
|
-
const
|
|
7881
|
-
return `<linearGradient id="${
|
|
7881
|
+
const UA = QA(BA.start, 0, 0) * 100, HA = QA(BA.start, 1, 0) * 100, JA = QA(BA.end, 0, 1) * 100, vA = QA(BA.end, 1, 1) * 100;
|
|
7882
|
+
return `<linearGradient id="${z}" x1="${UA}%" y1="${HA}%" x2="${JA}%" y2="${vA}%" gradientUnits="objectBoundingBox">${oA}</linearGradient>`;
|
|
7882
7883
|
}
|
|
7883
|
-
const X = QA(BA.center, 0, 0.5) * 100,
|
|
7884
|
-
return `<radialGradient id="${
|
|
7885
|
-
},
|
|
7886
|
-
if (
|
|
7887
|
-
const BA =
|
|
7884
|
+
const X = QA(BA.center, 0, 0.5) * 100, aA = QA(BA.center, 1, 0.5) * 100, SA = (BA.radius ?? 0.5) * 100;
|
|
7885
|
+
return `<radialGradient id="${z}" cx="${X}%" cy="${aA}%" r="${SA}%" gradientUnits="objectBoundingBox">${oA}</radialGradient>`;
|
|
7886
|
+
}, H = (BA, z) => /<defs>/i.test(BA) ? BA.replace(/<defs>/i, `<defs>${z}`) : BA.replace(/(<svg[^>]*>)/i, `$1<defs>${z}</defs>`);
|
|
7887
|
+
if (R && R.isEnabled !== !1 && (R.width || 0) > 0) {
|
|
7888
|
+
const BA = R.width || 1, z = W ? 1 : this.normalizeOpacity(R.opacity ?? 100), AA = W ? "#FFFFFF" : R.color || (L == null ? void 0 : L.color) || "#000000";
|
|
7888
7889
|
let oA = "";
|
|
7889
|
-
const QA =
|
|
7890
|
+
const QA = R.fill;
|
|
7890
7891
|
if (QA && QA.type) {
|
|
7891
7892
|
if (QA.type === "Solid")
|
|
7892
|
-
oA = QA.color ||
|
|
7893
|
+
oA = QA.color || R.color || "#000000";
|
|
7893
7894
|
else if (QA.type === "LinearGradient" || QA.type === "RadialGradient" || QA.type === "Linear" || QA.type === "Radial") {
|
|
7894
|
-
const
|
|
7895
|
-
F =
|
|
7895
|
+
const JA = "exode-stroke";
|
|
7896
|
+
F = H(F, b(QA, JA, z)), oA = `url(#${JA})`;
|
|
7896
7897
|
}
|
|
7897
7898
|
}
|
|
7898
|
-
oA || (oA =
|
|
7899
|
+
oA || (oA = AA), F.match(/\bstroke\s*=/i) ? F = F.replace(
|
|
7899
7900
|
/\bstroke\s*=\s*["'][^"']*["']/gi,
|
|
7900
|
-
(
|
|
7901
|
+
(JA) => /stroke\s*=\s*["']\s*(none|transparent)\s*["']/i.test(JA) ? JA : `stroke="${oA}"`
|
|
7901
7902
|
) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke="${oA}"`), F = F.replace(
|
|
7902
7903
|
new RegExp(`(?<![a-z-])stroke\\s*:\\s*(?!none|transparent)[^;"')]+`, "gi"),
|
|
7903
7904
|
`stroke:${oA}`
|
|
7904
|
-
), F.match(/\bstroke-width\s*=/i) ? F = F.replace(/\bstroke-width\s*=\s*["'][^"']*["']/gi, `stroke-width="${BA}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-width="${BA}"`), F = F.replace(/stroke-width\s*:\s*[^;"')]+/gi, `stroke-width:${BA}`), F.match(/\bstroke-opacity\s*=/i) ? F = F.replace(/\bstroke-opacity\s*=\s*["'][^"']*["']/gi, `stroke-opacity="${
|
|
7905
|
-
const X =
|
|
7905
|
+
), F.match(/\bstroke-width\s*=/i) ? F = F.replace(/\bstroke-width\s*=\s*["'][^"']*["']/gi, `stroke-width="${BA}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-width="${BA}"`), F = F.replace(/stroke-width\s*:\s*[^;"')]+/gi, `stroke-width:${BA}`), F.match(/\bstroke-opacity\s*=/i) ? F = F.replace(/\bstroke-opacity\s*=\s*["'][^"']*["']/gi, `stroke-opacity="${z}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-opacity="${z}"`), F = F.replace(/stroke-opacity\s*:\s*[^;"')]+/gi, `stroke-opacity:${z}`), R.lineCap && (F = F.replace(/\bstroke-linecap\s*=\s*["'][^"']*["']/gi, `stroke-linecap="${R.lineCap}"`), F = F.replace(/stroke-linecap\s*:\s*[^;"')]+/gi, `stroke-linecap:${R.lineCap}`)), R.lineJoin && (F = F.replace(/\bstroke-linejoin\s*=\s*["'][^"']*["']/gi, `stroke-linejoin="${R.lineJoin}"`), F = F.replace(/stroke-linejoin\s*:\s*[^;"')]+/gi, `stroke-linejoin:${R.lineJoin}`));
|
|
7906
|
+
const X = R.trimStart ?? 0, aA = R.trimEnd ?? 1, SA = R.trimOffset ?? 0, UA = R.dashOffset ?? 0, HA = X !== 0 || aA !== 1 || SA !== 0 || UA !== 0;
|
|
7906
7907
|
if (HA) {
|
|
7907
|
-
const
|
|
7908
|
-
this.frameCount % 600 === 0 && this.debugLog(`SVG Trim - Object: ${I.name || I.id}, Start: ${
|
|
7908
|
+
const JA = Math.max(0, Math.min(1, X)), vA = Math.max(0, Math.min(1, aA));
|
|
7909
|
+
this.frameCount % 600 === 0 && this.debugLog(`SVG Trim - Object: ${I.name || I.id}, Start: ${JA}, End: ${vA}`);
|
|
7909
7910
|
let WI = Q.width || i || 100, ZI = Q.height || w || 100;
|
|
7910
|
-
const RI =
|
|
7911
|
+
const RI = u.match(/viewBox=["']\s*0\s+0\s+([\d.]+)\s+([\d.]+)\s*["']/i);
|
|
7911
7912
|
if (RI) {
|
|
7912
7913
|
const wI = parseFloat(RI[1]), kI = parseFloat(RI[2]);
|
|
7913
7914
|
!isNaN(wI) && !isNaN(kI) && (WI = wI, ZI = kI);
|
|
7914
7915
|
}
|
|
7915
|
-
const DI = (WI + ZI) * 2, UI = (
|
|
7916
|
+
const DI = (WI + ZI) * 2, UI = (SA % 1 + 1) % 1, QI = (UA % 1 + 1) % 1;
|
|
7916
7917
|
let _A = "", BI = 0;
|
|
7917
|
-
if (
|
|
7918
|
+
if (JA >= vA)
|
|
7918
7919
|
_A = `0 ${DI}`, BI = 0;
|
|
7919
7920
|
else {
|
|
7920
|
-
const wI = DI * (vA -
|
|
7921
|
-
BI = -(DI * (
|
|
7921
|
+
const wI = DI * (vA - JA), kI = DI - wI;
|
|
7922
|
+
BI = -(DI * (JA + UI + QI)), _A = `${wI} ${kI}`;
|
|
7922
7923
|
}
|
|
7923
7924
|
F.match(/\bstroke-dasharray\s*=/i) ? F = F.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${_A}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-dasharray="${_A}"`), F = F.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${_A}`), F.match(/\bstroke-dashoffset\s*=/i) ? F = F.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${BI}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-dashoffset="${BI}"`), F = F.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${BI}`);
|
|
7924
|
-
} else if (
|
|
7925
|
-
const
|
|
7926
|
-
F = F.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${
|
|
7925
|
+
} else if (R.dashArray && R.dashArray.length > 0) {
|
|
7926
|
+
const JA = R.dashArray.join(" ");
|
|
7927
|
+
F = F.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${JA}"`), F = F.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${JA}`), R.dashOffset && (F = F.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${R.dashOffset}"`), F = F.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${R.dashOffset}`));
|
|
7927
7928
|
}
|
|
7928
|
-
if (!/\bstroke\s*=\s*["']/i.test(
|
|
7929
|
-
let
|
|
7929
|
+
if (!/\bstroke\s*=\s*["']/i.test(u) && !new RegExp("(?<![a-z-])stroke\\s*:", "i").test(u)) {
|
|
7930
|
+
let JA = "", vA = "";
|
|
7930
7931
|
if (HA) {
|
|
7931
|
-
const DI = Q.width || i || 100, UI = Q.height || w || 100, QI = (DI + UI) * 2, _A = Math.max(0, Math.min(1, X)), BI = Math.max(0, Math.min(1,
|
|
7932
|
+
const DI = Q.width || i || 100, UI = Q.height || w || 100, QI = (DI + UI) * 2, _A = Math.max(0, Math.min(1, X)), BI = Math.max(0, Math.min(1, aA)), wI = (SA % 1 + 1) % 1, kI = (UA % 1 + 1) % 1;
|
|
7932
7933
|
if (_A >= BI)
|
|
7933
|
-
|
|
7934
|
+
JA = ` stroke-dasharray="0 ${QI}"`, vA = ' stroke-dashoffset="0"';
|
|
7934
7935
|
else {
|
|
7935
7936
|
const tC = QI * (BI - _A), xQ = QI - tC, OQ = -(QI * (_A + wI + kI));
|
|
7936
|
-
|
|
7937
|
+
JA = ` stroke-dasharray="${tC} ${xQ}"`, vA = ` stroke-dashoffset="${OQ}"`;
|
|
7937
7938
|
}
|
|
7938
|
-
} else (NA =
|
|
7939
|
-
const WI =
|
|
7939
|
+
} else (NA = R.dashArray) != null && NA.length && (JA = ` stroke-dasharray="${R.dashArray.join(" ")}"`, R.dashOffset && (vA = ` stroke-dashoffset="${R.dashOffset}"`));
|
|
7940
|
+
const WI = R.lineCap ? ` stroke-linecap="${R.lineCap}"` : "", ZI = R.lineJoin ? ` stroke-linejoin="${R.lineJoin}"` : "", RI = `stroke="${oA}" stroke-width="${BA}" stroke-opacity="${z}"${WI}${ZI}${JA}${vA}`;
|
|
7940
7941
|
F = F.replace(
|
|
7941
7942
|
/(<svg[^>]*>)(\s*(?:<defs>[\s\S]*?<\/defs>)?)/i,
|
|
7942
7943
|
(DI, UI, QI) => `${UI}${QI}<g ${RI}>`
|
|
7943
7944
|
), F = F.replace(/<\/svg>/i, "</g></svg>");
|
|
7944
7945
|
}
|
|
7945
|
-
} else
|
|
7946
|
-
const iA = new Blob([F], { type: "image/svg+xml" }),
|
|
7947
|
-
|
|
7948
|
-
if (URL.revokeObjectURL(
|
|
7949
|
-
const BA = this.imageCache.get(
|
|
7946
|
+
} else R && R.isEnabled === !1 && (F = F.replace(/\bstroke\s*=\s*["'][^"']*["']/gi, 'stroke="none"'), F = F.replace(new RegExp(`(?<![a-z-])stroke\\s*:\\s*(?!none|transparent)[^;"')]+`, "gi"), "stroke:none"));
|
|
7947
|
+
const iA = new Blob([F], { type: "image/svg+xml" }), RA = URL.createObjectURL(iA);
|
|
7948
|
+
kA.onload = () => {
|
|
7949
|
+
if (URL.revokeObjectURL(RA), this.frameCount % 900 === 0) {
|
|
7950
|
+
const BA = this.imageCache.get(DA);
|
|
7950
7951
|
BA && this.debugLog(`SVG Payload Ready: ${I.name || I.id} (${BA.naturalWidth}x${BA.naturalHeight})`);
|
|
7951
7952
|
}
|
|
7952
|
-
},
|
|
7953
|
-
URL.revokeObjectURL(
|
|
7954
|
-
},
|
|
7953
|
+
}, kA.onerror = () => {
|
|
7954
|
+
URL.revokeObjectURL(RA), this.debugLog(`SVG Error: Failed to load payload for ${I.name || I.id}`);
|
|
7955
|
+
}, kA.src = RA, this.imageCache.set(DA, kA);
|
|
7955
7956
|
}
|
|
7956
7957
|
let CA = null;
|
|
7957
|
-
if (
|
|
7958
|
-
const F = Math.max(1, i),
|
|
7959
|
-
if (
|
|
7960
|
-
this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width = F, this.maskBuffer.height =
|
|
7961
|
-
const
|
|
7962
|
-
this.maskCtx.fillStyle =
|
|
7963
|
-
} else s !== 0 ? (A.save(), this.drawRoundRect(A, -F / 2, -
|
|
7958
|
+
if (kA.complete && kA.naturalWidth > 0 ? (CA = kA, this.lastValidSvgImgMap.set(I.id, kA)) : CA = this.lastValidSvgImgMap.get(I.id) || null, CA && CA.complete && CA.naturalWidth > 0) {
|
|
7959
|
+
const F = Math.max(1, i), b = Math.max(1, w);
|
|
7960
|
+
if (W && (L == null ? void 0 : L.type) === "Solid") {
|
|
7961
|
+
this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width = F, this.maskBuffer.height = b, this.maskCtx.clearRect(0, 0, F, b), this.maskCtx.drawImage(CA, 0, 0, F, b), this.maskCtx.globalCompositeOperation = "source-in";
|
|
7962
|
+
const H = L.color || "#000000", iA = this.normalizeOpacity(L.opacity ?? 100);
|
|
7963
|
+
this.maskCtx.fillStyle = H, this.maskCtx.globalAlpha = iA, this.maskCtx.fillRect(0, 0, F, b), A.drawImage(this.maskBuffer, -F / 2, -b / 2, F, b);
|
|
7964
|
+
} else s !== 0 ? (A.save(), this.drawRoundRect(A, -F / 2, -b / 2, F, b, s), A.clip(), A.drawImage(CA, -F / 2, -b / 2, F, b), A.restore()) : A.drawImage(CA, -F / 2, -b / 2, F, b);
|
|
7964
7965
|
}
|
|
7965
7966
|
}
|
|
7966
7967
|
} else if (h.type === "LineGraph")
|
|
7967
7968
|
this.renderLineGraph(A, h, i, w);
|
|
7968
7969
|
else if (I.type === "Shape") {
|
|
7969
7970
|
if (this.applyPath(A, h, i, w, s), A.save(), E.blur && E.blur.amount > 0 && (A.filter = `blur(${E.blur.amount}px)`), E.fill) {
|
|
7970
|
-
const
|
|
7971
|
-
|
|
7971
|
+
const u = A.globalAlpha, O = this.createCanvasFill(A, E.fill, i, w);
|
|
7972
|
+
O ? A.fillStyle = O : A.fillStyle = typeof E.fill == "string" ? E.fill : E.fill.color || "transparent", A.globalAlpha = u * this.normalizeOpacity(E.fill.opacity ?? 100), this.applyPath(A, h, i, w, s), A.fill(), A.globalAlpha = u;
|
|
7972
7973
|
}
|
|
7973
7974
|
A.restore(), E.stroke && E.stroke.width > 0 && this.applyStrokeAlignment(A, E, h, i, w, s);
|
|
7974
7975
|
} else if (I.type === "Frame" || I.type === "Group" && !I.isStructuralGroup) {
|
|
7975
|
-
const
|
|
7976
|
-
if (A.save(), A.beginPath(), this.drawRoundRect(A, -
|
|
7977
|
-
const
|
|
7978
|
-
A.fillStyle =
|
|
7976
|
+
const u = g.width ?? Q.width ?? I.width ?? i, O = g.height ?? Q.height ?? I.height ?? w, L = s;
|
|
7977
|
+
if (A.save(), A.beginPath(), this.drawRoundRect(A, -u / 2, -O / 2, u, O, L), E.fill && E.fill.type !== "None") {
|
|
7978
|
+
const R = A.globalAlpha, m = this.createCanvasFill(A, E.fill, u, O);
|
|
7979
|
+
A.fillStyle = m || E.fill.color || "transparent", A.globalAlpha = R * this.normalizeOpacity(E.fill.opacity ?? 100), A.fill(), A.globalAlpha = R;
|
|
7979
7980
|
}
|
|
7980
7981
|
if (A.restore(), E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1) {
|
|
7981
|
-
const
|
|
7982
|
-
this.applyStrokeAlignment(A, E,
|
|
7982
|
+
const R = { type: "Rectangle" };
|
|
7983
|
+
this.applyStrokeAlignment(A, E, R, u, O, L);
|
|
7983
7984
|
}
|
|
7984
7985
|
} else I.type === "Group" && I.isStructuralGroup || (I.type === "Component" && I.variant === "inputbox" ? this.renderInputBox(A, I) : I.type === "Component" && I.variant === "button" ? this.renderButton(A, I) : I.type === "Component" && I.variant === "toggle_button" ? this.renderToggleButton(A, I) : I.type === "Toggle" || I.type === "Component" && I.variant === "toggle" ? this.renderToggle(A, I) : I.type === "Slider" || I.type === "Component" && I.variant === "slider" ? this.renderSlider(A, I) : I.type === "Dropdown" || I.type === "Component" && I.variant === "dropdown" ? this.renderDropdown(A, I) : (I.type === "ListView" || I.type === "Component" && I.variant === "listview") && this.renderListView(A, I));
|
|
7985
|
-
if (IA && A.restore(),
|
|
7986
|
-
const
|
|
7987
|
-
if (A.save(),
|
|
7986
|
+
if (IA && A.restore(), T && T.enabled && A.restore(), I.children && I.children.length > 0) {
|
|
7987
|
+
const O = I.type === "Frame", L = I.clipsContent !== void 0 ? I.clipsContent : I.clipContent !== void 0 ? I.clipContent : O;
|
|
7988
|
+
if (A.save(), L) {
|
|
7988
7989
|
A.beginPath();
|
|
7989
|
-
const
|
|
7990
|
-
this.drawRoundRect(A, -
|
|
7990
|
+
const m = g.width ?? (Q == null ? void 0 : Q.width) ?? I.width ?? 0, W = g.height ?? (Q == null ? void 0 : Q.height) ?? I.height ?? 0, GA = g.cornerRadius ?? (Q == null ? void 0 : Q.corner_radius) ?? I.cornerRadius ?? 0;
|
|
7991
|
+
this.drawRoundRect(A, -m / 2, -W / 2, m, W, GA), A.clip();
|
|
7991
7992
|
}
|
|
7992
|
-
let
|
|
7993
|
-
for (I.children.forEach((
|
|
7994
|
-
const
|
|
7995
|
-
if (!
|
|
7996
|
-
const
|
|
7997
|
-
if (gA && gA.isMask && (
|
|
7998
|
-
const
|
|
7999
|
-
this.applyObjectTransform(A,
|
|
8000
|
-
const CA = (
|
|
8001
|
-
this.applyPath(A, gA,
|
|
7993
|
+
let R = 0;
|
|
7994
|
+
for (I.children.forEach((m) => {
|
|
7995
|
+
const W = C.get(m);
|
|
7996
|
+
if (!W) return;
|
|
7997
|
+
const GA = this.objectStates.get(m), gA = (GA == null ? void 0 : GA.geometry) || W.geometry;
|
|
7998
|
+
if (gA && gA.isMask && (GA == null ? void 0 : GA.visible) !== !1) {
|
|
7999
|
+
const DA = gA.width || 0, kA = gA.height || 0;
|
|
8000
|
+
this.applyObjectTransform(A, m);
|
|
8001
|
+
const CA = (GA == null ? void 0 : GA.corner_radius) ?? (gA == null ? void 0 : gA.corner_radius) ?? 0;
|
|
8002
|
+
this.applyPath(A, gA, DA, kA, CA), A.clip(), R++;
|
|
8002
8003
|
} else
|
|
8003
|
-
this.renderObject(A,
|
|
8004
|
-
});
|
|
8005
|
-
A.restore(),
|
|
8004
|
+
this.renderObject(A, W, C);
|
|
8005
|
+
}); R > 0; )
|
|
8006
|
+
A.restore(), R--;
|
|
8006
8007
|
A.restore();
|
|
8007
8008
|
}
|
|
8008
8009
|
if (n) {
|
|
@@ -8013,328 +8014,328 @@ class Ei {
|
|
|
8013
8014
|
opacity: I.maskOpacity !== void 0 ? I.maskOpacity / 100 : 1,
|
|
8014
8015
|
feather: I.maskFeather || 0,
|
|
8015
8016
|
isVisible: !0
|
|
8016
|
-
}] : [])).filter((
|
|
8017
|
-
const
|
|
8018
|
-
if ((
|
|
8019
|
-
(!this.lumaBuffer || this.lumaBuffer.width !== this.maskBuffer.width || this.lumaBuffer.height !== this.maskBuffer.height) && (this.lumaBuffer = document.createElement("canvas"), this.lumaBuffer.width = this.maskBuffer.width, this.lumaBuffer.height = this.maskBuffer.height, this.lumaCtx = this.lumaBuffer.getContext("2d", { willReadFrequently: !0 }), this.lumaCtx && (this.lumaCtx.imageSmoothingEnabled = !0, this.lumaCtx.imageSmoothingQuality = "high")), this.lumaCtx.clearRect(0, 0, this.lumaBuffer.width, this.lumaBuffer.height), this.lumaCtx.save(), this.rootTransform && this.lumaCtx.setTransform(this.rootTransform), this.applyAbsoluteTransform(this.lumaCtx,
|
|
8020
|
-
const CA = (
|
|
8021
|
-
if (
|
|
8022
|
-
const BA =
|
|
8023
|
-
this._renderText(this.lumaCtx,
|
|
8024
|
-
} else if (
|
|
8025
|
-
const BA =
|
|
8017
|
+
}] : [])).filter((R) => R.isVisible !== !1 && C.has(R.maskId)).forEach((R) => {
|
|
8018
|
+
const m = C.get(R.maskId), W = this.objectStates.get(m.id), GA = R.feather || 0, gA = R.inverted === !0, DA = R.opacity !== void 0 ? typeof R.opacity == "number" ? R.opacity : R.opacity / 100 : 1;
|
|
8019
|
+
if ((R.type || "alpha") === "luma") {
|
|
8020
|
+
(!this.lumaBuffer || this.lumaBuffer.width !== this.maskBuffer.width || this.lumaBuffer.height !== this.maskBuffer.height) && (this.lumaBuffer = document.createElement("canvas"), this.lumaBuffer.width = this.maskBuffer.width, this.lumaBuffer.height = this.maskBuffer.height, this.lumaCtx = this.lumaBuffer.getContext("2d", { willReadFrequently: !0 }), this.lumaCtx && (this.lumaCtx.imageSmoothingEnabled = !0, this.lumaCtx.imageSmoothingQuality = "high")), this.lumaCtx.clearRect(0, 0, this.lumaBuffer.width, this.lumaBuffer.height), this.lumaCtx.save(), this.rootTransform && this.lumaCtx.setTransform(this.rootTransform), this.applyAbsoluteTransform(this.lumaCtx, m.id, C), GA > 0 && (this.lumaCtx.filter = `blur(${GA}px)`), this.lumaCtx.globalAlpha = DA;
|
|
8021
|
+
const CA = (W == null ? void 0 : W.width) || m.geometry.width || 0, F = (W == null ? void 0 : W.height) || m.geometry.height || 0, b = (W == null ? void 0 : W.corner_radius) ?? m.corner_radius ?? 0;
|
|
8022
|
+
if (m.geometry.type === "Text") {
|
|
8023
|
+
const BA = W != null && W.geometry ? this.deepMerge(m.geometry, W.geometry) : m.geometry, z = W != null && W.style ? this.deepMerge(m.style, W.style) : m.style;
|
|
8024
|
+
this._renderText(this.lumaCtx, m, { ...BA, width: CA, height: F, corner_radius: b }, z, W, CA, F, !0);
|
|
8025
|
+
} else if (m.geometry.type === "Image") {
|
|
8026
|
+
const BA = m.geometry.src;
|
|
8026
8027
|
if (BA) {
|
|
8027
|
-
let
|
|
8028
|
-
|
|
8028
|
+
let z = this.imageCache.get(BA);
|
|
8029
|
+
z || (z = new Image(), z.src = BA, this.imageCache.set(BA, z)), z.complete && z.naturalWidth > 0 ? this.lumaCtx.drawImage(z, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.lumaCtx, m.geometry, CA, F, b), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
|
|
8029
8030
|
}
|
|
8030
|
-
} else if (
|
|
8031
|
-
const BA =
|
|
8031
|
+
} else if (m.geometry.type === "SVG") {
|
|
8032
|
+
const BA = m.geometry.svgContent;
|
|
8032
8033
|
if (BA) {
|
|
8033
|
-
const
|
|
8034
|
-
let
|
|
8035
|
-
if (
|
|
8036
|
-
|
|
8034
|
+
const z = `__lumamask_${m.id}`;
|
|
8035
|
+
let AA = this.imageCache.get(z);
|
|
8036
|
+
if (!AA) {
|
|
8037
|
+
AA = new Image();
|
|
8037
8038
|
const oA = new Blob([BA], { type: "image/svg+xml" });
|
|
8038
|
-
|
|
8039
|
+
AA.src = URL.createObjectURL(oA), AA.onload = () => {
|
|
8039
8040
|
this.artboard && this.reset();
|
|
8040
|
-
}, this.imageCache.set(
|
|
8041
|
+
}, this.imageCache.set(z, AA);
|
|
8041
8042
|
}
|
|
8042
|
-
|
|
8043
|
+
AA.complete && AA.naturalWidth > 0 ? this.lumaCtx.drawImage(AA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.lumaCtx, m.geometry, CA, F, b), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
|
|
8043
8044
|
}
|
|
8044
8045
|
} else
|
|
8045
|
-
this.applyPath(this.lumaCtx,
|
|
8046
|
+
this.applyPath(this.lumaCtx, m.geometry, CA, F, b), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill();
|
|
8046
8047
|
this.lumaCtx.restore();
|
|
8047
|
-
const
|
|
8048
|
-
for (let BA = 0; BA <
|
|
8049
|
-
const
|
|
8050
|
-
let QA = (0.299 *
|
|
8051
|
-
gA && (QA = 1 - QA),
|
|
8048
|
+
const H = this.maskCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight), iA = this.lumaCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight).data, RA = H.data;
|
|
8049
|
+
for (let BA = 0; BA < RA.length; BA += 4) {
|
|
8050
|
+
const z = iA[BA], AA = iA[BA + 1], oA = iA[BA + 2];
|
|
8051
|
+
let QA = (0.299 * z + 0.587 * AA + 0.114 * oA) / 255;
|
|
8052
|
+
gA && (QA = 1 - QA), RA[BA + 3] *= QA;
|
|
8052
8053
|
}
|
|
8053
|
-
this.maskCtx.putImageData(
|
|
8054
|
+
this.maskCtx.putImageData(H, 0, 0);
|
|
8054
8055
|
} else {
|
|
8055
|
-
this.maskCtx.save(), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), this.maskCtx.globalCompositeOperation = gA ? "destination-out" : "destination-in",
|
|
8056
|
-
const CA = (
|
|
8057
|
-
if (
|
|
8058
|
-
const
|
|
8059
|
-
this._renderText(this.maskCtx,
|
|
8060
|
-
} else if (
|
|
8061
|
-
const
|
|
8062
|
-
if (
|
|
8063
|
-
let iA = this.imageCache.get(
|
|
8064
|
-
iA || (iA = new Image(), iA.src =
|
|
8056
|
+
this.maskCtx.save(), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), this.maskCtx.globalCompositeOperation = gA ? "destination-out" : "destination-in", GA > 0 && (this.maskCtx.filter = `blur(${GA}px)`), this.maskCtx.globalAlpha = DA, this.applyAbsoluteTransform(this.maskCtx, m.id, C);
|
|
8057
|
+
const CA = (W == null ? void 0 : W.width) || m.geometry.width || 0, F = (W == null ? void 0 : W.height) || m.geometry.height || 0, b = (W == null ? void 0 : W.corner_radius) ?? m.corner_radius ?? 0;
|
|
8058
|
+
if (m.geometry.type === "Text") {
|
|
8059
|
+
const H = W != null && W.geometry ? this.deepMerge(m.geometry, W.geometry) : m.geometry, iA = W != null && W.style ? this.deepMerge(m.style, W.style) : m.style;
|
|
8060
|
+
this._renderText(this.maskCtx, m, { ...H, width: CA, height: F, corner_radius: b }, iA, W, CA, F, !0);
|
|
8061
|
+
} else if (m.geometry.type === "Image") {
|
|
8062
|
+
const H = m.geometry.src;
|
|
8063
|
+
if (H) {
|
|
8064
|
+
let iA = this.imageCache.get(H);
|
|
8065
|
+
iA || (iA = new Image(), iA.src = H, this.imageCache.set(H, iA)), iA.complete && iA.naturalWidth > 0 ? this.maskCtx.drawImage(iA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.maskCtx, m.geometry, CA, F, b), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
|
|
8065
8066
|
}
|
|
8066
|
-
} else if (
|
|
8067
|
-
const
|
|
8068
|
-
if (
|
|
8069
|
-
const iA = `__alphamask_${
|
|
8070
|
-
let
|
|
8071
|
-
if (!
|
|
8072
|
-
|
|
8073
|
-
const BA = new Blob([
|
|
8074
|
-
|
|
8067
|
+
} else if (m.geometry.type === "SVG") {
|
|
8068
|
+
const H = m.geometry.svgContent;
|
|
8069
|
+
if (H) {
|
|
8070
|
+
const iA = `__alphamask_${m.id}`;
|
|
8071
|
+
let RA = this.imageCache.get(iA);
|
|
8072
|
+
if (!RA) {
|
|
8073
|
+
RA = new Image();
|
|
8074
|
+
const BA = new Blob([H], { type: "image/svg+xml" });
|
|
8075
|
+
RA.src = URL.createObjectURL(BA), RA.onload = () => {
|
|
8075
8076
|
this.artboard && this.reset();
|
|
8076
|
-
}, this.imageCache.set(iA,
|
|
8077
|
+
}, this.imageCache.set(iA, RA);
|
|
8077
8078
|
}
|
|
8078
|
-
|
|
8079
|
+
RA.complete && RA.naturalWidth > 0 ? this.maskCtx.drawImage(RA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.maskCtx, m.geometry, CA, F, b), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
|
|
8079
8080
|
}
|
|
8080
8081
|
} else
|
|
8081
|
-
this.applyPath(this.maskCtx,
|
|
8082
|
+
this.applyPath(this.maskCtx, m.geometry, CA, F, b), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill();
|
|
8082
8083
|
this.maskCtx.restore();
|
|
8083
8084
|
}
|
|
8084
8085
|
}), r.save(), r.setTransform(1, 0, 0, 1, 0, 0);
|
|
8085
|
-
const
|
|
8086
|
-
|
|
8086
|
+
const L = I.maskBlendMode || I.blendMode;
|
|
8087
|
+
L && L !== "Normal" && (r.globalCompositeOperation = L.toLowerCase()), r.drawImage(this.maskBuffer, 0, 0), r.restore(), r.restore();
|
|
8087
8088
|
} else
|
|
8088
8089
|
A.restore();
|
|
8089
8090
|
}
|
|
8090
8091
|
_renderText(A, I, C, g, Q, E, i, w = !1, o = !1) {
|
|
8091
|
-
var
|
|
8092
|
+
var p;
|
|
8092
8093
|
let s = C.text || "";
|
|
8093
8094
|
if (C.textInputId && !w) {
|
|
8094
|
-
const
|
|
8095
|
-
|
|
8095
|
+
const U = this.inputs.get(C.textInputId);
|
|
8096
|
+
U !== void 0 && (s = String(U), Q.geometry && Q.geometry.type === "Text" && (Q.geometry.text = s));
|
|
8096
8097
|
}
|
|
8097
8098
|
let h = s || "";
|
|
8098
8099
|
if (C.segments && Array.isArray(C.segments)) {
|
|
8099
|
-
const
|
|
8100
|
-
|
|
8100
|
+
const U = C.segments.map((_) => _ && _.text ? _.text : "").join("");
|
|
8101
|
+
U !== h && U.toUpperCase() === (s || "").toUpperCase() ? h = s || "" : h = U;
|
|
8101
8102
|
}
|
|
8102
|
-
let a = ((
|
|
8103
|
+
let a = ((p = C.fontWeight) == null ? void 0 : p.toString()) || "400", G = "normal";
|
|
8103
8104
|
a.toLowerCase().includes("italic") && (G = "italic", a = a.replace(/italic/gi, "").trim() || "400");
|
|
8104
8105
|
const t = this.mapFontWeight(a), K = Math.max(1, C.fontSize || 16);
|
|
8105
8106
|
let S = C.fontFamily || "Inter";
|
|
8106
8107
|
const y = ["Bold", "SemiBold", "Medium", "Regular", "Light", "Thin", "ExtraBold", "Black", "Italic"];
|
|
8107
|
-
y.forEach((
|
|
8108
|
-
const
|
|
8109
|
-
|
|
8108
|
+
y.forEach((U) => {
|
|
8109
|
+
const _ = new RegExp(`[\\s-]${U}$`, "i");
|
|
8110
|
+
_.test(S) && (S = S.replace(_, "").trim());
|
|
8110
8111
|
}), A.font = `${G} ${t} ${K}px "${S}", sans-serif`;
|
|
8111
8112
|
const N = C.textVerticalAlign || "top";
|
|
8112
8113
|
A.textBaseline = "top";
|
|
8113
8114
|
const M = C.textAlign || "left";
|
|
8114
8115
|
A.textAlign = M;
|
|
8115
|
-
const e = C.letterSpacing || 0, Y = C.paragraphSpacing || 0, j = (C.lineHeight || 1.2) * K, l = Math.ceil(C.width || E || 200) + 0.5, r = `${G} ${t} ${K}px "${S}", sans-serif`, v = (
|
|
8116
|
-
if (e === 0) return A.measureText(
|
|
8117
|
-
let
|
|
8118
|
-
for (let
|
|
8119
|
-
|
|
8120
|
-
return
|
|
8116
|
+
const e = C.letterSpacing || 0, Y = C.paragraphSpacing || 0, j = (C.lineHeight || 1.2) * K, l = Math.ceil(C.width || E || 200) + 0.5, r = `${G} ${t} ${K}px "${S}", sans-serif`, v = (U) => {
|
|
8117
|
+
if (e === 0) return A.measureText(U).width;
|
|
8118
|
+
let _ = 0;
|
|
8119
|
+
for (let f = 0; f < U.length; f++)
|
|
8120
|
+
_ += A.measureText(U[f]).width + e;
|
|
8121
|
+
return _ - e;
|
|
8121
8122
|
}, n = `${h}|${r}|${e}|${Y}`;
|
|
8122
|
-
let
|
|
8123
|
-
if (!
|
|
8124
|
-
const
|
|
8125
|
-
|
|
8126
|
-
}
|
|
8127
|
-
const P =
|
|
8128
|
-
let
|
|
8129
|
-
const
|
|
8130
|
-
let
|
|
8131
|
-
i > 0 && (N === "top" ?
|
|
8132
|
-
const
|
|
8133
|
-
var
|
|
8134
|
-
const
|
|
8135
|
-
(
|
|
8123
|
+
let q = this.pretextCache.get(n);
|
|
8124
|
+
if (!q && (q = eE(h, r), this.pretextCache.set(n, q), this.pretextCache.size > 1e3)) {
|
|
8125
|
+
const U = this.pretextCache.keys().next().value;
|
|
8126
|
+
U && this.pretextCache.delete(U);
|
|
8127
|
+
}
|
|
8128
|
+
const P = q ? nE(q, l, j) : { height: 0, lines: [] }, sA = (P == null ? void 0 : P.height) ?? 0, EA = (P == null ? void 0 : P.lines) ?? [];
|
|
8129
|
+
let T = sA;
|
|
8130
|
+
const V = this.getFontLeadingFactor(C.fontFamily || "Inter"), IA = (j - K) * V;
|
|
8131
|
+
let x = Math.round(-T / 2);
|
|
8132
|
+
i > 0 && (N === "top" ? x = Math.round(-i / 2) : N === "middle" || N === "center" ? x = Math.round(-T / 2) : N === "bottom" && (x = Math.round(i / 2 - T))), x += IA;
|
|
8133
|
+
const d = (U, _, f, $, hA) => {
|
|
8134
|
+
var FA, NA, u;
|
|
8135
|
+
const KA = (!w || o) && (I.behaviors || []).some(
|
|
8136
|
+
(O) => O.enabled && (O.type.toString().includes("Text") || ["Typewriter", "Scramble", "Wave", "Bounce", "GlitchText", "Reveal3D", "RevealSlide", "RevealBlur"].includes(O.type))
|
|
8136
8137
|
);
|
|
8137
|
-
if (e === 0 && !
|
|
8138
|
-
|
|
8138
|
+
if (e === 0 && !KA && (C.enableSegments !== !0 || !C.segments || C.segments.length === 0))
|
|
8139
|
+
$ ? A.strokeText(U, _, f) : A.fillText(U, _, f);
|
|
8139
8140
|
else {
|
|
8140
|
-
const
|
|
8141
|
-
let
|
|
8142
|
-
M === "center" ?
|
|
8143
|
-
let
|
|
8144
|
-
const
|
|
8145
|
-
(
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
].includes(
|
|
8141
|
+
const O = v(U);
|
|
8142
|
+
let L = _;
|
|
8143
|
+
M === "center" ? L -= O / 2 : M === "right" && (L -= O);
|
|
8144
|
+
let R = L;
|
|
8145
|
+
const m = w && !o ? [] : ((FA = I.behaviors) == null ? void 0 : FA.filter(
|
|
8146
|
+
(W) => [
|
|
8147
|
+
Z.Typewriter,
|
|
8148
|
+
Z.Scramble,
|
|
8149
|
+
Z.Wave,
|
|
8150
|
+
Z.Bounce,
|
|
8151
|
+
Z.GlitchText,
|
|
8152
|
+
Z.TextTrail,
|
|
8153
|
+
Z.Reveal3D,
|
|
8154
|
+
Z.RevealSlide,
|
|
8155
|
+
Z.RevealBlur,
|
|
8156
|
+
Z.TextLiquid,
|
|
8157
|
+
Z.TextVortex,
|
|
8158
|
+
Z.TextExplosion,
|
|
8159
|
+
Z.TextRain,
|
|
8160
|
+
Z.TextGravity,
|
|
8161
|
+
Z.TextElastic,
|
|
8162
|
+
Z.TextMatrix,
|
|
8163
|
+
Z.TextNeon,
|
|
8164
|
+
Z.TextGlitch3D,
|
|
8165
|
+
Z.TextDissolve,
|
|
8166
|
+
Z.TextOrganic,
|
|
8167
|
+
Z.TextBreathe,
|
|
8168
|
+
Z.TextFloral,
|
|
8169
|
+
Z.TextSmoke,
|
|
8170
|
+
Z.TextVariable,
|
|
8171
|
+
Z.TextMagnet,
|
|
8172
|
+
Z.TextSpin,
|
|
8173
|
+
Z.TextZing,
|
|
8174
|
+
Z.TextPerspective,
|
|
8175
|
+
Z.TextMirror
|
|
8176
|
+
].includes(W.type) && W.enabled
|
|
8176
8177
|
)) || [];
|
|
8177
|
-
for (let
|
|
8178
|
-
let
|
|
8179
|
-
const gA =
|
|
8180
|
-
let
|
|
8181
|
-
if (
|
|
8182
|
-
const
|
|
8183
|
-
if (
|
|
8184
|
-
this.currentTime * (
|
|
8185
|
-
else if (
|
|
8186
|
-
Math.max(0, Math.min(1, this.currentTime / (
|
|
8187
|
-
else if (
|
|
8188
|
-
|
|
8189
|
-
else if (
|
|
8190
|
-
const X = Math.max(0, this.currentTime % 2 - gA * (
|
|
8191
|
-
X < 1 && (
|
|
8192
|
-
} else if (
|
|
8193
|
-
const X = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - gA * (
|
|
8194
|
-
X && (
|
|
8195
|
-
} else if (
|
|
8196
|
-
const X = Math.max(0, Math.min(1, this.currentTime * (
|
|
8197
|
-
CA *= X, F *= X,
|
|
8198
|
-
} else if (
|
|
8199
|
-
const X = Math.max(0, Math.min(1, this.currentTime * 1.5 - gA * 0.05)),
|
|
8200
|
-
|
|
8201
|
-
} else if (
|
|
8178
|
+
for (let W = 0; W < U.length; W++) {
|
|
8179
|
+
let GA = U[W];
|
|
8180
|
+
const gA = hA + W;
|
|
8181
|
+
let DA = 0, kA = 0, CA = 1, F = 1, b = 0, H = 1, iA = GA;
|
|
8182
|
+
if (m.forEach((z) => {
|
|
8183
|
+
const AA = z.settings || {}, oA = AA.strength || 1, QA = Date.now();
|
|
8184
|
+
if (z.type === Z.Typewriter)
|
|
8185
|
+
this.currentTime * (AA.speed || 1) - gA * (AA.stagger || 0.05) < 0 && (H = 0);
|
|
8186
|
+
else if (z.type === Z.Scramble)
|
|
8187
|
+
Math.max(0, Math.min(1, this.currentTime / (AA.duration || 1.5)) - gA * 0.02) < 1 && Math.random() < 0.3 && (iA = "$%#@!*&"[Math.floor(Math.random() * 7)]);
|
|
8188
|
+
else if (z.type === Z.Wave)
|
|
8189
|
+
kA += Math.sin(this.currentTime * 5 * (AA.speed || 1) + gA * (AA.frequency || 1)) * (AA.amplitude || 20) * oA;
|
|
8190
|
+
else if (z.type === Z.Bounce) {
|
|
8191
|
+
const X = Math.max(0, this.currentTime % 2 - gA * (AA.stagger || 0.1));
|
|
8192
|
+
X < 1 && (kA -= Math.abs(Math.sin(X * Math.PI)) * (AA.height || 50) * oA);
|
|
8193
|
+
} else if (z.type === Z.TextTrail) {
|
|
8194
|
+
const X = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - gA * (AA.delay || 5))];
|
|
8195
|
+
X && (DA += (X.x - (Q.x + R)) * oA * 0.2, kA += (X.y - (Q.y + f + kA)) * oA * 0.2);
|
|
8196
|
+
} else if (z.type === Z.Reveal3D) {
|
|
8197
|
+
const X = Math.max(0, Math.min(1, this.currentTime * (AA.speed || 1) - gA * (AA.stagger || 0.1)));
|
|
8198
|
+
CA *= X, F *= X, H = X;
|
|
8199
|
+
} else if (z.type === Z.RevealSlide) {
|
|
8200
|
+
const X = Math.max(0, Math.min(1, this.currentTime * 1.5 - gA * 0.05)), aA = (1 - X) * (AA.distance || 40) * oA, SA = AA.direction || "up";
|
|
8201
|
+
SA === "up" ? kA -= aA : SA === "down" ? kA += aA : SA === "left" ? DA -= aA : SA === "right" && (DA += aA), H = X;
|
|
8202
|
+
} else if (z.type === Z.RevealBlur) {
|
|
8202
8203
|
const X = Math.max(0, Math.min(1, this.currentTime * 1.2 - gA * 0.1));
|
|
8203
|
-
|
|
8204
|
-
} else if (
|
|
8205
|
-
const X = Math.max(0, Math.sin(QA * 1e-3 * (
|
|
8206
|
-
|
|
8207
|
-
} else if (
|
|
8208
|
-
const X = QA * 2e-3 * (
|
|
8209
|
-
|
|
8210
|
-
} else if (
|
|
8211
|
-
const X =
|
|
8212
|
-
if (
|
|
8213
|
-
const
|
|
8214
|
-
|
|
8204
|
+
H = X, DA += (1 - X) * 5;
|
|
8205
|
+
} else if (z.type === Z.TextLiquid) {
|
|
8206
|
+
const X = Math.max(0, Math.sin(QA * 1e-3 * (AA.speed || 1) + gA * 0.5));
|
|
8207
|
+
kA += X * (AA.amplitude || 10) * oA, F *= 1 + X * 0.2;
|
|
8208
|
+
} else if (z.type === Z.TextVortex) {
|
|
8209
|
+
const X = QA * 2e-3 * (AA.speed || 1) + gA * 0.2, aA = (1 - (Math.sin(QA * 1e-3) * 0.5 + 0.5)) * (AA.radius || 50);
|
|
8210
|
+
DA += Math.cos(X) * aA * oA, kA += Math.sin(X) * aA * oA;
|
|
8211
|
+
} else if (z.type === Z.TextExplosion) {
|
|
8212
|
+
const X = AA.force || 1, aA = this.currentTime % 2;
|
|
8213
|
+
if (aA < 1) {
|
|
8214
|
+
const SA = (gA / U.length - 0.5) * Math.PI * 2, UA = aA * 100 * X;
|
|
8215
|
+
DA += Math.cos(SA) * UA * oA, kA += Math.sin(SA) * UA * oA, H = 1 - aA;
|
|
8215
8216
|
}
|
|
8216
|
-
} else if (
|
|
8217
|
-
const X =
|
|
8218
|
-
|
|
8219
|
-
} else if (
|
|
8220
|
-
const X =
|
|
8221
|
-
|
|
8222
|
-
} else if (
|
|
8223
|
-
const X =
|
|
8217
|
+
} else if (z.type === Z.TextRain) {
|
|
8218
|
+
const X = AA.speed || 1, aA = AA.height || 100, SA = (QA * 1e-3 * X + gA * 0.1) % 1;
|
|
8219
|
+
kA -= (1 - SA) * aA * oA, H = SA > 0.1 ? 1 : SA * 10;
|
|
8220
|
+
} else if (z.type === Z.TextGravity) {
|
|
8221
|
+
const X = AA.gravity || 9.8, aA = this.currentTime % 3 / 3, SA = 0.5 * X * Math.pow(aA * 10, 2);
|
|
8222
|
+
SA < 100 ? kA += SA * oA : kA += 100 * oA;
|
|
8223
|
+
} else if (z.type === Z.TextMatrix) {
|
|
8224
|
+
const X = AA.speed || 1;
|
|
8224
8225
|
if (Math.random() < 0.1 * X) {
|
|
8225
|
-
const
|
|
8226
|
-
iA =
|
|
8226
|
+
const SA = "0123456789ABCDEF!@#$%^&*";
|
|
8227
|
+
iA = SA[Math.floor(Math.random() * SA.length)];
|
|
8227
8228
|
}
|
|
8228
|
-
|
|
8229
|
-
} else if (
|
|
8229
|
+
H = 0.3 + (Math.sin(QA * 0.01 * X + gA) + 1) / 2 * 0.7;
|
|
8230
|
+
} else if (z.type === Z.TextNeon) {
|
|
8230
8231
|
const X = Math.random() > 0.95 ? 0.5 : 1;
|
|
8231
|
-
|
|
8232
|
-
} else if (
|
|
8233
|
-
Math.sin(gA * 1.5 + QA * 2e-3 * (
|
|
8234
|
-
else if (
|
|
8235
|
-
const X =
|
|
8236
|
-
|
|
8237
|
-
} else if (
|
|
8238
|
-
const
|
|
8239
|
-
CA *=
|
|
8240
|
-
} else if (
|
|
8241
|
-
const X =
|
|
8242
|
-
|
|
8243
|
-
} else if (
|
|
8232
|
+
H = (0.7 + (Math.sin(QA * 5e-3) + 1) / 2 * 0.3) * X;
|
|
8233
|
+
} else if (z.type === Z.TextDissolve)
|
|
8234
|
+
Math.sin(gA * 1.5 + QA * 2e-3 * (AA.speed || 1)) > 0.5 && (H = 0);
|
|
8235
|
+
else if (z.type === Z.TextOrganic) {
|
|
8236
|
+
const X = AA.speed || 1, aA = AA.amplitude || 10;
|
|
8237
|
+
DA += Math.sin(QA * 2e-3 * X + gA) * aA * oA, kA += Math.cos(QA * 15e-4 * X + gA * 0.7) * aA * oA;
|
|
8238
|
+
} else if (z.type === Z.TextBreathe) {
|
|
8239
|
+
const aA = 1 + (Math.sin(QA * 3e-3 + gA * 0.2) + 1) / 2 * 0.2 * oA;
|
|
8240
|
+
CA *= aA, F *= aA;
|
|
8241
|
+
} else if (z.type === Z.TextSpin) {
|
|
8242
|
+
const X = AA.speed || 1;
|
|
8243
|
+
b += QA * 0.01 * X + gA;
|
|
8244
|
+
} else if (z.type === Z.TextMagnet) {
|
|
8244
8245
|
const X = this.pointerHistory[this.pointerHistory.length - 1];
|
|
8245
8246
|
if (X) {
|
|
8246
|
-
const
|
|
8247
|
-
|
|
8247
|
+
const aA = X.x - (Q.x + R), SA = X.y - (Q.y + f);
|
|
8248
|
+
b = Math.atan2(SA, aA);
|
|
8248
8249
|
}
|
|
8249
|
-
} else if (
|
|
8250
|
-
const X =
|
|
8251
|
-
CA *=
|
|
8252
|
-
} else if (
|
|
8253
|
-
|
|
8254
|
-
else if (
|
|
8255
|
-
const X =
|
|
8256
|
-
|
|
8257
|
-
} else if (
|
|
8258
|
-
const X =
|
|
8259
|
-
|
|
8260
|
-
} else if (
|
|
8261
|
-
const X =
|
|
8262
|
-
CA *= 1 +
|
|
8263
|
-
} else if (
|
|
8264
|
-
const X =
|
|
8265
|
-
|
|
8266
|
-
} else if (
|
|
8267
|
-
const X =
|
|
8268
|
-
F *= 1 +
|
|
8269
|
-
} else if (
|
|
8270
|
-
const X =
|
|
8271
|
-
Math.random() < 0.2 && (
|
|
8272
|
-
} else if (
|
|
8273
|
-
const X =
|
|
8274
|
-
Math.random() < 0.1 && (
|
|
8250
|
+
} else if (z.type === Z.TextPerspective) {
|
|
8251
|
+
const X = U.length / 2, aA = (gA - X) / X, SA = 1 - Math.abs(aA) * 0.3 * oA;
|
|
8252
|
+
CA *= SA, F *= SA, DA += aA * 20 * oA;
|
|
8253
|
+
} else if (z.type === Z.TextMirror)
|
|
8254
|
+
H *= 0.8;
|
|
8255
|
+
else if (z.type === Z.TextFloral) {
|
|
8256
|
+
const X = AA.speed || 1, aA = AA.stagger || 0.1, SA = (QA * 1e-3 * X + gA * aA) % 2;
|
|
8257
|
+
SA < 1 && (CA *= SA, F *= SA, b += SA * Math.PI);
|
|
8258
|
+
} else if (z.type === Z.TextSmoke) {
|
|
8259
|
+
const X = AA.speed || 1, aA = AA.height || 50, SA = (QA * 5e-4 * X + gA * 0.2) % 1;
|
|
8260
|
+
kA -= SA * aA * oA, DA += Math.sin(QA * 2e-3 + gA) * 5 * oA, H = 1 - SA;
|
|
8261
|
+
} else if (z.type === Z.TextVariable) {
|
|
8262
|
+
const X = AA.speed || 1, aA = AA.intensity || 1.5, SA = (Math.sin(QA * 4e-3 * X + gA * 0.3) + 1) / 2;
|
|
8263
|
+
CA *= 1 + SA * (aA - 1) * oA;
|
|
8264
|
+
} else if (z.type === Z.TextZing) {
|
|
8265
|
+
const X = AA.speed || 2, aA = AA.distance || 100, SA = (QA * 2e-3 * X + gA * 0.05) % 1;
|
|
8266
|
+
DA += (1 - SA) * aA * oA, H = SA;
|
|
8267
|
+
} else if (z.type === Z.TextElastic) {
|
|
8268
|
+
const X = AA.stiffness || 0.2, aA = AA.damping || 0.1, SA = Math.sin(QA * 0.01) * Math.exp(-QA * 1e-3 * aA);
|
|
8269
|
+
F *= 1 + SA * X * oA;
|
|
8270
|
+
} else if (z.type === Z.TextGlitch3D) {
|
|
8271
|
+
const X = AA.intensity || 5;
|
|
8272
|
+
Math.random() < 0.2 && (DA += (Math.random() - 0.5) * X, kA += (Math.random() - 0.5) * X, H = 0.8);
|
|
8273
|
+
} else if (z.type === Z.GlitchText) {
|
|
8274
|
+
const X = AA.intensity || 5;
|
|
8275
|
+
Math.random() < 0.1 && (DA += (Math.random() - 0.5) * X, kA += (Math.random() - 0.5) * X, Math.random() < 0.05 && (H = 0.5));
|
|
8275
8276
|
}
|
|
8276
|
-
}),
|
|
8277
|
-
|
|
8277
|
+
}), H <= 0) {
|
|
8278
|
+
R += A.measureText(GA).width + e;
|
|
8278
8279
|
continue;
|
|
8279
8280
|
}
|
|
8280
8281
|
if (C.enableSegments === !0 && ((NA = C.segments) == null ? void 0 : NA.length) > 0) {
|
|
8281
|
-
let
|
|
8282
|
+
let z = 0, AA = null;
|
|
8282
8283
|
for (const oA of C.segments) {
|
|
8283
|
-
if (gA <
|
|
8284
|
-
|
|
8284
|
+
if (gA < z + (oA.text || "").length) {
|
|
8285
|
+
AA = oA;
|
|
8285
8286
|
break;
|
|
8286
8287
|
}
|
|
8287
|
-
|
|
8288
|
+
z += (oA.text || "").length;
|
|
8288
8289
|
}
|
|
8289
|
-
if (
|
|
8290
|
-
let oA =
|
|
8290
|
+
if (AA) {
|
|
8291
|
+
let oA = AA.fontFamily || C.fontFamily || "Inter";
|
|
8291
8292
|
y.forEach((QA) => {
|
|
8292
8293
|
const X = new RegExp(`[\\s-]${QA}$`, "i");
|
|
8293
8294
|
X.test(oA) && (oA = oA.replace(X, "").trim());
|
|
8294
|
-
}), A.font = `${G} ${this.mapFontWeight((
|
|
8295
|
+
}), A.font = `${G} ${this.mapFontWeight((AA.fontWeight || C.fontWeight || "400").toString())} ${AA.fontSize || K}px "${oA}", sans-serif`;
|
|
8295
8296
|
}
|
|
8296
8297
|
}
|
|
8297
|
-
const
|
|
8298
|
-
A.globalAlpha *=
|
|
8298
|
+
const RA = A.globalAlpha;
|
|
8299
|
+
A.globalAlpha *= H, A.save();
|
|
8299
8300
|
const BA = A.measureText(iA).width;
|
|
8300
|
-
if (A.translate(
|
|
8301
|
-
const
|
|
8302
|
-
A.fillStyle =
|
|
8303
|
-
} else
|
|
8304
|
-
A.restore(), A.globalAlpha =
|
|
8301
|
+
if (A.translate(R + DA + BA / 2, f + kA), b !== 0 && A.rotate(b), A.scale(CA, F), w || o) {
|
|
8302
|
+
const z = o ? "#000000" : this.createCanvasFill(A, g.fill, E, i);
|
|
8303
|
+
A.fillStyle = z || g.fill.color || "#ffffff", A.fillText(iA, -BA / 2, 0);
|
|
8304
|
+
} else $ ? A.strokeText(iA, -BA / 2, 0) : A.fillText(iA, -BA / 2, 0);
|
|
8305
|
+
A.restore(), A.globalAlpha = RA, C.enableSegments === !0 && ((u = C.segments) == null ? void 0 : u.length) > 0 && (A.font = `${G} ${this.mapFontWeight((C.fontWeight || "400").toString())} ${K}px "${C.fontFamily || "Inter"}", sans-serif`), R += A.measureText(GA).width + e;
|
|
8305
8306
|
}
|
|
8306
8307
|
}
|
|
8307
8308
|
};
|
|
8308
8309
|
if (w) {
|
|
8309
|
-
let
|
|
8310
|
-
(EA || []).forEach((
|
|
8311
|
-
let
|
|
8312
|
-
M === "center" ?
|
|
8310
|
+
let U = 0, _ = x;
|
|
8311
|
+
(EA || []).forEach((f) => {
|
|
8312
|
+
let $ = -E / 2;
|
|
8313
|
+
M === "center" ? $ = 0 : M === "right" && ($ = E / 2), d(f.text, $, _, !1, U), U += (f.text || "").length + 1, _ += j;
|
|
8313
8314
|
});
|
|
8314
8315
|
} else if (o) {
|
|
8315
|
-
let
|
|
8316
|
-
(EA || []).forEach((
|
|
8317
|
-
let
|
|
8318
|
-
M === "center" ?
|
|
8316
|
+
let U = 0, _ = x;
|
|
8317
|
+
(EA || []).forEach((f) => {
|
|
8318
|
+
let $ = -E / 2;
|
|
8319
|
+
M === "center" ? $ = 0 : M === "right" && ($ = E / 2), d(f.text, $, _, !1, U), U += (f.text || "").length + 1, _ += j;
|
|
8319
8320
|
});
|
|
8320
8321
|
} else {
|
|
8321
8322
|
if (g.fill) {
|
|
8322
|
-
const
|
|
8323
|
-
A.fillStyle =
|
|
8324
|
-
let
|
|
8325
|
-
(EA || []).forEach((
|
|
8326
|
-
let
|
|
8327
|
-
M === "center" ?
|
|
8328
|
-
}), A.globalAlpha =
|
|
8323
|
+
const U = A.globalAlpha, _ = this.createCanvasFill(A, g.fill, E, i);
|
|
8324
|
+
A.fillStyle = _ || g.fill.color || "#000000", A.globalAlpha = U * this.normalizeOpacity(g.fill.opacity ?? 100);
|
|
8325
|
+
let f = 0, $ = x;
|
|
8326
|
+
(EA || []).forEach((hA) => {
|
|
8327
|
+
let KA = Math.round(-E / 2);
|
|
8328
|
+
M === "center" ? KA = 0 : M === "right" && (KA = Math.round(E / 2)), d(hA.text, KA, $, !1, f), f += (hA.text || "").length + 1, $ += j;
|
|
8329
|
+
}), A.globalAlpha = U;
|
|
8329
8330
|
}
|
|
8330
8331
|
if (g.stroke && g.stroke.width > 0) {
|
|
8331
|
-
const
|
|
8332
|
-
A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha =
|
|
8333
|
-
let
|
|
8334
|
-
(EA || []).forEach((
|
|
8335
|
-
let
|
|
8336
|
-
M === "center" ?
|
|
8337
|
-
}), A.globalAlpha =
|
|
8332
|
+
const U = A.globalAlpha;
|
|
8333
|
+
A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha = U * this.normalizeOpacity(g.stroke.opacity ?? 100);
|
|
8334
|
+
let _ = 0, f = x;
|
|
8335
|
+
(EA || []).forEach(($) => {
|
|
8336
|
+
let hA = Math.round(-E / 2);
|
|
8337
|
+
M === "center" ? hA = 0 : M === "right" && (hA = Math.round(E / 2)), d($.text, hA, f, !0, _), _ += ($.text || "").length + 1, f += j;
|
|
8338
|
+
}), A.globalAlpha = U;
|
|
8338
8339
|
}
|
|
8339
8340
|
}
|
|
8340
8341
|
}
|
|
@@ -8562,128 +8563,130 @@ class Ei {
|
|
|
8562
8563
|
}
|
|
8563
8564
|
}
|
|
8564
8565
|
renderInputBox(A, I) {
|
|
8565
|
-
var
|
|
8566
|
-
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((
|
|
8566
|
+
var KA, FA;
|
|
8567
|
+
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((KA = I.geometry) == null ? void 0 : KA.width) || 250, E = ((FA = I.geometry) == null ? void 0 : FA.height) || 45, i = this.focusedId === I.id, w = this.lastHoveredObjectId === I.id, o = g.previewState || "default", s = o !== "default" ? o : i ? "focused" : w ? "hovered" : "default", h = g.label || { visible: !0, text: "Label" }, a = g.helperText || { visible: !1, text: "Helper text" }, G = g.leftIcon || { visible: !1 }, t = g.rightIcon || { visible: !1 }, K = g.multiline === !0, S = g.corner_radius ?? 8, y = g.corners || { tl: S, tr: S, bl: S, br: S }, N = [y.tl, y.tr, y.br, y.bl];
|
|
8567
8568
|
let M = g.backgroundColor || "rgba(31, 41, 55, 1)", e = g.borderColor || "rgba(55, 65, 81, 1)", Y = g.borderWidth ?? 1.5, j = g.color || "#ffffff", l = g.placeholderColor || "rgba(156, 163, 175, 1)", r = g.fontSize || 14;
|
|
8568
8569
|
const v = `${s}Style`, n = g[v];
|
|
8569
8570
|
if (n ? (n.backgroundColor !== void 0 && (M = n.backgroundColor), n.borderColor !== void 0 && (e = n.borderColor), n.borderWidth !== void 0 && (Y = n.borderWidth), n.color !== void 0 && (j = n.color), n.placeholderColor !== void 0 && (l = n.placeholderColor), n.fontSize !== void 0 && (r = n.fontSize)) : s === "focused" ? (e = g.focusBorderColor || "rgba(59, 130, 246, 1)", Y = Math.max(Y, 2)) : s === "hovered" || s === "hover" ? (e = g.hoverBorderColor || e, M = g.hoverBackgroundColor || M) : s === "disabled" ? (M = g.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", e = g.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : s === "error" && (e = "rgba(239, 68, 68, 1)", Y = Math.max(Y, 2)), A.beginPath(), this.drawRoundRect(A, -Q / 2, -E / 2, Q, E, N), A.fillStyle = M, A.fill(), Y > 0 && (A.strokeStyle = e, A.lineWidth = Y, A.stroke(), s === "focused" || s === "focus")) {
|
|
8570
8571
|
A.save(), A.beginPath();
|
|
8571
|
-
const NA = N.map((
|
|
8572
|
+
const NA = N.map((u) => u + 2);
|
|
8572
8573
|
this.drawRoundRect(A, -Q / 2 - 2, -E / 2 - 2, Q + 4, E + 4, NA), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore();
|
|
8573
8574
|
}
|
|
8574
|
-
const
|
|
8575
|
+
const q = (NA, u) => {
|
|
8575
8576
|
if (!NA.visible || !NA.svgPath) return;
|
|
8576
|
-
const
|
|
8577
|
-
if (A.save(), A.translate(
|
|
8578
|
-
const
|
|
8579
|
-
A.scale(gA, gA), A.translate(-12, -12), A.fillStyle =
|
|
8577
|
+
const O = NA.size || 14, L = NA.offset ?? 16, R = NA.color || "#ffffff", m = u ? -(Q / 2) + L : Q / 2 - L, W = NA.svgPath;
|
|
8578
|
+
if (A.save(), A.translate(m, 0), !W.startsWith("<svg")) {
|
|
8579
|
+
const GA = new Path2D(W), gA = O / 24;
|
|
8580
|
+
A.scale(gA, gA), A.translate(-12, -12), A.fillStyle = R, A.fill(GA);
|
|
8580
8581
|
}
|
|
8581
8582
|
A.restore();
|
|
8582
8583
|
};
|
|
8583
|
-
|
|
8584
|
-
const P = g.text || "",
|
|
8585
|
-
A.font = `${
|
|
8586
|
-
const
|
|
8587
|
-
if (A.save(), A.beginPath(), A.rect(
|
|
8588
|
-
const NA =
|
|
8584
|
+
q(G, !0), q(t, !1);
|
|
8585
|
+
const P = g.text || "", sA = g.placeholder || "Enter text...", EA = !P, T = P || sA, V = EA ? l : j, IA = r, x = g.fontFamily || "Inter", d = g.fontWeight || 400;
|
|
8586
|
+
A.font = `${d} ${IA}px "${x}", sans-serif`, A.fillStyle = V, A.textAlign = "left", A.textBaseline = K ? "top" : "middle";
|
|
8587
|
+
const p = g.inputPadding ?? 16, U = G.visible ? (G.offset ?? 16) + (G.size || 14) / 2 + 8 : p, _ = t.visible ? (t.offset ?? 16) + (t.size || 14) / 2 + 8 : p, f = -(Q / 2) + U, $ = Q - U - _, hA = g.inputType === "password" ? "•".repeat(T.length) : T;
|
|
8588
|
+
if (A.save(), A.beginPath(), A.rect(f - 2, -E / 2 + 4, $ + 4, E - 8), A.clip(), K) {
|
|
8589
|
+
const NA = hA.split(`
|
|
8589
8590
|
`);
|
|
8590
|
-
let
|
|
8591
|
-
const
|
|
8592
|
-
let
|
|
8593
|
-
NA.forEach((
|
|
8594
|
-
const
|
|
8595
|
-
let
|
|
8596
|
-
for (let gA = 0; gA <
|
|
8597
|
-
const
|
|
8598
|
-
A.measureText(
|
|
8591
|
+
let u = -E / 2 + p;
|
|
8592
|
+
const O = IA * 1.2;
|
|
8593
|
+
let L = 0;
|
|
8594
|
+
NA.forEach((R, m) => {
|
|
8595
|
+
const W = R.split(" ");
|
|
8596
|
+
let GA = "";
|
|
8597
|
+
for (let gA = 0; gA < W.length; gA++) {
|
|
8598
|
+
const DA = GA + W[gA] + " ";
|
|
8599
|
+
A.measureText(DA).width > $ && gA > 0 ? (A.fillText(GA, f, u), GA = W[gA] + " ", u += O) : GA = DA;
|
|
8599
8600
|
}
|
|
8600
|
-
A.fillText(
|
|
8601
|
-
}), i && !EA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(
|
|
8601
|
+
A.fillText(GA, f, u), L = A.measureText(GA).width, m < NA.length - 1 && (u += O, L = 0);
|
|
8602
|
+
}), i && !EA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(f + L, u, 1.5, IA);
|
|
8602
8603
|
} else {
|
|
8603
|
-
const
|
|
8604
|
-
let
|
|
8605
|
-
if (
|
|
8606
|
-
const
|
|
8607
|
-
A.fillRect(
|
|
8604
|
+
const u = A.measureText(hA).width;
|
|
8605
|
+
let O = 0;
|
|
8606
|
+
if (u > $ && (O = u - $), A.fillText(hA, f - O, 0), i && !EA && Math.floor(performance.now() / 500) % 2 === 0) {
|
|
8607
|
+
const R = f + u - O;
|
|
8608
|
+
A.fillRect(R, -(IA / 2), 1.5, IA);
|
|
8608
8609
|
}
|
|
8609
8610
|
}
|
|
8610
8611
|
if (A.restore(), h.visible !== !1) {
|
|
8611
|
-
const NA = h.text || "Label",
|
|
8612
|
-
A.font = `600 ${
|
|
8613
|
-
const
|
|
8614
|
-
A.fillText(NA,
|
|
8612
|
+
const NA = h.text || "Label", u = h.fontSize || 12, O = h.color || "rgba(156, 163, 175, 1)", L = h.offset ?? 8;
|
|
8613
|
+
A.font = `600 ${u}px "${x}", sans-serif`, A.fillStyle = O, A.textAlign = "left", A.textBaseline = "bottom";
|
|
8614
|
+
const R = -(Q / 2), m = -(E / 2) - L;
|
|
8615
|
+
A.fillText(NA, R, m);
|
|
8615
8616
|
}
|
|
8616
8617
|
if (a.visible === !0) {
|
|
8617
|
-
const NA = a.text || "Helper text",
|
|
8618
|
-
A.font = `400 ${
|
|
8619
|
-
const
|
|
8620
|
-
A.fillText(NA,
|
|
8618
|
+
const NA = a.text || "Helper text", u = a.fontSize || 11, O = s === "error" ? "rgba(239, 68, 68, 1)" : a.color || "rgba(156, 163, 175, 1)", L = a.offset ?? 6;
|
|
8619
|
+
A.font = `400 ${u}px "${x}", sans-serif`, A.fillStyle = O, A.textAlign = "left", A.textBaseline = "top";
|
|
8620
|
+
const R = -(Q / 2), m = E / 2 + L;
|
|
8621
|
+
A.fillText(NA, R, m);
|
|
8621
8622
|
}
|
|
8622
8623
|
}
|
|
8623
8624
|
renderSlider(A, I) {
|
|
8624
|
-
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.geometry) || I.geometry, Q = (C == null ? void 0 : C.options) || I.options || {}, E = g.width || 200, i = Q.value ?? 50, w = Q.min ?? 0, s = (Q.max ?? 100) - w, h = s === 0 ? 0 : (i - w) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, t = Q.trackShape ?? "Rectangle", K = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", N = Q.thumbShape || "Ellipse", M = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, Y = Q.thumbRoundedness ?? 0, j = Q.thumbColor || "#ffffff", l = Q.thumbPath || "", r = Q.thumbIcon || "", v = Q.showValueTooltip ?? !1, n = Q.tooltipBgColor || "#333333",
|
|
8625
|
-
if ((
|
|
8625
|
+
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.geometry) || I.geometry, Q = (C == null ? void 0 : C.options) || I.options || {}, E = g.width || 200, i = Q.value ?? 50, w = Q.min ?? 0, s = (Q.max ?? 100) - w, h = s === 0 ? 0 : (i - w) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, t = Q.trackShape ?? "Rectangle", K = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", N = Q.thumbShape || "Ellipse", M = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, Y = Q.thumbRoundedness ?? 0, j = Q.thumbColor || "#ffffff", l = Q.thumbPath || "", r = Q.thumbIcon || "", v = Q.showValueTooltip ?? !1, n = Q.tooltipBgColor || "#333333", q = Q.tooltipColor || "#ffffff", P = Q.tooltipOffsetX ?? 0, sA = Q.tooltipOffsetY ?? -25, EA = (f, $, hA, KA, FA, NA, u) => {
|
|
8626
|
+
if ((f === "Custom" || f === "Icon") && u)
|
|
8626
8627
|
try {
|
|
8627
|
-
const
|
|
8628
|
-
if (A.save(), A.translate(
|
|
8629
|
-
const
|
|
8630
|
-
A.scale(
|
|
8628
|
+
const O = new Path2D(u);
|
|
8629
|
+
if (A.save(), A.translate($, hA), f === "Icon") {
|
|
8630
|
+
const L = Math.min(KA, FA) / 24;
|
|
8631
|
+
A.scale(L, L), A.translate(-12, -12);
|
|
8631
8632
|
}
|
|
8632
|
-
A.fill(
|
|
8633
|
+
A.fill(O), A.restore();
|
|
8633
8634
|
return;
|
|
8634
|
-
} catch (
|
|
8635
|
-
console.error("Error drawing slider shape in engine:",
|
|
8635
|
+
} catch (O) {
|
|
8636
|
+
console.error("Error drawing slider shape in engine:", O);
|
|
8636
8637
|
}
|
|
8637
|
-
if (A.beginPath(),
|
|
8638
|
-
A.ellipse(
|
|
8639
|
-
else if (
|
|
8640
|
-
this.drawRoundRect(A,
|
|
8641
|
-
else if (
|
|
8642
|
-
A.moveTo(
|
|
8643
|
-
else if (
|
|
8644
|
-
A.moveTo(
|
|
8645
|
-
else if (
|
|
8646
|
-
const
|
|
8647
|
-
for (let
|
|
8648
|
-
const
|
|
8649
|
-
|
|
8638
|
+
if (A.beginPath(), f === "Ellipse")
|
|
8639
|
+
A.ellipse($, hA, KA / 2, FA / 2, 0, 0, Math.PI * 2);
|
|
8640
|
+
else if (f === "Rectangle")
|
|
8641
|
+
this.drawRoundRect(A, $ - KA / 2, hA - FA / 2, KA, FA, NA);
|
|
8642
|
+
else if (f === "Triangle")
|
|
8643
|
+
A.moveTo($, hA - FA / 2), A.lineTo($ + KA / 2, hA + FA / 2), A.lineTo($ - KA / 2, hA + FA / 2), A.closePath();
|
|
8644
|
+
else if (f === "Diamond")
|
|
8645
|
+
A.moveTo($, hA - FA / 2), A.lineTo($ + KA / 2, hA), A.lineTo($, hA + FA / 2), A.lineTo($ - KA / 2, hA), A.closePath();
|
|
8646
|
+
else if (f === "Polygon") {
|
|
8647
|
+
const O = I.geometry.sides || 3, L = I.geometry.radius || Math.min(KA, FA) / 2;
|
|
8648
|
+
for (let R = 0; R < O; R++) {
|
|
8649
|
+
const m = R * 2 * Math.PI / O - Math.PI / 2, W = $ + L * Math.cos(m), GA = hA + L * Math.sin(m);
|
|
8650
|
+
R === 0 ? A.moveTo(W, GA) : A.lineTo(W, GA);
|
|
8650
8651
|
}
|
|
8651
8652
|
A.closePath();
|
|
8652
|
-
} else if (
|
|
8653
|
-
const
|
|
8654
|
-
for (let
|
|
8655
|
-
const
|
|
8656
|
-
A.lineTo(
|
|
8653
|
+
} else if (f === "Star") {
|
|
8654
|
+
const L = Math.min(KA, FA) / 2, R = L / 2;
|
|
8655
|
+
for (let m = 0; m < 5 * 2; m++) {
|
|
8656
|
+
const W = m % 2 === 0 ? L : R, GA = m * Math.PI / 5 - Math.PI / 2;
|
|
8657
|
+
A.lineTo($ + W * Math.cos(GA), hA + W * Math.sin(GA));
|
|
8657
8658
|
}
|
|
8658
8659
|
A.closePath();
|
|
8659
|
-
} else
|
|
8660
|
+
} else f === "Line" && (A.moveTo($ - KA / 2, hA), A.lineTo($ + KA / 2, hA));
|
|
8660
8661
|
A.fill();
|
|
8661
8662
|
};
|
|
8662
8663
|
A.fillStyle = y, t === "Line" ? (A.strokeStyle = y, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(E / 2, 0), A.stroke()) : EA(t, 0, 0, E, a, G, K);
|
|
8663
|
-
const
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8664
|
+
const T = E - M, V = -E / 2 + M / 2 + h * T, IA = V - -E / 2;
|
|
8665
|
+
IA > 0 && (A.fillStyle = S, t === "Line" ? (A.strokeStyle = S, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(V, 0), A.stroke()) : t === "Rectangle" && (A.beginPath(), this.drawRoundRect(A, -E / 2, -a / 2, IA, a, G), A.fill())), A.save(), A.translate(V, 0);
|
|
8666
|
+
const x = A.getTransform(), d = Math.sqrt(x.a * x.a + x.b * x.b) || 1;
|
|
8667
|
+
if (A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4 * d, A.shadowOffsetY = 1 * d, A.fillStyle = j, EA(N, 0, 0, M, e, Y, N === "Icon" ? r : l), A.restore(), v) {
|
|
8668
|
+
A.save(), A.translate(V + P, sA);
|
|
8669
|
+
const f = Math.round(i).toString();
|
|
8667
8670
|
A.font = "10px Inter, sans-serif";
|
|
8668
|
-
const
|
|
8669
|
-
A.beginPath(), this.drawRoundRect(A, -
|
|
8671
|
+
const $ = A.measureText(f), hA = 6, KA = 4, FA = $.width + hA * 2, NA = 14 + KA;
|
|
8672
|
+
A.beginPath(), this.drawRoundRect(A, -FA / 2, -NA / 2, FA, NA, 4), A.fillStyle = n, A.fill(), A.fillStyle = q, A.textAlign = "center", A.textBaseline = "middle", A.fillText(f, 0, 0), A.restore();
|
|
8670
8673
|
}
|
|
8671
|
-
const
|
|
8672
|
-
if (
|
|
8673
|
-
const
|
|
8674
|
-
A.font = `600 ${
|
|
8675
|
-
const
|
|
8676
|
-
A.fillText(
|
|
8674
|
+
const p = Q.label || {}, U = Q.helperText || {}, _ = Q.fontFamily || "Inter";
|
|
8675
|
+
if (p.visible !== !1) {
|
|
8676
|
+
const f = p.text || "Label", $ = p.fontSize || 12, hA = p.color || "rgba(156, 163, 175, 1)", KA = p.offset ?? 8;
|
|
8677
|
+
A.font = `600 ${$}px "${_}", sans-serif`, A.fillStyle = hA, A.textAlign = "left", A.textBaseline = "bottom";
|
|
8678
|
+
const FA = -(E / 2), NA = -(a / 2) - KA;
|
|
8679
|
+
A.fillText(f, FA, NA);
|
|
8677
8680
|
}
|
|
8678
|
-
if (
|
|
8679
|
-
const
|
|
8680
|
-
A.font = `400 ${
|
|
8681
|
-
const
|
|
8682
|
-
A.fillText(
|
|
8681
|
+
if (U.visible === !0) {
|
|
8682
|
+
const f = U.text || "Helper text", $ = U.fontSize || 11, hA = U.color || "rgba(156, 163, 175, 1)", KA = U.offset ?? 6;
|
|
8683
|
+
A.font = `400 ${$}px "${_}", sans-serif`, A.fillStyle = hA, A.textAlign = "left", A.textBaseline = "top";
|
|
8684
|
+
const FA = -(E / 2), NA = a / 2 + KA;
|
|
8685
|
+
A.fillText(f, FA, NA);
|
|
8683
8686
|
}
|
|
8684
8687
|
}
|
|
8685
8688
|
renderDropdown(A, I) {
|
|
8686
|
-
var
|
|
8689
|
+
var sA;
|
|
8687
8690
|
const C = this.objectStates.get(I.id);
|
|
8688
8691
|
if (!C) return;
|
|
8689
8692
|
const g = C.options || I.options || {}, Q = I.geometry.width || 160, E = I.geometry.height || 40, i = -Q / 2, w = -E / 2, o = g.corner_radius ?? 6, s = g.disabled || g.previewState === "disabled", h = this.lastHoveredObjectId === I.id || g.previewState === "hover", a = (g.isOpen || g.previewState === "active") && !s;
|
|
@@ -8697,16 +8700,16 @@ class Ei {
|
|
|
8697
8700
|
if (M !== "none") {
|
|
8698
8701
|
const EA = i + Q - N - e / 2;
|
|
8699
8702
|
A.save(), A.translate(EA, 0);
|
|
8700
|
-
const
|
|
8701
|
-
if (A.rotate(
|
|
8703
|
+
const T = a ? g.openIconAngle ?? 180 : g.closedIconAngle ?? 0;
|
|
8704
|
+
if (A.rotate(T * Math.PI / 180), A.strokeStyle = Y, A.fillStyle = Y, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", M === "chevron")
|
|
8702
8705
|
A.beginPath(), A.moveTo(-e / 2, -e * 0.2), A.lineTo(0, e * 0.2), A.lineTo(e / 2, -e * 0.2), A.stroke();
|
|
8703
8706
|
else if (M === "custom" || M === "path") {
|
|
8704
|
-
const
|
|
8705
|
-
if (
|
|
8706
|
-
const IA = new Path2D(
|
|
8707
|
+
const V = a && g.openIconPath || g.closedIconPath;
|
|
8708
|
+
if (V) {
|
|
8709
|
+
const IA = new Path2D(V);
|
|
8707
8710
|
A.save();
|
|
8708
|
-
const
|
|
8709
|
-
A.scale(
|
|
8711
|
+
const x = e / 24;
|
|
8712
|
+
A.scale(x, x), A.translate(-12, -12), A.fill(IA), A.restore();
|
|
8710
8713
|
}
|
|
8711
8714
|
}
|
|
8712
8715
|
A.restore();
|
|
@@ -8715,24 +8718,24 @@ class Ei {
|
|
|
8715
8718
|
A.font = `${r} ${l}px ${v}`;
|
|
8716
8719
|
const n = s ? g.disabledColor || "#9ca3af" : !g.selectedOption && g.placeholder ? "#9ca3af" : K;
|
|
8717
8720
|
A.fillStyle = this.createCanvasFill(A, typeof n == "string" ? { type: "Solid", color: n } : n, Q, E) || "#333333", A.textAlign = "left", A.textBaseline = "middle";
|
|
8718
|
-
const
|
|
8721
|
+
const q = M === "none" ? 0 : e + 8, P = Q - N * 2 - q;
|
|
8719
8722
|
if (A.save(), A.beginPath(), A.rect(i + N, w, P, E), A.clip(), A.fillText(j, i + N, 0), A.restore(), a && !s) {
|
|
8720
|
-
const EA = w + E + 4,
|
|
8723
|
+
const EA = w + E + 4, T = g.optionsList || [], V = g.itemHeight || 32, IA = g.listPadding ?? 4, x = T.length * V + IA * 2, d = g.listCornerRadius ?? o;
|
|
8721
8724
|
A.save();
|
|
8722
|
-
const
|
|
8723
|
-
A.shadowColor = typeof
|
|
8724
|
-
const
|
|
8725
|
-
|
|
8726
|
-
const
|
|
8727
|
-
A.font = `${r} ${
|
|
8728
|
-
const
|
|
8729
|
-
if (
|
|
8730
|
-
A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q,
|
|
8725
|
+
const p = g.listShadow || {}, U = A.getTransform(), _ = Math.sqrt(U.a * U.a + U.b * U.b) || 1;
|
|
8726
|
+
A.shadowColor = typeof p.color == "string" ? p.color : ((sA = p.color) == null ? void 0 : sA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = (p.blur ?? 12) * _, A.shadowOffsetY = (p.offsetY ?? 6) * _, A.shadowOffsetX = (p.offsetX ?? 0) * _, A.beginPath(), this.drawRoundRect(A, i, EA, Q, x, d), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, x) || "#ffffff", A.fill();
|
|
8727
|
+
const f = g.listBorderWidth ?? 1;
|
|
8728
|
+
f > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: t }, Q, x) || "#e5e7eb", A.lineWidth = f, A.stroke()), A.restore();
|
|
8729
|
+
const $ = g.itemFontSize || l, hA = g.itemFontFamily || v;
|
|
8730
|
+
A.font = `${r} ${$}px ${hA}`, T.forEach((KA, FA) => {
|
|
8731
|
+
const NA = EA + IA + FA * V;
|
|
8732
|
+
if (KA === g.selectedOption)
|
|
8733
|
+
A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, V) || "#f3f4f6", A.fillRect(i + f, NA, Q - f * 2, V), A.fillStyle = g.itemSelectedColor || g.activeColor || K || "#374151";
|
|
8731
8734
|
else if (A.fillStyle = g.listTextColor || K || "#333333", this.activeDropdownId === I.id && this._lastPointerPos) {
|
|
8732
|
-
const
|
|
8733
|
-
|
|
8735
|
+
const O = this._lastPointerPos.y - (EA + IA), L = Math.floor(O / V);
|
|
8736
|
+
FA === L && (A.fillStyle = this.createCanvasFill(A, typeof g.itemHoverBackgroundColor == "string" ? { type: "Solid", color: g.itemHoverBackgroundColor } : g.itemHoverBackgroundColor || { type: "Solid", color: "#f9fafb" }, Q, V) || "#f9fafb", A.fillRect(i + f, NA, Q - f * 2, V), A.fillStyle = g.itemHoverColor || K);
|
|
8734
8737
|
}
|
|
8735
|
-
A.fillText(
|
|
8738
|
+
A.fillText(KA, i + N, NA + V / 2);
|
|
8736
8739
|
});
|
|
8737
8740
|
}
|
|
8738
8741
|
A.globalAlpha = S;
|
|
@@ -8747,8 +8750,8 @@ class Ei {
|
|
|
8747
8750
|
if (K.enabled && K.svgPath) {
|
|
8748
8751
|
const l = K.size || 16, r = K.gap || 8, v = K.position === "left" ? -(A.measureText(G.text || "").width / 2 + l / 2 + r / 2) : A.measureText(G.text || "").width / 2 + l / 2 + r / 2;
|
|
8749
8752
|
A.save(), A.translate(v, 0);
|
|
8750
|
-
const n = new Path2D(K.svgPath),
|
|
8751
|
-
A.scale(
|
|
8753
|
+
const n = new Path2D(K.svgPath), q = l / 24;
|
|
8754
|
+
A.scale(q, q), A.translate(-12, -12), A.fillStyle = K.color || t, A.fill(n), A.restore(), N = K.position === "left" ? l / 2 + r / 2 : -(l / 2 + r / 2);
|
|
8752
8755
|
}
|
|
8753
8756
|
A.fillText(G.text || "Button", N, 0), A.restore();
|
|
8754
8757
|
}
|
|
@@ -8976,48 +8979,52 @@ class Ei {
|
|
|
8976
8979
|
A.moveTo(I + w, C), A.lineTo(I + g - o, C), A.arcTo(I + g, C, I + g, C + o, o), A.lineTo(I + g, C + Q - s), A.arcTo(I + g, C + Q, I + g - s, C + Q, s), A.lineTo(I + h, C + Q), A.arcTo(I, C + Q, I, C + Q - h, h), A.lineTo(I, C + w), A.arcTo(I, C, I + w, C, w), A.closePath();
|
|
8977
8980
|
}
|
|
8978
8981
|
renderListView(A, I) {
|
|
8979
|
-
var EA,
|
|
8980
|
-
const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((EA = I.geometry) == null ? void 0 : EA.width) || 200, E = C.height !== void 0 ? C.height : ((
|
|
8981
|
-
if (A.save(), A.globalAlpha *= n, l > 0
|
|
8982
|
-
const
|
|
8983
|
-
A.
|
|
8984
|
-
|
|
8985
|
-
|
|
8982
|
+
var EA, T, V, IA;
|
|
8983
|
+
const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((EA = I.geometry) == null ? void 0 : EA.width) || 200, E = C.height !== void 0 ? C.height : ((T = I.geometry) == null ? void 0 : T.height) || 300, i = -Q / 2, w = -E / 2, o = C.corner_radius !== void 0 ? C.corner_radius : g.corner_radius ?? 0, s = g.orientation || "vertical", h = g.items || [], a = g.itemGap ?? 10, G = g.itemHeight ?? 50, t = g.itemWidth ?? 200, K = g.scrollOffset ?? 0, S = g.padding ?? 0, y = g.glassEffect !== !1, N = g.accentColor || "#3b82f6", M = g.itemTextColor || "#333333", e = g.itemBackgroundColor || "#ffffff", Y = g.hoveredIndex ?? null, j = g.activeItemIndex ?? null, l = g.glowIntensity ?? 0, r = g.glowColor || "#3b82f6", v = typeof r == "string" ? r : r.color || ((IA = (V = r.stops) == null ? void 0 : V[0]) == null ? void 0 : IA.color) || "#3b82f6", n = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
|
|
8984
|
+
if (A.save(), A.globalAlpha *= n, l > 0) {
|
|
8985
|
+
const x = A.getTransform(), d = Math.sqrt(x.a * x.a + x.b * x.b) || 1;
|
|
8986
|
+
A.shadowColor = v, A.shadowBlur = l * 2 * d, A.shadowOffsetX = 0, A.shadowOffsetY = 0;
|
|
8987
|
+
}
|
|
8988
|
+
if (y) {
|
|
8989
|
+
const x = g.listBackgroundColor || "rgba(31, 41, 55, 0.4)", d = this.createCanvasFill(A, x, Q, E);
|
|
8990
|
+
A.fillStyle = d || "rgba(31, 41, 55, 0.4)", this.drawListViewRect(A, i, w, Q, E, o), A.fill();
|
|
8991
|
+
const p = A.createLinearGradient(i, w, i + Q, w + E);
|
|
8992
|
+
p.addColorStop(0, "rgba(255, 255, 255, 0.15)"), p.addColorStop(0.5, "rgba(255, 255, 255, 0.08)"), p.addColorStop(1, "rgba(255, 255, 255, 0.03)"), A.fillStyle = p, this.drawListViewRect(A, i, w, Q, E, o), A.fill(), A.strokeStyle = "rgba(255, 255, 255, 0.25)", A.lineWidth = 1, this.drawListViewRect(A, i, w, Q, E, o), A.stroke();
|
|
8986
8993
|
} else {
|
|
8987
|
-
const
|
|
8988
|
-
|
|
8989
|
-
const
|
|
8990
|
-
|
|
8994
|
+
const x = g.listBackgroundColor || "transparent", d = this.createCanvasFill(A, x, Q, E);
|
|
8995
|
+
d && (A.fillStyle = d, this.drawListViewRect(A, i, w, Q, E, o), A.fill());
|
|
8996
|
+
const p = g.borderWidth ?? 0;
|
|
8997
|
+
p > 0 && (A.strokeStyle = g.borderColor || "#cccccc", A.lineWidth = p, this.drawListViewRect(A, i, w, Q, E, o), A.stroke());
|
|
8991
8998
|
}
|
|
8992
8999
|
A.shadowBlur = 0, A.save(), this.drawListViewRect(A, i, w, Q, E, o), A.clip();
|
|
8993
|
-
const
|
|
8994
|
-
let P = (s === "vertical" ? w : i) + K +
|
|
8995
|
-
if (A.textBaseline = "middle", h.forEach((
|
|
8996
|
-
const
|
|
8997
|
-
if (
|
|
8998
|
-
const
|
|
8999
|
-
A.fillStyle =
|
|
9000
|
-
const
|
|
9001
|
-
A.globalAlpha =
|
|
9002
|
-
} else if (
|
|
9003
|
-
A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(
|
|
9000
|
+
const q = typeof S == "number" ? S : s === "vertical" ? S[0] : S[3];
|
|
9001
|
+
let P = (s === "vertical" ? w : i) + K + q;
|
|
9002
|
+
if (A.textBaseline = "middle", h.forEach((x, d) => {
|
|
9003
|
+
const p = s === "vertical" ? Q : t, U = s === "vertical" ? G : E, _ = s === "vertical" ? i : P, f = s === "vertical" ? P : w, $ = Y === d, hA = j === d;
|
|
9004
|
+
if (hA) {
|
|
9005
|
+
const O = this.createCanvasFill(A, N, p, U);
|
|
9006
|
+
A.fillStyle = O || N;
|
|
9007
|
+
const L = A.globalAlpha;
|
|
9008
|
+
A.globalAlpha = L * 0.8, A.fillRect(_, f, p, U), A.globalAlpha = L;
|
|
9009
|
+
} else if ($)
|
|
9010
|
+
A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(_, f, p, U);
|
|
9004
9011
|
else if (e !== "transparent") {
|
|
9005
|
-
const
|
|
9006
|
-
A.fillStyle =
|
|
9012
|
+
const O = this.createCanvasFill(A, e, p, U);
|
|
9013
|
+
A.fillStyle = O || e, A.fillRect(_, f, p, U);
|
|
9007
9014
|
}
|
|
9008
|
-
if (
|
|
9009
|
-
const
|
|
9010
|
-
A.fillStyle =
|
|
9015
|
+
if (hA || $) {
|
|
9016
|
+
const O = this.createCanvasFill(A, N, s === "vertical" ? 3 : p, s === "vertical" ? U : 3);
|
|
9017
|
+
A.fillStyle = O || N, s === "vertical" ? A.fillRect(_, f, 3, U) : A.fillRect(_, f + U - 3, p, 3);
|
|
9011
9018
|
}
|
|
9012
|
-
const
|
|
9013
|
-
A.fillStyle =
|
|
9014
|
-
const
|
|
9015
|
-
s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(
|
|
9019
|
+
const KA = hA ? "#ffffff" : y ? "rgba(255, 255, 255, 0.9)" : M;
|
|
9020
|
+
A.fillStyle = KA, A.font = hA || $ ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
|
|
9021
|
+
const FA = typeof x == "string" ? x : (x == null ? void 0 : x.label) || `Item ${d + 1}`, NA = _ + (s === "vertical" ? 16 : p / 2), u = f + U / 2;
|
|
9022
|
+
s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(FA, NA, u), P += (s === "vertical" ? G : t) + a;
|
|
9016
9023
|
}), A.restore(), g.showScrollbar !== !1) {
|
|
9017
|
-
const
|
|
9018
|
-
if (
|
|
9019
|
-
const
|
|
9020
|
-
A.fillStyle =
|
|
9024
|
+
const x = (h.length || 0) * (s === "vertical" ? G : t) + ((h.length || 0) - 1) * a, d = s === "vertical" ? E : Q;
|
|
9025
|
+
if (x > d) {
|
|
9026
|
+
const p = d / x, U = d * p, _ = -K / x * d, f = g.scrollbarColor || "rgba(255,255,255,0.3)", $ = g.scrollbarWidth || 4;
|
|
9027
|
+
A.fillStyle = f, s === "vertical" ? A.fillRect(i + Q - $ - 2, w + _, $, U) : A.fillRect(i + _, w + E - $ - 2, U, $);
|
|
9021
9028
|
}
|
|
9022
9029
|
}
|
|
9023
9030
|
A.restore();
|
|
@@ -9035,15 +9042,15 @@ class Ei {
|
|
|
9035
9042
|
Q.hoveredIndex !== g && (Q.hoveredIndex = g);
|
|
9036
9043
|
}
|
|
9037
9044
|
getListViewItemIndexAtPointer(A, I, C) {
|
|
9038
|
-
var
|
|
9045
|
+
var q, P;
|
|
9039
9046
|
const g = A.options || {}, Q = this.objectStates.get(A.id) || {}, E = g.items || [];
|
|
9040
9047
|
if (E.length === 0) return null;
|
|
9041
|
-
const i = Q.width !== void 0 ? Q.width : ((
|
|
9048
|
+
const i = Q.width !== void 0 ? Q.width : ((q = A.geometry) == null ? void 0 : q.width) || 200, w = Q.height !== void 0 ? Q.height : ((P = A.geometry) == null ? void 0 : P.height) || 300, o = g.orientation || "vertical", s = g.itemGap ?? 10, h = g.itemHeight ?? 50, a = g.itemWidth ?? 200, G = g.scrollOffset ?? 0, t = g.padding ?? 0, K = this.getWorldTransform(A.id), S = I - K.x, y = C - K.y, N = -K.rotation * (Math.PI / 180), M = Math.cos(N), e = Math.sin(N), Y = S * M - y * e, j = S * e + y * M, l = -i / 2, r = -w / 2, v = typeof t == "number" ? t : o === "vertical" ? t[0] : t[3];
|
|
9042
9049
|
let n = (o === "vertical" ? r : l) + G + v;
|
|
9043
|
-
for (let
|
|
9044
|
-
const EA = o === "vertical" ? i : a,
|
|
9045
|
-
if (Y >=
|
|
9046
|
-
return
|
|
9050
|
+
for (let sA = 0; sA < E.length; sA++) {
|
|
9051
|
+
const EA = o === "vertical" ? i : a, T = o === "vertical" ? h : w, V = o === "vertical" ? l : n, IA = o === "vertical" ? n : r;
|
|
9052
|
+
if (Y >= V && Y <= V + EA && j >= IA && j <= IA + T)
|
|
9053
|
+
return sA;
|
|
9047
9054
|
n += (o === "vertical" ? h : a) + s;
|
|
9048
9055
|
}
|
|
9049
9056
|
return null;
|
|
@@ -9062,108 +9069,108 @@ class Ei {
|
|
|
9062
9069
|
if (!g.behaviors || g.behaviors.length === 0) return;
|
|
9063
9070
|
const Q = this.objectStates.get(g.id);
|
|
9064
9071
|
Q && g.behaviors.forEach((E) => {
|
|
9065
|
-
var a, G, t, K, S, y, N, M, e, Y, j, l, r, v, n,
|
|
9072
|
+
var a, G, t, K, S, y, N, M, e, Y, j, l, r, v, n, q, P, sA, EA, T, V, IA, x, d, p, U, _, f, $, hA, KA, FA, NA, u, O, L, R, m, W, GA, gA, DA, kA, CA;
|
|
9066
9073
|
if (!E.enabled) return;
|
|
9067
9074
|
const i = E.startTime || 0, w = E.endTime || 1 / 0;
|
|
9068
9075
|
if (this.currentTime < i || this.currentTime > w) return;
|
|
9069
9076
|
const o = Q.x - I, s = Q.y - C, h = Math.sqrt(o * o + s * s);
|
|
9070
|
-
if (this.frameCount % 240 === 0 && Math.random() < 0.1 && console.log(`[ExodeUI] Executing ${E.type} on ${g.name}`), E.type ===
|
|
9071
|
-
const F = ((a = E.settings) == null ? void 0 : a.radius) || 300,
|
|
9072
|
-
let
|
|
9073
|
-
h < F && (
|
|
9074
|
-
this.applyBehaviorSensor(Q, iA,
|
|
9077
|
+
if (this.frameCount % 240 === 0 && Math.random() < 0.1 && console.log(`[ExodeUI] Executing ${E.type} on ${g.name}`), E.type === Z.Proximity) {
|
|
9078
|
+
const F = ((a = E.settings) == null ? void 0 : a.radius) || 300, b = ((G = E.settings) == null ? void 0 : G.falloff) || "smooth";
|
|
9079
|
+
let H = 0;
|
|
9080
|
+
h < F && (b === "linear" ? H = 1 - h / F : H = Math.pow(1 - h / F, 2)), H > 0 && E.sensors.forEach((iA) => {
|
|
9081
|
+
this.applyBehaviorSensor(Q, iA, H, A, E.settings);
|
|
9075
9082
|
});
|
|
9076
|
-
} else if (E.type ===
|
|
9077
|
-
const F = ((t = E.settings) == null ? void 0 : t.radius) || 400,
|
|
9083
|
+
} else if (E.type === Z.Magnetic) {
|
|
9084
|
+
const F = ((t = E.settings) == null ? void 0 : t.radius) || 400, b = ((K = E.settings) == null ? void 0 : K.strength) || 0.5;
|
|
9078
9085
|
if (h < F && h > 5) {
|
|
9079
|
-
const
|
|
9080
|
-
Q.x -= iA * A * 10, Q.y -=
|
|
9086
|
+
const H = 1 - h / F, iA = o * H * b, RA = s * H * b;
|
|
9087
|
+
Q.x -= iA * A * 10, Q.y -= RA * A * 10;
|
|
9081
9088
|
}
|
|
9082
|
-
} else if (E.type ===
|
|
9083
|
-
const F = ((S = E.settings) == null ? void 0 : S.radius) || 300,
|
|
9089
|
+
} else if (E.type === Z.Repel) {
|
|
9090
|
+
const F = ((S = E.settings) == null ? void 0 : S.radius) || 300, b = ((y = E.settings) == null ? void 0 : y.strength) || 1;
|
|
9084
9091
|
if (h < F) {
|
|
9085
|
-
const
|
|
9086
|
-
Q.x += o / (h || 1) *
|
|
9092
|
+
const H = Math.pow(1 - h / F, 2);
|
|
9093
|
+
Q.x += o / (h || 1) * H * 60 * b * A * 5, Q.y += s / (h || 1) * H * 60 * b * A * 5;
|
|
9087
9094
|
}
|
|
9088
|
-
} else if (E.type ===
|
|
9089
|
-
const F = ((N = E.settings) == null ? void 0 : N.speed) || 1,
|
|
9090
|
-
Q.x += Math.cos(
|
|
9091
|
-
} else if (E.type ===
|
|
9092
|
-
const F = ((e = E.settings) == null ? void 0 : e.radius) || 400,
|
|
9095
|
+
} else if (E.type === Z.Orbit) {
|
|
9096
|
+
const F = ((N = E.settings) == null ? void 0 : N.speed) || 1, b = ((M = E.settings) == null ? void 0 : M.radius) || 30, H = this.currentTime * F * Math.PI * 2;
|
|
9097
|
+
Q.x += Math.cos(H) * b * A * 5, Q.y += Math.sin(H) * b * A * 5, Q.rotation += 2 * A * 5;
|
|
9098
|
+
} else if (E.type === Z.Vortex) {
|
|
9099
|
+
const F = ((e = E.settings) == null ? void 0 : e.radius) || 400, b = ((Y = E.settings) == null ? void 0 : Y.speed) || 2, H = ((j = E.settings) == null ? void 0 : j.strength) || 1;
|
|
9093
9100
|
if (h < F) {
|
|
9094
|
-
const iA = Math.pow(1 - h / F, 1.5),
|
|
9095
|
-
Q.x += BA * iA *
|
|
9101
|
+
const iA = Math.pow(1 - h / F, 1.5), RA = this.currentTime * b * Math.PI * 2, BA = Math.cos(RA) * 30 - o * 0.4, z = Math.sin(RA) * 30 - s * 0.4;
|
|
9102
|
+
Q.x += BA * iA * H * A * 5, Q.y += z * iA * H * A * 5, Q.rotation += 5 * iA * H * A * 5, Q.scale_x *= 1 - iA * 0.1 * H * A, Q.scale_y *= 1 - iA * 0.1 * H * A;
|
|
9096
9103
|
}
|
|
9097
|
-
} else if (E.type ===
|
|
9098
|
-
const F = ((l = E.settings) == null ? void 0 : l.radius) || 300,
|
|
9104
|
+
} else if (E.type === Z.Fluid) {
|
|
9105
|
+
const F = ((l = E.settings) == null ? void 0 : l.radius) || 300, b = ((r = E.settings) == null ? void 0 : r.strength) || 1;
|
|
9099
9106
|
if (h < F) {
|
|
9100
|
-
const
|
|
9101
|
-
Q.x += iA * 10 * A * 5, Q.y +=
|
|
9107
|
+
const H = Math.pow(1 - h / F, 1.2), iA = o / (h || 1) * H * 1.2 * b, RA = s / (h || 1) * H * 1.2 * b;
|
|
9108
|
+
Q.x += iA * 10 * A * 5, Q.y += RA * 10 * A * 5, Q.scale_x *= 1 + H * 0.3 * b * A, Q.scale_y *= 1 + H * 0.3 * b * A;
|
|
9102
9109
|
}
|
|
9103
|
-
} else if (E.type ===
|
|
9104
|
-
const F = ((v = E.settings) == null ? void 0 : v.radius) || 300,
|
|
9110
|
+
} else if (E.type === Z.Elastic) {
|
|
9111
|
+
const F = ((v = E.settings) == null ? void 0 : v.radius) || 300, b = ((n = E.settings) == null ? void 0 : n.strength) || 1;
|
|
9105
9112
|
if (h < F) {
|
|
9106
|
-
const
|
|
9107
|
-
Q.scale_x *= 1 +
|
|
9113
|
+
const H = 1 - h / F;
|
|
9114
|
+
Q.scale_x *= 1 + H * 0.4 * b * A, Q.scale_y *= 1 + H * 0.4 * b * A;
|
|
9108
9115
|
}
|
|
9109
|
-
} else if (E.type ===
|
|
9110
|
-
const F = Q.x - this.canvasWidth / 2,
|
|
9111
|
-
if (Q.x -= F / 1e3 *
|
|
9116
|
+
} else if (E.type === Z.Holographic) {
|
|
9117
|
+
const F = Q.x - this.canvasWidth / 2, b = Q.y - this.canvasHeight / 2, H = ((q = E.settings) == null ? void 0 : q.factor) || 25;
|
|
9118
|
+
if (Q.x -= F / 1e3 * H * A * 5, Q.y -= b / 1e3 * H * A * 5, Q.style) {
|
|
9112
9119
|
const iA = 1 - Math.min(1, h / 400);
|
|
9113
9120
|
Q.style.exposure = (Q.style.exposure || 1) + iA * 0.5 * A;
|
|
9114
9121
|
}
|
|
9115
|
-
} else if (E.type ===
|
|
9116
|
-
const F = ((P = E.settings) == null ? void 0 : P.radius) || 80,
|
|
9122
|
+
} else if (E.type === Z.Sticky) {
|
|
9123
|
+
const F = ((P = E.settings) == null ? void 0 : P.radius) || 80, b = ((sA = E.settings) == null ? void 0 : sA.strength) || 1;
|
|
9117
9124
|
if (h < F) {
|
|
9118
|
-
const
|
|
9119
|
-
Q.x -= o *
|
|
9125
|
+
const H = Math.pow(1 - h / F, 2);
|
|
9126
|
+
Q.x -= o * H * b * A * 10, Q.y -= s * H * b * A * 10, Q.scale_x *= 1 - H * 0.1 * b * A, Q.scale_y *= 1 - H * 0.1 * b * A;
|
|
9120
9127
|
}
|
|
9121
|
-
} else if (E.type ===
|
|
9122
|
-
const F = ((EA = E.settings) == null ? void 0 : EA.size) || 120,
|
|
9128
|
+
} else if (E.type === Z.Dilation) {
|
|
9129
|
+
const F = ((EA = E.settings) == null ? void 0 : EA.size) || 120, b = ((T = E.settings) == null ? void 0 : T.strength) || 1;
|
|
9123
9130
|
if (h < F) {
|
|
9124
|
-
const
|
|
9125
|
-
Q.scale_x *= 1 +
|
|
9131
|
+
const H = 1 - h / F;
|
|
9132
|
+
Q.scale_x *= 1 + H * 0.5 * b * A, Q.scale_y *= 1 + H * 0.5 * b * A;
|
|
9126
9133
|
}
|
|
9127
|
-
} else if (E.type ===
|
|
9128
|
-
const F = ((
|
|
9129
|
-
Q.y +=
|
|
9130
|
-
} else if (E.type ===
|
|
9131
|
-
const F = (((IA = E.settings) == null ? void 0 : IA.frequency) || ((
|
|
9132
|
-
Q.x += Math.sin(
|
|
9133
|
-
} else if (E.type ===
|
|
9134
|
-
const F = (((
|
|
9135
|
-
Q.scale_x *= 1 +
|
|
9136
|
-
} else if (E.type ===
|
|
9137
|
-
const F = ((
|
|
9138
|
-
if (h < F ||
|
|
9139
|
-
const
|
|
9140
|
-
this.applyBehaviorSensor(Q, TA.PositionX, iA *
|
|
9134
|
+
} else if (E.type === Z.Parallax) {
|
|
9135
|
+
const F = ((V = E.settings) == null ? void 0 : V.factor) || 0.05, b = this.canvasHeight / 2, H = (this._lastPointerPos.y - b) * F;
|
|
9136
|
+
Q.y += H * A * 10;
|
|
9137
|
+
} else if (E.type === Z.Noise || E.type === Z.Float) {
|
|
9138
|
+
const F = (((IA = E.settings) == null ? void 0 : IA.frequency) || ((x = E.settings) == null ? void 0 : x.speed) || 1) * 2e-3, b = (((d = E.settings) == null ? void 0 : d.amplitude) || ((p = E.settings) == null ? void 0 : p.range) || 50) * (((U = E.settings) == null ? void 0 : U.strength) || 1), H = Date.now();
|
|
9139
|
+
Q.x += Math.sin(H * F) * b * A, Q.y += Math.cos(H * F * 0.8) * b * A, Q.rotation += Math.sin(H * F * 0.5) * 5 * A;
|
|
9140
|
+
} else if (E.type === Z.Pulse) {
|
|
9141
|
+
const F = (((_ = E.settings) == null ? void 0 : _.speed) || 1) * 5e-3, b = (((f = E.settings) == null ? void 0 : f.scale) || 1.2) - 1, H = Math.sin(Date.now() * F), iA = (($ = E.settings) == null ? void 0 : $.strength) || 1;
|
|
9142
|
+
Q.scale_x *= 1 + H * b * iA * A, Q.scale_y *= 1 + H * b * iA * A, Q.style && (Q.style.exposure = (Q.style.exposure || 1) + Math.max(0, H) * 0.1 * iA * A);
|
|
9143
|
+
} else if (E.type === Z.Draggable) {
|
|
9144
|
+
const F = ((hA = E.settings) == null ? void 0 : hA.radius) || 150, b = this.draggingBehaviors.has(g.id);
|
|
9145
|
+
if (h < F || b) {
|
|
9146
|
+
const H = ((KA = E.settings) == null ? void 0 : KA.strength) || 1, iA = b ? 1 : Math.max(0, 1 - h / F);
|
|
9147
|
+
this.applyBehaviorSensor(Q, TA.PositionX, iA * H, A, E.settings), this.applyBehaviorSensor(Q, TA.PositionY, iA * H, A, E.settings);
|
|
9141
9148
|
}
|
|
9142
|
-
} else if (E.type ===
|
|
9143
|
-
const F = ((
|
|
9144
|
-
(F === "vertical" || F === "both") && (Q.y += this.scrollOffset.y *
|
|
9145
|
-
} else if (E.type ===
|
|
9146
|
-
const F = ((
|
|
9147
|
-
Q.rotation +=
|
|
9148
|
-
} else if (E.type ===
|
|
9149
|
-
const F = (((
|
|
9150
|
-
Q.style && (Q.style.exposure = (Q.style.exposure || 1) +
|
|
9151
|
-
} else if (E.type ===
|
|
9152
|
-
const F = ((
|
|
9153
|
-
Q.rotation = this.lerp(Q.rotation,
|
|
9154
|
-
} else if (E.type ===
|
|
9155
|
-
const F = ((gA = E.settings) == null ? void 0 : gA.strength) || 1,
|
|
9156
|
-
Q.x += (Math.random() - 0.5) *
|
|
9157
|
-
} else if (E.type ===
|
|
9158
|
-
const F = (
|
|
9149
|
+
} else if (E.type === Z.Scroll) {
|
|
9150
|
+
const F = ((FA = E.settings) == null ? void 0 : FA.axis) || "vertical", b = ((NA = E.settings) == null ? void 0 : NA.factor) || 0.5, H = ((u = E.settings) == null ? void 0 : u.strength) || 1;
|
|
9151
|
+
(F === "vertical" || F === "both") && (Q.y += this.scrollOffset.y * b * H * A), (F === "horizontal" || F === "both") && (Q.x += this.scrollOffset.x * b * H * A);
|
|
9152
|
+
} else if (E.type === Z.LookAt) {
|
|
9153
|
+
const F = ((O = E.settings) == null ? void 0 : O.factor) || 1, b = ((L = E.settings) == null ? void 0 : L.strength) || 1, H = Math.atan2(-s, -o) * (180 / Math.PI), iA = Q.rotation, RA = (H - iA + 180) % 360 - 180;
|
|
9154
|
+
Q.rotation += RA * F * b * A * 10;
|
|
9155
|
+
} else if (E.type === Z.Glint || E.type === Z.Scan) {
|
|
9156
|
+
const F = (((R = E.settings) == null ? void 0 : R.speed) || 1) * 4e-3, b = ((m = E.settings) == null ? void 0 : m.strength) || 1, H = (Math.sin(Date.now() * F) + 1) / 2;
|
|
9157
|
+
Q.style && (Q.style.exposure = (Q.style.exposure || 1) + H * b * A * 5), Q.x += (H - 0.5) * 20 * b * A;
|
|
9158
|
+
} else if (E.type === Z.Ratchet) {
|
|
9159
|
+
const F = ((W = E.settings) == null ? void 0 : W.steps) || 12, b = (((GA = E.settings) == null ? void 0 : GA.speed) || 1) * 30, H = Math.floor(Q.rotation / (360 / F)) * (360 / F);
|
|
9160
|
+
Q.rotation = this.lerp(Q.rotation, H + b * A, 0.1);
|
|
9161
|
+
} else if (E.type === Z.Jitter && h < 300) {
|
|
9162
|
+
const F = ((gA = E.settings) == null ? void 0 : gA.strength) || 1, b = (((DA = E.settings) == null ? void 0 : DA.intensity) || 5) * F;
|
|
9163
|
+
Q.x += (Math.random() - 0.5) * b * A * 60, Q.y += (Math.random() - 0.5) * b * A * 60, Q.rotation += (Math.random() - 0.5) * b * A * 120;
|
|
9164
|
+
} else if (E.type === Z.Follower) {
|
|
9165
|
+
const F = (kA = E.settings) == null ? void 0 : kA.targetId;
|
|
9159
9166
|
if (F) {
|
|
9160
|
-
const
|
|
9161
|
-
if (
|
|
9162
|
-
const
|
|
9163
|
-
Q.x += iA *
|
|
9167
|
+
const b = this.objectStates.get(F);
|
|
9168
|
+
if (b) {
|
|
9169
|
+
const H = ((CA = E.settings) == null ? void 0 : CA.stiffness) || 0.1, iA = b.x - Q.x, RA = b.y - Q.y;
|
|
9170
|
+
Q.x += iA * H * A * 60, Q.y += RA * H * A * 60;
|
|
9164
9171
|
}
|
|
9165
9172
|
}
|
|
9166
|
-
} else E.type ===
|
|
9173
|
+
} else E.type === Z.Wrap && (Q.x < 0 ? Q.x = this.canvasWidth : Q.x > this.canvasWidth && (Q.x = 0), Q.y < 0 ? Q.y = this.canvasHeight : Q.y > this.canvasHeight && (Q.y = 0));
|
|
9167
9174
|
});
|
|
9168
9175
|
});
|
|
9169
9176
|
}
|
|
@@ -9284,22 +9291,22 @@ const wi = XQ(
|
|
|
9284
9291
|
v.imageSmoothingEnabled = !0, v.imageSmoothingQuality = "high", K && l.setOnLogCallback(K);
|
|
9285
9292
|
const n = (P) => {
|
|
9286
9293
|
e.current || (e.current = P);
|
|
9287
|
-
const
|
|
9288
|
-
e.current = P, g && l.advance(
|
|
9289
|
-
const EA = window.devicePixelRatio || 1,
|
|
9290
|
-
(r.width !==
|
|
9294
|
+
const sA = (P - e.current) / 1e3;
|
|
9295
|
+
e.current = P, g && l.advance(sA);
|
|
9296
|
+
const EA = window.devicePixelRatio || 1, T = r.getBoundingClientRect(), V = Math.floor(T.width * EA), IA = Math.floor(T.height * EA);
|
|
9297
|
+
(r.width !== V || r.height !== IA) && (r.width = V, r.height = IA), l.render(v, V, IA), M.current = requestAnimationFrame(n);
|
|
9291
9298
|
};
|
|
9292
9299
|
M.current = requestAnimationFrame(n);
|
|
9293
|
-
const
|
|
9300
|
+
const q = () => {
|
|
9294
9301
|
l.handleScroll(window.scrollX, window.scrollY);
|
|
9295
9302
|
};
|
|
9296
|
-
return window.addEventListener("scroll",
|
|
9297
|
-
M.current && cancelAnimationFrame(M.current), window.removeEventListener("scroll",
|
|
9303
|
+
return window.addEventListener("scroll", q, { passive: !0 }), () => {
|
|
9304
|
+
M.current && cancelAnimationFrame(M.current), window.removeEventListener("scroll", q);
|
|
9298
9305
|
};
|
|
9299
9306
|
}, [g]);
|
|
9300
9307
|
const j = (l, r) => {
|
|
9301
|
-
const v = l.currentTarget.getBoundingClientRect(), n = l.clientX - v.left,
|
|
9302
|
-
N.current.handlePointerInput(r, n,
|
|
9308
|
+
const v = l.currentTarget.getBoundingClientRect(), n = l.clientX - v.left, q = l.clientY - v.top, P = v.width, sA = v.height;
|
|
9309
|
+
N.current.handlePointerInput(r, n, q, P, sA);
|
|
9303
9310
|
};
|
|
9304
9311
|
return /* @__PURE__ */ jQ(
|
|
9305
9312
|
"canvas",
|
|
@@ -9358,10 +9365,10 @@ function si() {
|
|
|
9358
9365
|
updateObjectOptions: w
|
|
9359
9366
|
};
|
|
9360
9367
|
}
|
|
9361
|
-
const hi = "6.0.
|
|
9368
|
+
const hi = "6.0.24";
|
|
9362
9369
|
export {
|
|
9363
9370
|
TA as BehaviorSensor,
|
|
9364
|
-
|
|
9371
|
+
Z as BehaviorType,
|
|
9365
9372
|
VQ as ConditionOp,
|
|
9366
9373
|
wi as ExodeUICanvas,
|
|
9367
9374
|
Ei as ExodeUIEngine,
|