exodeui 2.6.23 → 2.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/index.mjs +426 -423
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,16 +5,16 @@ import { jsx as yC } from "react/jsx-runtime";
|
|
|
5
5
|
import { forwardRef as FC, useRef as DI, useImperativeHandle as MC, useEffect as jA, useState as JC, useCallback as HA } from "react";
|
|
6
6
|
var UC = /* @__PURE__ */ ((i) => (i.Equal = "Equal", i.NotEqual = "NotEqual", i.GreaterThan = "GreaterThan", i.LessThan = "LessThan", i.GreaterEqual = "GreaterEqual", i.LessEqual = "LessEqual", i.IsTrue = "IsTrue", i.IsFalse = "IsFalse", i))(UC || {}), uA = /* @__PURE__ */ ((i) => (i.AND = "AND", i.OR = "OR", i.NOT = "NOT", i.XOR = "XOR", i))(uA || {});
|
|
7
7
|
let E;
|
|
8
|
-
const
|
|
8
|
+
const m = new Array(128).fill(void 0);
|
|
9
9
|
function W(i) {
|
|
10
|
-
return
|
|
10
|
+
return m[i];
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
let $A =
|
|
12
|
+
m.push(void 0, null, !0, !1);
|
|
13
|
+
let $A = m.length;
|
|
14
14
|
function P(i) {
|
|
15
|
-
$A ===
|
|
15
|
+
$A === m.length && m.push(m.length + 1);
|
|
16
16
|
const A = $A;
|
|
17
|
-
return $A =
|
|
17
|
+
return $A = m[A], m[A] = i, A;
|
|
18
18
|
}
|
|
19
19
|
function oI(i, A) {
|
|
20
20
|
try {
|
|
@@ -41,7 +41,7 @@ function GA() {
|
|
|
41
41
|
function wI(i) {
|
|
42
42
|
const A = W(i);
|
|
43
43
|
return function(I) {
|
|
44
|
-
I < 132 || (
|
|
44
|
+
I < 132 || (m[I] = $A, $A = I);
|
|
45
45
|
}(i), A;
|
|
46
46
|
}
|
|
47
47
|
function K(i, A) {
|
|
@@ -50,7 +50,7 @@ function K(i, A) {
|
|
|
50
50
|
let AA = 128;
|
|
51
51
|
function CA(i) {
|
|
52
52
|
if (AA == 1) throw new Error("out of js stack");
|
|
53
|
-
return
|
|
53
|
+
return m[--AA] = i, AA;
|
|
54
54
|
}
|
|
55
55
|
let PA = null;
|
|
56
56
|
function RC(i, A) {
|
|
@@ -67,16 +67,16 @@ let _A = null;
|
|
|
67
67
|
function Og() {
|
|
68
68
|
return _A !== null && _A.byteLength !== 0 || (_A = new Uint32Array(E.memory.buffer)), _A;
|
|
69
69
|
}
|
|
70
|
-
let
|
|
70
|
+
let MA = 0;
|
|
71
71
|
function tI(i, A) {
|
|
72
72
|
const I = A(4 * i.length, 4) >>> 0;
|
|
73
|
-
return Og().set(i, I / 4),
|
|
73
|
+
return Og().set(i, I / 4), MA = i.length, I;
|
|
74
74
|
}
|
|
75
75
|
function pA(i, A) {
|
|
76
76
|
const I = A(4 * i.length, 4) >>> 0;
|
|
77
|
-
return Zg().set(i, I / 4),
|
|
77
|
+
return Zg().set(i, I / 4), MA = i.length, I;
|
|
78
78
|
}
|
|
79
|
-
const NI = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", AngX: 2, 2: "AngX" }), dA = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Generic: 5, 5: "Generic" }),
|
|
79
|
+
const NI = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", AngX: 2, 2: "AngX" }), dA = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Generic: 5, 5: "Generic" }), kA = Object.freeze({ Ball: 0, 0: "Ball", Cuboid: 1, 1: "Cuboid", Capsule: 2, 2: "Capsule", Segment: 3, 3: "Segment", Polyline: 4, 4: "Polyline", Triangle: 5, 5: "Triangle", TriMesh: 6, 6: "TriMesh", HeightField: 7, 7: "HeightField", Compound: 8, 8: "Compound", ConvexPolygon: 9, 9: "ConvexPolygon", RoundCuboid: 10, 10: "RoundCuboid", RoundTriangle: 11, 11: "RoundTriangle", RoundConvexPolygon: 12, 12: "RoundConvexPolygon", HalfSpace: 13, 13: "HalfSpace", Voxels: 14, 14: "Voxels" }), YI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
80
80
|
}, unregister: () => {
|
|
81
81
|
} } : new FinalizationRegistry((i) => E.__wbg_rawbroadphase_free(i >>> 0, 1));
|
|
82
82
|
class fA {
|
|
@@ -99,85 +99,85 @@ class fA {
|
|
|
99
99
|
}
|
|
100
100
|
castRay(A, I, C, g, Q, B, D, w, o, h, G, s) {
|
|
101
101
|
try {
|
|
102
|
-
K(A, oA), K(I,
|
|
102
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), K(Q, k);
|
|
103
103
|
const a = E.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B, D, w, L(o) ? 4294967297 : o >>> 0, !L(h), L(h) ? 0 : h, !L(G), L(G) ? 0 : G, CA(s));
|
|
104
104
|
return a === 0 ? void 0 : _I.__wrap(a);
|
|
105
105
|
} finally {
|
|
106
|
-
|
|
106
|
+
m[AA++] = void 0;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
castRayAndGetNormal(A, I, C, g, Q, B, D, w, o, h, G, s) {
|
|
110
110
|
try {
|
|
111
|
-
K(A, oA), K(I,
|
|
111
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), K(Q, k);
|
|
112
112
|
const a = E.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B, D, w, L(o) ? 4294967297 : o >>> 0, !L(h), L(h) ? 0 : h, !L(G), L(G) ? 0 : G, CA(s));
|
|
113
113
|
return a === 0 ? void 0 : FI.__wrap(a);
|
|
114
114
|
} finally {
|
|
115
|
-
|
|
115
|
+
m[AA++] = void 0;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
intersectionsWithRay(A, I, C, g, Q, B, D, w, o, h, G, s, a) {
|
|
119
119
|
try {
|
|
120
|
-
K(A, oA), K(I,
|
|
120
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), K(Q, k), E.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B, D, CA(w), o, L(h) ? 4294967297 : h >>> 0, !L(G), L(G) ? 0 : G, !L(s), L(s) ? 0 : s, CA(a));
|
|
121
121
|
} finally {
|
|
122
|
-
|
|
122
|
+
m[AA++] = void 0, m[AA++] = void 0;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
intersectionWithShape(A, I, C, g, Q, B, D, w, o, h, G) {
|
|
126
126
|
try {
|
|
127
127
|
const M = E.__wbindgen_add_to_stack_pointer(-16);
|
|
128
|
-
K(A, oA), K(I,
|
|
128
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), K(Q, x), K(B, f), E.rawbroadphase_intersectionWithShape(M, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, D, L(w) ? 4294967297 : w >>> 0, !L(o), L(o) ? 0 : o, !L(h), L(h) ? 0 : h, CA(G));
|
|
129
129
|
var s = GA().getInt32(M + 0, !0), a = GA().getFloat64(M + 8, !0);
|
|
130
130
|
return s === 0 ? void 0 : a;
|
|
131
131
|
} finally {
|
|
132
|
-
E.__wbindgen_add_to_stack_pointer(16),
|
|
132
|
+
E.__wbindgen_add_to_stack_pointer(16), m[AA++] = void 0;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
projectPoint(A, I, C, g, Q, B, D, w, o, h) {
|
|
136
136
|
try {
|
|
137
|
-
K(A, oA), K(I,
|
|
137
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k);
|
|
138
138
|
const G = E.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, B, L(D) ? 4294967297 : D >>> 0, !L(w), L(w) ? 0 : w, !L(o), L(o) ? 0 : o, CA(h));
|
|
139
139
|
return G === 0 ? void 0 : hI.__wrap(G);
|
|
140
140
|
} finally {
|
|
141
|
-
|
|
141
|
+
m[AA++] = void 0;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
projectPointAndGetFeature(A, I, C, g, Q, B, D, w, o) {
|
|
145
145
|
try {
|
|
146
|
-
K(A, oA), K(I,
|
|
146
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k);
|
|
147
147
|
const h = E.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, L(B) ? 4294967297 : B >>> 0, !L(D), L(D) ? 0 : D, !L(w), L(w) ? 0 : w, CA(o));
|
|
148
148
|
return h === 0 ? void 0 : hI.__wrap(h);
|
|
149
149
|
} finally {
|
|
150
|
-
|
|
150
|
+
m[AA++] = void 0;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
intersectionsWithPoint(A, I, C, g, Q, B, D, w, o, h) {
|
|
154
154
|
try {
|
|
155
|
-
K(A, oA), K(I,
|
|
155
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), E.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, CA(Q), B, L(D) ? 4294967297 : D >>> 0, !L(w), L(w) ? 0 : w, !L(o), L(o) ? 0 : o, CA(h));
|
|
156
156
|
} finally {
|
|
157
|
-
|
|
157
|
+
m[AA++] = void 0, m[AA++] = void 0;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
castShape(A, I, C, g, Q, B, D, w, o, h, G, s, a, M, y) {
|
|
161
161
|
try {
|
|
162
|
-
K(A, oA), K(I,
|
|
162
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), K(Q, x), K(B, k), K(D, f);
|
|
163
163
|
const J = E.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, D.__wbg_ptr, w, o, h, G, L(s) ? 4294967297 : s >>> 0, !L(a), L(a) ? 0 : a, !L(M), L(M) ? 0 : M, CA(y));
|
|
164
164
|
return J === 0 ? void 0 : kI.__wrap(J);
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
m[AA++] = void 0;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
intersectionsWithShape(A, I, C, g, Q, B, D, w, o, h, G, s) {
|
|
170
170
|
try {
|
|
171
|
-
K(A, oA), K(I,
|
|
171
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), K(Q, x), K(B, f), E.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, CA(D), w, L(o) ? 4294967297 : o >>> 0, !L(h), L(h) ? 0 : h, !L(G), L(G) ? 0 : G, CA(s));
|
|
172
172
|
} finally {
|
|
173
|
-
|
|
173
|
+
m[AA++] = void 0, m[AA++] = void 0;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
collidersWithAabbIntersectingAabb(A, I, C, g, Q, B) {
|
|
177
177
|
try {
|
|
178
|
-
K(A, oA), K(I,
|
|
178
|
+
K(A, oA), K(I, gA), K(C, EA), K(g, k), K(Q, k), E.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, CA(B));
|
|
179
179
|
} finally {
|
|
180
|
-
|
|
180
|
+
m[AA++] = void 0;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -268,7 +268,7 @@ class EA {
|
|
|
268
268
|
}
|
|
269
269
|
coRotation(A) {
|
|
270
270
|
const I = E.rawcolliderset_coRotation(this.__wbg_ptr, A);
|
|
271
|
-
return
|
|
271
|
+
return x.__wrap(I);
|
|
272
272
|
}
|
|
273
273
|
coTranslationWrtParent(A) {
|
|
274
274
|
const I = E.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr, A);
|
|
@@ -276,7 +276,7 @@ class EA {
|
|
|
276
276
|
}
|
|
277
277
|
coRotationWrtParent(A) {
|
|
278
278
|
const I = E.rawcolliderset_coRotationWrtParent(this.__wbg_ptr, A);
|
|
279
|
-
return I === 0 ? void 0 :
|
|
279
|
+
return I === 0 ? void 0 : x.__wrap(I);
|
|
280
280
|
}
|
|
281
281
|
coSetTranslation(A, I, C) {
|
|
282
282
|
E.rawcolliderset_coSetTranslation(this.__wbg_ptr, A, I, C);
|
|
@@ -454,7 +454,7 @@ class EA {
|
|
|
454
454
|
return K(I, k), E.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
|
|
455
455
|
}
|
|
456
456
|
coCastShape(A, I, C, g, Q, B, D, w, o) {
|
|
457
|
-
K(I, k), K(C,
|
|
457
|
+
K(I, k), K(C, f), K(g, k), K(Q, x), K(B, k);
|
|
458
458
|
const h = E.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, D, w, o);
|
|
459
459
|
return h === 0 ? void 0 : JI.__wrap(h);
|
|
460
460
|
}
|
|
@@ -464,10 +464,10 @@ class EA {
|
|
|
464
464
|
return w === 0 ? void 0 : kI.__wrap(w);
|
|
465
465
|
}
|
|
466
466
|
coIntersectsShape(A, I, C, g) {
|
|
467
|
-
return K(I,
|
|
467
|
+
return K(I, f), K(C, k), K(g, x), E.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr) !== 0;
|
|
468
468
|
}
|
|
469
469
|
coContactShape(A, I, C, g, Q) {
|
|
470
|
-
K(I,
|
|
470
|
+
K(I, f), K(C, k), K(g, x);
|
|
471
471
|
const B = E.rawcolliderset_coContactShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q);
|
|
472
472
|
return B === 0 ? void 0 : AI.__wrap(B);
|
|
473
473
|
}
|
|
@@ -528,7 +528,7 @@ class EA {
|
|
|
528
528
|
E.rawcolliderset_coSetActiveCollisionTypes(this.__wbg_ptr, A, I);
|
|
529
529
|
}
|
|
530
530
|
coSetShape(A, I) {
|
|
531
|
-
K(I,
|
|
531
|
+
K(I, f), E.rawcolliderset_coSetShape(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
532
532
|
}
|
|
533
533
|
coSetContactForceEventThreshold(A, I) {
|
|
534
534
|
E.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr, A, I);
|
|
@@ -552,18 +552,18 @@ class EA {
|
|
|
552
552
|
contains(A) {
|
|
553
553
|
return E.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
|
|
554
554
|
}
|
|
555
|
-
createCollider(A, I, C, g, Q, B, D, w, o, h, G, s, a, M, y, J, S, F, U, R, c, r,
|
|
555
|
+
createCollider(A, I, C, g, Q, B, D, w, o, h, G, s, a, M, y, J, S, F, U, R, c, r, q, n) {
|
|
556
556
|
try {
|
|
557
|
-
const
|
|
558
|
-
K(I,
|
|
559
|
-
var
|
|
560
|
-
return
|
|
557
|
+
const v = E.__wbindgen_add_to_stack_pointer(-16);
|
|
558
|
+
K(I, f), K(C, k), K(g, x), K(D, k), K(n, gA), E.rawcolliderset_createCollider(v, this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, B, D.__wbg_ptr, w, o, h, G, s, a, M, y, J, S, F, U, R, c, r, q, n.__wbg_ptr);
|
|
559
|
+
var O = GA().getInt32(v + 0, !0), l = GA().getFloat64(v + 8, !0);
|
|
560
|
+
return O === 0 ? void 0 : l;
|
|
561
561
|
} finally {
|
|
562
562
|
E.__wbindgen_add_to_stack_pointer(16);
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
remove(A, I, C, g) {
|
|
566
|
-
K(I, qA), K(C,
|
|
566
|
+
K(I, qA), K(C, gA), E.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
567
567
|
}
|
|
568
568
|
isHandleValid(A) {
|
|
569
569
|
return E.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
|
|
@@ -572,7 +572,7 @@ class EA {
|
|
|
572
572
|
try {
|
|
573
573
|
E.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, CA(A));
|
|
574
574
|
} finally {
|
|
575
|
-
|
|
575
|
+
m[AA++] = void 0;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
}
|
|
@@ -791,9 +791,9 @@ class cC {
|
|
|
791
791
|
}
|
|
792
792
|
render(A, I, C, g, Q, B, D) {
|
|
793
793
|
try {
|
|
794
|
-
K(A,
|
|
794
|
+
K(A, gA), K(I, EA), K(C, rA), K(g, lA), K(Q, oA), E.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B, CA(D));
|
|
795
795
|
} finally {
|
|
796
|
-
|
|
796
|
+
m[AA++] = void 0;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
}
|
|
@@ -836,7 +836,7 @@ class zI {
|
|
|
836
836
|
}
|
|
837
837
|
takeBodies() {
|
|
838
838
|
const A = E.rawdeserializedworld_takeBodies(this.__wbg_ptr);
|
|
839
|
-
return A === 0 ? void 0 :
|
|
839
|
+
return A === 0 ? void 0 : gA.__wrap(A);
|
|
840
840
|
}
|
|
841
841
|
takeColliders() {
|
|
842
842
|
const A = E.rawdeserializedworld_takeColliders(this.__wbg_ptr);
|
|
@@ -871,14 +871,14 @@ class jg {
|
|
|
871
871
|
try {
|
|
872
872
|
E.raweventqueue_drainCollisionEvents(this.__wbg_ptr, CA(A));
|
|
873
873
|
} finally {
|
|
874
|
-
|
|
874
|
+
m[AA++] = void 0;
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
drainContactForceEvents(A) {
|
|
878
878
|
try {
|
|
879
879
|
E.raweventqueue_drainContactForceEvents(this.__wbg_ptr, CA(A));
|
|
880
880
|
} finally {
|
|
881
|
-
|
|
881
|
+
m[AA++] = void 0;
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
clear() {
|
|
@@ -888,10 +888,10 @@ class jg {
|
|
|
888
888
|
const Rg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
889
889
|
}, unregister: () => {
|
|
890
890
|
} } : new FinalizationRegistry((i) => E.__wbg_rawgenericjoint_free(i >>> 0, 1));
|
|
891
|
-
class
|
|
891
|
+
class yA {
|
|
892
892
|
static __wrap(A) {
|
|
893
893
|
A >>>= 0;
|
|
894
|
-
const I = Object.create(
|
|
894
|
+
const I = Object.create(yA.prototype);
|
|
895
895
|
return I.__wbg_ptr = A, Rg.register(I, I.__wbg_ptr, I), I;
|
|
896
896
|
}
|
|
897
897
|
__destroy_into_raw() {
|
|
@@ -905,27 +905,27 @@ class kA {
|
|
|
905
905
|
static spring(A, I, C, g, Q) {
|
|
906
906
|
K(g, k), K(Q, k);
|
|
907
907
|
const B = E.rawgenericjoint_spring(A, I, C, g.__wbg_ptr, Q.__wbg_ptr);
|
|
908
|
-
return
|
|
908
|
+
return yA.__wrap(B);
|
|
909
909
|
}
|
|
910
910
|
static rope(A, I, C) {
|
|
911
911
|
K(I, k), K(C, k);
|
|
912
912
|
const g = E.rawgenericjoint_rope(A, I.__wbg_ptr, C.__wbg_ptr);
|
|
913
|
-
return
|
|
913
|
+
return yA.__wrap(g);
|
|
914
914
|
}
|
|
915
915
|
static prismatic(A, I, C, g, Q, B) {
|
|
916
916
|
K(A, k), K(I, k), K(C, k);
|
|
917
917
|
const D = E.rawgenericjoint_prismatic(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g, Q, B);
|
|
918
|
-
return D === 0 ? void 0 :
|
|
918
|
+
return D === 0 ? void 0 : yA.__wrap(D);
|
|
919
919
|
}
|
|
920
920
|
static fixed(A, I, C, g) {
|
|
921
|
-
K(A, k), K(I,
|
|
921
|
+
K(A, k), K(I, x), K(C, k), K(g, x);
|
|
922
922
|
const Q = E.rawgenericjoint_fixed(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr);
|
|
923
|
-
return
|
|
923
|
+
return yA.__wrap(Q);
|
|
924
924
|
}
|
|
925
925
|
static revolute(A, I) {
|
|
926
926
|
K(A, k), K(I, k);
|
|
927
927
|
const C = E.rawgenericjoint_revolute(A.__wbg_ptr, I.__wbg_ptr);
|
|
928
|
-
return C === 0 ? void 0 :
|
|
928
|
+
return C === 0 ? void 0 : yA.__wrap(C);
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
const LI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -956,11 +956,11 @@ class rA {
|
|
|
956
956
|
}
|
|
957
957
|
jointFrameX1(A) {
|
|
958
958
|
const I = E.rawimpulsejointset_jointFrameX1(this.__wbg_ptr, A);
|
|
959
|
-
return
|
|
959
|
+
return x.__wrap(I);
|
|
960
960
|
}
|
|
961
961
|
jointFrameX2(A) {
|
|
962
962
|
const I = E.rawimpulsejointset_jointFrameX2(this.__wbg_ptr, A);
|
|
963
|
-
return
|
|
963
|
+
return x.__wrap(I);
|
|
964
964
|
}
|
|
965
965
|
jointAnchor1(A) {
|
|
966
966
|
const I = E.rawimpulsejointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -1011,7 +1011,7 @@ class rA {
|
|
|
1011
1011
|
return this.__wbg_ptr = A >>> 0, LI.register(this, this.__wbg_ptr, this), this;
|
|
1012
1012
|
}
|
|
1013
1013
|
createJoint(A, I, C, g) {
|
|
1014
|
-
return K(A,
|
|
1014
|
+
return K(A, yA), E.rawimpulsejointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, C, g);
|
|
1015
1015
|
}
|
|
1016
1016
|
remove(A, I) {
|
|
1017
1017
|
E.rawimpulsejointset_remove(this.__wbg_ptr, A, I);
|
|
@@ -1026,14 +1026,14 @@ class rA {
|
|
|
1026
1026
|
try {
|
|
1027
1027
|
E.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, CA(A));
|
|
1028
1028
|
} finally {
|
|
1029
|
-
|
|
1029
|
+
m[AA++] = void 0;
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
1032
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1033
1033
|
try {
|
|
1034
1034
|
E.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, CA(I));
|
|
1035
1035
|
} finally {
|
|
1036
|
-
|
|
1036
|
+
m[AA++] = void 0;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
@@ -1138,7 +1138,7 @@ class qA {
|
|
|
1138
1138
|
try {
|
|
1139
1139
|
E.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, CA(A));
|
|
1140
1140
|
} finally {
|
|
1141
|
-
|
|
1141
|
+
m[AA++] = void 0;
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
@@ -1231,9 +1231,9 @@ class tC {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
computeColliderMovement(A, I, C, g, Q, B, D, w, o, h, G, s) {
|
|
1233
1233
|
try {
|
|
1234
|
-
K(I, fA), K(C, oA), K(g,
|
|
1234
|
+
K(I, fA), K(C, oA), K(g, gA), K(Q, EA), K(D, k), E.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B, D.__wbg_ptr, w, L(o) ? 4294967297 : Math.fround(o), h, L(G) ? 4294967297 : G >>> 0, CA(s));
|
|
1235
1235
|
} finally {
|
|
1236
|
-
|
|
1236
|
+
m[AA++] = void 0;
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
1239
|
computedMovement() {
|
|
@@ -1272,11 +1272,11 @@ class lA {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
jointFrameX1(A) {
|
|
1274
1274
|
const I = E.rawmultibodyjointset_jointFrameX1(this.__wbg_ptr, A);
|
|
1275
|
-
return
|
|
1275
|
+
return x.__wrap(I);
|
|
1276
1276
|
}
|
|
1277
1277
|
jointFrameX2(A) {
|
|
1278
1278
|
const I = E.rawmultibodyjointset_jointFrameX2(this.__wbg_ptr, A);
|
|
1279
|
-
return
|
|
1279
|
+
return x.__wrap(I);
|
|
1280
1280
|
}
|
|
1281
1281
|
jointAnchor1(A) {
|
|
1282
1282
|
const I = E.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -1306,7 +1306,7 @@ class lA {
|
|
|
1306
1306
|
return this.__wbg_ptr = A >>> 0, lI.register(this, this.__wbg_ptr, this), this;
|
|
1307
1307
|
}
|
|
1308
1308
|
createJoint(A, I, C, g) {
|
|
1309
|
-
return K(A,
|
|
1309
|
+
return K(A, yA), E.rawmultibodyjointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, C, g);
|
|
1310
1310
|
}
|
|
1311
1311
|
remove(A, I) {
|
|
1312
1312
|
E.rawmultibodyjointset_remove(this.__wbg_ptr, A, I);
|
|
@@ -1318,14 +1318,14 @@ class lA {
|
|
|
1318
1318
|
try {
|
|
1319
1319
|
E.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, CA(A));
|
|
1320
1320
|
} finally {
|
|
1321
|
-
|
|
1321
|
+
m[AA++] = void 0;
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
1324
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1325
1325
|
try {
|
|
1326
1326
|
E.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, CA(I));
|
|
1327
1327
|
} finally {
|
|
1328
|
-
|
|
1328
|
+
m[AA++] = void 0;
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
@@ -1435,10 +1435,10 @@ class YC {
|
|
|
1435
1435
|
return E.rawphysicspipeline_timing_user_changes(this.__wbg_ptr);
|
|
1436
1436
|
}
|
|
1437
1437
|
step(A, I, C, g, Q, B, D, w, o, h) {
|
|
1438
|
-
K(A, k), K(I, OA), K(C, qA), K(g, fA), K(Q, oA), K(B,
|
|
1438
|
+
K(A, k), K(I, OA), K(C, qA), K(g, fA), K(Q, oA), K(B, gA), K(D, EA), K(w, rA), K(o, lA), K(h, bI), E.rawphysicspipeline_step(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, D.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, h.__wbg_ptr);
|
|
1439
1439
|
}
|
|
1440
1440
|
stepWithEvents(A, I, C, g, Q, B, D, w, o, h, G, s, a, M) {
|
|
1441
|
-
K(A, k), K(I, OA), K(C, qA), K(g, fA), K(Q, oA), K(B,
|
|
1441
|
+
K(A, k), K(I, OA), K(C, qA), K(g, fA), K(Q, oA), K(B, gA), K(D, EA), K(w, rA), K(o, lA), K(h, bI), K(G, jg), E.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, D.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, h.__wbg_ptr, G.__wbg_ptr, P(s), P(a), P(M));
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
const Yg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1473,18 +1473,18 @@ class eC {
|
|
|
1473
1473
|
E.rawpidcontroller_reset_integrals(this.__wbg_ptr);
|
|
1474
1474
|
}
|
|
1475
1475
|
apply_linear_correction(A, I, C, g, Q) {
|
|
1476
|
-
K(I,
|
|
1476
|
+
K(I, gA), K(g, k), K(Q, k), E.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q.__wbg_ptr);
|
|
1477
1477
|
}
|
|
1478
1478
|
apply_angular_correction(A, I, C, g, Q) {
|
|
1479
|
-
K(I,
|
|
1479
|
+
K(I, gA), E.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
|
|
1480
1480
|
}
|
|
1481
1481
|
linear_correction(A, I, C, g, Q) {
|
|
1482
|
-
K(I,
|
|
1482
|
+
K(I, gA), K(g, k), K(Q, k);
|
|
1483
1483
|
const B = E.rawpidcontroller_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q.__wbg_ptr);
|
|
1484
1484
|
return k.__wrap(B);
|
|
1485
1485
|
}
|
|
1486
1486
|
angular_correction(A, I, C, g, Q) {
|
|
1487
|
-
return K(I,
|
|
1487
|
+
return K(I, gA), E.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
const eg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1641,10 +1641,10 @@ class MI {
|
|
|
1641
1641
|
const HI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1642
1642
|
}, unregister: () => {
|
|
1643
1643
|
} } : new FinalizationRegistry((i) => E.__wbg_rawrigidbodyset_free(i >>> 0, 1));
|
|
1644
|
-
class
|
|
1644
|
+
class gA {
|
|
1645
1645
|
static __wrap(A) {
|
|
1646
1646
|
A >>>= 0;
|
|
1647
|
-
const I = Object.create(
|
|
1647
|
+
const I = Object.create(gA.prototype);
|
|
1648
1648
|
return I.__wbg_ptr = A, HI.register(I, I.__wbg_ptr, I), I;
|
|
1649
1649
|
}
|
|
1650
1650
|
__destroy_into_raw() {
|
|
@@ -1661,7 +1661,7 @@ class IA {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
rbRotation(A) {
|
|
1663
1663
|
const I = E.rawrigidbodyset_rbRotation(this.__wbg_ptr, A);
|
|
1664
|
-
return
|
|
1664
|
+
return x.__wrap(I);
|
|
1665
1665
|
}
|
|
1666
1666
|
rbSleep(A) {
|
|
1667
1667
|
E.rawrigidbodyset_rbSleep(this.__wbg_ptr, A);
|
|
@@ -1678,7 +1678,7 @@ class IA {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
rbNextRotation(A) {
|
|
1680
1680
|
const I = E.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, A);
|
|
1681
|
-
return
|
|
1681
|
+
return x.__wrap(I);
|
|
1682
1682
|
}
|
|
1683
1683
|
rbSetTranslation(A, I, C, g) {
|
|
1684
1684
|
E.rawrigidbodyset_rbSetTranslation(this.__wbg_ptr, A, I, C, g);
|
|
@@ -1872,7 +1872,7 @@ class IA {
|
|
|
1872
1872
|
return this.__wbg_ptr = A >>> 0, HI.register(this, this.__wbg_ptr, this), this;
|
|
1873
1873
|
}
|
|
1874
1874
|
createRigidBody(A, I, C, g, Q, B, D, w, o, h, G, s, a, M, y, J, S, F, U, R, c, r) {
|
|
1875
|
-
return K(I, k), K(C,
|
|
1875
|
+
return K(I, k), K(C, x), K(D, k), K(w, k), E.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g, Q, B, D.__wbg_ptr, w.__wbg_ptr, o, h, G, s, a, M, y, J, S, F, U, R, c, r);
|
|
1876
1876
|
}
|
|
1877
1877
|
remove(A, I, C, g, Q) {
|
|
1878
1878
|
K(I, qA), K(C, EA), K(g, rA), K(Q, lA), E.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr);
|
|
@@ -1887,7 +1887,7 @@ class IA {
|
|
|
1887
1887
|
try {
|
|
1888
1888
|
E.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, CA(A));
|
|
1889
1889
|
} finally {
|
|
1890
|
-
|
|
1890
|
+
m[AA++] = void 0;
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
1893
|
propagateModifiedBodyPositionsToColliders(A) {
|
|
@@ -1897,10 +1897,10 @@ class IA {
|
|
|
1897
1897
|
const ng = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1898
1898
|
}, unregister: () => {
|
|
1899
1899
|
} } : new FinalizationRegistry((i) => E.__wbg_rawrotation_free(i >>> 0, 1));
|
|
1900
|
-
class
|
|
1900
|
+
class x {
|
|
1901
1901
|
static __wrap(A) {
|
|
1902
1902
|
A >>>= 0;
|
|
1903
|
-
const I = Object.create(
|
|
1903
|
+
const I = Object.create(x.prototype);
|
|
1904
1904
|
return I.__wbg_ptr = A, ng.register(I, I.__wbg_ptr, I), I;
|
|
1905
1905
|
}
|
|
1906
1906
|
__destroy_into_raw() {
|
|
@@ -1913,11 +1913,11 @@ class m {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
static identity() {
|
|
1915
1915
|
const A = E.rawrotation_identity();
|
|
1916
|
-
return
|
|
1916
|
+
return x.__wrap(A);
|
|
1917
1917
|
}
|
|
1918
1918
|
static fromAngle(A) {
|
|
1919
1919
|
const I = E.rawrotation_fromAngle(A);
|
|
1920
|
-
return
|
|
1920
|
+
return x.__wrap(I);
|
|
1921
1921
|
}
|
|
1922
1922
|
get im() {
|
|
1923
1923
|
return E.rawkinematiccharactercontroller_offset(this.__wbg_ptr);
|
|
@@ -1946,7 +1946,7 @@ class LC {
|
|
|
1946
1946
|
return this.__wbg_ptr = A >>> 0, Hg.register(this, this.__wbg_ptr, this), this;
|
|
1947
1947
|
}
|
|
1948
1948
|
serializeAll(A, I, C, g, Q, B, D, w, o) {
|
|
1949
|
-
return K(A, k), K(I, OA), K(C, qA), K(g, fA), K(Q, oA), K(B,
|
|
1949
|
+
return K(A, k), K(I, OA), K(C, qA), K(g, fA), K(Q, oA), K(B, gA), K(D, EA), K(w, rA), K(o, lA), wI(E.rawserializationpipeline_serializeAll(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, D.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr));
|
|
1950
1950
|
}
|
|
1951
1951
|
deserializeAll(A) {
|
|
1952
1952
|
const I = E.rawserializationpipeline_deserializeAll(this.__wbg_ptr, P(A));
|
|
@@ -1956,10 +1956,10 @@ class LC {
|
|
|
1956
1956
|
const pg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1957
1957
|
}, unregister: () => {
|
|
1958
1958
|
} } : new FinalizationRegistry((i) => E.__wbg_rawshape_free(i >>> 0, 1));
|
|
1959
|
-
class
|
|
1959
|
+
class f {
|
|
1960
1960
|
static __wrap(A) {
|
|
1961
1961
|
A >>>= 0;
|
|
1962
|
-
const I = Object.create(
|
|
1962
|
+
const I = Object.create(f.prototype);
|
|
1963
1963
|
return I.__wbg_ptr = A, pg.register(I, I.__wbg_ptr, I), I;
|
|
1964
1964
|
}
|
|
1965
1965
|
__destroy_into_raw() {
|
|
@@ -1972,109 +1972,109 @@ class d {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
static cuboid(A, I) {
|
|
1974
1974
|
const C = E.rawshape_cuboid(A, I);
|
|
1975
|
-
return
|
|
1975
|
+
return f.__wrap(C);
|
|
1976
1976
|
}
|
|
1977
1977
|
static roundCuboid(A, I, C) {
|
|
1978
1978
|
const g = E.rawshape_roundCuboid(A, I, C);
|
|
1979
|
-
return
|
|
1979
|
+
return f.__wrap(g);
|
|
1980
1980
|
}
|
|
1981
1981
|
static ball(A) {
|
|
1982
1982
|
const I = E.rawshape_ball(A);
|
|
1983
|
-
return
|
|
1983
|
+
return f.__wrap(I);
|
|
1984
1984
|
}
|
|
1985
1985
|
static halfspace(A) {
|
|
1986
1986
|
K(A, k);
|
|
1987
1987
|
const I = E.rawshape_halfspace(A.__wbg_ptr);
|
|
1988
|
-
return
|
|
1988
|
+
return f.__wrap(I);
|
|
1989
1989
|
}
|
|
1990
1990
|
static capsule(A, I) {
|
|
1991
1991
|
const C = E.rawshape_capsule(A, I);
|
|
1992
|
-
return
|
|
1992
|
+
return f.__wrap(C);
|
|
1993
1993
|
}
|
|
1994
1994
|
static voxels(A, I) {
|
|
1995
1995
|
K(A, k);
|
|
1996
|
-
const C = tI(I, E.__wbindgen_export_2), g =
|
|
1997
|
-
return
|
|
1996
|
+
const C = tI(I, E.__wbindgen_export_2), g = MA, Q = E.rawshape_voxels(A.__wbg_ptr, C, g);
|
|
1997
|
+
return f.__wrap(Q);
|
|
1998
1998
|
}
|
|
1999
1999
|
static voxelsFromPoints(A, I) {
|
|
2000
2000
|
K(A, k);
|
|
2001
|
-
const C = pA(I, E.__wbindgen_export_2), g =
|
|
2002
|
-
return
|
|
2001
|
+
const C = pA(I, E.__wbindgen_export_2), g = MA, Q = E.rawshape_voxelsFromPoints(A.__wbg_ptr, C, g);
|
|
2002
|
+
return f.__wrap(Q);
|
|
2003
2003
|
}
|
|
2004
2004
|
static polyline(A, I) {
|
|
2005
|
-
const C = pA(A, E.__wbindgen_export_2), g =
|
|
2006
|
-
return
|
|
2005
|
+
const C = pA(A, E.__wbindgen_export_2), g = MA, Q = tI(I, E.__wbindgen_export_2), B = MA, D = E.rawshape_polyline(C, g, Q, B);
|
|
2006
|
+
return f.__wrap(D);
|
|
2007
2007
|
}
|
|
2008
2008
|
static trimesh(A, I, C) {
|
|
2009
|
-
const g = pA(A, E.__wbindgen_export_2), Q =
|
|
2010
|
-
return w === 0 ? void 0 :
|
|
2009
|
+
const g = pA(A, E.__wbindgen_export_2), Q = MA, B = tI(I, E.__wbindgen_export_2), D = MA, w = E.rawshape_trimesh(g, Q, B, D, C);
|
|
2010
|
+
return w === 0 ? void 0 : f.__wrap(w);
|
|
2011
2011
|
}
|
|
2012
2012
|
static heightfield(A, I) {
|
|
2013
|
-
const C = pA(A, E.__wbindgen_export_2), g =
|
|
2013
|
+
const C = pA(A, E.__wbindgen_export_2), g = MA;
|
|
2014
2014
|
K(I, k);
|
|
2015
2015
|
const Q = E.rawshape_heightfield(C, g, I.__wbg_ptr);
|
|
2016
|
-
return
|
|
2016
|
+
return f.__wrap(Q);
|
|
2017
2017
|
}
|
|
2018
2018
|
static segment(A, I) {
|
|
2019
2019
|
K(A, k), K(I, k);
|
|
2020
2020
|
const C = E.rawshape_segment(A.__wbg_ptr, I.__wbg_ptr);
|
|
2021
|
-
return
|
|
2021
|
+
return f.__wrap(C);
|
|
2022
2022
|
}
|
|
2023
2023
|
static triangle(A, I, C) {
|
|
2024
2024
|
K(A, k), K(I, k), K(C, k);
|
|
2025
2025
|
const g = E.rawshape_triangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr);
|
|
2026
|
-
return
|
|
2026
|
+
return f.__wrap(g);
|
|
2027
2027
|
}
|
|
2028
2028
|
static roundTriangle(A, I, C, g) {
|
|
2029
2029
|
K(A, k), K(I, k), K(C, k);
|
|
2030
2030
|
const Q = E.rawshape_roundTriangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
2031
|
-
return
|
|
2031
|
+
return f.__wrap(Q);
|
|
2032
2032
|
}
|
|
2033
2033
|
static convexHull(A) {
|
|
2034
|
-
const I = pA(A, E.__wbindgen_export_2), C =
|
|
2035
|
-
return g === 0 ? void 0 :
|
|
2034
|
+
const I = pA(A, E.__wbindgen_export_2), C = MA, g = E.rawshape_convexHull(I, C);
|
|
2035
|
+
return g === 0 ? void 0 : f.__wrap(g);
|
|
2036
2036
|
}
|
|
2037
2037
|
static roundConvexHull(A, I) {
|
|
2038
|
-
const C = pA(A, E.__wbindgen_export_2), g =
|
|
2039
|
-
return Q === 0 ? void 0 :
|
|
2038
|
+
const C = pA(A, E.__wbindgen_export_2), g = MA, Q = E.rawshape_roundConvexHull(C, g, I);
|
|
2039
|
+
return Q === 0 ? void 0 : f.__wrap(Q);
|
|
2040
2040
|
}
|
|
2041
2041
|
static convexPolyline(A) {
|
|
2042
|
-
const I = pA(A, E.__wbindgen_export_2), C =
|
|
2043
|
-
return g === 0 ? void 0 :
|
|
2042
|
+
const I = pA(A, E.__wbindgen_export_2), C = MA, g = E.rawshape_convexPolyline(I, C);
|
|
2043
|
+
return g === 0 ? void 0 : f.__wrap(g);
|
|
2044
2044
|
}
|
|
2045
2045
|
static roundConvexPolyline(A, I) {
|
|
2046
|
-
const C = pA(A, E.__wbindgen_export_2), g =
|
|
2047
|
-
return Q === 0 ? void 0 :
|
|
2046
|
+
const C = pA(A, E.__wbindgen_export_2), g = MA, Q = E.rawshape_roundConvexPolyline(C, g, I);
|
|
2047
|
+
return Q === 0 ? void 0 : f.__wrap(Q);
|
|
2048
2048
|
}
|
|
2049
2049
|
castShape(A, I, C, g, Q, B, D, w, o, h) {
|
|
2050
|
-
K(A, k), K(I,
|
|
2050
|
+
K(A, k), K(I, x), K(C, k), K(g, f), K(Q, k), K(B, x), K(D, k);
|
|
2051
2051
|
const G = E.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B.__wbg_ptr, D.__wbg_ptr, w, o, h);
|
|
2052
2052
|
return G === 0 ? void 0 : JI.__wrap(G);
|
|
2053
2053
|
}
|
|
2054
2054
|
intersectsShape(A, I, C, g, Q) {
|
|
2055
|
-
return K(A, k), K(I,
|
|
2055
|
+
return K(A, k), K(I, x), K(C, f), K(g, k), K(Q, x), E.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr) !== 0;
|
|
2056
2056
|
}
|
|
2057
2057
|
contactShape(A, I, C, g, Q, B) {
|
|
2058
|
-
K(A, k), K(I,
|
|
2058
|
+
K(A, k), K(I, x), K(C, f), K(g, k), K(Q, x);
|
|
2059
2059
|
const D = E.rawshape_contactShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, B);
|
|
2060
2060
|
return D === 0 ? void 0 : AI.__wrap(D);
|
|
2061
2061
|
}
|
|
2062
2062
|
containsPoint(A, I, C) {
|
|
2063
|
-
return K(A, k), K(I,
|
|
2063
|
+
return K(A, k), K(I, x), K(C, k), E.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr) !== 0;
|
|
2064
2064
|
}
|
|
2065
2065
|
projectPoint(A, I, C, g) {
|
|
2066
|
-
K(A, k), K(I,
|
|
2066
|
+
K(A, k), K(I, x), K(C, k);
|
|
2067
2067
|
const Q = E.rawshape_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
|
|
2068
2068
|
return yI.__wrap(Q);
|
|
2069
2069
|
}
|
|
2070
2070
|
intersectsRay(A, I, C, g, Q) {
|
|
2071
|
-
return K(A, k), K(I,
|
|
2071
|
+
return K(A, k), K(I, x), K(C, k), K(g, k), E.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q) !== 0;
|
|
2072
2072
|
}
|
|
2073
2073
|
castRay(A, I, C, g, Q, B) {
|
|
2074
|
-
return K(A, k), K(I,
|
|
2074
|
+
return K(A, k), K(I, x), K(C, k), K(g, k), E.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, B);
|
|
2075
2075
|
}
|
|
2076
2076
|
castRayAndGetNormal(A, I, C, g, Q, B) {
|
|
2077
|
-
K(A, k), K(I,
|
|
2077
|
+
K(A, k), K(I, x), K(C, k), K(g, k);
|
|
2078
2078
|
const D = E.rawshape_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, B);
|
|
2079
2079
|
return D === 0 ? void 0 : MI.__wrap(D);
|
|
2080
2080
|
}
|
|
@@ -2339,10 +2339,10 @@ class z {
|
|
|
2339
2339
|
return A.free(), I;
|
|
2340
2340
|
}
|
|
2341
2341
|
static intoRaw(A) {
|
|
2342
|
-
return
|
|
2342
|
+
return x.fromAngle(A);
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
|
-
var cA,
|
|
2345
|
+
var cA, JA, TI, ZI, II, xA, KA, OI, WI, GI, sI, jI, mI, KI, ZA;
|
|
2346
2346
|
(function(i) {
|
|
2347
2347
|
i[i.Dynamic = 0] = "Dynamic", i[i.Fixed = 1] = "Fixed", i[i.KinematicPositionBased = 2] = "KinematicPositionBased", i[i.KinematicVelocityBased = 3] = "KinematicVelocityBased";
|
|
2348
2348
|
})(cA || (cA = {}));
|
|
@@ -2696,7 +2696,7 @@ class UI {
|
|
|
2696
2696
|
}
|
|
2697
2697
|
class Xg {
|
|
2698
2698
|
constructor(A) {
|
|
2699
|
-
this.raw = A || new
|
|
2699
|
+
this.raw = A || new gA(), this.map = new UI(), A && A.forEachRigidBodyHandle((I) => {
|
|
2700
2700
|
this.map.set(I, new xI(A, null, I));
|
|
2701
2701
|
});
|
|
2702
2702
|
}
|
|
@@ -2801,7 +2801,7 @@ class vg {
|
|
|
2801
2801
|
}
|
|
2802
2802
|
(function(i) {
|
|
2803
2803
|
i[i.Revolute = 0] = "Revolute", i[i.Fixed = 1] = "Fixed", i[i.Prismatic = 2] = "Prismatic", i[i.Rope = 3] = "Rope", i[i.Spring = 4] = "Spring";
|
|
2804
|
-
})(
|
|
2804
|
+
})(JA || (JA = {})), function(i) {
|
|
2805
2805
|
i[i.AccelerationBased = 0] = "AccelerationBased", i[i.ForceBased = 1] = "ForceBased";
|
|
2806
2806
|
}(TI || (TI = {})), function(i) {
|
|
2807
2807
|
i[i.LinX = 1] = "LinX", i[i.LinY = 2] = "LinY", i[i.LinZ = 4] = "LinZ", i[i.AngX = 8] = "AngX", i[i.AngY = 16] = "AngY", i[i.AngZ = 32] = "AngZ";
|
|
@@ -2909,42 +2909,42 @@ class TA {
|
|
|
2909
2909
|
}
|
|
2910
2910
|
static fixed(A, I, C, g) {
|
|
2911
2911
|
let Q = new TA();
|
|
2912
|
-
return Q.anchor1 = A, Q.anchor2 = C, Q.frame1 = I, Q.frame2 = g, Q.jointType =
|
|
2912
|
+
return Q.anchor1 = A, Q.anchor2 = C, Q.frame1 = I, Q.frame2 = g, Q.jointType = JA.Fixed, Q;
|
|
2913
2913
|
}
|
|
2914
2914
|
static spring(A, I, C, g, Q) {
|
|
2915
2915
|
let B = new TA();
|
|
2916
|
-
return B.anchor1 = g, B.anchor2 = Q, B.length = A, B.stiffness = I, B.damping = C, B.jointType =
|
|
2916
|
+
return B.anchor1 = g, B.anchor2 = Q, B.length = A, B.stiffness = I, B.damping = C, B.jointType = JA.Spring, B;
|
|
2917
2917
|
}
|
|
2918
2918
|
static rope(A, I, C) {
|
|
2919
2919
|
let g = new TA();
|
|
2920
|
-
return g.anchor1 = I, g.anchor2 = C, g.length = A, g.jointType =
|
|
2920
|
+
return g.anchor1 = I, g.anchor2 = C, g.length = A, g.jointType = JA.Rope, g;
|
|
2921
2921
|
}
|
|
2922
2922
|
static revolute(A, I) {
|
|
2923
2923
|
let C = new TA();
|
|
2924
|
-
return C.anchor1 = A, C.anchor2 = I, C.jointType =
|
|
2924
|
+
return C.anchor1 = A, C.anchor2 = I, C.jointType = JA.Revolute, C;
|
|
2925
2925
|
}
|
|
2926
2926
|
static prismatic(A, I, C) {
|
|
2927
2927
|
let g = new TA();
|
|
2928
|
-
return g.anchor1 = A, g.anchor2 = I, g.axis = C, g.jointType =
|
|
2928
|
+
return g.anchor1 = A, g.anchor2 = I, g.axis = C, g.jointType = JA.Prismatic, g;
|
|
2929
2929
|
}
|
|
2930
2930
|
intoRaw() {
|
|
2931
2931
|
let A, I, C = N.intoRaw(this.anchor1), g = N.intoRaw(this.anchor2), Q = !1, B = 0, D = 0;
|
|
2932
2932
|
switch (this.jointType) {
|
|
2933
|
-
case
|
|
2933
|
+
case JA.Fixed:
|
|
2934
2934
|
let w = z.intoRaw(this.frame1), o = z.intoRaw(this.frame2);
|
|
2935
|
-
I =
|
|
2935
|
+
I = yA.fixed(C, w, g, o), w.free(), o.free();
|
|
2936
2936
|
break;
|
|
2937
|
-
case
|
|
2938
|
-
I =
|
|
2937
|
+
case JA.Spring:
|
|
2938
|
+
I = yA.spring(this.length, this.stiffness, this.damping, C, g);
|
|
2939
2939
|
break;
|
|
2940
|
-
case
|
|
2941
|
-
I =
|
|
2940
|
+
case JA.Rope:
|
|
2941
|
+
I = yA.rope(this.length, C, g);
|
|
2942
2942
|
break;
|
|
2943
|
-
case
|
|
2944
|
-
A = N.intoRaw(this.axis), this.limitsEnabled && (Q = !0, B = this.limits[0], D = this.limits[1]), I =
|
|
2943
|
+
case JA.Prismatic:
|
|
2944
|
+
A = N.intoRaw(this.axis), this.limitsEnabled && (Q = !0, B = this.limits[0], D = this.limits[1]), I = yA.prismatic(C, g, A, Q, B, D), A.free();
|
|
2945
2945
|
break;
|
|
2946
|
-
case
|
|
2947
|
-
I =
|
|
2946
|
+
case JA.Revolute:
|
|
2947
|
+
I = yA.revolute(C, g);
|
|
2948
2948
|
}
|
|
2949
2949
|
return C.free(), g.free(), I;
|
|
2950
2950
|
}
|
|
@@ -3329,37 +3329,37 @@ class aA {
|
|
|
3329
3329
|
const C = A.coShapeType(I);
|
|
3330
3330
|
let g, Q, B, D, w, o, h;
|
|
3331
3331
|
switch (C) {
|
|
3332
|
-
case
|
|
3332
|
+
case kA.Ball:
|
|
3333
3333
|
return new Ig(A.coRadius(I));
|
|
3334
|
-
case
|
|
3334
|
+
case kA.Cuboid:
|
|
3335
3335
|
return g = A.coHalfExtents(I), new Cg(g.x, g.y);
|
|
3336
|
-
case
|
|
3336
|
+
case kA.RoundCuboid:
|
|
3337
3337
|
return g = A.coHalfExtents(I), Q = A.coRoundRadius(I), new Qg(g.x, g.y, Q);
|
|
3338
|
-
case
|
|
3338
|
+
case kA.Capsule:
|
|
3339
3339
|
return w = A.coHalfHeight(I), o = A.coRadius(I), new Bg(w, o);
|
|
3340
|
-
case
|
|
3340
|
+
case kA.Segment:
|
|
3341
3341
|
return B = A.coVertices(I), new Eg(N.new(B[0], B[1]), N.new(B[2], B[3]));
|
|
3342
|
-
case
|
|
3342
|
+
case kA.Polyline:
|
|
3343
3343
|
return B = A.coVertices(I), D = A.coIndices(I), new og(B, D);
|
|
3344
|
-
case
|
|
3344
|
+
case kA.Triangle:
|
|
3345
3345
|
return B = A.coVertices(I), new ig(N.new(B[0], B[1]), N.new(B[2], B[3]), N.new(B[4], B[5]));
|
|
3346
|
-
case
|
|
3346
|
+
case kA.RoundTriangle:
|
|
3347
3347
|
return B = A.coVertices(I), Q = A.coRoundRadius(I), new Dg(N.new(B[0], B[1]), N.new(B[2], B[3]), N.new(B[4], B[5]), Q);
|
|
3348
|
-
case
|
|
3348
|
+
case kA.HalfSpace:
|
|
3349
3349
|
return h = N.fromRaw(A.coHalfspaceNormal(I)), new gg(h);
|
|
3350
|
-
case
|
|
3350
|
+
case kA.Voxels:
|
|
3351
3351
|
const G = A.coVoxelData(I), s = A.coVoxelSize(I);
|
|
3352
3352
|
return new wg(G, s);
|
|
3353
|
-
case
|
|
3353
|
+
case kA.TriMesh:
|
|
3354
3354
|
B = A.coVertices(I), D = A.coIndices(I);
|
|
3355
3355
|
const a = A.coTriMeshFlags(I);
|
|
3356
3356
|
return new hg(B, D, a);
|
|
3357
|
-
case
|
|
3357
|
+
case kA.HeightField:
|
|
3358
3358
|
const M = A.coHeightfieldScale(I), y = A.coHeightfieldHeights(I);
|
|
3359
3359
|
return new Gg(y, M);
|
|
3360
|
-
case
|
|
3360
|
+
case kA.ConvexPolygon:
|
|
3361
3361
|
return B = A.coVertices(I), new aI(B, !1);
|
|
3362
|
-
case
|
|
3362
|
+
case kA.RoundConvexPolygon:
|
|
3363
3363
|
return B = A.coVertices(I), Q = A.coRoundRadius(I), new SI(B, Q, !1);
|
|
3364
3364
|
default:
|
|
3365
3365
|
throw new Error("unknown shape type: " + C);
|
|
@@ -3408,7 +3408,7 @@ class Ig extends aA {
|
|
|
3408
3408
|
super(), this.type = KA.Ball, this.radius = A;
|
|
3409
3409
|
}
|
|
3410
3410
|
intoRaw() {
|
|
3411
|
-
return
|
|
3411
|
+
return f.ball(this.radius);
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
3414
|
class gg extends aA {
|
|
@@ -3416,7 +3416,7 @@ class gg extends aA {
|
|
|
3416
3416
|
super(), this.type = KA.HalfSpace, this.normal = A;
|
|
3417
3417
|
}
|
|
3418
3418
|
intoRaw() {
|
|
3419
|
-
let A = N.intoRaw(this.normal), I =
|
|
3419
|
+
let A = N.intoRaw(this.normal), I = f.halfspace(A);
|
|
3420
3420
|
return A.free(), I;
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
@@ -3425,7 +3425,7 @@ class Cg extends aA {
|
|
|
3425
3425
|
super(), this.type = KA.Cuboid, this.halfExtents = N.new(A, I);
|
|
3426
3426
|
}
|
|
3427
3427
|
intoRaw() {
|
|
3428
|
-
return
|
|
3428
|
+
return f.cuboid(this.halfExtents.x, this.halfExtents.y);
|
|
3429
3429
|
}
|
|
3430
3430
|
}
|
|
3431
3431
|
class Qg extends aA {
|
|
@@ -3433,7 +3433,7 @@ class Qg extends aA {
|
|
|
3433
3433
|
super(), this.type = KA.RoundCuboid, this.halfExtents = N.new(A, I), this.borderRadius = C;
|
|
3434
3434
|
}
|
|
3435
3435
|
intoRaw() {
|
|
3436
|
-
return
|
|
3436
|
+
return f.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
|
|
3437
3437
|
}
|
|
3438
3438
|
}
|
|
3439
3439
|
class Bg extends aA {
|
|
@@ -3441,7 +3441,7 @@ class Bg extends aA {
|
|
|
3441
3441
|
super(), this.type = KA.Capsule, this.halfHeight = A, this.radius = I;
|
|
3442
3442
|
}
|
|
3443
3443
|
intoRaw() {
|
|
3444
|
-
return
|
|
3444
|
+
return f.capsule(this.halfHeight, this.radius);
|
|
3445
3445
|
}
|
|
3446
3446
|
}
|
|
3447
3447
|
class Eg extends aA {
|
|
@@ -3449,7 +3449,7 @@ class Eg extends aA {
|
|
|
3449
3449
|
super(), this.type = KA.Segment, this.a = A, this.b = I;
|
|
3450
3450
|
}
|
|
3451
3451
|
intoRaw() {
|
|
3452
|
-
let A = N.intoRaw(this.a), I = N.intoRaw(this.b), C =
|
|
3452
|
+
let A = N.intoRaw(this.a), I = N.intoRaw(this.b), C = f.segment(A, I);
|
|
3453
3453
|
return A.free(), I.free(), C;
|
|
3454
3454
|
}
|
|
3455
3455
|
}
|
|
@@ -3458,7 +3458,7 @@ class ig extends aA {
|
|
|
3458
3458
|
super(), this.type = KA.Triangle, this.a = A, this.b = I, this.c = C;
|
|
3459
3459
|
}
|
|
3460
3460
|
intoRaw() {
|
|
3461
|
-
let A = N.intoRaw(this.a), I = N.intoRaw(this.b), C = N.intoRaw(this.c), g =
|
|
3461
|
+
let A = N.intoRaw(this.a), I = N.intoRaw(this.b), C = N.intoRaw(this.c), g = f.triangle(A, I, C);
|
|
3462
3462
|
return A.free(), I.free(), C.free(), g;
|
|
3463
3463
|
}
|
|
3464
3464
|
}
|
|
@@ -3467,7 +3467,7 @@ class Dg extends aA {
|
|
|
3467
3467
|
super(), this.type = KA.RoundTriangle, this.a = A, this.b = I, this.c = C, this.borderRadius = g;
|
|
3468
3468
|
}
|
|
3469
3469
|
intoRaw() {
|
|
3470
|
-
let A = N.intoRaw(this.a), I = N.intoRaw(this.b), C = N.intoRaw(this.c), g =
|
|
3470
|
+
let A = N.intoRaw(this.a), I = N.intoRaw(this.b), C = N.intoRaw(this.c), g = f.roundTriangle(A, I, C, this.borderRadius);
|
|
3471
3471
|
return A.free(), I.free(), C.free(), g;
|
|
3472
3472
|
}
|
|
3473
3473
|
}
|
|
@@ -3476,7 +3476,7 @@ class og extends aA {
|
|
|
3476
3476
|
super(), this.type = KA.Polyline, this.vertices = A, this.indices = I ?? new Uint32Array(0);
|
|
3477
3477
|
}
|
|
3478
3478
|
intoRaw() {
|
|
3479
|
-
return
|
|
3479
|
+
return f.polyline(this.vertices, this.indices);
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
3482
|
class wg extends aA {
|
|
@@ -3485,7 +3485,7 @@ class wg extends aA {
|
|
|
3485
3485
|
}
|
|
3486
3486
|
intoRaw() {
|
|
3487
3487
|
let A, I = N.intoRaw(this.voxelSize);
|
|
3488
|
-
return A = this.data instanceof Int32Array ?
|
|
3488
|
+
return A = this.data instanceof Int32Array ? f.voxels(I, this.data) : f.voxelsFromPoints(I, this.data), I.free(), A;
|
|
3489
3489
|
}
|
|
3490
3490
|
}
|
|
3491
3491
|
class hg extends aA {
|
|
@@ -3493,7 +3493,7 @@ class hg extends aA {
|
|
|
3493
3493
|
super(), this.type = KA.TriMesh, this.vertices = A, this.indices = I, this.flags = C;
|
|
3494
3494
|
}
|
|
3495
3495
|
intoRaw() {
|
|
3496
|
-
return
|
|
3496
|
+
return f.trimesh(this.vertices, this.indices, this.flags);
|
|
3497
3497
|
}
|
|
3498
3498
|
}
|
|
3499
3499
|
class aI extends aA {
|
|
@@ -3501,7 +3501,7 @@ class aI extends aA {
|
|
|
3501
3501
|
super(), this.type = KA.ConvexPolygon, this.vertices = A, this.skipConvexHullComputation = !!I;
|
|
3502
3502
|
}
|
|
3503
3503
|
intoRaw() {
|
|
3504
|
-
return this.skipConvexHullComputation ?
|
|
3504
|
+
return this.skipConvexHullComputation ? f.convexPolyline(this.vertices) : f.convexHull(this.vertices);
|
|
3505
3505
|
}
|
|
3506
3506
|
}
|
|
3507
3507
|
class SI extends aA {
|
|
@@ -3509,7 +3509,7 @@ class SI extends aA {
|
|
|
3509
3509
|
super(), this.type = KA.RoundConvexPolygon, this.vertices = A, this.borderRadius = I, this.skipConvexHullComputation = !!C;
|
|
3510
3510
|
}
|
|
3511
3511
|
intoRaw() {
|
|
3512
|
-
return this.skipConvexHullComputation ?
|
|
3512
|
+
return this.skipConvexHullComputation ? f.roundConvexPolyline(this.vertices, this.borderRadius) : f.roundConvexHull(this.vertices, this.borderRadius);
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
3515
|
class Gg extends aA {
|
|
@@ -3517,7 +3517,7 @@ class Gg extends aA {
|
|
|
3517
3517
|
super(), this.type = KA.HeightField, this.heights = A, this.scale = I;
|
|
3518
3518
|
}
|
|
3519
3519
|
intoRaw() {
|
|
3520
|
-
let A = N.intoRaw(this.scale), I =
|
|
3520
|
+
let A = N.intoRaw(this.scale), I = f.heightfield(this.heights, A);
|
|
3521
3521
|
return A.free(), I;
|
|
3522
3522
|
}
|
|
3523
3523
|
}
|
|
@@ -4423,12 +4423,12 @@ for (var nC = { byteLength: function(i) {
|
|
|
4423
4423
|
var A, I, C = bg(i), g = C[0], Q = C[1], B = new HC(function(o, h, G) {
|
|
4424
4424
|
return 3 * (h + G) / 4 - G;
|
|
4425
4425
|
}(0, g, Q)), D = 0, w = Q > 0 ? g - 4 : g;
|
|
4426
|
-
for (I = 0; I < w; I += 4) A =
|
|
4427
|
-
return Q === 2 && (A =
|
|
4426
|
+
for (I = 0; I < w; I += 4) A = RA[i.charCodeAt(I)] << 18 | RA[i.charCodeAt(I + 1)] << 12 | RA[i.charCodeAt(I + 2)] << 6 | RA[i.charCodeAt(I + 3)], B[D++] = A >> 16 & 255, B[D++] = A >> 8 & 255, B[D++] = 255 & A;
|
|
4427
|
+
return Q === 2 && (A = RA[i.charCodeAt(I)] << 2 | RA[i.charCodeAt(I + 1)] >> 4, B[D++] = 255 & A), Q === 1 && (A = RA[i.charCodeAt(I)] << 10 | RA[i.charCodeAt(I + 1)] << 4 | RA[i.charCodeAt(I + 2)] >> 2, B[D++] = A >> 8 & 255, B[D++] = 255 & A), B;
|
|
4428
4428
|
}, fromByteArray: function(i) {
|
|
4429
4429
|
for (var A, I = i.length, C = I % 3, g = [], Q = 16383, B = 0, D = I - C; B < D; B += Q) g.push(dC(i, B, B + Q > D ? D : B + Q));
|
|
4430
4430
|
return C === 1 ? (A = i[I - 1], g.push(eA[A >> 2] + eA[A << 4 & 63] + "==")) : C === 2 && (A = (i[I - 2] << 8) + i[I - 1], g.push(eA[A >> 10] + eA[A >> 4 & 63] + eA[A << 2 & 63] + "=")), g.join("");
|
|
4431
|
-
} }, eA = [],
|
|
4431
|
+
} }, eA = [], RA = [], HC = typeof Uint8Array < "u" ? Uint8Array : Array, dI = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", mA = 0, pC = dI.length; mA < pC; ++mA) eA[mA] = dI[mA], RA[dI.charCodeAt(mA)] = mA;
|
|
4432
4432
|
function bg(i) {
|
|
4433
4433
|
var A = i.length;
|
|
4434
4434
|
if (A % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -4461,11 +4461,11 @@ function TC(i) {
|
|
|
4461
4461
|
var A;
|
|
4462
4462
|
A = i, E.reserve_memory(A);
|
|
4463
4463
|
}
|
|
4464
|
-
|
|
4465
|
-
var
|
|
4464
|
+
RA[45] = 62, RA[95] = 63;
|
|
4465
|
+
var FA = Object.freeze({ __proto__: null, version: bC, reserveMemory: TC, Vector2: xg, VectorOps: N, RotationOps: z, get RigidBodyType() {
|
|
4466
4466
|
return cA;
|
|
4467
4467
|
}, RigidBody: xI, RigidBodyDesc: YA, RigidBodySet: Xg, IntegrationParameters: vg, get JointType() {
|
|
4468
|
-
return
|
|
4468
|
+
return JA;
|
|
4469
4469
|
}, get MotorModel() {
|
|
4470
4470
|
return TI;
|
|
4471
4471
|
}, get JointAxesMask() {
|
|
@@ -4501,7 +4501,7 @@ class ZC {
|
|
|
4501
4501
|
$(this, "initialized", !1);
|
|
4502
4502
|
}
|
|
4503
4503
|
async init(A) {
|
|
4504
|
-
this.initialized || (await
|
|
4504
|
+
this.initialized || (await FA.init(), this.world = new FA.World(new FA.Vector2(A.x, A.y)), this.initialized = !0);
|
|
4505
4505
|
}
|
|
4506
4506
|
destroy() {
|
|
4507
4507
|
this.bodies.clear(), this.colliders.clear(), this.world && (this.world.free(), this.world = null), this.initialized = !1;
|
|
@@ -4512,32 +4512,32 @@ class ZC {
|
|
|
4512
4512
|
return;
|
|
4513
4513
|
}
|
|
4514
4514
|
this.bodies.has(A.id) && this.removeBody(A.id);
|
|
4515
|
-
const I = A.isStatic ?
|
|
4515
|
+
const I = A.isStatic ? FA.RigidBodyDesc.fixed() : FA.RigidBodyDesc.dynamic();
|
|
4516
4516
|
I.setTranslation(A.x, A.y), A.rotation !== void 0 && I.setRotation(A.rotation);
|
|
4517
4517
|
const C = this.world.createRigidBody(I);
|
|
4518
4518
|
let g;
|
|
4519
4519
|
switch (A.type) {
|
|
4520
4520
|
case "Rectangle":
|
|
4521
|
-
g =
|
|
4521
|
+
g = FA.ColliderDesc.cuboid(
|
|
4522
4522
|
A.width / 2,
|
|
4523
4523
|
A.height / 2
|
|
4524
4524
|
);
|
|
4525
4525
|
break;
|
|
4526
4526
|
case "Ellipse":
|
|
4527
|
-
g =
|
|
4527
|
+
g = FA.ColliderDesc.ball(
|
|
4528
4528
|
Math.max(A.width, A.height) / 2
|
|
4529
4529
|
);
|
|
4530
4530
|
break;
|
|
4531
4531
|
case "Triangle":
|
|
4532
4532
|
case "Star":
|
|
4533
4533
|
case "Polygon":
|
|
4534
|
-
g =
|
|
4534
|
+
g = FA.ColliderDesc.cuboid(
|
|
4535
4535
|
A.width / 2,
|
|
4536
4536
|
A.height / 2
|
|
4537
4537
|
);
|
|
4538
4538
|
break;
|
|
4539
4539
|
default:
|
|
4540
|
-
g =
|
|
4540
|
+
g = FA.ColliderDesc.cuboid(
|
|
4541
4541
|
A.width / 2,
|
|
4542
4542
|
A.height / 2
|
|
4543
4543
|
);
|
|
@@ -4577,7 +4577,7 @@ class ZC {
|
|
|
4577
4577
|
}
|
|
4578
4578
|
setPosition(A, I, C) {
|
|
4579
4579
|
const g = this.bodies.get(A);
|
|
4580
|
-
g && g.setTranslation(new
|
|
4580
|
+
g && g.setTranslation(new FA.Vector2(I, C), !0);
|
|
4581
4581
|
}
|
|
4582
4582
|
setRotation(A, I) {
|
|
4583
4583
|
const C = this.bodies.get(A);
|
|
@@ -4585,15 +4585,15 @@ class ZC {
|
|
|
4585
4585
|
}
|
|
4586
4586
|
setVelocity(A, I, C) {
|
|
4587
4587
|
const g = this.bodies.get(A);
|
|
4588
|
-
g && g.setLinvel(new
|
|
4588
|
+
g && g.setLinvel(new FA.Vector2(I, C), !0);
|
|
4589
4589
|
}
|
|
4590
4590
|
applyForce(A, I, C) {
|
|
4591
4591
|
const g = this.bodies.get(A);
|
|
4592
|
-
g && g.addForce(new
|
|
4592
|
+
g && g.addForce(new FA.Vector2(I, C), !0);
|
|
4593
4593
|
}
|
|
4594
4594
|
applyImpulse(A, I, C) {
|
|
4595
4595
|
const g = this.bodies.get(A);
|
|
4596
|
-
g && g.applyImpulse(new
|
|
4596
|
+
g && g.applyImpulse(new FA.Vector2(I, C), !0);
|
|
4597
4597
|
}
|
|
4598
4598
|
}
|
|
4599
4599
|
class OC {
|
|
@@ -5106,11 +5106,11 @@ class OC {
|
|
|
5106
5106
|
if ((A === "up" || A === "blur") && (this.draggingSliderId = null, this.draggingListViewId = null), this.activeDropdownId && A === "down") {
|
|
5107
5107
|
const o = this.artboard.objects.find((h) => h.id === this.activeDropdownId);
|
|
5108
5108
|
if (o && (o.type === "Dropdown" || o.variant === "dropdown")) {
|
|
5109
|
-
const h = this.objectStates.get(o.id), G = (h == null ? void 0 : h.options) || o.options || {}, s = o.geometry || {}, a = s.width ?? o.width ?? 200, M = s.height ?? o.height ?? 40, y = G.optionsList || [], J = G.itemHeight || 32, S = G.listPadding ?? 4, F = y.length * J + S * 2, U = this.getWorldTransform(o.id), R = a * Math.abs(U.scaleX), c = M * Math.abs(U.scaleY), r = U.y + c / 2 + 4,
|
|
5110
|
-
if (
|
|
5111
|
-
const
|
|
5112
|
-
if (
|
|
5113
|
-
const QA = y[
|
|
5109
|
+
const h = this.objectStates.get(o.id), G = (h == null ? void 0 : h.options) || o.options || {}, s = o.geometry || {}, a = s.width ?? o.width ?? 200, M = s.height ?? o.height ?? 40, y = G.optionsList || [], J = G.itemHeight || 32, S = G.listPadding ?? 4, F = y.length * J + S * 2, U = this.getWorldTransform(o.id), R = a * Math.abs(U.scaleX), c = M * Math.abs(U.scaleY), r = U.y + c / 2 + 4, q = Math.abs(I - U.x) <= R / 2, n = C >= r && C <= r + F * Math.abs(U.scaleY);
|
|
5110
|
+
if (q && n) {
|
|
5111
|
+
const O = Math.abs(U.scaleY), l = C - (r + S * O), v = Math.floor(l / (J * O));
|
|
5112
|
+
if (v >= 0 && v < y.length) {
|
|
5113
|
+
const QA = y[v];
|
|
5114
5114
|
G.selectedOption = QA, G.isOpen = !1, this.activeDropdownId = null, o.inputId && this.setInternalInput(o.inputId, QA), this.onComponentChange && this.onComponentChange({
|
|
5115
5115
|
objectId: o.id,
|
|
5116
5116
|
componentName: o.name,
|
|
@@ -5192,7 +5192,7 @@ class OC {
|
|
|
5192
5192
|
}));
|
|
5193
5193
|
}
|
|
5194
5194
|
}
|
|
5195
|
-
if (A === "click") {
|
|
5195
|
+
if (g.type === "Component" && g.variant === "slider" && A === "down" && (this.draggingSliderId = g.id, this.updateSliderValueFromPointer(g, I, C)), A === "click") {
|
|
5196
5196
|
const s = (w = this.artboard) == null ? void 0 : w.objects.find((a) => a.id === g.id);
|
|
5197
5197
|
(s == null ? void 0 : s.type) === "Component" && s.variant === "inputbox" ? (this.focusedId = g.id, console.log(`[Engine] Focus set to: ${g.id}`)) : this.focusedId = null;
|
|
5198
5198
|
}
|
|
@@ -5283,14 +5283,17 @@ class OC {
|
|
|
5283
5283
|
return Math.abs(a) <= S / 2 && Math.abs(M) <= F / 2;
|
|
5284
5284
|
}
|
|
5285
5285
|
updateSliderValueFromPointer(A, I, C) {
|
|
5286
|
-
var
|
|
5287
|
-
|
|
5288
|
-
|
|
5286
|
+
var q;
|
|
5287
|
+
const g = this.objectStates.get(A.id);
|
|
5288
|
+
if (!g) return;
|
|
5289
|
+
const Q = A.options || {}, B = ((q = A.geometry) == null ? void 0 : q.width) ?? A.width ?? 200, D = this.getWorldTransform(A.id), w = I - D.x, o = C - D.y, h = -D.rotation * (Math.PI / 180), G = Math.cos(h), s = Math.sin(h), a = w * G - o * s, M = Q.thumbWidth ?? 16, y = B - M;
|
|
5289
5290
|
let S = (a + y / 2) / y;
|
|
5290
5291
|
S = Math.max(0, Math.min(1, S));
|
|
5291
5292
|
const F = Q.min ?? 0, U = Q.max ?? 100, R = Q.step || 1;
|
|
5292
5293
|
let c = F + S * (U - F);
|
|
5293
|
-
R > 0 && (c = Math.round(c / R) * R), c = Math.max(F, Math.min(U, c))
|
|
5294
|
+
R > 0 && (c = Math.round(c / R) * R), c = Math.max(F, Math.min(U, c));
|
|
5295
|
+
const r = g.options || {};
|
|
5296
|
+
r.value !== c && (g.options = { ...r, value: c }, A.inputId && this.setInternalInput(A.inputId, c), this.onComponentChange && this.onComponentChange({
|
|
5294
5297
|
objectId: A.id,
|
|
5295
5298
|
componentName: A.name,
|
|
5296
5299
|
variant: "slider",
|
|
@@ -5503,88 +5506,88 @@ class OC {
|
|
|
5503
5506
|
U === "uppercase" ? F = F.toUpperCase() : U === "lowercase" ? F = F.toLowerCase() : U === "capitalize" && (F = F.replace(/\b\w/g, (t) => t.toUpperCase()));
|
|
5504
5507
|
let R = ((J = Q.fontWeight) == null ? void 0 : J.toString()) || "400", c = "normal";
|
|
5505
5508
|
R.toLowerCase().includes("italic") && (c = "italic", R = R.replace(/italic/gi, "").trim() || "400");
|
|
5506
|
-
const r = this.mapFontWeight(R),
|
|
5507
|
-
A.font = `${c} ${r} ${
|
|
5508
|
-
const
|
|
5509
|
-
let
|
|
5510
|
-
|
|
5511
|
-
const
|
|
5512
|
-
A.textAlign =
|
|
5513
|
-
let
|
|
5514
|
-
|
|
5515
|
-
const QA = Q.letterSpacing || 0, SA = Q.paragraphSpacing || 0, wA = (Q.lineHeight || 1.2) *
|
|
5509
|
+
const r = this.mapFontWeight(R), q = Math.max(1, Q.fontSize || 16);
|
|
5510
|
+
A.font = `${c} ${r} ${q}px "${Q.fontFamily || "Inter"}", sans-serif`;
|
|
5511
|
+
const n = Q.textVerticalAlign || "top";
|
|
5512
|
+
let O = -w / 2;
|
|
5513
|
+
n === "middle" || n === "center" ? (A.textBaseline = "middle", O = 0) : n === "bottom" ? (A.textBaseline = "bottom", O = w / 2) : (A.textBaseline = "top", O = -w / 2);
|
|
5514
|
+
const l = Q.textAlign || "left";
|
|
5515
|
+
A.textAlign = l;
|
|
5516
|
+
let v = -D / 2;
|
|
5517
|
+
l === "center" && (v = 0), l === "right" && (v = D / 2);
|
|
5518
|
+
const QA = Q.letterSpacing || 0, SA = Q.paragraphSpacing || 0, wA = (Q.lineHeight || 1.2) * q, u = (Q.width || D || 200) + 15, j = (t) => {
|
|
5516
5519
|
if (QA === 0) return A.measureText(t).width;
|
|
5517
|
-
let
|
|
5518
|
-
for (let
|
|
5519
|
-
|
|
5520
|
-
return
|
|
5521
|
-
},
|
|
5520
|
+
let e = 0;
|
|
5521
|
+
for (let Y = 0; Y < t.length; Y++)
|
|
5522
|
+
e += A.measureText(t[Y]).width + QA;
|
|
5523
|
+
return e - QA;
|
|
5524
|
+
}, H = [], Z = String(F || "").split(`
|
|
5522
5525
|
`);
|
|
5523
|
-
|
|
5524
|
-
const
|
|
5525
|
-
let
|
|
5526
|
-
for (let
|
|
5527
|
-
const
|
|
5528
|
-
|
|
5526
|
+
Z.forEach((t, e) => {
|
|
5527
|
+
const Y = String(t || "").split(" ");
|
|
5528
|
+
let d = "";
|
|
5529
|
+
for (let X = 0; X < Y.length; X++) {
|
|
5530
|
+
const iA = d + Y[X] + " ";
|
|
5531
|
+
j(iA.trim()) > u && X > 0 ? (H.push({ text: d.trim(), isParaEnd: !1 }), d = Y[X] + " ") : d = iA;
|
|
5529
5532
|
}
|
|
5530
|
-
|
|
5533
|
+
H.push({ text: d.trim(), isParaEnd: e < Z.length - 1 });
|
|
5531
5534
|
});
|
|
5532
|
-
let
|
|
5535
|
+
let b = O, p = H.length * wA;
|
|
5533
5536
|
if (SA > 0) {
|
|
5534
|
-
const t =
|
|
5535
|
-
|
|
5537
|
+
const t = H.filter((e, Y) => e.isParaEnd && Y < H.length - 1).length;
|
|
5538
|
+
p += t * SA;
|
|
5536
5539
|
}
|
|
5537
|
-
|
|
5538
|
-
const
|
|
5539
|
-
var
|
|
5540
|
+
n === "middle" || n === "center" ? b -= p / 2 - q / 2 : n === "bottom" && (b -= p - q);
|
|
5541
|
+
const T = (t, e, Y, d, X) => {
|
|
5542
|
+
var iA, _;
|
|
5540
5543
|
if (QA === 0 && (Q.enableSegments !== !0 || !Q.segments || Q.segments.length === 0))
|
|
5541
|
-
|
|
5544
|
+
d ? A.strokeText(t, e, Y) : A.fillText(t, e, Y);
|
|
5542
5545
|
else {
|
|
5543
|
-
const
|
|
5544
|
-
let
|
|
5545
|
-
|
|
5546
|
-
let
|
|
5546
|
+
const V = j(t);
|
|
5547
|
+
let IA = e;
|
|
5548
|
+
l === "center" ? IA -= V / 2 : l === "right" && (IA -= V);
|
|
5549
|
+
let BA = IA;
|
|
5547
5550
|
for (let sA = 0; sA < t.length; sA++) {
|
|
5548
|
-
const
|
|
5551
|
+
const NA = t[sA];
|
|
5549
5552
|
if (Q.enableSegments === !0 && Q.segments && Q.segments.length > 0) {
|
|
5550
|
-
const LA =
|
|
5551
|
-
let
|
|
5553
|
+
const LA = X + sA;
|
|
5554
|
+
let UA = 0;
|
|
5552
5555
|
const DA = Q.segments.find((tA) => {
|
|
5553
5556
|
if (!tA || typeof tA.text != "string") return !1;
|
|
5554
|
-
const iI =
|
|
5555
|
-
return
|
|
5557
|
+
const iI = UA;
|
|
5558
|
+
return UA += tA.text.length, LA >= iI && LA < UA;
|
|
5556
5559
|
});
|
|
5557
5560
|
if (DA) {
|
|
5558
5561
|
if (DA.fill) {
|
|
5559
|
-
const tA = ((
|
|
5560
|
-
|
|
5562
|
+
const tA = ((_ = (iA = g == null ? void 0 : g.style) == null ? void 0 : iA.fill) == null ? void 0 : _.color) || null;
|
|
5563
|
+
d ? A.strokeStyle = DA.fill.color || A.strokeStyle : A.fillStyle = tA || DA.fill.color || A.fillStyle;
|
|
5561
5564
|
}
|
|
5562
5565
|
if (DA.fontSize || DA.fontFamily || DA.fontWeight) {
|
|
5563
|
-
const tA = DA.fontWeight ? this.mapFontWeight(DA.fontWeight.toString()) : r, iI = DA.fontSize ||
|
|
5566
|
+
const tA = DA.fontWeight ? this.mapFontWeight(DA.fontWeight.toString()) : r, iI = DA.fontSize || q, sg = DA.fontFamily || Q.fontFamily || "Inter";
|
|
5564
5567
|
A.font = `${c} ${tA} ${iI}px "${sg}", sans-serif`;
|
|
5565
5568
|
}
|
|
5566
5569
|
}
|
|
5567
5570
|
}
|
|
5568
|
-
|
|
5571
|
+
d ? A.strokeText(NA, BA, Y) : A.fillText(NA, BA, Y), Q.enableSegments === !0 && Q.segments && Q.segments.length > 0 && (A.font = `${c} ${r} ${q}px "${Q.fontFamily || "Inter"}", sans-serif`), BA += A.measureText(NA).width + QA;
|
|
5569
5572
|
}
|
|
5570
5573
|
}
|
|
5571
5574
|
};
|
|
5572
5575
|
if (B.fill) {
|
|
5573
|
-
const t = A.globalAlpha,
|
|
5574
|
-
A.fillStyle =
|
|
5575
|
-
let
|
|
5576
|
-
|
|
5577
|
-
const
|
|
5578
|
-
|
|
5576
|
+
const t = A.globalAlpha, e = this.createCanvasFill(A, B.fill, D, w);
|
|
5577
|
+
A.fillStyle = e || B.fill.color || "#000000", A.globalAlpha = t * (B.fill.opacity ?? 1);
|
|
5578
|
+
let Y = 0, d = b;
|
|
5579
|
+
H.forEach((X) => {
|
|
5580
|
+
const iA = F.indexOf(X.text, Y);
|
|
5581
|
+
iA !== -1 && (T(X.text, v, d, !1, iA), Y = iA + X.text.length, d += wA + (X.isParaEnd ? SA : 0));
|
|
5579
5582
|
}), A.globalAlpha = t;
|
|
5580
5583
|
}
|
|
5581
5584
|
if (B.stroke && B.stroke.width > 0) {
|
|
5582
5585
|
const t = A.globalAlpha;
|
|
5583
5586
|
A.strokeStyle = B.stroke.color, A.lineWidth = B.stroke.width, A.globalAlpha = t * (B.stroke.opacity ?? 1);
|
|
5584
|
-
let
|
|
5585
|
-
|
|
5586
|
-
const
|
|
5587
|
-
|
|
5587
|
+
let e = 0, Y = b;
|
|
5588
|
+
H.forEach((d) => {
|
|
5589
|
+
const X = F.indexOf(d.text, e);
|
|
5590
|
+
X !== -1 && (T(d.text, v, Y, !0, X), e = X + d.text.length, Y += wA + (d.isParaEnd ? SA : 0));
|
|
5588
5591
|
}), A.globalAlpha = t;
|
|
5589
5592
|
}
|
|
5590
5593
|
} else if (Q.type === "Image") {
|
|
@@ -5607,14 +5610,14 @@ class OC {
|
|
|
5607
5610
|
if (!R) {
|
|
5608
5611
|
R = new Image();
|
|
5609
5612
|
let c = S;
|
|
5610
|
-
Q.colors && Q.colors.length > 0 && F.length > 0 && Q.colors.forEach((
|
|
5611
|
-
if (F[
|
|
5612
|
-
const
|
|
5613
|
-
c = c.replace(
|
|
5613
|
+
Q.colors && Q.colors.length > 0 && F.length > 0 && Q.colors.forEach((n, O) => {
|
|
5614
|
+
if (F[O]) {
|
|
5615
|
+
const l = n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), v = new RegExp(l, "gi");
|
|
5616
|
+
c = c.replace(v, F[O]);
|
|
5614
5617
|
}
|
|
5615
5618
|
});
|
|
5616
|
-
const r = new Blob([c], { type: "image/svg+xml" }),
|
|
5617
|
-
R.src =
|
|
5619
|
+
const r = new Blob([c], { type: "image/svg+xml" }), q = URL.createObjectURL(r);
|
|
5620
|
+
R.src = q, this.imageCache.set(U, R);
|
|
5618
5621
|
}
|
|
5619
5622
|
if (R.complete && R.naturalWidth > 0) {
|
|
5620
5623
|
const c = Q.corner_radius ?? Q.cornerRadius ?? 0;
|
|
@@ -5644,8 +5647,8 @@ class OC {
|
|
|
5644
5647
|
const S = g.width !== void 0 ? g.width : I.width || D, F = g.height !== void 0 ? g.height : I.height || w, U = g.cornerRadius !== void 0 ? g.cornerRadius : I.cornerRadius ?? I.corner_radius ?? 0;
|
|
5645
5648
|
if (A.save(), B.shadow && B.shadow.opacity > 0) {
|
|
5646
5649
|
if (A.shadowColor = B.shadow.color, B.shadow.opacity < 1 && B.shadow.color.startsWith("#")) {
|
|
5647
|
-
const c = parseInt(B.shadow.color.slice(1, 3), 16), r = parseInt(B.shadow.color.slice(3, 5), 16),
|
|
5648
|
-
A.shadowColor = `rgba(${c}, ${r}, ${
|
|
5650
|
+
const c = parseInt(B.shadow.color.slice(1, 3), 16), r = parseInt(B.shadow.color.slice(3, 5), 16), q = parseInt(B.shadow.color.slice(5, 7), 16);
|
|
5651
|
+
A.shadowColor = `rgba(${c}, ${r}, ${q}, ${B.shadow.opacity})`;
|
|
5649
5652
|
}
|
|
5650
5653
|
A.shadowBlur = B.shadow.blur, A.shadowOffsetX = B.shadow.offsetX, A.shadowOffsetY = B.shadow.offsetY;
|
|
5651
5654
|
}
|
|
@@ -5668,8 +5671,8 @@ class OC {
|
|
|
5668
5671
|
const R = this.objectStates.get(F), c = (R == null ? void 0 : R.geometry) || U.geometry;
|
|
5669
5672
|
if (c && c.isMask && (R == null ? void 0 : R.visible) !== !1) {
|
|
5670
5673
|
A.save(), this.applyObjectTransform(A, F);
|
|
5671
|
-
const r = c.width || 0,
|
|
5672
|
-
this.applyPath(A, c, r,
|
|
5674
|
+
const r = c.width || 0, q = c.height || 0;
|
|
5675
|
+
this.applyPath(A, c, r, q), A.clip(), S++;
|
|
5673
5676
|
} else
|
|
5674
5677
|
this.renderObject(A, U, C);
|
|
5675
5678
|
}); S > 0; )
|
|
@@ -5702,113 +5705,113 @@ class OC {
|
|
|
5702
5705
|
}), I.is_closed && A.closePath());
|
|
5703
5706
|
}
|
|
5704
5707
|
renderInputBox(A, I) {
|
|
5705
|
-
var
|
|
5706
|
-
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((
|
|
5707
|
-
let U = g.backgroundColor || "rgba(31, 41, 55, 1)", R = g.borderColor || "rgba(55, 65, 81, 1)", c = g.borderWidth ?? 1.5, r = g.color || "#ffffff",
|
|
5708
|
-
const
|
|
5709
|
-
|
|
5710
|
-
const
|
|
5711
|
-
if (!
|
|
5712
|
-
const
|
|
5713
|
-
if (A.save(), A.translate(
|
|
5714
|
-
const
|
|
5715
|
-
A.scale(DA, DA), A.translate(-12, -12), A.fillStyle = sA, A.fill(
|
|
5708
|
+
var X, iA;
|
|
5709
|
+
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((X = I.geometry) == null ? void 0 : X.width) || 250, B = ((iA = I.geometry) == null ? void 0 : iA.height) || 45, D = this.focusedId === I.id, w = this.lastHoveredObjectId === I.id, o = g.previewState || "default", h = o !== "default" ? o : D ? "focused" : w ? "hovered" : "default", G = g.label || { visible: !0, text: "Label" }, s = g.helperText || { visible: !1, text: "Helper text" }, a = g.leftIcon || { visible: !1 }, M = g.rightIcon || { visible: !1 }, y = g.multiline === !0, J = g.cornerRadius ?? 8, S = g.corners || { tl: J, tr: J, bl: J, br: J }, F = [S.tl, S.tr, S.br, S.bl];
|
|
5710
|
+
let U = g.backgroundColor || "rgba(31, 41, 55, 1)", R = g.borderColor || "rgba(55, 65, 81, 1)", c = g.borderWidth ?? 1.5, r = g.color || "#ffffff", q = g.placeholderColor || "rgba(156, 163, 175, 1)", n = g.fontSize || 14;
|
|
5711
|
+
const O = `${h}Style`, l = g[O];
|
|
5712
|
+
l ? (l.backgroundColor !== void 0 && (U = l.backgroundColor), l.borderColor !== void 0 && (R = l.borderColor), l.borderWidth !== void 0 && (c = l.borderWidth), l.color !== void 0 && (r = l.color), l.placeholderColor !== void 0 && (q = l.placeholderColor), l.fontSize !== void 0 && (n = l.fontSize)) : h === "focused" ? (R = g.focusBorderColor || "rgba(59, 130, 246, 1)", c = Math.max(c, 2)) : h === "hovered" || h === "hover" ? (R = g.hoverBorderColor || R, U = g.hoverBackgroundColor || U) : h === "disabled" ? (U = g.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", R = g.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : h === "error" && (R = "rgba(239, 68, 68, 1)", c = Math.max(c, 2)), A.beginPath(), A.roundRect(-Q / 2, -B / 2, Q, B, F), A.fillStyle = U, A.fill(), c > 0 && (A.strokeStyle = R, A.lineWidth = c, A.stroke(), (h === "focused" || h === "focus") && (A.save(), A.beginPath(), A.roundRect(-Q / 2 - 2, -B / 2 - 2, Q + 4, B + 4, F.map((_) => _ + 2)), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore()));
|
|
5713
|
+
const v = (_, V) => {
|
|
5714
|
+
if (!_.visible || !_.svgPath) return;
|
|
5715
|
+
const IA = _.size || 14, BA = _.offset ?? 16, sA = _.color || "#ffffff", NA = V ? -(Q / 2) + BA : Q / 2 - BA, LA = _.svgPath;
|
|
5716
|
+
if (A.save(), A.translate(NA, 0), !LA.startsWith("<svg")) {
|
|
5717
|
+
const UA = new Path2D(LA), DA = IA / 24;
|
|
5718
|
+
A.scale(DA, DA), A.translate(-12, -12), A.fillStyle = sA, A.fill(UA);
|
|
5716
5719
|
}
|
|
5717
5720
|
A.restore();
|
|
5718
5721
|
};
|
|
5719
|
-
|
|
5720
|
-
const QA = g.text || "", SA = g.placeholder || "Enter text...", wA = !QA,
|
|
5721
|
-
A.font = `${
|
|
5722
|
-
const
|
|
5723
|
-
if (A.save(), A.beginPath(), A.rect(
|
|
5724
|
-
const
|
|
5722
|
+
v(a, !0), v(M, !1);
|
|
5723
|
+
const QA = g.text || "", SA = g.placeholder || "Enter text...", wA = !QA, u = QA || SA, j = wA ? q : r, H = n, Z = g.fontFamily || "Inter", b = g.fontWeight || 400;
|
|
5724
|
+
A.font = `${b} ${H}px "${Z}", sans-serif`, A.fillStyle = j, A.textAlign = "left", A.textBaseline = y ? "top" : "middle";
|
|
5725
|
+
const p = g.inputPadding ?? 16, T = a.visible ? (a.offset ?? 16) + (a.size || 14) / 2 + 8 : p, t = M.visible ? (M.offset ?? 16) + (M.size || 14) / 2 + 8 : p, e = -(Q / 2) + T, Y = Q - T - t, d = g.inputType === "password" ? "•".repeat(u.length) : u;
|
|
5726
|
+
if (A.save(), A.beginPath(), A.rect(e - 2, -B / 2 + 4, Y + 4, B - 8), A.clip(), y) {
|
|
5727
|
+
const _ = d.split(`
|
|
5725
5728
|
`);
|
|
5726
|
-
let
|
|
5727
|
-
const
|
|
5728
|
-
let
|
|
5729
|
-
|
|
5729
|
+
let V = -B / 2 + p;
|
|
5730
|
+
const IA = H * 1.2;
|
|
5731
|
+
let BA = 0;
|
|
5732
|
+
_.forEach((sA, NA) => {
|
|
5730
5733
|
const LA = sA.split(" ");
|
|
5731
|
-
let
|
|
5734
|
+
let UA = "";
|
|
5732
5735
|
for (let DA = 0; DA < LA.length; DA++) {
|
|
5733
|
-
const tA =
|
|
5734
|
-
A.measureText(tA).width >
|
|
5736
|
+
const tA = UA + LA[DA] + " ";
|
|
5737
|
+
A.measureText(tA).width > Y && DA > 0 ? (A.fillText(UA, e, V), UA = LA[DA] + " ", V += IA) : UA = tA;
|
|
5735
5738
|
}
|
|
5736
|
-
A.fillText(
|
|
5737
|
-
}), D && !wA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(
|
|
5739
|
+
A.fillText(UA, e, V), BA = A.measureText(UA).width, NA < _.length - 1 && (V += IA, BA = 0);
|
|
5740
|
+
}), D && !wA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(e + BA, V, 1.5, H);
|
|
5738
5741
|
} else {
|
|
5739
|
-
const
|
|
5740
|
-
let
|
|
5741
|
-
if (
|
|
5742
|
-
const sA =
|
|
5743
|
-
A.fillRect(sA, -(
|
|
5742
|
+
const V = A.measureText(d).width;
|
|
5743
|
+
let IA = 0;
|
|
5744
|
+
if (V > Y && (IA = V - Y), A.fillText(d, e - IA, 0), D && !wA && Math.floor(performance.now() / 500) % 2 === 0) {
|
|
5745
|
+
const sA = e + V - IA;
|
|
5746
|
+
A.fillRect(sA, -(H / 2), 1.5, H);
|
|
5744
5747
|
}
|
|
5745
5748
|
}
|
|
5746
5749
|
if (A.restore(), G.visible !== !1) {
|
|
5747
|
-
const
|
|
5748
|
-
A.font = `600 ${
|
|
5749
|
-
const sA = -(Q / 2),
|
|
5750
|
-
A.fillText(
|
|
5750
|
+
const _ = G.text || "Label", V = G.fontSize || 12, IA = G.color || "rgba(156, 163, 175, 1)", BA = G.offset ?? 8;
|
|
5751
|
+
A.font = `600 ${V}px "${Z}", sans-serif`, A.fillStyle = IA, A.textAlign = "left", A.textBaseline = "bottom";
|
|
5752
|
+
const sA = -(Q / 2), NA = -(B / 2) - BA;
|
|
5753
|
+
A.fillText(_, sA, NA);
|
|
5751
5754
|
}
|
|
5752
5755
|
if (s.visible === !0) {
|
|
5753
|
-
const
|
|
5754
|
-
A.font = `400 ${
|
|
5755
|
-
const sA = -(Q / 2),
|
|
5756
|
-
A.fillText(
|
|
5756
|
+
const _ = s.text || "Helper text", V = s.fontSize || 11, IA = h === "error" ? "rgba(239, 68, 68, 1)" : s.color || "rgba(156, 163, 175, 1)", BA = s.offset ?? 6;
|
|
5757
|
+
A.font = `400 ${V}px "${Z}", sans-serif`, A.fillStyle = IA, A.textAlign = "left", A.textBaseline = "top";
|
|
5758
|
+
const sA = -(Q / 2), NA = B / 2 + BA;
|
|
5759
|
+
A.fillText(_, sA, NA);
|
|
5757
5760
|
}
|
|
5758
5761
|
}
|
|
5759
5762
|
renderSlider(A, I) {
|
|
5760
|
-
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 || {}, B = g.width || 200, D = Q.value ?? 50, w = Q.min ?? 0, h = (Q.max ?? 100) - w, G = h === 0 ? 0 : (D - w) / h, s = Q.trackHeight || 4, a = Q.trackRoundedness ?? 2, M = Q.trackShape ?? "Rectangle", y = Q.trackPath || "", J = Q.activeColor || "#3b82f6", S = Q.inactiveColor || "#374151", F = Q.thumbShape || "Ellipse", U = Q.thumbWidth ?? 16, R = Q.thumbHeight ?? 16, c = Q.thumbRoundedness ?? 0, r = Q.thumbColor || "#ffffff",
|
|
5761
|
-
if ((
|
|
5763
|
+
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 || {}, B = g.width || 200, D = Q.value ?? 50, w = Q.min ?? 0, h = (Q.max ?? 100) - w, G = h === 0 ? 0 : (D - w) / h, s = Q.trackHeight || 4, a = Q.trackRoundedness ?? 2, M = Q.trackShape ?? "Rectangle", y = Q.trackPath || "", J = Q.activeColor || "#3b82f6", S = Q.inactiveColor || "#374151", F = Q.thumbShape || "Ellipse", U = Q.thumbWidth ?? 16, R = Q.thumbHeight ?? 16, c = Q.thumbRoundedness ?? 0, r = Q.thumbColor || "#ffffff", q = Q.thumbPath || "", n = Q.thumbIcon || "", O = Q.showValueTooltip ?? !1, l = Q.tooltipBgColor || "#333333", v = Q.tooltipColor || "#ffffff", QA = Q.tooltipOffsetX ?? 0, SA = Q.tooltipOffsetY ?? -25, wA = (T, t, e, Y, d, X, iA) => {
|
|
5764
|
+
if ((T === "Custom" || T === "Icon") && iA)
|
|
5762
5765
|
try {
|
|
5763
|
-
const
|
|
5764
|
-
if (A.save(), A.translate(
|
|
5765
|
-
const V = Math.min(
|
|
5766
|
+
const _ = new Path2D(iA);
|
|
5767
|
+
if (A.save(), A.translate(t, e), T === "Icon") {
|
|
5768
|
+
const V = Math.min(Y, d) / 24;
|
|
5766
5769
|
A.scale(V, V), A.translate(-12, -12);
|
|
5767
5770
|
}
|
|
5768
|
-
A.fill(
|
|
5771
|
+
A.fill(_), A.restore();
|
|
5769
5772
|
return;
|
|
5770
|
-
} catch (
|
|
5771
|
-
console.error("Error drawing slider shape in engine:",
|
|
5773
|
+
} catch (_) {
|
|
5774
|
+
console.error("Error drawing slider shape in engine:", _);
|
|
5772
5775
|
}
|
|
5773
|
-
if (A.beginPath(),
|
|
5774
|
-
A.ellipse(
|
|
5775
|
-
else if (
|
|
5776
|
-
A.roundRect(
|
|
5777
|
-
else if (
|
|
5778
|
-
A.moveTo(
|
|
5779
|
-
else if (
|
|
5780
|
-
A.moveTo(
|
|
5781
|
-
else if (
|
|
5782
|
-
const V = Math.min(
|
|
5783
|
-
for (let
|
|
5784
|
-
const
|
|
5785
|
-
A.lineTo(
|
|
5776
|
+
if (A.beginPath(), T === "Ellipse")
|
|
5777
|
+
A.ellipse(t, e, Y / 2, d / 2, 0, 0, Math.PI * 2);
|
|
5778
|
+
else if (T === "Rectangle")
|
|
5779
|
+
A.roundRect(t - Y / 2, e - d / 2, Y, d, X);
|
|
5780
|
+
else if (T === "Triangle")
|
|
5781
|
+
A.moveTo(t, e - d / 2), A.lineTo(t + Y / 2, e + d / 2), A.lineTo(t - Y / 2, e + d / 2), A.closePath();
|
|
5782
|
+
else if (T === "Diamond")
|
|
5783
|
+
A.moveTo(t, e - d / 2), A.lineTo(t + Y / 2, e), A.lineTo(t, e + d / 2), A.lineTo(t - Y / 2, e), A.closePath();
|
|
5784
|
+
else if (T === "Star") {
|
|
5785
|
+
const V = Math.min(Y, d) / 2, IA = V / 2;
|
|
5786
|
+
for (let BA = 0; BA < 5 * 2; BA++) {
|
|
5787
|
+
const sA = BA % 2 === 0 ? V : IA, NA = BA * Math.PI / 5 - Math.PI / 2;
|
|
5788
|
+
A.lineTo(t + sA * Math.cos(NA), e + sA * Math.sin(NA));
|
|
5786
5789
|
}
|
|
5787
5790
|
A.closePath();
|
|
5788
|
-
} else
|
|
5791
|
+
} else T === "Line" && (A.moveTo(t - Y / 2, e), A.lineTo(t + Y / 2, e));
|
|
5789
5792
|
A.fill();
|
|
5790
5793
|
};
|
|
5791
5794
|
A.fillStyle = S, M === "Line" ? (A.strokeStyle = S, A.lineWidth = s, A.beginPath(), A.moveTo(-B / 2, 0), A.lineTo(B / 2, 0), A.stroke()) : wA(M, 0, 0, B, s, a, y);
|
|
5792
|
-
const
|
|
5793
|
-
if (
|
|
5794
|
-
A.save(), A.translate(
|
|
5795
|
-
const
|
|
5795
|
+
const u = B - U, j = -B / 2 + U / 2 + G * u, H = j - -B / 2;
|
|
5796
|
+
if (H > 0 && (A.fillStyle = J, M === "Line" ? (A.strokeStyle = J, A.lineWidth = s, A.beginPath(), A.moveTo(-B / 2, 0), A.lineTo(j, 0), A.stroke()) : M === "Rectangle" && (A.beginPath(), A.roundRect(-B / 2, -s / 2, H, s, a), A.fill())), A.save(), A.translate(j, 0), A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4, A.shadowOffsetY = 1, A.fillStyle = r, wA(F, 0, 0, U, R, c, F === "Icon" ? n : q), A.restore(), O) {
|
|
5797
|
+
A.save(), A.translate(j + QA, SA);
|
|
5798
|
+
const T = Math.round(D).toString();
|
|
5796
5799
|
A.font = "10px Inter, sans-serif";
|
|
5797
|
-
const
|
|
5798
|
-
A.beginPath(), A.roundRect(-
|
|
5800
|
+
const t = A.measureText(T), e = 6, Y = 4, d = t.width + e * 2, X = 14 + Y;
|
|
5801
|
+
A.beginPath(), A.roundRect(-d / 2, -X / 2, d, X, 4), A.fillStyle = l, A.fill(), A.fillStyle = v, A.textAlign = "center", A.textBaseline = "middle", A.fillText(T, 0, 0), A.restore();
|
|
5799
5802
|
}
|
|
5800
|
-
const
|
|
5801
|
-
if (
|
|
5802
|
-
const
|
|
5803
|
-
A.font = `600 ${
|
|
5804
|
-
const
|
|
5805
|
-
A.fillText(
|
|
5803
|
+
const Z = Q.label || {}, b = Q.helperText || {}, p = Q.fontFamily || "Inter";
|
|
5804
|
+
if (Z.visible !== !1) {
|
|
5805
|
+
const T = Z.text || "Label", t = Z.fontSize || 12, e = Z.color || "rgba(156, 163, 175, 1)", Y = Z.offset ?? 8;
|
|
5806
|
+
A.font = `600 ${t}px "${p}", sans-serif`, A.fillStyle = e, A.textAlign = "left", A.textBaseline = "bottom";
|
|
5807
|
+
const d = -(B / 2), X = -(s / 2) - Y;
|
|
5808
|
+
A.fillText(T, d, X);
|
|
5806
5809
|
}
|
|
5807
5810
|
if (b.visible === !0) {
|
|
5808
|
-
const
|
|
5809
|
-
A.font = `400 ${
|
|
5810
|
-
const
|
|
5811
|
-
A.fillText(
|
|
5811
|
+
const T = b.text || "Helper text", t = b.fontSize || 11, e = b.color || "rgba(156, 163, 175, 1)", Y = b.offset ?? 6;
|
|
5812
|
+
A.font = `400 ${t}px "${p}", sans-serif`, A.fillStyle = e, A.textAlign = "left", A.textBaseline = "top";
|
|
5813
|
+
const d = -(B / 2), X = s / 2 + Y;
|
|
5814
|
+
A.fillText(T, d, X);
|
|
5812
5815
|
}
|
|
5813
5816
|
}
|
|
5814
5817
|
renderDropdown(A, I) {
|
|
@@ -5820,52 +5823,52 @@ class OC {
|
|
|
5820
5823
|
h ? (a = g.disabledBackgroundColor || "#f3f4f6", M = g.disabledBorderColor || "#e5e7eb", y = g.disabledColor || "#9ca3af") : s ? (a = g.activeBackgroundColor || a, M = g.activeBorderColor || M, y = g.activeColor || y) : G && (a = g.hoverBackgroundColor || a, M = g.hoverBorderColor || M, y = g.hoverColor || y), a || (a = "#ffffff"), M || (M = "#e5e7eb");
|
|
5821
5824
|
const J = A.globalAlpha;
|
|
5822
5825
|
A.globalAlpha = J * (g.opacity ?? 1), A.beginPath();
|
|
5823
|
-
const S = (
|
|
5824
|
-
|
|
5826
|
+
const S = (u, j, H, Z, b, p) => {
|
|
5827
|
+
Z < 0 && (Z = 0), b < 0 && (b = 0), p = Math.min(p, Math.min(Z, b) / 2), u.moveTo(j + p, H), u.lineTo(j + Z - p, H), u.arcTo(j + Z, H, j + Z, H + p, p), u.lineTo(j + Z, H + b - p), u.arcTo(j + Z, H + b, j + Z - p, H + b, p), u.lineTo(j + p, H + b), u.arcTo(j, H + b, j, H + b - p, p), u.lineTo(j, H + p), u.arcTo(j, H, j + p, H, p), u.closePath();
|
|
5825
5828
|
};
|
|
5826
5829
|
S(A, D, w, Q, B, o), A.fillStyle = this.createCanvasFill(A, typeof a == "string" ? { type: "Solid", color: a } : a, Q, B) || "#ffffff", A.fill();
|
|
5827
5830
|
const F = g.borderWidth ?? 1;
|
|
5828
5831
|
F > 0 && (A.strokeStyle = this.createCanvasFill(A, typeof M == "string" ? { type: "Solid", color: M } : M, Q, B) || "#e5e7eb", A.lineWidth = F, A.stroke());
|
|
5829
5832
|
const U = 12, R = g.chevronType || "chevron", c = g.chevronSize || 16, r = (s ? g.openIconColor : g.closedIconColor) || g.chevronColor || "#6b7280";
|
|
5830
5833
|
if (R !== "none") {
|
|
5831
|
-
const
|
|
5832
|
-
A.save(), A.translate(
|
|
5833
|
-
const
|
|
5834
|
-
if (A.rotate(
|
|
5834
|
+
const u = D + Q - U - c / 2;
|
|
5835
|
+
A.save(), A.translate(u, 0);
|
|
5836
|
+
const j = s ? g.openIconAngle ?? 180 : g.closedIconAngle ?? 0;
|
|
5837
|
+
if (A.rotate(j * Math.PI / 180), A.strokeStyle = r, A.fillStyle = r, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", R === "chevron")
|
|
5835
5838
|
A.beginPath(), A.moveTo(-c / 2, -c * 0.2), A.lineTo(0, c * 0.2), A.lineTo(c / 2, -c * 0.2), A.stroke();
|
|
5836
5839
|
else if (R === "custom" || R === "path") {
|
|
5837
|
-
const
|
|
5838
|
-
if (
|
|
5839
|
-
const
|
|
5840
|
+
const H = s && g.openIconPath || g.closedIconPath;
|
|
5841
|
+
if (H) {
|
|
5842
|
+
const Z = new Path2D(H);
|
|
5840
5843
|
A.save();
|
|
5841
|
-
const
|
|
5842
|
-
A.scale(
|
|
5844
|
+
const b = c / 24;
|
|
5845
|
+
A.scale(b, b), A.translate(-12, -12), A.fill(Z), A.restore();
|
|
5843
5846
|
}
|
|
5844
5847
|
}
|
|
5845
5848
|
A.restore();
|
|
5846
5849
|
}
|
|
5847
|
-
const
|
|
5848
|
-
A.font = `${
|
|
5849
|
-
const
|
|
5850
|
-
A.fillStyle = this.createCanvasFill(A, typeof
|
|
5850
|
+
const q = g.selectedOption || g.placeholder || "Select...", n = g.fontSize || 14, O = g.fontWeight || 400, l = g.fontFamily || "Inter, sans-serif";
|
|
5851
|
+
A.font = `${O} ${n}px ${l}`;
|
|
5852
|
+
const v = h ? g.disabledColor || "#9ca3af" : !g.selectedOption && g.placeholder ? "#9ca3af" : y;
|
|
5853
|
+
A.fillStyle = this.createCanvasFill(A, typeof v == "string" ? { type: "Solid", color: v } : v, Q, B) || "#333333", A.textAlign = "left", A.textBaseline = "middle";
|
|
5851
5854
|
const QA = R === "none" ? 0 : c + 8, SA = Q - U * 2 - QA;
|
|
5852
|
-
if (A.save(), A.beginPath(), A.rect(D + U, w, SA, B), A.clip(), A.fillText(
|
|
5853
|
-
const
|
|
5855
|
+
if (A.save(), A.beginPath(), A.rect(D + U, w, SA, B), A.clip(), A.fillText(q, D + U, 0), A.restore(), s && !h) {
|
|
5856
|
+
const u = w + B + 4, j = g.optionsList || [], H = g.itemHeight || 32, Z = g.listPadding ?? 4, b = j.length * H + Z * 2, p = g.listCornerRadius ?? o;
|
|
5854
5857
|
A.save();
|
|
5855
|
-
const
|
|
5856
|
-
A.shadowColor = typeof
|
|
5858
|
+
const T = g.listShadow || {};
|
|
5859
|
+
A.shadowColor = typeof T.color == "string" ? T.color : ((wA = T.color) == null ? void 0 : wA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = T.blur ?? 12, A.shadowOffsetY = T.offsetY ?? 6, A.beginPath(), S(A, D, u, Q, b, p), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, b) || "#ffffff", A.fill();
|
|
5857
5860
|
const t = g.listBorderWidth ?? 1;
|
|
5858
|
-
t > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: M }, Q,
|
|
5859
|
-
const
|
|
5860
|
-
A.font = `${
|
|
5861
|
-
const
|
|
5862
|
-
if (
|
|
5863
|
-
A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q,
|
|
5861
|
+
t > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: M }, Q, b) || "#e5e7eb", A.lineWidth = t, A.stroke()), A.restore();
|
|
5862
|
+
const e = g.itemFontSize || n, Y = g.itemFontFamily || l;
|
|
5863
|
+
A.font = `${O} ${e}px ${Y}`, j.forEach((d, X) => {
|
|
5864
|
+
const iA = u + Z + X * H;
|
|
5865
|
+
if (d === g.selectedOption)
|
|
5866
|
+
A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, H) || "#f3f4f6", A.fillRect(D + t, iA, Q - t * 2, H), A.fillStyle = g.itemSelectedColor || g.activeColor || y || "#374151";
|
|
5864
5867
|
else if (A.fillStyle = g.listTextColor || y || "#333333", this.activeDropdownId === I.id && this._lastPointerPos) {
|
|
5865
|
-
const
|
|
5866
|
-
|
|
5868
|
+
const V = this._lastPointerPos.y - (u + Z), IA = Math.floor(V / H);
|
|
5869
|
+
X === IA && (A.fillStyle = this.createCanvasFill(A, typeof g.itemHoverBackgroundColor == "string" ? { type: "Solid", color: g.itemHoverBackgroundColor } : g.itemHoverBackgroundColor || { type: "Solid", color: "#f9fafb" }, Q, H) || "#f9fafb", A.fillRect(D + t, iA, Q - t * 2, H), A.fillStyle = g.itemHoverColor || y);
|
|
5867
5870
|
}
|
|
5868
|
-
A.fillText(
|
|
5871
|
+
A.fillText(d, D + U, iA + H / 2);
|
|
5869
5872
|
});
|
|
5870
5873
|
}
|
|
5871
5874
|
A.globalAlpha = J;
|
|
@@ -5878,10 +5881,10 @@ class OC {
|
|
|
5878
5881
|
A.font = `${a.fontWeight || 400} ${J}px "${S}", sans-serif`, A.fillStyle = M, A.textAlign = "center", A.textBaseline = "middle";
|
|
5879
5882
|
let F = 0;
|
|
5880
5883
|
if (y.enabled && y.svgPath) {
|
|
5881
|
-
const
|
|
5882
|
-
A.save(), A.translate(
|
|
5883
|
-
const
|
|
5884
|
-
A.scale(
|
|
5884
|
+
const q = y.size || 16, n = y.gap || 8, O = y.position === "left" ? -(A.measureText(a.text || "").width / 2 + q / 2 + n / 2) : A.measureText(a.text || "").width / 2 + q / 2 + n / 2;
|
|
5885
|
+
A.save(), A.translate(O, 0);
|
|
5886
|
+
const l = new Path2D(y.svgPath), v = q / 24;
|
|
5887
|
+
A.scale(v, v), A.translate(-12, -12), A.fillStyle = y.color || M, A.fill(l), A.restore(), F = y.position === "left" ? q / 2 + n / 2 : -(q / 2 + n / 2);
|
|
5885
5888
|
}
|
|
5886
5889
|
A.fillText(a.text || "Button", F, 0), A.restore();
|
|
5887
5890
|
}
|
|
@@ -5898,11 +5901,11 @@ class OC {
|
|
|
5898
5901
|
A.beginPath(), A.roundRect(D, w, Q, B, h), A.fillStyle = o ? g.activeColor || "#10b981" : g.inactiveColor || "#374151", g.disabled && (A.globalAlpha *= 0.5), A.fill();
|
|
5899
5902
|
const G = 3, s = B - G * 2, a = s / 2, M = D + G, y = D + Q - G - s, J = o ? y : M, S = w + G;
|
|
5900
5903
|
if (A.beginPath(), A.arc(J + a, S + a, a, 0, Math.PI * 2), A.fillStyle = g.knobColor || "#ffffff", A.fill(), g.disabled && (A.globalAlpha *= 2), g.label && g.label.text) {
|
|
5901
|
-
const R = g.label, c = R.fontSize || 14, r = R.fontWeight || 400,
|
|
5902
|
-
A.font = `${r} ${c}px "${
|
|
5903
|
-
const
|
|
5904
|
-
let
|
|
5905
|
-
R.position === "left" ? (A.textAlign = "right",
|
|
5904
|
+
const R = g.label, c = R.fontSize || 14, r = R.fontWeight || 400, q = R.fontFamily || "Inter";
|
|
5905
|
+
A.font = `${r} ${c}px "${q}", sans-serif`, A.fillStyle = R.color || "#f3f4f6", A.textBaseline = "middle";
|
|
5906
|
+
const n = R.gap || 10;
|
|
5907
|
+
let O = 0, l = 0;
|
|
5908
|
+
R.position === "left" ? (A.textAlign = "right", O = D - n, l = 0) : R.position === "right" ? (A.textAlign = "left", O = D + Q + n, l = 0) : R.position === "top" ? (A.textAlign = "center", O = 0, l = w - n, A.textBaseline = "bottom") : R.position === "bottom" ? (A.textAlign = "center", O = 0, l = w + B + n, A.textBaseline = "top") : (A.textAlign = "left", O = D + Q + n, l = 0), A.fillText(R.text, O, l);
|
|
5906
5909
|
}
|
|
5907
5910
|
}
|
|
5908
5911
|
renderLineGraph(A, I, C, g) {
|
|
@@ -5966,9 +5969,9 @@ class OC {
|
|
|
5966
5969
|
if (A.beginPath(), A.moveTo(s(0), g / 2), A.lineTo(s(0), G(J[0])), y.smoothing && J.length > 2)
|
|
5967
5970
|
for (let F = 0; F < J.length - 1; F++) {
|
|
5968
5971
|
const U = J[F === 0 ? F : F - 1], R = J[F], c = J[F + 1], r = J[F + 1 === J.length - 1 ? F + 1 : F + 2];
|
|
5969
|
-
for (let
|
|
5970
|
-
const
|
|
5971
|
-
A.lineTo(s(F +
|
|
5972
|
+
for (let q = 1; q <= M; q++) {
|
|
5973
|
+
const n = q / M, O = this._catmullRom(U, R, c, r, n);
|
|
5974
|
+
A.lineTo(s(F + n), G(O));
|
|
5972
5975
|
}
|
|
5973
5976
|
}
|
|
5974
5977
|
else
|
|
@@ -5982,8 +5985,8 @@ class OC {
|
|
|
5982
5985
|
for (let S = 0; S < J.length - 1; S++) {
|
|
5983
5986
|
const F = J[S === 0 ? S : S - 1], U = J[S], R = J[S + 1], c = J[S + 1 === J.length - 1 ? S + 1 : S + 2];
|
|
5984
5987
|
for (let r = 1; r <= M; r++) {
|
|
5985
|
-
const
|
|
5986
|
-
A.lineTo(s(S +
|
|
5988
|
+
const q = r / M, n = this._catmullRom(F, U, R, c, q);
|
|
5989
|
+
A.lineTo(s(S + q), G(n));
|
|
5987
5990
|
}
|
|
5988
5991
|
}
|
|
5989
5992
|
else
|
|
@@ -6048,48 +6051,48 @@ class OC {
|
|
|
6048
6051
|
A.moveTo(I + h, C), A.lineTo(I + g - G, C), G > 0 ? A.arcTo(I + g, C, I + g, C + G, G) : A.lineTo(I + g, C), A.lineTo(I + g, C + Q - s), s > 0 ? A.arcTo(I + g, C + Q, I + g - s, C + Q, s) : A.lineTo(I + g, C + Q), A.lineTo(I + a, C + Q), a > 0 ? A.arcTo(I, C + Q, I, C + Q - a, a) : A.lineTo(I, C + Q), A.lineTo(I, C + h), h > 0 ? A.arcTo(I, C, I + h, C, h) : A.lineTo(I, C), A.closePath();
|
|
6049
6052
|
}
|
|
6050
6053
|
renderListView(A, I) {
|
|
6051
|
-
var wA,
|
|
6052
|
-
const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((wA = I.geometry) == null ? void 0 : wA.width) || 200, B = C.height !== void 0 ? C.height : ((
|
|
6053
|
-
if (A.save(), A.globalAlpha *=
|
|
6054
|
-
const
|
|
6055
|
-
A.fillStyle =
|
|
6056
|
-
const
|
|
6057
|
-
|
|
6054
|
+
var wA, u, j, H;
|
|
6055
|
+
const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((wA = I.geometry) == null ? void 0 : wA.width) || 200, B = C.height !== void 0 ? C.height : ((u = I.geometry) == null ? void 0 : u.height) || 300, D = -Q / 2, w = -B / 2, o = C.cornerRadius !== void 0 ? C.cornerRadius : g.cornerRadius ?? 0, h = g.orientation || "vertical", G = g.items || [], s = g.itemGap ?? 10, a = g.itemHeight ?? 50, M = g.itemWidth ?? 200, y = g.scrollOffset ?? 0, J = g.padding ?? 0, S = g.glassEffect !== !1, F = g.accentColor || "#3b82f6", U = g.itemTextColor || "#333333", R = g.itemBackgroundColor || "#ffffff", c = g.hoveredIndex ?? null, r = g.activeItemIndex ?? null, q = g.glowIntensity ?? 0, n = g.glowColor || "#3b82f6", O = typeof n == "string" ? n : n.color || ((H = (j = n.stops) == null ? void 0 : j[0]) == null ? void 0 : H.color) || "#3b82f6", l = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
|
|
6056
|
+
if (A.save(), A.globalAlpha *= l, q > 0 && (A.shadowColor = O, A.shadowBlur = q * 2, A.shadowOffsetX = 0, A.shadowOffsetY = 0), S) {
|
|
6057
|
+
const Z = g.listBackgroundColor || "rgba(31, 41, 55, 0.4)", b = this.createCanvasFill(A, Z, Q, B);
|
|
6058
|
+
A.fillStyle = b || "rgba(31, 41, 55, 0.4)", this.drawListViewRect(A, D, w, Q, B, o), A.fill();
|
|
6059
|
+
const p = A.createLinearGradient(D, w, D + Q, w + B);
|
|
6060
|
+
p.addColorStop(0, "rgba(255, 255, 255, 0.15)"), p.addColorStop(0.5, "rgba(255, 255, 255, 0.08)"), p.addColorStop(1, "rgba(255, 255, 255, 0.03)"), A.fillStyle = p, this.drawListViewRect(A, D, w, Q, B, o), A.fill(), A.strokeStyle = "rgba(255, 255, 255, 0.25)", A.lineWidth = 1, this.drawListViewRect(A, D, w, Q, B, o), A.stroke();
|
|
6058
6061
|
} else {
|
|
6059
|
-
const
|
|
6060
|
-
|
|
6061
|
-
const
|
|
6062
|
-
|
|
6062
|
+
const Z = g.listBackgroundColor || "transparent", b = this.createCanvasFill(A, Z, Q, B);
|
|
6063
|
+
b && (A.fillStyle = b, this.drawListViewRect(A, D, w, Q, B, o), A.fill());
|
|
6064
|
+
const p = g.borderWidth ?? 0;
|
|
6065
|
+
p > 0 && (A.strokeStyle = g.borderColor || "#cccccc", A.lineWidth = p, this.drawListViewRect(A, D, w, Q, B, o), A.stroke());
|
|
6063
6066
|
}
|
|
6064
6067
|
A.shadowBlur = 0, A.save(), this.drawListViewRect(A, D, w, Q, B, o), A.clip();
|
|
6065
|
-
const
|
|
6066
|
-
let QA = (h === "vertical" ? w : D) + y +
|
|
6067
|
-
if (A.textBaseline = "middle", G.forEach((
|
|
6068
|
-
const
|
|
6069
|
-
if (
|
|
6070
|
-
const
|
|
6071
|
-
A.fillStyle =
|
|
6072
|
-
const
|
|
6073
|
-
A.globalAlpha =
|
|
6074
|
-
} else if (
|
|
6075
|
-
A.fillStyle = S ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(t,
|
|
6068
|
+
const v = typeof J == "number" ? J : h === "vertical" ? J[0] : J[3];
|
|
6069
|
+
let QA = (h === "vertical" ? w : D) + y + v;
|
|
6070
|
+
if (A.textBaseline = "middle", G.forEach((Z, b) => {
|
|
6071
|
+
const p = h === "vertical" ? Q : M, T = h === "vertical" ? a : B, t = h === "vertical" ? D : QA, e = h === "vertical" ? QA : w, Y = c === b, d = r === b;
|
|
6072
|
+
if (d) {
|
|
6073
|
+
const IA = this.createCanvasFill(A, F, p, T);
|
|
6074
|
+
A.fillStyle = IA || F;
|
|
6075
|
+
const BA = A.globalAlpha;
|
|
6076
|
+
A.globalAlpha = BA * 0.8, A.fillRect(t, e, p, T), A.globalAlpha = BA;
|
|
6077
|
+
} else if (Y)
|
|
6078
|
+
A.fillStyle = S ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(t, e, p, T);
|
|
6076
6079
|
else if (R !== "transparent") {
|
|
6077
|
-
const
|
|
6078
|
-
A.fillStyle =
|
|
6080
|
+
const IA = this.createCanvasFill(A, R, p, T);
|
|
6081
|
+
A.fillStyle = IA || R, A.fillRect(t, e, p, T);
|
|
6079
6082
|
}
|
|
6080
|
-
if (
|
|
6081
|
-
const
|
|
6082
|
-
A.fillStyle =
|
|
6083
|
+
if (d || Y) {
|
|
6084
|
+
const IA = this.createCanvasFill(A, F, h === "vertical" ? 3 : p, h === "vertical" ? T : 3);
|
|
6085
|
+
A.fillStyle = IA || F, h === "vertical" ? A.fillRect(t, e, 3, T) : A.fillRect(t, e + T - 3, p, 3);
|
|
6083
6086
|
}
|
|
6084
|
-
const
|
|
6085
|
-
A.fillStyle =
|
|
6086
|
-
const
|
|
6087
|
-
h === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(
|
|
6087
|
+
const X = d ? "#ffffff" : S ? "rgba(255, 255, 255, 0.9)" : U;
|
|
6088
|
+
A.fillStyle = X, A.font = d || Y ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
|
|
6089
|
+
const iA = typeof Z == "string" ? Z : Z.label || `Item ${b + 1}`, _ = t + (h === "vertical" ? 16 : p / 2), V = e + T / 2;
|
|
6090
|
+
h === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(iA, _, V), QA += (h === "vertical" ? a : M) + s;
|
|
6088
6091
|
}), A.restore(), g.showScrollbar !== !1) {
|
|
6089
|
-
const
|
|
6090
|
-
if (
|
|
6091
|
-
const
|
|
6092
|
-
A.fillStyle =
|
|
6092
|
+
const Z = (G.length || 0) * (h === "vertical" ? a : M) + ((G.length || 0) - 1) * s, b = h === "vertical" ? B : Q;
|
|
6093
|
+
if (Z > b) {
|
|
6094
|
+
const p = b / Z, T = b * p, t = -y / Z * b, e = g.scrollbarColor || "rgba(255,255,255,0.3)", Y = g.scrollbarWidth || 4;
|
|
6095
|
+
A.fillStyle = e, h === "vertical" ? A.fillRect(D + Q - Y - 2, w + t, Y, T) : A.fillRect(D + t, w + B - Y - 2, T, Y);
|
|
6093
6096
|
}
|
|
6094
6097
|
}
|
|
6095
6098
|
A.restore();
|
|
@@ -6107,16 +6110,16 @@ class OC {
|
|
|
6107
6110
|
Q.hoveredIndex !== g && (Q.hoveredIndex = g);
|
|
6108
6111
|
}
|
|
6109
6112
|
getListViewItemIndexAtPointer(A, I, C) {
|
|
6110
|
-
var
|
|
6113
|
+
var v, QA;
|
|
6111
6114
|
const g = A.options || {}, Q = this.objectStates.get(A.id) || {}, B = g.items || [];
|
|
6112
6115
|
if (B.length === 0) return null;
|
|
6113
|
-
const D = Q.width !== void 0 ? Q.width : ((
|
|
6114
|
-
let
|
|
6116
|
+
const D = Q.width !== void 0 ? Q.width : ((v = A.geometry) == null ? void 0 : v.width) || 200, w = Q.height !== void 0 ? Q.height : ((QA = A.geometry) == null ? void 0 : QA.height) || 300, o = g.orientation || "vertical", h = g.itemGap ?? 10, G = g.itemHeight ?? 50, s = g.itemWidth ?? 200, a = g.scrollOffset ?? 0, M = g.padding ?? 0, y = this.getWorldTransform(A.id), J = I - y.x, S = C - y.y, F = -y.rotation * (Math.PI / 180), U = Math.cos(F), R = Math.sin(F), c = J * U - S * R, r = J * R + S * U, q = -D / 2, n = -w / 2, O = typeof M == "number" ? M : o === "vertical" ? M[0] : M[3];
|
|
6117
|
+
let l = (o === "vertical" ? n : q) + a + O;
|
|
6115
6118
|
for (let SA = 0; SA < B.length; SA++) {
|
|
6116
|
-
const wA = o === "vertical" ? D : s,
|
|
6117
|
-
if (c >=
|
|
6119
|
+
const wA = o === "vertical" ? D : s, u = o === "vertical" ? G : w, j = o === "vertical" ? q : l, H = o === "vertical" ? l : n;
|
|
6120
|
+
if (c >= j && c <= j + wA && r >= H && r <= H + u)
|
|
6118
6121
|
return SA;
|
|
6119
|
-
|
|
6122
|
+
l += (o === "vertical" ? G : s) + h;
|
|
6120
6123
|
}
|
|
6121
6124
|
return null;
|
|
6122
6125
|
}
|
|
@@ -6157,16 +6160,16 @@ const xC = FC(
|
|
|
6157
6160
|
y.current || (y.current = c);
|
|
6158
6161
|
const r = (c - y.current) / 1e3;
|
|
6159
6162
|
y.current = c, g && S.advance(r);
|
|
6160
|
-
const
|
|
6161
|
-
(F.width !==
|
|
6163
|
+
const q = window.devicePixelRatio || 1, n = F.getBoundingClientRect(), O = Math.floor(n.width * q), l = Math.floor(n.height * q);
|
|
6164
|
+
(F.width !== O || F.height !== l) && (F.width = O, F.height = l), S.render(U, O, l), M.current = requestAnimationFrame(R);
|
|
6162
6165
|
};
|
|
6163
6166
|
return M.current = requestAnimationFrame(R), () => {
|
|
6164
6167
|
M.current && cancelAnimationFrame(M.current);
|
|
6165
6168
|
};
|
|
6166
6169
|
}, [g]);
|
|
6167
6170
|
const J = (S, F) => {
|
|
6168
|
-
const U = S.currentTarget.getBoundingClientRect(), R = S.clientX - U.left, c = S.clientY - U.top, r = U.width,
|
|
6169
|
-
a.current.handlePointerInput(F, R, c, r,
|
|
6171
|
+
const U = S.currentTarget.getBoundingClientRect(), R = S.clientX - U.left, c = S.clientY - U.top, r = U.width, q = U.height;
|
|
6172
|
+
a.current.handlePointerInput(F, R, c, r, q);
|
|
6170
6173
|
};
|
|
6171
6174
|
return /* @__PURE__ */ yC(
|
|
6172
6175
|
"canvas",
|