exodeui 6.0.34 → 6.0.35
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.js +19 -19
- package/dist/index.mjs +1328 -1321
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var PQ = Object.defineProperty;
|
|
2
2
|
var VQ = (B, A, I) => A in B ? PQ(B, A, { enumerable: !0, configurable: !0, writable: !0, value: I }) : B[A] = I;
|
|
3
|
-
var
|
|
3
|
+
var tA = (B, A, I) => VQ(B, typeof A != "symbol" ? A + "" : A, I);
|
|
4
4
|
import { jsxs as QQ, jsx as DI } from "react/jsx-runtime";
|
|
5
5
|
import { useEffect as PA, forwardRef as zQ, useRef as lI, useState as BQ, useImperativeHandle as _Q, useCallback as II } from "react";
|
|
6
|
-
var
|
|
6
|
+
var P = /* @__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))(P || {}), mA = /* @__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))(mA || {}), $Q = /* @__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))($Q || {}), LI = /* @__PURE__ */ ((B) => (B.AND = "AND", B.OR = "OR", B.NOT = "NOT", B.XOR = "XOR", B))(LI || {});
|
|
7
7
|
function kC(B, A, I) {
|
|
8
8
|
let C = String(B || "").trim();
|
|
9
9
|
if (C && !isNaN(Number(C)) && !C.includes(" ") && !C.endsWith("fr") && !C.endsWith("px") && !C.endsWith("%")) {
|
|
@@ -34,36 +34,36 @@ function NC(B, A, I) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
function AB(B, A, I) {
|
|
37
|
-
var
|
|
37
|
+
var BA, AA;
|
|
38
38
|
const C = B.autoLayout, { direction: g, spacing: Q, padding: E, align: i, wrap: D } = C, o = g === "vertical", s = A.map((d) => {
|
|
39
|
-
const _ = I(d.id),
|
|
40
|
-
let
|
|
41
|
-
if (
|
|
42
|
-
const Y = (_ == null ? void 0 : _.radius) ??
|
|
43
|
-
|
|
39
|
+
const _ = I(d.id), IA = d.geometry;
|
|
40
|
+
let O = (_ == null ? void 0 : _.width) ?? IA.width ?? 100, p = (_ == null ? void 0 : _.height) ?? IA.height ?? 100;
|
|
41
|
+
if (IA.type === "Ellipse" || IA.type === "Polygon" || IA.type === "Star") {
|
|
42
|
+
const Y = (_ == null ? void 0 : _.radius) ?? IA.radius ?? (_ == null ? void 0 : _.outer_radius) ?? IA.outer_radius ?? 50;
|
|
43
|
+
O = Y * 2, p = Y * 2;
|
|
44
44
|
}
|
|
45
|
-
return
|
|
45
|
+
return O *= d.transform.scale_x || 1, p *= d.transform.scale_y || 1, { id: d.id, w: O, h: p, original: d };
|
|
46
46
|
});
|
|
47
47
|
let h = B.width, a = B.height;
|
|
48
|
-
const G = ((
|
|
48
|
+
const G = ((BA = B.layoutProps) == null ? void 0 : BA.width) === "hug", K = ((AA = B.layoutProps) == null ? void 0 : AA.height) === "hug", t = [];
|
|
49
49
|
let S = [], y = 0, F = 0;
|
|
50
50
|
const M = h - E.left - E.right, e = a - E.top - E.bottom;
|
|
51
51
|
s.forEach((d) => {
|
|
52
52
|
D && S.length > 0 && (o ? F + Q + d.h > e : y + Q + d.w > M) ? (t.push({ children: S, width: y, height: F }), S = [d], y = d.w, F = d.h) : (S.push(d), o ? (y = Math.max(y, d.w), F += (S.length > 1 ? Q : 0) + d.h) : (y += (S.length > 1 ? Q : 0) + d.w, F = Math.max(F, d.h)));
|
|
53
53
|
}), S.length > 0 && t.push({ children: S, width: y, height: F }), G && !o && (h = Math.max(...t.map((d) => d.width), 0) + E.left + E.right), K && o && (a = Math.max(...t.map((d) => d.height), 0) + E.top + E.bottom);
|
|
54
54
|
const R = [];
|
|
55
|
-
let
|
|
56
|
-
const
|
|
55
|
+
let x = E.left, b = E.top;
|
|
56
|
+
const L = i.toLowerCase(), V = L === "center" || L.endsWith("-center"), q = L.endsWith("-right"), r = L === "center" || L.startsWith("center-"), u = L.startsWith("bottom-");
|
|
57
57
|
return t.forEach((d) => {
|
|
58
|
-
let _ =
|
|
59
|
-
o ?
|
|
60
|
-
let p = _, Y =
|
|
61
|
-
o ? V ? p += (d.width -
|
|
62
|
-
id:
|
|
63
|
-
x: p +
|
|
64
|
-
y: Y +
|
|
65
|
-
}), o ?
|
|
66
|
-
}), o ?
|
|
58
|
+
let _ = x, IA = b;
|
|
59
|
+
o ? r ? IA = E.top + (a - E.top - E.bottom - d.height) / 2 : u && (IA = a - E.bottom - d.height) : V ? _ = E.left + (h - E.left - E.right - d.width) / 2 : q && (_ = h - E.right - d.width), d.children.forEach((O) => {
|
|
60
|
+
let p = _, Y = IA;
|
|
61
|
+
o ? V ? p += (d.width - O.w) / 2 : q && (p += d.width - O.w) : r ? Y += (d.height - O.h) / 2 : u && (Y += d.height - O.h), R.push({
|
|
62
|
+
id: O.id,
|
|
63
|
+
x: p + O.w / 2 - h / 2,
|
|
64
|
+
y: Y + O.h / 2 - a / 2
|
|
65
|
+
}), o ? IA += O.h + Q : _ += O.w + Q;
|
|
66
|
+
}), o ? x += d.width + Q : b += d.height + Q;
|
|
67
67
|
}), { frameWidth: G ? h : void 0, frameHeight: K ? a : void 0, childUpdates: R };
|
|
68
68
|
}
|
|
69
69
|
function IB(B, A, I) {
|
|
@@ -71,50 +71,50 @@ function IB(B, A, I) {
|
|
|
71
71
|
if (!C) return { childUpdates: [] };
|
|
72
72
|
const { gridColumns: g, gridRows: Q, columnGap: E = 0, rowGap: i = 0, padding: D, align: o } = C;
|
|
73
73
|
let s = B.width, h = B.height;
|
|
74
|
-
const a = s - D.left - D.right, G = h - D.top - D.bottom, K = kC(g || "1fr", a, E), t = kC(Q || "auto", G, i), S = K.length > 0 ? K.reduce((
|
|
75
|
-
let b = 0,
|
|
76
|
-
M ? b = (a - S) / 2 : e && (b = a - S), R ?
|
|
74
|
+
const a = s - D.left - D.right, G = h - D.top - D.bottom, K = kC(g || "1fr", a, E), t = kC(Q || "auto", G, i), S = K.length > 0 ? K.reduce((q, r) => q + r, 0) + (K.length - 1) * E : 0, y = t.length > 0 ? t.reduce((q, r) => q + r, 0) + (t.length - 1) * i : 0, F = o.toLowerCase(), M = F === "center" || F.endsWith("-center"), e = F.endsWith("-right"), R = F === "center" || F.startsWith("center-"), x = F.startsWith("bottom-");
|
|
75
|
+
let b = 0, L = 0;
|
|
76
|
+
M ? b = (a - S) / 2 : e && (b = a - S), R ? L = (G - y) / 2 : x && (L = G - y);
|
|
77
77
|
const V = [];
|
|
78
|
-
return A.forEach((
|
|
79
|
-
var
|
|
80
|
-
const u =
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
let _ = D.left + b + K.slice(0, u).reduce((
|
|
84
|
-
const
|
|
85
|
-
let Y = (
|
|
78
|
+
return A.forEach((q, r) => {
|
|
79
|
+
var l, v;
|
|
80
|
+
const u = r % K.length || 0, BA = Math.floor(r / K.length) || 0;
|
|
81
|
+
BA >= t.length && t.push(100);
|
|
82
|
+
const AA = K[u], d = t[BA];
|
|
83
|
+
let _ = D.left + b + K.slice(0, u).reduce((gA, wA) => gA + wA + E, 0), IA = D.top + L + t.slice(0, BA).reduce((gA, wA) => gA + wA + i, 0);
|
|
84
|
+
const O = I(q.id), p = q.geometry;
|
|
85
|
+
let Y = (O == null ? void 0 : O.width) ?? p.width ?? 100, Z = (O == null ? void 0 : O.height) ?? p.height ?? 100;
|
|
86
86
|
if (p.type === "Ellipse" || p.type === "Polygon" || p.type === "Star") {
|
|
87
|
-
const
|
|
88
|
-
Y =
|
|
87
|
+
const gA = (O == null ? void 0 : O.radius) ?? p.radius ?? (O == null ? void 0 : O.outer_radius) ?? p.outer_radius ?? 50;
|
|
88
|
+
Y = gA * 2, Z = gA * 2;
|
|
89
89
|
}
|
|
90
|
-
Y *=
|
|
91
|
-
let DA = _, j =
|
|
92
|
-
M ? DA += (
|
|
93
|
-
id:
|
|
90
|
+
Y *= q.transform.scale_x || 1, Z *= q.transform.scale_y || 1;
|
|
91
|
+
let DA = _, j = IA;
|
|
92
|
+
M ? DA += (AA - Y) / 2 : e && (DA += AA - Y), R ? j += (d - Z) / 2 : x && (j += d - Z), V.push({
|
|
93
|
+
id: q.id,
|
|
94
94
|
x: DA + Y / 2 - s / 2,
|
|
95
|
-
y: j +
|
|
96
|
-
width: ((
|
|
97
|
-
height: ((
|
|
95
|
+
y: j + Z / 2 - h / 2,
|
|
96
|
+
width: ((l = q.layoutProps) == null ? void 0 : l.width) === "fill" ? AA : void 0,
|
|
97
|
+
height: ((v = q.layoutProps) == null ? void 0 : v.height) === "fill" ? d : void 0
|
|
98
98
|
});
|
|
99
99
|
}), { childUpdates: V };
|
|
100
100
|
}
|
|
101
101
|
let w;
|
|
102
|
-
const
|
|
103
|
-
function
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
let bI =
|
|
108
|
-
function
|
|
109
|
-
bI ===
|
|
102
|
+
const JA = new Array(128).fill(void 0);
|
|
103
|
+
function eA(B) {
|
|
104
|
+
return JA[B];
|
|
105
|
+
}
|
|
106
|
+
JA.push(void 0, null, !0, !1);
|
|
107
|
+
let bI = JA.length;
|
|
108
|
+
function rA(B) {
|
|
109
|
+
bI === JA.length && JA.push(JA.length + 1);
|
|
110
110
|
const A = bI;
|
|
111
|
-
return bI =
|
|
111
|
+
return bI = JA[A], JA[A] = B, A;
|
|
112
112
|
}
|
|
113
113
|
function PI(B, A) {
|
|
114
114
|
try {
|
|
115
115
|
return B.apply(this, A);
|
|
116
116
|
} catch (I) {
|
|
117
|
-
w.__wbindgen_export_0(
|
|
117
|
+
w.__wbindgen_export_0(rA(I));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
const EQ = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) : { decode: () => {
|
|
@@ -125,7 +125,7 @@ let qI = null;
|
|
|
125
125
|
function Hg(B, A) {
|
|
126
126
|
return B >>>= 0, EQ.decode((qI !== null && qI.byteLength !== 0 || (qI = new Uint8Array(w.memory.buffer)), qI).subarray(B, B + A));
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function aA(B) {
|
|
129
129
|
return B == null;
|
|
130
130
|
}
|
|
131
131
|
let GI = null;
|
|
@@ -133,18 +133,18 @@ function TA() {
|
|
|
133
133
|
return (GI === null || GI.buffer.detached === !0 || GI.buffer.detached === void 0 && GI.buffer !== w.memory.buffer) && (GI = new DataView(w.memory.buffer)), GI;
|
|
134
134
|
}
|
|
135
135
|
function _I(B) {
|
|
136
|
-
const A =
|
|
136
|
+
const A = eA(B);
|
|
137
137
|
return function(I) {
|
|
138
|
-
I < 132 || (
|
|
138
|
+
I < 132 || (JA[I] = bI, bI = I);
|
|
139
139
|
}(B), A;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
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 LA = 128;
|
|
145
|
+
function pA(B) {
|
|
146
|
+
if (LA == 1) throw new Error("out of js stack");
|
|
147
|
+
return JA[--LA] = B, LA;
|
|
148
148
|
}
|
|
149
149
|
let pI = null;
|
|
150
150
|
function gB(B, A) {
|
|
@@ -193,85 +193,85 @@ class sI {
|
|
|
193
193
|
}
|
|
194
194
|
castRay(A, I, C, g, Q, E, i, D, o, s, h, a) {
|
|
195
195
|
try {
|
|
196
|
-
|
|
197
|
-
const G = w.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, D,
|
|
196
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), k(Q, J);
|
|
197
|
+
const G = w.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, D, aA(o) ? 4294967297 : o >>> 0, !aA(s), aA(s) ? 0 : s, !aA(h), aA(h) ? 0 : h, pA(a));
|
|
198
198
|
return G === 0 ? void 0 : $g.__wrap(G);
|
|
199
199
|
} finally {
|
|
200
|
-
|
|
200
|
+
JA[LA++] = void 0;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
castRayAndGetNormal(A, I, C, g, Q, E, i, D, o, s, h, a) {
|
|
204
204
|
try {
|
|
205
|
-
|
|
206
|
-
const G = w.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, D,
|
|
205
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), k(Q, J);
|
|
206
|
+
const G = w.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, D, aA(o) ? 4294967297 : o >>> 0, !aA(s), aA(s) ? 0 : s, !aA(h), aA(h) ? 0 : h, pA(a));
|
|
207
207
|
return G === 0 ? void 0 : wg.__wrap(G);
|
|
208
208
|
} finally {
|
|
209
|
-
|
|
209
|
+
JA[LA++] = void 0;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
intersectionsWithRay(A, I, C, g, Q, E, i, D, o, s, h, a, G) {
|
|
213
213
|
try {
|
|
214
|
-
|
|
214
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), k(Q, J), w.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, pA(D), o, aA(s) ? 4294967297 : s >>> 0, !aA(h), aA(h) ? 0 : h, !aA(a), aA(a) ? 0 : a, pA(G));
|
|
215
215
|
} finally {
|
|
216
|
-
|
|
216
|
+
JA[LA++] = void 0, JA[LA++] = void 0;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
intersectionWithShape(A, I, C, g, Q, E, i, D, o, s, h) {
|
|
220
220
|
try {
|
|
221
221
|
const K = w.__wbindgen_add_to_stack_pointer(-16);
|
|
222
|
-
|
|
222
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), k(Q, RA), k(E, KA), w.rawbroadphase_intersectionWithShape(K, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, aA(D) ? 4294967297 : D >>> 0, !aA(o), aA(o) ? 0 : o, !aA(s), aA(s) ? 0 : s, pA(h));
|
|
223
223
|
var a = TA().getInt32(K + 0, !0), G = TA().getFloat64(K + 8, !0);
|
|
224
224
|
return a === 0 ? void 0 : G;
|
|
225
225
|
} finally {
|
|
226
|
-
w.__wbindgen_add_to_stack_pointer(16),
|
|
226
|
+
w.__wbindgen_add_to_stack_pointer(16), JA[LA++] = void 0;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
projectPoint(A, I, C, g, Q, E, i, D, o, s) {
|
|
230
230
|
try {
|
|
231
|
-
|
|
232
|
-
const h = w.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E,
|
|
231
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J);
|
|
232
|
+
const h = w.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, aA(i) ? 4294967297 : i >>> 0, !aA(D), aA(D) ? 0 : D, !aA(o), aA(o) ? 0 : o, pA(s));
|
|
233
233
|
return h === 0 ? void 0 : $I.__wrap(h);
|
|
234
234
|
} finally {
|
|
235
|
-
|
|
235
|
+
JA[LA++] = void 0;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
projectPointAndGetFeature(A, I, C, g, Q, E, i, D, o) {
|
|
239
239
|
try {
|
|
240
|
-
|
|
241
|
-
const s = w.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q,
|
|
240
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J);
|
|
241
|
+
const s = w.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, aA(E) ? 4294967297 : E >>> 0, !aA(i), aA(i) ? 0 : i, !aA(D), aA(D) ? 0 : D, pA(o));
|
|
242
242
|
return s === 0 ? void 0 : $I.__wrap(s);
|
|
243
243
|
} finally {
|
|
244
|
-
|
|
244
|
+
JA[LA++] = void 0;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
intersectionsWithPoint(A, I, C, g, Q, E, i, D, o, s) {
|
|
248
248
|
try {
|
|
249
|
-
|
|
249
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), w.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, pA(Q), E, aA(i) ? 4294967297 : i >>> 0, !aA(D), aA(D) ? 0 : D, !aA(o), aA(o) ? 0 : o, pA(s));
|
|
250
250
|
} finally {
|
|
251
|
-
|
|
251
|
+
JA[LA++] = void 0, JA[LA++] = void 0;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
castShape(A, I, C, g, Q, E, i, D, o, s, h, a, G, K, t) {
|
|
255
255
|
try {
|
|
256
|
-
|
|
257
|
-
const S = w.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, D, o, s, h,
|
|
256
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), k(Q, RA), k(E, J), k(i, KA);
|
|
257
|
+
const S = w.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, D, o, s, h, aA(a) ? 4294967297 : a >>> 0, !aA(G), aA(G) ? 0 : G, !aA(K), aA(K) ? 0 : K, pA(t));
|
|
258
258
|
return S === 0 ? void 0 : og.__wrap(S);
|
|
259
259
|
} finally {
|
|
260
|
-
|
|
260
|
+
JA[LA++] = void 0;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
intersectionsWithShape(A, I, C, g, Q, E, i, D, o, s, h, a) {
|
|
264
264
|
try {
|
|
265
|
-
|
|
265
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), k(Q, RA), k(E, KA), w.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, pA(i), D, aA(o) ? 4294967297 : o >>> 0, !aA(s), aA(s) ? 0 : s, !aA(h), aA(h) ? 0 : h, pA(a));
|
|
266
266
|
} finally {
|
|
267
|
-
|
|
267
|
+
JA[LA++] = void 0, JA[LA++] = void 0;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
collidersWithAabbIntersectingAabb(A, I, C, g, Q, E) {
|
|
271
271
|
try {
|
|
272
|
-
|
|
272
|
+
k(A, fA), k(I, qA), k(C, HA), k(g, J), k(Q, J), w.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, pA(E));
|
|
273
273
|
} finally {
|
|
274
|
-
|
|
274
|
+
JA[LA++] = void 0;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -342,10 +342,10 @@ class DQ {
|
|
|
342
342
|
const Mg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
343
343
|
}, unregister: () => {
|
|
344
344
|
} } : new FinalizationRegistry((B) => w.__wbg_rawcolliderset_free(B >>> 0, 1));
|
|
345
|
-
class
|
|
345
|
+
class HA {
|
|
346
346
|
static __wrap(A) {
|
|
347
347
|
A >>>= 0;
|
|
348
|
-
const I = Object.create(
|
|
348
|
+
const I = Object.create(HA.prototype);
|
|
349
349
|
return I.__wbg_ptr = A, Mg.register(I, I.__wbg_ptr, I), I;
|
|
350
350
|
}
|
|
351
351
|
__destroy_into_raw() {
|
|
@@ -362,7 +362,7 @@ class dA {
|
|
|
362
362
|
}
|
|
363
363
|
coRotation(A) {
|
|
364
364
|
const I = w.rawcolliderset_coRotation(this.__wbg_ptr, A);
|
|
365
|
-
return
|
|
365
|
+
return RA.__wrap(I);
|
|
366
366
|
}
|
|
367
367
|
coTranslationWrtParent(A) {
|
|
368
368
|
const I = w.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr, A);
|
|
@@ -370,7 +370,7 @@ class dA {
|
|
|
370
370
|
}
|
|
371
371
|
coRotationWrtParent(A) {
|
|
372
372
|
const I = w.rawcolliderset_coRotationWrtParent(this.__wbg_ptr, A);
|
|
373
|
-
return I === 0 ? void 0 :
|
|
373
|
+
return I === 0 ? void 0 : RA.__wrap(I);
|
|
374
374
|
}
|
|
375
375
|
coSetTranslation(A, I, C) {
|
|
376
376
|
w.rawcolliderset_coSetTranslation(this.__wbg_ptr, A, I, C);
|
|
@@ -399,7 +399,7 @@ class dA {
|
|
|
399
399
|
return I === 0 ? void 0 : J.__wrap(I);
|
|
400
400
|
}
|
|
401
401
|
coSetHalfExtents(A, I) {
|
|
402
|
-
|
|
402
|
+
k(I, J), w.rawcolliderset_coSetHalfExtents(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
403
403
|
}
|
|
404
404
|
coRadius(A) {
|
|
405
405
|
const I = w.rawcolliderset_coRadius(this.__wbg_ptr, A);
|
|
@@ -545,23 +545,23 @@ class dA {
|
|
|
545
545
|
return w.rawcolliderset_coContactForceEventThreshold(this.__wbg_ptr, A);
|
|
546
546
|
}
|
|
547
547
|
coContainsPoint(A, I) {
|
|
548
|
-
return
|
|
548
|
+
return k(I, J), w.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
|
|
549
549
|
}
|
|
550
550
|
coCastShape(A, I, C, g, Q, E, i, D, o) {
|
|
551
|
-
|
|
551
|
+
k(I, J), k(C, KA), k(g, J), k(Q, RA), k(E, J);
|
|
552
552
|
const s = w.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, D, o);
|
|
553
553
|
return s === 0 ? void 0 : hg.__wrap(s);
|
|
554
554
|
}
|
|
555
555
|
coCastCollider(A, I, C, g, Q, E, i) {
|
|
556
|
-
|
|
556
|
+
k(I, J), k(g, J);
|
|
557
557
|
const D = w.rawcolliderset_coCastCollider(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q, E, i);
|
|
558
558
|
return D === 0 ? void 0 : og.__wrap(D);
|
|
559
559
|
}
|
|
560
560
|
coIntersectsShape(A, I, C, g) {
|
|
561
|
-
return
|
|
561
|
+
return k(I, KA), k(C, J), k(g, RA), w.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
|
-
|
|
564
|
+
k(I, KA), k(C, J), k(g, RA);
|
|
565
565
|
const E = w.rawcolliderset_coContactShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q);
|
|
566
566
|
return E === 0 ? void 0 : TI.__wrap(E);
|
|
567
567
|
}
|
|
@@ -570,18 +570,18 @@ class dA {
|
|
|
570
570
|
return g === 0 ? void 0 : TI.__wrap(g);
|
|
571
571
|
}
|
|
572
572
|
coProjectPoint(A, I, C) {
|
|
573
|
-
|
|
573
|
+
k(I, J);
|
|
574
574
|
const g = w.rawcolliderset_coProjectPoint(this.__wbg_ptr, A, I.__wbg_ptr, C);
|
|
575
575
|
return Dg.__wrap(g);
|
|
576
576
|
}
|
|
577
577
|
coIntersectsRay(A, I, C, g) {
|
|
578
|
-
return
|
|
578
|
+
return k(I, J), k(C, J), w.rawcolliderset_coIntersectsRay(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g) !== 0;
|
|
579
579
|
}
|
|
580
580
|
coCastRay(A, I, C, g, Q) {
|
|
581
|
-
return
|
|
581
|
+
return k(I, J), k(C, J), w.rawcolliderset_coCastRay(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g, Q);
|
|
582
582
|
}
|
|
583
583
|
coCastRayAndGetNormal(A, I, C, g, Q) {
|
|
584
|
-
|
|
584
|
+
k(I, J), k(C, J);
|
|
585
585
|
const E = w.rawcolliderset_coCastRayAndGetNormal(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g, Q);
|
|
586
586
|
return E === 0 ? void 0 : sg.__wrap(E);
|
|
587
587
|
}
|
|
@@ -622,7 +622,7 @@ class dA {
|
|
|
622
622
|
w.rawcolliderset_coSetActiveCollisionTypes(this.__wbg_ptr, A, I);
|
|
623
623
|
}
|
|
624
624
|
coSetShape(A, I) {
|
|
625
|
-
|
|
625
|
+
k(I, KA), w.rawcolliderset_coSetShape(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
626
626
|
}
|
|
627
627
|
coSetContactForceEventThreshold(A, I) {
|
|
628
628
|
w.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr, A, I);
|
|
@@ -634,7 +634,7 @@ class dA {
|
|
|
634
634
|
w.rawcolliderset_coSetMass(this.__wbg_ptr, A, I);
|
|
635
635
|
}
|
|
636
636
|
coSetMassProperties(A, I, C, g) {
|
|
637
|
-
|
|
637
|
+
k(C, J), w.rawcolliderset_coSetMassProperties(this.__wbg_ptr, A, I, C.__wbg_ptr, g);
|
|
638
638
|
}
|
|
639
639
|
constructor() {
|
|
640
640
|
const A = w.rawcolliderset_new();
|
|
@@ -646,27 +646,27 @@ class dA {
|
|
|
646
646
|
contains(A) {
|
|
647
647
|
return w.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
|
|
648
648
|
}
|
|
649
|
-
createCollider(A, I, C, g, Q, E, i, D, o, s, h, a, G, K, t, S, y, F, M, e, R,
|
|
649
|
+
createCollider(A, I, C, g, Q, E, i, D, o, s, h, a, G, K, t, S, y, F, M, e, R, x, b, L) {
|
|
650
650
|
try {
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
var V = TA().getInt32(
|
|
654
|
-
return V === 0 ? void 0 :
|
|
651
|
+
const r = w.__wbindgen_add_to_stack_pointer(-16);
|
|
652
|
+
k(I, KA), k(C, J), k(g, RA), k(i, J), k(L, qA), w.rawcolliderset_createCollider(r, this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, i.__wbg_ptr, D, o, s, h, a, G, K, t, S, y, F, M, e, R, x, b, L.__wbg_ptr);
|
|
653
|
+
var V = TA().getInt32(r + 0, !0), q = TA().getFloat64(r + 8, !0);
|
|
654
|
+
return V === 0 ? void 0 : q;
|
|
655
655
|
} finally {
|
|
656
656
|
w.__wbindgen_add_to_stack_pointer(16);
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
remove(A, I, C, g) {
|
|
660
|
-
|
|
660
|
+
k(I, CI), k(C, qA), w.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
661
661
|
}
|
|
662
662
|
isHandleValid(A) {
|
|
663
663
|
return w.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
|
|
664
664
|
}
|
|
665
665
|
forEachColliderHandle(A) {
|
|
666
666
|
try {
|
|
667
|
-
w.rawcolliderset_forEachColliderHandle(this.__wbg_ptr,
|
|
667
|
+
w.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, pA(A));
|
|
668
668
|
} finally {
|
|
669
|
-
|
|
669
|
+
JA[LA++] = void 0;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
}
|
|
@@ -885,9 +885,9 @@ class CB {
|
|
|
885
885
|
}
|
|
886
886
|
render(A, I, C, g, Q, E, i) {
|
|
887
887
|
try {
|
|
888
|
-
|
|
888
|
+
k(A, qA), k(I, HA), k(C, gI), k(g, QI), k(Q, fA), w.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, pA(i));
|
|
889
889
|
} finally {
|
|
890
|
-
|
|
890
|
+
JA[LA++] = void 0;
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
}
|
|
@@ -930,11 +930,11 @@ class _g {
|
|
|
930
930
|
}
|
|
931
931
|
takeBodies() {
|
|
932
932
|
const A = w.rawdeserializedworld_takeBodies(this.__wbg_ptr);
|
|
933
|
-
return A === 0 ? void 0 :
|
|
933
|
+
return A === 0 ? void 0 : qA.__wrap(A);
|
|
934
934
|
}
|
|
935
935
|
takeColliders() {
|
|
936
936
|
const A = w.rawdeserializedworld_takeColliders(this.__wbg_ptr);
|
|
937
|
-
return A === 0 ? void 0 :
|
|
937
|
+
return A === 0 ? void 0 : HA.__wrap(A);
|
|
938
938
|
}
|
|
939
939
|
takeImpulseJoints() {
|
|
940
940
|
const A = w.rawdeserializedworld_takeImpulseJoints(this.__wbg_ptr);
|
|
@@ -963,16 +963,16 @@ class wQ {
|
|
|
963
963
|
}
|
|
964
964
|
drainCollisionEvents(A) {
|
|
965
965
|
try {
|
|
966
|
-
w.raweventqueue_drainCollisionEvents(this.__wbg_ptr,
|
|
966
|
+
w.raweventqueue_drainCollisionEvents(this.__wbg_ptr, pA(A));
|
|
967
967
|
} finally {
|
|
968
|
-
|
|
968
|
+
JA[LA++] = void 0;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
drainContactForceEvents(A) {
|
|
972
972
|
try {
|
|
973
|
-
w.raweventqueue_drainContactForceEvents(this.__wbg_ptr,
|
|
973
|
+
w.raweventqueue_drainContactForceEvents(this.__wbg_ptr, pA(A));
|
|
974
974
|
} finally {
|
|
975
|
-
|
|
975
|
+
JA[LA++] = void 0;
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
clear() {
|
|
@@ -997,27 +997,27 @@ class WA {
|
|
|
997
997
|
w.__wbg_rawgenericjoint_free(A, 0);
|
|
998
998
|
}
|
|
999
999
|
static spring(A, I, C, g, Q) {
|
|
1000
|
-
|
|
1000
|
+
k(g, J), k(Q, J);
|
|
1001
1001
|
const E = w.rawgenericjoint_spring(A, I, C, g.__wbg_ptr, Q.__wbg_ptr);
|
|
1002
1002
|
return WA.__wrap(E);
|
|
1003
1003
|
}
|
|
1004
1004
|
static rope(A, I, C) {
|
|
1005
|
-
|
|
1005
|
+
k(I, J), k(C, J);
|
|
1006
1006
|
const g = w.rawgenericjoint_rope(A, I.__wbg_ptr, C.__wbg_ptr);
|
|
1007
1007
|
return WA.__wrap(g);
|
|
1008
1008
|
}
|
|
1009
1009
|
static prismatic(A, I, C, g, Q, E) {
|
|
1010
|
-
|
|
1010
|
+
k(A, J), k(I, J), k(C, J);
|
|
1011
1011
|
const i = w.rawgenericjoint_prismatic(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g, Q, E);
|
|
1012
1012
|
return i === 0 ? void 0 : WA.__wrap(i);
|
|
1013
1013
|
}
|
|
1014
1014
|
static fixed(A, I, C, g) {
|
|
1015
|
-
|
|
1015
|
+
k(A, J), k(I, RA), k(C, J), k(g, RA);
|
|
1016
1016
|
const Q = w.rawgenericjoint_fixed(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr);
|
|
1017
1017
|
return WA.__wrap(Q);
|
|
1018
1018
|
}
|
|
1019
1019
|
static revolute(A, I) {
|
|
1020
|
-
|
|
1020
|
+
k(A, J), k(I, J);
|
|
1021
1021
|
const C = w.rawgenericjoint_revolute(A.__wbg_ptr, I.__wbg_ptr);
|
|
1022
1022
|
return C === 0 ? void 0 : WA.__wrap(C);
|
|
1023
1023
|
}
|
|
@@ -1050,11 +1050,11 @@ class gI {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
jointFrameX1(A) {
|
|
1052
1052
|
const I = w.rawimpulsejointset_jointFrameX1(this.__wbg_ptr, A);
|
|
1053
|
-
return
|
|
1053
|
+
return RA.__wrap(I);
|
|
1054
1054
|
}
|
|
1055
1055
|
jointFrameX2(A) {
|
|
1056
1056
|
const I = w.rawimpulsejointset_jointFrameX2(this.__wbg_ptr, A);
|
|
1057
|
-
return
|
|
1057
|
+
return RA.__wrap(I);
|
|
1058
1058
|
}
|
|
1059
1059
|
jointAnchor1(A) {
|
|
1060
1060
|
const I = w.rawimpulsejointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -1065,10 +1065,10 @@ class gI {
|
|
|
1065
1065
|
return J.__wrap(I);
|
|
1066
1066
|
}
|
|
1067
1067
|
jointSetAnchor1(A, I) {
|
|
1068
|
-
|
|
1068
|
+
k(I, J), w.rawimpulsejointset_jointSetAnchor1(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1069
1069
|
}
|
|
1070
1070
|
jointSetAnchor2(A, I) {
|
|
1071
|
-
|
|
1071
|
+
k(I, J), w.rawimpulsejointset_jointSetAnchor2(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1072
1072
|
}
|
|
1073
1073
|
jointContactsEnabled(A) {
|
|
1074
1074
|
return w.rawimpulsejointset_jointContactsEnabled(this.__wbg_ptr, A) !== 0;
|
|
@@ -1105,7 +1105,7 @@ class gI {
|
|
|
1105
1105
|
return this.__wbg_ptr = A >>> 0, eg.register(this, this.__wbg_ptr, this), this;
|
|
1106
1106
|
}
|
|
1107
1107
|
createJoint(A, I, C, g) {
|
|
1108
|
-
return
|
|
1108
|
+
return k(A, WA), w.rawimpulsejointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, C, g);
|
|
1109
1109
|
}
|
|
1110
1110
|
remove(A, I) {
|
|
1111
1111
|
w.rawimpulsejointset_remove(this.__wbg_ptr, A, I);
|
|
@@ -1118,16 +1118,16 @@ class gI {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
forEachJointHandle(A) {
|
|
1120
1120
|
try {
|
|
1121
|
-
w.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr,
|
|
1121
|
+
w.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, pA(A));
|
|
1122
1122
|
} finally {
|
|
1123
|
-
|
|
1123
|
+
JA[LA++] = void 0;
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
1126
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1127
1127
|
try {
|
|
1128
|
-
w.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A,
|
|
1128
|
+
w.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, pA(I));
|
|
1129
1129
|
} finally {
|
|
1130
|
-
|
|
1130
|
+
JA[LA++] = void 0;
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
@@ -1230,9 +1230,9 @@ class CI {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
forEachActiveRigidBodyHandle(A) {
|
|
1232
1232
|
try {
|
|
1233
|
-
w.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr,
|
|
1233
|
+
w.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, pA(A));
|
|
1234
1234
|
} finally {
|
|
1235
|
-
|
|
1235
|
+
JA[LA++] = void 0;
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
@@ -1257,7 +1257,7 @@ class QB {
|
|
|
1257
1257
|
return J.__wrap(A);
|
|
1258
1258
|
}
|
|
1259
1259
|
setUp(A) {
|
|
1260
|
-
|
|
1260
|
+
k(A, J), w.rawkinematiccharactercontroller_setUp(this.__wbg_ptr, A.__wbg_ptr);
|
|
1261
1261
|
}
|
|
1262
1262
|
normalNudgeFactor() {
|
|
1263
1263
|
return w.rawkinematiccharactercontroller_normalNudgeFactor(this.__wbg_ptr);
|
|
@@ -1325,9 +1325,9 @@ class QB {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
computeColliderMovement(A, I, C, g, Q, E, i, D, o, s, h, a) {
|
|
1327
1327
|
try {
|
|
1328
|
-
|
|
1328
|
+
k(I, sI), k(C, fA), k(g, qA), k(Q, HA), k(i, J), w.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i.__wbg_ptr, D, aA(o) ? 4294967297 : Math.fround(o), s, aA(h) ? 4294967297 : h >>> 0, pA(a));
|
|
1329
1329
|
} finally {
|
|
1330
|
-
|
|
1330
|
+
JA[LA++] = void 0;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
1333
|
computedMovement() {
|
|
@@ -1341,7 +1341,7 @@ class QB {
|
|
|
1341
1341
|
return w.rawkinematiccharactercontroller_numComputedCollisions(this.__wbg_ptr) >>> 0;
|
|
1342
1342
|
}
|
|
1343
1343
|
computedCollision(A, I) {
|
|
1344
|
-
return
|
|
1344
|
+
return k(I, DQ), w.rawkinematiccharactercontroller_computedCollision(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
1347
|
const Rg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1366,11 +1366,11 @@ class QI {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
jointFrameX1(A) {
|
|
1368
1368
|
const I = w.rawmultibodyjointset_jointFrameX1(this.__wbg_ptr, A);
|
|
1369
|
-
return
|
|
1369
|
+
return RA.__wrap(I);
|
|
1370
1370
|
}
|
|
1371
1371
|
jointFrameX2(A) {
|
|
1372
1372
|
const I = w.rawmultibodyjointset_jointFrameX2(this.__wbg_ptr, A);
|
|
1373
|
-
return
|
|
1373
|
+
return RA.__wrap(I);
|
|
1374
1374
|
}
|
|
1375
1375
|
jointAnchor1(A) {
|
|
1376
1376
|
const I = w.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -1400,7 +1400,7 @@ class QI {
|
|
|
1400
1400
|
return this.__wbg_ptr = A >>> 0, Rg.register(this, this.__wbg_ptr, this), this;
|
|
1401
1401
|
}
|
|
1402
1402
|
createJoint(A, I, C, g) {
|
|
1403
|
-
return
|
|
1403
|
+
return k(A, WA), w.rawmultibodyjointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, C, g);
|
|
1404
1404
|
}
|
|
1405
1405
|
remove(A, I) {
|
|
1406
1406
|
w.rawmultibodyjointset_remove(this.__wbg_ptr, A, I);
|
|
@@ -1410,16 +1410,16 @@ class QI {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
forEachJointHandle(A) {
|
|
1412
1412
|
try {
|
|
1413
|
-
w.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr,
|
|
1413
|
+
w.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, pA(A));
|
|
1414
1414
|
} finally {
|
|
1415
|
-
|
|
1415
|
+
JA[LA++] = void 0;
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
1418
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1419
1419
|
try {
|
|
1420
|
-
w.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A,
|
|
1420
|
+
w.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, pA(I));
|
|
1421
1421
|
} finally {
|
|
1422
|
-
|
|
1422
|
+
JA[LA++] = void 0;
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
@@ -1445,14 +1445,14 @@ class fA {
|
|
|
1445
1445
|
return this.__wbg_ptr = A >>> 0, Ug.register(this, this.__wbg_ptr, this), this;
|
|
1446
1446
|
}
|
|
1447
1447
|
contact_pairs_with(A, I) {
|
|
1448
|
-
w.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A,
|
|
1448
|
+
w.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, rA(I));
|
|
1449
1449
|
}
|
|
1450
1450
|
contact_pair(A, I) {
|
|
1451
1451
|
const C = w.rawnarrowphase_contact_pair(this.__wbg_ptr, A, I);
|
|
1452
1452
|
return C === 0 ? void 0 : zg.__wrap(C);
|
|
1453
1453
|
}
|
|
1454
1454
|
intersection_pairs_with(A, I) {
|
|
1455
|
-
w.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A,
|
|
1455
|
+
w.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A, rA(I));
|
|
1456
1456
|
}
|
|
1457
1457
|
intersection_pair(A, I) {
|
|
1458
1458
|
return w.rawnarrowphase_intersection_pair(this.__wbg_ptr, A, I) !== 0;
|
|
@@ -1529,10 +1529,10 @@ class BB {
|
|
|
1529
1529
|
return w.rawphysicspipeline_timing_user_changes(this.__wbg_ptr);
|
|
1530
1530
|
}
|
|
1531
1531
|
step(A, I, C, g, Q, E, i, D, o, s) {
|
|
1532
|
-
|
|
1532
|
+
k(A, J), k(I, NI), k(C, CI), k(g, sI), k(Q, fA), k(E, qA), k(i, HA), k(D, gI), k(o, QI), k(s, dg), w.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, D.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr);
|
|
1533
1533
|
}
|
|
1534
1534
|
stepWithEvents(A, I, C, g, Q, E, i, D, o, s, h, a, G, K) {
|
|
1535
|
-
|
|
1535
|
+
k(A, J), k(I, NI), k(C, CI), k(g, sI), k(Q, fA), k(E, qA), k(i, HA), k(D, gI), k(o, QI), k(s, dg), k(h, wQ), w.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, D.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr, h.__wbg_ptr, rA(a), rA(G), rA(K));
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
1538
|
const pC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1567,18 +1567,18 @@ class EB {
|
|
|
1567
1567
|
w.rawpidcontroller_reset_integrals(this.__wbg_ptr);
|
|
1568
1568
|
}
|
|
1569
1569
|
apply_linear_correction(A, I, C, g, Q) {
|
|
1570
|
-
|
|
1570
|
+
k(I, qA), k(g, J), k(Q, J), w.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
|
-
|
|
1573
|
+
k(I, qA), w.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
|
-
|
|
1576
|
+
k(I, qA), k(g, J), k(Q, J);
|
|
1577
1577
|
const E = w.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
|
|
1581
|
+
return k(I, qA), w.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
const HC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1735,10 +1735,10 @@ class sg {
|
|
|
1735
1735
|
const rg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1736
1736
|
}, unregister: () => {
|
|
1737
1737
|
} } : new FinalizationRegistry((B) => w.__wbg_rawrigidbodyset_free(B >>> 0, 1));
|
|
1738
|
-
class
|
|
1738
|
+
class qA {
|
|
1739
1739
|
static __wrap(A) {
|
|
1740
1740
|
A >>>= 0;
|
|
1741
|
-
const I = Object.create(
|
|
1741
|
+
const I = Object.create(qA.prototype);
|
|
1742
1742
|
return I.__wbg_ptr = A, rg.register(I, I.__wbg_ptr, I), I;
|
|
1743
1743
|
}
|
|
1744
1744
|
__destroy_into_raw() {
|
|
@@ -1755,7 +1755,7 @@ class pA {
|
|
|
1755
1755
|
}
|
|
1756
1756
|
rbRotation(A) {
|
|
1757
1757
|
const I = w.rawrigidbodyset_rbRotation(this.__wbg_ptr, A);
|
|
1758
|
-
return
|
|
1758
|
+
return RA.__wrap(I);
|
|
1759
1759
|
}
|
|
1760
1760
|
rbSleep(A) {
|
|
1761
1761
|
w.rawrigidbodyset_rbSleep(this.__wbg_ptr, A);
|
|
@@ -1772,7 +1772,7 @@ class pA {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
rbNextRotation(A) {
|
|
1774
1774
|
const I = w.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, A);
|
|
1775
|
-
return
|
|
1775
|
+
return RA.__wrap(I);
|
|
1776
1776
|
}
|
|
1777
1777
|
rbSetTranslation(A, I, C, g) {
|
|
1778
1778
|
w.rawrigidbodyset_rbSetTranslation(this.__wbg_ptr, A, I, C, g);
|
|
@@ -1781,7 +1781,7 @@ class pA {
|
|
|
1781
1781
|
w.rawrigidbodyset_rbSetRotation(this.__wbg_ptr, A, I, C);
|
|
1782
1782
|
}
|
|
1783
1783
|
rbSetLinvel(A, I, C) {
|
|
1784
|
-
|
|
1784
|
+
k(I, J), w.rawrigidbodyset_rbSetLinvel(this.__wbg_ptr, A, I.__wbg_ptr, C);
|
|
1785
1785
|
}
|
|
1786
1786
|
rbSetAngvel(A, I, C) {
|
|
1787
1787
|
w.rawrigidbodyset_rbSetAngvel(this.__wbg_ptr, A, I, C);
|
|
@@ -1793,13 +1793,13 @@ class pA {
|
|
|
1793
1793
|
w.rawrigidbodyset_rbSetNextKinematicRotation(this.__wbg_ptr, A, I);
|
|
1794
1794
|
}
|
|
1795
1795
|
rbRecomputeMassPropertiesFromColliders(A, I) {
|
|
1796
|
-
|
|
1796
|
+
k(I, HA), w.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1797
1797
|
}
|
|
1798
1798
|
rbSetAdditionalMass(A, I, C) {
|
|
1799
1799
|
w.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr, A, I, C);
|
|
1800
1800
|
}
|
|
1801
1801
|
rbSetAdditionalMassProperties(A, I, C, g, Q) {
|
|
1802
|
-
|
|
1802
|
+
k(C, J), w.rawrigidbodyset_rbSetAdditionalMassProperties(this.__wbg_ptr, A, I, C.__wbg_ptr, g, Q);
|
|
1803
1803
|
}
|
|
1804
1804
|
rbLinvel(A) {
|
|
1805
1805
|
const I = w.rawrigidbodyset_rbLinvel(this.__wbg_ptr, A);
|
|
@@ -1809,7 +1809,7 @@ class pA {
|
|
|
1809
1809
|
return w.rawrigidbodyset_rbAngvel(this.__wbg_ptr, A);
|
|
1810
1810
|
}
|
|
1811
1811
|
rbVelocityAtPoint(A, I) {
|
|
1812
|
-
|
|
1812
|
+
k(I, J);
|
|
1813
1813
|
const C = w.rawrigidbodyset_rbVelocityAtPoint(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1814
1814
|
return J.__wrap(C);
|
|
1815
1815
|
}
|
|
@@ -1925,10 +1925,10 @@ class pA {
|
|
|
1925
1925
|
w.rawrigidbodyset_rbResetTorques(this.__wbg_ptr, A, I);
|
|
1926
1926
|
}
|
|
1927
1927
|
rbAddForce(A, I, C) {
|
|
1928
|
-
|
|
1928
|
+
k(I, J), w.rawrigidbodyset_rbAddForce(this.__wbg_ptr, A, I.__wbg_ptr, C);
|
|
1929
1929
|
}
|
|
1930
1930
|
rbApplyImpulse(A, I, C) {
|
|
1931
|
-
|
|
1931
|
+
k(I, J), w.rawrigidbodyset_rbApplyImpulse(this.__wbg_ptr, A, I.__wbg_ptr, C);
|
|
1932
1932
|
}
|
|
1933
1933
|
rbAddTorque(A, I, C) {
|
|
1934
1934
|
w.rawrigidbodyset_rbAddTorque(this.__wbg_ptr, A, I, C);
|
|
@@ -1937,10 +1937,10 @@ class pA {
|
|
|
1937
1937
|
w.rawrigidbodyset_rbApplyTorqueImpulse(this.__wbg_ptr, A, I, C);
|
|
1938
1938
|
}
|
|
1939
1939
|
rbAddForceAtPoint(A, I, C, g) {
|
|
1940
|
-
|
|
1940
|
+
k(I, J), k(C, J), w.rawrigidbodyset_rbAddForceAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
1941
1941
|
}
|
|
1942
1942
|
rbApplyImpulseAtPoint(A, I, C, g) {
|
|
1943
|
-
|
|
1943
|
+
k(I, J), k(C, J), w.rawrigidbodyset_rbApplyImpulseAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
1944
1944
|
}
|
|
1945
1945
|
rbAdditionalSolverIterations(A) {
|
|
1946
1946
|
return w.rawrigidbodyset_rbAdditionalSolverIterations(this.__wbg_ptr, A) >>> 0;
|
|
@@ -1965,11 +1965,11 @@ class pA {
|
|
|
1965
1965
|
const A = w.rawrigidbodyset_new();
|
|
1966
1966
|
return this.__wbg_ptr = A >>> 0, rg.register(this, this.__wbg_ptr, this), this;
|
|
1967
1967
|
}
|
|
1968
|
-
createRigidBody(A, I, C, g, Q, E, i, D, o, s, h, a, G, K, t, S, y, F, M, e, R,
|
|
1969
|
-
return
|
|
1968
|
+
createRigidBody(A, I, C, g, Q, E, i, D, o, s, h, a, G, K, t, S, y, F, M, e, R, x) {
|
|
1969
|
+
return k(I, J), k(C, RA), k(i, J), k(D, J), w.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g, Q, E, i.__wbg_ptr, D.__wbg_ptr, o, s, h, a, G, K, t, S, y, F, M, e, R, x);
|
|
1970
1970
|
}
|
|
1971
1971
|
remove(A, I, C, g, Q) {
|
|
1972
|
-
|
|
1972
|
+
k(I, CI), k(C, HA), k(g, gI), k(Q, QI), w.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 w.rawrigidbodyset_len(this.__wbg_ptr) >>> 0;
|
|
@@ -1979,22 +1979,22 @@ class pA {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
forEachRigidBodyHandle(A) {
|
|
1981
1981
|
try {
|
|
1982
|
-
w.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr,
|
|
1982
|
+
w.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, pA(A));
|
|
1983
1983
|
} finally {
|
|
1984
|
-
|
|
1984
|
+
JA[LA++] = void 0;
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
propagateModifiedBodyPositionsToColliders(A) {
|
|
1988
|
-
|
|
1988
|
+
k(A, HA), w.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, A.__wbg_ptr);
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
const uC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1992
1992
|
}, unregister: () => {
|
|
1993
1993
|
} } : new FinalizationRegistry((B) => w.__wbg_rawrotation_free(B >>> 0, 1));
|
|
1994
|
-
class
|
|
1994
|
+
class RA {
|
|
1995
1995
|
static __wrap(A) {
|
|
1996
1996
|
A >>>= 0;
|
|
1997
|
-
const I = Object.create(
|
|
1997
|
+
const I = Object.create(RA.prototype);
|
|
1998
1998
|
return I.__wbg_ptr = A, uC.register(I, I.__wbg_ptr, I), I;
|
|
1999
1999
|
}
|
|
2000
2000
|
__destroy_into_raw() {
|
|
@@ -2007,11 +2007,11 @@ class rA {
|
|
|
2007
2007
|
}
|
|
2008
2008
|
static identity() {
|
|
2009
2009
|
const A = w.rawrotation_identity();
|
|
2010
|
-
return
|
|
2010
|
+
return RA.__wrap(A);
|
|
2011
2011
|
}
|
|
2012
2012
|
static fromAngle(A) {
|
|
2013
2013
|
const I = w.rawrotation_fromAngle(A);
|
|
2014
|
-
return
|
|
2014
|
+
return RA.__wrap(I);
|
|
2015
2015
|
}
|
|
2016
2016
|
get im() {
|
|
2017
2017
|
return w.rawkinematiccharactercontroller_offset(this.__wbg_ptr);
|
|
@@ -2040,20 +2040,20 @@ class iB {
|
|
|
2040
2040
|
return this.__wbg_ptr = A >>> 0, mC.register(this, this.__wbg_ptr, this), this;
|
|
2041
2041
|
}
|
|
2042
2042
|
serializeAll(A, I, C, g, Q, E, i, D, o) {
|
|
2043
|
-
return
|
|
2043
|
+
return k(A, J), k(I, NI), k(C, CI), k(g, sI), k(Q, fA), k(E, qA), k(i, HA), k(D, gI), k(o, QI), _I(w.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, D.__wbg_ptr, o.__wbg_ptr));
|
|
2044
2044
|
}
|
|
2045
2045
|
deserializeAll(A) {
|
|
2046
|
-
const I = w.rawserializationpipeline_deserializeAll(this.__wbg_ptr,
|
|
2046
|
+
const I = w.rawserializationpipeline_deserializeAll(this.__wbg_ptr, rA(A));
|
|
2047
2047
|
return I === 0 ? void 0 : _g.__wrap(I);
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
2050
|
const xC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
2051
2051
|
}, unregister: () => {
|
|
2052
2052
|
} } : new FinalizationRegistry((B) => w.__wbg_rawshape_free(B >>> 0, 1));
|
|
2053
|
-
class
|
|
2053
|
+
class KA {
|
|
2054
2054
|
static __wrap(A) {
|
|
2055
2055
|
A >>>= 0;
|
|
2056
|
-
const I = Object.create(
|
|
2056
|
+
const I = Object.create(KA.prototype);
|
|
2057
2057
|
return I.__wbg_ptr = A, xC.register(I, I.__wbg_ptr, I), I;
|
|
2058
2058
|
}
|
|
2059
2059
|
__destroy_into_raw() {
|
|
@@ -2066,109 +2066,109 @@ class GA {
|
|
|
2066
2066
|
}
|
|
2067
2067
|
static cuboid(A, I) {
|
|
2068
2068
|
const C = w.rawshape_cuboid(A, I);
|
|
2069
|
-
return
|
|
2069
|
+
return KA.__wrap(C);
|
|
2070
2070
|
}
|
|
2071
2071
|
static roundCuboid(A, I, C) {
|
|
2072
2072
|
const g = w.rawshape_roundCuboid(A, I, C);
|
|
2073
|
-
return
|
|
2073
|
+
return KA.__wrap(g);
|
|
2074
2074
|
}
|
|
2075
2075
|
static ball(A) {
|
|
2076
2076
|
const I = w.rawshape_ball(A);
|
|
2077
|
-
return
|
|
2077
|
+
return KA.__wrap(I);
|
|
2078
2078
|
}
|
|
2079
2079
|
static halfspace(A) {
|
|
2080
|
-
|
|
2080
|
+
k(A, J);
|
|
2081
2081
|
const I = w.rawshape_halfspace(A.__wbg_ptr);
|
|
2082
|
-
return
|
|
2082
|
+
return KA.__wrap(I);
|
|
2083
2083
|
}
|
|
2084
2084
|
static capsule(A, I) {
|
|
2085
2085
|
const C = w.rawshape_capsule(A, I);
|
|
2086
|
-
return
|
|
2086
|
+
return KA.__wrap(C);
|
|
2087
2087
|
}
|
|
2088
2088
|
static voxels(A, I) {
|
|
2089
|
-
|
|
2089
|
+
k(A, J);
|
|
2090
2090
|
const C = Ng(I, w.__wbindgen_export_2), g = jA, Q = w.rawshape_voxels(A.__wbg_ptr, C, g);
|
|
2091
|
-
return
|
|
2091
|
+
return KA.__wrap(Q);
|
|
2092
2092
|
}
|
|
2093
2093
|
static voxelsFromPoints(A, I) {
|
|
2094
|
-
|
|
2094
|
+
k(A, J);
|
|
2095
2095
|
const C = oI(I, w.__wbindgen_export_2), g = jA, Q = w.rawshape_voxelsFromPoints(A.__wbg_ptr, C, g);
|
|
2096
|
-
return
|
|
2096
|
+
return KA.__wrap(Q);
|
|
2097
2097
|
}
|
|
2098
2098
|
static polyline(A, I) {
|
|
2099
2099
|
const C = oI(A, w.__wbindgen_export_2), g = jA, Q = Ng(I, w.__wbindgen_export_2), E = jA, i = w.rawshape_polyline(C, g, Q, E);
|
|
2100
|
-
return
|
|
2100
|
+
return KA.__wrap(i);
|
|
2101
2101
|
}
|
|
2102
2102
|
static trimesh(A, I, C) {
|
|
2103
2103
|
const g = oI(A, w.__wbindgen_export_2), Q = jA, E = Ng(I, w.__wbindgen_export_2), i = jA, D = w.rawshape_trimesh(g, Q, E, i, C);
|
|
2104
|
-
return D === 0 ? void 0 :
|
|
2104
|
+
return D === 0 ? void 0 : KA.__wrap(D);
|
|
2105
2105
|
}
|
|
2106
2106
|
static heightfield(A, I) {
|
|
2107
2107
|
const C = oI(A, w.__wbindgen_export_2), g = jA;
|
|
2108
|
-
|
|
2108
|
+
k(I, J);
|
|
2109
2109
|
const Q = w.rawshape_heightfield(C, g, I.__wbg_ptr);
|
|
2110
|
-
return
|
|
2110
|
+
return KA.__wrap(Q);
|
|
2111
2111
|
}
|
|
2112
2112
|
static segment(A, I) {
|
|
2113
|
-
|
|
2113
|
+
k(A, J), k(I, J);
|
|
2114
2114
|
const C = w.rawshape_segment(A.__wbg_ptr, I.__wbg_ptr);
|
|
2115
|
-
return
|
|
2115
|
+
return KA.__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 = w.rawshape_triangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr);
|
|
2120
|
-
return
|
|
2120
|
+
return KA.__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 = w.rawshape_roundTriangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
2125
|
-
return
|
|
2125
|
+
return KA.__wrap(Q);
|
|
2126
2126
|
}
|
|
2127
2127
|
static convexHull(A) {
|
|
2128
2128
|
const I = oI(A, w.__wbindgen_export_2), C = jA, g = w.rawshape_convexHull(I, C);
|
|
2129
|
-
return g === 0 ? void 0 :
|
|
2129
|
+
return g === 0 ? void 0 : KA.__wrap(g);
|
|
2130
2130
|
}
|
|
2131
2131
|
static roundConvexHull(A, I) {
|
|
2132
2132
|
const C = oI(A, w.__wbindgen_export_2), g = jA, Q = w.rawshape_roundConvexHull(C, g, I);
|
|
2133
|
-
return Q === 0 ? void 0 :
|
|
2133
|
+
return Q === 0 ? void 0 : KA.__wrap(Q);
|
|
2134
2134
|
}
|
|
2135
2135
|
static convexPolyline(A) {
|
|
2136
2136
|
const I = oI(A, w.__wbindgen_export_2), C = jA, g = w.rawshape_convexPolyline(I, C);
|
|
2137
|
-
return g === 0 ? void 0 :
|
|
2137
|
+
return g === 0 ? void 0 : KA.__wrap(g);
|
|
2138
2138
|
}
|
|
2139
2139
|
static roundConvexPolyline(A, I) {
|
|
2140
2140
|
const C = oI(A, w.__wbindgen_export_2), g = jA, Q = w.rawshape_roundConvexPolyline(C, g, I);
|
|
2141
|
-
return Q === 0 ? void 0 :
|
|
2141
|
+
return Q === 0 ? void 0 : KA.__wrap(Q);
|
|
2142
2142
|
}
|
|
2143
2143
|
castShape(A, I, C, g, Q, E, i, D, o, s) {
|
|
2144
|
-
|
|
2144
|
+
k(A, J), k(I, RA), k(C, J), k(g, KA), k(Q, J), k(E, RA), k(i, J);
|
|
2145
2145
|
const h = w.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, D, o, s);
|
|
2146
2146
|
return h === 0 ? void 0 : hg.__wrap(h);
|
|
2147
2147
|
}
|
|
2148
2148
|
intersectsShape(A, I, C, g, Q) {
|
|
2149
|
-
return
|
|
2149
|
+
return k(A, J), k(I, RA), k(C, KA), k(g, J), k(Q, RA), w.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
|
-
|
|
2152
|
+
k(A, J), k(I, RA), k(C, KA), k(g, J), k(Q, RA);
|
|
2153
2153
|
const i = w.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 : TI.__wrap(i);
|
|
2155
2155
|
}
|
|
2156
2156
|
containsPoint(A, I, C) {
|
|
2157
|
-
return
|
|
2157
|
+
return k(A, J), k(I, RA), k(C, J), w.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
|
-
|
|
2160
|
+
k(A, J), k(I, RA), k(C, J);
|
|
2161
2161
|
const Q = w.rawshape_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
2162
2162
|
return Dg.__wrap(Q);
|
|
2163
2163
|
}
|
|
2164
2164
|
intersectsRay(A, I, C, g, Q) {
|
|
2165
|
-
return
|
|
2165
|
+
return k(A, J), k(I, RA), k(C, J), k(g, J), w.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
|
|
2168
|
+
return k(A, J), k(I, RA), k(C, J), k(g, J), w.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
|
-
|
|
2171
|
+
k(A, J), k(I, RA), k(C, J), k(g, J);
|
|
2172
2172
|
const i = w.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 : sg.__wrap(i);
|
|
2174
2174
|
}
|
|
@@ -2299,79 +2299,79 @@ async function sQ(B) {
|
|
|
2299
2299
|
const A = function() {
|
|
2300
2300
|
const g = { wbg: {} };
|
|
2301
2301
|
return g.wbg.__wbg_bind_c8359b1cba058168 = function(Q, E, i, D) {
|
|
2302
|
-
return
|
|
2302
|
+
return rA(eA(Q).bind(eA(E), eA(i), eA(D)));
|
|
2303
2303
|
}, g.wbg.__wbg_buffer_609cc3eee51ed158 = function(Q) {
|
|
2304
|
-
return
|
|
2304
|
+
return rA(eA(Q).buffer);
|
|
2305
2305
|
}, g.wbg.__wbg_call_672a4d21634d4a24 = function() {
|
|
2306
2306
|
return PI(function(Q, E) {
|
|
2307
|
-
return
|
|
2307
|
+
return rA(eA(Q).call(eA(E)));
|
|
2308
2308
|
}, arguments);
|
|
2309
2309
|
}, g.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
|
2310
2310
|
return PI(function(Q, E, i) {
|
|
2311
|
-
return
|
|
2311
|
+
return rA(eA(Q).call(eA(E), eA(i)));
|
|
2312
2312
|
}, arguments);
|
|
2313
2313
|
}, g.wbg.__wbg_call_833bed5770ea2041 = function() {
|
|
2314
2314
|
return PI(function(Q, E, i, D) {
|
|
2315
|
-
return
|
|
2315
|
+
return rA(eA(Q).call(eA(E), eA(i), eA(D)));
|
|
2316
2316
|
}, arguments);
|
|
2317
2317
|
}, g.wbg.__wbg_call_b8adc8b1d0a0d8eb = function() {
|
|
2318
2318
|
return PI(function(Q, E, i, D, o) {
|
|
2319
|
-
return
|
|
2319
|
+
return rA(eA(Q).call(eA(E), eA(i), eA(D), eA(o)));
|
|
2320
2320
|
}, arguments);
|
|
2321
2321
|
}, g.wbg.__wbg_length_3b4f022188ae8db6 = function(Q) {
|
|
2322
|
-
return
|
|
2322
|
+
return eA(Q).length;
|
|
2323
2323
|
}, g.wbg.__wbg_length_a446193dc22c12f8 = function(Q) {
|
|
2324
|
-
return
|
|
2324
|
+
return eA(Q).length;
|
|
2325
2325
|
}, g.wbg.__wbg_new_a12002a7f91c75be = function(Q) {
|
|
2326
|
-
return
|
|
2326
|
+
return rA(new Uint8Array(eA(Q)));
|
|
2327
2327
|
}, g.wbg.__wbg_newnoargs_105ed471475aaf50 = function(Q, E) {
|
|
2328
|
-
return
|
|
2328
|
+
return rA(new Function(Hg(Q, E)));
|
|
2329
2329
|
}, g.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(Q, E, i) {
|
|
2330
|
-
return
|
|
2330
|
+
return rA(new Uint8Array(eA(Q), E >>> 0, i >>> 0));
|
|
2331
2331
|
}, g.wbg.__wbg_newwithbyteoffsetandlength_e6b7e69acd4c7354 = function(Q, E, i) {
|
|
2332
|
-
return
|
|
2332
|
+
return rA(new Float32Array(eA(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 eA(Q).now();
|
|
2337
2337
|
}, g.wbg.__wbg_performance_7a3ffd0b17f663ad = function(Q) {
|
|
2338
|
-
return
|
|
2338
|
+
return rA(eA(Q).performance);
|
|
2339
2339
|
}, g.wbg.__wbg_rawcontactforceevent_new = function(Q) {
|
|
2340
|
-
return
|
|
2340
|
+
return rA(Pg.__wrap(Q));
|
|
2341
2341
|
}, g.wbg.__wbg_rawraycolliderintersection_new = function(Q) {
|
|
2342
|
-
return
|
|
2342
|
+
return rA(wg.__wrap(Q));
|
|
2343
2343
|
}, g.wbg.__wbg_set_10bad9bee0e9c58b = function(Q, E, i) {
|
|
2344
|
-
|
|
2344
|
+
eA(Q).set(eA(E), i >>> 0);
|
|
2345
2345
|
}, g.wbg.__wbg_set_65595bdd868b3009 = function(Q, E, i) {
|
|
2346
|
-
|
|
2346
|
+
eA(Q).set(eA(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 aA(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 aA(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 aA(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 aA(Q) ? 0 : rA(Q);
|
|
2359
2359
|
}, g.wbg.__wbindgen_boolean_get = function(Q) {
|
|
2360
|
-
const E =
|
|
2360
|
+
const E = eA(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 eA(Q) == "function";
|
|
2364
2364
|
}, g.wbg.__wbindgen_is_undefined = function(Q) {
|
|
2365
|
-
return
|
|
2365
|
+
return eA(Q) === void 0;
|
|
2366
2366
|
}, g.wbg.__wbindgen_memory = function() {
|
|
2367
|
-
return
|
|
2367
|
+
return rA(w.memory);
|
|
2368
2368
|
}, g.wbg.__wbindgen_number_get = function(Q, E) {
|
|
2369
|
-
const i =
|
|
2370
|
-
TA().setFloat64(Q + 8,
|
|
2369
|
+
const i = eA(E), D = typeof i == "number" ? i : void 0;
|
|
2370
|
+
TA().setFloat64(Q + 8, aA(D) ? 0 : D, !0), TA().setInt32(Q + 0, !aA(D), !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(eA(Q));
|
|
2375
2375
|
}, g.wbg.__wbindgen_object_drop_ref = function(Q) {
|
|
2376
2376
|
_I(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 LA {
|
|
|
2433
2433
|
return A.free(), I;
|
|
2434
2434
|
}
|
|
2435
2435
|
static intoRaw(A) {
|
|
2436
|
-
return
|
|
2436
|
+
return RA.fromAngle(A);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
var zA, XA, fg, bg, uI, RI, uA, Tg, ug, Ag, Ig, mg, xg, gg, yI;
|
|
@@ -2489,7 +2489,7 @@ class Og {
|
|
|
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 Og {
|
|
|
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 Og {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
class _A {
|
|
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 _A(zA.Dynamic);
|
|
@@ -2790,7 +2790,7 @@ class ag {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
class aQ {
|
|
2792
2792
|
constructor(A) {
|
|
2793
|
-
this.raw = A || new
|
|
2793
|
+
this.raw = A || new qA(), this.map = new ag(), A && A.forEachRigidBodyHandle((I) => {
|
|
2794
2794
|
this.map.set(I, new Og(A, null, I));
|
|
2795
2795
|
});
|
|
2796
2796
|
}
|
|
@@ -2801,7 +2801,7 @@ class aQ {
|
|
|
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 D = new Og(this.raw, A, i);
|
|
2807
2807
|
return D.userData = I.userData, this.map.set(i, D), D;
|
|
@@ -3025,7 +3025,7 @@ class tI {
|
|
|
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 XA.Fixed:
|
|
3028
|
-
let D =
|
|
3028
|
+
let D = nA.intoRaw(this.frame1), o = nA.intoRaw(this.frame2);
|
|
3029
3029
|
I = WA.fixed(C, D, g, o), D.free(), o.free();
|
|
3030
3030
|
break;
|
|
3031
3031
|
case XA.Spring:
|
|
@@ -3289,7 +3289,7 @@ class UQ {
|
|
|
3289
3289
|
this.raw.intersectionsWithRay(A.raw, I.raw, C.raw, G, K, Q, E, (t) => i(mI.fromRaw(C, t)), D, o, s, h, a), G.free(), K.free();
|
|
3290
3290
|
}
|
|
3291
3291
|
intersectionWithShape(A, I, C, g, Q, E, i, D, o, s, h) {
|
|
3292
|
-
let a = c.intoRaw(g), G =
|
|
3292
|
+
let a = c.intoRaw(g), G = nA.intoRaw(Q), K = E.intoRaw(), t = this.raw.intersectionWithShape(A.raw, I.raw, C.raw, a, G, K, i, D, o, s, h);
|
|
3293
3293
|
return a.free(), G.free(), K.free(), t;
|
|
3294
3294
|
}
|
|
3295
3295
|
projectPoint(A, I, C, g, Q, E, i, D, o, s) {
|
|
@@ -3305,11 +3305,11 @@ class UQ {
|
|
|
3305
3305
|
this.raw.intersectionsWithPoint(A.raw, I.raw, C.raw, h, Q, E, i, D, o, s), h.free();
|
|
3306
3306
|
}
|
|
3307
3307
|
castShape(A, I, C, g, Q, E, i, D, o, s, h, a, G, K, t) {
|
|
3308
|
-
let S = c.intoRaw(g), y =
|
|
3308
|
+
let S = c.intoRaw(g), y = nA.intoRaw(Q), F = c.intoRaw(E), M = i.intoRaw(), e = ZI.fromRaw(C, this.raw.castShape(A.raw, I.raw, C.raw, S, y, F, M, D, o, s, h, a, G, K, t));
|
|
3309
3309
|
return S.free(), y.free(), F.free(), M.free(), e;
|
|
3310
3310
|
}
|
|
3311
3311
|
intersectionsWithShape(A, I, C, g, Q, E, i, D, o, s, h, a) {
|
|
3312
|
-
let G = c.intoRaw(g), K =
|
|
3312
|
+
let G = c.intoRaw(g), K = nA.intoRaw(Q), t = E.intoRaw();
|
|
3313
3313
|
this.raw.intersectionsWithShape(A.raw, I.raw, C.raw, G, K, t, i, D, o, s, h, a), G.free(), K.free(), t.free();
|
|
3314
3314
|
}
|
|
3315
3315
|
collidersWithAabbIntersectingAabb(A, I, C, g, Q, E) {
|
|
@@ -3460,35 +3460,35 @@ class xA {
|
|
|
3460
3460
|
}
|
|
3461
3461
|
}
|
|
3462
3462
|
castShape(A, I, C, g, Q, E, i, D, o, s) {
|
|
3463
|
-
let h = c.intoRaw(A), a =
|
|
3463
|
+
let h = c.intoRaw(A), a = nA.intoRaw(I), G = c.intoRaw(C), K = c.intoRaw(Q), t = nA.intoRaw(E), S = c.intoRaw(i), y = this.intoRaw(), F = g.intoRaw(), M = rI.fromRaw(null, y.castShape(h, a, G, F, K, t, S, D, o, s));
|
|
3464
3464
|
return h.free(), a.free(), G.free(), K.free(), t.free(), S.free(), y.free(), F.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), D = c.intoRaw(g), o = nA.intoRaw(Q), s = this.intoRaw(), h = C.intoRaw(), a = s.intersectsShape(E, i, h, D, o);
|
|
3468
3468
|
return E.free(), i.free(), D.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), D =
|
|
3471
|
+
let i = c.intoRaw(A), D = nA.intoRaw(I), o = c.intoRaw(g), s = nA.intoRaw(Q), h = this.intoRaw(), a = C.intoRaw(), G = UI.fromRaw(h.contactShape(i, D, a, o, s, E));
|
|
3472
3472
|
return i.free(), D.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(), D = i.containsPoint(g, Q, E);
|
|
3476
3476
|
return g.free(), Q.free(), E.free(), i.free(), D;
|
|
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), D = this.intoRaw(), o = WI.fromRaw(D.projectPoint(Q, E, i, g));
|
|
3480
3480
|
return Q.free(), E.free(), i.free(), D.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), D = c.intoRaw(A.dir), o = this.intoRaw(), s = o.intersectsRay(Q, E, i, D, g);
|
|
3484
3484
|
return Q.free(), E.free(), i.free(), D.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), D = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = s.castRay(E, i, D, o, g, Q);
|
|
3488
3488
|
return E.free(), i.free(), D.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), D = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = OI.fromRaw(s.castRayAndGetNormal(E, i, D, o, g, Q));
|
|
3492
3492
|
return E.free(), i.free(), D.free(), o.free(), s.free(), h;
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
@@ -3502,7 +3502,7 @@ class gC extends xA {
|
|
|
3502
3502
|
super(), this.type = uA.Ball, this.radius = A;
|
|
3503
3503
|
}
|
|
3504
3504
|
intoRaw() {
|
|
3505
|
-
return
|
|
3505
|
+
return KA.ball(this.radius);
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
3508
|
class CC extends xA {
|
|
@@ -3510,7 +3510,7 @@ class CC extends xA {
|
|
|
3510
3510
|
super(), this.type = uA.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 = KA.halfspace(A);
|
|
3514
3514
|
return A.free(), I;
|
|
3515
3515
|
}
|
|
3516
3516
|
}
|
|
@@ -3519,7 +3519,7 @@ class QC extends xA {
|
|
|
3519
3519
|
super(), this.type = uA.Cuboid, this.halfExtents = c.new(A, I);
|
|
3520
3520
|
}
|
|
3521
3521
|
intoRaw() {
|
|
3522
|
-
return
|
|
3522
|
+
return KA.cuboid(this.halfExtents.x, this.halfExtents.y);
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
3525
|
class BC extends xA {
|
|
@@ -3527,7 +3527,7 @@ class BC extends xA {
|
|
|
3527
3527
|
super(), this.type = uA.RoundCuboid, this.halfExtents = c.new(A, I), this.borderRadius = C;
|
|
3528
3528
|
}
|
|
3529
3529
|
intoRaw() {
|
|
3530
|
-
return
|
|
3530
|
+
return KA.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
|
|
3531
3531
|
}
|
|
3532
3532
|
}
|
|
3533
3533
|
class EC extends xA {
|
|
@@ -3535,7 +3535,7 @@ class EC extends xA {
|
|
|
3535
3535
|
super(), this.type = uA.Capsule, this.halfHeight = A, this.radius = I;
|
|
3536
3536
|
}
|
|
3537
3537
|
intoRaw() {
|
|
3538
|
-
return
|
|
3538
|
+
return KA.capsule(this.halfHeight, this.radius);
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
3541
|
class iC extends xA {
|
|
@@ -3543,7 +3543,7 @@ class iC extends xA {
|
|
|
3543
3543
|
super(), this.type = uA.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 = KA.segment(A, I);
|
|
3547
3547
|
return A.free(), I.free(), C;
|
|
3548
3548
|
}
|
|
3549
3549
|
}
|
|
@@ -3552,7 +3552,7 @@ class oC extends xA {
|
|
|
3552
3552
|
super(), this.type = uA.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 = KA.triangle(A, I, C);
|
|
3556
3556
|
return A.free(), I.free(), C.free(), g;
|
|
3557
3557
|
}
|
|
3558
3558
|
}
|
|
@@ -3561,7 +3561,7 @@ class DC extends xA {
|
|
|
3561
3561
|
super(), this.type = uA.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 = KA.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 wC extends xA {
|
|
|
3570
3570
|
super(), this.type = uA.Polyline, this.vertices = A, this.indices = I ?? new Uint32Array(0);
|
|
3571
3571
|
}
|
|
3572
3572
|
intoRaw() {
|
|
3573
|
-
return
|
|
3573
|
+
return KA.polyline(this.vertices, this.indices);
|
|
3574
3574
|
}
|
|
3575
3575
|
}
|
|
3576
3576
|
class sC extends xA {
|
|
@@ -3579,7 +3579,7 @@ class sC extends xA {
|
|
|
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 ? KA.voxels(I, this.data) : KA.voxelsFromPoints(I, this.data), I.free(), A;
|
|
3583
3583
|
}
|
|
3584
3584
|
}
|
|
3585
3585
|
class hC extends xA {
|
|
@@ -3587,7 +3587,7 @@ class hC extends xA {
|
|
|
3587
3587
|
super(), this.type = uA.TriMesh, this.vertices = A, this.indices = I, this.flags = C;
|
|
3588
3588
|
}
|
|
3589
3589
|
intoRaw() {
|
|
3590
|
-
return
|
|
3590
|
+
return KA.trimesh(this.vertices, this.indices, this.flags);
|
|
3591
3591
|
}
|
|
3592
3592
|
}
|
|
3593
3593
|
class Cg extends xA {
|
|
@@ -3595,7 +3595,7 @@ class Cg extends xA {
|
|
|
3595
3595
|
super(), this.type = uA.ConvexPolygon, this.vertices = A, this.skipConvexHullComputation = !!I;
|
|
3596
3596
|
}
|
|
3597
3597
|
intoRaw() {
|
|
3598
|
-
return this.skipConvexHullComputation ?
|
|
3598
|
+
return this.skipConvexHullComputation ? KA.convexPolyline(this.vertices) : KA.convexHull(this.vertices);
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
3601
|
class Qg extends xA {
|
|
@@ -3603,7 +3603,7 @@ class Qg extends xA {
|
|
|
3603
3603
|
super(), this.type = uA.RoundConvexPolygon, this.vertices = A, this.borderRadius = I, this.skipConvexHullComputation = !!C;
|
|
3604
3604
|
}
|
|
3605
3605
|
intoRaw() {
|
|
3606
|
-
return this.skipConvexHullComputation ?
|
|
3606
|
+
return this.skipConvexHullComputation ? KA.roundConvexPolyline(this.vertices, this.borderRadius) : KA.roundConvexHull(this.vertices, this.borderRadius);
|
|
3607
3607
|
}
|
|
3608
3608
|
}
|
|
3609
3609
|
class aC extends xA {
|
|
@@ -3611,7 +3611,7 @@ class aC extends xA {
|
|
|
3611
3611
|
super(), this.type = uA.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 = KA.heightfield(this.heights, A);
|
|
3615
3615
|
return A.free(), I;
|
|
3616
3616
|
}
|
|
3617
3617
|
}
|
|
@@ -4102,10 +4102,10 @@ class Zg {
|
|
|
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 Zg {
|
|
|
4286
4286
|
return C.free(), g.free(), Q;
|
|
4287
4287
|
}
|
|
4288
4288
|
castShape(A, I, C, g, Q, E, i, D) {
|
|
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(), K = rI.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, o, G, s, h, a, E, i, D));
|
|
4290
4290
|
return o.free(), s.free(), h.free(), a.free(), G.free(), K;
|
|
4291
4291
|
}
|
|
4292
4292
|
castCollider(A, I, C, g, Q, E) {
|
|
@@ -4294,11 +4294,11 @@ class Zg {
|
|
|
4294
4294
|
return i.free(), D.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(), D = UI.fromRaw(this.colliderSet.raw.coContactShape(this.handle, i, Q, E, g));
|
|
4302
4302
|
return Q.free(), E.free(), i.free(), D;
|
|
4303
4303
|
}
|
|
4304
4304
|
contactCollider(A, I) {
|
|
@@ -4318,7 +4318,7 @@ class Zg {
|
|
|
4318
4318
|
})(yI || (yI = {}));
|
|
4319
4319
|
class bA {
|
|
4320
4320
|
constructor(A) {
|
|
4321
|
-
this.enabled = !0, this.shape = A, this.massPropsMode = yI.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation =
|
|
4321
|
+
this.enabled = !0, this.shape = A, this.massPropsMode = yI.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 = uI.Average, this.restitutionCombineRule = uI.Average, this.activeCollisionTypes = gg.DEFAULT, this.activeEvents = Ag.NONE, this.activeHooks = Ig.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 gC(A);
|
|
@@ -4442,7 +4442,7 @@ class bA {
|
|
|
4442
4442
|
}
|
|
4443
4443
|
class fQ {
|
|
4444
4444
|
constructor(A) {
|
|
4445
|
-
this.raw = A || new
|
|
4445
|
+
this.raw = A || new HA(), this.map = new ag(), A && A.forEachColliderHandle((I) => {
|
|
4446
4446
|
this.map.set(I, new Zg(this, I, null));
|
|
4447
4447
|
});
|
|
4448
4448
|
}
|
|
@@ -4458,7 +4458,7 @@ class fQ {
|
|
|
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), D = c.intoRaw(I.centerOfMass), o = this.raw.createCollider(I.enabled, Q, E, i, I.massPropsMode, I.mass, D, 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(), D.free();
|
|
4463
4463
|
let s = g ? A.get(C) : null, h = new Zg(this, o, s, I.shape);
|
|
4464
4464
|
return this.map.set(o, h), h;
|
|
@@ -4556,7 +4556,7 @@ function SB(B) {
|
|
|
4556
4556
|
A = B, w.reserve_memory(A);
|
|
4557
4557
|
}
|
|
4558
4558
|
VA[45] = 62, VA[95] = 63;
|
|
4559
|
-
var ZA = Object.freeze({ __proto__: null, version: KB, reserveMemory: SB, Vector2: hQ, VectorOps: c, RotationOps:
|
|
4559
|
+
var ZA = Object.freeze({ __proto__: null, version: KB, reserveMemory: SB, Vector2: hQ, VectorOps: c, RotationOps: nA, get RigidBodyType() {
|
|
4560
4560
|
return zA;
|
|
4561
4561
|
}, RigidBody: Og, RigidBodyDesc: _A, RigidBodySet: aQ, IntegrationParameters: GQ, get JointType() {
|
|
4562
4562
|
return XA;
|
|
@@ -4589,10 +4589,10 @@ var ZA = Object.freeze({ __proto__: null, version: KB, reserveMemory: SB, Vector
|
|
|
4589
4589
|
}, PidController: HQ });
|
|
4590
4590
|
class yB {
|
|
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 ZA.init(), this.world = new ZA.World(new ZA.Vector2(A.x, A.y)), this.initialized = !0);
|
|
@@ -5975,70 +5975,70 @@ function NE(B, A, I) {
|
|
|
5975
5975
|
function F() {
|
|
5976
5976
|
S = -1, y = 0;
|
|
5977
5977
|
}
|
|
5978
|
-
function M(
|
|
5978
|
+
function M(r = K, u = t, BA = s) {
|
|
5979
5979
|
o++, I == null || I({
|
|
5980
5980
|
startSegmentIndex: a,
|
|
5981
5981
|
startGraphemeIndex: G,
|
|
5982
|
-
endSegmentIndex:
|
|
5982
|
+
endSegmentIndex: r,
|
|
5983
5983
|
endGraphemeIndex: u,
|
|
5984
|
-
width:
|
|
5984
|
+
width: BA
|
|
5985
5985
|
}), s = 0, h = !1, F();
|
|
5986
5986
|
}
|
|
5987
|
-
function e(
|
|
5988
|
-
h = !0, a =
|
|
5987
|
+
function e(r, u) {
|
|
5988
|
+
h = !0, a = r, G = 0, K = r + 1, t = 0, s = u;
|
|
5989
5989
|
}
|
|
5990
|
-
function R(
|
|
5991
|
-
h = !0, a =
|
|
5990
|
+
function R(r, u, BA) {
|
|
5991
|
+
h = !0, a = r, G = u, K = r, t = u + 1, s = BA;
|
|
5992
5992
|
}
|
|
5993
|
-
function
|
|
5993
|
+
function x(r, u) {
|
|
5994
5994
|
if (!h) {
|
|
5995
|
-
e(
|
|
5995
|
+
e(r, u);
|
|
5996
5996
|
return;
|
|
5997
5997
|
}
|
|
5998
|
-
s += u, K =
|
|
5998
|
+
s += u, K = r + 1, t = 0;
|
|
5999
5999
|
}
|
|
6000
|
-
function b(
|
|
6001
|
-
Bg(g[
|
|
6000
|
+
function b(r, u) {
|
|
6001
|
+
Bg(g[r]) && (S = r + 1, y = s - u);
|
|
6002
6002
|
}
|
|
6003
|
-
function
|
|
6004
|
-
V(
|
|
6003
|
+
function L(r) {
|
|
6004
|
+
V(r, 0);
|
|
6005
6005
|
}
|
|
6006
|
-
function V(
|
|
6007
|
-
const
|
|
6008
|
-
for (let d = u; d <
|
|
6009
|
-
const _ = xQ(
|
|
6006
|
+
function V(r, u) {
|
|
6007
|
+
const BA = Q[r], AA = E[r] ?? null;
|
|
6008
|
+
for (let d = u; d < BA.length; d++) {
|
|
6009
|
+
const _ = xQ(BA, AA, d, i.preferPrefixWidthsForBreakableRuns);
|
|
6010
6010
|
if (!h) {
|
|
6011
|
-
R(
|
|
6011
|
+
R(r, d, _);
|
|
6012
6012
|
continue;
|
|
6013
6013
|
}
|
|
6014
|
-
s + _ > A + D ? (M(), R(
|
|
6014
|
+
s + _ > A + D ? (M(), R(r, d, _)) : (s += _, K = r, t = d + 1);
|
|
6015
6015
|
}
|
|
6016
|
-
h && K ===
|
|
6016
|
+
h && K === r && t === BA.length && (K = r + 1, t = 0);
|
|
6017
6017
|
}
|
|
6018
|
-
let
|
|
6019
|
-
for (;
|
|
6020
|
-
const
|
|
6018
|
+
let q = 0;
|
|
6019
|
+
for (; q < C.length; ) {
|
|
6020
|
+
const r = C[q], u = g[q];
|
|
6021
6021
|
if (!h) {
|
|
6022
|
-
|
|
6022
|
+
r > A && Q[q] !== null ? L(q) : e(q, r), b(q, r), q++;
|
|
6023
6023
|
continue;
|
|
6024
6024
|
}
|
|
6025
|
-
if (s +
|
|
6025
|
+
if (s + r > A + D) {
|
|
6026
6026
|
if (Bg(u)) {
|
|
6027
|
-
|
|
6027
|
+
x(q, r), M(q + 1, 0, s - r), q++;
|
|
6028
6028
|
continue;
|
|
6029
6029
|
}
|
|
6030
6030
|
if (S >= 0) {
|
|
6031
6031
|
M(S, 0, y);
|
|
6032
6032
|
continue;
|
|
6033
6033
|
}
|
|
6034
|
-
if (
|
|
6035
|
-
M(),
|
|
6034
|
+
if (r > A && Q[q] !== null) {
|
|
6035
|
+
M(), L(q), q++;
|
|
6036
6036
|
continue;
|
|
6037
6037
|
}
|
|
6038
6038
|
M();
|
|
6039
6039
|
continue;
|
|
6040
6040
|
}
|
|
6041
|
-
|
|
6041
|
+
x(q, r), b(q, r), q++;
|
|
6042
6042
|
}
|
|
6043
6043
|
return h && M(), o;
|
|
6044
6044
|
}
|
|
@@ -6049,63 +6049,63 @@ function FE(B, A, I) {
|
|
|
6049
6049
|
if (C.length === 0 || h.length === 0)
|
|
6050
6050
|
return 0;
|
|
6051
6051
|
const a = yg(), G = a.lineFitEpsilon;
|
|
6052
|
-
let K = 0, t = 0, S = !1, y = 0, F = 0, M = 0, e = 0, R = -1,
|
|
6052
|
+
let K = 0, t = 0, S = !1, y = 0, F = 0, M = 0, e = 0, R = -1, x = 0, b = 0, L = null;
|
|
6053
6053
|
function V() {
|
|
6054
|
-
R = -1,
|
|
6054
|
+
R = -1, x = 0, b = 0, L = null;
|
|
6055
6055
|
}
|
|
6056
|
-
function
|
|
6056
|
+
function q(p = M, Y = e, Z = t) {
|
|
6057
6057
|
K++, I == null || I({
|
|
6058
6058
|
startSegmentIndex: y,
|
|
6059
6059
|
startGraphemeIndex: F,
|
|
6060
6060
|
endSegmentIndex: p,
|
|
6061
6061
|
endGraphemeIndex: Y,
|
|
6062
|
-
width:
|
|
6062
|
+
width: Z
|
|
6063
6063
|
}), t = 0, S = !1, V();
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6065
|
+
function r(p, Y) {
|
|
6066
6066
|
S = !0, y = p, F = 0, M = p + 1, e = 0, t = Y;
|
|
6067
6067
|
}
|
|
6068
|
-
function u(p, Y,
|
|
6069
|
-
S = !0, y = p, F = Y, M = p, e = Y + 1, t =
|
|
6068
|
+
function u(p, Y, Z) {
|
|
6069
|
+
S = !0, y = p, F = Y, M = p, e = Y + 1, t = Z;
|
|
6070
6070
|
}
|
|
6071
|
-
function
|
|
6071
|
+
function BA(p, Y) {
|
|
6072
6072
|
if (!S) {
|
|
6073
|
-
|
|
6073
|
+
r(p, Y);
|
|
6074
6074
|
return;
|
|
6075
6075
|
}
|
|
6076
6076
|
t += Y, M = p + 1, e = 0;
|
|
6077
6077
|
}
|
|
6078
|
-
function
|
|
6078
|
+
function AA(p, Y) {
|
|
6079
6079
|
if (!Bg(E[p]))
|
|
6080
6080
|
return;
|
|
6081
|
-
const
|
|
6082
|
-
R = p + 1,
|
|
6081
|
+
const Z = E[p] === "tab" ? 0 : g[p], DA = E[p] === "tab" ? Y : Q[p];
|
|
6082
|
+
R = p + 1, x = t - Y + Z, b = t - Y + DA, L = E[p];
|
|
6083
6083
|
}
|
|
6084
6084
|
function d(p) {
|
|
6085
6085
|
_(p, 0);
|
|
6086
6086
|
}
|
|
6087
6087
|
function _(p, Y) {
|
|
6088
|
-
const
|
|
6089
|
-
for (let j = Y; j <
|
|
6090
|
-
const
|
|
6088
|
+
const Z = i[p], DA = D[p] ?? null;
|
|
6089
|
+
for (let j = Y; j < Z.length; j++) {
|
|
6090
|
+
const l = xQ(Z, DA, j, a.preferPrefixWidthsForBreakableRuns);
|
|
6091
6091
|
if (!S) {
|
|
6092
|
-
u(p, j,
|
|
6092
|
+
u(p, j, l);
|
|
6093
6093
|
continue;
|
|
6094
6094
|
}
|
|
6095
|
-
t +
|
|
6095
|
+
t + l > A + G ? (q(), u(p, j, l)) : (t += l, M = p, e = j + 1);
|
|
6096
6096
|
}
|
|
6097
|
-
S && M === p && e ===
|
|
6097
|
+
S && M === p && e === Z.length && (M = p + 1, e = 0);
|
|
6098
6098
|
}
|
|
6099
|
-
function
|
|
6100
|
-
if (
|
|
6099
|
+
function IA(p) {
|
|
6100
|
+
if (L !== "soft-hyphen")
|
|
6101
6101
|
return !1;
|
|
6102
6102
|
const Y = i[p];
|
|
6103
6103
|
if (Y === null)
|
|
6104
6104
|
return !1;
|
|
6105
|
-
const
|
|
6106
|
-
return j === 0 ? !1 : (t =
|
|
6105
|
+
const Z = a.preferPrefixWidthsForBreakableRuns ? D[p] ?? Y : Y, DA = Z !== Y, { fitCount: j, fittedWidth: l } = kE(Z, t, A, G, o, DA);
|
|
6106
|
+
return j === 0 ? !1 : (t = l, M = p, e = j, V(), j === Y.length ? (M = p + 1, e = 0, !0) : (q(p, j, l + o), _(p, j), !0));
|
|
6107
6107
|
}
|
|
6108
|
-
function
|
|
6108
|
+
function O(p) {
|
|
6109
6109
|
K++, I == null || I({
|
|
6110
6110
|
startSegmentIndex: p.startSegmentIndex,
|
|
6111
6111
|
startGraphemeIndex: 0,
|
|
@@ -6117,51 +6117,51 @@ function FE(B, A, I) {
|
|
|
6117
6117
|
for (let p = 0; p < h.length; p++) {
|
|
6118
6118
|
const Y = h[p];
|
|
6119
6119
|
if (Y.startSegmentIndex === Y.endSegmentIndex) {
|
|
6120
|
-
|
|
6120
|
+
O(Y);
|
|
6121
6121
|
continue;
|
|
6122
6122
|
}
|
|
6123
6123
|
S = !1, t = 0, y = Y.startSegmentIndex, F = 0, M = Y.startSegmentIndex, e = 0, V();
|
|
6124
|
-
let
|
|
6125
|
-
for (;
|
|
6126
|
-
const DA = E[
|
|
6124
|
+
let Z = Y.startSegmentIndex;
|
|
6125
|
+
for (; Z < Y.endSegmentIndex; ) {
|
|
6126
|
+
const DA = E[Z], j = DA === "tab" ? yE(t, s) : C[Z];
|
|
6127
6127
|
if (DA === "soft-hyphen") {
|
|
6128
|
-
S && (M =
|
|
6128
|
+
S && (M = Z + 1, e = 0, R = Z + 1, x = t + o, b = t + o, L = DA), Z++;
|
|
6129
6129
|
continue;
|
|
6130
6130
|
}
|
|
6131
6131
|
if (!S) {
|
|
6132
|
-
j > A && i[
|
|
6132
|
+
j > A && i[Z] !== null ? d(Z) : r(Z, j), AA(Z, j), Z++;
|
|
6133
6133
|
continue;
|
|
6134
6134
|
}
|
|
6135
6135
|
if (t + j > A + G) {
|
|
6136
|
-
const
|
|
6137
|
-
if (
|
|
6138
|
-
|
|
6136
|
+
const v = t + (DA === "tab" ? 0 : g[Z]), gA = t + (DA === "tab" ? j : Q[Z]);
|
|
6137
|
+
if (L === "soft-hyphen" && a.preferEarlySoftHyphenBreak && x <= A + G) {
|
|
6138
|
+
q(R, 0, b);
|
|
6139
6139
|
continue;
|
|
6140
6140
|
}
|
|
6141
|
-
if (
|
|
6142
|
-
|
|
6141
|
+
if (L === "soft-hyphen" && IA(Z)) {
|
|
6142
|
+
Z++;
|
|
6143
6143
|
continue;
|
|
6144
6144
|
}
|
|
6145
|
-
if (Bg(DA) &&
|
|
6146
|
-
|
|
6145
|
+
if (Bg(DA) && v <= A + G) {
|
|
6146
|
+
BA(Z, j), q(Z + 1, 0, gA), Z++;
|
|
6147
6147
|
continue;
|
|
6148
6148
|
}
|
|
6149
|
-
if (R >= 0 &&
|
|
6150
|
-
|
|
6149
|
+
if (R >= 0 && x <= A + G) {
|
|
6150
|
+
q(R, 0, b);
|
|
6151
6151
|
continue;
|
|
6152
6152
|
}
|
|
6153
|
-
if (j > A && i[
|
|
6154
|
-
|
|
6153
|
+
if (j > A && i[Z] !== null) {
|
|
6154
|
+
q(), d(Z), Z++;
|
|
6155
6155
|
continue;
|
|
6156
6156
|
}
|
|
6157
|
-
|
|
6157
|
+
q();
|
|
6158
6158
|
continue;
|
|
6159
6159
|
}
|
|
6160
|
-
|
|
6160
|
+
BA(Z, j), AA(Z, j), Z++;
|
|
6161
6161
|
}
|
|
6162
6162
|
if (S) {
|
|
6163
6163
|
const DA = R === Y.consumedEndSegmentIndex ? b : t;
|
|
6164
|
-
|
|
6164
|
+
q(Y.consumedEndSegmentIndex, 0, DA);
|
|
6165
6165
|
}
|
|
6166
6166
|
}
|
|
6167
6167
|
return K;
|
|
@@ -6193,56 +6193,56 @@ function eE(B, A, I) {
|
|
|
6193
6193
|
const s = [], h = [], a = [], G = [];
|
|
6194
6194
|
let K = B.chunks.length <= 1;
|
|
6195
6195
|
const t = [], S = [], y = [], F = I ? [] : null, M = Array.from({ length: B.len }), e = Array.from({ length: B.len });
|
|
6196
|
-
function R(
|
|
6197
|
-
u !== "text" && u !== "space" && u !== "zero-width-break" && (K = !1), s.push(V), h.push(
|
|
6198
|
-
}
|
|
6199
|
-
for (let
|
|
6200
|
-
M[
|
|
6201
|
-
const V = B.texts[
|
|
6202
|
-
if (
|
|
6203
|
-
R(V, 0, i, i,
|
|
6196
|
+
function R(L, V, q, r, u, BA, AA, d) {
|
|
6197
|
+
u !== "text" && u !== "space" && u !== "zero-width-break" && (K = !1), s.push(V), h.push(q), a.push(r), G.push(u), t == null || t.push(BA), S.push(AA), y.push(d), F !== null && F.push(L);
|
|
6198
|
+
}
|
|
6199
|
+
for (let L = 0; L < B.len; L++) {
|
|
6200
|
+
M[L] = s.length;
|
|
6201
|
+
const V = B.texts[L], q = B.isWordLike[L], r = B.kinds[L], u = B.starts[L];
|
|
6202
|
+
if (r === "soft-hyphen") {
|
|
6203
|
+
R(V, 0, i, i, r, u, null, null), e[L] = s.length;
|
|
6204
6204
|
continue;
|
|
6205
6205
|
}
|
|
6206
|
-
if (
|
|
6207
|
-
R(V, 0, 0, 0,
|
|
6206
|
+
if (r === "hard-break") {
|
|
6207
|
+
R(V, 0, 0, 0, r, u, null, null), e[L] = s.length;
|
|
6208
6208
|
continue;
|
|
6209
6209
|
}
|
|
6210
|
-
if (
|
|
6211
|
-
R(V, 0, 0, 0,
|
|
6210
|
+
if (r === "tab") {
|
|
6211
|
+
R(V, 0, 0, 0, r, u, null, null), e[L] = s.length;
|
|
6212
6212
|
continue;
|
|
6213
6213
|
}
|
|
6214
|
-
const
|
|
6215
|
-
if (
|
|
6216
|
-
let
|
|
6214
|
+
const BA = KI(V, Q);
|
|
6215
|
+
if (r === "text" && BA.containsCJK) {
|
|
6216
|
+
let IA = "", O = 0;
|
|
6217
6217
|
for (const p of C.segment(V)) {
|
|
6218
6218
|
const Y = p.segment;
|
|
6219
|
-
if (
|
|
6220
|
-
|
|
6219
|
+
if (IA.length === 0) {
|
|
6220
|
+
IA = Y, O = p.index;
|
|
6221
6221
|
continue;
|
|
6222
6222
|
}
|
|
6223
|
-
if (Sg.has(
|
|
6224
|
-
|
|
6223
|
+
if (Sg.has(IA) || TQ.has(Y) || jI.has(Y) || g.carryCJKAfterClosingQuote && kI(Y) && uQ(IA)) {
|
|
6224
|
+
IA += Y;
|
|
6225
6225
|
continue;
|
|
6226
6226
|
}
|
|
6227
|
-
const
|
|
6228
|
-
R(
|
|
6227
|
+
const Z = KI(IA, Q), DA = SI(IA, Z, E);
|
|
6228
|
+
R(IA, DA, DA, DA, "text", u + O, null, null), IA = Y, O = p.index;
|
|
6229
6229
|
}
|
|
6230
|
-
if (
|
|
6231
|
-
const p = KI(
|
|
6232
|
-
R(
|
|
6230
|
+
if (IA.length > 0) {
|
|
6231
|
+
const p = KI(IA, Q), Y = SI(IA, p, E);
|
|
6232
|
+
R(IA, Y, Y, Y, "text", u + O, null, null);
|
|
6233
6233
|
}
|
|
6234
|
-
e[
|
|
6234
|
+
e[L] = s.length;
|
|
6235
6235
|
continue;
|
|
6236
6236
|
}
|
|
6237
|
-
const
|
|
6238
|
-
if (
|
|
6239
|
-
const
|
|
6240
|
-
R(V,
|
|
6237
|
+
const AA = SI(V, BA, E), d = r === "space" || r === "preserved-space" || r === "zero-width-break" ? 0 : AA, _ = r === "space" || r === "zero-width-break" ? 0 : AA;
|
|
6238
|
+
if (q && V.length > 1) {
|
|
6239
|
+
const IA = tE(V, BA, Q, E), O = g.preferPrefixWidthsForBreakableRuns ? KE(V, BA, Q, E) : null;
|
|
6240
|
+
R(V, AA, d, _, r, u, IA, O);
|
|
6241
6241
|
} else
|
|
6242
|
-
R(V,
|
|
6243
|
-
e[
|
|
6242
|
+
R(V, AA, d, _, r, u, null, null);
|
|
6243
|
+
e[L] = s.length;
|
|
6244
6244
|
}
|
|
6245
|
-
const
|
|
6245
|
+
const x = cE(B.chunks, M, e), b = t === null ? null : eB(B.normalized, t);
|
|
6246
6246
|
return F !== null ? {
|
|
6247
6247
|
widths: s,
|
|
6248
6248
|
lineEndFitAdvances: h,
|
|
@@ -6254,7 +6254,7 @@ function eE(B, A, I) {
|
|
|
6254
6254
|
breakablePrefixWidths: y,
|
|
6255
6255
|
discretionaryHyphenWidth: i,
|
|
6256
6256
|
tabStopAdvance: o,
|
|
6257
|
-
chunks:
|
|
6257
|
+
chunks: x,
|
|
6258
6258
|
segments: F
|
|
6259
6259
|
} : {
|
|
6260
6260
|
widths: s,
|
|
@@ -6267,7 +6267,7 @@ function eE(B, A, I) {
|
|
|
6267
6267
|
breakablePrefixWidths: y,
|
|
6268
6268
|
discretionaryHyphenWidth: i,
|
|
6269
6269
|
tabStopAdvance: o,
|
|
6270
|
-
chunks:
|
|
6270
|
+
chunks: x
|
|
6271
6271
|
};
|
|
6272
6272
|
}
|
|
6273
6273
|
function cE(B, A, I) {
|
|
@@ -6485,57 +6485,57 @@ const WQ = (B) => B, qE = (B) => B > 0 ? 1 : 0, pE = (B) => B < 1 ? 0 : 1, zC =
|
|
|
6485
6485
|
};
|
|
6486
6486
|
class Di {
|
|
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,7 +6546,7 @@ class Di {
|
|
|
6546
6546
|
Lora: 0.4
|
|
6547
6547
|
});
|
|
6548
6548
|
// Trigger Management
|
|
6549
|
-
|
|
6549
|
+
tA(this, "activeTriggers", /* @__PURE__ */ new Map());
|
|
6550
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) {
|
|
@@ -6600,20 +6600,21 @@ class Di {
|
|
|
6600
6600
|
C && (C.options = { ...C.options, ...I });
|
|
6601
6601
|
}
|
|
6602
6602
|
updateGraphData(A, I) {
|
|
6603
|
+
var g, Q;
|
|
6603
6604
|
if (!this.artboard) return;
|
|
6604
|
-
const C = this.artboard.objects.find((
|
|
6605
|
-
if (C && C.geometry.type === "LineGraph") {
|
|
6606
|
-
const
|
|
6607
|
-
!
|
|
6605
|
+
const C = this.artboard.objects.find((E) => E.id === A || E.name === A);
|
|
6606
|
+
if (C && ((g = C.geometry) == null ? void 0 : g.type) === "LineGraph") {
|
|
6607
|
+
const E = C.geometry;
|
|
6608
|
+
!E.datasets || E.datasets.length === 0 ? E.datasets = [{
|
|
6608
6609
|
id: "default",
|
|
6609
6610
|
label: "Runtime Data",
|
|
6610
6611
|
data: I,
|
|
6611
6612
|
lineColor: "#3b82f6",
|
|
6612
6613
|
lineWidth: 2,
|
|
6613
6614
|
showArea: !1
|
|
6614
|
-
}] :
|
|
6615
|
-
const
|
|
6616
|
-
|
|
6615
|
+
}] : E.datasets[0].data = I;
|
|
6616
|
+
const i = this.objectStates.get(C.id);
|
|
6617
|
+
i && ((Q = i.geometry) == null ? void 0 : Q.type) === "LineGraph" && (!i.geometry.datasets || i.geometry.datasets.length === 0 ? i.geometry.datasets = JSON.parse(JSON.stringify(E.datasets)) : i.geometry.datasets[0].data = [...I]), E.datasets[0].inputId && this.updateInput(E.datasets[0].inputId, I);
|
|
6617
6618
|
} else
|
|
6618
6619
|
this.updateInput(A, I);
|
|
6619
6620
|
}
|
|
@@ -6656,19 +6657,19 @@ class Di {
|
|
|
6656
6657
|
this.physicsEngine.init(I).then(() => {
|
|
6657
6658
|
var C;
|
|
6658
6659
|
this.physicsEngine && ((C = this.artboard) == null || C.objects.forEach((g) => {
|
|
6659
|
-
var Q;
|
|
6660
|
+
var Q, E;
|
|
6660
6661
|
if ((Q = g.physics) != null && Q.enabled && g.type === "Shape") {
|
|
6661
|
-
const
|
|
6662
|
-
if (!
|
|
6663
|
-
const
|
|
6662
|
+
const i = this.objectStates.get(g.id);
|
|
6663
|
+
if (!i) return;
|
|
6664
|
+
const D = g.geometry.width || 100, o = g.geometry.height || 100;
|
|
6664
6665
|
this.physicsEngine.createBody({
|
|
6665
6666
|
id: g.id,
|
|
6666
|
-
type: g.geometry.type,
|
|
6667
|
-
x:
|
|
6668
|
-
y:
|
|
6669
|
-
width:
|
|
6670
|
-
height:
|
|
6671
|
-
rotation:
|
|
6667
|
+
type: ((E = g.geometry) == null ? void 0 : E.type) || "Rectangle",
|
|
6668
|
+
x: i.x,
|
|
6669
|
+
y: i.y,
|
|
6670
|
+
width: D,
|
|
6671
|
+
height: o,
|
|
6672
|
+
rotation: i.rotation * (Math.PI / 180),
|
|
6672
6673
|
// Convert deg to rad
|
|
6673
6674
|
isStatic: g.physics.bodyType === "Static",
|
|
6674
6675
|
mass: g.physics.mass,
|
|
@@ -7016,12 +7017,12 @@ class Di {
|
|
|
7016
7017
|
if (D.type === "Translation") {
|
|
7017
7018
|
const M = this.getGlobalTransform(D.targetId);
|
|
7018
7019
|
if (M) {
|
|
7019
|
-
const e = D.offsetX || 0, R = D.offsetY || 0,
|
|
7020
|
+
const e = D.offsetX || 0, R = D.offsetY || 0, x = M.x + e, b = M.y + R;
|
|
7020
7021
|
if (D.useSpring) {
|
|
7021
|
-
const V = this.objectVelocities.get(I.id) || { vx: 0, vy: 0 }, { x:
|
|
7022
|
-
D.copyX && (g.x = g.x + (
|
|
7022
|
+
const V = this.objectVelocities.get(I.id) || { vx: 0, vy: 0 }, { x: q, y: r, vx: u, vy: BA } = this.computeSpring(g.x, g.y, V.vx, V.vy, x, b, D, A);
|
|
7023
|
+
D.copyX && (g.x = g.x + (q - g.x) * o), D.copyY && (g.y = g.y + (r - g.y) * o), this.objectVelocities.set(I.id, { vx: u, vy: BA });
|
|
7023
7024
|
} else
|
|
7024
|
-
D.copyX && (g.x = g.x + (
|
|
7025
|
+
D.copyX && (g.x = g.x + (x - g.x) * o), D.copyY && (g.y = g.y + (b - g.y) * o);
|
|
7025
7026
|
(h = D.limitX) != null && h.enabled && (g.x = Math.max(D.limitX.min, Math.min(D.limitX.max, g.x))), (a = D.limitY) != null && a.enabled && (g.y = Math.max(D.limitY.min, Math.min(D.limitY.max, g.y)));
|
|
7026
7027
|
}
|
|
7027
7028
|
} else if (D.type === "Rotation") {
|
|
@@ -7043,32 +7044,32 @@ class Di {
|
|
|
7043
7044
|
} else if (D.type === "FollowPointer") {
|
|
7044
7045
|
const M = ((G = this._lastPointerPos) == null ? void 0 : G.x) ?? g.x, e = ((K = this._lastPointerPos) == null ? void 0 : K.y) ?? g.y;
|
|
7045
7046
|
if (D.useSpring) {
|
|
7046
|
-
const
|
|
7047
|
-
g.x = b, g.y =
|
|
7047
|
+
const x = this.objectVelocities.get(I.id) || { vx: 0, vy: 0 }, { x: b, y: L, vx: V, vy: q } = this.computeSpring(g.x, g.y, x.vx, x.vy, M, e, D, A);
|
|
7048
|
+
g.x = b, g.y = L, this.objectVelocities.set(I.id, { vx: V, vy: q });
|
|
7048
7049
|
} else
|
|
7049
7050
|
g.x = g.x + (M - g.x) * o, g.y = g.y + (e - g.y) * o;
|
|
7050
7051
|
(t = D.limitX) != null && t.enabled && (g.x = Math.max(D.limitX.min, Math.min(D.limitX.max, g.x))), (S = D.limitY) != null && S.enabled && (g.y = Math.max(D.limitY.min, Math.min(D.limitY.max, g.y)));
|
|
7051
7052
|
} else if (D.type === "Distance") {
|
|
7052
7053
|
const M = this.getGlobalTransform(D.targetId);
|
|
7053
7054
|
if (M) {
|
|
7054
|
-
const e = g.x - M.x, R = g.y - M.y,
|
|
7055
|
-
let
|
|
7055
|
+
const e = g.x - M.x, R = g.y - M.y, x = Math.sqrt(e * e + R * R), b = D.distance || 0;
|
|
7056
|
+
let L = x;
|
|
7056
7057
|
switch (D.mode) {
|
|
7057
7058
|
case "exact":
|
|
7058
|
-
|
|
7059
|
+
L = b;
|
|
7059
7060
|
break;
|
|
7060
7061
|
case "minimum":
|
|
7061
|
-
|
|
7062
|
+
L = Math.max(b, x);
|
|
7062
7063
|
break;
|
|
7063
7064
|
case "maximum":
|
|
7064
|
-
|
|
7065
|
+
L = Math.min(b, x);
|
|
7065
7066
|
break;
|
|
7066
7067
|
case "clamped":
|
|
7067
|
-
|
|
7068
|
+
L = Math.max(0, Math.min(b, x));
|
|
7068
7069
|
break;
|
|
7069
7070
|
}
|
|
7070
|
-
if (
|
|
7071
|
-
const V = g.x === M.x && g.y === M.y ? 1 :
|
|
7071
|
+
if (x > 0) {
|
|
7072
|
+
const V = g.x === M.x && g.y === M.y ? 1 : L / x;
|
|
7072
7073
|
g.x = g.x + (M.x + e * V - g.x) * o, g.y = g.y + (M.y + R * V - g.y) * o;
|
|
7073
7074
|
}
|
|
7074
7075
|
}
|
|
@@ -7079,18 +7080,21 @@ class Di {
|
|
|
7079
7080
|
if (e) {
|
|
7080
7081
|
let R = M.geometry;
|
|
7081
7082
|
if (M.type === "Frame" || M.type === "Group" || !R || R.type !== "Path") {
|
|
7082
|
-
const j = (F = this.artboard) == null ? void 0 : F.objects.find((
|
|
7083
|
-
var
|
|
7084
|
-
return
|
|
7083
|
+
const j = (F = this.artboard) == null ? void 0 : F.objects.find((l) => {
|
|
7084
|
+
var v;
|
|
7085
|
+
return l.parentId === M.id && l.type === "Shape" && ((v = l.geometry) == null ? void 0 : v.type) === "Path";
|
|
7085
7086
|
});
|
|
7086
7087
|
j && (R = j.geometry);
|
|
7087
7088
|
}
|
|
7088
7089
|
if (!R || R.type !== "Path") return;
|
|
7089
|
-
const
|
|
7090
|
+
const x = (D.distance || 0) / 100, b = e.width || R.width || 0, L = e.height || R.height || 0, V = this.getPointOnPath(R, b, L, x), q = e.rotation * Math.PI / 180, r = Math.cos(q), u = Math.sin(q), BA = V.x * e.scale_x * r - V.y * e.scale_y * u, AA = V.x * e.scale_x * u + V.y * e.scale_y * r;
|
|
7090
7091
|
let d = e.rotation + (D.offsetRotation || 0);
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7092
|
+
if (D.orient) {
|
|
7093
|
+
const j = Math.cos(V.angle), l = Math.sin(V.angle), v = j * e.scale_x * r - l * e.scale_y * u, gA = j * e.scale_x * u + l * e.scale_y * r;
|
|
7094
|
+
d = Math.atan2(gA, v) * 180 / Math.PI + (D.offsetRotation || 0);
|
|
7095
|
+
}
|
|
7096
|
+
const _ = d * Math.PI / 180, IA = Math.cos(_), O = Math.sin(_), p = (D.offsetX || 0) * IA - (D.offsetY || 0) * O, Y = (D.offsetX || 0) * O + (D.offsetY || 0) * IA, Z = e.x + BA + p, DA = e.y + AA + Y;
|
|
7097
|
+
if (g.x = g.x + (Z - g.x) * o, g.y = g.y + (DA - g.y) * o, D.orient) {
|
|
7094
7098
|
let j = (d - g.rotation) % 360;
|
|
7095
7099
|
j > 180 && (j -= 360), j < -180 && (j += 360), g.rotation = g.rotation + j * o;
|
|
7096
7100
|
}
|
|
@@ -7102,7 +7106,7 @@ class Di {
|
|
|
7102
7106
|
}
|
|
7103
7107
|
}), I.constraints.some((Q) => Q.type !== "IK")) {
|
|
7104
7108
|
const Q = this.globalToLocal(I.parentId, g);
|
|
7105
|
-
C.x = Q.x, C.y = Q.y, C.rotation = Q.rotation, C.scale_x = Q.scale_x, C.scale_y = Q.scale_y;
|
|
7109
|
+
C.x = Q.x, C.y = Q.y, C.rotation = Q.rotation, C.flip_x = Q.scale_x < 0, C.scale_x = Math.abs(Q.scale_x), C.flip_y = Q.scale_y < 0, C.scale_y = Math.abs(Q.scale_y);
|
|
7106
7110
|
}
|
|
7107
7111
|
});
|
|
7108
7112
|
}
|
|
@@ -7116,16 +7120,16 @@ class Di {
|
|
|
7116
7120
|
x: I.x,
|
|
7117
7121
|
y: I.y,
|
|
7118
7122
|
rotation: I.rotation,
|
|
7119
|
-
scale_x: I.scale_x ?? 1,
|
|
7120
|
-
scale_y: I.scale_y ?? 1
|
|
7123
|
+
scale_x: (I.scale_x ?? 1) * (I.flip_x ? -1 : 1),
|
|
7124
|
+
scale_y: (I.scale_y ?? 1) * (I.flip_y ? -1 : 1)
|
|
7121
7125
|
};
|
|
7122
7126
|
const g = this.getGlobalTransform(C.parentId), Q = g.rotation * Math.PI / 180, E = Math.cos(Q), i = Math.sin(Q), D = g.x + (I.x * g.scale_x * E - I.y * g.scale_y * i), o = g.y + (I.x * g.scale_x * i + I.y * g.scale_y * E);
|
|
7123
7127
|
return {
|
|
7124
7128
|
x: D,
|
|
7125
7129
|
y: o,
|
|
7126
7130
|
rotation: g.rotation + I.rotation,
|
|
7127
|
-
scale_x: g.scale_x * (I.scale_x ?? 1),
|
|
7128
|
-
scale_y: g.scale_y * (I.scale_y ?? 1)
|
|
7131
|
+
scale_x: g.scale_x * (I.scale_x ?? 1) * (I.flip_x ? -1 : 1),
|
|
7132
|
+
scale_y: g.scale_y * (I.scale_y ?? 1) * (I.flip_y ? -1 : 1)
|
|
7129
7133
|
};
|
|
7130
7134
|
}
|
|
7131
7135
|
globalToLocal(A, I) {
|
|
@@ -7162,8 +7166,8 @@ class Di {
|
|
|
7162
7166
|
const R = Math.atan2(S, t);
|
|
7163
7167
|
let b = (Math.atan2(F, y) - R) * 180 / Math.PI;
|
|
7164
7168
|
b *= g;
|
|
7165
|
-
const
|
|
7166
|
-
|
|
7169
|
+
const L = this.objectStates.get(G.id);
|
|
7170
|
+
L && (L.rotation += b);
|
|
7167
7171
|
}
|
|
7168
7172
|
}
|
|
7169
7173
|
}
|
|
@@ -7224,12 +7228,12 @@ class Di {
|
|
|
7224
7228
|
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);
|
|
7225
7229
|
return;
|
|
7226
7230
|
}
|
|
7227
|
-
if ((A === "up" || A === "blur") && (this.draggingSliderId = null, this.draggingListViewId = null, this.draggingBehaviors.clear()), A === "down" && g && ((D = g.behaviors) != null && D.some((G) => G.type ===
|
|
7231
|
+
if ((A === "up" || A === "blur") && (this.draggingSliderId = null, this.draggingListViewId = null, this.draggingBehaviors.clear()), A === "down" && g && ((D = g.behaviors) != null && D.some((G) => G.type === P.Draggable)) && this.draggingBehaviors.add(i), this.activeDropdownId && A === "down") {
|
|
7228
7232
|
const G = this.artboard.objects.find((K) => K.id === this.activeDropdownId);
|
|
7229
7233
|
if (G && (G.type === "Dropdown" || G.variant === "dropdown")) {
|
|
7230
|
-
const K = this.objectStates.get(G.id), t = (K == null ? void 0 : K.options) || G.options || {}, S = G.geometry || {}, y = S.width ?? G.width ?? 200, F = S.height ?? G.height ?? 40, M = t.optionsList || [], e = t.itemHeight || 32, R = t.listPadding ?? 4,
|
|
7231
|
-
if (
|
|
7232
|
-
const
|
|
7234
|
+
const K = this.objectStates.get(G.id), t = (K == null ? void 0 : K.options) || G.options || {}, S = G.geometry || {}, y = S.width ?? G.width ?? 200, F = S.height ?? G.height ?? 40, M = t.optionsList || [], e = t.itemHeight || 32, R = t.listPadding ?? 4, x = M.length * e + R * 2, b = this.getWorldTransform(G.id), L = y * Math.abs(b.scaleX), V = F * Math.abs(b.scaleY), q = b.y + V / 2 + 4, r = Math.abs(I - b.x) <= L / 2, u = C >= q && C <= q + x * Math.abs(b.scaleY);
|
|
7235
|
+
if (r && u) {
|
|
7236
|
+
const BA = Math.abs(b.scaleY), AA = C - (q + R * BA), d = Math.floor(AA / (e * BA));
|
|
7233
7237
|
if (d >= 0 && d < M.length) {
|
|
7234
7238
|
const _ = M[d];
|
|
7235
7239
|
t.selectedOption = _, t.isOpen = !1, this.activeDropdownId = null, G.inputId && this.setInternalInput(G.inputId, _), this.onComponentChange && this.onComponentChange({
|
|
@@ -7430,8 +7434,8 @@ class Di {
|
|
|
7430
7434
|
const F = Q.min ?? 0, M = Q.max ?? 100, e = Q.step || 1;
|
|
7431
7435
|
let R = F + y * (M - F);
|
|
7432
7436
|
e > 0 && (R = Math.round(R / e) * e), R = Math.max(F, Math.min(M, R));
|
|
7433
|
-
const
|
|
7434
|
-
|
|
7437
|
+
const x = g.options || {};
|
|
7438
|
+
x.value !== R && (g.options = { ...x, value: R }, A.inputId && this.setInternalInput(A.inputId, R), this.onComponentChange && this.onComponentChange({
|
|
7435
7439
|
objectId: A.id,
|
|
7436
7440
|
componentName: A.name,
|
|
7437
7441
|
variant: "slider",
|
|
@@ -7635,30 +7639,30 @@ class Di {
|
|
|
7635
7639
|
return 0.5;
|
|
7636
7640
|
}
|
|
7637
7641
|
renderObject(A, I, C) {
|
|
7638
|
-
var
|
|
7642
|
+
var O, p, Y, Z, DA, j, l, v, gA, wA, GA, NA, MA;
|
|
7639
7643
|
const g = this.objectStates.get(I.id);
|
|
7640
7644
|
if (!g) {
|
|
7641
7645
|
console.warn("No state for object:", I.id);
|
|
7642
7646
|
return;
|
|
7643
7647
|
}
|
|
7644
|
-
this.frameCount % 60 === 0 && ((
|
|
7648
|
+
this.frameCount % 60 === 0 && ((O = I.geometry) == null ? void 0 : O.type) === "Path" && console.log("[Engine] Rendering Path:", I.name, "Type:", I.type, "Style:", JSON.stringify(I.style)), A.roundRect || (A.roundRect = (W, CA, f, U, X) => (this.drawRoundRect(A, W, CA, f, U, X), A));
|
|
7645
7649
|
const Q = g.geometry ? this.deepMerge(I.geometry, g.geometry) : I.geometry, E = g.style ? this.deepMerge(I.style, g.style) : I.style;
|
|
7646
7650
|
let i = (Q == null ? void 0 : Q.width) || ((p = I.geometry) == null ? void 0 : p.width) || I.width || 0, D = (Q == null ? void 0 : Q.height) || ((Y = I.geometry) == null ? void 0 : Y.height) || I.height || 0;
|
|
7647
7651
|
if ((i === 0 || D === 0) && (Q != null && Q.points) && Array.isArray(Q.points) && Q.points.length > 0) {
|
|
7648
|
-
let
|
|
7649
|
-
Q.points.forEach((
|
|
7650
|
-
|
|
7651
|
-
}), i === 0 && (i =
|
|
7652
|
-
}
|
|
7653
|
-
const o = (
|
|
7654
|
-
if (
|
|
7655
|
-
return
|
|
7652
|
+
let W = 1 / 0, CA = -1 / 0, f = 1 / 0, U = -1 / 0;
|
|
7653
|
+
Q.points.forEach((X) => {
|
|
7654
|
+
W = Math.min(W, X.x), CA = Math.max(CA, X.x), f = Math.min(f, X.y), U = Math.max(U, X.y);
|
|
7655
|
+
}), i === 0 && (i = CA - W), D === 0 && (D = U - f);
|
|
7656
|
+
}
|
|
7657
|
+
const o = (W) => {
|
|
7658
|
+
if (W)
|
|
7659
|
+
return W.corner_radius ?? W.cornerRadius;
|
|
7656
7660
|
}, s = o(g) ?? o(E) ?? o(Q) ?? o(I.style) ?? o(I.geometry) ?? 0, h = { ...Q, width: i, height: D };
|
|
7657
7661
|
if (delete h.cornerRadius, h.corner_radius = s, g.visible === !1)
|
|
7658
7662
|
return;
|
|
7659
7663
|
const a = g.x, G = g.y;
|
|
7660
7664
|
A.save();
|
|
7661
|
-
const K = [], t = E.blur || ((
|
|
7665
|
+
const K = [], t = E.blur || ((Z = I.style) == null ? void 0 : Z.blur);
|
|
7662
7666
|
t && t.amount > 0 && K.push(`blur(${t.amount}px)`);
|
|
7663
7667
|
const S = ((DA = Q == null ? void 0 : Q.type) == null ? void 0 : DA.toLowerCase().includes("image")) || ((j = I.type) == null ? void 0 : j.toLowerCase().includes("image")), y = E.adjustments && Object.keys(E.adjustments).length > 0 ? E.adjustments : null, F = Q != null && Q.adjustments && Object.keys(Q.adjustments).length > 0 ? Q.adjustments : null, M = S ? F || y : y || F, e = S && !M ? {
|
|
7664
7668
|
exposure: 0,
|
|
@@ -7673,67 +7677,67 @@ class Di {
|
|
|
7673
7677
|
hue: 0
|
|
7674
7678
|
} : M;
|
|
7675
7679
|
if (g && e && (g.geometry = g.geometry || {}, g.geometry.adjustments = { ...e }), e) {
|
|
7676
|
-
const
|
|
7677
|
-
let
|
|
7678
|
-
if (
|
|
7679
|
-
<feComponentTransfer in="${
|
|
7680
|
-
<feFuncR type="linear" slope="1" intercept="${
|
|
7681
|
-
<feFuncG type="linear" slope="1" intercept="${
|
|
7682
|
-
<feFuncB type="linear" slope="1" intercept="${
|
|
7683
|
-
</feComponentTransfer>`,
|
|
7684
|
-
const
|
|
7685
|
-
|
|
7686
|
-
<feComponentTransfer in="${
|
|
7687
|
-
<feFuncR type="linear" slope="${
|
|
7688
|
-
<feFuncG type="linear" slope="${
|
|
7689
|
-
<feFuncB type="linear" slope="${
|
|
7690
|
-
</feComponentTransfer>`,
|
|
7680
|
+
const W = (e.exposure || 0) / 100, CA = e.contrast || 0, f = 1 + (e.saturation || 0) / 100, U = (e.temperature || 0) / 200, X = (e.tint || 0) / 200, z = (e.highlights || 0) / 500, cA = (e.shadows || 0) / 500;
|
|
7681
|
+
let FA = "", yA = "SourceGraphic";
|
|
7682
|
+
if (W !== 0 && (FA += `
|
|
7683
|
+
<feComponentTransfer in="${yA}" result="exposure">
|
|
7684
|
+
<feFuncR type="linear" slope="1" intercept="${W}"/>
|
|
7685
|
+
<feFuncG type="linear" slope="1" intercept="${W}"/>
|
|
7686
|
+
<feFuncB type="linear" slope="1" intercept="${W}"/>
|
|
7687
|
+
</feComponentTransfer>`, yA = "exposure"), CA !== 0) {
|
|
7688
|
+
const n = (CA + 100) / 100, N = 0.5 * (1 - n);
|
|
7689
|
+
FA += `
|
|
7690
|
+
<feComponentTransfer in="${yA}" result="contrast">
|
|
7691
|
+
<feFuncR type="linear" slope="${n}" intercept="${N}"/>
|
|
7692
|
+
<feFuncG type="linear" slope="${n}" intercept="${N}"/>
|
|
7693
|
+
<feFuncB type="linear" slope="${n}" intercept="${N}"/>
|
|
7694
|
+
</feComponentTransfer>`, yA = "contrast";
|
|
7691
7695
|
}
|
|
7692
|
-
if (f !== 1 && (
|
|
7693
|
-
const
|
|
7694
|
-
|
|
7695
|
-
<feColorMatrix in="${
|
|
7696
|
-
values="${
|
|
7697
|
-
0 ${
|
|
7698
|
-
0 0 ${
|
|
7699
|
-
0 0 0 1 0"/>`,
|
|
7696
|
+
if (f !== 1 && (FA += `<feColorMatrix in="${yA}" type="saturate" values="${f}" result="saturate"/>`, yA = "saturate"), e.hue && (FA += `<feColorMatrix in="${yA}" type="hueRotate" values="${e.hue}" result="hue"/>`, yA = "hue"), e.negative) {
|
|
7697
|
+
const n = 1 - e.negative / 50;
|
|
7698
|
+
FA += `
|
|
7699
|
+
<feColorMatrix in="${yA}" type="matrix" result="invert"
|
|
7700
|
+
values="${n} 0 0 0 ${1 - n}
|
|
7701
|
+
0 ${n} 0 0 ${1 - n}
|
|
7702
|
+
0 0 ${n} 0 ${1 - n}
|
|
7703
|
+
0 0 0 1 0"/>`, yA = "invert";
|
|
7700
7704
|
}
|
|
7701
|
-
if (
|
|
7702
|
-
const
|
|
7703
|
-
|
|
7705
|
+
if (U !== 0 || X !== 0 || z !== 0 || cA !== 0) {
|
|
7706
|
+
const n = 1 + z + cA, N = n * (1 + U - X / 2), hA = n * (1 + X), YA = n * (1 - U - X / 2), dA = e.shadows * 0.1 / 255, lA = [
|
|
7707
|
+
N,
|
|
7704
7708
|
0,
|
|
7705
7709
|
0,
|
|
7706
7710
|
0,
|
|
7707
|
-
|
|
7711
|
+
dA,
|
|
7708
7712
|
0,
|
|
7709
|
-
|
|
7713
|
+
hA,
|
|
7710
7714
|
0,
|
|
7711
7715
|
0,
|
|
7712
|
-
|
|
7716
|
+
dA,
|
|
7713
7717
|
0,
|
|
7714
7718
|
0,
|
|
7715
|
-
|
|
7719
|
+
YA,
|
|
7716
7720
|
0,
|
|
7717
|
-
|
|
7721
|
+
dA,
|
|
7718
7722
|
0,
|
|
7719
7723
|
0,
|
|
7720
7724
|
0,
|
|
7721
7725
|
1,
|
|
7722
7726
|
0
|
|
7723
7727
|
].join(" ");
|
|
7724
|
-
|
|
7728
|
+
FA += `<feColorMatrix in="${yA}" type="matrix" values="${lA}" result="advanced"/>`, yA = "advanced";
|
|
7725
7729
|
}
|
|
7726
|
-
if (e.blur && (
|
|
7727
|
-
const
|
|
7728
|
-
K.push(`url('data:image/svg+xml;base64,${
|
|
7730
|
+
if (e.blur && (FA += `<feGaussianBlur in="${yA}" stdDeviation="${e.blur}" result="blur"/>`, yA = "blur"), FA) {
|
|
7731
|
+
const n = `<svg xmlns="http://www.w3.org/2000/svg"><filter id="f" color-interpolation-filters="sRGB">${FA}</filter></svg>`, N = btoa(n);
|
|
7732
|
+
K.push(`url('data:image/svg+xml;base64,${N}#f')`);
|
|
7729
7733
|
}
|
|
7730
7734
|
}
|
|
7731
7735
|
K.length > 0 ? A.filter = K.join(" ") : A.filter = "none", A.imageSmoothingEnabled = !0, A.imageSmoothingQuality = "high";
|
|
7732
|
-
const R = A.globalAlpha,
|
|
7733
|
-
A.globalAlpha = R *
|
|
7736
|
+
const R = A.globalAlpha, x = this.normalizeOpacity(g.opacity !== void 0 ? g.opacity : 100);
|
|
7737
|
+
A.globalAlpha = R * x;
|
|
7734
7738
|
const b = g.compositeOperation || g.blendMode;
|
|
7735
7739
|
if (b && b !== "Normal") {
|
|
7736
|
-
const
|
|
7740
|
+
const W = b.toLowerCase();
|
|
7737
7741
|
[
|
|
7738
7742
|
"multiply",
|
|
7739
7743
|
"screen",
|
|
@@ -7763,9 +7767,9 @@ class Di {
|
|
|
7763
7767
|
"xor",
|
|
7764
7768
|
"multiply",
|
|
7765
7769
|
"screen"
|
|
7766
|
-
].includes(
|
|
7770
|
+
].includes(W) && (A.globalCompositeOperation = W);
|
|
7767
7771
|
}
|
|
7768
|
-
const
|
|
7772
|
+
const L = A, V = g.masks || (I.maskedBy ? [{
|
|
7769
7773
|
maskId: I.maskedBy,
|
|
7770
7774
|
inverted: I.maskInverted === !0,
|
|
7771
7775
|
type: I.maskType || "alpha",
|
|
@@ -7773,263 +7777,263 @@ class Di {
|
|
|
7773
7777
|
feather: I.maskFeather || 0,
|
|
7774
7778
|
isVisible: !0
|
|
7775
7779
|
}] : []);
|
|
7776
|
-
let
|
|
7777
|
-
const
|
|
7778
|
-
if (
|
|
7779
|
-
const
|
|
7780
|
-
f && f.visible !== !1 && (
|
|
7780
|
+
let q = !1;
|
|
7781
|
+
const r = V.filter((W) => W.isVisible !== !1 && C.has(W.maskId));
|
|
7782
|
+
if (r.length > 0) {
|
|
7783
|
+
const W = r[0], CA = C.get(W.maskId), f = this.objectStates.get(CA.id);
|
|
7784
|
+
f && f.visible !== !1 && (q = !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.setTransform(1, 0, 0, 1, 0, 0), this.maskCtx.globalCompositeOperation = "source-over", this.maskCtx.globalAlpha = 1, this.maskCtx.filter = "none", 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 = L.filter);
|
|
7781
7785
|
}
|
|
7782
7786
|
A.translate(Math.round(a), Math.round(G)), A.rotate(g.rotation * Math.PI / 180);
|
|
7783
|
-
const u = g.skew_x || 0,
|
|
7784
|
-
(u !== 0 ||
|
|
7787
|
+
const u = g.skew_x || 0, BA = g.skew_y || 0;
|
|
7788
|
+
(u !== 0 || BA !== 0) && A.transform(1, Math.tan(BA * Math.PI / 180), Math.tan(u * Math.PI / 180), 1, 0, 0), A.scale(
|
|
7785
7789
|
(g.scale_x ?? 1) * (g.flip_x === !0 ? -1 : 1),
|
|
7786
7790
|
(g.scale_y ?? 1) * (g.flip_y === !0 ? -1 : 1)
|
|
7787
7791
|
);
|
|
7788
|
-
const
|
|
7789
|
-
if (
|
|
7790
|
-
let
|
|
7791
|
-
(
|
|
7792
|
-
const
|
|
7793
|
-
let z =
|
|
7794
|
-
if (
|
|
7795
|
-
const
|
|
7796
|
-
z = `rgba(${H}, ${
|
|
7797
|
-
} else if (
|
|
7798
|
-
const
|
|
7799
|
-
if (
|
|
7800
|
-
const H =
|
|
7801
|
-
z = `rgba(${H}, ${
|
|
7792
|
+
const AA = E.shadow;
|
|
7793
|
+
if (AA && AA.isEnabled !== !1) {
|
|
7794
|
+
let W = AA.color || "#000000";
|
|
7795
|
+
(v = (l = this.artboard) == null ? void 0 : l.tokens) != null && v.colors && this.artboard.tokens.colors[W] && (W = this.artboard.tokens.colors[W]);
|
|
7796
|
+
const CA = this.normalizeOpacity(AA.opacity ?? 100), f = AA.spread || 0, X = (AA.blur || 0) + f * 1.5;
|
|
7797
|
+
let z = W;
|
|
7798
|
+
if (W.startsWith("#")) {
|
|
7799
|
+
const yA = W.replace("#", ""), H = parseInt(yA.substring(0, 2), 16), n = parseInt(yA.substring(2, 4), 16), N = parseInt(yA.substring(4, 6), 16);
|
|
7800
|
+
z = `rgba(${H}, ${n}, ${N}, ${CA})`;
|
|
7801
|
+
} else if (W.startsWith("rgba")) {
|
|
7802
|
+
const yA = W.match(/[\d.]+/g);
|
|
7803
|
+
if (yA && yA.length >= 4) {
|
|
7804
|
+
const H = yA[0], n = yA[1], N = yA[2], hA = yA[3];
|
|
7805
|
+
z = `rgba(${H}, ${n}, ${N}, ${parseFloat(hA) * CA})`;
|
|
7802
7806
|
}
|
|
7803
7807
|
}
|
|
7804
|
-
const
|
|
7805
|
-
A.shadowColor = z, A.shadowBlur =
|
|
7808
|
+
const cA = A.getTransform(), FA = Math.sqrt(cA.a * cA.a + cA.b * cA.b) || 1;
|
|
7809
|
+
A.shadowColor = z, A.shadowBlur = X * FA, A.shadowOffsetX = (AA.offsetX || 0) * FA, A.shadowOffsetY = (AA.offsetY || 0) * FA;
|
|
7806
7810
|
}
|
|
7807
|
-
const d = I.liquidFill || ((
|
|
7811
|
+
const d = I.liquidFill || ((gA = I.style) == null ? void 0 : gA.liquidFill), _ = I.artEffect || ((wA = I.style) == null ? void 0 : wA.artEffect);
|
|
7808
7812
|
if (d && d.enabled) {
|
|
7809
7813
|
A.save();
|
|
7810
|
-
const
|
|
7814
|
+
const W = d.fillLevel ?? 0.5;
|
|
7811
7815
|
A.beginPath();
|
|
7812
|
-
const
|
|
7813
|
-
A.rect(-i / 2,
|
|
7816
|
+
const CA = D / 2 - D * W;
|
|
7817
|
+
A.rect(-i / 2, CA, i, D * W), A.clip(), A.fillStyle = d.color || "#3b82f6", A.globalAlpha = A.globalAlpha * (d.opacity ?? 1);
|
|
7814
7818
|
}
|
|
7815
|
-
const
|
|
7816
|
-
if (
|
|
7819
|
+
const IA = _ && _.enabled && _.type === "glitch";
|
|
7820
|
+
if (IA) {
|
|
7817
7821
|
A.save();
|
|
7818
|
-
const
|
|
7819
|
-
A.shadowColor = "rgba(255, 0, 0, 0.5)", A.shadowBlur =
|
|
7822
|
+
const CA = (_.intensity ?? 0.5) * 10, f = A.getTransform(), U = Math.sqrt(f.a * f.a + f.b * f.b) || 1;
|
|
7823
|
+
A.shadowColor = "rgba(255, 0, 0, 0.5)", A.shadowBlur = CA * U, A.translate(CA / 2, 0);
|
|
7820
7824
|
}
|
|
7821
7825
|
if (Q.type === "Text")
|
|
7822
7826
|
this._renderText(A, I, h, E, g, i, D);
|
|
7823
7827
|
else if (Q.type === "Image") {
|
|
7824
|
-
const
|
|
7825
|
-
if (
|
|
7826
|
-
let
|
|
7827
|
-
|
|
7828
|
-
},
|
|
7829
|
-
console.error(`[ExodeUI] Image load failed: ${
|
|
7830
|
-
},
|
|
7831
|
-
const f = E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1,
|
|
7832
|
-
if (f && (
|
|
7828
|
+
const W = Q.src;
|
|
7829
|
+
if (W) {
|
|
7830
|
+
let CA = this.imageCache.get(W);
|
|
7831
|
+
CA || (CA = new Image(), CA.onload = () => {
|
|
7832
|
+
}, CA.onerror = () => {
|
|
7833
|
+
console.error(`[ExodeUI] Image load failed: ${W.substring(0, 100)}${W.length > 100 ? "..." : ""}`);
|
|
7834
|
+
}, CA.src = W, this.imageCache.set(W, CA));
|
|
7835
|
+
const f = E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1, U = (((GA = E.stroke) == null ? void 0 : GA.alignment) || "center").toLowerCase();
|
|
7836
|
+
if (f && (U === "outside" || U === "center") && this.applyStrokeAlignment(A, E, h, i, D, s), E.fill && E.fill.type !== "None") {
|
|
7833
7837
|
A.save();
|
|
7834
|
-
const
|
|
7835
|
-
A.fillStyle = z || E.fill.color || "transparent", A.globalAlpha =
|
|
7838
|
+
const X = A.globalAlpha, z = this.createCanvasFill(A, E.fill, i, D);
|
|
7839
|
+
A.fillStyle = z || E.fill.color || "transparent", A.globalAlpha = X * this.normalizeOpacity(E.fill.opacity ?? 100), s !== 0 ? (this.drawRoundRect(A, -i / 2, -D / 2, i, D, s), A.fill()) : A.fillRect(-i / 2, -D / 2, i, D), A.globalAlpha = X, A.restore();
|
|
7836
7840
|
}
|
|
7837
|
-
|
|
7841
|
+
CA.complete && CA.naturalWidth > 0 ? (s !== 0 ? (A.save(), this.drawRoundRect(A, -i / 2, -D / 2, i, D, s), A.clip(), A.drawImage(CA, -i / 2, -D / 2, i, D), A.restore()) : A.drawImage(CA, -i / 2, -D / 2, i, D), f && U === "inside" && this.applyStrokeAlignment(A, E, h, i, D, s)) : f && U === "inside" && this.applyStrokeAlignment(A, E, h, i, D, s);
|
|
7838
7842
|
}
|
|
7839
7843
|
} else if (Q.type === "SVG") {
|
|
7840
|
-
const
|
|
7841
|
-
if (
|
|
7842
|
-
const
|
|
7844
|
+
const W = Q.svgContent;
|
|
7845
|
+
if (W) {
|
|
7846
|
+
const CA = E.palette || [], f = E.fill, U = E.stroke, X = f ? this.normalizeOpacity(f.opacity ?? 100) : 1, z = (f == null ? void 0 : f.type) === "Solid" && (!U || U.isEnabled === !1 || U.type === "Solid" && U.color === f.color), cA = f && f.type !== "None" ? z ? "monochrome" : f.type === "Solid" ? (f.color || "") + "|opacity:" + X : JSON.stringify(f.stops || []) + "|opacity:" + X : "", FA = U && U.isEnabled !== !1 && (U.width || 0) > 0 ? z ? [
|
|
7843
7847
|
"monochrome",
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7848
|
+
U.width || 0,
|
|
7849
|
+
U.trimStart ?? 0,
|
|
7850
|
+
U.trimEnd ?? 1,
|
|
7851
|
+
U.trimOffset ?? 0,
|
|
7852
|
+
U.dashOffset ?? 0
|
|
7849
7853
|
].join("|") : [
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
(
|
|
7854
|
+
U.width || 0,
|
|
7855
|
+
U.fill ? U.fill.type === "Solid" ? U.fill.color || "" : JSON.stringify(U.fill.stops || []) : U.color || "",
|
|
7856
|
+
U.opacity ?? 1,
|
|
7857
|
+
U.lineCap || "",
|
|
7858
|
+
U.lineJoin || "",
|
|
7859
|
+
(U.dashArray || []).join(","),
|
|
7856
7860
|
// [FIX] Include trim-path values so stroke-draw animations bust the cache
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
].join("|") : "nostroke",
|
|
7861
|
+
U.trimStart ?? 0,
|
|
7862
|
+
U.trimEnd ?? 1,
|
|
7863
|
+
U.trimOffset ?? 0,
|
|
7864
|
+
U.dashOffset ?? 0
|
|
7865
|
+
].join("|") : "nostroke", yA = [
|
|
7862
7866
|
I.id,
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7867
|
+
CA.join("_"),
|
|
7868
|
+
cA,
|
|
7869
|
+
FA,
|
|
7866
7870
|
g.opacity ?? 100,
|
|
7867
7871
|
g.visible !== !1 ? "v" : "h"
|
|
7868
7872
|
].join("_");
|
|
7869
|
-
let H = this.imageCache.get(
|
|
7873
|
+
let H = this.imageCache.get(yA);
|
|
7870
7874
|
if (!H) {
|
|
7871
7875
|
H = new Image(), H.crossOrigin = "anonymous";
|
|
7872
|
-
let
|
|
7873
|
-
if (Q.colors && Q.colors.length > 0 &&
|
|
7874
|
-
if (
|
|
7875
|
-
const
|
|
7876
|
-
|
|
7876
|
+
let N = W;
|
|
7877
|
+
if (Q.colors && Q.colors.length > 0 && CA.length > 0 && Q.colors.forEach((iA, SA) => {
|
|
7878
|
+
if (CA[SA]) {
|
|
7879
|
+
const UA = iA.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), QA = new RegExp(UA, "gi");
|
|
7880
|
+
N = N.replace(QA, CA[SA]);
|
|
7877
7881
|
}
|
|
7878
7882
|
}), f && f.type && f.type !== "None") {
|
|
7879
7883
|
if (f.type === "Solid" && f.color) {
|
|
7880
|
-
const
|
|
7881
|
-
|
|
7884
|
+
const iA = z ? "#FFFFFF" : f.color, SA = z ? 1 : this.normalizeOpacity(f.opacity ?? 100);
|
|
7885
|
+
N = N.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (UA) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test(UA) ? UA : `fill="${iA}"`), N = N.replace(/fill\s*:\s*[^;"')]+/gi, (UA) => /fill\s*:\s*(none|transparent)/i.test(UA) ? UA : `fill:${iA}`), SA < 1 && (N = N.replace(/\bfill-opacity\s*=\s*["'][^"']*["']/gi, `fill-opacity="${SA}"`), N = N.replace(/fill-opacity\s*:\s*[^;"')]+/gi, `fill-opacity:${SA}`), N.match(/\bfill-opacity\s*=/i) || (N = N.replace(/(<svg[^>]*>)/i, `$1<g fill-opacity="${SA}">`), N = N.replace(/<\/svg>/i, "</g></svg>")));
|
|
7882
7886
|
} else if (f.type === "LinearGradient" || f.type === "RadialGradient" || f.type === "Linear" || f.type === "Radial") {
|
|
7883
|
-
const
|
|
7884
|
-
const
|
|
7885
|
-
return `<stop offset="${
|
|
7887
|
+
const iA = "exode-fill", SA = this.normalizeOpacity(f.opacity ?? 100), UA = (f.stops || []).map((T) => {
|
|
7888
|
+
const oA = T.offset !== void 0 ? T.offset : T.pos ?? 0, sA = this.normalizeOpacity(T.opacity ?? 100) * SA;
|
|
7889
|
+
return `<stop offset="${oA * 100}%" stop-color="${T.color || "#000"}" stop-opacity="${sA}"/>`;
|
|
7886
7890
|
}).join("");
|
|
7887
|
-
let
|
|
7891
|
+
let QA = "";
|
|
7888
7892
|
if (f.type === "LinearGradient" || f.type === "Linear") {
|
|
7889
|
-
const
|
|
7890
|
-
|
|
7893
|
+
const T = (EA, kA) => Array.isArray(EA) ? EA[kA] ?? (kA === 0 ? 0 : 1) : EA && typeof EA == "object" ? EA[kA === 0 ? "x" : "y"] ?? (kA === 0 ? 0 : 1) : kA === 0 ? 0 : 1, oA = T(f.start, 0) * 100, sA = T(f.start, 1) * 100, m = T(f.end, 0) * 100, $ = T(f.end, 1) * 100;
|
|
7894
|
+
QA = `<linearGradient id="${iA}" x1="${oA}%" y1="${sA}%" x2="${m}%" y2="${$}%" gradientUnits="objectBoundingBox">${UA}</linearGradient>`;
|
|
7891
7895
|
} else {
|
|
7892
|
-
const
|
|
7893
|
-
|
|
7896
|
+
const T = ($, EA) => Array.isArray($) ? $[EA] ?? 0.5 : $ && typeof $ == "object" ? $[EA === 0 ? "x" : "y"] ?? 0.5 : 0.5, oA = T(f.center, 0) * 100, sA = T(f.center, 1) * 100, m = (f.radius ?? 0.5) * 100;
|
|
7897
|
+
QA = `<radialGradient id="${iA}" cx="${oA}%" cy="${sA}%" r="${m}%" gradientUnits="objectBoundingBox">${UA}</radialGradient>`;
|
|
7894
7898
|
}
|
|
7895
|
-
/<defs>/i.test(
|
|
7899
|
+
/<defs>/i.test(N) ? N = N.replace(/<defs>/i, `<defs>${QA}`) : N = N.replace(/<svg([^>]*)>/i, `<svg$1><defs>${QA}</defs>`), N = N.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (T) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test(T) ? T : `fill="url(#${iA})"`), N = N.replace(/fill\s*:\s*[^;"')]+/gi, (T) => /fill\s*:\s*(none|transparent)/i.test(T) ? T : `fill:url(#${iA})`);
|
|
7896
7900
|
}
|
|
7897
7901
|
}
|
|
7898
|
-
const
|
|
7899
|
-
const
|
|
7900
|
-
const
|
|
7901
|
-
return `<stop offset="${
|
|
7902
|
-
}).join(""),
|
|
7903
|
-
if (
|
|
7904
|
-
const
|
|
7905
|
-
return `<linearGradient id="${
|
|
7902
|
+
const hA = (iA, SA, UA = 1) => {
|
|
7903
|
+
const QA = (iA.stops || []).map(($) => {
|
|
7904
|
+
const EA = $.offset !== void 0 ? $.offset : $.pos ?? 0, kA = this.normalizeOpacity($.opacity ?? 100) * UA;
|
|
7905
|
+
return `<stop offset="${EA * 100}%" stop-color="${$.color || "#000"}" stop-opacity="${kA}"/>`;
|
|
7906
|
+
}).join(""), T = ($, EA, kA = 0.5) => Array.isArray($) ? $[EA] ?? kA : $ && typeof $ == "object" ? $[EA === 0 ? "x" : "y"] ?? kA : kA;
|
|
7907
|
+
if (iA.type === "LinearGradient" || iA.type === "Linear") {
|
|
7908
|
+
const $ = T(iA.start, 0, 0) * 100, EA = T(iA.start, 1, 0) * 100, kA = T(iA.end, 0, 1) * 100, vA = T(iA.end, 1, 1) * 100;
|
|
7909
|
+
return `<linearGradient id="${SA}" x1="${$}%" y1="${EA}%" x2="${kA}%" y2="${vA}%" gradientUnits="objectBoundingBox">${QA}</linearGradient>`;
|
|
7906
7910
|
}
|
|
7907
|
-
const
|
|
7908
|
-
return `<radialGradient id="${
|
|
7909
|
-
},
|
|
7910
|
-
if (
|
|
7911
|
-
const
|
|
7912
|
-
let
|
|
7913
|
-
const
|
|
7914
|
-
if (
|
|
7915
|
-
if (
|
|
7916
|
-
|
|
7917
|
-
else if (
|
|
7918
|
-
const
|
|
7919
|
-
|
|
7911
|
+
const oA = T(iA.center, 0, 0.5) * 100, sA = T(iA.center, 1, 0.5) * 100, m = (iA.radius ?? 0.5) * 100;
|
|
7912
|
+
return `<radialGradient id="${SA}" cx="${oA}%" cy="${sA}%" r="${m}%" gradientUnits="objectBoundingBox">${QA}</radialGradient>`;
|
|
7913
|
+
}, YA = (iA, SA) => /<defs>/i.test(iA) ? iA.replace(/<defs>/i, `<defs>${SA}`) : iA.replace(/(<svg[^>]*>)/i, `$1<defs>${SA}</defs>`);
|
|
7914
|
+
if (U && U.isEnabled !== !1 && (U.width || 0) > 0) {
|
|
7915
|
+
const iA = U.width || 1, SA = z ? 1 : this.normalizeOpacity(U.opacity ?? 100), UA = z ? "#FFFFFF" : U.color || (f == null ? void 0 : f.color) || "#000000";
|
|
7916
|
+
let QA = "";
|
|
7917
|
+
const T = U.fill;
|
|
7918
|
+
if (T && T.type) {
|
|
7919
|
+
if (T.type === "Solid")
|
|
7920
|
+
QA = T.color || U.color || "#000000";
|
|
7921
|
+
else if (T.type === "LinearGradient" || T.type === "RadialGradient" || T.type === "Linear" || T.type === "Radial") {
|
|
7922
|
+
const kA = "exode-stroke";
|
|
7923
|
+
N = YA(N, hA(T, kA, SA)), QA = `url(#${kA})`;
|
|
7920
7924
|
}
|
|
7921
7925
|
}
|
|
7922
|
-
|
|
7926
|
+
QA || (QA = UA), N.match(/\bstroke\s*=/i) ? N = N.replace(
|
|
7923
7927
|
/\bstroke\s*=\s*["'][^"']*["']/gi,
|
|
7924
|
-
(
|
|
7925
|
-
) :
|
|
7928
|
+
(kA) => /stroke\s*=\s*["']\s*(none|transparent)\s*["']/i.test(kA) ? kA : `stroke="${QA}"`
|
|
7929
|
+
) : N = N.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke="${QA}"`), N = N.replace(
|
|
7926
7930
|
new RegExp(`(?<![a-z-])stroke\\s*:\\s*(?!none|transparent)[^;"')]+`, "gi"),
|
|
7927
|
-
`stroke:${
|
|
7928
|
-
),
|
|
7929
|
-
const
|
|
7930
|
-
if (
|
|
7931
|
-
const
|
|
7932
|
-
this.frameCount % 600 === 0 && this.debugLog(`SVG Trim - Object: ${I.name || I.id}, Start: ${
|
|
7931
|
+
`stroke:${QA}`
|
|
7932
|
+
), N.match(/\bstroke-width\s*=/i) ? N = N.replace(/\bstroke-width\s*=\s*["'][^"']*["']/gi, `stroke-width="${iA}"`) : N = N.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-width="${iA}"`), N = N.replace(/stroke-width\s*:\s*[^;"')]+/gi, `stroke-width:${iA}`), N.match(/\bstroke-opacity\s*=/i) ? N = N.replace(/\bstroke-opacity\s*=\s*["'][^"']*["']/gi, `stroke-opacity="${SA}"`) : N = N.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-opacity="${SA}"`), N = N.replace(/stroke-opacity\s*:\s*[^;"')]+/gi, `stroke-opacity:${SA}`), U.lineCap && (N = N.replace(/\bstroke-linecap\s*=\s*["'][^"']*["']/gi, `stroke-linecap="${U.lineCap}"`), N = N.replace(/stroke-linecap\s*:\s*[^;"')]+/gi, `stroke-linecap:${U.lineCap}`)), U.lineJoin && (N = N.replace(/\bstroke-linejoin\s*=\s*["'][^"']*["']/gi, `stroke-linejoin="${U.lineJoin}"`), N = N.replace(/stroke-linejoin\s*:\s*[^;"')]+/gi, `stroke-linejoin:${U.lineJoin}`));
|
|
7933
|
+
const oA = U.trimStart ?? 0, sA = U.trimEnd ?? 1, m = U.trimOffset ?? 0, $ = U.dashOffset ?? 0, EA = oA !== 0 || sA !== 1 || m !== 0 || $ !== 0;
|
|
7934
|
+
if (EA) {
|
|
7935
|
+
const kA = Math.max(0, Math.min(1, oA)), vA = Math.max(0, Math.min(1, sA));
|
|
7936
|
+
this.frameCount % 600 === 0 && this.debugLog(`SVG Trim - Object: ${I.name || I.id}, Start: ${kA}, End: ${vA}`);
|
|
7933
7937
|
let XI = Q.width || i || 100, vI = Q.height || D || 100;
|
|
7934
|
-
const nI =
|
|
7938
|
+
const nI = W.match(/viewBox=["']\s*0\s+0\s+([\d.]+)\s+([\d.]+)\s*["']/i);
|
|
7935
7939
|
if (nI) {
|
|
7936
7940
|
const aI = parseFloat(nI[1]), MI = parseFloat(nI[2]);
|
|
7937
7941
|
!isNaN(aI) && !isNaN(MI) && (XI = aI, vI = MI);
|
|
7938
7942
|
}
|
|
7939
|
-
const hI = (XI + vI) * 2, YI = (
|
|
7943
|
+
const hI = (XI + vI) * 2, YI = (m % 1 + 1) % 1, EI = ($ % 1 + 1) % 1;
|
|
7940
7944
|
let AI = "", iI = 0;
|
|
7941
|
-
if (
|
|
7945
|
+
if (kA >= vA)
|
|
7942
7946
|
AI = `0 ${hI}`, iI = 0;
|
|
7943
7947
|
else {
|
|
7944
|
-
const aI = hI * (vA -
|
|
7945
|
-
iI = -(hI * (
|
|
7948
|
+
const aI = hI * (vA - kA), MI = hI - aI;
|
|
7949
|
+
iI = -(hI * (kA + YI + EI)), AI = `${aI} ${MI}`;
|
|
7946
7950
|
}
|
|
7947
|
-
|
|
7948
|
-
} else if (
|
|
7949
|
-
const
|
|
7950
|
-
|
|
7951
|
+
N.match(/\bstroke-dasharray\s*=/i) ? N = N.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${AI}"`) : N = N.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-dasharray="${AI}"`), N = N.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${AI}`), N.match(/\bstroke-dashoffset\s*=/i) ? N = N.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${iI}"`) : N = N.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-dashoffset="${iI}"`), N = N.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${iI}`);
|
|
7952
|
+
} else if (U.dashArray && U.dashArray.length > 0) {
|
|
7953
|
+
const kA = U.dashArray.join(" ");
|
|
7954
|
+
N = N.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${kA}"`), N = N.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${kA}`), U.dashOffset && (N = N.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${U.dashOffset}"`), N = N.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${U.dashOffset}`));
|
|
7951
7955
|
}
|
|
7952
|
-
if (!/\bstroke\s*=\s*["']/i.test(
|
|
7953
|
-
let
|
|
7954
|
-
if (
|
|
7955
|
-
const hI = Q.width || i || 100, YI = Q.height || D || 100, EI = (hI + YI) * 2, AI = Math.max(0, Math.min(1,
|
|
7956
|
+
if (!/\bstroke\s*=\s*["']/i.test(W) && !new RegExp("(?<![a-z-])stroke\\s*:", "i").test(W)) {
|
|
7957
|
+
let kA = "", vA = "";
|
|
7958
|
+
if (EA) {
|
|
7959
|
+
const hI = Q.width || i || 100, YI = Q.height || D || 100, EI = (hI + YI) * 2, AI = Math.max(0, Math.min(1, oA)), iI = Math.max(0, Math.min(1, sA)), aI = (m % 1 + 1) % 1, MI = ($ % 1 + 1) % 1;
|
|
7956
7960
|
if (AI >= iI)
|
|
7957
|
-
|
|
7961
|
+
kA = ` stroke-dasharray="0 ${EI}"`, vA = ' stroke-dashoffset="0"';
|
|
7958
7962
|
else {
|
|
7959
7963
|
const yC = EI * (iI - AI), XQ = EI - yC, vQ = -(EI * (AI + aI + MI));
|
|
7960
|
-
|
|
7964
|
+
kA = ` stroke-dasharray="${yC} ${XQ}"`, vA = ` stroke-dashoffset="${vQ}"`;
|
|
7961
7965
|
}
|
|
7962
|
-
} else (
|
|
7963
|
-
const XI =
|
|
7964
|
-
|
|
7966
|
+
} else (NA = U.dashArray) != null && NA.length && (kA = ` stroke-dasharray="${U.dashArray.join(" ")}"`, U.dashOffset && (vA = ` stroke-dashoffset="${U.dashOffset}"`));
|
|
7967
|
+
const XI = U.lineCap ? ` stroke-linecap="${U.lineCap}"` : "", vI = U.lineJoin ? ` stroke-linejoin="${U.lineJoin}"` : "", nI = `stroke="${QA}" stroke-width="${iA}" stroke-opacity="${SA}"${XI}${vI}${kA}${vA}`;
|
|
7968
|
+
N = N.replace(
|
|
7965
7969
|
/(<svg[^>]*>)(\s*(?:<defs>[\s\S]*?<\/defs>)?)/i,
|
|
7966
7970
|
(hI, YI, EI) => `${YI}${EI}<g ${nI}>`
|
|
7967
|
-
),
|
|
7971
|
+
), N = N.replace(/<\/svg>/i, "</g></svg>");
|
|
7968
7972
|
}
|
|
7969
|
-
} else
|
|
7970
|
-
const
|
|
7973
|
+
} else U && U.isEnabled === !1 && (N = N.replace(/\bstroke\s*=\s*["'][^"']*["']/gi, 'stroke="none"'), N = N.replace(new RegExp(`(?<![a-z-])stroke\\s*:\\s*(?!none|transparent)[^;"')]+`, "gi"), "stroke:none"));
|
|
7974
|
+
const dA = new Blob([N], { type: "image/svg+xml" }), lA = URL.createObjectURL(dA);
|
|
7971
7975
|
H.onload = () => {
|
|
7972
|
-
if (URL.revokeObjectURL(
|
|
7973
|
-
const
|
|
7974
|
-
|
|
7976
|
+
if (URL.revokeObjectURL(lA), this.frameCount % 900 === 0) {
|
|
7977
|
+
const iA = this.imageCache.get(yA);
|
|
7978
|
+
iA && this.debugLog(`SVG Payload Ready: ${I.name || I.id} (${iA.naturalWidth}x${iA.naturalHeight})`);
|
|
7975
7979
|
}
|
|
7976
7980
|
}, H.onerror = () => {
|
|
7977
|
-
URL.revokeObjectURL(
|
|
7978
|
-
}, H.src =
|
|
7981
|
+
URL.revokeObjectURL(lA), this.debugLog(`SVG Error: Failed to load payload for ${I.name || I.id}`);
|
|
7982
|
+
}, H.src = lA, this.imageCache.set(yA, H);
|
|
7979
7983
|
}
|
|
7980
|
-
let
|
|
7981
|
-
if (H.complete && H.naturalWidth > 0 ? (
|
|
7982
|
-
const
|
|
7984
|
+
let n = null;
|
|
7985
|
+
if (H.complete && H.naturalWidth > 0 ? (n = H, this.lastValidSvgImgMap.set(I.id, H)) : n = this.lastValidSvgImgMap.get(I.id) || null, n && n.complete && n.naturalWidth > 0) {
|
|
7986
|
+
const N = Math.max(1, i), hA = Math.max(1, D);
|
|
7983
7987
|
if (z && (f == null ? void 0 : f.type) === "Solid") {
|
|
7984
|
-
this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width =
|
|
7985
|
-
const
|
|
7986
|
-
this.maskCtx.fillStyle =
|
|
7987
|
-
} else s !== 0 ? (A.save(), this.drawRoundRect(A, -
|
|
7988
|
+
this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width = N, this.maskBuffer.height = hA, this.maskCtx.setTransform(1, 0, 0, 1, 0, 0), this.maskCtx.globalCompositeOperation = "source-over", this.maskCtx.globalAlpha = 1, this.maskCtx.filter = "none", this.maskCtx.clearRect(0, 0, N, hA), this.maskCtx.drawImage(n, 0, 0, N, hA), this.maskCtx.globalCompositeOperation = "source-in";
|
|
7989
|
+
const YA = f.color || "#000000", dA = this.normalizeOpacity(f.opacity ?? 100);
|
|
7990
|
+
this.maskCtx.fillStyle = YA, this.maskCtx.globalAlpha = dA, this.maskCtx.fillRect(0, 0, N, hA), A.drawImage(this.maskBuffer, -N / 2, -hA / 2, N, hA);
|
|
7991
|
+
} else s !== 0 ? (A.save(), this.drawRoundRect(A, -N / 2, -hA / 2, N, hA, s), A.clip(), A.drawImage(n, -N / 2, -hA / 2, N, hA), A.restore()) : A.drawImage(n, -N / 2, -hA / 2, N, hA);
|
|
7988
7992
|
}
|
|
7989
7993
|
}
|
|
7990
7994
|
} else if (h.type === "LineGraph")
|
|
7991
7995
|
this.renderLineGraph(A, h, i, D);
|
|
7992
7996
|
else if (I.type === "Shape") {
|
|
7993
7997
|
if (this.applyPath(A, h, i, D, s), A.save(), E.blur && E.blur.amount > 0 && (A.filter = `blur(${E.blur.amount}px)`), E.fill) {
|
|
7994
|
-
const
|
|
7995
|
-
|
|
7998
|
+
const W = A.globalAlpha, CA = this.createCanvasFill(A, E.fill, i, D);
|
|
7999
|
+
CA ? A.fillStyle = CA : A.fillStyle = typeof E.fill == "string" ? E.fill : E.fill.color || "transparent", A.globalAlpha = W * this.normalizeOpacity(E.fill.opacity ?? 100), this.applyPath(A, h, i, D, s), A.fill(), A.globalAlpha = W;
|
|
7996
8000
|
}
|
|
7997
8001
|
A.restore(), E.stroke && E.stroke.width > 0 && this.applyStrokeAlignment(A, E, h, i, D, s);
|
|
7998
8002
|
} else if (I.type === "Frame" || I.type === "Group" && !I.isStructuralGroup) {
|
|
7999
|
-
const
|
|
8000
|
-
if (A.save(), A.beginPath(), this.drawRoundRect(A, -
|
|
8001
|
-
const
|
|
8002
|
-
A.fillStyle =
|
|
8003
|
+
const W = g.width ?? Q.width ?? I.width ?? i, CA = g.height ?? Q.height ?? I.height ?? D, f = s;
|
|
8004
|
+
if (A.save(), A.beginPath(), this.drawRoundRect(A, -W / 2, -CA / 2, W, CA, f), E.fill && E.fill.type !== "None") {
|
|
8005
|
+
const U = A.globalAlpha, X = this.createCanvasFill(A, E.fill, W, CA);
|
|
8006
|
+
A.fillStyle = X || E.fill.color || "transparent", A.globalAlpha = U * this.normalizeOpacity(E.fill.opacity ?? 100), A.fill(), A.globalAlpha = U;
|
|
8003
8007
|
}
|
|
8004
8008
|
if (A.restore(), E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1) {
|
|
8005
|
-
const
|
|
8006
|
-
this.applyStrokeAlignment(A, E,
|
|
8009
|
+
const U = { type: "Rectangle" };
|
|
8010
|
+
this.applyStrokeAlignment(A, E, U, W, CA, f);
|
|
8007
8011
|
}
|
|
8008
|
-
} 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) : this.frameCount % 60 === 0 && console.warn("[Engine] Unhandled object type in renderObject:", I.type, "Geo:", (
|
|
8009
|
-
if (
|
|
8010
|
-
const
|
|
8012
|
+
} 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) : this.frameCount % 60 === 0 && console.warn("[Engine] Unhandled object type in renderObject:", I.type, "Geo:", (MA = I.geometry) == null ? void 0 : MA.type));
|
|
8013
|
+
if (IA && A.restore(), d && d.enabled && A.restore(), I.children && I.children.length > 0) {
|
|
8014
|
+
const CA = I.type === "Frame", f = I.clipsContent !== void 0 ? I.clipsContent : I.clipContent !== void 0 ? I.clipContent : CA;
|
|
8011
8015
|
if (A.save(), f) {
|
|
8012
8016
|
A.beginPath();
|
|
8013
|
-
const
|
|
8014
|
-
this.drawRoundRect(A, -
|
|
8017
|
+
const X = g.width ?? (Q == null ? void 0 : Q.width) ?? I.width ?? 0, z = g.height ?? (Q == null ? void 0 : Q.height) ?? I.height ?? 0, cA = g.cornerRadius ?? (Q == null ? void 0 : Q.corner_radius) ?? I.cornerRadius ?? 0;
|
|
8018
|
+
this.drawRoundRect(A, -X / 2, -z / 2, X, z, cA), A.clip();
|
|
8015
8019
|
}
|
|
8016
|
-
let
|
|
8017
|
-
for (I.children.forEach((
|
|
8018
|
-
const z = C.get(
|
|
8020
|
+
let U = 0;
|
|
8021
|
+
for (I.children.forEach((X) => {
|
|
8022
|
+
const z = C.get(X);
|
|
8019
8023
|
if (!z) return;
|
|
8020
|
-
const
|
|
8021
|
-
if (
|
|
8022
|
-
const
|
|
8023
|
-
this.applyObjectTransform(A,
|
|
8024
|
-
const
|
|
8025
|
-
this.applyPath(A,
|
|
8024
|
+
const cA = this.objectStates.get(X), FA = (cA == null ? void 0 : cA.geometry) || z.geometry;
|
|
8025
|
+
if (FA && FA.isMask && (cA == null ? void 0 : cA.visible) !== !1) {
|
|
8026
|
+
const yA = FA.width || 0, H = FA.height || 0;
|
|
8027
|
+
this.applyObjectTransform(A, X);
|
|
8028
|
+
const n = (cA == null ? void 0 : cA.corner_radius) ?? (FA == null ? void 0 : FA.corner_radius) ?? 0;
|
|
8029
|
+
this.applyPath(A, FA, yA, H, n), A.clip(), U++;
|
|
8026
8030
|
} else
|
|
8027
8031
|
this.renderObject(A, z, C);
|
|
8028
|
-
});
|
|
8029
|
-
A.restore(),
|
|
8032
|
+
}); U > 0; )
|
|
8033
|
+
A.restore(), U--;
|
|
8030
8034
|
A.restore();
|
|
8031
8035
|
}
|
|
8032
|
-
if (
|
|
8036
|
+
if (q) {
|
|
8033
8037
|
this.maskCtx.restore(), (g.masks || (I.maskedBy ? [{
|
|
8034
8038
|
maskId: I.maskedBy,
|
|
8035
8039
|
inverted: I.maskInverted === !0,
|
|
@@ -8037,77 +8041,78 @@ class Di {
|
|
|
8037
8041
|
opacity: I.maskOpacity !== void 0 ? I.maskOpacity / 100 : 1,
|
|
8038
8042
|
feather: I.maskFeather || 0,
|
|
8039
8043
|
isVisible: !0
|
|
8040
|
-
}] : [])).filter((
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
this.
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8044
|
+
}] : [])).filter((U) => U.isVisible !== !1 && C.has(U.maskId)).forEach((U) => {
|
|
8045
|
+
var n, N, hA, YA, dA, lA;
|
|
8046
|
+
const X = C.get(U.maskId), z = this.objectStates.get(X.id), cA = U.feather || 0, FA = U.inverted === !0, yA = U.opacity !== void 0 ? typeof U.opacity == "number" ? U.opacity : U.opacity / 100 : 1;
|
|
8047
|
+
if ((U.type || "alpha") === "luma") {
|
|
8048
|
+
(!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.setTransform(1, 0, 0, 1, 0, 0), this.lumaCtx.globalCompositeOperation = "source-over", this.lumaCtx.globalAlpha = 1, this.lumaCtx.filter = "none", 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, X.id, C), cA > 0 && (this.lumaCtx.filter = `blur(${cA}px)`), this.lumaCtx.globalAlpha = yA;
|
|
8049
|
+
const iA = (z == null ? void 0 : z.width) || X.geometry.width || 0, SA = (z == null ? void 0 : z.height) || X.geometry.height || 0, UA = (z == null ? void 0 : z.corner_radius) ?? X.corner_radius ?? 0;
|
|
8050
|
+
if (((n = X.geometry) == null ? void 0 : n.type) === "Text") {
|
|
8051
|
+
const sA = z != null && z.geometry ? this.deepMerge(X.geometry, z.geometry) : X.geometry, m = z != null && z.style ? this.deepMerge(X.style, z.style) : X.style;
|
|
8052
|
+
this._renderText(this.lumaCtx, X, { ...sA, width: iA, height: SA, corner_radius: UA }, m, z, iA, SA, !0);
|
|
8053
|
+
} else if (((N = X.geometry) == null ? void 0 : N.type) === "Image") {
|
|
8054
|
+
const sA = X.geometry.src;
|
|
8055
|
+
if (sA) {
|
|
8056
|
+
let m = this.imageCache.get(sA);
|
|
8057
|
+
m || (m = new Image(), m.src = sA, this.imageCache.set(sA, m)), m.complete && m.naturalWidth > 0 ? this.lumaCtx.drawImage(m, -iA / 2, -SA / 2, iA, SA) : (this.applyPath(this.lumaCtx, X.geometry, iA, SA, UA), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
|
|
8053
8058
|
}
|
|
8054
|
-
} else if (
|
|
8055
|
-
const
|
|
8056
|
-
if (
|
|
8057
|
-
const
|
|
8058
|
-
let
|
|
8059
|
-
if (
|
|
8060
|
-
|
|
8061
|
-
const EA = new Blob([
|
|
8062
|
-
|
|
8059
|
+
} else if (((hA = X.geometry) == null ? void 0 : hA.type) === "SVG") {
|
|
8060
|
+
const sA = X.geometry.svgContent;
|
|
8061
|
+
if (sA) {
|
|
8062
|
+
const m = `__lumamask_${X.id}`;
|
|
8063
|
+
let $ = this.imageCache.get(m);
|
|
8064
|
+
if (!$) {
|
|
8065
|
+
$ = new Image();
|
|
8066
|
+
const EA = new Blob([sA], { type: "image/svg+xml" });
|
|
8067
|
+
$.src = URL.createObjectURL(EA), $.onload = () => {
|
|
8063
8068
|
this.artboard && this.reset();
|
|
8064
|
-
}, this.imageCache.set(
|
|
8069
|
+
}, this.imageCache.set(m, $);
|
|
8065
8070
|
}
|
|
8066
|
-
|
|
8071
|
+
$.complete && $.naturalWidth > 0 ? this.lumaCtx.drawImage($, -iA / 2, -SA / 2, iA, SA) : (this.applyPath(this.lumaCtx, X.geometry, iA, SA, UA), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
|
|
8067
8072
|
}
|
|
8068
8073
|
} else
|
|
8069
|
-
this.applyPath(this.lumaCtx,
|
|
8074
|
+
this.applyPath(this.lumaCtx, X.geometry, iA, SA, UA), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill();
|
|
8070
8075
|
this.lumaCtx.restore();
|
|
8071
|
-
const
|
|
8072
|
-
for (let
|
|
8073
|
-
const
|
|
8074
|
-
let
|
|
8075
|
-
|
|
8076
|
+
const QA = this.maskCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight), T = this.lumaCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight).data, oA = QA.data;
|
|
8077
|
+
for (let sA = 0; sA < oA.length; sA += 4) {
|
|
8078
|
+
const m = T[sA], $ = T[sA + 1], EA = T[sA + 2];
|
|
8079
|
+
let kA = (0.299 * m + 0.587 * $ + 0.114 * EA) / 255;
|
|
8080
|
+
FA && (kA = 1 - kA), oA[sA + 3] *= kA;
|
|
8076
8081
|
}
|
|
8077
|
-
this.maskCtx.putImageData(
|
|
8082
|
+
this.maskCtx.putImageData(QA, 0, 0);
|
|
8078
8083
|
} else {
|
|
8079
|
-
this.maskCtx.save(), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), this.maskCtx.globalCompositeOperation =
|
|
8080
|
-
const
|
|
8081
|
-
if (
|
|
8082
|
-
const
|
|
8083
|
-
this._renderText(this.maskCtx,
|
|
8084
|
-
} else if (
|
|
8085
|
-
const
|
|
8086
|
-
if (
|
|
8087
|
-
let
|
|
8088
|
-
|
|
8084
|
+
this.maskCtx.save(), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), this.maskCtx.globalCompositeOperation = FA ? "destination-out" : "destination-in", cA > 0 && (this.maskCtx.filter = `blur(${cA}px)`), this.maskCtx.globalAlpha = yA, this.applyAbsoluteTransform(this.maskCtx, X.id, C);
|
|
8085
|
+
const iA = (z == null ? void 0 : z.width) || X.geometry.width || 0, SA = (z == null ? void 0 : z.height) || X.geometry.height || 0, UA = (z == null ? void 0 : z.corner_radius) ?? X.corner_radius ?? 0;
|
|
8086
|
+
if (((YA = X.geometry) == null ? void 0 : YA.type) === "Text") {
|
|
8087
|
+
const QA = z != null && z.geometry ? this.deepMerge(X.geometry, z.geometry) : X.geometry, T = z != null && z.style ? this.deepMerge(X.style, z.style) : X.style;
|
|
8088
|
+
this._renderText(this.maskCtx, X, { ...QA, width: iA, height: SA, corner_radius: UA }, T, z, iA, SA, !0);
|
|
8089
|
+
} else if (((dA = X.geometry) == null ? void 0 : dA.type) === "Image") {
|
|
8090
|
+
const QA = X.geometry.src;
|
|
8091
|
+
if (QA) {
|
|
8092
|
+
let T = this.imageCache.get(QA);
|
|
8093
|
+
T || (T = new Image(), T.src = QA, this.imageCache.set(QA, T)), T.complete && T.naturalWidth > 0 ? this.maskCtx.drawImage(T, -iA / 2, -SA / 2, iA, SA) : (this.applyPath(this.maskCtx, X.geometry, iA, SA, UA), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
|
|
8089
8094
|
}
|
|
8090
|
-
} else if (
|
|
8091
|
-
const
|
|
8092
|
-
if (
|
|
8093
|
-
const
|
|
8094
|
-
let
|
|
8095
|
-
if (!
|
|
8096
|
-
|
|
8097
|
-
const
|
|
8098
|
-
|
|
8095
|
+
} else if (((lA = X.geometry) == null ? void 0 : lA.type) === "SVG") {
|
|
8096
|
+
const QA = X.geometry.svgContent;
|
|
8097
|
+
if (QA) {
|
|
8098
|
+
const T = `__alphamask_${X.id}`;
|
|
8099
|
+
let oA = this.imageCache.get(T);
|
|
8100
|
+
if (!oA) {
|
|
8101
|
+
oA = new Image();
|
|
8102
|
+
const sA = new Blob([QA], { type: "image/svg+xml" });
|
|
8103
|
+
oA.src = URL.createObjectURL(sA), oA.onload = () => {
|
|
8099
8104
|
this.artboard && this.reset();
|
|
8100
|
-
}, this.imageCache.set(
|
|
8105
|
+
}, this.imageCache.set(T, oA);
|
|
8101
8106
|
}
|
|
8102
|
-
|
|
8107
|
+
oA.complete && oA.naturalWidth > 0 ? this.maskCtx.drawImage(oA, -iA / 2, -SA / 2, iA, SA) : (this.applyPath(this.maskCtx, X.geometry, iA, SA, UA), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
|
|
8103
8108
|
}
|
|
8104
8109
|
} else
|
|
8105
|
-
this.applyPath(this.maskCtx,
|
|
8110
|
+
this.applyPath(this.maskCtx, X.geometry, iA, SA, UA), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill();
|
|
8106
8111
|
this.maskCtx.restore();
|
|
8107
8112
|
}
|
|
8108
|
-
}),
|
|
8113
|
+
}), L.save(), L.setTransform(1, 0, 0, 1, 0, 0);
|
|
8109
8114
|
const f = I.maskBlendMode || I.blendMode;
|
|
8110
|
-
f && f !== "Normal" && (
|
|
8115
|
+
f && f !== "Normal" && (L.globalCompositeOperation = f.toLowerCase()), L.drawImage(this.maskBuffer, 0, 0), L.restore(), L.restore();
|
|
8111
8116
|
} else
|
|
8112
8117
|
A.restore();
|
|
8113
8118
|
}
|
|
@@ -8115,265 +8120,265 @@ class Di {
|
|
|
8115
8120
|
var DA, j;
|
|
8116
8121
|
let s = C.text || "";
|
|
8117
8122
|
if (C.textInputId && !D) {
|
|
8118
|
-
const
|
|
8119
|
-
|
|
8123
|
+
const l = this.inputs.get(C.textInputId);
|
|
8124
|
+
l !== void 0 && (s = String(l), Q.geometry && Q.geometry.type === "Text" && (Q.geometry.text = s));
|
|
8120
8125
|
}
|
|
8121
8126
|
let h = s || "";
|
|
8122
8127
|
if (C.segments && Array.isArray(C.segments)) {
|
|
8123
|
-
const
|
|
8124
|
-
|
|
8128
|
+
const l = C.segments.map((v) => v && v.text ? v.text : "").join("");
|
|
8129
|
+
l !== h && l.toUpperCase() === (s || "").toUpperCase() ? h = s || "" : h = l;
|
|
8125
8130
|
}
|
|
8126
8131
|
let a = ((DA = C.fontWeight) == null ? void 0 : DA.toString()) || "400", G = "normal";
|
|
8127
8132
|
a.toLowerCase().includes("italic") && (G = "italic", a = a.replace(/italic/gi, "").trim() || "400");
|
|
8128
8133
|
const K = this.mapFontWeight(a), t = Math.max(1, C.fontSize || 16);
|
|
8129
8134
|
let S = C.fontFamily || "Inter";
|
|
8130
8135
|
const y = ["Bold", "SemiBold", "Medium", "Regular", "Light", "Thin", "ExtraBold", "Black", "Italic"];
|
|
8131
|
-
y.forEach((
|
|
8132
|
-
const
|
|
8133
|
-
|
|
8136
|
+
y.forEach((l) => {
|
|
8137
|
+
const v = new RegExp(`[\\s-]${l}$`, "i");
|
|
8138
|
+
v.test(S) && (S = S.replace(v, "").trim());
|
|
8134
8139
|
}), A.font = `${G} ${K} ${t}px "${S}", sans-serif`;
|
|
8135
8140
|
const F = C.textVerticalAlign || "top";
|
|
8136
8141
|
A.textBaseline = "top";
|
|
8137
8142
|
const M = C.textAlign || "left";
|
|
8138
8143
|
A.textAlign = M;
|
|
8139
|
-
const e = C.letterSpacing || 0, R = C.paragraphSpacing || 0,
|
|
8140
|
-
if (e === 0) return A.measureText(
|
|
8141
|
-
let
|
|
8142
|
-
for (let
|
|
8143
|
-
|
|
8144
|
-
return
|
|
8145
|
-
},
|
|
8146
|
-
let
|
|
8147
|
-
if (!
|
|
8148
|
-
const
|
|
8149
|
-
|
|
8150
|
-
}
|
|
8151
|
-
const u =
|
|
8152
|
-
let d =
|
|
8153
|
-
const _ = this.getFontLeadingFactor(C.fontFamily || "Inter"),
|
|
8154
|
-
let
|
|
8155
|
-
i > 0 && (F === "top" ?
|
|
8144
|
+
const e = C.letterSpacing || 0, R = C.paragraphSpacing || 0, x = (C.lineHeight || 1.2) * t, b = Math.ceil(C.width || E || 200) + 0.5, L = `${G} ${K} ${t}px "${S}", sans-serif`, V = (l) => {
|
|
8145
|
+
if (e === 0) return A.measureText(l).width;
|
|
8146
|
+
let v = 0;
|
|
8147
|
+
for (let gA = 0; gA < l.length; gA++)
|
|
8148
|
+
v += A.measureText(l[gA]).width + e;
|
|
8149
|
+
return v - e;
|
|
8150
|
+
}, q = `${h}|${L}|${e}|${R}`;
|
|
8151
|
+
let r = this.pretextCache.get(q);
|
|
8152
|
+
if (!r && (r = RE(h, L), this.pretextCache.set(q, r), this.pretextCache.size > 1e3)) {
|
|
8153
|
+
const l = this.pretextCache.keys().next().value;
|
|
8154
|
+
l && this.pretextCache.delete(l);
|
|
8155
|
+
}
|
|
8156
|
+
const u = r ? LE(r, b, x) : { height: 0, lines: [] }, BA = (u == null ? void 0 : u.height) ?? 0, AA = (u == null ? void 0 : u.lines) ?? [];
|
|
8157
|
+
let d = BA;
|
|
8158
|
+
const _ = this.getFontLeadingFactor(C.fontFamily || "Inter"), IA = (x - t) * _;
|
|
8159
|
+
let O = Math.round(-d / 2);
|
|
8160
|
+
i > 0 && (F === "top" ? O = Math.round(-i / 2) : F === "middle" || F === "center" ? O = Math.round(-d / 2) : F === "bottom" && (O = Math.round(i / 2 - d))), O += IA;
|
|
8156
8161
|
let p = null, Y = 0;
|
|
8157
8162
|
if (C.pathId && this.artboard) {
|
|
8158
|
-
const
|
|
8159
|
-
if (
|
|
8160
|
-
const
|
|
8161
|
-
p = { geo:
|
|
8163
|
+
const l = this.artboard.objects.find((v) => v.id === C.pathId);
|
|
8164
|
+
if (l && l.type === "Shape" && ((j = l.geometry) == null ? void 0 : j.type) === "Path") {
|
|
8165
|
+
const v = this.objectStates.get(l.id), gA = v != null && v.geometry ? this.deepMerge(l.geometry, v.geometry) : l.geometry, wA = (v == null ? void 0 : v.scale_x) !== void 0 ? (l.width || 0) * v.scale_x : l.width || 0, GA = (v == null ? void 0 : v.scale_y) !== void 0 ? (l.height || 0) * v.scale_y : l.height || 0;
|
|
8166
|
+
p = { geo: gA, obj: l, w: wA, h: GA }, Y = this.getPerimeter(gA, wA, GA);
|
|
8162
8167
|
}
|
|
8163
8168
|
}
|
|
8164
|
-
const
|
|
8165
|
-
var
|
|
8166
|
-
const
|
|
8169
|
+
const Z = (l, v, gA, wA, GA) => {
|
|
8170
|
+
var MA, W, CA;
|
|
8171
|
+
const NA = (!D || o) && (I.behaviors || []).some(
|
|
8167
8172
|
(f) => f.enabled && (f.type.toString().includes("Text") || ["Typewriter", "Scramble", "Wave", "Bounce", "GlitchText", "Reveal3D", "RevealSlide", "RevealBlur"].includes(f.type))
|
|
8168
8173
|
);
|
|
8169
|
-
if (!C.pathId && e === 0 && !
|
|
8170
|
-
wA ? A.strokeText(
|
|
8174
|
+
if (!C.pathId && e === 0 && !NA && (C.enableSegments !== !0 || !C.segments || C.segments.length === 0))
|
|
8175
|
+
wA ? A.strokeText(l, v, gA) : A.fillText(l, v, gA);
|
|
8171
8176
|
else {
|
|
8172
|
-
const f = V(
|
|
8173
|
-
let
|
|
8174
|
-
M === "center" ?
|
|
8175
|
-
let
|
|
8176
|
-
C.pathId && Y > 0 && p && (M === "center" ?
|
|
8177
|
-
let z =
|
|
8178
|
-
const
|
|
8179
|
-
(
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
].includes(
|
|
8177
|
+
const f = V(l);
|
|
8178
|
+
let U = v;
|
|
8179
|
+
M === "center" ? U -= f / 2 : M === "right" && (U -= f);
|
|
8180
|
+
let X = C.pathOffset || 0;
|
|
8181
|
+
C.pathId && Y > 0 && p && (M === "center" ? X += Y / 2 - f / 2 : M === "right" && (X += Y - f));
|
|
8182
|
+
let z = U;
|
|
8183
|
+
const cA = D && !o ? [] : ((MA = I.behaviors) == null ? void 0 : MA.filter(
|
|
8184
|
+
(FA) => [
|
|
8185
|
+
P.Typewriter,
|
|
8186
|
+
P.Scramble,
|
|
8187
|
+
P.Wave,
|
|
8188
|
+
P.Bounce,
|
|
8189
|
+
P.GlitchText,
|
|
8190
|
+
P.TextTrail,
|
|
8191
|
+
P.Reveal3D,
|
|
8192
|
+
P.RevealSlide,
|
|
8193
|
+
P.RevealBlur,
|
|
8194
|
+
P.TextLiquid,
|
|
8195
|
+
P.TextVortex,
|
|
8196
|
+
P.TextExplosion,
|
|
8197
|
+
P.TextRain,
|
|
8198
|
+
P.TextGravity,
|
|
8199
|
+
P.TextElastic,
|
|
8200
|
+
P.TextMatrix,
|
|
8201
|
+
P.TextNeon,
|
|
8202
|
+
P.TextGlitch3D,
|
|
8203
|
+
P.TextDissolve,
|
|
8204
|
+
P.TextOrganic,
|
|
8205
|
+
P.TextBreathe,
|
|
8206
|
+
P.TextFloral,
|
|
8207
|
+
P.TextSmoke,
|
|
8208
|
+
P.TextVariable,
|
|
8209
|
+
P.TextMagnet,
|
|
8210
|
+
P.TextSpin,
|
|
8211
|
+
P.TextZing,
|
|
8212
|
+
P.TextPerspective,
|
|
8213
|
+
P.TextMirror
|
|
8214
|
+
].includes(FA.type) && FA.enabled
|
|
8210
8215
|
)) || [];
|
|
8211
|
-
for (let
|
|
8212
|
-
let
|
|
8213
|
-
const H =
|
|
8214
|
-
let
|
|
8215
|
-
if (
|
|
8216
|
-
const
|
|
8217
|
-
if (
|
|
8218
|
-
this.currentTime * (
|
|
8219
|
-
else if (
|
|
8220
|
-
Math.max(0, Math.min(1, this.currentTime / (
|
|
8221
|
-
else if (
|
|
8222
|
-
|
|
8223
|
-
else if (
|
|
8224
|
-
const
|
|
8225
|
-
|
|
8226
|
-
} else if (
|
|
8227
|
-
const
|
|
8228
|
-
|
|
8229
|
-
} else if (
|
|
8230
|
-
const
|
|
8231
|
-
|
|
8232
|
-
} else if (
|
|
8233
|
-
const
|
|
8234
|
-
|
|
8235
|
-
} else if (
|
|
8236
|
-
const
|
|
8237
|
-
|
|
8238
|
-
} else if (
|
|
8239
|
-
const
|
|
8240
|
-
|
|
8241
|
-
} else if (
|
|
8242
|
-
const
|
|
8243
|
-
|
|
8244
|
-
} else if (
|
|
8245
|
-
const
|
|
8246
|
-
if (
|
|
8247
|
-
const
|
|
8248
|
-
|
|
8216
|
+
for (let FA = 0; FA < l.length; FA++) {
|
|
8217
|
+
let yA = l[FA];
|
|
8218
|
+
const H = GA + FA;
|
|
8219
|
+
let n = 0, N = 0, hA = 1, YA = 1, dA = 0, lA = 1, iA = yA;
|
|
8220
|
+
if (cA.forEach((QA) => {
|
|
8221
|
+
const T = QA.settings || {}, oA = T.strength || 1, sA = Date.now();
|
|
8222
|
+
if (QA.type === P.Typewriter)
|
|
8223
|
+
this.currentTime * (T.speed || 1) - H * (T.stagger || 0.05) < 0 && (lA = 0);
|
|
8224
|
+
else if (QA.type === P.Scramble)
|
|
8225
|
+
Math.max(0, Math.min(1, this.currentTime / (T.duration || 1.5)) - H * 0.02) < 1 && Math.random() < 0.3 && (iA = "$%#@!*&"[Math.floor(Math.random() * 7)]);
|
|
8226
|
+
else if (QA.type === P.Wave)
|
|
8227
|
+
N += Math.sin(this.currentTime * 5 * (T.speed || 1) + H * (T.frequency || 1)) * (T.amplitude || 20) * oA;
|
|
8228
|
+
else if (QA.type === P.Bounce) {
|
|
8229
|
+
const m = Math.max(0, this.currentTime % 2 - H * (T.stagger || 0.1));
|
|
8230
|
+
m < 1 && (N -= Math.abs(Math.sin(m * Math.PI)) * (T.height || 50) * oA);
|
|
8231
|
+
} else if (QA.type === P.TextTrail) {
|
|
8232
|
+
const m = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - H * (T.delay || 5))];
|
|
8233
|
+
m && (n += (m.x - (Q.x + z)) * oA * 0.2, N += (m.y - (Q.y + gA + N)) * oA * 0.2);
|
|
8234
|
+
} else if (QA.type === P.Reveal3D) {
|
|
8235
|
+
const m = Math.max(0, Math.min(1, this.currentTime * (T.speed || 1) - H * (T.stagger || 0.1)));
|
|
8236
|
+
hA *= m, YA *= m, lA = m;
|
|
8237
|
+
} else if (QA.type === P.RevealSlide) {
|
|
8238
|
+
const m = Math.max(0, Math.min(1, this.currentTime * 1.5 - H * 0.05)), $ = (1 - m) * (T.distance || 40) * oA, EA = T.direction || "up";
|
|
8239
|
+
EA === "up" ? N -= $ : EA === "down" ? N += $ : EA === "left" ? n -= $ : EA === "right" && (n += $), lA = m;
|
|
8240
|
+
} else if (QA.type === P.RevealBlur) {
|
|
8241
|
+
const m = Math.max(0, Math.min(1, this.currentTime * 1.2 - H * 0.1));
|
|
8242
|
+
lA = m, n += (1 - m) * 5;
|
|
8243
|
+
} else if (QA.type === P.TextLiquid) {
|
|
8244
|
+
const m = Math.max(0, Math.sin(sA * 1e-3 * (T.speed || 1) + H * 0.5));
|
|
8245
|
+
N += m * (T.amplitude || 10) * oA, YA *= 1 + m * 0.2;
|
|
8246
|
+
} else if (QA.type === P.TextVortex) {
|
|
8247
|
+
const m = sA * 2e-3 * (T.speed || 1) + H * 0.2, $ = (1 - (Math.sin(sA * 1e-3) * 0.5 + 0.5)) * (T.radius || 50);
|
|
8248
|
+
n += Math.cos(m) * $ * oA, N += Math.sin(m) * $ * oA;
|
|
8249
|
+
} else if (QA.type === P.TextExplosion) {
|
|
8250
|
+
const m = T.force || 1, $ = this.currentTime % 2;
|
|
8251
|
+
if ($ < 1) {
|
|
8252
|
+
const EA = (H / l.length - 0.5) * Math.PI * 2, kA = $ * 100 * m;
|
|
8253
|
+
n += Math.cos(EA) * kA * oA, N += Math.sin(EA) * kA * oA, lA = 1 - $;
|
|
8249
8254
|
}
|
|
8250
|
-
} else if (
|
|
8251
|
-
const
|
|
8252
|
-
|
|
8253
|
-
} else if (
|
|
8254
|
-
const
|
|
8255
|
-
|
|
8256
|
-
} else if (
|
|
8257
|
-
const
|
|
8258
|
-
if (Math.random() < 0.1 *
|
|
8259
|
-
const
|
|
8260
|
-
|
|
8255
|
+
} else if (QA.type === P.TextRain) {
|
|
8256
|
+
const m = T.speed || 1, $ = T.height || 100, EA = (sA * 1e-3 * m + H * 0.1) % 1;
|
|
8257
|
+
N -= (1 - EA) * $ * oA, lA = EA > 0.1 ? 1 : EA * 10;
|
|
8258
|
+
} else if (QA.type === P.TextGravity) {
|
|
8259
|
+
const m = T.gravity || 9.8, $ = this.currentTime % 3 / 3, EA = 0.5 * m * Math.pow($ * 10, 2);
|
|
8260
|
+
EA < 100 ? N += EA * oA : N += 100 * oA;
|
|
8261
|
+
} else if (QA.type === P.TextMatrix) {
|
|
8262
|
+
const m = T.speed || 1;
|
|
8263
|
+
if (Math.random() < 0.1 * m) {
|
|
8264
|
+
const EA = "0123456789ABCDEF!@#$%^&*";
|
|
8265
|
+
iA = EA[Math.floor(Math.random() * EA.length)];
|
|
8261
8266
|
}
|
|
8262
|
-
|
|
8263
|
-
} else if (
|
|
8264
|
-
const
|
|
8265
|
-
|
|
8266
|
-
} else if (
|
|
8267
|
-
Math.sin(H * 1.5 +
|
|
8268
|
-
else if (
|
|
8269
|
-
const
|
|
8270
|
-
|
|
8271
|
-
} else if (
|
|
8272
|
-
const
|
|
8273
|
-
|
|
8274
|
-
} else if (
|
|
8275
|
-
const
|
|
8276
|
-
|
|
8277
|
-
} else if (
|
|
8278
|
-
const
|
|
8279
|
-
if (
|
|
8280
|
-
const
|
|
8281
|
-
|
|
8267
|
+
lA = 0.3 + (Math.sin(sA * 0.01 * m + H) + 1) / 2 * 0.7;
|
|
8268
|
+
} else if (QA.type === P.TextNeon) {
|
|
8269
|
+
const m = Math.random() > 0.95 ? 0.5 : 1;
|
|
8270
|
+
lA = (0.7 + (Math.sin(sA * 5e-3) + 1) / 2 * 0.3) * m;
|
|
8271
|
+
} else if (QA.type === P.TextDissolve)
|
|
8272
|
+
Math.sin(H * 1.5 + sA * 2e-3 * (T.speed || 1)) > 0.5 && (lA = 0);
|
|
8273
|
+
else if (QA.type === P.TextOrganic) {
|
|
8274
|
+
const m = T.speed || 1, $ = T.amplitude || 10;
|
|
8275
|
+
n += Math.sin(sA * 2e-3 * m + H) * $ * oA, N += Math.cos(sA * 15e-4 * m + H * 0.7) * $ * oA;
|
|
8276
|
+
} else if (QA.type === P.TextBreathe) {
|
|
8277
|
+
const $ = 1 + (Math.sin(sA * 3e-3 + H * 0.2) + 1) / 2 * 0.2 * oA;
|
|
8278
|
+
hA *= $, YA *= $;
|
|
8279
|
+
} else if (QA.type === P.TextSpin) {
|
|
8280
|
+
const m = T.speed || 1;
|
|
8281
|
+
dA += sA * 0.01 * m + H;
|
|
8282
|
+
} else if (QA.type === P.TextMagnet) {
|
|
8283
|
+
const m = this.pointerHistory[this.pointerHistory.length - 1];
|
|
8284
|
+
if (m) {
|
|
8285
|
+
const $ = m.x - (Q.x + z), EA = m.y - (Q.y + gA);
|
|
8286
|
+
dA = Math.atan2(EA, $);
|
|
8282
8287
|
}
|
|
8283
|
-
} else if (
|
|
8284
|
-
const
|
|
8285
|
-
|
|
8286
|
-
} else if (
|
|
8287
|
-
|
|
8288
|
-
else if (
|
|
8289
|
-
const
|
|
8290
|
-
|
|
8291
|
-
} else if (
|
|
8292
|
-
const
|
|
8293
|
-
|
|
8294
|
-
} else if (
|
|
8295
|
-
const
|
|
8296
|
-
|
|
8297
|
-
} else if (
|
|
8298
|
-
const
|
|
8299
|
-
|
|
8300
|
-
} else if (
|
|
8301
|
-
const
|
|
8302
|
-
|
|
8303
|
-
} else if (
|
|
8304
|
-
const
|
|
8305
|
-
Math.random() < 0.2 && (
|
|
8306
|
-
} else if (
|
|
8307
|
-
const
|
|
8308
|
-
Math.random() < 0.1 && (
|
|
8288
|
+
} else if (QA.type === P.TextPerspective) {
|
|
8289
|
+
const m = l.length / 2, $ = (H - m) / m, EA = 1 - Math.abs($) * 0.3 * oA;
|
|
8290
|
+
hA *= EA, YA *= EA, n += $ * 20 * oA;
|
|
8291
|
+
} else if (QA.type === P.TextMirror)
|
|
8292
|
+
lA *= 0.8;
|
|
8293
|
+
else if (QA.type === P.TextFloral) {
|
|
8294
|
+
const m = T.speed || 1, $ = T.stagger || 0.1, EA = (sA * 1e-3 * m + H * $) % 2;
|
|
8295
|
+
EA < 1 && (hA *= EA, YA *= EA, dA += EA * Math.PI);
|
|
8296
|
+
} else if (QA.type === P.TextSmoke) {
|
|
8297
|
+
const m = T.speed || 1, $ = T.height || 50, EA = (sA * 5e-4 * m + H * 0.2) % 1;
|
|
8298
|
+
N -= EA * $ * oA, n += Math.sin(sA * 2e-3 + H) * 5 * oA, lA = 1 - EA;
|
|
8299
|
+
} else if (QA.type === P.TextVariable) {
|
|
8300
|
+
const m = T.speed || 1, $ = T.intensity || 1.5, EA = (Math.sin(sA * 4e-3 * m + H * 0.3) + 1) / 2;
|
|
8301
|
+
hA *= 1 + EA * ($ - 1) * oA;
|
|
8302
|
+
} else if (QA.type === P.TextZing) {
|
|
8303
|
+
const m = T.speed || 2, $ = T.distance || 100, EA = (sA * 2e-3 * m + H * 0.05) % 1;
|
|
8304
|
+
n += (1 - EA) * $ * oA, lA = EA;
|
|
8305
|
+
} else if (QA.type === P.TextElastic) {
|
|
8306
|
+
const m = T.stiffness || 0.2, $ = T.damping || 0.1, EA = Math.sin(sA * 0.01) * Math.exp(-sA * 1e-3 * $);
|
|
8307
|
+
YA *= 1 + EA * m * oA;
|
|
8308
|
+
} else if (QA.type === P.TextGlitch3D) {
|
|
8309
|
+
const m = T.intensity || 5;
|
|
8310
|
+
Math.random() < 0.2 && (n += (Math.random() - 0.5) * m, N += (Math.random() - 0.5) * m, lA = 0.8);
|
|
8311
|
+
} else if (QA.type === P.GlitchText) {
|
|
8312
|
+
const m = T.intensity || 5;
|
|
8313
|
+
Math.random() < 0.1 && (n += (Math.random() - 0.5) * m, N += (Math.random() - 0.5) * m, Math.random() < 0.05 && (lA = 0.5));
|
|
8309
8314
|
}
|
|
8310
|
-
}),
|
|
8311
|
-
z += A.measureText(
|
|
8315
|
+
}), lA <= 0) {
|
|
8316
|
+
z += A.measureText(yA).width + e;
|
|
8312
8317
|
continue;
|
|
8313
8318
|
}
|
|
8314
|
-
if (C.enableSegments === !0 && ((
|
|
8315
|
-
let
|
|
8316
|
-
for (const
|
|
8317
|
-
if (H <
|
|
8318
|
-
|
|
8319
|
+
if (C.enableSegments === !0 && ((W = C.segments) == null ? void 0 : W.length) > 0) {
|
|
8320
|
+
let QA = 0, T = null;
|
|
8321
|
+
for (const oA of C.segments) {
|
|
8322
|
+
if (H < QA + (oA.text || "").length) {
|
|
8323
|
+
T = oA;
|
|
8319
8324
|
break;
|
|
8320
8325
|
}
|
|
8321
|
-
|
|
8326
|
+
QA += (oA.text || "").length;
|
|
8322
8327
|
}
|
|
8323
|
-
if (
|
|
8324
|
-
let
|
|
8325
|
-
y.forEach((
|
|
8326
|
-
const
|
|
8327
|
-
|
|
8328
|
-
}), A.font = `${G} ${this.mapFontWeight((
|
|
8328
|
+
if (T) {
|
|
8329
|
+
let oA = T.fontFamily || C.fontFamily || "Inter";
|
|
8330
|
+
y.forEach((sA) => {
|
|
8331
|
+
const m = new RegExp(`[\\s-]${sA}$`, "i");
|
|
8332
|
+
m.test(oA) && (oA = oA.replace(m, "").trim());
|
|
8333
|
+
}), A.font = `${G} ${this.mapFontWeight((T.fontWeight || C.fontWeight || "400").toString())} ${T.fontSize || t}px "${oA}", sans-serif`;
|
|
8329
8334
|
}
|
|
8330
8335
|
}
|
|
8331
|
-
const
|
|
8332
|
-
A.globalAlpha *=
|
|
8333
|
-
const
|
|
8336
|
+
const SA = A.globalAlpha;
|
|
8337
|
+
A.globalAlpha *= lA, A.save();
|
|
8338
|
+
const UA = A.measureText(iA).width;
|
|
8334
8339
|
if (p && Y > 0) {
|
|
8335
|
-
const
|
|
8336
|
-
A.translate(
|
|
8340
|
+
const QA = z - U + UA / 2, oA = (X + QA) / Y, sA = this.getPointOnPath(p.geo, p.w, p.h, Math.abs(oA % 1)), m = sA.angle, $ = gA + N + (C.pathOffsetY || 0), EA = C.pathSide === "right" ? -1 : 1, kA = Math.cos(m + Math.PI / 2) * $ * EA, vA = Math.sin(m + Math.PI / 2) * $ * EA;
|
|
8341
|
+
A.translate(sA.x + kA + n, sA.y + vA), A.rotate(m + dA + (EA === -1 ? Math.PI : 0));
|
|
8337
8342
|
} else
|
|
8338
|
-
A.translate(z +
|
|
8339
|
-
if (A.scale(
|
|
8340
|
-
const
|
|
8341
|
-
A.fillStyle =
|
|
8342
|
-
} else wA ? A.strokeText(
|
|
8343
|
-
A.restore(), A.globalAlpha =
|
|
8343
|
+
A.translate(z + n + UA / 2, gA + N), dA !== 0 && A.rotate(dA);
|
|
8344
|
+
if (A.scale(hA, YA), D || o) {
|
|
8345
|
+
const QA = o ? "#000000" : this.createCanvasFill(A, g.fill, E, i);
|
|
8346
|
+
A.fillStyle = QA || g.fill.color || "#ffffff", A.fillText(iA, -UA / 2, 0);
|
|
8347
|
+
} else wA ? A.strokeText(iA, -UA / 2, 0) : A.fillText(iA, -UA / 2, 0);
|
|
8348
|
+
A.restore(), A.globalAlpha = SA, C.enableSegments === !0 && ((CA = C.segments) == null ? void 0 : CA.length) > 0 && (A.font = `${G} ${this.mapFontWeight((C.fontWeight || "400").toString())} ${t}px "${C.fontFamily || "Inter"}", sans-serif`), z += A.measureText(yA).width + e;
|
|
8344
8349
|
}
|
|
8345
8350
|
}
|
|
8346
8351
|
};
|
|
8347
8352
|
if (D) {
|
|
8348
|
-
let
|
|
8349
|
-
(
|
|
8353
|
+
let l = 0, v = O;
|
|
8354
|
+
(AA || []).forEach((gA) => {
|
|
8350
8355
|
let wA = -E / 2;
|
|
8351
|
-
M === "center" ? wA = 0 : M === "right" && (wA = E / 2),
|
|
8356
|
+
M === "center" ? wA = 0 : M === "right" && (wA = E / 2), Z(gA.text, wA, v, !1, l), l += (gA.text || "").length + 1, v += x;
|
|
8352
8357
|
});
|
|
8353
8358
|
} else if (o) {
|
|
8354
|
-
let
|
|
8355
|
-
(
|
|
8359
|
+
let l = 0, v = O;
|
|
8360
|
+
(AA || []).forEach((gA) => {
|
|
8356
8361
|
let wA = -E / 2;
|
|
8357
|
-
M === "center" ? wA = 0 : M === "right" && (wA = E / 2),
|
|
8362
|
+
M === "center" ? wA = 0 : M === "right" && (wA = E / 2), Z(gA.text, wA, v, !1, l), l += (gA.text || "").length + 1, v += x;
|
|
8358
8363
|
});
|
|
8359
8364
|
} else {
|
|
8360
8365
|
if (g.fill) {
|
|
8361
|
-
const
|
|
8362
|
-
A.fillStyle =
|
|
8363
|
-
let
|
|
8364
|
-
(
|
|
8365
|
-
let
|
|
8366
|
-
M === "center" ?
|
|
8367
|
-
}), A.globalAlpha =
|
|
8366
|
+
const l = A.globalAlpha, v = this.createCanvasFill(A, g.fill, E, i);
|
|
8367
|
+
A.fillStyle = v || g.fill.color || "#000000", A.globalAlpha = l * this.normalizeOpacity(g.fill.opacity ?? 100);
|
|
8368
|
+
let gA = 0, wA = O;
|
|
8369
|
+
(AA || []).forEach((GA) => {
|
|
8370
|
+
let NA = Math.round(-E / 2);
|
|
8371
|
+
M === "center" ? NA = 0 : M === "right" && (NA = Math.round(E / 2)), Z(GA.text, NA, wA, !1, gA), gA += (GA.text || "").length + 1, wA += x;
|
|
8372
|
+
}), A.globalAlpha = l;
|
|
8368
8373
|
}
|
|
8369
8374
|
if (g.stroke && g.stroke.width > 0) {
|
|
8370
|
-
const
|
|
8371
|
-
g.fill && g.fill.type !== "None" && g.fill.isEnabled !== !1 && g.fill.opacity !== 0 && g.fill.color !== "transparent" && g.fill.color !== "rgba(0,0,0,0)" && (A.shadowColor = "transparent", A.shadowBlur = 0, A.shadowOffsetX = 0, A.shadowOffsetY = 0), A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha =
|
|
8372
|
-
let
|
|
8373
|
-
(
|
|
8374
|
-
let
|
|
8375
|
-
M === "center" ?
|
|
8376
|
-
}), A.globalAlpha =
|
|
8375
|
+
const l = A.globalAlpha;
|
|
8376
|
+
g.fill && g.fill.type !== "None" && g.fill.isEnabled !== !1 && g.fill.opacity !== 0 && g.fill.color !== "transparent" && g.fill.color !== "rgba(0,0,0,0)" && (A.shadowColor = "transparent", A.shadowBlur = 0, A.shadowOffsetX = 0, A.shadowOffsetY = 0), A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha = l * this.normalizeOpacity(g.stroke.opacity ?? 100);
|
|
8377
|
+
let gA = 0, wA = O;
|
|
8378
|
+
(AA || []).forEach((GA) => {
|
|
8379
|
+
let NA = Math.round(-E / 2);
|
|
8380
|
+
M === "center" ? NA = 0 : M === "right" && (NA = Math.round(E / 2)), Z(GA.text, NA, wA, !0, gA), gA += (GA.text || "").length + 1, wA += x;
|
|
8381
|
+
}), A.globalAlpha = l;
|
|
8377
8382
|
}
|
|
8378
8383
|
}
|
|
8379
8384
|
}
|
|
@@ -8393,8 +8398,8 @@ class Di {
|
|
|
8393
8398
|
if (y > 0) {
|
|
8394
8399
|
const F = Math.max(0, Math.min(1, a)), M = Math.max(0, Math.min(1, G));
|
|
8395
8400
|
if (F < M) {
|
|
8396
|
-
const e = y * (M - F), R = y - e,
|
|
8397
|
-
A.setLineDash([e, R]), A.lineDashOffset =
|
|
8401
|
+
const e = y * (M - F), R = y - e, x = -(y * (F + K % 1 + t % 1));
|
|
8402
|
+
A.setLineDash([e, R]), A.lineDashOffset = x;
|
|
8398
8403
|
} else
|
|
8399
8404
|
A.setLineDash([0, y]);
|
|
8400
8405
|
}
|
|
@@ -8477,8 +8482,8 @@ class Di {
|
|
|
8477
8482
|
getBezierLength(A, I, C, g, Q, E, i, D, o = 10) {
|
|
8478
8483
|
let s = 0, h = A, a = I;
|
|
8479
8484
|
for (let G = 1; G <= o; G++) {
|
|
8480
|
-
const K = G / o, t = 1 - K, S = K * K, y = t * t, F = y * t, M = S * K, e = F * A + 3 * y * K * C + 3 * t * S * Q + M * i, R = F * I + 3 * y * K * g + 3 * t * S * E + M * D,
|
|
8481
|
-
s += Math.sqrt(
|
|
8485
|
+
const K = G / o, t = 1 - K, S = K * K, y = t * t, F = y * t, M = S * K, e = F * A + 3 * y * K * C + 3 * t * S * Q + M * i, R = F * I + 3 * y * K * g + 3 * t * S * E + M * D, x = e - h, b = R - a;
|
|
8486
|
+
s += Math.sqrt(x * x + b * b), h = e, a = R;
|
|
8482
8487
|
}
|
|
8483
8488
|
return s;
|
|
8484
8489
|
}
|
|
@@ -8486,12 +8491,12 @@ class Di {
|
|
|
8486
8491
|
if (A <= 0) return 0;
|
|
8487
8492
|
let h = 0, a = I, G = C;
|
|
8488
8493
|
for (let K = 1; K <= s; K++) {
|
|
8489
|
-
const t = K / s, S = 1 - t, y = t * t, F = S * S, M = F * S, e = y * t, R = M * I + 3 * F * t * g + 3 * S * y * E + e * D,
|
|
8494
|
+
const t = K / s, S = 1 - t, y = t * t, F = S * S, M = F * S, e = y * t, R = M * I + 3 * F * t * g + 3 * S * y * E + e * D, x = M * C + 3 * F * t * Q + 3 * S * y * i + e * o, b = R - a, L = x - G, V = Math.sqrt(b * b + L * L);
|
|
8490
8495
|
if (h + V >= A) {
|
|
8491
|
-
const
|
|
8492
|
-
return (K - 1 +
|
|
8496
|
+
const q = A - h, r = V === 0 ? 0 : q / V;
|
|
8497
|
+
return (K - 1 + r) / s;
|
|
8493
8498
|
}
|
|
8494
|
-
h += V, a = R, G =
|
|
8499
|
+
h += V, a = R, G = x;
|
|
8495
8500
|
}
|
|
8496
8501
|
return 1;
|
|
8497
8502
|
}
|
|
@@ -8519,8 +8524,8 @@ class Di {
|
|
|
8519
8524
|
return R = this.getBezierTAtLength(G - K, y.x, y.y, y.out_x ?? y.x, y.out_y ?? y.y, F.in_x ?? F.x, F.in_y ?? F.y, F.x, F.y, 20), this.getBezierPointAndAngle(R, y, F, s, h);
|
|
8520
8525
|
{
|
|
8521
8526
|
R = M === 0 ? 0 : (G - K) / M;
|
|
8522
|
-
const
|
|
8523
|
-
return { x
|
|
8527
|
+
const x = y.x + (F.x - y.x) * R - s, b = y.y + (F.y - y.y) * R - h, L = Math.atan2(F.y - y.y, F.x - y.x);
|
|
8528
|
+
return { x, y: b, angle: L };
|
|
8524
8529
|
}
|
|
8525
8530
|
}
|
|
8526
8531
|
K += M;
|
|
@@ -8529,7 +8534,7 @@ class Di {
|
|
|
8529
8534
|
return { x: 0, y: 0, angle: 0 };
|
|
8530
8535
|
}
|
|
8531
8536
|
getBezierPointAndAngle(A, I, C, g, Q) {
|
|
8532
|
-
const E = I.x, i = I.y, D = I.out_x ?? I.x, o = I.out_y ?? I.y, s = C.in_x ?? C.x, h = C.in_y ?? C.y, a = C.x, G = C.y, K = 1 - A, t = A * A, S = K * K, y = S * K, F = t * A, M = y * E + 3 * S * A * D + 3 * K * t * s + F * a - g, e = y * i + 3 * S * A * o + 3 * K * t * h + F * G - Q, R = 3 * S * (D - E) + 6 * K * A * (s - D) + 3 * t * (a - s),
|
|
8537
|
+
const E = I.x, i = I.y, D = I.out_x ?? I.x, o = I.out_y ?? I.y, s = C.in_x ?? C.x, h = C.in_y ?? C.y, a = C.x, G = C.y, K = 1 - A, t = A * A, S = K * K, y = S * K, F = t * A, M = y * E + 3 * S * A * D + 3 * K * t * s + F * a - g, e = y * i + 3 * S * A * o + 3 * K * t * h + F * G - Q, R = 3 * S * (D - E) + 6 * K * A * (s - D) + 3 * t * (a - s), x = 3 * S * (o - i) + 6 * K * A * (h - o) + 3 * t * (G - h), b = Math.atan2(x, R);
|
|
8533
8538
|
return { x: M, y: e, angle: b };
|
|
8534
8539
|
}
|
|
8535
8540
|
applyAbsoluteTransform(A, I, C) {
|
|
@@ -8556,198 +8561,200 @@ class Di {
|
|
|
8556
8561
|
I.data && (I.type === "Path" || I.type === "Subtract" || I.type === "Union" || I.type === "Intersect" || I.type === "Exclude" || I.type), A.beginPath(), this._tracePath(A, I, C, g, Q);
|
|
8557
8562
|
}
|
|
8558
8563
|
_tracePath(A, I, C, g, Q) {
|
|
8559
|
-
if (I
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
A.closePath();
|
|
8576
|
-
} else if (I.type === "Star") {
|
|
8577
|
-
const E = I.inner_radius || 20, i = I.outer_radius || 50, D = I.points || 5;
|
|
8578
|
-
for (let o = 0; o < D * 2; o++) {
|
|
8579
|
-
const s = o * Math.PI / D - Math.PI / 2, h = o % 2 === 0 ? i : E, a = h * Math.cos(s), G = h * Math.sin(s);
|
|
8580
|
-
o === 0 ? A.moveTo(a, G) : A.lineTo(a, G);
|
|
8581
|
-
}
|
|
8582
|
-
A.closePath();
|
|
8583
|
-
} else if ((I.type === "Path" || I.type === "Subtract" || I.type === "Union" || I.type === "Intersect" || I.type === "Exclude" || I.type === "BooleanOperation") && I.points) {
|
|
8584
|
-
this.frameCount % 10 === 0 && console.log("[Engine] Tracing Path:", I.points.length, "points");
|
|
8585
|
-
let E = 1 / 0, i = -1 / 0, D = 1 / 0, o = -1 / 0;
|
|
8586
|
-
if (I.points.forEach((a) => {
|
|
8587
|
-
typeof a.x == "number" && (E = Math.min(E, a.x), i = Math.max(i, a.x)), typeof a.y == "number" && (D = Math.min(D, a.y), o = Math.max(o, a.y));
|
|
8588
|
-
}), E === 1 / 0) return;
|
|
8589
|
-
const s = (E + i) / 2, h = (D + o) / 2;
|
|
8590
|
-
if (isNaN(s) || isNaN(h)) {
|
|
8591
|
-
console.warn("[Engine] Invalid path center:", s, h);
|
|
8592
|
-
return;
|
|
8593
|
-
}
|
|
8594
|
-
I.points.forEach((a, G) => {
|
|
8595
|
-
if (G === 0 || a.moveTo)
|
|
8596
|
-
A.moveTo(a.x - s, a.y - h);
|
|
8597
|
-
else {
|
|
8598
|
-
const K = I.points[G - 1];
|
|
8599
|
-
if (!K) return;
|
|
8600
|
-
const t = (K.out_x ?? K.x) - s, S = (K.out_y ?? K.y) - h, y = (a.in_x ?? a.x) - s, F = (a.in_y ?? a.y) - h;
|
|
8601
|
-
isNaN(t) || isNaN(y) || isNaN(a.x) ? A.lineTo(a.x - s, a.y - h) : A.bezierCurveTo(t, S, y, F, a.x - s, a.y - h);
|
|
8564
|
+
if (I) {
|
|
8565
|
+
if (I.type === "Rectangle" || I.type === "Image") {
|
|
8566
|
+
const E = Q !== void 0 ? Q : I.corner_radius ?? 0;
|
|
8567
|
+
this.drawRoundRect(A, -C / 2, -g / 2, C, g, E);
|
|
8568
|
+
} else if (I.type === "Line")
|
|
8569
|
+
A.moveTo(-C / 2, 0), A.lineTo(C / 2, 0);
|
|
8570
|
+
else if (I.type === "Ellipse") {
|
|
8571
|
+
const { startAngle: E = 0, sweepAngle: i = 360, ratio: D = 0 } = I, o = C / 2, s = g / 2, h = E * Math.PI / 180, a = i * Math.PI / 180, G = h + a;
|
|
8572
|
+
i >= 360 && D <= 0 ? A.ellipse(0, 0, o, s, 0, 0, Math.PI * 2) : (A.ellipse(0, 0, o, s, 0, h, G, !1), D > 0 ? A.ellipse(0, 0, o * D, s * D, 0, G, h, !0) : A.lineTo(0, 0), A.closePath());
|
|
8573
|
+
} else if (I.type === "Triangle")
|
|
8574
|
+
A.moveTo(0, -g / 2), A.lineTo(C / 2, g / 2), A.lineTo(-C / 2, g / 2), A.closePath();
|
|
8575
|
+
else if (I.type === "Polygon") {
|
|
8576
|
+
const E = I.sides || 3, i = I.radius || Math.min(C, g) / 2;
|
|
8577
|
+
for (let D = 0; D < E; D++) {
|
|
8578
|
+
const o = D * 2 * Math.PI / E - Math.PI / 2, s = i * Math.cos(o), h = i * Math.sin(o);
|
|
8579
|
+
D === 0 ? A.moveTo(s, h) : A.lineTo(s, h);
|
|
8602
8580
|
}
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
const s = (E + i) / 2, h = (D + o) / 2;
|
|
8610
|
-
I.points.forEach((a, G) => {
|
|
8611
|
-
if (G === 0) A.moveTo(a.x - s, a.y - h);
|
|
8612
|
-
else {
|
|
8613
|
-
const K = I.points[G - 1];
|
|
8614
|
-
K.out_x !== void 0 || a.in_x !== void 0 ? A.bezierCurveTo(
|
|
8615
|
-
(K.out_x ?? K.x) - s,
|
|
8616
|
-
(K.out_y ?? K.y) - h,
|
|
8617
|
-
(a.in_x ?? a.x) - s,
|
|
8618
|
-
(a.in_y ?? a.y) - h,
|
|
8619
|
-
a.x - s,
|
|
8620
|
-
a.y - h
|
|
8621
|
-
) : A.lineTo(a.x - s, a.y - h);
|
|
8581
|
+
A.closePath();
|
|
8582
|
+
} else if (I.type === "Star") {
|
|
8583
|
+
const E = I.inner_radius || 20, i = I.outer_radius || 50, D = I.points || 5;
|
|
8584
|
+
for (let o = 0; o < D * 2; o++) {
|
|
8585
|
+
const s = o * Math.PI / D - Math.PI / 2, h = o % 2 === 0 ? i : E, a = h * Math.cos(s), G = h * Math.sin(s);
|
|
8586
|
+
o === 0 ? A.moveTo(a, G) : A.lineTo(a, G);
|
|
8622
8587
|
}
|
|
8623
|
-
|
|
8588
|
+
A.closePath();
|
|
8589
|
+
} else if ((I.type === "Path" || I.type === "Subtract" || I.type === "Union" || I.type === "Intersect" || I.type === "Exclude" || I.type === "BooleanOperation") && I.points) {
|
|
8590
|
+
this.frameCount % 10 === 0 && console.log("[Engine] Tracing Path:", I.points.length, "points");
|
|
8591
|
+
let E = 1 / 0, i = -1 / 0, D = 1 / 0, o = -1 / 0;
|
|
8592
|
+
if (I.points.forEach((a) => {
|
|
8593
|
+
typeof a.x == "number" && (E = Math.min(E, a.x), i = Math.max(i, a.x)), typeof a.y == "number" && (D = Math.min(D, a.y), o = Math.max(o, a.y));
|
|
8594
|
+
}), E === 1 / 0) return;
|
|
8595
|
+
const s = (E + i) / 2, h = (D + o) / 2;
|
|
8596
|
+
if (isNaN(s) || isNaN(h)) {
|
|
8597
|
+
console.warn("[Engine] Invalid path center:", s, h);
|
|
8598
|
+
return;
|
|
8599
|
+
}
|
|
8600
|
+
I.points.forEach((a, G) => {
|
|
8601
|
+
if (G === 0 || a.moveTo)
|
|
8602
|
+
A.moveTo(a.x - s, a.y - h);
|
|
8603
|
+
else {
|
|
8604
|
+
const K = I.points[G - 1];
|
|
8605
|
+
if (!K) return;
|
|
8606
|
+
const t = (K.out_x ?? K.x) - s, S = (K.out_y ?? K.y) - h, y = (a.in_x ?? a.x) - s, F = (a.in_y ?? a.y) - h;
|
|
8607
|
+
isNaN(t) || isNaN(y) || isNaN(a.x) ? A.lineTo(a.x - s, a.y - h) : A.bezierCurveTo(t, S, y, F, a.x - s, a.y - h);
|
|
8608
|
+
}
|
|
8609
|
+
}), (I.is_closed || I.isClosed) && A.closePath();
|
|
8610
|
+
} else if (I.points && Array.isArray(I.points)) {
|
|
8611
|
+
let E = 1 / 0, i = -1 / 0, D = 1 / 0, o = -1 / 0;
|
|
8612
|
+
I.points.forEach((a) => {
|
|
8613
|
+
E = Math.min(E, a.x), i = Math.max(i, a.x), D = Math.min(D, a.y), o = Math.max(o, a.y);
|
|
8614
|
+
});
|
|
8615
|
+
const s = (E + i) / 2, h = (D + o) / 2;
|
|
8616
|
+
I.points.forEach((a, G) => {
|
|
8617
|
+
if (G === 0) A.moveTo(a.x - s, a.y - h);
|
|
8618
|
+
else {
|
|
8619
|
+
const K = I.points[G - 1];
|
|
8620
|
+
K.out_x !== void 0 || a.in_x !== void 0 ? A.bezierCurveTo(
|
|
8621
|
+
(K.out_x ?? K.x) - s,
|
|
8622
|
+
(K.out_y ?? K.y) - h,
|
|
8623
|
+
(a.in_x ?? a.x) - s,
|
|
8624
|
+
(a.in_y ?? a.y) - h,
|
|
8625
|
+
a.x - s,
|
|
8626
|
+
a.y - h
|
|
8627
|
+
) : A.lineTo(a.x - s, a.y - h);
|
|
8628
|
+
}
|
|
8629
|
+
}), I.is_closed && A.closePath();
|
|
8630
|
+
}
|
|
8624
8631
|
}
|
|
8625
8632
|
}
|
|
8626
8633
|
renderInputBox(A, I) {
|
|
8627
|
-
var
|
|
8628
|
-
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((
|
|
8629
|
-
let M = g.backgroundColor || "rgba(31, 41, 55, 1)", e = g.borderColor || "rgba(55, 65, 81, 1)", R = g.borderWidth ?? 1.5,
|
|
8630
|
-
const V = `${s}Style`,
|
|
8631
|
-
if (
|
|
8634
|
+
var gA, wA;
|
|
8635
|
+
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((gA = I.geometry) == null ? void 0 : gA.width) || 250, E = ((wA = I.geometry) == null ? void 0 : wA.height) || 45, i = this.focusedId === I.id, D = this.lastHoveredObjectId === I.id, o = g.previewState || "default", s = o !== "default" ? o : i ? "focused" : D ? "hovered" : "default", h = g.label || { visible: !0, text: "Label" }, a = g.helperText || { visible: !1, text: "Helper text" }, G = g.leftIcon || { visible: !1 }, K = g.rightIcon || { visible: !1 }, t = g.multiline === !0, S = g.corner_radius ?? 8, y = g.corners || { tl: S, tr: S, bl: S, br: S }, F = [y.tl, y.tr, y.br, y.bl];
|
|
8636
|
+
let M = g.backgroundColor || "rgba(31, 41, 55, 1)", e = g.borderColor || "rgba(55, 65, 81, 1)", R = g.borderWidth ?? 1.5, x = g.color || "#ffffff", b = g.placeholderColor || "rgba(156, 163, 175, 1)", L = g.fontSize || 14;
|
|
8637
|
+
const V = `${s}Style`, q = g[V];
|
|
8638
|
+
if (q ? (q.backgroundColor !== void 0 && (M = q.backgroundColor), q.borderColor !== void 0 && (e = q.borderColor), q.borderWidth !== void 0 && (R = q.borderWidth), q.color !== void 0 && (x = q.color), q.placeholderColor !== void 0 && (b = q.placeholderColor), q.fontSize !== void 0 && (L = q.fontSize)) : s === "focused" ? (e = g.focusBorderColor || "rgba(59, 130, 246, 1)", R = Math.max(R, 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)", R = Math.max(R, 2)), A.beginPath(), this.drawRoundRect(A, -Q / 2, -E / 2, Q, E, F), A.fillStyle = M, A.fill(), R > 0 && (A.strokeStyle = e, A.lineWidth = R, A.stroke(), s === "focused" || s === "focus")) {
|
|
8632
8639
|
A.save(), A.beginPath();
|
|
8633
|
-
const
|
|
8634
|
-
this.drawRoundRect(A, -Q / 2 - 2, -E / 2 - 2, Q + 4, E + 4,
|
|
8635
|
-
}
|
|
8636
|
-
const
|
|
8637
|
-
if (!
|
|
8638
|
-
const
|
|
8639
|
-
if (A.save(), A.translate(f, 0), !
|
|
8640
|
-
const
|
|
8641
|
-
A.scale(z, z), A.translate(-12, -12), A.fillStyle =
|
|
8640
|
+
const GA = F.map((NA) => NA + 2);
|
|
8641
|
+
this.drawRoundRect(A, -Q / 2 - 2, -E / 2 - 2, Q + 4, E + 4, GA), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore();
|
|
8642
|
+
}
|
|
8643
|
+
const r = (GA, NA) => {
|
|
8644
|
+
if (!GA.visible || !GA.svgPath) return;
|
|
8645
|
+
const MA = GA.size || 14, W = GA.offset ?? 16, CA = GA.color || "#ffffff", f = NA ? -(Q / 2) + W : Q / 2 - W, U = GA.svgPath;
|
|
8646
|
+
if (A.save(), A.translate(f, 0), !U.startsWith("<svg")) {
|
|
8647
|
+
const X = new Path2D(U), z = MA / 24;
|
|
8648
|
+
A.scale(z, z), A.translate(-12, -12), A.fillStyle = CA, A.fill(X);
|
|
8642
8649
|
}
|
|
8643
8650
|
A.restore();
|
|
8644
8651
|
};
|
|
8645
|
-
|
|
8646
|
-
const u = g.text || "",
|
|
8647
|
-
A.font = `${p} ${
|
|
8648
|
-
const Y = g.inputPadding ?? 16,
|
|
8649
|
-
if (A.save(), A.beginPath(), A.rect(j - 2, -E / 2 + 4,
|
|
8650
|
-
const
|
|
8652
|
+
r(G, !0), r(K, !1);
|
|
8653
|
+
const u = g.text || "", BA = g.placeholder || "Enter text...", AA = !u, d = u || BA, _ = AA ? b : x, IA = L, O = g.fontFamily || "Inter", p = g.fontWeight || 400;
|
|
8654
|
+
A.font = `${p} ${IA}px "${O}", sans-serif`, A.fillStyle = _, A.textAlign = "left", A.textBaseline = t ? "top" : "middle";
|
|
8655
|
+
const Y = g.inputPadding ?? 16, Z = G.visible ? (G.offset ?? 16) + (G.size || 14) / 2 + 8 : Y, DA = K.visible ? (K.offset ?? 16) + (K.size || 14) / 2 + 8 : Y, j = -(Q / 2) + Z, l = Q - Z - DA, v = g.inputType === "password" ? "•".repeat(d.length) : d;
|
|
8656
|
+
if (A.save(), A.beginPath(), A.rect(j - 2, -E / 2 + 4, l + 4, E - 8), A.clip(), t) {
|
|
8657
|
+
const GA = v.split(`
|
|
8651
8658
|
`);
|
|
8652
|
-
let
|
|
8653
|
-
const
|
|
8654
|
-
let
|
|
8655
|
-
|
|
8656
|
-
const
|
|
8657
|
-
let
|
|
8658
|
-
for (let z = 0; z <
|
|
8659
|
-
const
|
|
8660
|
-
A.measureText(
|
|
8659
|
+
let NA = -E / 2 + Y;
|
|
8660
|
+
const MA = IA * 1.2;
|
|
8661
|
+
let W = 0;
|
|
8662
|
+
GA.forEach((CA, f) => {
|
|
8663
|
+
const U = CA.split(" ");
|
|
8664
|
+
let X = "";
|
|
8665
|
+
for (let z = 0; z < U.length; z++) {
|
|
8666
|
+
const cA = X + U[z] + " ";
|
|
8667
|
+
A.measureText(cA).width > l && z > 0 ? (A.fillText(X, j, NA), X = U[z] + " ", NA += MA) : X = cA;
|
|
8661
8668
|
}
|
|
8662
|
-
A.fillText(
|
|
8663
|
-
}), i &&
|
|
8669
|
+
A.fillText(X, j, NA), W = A.measureText(X).width, f < GA.length - 1 && (NA += MA, W = 0);
|
|
8670
|
+
}), i && !AA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(j + W, NA, 1.5, IA);
|
|
8664
8671
|
} else {
|
|
8665
|
-
const
|
|
8666
|
-
let
|
|
8667
|
-
if (
|
|
8668
|
-
const
|
|
8669
|
-
A.fillRect(
|
|
8672
|
+
const NA = A.measureText(v).width;
|
|
8673
|
+
let MA = 0;
|
|
8674
|
+
if (NA > l && (MA = NA - l), A.fillText(v, j - MA, 0), i && !AA && Math.floor(performance.now() / 500) % 2 === 0) {
|
|
8675
|
+
const CA = j + NA - MA;
|
|
8676
|
+
A.fillRect(CA, -(IA / 2), 1.5, IA);
|
|
8670
8677
|
}
|
|
8671
8678
|
}
|
|
8672
8679
|
if (A.restore(), h.visible !== !1) {
|
|
8673
|
-
const
|
|
8674
|
-
A.font = `600 ${
|
|
8675
|
-
const
|
|
8676
|
-
A.fillText(
|
|
8680
|
+
const GA = h.text || "Label", NA = h.fontSize || 12, MA = h.color || "rgba(156, 163, 175, 1)", W = h.offset ?? 8;
|
|
8681
|
+
A.font = `600 ${NA}px "${O}", sans-serif`, A.fillStyle = MA, A.textAlign = "left", A.textBaseline = "bottom";
|
|
8682
|
+
const CA = -(Q / 2), f = -(E / 2) - W;
|
|
8683
|
+
A.fillText(GA, CA, f);
|
|
8677
8684
|
}
|
|
8678
8685
|
if (a.visible === !0) {
|
|
8679
|
-
const
|
|
8680
|
-
A.font = `400 ${
|
|
8681
|
-
const
|
|
8682
|
-
A.fillText(
|
|
8686
|
+
const GA = a.text || "Helper text", NA = a.fontSize || 11, MA = s === "error" ? "rgba(239, 68, 68, 1)" : a.color || "rgba(156, 163, 175, 1)", W = a.offset ?? 6;
|
|
8687
|
+
A.font = `400 ${NA}px "${O}", sans-serif`, A.fillStyle = MA, A.textAlign = "left", A.textBaseline = "top";
|
|
8688
|
+
const CA = -(Q / 2), f = E / 2 + W;
|
|
8689
|
+
A.fillText(GA, CA, f);
|
|
8683
8690
|
}
|
|
8684
8691
|
}
|
|
8685
8692
|
renderSlider(A, I) {
|
|
8686
|
-
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, D = Q.min ?? 0, s = (Q.max ?? 100) - D, h = s === 0 ? 0 : (i - D) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, K = Q.trackShape ?? "Rectangle", t = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", F = Q.thumbShape || "Ellipse", M = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, R = Q.thumbRoundedness ?? 0,
|
|
8687
|
-
if ((j === "Custom" || j === "Icon") &&
|
|
8693
|
+
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, D = Q.min ?? 0, s = (Q.max ?? 100) - D, h = s === 0 ? 0 : (i - D) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, K = Q.trackShape ?? "Rectangle", t = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", F = Q.thumbShape || "Ellipse", M = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, R = Q.thumbRoundedness ?? 0, x = Q.thumbColor || "#ffffff", b = Q.thumbPath || "", L = Q.thumbIcon || "", V = Q.showValueTooltip ?? !1, q = Q.tooltipBgColor || "#333333", r = Q.tooltipColor || "#ffffff", u = Q.tooltipOffsetX ?? 0, BA = Q.tooltipOffsetY ?? -25, AA = (j, l, v, gA, wA, GA, NA) => {
|
|
8694
|
+
if ((j === "Custom" || j === "Icon") && NA)
|
|
8688
8695
|
try {
|
|
8689
|
-
const
|
|
8690
|
-
if (A.save(), A.translate(
|
|
8691
|
-
const
|
|
8692
|
-
A.scale(
|
|
8696
|
+
const MA = new Path2D(NA);
|
|
8697
|
+
if (A.save(), A.translate(l, v), j === "Icon") {
|
|
8698
|
+
const W = Math.min(gA, wA) / 24;
|
|
8699
|
+
A.scale(W, W), A.translate(-12, -12);
|
|
8693
8700
|
}
|
|
8694
|
-
A.fill(
|
|
8701
|
+
A.fill(MA), A.restore();
|
|
8695
8702
|
return;
|
|
8696
|
-
} catch (
|
|
8697
|
-
console.error("Error drawing slider shape in engine:",
|
|
8703
|
+
} catch (MA) {
|
|
8704
|
+
console.error("Error drawing slider shape in engine:", MA);
|
|
8698
8705
|
}
|
|
8699
8706
|
if (A.beginPath(), j === "Ellipse")
|
|
8700
|
-
A.ellipse(
|
|
8707
|
+
A.ellipse(l, v, gA / 2, wA / 2, 0, 0, Math.PI * 2);
|
|
8701
8708
|
else if (j === "Rectangle")
|
|
8702
|
-
this.drawRoundRect(A,
|
|
8709
|
+
this.drawRoundRect(A, l - gA / 2, v - wA / 2, gA, wA, GA);
|
|
8703
8710
|
else if (j === "Triangle")
|
|
8704
|
-
A.moveTo(
|
|
8711
|
+
A.moveTo(l, v - wA / 2), A.lineTo(l + gA / 2, v + wA / 2), A.lineTo(l - gA / 2, v + wA / 2), A.closePath();
|
|
8705
8712
|
else if (j === "Diamond")
|
|
8706
|
-
A.moveTo(
|
|
8713
|
+
A.moveTo(l, v - wA / 2), A.lineTo(l + gA / 2, v), A.lineTo(l, v + wA / 2), A.lineTo(l - gA / 2, v), A.closePath();
|
|
8707
8714
|
else if (j === "Polygon") {
|
|
8708
|
-
const
|
|
8709
|
-
for (let
|
|
8710
|
-
const f =
|
|
8711
|
-
|
|
8715
|
+
const MA = I.geometry.sides || 3, W = I.geometry.radius || Math.min(gA, wA) / 2;
|
|
8716
|
+
for (let CA = 0; CA < MA; CA++) {
|
|
8717
|
+
const f = CA * 2 * Math.PI / MA - Math.PI / 2, U = l + W * Math.cos(f), X = v + W * Math.sin(f);
|
|
8718
|
+
CA === 0 ? A.moveTo(U, X) : A.lineTo(U, X);
|
|
8712
8719
|
}
|
|
8713
8720
|
A.closePath();
|
|
8714
8721
|
} else if (j === "Star") {
|
|
8715
|
-
const
|
|
8722
|
+
const W = Math.min(gA, wA) / 2, CA = W / 2;
|
|
8716
8723
|
for (let f = 0; f < 5 * 2; f++) {
|
|
8717
|
-
const
|
|
8718
|
-
A.lineTo(
|
|
8724
|
+
const U = f % 2 === 0 ? W : CA, X = f * Math.PI / 5 - Math.PI / 2;
|
|
8725
|
+
A.lineTo(l + U * Math.cos(X), v + U * Math.sin(X));
|
|
8719
8726
|
}
|
|
8720
8727
|
A.closePath();
|
|
8721
|
-
} else j === "Line" && (A.moveTo(
|
|
8728
|
+
} else j === "Line" && (A.moveTo(l - gA / 2, v), A.lineTo(l + gA / 2, v));
|
|
8722
8729
|
A.fill();
|
|
8723
8730
|
};
|
|
8724
|
-
A.fillStyle = y, K === "Line" ? (A.strokeStyle = y, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(E / 2, 0), A.stroke()) :
|
|
8725
|
-
const d = E - M, _ = -E / 2 + M / 2 + h * d,
|
|
8726
|
-
|
|
8727
|
-
const
|
|
8728
|
-
if (A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4 * p, A.shadowOffsetY = 1 * p, A.fillStyle =
|
|
8729
|
-
A.save(), A.translate(_ + u,
|
|
8731
|
+
A.fillStyle = y, K === "Line" ? (A.strokeStyle = y, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(E / 2, 0), A.stroke()) : AA(K, 0, 0, E, a, G, t);
|
|
8732
|
+
const d = E - M, _ = -E / 2 + M / 2 + h * d, IA = _ - -E / 2;
|
|
8733
|
+
IA > 0 && (A.fillStyle = S, K === "Line" ? (A.strokeStyle = S, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(_, 0), A.stroke()) : K === "Rectangle" && (A.beginPath(), this.drawRoundRect(A, -E / 2, -a / 2, IA, a, G), A.fill())), A.save(), A.translate(_, 0);
|
|
8734
|
+
const O = A.getTransform(), p = Math.sqrt(O.a * O.a + O.b * O.b) || 1;
|
|
8735
|
+
if (A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4 * p, A.shadowOffsetY = 1 * p, A.fillStyle = x, AA(F, 0, 0, M, e, R, F === "Icon" ? L : b), A.restore(), V) {
|
|
8736
|
+
A.save(), A.translate(_ + u, BA);
|
|
8730
8737
|
const j = Math.round(i).toString();
|
|
8731
8738
|
A.font = "10px Inter, sans-serif";
|
|
8732
|
-
const
|
|
8733
|
-
A.beginPath(), this.drawRoundRect(A, -wA / 2, -
|
|
8739
|
+
const l = A.measureText(j), v = 6, gA = 4, wA = l.width + v * 2, GA = 14 + gA;
|
|
8740
|
+
A.beginPath(), this.drawRoundRect(A, -wA / 2, -GA / 2, wA, GA, 4), A.fillStyle = q, A.fill(), A.fillStyle = r, A.textAlign = "center", A.textBaseline = "middle", A.fillText(j, 0, 0), A.restore();
|
|
8734
8741
|
}
|
|
8735
|
-
const Y = Q.label || {},
|
|
8742
|
+
const Y = Q.label || {}, Z = Q.helperText || {}, DA = Q.fontFamily || "Inter";
|
|
8736
8743
|
if (Y.visible !== !1) {
|
|
8737
|
-
const j = Y.text || "Label",
|
|
8738
|
-
A.font = `600 ${
|
|
8739
|
-
const wA = -(E / 2),
|
|
8740
|
-
A.fillText(j, wA,
|
|
8744
|
+
const j = Y.text || "Label", l = Y.fontSize || 12, v = Y.color || "rgba(156, 163, 175, 1)", gA = Y.offset ?? 8;
|
|
8745
|
+
A.font = `600 ${l}px "${DA}", sans-serif`, A.fillStyle = v, A.textAlign = "left", A.textBaseline = "bottom";
|
|
8746
|
+
const wA = -(E / 2), GA = -(a / 2) - gA;
|
|
8747
|
+
A.fillText(j, wA, GA);
|
|
8741
8748
|
}
|
|
8742
|
-
if (
|
|
8743
|
-
const j =
|
|
8744
|
-
A.font = `400 ${
|
|
8745
|
-
const wA = -(E / 2),
|
|
8746
|
-
A.fillText(j, wA,
|
|
8749
|
+
if (Z.visible === !0) {
|
|
8750
|
+
const j = Z.text || "Helper text", l = Z.fontSize || 11, v = Z.color || "rgba(156, 163, 175, 1)", gA = Z.offset ?? 6;
|
|
8751
|
+
A.font = `400 ${l}px "${DA}", sans-serif`, A.fillStyle = v, A.textAlign = "left", A.textBaseline = "top";
|
|
8752
|
+
const wA = -(E / 2), GA = a / 2 + gA;
|
|
8753
|
+
A.fillText(j, wA, GA);
|
|
8747
8754
|
}
|
|
8748
8755
|
}
|
|
8749
8756
|
renderDropdown(A, I) {
|
|
8750
|
-
var
|
|
8757
|
+
var BA;
|
|
8751
8758
|
const C = this.objectStates.get(I.id);
|
|
8752
8759
|
if (!C) return;
|
|
8753
8760
|
const g = C.options || I.options || {}, Q = I.geometry.width || 160, E = I.geometry.height || 40, i = -Q / 2, D = -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;
|
|
@@ -8759,60 +8766,60 @@ class Di {
|
|
|
8759
8766
|
y > 0 && (A.strokeStyle = this.createCanvasFill(A, typeof K == "string" ? { type: "Solid", color: K } : K, Q, E) || "#e5e7eb", A.lineWidth = y, A.stroke());
|
|
8760
8767
|
const F = 12, M = g.chevronType || "chevron", e = g.chevronSize || 16, R = (a ? g.openIconColor : g.closedIconColor) || g.chevronColor || "#6b7280";
|
|
8761
8768
|
if (M !== "none") {
|
|
8762
|
-
const
|
|
8763
|
-
A.save(), A.translate(
|
|
8769
|
+
const AA = i + Q - F - e / 2;
|
|
8770
|
+
A.save(), A.translate(AA, 0);
|
|
8764
8771
|
const d = a ? g.openIconAngle ?? 180 : g.closedIconAngle ?? 0;
|
|
8765
8772
|
if (A.rotate(d * Math.PI / 180), A.strokeStyle = R, A.fillStyle = R, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", M === "chevron")
|
|
8766
8773
|
A.beginPath(), A.moveTo(-e / 2, -e * 0.2), A.lineTo(0, e * 0.2), A.lineTo(e / 2, -e * 0.2), A.stroke();
|
|
8767
8774
|
else if (M === "custom" || M === "path") {
|
|
8768
8775
|
const _ = a && g.openIconPath || g.closedIconPath;
|
|
8769
8776
|
if (_) {
|
|
8770
|
-
const
|
|
8777
|
+
const IA = new Path2D(_);
|
|
8771
8778
|
A.save();
|
|
8772
|
-
const
|
|
8773
|
-
A.scale(
|
|
8779
|
+
const O = e / 24;
|
|
8780
|
+
A.scale(O, O), A.translate(-12, -12), A.fill(IA), A.restore();
|
|
8774
8781
|
}
|
|
8775
8782
|
}
|
|
8776
8783
|
A.restore();
|
|
8777
8784
|
}
|
|
8778
|
-
const
|
|
8779
|
-
A.font = `${
|
|
8780
|
-
const
|
|
8781
|
-
A.fillStyle = this.createCanvasFill(A, typeof
|
|
8782
|
-
const
|
|
8783
|
-
if (A.save(), A.beginPath(), A.rect(i + F, D, u, E), A.clip(), A.fillText(
|
|
8784
|
-
const
|
|
8785
|
+
const x = g.selectedOption || g.placeholder || "Select...", b = g.fontSize || 14, L = g.fontWeight || 400, V = g.fontFamily || "Inter, sans-serif";
|
|
8786
|
+
A.font = `${L} ${b}px ${V}`;
|
|
8787
|
+
const q = s ? g.disabledColor || "#9ca3af" : !g.selectedOption && g.placeholder ? "#9ca3af" : t;
|
|
8788
|
+
A.fillStyle = this.createCanvasFill(A, typeof q == "string" ? { type: "Solid", color: q } : q, Q, E) || "#333333", A.textAlign = "left", A.textBaseline = "middle";
|
|
8789
|
+
const r = M === "none" ? 0 : e + 8, u = Q - F * 2 - r;
|
|
8790
|
+
if (A.save(), A.beginPath(), A.rect(i + F, D, u, E), A.clip(), A.fillText(x, i + F, 0), A.restore(), a && !s) {
|
|
8791
|
+
const AA = D + E + 4, d = g.optionsList || [], _ = g.itemHeight || 32, IA = g.listPadding ?? 4, O = d.length * _ + IA * 2, p = g.listCornerRadius ?? o;
|
|
8785
8792
|
A.save();
|
|
8786
|
-
const Y = g.listShadow || {},
|
|
8787
|
-
A.shadowColor = typeof Y.color == "string" ? Y.color : ((
|
|
8793
|
+
const Y = g.listShadow || {}, Z = A.getTransform(), DA = Math.sqrt(Z.a * Z.a + Z.b * Z.b) || 1;
|
|
8794
|
+
A.shadowColor = typeof Y.color == "string" ? Y.color : ((BA = Y.color) == null ? void 0 : BA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = (Y.blur ?? 12) * DA, A.shadowOffsetY = (Y.offsetY ?? 6) * DA, A.shadowOffsetX = (Y.offsetX ?? 0) * DA, A.beginPath(), this.drawRoundRect(A, i, AA, Q, O, p), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, O) || "#ffffff", A.fill();
|
|
8788
8795
|
const j = g.listBorderWidth ?? 1;
|
|
8789
|
-
j > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: K }, Q,
|
|
8790
|
-
const
|
|
8791
|
-
A.font = `${
|
|
8792
|
-
const
|
|
8793
|
-
if (
|
|
8794
|
-
A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, _) || "#f3f4f6", A.fillRect(i + j,
|
|
8796
|
+
j > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: K }, Q, O) || "#e5e7eb", A.lineWidth = j, A.stroke()), A.restore();
|
|
8797
|
+
const l = g.itemFontSize || b, v = g.itemFontFamily || V;
|
|
8798
|
+
A.font = `${L} ${l}px ${v}`, d.forEach((gA, wA) => {
|
|
8799
|
+
const GA = AA + IA + wA * _;
|
|
8800
|
+
if (gA === g.selectedOption)
|
|
8801
|
+
A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, _) || "#f3f4f6", A.fillRect(i + j, GA, Q - j * 2, _), A.fillStyle = g.itemSelectedColor || g.activeColor || t || "#374151";
|
|
8795
8802
|
else if (A.fillStyle = g.listTextColor || t || "#333333", this.activeDropdownId === I.id && this._lastPointerPos) {
|
|
8796
|
-
const
|
|
8797
|
-
wA ===
|
|
8803
|
+
const MA = this._lastPointerPos.y - (AA + IA), W = Math.floor(MA / _);
|
|
8804
|
+
wA === W && (A.fillStyle = this.createCanvasFill(A, typeof g.itemHoverBackgroundColor == "string" ? { type: "Solid", color: g.itemHoverBackgroundColor } : g.itemHoverBackgroundColor || { type: "Solid", color: "#f9fafb" }, Q, _) || "#f9fafb", A.fillRect(i + j, GA, Q - j * 2, _), A.fillStyle = g.itemHoverColor || t);
|
|
8798
8805
|
}
|
|
8799
|
-
A.fillText(
|
|
8806
|
+
A.fillText(gA, i + F, GA + _ / 2);
|
|
8800
8807
|
});
|
|
8801
8808
|
}
|
|
8802
8809
|
A.globalAlpha = S;
|
|
8803
8810
|
}
|
|
8804
8811
|
renderButton(A, I) {
|
|
8805
|
-
var M, e, R,
|
|
8806
|
-
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((M = I.geometry) == null ? void 0 : M.width) || 120, E = ((e = I.geometry) == null ? void 0 : e.height) || 40, i = -Q / 2, D = -E / 2, o = this.lastHoveredObjectId === I.id, s = g.corner_radius ?? 8, h = g.bgShape || "Rectangle", a = o ? ((R = g.hoverStyle) == null ? void 0 : R.backgroundColor) || g.buttonBgColor || "#3b82f6" : g.buttonBgColor || "#3b82f6", G = g.label || {}, K = o ? ((
|
|
8812
|
+
var M, e, R, x;
|
|
8813
|
+
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((M = I.geometry) == null ? void 0 : M.width) || 120, E = ((e = I.geometry) == null ? void 0 : e.height) || 40, i = -Q / 2, D = -E / 2, o = this.lastHoveredObjectId === I.id, s = g.corner_radius ?? 8, h = g.bgShape || "Rectangle", a = o ? ((R = g.hoverStyle) == null ? void 0 : R.backgroundColor) || g.buttonBgColor || "#3b82f6" : g.buttonBgColor || "#3b82f6", G = g.label || {}, K = o ? ((x = g.hoverStyle) == null ? void 0 : x.textColor) || G.color || "#ffffff" : G.color || "#ffffff", t = g.icon || { enabled: !1 };
|
|
8807
8814
|
A.save(), A.beginPath(), h === "Rectangle" ? this.drawRoundRect(A, i, D, Q, E, s) : h === "Ellipse" || h === "Circle" ? A.ellipse(0, 0, Q / 2, E / 2, 0, 0, Math.PI * 2) : h === "Pill" && this.drawRoundRect(A, i, D, Q, E, E / 2), A.fillStyle = a, A.fill();
|
|
8808
8815
|
const S = G.fontSize || 14, y = G.fontFamily || "Inter";
|
|
8809
8816
|
A.font = `${G.fontWeight || 400} ${S}px "${y}", sans-serif`, A.fillStyle = K, A.textAlign = "center", A.textBaseline = "middle";
|
|
8810
8817
|
let F = 0;
|
|
8811
8818
|
if (t.enabled && t.svgPath) {
|
|
8812
|
-
const b = t.size || 16,
|
|
8819
|
+
const b = t.size || 16, L = t.gap || 8, V = t.position === "left" ? -(A.measureText(G.text || "").width / 2 + b / 2 + L / 2) : A.measureText(G.text || "").width / 2 + b / 2 + L / 2;
|
|
8813
8820
|
A.save(), A.translate(V, 0);
|
|
8814
|
-
const
|
|
8815
|
-
A.scale(
|
|
8821
|
+
const q = new Path2D(t.svgPath), r = b / 24;
|
|
8822
|
+
A.scale(r, r), A.translate(-12, -12), A.fillStyle = t.color || K, A.fill(q), A.restore(), F = t.position === "left" ? b / 2 + L / 2 : -(b / 2 + L / 2);
|
|
8816
8823
|
}
|
|
8817
8824
|
A.fillText(G.text || "Button", F, 0), A.restore();
|
|
8818
8825
|
}
|
|
@@ -8829,11 +8836,11 @@ class Di {
|
|
|
8829
8836
|
A.beginPath(), this.drawRoundRect(A, i, D, Q, E, s), A.fillStyle = o ? g.activeColor || "#10b981" : g.inactiveColor || "#374151", g.disabled && (A.globalAlpha *= 0.5), A.fill();
|
|
8830
8837
|
const h = 3, a = E - h * 2, G = a / 2, K = i + h, t = i + Q - h - a, S = o ? t : K, y = D + h;
|
|
8831
8838
|
if (A.beginPath(), A.arc(S + G, y + G, G, 0, Math.PI * 2), A.fillStyle = g.knobColor || "#ffffff", A.fill(), g.disabled && (A.globalAlpha *= 2), g.label && g.label.text) {
|
|
8832
|
-
const e = g.label, R = e.fontSize || 14,
|
|
8833
|
-
A.font = `${
|
|
8834
|
-
const
|
|
8835
|
-
let V = 0,
|
|
8836
|
-
e.position === "left" ? (A.textAlign = "right", V = i -
|
|
8839
|
+
const e = g.label, R = e.fontSize || 14, x = e.fontWeight || 400, b = e.fontFamily || "Inter";
|
|
8840
|
+
A.font = `${x} ${R}px "${b}", sans-serif`, A.fillStyle = e.color || "#f3f4f6", A.textBaseline = "middle";
|
|
8841
|
+
const L = e.gap || 10;
|
|
8842
|
+
let V = 0, q = 0;
|
|
8843
|
+
e.position === "left" ? (A.textAlign = "right", V = i - L, q = 0) : e.position === "right" ? (A.textAlign = "left", V = i + Q + L, q = 0) : e.position === "top" ? (A.textAlign = "center", V = 0, q = D - L, A.textBaseline = "bottom") : e.position === "bottom" ? (A.textAlign = "center", V = 0, q = D + E + L, A.textBaseline = "top") : (A.textAlign = "left", V = i + Q + L, q = 0), A.fillText(e.text, V, q);
|
|
8837
8844
|
}
|
|
8838
8845
|
}
|
|
8839
8846
|
renderLineGraph(A, I, C, g) {
|
|
@@ -8896,10 +8903,10 @@ class Di {
|
|
|
8896
8903
|
if (t.showArea) {
|
|
8897
8904
|
if (A.beginPath(), A.moveTo(a(0), g / 2), A.lineTo(a(0), h(S[0])), t.smoothing && S.length > 2)
|
|
8898
8905
|
for (let F = 0; F < S.length - 1; F++) {
|
|
8899
|
-
const M = S[F === 0 ? F : F - 1], e = S[F], R = S[F + 1],
|
|
8906
|
+
const M = S[F === 0 ? F : F - 1], e = S[F], R = S[F + 1], x = S[F + 1 === S.length - 1 ? F + 1 : F + 2];
|
|
8900
8907
|
for (let b = 1; b <= K; b++) {
|
|
8901
|
-
const
|
|
8902
|
-
A.lineTo(a(F +
|
|
8908
|
+
const L = b / K, V = this._catmullRom(M, e, R, x, L);
|
|
8909
|
+
A.lineTo(a(F + L), h(V));
|
|
8903
8910
|
}
|
|
8904
8911
|
}
|
|
8905
8912
|
else
|
|
@@ -8912,9 +8919,9 @@ class Di {
|
|
|
8912
8919
|
if (A.beginPath(), A.strokeStyle = t.lineColor || "#3b82f6", A.lineWidth = t.lineWidth || 2, A.lineJoin = "round", A.lineCap = "round", A.moveTo(a(0), h(S[0])), t.smoothing && S.length > 2)
|
|
8913
8920
|
for (let y = 0; y < S.length - 1; y++) {
|
|
8914
8921
|
const F = S[y === 0 ? y : y - 1], M = S[y], e = S[y + 1], R = S[y + 1 === S.length - 1 ? y + 1 : y + 2];
|
|
8915
|
-
for (let
|
|
8916
|
-
const b =
|
|
8917
|
-
A.lineTo(a(y + b), h(
|
|
8922
|
+
for (let x = 1; x <= K; x++) {
|
|
8923
|
+
const b = x / K, L = this._catmullRom(F, M, e, R, b);
|
|
8924
|
+
A.lineTo(a(y + b), h(L));
|
|
8918
8925
|
}
|
|
8919
8926
|
}
|
|
8920
8927
|
else
|
|
@@ -8930,8 +8937,8 @@ class Di {
|
|
|
8930
8937
|
let S = -g / 2 + 15;
|
|
8931
8938
|
const y = I.legendFontSize || 10, F = y + 5;
|
|
8932
8939
|
A.font = `${y}px Inter, sans-serif`, A.textAlign = "right", A.textBaseline = "alphabetic", Q.forEach((M) => {
|
|
8933
|
-
const R = M.label || "Series",
|
|
8934
|
-
A.beginPath(), A.rect(t -
|
|
8940
|
+
const R = M.label || "Series", x = A.measureText(R).width;
|
|
8941
|
+
A.beginPath(), A.rect(t - x - 8 - 5, S - (8 / 2 + 2), 8, 8), A.fillStyle = M.lineColor || "#3b82f6", A.fill(), A.fillStyle = I.legendColor || "#333333", A.fillText(R, t, S), S += F;
|
|
8935
8942
|
});
|
|
8936
8943
|
}
|
|
8937
8944
|
}
|
|
@@ -9040,52 +9047,52 @@ class Di {
|
|
|
9040
9047
|
A.moveTo(I + D, 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 + D), A.arcTo(I, C, I + D, C, D), A.closePath();
|
|
9041
9048
|
}
|
|
9042
9049
|
renderListView(A, I) {
|
|
9043
|
-
var
|
|
9044
|
-
const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((
|
|
9045
|
-
if (A.save(), A.globalAlpha *=
|
|
9046
|
-
const
|
|
9050
|
+
var AA, d, _, IA;
|
|
9051
|
+
const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((AA = I.geometry) == null ? void 0 : AA.width) || 200, E = C.height !== void 0 ? C.height : ((d = I.geometry) == null ? void 0 : d.height) || 300, i = -Q / 2, D = -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, K = g.itemWidth ?? 200, t = g.scrollOffset ?? 0, S = g.padding ?? 0, y = g.glassEffect !== !1, F = g.accentColor || "#3b82f6", M = g.itemTextColor || "#333333", e = g.itemBackgroundColor || "#ffffff", R = g.hoveredIndex ?? null, x = g.activeItemIndex ?? null, b = g.glowIntensity ?? 0, L = g.glowColor || "#3b82f6", V = typeof L == "string" ? L : L.color || ((IA = (_ = L.stops) == null ? void 0 : _[0]) == null ? void 0 : IA.color) || "#3b82f6", q = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
|
|
9052
|
+
if (A.save(), A.globalAlpha *= q, b > 0) {
|
|
9053
|
+
const O = A.getTransform(), p = Math.sqrt(O.a * O.a + O.b * O.b) || 1;
|
|
9047
9054
|
A.shadowColor = V, A.shadowBlur = b * 2 * p, A.shadowOffsetX = 0, A.shadowOffsetY = 0;
|
|
9048
9055
|
}
|
|
9049
9056
|
if (y) {
|
|
9050
|
-
const
|
|
9057
|
+
const O = g.listBackgroundColor || "rgba(31, 41, 55, 0.4)", p = this.createCanvasFill(A, O, Q, E);
|
|
9051
9058
|
A.fillStyle = p || "rgba(31, 41, 55, 0.4)", this.drawListViewRect(A, i, D, Q, E, o), A.fill();
|
|
9052
9059
|
const Y = A.createLinearGradient(i, D, i + Q, D + E);
|
|
9053
9060
|
Y.addColorStop(0, "rgba(255, 255, 255, 0.15)"), Y.addColorStop(0.5, "rgba(255, 255, 255, 0.08)"), Y.addColorStop(1, "rgba(255, 255, 255, 0.03)"), A.fillStyle = Y, this.drawListViewRect(A, i, D, Q, E, o), A.fill(), A.strokeStyle = "rgba(255, 255, 255, 0.25)", A.lineWidth = 1, this.drawListViewRect(A, i, D, Q, E, o), A.stroke();
|
|
9054
9061
|
} else {
|
|
9055
|
-
const
|
|
9062
|
+
const O = g.listBackgroundColor || "transparent", p = this.createCanvasFill(A, O, Q, E);
|
|
9056
9063
|
p && (A.fillStyle = p, this.drawListViewRect(A, i, D, Q, E, o), A.fill());
|
|
9057
9064
|
const Y = g.borderWidth ?? 0;
|
|
9058
9065
|
Y > 0 && (A.strokeStyle = g.borderColor || "#cccccc", A.lineWidth = Y, this.drawListViewRect(A, i, D, Q, E, o), A.stroke());
|
|
9059
9066
|
}
|
|
9060
9067
|
A.shadowBlur = 0, A.save(), this.drawListViewRect(A, i, D, Q, E, o), A.clip();
|
|
9061
|
-
const
|
|
9062
|
-
let u = (s === "vertical" ? D : i) + t +
|
|
9063
|
-
if (A.textBaseline = "middle", h.forEach((
|
|
9064
|
-
const Y = s === "vertical" ? Q : K,
|
|
9065
|
-
if (
|
|
9066
|
-
const
|
|
9067
|
-
A.fillStyle =
|
|
9068
|
-
const
|
|
9069
|
-
A.globalAlpha =
|
|
9070
|
-
} else if (
|
|
9071
|
-
A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(DA, j, Y,
|
|
9068
|
+
const r = typeof S == "number" ? S : s === "vertical" ? S[0] : S[3];
|
|
9069
|
+
let u = (s === "vertical" ? D : i) + t + r;
|
|
9070
|
+
if (A.textBaseline = "middle", h.forEach((O, p) => {
|
|
9071
|
+
const Y = s === "vertical" ? Q : K, Z = s === "vertical" ? G : E, DA = s === "vertical" ? i : u, j = s === "vertical" ? u : D, l = R === p, v = x === p;
|
|
9072
|
+
if (v) {
|
|
9073
|
+
const MA = this.createCanvasFill(A, F, Y, Z);
|
|
9074
|
+
A.fillStyle = MA || F;
|
|
9075
|
+
const W = A.globalAlpha;
|
|
9076
|
+
A.globalAlpha = W * 0.8, A.fillRect(DA, j, Y, Z), A.globalAlpha = W;
|
|
9077
|
+
} else if (l)
|
|
9078
|
+
A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(DA, j, Y, Z);
|
|
9072
9079
|
else if (e !== "transparent") {
|
|
9073
|
-
const
|
|
9074
|
-
A.fillStyle =
|
|
9080
|
+
const MA = this.createCanvasFill(A, e, Y, Z);
|
|
9081
|
+
A.fillStyle = MA || e, A.fillRect(DA, j, Y, Z);
|
|
9075
9082
|
}
|
|
9076
|
-
if (
|
|
9077
|
-
const
|
|
9078
|
-
A.fillStyle =
|
|
9083
|
+
if (v || l) {
|
|
9084
|
+
const MA = this.createCanvasFill(A, F, s === "vertical" ? 3 : Y, s === "vertical" ? Z : 3);
|
|
9085
|
+
A.fillStyle = MA || F, s === "vertical" ? A.fillRect(DA, j, 3, Z) : A.fillRect(DA, j + Z - 3, Y, 3);
|
|
9079
9086
|
}
|
|
9080
|
-
const
|
|
9081
|
-
A.fillStyle =
|
|
9082
|
-
const wA = typeof
|
|
9083
|
-
s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(wA,
|
|
9087
|
+
const gA = v ? "#ffffff" : y ? "rgba(255, 255, 255, 0.9)" : M;
|
|
9088
|
+
A.fillStyle = gA, A.font = v || l ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
|
|
9089
|
+
const wA = typeof O == "string" ? O : (O == null ? void 0 : O.label) || `Item ${p + 1}`, GA = DA + (s === "vertical" ? 16 : Y / 2), NA = j + Z / 2;
|
|
9090
|
+
s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(wA, GA, NA), u += (s === "vertical" ? G : K) + a;
|
|
9084
9091
|
}), A.restore(), g.showScrollbar !== !1) {
|
|
9085
|
-
const
|
|
9086
|
-
if (
|
|
9087
|
-
const Y = p /
|
|
9088
|
-
A.fillStyle = j, s === "vertical" ? A.fillRect(i + Q -
|
|
9092
|
+
const O = (h.length || 0) * (s === "vertical" ? G : K) + ((h.length || 0) - 1) * a, p = s === "vertical" ? E : Q;
|
|
9093
|
+
if (O > p) {
|
|
9094
|
+
const Y = p / O, Z = p * Y, DA = -t / O * p, j = g.scrollbarColor || "rgba(255,255,255,0.3)", l = g.scrollbarWidth || 4;
|
|
9095
|
+
A.fillStyle = j, s === "vertical" ? A.fillRect(i + Q - l - 2, D + DA, l, Z) : A.fillRect(i + DA, D + E - l - 2, Z, l);
|
|
9089
9096
|
}
|
|
9090
9097
|
}
|
|
9091
9098
|
A.restore();
|
|
@@ -9103,16 +9110,16 @@ class Di {
|
|
|
9103
9110
|
Q.hoveredIndex !== g && (Q.hoveredIndex = g);
|
|
9104
9111
|
}
|
|
9105
9112
|
getListViewItemIndexAtPointer(A, I, C) {
|
|
9106
|
-
var
|
|
9113
|
+
var r, u;
|
|
9107
9114
|
const g = A.options || {}, Q = this.objectStates.get(A.id) || {}, E = g.items || [];
|
|
9108
9115
|
if (E.length === 0) return null;
|
|
9109
|
-
const i = Q.width !== void 0 ? Q.width : ((
|
|
9110
|
-
let
|
|
9111
|
-
for (let
|
|
9112
|
-
const
|
|
9113
|
-
if (R >= _ && R <= _ +
|
|
9114
|
-
return
|
|
9115
|
-
|
|
9116
|
+
const i = Q.width !== void 0 ? Q.width : ((r = A.geometry) == null ? void 0 : r.width) || 200, D = Q.height !== void 0 ? Q.height : ((u = A.geometry) == null ? void 0 : u.height) || 300, o = g.orientation || "vertical", s = g.itemGap ?? 10, h = g.itemHeight ?? 50, a = g.itemWidth ?? 200, G = g.scrollOffset ?? 0, K = g.padding ?? 0, t = this.getWorldTransform(A.id), S = I - t.x, y = C - t.y, F = -t.rotation * (Math.PI / 180), M = Math.cos(F), e = Math.sin(F), R = S * M - y * e, x = S * e + y * M, b = -i / 2, L = -D / 2, V = typeof K == "number" ? K : o === "vertical" ? K[0] : K[3];
|
|
9117
|
+
let q = (o === "vertical" ? L : b) + G + V;
|
|
9118
|
+
for (let BA = 0; BA < E.length; BA++) {
|
|
9119
|
+
const AA = o === "vertical" ? i : a, d = o === "vertical" ? h : D, _ = o === "vertical" ? b : q, IA = o === "vertical" ? q : L;
|
|
9120
|
+
if (R >= _ && R <= _ + AA && x >= IA && x <= IA + d)
|
|
9121
|
+
return BA;
|
|
9122
|
+
q += (o === "vertical" ? h : a) + s;
|
|
9116
9123
|
}
|
|
9117
9124
|
return null;
|
|
9118
9125
|
}
|
|
@@ -9130,108 +9137,108 @@ class Di {
|
|
|
9130
9137
|
if (!g.behaviors || g.behaviors.length === 0) return;
|
|
9131
9138
|
const Q = this.objectStates.get(g.id);
|
|
9132
9139
|
Q && g.behaviors.forEach((E) => {
|
|
9133
|
-
var a, G, K, t, S, y, F, M, e, R,
|
|
9140
|
+
var a, G, K, t, S, y, F, M, e, R, x, b, L, V, q, r, u, BA, AA, d, _, IA, O, p, Y, Z, DA, j, l, v, gA, wA, GA, NA, MA, W, CA, f, U, X, z, cA, FA, yA;
|
|
9134
9141
|
if (!E.enabled) return;
|
|
9135
9142
|
const i = E.startTime || 0, D = E.endTime || 1 / 0;
|
|
9136
9143
|
if (this.currentTime < i || this.currentTime > D) return;
|
|
9137
9144
|
const o = Q.x - I, s = Q.y - C, h = Math.sqrt(o * o + s * s);
|
|
9138
|
-
if (this.frameCount % 240 === 0 && Math.random() < 0.1 && console.log(`[ExodeUI] Executing ${E.type} on ${g.name}`), E.type ===
|
|
9139
|
-
const H = ((a = E.settings) == null ? void 0 : a.radius) || 300,
|
|
9140
|
-
let
|
|
9141
|
-
h < H && (
|
|
9142
|
-
this.applyBehaviorSensor(Q,
|
|
9145
|
+
if (this.frameCount % 240 === 0 && Math.random() < 0.1 && console.log(`[ExodeUI] Executing ${E.type} on ${g.name}`), E.type === P.Proximity) {
|
|
9146
|
+
const H = ((a = E.settings) == null ? void 0 : a.radius) || 300, n = ((G = E.settings) == null ? void 0 : G.falloff) || "smooth";
|
|
9147
|
+
let N = 0;
|
|
9148
|
+
h < H && (n === "linear" ? N = 1 - h / H : N = Math.pow(1 - h / H, 2)), N > 0 && E.sensors.forEach((hA) => {
|
|
9149
|
+
this.applyBehaviorSensor(Q, hA, N, A, E.settings);
|
|
9143
9150
|
});
|
|
9144
|
-
} else if (E.type ===
|
|
9145
|
-
const H = ((K = E.settings) == null ? void 0 : K.radius) || 400,
|
|
9151
|
+
} else if (E.type === P.Magnetic) {
|
|
9152
|
+
const H = ((K = E.settings) == null ? void 0 : K.radius) || 400, n = ((t = E.settings) == null ? void 0 : t.strength) || 0.5;
|
|
9146
9153
|
if (h < H && h > 5) {
|
|
9147
|
-
const
|
|
9148
|
-
Q.x -=
|
|
9154
|
+
const N = 1 - h / H, hA = o * N * n, YA = s * N * n;
|
|
9155
|
+
Q.x -= hA * A * 10, Q.y -= YA * A * 10;
|
|
9149
9156
|
}
|
|
9150
|
-
} else if (E.type ===
|
|
9151
|
-
const H = ((S = E.settings) == null ? void 0 : S.radius) || 300,
|
|
9157
|
+
} else if (E.type === P.Repel) {
|
|
9158
|
+
const H = ((S = E.settings) == null ? void 0 : S.radius) || 300, n = ((y = E.settings) == null ? void 0 : y.strength) || 1;
|
|
9152
9159
|
if (h < H) {
|
|
9153
|
-
const
|
|
9154
|
-
Q.x += o / (h || 1) *
|
|
9160
|
+
const N = Math.pow(1 - h / H, 2);
|
|
9161
|
+
Q.x += o / (h || 1) * N * 60 * n * A * 5, Q.y += s / (h || 1) * N * 60 * n * A * 5;
|
|
9155
9162
|
}
|
|
9156
|
-
} else if (E.type ===
|
|
9157
|
-
const H = ((F = E.settings) == null ? void 0 : F.speed) || 1,
|
|
9158
|
-
Q.x += Math.cos(
|
|
9159
|
-
} else if (E.type ===
|
|
9160
|
-
const H = ((e = E.settings) == null ? void 0 : e.radius) || 400,
|
|
9163
|
+
} else if (E.type === P.Orbit) {
|
|
9164
|
+
const H = ((F = E.settings) == null ? void 0 : F.speed) || 1, n = ((M = E.settings) == null ? void 0 : M.radius) || 30, N = this.currentTime * H * Math.PI * 2;
|
|
9165
|
+
Q.x += Math.cos(N) * n * A * 5, Q.y += Math.sin(N) * n * A * 5, Q.rotation += 2 * A * 5;
|
|
9166
|
+
} else if (E.type === P.Vortex) {
|
|
9167
|
+
const H = ((e = E.settings) == null ? void 0 : e.radius) || 400, n = ((R = E.settings) == null ? void 0 : R.speed) || 2, N = ((x = E.settings) == null ? void 0 : x.strength) || 1;
|
|
9161
9168
|
if (h < H) {
|
|
9162
|
-
const
|
|
9163
|
-
Q.x +=
|
|
9169
|
+
const hA = Math.pow(1 - h / H, 1.5), YA = this.currentTime * n * Math.PI * 2, dA = Math.cos(YA) * 30 - o * 0.4, lA = Math.sin(YA) * 30 - s * 0.4;
|
|
9170
|
+
Q.x += dA * hA * N * A * 5, Q.y += lA * hA * N * A * 5, Q.rotation += 5 * hA * N * A * 5, Q.scale_x *= 1 - hA * 0.1 * N * A, Q.scale_y *= 1 - hA * 0.1 * N * A;
|
|
9164
9171
|
}
|
|
9165
|
-
} else if (E.type ===
|
|
9166
|
-
const H = ((b = E.settings) == null ? void 0 : b.radius) || 300,
|
|
9172
|
+
} else if (E.type === P.Fluid) {
|
|
9173
|
+
const H = ((b = E.settings) == null ? void 0 : b.radius) || 300, n = ((L = E.settings) == null ? void 0 : L.strength) || 1;
|
|
9167
9174
|
if (h < H) {
|
|
9168
|
-
const
|
|
9169
|
-
Q.x +=
|
|
9175
|
+
const N = Math.pow(1 - h / H, 1.2), hA = o / (h || 1) * N * 1.2 * n, YA = s / (h || 1) * N * 1.2 * n;
|
|
9176
|
+
Q.x += hA * 10 * A * 5, Q.y += YA * 10 * A * 5, Q.scale_x *= 1 + N * 0.3 * n * A, Q.scale_y *= 1 + N * 0.3 * n * A;
|
|
9170
9177
|
}
|
|
9171
|
-
} else if (E.type ===
|
|
9172
|
-
const H = ((V = E.settings) == null ? void 0 : V.radius) || 300,
|
|
9178
|
+
} else if (E.type === P.Elastic) {
|
|
9179
|
+
const H = ((V = E.settings) == null ? void 0 : V.radius) || 300, n = ((q = E.settings) == null ? void 0 : q.strength) || 1;
|
|
9173
9180
|
if (h < H) {
|
|
9174
|
-
const
|
|
9175
|
-
Q.scale_x *= 1 +
|
|
9181
|
+
const N = 1 - h / H;
|
|
9182
|
+
Q.scale_x *= 1 + N * 0.4 * n * A, Q.scale_y *= 1 + N * 0.4 * n * A;
|
|
9176
9183
|
}
|
|
9177
|
-
} else if (E.type ===
|
|
9178
|
-
const H = Q.x - this.canvasWidth / 2,
|
|
9179
|
-
if (Q.x -= H / 1e3 *
|
|
9180
|
-
const
|
|
9181
|
-
Q.style.exposure = (Q.style.exposure || 1) +
|
|
9184
|
+
} else if (E.type === P.Holographic) {
|
|
9185
|
+
const H = Q.x - this.canvasWidth / 2, n = Q.y - this.canvasHeight / 2, N = ((r = E.settings) == null ? void 0 : r.factor) || 25;
|
|
9186
|
+
if (Q.x -= H / 1e3 * N * A * 5, Q.y -= n / 1e3 * N * A * 5, Q.style) {
|
|
9187
|
+
const hA = 1 - Math.min(1, h / 400);
|
|
9188
|
+
Q.style.exposure = (Q.style.exposure || 1) + hA * 0.5 * A;
|
|
9182
9189
|
}
|
|
9183
|
-
} else if (E.type ===
|
|
9184
|
-
const H = ((u = E.settings) == null ? void 0 : u.radius) || 80,
|
|
9190
|
+
} else if (E.type === P.Sticky) {
|
|
9191
|
+
const H = ((u = E.settings) == null ? void 0 : u.radius) || 80, n = ((BA = E.settings) == null ? void 0 : BA.strength) || 1;
|
|
9185
9192
|
if (h < H) {
|
|
9186
|
-
const
|
|
9187
|
-
Q.x -= o *
|
|
9193
|
+
const N = Math.pow(1 - h / H, 2);
|
|
9194
|
+
Q.x -= o * N * n * A * 10, Q.y -= s * N * n * A * 10, Q.scale_x *= 1 - N * 0.1 * n * A, Q.scale_y *= 1 - N * 0.1 * n * A;
|
|
9188
9195
|
}
|
|
9189
|
-
} else if (E.type ===
|
|
9190
|
-
const H = ((
|
|
9196
|
+
} else if (E.type === P.Dilation) {
|
|
9197
|
+
const H = ((AA = E.settings) == null ? void 0 : AA.size) || 120, n = ((d = E.settings) == null ? void 0 : d.strength) || 1;
|
|
9191
9198
|
if (h < H) {
|
|
9192
|
-
const
|
|
9193
|
-
Q.scale_x *= 1 +
|
|
9199
|
+
const N = 1 - h / H;
|
|
9200
|
+
Q.scale_x *= 1 + N * 0.5 * n * A, Q.scale_y *= 1 + N * 0.5 * n * A;
|
|
9194
9201
|
}
|
|
9195
|
-
} else if (E.type ===
|
|
9196
|
-
const H = ((_ = E.settings) == null ? void 0 : _.factor) || 0.05,
|
|
9197
|
-
Q.y +=
|
|
9198
|
-
} else if (E.type ===
|
|
9199
|
-
const H = (((
|
|
9200
|
-
Q.x += Math.sin(
|
|
9201
|
-
} else if (E.type ===
|
|
9202
|
-
const H = (((DA = E.settings) == null ? void 0 : DA.speed) || 1) * 5e-3,
|
|
9203
|
-
Q.scale_x *= 1 +
|
|
9204
|
-
} else if (E.type ===
|
|
9205
|
-
const H = ((
|
|
9206
|
-
if (h < H ||
|
|
9207
|
-
const
|
|
9208
|
-
this.applyBehaviorSensor(Q, mA.PositionX,
|
|
9202
|
+
} else if (E.type === P.Parallax) {
|
|
9203
|
+
const H = ((_ = E.settings) == null ? void 0 : _.factor) || 0.05, n = this.canvasHeight / 2, N = (this._lastPointerPos.y - n) * H;
|
|
9204
|
+
Q.y += N * A * 10;
|
|
9205
|
+
} else if (E.type === P.Noise || E.type === P.Float) {
|
|
9206
|
+
const H = (((IA = E.settings) == null ? void 0 : IA.frequency) || ((O = E.settings) == null ? void 0 : O.speed) || 1) * 2e-3, n = (((p = E.settings) == null ? void 0 : p.amplitude) || ((Y = E.settings) == null ? void 0 : Y.range) || 50) * (((Z = E.settings) == null ? void 0 : Z.strength) || 1), N = Date.now();
|
|
9207
|
+
Q.x += Math.sin(N * H) * n * A, Q.y += Math.cos(N * H * 0.8) * n * A, Q.rotation += Math.sin(N * H * 0.5) * 5 * A;
|
|
9208
|
+
} else if (E.type === P.Pulse) {
|
|
9209
|
+
const H = (((DA = E.settings) == null ? void 0 : DA.speed) || 1) * 5e-3, n = (((j = E.settings) == null ? void 0 : j.scale) || 1.2) - 1, N = Math.sin(Date.now() * H), hA = ((l = E.settings) == null ? void 0 : l.strength) || 1;
|
|
9210
|
+
Q.scale_x *= 1 + N * n * hA * A, Q.scale_y *= 1 + N * n * hA * A, Q.style && (Q.style.exposure = (Q.style.exposure || 1) + Math.max(0, N) * 0.1 * hA * A);
|
|
9211
|
+
} else if (E.type === P.Draggable) {
|
|
9212
|
+
const H = ((v = E.settings) == null ? void 0 : v.radius) || 150, n = this.draggingBehaviors.has(g.id);
|
|
9213
|
+
if (h < H || n) {
|
|
9214
|
+
const N = ((gA = E.settings) == null ? void 0 : gA.strength) || 1, hA = n ? 1 : Math.max(0, 1 - h / H);
|
|
9215
|
+
this.applyBehaviorSensor(Q, mA.PositionX, hA * N, A, E.settings), this.applyBehaviorSensor(Q, mA.PositionY, hA * N, A, E.settings);
|
|
9209
9216
|
}
|
|
9210
|
-
} else if (E.type ===
|
|
9211
|
-
const H = ((wA = E.settings) == null ? void 0 : wA.axis) || "vertical",
|
|
9212
|
-
(H === "vertical" || H === "both") && (Q.y += this.scrollOffset.y *
|
|
9213
|
-
} else if (E.type ===
|
|
9214
|
-
const H = ((
|
|
9215
|
-
Q.rotation +=
|
|
9216
|
-
} else if (E.type ===
|
|
9217
|
-
const H = (((
|
|
9218
|
-
Q.style && (Q.style.exposure = (Q.style.exposure || 1) +
|
|
9219
|
-
} else if (E.type ===
|
|
9220
|
-
const H = ((
|
|
9221
|
-
Q.rotation = this.lerp(Q.rotation,
|
|
9222
|
-
} else if (E.type ===
|
|
9223
|
-
const H = ((z = E.settings) == null ? void 0 : z.strength) || 1,
|
|
9224
|
-
Q.x += (Math.random() - 0.5) *
|
|
9225
|
-
} else if (E.type ===
|
|
9226
|
-
const H = (
|
|
9217
|
+
} else if (E.type === P.Scroll) {
|
|
9218
|
+
const H = ((wA = E.settings) == null ? void 0 : wA.axis) || "vertical", n = ((GA = E.settings) == null ? void 0 : GA.factor) || 0.5, N = ((NA = E.settings) == null ? void 0 : NA.strength) || 1;
|
|
9219
|
+
(H === "vertical" || H === "both") && (Q.y += this.scrollOffset.y * n * N * A), (H === "horizontal" || H === "both") && (Q.x += this.scrollOffset.x * n * N * A);
|
|
9220
|
+
} else if (E.type === P.LookAt) {
|
|
9221
|
+
const H = ((MA = E.settings) == null ? void 0 : MA.factor) || 1, n = ((W = E.settings) == null ? void 0 : W.strength) || 1, N = Math.atan2(-s, -o) * (180 / Math.PI), hA = Q.rotation, YA = (N - hA + 180) % 360 - 180;
|
|
9222
|
+
Q.rotation += YA * H * n * A * 10;
|
|
9223
|
+
} else if (E.type === P.Glint || E.type === P.Scan) {
|
|
9224
|
+
const H = (((CA = E.settings) == null ? void 0 : CA.speed) || 1) * 4e-3, n = ((f = E.settings) == null ? void 0 : f.strength) || 1, N = (Math.sin(Date.now() * H) + 1) / 2;
|
|
9225
|
+
Q.style && (Q.style.exposure = (Q.style.exposure || 1) + N * n * A * 5), Q.x += (N - 0.5) * 20 * n * A;
|
|
9226
|
+
} else if (E.type === P.Ratchet) {
|
|
9227
|
+
const H = ((U = E.settings) == null ? void 0 : U.steps) || 12, n = (((X = E.settings) == null ? void 0 : X.speed) || 1) * 30, N = Math.floor(Q.rotation / (360 / H)) * (360 / H);
|
|
9228
|
+
Q.rotation = this.lerp(Q.rotation, N + n * A, 0.1);
|
|
9229
|
+
} else if (E.type === P.Jitter && h < 300) {
|
|
9230
|
+
const H = ((z = E.settings) == null ? void 0 : z.strength) || 1, n = (((cA = E.settings) == null ? void 0 : cA.intensity) || 5) * H;
|
|
9231
|
+
Q.x += (Math.random() - 0.5) * n * A * 60, Q.y += (Math.random() - 0.5) * n * A * 60, Q.rotation += (Math.random() - 0.5) * n * A * 120;
|
|
9232
|
+
} else if (E.type === P.Follower) {
|
|
9233
|
+
const H = (FA = E.settings) == null ? void 0 : FA.targetId;
|
|
9227
9234
|
if (H) {
|
|
9228
|
-
const
|
|
9229
|
-
if (
|
|
9230
|
-
const
|
|
9231
|
-
Q.x +=
|
|
9235
|
+
const n = this.objectStates.get(H);
|
|
9236
|
+
if (n) {
|
|
9237
|
+
const N = ((yA = E.settings) == null ? void 0 : yA.stiffness) || 0.1, hA = n.x - Q.x, YA = n.y - Q.y;
|
|
9238
|
+
Q.x += hA * N * A * 60, Q.y += YA * N * A * 60;
|
|
9232
9239
|
}
|
|
9233
9240
|
}
|
|
9234
|
-
} else E.type ===
|
|
9241
|
+
} else E.type === P.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));
|
|
9235
9242
|
});
|
|
9236
9243
|
});
|
|
9237
9244
|
}
|
|
@@ -9379,7 +9386,7 @@ const wi = ({ artboard: B, config: A }) => {
|
|
|
9379
9386
|
onLog: y,
|
|
9380
9387
|
currentTime: F
|
|
9381
9388
|
}, M) => {
|
|
9382
|
-
const e = lI(null), R = lI(new Di()),
|
|
9389
|
+
const e = lI(null), R = lI(new Di()), x = lI(), b = lI(0), L = lI(null), [V, q] = BQ(B || null);
|
|
9383
9390
|
_Q(M, () => e.current), PA(() => {
|
|
9384
9391
|
console.log("[ExodeUI] Layout Effect - Component Updated/Mounted"), R.current.setLayout(Q, E);
|
|
9385
9392
|
}, [Q, E]), PA(() => {
|
|
@@ -9398,46 +9405,46 @@ const wi = ({ artboard: B, config: A }) => {
|
|
|
9398
9405
|
S && R.current.setInputBlurCallback(S);
|
|
9399
9406
|
}, [S]), PA(() => {
|
|
9400
9407
|
(async () => {
|
|
9401
|
-
const
|
|
9402
|
-
let
|
|
9403
|
-
if (
|
|
9408
|
+
const BA = R.current;
|
|
9409
|
+
let AA = B;
|
|
9410
|
+
if (!AA && A)
|
|
9404
9411
|
try {
|
|
9405
|
-
|
|
9412
|
+
AA = await (await fetch(A)).json();
|
|
9406
9413
|
} catch (d) {
|
|
9407
9414
|
console.error("Failed to load ExodeUI animation:", d);
|
|
9408
9415
|
return;
|
|
9409
9416
|
}
|
|
9410
|
-
if (
|
|
9411
|
-
const d =
|
|
9412
|
-
|
|
9417
|
+
if (AA) {
|
|
9418
|
+
const d = AA.id || AA.name || "default";
|
|
9419
|
+
L.current !== d && (BA.load(AA), L.current = d, q(AA), b.current = 0), o && o(BA);
|
|
9413
9420
|
}
|
|
9414
9421
|
})();
|
|
9415
9422
|
}, [B, A]), PA(() => {
|
|
9416
9423
|
F !== void 0 && R.current.seek(F);
|
|
9417
9424
|
}, [F]), PA(() => {
|
|
9418
|
-
const u = R.current,
|
|
9419
|
-
if (!
|
|
9420
|
-
const
|
|
9421
|
-
if (
|
|
9422
|
-
|
|
9423
|
-
const d = (
|
|
9424
|
-
b.current || (b.current =
|
|
9425
|
-
const
|
|
9426
|
-
b.current =
|
|
9427
|
-
const p = window.devicePixelRatio || 1, Y =
|
|
9428
|
-
(
|
|
9425
|
+
const u = R.current, BA = e.current;
|
|
9426
|
+
if (!BA) return;
|
|
9427
|
+
const AA = BA.getContext("2d");
|
|
9428
|
+
if (!AA) return;
|
|
9429
|
+
AA.imageSmoothingEnabled = !0, AA.imageSmoothingQuality = "high", y && u.setOnLogCallback(y);
|
|
9430
|
+
const d = (IA) => {
|
|
9431
|
+
b.current || (b.current = IA);
|
|
9432
|
+
const O = (IA - b.current) / 1e3;
|
|
9433
|
+
b.current = IA, g && u.advance(O);
|
|
9434
|
+
const p = window.devicePixelRatio || 1, Y = BA.getBoundingClientRect(), Z = Math.floor(Y.width * p), DA = Math.floor(Y.height * p);
|
|
9435
|
+
(BA.width !== Z || BA.height !== DA) && (BA.width = Z, BA.height = DA), u.render(AA, Z, DA), x.current = requestAnimationFrame(d);
|
|
9429
9436
|
};
|
|
9430
|
-
|
|
9437
|
+
x.current = requestAnimationFrame(d);
|
|
9431
9438
|
const _ = () => {
|
|
9432
9439
|
u.handleScroll(window.scrollX, window.scrollY);
|
|
9433
9440
|
};
|
|
9434
9441
|
return window.addEventListener("scroll", _, { passive: !0 }), () => {
|
|
9435
|
-
|
|
9442
|
+
x.current && cancelAnimationFrame(x.current), window.removeEventListener("scroll", _);
|
|
9436
9443
|
};
|
|
9437
9444
|
}, [g]);
|
|
9438
|
-
const
|
|
9439
|
-
const
|
|
9440
|
-
R.current.handlePointerInput(
|
|
9445
|
+
const r = (u, BA) => {
|
|
9446
|
+
const AA = u.currentTarget.getBoundingClientRect(), d = u.clientX - AA.left, _ = u.clientY - AA.top, IA = AA.width, O = AA.height;
|
|
9447
|
+
R.current.handlePointerInput(BA, d, _, IA, O);
|
|
9441
9448
|
};
|
|
9442
9449
|
return /* @__PURE__ */ QQ("div", { style: { position: "relative", width: "100%", height: "100%", ...C }, className: I, children: [
|
|
9443
9450
|
/* @__PURE__ */ DI(
|
|
@@ -9447,13 +9454,13 @@ const wi = ({ artboard: B, config: A }) => {
|
|
|
9447
9454
|
style: { width: "100%", height: "100%", outline: "none" },
|
|
9448
9455
|
tabIndex: 0,
|
|
9449
9456
|
onPointerDown: (u) => {
|
|
9450
|
-
var
|
|
9451
|
-
|
|
9457
|
+
var BA;
|
|
9458
|
+
r(u, "down"), (BA = e.current) == null || BA.focus();
|
|
9452
9459
|
},
|
|
9453
|
-
onPointerUp: (u) =>
|
|
9454
|
-
onPointerMove: (u) =>
|
|
9455
|
-
onPointerLeave: (u) =>
|
|
9456
|
-
onClick: (u) =>
|
|
9460
|
+
onPointerUp: (u) => r(u, "up"),
|
|
9461
|
+
onPointerMove: (u) => r(u, "move"),
|
|
9462
|
+
onPointerLeave: (u) => r(u, "blur"),
|
|
9463
|
+
onClick: (u) => r(u, "click"),
|
|
9457
9464
|
onKeyDown: (u) => {
|
|
9458
9465
|
u.key === "Backspace" || u.key === "Enter" || u.key, R.current.handleKeyDown(u.nativeEvent);
|
|
9459
9466
|
}
|
|
@@ -9498,12 +9505,12 @@ function Si() {
|
|
|
9498
9505
|
updateObjectOptions: D
|
|
9499
9506
|
};
|
|
9500
9507
|
}
|
|
9501
|
-
const si = "6.0.
|
|
9508
|
+
const si = "6.0.35", hi = {
|
|
9502
9509
|
version: si
|
|
9503
9510
|
}, yi = hi.version;
|
|
9504
9511
|
export {
|
|
9505
9512
|
mA as BehaviorSensor,
|
|
9506
|
-
|
|
9513
|
+
P as BehaviorType,
|
|
9507
9514
|
$Q as ConditionOp,
|
|
9508
9515
|
wi as ExodeSEO,
|
|
9509
9516
|
Ki as ExodeUICanvas,
|