@jdultra/threedtiles 14.0.24 → 14.0.25
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/assets/{physicsRapier.worker-G7IM3mIE.js → physicsRapier.worker-BMqv2qnC.js} +906 -830
- package/dist/assets/{physicsRapier.worker-G7IM3mIE.js.map → physicsRapier.worker-BMqv2qnC.js.map} +1 -1
- package/dist/simulation/physics.d.ts +36 -2
- package/dist/threedtiles.cjs.js +11 -11
- package/dist/threedtiles.cjs.js.map +1 -1
- package/dist/threedtiles.es.js +143 -126
- package/dist/threedtiles.es.js.map +1 -1
- package/dist/threedtiles.umd.js +10 -10
- package/dist/threedtiles.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
let B;
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
return
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
let
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
const A =
|
|
11
|
-
return
|
|
12
|
-
}
|
|
13
|
-
function
|
|
2
|
+
const q = new Array(128).fill(void 0);
|
|
3
|
+
function c(Q) {
|
|
4
|
+
return q[Q];
|
|
5
|
+
}
|
|
6
|
+
q.push(void 0, null, !0, !1);
|
|
7
|
+
let tA = q.length;
|
|
8
|
+
function L(Q) {
|
|
9
|
+
tA === q.length && q.push(q.length + 1);
|
|
10
|
+
const A = tA;
|
|
11
|
+
return tA = q[A], q[A] = Q, A;
|
|
12
|
+
}
|
|
13
|
+
function WA(Q, A) {
|
|
14
14
|
try {
|
|
15
15
|
return Q.apply(this, A);
|
|
16
16
|
} catch (I) {
|
|
17
|
-
B.__wbindgen_export_0(
|
|
17
|
+
B.__wbindgen_export_0(L(I));
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
const oC = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) : { decode: () => {
|
|
21
21
|
throw Error("TextDecoder not available");
|
|
22
22
|
} };
|
|
23
23
|
typeof TextDecoder < "u" && oC.decode();
|
|
24
|
-
let
|
|
24
|
+
let cA = null;
|
|
25
25
|
function VI(Q, A) {
|
|
26
|
-
return Q >>>= 0, oC.decode((
|
|
26
|
+
return Q >>>= 0, oC.decode((cA !== null && cA.byteLength !== 0 || (cA = new Uint8Array(B.memory.buffer)), cA).subarray(Q, Q + A));
|
|
27
27
|
}
|
|
28
28
|
function N(Q) {
|
|
29
29
|
return Q == null;
|
|
30
30
|
}
|
|
31
|
-
let
|
|
31
|
+
let wA = null;
|
|
32
32
|
function d() {
|
|
33
|
-
return (
|
|
33
|
+
return (wA === null || wA.buffer.detached === !0 || wA.buffer.detached === void 0 && wA.buffer !== B.memory.buffer) && (wA = new DataView(B.memory.buffer)), wA;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const A =
|
|
35
|
+
function HA(Q) {
|
|
36
|
+
const A = c(Q);
|
|
37
37
|
return function(I) {
|
|
38
|
-
I < 132 || (
|
|
38
|
+
I < 132 || (q[I] = tA, tA = I);
|
|
39
39
|
}(Q), A;
|
|
40
40
|
}
|
|
41
41
|
function o(Q, A) {
|
|
42
42
|
if (!(Q instanceof A)) throw new Error(`expected instance of ${A.name}`);
|
|
43
43
|
}
|
|
44
|
-
let
|
|
44
|
+
let t = 128;
|
|
45
45
|
function p(Q) {
|
|
46
|
-
if (
|
|
47
|
-
return
|
|
46
|
+
if (t == 1) throw new Error("out of js stack");
|
|
47
|
+
return q[--t] = Q, t;
|
|
48
48
|
}
|
|
49
49
|
let YA = null;
|
|
50
50
|
function sC(Q, A) {
|
|
51
51
|
return Q >>>= 0, (YA !== null && YA.byteLength !== 0 || (YA = new Int32Array(B.memory.buffer)), YA).subarray(Q / 4, Q / 4 + A);
|
|
52
52
|
}
|
|
53
|
-
let
|
|
53
|
+
let qA = null;
|
|
54
54
|
function wC() {
|
|
55
|
-
return
|
|
55
|
+
return qA !== null && qA.byteLength !== 0 || (qA = new Float32Array(B.memory.buffer)), qA;
|
|
56
56
|
}
|
|
57
57
|
function eg(Q, A) {
|
|
58
58
|
return Q >>>= 0, wC().subarray(Q / 4, Q / 4 + A);
|
|
59
59
|
}
|
|
60
|
-
let
|
|
60
|
+
let lA = null;
|
|
61
61
|
function SC() {
|
|
62
|
-
return
|
|
62
|
+
return lA !== null && lA.byteLength !== 0 || (lA = new Uint32Array(B.memory.buffer)), lA;
|
|
63
63
|
}
|
|
64
|
-
let
|
|
65
|
-
function
|
|
64
|
+
let m = 0;
|
|
65
|
+
function RA(Q, A) {
|
|
66
66
|
const I = A(4 * Q.length, 4) >>> 0;
|
|
67
|
-
return SC().set(Q, I / 4),
|
|
67
|
+
return SC().set(Q, I / 4), m = Q.length, I;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function DA(Q, A) {
|
|
70
70
|
const I = A(4 * Q.length, 4) >>> 0;
|
|
71
|
-
return wC().set(Q, I / 4),
|
|
71
|
+
return wC().set(Q, I / 4), m = Q.length, I;
|
|
72
72
|
}
|
|
73
|
-
const BI = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", LinZ: 2, 2: "LinZ", AngX: 3, 3: "AngX", AngY: 4, 4: "AngY", AngZ: 5, 5: "AngZ" }),
|
|
73
|
+
const BI = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", LinZ: 2, 2: "LinZ", AngX: 3, 3: "AngX", AngY: 4, 4: "AngY", AngZ: 5, 5: "AngZ" }), v = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Spherical: 5, 5: "Spherical", Generic: 6, 6: "Generic" }), j = 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", ConvexPolyhedron: 9, 9: "ConvexPolyhedron", Cylinder: 10, 10: "Cylinder", Cone: 11, 11: "Cone", RoundCuboid: 12, 12: "RoundCuboid", RoundTriangle: 13, 13: "RoundTriangle", RoundCylinder: 14, 14: "RoundCylinder", RoundCone: 15, 15: "RoundCone", RoundConvexPolyhedron: 16, 16: "RoundConvexPolyhedron", HalfSpace: 17, 17: "HalfSpace", Voxels: 18, 18: "Voxels" }), nI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
74
74
|
}, unregister: () => {
|
|
75
75
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawbroadphase_free(Q >>> 0, 1));
|
|
76
|
-
class
|
|
76
|
+
class gA {
|
|
77
77
|
static __wrap(A) {
|
|
78
78
|
A >>>= 0;
|
|
79
|
-
const I = Object.create(
|
|
79
|
+
const I = Object.create(gA.prototype);
|
|
80
80
|
return I.__wbg_ptr = A, nI.register(I, I.__wbg_ptr, I), I;
|
|
81
81
|
}
|
|
82
82
|
__destroy_into_raw() {
|
|
@@ -91,87 +91,87 @@ class IA {
|
|
|
91
91
|
const A = B.rawbroadphase_new();
|
|
92
92
|
return this.__wbg_ptr = A >>> 0, nI.register(this, this.__wbg_ptr, this), this;
|
|
93
93
|
}
|
|
94
|
-
castRay(A, I, g, C, E, i, D,
|
|
94
|
+
castRay(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
95
95
|
try {
|
|
96
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
97
|
-
const U = B.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, D,
|
|
96
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), o(E, S);
|
|
97
|
+
const U = B.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, D, K, N(k) ? 4294967297 : k >>> 0, !N(w), N(w) ? 0 : w, !N(h), N(h) ? 0 : h, p(y));
|
|
98
98
|
return U === 0 ? void 0 : Ag.__wrap(U);
|
|
99
99
|
} finally {
|
|
100
|
-
|
|
100
|
+
q[t++] = void 0;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
castRayAndGetNormal(A, I, g, C, E, i, D,
|
|
103
|
+
castRayAndGetNormal(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
104
104
|
try {
|
|
105
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
106
|
-
const U = B.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, D,
|
|
105
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), o(E, S);
|
|
106
|
+
const U = B.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, D, K, N(k) ? 4294967297 : k >>> 0, !N(w), N(w) ? 0 : w, !N(h), N(h) ? 0 : h, p(y));
|
|
107
107
|
return U === 0 ? void 0 : iI.__wrap(U);
|
|
108
108
|
} finally {
|
|
109
|
-
|
|
109
|
+
q[t++] = void 0;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
intersectionsWithRay(A, I, g, C, E, i, D,
|
|
112
|
+
intersectionsWithRay(A, I, g, C, E, i, D, K, k, w, h, y, U) {
|
|
113
113
|
try {
|
|
114
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
114
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), o(E, S), B.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, D, p(K), k, N(w) ? 4294967297 : w >>> 0, !N(h), N(h) ? 0 : h, !N(y), N(y) ? 0 : y, p(U));
|
|
115
115
|
} finally {
|
|
116
|
-
|
|
116
|
+
q[t++] = void 0, q[t++] = void 0;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
intersectionWithShape(A, I, g, C, E, i, D,
|
|
119
|
+
intersectionWithShape(A, I, g, C, E, i, D, K, k, w, h) {
|
|
120
120
|
try {
|
|
121
121
|
const J = B.__wbindgen_add_to_stack_pointer(-16);
|
|
122
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
122
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), o(E, s), o(i, M), B.rawbroadphase_intersectionWithShape(J, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D, N(K) ? 4294967297 : K >>> 0, !N(k), N(k) ? 0 : k, !N(w), N(w) ? 0 : w, p(h));
|
|
123
123
|
var y = d().getInt32(J + 0, !0), U = d().getFloat64(J + 8, !0);
|
|
124
124
|
return y === 0 ? void 0 : U;
|
|
125
125
|
} finally {
|
|
126
|
-
B.__wbindgen_add_to_stack_pointer(16),
|
|
126
|
+
B.__wbindgen_add_to_stack_pointer(16), q[t++] = void 0;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
projectPoint(A, I, g, C, E, i, D,
|
|
129
|
+
projectPoint(A, I, g, C, E, i, D, K, k, w) {
|
|
130
130
|
try {
|
|
131
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
132
|
-
const h = B.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E, i, N(D) ? 4294967297 : D >>> 0, !N(
|
|
131
|
+
o(A, Z), o(I, H), o(g, r), o(C, S);
|
|
132
|
+
const h = B.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E, i, N(D) ? 4294967297 : D >>> 0, !N(K), N(K) ? 0 : K, !N(k), N(k) ? 0 : k, p(w));
|
|
133
133
|
return h === 0 ? void 0 : fA.__wrap(h);
|
|
134
134
|
} finally {
|
|
135
|
-
|
|
135
|
+
q[t++] = void 0;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
projectPointAndGetFeature(A, I, g, C, E, i, D,
|
|
138
|
+
projectPointAndGetFeature(A, I, g, C, E, i, D, K, k) {
|
|
139
139
|
try {
|
|
140
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
141
|
-
const
|
|
142
|
-
return
|
|
140
|
+
o(A, Z), o(I, H), o(g, r), o(C, S);
|
|
141
|
+
const w = B.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E, N(i) ? 4294967297 : i >>> 0, !N(D), N(D) ? 0 : D, !N(K), N(K) ? 0 : K, p(k));
|
|
142
|
+
return w === 0 ? void 0 : fA.__wrap(w);
|
|
143
143
|
} finally {
|
|
144
|
-
|
|
144
|
+
q[t++] = void 0;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
intersectionsWithPoint(A, I, g, C, E, i, D,
|
|
147
|
+
intersectionsWithPoint(A, I, g, C, E, i, D, K, k, w) {
|
|
148
148
|
try {
|
|
149
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
149
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), B.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, p(E), i, N(D) ? 4294967297 : D >>> 0, !N(K), N(K) ? 0 : K, !N(k), N(k) ? 0 : k, p(w));
|
|
150
150
|
} finally {
|
|
151
|
-
|
|
151
|
+
q[t++] = void 0, q[t++] = void 0;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
castShape(A, I, g, C, E, i, D,
|
|
154
|
+
castShape(A, I, g, C, E, i, D, K, k, w, h, y, U, J, F) {
|
|
155
155
|
try {
|
|
156
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
157
|
-
const
|
|
158
|
-
return
|
|
156
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), o(E, s), o(i, S), o(D, M);
|
|
157
|
+
const l = B.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr, K, k, w, h, N(y) ? 4294967297 : y >>> 0, !N(U), N(U) ? 0 : U, !N(J), N(J) ? 0 : J, p(F));
|
|
158
|
+
return l === 0 ? void 0 : QI.__wrap(l);
|
|
159
159
|
} finally {
|
|
160
|
-
|
|
160
|
+
q[t++] = void 0;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
intersectionsWithShape(A, I, g, C, E, i, D,
|
|
163
|
+
intersectionsWithShape(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
164
164
|
try {
|
|
165
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
165
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), o(E, s), o(i, M), B.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, p(D), K, N(k) ? 4294967297 : k >>> 0, !N(w), N(w) ? 0 : w, !N(h), N(h) ? 0 : h, p(y));
|
|
166
166
|
} finally {
|
|
167
|
-
|
|
167
|
+
q[t++] = void 0, q[t++] = void 0;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
collidersWithAabbIntersectingAabb(A, I, g, C, E, i) {
|
|
171
171
|
try {
|
|
172
|
-
o(A, Z), o(I, H), o(g, r), o(C,
|
|
172
|
+
o(A, Z), o(I, H), o(g, r), o(C, S), o(E, S), B.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, p(i));
|
|
173
173
|
} finally {
|
|
174
|
-
|
|
174
|
+
q[t++] = void 0;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -213,30 +213,30 @@ class GC {
|
|
|
213
213
|
}
|
|
214
214
|
translationDeltaApplied() {
|
|
215
215
|
const A = B.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);
|
|
216
|
-
return
|
|
216
|
+
return S.__wrap(A);
|
|
217
217
|
}
|
|
218
218
|
translationDeltaRemaining() {
|
|
219
219
|
const A = B.rawcharactercollision_translationDeltaRemaining(this.__wbg_ptr);
|
|
220
|
-
return
|
|
220
|
+
return S.__wrap(A);
|
|
221
221
|
}
|
|
222
222
|
toi() {
|
|
223
223
|
return B.rawcharactercollision_toi(this.__wbg_ptr);
|
|
224
224
|
}
|
|
225
225
|
worldWitness1() {
|
|
226
226
|
const A = B.rawcharactercollision_worldWitness1(this.__wbg_ptr);
|
|
227
|
-
return
|
|
227
|
+
return S.__wrap(A);
|
|
228
228
|
}
|
|
229
229
|
worldWitness2() {
|
|
230
230
|
const A = B.rawcharactercollision_worldWitness2(this.__wbg_ptr);
|
|
231
|
-
return
|
|
231
|
+
return S.__wrap(A);
|
|
232
232
|
}
|
|
233
233
|
worldNormal1() {
|
|
234
234
|
const A = B.rawcharactercollision_worldNormal1(this.__wbg_ptr);
|
|
235
|
-
return
|
|
235
|
+
return S.__wrap(A);
|
|
236
236
|
}
|
|
237
237
|
worldNormal2() {
|
|
238
238
|
const A = B.rawcharactercollision_worldNormal2(this.__wbg_ptr);
|
|
239
|
-
return
|
|
239
|
+
return S.__wrap(A);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
const TI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -258,7 +258,7 @@ class r {
|
|
|
258
258
|
}
|
|
259
259
|
coTranslation(A) {
|
|
260
260
|
const I = B.rawcolliderset_coTranslation(this.__wbg_ptr, A);
|
|
261
|
-
return
|
|
261
|
+
return S.__wrap(I);
|
|
262
262
|
}
|
|
263
263
|
coRotation(A) {
|
|
264
264
|
const I = B.rawcolliderset_coRotation(this.__wbg_ptr, A);
|
|
@@ -266,7 +266,7 @@ class r {
|
|
|
266
266
|
}
|
|
267
267
|
coTranslationWrtParent(A) {
|
|
268
268
|
const I = B.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr, A);
|
|
269
|
-
return I === 0 ? void 0 :
|
|
269
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
270
270
|
}
|
|
271
271
|
coRotationWrtParent(A) {
|
|
272
272
|
const I = B.rawcolliderset_coRotationWrtParent(this.__wbg_ptr, A);
|
|
@@ -292,14 +292,14 @@ class r {
|
|
|
292
292
|
}
|
|
293
293
|
coHalfspaceNormal(A) {
|
|
294
294
|
const I = B.rawcolliderset_coHalfspaceNormal(this.__wbg_ptr, A);
|
|
295
|
-
return I === 0 ? void 0 :
|
|
295
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
296
296
|
}
|
|
297
297
|
coHalfExtents(A) {
|
|
298
298
|
const I = B.rawcolliderset_coHalfExtents(this.__wbg_ptr, A);
|
|
299
|
-
return I === 0 ? void 0 :
|
|
299
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
300
300
|
}
|
|
301
301
|
coSetHalfExtents(A, I) {
|
|
302
|
-
o(I,
|
|
302
|
+
o(I, S), B.rawcolliderset_coSetHalfExtents(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
303
303
|
}
|
|
304
304
|
coRadius(A) {
|
|
305
305
|
const I = B.rawcolliderset_coRadius(this.__wbg_ptr, A);
|
|
@@ -335,13 +335,13 @@ class r {
|
|
|
335
335
|
}
|
|
336
336
|
coVoxelSize(A) {
|
|
337
337
|
const I = B.rawcolliderset_coVoxelSize(this.__wbg_ptr, A);
|
|
338
|
-
return I === 0 ? void 0 :
|
|
338
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
339
339
|
}
|
|
340
340
|
coSetVoxel(A, I, g, C, E) {
|
|
341
341
|
B.rawcolliderset_coSetVoxel(this.__wbg_ptr, A, I, g, C, E);
|
|
342
342
|
}
|
|
343
|
-
coPropagateVoxelChange(A, I, g, C, E, i, D,
|
|
344
|
-
B.rawcolliderset_coPropagateVoxelChange(this.__wbg_ptr, A, I, g, C, E, i, D,
|
|
343
|
+
coPropagateVoxelChange(A, I, g, C, E, i, D, K) {
|
|
344
|
+
B.rawcolliderset_coPropagateVoxelChange(this.__wbg_ptr, A, I, g, C, E, i, D, K);
|
|
345
345
|
}
|
|
346
346
|
coCombineVoxelStates(A, I, g, C, E) {
|
|
347
347
|
B.rawcolliderset_coCombineVoxelStates(this.__wbg_ptr, A, I, g, C, E);
|
|
@@ -391,7 +391,7 @@ class r {
|
|
|
391
391
|
}
|
|
392
392
|
coHeightfieldScale(A) {
|
|
393
393
|
const I = B.rawcolliderset_coHeightfieldScale(this.__wbg_ptr, A);
|
|
394
|
-
return I === 0 ? void 0 :
|
|
394
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
395
395
|
}
|
|
396
396
|
coHeightfieldNRows(A) {
|
|
397
397
|
const I = B.rawcolliderset_coHeightfieldNRows(this.__wbg_ptr, A);
|
|
@@ -457,43 +457,43 @@ class r {
|
|
|
457
457
|
return B.rawcolliderset_coContactForceEventThreshold(this.__wbg_ptr, A);
|
|
458
458
|
}
|
|
459
459
|
coContainsPoint(A, I) {
|
|
460
|
-
return o(I,
|
|
460
|
+
return o(I, S), B.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
|
|
461
461
|
}
|
|
462
|
-
coCastShape(A, I, g, C, E, i, D,
|
|
463
|
-
o(I,
|
|
464
|
-
const
|
|
465
|
-
return
|
|
462
|
+
coCastShape(A, I, g, C, E, i, D, K, k) {
|
|
463
|
+
o(I, S), o(g, M), o(C, S), o(E, s), o(i, S);
|
|
464
|
+
const w = B.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D, K, k);
|
|
465
|
+
return w === 0 ? void 0 : oI.__wrap(w);
|
|
466
466
|
}
|
|
467
467
|
coCastCollider(A, I, g, C, E, i, D) {
|
|
468
|
-
o(I,
|
|
469
|
-
const
|
|
470
|
-
return
|
|
468
|
+
o(I, S), o(C, S);
|
|
469
|
+
const K = B.rawcolliderset_coCastCollider(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, E, i, D);
|
|
470
|
+
return K === 0 ? void 0 : QI.__wrap(K);
|
|
471
471
|
}
|
|
472
472
|
coIntersectsShape(A, I, g, C) {
|
|
473
|
-
return o(I, M), o(g,
|
|
473
|
+
return o(I, M), o(g, S), o(C, s), B.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr) !== 0;
|
|
474
474
|
}
|
|
475
475
|
coContactShape(A, I, g, C, E) {
|
|
476
|
-
o(I, M), o(g,
|
|
476
|
+
o(I, M), o(g, S), o(C, s);
|
|
477
477
|
const i = B.rawcolliderset_coContactShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E);
|
|
478
|
-
return i === 0 ? void 0 :
|
|
478
|
+
return i === 0 ? void 0 : pA.__wrap(i);
|
|
479
479
|
}
|
|
480
480
|
coContactCollider(A, I, g) {
|
|
481
481
|
const C = B.rawcolliderset_coContactCollider(this.__wbg_ptr, A, I, g);
|
|
482
|
-
return C === 0 ? void 0 :
|
|
482
|
+
return C === 0 ? void 0 : pA.__wrap(C);
|
|
483
483
|
}
|
|
484
484
|
coProjectPoint(A, I, g) {
|
|
485
|
-
o(I,
|
|
485
|
+
o(I, S);
|
|
486
486
|
const C = B.rawcolliderset_coProjectPoint(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
487
487
|
return EI.__wrap(C);
|
|
488
488
|
}
|
|
489
489
|
coIntersectsRay(A, I, g, C) {
|
|
490
|
-
return o(I,
|
|
490
|
+
return o(I, S), o(g, S), B.rawcolliderset_coIntersectsRay(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C) !== 0;
|
|
491
491
|
}
|
|
492
492
|
coCastRay(A, I, g, C, E) {
|
|
493
|
-
return o(I,
|
|
493
|
+
return o(I, S), o(g, S), B.rawcolliderset_coCastRay(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, E);
|
|
494
494
|
}
|
|
495
495
|
coCastRayAndGetNormal(A, I, g, C, E) {
|
|
496
|
-
o(I,
|
|
496
|
+
o(I, S), o(g, S);
|
|
497
497
|
const i = B.rawcolliderset_coCastRayAndGetNormal(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, E);
|
|
498
498
|
return i === 0 ? void 0 : DI.__wrap(i);
|
|
499
499
|
}
|
|
@@ -546,7 +546,7 @@ class r {
|
|
|
546
546
|
B.rawcolliderset_coSetMass(this.__wbg_ptr, A, I);
|
|
547
547
|
}
|
|
548
548
|
coSetMassProperties(A, I, g, C, E) {
|
|
549
|
-
o(g,
|
|
549
|
+
o(g, S), o(C, S), o(E, s), B.rawcolliderset_coSetMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr);
|
|
550
550
|
}
|
|
551
551
|
constructor() {
|
|
552
552
|
const A = B.rawcolliderset_new();
|
|
@@ -558,10 +558,10 @@ class r {
|
|
|
558
558
|
contains(A) {
|
|
559
559
|
return B.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
|
|
560
560
|
}
|
|
561
|
-
createCollider(A, I, g, C, E, i, D,
|
|
561
|
+
createCollider(A, I, g, C, E, i, D, K, k, w, h, y, U, J, F, l, R, z, iA, sA, LI, tI, HI, pI, jA) {
|
|
562
562
|
try {
|
|
563
563
|
const eI = B.__wbindgen_add_to_stack_pointer(-16);
|
|
564
|
-
o(I, M), o(g,
|
|
564
|
+
o(I, M), o(g, S), o(C, s), o(D, S), o(K, S), o(k, s), o(jA, H), B.rawcolliderset_createCollider(eI, this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E, i, D.__wbg_ptr, K.__wbg_ptr, k.__wbg_ptr, w, h, y, U, J, F, l, R, z, iA, sA, LI, tI, HI, pI, jA.__wbg_ptr);
|
|
565
565
|
var rI = d().getInt32(eI + 0, !0), aC = d().getFloat64(eI + 8, !0);
|
|
566
566
|
return rI === 0 ? void 0 : aC;
|
|
567
567
|
} finally {
|
|
@@ -569,7 +569,7 @@ class r {
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
remove(A, I, g, C) {
|
|
572
|
-
o(I,
|
|
572
|
+
o(I, BA), o(g, H), B.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
|
|
573
573
|
}
|
|
574
574
|
isHandleValid(A) {
|
|
575
575
|
return B.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
|
|
@@ -578,7 +578,7 @@ class r {
|
|
|
578
578
|
try {
|
|
579
579
|
B.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, p(A));
|
|
580
580
|
} finally {
|
|
581
|
-
|
|
581
|
+
q[t++] = void 0;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
}
|
|
@@ -607,19 +607,19 @@ class QI {
|
|
|
607
607
|
}
|
|
608
608
|
witness1() {
|
|
609
609
|
const A = B.rawcollidershapecasthit_witness1(this.__wbg_ptr);
|
|
610
|
-
return
|
|
610
|
+
return S.__wrap(A);
|
|
611
611
|
}
|
|
612
612
|
witness2() {
|
|
613
613
|
const A = B.rawcollidershapecasthit_witness2(this.__wbg_ptr);
|
|
614
|
-
return
|
|
614
|
+
return S.__wrap(A);
|
|
615
615
|
}
|
|
616
616
|
normal1() {
|
|
617
617
|
const A = B.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);
|
|
618
|
-
return
|
|
618
|
+
return S.__wrap(A);
|
|
619
619
|
}
|
|
620
620
|
normal2() {
|
|
621
621
|
const A = B.rawcharactercollision_translationDeltaRemaining(this.__wbg_ptr);
|
|
622
|
-
return
|
|
622
|
+
return S.__wrap(A);
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
const dg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -647,14 +647,14 @@ class zI {
|
|
|
647
647
|
}
|
|
648
648
|
total_force() {
|
|
649
649
|
const A = B.rawcontactforceevent_total_force(this.__wbg_ptr);
|
|
650
|
-
return
|
|
650
|
+
return S.__wrap(A);
|
|
651
651
|
}
|
|
652
652
|
total_force_magnitude() {
|
|
653
653
|
return B.rawcontactforceevent_total_force_magnitude(this.__wbg_ptr);
|
|
654
654
|
}
|
|
655
655
|
max_force_direction() {
|
|
656
656
|
const A = B.rawcontactforceevent_max_force_direction(this.__wbg_ptr);
|
|
657
|
-
return
|
|
657
|
+
return S.__wrap(A);
|
|
658
658
|
}
|
|
659
659
|
max_force_magnitude() {
|
|
660
660
|
return B.rawcontactforceevent_max_force_magnitude(this.__wbg_ptr);
|
|
@@ -679,15 +679,15 @@ class _I {
|
|
|
679
679
|
}
|
|
680
680
|
normal() {
|
|
681
681
|
const A = B.rawcontactmanifold_normal(this.__wbg_ptr);
|
|
682
|
-
return
|
|
682
|
+
return S.__wrap(A);
|
|
683
683
|
}
|
|
684
684
|
local_n1() {
|
|
685
685
|
const A = B.rawcontactmanifold_local_n1(this.__wbg_ptr);
|
|
686
|
-
return
|
|
686
|
+
return S.__wrap(A);
|
|
687
687
|
}
|
|
688
688
|
local_n2() {
|
|
689
689
|
const A = B.rawcontactmanifold_local_n2(this.__wbg_ptr);
|
|
690
|
-
return
|
|
690
|
+
return S.__wrap(A);
|
|
691
691
|
}
|
|
692
692
|
subshape1() {
|
|
693
693
|
return B.rawcontactmanifold_subshape1(this.__wbg_ptr) >>> 0;
|
|
@@ -700,11 +700,11 @@ class _I {
|
|
|
700
700
|
}
|
|
701
701
|
contact_local_p1(A) {
|
|
702
702
|
const I = B.rawcontactmanifold_contact_local_p1(this.__wbg_ptr, A);
|
|
703
|
-
return I === 0 ? void 0 :
|
|
703
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
704
704
|
}
|
|
705
705
|
contact_local_p2(A) {
|
|
706
706
|
const I = B.rawcontactmanifold_contact_local_p2(this.__wbg_ptr, A);
|
|
707
|
-
return I === 0 ? void 0 :
|
|
707
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
708
708
|
}
|
|
709
709
|
contact_dist(A) {
|
|
710
710
|
return B.rawcontactmanifold_contact_dist(this.__wbg_ptr, A);
|
|
@@ -729,7 +729,7 @@ class _I {
|
|
|
729
729
|
}
|
|
730
730
|
solver_contact_point(A) {
|
|
731
731
|
const I = B.rawcontactmanifold_solver_contact_point(this.__wbg_ptr, A);
|
|
732
|
-
return I === 0 ? void 0 :
|
|
732
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
733
733
|
}
|
|
734
734
|
solver_contact_dist(A) {
|
|
735
735
|
return B.rawcontactmanifold_solver_contact_dist(this.__wbg_ptr, A);
|
|
@@ -742,7 +742,7 @@ class _I {
|
|
|
742
742
|
}
|
|
743
743
|
solver_contact_tangent_velocity(A) {
|
|
744
744
|
const I = B.rawcontactmanifold_solver_contact_tangent_velocity(this.__wbg_ptr, A);
|
|
745
|
-
return
|
|
745
|
+
return S.__wrap(I);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
const bg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -793,16 +793,16 @@ class RC {
|
|
|
793
793
|
return this.__wbg_ptr = A >>> 0, jg.register(this, this.__wbg_ptr, this), this;
|
|
794
794
|
}
|
|
795
795
|
vertices() {
|
|
796
|
-
return
|
|
796
|
+
return HA(B.rawdebugrenderpipeline_vertices(this.__wbg_ptr));
|
|
797
797
|
}
|
|
798
798
|
colors() {
|
|
799
|
-
return
|
|
799
|
+
return HA(B.rawdebugrenderpipeline_colors(this.__wbg_ptr));
|
|
800
800
|
}
|
|
801
801
|
render(A, I, g, C, E, i, D) {
|
|
802
802
|
try {
|
|
803
|
-
o(A, H), o(I, r), o(g,
|
|
803
|
+
o(A, H), o(I, r), o(g, CA), o(C, QA), o(E, Z), B.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, p(D));
|
|
804
804
|
} finally {
|
|
805
|
-
|
|
805
|
+
q[t++] = void 0;
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
}
|
|
@@ -825,19 +825,19 @@ class $I {
|
|
|
825
825
|
}
|
|
826
826
|
takeGravity() {
|
|
827
827
|
const A = B.rawdeserializedworld_takeGravity(this.__wbg_ptr);
|
|
828
|
-
return A === 0 ? void 0 :
|
|
828
|
+
return A === 0 ? void 0 : S.__wrap(A);
|
|
829
829
|
}
|
|
830
830
|
takeIntegrationParameters() {
|
|
831
831
|
const A = B.rawdeserializedworld_takeIntegrationParameters(this.__wbg_ptr);
|
|
832
|
-
return A === 0 ? void 0 :
|
|
832
|
+
return A === 0 ? void 0 : SA.__wrap(A);
|
|
833
833
|
}
|
|
834
834
|
takeIslandManager() {
|
|
835
835
|
const A = B.rawdeserializedworld_takeIslandManager(this.__wbg_ptr);
|
|
836
|
-
return A === 0 ? void 0 :
|
|
836
|
+
return A === 0 ? void 0 : BA.__wrap(A);
|
|
837
837
|
}
|
|
838
838
|
takeBroadPhase() {
|
|
839
839
|
const A = B.rawdeserializedworld_takeBroadPhase(this.__wbg_ptr);
|
|
840
|
-
return A === 0 ? void 0 :
|
|
840
|
+
return A === 0 ? void 0 : gA.__wrap(A);
|
|
841
841
|
}
|
|
842
842
|
takeNarrowPhase() {
|
|
843
843
|
const A = B.rawdeserializedworld_takeNarrowPhase(this.__wbg_ptr);
|
|
@@ -853,17 +853,17 @@ class $I {
|
|
|
853
853
|
}
|
|
854
854
|
takeImpulseJoints() {
|
|
855
855
|
const A = B.rawdeserializedworld_takeImpulseJoints(this.__wbg_ptr);
|
|
856
|
-
return A === 0 ? void 0 :
|
|
856
|
+
return A === 0 ? void 0 : CA.__wrap(A);
|
|
857
857
|
}
|
|
858
858
|
takeMultibodyJoints() {
|
|
859
859
|
const A = B.rawdeserializedworld_takeMultibodyJoints(this.__wbg_ptr);
|
|
860
|
-
return A === 0 ? void 0 :
|
|
860
|
+
return A === 0 ? void 0 : QA.__wrap(A);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
const xg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
864
864
|
}, unregister: () => {
|
|
865
865
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawdynamicraycastvehiclecontroller_free(Q >>> 0, 1));
|
|
866
|
-
class
|
|
866
|
+
class cC {
|
|
867
867
|
__destroy_into_raw() {
|
|
868
868
|
const A = this.__wbg_ptr;
|
|
869
869
|
return this.__wbg_ptr = 0, xg.unregister(this), A;
|
|
@@ -895,24 +895,24 @@ class YC {
|
|
|
895
895
|
B.rawdynamicraycastvehiclecontroller_set_index_forward_axis(this.__wbg_ptr, A);
|
|
896
896
|
}
|
|
897
897
|
add_wheel(A, I, g, C, E) {
|
|
898
|
-
o(A,
|
|
898
|
+
o(A, S), o(I, S), o(g, S), B.rawdynamicraycastvehiclecontroller_add_wheel(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C, E);
|
|
899
899
|
}
|
|
900
900
|
num_wheels() {
|
|
901
901
|
return B.rawdynamicraycastvehiclecontroller_num_wheels(this.__wbg_ptr) >>> 0;
|
|
902
902
|
}
|
|
903
|
-
update_vehicle(A, I, g, C, E, i, D,
|
|
903
|
+
update_vehicle(A, I, g, C, E, i, D, K) {
|
|
904
904
|
try {
|
|
905
|
-
o(I,
|
|
905
|
+
o(I, gA), o(g, Z), o(C, H), o(E, r), B.rawdynamicraycastvehiclecontroller_update_vehicle(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, N(D) ? 4294967297 : D >>> 0, p(K));
|
|
906
906
|
} finally {
|
|
907
|
-
|
|
907
|
+
q[t++] = void 0;
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
wheel_chassis_connection_point_cs(A) {
|
|
911
911
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_chassis_connection_point_cs(this.__wbg_ptr, A);
|
|
912
|
-
return I === 0 ? void 0 :
|
|
912
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
913
913
|
}
|
|
914
914
|
set_wheel_chassis_connection_point_cs(A, I) {
|
|
915
|
-
o(I,
|
|
915
|
+
o(I, S), B.rawdynamicraycastvehiclecontroller_set_wheel_chassis_connection_point_cs(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
916
916
|
}
|
|
917
917
|
wheel_suspension_rest_length(A) {
|
|
918
918
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_suspension_rest_length(this.__wbg_ptr, A);
|
|
@@ -986,17 +986,17 @@ class YC {
|
|
|
986
986
|
}
|
|
987
987
|
wheel_direction_cs(A) {
|
|
988
988
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_direction_cs(this.__wbg_ptr, A);
|
|
989
|
-
return I === 0 ? void 0 :
|
|
989
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
990
990
|
}
|
|
991
991
|
set_wheel_direction_cs(A, I) {
|
|
992
|
-
o(I,
|
|
992
|
+
o(I, S), B.rawdynamicraycastvehiclecontroller_set_wheel_direction_cs(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
993
993
|
}
|
|
994
994
|
wheel_axle_cs(A) {
|
|
995
995
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_axle_cs(this.__wbg_ptr, A);
|
|
996
|
-
return I === 0 ? void 0 :
|
|
996
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
997
997
|
}
|
|
998
998
|
set_wheel_axle_cs(A, I) {
|
|
999
|
-
o(I,
|
|
999
|
+
o(I, S), B.rawdynamicraycastvehiclecontroller_set_wheel_axle_cs(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1000
1000
|
}
|
|
1001
1001
|
wheel_friction_slip(A) {
|
|
1002
1002
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_friction_slip(this.__wbg_ptr, A);
|
|
@@ -1030,11 +1030,11 @@ class YC {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
wheel_contact_normal_ws(A) {
|
|
1032
1032
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_contact_normal_ws(this.__wbg_ptr, A);
|
|
1033
|
-
return I === 0 ? void 0 :
|
|
1033
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
1034
1034
|
}
|
|
1035
1035
|
wheel_contact_point_ws(A) {
|
|
1036
1036
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_contact_point_ws(this.__wbg_ptr, A);
|
|
1037
|
-
return I === 0 ? void 0 :
|
|
1037
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
1038
1038
|
}
|
|
1039
1039
|
wheel_suspension_length(A) {
|
|
1040
1040
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_suspension_length(this.__wbg_ptr, A);
|
|
@@ -1042,7 +1042,7 @@ class YC {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
wheel_hard_point_ws(A) {
|
|
1044
1044
|
const I = B.rawdynamicraycastvehiclecontroller_wheel_hard_point_ws(this.__wbg_ptr, A);
|
|
1045
|
-
return I === 0 ? void 0 :
|
|
1045
|
+
return I === 0 ? void 0 : S.__wrap(I);
|
|
1046
1046
|
}
|
|
1047
1047
|
wheel_is_in_contact(A) {
|
|
1048
1048
|
return B.rawdynamicraycastvehiclecontroller_wheel_is_in_contact(this.__wbg_ptr, A) !== 0;
|
|
@@ -1078,14 +1078,14 @@ class kC {
|
|
|
1078
1078
|
try {
|
|
1079
1079
|
B.raweventqueue_drainCollisionEvents(this.__wbg_ptr, p(A));
|
|
1080
1080
|
} finally {
|
|
1081
|
-
|
|
1081
|
+
q[t++] = void 0;
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
1084
|
drainContactForceEvents(A) {
|
|
1085
1085
|
try {
|
|
1086
1086
|
B.raweventqueue_drainContactForceEvents(this.__wbg_ptr, p(A));
|
|
1087
1087
|
} finally {
|
|
1088
|
-
|
|
1088
|
+
q[t++] = void 0;
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
1091
|
clear() {
|
|
@@ -1095,10 +1095,10 @@ class kC {
|
|
|
1095
1095
|
const mg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1096
1096
|
}, unregister: () => {
|
|
1097
1097
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawgenericjoint_free(Q >>> 0, 1));
|
|
1098
|
-
class
|
|
1098
|
+
class x {
|
|
1099
1099
|
static __wrap(A) {
|
|
1100
1100
|
A >>>= 0;
|
|
1101
|
-
const I = Object.create(
|
|
1101
|
+
const I = Object.create(x.prototype);
|
|
1102
1102
|
return I.__wbg_ptr = A, mg.register(I, I.__wbg_ptr, I), I;
|
|
1103
1103
|
}
|
|
1104
1104
|
__destroy_into_raw() {
|
|
@@ -1110,48 +1110,48 @@ class W {
|
|
|
1110
1110
|
B.__wbg_rawgenericjoint_free(A, 0);
|
|
1111
1111
|
}
|
|
1112
1112
|
static generic(A, I, g, C) {
|
|
1113
|
-
o(A,
|
|
1113
|
+
o(A, S), o(I, S), o(g, S);
|
|
1114
1114
|
const E = B.rawgenericjoint_generic(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C);
|
|
1115
|
-
return E === 0 ? void 0 :
|
|
1115
|
+
return E === 0 ? void 0 : x.__wrap(E);
|
|
1116
1116
|
}
|
|
1117
1117
|
static spring(A, I, g, C, E) {
|
|
1118
|
-
o(C,
|
|
1118
|
+
o(C, S), o(E, S);
|
|
1119
1119
|
const i = B.rawgenericjoint_spring(A, I, g, C.__wbg_ptr, E.__wbg_ptr);
|
|
1120
|
-
return
|
|
1120
|
+
return x.__wrap(i);
|
|
1121
1121
|
}
|
|
1122
1122
|
static rope(A, I, g) {
|
|
1123
|
-
o(I,
|
|
1123
|
+
o(I, S), o(g, S);
|
|
1124
1124
|
const C = B.rawgenericjoint_rope(A, I.__wbg_ptr, g.__wbg_ptr);
|
|
1125
|
-
return
|
|
1125
|
+
return x.__wrap(C);
|
|
1126
1126
|
}
|
|
1127
1127
|
static spherical(A, I) {
|
|
1128
|
-
o(A,
|
|
1128
|
+
o(A, S), o(I, S);
|
|
1129
1129
|
const g = B.rawgenericjoint_spherical(A.__wbg_ptr, I.__wbg_ptr);
|
|
1130
|
-
return
|
|
1130
|
+
return x.__wrap(g);
|
|
1131
1131
|
}
|
|
1132
1132
|
static prismatic(A, I, g, C, E, i) {
|
|
1133
|
-
o(A,
|
|
1133
|
+
o(A, S), o(I, S), o(g, S);
|
|
1134
1134
|
const D = B.rawgenericjoint_prismatic(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C, E, i);
|
|
1135
|
-
return D === 0 ? void 0 :
|
|
1135
|
+
return D === 0 ? void 0 : x.__wrap(D);
|
|
1136
1136
|
}
|
|
1137
1137
|
static fixed(A, I, g, C) {
|
|
1138
|
-
o(A,
|
|
1138
|
+
o(A, S), o(I, s), o(g, S), o(C, s);
|
|
1139
1139
|
const E = B.rawgenericjoint_fixed(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr);
|
|
1140
|
-
return
|
|
1140
|
+
return x.__wrap(E);
|
|
1141
1141
|
}
|
|
1142
1142
|
static revolute(A, I, g) {
|
|
1143
|
-
o(A,
|
|
1143
|
+
o(A, S), o(I, S), o(g, S);
|
|
1144
1144
|
const C = B.rawgenericjoint_revolute(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr);
|
|
1145
|
-
return C === 0 ? void 0 :
|
|
1145
|
+
return C === 0 ? void 0 : x.__wrap(C);
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
1148
|
const OI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1149
1149
|
}, unregister: () => {
|
|
1150
1150
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawimpulsejointset_free(Q >>> 0, 1));
|
|
1151
|
-
class
|
|
1151
|
+
class CA {
|
|
1152
1152
|
static __wrap(A) {
|
|
1153
1153
|
A >>>= 0;
|
|
1154
|
-
const I = Object.create(
|
|
1154
|
+
const I = Object.create(CA.prototype);
|
|
1155
1155
|
return I.__wbg_ptr = A, OI.register(I, I.__wbg_ptr, I), I;
|
|
1156
1156
|
}
|
|
1157
1157
|
__destroy_into_raw() {
|
|
@@ -1181,17 +1181,17 @@ class gA {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
jointAnchor1(A) {
|
|
1183
1183
|
const I = B.rawimpulsejointset_jointAnchor1(this.__wbg_ptr, A);
|
|
1184
|
-
return
|
|
1184
|
+
return S.__wrap(I);
|
|
1185
1185
|
}
|
|
1186
1186
|
jointAnchor2(A) {
|
|
1187
1187
|
const I = B.rawimpulsejointset_jointAnchor2(this.__wbg_ptr, A);
|
|
1188
|
-
return
|
|
1188
|
+
return S.__wrap(I);
|
|
1189
1189
|
}
|
|
1190
1190
|
jointSetAnchor1(A, I) {
|
|
1191
|
-
o(I,
|
|
1191
|
+
o(I, S), B.rawimpulsejointset_jointSetAnchor1(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1192
1192
|
}
|
|
1193
1193
|
jointSetAnchor2(A, I) {
|
|
1194
|
-
o(I,
|
|
1194
|
+
o(I, S), B.rawimpulsejointset_jointSetAnchor2(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1195
1195
|
}
|
|
1196
1196
|
jointContactsEnabled(A) {
|
|
1197
1197
|
return B.rawimpulsejointset_jointContactsEnabled(this.__wbg_ptr, A) !== 0;
|
|
@@ -1228,7 +1228,7 @@ class gA {
|
|
|
1228
1228
|
return this.__wbg_ptr = A >>> 0, OI.register(this, this.__wbg_ptr, this), this;
|
|
1229
1229
|
}
|
|
1230
1230
|
createJoint(A, I, g, C) {
|
|
1231
|
-
return o(A,
|
|
1231
|
+
return o(A, x), B.rawimpulsejointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, C);
|
|
1232
1232
|
}
|
|
1233
1233
|
remove(A, I) {
|
|
1234
1234
|
B.rawimpulsejointset_remove(this.__wbg_ptr, A, I);
|
|
@@ -1243,24 +1243,24 @@ class gA {
|
|
|
1243
1243
|
try {
|
|
1244
1244
|
B.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, p(A));
|
|
1245
1245
|
} finally {
|
|
1246
|
-
|
|
1246
|
+
q[t++] = void 0;
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
1249
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1250
1250
|
try {
|
|
1251
1251
|
B.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, p(I));
|
|
1252
1252
|
} finally {
|
|
1253
|
-
|
|
1253
|
+
q[t++] = void 0;
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
1257
|
const dI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1258
1258
|
}, unregister: () => {
|
|
1259
1259
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawintegrationparameters_free(Q >>> 0, 1));
|
|
1260
|
-
class
|
|
1260
|
+
class SA {
|
|
1261
1261
|
static __wrap(A) {
|
|
1262
1262
|
A >>>= 0;
|
|
1263
|
-
const I = Object.create(
|
|
1263
|
+
const I = Object.create(SA.prototype);
|
|
1264
1264
|
return I.__wbg_ptr = A, dI.register(I, I.__wbg_ptr, I), I;
|
|
1265
1265
|
}
|
|
1266
1266
|
__destroy_into_raw() {
|
|
@@ -1333,10 +1333,10 @@ class wA {
|
|
|
1333
1333
|
const ZI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1334
1334
|
}, unregister: () => {
|
|
1335
1335
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawislandmanager_free(Q >>> 0, 1));
|
|
1336
|
-
class
|
|
1336
|
+
class BA {
|
|
1337
1337
|
static __wrap(A) {
|
|
1338
1338
|
A >>>= 0;
|
|
1339
|
-
const I = Object.create(
|
|
1339
|
+
const I = Object.create(BA.prototype);
|
|
1340
1340
|
return I.__wbg_ptr = A, ZI.register(I, I.__wbg_ptr, I), I;
|
|
1341
1341
|
}
|
|
1342
1342
|
__destroy_into_raw() {
|
|
@@ -1355,14 +1355,14 @@ class CA {
|
|
|
1355
1355
|
try {
|
|
1356
1356
|
B.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, p(A));
|
|
1357
1357
|
} finally {
|
|
1358
|
-
|
|
1358
|
+
q[t++] = void 0;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
1362
|
const Xg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1363
1363
|
}, unregister: () => {
|
|
1364
1364
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawkinematiccharactercontroller_free(Q >>> 0, 1));
|
|
1365
|
-
class
|
|
1365
|
+
class YC {
|
|
1366
1366
|
__destroy_into_raw() {
|
|
1367
1367
|
const A = this.__wbg_ptr;
|
|
1368
1368
|
return this.__wbg_ptr = 0, Xg.unregister(this), A;
|
|
@@ -1377,10 +1377,10 @@ class cC {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
up() {
|
|
1379
1379
|
const A = B.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);
|
|
1380
|
-
return
|
|
1380
|
+
return S.__wrap(A);
|
|
1381
1381
|
}
|
|
1382
1382
|
setUp(A) {
|
|
1383
|
-
o(A,
|
|
1383
|
+
o(A, S), B.rawkinematiccharactercontroller_setUp(this.__wbg_ptr, A.__wbg_ptr);
|
|
1384
1384
|
}
|
|
1385
1385
|
normalNudgeFactor() {
|
|
1386
1386
|
return B.rawkinematiccharactercontroller_normalNudgeFactor(this.__wbg_ptr);
|
|
@@ -1446,16 +1446,16 @@ class cC {
|
|
|
1446
1446
|
snapToGroundEnabled() {
|
|
1447
1447
|
return B.rawkinematiccharactercontroller_snapToGroundEnabled(this.__wbg_ptr) !== 0;
|
|
1448
1448
|
}
|
|
1449
|
-
computeColliderMovement(A, I, g, C, E, i, D,
|
|
1449
|
+
computeColliderMovement(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
1450
1450
|
try {
|
|
1451
|
-
o(I,
|
|
1451
|
+
o(I, gA), o(g, Z), o(C, H), o(E, r), o(D, S), B.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i, D.__wbg_ptr, K, N(k) ? 4294967297 : Math.fround(k), w, N(h) ? 4294967297 : h >>> 0, p(y));
|
|
1452
1452
|
} finally {
|
|
1453
|
-
|
|
1453
|
+
q[t++] = void 0;
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
computedMovement() {
|
|
1457
1457
|
const A = B.rawkinematiccharactercontroller_computedMovement(this.__wbg_ptr);
|
|
1458
|
-
return
|
|
1458
|
+
return S.__wrap(A);
|
|
1459
1459
|
}
|
|
1460
1460
|
computedGrounded() {
|
|
1461
1461
|
return B.rawkinematiccharactercontroller_computedGrounded(this.__wbg_ptr) !== 0;
|
|
@@ -1470,10 +1470,10 @@ class cC {
|
|
|
1470
1470
|
const bI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1471
1471
|
}, unregister: () => {
|
|
1472
1472
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawmultibodyjointset_free(Q >>> 0, 1));
|
|
1473
|
-
class
|
|
1473
|
+
class QA {
|
|
1474
1474
|
static __wrap(A) {
|
|
1475
1475
|
A >>>= 0;
|
|
1476
|
-
const I = Object.create(
|
|
1476
|
+
const I = Object.create(QA.prototype);
|
|
1477
1477
|
return I.__wbg_ptr = A, bI.register(I, I.__wbg_ptr, I), I;
|
|
1478
1478
|
}
|
|
1479
1479
|
__destroy_into_raw() {
|
|
@@ -1497,11 +1497,11 @@ class BA {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
jointAnchor1(A) {
|
|
1499
1499
|
const I = B.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr, A);
|
|
1500
|
-
return
|
|
1500
|
+
return S.__wrap(I);
|
|
1501
1501
|
}
|
|
1502
1502
|
jointAnchor2(A) {
|
|
1503
1503
|
const I = B.rawmultibodyjointset_jointAnchor2(this.__wbg_ptr, A);
|
|
1504
|
-
return
|
|
1504
|
+
return S.__wrap(I);
|
|
1505
1505
|
}
|
|
1506
1506
|
jointContactsEnabled(A) {
|
|
1507
1507
|
return B.rawmultibodyjointset_jointContactsEnabled(this.__wbg_ptr, A) !== 0;
|
|
@@ -1523,7 +1523,7 @@ class BA {
|
|
|
1523
1523
|
return this.__wbg_ptr = A >>> 0, bI.register(this, this.__wbg_ptr, this), this;
|
|
1524
1524
|
}
|
|
1525
1525
|
createJoint(A, I, g, C) {
|
|
1526
|
-
return o(A,
|
|
1526
|
+
return o(A, x), B.rawmultibodyjointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, C);
|
|
1527
1527
|
}
|
|
1528
1528
|
remove(A, I) {
|
|
1529
1529
|
B.rawmultibodyjointset_remove(this.__wbg_ptr, A, I);
|
|
@@ -1535,14 +1535,14 @@ class BA {
|
|
|
1535
1535
|
try {
|
|
1536
1536
|
B.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, p(A));
|
|
1537
1537
|
} finally {
|
|
1538
|
-
|
|
1538
|
+
q[t++] = void 0;
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
1541
|
forEachJointAttachedToRigidBody(A, I) {
|
|
1542
1542
|
try {
|
|
1543
1543
|
B.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, p(I));
|
|
1544
1544
|
} finally {
|
|
1545
|
-
|
|
1545
|
+
q[t++] = void 0;
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
@@ -1568,14 +1568,14 @@ class Z {
|
|
|
1568
1568
|
return this.__wbg_ptr = A >>> 0, jI.register(this, this.__wbg_ptr, this), this;
|
|
1569
1569
|
}
|
|
1570
1570
|
contact_pairs_with(A, I) {
|
|
1571
|
-
B.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A,
|
|
1571
|
+
B.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, L(I));
|
|
1572
1572
|
}
|
|
1573
1573
|
contact_pair(A, I) {
|
|
1574
1574
|
const g = B.rawnarrowphase_contact_pair(this.__wbg_ptr, A, I);
|
|
1575
1575
|
return g === 0 ? void 0 : vI.__wrap(g);
|
|
1576
1576
|
}
|
|
1577
1577
|
intersection_pairs_with(A, I) {
|
|
1578
|
-
B.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A,
|
|
1578
|
+
B.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A, L(I));
|
|
1579
1579
|
}
|
|
1580
1580
|
intersection_pair(A, I) {
|
|
1581
1581
|
return B.rawnarrowphase_intersection_pair(this.__wbg_ptr, A, I) !== 0;
|
|
@@ -1651,11 +1651,11 @@ class qC {
|
|
|
1651
1651
|
timing_user_changes() {
|
|
1652
1652
|
return B.rawphysicspipeline_timing_user_changes(this.__wbg_ptr);
|
|
1653
1653
|
}
|
|
1654
|
-
step(A, I, g, C, E, i, D,
|
|
1655
|
-
o(A,
|
|
1654
|
+
step(A, I, g, C, E, i, D, K, k, w) {
|
|
1655
|
+
o(A, S), o(I, SA), o(g, BA), o(C, gA), o(E, Z), o(i, H), o(D, r), o(K, CA), o(k, QA), o(w, PI), B.rawphysicspipeline_step(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr, K.__wbg_ptr, k.__wbg_ptr, w.__wbg_ptr);
|
|
1656
1656
|
}
|
|
1657
|
-
stepWithEvents(A, I, g, C, E, i, D,
|
|
1658
|
-
o(A,
|
|
1657
|
+
stepWithEvents(A, I, g, C, E, i, D, K, k, w, h, y, U, J) {
|
|
1658
|
+
o(A, S), o(I, SA), o(g, BA), o(C, gA), o(E, Z), o(i, H), o(D, r), o(K, CA), o(k, QA), o(w, PI), o(h, kC), B.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr, K.__wbg_ptr, k.__wbg_ptr, w.__wbg_ptr, h.__wbg_ptr, L(y), L(U), L(J));
|
|
1659
1659
|
}
|
|
1660
1660
|
}
|
|
1661
1661
|
const Pg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1690,20 +1690,20 @@ class lC {
|
|
|
1690
1690
|
B.rawpidcontroller_reset_integrals(this.__wbg_ptr);
|
|
1691
1691
|
}
|
|
1692
1692
|
apply_linear_correction(A, I, g, C, E) {
|
|
1693
|
-
o(I, H), o(C,
|
|
1693
|
+
o(I, H), o(C, S), o(E, S), B.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, E.__wbg_ptr);
|
|
1694
1694
|
}
|
|
1695
1695
|
apply_angular_correction(A, I, g, C, E) {
|
|
1696
|
-
o(I, H), o(C, s), o(E,
|
|
1696
|
+
o(I, H), o(C, s), o(E, S), B.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, E.__wbg_ptr);
|
|
1697
1697
|
}
|
|
1698
1698
|
linear_correction(A, I, g, C, E) {
|
|
1699
|
-
o(I, H), o(C,
|
|
1699
|
+
o(I, H), o(C, S), o(E, S);
|
|
1700
1700
|
const i = B.rawpidcontroller_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, E.__wbg_ptr);
|
|
1701
|
-
return
|
|
1701
|
+
return S.__wrap(i);
|
|
1702
1702
|
}
|
|
1703
1703
|
angular_correction(A, I, g, C, E) {
|
|
1704
|
-
o(I, H), o(C, s), o(E,
|
|
1704
|
+
o(I, H), o(C, s), o(E, S);
|
|
1705
1705
|
const i = B.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, E.__wbg_ptr);
|
|
1706
|
-
return
|
|
1706
|
+
return S.__wrap(i);
|
|
1707
1707
|
}
|
|
1708
1708
|
}
|
|
1709
1709
|
const ug = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -1728,7 +1728,7 @@ class fA {
|
|
|
1728
1728
|
}
|
|
1729
1729
|
point() {
|
|
1730
1730
|
const A = B.rawpointcolliderprojection_point(this.__wbg_ptr);
|
|
1731
|
-
return
|
|
1731
|
+
return S.__wrap(A);
|
|
1732
1732
|
}
|
|
1733
1733
|
isInside() {
|
|
1734
1734
|
return B.rawpointcolliderprojection_isInside(this.__wbg_ptr) !== 0;
|
|
@@ -1760,7 +1760,7 @@ class EI {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
point() {
|
|
1762
1762
|
const A = B.rawpointprojection_point(this.__wbg_ptr);
|
|
1763
|
-
return
|
|
1763
|
+
return S.__wrap(A);
|
|
1764
1764
|
}
|
|
1765
1765
|
isInside() {
|
|
1766
1766
|
return B.rawpointprojection_isInside(this.__wbg_ptr) !== 0;
|
|
@@ -1812,7 +1812,7 @@ class iI {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
normal() {
|
|
1814
1814
|
const A = B.rawcollidershapecasthit_witness1(this.__wbg_ptr);
|
|
1815
|
-
return
|
|
1815
|
+
return S.__wrap(A);
|
|
1816
1816
|
}
|
|
1817
1817
|
time_of_impact() {
|
|
1818
1818
|
return B.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr);
|
|
@@ -1844,7 +1844,7 @@ class DI {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
normal() {
|
|
1846
1846
|
const A = B.rawcollidershapecasthit_witness1(this.__wbg_ptr);
|
|
1847
|
-
return
|
|
1847
|
+
return S.__wrap(A);
|
|
1848
1848
|
}
|
|
1849
1849
|
time_of_impact() {
|
|
1850
1850
|
return B.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr);
|
|
@@ -1876,7 +1876,7 @@ class H {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
rbTranslation(A) {
|
|
1878
1878
|
const I = B.rawrigidbodyset_rbTranslation(this.__wbg_ptr, A);
|
|
1879
|
-
return
|
|
1879
|
+
return S.__wrap(I);
|
|
1880
1880
|
}
|
|
1881
1881
|
rbRotation(A) {
|
|
1882
1882
|
const I = B.rawrigidbodyset_rbRotation(this.__wbg_ptr, A);
|
|
@@ -1893,7 +1893,7 @@ class H {
|
|
|
1893
1893
|
}
|
|
1894
1894
|
rbNextTranslation(A) {
|
|
1895
1895
|
const I = B.rawrigidbodyset_rbNextTranslation(this.__wbg_ptr, A);
|
|
1896
|
-
return
|
|
1896
|
+
return S.__wrap(I);
|
|
1897
1897
|
}
|
|
1898
1898
|
rbNextRotation(A) {
|
|
1899
1899
|
const I = B.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, A);
|
|
@@ -1906,10 +1906,10 @@ class H {
|
|
|
1906
1906
|
B.rawrigidbodyset_rbSetRotation(this.__wbg_ptr, A, I, g, C, E, i);
|
|
1907
1907
|
}
|
|
1908
1908
|
rbSetLinvel(A, I, g) {
|
|
1909
|
-
o(I,
|
|
1909
|
+
o(I, S), B.rawrigidbodyset_rbSetLinvel(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
1910
1910
|
}
|
|
1911
1911
|
rbSetAngvel(A, I, g) {
|
|
1912
|
-
o(I,
|
|
1912
|
+
o(I, S), B.rawrigidbodyset_rbSetAngvel(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
1913
1913
|
}
|
|
1914
1914
|
rbSetNextKinematicTranslation(A, I, g, C) {
|
|
1915
1915
|
B.rawrigidbodyset_rbSetNextKinematicTranslation(this.__wbg_ptr, A, I, g, C);
|
|
@@ -1924,20 +1924,20 @@ class H {
|
|
|
1924
1924
|
B.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr, A, I, g);
|
|
1925
1925
|
}
|
|
1926
1926
|
rbSetAdditionalMassProperties(A, I, g, C, E, i) {
|
|
1927
|
-
o(g,
|
|
1927
|
+
o(g, S), o(C, S), o(E, s), B.rawrigidbodyset_rbSetAdditionalMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i);
|
|
1928
1928
|
}
|
|
1929
1929
|
rbLinvel(A) {
|
|
1930
1930
|
const I = B.rawrigidbodyset_rbLinvel(this.__wbg_ptr, A);
|
|
1931
|
-
return
|
|
1931
|
+
return S.__wrap(I);
|
|
1932
1932
|
}
|
|
1933
1933
|
rbAngvel(A) {
|
|
1934
1934
|
const I = B.rawrigidbodyset_rbAngvel(this.__wbg_ptr, A);
|
|
1935
|
-
return
|
|
1935
|
+
return S.__wrap(I);
|
|
1936
1936
|
}
|
|
1937
1937
|
rbVelocityAtPoint(A, I) {
|
|
1938
|
-
o(I,
|
|
1938
|
+
o(I, S);
|
|
1939
1939
|
const g = B.rawrigidbodyset_rbVelocityAtPoint(this.__wbg_ptr, A, I.__wbg_ptr);
|
|
1940
|
-
return
|
|
1940
|
+
return S.__wrap(g);
|
|
1941
1941
|
}
|
|
1942
1942
|
rbLockTranslations(A, I, g) {
|
|
1943
1943
|
B.rawrigidbodyset_rbLockTranslations(this.__wbg_ptr, A, I, g);
|
|
@@ -1971,19 +1971,19 @@ class H {
|
|
|
1971
1971
|
}
|
|
1972
1972
|
rbEffectiveInvMass(A) {
|
|
1973
1973
|
const I = B.rawrigidbodyset_rbEffectiveInvMass(this.__wbg_ptr, A);
|
|
1974
|
-
return
|
|
1974
|
+
return S.__wrap(I);
|
|
1975
1975
|
}
|
|
1976
1976
|
rbLocalCom(A) {
|
|
1977
1977
|
const I = B.rawrigidbodyset_rbLocalCom(this.__wbg_ptr, A);
|
|
1978
|
-
return
|
|
1978
|
+
return S.__wrap(I);
|
|
1979
1979
|
}
|
|
1980
1980
|
rbWorldCom(A) {
|
|
1981
1981
|
const I = B.rawrigidbodyset_rbWorldCom(this.__wbg_ptr, A);
|
|
1982
|
-
return
|
|
1982
|
+
return S.__wrap(I);
|
|
1983
1983
|
}
|
|
1984
1984
|
rbInvPrincipalInertia(A) {
|
|
1985
1985
|
const I = B.rawrigidbodyset_rbInvPrincipalInertia(this.__wbg_ptr, A);
|
|
1986
|
-
return
|
|
1986
|
+
return S.__wrap(I);
|
|
1987
1987
|
}
|
|
1988
1988
|
rbPrincipalInertiaLocalFrame(A) {
|
|
1989
1989
|
const I = B.rawrigidbodyset_rbPrincipalInertiaLocalFrame(this.__wbg_ptr, A);
|
|
@@ -1991,7 +1991,7 @@ class H {
|
|
|
1991
1991
|
}
|
|
1992
1992
|
rbPrincipalInertia(A) {
|
|
1993
1993
|
const I = B.rawrigidbodyset_rbPrincipalInertia(this.__wbg_ptr, A);
|
|
1994
|
-
return
|
|
1994
|
+
return S.__wrap(I);
|
|
1995
1995
|
}
|
|
1996
1996
|
rbEffectiveWorldInvInertia(A) {
|
|
1997
1997
|
const I = B.rawrigidbodyset_rbEffectiveWorldInvInertia(this.__wbg_ptr, A);
|
|
@@ -2062,22 +2062,22 @@ class H {
|
|
|
2062
2062
|
B.rawrigidbodyset_rbResetTorques(this.__wbg_ptr, A, I);
|
|
2063
2063
|
}
|
|
2064
2064
|
rbAddForce(A, I, g) {
|
|
2065
|
-
o(I,
|
|
2065
|
+
o(I, S), B.rawrigidbodyset_rbAddForce(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
2066
2066
|
}
|
|
2067
2067
|
rbApplyImpulse(A, I, g) {
|
|
2068
|
-
o(I,
|
|
2068
|
+
o(I, S), B.rawrigidbodyset_rbApplyImpulse(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
2069
2069
|
}
|
|
2070
2070
|
rbAddTorque(A, I, g) {
|
|
2071
|
-
o(I,
|
|
2071
|
+
o(I, S), B.rawrigidbodyset_rbAddTorque(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
2072
2072
|
}
|
|
2073
2073
|
rbApplyTorqueImpulse(A, I, g) {
|
|
2074
|
-
o(I,
|
|
2074
|
+
o(I, S), B.rawrigidbodyset_rbApplyTorqueImpulse(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
2075
2075
|
}
|
|
2076
2076
|
rbAddForceAtPoint(A, I, g, C) {
|
|
2077
|
-
o(I,
|
|
2077
|
+
o(I, S), o(g, S), B.rawrigidbodyset_rbAddForceAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
|
|
2078
2078
|
}
|
|
2079
2079
|
rbApplyImpulseAtPoint(A, I, g, C) {
|
|
2080
|
-
o(I,
|
|
2080
|
+
o(I, S), o(g, S), B.rawrigidbodyset_rbApplyImpulseAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
|
|
2081
2081
|
}
|
|
2082
2082
|
rbAdditionalSolverIterations(A) {
|
|
2083
2083
|
return B.rawrigidbodyset_rbAdditionalSolverIterations(this.__wbg_ptr, A) >>> 0;
|
|
@@ -2093,21 +2093,21 @@ class H {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
rbUserForce(A) {
|
|
2095
2095
|
const I = B.rawrigidbodyset_rbUserForce(this.__wbg_ptr, A);
|
|
2096
|
-
return
|
|
2096
|
+
return S.__wrap(I);
|
|
2097
2097
|
}
|
|
2098
2098
|
rbUserTorque(A) {
|
|
2099
2099
|
const I = B.rawrigidbodyset_rbUserTorque(this.__wbg_ptr, A);
|
|
2100
|
-
return
|
|
2100
|
+
return S.__wrap(I);
|
|
2101
2101
|
}
|
|
2102
2102
|
constructor() {
|
|
2103
2103
|
const A = B.rawrigidbodyset_new();
|
|
2104
2104
|
return this.__wbg_ptr = A >>> 0, WI.register(this, this.__wbg_ptr, this), this;
|
|
2105
2105
|
}
|
|
2106
|
-
createRigidBody(A, I, g, C, E, i, D,
|
|
2107
|
-
return o(I,
|
|
2106
|
+
createRigidBody(A, I, g, C, E, i, D, K, k, w, h, y, U, J, F, l, R, z, iA, sA, LI, tI, HI, pI, jA, rI) {
|
|
2107
|
+
return o(I, S), o(g, s), o(D, S), o(K, S), o(k, S), o(w, S), o(h, s), B.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, E, i, D.__wbg_ptr, K.__wbg_ptr, k.__wbg_ptr, w.__wbg_ptr, h.__wbg_ptr, y, U, J, F, l, R, z, iA, sA, LI, tI, HI, pI, jA, rI);
|
|
2108
2108
|
}
|
|
2109
2109
|
remove(A, I, g, C, E) {
|
|
2110
|
-
o(I,
|
|
2110
|
+
o(I, BA), o(g, r), o(C, CA), o(E, QA), B.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr);
|
|
2111
2111
|
}
|
|
2112
2112
|
len() {
|
|
2113
2113
|
return B.rawrigidbodyset_len(this.__wbg_ptr) >>> 0;
|
|
@@ -2119,7 +2119,7 @@ class H {
|
|
|
2119
2119
|
try {
|
|
2120
2120
|
B.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, p(A));
|
|
2121
2121
|
} finally {
|
|
2122
|
-
|
|
2122
|
+
q[t++] = void 0;
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
2125
|
propagateModifiedBodyPositionsToColliders(A) {
|
|
@@ -2182,7 +2182,7 @@ class mA {
|
|
|
2182
2182
|
B.__wbg_rawsdpmatrix3_free(A, 0);
|
|
2183
2183
|
}
|
|
2184
2184
|
elements() {
|
|
2185
|
-
return
|
|
2185
|
+
return HA(B.rawsdpmatrix3_elements(this.__wbg_ptr));
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
2188
|
const IC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
@@ -2201,11 +2201,11 @@ class LC {
|
|
|
2201
2201
|
const A = B.rawccdsolver_new();
|
|
2202
2202
|
return this.__wbg_ptr = A >>> 0, IC.register(this, this.__wbg_ptr, this), this;
|
|
2203
2203
|
}
|
|
2204
|
-
serializeAll(A, I, g, C, E, i, D,
|
|
2205
|
-
return o(A,
|
|
2204
|
+
serializeAll(A, I, g, C, E, i, D, K, k) {
|
|
2205
|
+
return o(A, S), o(I, SA), o(g, BA), o(C, gA), o(E, Z), o(i, H), o(D, r), o(K, CA), o(k, QA), HA(B.rawserializationpipeline_serializeAll(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr, K.__wbg_ptr, k.__wbg_ptr));
|
|
2206
2206
|
}
|
|
2207
2207
|
deserializeAll(A) {
|
|
2208
|
-
const I = B.rawserializationpipeline_deserializeAll(this.__wbg_ptr,
|
|
2208
|
+
const I = B.rawserializationpipeline_deserializeAll(this.__wbg_ptr, L(A));
|
|
2209
2209
|
return I === 0 ? void 0 : $I.__wrap(I);
|
|
2210
2210
|
}
|
|
2211
2211
|
}
|
|
@@ -2239,7 +2239,7 @@ class M {
|
|
|
2239
2239
|
return M.__wrap(I);
|
|
2240
2240
|
}
|
|
2241
2241
|
static halfspace(A) {
|
|
2242
|
-
o(A,
|
|
2242
|
+
o(A, S);
|
|
2243
2243
|
const I = B.rawshape_halfspace(A.__wbg_ptr);
|
|
2244
2244
|
return M.__wrap(I);
|
|
2245
2245
|
}
|
|
@@ -2264,89 +2264,89 @@ class M {
|
|
|
2264
2264
|
return M.__wrap(C);
|
|
2265
2265
|
}
|
|
2266
2266
|
static voxels(A, I) {
|
|
2267
|
-
o(A,
|
|
2268
|
-
const g =
|
|
2267
|
+
o(A, S);
|
|
2268
|
+
const g = RA(I, B.__wbindgen_export_2), C = m, E = B.rawshape_voxels(A.__wbg_ptr, g, C);
|
|
2269
2269
|
return M.__wrap(E);
|
|
2270
2270
|
}
|
|
2271
2271
|
static voxelsFromPoints(A, I) {
|
|
2272
|
-
o(A,
|
|
2273
|
-
const g =
|
|
2272
|
+
o(A, S);
|
|
2273
|
+
const g = DA(I, B.__wbindgen_export_2), C = m, E = B.rawshape_voxelsFromPoints(A.__wbg_ptr, g, C);
|
|
2274
2274
|
return M.__wrap(E);
|
|
2275
2275
|
}
|
|
2276
2276
|
static polyline(A, I) {
|
|
2277
|
-
const g =
|
|
2277
|
+
const g = DA(A, B.__wbindgen_export_2), C = m, E = RA(I, B.__wbindgen_export_2), i = m, D = B.rawshape_polyline(g, C, E, i);
|
|
2278
2278
|
return M.__wrap(D);
|
|
2279
2279
|
}
|
|
2280
2280
|
static trimesh(A, I, g) {
|
|
2281
|
-
const C =
|
|
2282
|
-
return
|
|
2281
|
+
const C = DA(A, B.__wbindgen_export_2), E = m, i = RA(I, B.__wbindgen_export_2), D = m, K = B.rawshape_trimesh(C, E, i, D, g);
|
|
2282
|
+
return K === 0 ? void 0 : M.__wrap(K);
|
|
2283
2283
|
}
|
|
2284
2284
|
static heightfield(A, I, g, C, E) {
|
|
2285
|
-
const i =
|
|
2286
|
-
o(C,
|
|
2287
|
-
const
|
|
2288
|
-
return M.__wrap(
|
|
2285
|
+
const i = DA(g, B.__wbindgen_export_2), D = m;
|
|
2286
|
+
o(C, S);
|
|
2287
|
+
const K = B.rawshape_heightfield(A, I, i, D, C.__wbg_ptr, E);
|
|
2288
|
+
return M.__wrap(K);
|
|
2289
2289
|
}
|
|
2290
2290
|
static segment(A, I) {
|
|
2291
|
-
o(A,
|
|
2291
|
+
o(A, S), o(I, S);
|
|
2292
2292
|
const g = B.rawshape_segment(A.__wbg_ptr, I.__wbg_ptr);
|
|
2293
2293
|
return M.__wrap(g);
|
|
2294
2294
|
}
|
|
2295
2295
|
static triangle(A, I, g) {
|
|
2296
|
-
o(A,
|
|
2296
|
+
o(A, S), o(I, S), o(g, S);
|
|
2297
2297
|
const C = B.rawshape_triangle(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr);
|
|
2298
2298
|
return M.__wrap(C);
|
|
2299
2299
|
}
|
|
2300
2300
|
static roundTriangle(A, I, g, C) {
|
|
2301
|
-
o(A,
|
|
2301
|
+
o(A, S), o(I, S), o(g, S);
|
|
2302
2302
|
const E = B.rawshape_roundTriangle(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C);
|
|
2303
2303
|
return M.__wrap(E);
|
|
2304
2304
|
}
|
|
2305
2305
|
static convexHull(A) {
|
|
2306
|
-
const I =
|
|
2306
|
+
const I = DA(A, B.__wbindgen_export_2), g = m, C = B.rawshape_convexHull(I, g);
|
|
2307
2307
|
return C === 0 ? void 0 : M.__wrap(C);
|
|
2308
2308
|
}
|
|
2309
2309
|
static roundConvexHull(A, I) {
|
|
2310
|
-
const g =
|
|
2310
|
+
const g = DA(A, B.__wbindgen_export_2), C = m, E = B.rawshape_roundConvexHull(g, C, I);
|
|
2311
2311
|
return E === 0 ? void 0 : M.__wrap(E);
|
|
2312
2312
|
}
|
|
2313
2313
|
static convexMesh(A, I) {
|
|
2314
|
-
const g =
|
|
2314
|
+
const g = DA(A, B.__wbindgen_export_2), C = m, E = RA(I, B.__wbindgen_export_2), i = m, D = B.rawshape_convexMesh(g, C, E, i);
|
|
2315
2315
|
return D === 0 ? void 0 : M.__wrap(D);
|
|
2316
2316
|
}
|
|
2317
2317
|
static roundConvexMesh(A, I, g) {
|
|
2318
|
-
const C =
|
|
2319
|
-
return
|
|
2318
|
+
const C = DA(A, B.__wbindgen_export_2), E = m, i = RA(I, B.__wbindgen_export_2), D = m, K = B.rawshape_roundConvexMesh(C, E, i, D, g);
|
|
2319
|
+
return K === 0 ? void 0 : M.__wrap(K);
|
|
2320
2320
|
}
|
|
2321
|
-
castShape(A, I, g, C, E, i, D,
|
|
2322
|
-
o(A,
|
|
2323
|
-
const h = B.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr,
|
|
2321
|
+
castShape(A, I, g, C, E, i, D, K, k, w) {
|
|
2322
|
+
o(A, S), o(I, s), o(g, S), o(C, M), o(E, S), o(i, s), o(D, S);
|
|
2323
|
+
const h = B.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr, K, k, w);
|
|
2324
2324
|
return h === 0 ? void 0 : oI.__wrap(h);
|
|
2325
2325
|
}
|
|
2326
2326
|
intersectsShape(A, I, g, C, E) {
|
|
2327
|
-
return o(A,
|
|
2327
|
+
return o(A, S), o(I, s), o(g, M), o(C, S), o(E, s), B.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr) !== 0;
|
|
2328
2328
|
}
|
|
2329
2329
|
contactShape(A, I, g, C, E, i) {
|
|
2330
|
-
o(A,
|
|
2330
|
+
o(A, S), o(I, s), o(g, M), o(C, S), o(E, s);
|
|
2331
2331
|
const D = B.rawshape_contactShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E.__wbg_ptr, i);
|
|
2332
|
-
return D === 0 ? void 0 :
|
|
2332
|
+
return D === 0 ? void 0 : pA.__wrap(D);
|
|
2333
2333
|
}
|
|
2334
2334
|
containsPoint(A, I, g) {
|
|
2335
|
-
return o(A,
|
|
2335
|
+
return o(A, S), o(I, s), o(g, S), B.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr) !== 0;
|
|
2336
2336
|
}
|
|
2337
2337
|
projectPoint(A, I, g, C) {
|
|
2338
|
-
o(A,
|
|
2338
|
+
o(A, S), o(I, s), o(g, S);
|
|
2339
2339
|
const E = B.rawshape_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C);
|
|
2340
2340
|
return EI.__wrap(E);
|
|
2341
2341
|
}
|
|
2342
2342
|
intersectsRay(A, I, g, C, E) {
|
|
2343
|
-
return o(A,
|
|
2343
|
+
return o(A, S), o(I, s), o(g, S), o(C, S), B.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E) !== 0;
|
|
2344
2344
|
}
|
|
2345
2345
|
castRay(A, I, g, C, E, i) {
|
|
2346
|
-
return o(A,
|
|
2346
|
+
return o(A, S), o(I, s), o(g, S), o(C, S), B.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E, i);
|
|
2347
2347
|
}
|
|
2348
2348
|
castRayAndGetNormal(A, I, g, C, E, i) {
|
|
2349
|
-
o(A,
|
|
2349
|
+
o(A, S), o(I, s), o(g, S), o(C, S);
|
|
2350
2350
|
const D = B.rawshape_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, E, i);
|
|
2351
2351
|
return D === 0 ? void 0 : DI.__wrap(D);
|
|
2352
2352
|
}
|
|
@@ -2373,28 +2373,28 @@ class oI {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
witness1() {
|
|
2375
2375
|
const A = B.rawshapecasthit_witness1(this.__wbg_ptr);
|
|
2376
|
-
return
|
|
2376
|
+
return S.__wrap(A);
|
|
2377
2377
|
}
|
|
2378
2378
|
witness2() {
|
|
2379
2379
|
const A = B.rawcontactforceevent_total_force(this.__wbg_ptr);
|
|
2380
|
-
return
|
|
2380
|
+
return S.__wrap(A);
|
|
2381
2381
|
}
|
|
2382
2382
|
normal1() {
|
|
2383
2383
|
const A = B.rawshapecasthit_normal1(this.__wbg_ptr);
|
|
2384
|
-
return
|
|
2384
|
+
return S.__wrap(A);
|
|
2385
2385
|
}
|
|
2386
2386
|
normal2() {
|
|
2387
2387
|
const A = B.rawshapecasthit_normal2(this.__wbg_ptr);
|
|
2388
|
-
return
|
|
2388
|
+
return S.__wrap(A);
|
|
2389
2389
|
}
|
|
2390
2390
|
}
|
|
2391
2391
|
const BC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
2392
2392
|
}, unregister: () => {
|
|
2393
2393
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawshapecontact_free(Q >>> 0, 1));
|
|
2394
|
-
class
|
|
2394
|
+
class pA {
|
|
2395
2395
|
static __wrap(A) {
|
|
2396
2396
|
A >>>= 0;
|
|
2397
|
-
const I = Object.create(
|
|
2397
|
+
const I = Object.create(pA.prototype);
|
|
2398
2398
|
return I.__wbg_ptr = A, BC.register(I, I.__wbg_ptr, I), I;
|
|
2399
2399
|
}
|
|
2400
2400
|
__destroy_into_raw() {
|
|
@@ -2410,28 +2410,28 @@ class HA {
|
|
|
2410
2410
|
}
|
|
2411
2411
|
point1() {
|
|
2412
2412
|
const A = B.rawpointprojection_point(this.__wbg_ptr);
|
|
2413
|
-
return
|
|
2413
|
+
return S.__wrap(A);
|
|
2414
2414
|
}
|
|
2415
2415
|
point2() {
|
|
2416
2416
|
const A = B.rawcollidershapecasthit_witness1(this.__wbg_ptr);
|
|
2417
|
-
return
|
|
2417
|
+
return S.__wrap(A);
|
|
2418
2418
|
}
|
|
2419
2419
|
normal1() {
|
|
2420
2420
|
const A = B.rawcollidershapecasthit_witness2(this.__wbg_ptr);
|
|
2421
|
-
return
|
|
2421
|
+
return S.__wrap(A);
|
|
2422
2422
|
}
|
|
2423
2423
|
normal2() {
|
|
2424
2424
|
const A = B.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);
|
|
2425
|
-
return
|
|
2425
|
+
return S.__wrap(A);
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
2428
|
const fI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
2429
2429
|
}, unregister: () => {
|
|
2430
2430
|
} } : new FinalizationRegistry((Q) => B.__wbg_rawvector_free(Q >>> 0, 1));
|
|
2431
|
-
class
|
|
2431
|
+
class S {
|
|
2432
2432
|
static __wrap(A) {
|
|
2433
2433
|
A >>>= 0;
|
|
2434
|
-
const I = Object.create(
|
|
2434
|
+
const I = Object.create(S.prototype);
|
|
2435
2435
|
return I.__wbg_ptr = A, fI.register(I, I.__wbg_ptr, I), I;
|
|
2436
2436
|
}
|
|
2437
2437
|
__destroy_into_raw() {
|
|
@@ -2444,7 +2444,7 @@ class w {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
static zero() {
|
|
2446
2446
|
const A = B.rawvector_zero();
|
|
2447
|
-
return
|
|
2447
|
+
return S.__wrap(A);
|
|
2448
2448
|
}
|
|
2449
2449
|
constructor(A, I, g) {
|
|
2450
2450
|
const C = B.rawvector_new(A, I, g);
|
|
@@ -2470,27 +2470,27 @@ class w {
|
|
|
2470
2470
|
}
|
|
2471
2471
|
xyz() {
|
|
2472
2472
|
const A = B.rawvector_xyz(this.__wbg_ptr);
|
|
2473
|
-
return
|
|
2473
|
+
return S.__wrap(A);
|
|
2474
2474
|
}
|
|
2475
2475
|
yxz() {
|
|
2476
2476
|
const A = B.rawvector_yxz(this.__wbg_ptr);
|
|
2477
|
-
return
|
|
2477
|
+
return S.__wrap(A);
|
|
2478
2478
|
}
|
|
2479
2479
|
zxy() {
|
|
2480
2480
|
const A = B.rawvector_zxy(this.__wbg_ptr);
|
|
2481
|
-
return
|
|
2481
|
+
return S.__wrap(A);
|
|
2482
2482
|
}
|
|
2483
2483
|
xzy() {
|
|
2484
2484
|
const A = B.rawvector_xzy(this.__wbg_ptr);
|
|
2485
|
-
return
|
|
2485
|
+
return S.__wrap(A);
|
|
2486
2486
|
}
|
|
2487
2487
|
yzx() {
|
|
2488
2488
|
const A = B.rawvector_yzx(this.__wbg_ptr);
|
|
2489
|
-
return
|
|
2489
|
+
return S.__wrap(A);
|
|
2490
2490
|
}
|
|
2491
2491
|
zyx() {
|
|
2492
2492
|
const A = B.rawvector_zyx(this.__wbg_ptr);
|
|
2493
|
-
return
|
|
2493
|
+
return S.__wrap(A);
|
|
2494
2494
|
}
|
|
2495
2495
|
}
|
|
2496
2496
|
async function KC(Q) {
|
|
@@ -2498,82 +2498,82 @@ async function KC(Q) {
|
|
|
2498
2498
|
Q !== void 0 && (Object.getPrototypeOf(Q) === Object.prototype ? { module_or_path: Q } = Q : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), Q === void 0 && (Q = new URL("rapier_wasm3d_bg.wasm", "<deleted>"));
|
|
2499
2499
|
const A = function() {
|
|
2500
2500
|
const C = { wbg: {} };
|
|
2501
|
-
return C.wbg.__wbg_bind_c8359b1cba058168 = function(E, i, D,
|
|
2502
|
-
return
|
|
2501
|
+
return C.wbg.__wbg_bind_c8359b1cba058168 = function(E, i, D, K) {
|
|
2502
|
+
return L(c(E).bind(c(i), c(D), c(K)));
|
|
2503
2503
|
}, C.wbg.__wbg_buffer_609cc3eee51ed158 = function(E) {
|
|
2504
|
-
return
|
|
2504
|
+
return L(c(E).buffer);
|
|
2505
2505
|
}, C.wbg.__wbg_call_672a4d21634d4a24 = function() {
|
|
2506
|
-
return
|
|
2507
|
-
return
|
|
2506
|
+
return WA(function(E, i) {
|
|
2507
|
+
return L(c(E).call(c(i)));
|
|
2508
2508
|
}, arguments);
|
|
2509
2509
|
}, C.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
|
2510
|
-
return
|
|
2511
|
-
return
|
|
2510
|
+
return WA(function(E, i, D) {
|
|
2511
|
+
return L(c(E).call(c(i), c(D)));
|
|
2512
2512
|
}, arguments);
|
|
2513
2513
|
}, C.wbg.__wbg_call_833bed5770ea2041 = function() {
|
|
2514
|
-
return
|
|
2515
|
-
return
|
|
2514
|
+
return WA(function(E, i, D, K) {
|
|
2515
|
+
return L(c(E).call(c(i), c(D), c(K)));
|
|
2516
2516
|
}, arguments);
|
|
2517
2517
|
}, C.wbg.__wbg_call_b8adc8b1d0a0d8eb = function() {
|
|
2518
|
-
return
|
|
2519
|
-
return
|
|
2518
|
+
return WA(function(E, i, D, K, k) {
|
|
2519
|
+
return L(c(E).call(c(i), c(D), c(K), c(k)));
|
|
2520
2520
|
}, arguments);
|
|
2521
2521
|
}, C.wbg.__wbg_length_3b4f022188ae8db6 = function(E) {
|
|
2522
|
-
return
|
|
2522
|
+
return c(E).length;
|
|
2523
2523
|
}, C.wbg.__wbg_length_a446193dc22c12f8 = function(E) {
|
|
2524
|
-
return
|
|
2524
|
+
return c(E).length;
|
|
2525
2525
|
}, C.wbg.__wbg_new_a12002a7f91c75be = function(E) {
|
|
2526
|
-
return
|
|
2526
|
+
return L(new Uint8Array(c(E)));
|
|
2527
2527
|
}, C.wbg.__wbg_newnoargs_105ed471475aaf50 = function(E, i) {
|
|
2528
|
-
return
|
|
2528
|
+
return L(new Function(VI(E, i)));
|
|
2529
2529
|
}, C.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(E, i, D) {
|
|
2530
|
-
return
|
|
2530
|
+
return L(new Uint8Array(c(E), i >>> 0, D >>> 0));
|
|
2531
2531
|
}, C.wbg.__wbg_newwithbyteoffsetandlength_e6b7e69acd4c7354 = function(E, i, D) {
|
|
2532
|
-
return
|
|
2532
|
+
return L(new Float32Array(c(E), i >>> 0, D >>> 0));
|
|
2533
2533
|
}, C.wbg.__wbg_newwithlength_5a5efe313cfd59f1 = function(E) {
|
|
2534
|
-
return
|
|
2534
|
+
return L(new Float32Array(E >>> 0));
|
|
2535
2535
|
}, C.wbg.__wbg_now_2c95c9de01293173 = function(E) {
|
|
2536
|
-
return
|
|
2536
|
+
return c(E).now();
|
|
2537
2537
|
}, C.wbg.__wbg_performance_7a3ffd0b17f663ad = function(E) {
|
|
2538
|
-
return
|
|
2538
|
+
return L(c(E).performance);
|
|
2539
2539
|
}, C.wbg.__wbg_rawcontactforceevent_new = function(E) {
|
|
2540
|
-
return
|
|
2540
|
+
return L(zI.__wrap(E));
|
|
2541
2541
|
}, C.wbg.__wbg_rawraycolliderintersection_new = function(E) {
|
|
2542
|
-
return
|
|
2542
|
+
return L(iI.__wrap(E));
|
|
2543
2543
|
}, C.wbg.__wbg_set_10bad9bee0e9c58b = function(E, i, D) {
|
|
2544
|
-
|
|
2544
|
+
c(E).set(c(i), D >>> 0);
|
|
2545
2545
|
}, C.wbg.__wbg_set_65595bdd868b3009 = function(E, i, D) {
|
|
2546
|
-
|
|
2546
|
+
c(E).set(c(i), D >>> 0);
|
|
2547
2547
|
}, C.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
2548
2548
|
const E = typeof global > "u" ? null : global;
|
|
2549
|
-
return N(E) ? 0 :
|
|
2549
|
+
return N(E) ? 0 : L(E);
|
|
2550
2550
|
}, C.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
2551
2551
|
const E = typeof globalThis > "u" ? null : globalThis;
|
|
2552
|
-
return N(E) ? 0 :
|
|
2552
|
+
return N(E) ? 0 : L(E);
|
|
2553
2553
|
}, C.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
2554
2554
|
const E = typeof self > "u" ? null : self;
|
|
2555
|
-
return N(E) ? 0 :
|
|
2555
|
+
return N(E) ? 0 : L(E);
|
|
2556
2556
|
}, C.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
2557
2557
|
const E = typeof window > "u" ? null : window;
|
|
2558
|
-
return N(E) ? 0 :
|
|
2558
|
+
return N(E) ? 0 : L(E);
|
|
2559
2559
|
}, C.wbg.__wbindgen_boolean_get = function(E) {
|
|
2560
|
-
const i =
|
|
2560
|
+
const i = c(E);
|
|
2561
2561
|
return typeof i == "boolean" ? i ? 1 : 0 : 2;
|
|
2562
2562
|
}, C.wbg.__wbindgen_is_function = function(E) {
|
|
2563
|
-
return typeof
|
|
2563
|
+
return typeof c(E) == "function";
|
|
2564
2564
|
}, C.wbg.__wbindgen_is_undefined = function(E) {
|
|
2565
|
-
return
|
|
2565
|
+
return c(E) === void 0;
|
|
2566
2566
|
}, C.wbg.__wbindgen_memory = function() {
|
|
2567
|
-
return
|
|
2567
|
+
return L(B.memory);
|
|
2568
2568
|
}, C.wbg.__wbindgen_number_get = function(E, i) {
|
|
2569
|
-
const D =
|
|
2570
|
-
d().setFloat64(E + 8, N(
|
|
2569
|
+
const D = c(i), K = typeof D == "number" ? D : void 0;
|
|
2570
|
+
d().setFloat64(E + 8, N(K) ? 0 : K, !0), d().setInt32(E + 0, !N(K), !0);
|
|
2571
2571
|
}, C.wbg.__wbindgen_number_new = function(E) {
|
|
2572
|
-
return
|
|
2572
|
+
return L(E);
|
|
2573
2573
|
}, C.wbg.__wbindgen_object_clone_ref = function(E) {
|
|
2574
|
-
return
|
|
2574
|
+
return L(c(E));
|
|
2575
2575
|
}, C.wbg.__wbindgen_object_drop_ref = function(E) {
|
|
2576
|
-
|
|
2576
|
+
HA(E);
|
|
2577
2577
|
}, C.wbg.__wbindgen_throw = function(E, i) {
|
|
2578
2578
|
throw new Error(VI(E, i));
|
|
2579
2579
|
}, C;
|
|
@@ -2596,7 +2596,7 @@ async function KC(Q) {
|
|
|
2596
2596
|
}
|
|
2597
2597
|
}(await Q, A);
|
|
2598
2598
|
return function(C, E) {
|
|
2599
|
-
return B = C.exports, KC.__wbindgen_wasm_module = E,
|
|
2599
|
+
return B = C.exports, KC.__wbindgen_wasm_module = E, wA = null, qA = null, YA = null, lA = null, cA = null, B;
|
|
2600
2600
|
}(I, g);
|
|
2601
2601
|
}
|
|
2602
2602
|
class Ig {
|
|
@@ -2604,19 +2604,19 @@ class Ig {
|
|
|
2604
2604
|
this.x = A, this.y = I, this.z = g;
|
|
2605
2605
|
}
|
|
2606
2606
|
}
|
|
2607
|
-
class
|
|
2607
|
+
class G {
|
|
2608
2608
|
static new(A, I, g) {
|
|
2609
2609
|
return new Ig(A, I, g);
|
|
2610
2610
|
}
|
|
2611
2611
|
static intoRaw(A) {
|
|
2612
|
-
return new
|
|
2612
|
+
return new S(A.x, A.y, A.z);
|
|
2613
2613
|
}
|
|
2614
2614
|
static zeros() {
|
|
2615
|
-
return
|
|
2615
|
+
return G.new(0, 0, 0);
|
|
2616
2616
|
}
|
|
2617
2617
|
static fromRaw(A) {
|
|
2618
2618
|
if (!A) return null;
|
|
2619
|
-
let I =
|
|
2619
|
+
let I = G.new(A.x, A.y, A.z);
|
|
2620
2620
|
return A.free(), I;
|
|
2621
2621
|
}
|
|
2622
2622
|
static copy(A, I) {
|
|
@@ -2628,7 +2628,7 @@ class XA {
|
|
|
2628
2628
|
this.x = A, this.y = I, this.z = g, this.w = C;
|
|
2629
2629
|
}
|
|
2630
2630
|
}
|
|
2631
|
-
class
|
|
2631
|
+
class a {
|
|
2632
2632
|
static identity() {
|
|
2633
2633
|
return new XA(0, 0, 0, 1);
|
|
2634
2634
|
}
|
|
@@ -2682,10 +2682,10 @@ class VA {
|
|
|
2682
2682
|
return A.free(), I;
|
|
2683
2683
|
}
|
|
2684
2684
|
}
|
|
2685
|
-
var
|
|
2685
|
+
var P, W, PA, uA, yA, GA, n, zA, _A, vA, rA, eA, $A, AI, nA, oA;
|
|
2686
2686
|
(function(Q) {
|
|
2687
2687
|
Q[Q.Dynamic = 0] = "Dynamic", Q[Q.Fixed = 1] = "Fixed", Q[Q.KinematicPositionBased = 2] = "KinematicPositionBased", Q[Q.KinematicVelocityBased = 3] = "KinematicVelocityBased";
|
|
2688
|
-
})(
|
|
2688
|
+
})(P || (P = {}));
|
|
2689
2689
|
class II {
|
|
2690
2690
|
constructor(A, I, g) {
|
|
2691
2691
|
this.rawSet = A, this.colliderSet = I, this.handle = g;
|
|
@@ -2737,25 +2737,25 @@ class II {
|
|
|
2737
2737
|
}
|
|
2738
2738
|
translation() {
|
|
2739
2739
|
let A = this.rawSet.rbTranslation(this.handle);
|
|
2740
|
-
return
|
|
2740
|
+
return G.fromRaw(A);
|
|
2741
2741
|
}
|
|
2742
2742
|
rotation() {
|
|
2743
2743
|
let A = this.rawSet.rbRotation(this.handle);
|
|
2744
|
-
return
|
|
2744
|
+
return a.fromRaw(A);
|
|
2745
2745
|
}
|
|
2746
2746
|
nextTranslation() {
|
|
2747
2747
|
let A = this.rawSet.rbNextTranslation(this.handle);
|
|
2748
|
-
return
|
|
2748
|
+
return G.fromRaw(A);
|
|
2749
2749
|
}
|
|
2750
2750
|
nextRotation() {
|
|
2751
2751
|
let A = this.rawSet.rbNextRotation(this.handle);
|
|
2752
|
-
return
|
|
2752
|
+
return a.fromRaw(A);
|
|
2753
2753
|
}
|
|
2754
2754
|
setTranslation(A, I) {
|
|
2755
2755
|
this.rawSet.rbSetTranslation(this.handle, A.x, A.y, A.z, I);
|
|
2756
2756
|
}
|
|
2757
2757
|
setLinvel(A, I) {
|
|
2758
|
-
let g =
|
|
2758
|
+
let g = G.intoRaw(A);
|
|
2759
2759
|
this.rawSet.rbSetLinvel(this.handle, g, I), g.free();
|
|
2760
2760
|
}
|
|
2761
2761
|
gravityScale() {
|
|
@@ -2768,7 +2768,7 @@ class II {
|
|
|
2768
2768
|
this.rawSet.rbSetRotation(this.handle, A.x, A.y, A.z, A.w, I);
|
|
2769
2769
|
}
|
|
2770
2770
|
setAngvel(A, I) {
|
|
2771
|
-
let g =
|
|
2771
|
+
let g = G.intoRaw(A);
|
|
2772
2772
|
this.rawSet.rbSetAngvel(this.handle, g, I), g.free();
|
|
2773
2773
|
}
|
|
2774
2774
|
setNextKinematicTranslation(A) {
|
|
@@ -2778,39 +2778,39 @@ class II {
|
|
|
2778
2778
|
this.rawSet.rbSetNextKinematicRotation(this.handle, A.x, A.y, A.z, A.w);
|
|
2779
2779
|
}
|
|
2780
2780
|
linvel() {
|
|
2781
|
-
return
|
|
2781
|
+
return G.fromRaw(this.rawSet.rbLinvel(this.handle));
|
|
2782
2782
|
}
|
|
2783
2783
|
velocityAtPoint(A) {
|
|
2784
|
-
const I =
|
|
2785
|
-
let g =
|
|
2784
|
+
const I = G.intoRaw(A);
|
|
2785
|
+
let g = G.fromRaw(this.rawSet.rbVelocityAtPoint(this.handle, I));
|
|
2786
2786
|
return I.free(), g;
|
|
2787
2787
|
}
|
|
2788
2788
|
angvel() {
|
|
2789
|
-
return
|
|
2789
|
+
return G.fromRaw(this.rawSet.rbAngvel(this.handle));
|
|
2790
2790
|
}
|
|
2791
2791
|
mass() {
|
|
2792
2792
|
return this.rawSet.rbMass(this.handle);
|
|
2793
2793
|
}
|
|
2794
2794
|
effectiveInvMass() {
|
|
2795
|
-
return
|
|
2795
|
+
return G.fromRaw(this.rawSet.rbEffectiveInvMass(this.handle));
|
|
2796
2796
|
}
|
|
2797
2797
|
invMass() {
|
|
2798
2798
|
return this.rawSet.rbInvMass(this.handle);
|
|
2799
2799
|
}
|
|
2800
2800
|
localCom() {
|
|
2801
|
-
return
|
|
2801
|
+
return G.fromRaw(this.rawSet.rbLocalCom(this.handle));
|
|
2802
2802
|
}
|
|
2803
2803
|
worldCom() {
|
|
2804
|
-
return
|
|
2804
|
+
return G.fromRaw(this.rawSet.rbWorldCom(this.handle));
|
|
2805
2805
|
}
|
|
2806
2806
|
invPrincipalInertia() {
|
|
2807
|
-
return
|
|
2807
|
+
return G.fromRaw(this.rawSet.rbInvPrincipalInertia(this.handle));
|
|
2808
2808
|
}
|
|
2809
2809
|
principalInertia() {
|
|
2810
|
-
return
|
|
2810
|
+
return G.fromRaw(this.rawSet.rbPrincipalInertia(this.handle));
|
|
2811
2811
|
}
|
|
2812
2812
|
principalInertiaLocalFrame() {
|
|
2813
|
-
return
|
|
2813
|
+
return a.fromRaw(this.rawSet.rbPrincipalInertiaLocalFrame(this.handle));
|
|
2814
2814
|
}
|
|
2815
2815
|
effectiveWorldInvInertia() {
|
|
2816
2816
|
return VA.fromRaw(this.rawSet.rbEffectiveWorldInvInertia(this.handle));
|
|
@@ -2876,8 +2876,8 @@ class II {
|
|
|
2876
2876
|
this.rawSet.rbSetAdditionalMass(this.handle, A, I);
|
|
2877
2877
|
}
|
|
2878
2878
|
setAdditionalMassProperties(A, I, g, C, E) {
|
|
2879
|
-
let i =
|
|
2880
|
-
this.rawSet.rbSetAdditionalMassProperties(this.handle, A, i, D,
|
|
2879
|
+
let i = G.intoRaw(I), D = G.intoRaw(g), K = a.intoRaw(C);
|
|
2880
|
+
this.rawSet.rbSetAdditionalMassProperties(this.handle, A, i, D, K, E), i.free(), D.free(), K.free();
|
|
2881
2881
|
}
|
|
2882
2882
|
setAngularDamping(A) {
|
|
2883
2883
|
this.rawSet.rbSetAngularDamping(this.handle, A);
|
|
@@ -2889,63 +2889,63 @@ class II {
|
|
|
2889
2889
|
this.rawSet.rbResetTorques(this.handle, A);
|
|
2890
2890
|
}
|
|
2891
2891
|
addForce(A, I) {
|
|
2892
|
-
const g =
|
|
2892
|
+
const g = G.intoRaw(A);
|
|
2893
2893
|
this.rawSet.rbAddForce(this.handle, g, I), g.free();
|
|
2894
2894
|
}
|
|
2895
2895
|
applyImpulse(A, I) {
|
|
2896
|
-
const g =
|
|
2896
|
+
const g = G.intoRaw(A);
|
|
2897
2897
|
this.rawSet.rbApplyImpulse(this.handle, g, I), g.free();
|
|
2898
2898
|
}
|
|
2899
2899
|
addTorque(A, I) {
|
|
2900
|
-
const g =
|
|
2900
|
+
const g = G.intoRaw(A);
|
|
2901
2901
|
this.rawSet.rbAddTorque(this.handle, g, I), g.free();
|
|
2902
2902
|
}
|
|
2903
2903
|
applyTorqueImpulse(A, I) {
|
|
2904
|
-
const g =
|
|
2904
|
+
const g = G.intoRaw(A);
|
|
2905
2905
|
this.rawSet.rbApplyTorqueImpulse(this.handle, g, I), g.free();
|
|
2906
2906
|
}
|
|
2907
2907
|
addForceAtPoint(A, I, g) {
|
|
2908
|
-
const C =
|
|
2908
|
+
const C = G.intoRaw(A), E = G.intoRaw(I);
|
|
2909
2909
|
this.rawSet.rbAddForceAtPoint(this.handle, C, E, g), C.free(), E.free();
|
|
2910
2910
|
}
|
|
2911
2911
|
applyImpulseAtPoint(A, I, g) {
|
|
2912
|
-
const C =
|
|
2912
|
+
const C = G.intoRaw(A), E = G.intoRaw(I);
|
|
2913
2913
|
this.rawSet.rbApplyImpulseAtPoint(this.handle, C, E, g), C.free(), E.free();
|
|
2914
2914
|
}
|
|
2915
2915
|
userForce() {
|
|
2916
|
-
return
|
|
2916
|
+
return G.fromRaw(this.rawSet.rbUserForce(this.handle));
|
|
2917
2917
|
}
|
|
2918
2918
|
userTorque() {
|
|
2919
|
-
return
|
|
2919
|
+
return G.fromRaw(this.rawSet.rbUserTorque(this.handle));
|
|
2920
2920
|
}
|
|
2921
2921
|
}
|
|
2922
|
-
class
|
|
2922
|
+
class _ {
|
|
2923
2923
|
constructor(A) {
|
|
2924
|
-
this.enabled = !0, this.status = A, this.translation =
|
|
2924
|
+
this.enabled = !0, this.status = A, this.translation = G.zeros(), this.rotation = a.identity(), this.gravityScale = 1, this.linvel = G.zeros(), this.mass = 0, this.massOnly = !1, this.centerOfMass = G.zeros(), this.translationsEnabledX = !0, this.translationsEnabledY = !0, this.angvel = G.zeros(), this.principalAngularInertia = G.zeros(), this.angularInertiaLocalFrame = a.identity(), this.translationsEnabledZ = !0, this.rotationsEnabledX = !0, this.rotationsEnabledY = !0, this.rotationsEnabledZ = !0, this.linearDamping = 0, this.angularDamping = 0, this.canSleep = !0, this.sleeping = !1, this.ccdEnabled = !1, this.softCcdPrediction = 0, this.dominanceGroup = 0, this.additionalSolverIterations = 0;
|
|
2925
2925
|
}
|
|
2926
2926
|
static dynamic() {
|
|
2927
|
-
return new
|
|
2927
|
+
return new _(P.Dynamic);
|
|
2928
2928
|
}
|
|
2929
2929
|
static kinematicPositionBased() {
|
|
2930
|
-
return new
|
|
2930
|
+
return new _(P.KinematicPositionBased);
|
|
2931
2931
|
}
|
|
2932
2932
|
static kinematicVelocityBased() {
|
|
2933
|
-
return new
|
|
2933
|
+
return new _(P.KinematicVelocityBased);
|
|
2934
2934
|
}
|
|
2935
2935
|
static fixed() {
|
|
2936
|
-
return new
|
|
2936
|
+
return new _(P.Fixed);
|
|
2937
2937
|
}
|
|
2938
2938
|
static newDynamic() {
|
|
2939
|
-
return new
|
|
2939
|
+
return new _(P.Dynamic);
|
|
2940
2940
|
}
|
|
2941
2941
|
static newKinematicPositionBased() {
|
|
2942
|
-
return new
|
|
2942
|
+
return new _(P.KinematicPositionBased);
|
|
2943
2943
|
}
|
|
2944
2944
|
static newKinematicVelocityBased() {
|
|
2945
|
-
return new
|
|
2945
|
+
return new _(P.KinematicVelocityBased);
|
|
2946
2946
|
}
|
|
2947
2947
|
static newStatic() {
|
|
2948
|
-
return new
|
|
2948
|
+
return new _(P.Fixed);
|
|
2949
2949
|
}
|
|
2950
2950
|
setDominanceGroup(A) {
|
|
2951
2951
|
return this.dominanceGroup = A, this;
|
|
@@ -2961,7 +2961,7 @@ class z {
|
|
|
2961
2961
|
return this.translation = { x: A, y: I, z: g }, this;
|
|
2962
2962
|
}
|
|
2963
2963
|
setRotation(A) {
|
|
2964
|
-
return
|
|
2964
|
+
return a.copy(this.rotation, A), this;
|
|
2965
2965
|
}
|
|
2966
2966
|
setGravityScale(A) {
|
|
2967
2967
|
return this.gravityScale = A, this;
|
|
@@ -2974,10 +2974,10 @@ class z {
|
|
|
2974
2974
|
return this.linvel = { x: A, y: I, z: g }, this;
|
|
2975
2975
|
}
|
|
2976
2976
|
setAngvel(A) {
|
|
2977
|
-
return
|
|
2977
|
+
return G.copy(this.angvel, A), this;
|
|
2978
2978
|
}
|
|
2979
2979
|
setAdditionalMassProperties(A, I, g, C) {
|
|
2980
|
-
return this.mass = A,
|
|
2980
|
+
return this.mass = A, G.copy(this.centerOfMass, I), G.copy(this.principalAngularInertia, g), a.copy(this.angularInertiaLocalFrame, C), this.massOnly = !1, this;
|
|
2981
2981
|
}
|
|
2982
2982
|
enabledTranslations(A, I, g) {
|
|
2983
2983
|
return this.translationsEnabledX = A, this.translationsEnabledY = I, this.translationsEnabledZ = g, this;
|
|
@@ -3065,10 +3065,10 @@ class Cg {
|
|
|
3065
3065
|
this.map.forEach((I) => I.finalizeDeserialization(A));
|
|
3066
3066
|
}
|
|
3067
3067
|
createRigidBody(A, I) {
|
|
3068
|
-
let g =
|
|
3069
|
-
g.free(), C.free(), E.free(), i.free(), D.free(),
|
|
3070
|
-
const h = new II(this.raw, A,
|
|
3071
|
-
return h.userData = I.userData, this.map.set(
|
|
3068
|
+
let g = G.intoRaw(I.translation), C = a.intoRaw(I.rotation), E = G.intoRaw(I.linvel), i = G.intoRaw(I.centerOfMass), D = G.intoRaw(I.angvel), K = G.intoRaw(I.principalAngularInertia), k = a.intoRaw(I.angularInertiaLocalFrame), w = this.raw.createRigidBody(I.enabled, g, C, I.gravityScale, I.mass, I.massOnly, i, E, D, K, k, I.translationsEnabledX, I.translationsEnabledY, I.translationsEnabledZ, I.rotationsEnabledX, I.rotationsEnabledY, I.rotationsEnabledZ, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
|
|
3069
|
+
g.free(), C.free(), E.free(), i.free(), D.free(), K.free(), k.free();
|
|
3070
|
+
const h = new II(this.raw, A, w);
|
|
3071
|
+
return h.userData = I.userData, this.map.set(w, h), h;
|
|
3072
3072
|
}
|
|
3073
3073
|
remove(A, I, g, C, E) {
|
|
3074
3074
|
for (let i = 0; i < this.raw.rbNumColliders(A); i += 1) g.unmap(this.raw.rbCollider(A, i));
|
|
@@ -3097,7 +3097,7 @@ class Cg {
|
|
|
3097
3097
|
}
|
|
3098
3098
|
class Bg {
|
|
3099
3099
|
constructor(A) {
|
|
3100
|
-
this.raw = A || new
|
|
3100
|
+
this.raw = A || new SA();
|
|
3101
3101
|
}
|
|
3102
3102
|
free() {
|
|
3103
3103
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
@@ -3159,33 +3159,33 @@ class Bg {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
(function(Q) {
|
|
3161
3161
|
Q[Q.Revolute = 0] = "Revolute", Q[Q.Fixed = 1] = "Fixed", Q[Q.Prismatic = 2] = "Prismatic", Q[Q.Rope = 3] = "Rope", Q[Q.Spring = 4] = "Spring", Q[Q.Spherical = 5] = "Spherical", Q[Q.Generic = 6] = "Generic";
|
|
3162
|
-
})(
|
|
3162
|
+
})(W || (W = {})), function(Q) {
|
|
3163
3163
|
Q[Q.AccelerationBased = 0] = "AccelerationBased", Q[Q.ForceBased = 1] = "ForceBased";
|
|
3164
3164
|
}(PA || (PA = {})), function(Q) {
|
|
3165
3165
|
Q[Q.LinX = 1] = "LinX", Q[Q.LinY = 2] = "LinY", Q[Q.LinZ = 4] = "LinZ", Q[Q.AngX = 8] = "AngX", Q[Q.AngY = 16] = "AngY", Q[Q.AngZ = 32] = "AngZ";
|
|
3166
3166
|
}(uA || (uA = {}));
|
|
3167
|
-
class
|
|
3167
|
+
class u {
|
|
3168
3168
|
constructor(A, I, g) {
|
|
3169
3169
|
this.rawSet = A, this.bodySet = I, this.handle = g;
|
|
3170
3170
|
}
|
|
3171
3171
|
static newTyped(A, I, g) {
|
|
3172
3172
|
switch (A.jointType(g)) {
|
|
3173
|
-
case
|
|
3173
|
+
case v.Revolute:
|
|
3174
3174
|
return new og(A, I, g);
|
|
3175
|
-
case
|
|
3175
|
+
case v.Prismatic:
|
|
3176
3176
|
return new Dg(A, I, g);
|
|
3177
|
-
case
|
|
3177
|
+
case v.Fixed:
|
|
3178
3178
|
return new Qg(A, I, g);
|
|
3179
|
-
case
|
|
3179
|
+
case v.Spring:
|
|
3180
3180
|
return new ig(A, I, g);
|
|
3181
|
-
case
|
|
3181
|
+
case v.Rope:
|
|
3182
3182
|
return new Eg(A, I, g);
|
|
3183
|
-
case
|
|
3183
|
+
case v.Spherical:
|
|
3184
3184
|
return new Sg(A, I, g);
|
|
3185
|
-
case
|
|
3185
|
+
case v.Generic:
|
|
3186
3186
|
return new wg(A, I, g);
|
|
3187
3187
|
default:
|
|
3188
|
-
return new
|
|
3188
|
+
return new u(A, I, g);
|
|
3189
3189
|
}
|
|
3190
3190
|
}
|
|
3191
3191
|
finalizeDeserialization(A) {
|
|
@@ -3204,23 +3204,23 @@ class V {
|
|
|
3204
3204
|
return this.rawSet.jointType(this.handle);
|
|
3205
3205
|
}
|
|
3206
3206
|
frameX1() {
|
|
3207
|
-
return
|
|
3207
|
+
return a.fromRaw(this.rawSet.jointFrameX1(this.handle));
|
|
3208
3208
|
}
|
|
3209
3209
|
frameX2() {
|
|
3210
|
-
return
|
|
3210
|
+
return a.fromRaw(this.rawSet.jointFrameX2(this.handle));
|
|
3211
3211
|
}
|
|
3212
3212
|
anchor1() {
|
|
3213
|
-
return
|
|
3213
|
+
return G.fromRaw(this.rawSet.jointAnchor1(this.handle));
|
|
3214
3214
|
}
|
|
3215
3215
|
anchor2() {
|
|
3216
|
-
return
|
|
3216
|
+
return G.fromRaw(this.rawSet.jointAnchor2(this.handle));
|
|
3217
3217
|
}
|
|
3218
3218
|
setAnchor1(A) {
|
|
3219
|
-
const I =
|
|
3219
|
+
const I = G.intoRaw(A);
|
|
3220
3220
|
this.rawSet.jointSetAnchor1(this.handle, I), I.free();
|
|
3221
3221
|
}
|
|
3222
3222
|
setAnchor2(A) {
|
|
3223
|
-
const I =
|
|
3223
|
+
const I = G.intoRaw(A);
|
|
3224
3224
|
this.rawSet.jointSetAnchor2(this.handle, I), I.free();
|
|
3225
3225
|
}
|
|
3226
3226
|
setContactsEnabled(A) {
|
|
@@ -3230,7 +3230,7 @@ class V {
|
|
|
3230
3230
|
return this.rawSet.jointContactsEnabled(this.handle);
|
|
3231
3231
|
}
|
|
3232
3232
|
}
|
|
3233
|
-
class SI extends
|
|
3233
|
+
class SI extends u {
|
|
3234
3234
|
limitsEnabled() {
|
|
3235
3235
|
return this.rawSet.jointLimitsEnabled(this.handle, this.rawAxis());
|
|
3236
3236
|
}
|
|
@@ -3256,11 +3256,11 @@ class SI extends V {
|
|
|
3256
3256
|
this.rawSet.jointConfigureMotor(this.handle, this.rawAxis(), A, I, g, C);
|
|
3257
3257
|
}
|
|
3258
3258
|
}
|
|
3259
|
-
class Qg extends
|
|
3259
|
+
class Qg extends u {
|
|
3260
3260
|
}
|
|
3261
|
-
class Eg extends
|
|
3261
|
+
class Eg extends u {
|
|
3262
3262
|
}
|
|
3263
|
-
class ig extends
|
|
3263
|
+
class ig extends u {
|
|
3264
3264
|
}
|
|
3265
3265
|
class Dg extends SI {
|
|
3266
3266
|
rawAxis() {
|
|
@@ -3272,75 +3272,75 @@ class og extends SI {
|
|
|
3272
3272
|
return BI.AngX;
|
|
3273
3273
|
}
|
|
3274
3274
|
}
|
|
3275
|
-
class wg extends
|
|
3275
|
+
class wg extends u {
|
|
3276
3276
|
}
|
|
3277
|
-
class Sg extends
|
|
3277
|
+
class Sg extends u {
|
|
3278
3278
|
}
|
|
3279
|
-
class
|
|
3279
|
+
class $ {
|
|
3280
3280
|
constructor() {
|
|
3281
3281
|
}
|
|
3282
3282
|
static fixed(A, I, g, C) {
|
|
3283
|
-
let E = new
|
|
3284
|
-
return E.anchor1 = A, E.anchor2 = g, E.frame1 = I, E.frame2 = C, E.jointType =
|
|
3283
|
+
let E = new $();
|
|
3284
|
+
return E.anchor1 = A, E.anchor2 = g, E.frame1 = I, E.frame2 = C, E.jointType = W.Fixed, E;
|
|
3285
3285
|
}
|
|
3286
3286
|
static spring(A, I, g, C, E) {
|
|
3287
|
-
let i = new
|
|
3288
|
-
return i.anchor1 = C, i.anchor2 = E, i.length = A, i.stiffness = I, i.damping = g, i.jointType =
|
|
3287
|
+
let i = new $();
|
|
3288
|
+
return i.anchor1 = C, i.anchor2 = E, i.length = A, i.stiffness = I, i.damping = g, i.jointType = W.Spring, i;
|
|
3289
3289
|
}
|
|
3290
3290
|
static rope(A, I, g) {
|
|
3291
|
-
let C = new
|
|
3292
|
-
return C.anchor1 = I, C.anchor2 = g, C.length = A, C.jointType =
|
|
3291
|
+
let C = new $();
|
|
3292
|
+
return C.anchor1 = I, C.anchor2 = g, C.length = A, C.jointType = W.Rope, C;
|
|
3293
3293
|
}
|
|
3294
3294
|
static generic(A, I, g, C) {
|
|
3295
|
-
let E = new
|
|
3296
|
-
return E.anchor1 = A, E.anchor2 = I, E.axis = g, E.axesMask = C, E.jointType =
|
|
3295
|
+
let E = new $();
|
|
3296
|
+
return E.anchor1 = A, E.anchor2 = I, E.axis = g, E.axesMask = C, E.jointType = W.Generic, E;
|
|
3297
3297
|
}
|
|
3298
3298
|
static spherical(A, I) {
|
|
3299
|
-
let g = new
|
|
3300
|
-
return g.anchor1 = A, g.anchor2 = I, g.jointType =
|
|
3299
|
+
let g = new $();
|
|
3300
|
+
return g.anchor1 = A, g.anchor2 = I, g.jointType = W.Spherical, g;
|
|
3301
3301
|
}
|
|
3302
3302
|
static prismatic(A, I, g) {
|
|
3303
|
-
let C = new
|
|
3304
|
-
return C.anchor1 = A, C.anchor2 = I, C.axis = g, C.jointType =
|
|
3303
|
+
let C = new $();
|
|
3304
|
+
return C.anchor1 = A, C.anchor2 = I, C.axis = g, C.jointType = W.Prismatic, C;
|
|
3305
3305
|
}
|
|
3306
3306
|
static revolute(A, I, g) {
|
|
3307
|
-
let C = new
|
|
3308
|
-
return C.anchor1 = A, C.anchor2 = I, C.axis = g, C.jointType =
|
|
3307
|
+
let C = new $();
|
|
3308
|
+
return C.anchor1 = A, C.anchor2 = I, C.axis = g, C.jointType = W.Revolute, C;
|
|
3309
3309
|
}
|
|
3310
3310
|
intoRaw() {
|
|
3311
|
-
let A, I, g =
|
|
3311
|
+
let A, I, g = G.intoRaw(this.anchor1), C = G.intoRaw(this.anchor2), E = !1, i = 0, D = 0;
|
|
3312
3312
|
switch (this.jointType) {
|
|
3313
|
-
case
|
|
3314
|
-
let
|
|
3315
|
-
I =
|
|
3313
|
+
case W.Fixed:
|
|
3314
|
+
let K = a.intoRaw(this.frame1), k = a.intoRaw(this.frame2);
|
|
3315
|
+
I = x.fixed(g, K, C, k), K.free(), k.free();
|
|
3316
3316
|
break;
|
|
3317
|
-
case
|
|
3318
|
-
I =
|
|
3317
|
+
case W.Spring:
|
|
3318
|
+
I = x.spring(this.length, this.stiffness, this.damping, g, C);
|
|
3319
3319
|
break;
|
|
3320
|
-
case
|
|
3321
|
-
I =
|
|
3320
|
+
case W.Rope:
|
|
3321
|
+
I = x.rope(this.length, g, C);
|
|
3322
3322
|
break;
|
|
3323
|
-
case
|
|
3324
|
-
A =
|
|
3323
|
+
case W.Prismatic:
|
|
3324
|
+
A = G.intoRaw(this.axis), this.limitsEnabled && (E = !0, i = this.limits[0], D = this.limits[1]), I = x.prismatic(g, C, A, E, i, D), A.free();
|
|
3325
3325
|
break;
|
|
3326
|
-
case
|
|
3327
|
-
A =
|
|
3328
|
-
let
|
|
3329
|
-
I =
|
|
3326
|
+
case W.Generic:
|
|
3327
|
+
A = G.intoRaw(this.axis);
|
|
3328
|
+
let w = this.axesMask;
|
|
3329
|
+
I = x.generic(g, C, A, w);
|
|
3330
3330
|
break;
|
|
3331
|
-
case
|
|
3332
|
-
I =
|
|
3331
|
+
case W.Spherical:
|
|
3332
|
+
I = x.spherical(g, C);
|
|
3333
3333
|
break;
|
|
3334
|
-
case
|
|
3335
|
-
A =
|
|
3334
|
+
case W.Revolute:
|
|
3335
|
+
A = G.intoRaw(this.axis), I = x.revolute(g, C, A), A.free();
|
|
3336
3336
|
}
|
|
3337
3337
|
return g.free(), C.free(), I;
|
|
3338
3338
|
}
|
|
3339
3339
|
}
|
|
3340
3340
|
class Gg {
|
|
3341
3341
|
constructor(A) {
|
|
3342
|
-
this.raw = A || new
|
|
3343
|
-
this.map.set(I,
|
|
3342
|
+
this.raw = A || new CA(), this.map = new wI(), A && A.forEachJointHandle((I) => {
|
|
3343
|
+
this.map.set(I, u.newTyped(A, null, I));
|
|
3344
3344
|
});
|
|
3345
3345
|
}
|
|
3346
3346
|
free() {
|
|
@@ -3352,8 +3352,8 @@ class Gg {
|
|
|
3352
3352
|
createJoint(A, I, g, C, E) {
|
|
3353
3353
|
const i = I.intoRaw(), D = this.raw.createJoint(i, g, C, E);
|
|
3354
3354
|
i.free();
|
|
3355
|
-
let
|
|
3356
|
-
return this.map.set(D,
|
|
3355
|
+
let K = u.newTyped(this.raw, A, D);
|
|
3356
|
+
return this.map.set(D, K), K;
|
|
3357
3357
|
}
|
|
3358
3358
|
remove(A, I) {
|
|
3359
3359
|
this.raw.remove(A, I), this.unmap(A);
|
|
@@ -3380,22 +3380,22 @@ class Gg {
|
|
|
3380
3380
|
return this.map.getAll();
|
|
3381
3381
|
}
|
|
3382
3382
|
}
|
|
3383
|
-
class
|
|
3383
|
+
class EA {
|
|
3384
3384
|
constructor(A, I) {
|
|
3385
3385
|
this.rawSet = A, this.handle = I;
|
|
3386
3386
|
}
|
|
3387
3387
|
static newTyped(A, I) {
|
|
3388
3388
|
switch (A.jointType(I)) {
|
|
3389
|
-
case
|
|
3389
|
+
case v.Revolute:
|
|
3390
3390
|
return new hg(A, I);
|
|
3391
|
-
case
|
|
3391
|
+
case v.Prismatic:
|
|
3392
3392
|
return new Kg(A, I);
|
|
3393
|
-
case
|
|
3393
|
+
case v.Fixed:
|
|
3394
3394
|
return new kg(A, I);
|
|
3395
|
-
case
|
|
3395
|
+
case v.Spherical:
|
|
3396
3396
|
return new Ug(A, I);
|
|
3397
3397
|
default:
|
|
3398
|
-
return new
|
|
3398
|
+
return new EA(A, I);
|
|
3399
3399
|
}
|
|
3400
3400
|
}
|
|
3401
3401
|
isValid() {
|
|
@@ -3408,9 +3408,9 @@ class QA {
|
|
|
3408
3408
|
return this.rawSet.jointContactsEnabled(this.handle);
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
|
-
class GI extends
|
|
3411
|
+
class GI extends EA {
|
|
3412
3412
|
}
|
|
3413
|
-
class kg extends
|
|
3413
|
+
class kg extends EA {
|
|
3414
3414
|
}
|
|
3415
3415
|
class Kg extends GI {
|
|
3416
3416
|
rawAxis() {
|
|
@@ -3422,12 +3422,12 @@ class hg extends GI {
|
|
|
3422
3422
|
return BI.AngX;
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
|
-
class Ug extends
|
|
3425
|
+
class Ug extends EA {
|
|
3426
3426
|
}
|
|
3427
3427
|
class yg {
|
|
3428
3428
|
constructor(A) {
|
|
3429
|
-
this.raw = A || new
|
|
3430
|
-
this.map.set(I,
|
|
3429
|
+
this.raw = A || new QA(), this.map = new wI(), A && A.forEachJointHandle((I) => {
|
|
3430
|
+
this.map.set(I, EA.newTyped(this.raw, I));
|
|
3431
3431
|
});
|
|
3432
3432
|
}
|
|
3433
3433
|
free() {
|
|
@@ -3436,7 +3436,7 @@ class yg {
|
|
|
3436
3436
|
createJoint(A, I, g, C) {
|
|
3437
3437
|
const E = A.intoRaw(), i = this.raw.createJoint(E, I, g, C);
|
|
3438
3438
|
E.free();
|
|
3439
|
-
let D =
|
|
3439
|
+
let D = EA.newTyped(this.raw, i);
|
|
3440
3440
|
return this.map.set(i, D), D;
|
|
3441
3441
|
}
|
|
3442
3442
|
remove(A, I) {
|
|
@@ -3466,7 +3466,7 @@ class yg {
|
|
|
3466
3466
|
}
|
|
3467
3467
|
(function(Q) {
|
|
3468
3468
|
Q[Q.Average = 0] = "Average", Q[Q.Min = 1] = "Min", Q[Q.Multiply = 2] = "Multiply", Q[Q.Max = 3] = "Max";
|
|
3469
|
-
})(
|
|
3469
|
+
})(yA || (yA = {}));
|
|
3470
3470
|
class Jg {
|
|
3471
3471
|
constructor(A) {
|
|
3472
3472
|
this.raw = A || new PI();
|
|
@@ -3477,7 +3477,7 @@ class Jg {
|
|
|
3477
3477
|
}
|
|
3478
3478
|
class Mg {
|
|
3479
3479
|
constructor(A) {
|
|
3480
|
-
this.raw = A || new
|
|
3480
|
+
this.raw = A || new BA();
|
|
3481
3481
|
}
|
|
3482
3482
|
free() {
|
|
3483
3483
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
@@ -3488,7 +3488,7 @@ class Mg {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
(function(Q) {
|
|
3490
3490
|
Q[Q.Vertex = 0] = "Vertex", Q[Q.Edge = 1] = "Edge", Q[Q.Face = 2] = "Face", Q[Q.Unknown = 3] = "Unknown";
|
|
3491
|
-
})(
|
|
3491
|
+
})(GA || (GA = {}));
|
|
3492
3492
|
class hC {
|
|
3493
3493
|
constructor(A, I) {
|
|
3494
3494
|
this.origin = A, this.dir = I;
|
|
@@ -3497,122 +3497,122 @@ class hC {
|
|
|
3497
3497
|
return { x: this.origin.x + this.dir.x * A, y: this.origin.y + this.dir.y * A, z: this.origin.z + this.dir.z * A };
|
|
3498
3498
|
}
|
|
3499
3499
|
}
|
|
3500
|
-
class
|
|
3500
|
+
class NA {
|
|
3501
3501
|
constructor(A, I, g, C) {
|
|
3502
|
-
this.featureType =
|
|
3502
|
+
this.featureType = GA.Unknown, this.featureId = void 0, this.timeOfImpact = A, this.normal = I, C !== void 0 && (this.featureId = C), g !== void 0 && (this.featureType = g);
|
|
3503
3503
|
}
|
|
3504
3504
|
static fromRaw(A) {
|
|
3505
3505
|
if (!A) return null;
|
|
3506
|
-
const I = new
|
|
3506
|
+
const I = new NA(A.time_of_impact(), G.fromRaw(A.normal()), A.featureType(), A.featureId());
|
|
3507
3507
|
return A.free(), I;
|
|
3508
3508
|
}
|
|
3509
3509
|
}
|
|
3510
|
-
class
|
|
3510
|
+
class JA {
|
|
3511
3511
|
constructor(A, I, g, C, E) {
|
|
3512
|
-
this.featureType =
|
|
3512
|
+
this.featureType = GA.Unknown, this.featureId = void 0, this.collider = A, this.timeOfImpact = I, this.normal = g, E !== void 0 && (this.featureId = E), C !== void 0 && (this.featureType = C);
|
|
3513
3513
|
}
|
|
3514
3514
|
static fromRaw(A, I) {
|
|
3515
3515
|
if (!I) return null;
|
|
3516
|
-
const g = new
|
|
3516
|
+
const g = new JA(A.get(I.colliderHandle()), I.time_of_impact(), G.fromRaw(I.normal()), I.featureType(), I.featureId());
|
|
3517
3517
|
return I.free(), g;
|
|
3518
3518
|
}
|
|
3519
3519
|
}
|
|
3520
|
-
class
|
|
3520
|
+
class ZA {
|
|
3521
3521
|
constructor(A, I) {
|
|
3522
3522
|
this.collider = A, this.timeOfImpact = I;
|
|
3523
3523
|
}
|
|
3524
3524
|
static fromRaw(A, I) {
|
|
3525
3525
|
if (!I) return null;
|
|
3526
|
-
const g = new
|
|
3526
|
+
const g = new ZA(A.get(I.colliderHandle()), I.timeOfImpact());
|
|
3527
3527
|
return I.free(), g;
|
|
3528
3528
|
}
|
|
3529
3529
|
}
|
|
3530
|
-
class
|
|
3530
|
+
class FA {
|
|
3531
3531
|
constructor(A, I) {
|
|
3532
3532
|
this.point = A, this.isInside = I;
|
|
3533
3533
|
}
|
|
3534
3534
|
static fromRaw(A) {
|
|
3535
3535
|
if (!A) return null;
|
|
3536
|
-
const I = new
|
|
3536
|
+
const I = new FA(G.fromRaw(A.point()), A.isInside());
|
|
3537
3537
|
return A.free(), I;
|
|
3538
3538
|
}
|
|
3539
3539
|
}
|
|
3540
|
-
class
|
|
3540
|
+
class MA {
|
|
3541
3541
|
constructor(A, I, g, C, E) {
|
|
3542
|
-
this.featureType =
|
|
3542
|
+
this.featureType = GA.Unknown, this.featureId = void 0, this.collider = A, this.point = I, this.isInside = g, E !== void 0 && (this.featureId = E), C !== void 0 && (this.featureType = C);
|
|
3543
3543
|
}
|
|
3544
3544
|
static fromRaw(A, I) {
|
|
3545
3545
|
if (!I) return null;
|
|
3546
|
-
const g = new
|
|
3546
|
+
const g = new MA(A.get(I.colliderHandle()), G.fromRaw(I.point()), I.isInside(), I.featureType(), I.featureId());
|
|
3547
3547
|
return I.free(), g;
|
|
3548
3548
|
}
|
|
3549
3549
|
}
|
|
3550
|
-
class
|
|
3550
|
+
class hA {
|
|
3551
3551
|
constructor(A, I, g, C, E) {
|
|
3552
3552
|
this.time_of_impact = A, this.witness1 = I, this.witness2 = g, this.normal1 = C, this.normal2 = E;
|
|
3553
3553
|
}
|
|
3554
3554
|
static fromRaw(A, I) {
|
|
3555
3555
|
if (!I) return null;
|
|
3556
|
-
const g = new
|
|
3556
|
+
const g = new hA(I.time_of_impact(), G.fromRaw(I.witness1()), G.fromRaw(I.witness2()), G.fromRaw(I.normal1()), G.fromRaw(I.normal2()));
|
|
3557
3557
|
return I.free(), g;
|
|
3558
3558
|
}
|
|
3559
3559
|
}
|
|
3560
|
-
class
|
|
3560
|
+
class aA extends hA {
|
|
3561
3561
|
constructor(A, I, g, C, E, i) {
|
|
3562
3562
|
super(I, g, C, E, i), this.collider = A;
|
|
3563
3563
|
}
|
|
3564
3564
|
static fromRaw(A, I) {
|
|
3565
3565
|
if (!I) return null;
|
|
3566
|
-
const g = new
|
|
3566
|
+
const g = new aA(A.get(I.colliderHandle()), I.time_of_impact(), G.fromRaw(I.witness1()), G.fromRaw(I.witness2()), G.fromRaw(I.normal1()), G.fromRaw(I.normal2()));
|
|
3567
3567
|
return I.free(), g;
|
|
3568
3568
|
}
|
|
3569
3569
|
}
|
|
3570
3570
|
class Ng {
|
|
3571
3571
|
constructor(A) {
|
|
3572
|
-
this.raw = A || new
|
|
3572
|
+
this.raw = A || new gA();
|
|
3573
3573
|
}
|
|
3574
3574
|
free() {
|
|
3575
3575
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
3576
3576
|
}
|
|
3577
|
-
castRay(A, I, g, C, E, i, D,
|
|
3578
|
-
let y =
|
|
3577
|
+
castRay(A, I, g, C, E, i, D, K, k, w, h) {
|
|
3578
|
+
let y = G.intoRaw(C.origin), U = G.intoRaw(C.dir), J = ZA.fromRaw(g, this.raw.castRay(A.raw, I.raw, g.raw, y, U, E, i, D, K, k, w, h));
|
|
3579
3579
|
return y.free(), U.free(), J;
|
|
3580
3580
|
}
|
|
3581
|
-
castRayAndGetNormal(A, I, g, C, E, i, D,
|
|
3582
|
-
let y =
|
|
3581
|
+
castRayAndGetNormal(A, I, g, C, E, i, D, K, k, w, h) {
|
|
3582
|
+
let y = G.intoRaw(C.origin), U = G.intoRaw(C.dir), J = JA.fromRaw(g, this.raw.castRayAndGetNormal(A.raw, I.raw, g.raw, y, U, E, i, D, K, k, w, h));
|
|
3583
3583
|
return y.free(), U.free(), J;
|
|
3584
3584
|
}
|
|
3585
|
-
intersectionsWithRay(A, I, g, C, E, i, D,
|
|
3586
|
-
let U =
|
|
3587
|
-
this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, U, J, E, i, (
|
|
3585
|
+
intersectionsWithRay(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
3586
|
+
let U = G.intoRaw(C.origin), J = G.intoRaw(C.dir);
|
|
3587
|
+
this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, U, J, E, i, (F) => D(JA.fromRaw(g, F)), K, k, w, h, y), U.free(), J.free();
|
|
3588
3588
|
}
|
|
3589
|
-
intersectionWithShape(A, I, g, C, E, i, D,
|
|
3590
|
-
let y =
|
|
3591
|
-
return y.free(), U.free(), J.free(),
|
|
3589
|
+
intersectionWithShape(A, I, g, C, E, i, D, K, k, w, h) {
|
|
3590
|
+
let y = G.intoRaw(C), U = a.intoRaw(E), J = i.intoRaw(), F = this.raw.intersectionWithShape(A.raw, I.raw, g.raw, y, U, J, D, K, k, w, h);
|
|
3591
|
+
return y.free(), U.free(), J.free(), F;
|
|
3592
3592
|
}
|
|
3593
|
-
projectPoint(A, I, g, C, E, i, D,
|
|
3594
|
-
let h =
|
|
3593
|
+
projectPoint(A, I, g, C, E, i, D, K, k, w) {
|
|
3594
|
+
let h = G.intoRaw(C), y = MA.fromRaw(g, this.raw.projectPoint(A.raw, I.raw, g.raw, h, E, i, D, K, k, w));
|
|
3595
3595
|
return h.free(), y;
|
|
3596
3596
|
}
|
|
3597
|
-
projectPointAndGetFeature(A, I, g, C, E, i, D,
|
|
3598
|
-
let
|
|
3599
|
-
return
|
|
3597
|
+
projectPointAndGetFeature(A, I, g, C, E, i, D, K, k) {
|
|
3598
|
+
let w = G.intoRaw(C), h = MA.fromRaw(g, this.raw.projectPointAndGetFeature(A.raw, I.raw, g.raw, w, E, i, D, K, k));
|
|
3599
|
+
return w.free(), h;
|
|
3600
3600
|
}
|
|
3601
|
-
intersectionsWithPoint(A, I, g, C, E, i, D,
|
|
3602
|
-
let h =
|
|
3603
|
-
this.raw.intersectionsWithPoint(A.raw, I.raw, g.raw, h, E, i, D,
|
|
3601
|
+
intersectionsWithPoint(A, I, g, C, E, i, D, K, k, w) {
|
|
3602
|
+
let h = G.intoRaw(C);
|
|
3603
|
+
this.raw.intersectionsWithPoint(A.raw, I.raw, g.raw, h, E, i, D, K, k, w), h.free();
|
|
3604
3604
|
}
|
|
3605
|
-
castShape(A, I, g, C, E, i, D,
|
|
3606
|
-
let
|
|
3607
|
-
return
|
|
3605
|
+
castShape(A, I, g, C, E, i, D, K, k, w, h, y, U, J, F) {
|
|
3606
|
+
let l = G.intoRaw(C), R = a.intoRaw(E), z = G.intoRaw(i), iA = D.intoRaw(), sA = aA.fromRaw(g, this.raw.castShape(A.raw, I.raw, g.raw, l, R, z, iA, K, k, w, h, y, U, J, F));
|
|
3607
|
+
return l.free(), R.free(), z.free(), iA.free(), sA;
|
|
3608
3608
|
}
|
|
3609
|
-
intersectionsWithShape(A, I, g, C, E, i, D,
|
|
3610
|
-
let U =
|
|
3611
|
-
this.raw.intersectionsWithShape(A.raw, I.raw, g.raw, U, J,
|
|
3609
|
+
intersectionsWithShape(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
3610
|
+
let U = G.intoRaw(C), J = a.intoRaw(E), F = i.intoRaw();
|
|
3611
|
+
this.raw.intersectionsWithShape(A.raw, I.raw, g.raw, U, J, F, D, K, k, w, h, y), U.free(), J.free(), F.free();
|
|
3612
3612
|
}
|
|
3613
3613
|
collidersWithAabbIntersectingAabb(A, I, g, C, E, i) {
|
|
3614
|
-
let D =
|
|
3615
|
-
this.raw.collidersWithAabbIntersectingAabb(A.raw, I.raw, g.raw, D,
|
|
3614
|
+
let D = G.intoRaw(C), K = G.intoRaw(E);
|
|
3615
|
+
this.raw.collidersWithAabbIntersectingAabb(A.raw, I.raw, g.raw, D, K, i), D.free(), K.free();
|
|
3616
3616
|
}
|
|
3617
3617
|
}
|
|
3618
3618
|
class Fg {
|
|
@@ -3649,13 +3649,13 @@ class ag {
|
|
|
3649
3649
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
3650
3650
|
}
|
|
3651
3651
|
normal() {
|
|
3652
|
-
return
|
|
3652
|
+
return G.fromRaw(this.raw.normal());
|
|
3653
3653
|
}
|
|
3654
3654
|
localNormal1() {
|
|
3655
|
-
return
|
|
3655
|
+
return G.fromRaw(this.raw.local_n1());
|
|
3656
3656
|
}
|
|
3657
3657
|
localNormal2() {
|
|
3658
|
-
return
|
|
3658
|
+
return G.fromRaw(this.raw.local_n2());
|
|
3659
3659
|
}
|
|
3660
3660
|
subshape1() {
|
|
3661
3661
|
return this.raw.subshape1();
|
|
@@ -3667,10 +3667,10 @@ class ag {
|
|
|
3667
3667
|
return this.raw.num_contacts();
|
|
3668
3668
|
}
|
|
3669
3669
|
localContactPoint1(A) {
|
|
3670
|
-
return
|
|
3670
|
+
return G.fromRaw(this.raw.contact_local_p1(A));
|
|
3671
3671
|
}
|
|
3672
3672
|
localContactPoint2(A) {
|
|
3673
|
-
return
|
|
3673
|
+
return G.fromRaw(this.raw.contact_local_p2(A));
|
|
3674
3674
|
}
|
|
3675
3675
|
contactDist(A) {
|
|
3676
3676
|
return this.raw.contact_dist(A);
|
|
@@ -3694,7 +3694,7 @@ class ag {
|
|
|
3694
3694
|
return this.raw.num_solver_contacts();
|
|
3695
3695
|
}
|
|
3696
3696
|
solverContactPoint(A) {
|
|
3697
|
-
return
|
|
3697
|
+
return G.fromRaw(this.raw.solver_contact_point(A));
|
|
3698
3698
|
}
|
|
3699
3699
|
solverContactDist(A) {
|
|
3700
3700
|
return this.raw.solver_contact_dist(A);
|
|
@@ -3706,99 +3706,99 @@ class ag {
|
|
|
3706
3706
|
return this.raw.solver_contact_restitution(A);
|
|
3707
3707
|
}
|
|
3708
3708
|
solverContactTangentVelocity(A) {
|
|
3709
|
-
return
|
|
3709
|
+
return G.fromRaw(this.raw.solver_contact_tangent_velocity(A));
|
|
3710
3710
|
}
|
|
3711
3711
|
}
|
|
3712
|
-
class
|
|
3712
|
+
class kA {
|
|
3713
3713
|
constructor(A, I, g, C, E) {
|
|
3714
3714
|
this.distance = A, this.point1 = I, this.point2 = g, this.normal1 = C, this.normal2 = E;
|
|
3715
3715
|
}
|
|
3716
3716
|
static fromRaw(A) {
|
|
3717
3717
|
if (!A) return null;
|
|
3718
|
-
const I = new
|
|
3718
|
+
const I = new kA(A.distance(), G.fromRaw(A.point1()), G.fromRaw(A.point2()), G.fromRaw(A.normal1()), G.fromRaw(A.normal2()));
|
|
3719
3719
|
return A.free(), I;
|
|
3720
3720
|
}
|
|
3721
3721
|
}
|
|
3722
3722
|
class O {
|
|
3723
3723
|
static fromRaw(A, I) {
|
|
3724
3724
|
const g = A.coShapeType(I);
|
|
3725
|
-
let C, E, i, D,
|
|
3725
|
+
let C, E, i, D, K, k, w;
|
|
3726
3726
|
switch (g) {
|
|
3727
|
-
case
|
|
3727
|
+
case j.Ball:
|
|
3728
3728
|
return new kI(A.coRadius(I));
|
|
3729
|
-
case
|
|
3729
|
+
case j.Cuboid:
|
|
3730
3730
|
return C = A.coHalfExtents(I), new KI(C.x, C.y, C.z);
|
|
3731
|
-
case
|
|
3731
|
+
case j.RoundCuboid:
|
|
3732
3732
|
return C = A.coHalfExtents(I), E = A.coRoundRadius(I), new hI(C.x, C.y, C.z, E);
|
|
3733
|
-
case
|
|
3734
|
-
return
|
|
3735
|
-
case
|
|
3736
|
-
return i = A.coVertices(I), new yI(
|
|
3737
|
-
case
|
|
3733
|
+
case j.Capsule:
|
|
3734
|
+
return K = A.coHalfHeight(I), k = A.coRadius(I), new UI(K, k);
|
|
3735
|
+
case j.Segment:
|
|
3736
|
+
return i = A.coVertices(I), new yI(G.new(i[0], i[1], i[2]), G.new(i[3], i[4], i[5]));
|
|
3737
|
+
case j.Polyline:
|
|
3738
3738
|
return i = A.coVertices(I), D = A.coIndices(I), new NI(i, D);
|
|
3739
|
-
case
|
|
3740
|
-
return i = A.coVertices(I), new JI(
|
|
3741
|
-
case
|
|
3742
|
-
return i = A.coVertices(I), E = A.coRoundRadius(I), new MI(
|
|
3743
|
-
case
|
|
3744
|
-
return
|
|
3745
|
-
case
|
|
3739
|
+
case j.Triangle:
|
|
3740
|
+
return i = A.coVertices(I), new JI(G.new(i[0], i[1], i[2]), G.new(i[3], i[4], i[5]), G.new(i[6], i[7], i[8]));
|
|
3741
|
+
case j.RoundTriangle:
|
|
3742
|
+
return i = A.coVertices(I), E = A.coRoundRadius(I), new MI(G.new(i[0], i[1], i[2]), G.new(i[3], i[4], i[5]), G.new(i[6], i[7], i[8]), E);
|
|
3743
|
+
case j.HalfSpace:
|
|
3744
|
+
return w = G.fromRaw(A.coHalfspaceNormal(I)), new sg(w);
|
|
3745
|
+
case j.Voxels:
|
|
3746
3746
|
const h = A.coVoxelData(I), y = A.coVoxelSize(I);
|
|
3747
3747
|
return new FI(h, y);
|
|
3748
|
-
case
|
|
3748
|
+
case j.TriMesh:
|
|
3749
3749
|
i = A.coVertices(I), D = A.coIndices(I);
|
|
3750
3750
|
const U = A.coTriMeshFlags(I);
|
|
3751
3751
|
return new aI(i, D, U);
|
|
3752
|
-
case
|
|
3753
|
-
const J = A.coHeightfieldScale(I),
|
|
3754
|
-
return new sI(
|
|
3755
|
-
case
|
|
3756
|
-
return i = A.coVertices(I), D = A.coIndices(I), new
|
|
3757
|
-
case
|
|
3758
|
-
return i = A.coVertices(I), D = A.coIndices(I), E = A.coRoundRadius(I), new
|
|
3759
|
-
case
|
|
3760
|
-
return
|
|
3761
|
-
case
|
|
3762
|
-
return
|
|
3763
|
-
case
|
|
3764
|
-
return
|
|
3765
|
-
case
|
|
3766
|
-
return
|
|
3752
|
+
case j.HeightField:
|
|
3753
|
+
const J = A.coHeightfieldScale(I), F = A.coHeightfieldHeights(I), l = A.coHeightfieldNRows(I), R = A.coHeightfieldNCols(I), z = A.coHeightFieldFlags(I);
|
|
3754
|
+
return new sI(l, R, F, J, z);
|
|
3755
|
+
case j.ConvexPolyhedron:
|
|
3756
|
+
return i = A.coVertices(I), D = A.coIndices(I), new TA(i, D);
|
|
3757
|
+
case j.RoundConvexPolyhedron:
|
|
3758
|
+
return i = A.coVertices(I), D = A.coIndices(I), E = A.coRoundRadius(I), new OA(i, D, E);
|
|
3759
|
+
case j.Cylinder:
|
|
3760
|
+
return K = A.coHalfHeight(I), k = A.coRadius(I), new RI(K, k);
|
|
3761
|
+
case j.RoundCylinder:
|
|
3762
|
+
return K = A.coHalfHeight(I), k = A.coRadius(I), E = A.coRoundRadius(I), new cI(K, k, E);
|
|
3763
|
+
case j.Cone:
|
|
3764
|
+
return K = A.coHalfHeight(I), k = A.coRadius(I), new YI(K, k);
|
|
3765
|
+
case j.RoundCone:
|
|
3766
|
+
return K = A.coHalfHeight(I), k = A.coRadius(I), E = A.coRoundRadius(I), new qI(K, k, E);
|
|
3767
3767
|
default:
|
|
3768
3768
|
throw new Error("unknown shape type: " + g);
|
|
3769
3769
|
}
|
|
3770
3770
|
}
|
|
3771
|
-
castShape(A, I, g, C, E, i, D,
|
|
3772
|
-
let h =
|
|
3773
|
-
return h.free(), y.free(), U.free(), J.free(),
|
|
3771
|
+
castShape(A, I, g, C, E, i, D, K, k, w) {
|
|
3772
|
+
let h = G.intoRaw(A), y = a.intoRaw(I), U = G.intoRaw(g), J = G.intoRaw(E), F = a.intoRaw(i), l = G.intoRaw(D), R = this.intoRaw(), z = C.intoRaw(), iA = hA.fromRaw(null, R.castShape(h, y, U, z, J, F, l, K, k, w));
|
|
3773
|
+
return h.free(), y.free(), U.free(), J.free(), F.free(), l.free(), R.free(), z.free(), iA;
|
|
3774
3774
|
}
|
|
3775
3775
|
intersectsShape(A, I, g, C, E) {
|
|
3776
|
-
let i =
|
|
3777
|
-
return i.free(), D.free(),
|
|
3776
|
+
let i = G.intoRaw(A), D = a.intoRaw(I), K = G.intoRaw(C), k = a.intoRaw(E), w = this.intoRaw(), h = g.intoRaw(), y = w.intersectsShape(i, D, h, K, k);
|
|
3777
|
+
return i.free(), D.free(), K.free(), k.free(), w.free(), h.free(), y;
|
|
3778
3778
|
}
|
|
3779
3779
|
contactShape(A, I, g, C, E, i) {
|
|
3780
|
-
let D =
|
|
3781
|
-
return D.free(),
|
|
3780
|
+
let D = G.intoRaw(A), K = a.intoRaw(I), k = G.intoRaw(C), w = a.intoRaw(E), h = this.intoRaw(), y = g.intoRaw(), U = kA.fromRaw(h.contactShape(D, K, y, k, w, i));
|
|
3781
|
+
return D.free(), K.free(), k.free(), w.free(), h.free(), y.free(), U;
|
|
3782
3782
|
}
|
|
3783
3783
|
containsPoint(A, I, g) {
|
|
3784
|
-
let C =
|
|
3785
|
-
return C.free(), E.free(), i.free(), D.free(),
|
|
3784
|
+
let C = G.intoRaw(A), E = a.intoRaw(I), i = G.intoRaw(g), D = this.intoRaw(), K = D.containsPoint(C, E, i);
|
|
3785
|
+
return C.free(), E.free(), i.free(), D.free(), K;
|
|
3786
3786
|
}
|
|
3787
3787
|
projectPoint(A, I, g, C) {
|
|
3788
|
-
let E =
|
|
3789
|
-
return E.free(), i.free(), D.free(),
|
|
3788
|
+
let E = G.intoRaw(A), i = a.intoRaw(I), D = G.intoRaw(g), K = this.intoRaw(), k = FA.fromRaw(K.projectPoint(E, i, D, C));
|
|
3789
|
+
return E.free(), i.free(), D.free(), K.free(), k;
|
|
3790
3790
|
}
|
|
3791
3791
|
intersectsRay(A, I, g, C) {
|
|
3792
|
-
let E =
|
|
3793
|
-
return E.free(), i.free(), D.free(),
|
|
3792
|
+
let E = G.intoRaw(I), i = a.intoRaw(g), D = G.intoRaw(A.origin), K = G.intoRaw(A.dir), k = this.intoRaw(), w = k.intersectsRay(E, i, D, K, C);
|
|
3793
|
+
return E.free(), i.free(), D.free(), K.free(), k.free(), w;
|
|
3794
3794
|
}
|
|
3795
3795
|
castRay(A, I, g, C, E) {
|
|
3796
|
-
let i =
|
|
3797
|
-
return i.free(), D.free(),
|
|
3796
|
+
let i = G.intoRaw(I), D = a.intoRaw(g), K = G.intoRaw(A.origin), k = G.intoRaw(A.dir), w = this.intoRaw(), h = w.castRay(i, D, K, k, C, E);
|
|
3797
|
+
return i.free(), D.free(), K.free(), k.free(), w.free(), h;
|
|
3798
3798
|
}
|
|
3799
3799
|
castRayAndGetNormal(A, I, g, C, E) {
|
|
3800
|
-
let i =
|
|
3801
|
-
return i.free(), D.free(),
|
|
3800
|
+
let i = G.intoRaw(I), D = a.intoRaw(g), K = G.intoRaw(A.origin), k = G.intoRaw(A.dir), w = this.intoRaw(), h = NA.fromRaw(w.castRayAndGetNormal(i, D, K, k, C, E));
|
|
3801
|
+
return i.free(), D.free(), K.free(), k.free(), w.free(), h;
|
|
3802
3802
|
}
|
|
3803
3803
|
}
|
|
3804
3804
|
(function(Q) {
|
|
@@ -3821,13 +3821,13 @@ class sg extends O {
|
|
|
3821
3821
|
super(), this.type = n.HalfSpace, this.normal = A;
|
|
3822
3822
|
}
|
|
3823
3823
|
intoRaw() {
|
|
3824
|
-
let A =
|
|
3824
|
+
let A = G.intoRaw(this.normal), I = M.halfspace(A);
|
|
3825
3825
|
return A.free(), I;
|
|
3826
3826
|
}
|
|
3827
3827
|
}
|
|
3828
3828
|
class KI extends O {
|
|
3829
3829
|
constructor(A, I, g) {
|
|
3830
|
-
super(), this.type = n.Cuboid, this.halfExtents =
|
|
3830
|
+
super(), this.type = n.Cuboid, this.halfExtents = G.new(A, I, g);
|
|
3831
3831
|
}
|
|
3832
3832
|
intoRaw() {
|
|
3833
3833
|
return M.cuboid(this.halfExtents.x, this.halfExtents.y, this.halfExtents.z);
|
|
@@ -3835,7 +3835,7 @@ class KI extends O {
|
|
|
3835
3835
|
}
|
|
3836
3836
|
class hI extends O {
|
|
3837
3837
|
constructor(A, I, g, C) {
|
|
3838
|
-
super(), this.type = n.RoundCuboid, this.halfExtents =
|
|
3838
|
+
super(), this.type = n.RoundCuboid, this.halfExtents = G.new(A, I, g), this.borderRadius = C;
|
|
3839
3839
|
}
|
|
3840
3840
|
intoRaw() {
|
|
3841
3841
|
return M.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.halfExtents.z, this.borderRadius);
|
|
@@ -3854,7 +3854,7 @@ class yI extends O {
|
|
|
3854
3854
|
super(), this.type = n.Segment, this.a = A, this.b = I;
|
|
3855
3855
|
}
|
|
3856
3856
|
intoRaw() {
|
|
3857
|
-
let A =
|
|
3857
|
+
let A = G.intoRaw(this.a), I = G.intoRaw(this.b), g = M.segment(A, I);
|
|
3858
3858
|
return A.free(), I.free(), g;
|
|
3859
3859
|
}
|
|
3860
3860
|
}
|
|
@@ -3863,7 +3863,7 @@ class JI extends O {
|
|
|
3863
3863
|
super(), this.type = n.Triangle, this.a = A, this.b = I, this.c = g;
|
|
3864
3864
|
}
|
|
3865
3865
|
intoRaw() {
|
|
3866
|
-
let A =
|
|
3866
|
+
let A = G.intoRaw(this.a), I = G.intoRaw(this.b), g = G.intoRaw(this.c), C = M.triangle(A, I, g);
|
|
3867
3867
|
return A.free(), I.free(), g.free(), C;
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
@@ -3872,7 +3872,7 @@ class MI extends O {
|
|
|
3872
3872
|
super(), this.type = n.RoundTriangle, this.a = A, this.b = I, this.c = g, this.borderRadius = C;
|
|
3873
3873
|
}
|
|
3874
3874
|
intoRaw() {
|
|
3875
|
-
let A =
|
|
3875
|
+
let A = G.intoRaw(this.a), I = G.intoRaw(this.b), g = G.intoRaw(this.c), C = M.roundTriangle(A, I, g, this.borderRadius);
|
|
3876
3876
|
return A.free(), I.free(), g.free(), C;
|
|
3877
3877
|
}
|
|
3878
3878
|
}
|
|
@@ -3889,7 +3889,7 @@ class FI extends O {
|
|
|
3889
3889
|
super(), this.type = n.Voxels, this.data = A, this.voxelSize = I;
|
|
3890
3890
|
}
|
|
3891
3891
|
intoRaw() {
|
|
3892
|
-
let A, I =
|
|
3892
|
+
let A, I = G.intoRaw(this.voxelSize);
|
|
3893
3893
|
return A = this.data instanceof Int32Array ? M.voxels(I, this.data) : M.voxelsFromPoints(I, this.data), I.free(), A;
|
|
3894
3894
|
}
|
|
3895
3895
|
}
|
|
@@ -3901,7 +3901,7 @@ class aI extends O {
|
|
|
3901
3901
|
return M.trimesh(this.vertices, this.indices, this.flags);
|
|
3902
3902
|
}
|
|
3903
3903
|
}
|
|
3904
|
-
class
|
|
3904
|
+
class TA extends O {
|
|
3905
3905
|
constructor(A, I) {
|
|
3906
3906
|
super(), this.type = n.ConvexPolyhedron, this.vertices = A, this.indices = I;
|
|
3907
3907
|
}
|
|
@@ -3909,7 +3909,7 @@ class nA extends O {
|
|
|
3909
3909
|
return this.indices ? M.convexMesh(this.vertices, this.indices) : M.convexHull(this.vertices);
|
|
3910
3910
|
}
|
|
3911
3911
|
}
|
|
3912
|
-
class
|
|
3912
|
+
class OA extends O {
|
|
3913
3913
|
constructor(A, I, g) {
|
|
3914
3914
|
super(), this.type = n.RoundConvexPolyhedron, this.vertices = A, this.indices = I, this.borderRadius = g;
|
|
3915
3915
|
}
|
|
@@ -3922,7 +3922,7 @@ class sI extends O {
|
|
|
3922
3922
|
super(), this.type = n.HeightField, this.nrows = A, this.ncols = I, this.heights = g, this.scale = C, this.flags = E;
|
|
3923
3923
|
}
|
|
3924
3924
|
intoRaw() {
|
|
3925
|
-
let A =
|
|
3925
|
+
let A = G.intoRaw(this.scale), I = M.heightfield(this.nrows, this.ncols, this.heights, A, this.flags);
|
|
3926
3926
|
return A.free(), I;
|
|
3927
3927
|
}
|
|
3928
3928
|
}
|
|
@@ -3934,7 +3934,7 @@ class RI extends O {
|
|
|
3934
3934
|
return M.cylinder(this.halfHeight, this.radius);
|
|
3935
3935
|
}
|
|
3936
3936
|
}
|
|
3937
|
-
class
|
|
3937
|
+
class cI extends O {
|
|
3938
3938
|
constructor(A, I, g) {
|
|
3939
3939
|
super(), this.type = n.RoundCylinder, this.borderRadius = g, this.halfHeight = A, this.radius = I;
|
|
3940
3940
|
}
|
|
@@ -3942,7 +3942,7 @@ class YI extends O {
|
|
|
3942
3942
|
return M.roundCylinder(this.halfHeight, this.radius, this.borderRadius);
|
|
3943
3943
|
}
|
|
3944
3944
|
}
|
|
3945
|
-
class
|
|
3945
|
+
class YI extends O {
|
|
3946
3946
|
constructor(A, I) {
|
|
3947
3947
|
super(), this.type = n.Cone, this.halfHeight = A, this.radius = I;
|
|
3948
3948
|
}
|
|
@@ -3965,9 +3965,9 @@ class Rg {
|
|
|
3965
3965
|
free() {
|
|
3966
3966
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
3967
3967
|
}
|
|
3968
|
-
step(A, I, g, C, E, i, D,
|
|
3969
|
-
let U =
|
|
3970
|
-
h ? this.raw.stepWithEvents(U, I.raw, g.raw, C.raw, E.raw, i.raw, D.raw,
|
|
3968
|
+
step(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
3969
|
+
let U = G.intoRaw(A);
|
|
3970
|
+
h ? this.raw.stepWithEvents(U, I.raw, g.raw, C.raw, E.raw, i.raw, D.raw, K.raw, k.raw, w.raw, h.raw, y, y ? y.filterContactPair : null, y ? y.filterIntersectionPair : null) : this.raw.step(U, I.raw, g.raw, C.raw, E.raw, i.raw, D.raw, K.raw, k.raw, w.raw), U.free();
|
|
3971
3971
|
}
|
|
3972
3972
|
}
|
|
3973
3973
|
class gI {
|
|
@@ -3977,21 +3977,21 @@ class gI {
|
|
|
3977
3977
|
free() {
|
|
3978
3978
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
3979
3979
|
}
|
|
3980
|
-
serializeAll(A, I, g, C, E, i, D,
|
|
3981
|
-
let
|
|
3982
|
-
const h = this.raw.serializeAll(
|
|
3983
|
-
return
|
|
3980
|
+
serializeAll(A, I, g, C, E, i, D, K, k) {
|
|
3981
|
+
let w = G.intoRaw(A);
|
|
3982
|
+
const h = this.raw.serializeAll(w, I.raw, g.raw, C.raw, E.raw, i.raw, D.raw, K.raw, k.raw);
|
|
3983
|
+
return w.free(), h;
|
|
3984
3984
|
}
|
|
3985
3985
|
deserializeAll(A) {
|
|
3986
|
-
return
|
|
3986
|
+
return bA.fromRaw(this.raw.deserializeAll(A));
|
|
3987
3987
|
}
|
|
3988
3988
|
}
|
|
3989
|
-
class
|
|
3989
|
+
class cg {
|
|
3990
3990
|
constructor(A, I) {
|
|
3991
3991
|
this.vertices = A, this.colors = I;
|
|
3992
3992
|
}
|
|
3993
3993
|
}
|
|
3994
|
-
class
|
|
3994
|
+
class Yg {
|
|
3995
3995
|
constructor(A) {
|
|
3996
3996
|
this.raw = A || new RC();
|
|
3997
3997
|
}
|
|
@@ -4006,7 +4006,7 @@ class qg {
|
|
|
4006
4006
|
}
|
|
4007
4007
|
class lg {
|
|
4008
4008
|
constructor(A, I, g, C, E, i) {
|
|
4009
|
-
this.params = I, this.bodies = E, this.colliders = i, this.broadPhase = g, this.narrowPhase = C, this.raw = new
|
|
4009
|
+
this.params = I, this.bodies = E, this.colliders = i, this.broadPhase = g, this.narrowPhase = C, this.raw = new YC(A), this.rawCharacterCollision = new GC(), this._applyImpulsesToDynamicBodies = !1, this._characterMass = null;
|
|
4010
4010
|
}
|
|
4011
4011
|
free() {
|
|
4012
4012
|
this.raw && (this.raw.free(), this.rawCharacterCollision.free()), this.raw = void 0, this.rawCharacterCollision = void 0;
|
|
@@ -4015,7 +4015,7 @@ class lg {
|
|
|
4015
4015
|
return this.raw.up();
|
|
4016
4016
|
}
|
|
4017
4017
|
setUp(A) {
|
|
4018
|
-
let I =
|
|
4018
|
+
let I = G.intoRaw(A);
|
|
4019
4019
|
return this.raw.setUp(I);
|
|
4020
4020
|
}
|
|
4021
4021
|
applyImpulsesToDynamicBodies() {
|
|
@@ -4091,11 +4091,11 @@ class lg {
|
|
|
4091
4091
|
return this.raw.snapToGroundEnabled();
|
|
4092
4092
|
}
|
|
4093
4093
|
computeColliderMovement(A, I, g, C, E) {
|
|
4094
|
-
let i =
|
|
4094
|
+
let i = G.intoRaw(I);
|
|
4095
4095
|
this.raw.computeColliderMovement(this.params.dt, this.broadPhase.raw, this.narrowPhase.raw, this.bodies.raw, this.colliders.raw, A.handle, i, this._applyImpulsesToDynamicBodies, this._characterMass, g, C, this.colliders.castClosure(E)), i.free();
|
|
4096
4096
|
}
|
|
4097
4097
|
computedMovement() {
|
|
4098
|
-
return
|
|
4098
|
+
return G.fromRaw(this.raw.computedMovement());
|
|
4099
4099
|
}
|
|
4100
4100
|
computedGrounded() {
|
|
4101
4101
|
return this.raw.computedGrounded();
|
|
@@ -4106,7 +4106,7 @@ class lg {
|
|
|
4106
4106
|
computedCollision(A, I) {
|
|
4107
4107
|
if (this.raw.computedCollision(A, this.rawCharacterCollision)) {
|
|
4108
4108
|
let g = this.rawCharacterCollision;
|
|
4109
|
-
return (I = I ?? new qg()).translationDeltaApplied =
|
|
4109
|
+
return (I = I ?? new qg()).translationDeltaApplied = G.fromRaw(g.translationDeltaApplied()), I.translationDeltaRemaining = G.fromRaw(g.translationDeltaRemaining()), I.toi = g.toi(), I.witness1 = G.fromRaw(g.worldWitness1()), I.witness2 = G.fromRaw(g.worldWitness2()), I.normal1 = G.fromRaw(g.worldNormal1()), I.normal2 = G.fromRaw(g.worldNormal2()), I.collider = this.colliders.get(g.handle()), I;
|
|
4110
4110
|
}
|
|
4111
4111
|
return null;
|
|
4112
4112
|
}
|
|
@@ -4137,25 +4137,25 @@ class Lg {
|
|
|
4137
4137
|
this.raw.reset_integrals();
|
|
4138
4138
|
}
|
|
4139
4139
|
applyLinearCorrection(A, I, g) {
|
|
4140
|
-
let C =
|
|
4140
|
+
let C = G.intoRaw(I), E = G.intoRaw(g);
|
|
4141
4141
|
this.raw.apply_linear_correction(this.params.dt, this.bodies.raw, A.handle, C, E), C.free(), E.free();
|
|
4142
4142
|
}
|
|
4143
4143
|
applyAngularCorrection(A, I, g) {
|
|
4144
|
-
let C =
|
|
4144
|
+
let C = a.intoRaw(I), E = G.intoRaw(g);
|
|
4145
4145
|
this.raw.apply_angular_correction(this.params.dt, this.bodies.raw, A.handle, C, E), C.free(), E.free();
|
|
4146
4146
|
}
|
|
4147
4147
|
linearCorrection(A, I, g) {
|
|
4148
|
-
let C =
|
|
4149
|
-
return C.free(), E.free(),
|
|
4148
|
+
let C = G.intoRaw(I), E = G.intoRaw(g), i = this.raw.linear_correction(this.params.dt, this.bodies.raw, A.handle, C, E);
|
|
4149
|
+
return C.free(), E.free(), G.fromRaw(i);
|
|
4150
4150
|
}
|
|
4151
4151
|
angularCorrection(A, I, g) {
|
|
4152
|
-
let C =
|
|
4153
|
-
return C.free(), E.free(),
|
|
4152
|
+
let C = a.intoRaw(I), E = G.intoRaw(g), i = this.raw.angular_correction(this.params.dt, this.bodies.raw, A.handle, C, E);
|
|
4153
|
+
return C.free(), E.free(), G.fromRaw(i);
|
|
4154
4154
|
}
|
|
4155
4155
|
}
|
|
4156
4156
|
class tg {
|
|
4157
4157
|
constructor(A, I, g, C, E) {
|
|
4158
|
-
this.raw = new
|
|
4158
|
+
this.raw = new cC(A.handle), this.broadPhase = I, this.narrowPhase = g, this.bodies = C, this.colliders = E, this._chassis = A;
|
|
4159
4159
|
}
|
|
4160
4160
|
free() {
|
|
4161
4161
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
@@ -4182,17 +4182,17 @@ class tg {
|
|
|
4182
4182
|
this.raw.set_index_forward_axis(A);
|
|
4183
4183
|
}
|
|
4184
4184
|
addWheel(A, I, g, C, E) {
|
|
4185
|
-
let i =
|
|
4186
|
-
this.raw.add_wheel(i, D,
|
|
4185
|
+
let i = G.intoRaw(A), D = G.intoRaw(I), K = G.intoRaw(g);
|
|
4186
|
+
this.raw.add_wheel(i, D, K, C, E), i.free(), D.free(), K.free();
|
|
4187
4187
|
}
|
|
4188
4188
|
numWheels() {
|
|
4189
4189
|
return this.raw.num_wheels();
|
|
4190
4190
|
}
|
|
4191
4191
|
wheelChassisConnectionPointCs(A) {
|
|
4192
|
-
return
|
|
4192
|
+
return G.fromRaw(this.raw.wheel_chassis_connection_point_cs(A));
|
|
4193
4193
|
}
|
|
4194
4194
|
setWheelChassisConnectionPointCs(A, I) {
|
|
4195
|
-
let g =
|
|
4195
|
+
let g = G.intoRaw(I);
|
|
4196
4196
|
this.raw.set_wheel_chassis_connection_point_cs(A, g), g.free();
|
|
4197
4197
|
}
|
|
4198
4198
|
wheelSuspensionRestLength(A) {
|
|
@@ -4256,17 +4256,17 @@ class tg {
|
|
|
4256
4256
|
this.raw.set_wheel_engine_force(A, I);
|
|
4257
4257
|
}
|
|
4258
4258
|
wheelDirectionCs(A) {
|
|
4259
|
-
return
|
|
4259
|
+
return G.fromRaw(this.raw.wheel_direction_cs(A));
|
|
4260
4260
|
}
|
|
4261
4261
|
setWheelDirectionCs(A, I) {
|
|
4262
|
-
let g =
|
|
4262
|
+
let g = G.intoRaw(I);
|
|
4263
4263
|
this.raw.set_wheel_direction_cs(A, g), g.free();
|
|
4264
4264
|
}
|
|
4265
4265
|
wheelAxleCs(A) {
|
|
4266
|
-
return
|
|
4266
|
+
return G.fromRaw(this.raw.wheel_axle_cs(A));
|
|
4267
4267
|
}
|
|
4268
4268
|
setWheelAxleCs(A, I) {
|
|
4269
|
-
let g =
|
|
4269
|
+
let g = G.intoRaw(I);
|
|
4270
4270
|
this.raw.set_wheel_axle_cs(A, g), g.free();
|
|
4271
4271
|
}
|
|
4272
4272
|
wheelFrictionSlip(A) {
|
|
@@ -4294,16 +4294,16 @@ class tg {
|
|
|
4294
4294
|
return this.raw.wheel_suspension_force(A);
|
|
4295
4295
|
}
|
|
4296
4296
|
wheelContactNormal(A) {
|
|
4297
|
-
return
|
|
4297
|
+
return G.fromRaw(this.raw.wheel_contact_normal_ws(A));
|
|
4298
4298
|
}
|
|
4299
4299
|
wheelContactPoint(A) {
|
|
4300
|
-
return
|
|
4300
|
+
return G.fromRaw(this.raw.wheel_contact_point_ws(A));
|
|
4301
4301
|
}
|
|
4302
4302
|
wheelSuspensionLength(A) {
|
|
4303
4303
|
return this.raw.wheel_suspension_length(A);
|
|
4304
4304
|
}
|
|
4305
4305
|
wheelHardPoint(A) {
|
|
4306
|
-
return
|
|
4306
|
+
return G.fromRaw(this.raw.wheel_hard_point_ws(A));
|
|
4307
4307
|
}
|
|
4308
4308
|
wheelIsInContact(A) {
|
|
4309
4309
|
return this.raw.wheel_is_in_contact(A);
|
|
@@ -4312,15 +4312,15 @@ class tg {
|
|
|
4312
4312
|
return this.colliders.get(this.raw.wheel_ground_object(A));
|
|
4313
4313
|
}
|
|
4314
4314
|
}
|
|
4315
|
-
class
|
|
4316
|
-
constructor(A, I, g, C, E, i, D,
|
|
4317
|
-
this.gravity = A, this.integrationParameters = new Bg(I), this.islands = new Mg(g), this.broadPhase = new Ng(C), this.narrowPhase = new Fg(E), this.bodies = new Cg(i), this.colliders = new pg(D), this.impulseJoints = new Gg(
|
|
4315
|
+
class bA {
|
|
4316
|
+
constructor(A, I, g, C, E, i, D, K, k, w, h, y, U) {
|
|
4317
|
+
this.gravity = A, this.integrationParameters = new Bg(I), this.islands = new Mg(g), this.broadPhase = new Ng(C), this.narrowPhase = new Fg(E), this.bodies = new Cg(i), this.colliders = new pg(D), this.impulseJoints = new Gg(K), this.multibodyJoints = new yg(k), this.ccdSolver = new Jg(w), this.physicsPipeline = new Rg(h), this.serializationPipeline = new gI(y), this.debugRenderPipeline = new Yg(U), this.characterControllers = /* @__PURE__ */ new Set(), this.pidControllers = /* @__PURE__ */ new Set(), this.vehicleControllers = /* @__PURE__ */ new Set(), this.impulseJoints.finalizeDeserialization(this.bodies), this.bodies.finalizeDeserialization(this.colliders), this.colliders.finalizeDeserialization(this.bodies);
|
|
4318
4318
|
}
|
|
4319
4319
|
free() {
|
|
4320
4320
|
this.integrationParameters.free(), this.islands.free(), this.broadPhase.free(), this.narrowPhase.free(), this.bodies.free(), this.colliders.free(), this.impulseJoints.free(), this.multibodyJoints.free(), this.ccdSolver.free(), this.physicsPipeline.free(), this.serializationPipeline.free(), this.debugRenderPipeline.free(), this.characterControllers.forEach((A) => A.free()), this.pidControllers.forEach((A) => A.free()), this.vehicleControllers.forEach((A) => A.free()), this.integrationParameters = void 0, this.islands = void 0, this.broadPhase = void 0, this.narrowPhase = void 0, this.bodies = void 0, this.colliders = void 0, this.ccdSolver = void 0, this.impulseJoints = void 0, this.multibodyJoints = void 0, this.physicsPipeline = void 0, this.serializationPipeline = void 0, this.debugRenderPipeline = void 0, this.characterControllers = void 0, this.pidControllers = void 0, this.vehicleControllers = void 0;
|
|
4321
4321
|
}
|
|
4322
4322
|
static fromRaw(A) {
|
|
4323
|
-
return A ? new
|
|
4323
|
+
return A ? new bA(G.fromRaw(A.takeGravity()), A.takeIntegrationParameters(), A.takeIslandManager(), A.takeBroadPhase(), A.takeNarrowPhase(), A.takeBodies(), A.takeColliders(), A.takeImpulseJoints(), A.takeMultibodyJoints()) : null;
|
|
4324
4324
|
}
|
|
4325
4325
|
takeSnapshot() {
|
|
4326
4326
|
return this.serializationPipeline.serializeAll(this.gravity, this.integrationParameters, this.islands, this.broadPhase, this.narrowPhase, this.bodies, this.colliders, this.impulseJoints, this.multibodyJoints);
|
|
@@ -4329,7 +4329,7 @@ class ZA {
|
|
|
4329
4329
|
return new gI().deserializeAll(A);
|
|
4330
4330
|
}
|
|
4331
4331
|
debugRender(A, I) {
|
|
4332
|
-
return this.debugRenderPipeline.render(this.bodies, this.colliders, this.impulseJoints, this.multibodyJoints, this.narrowPhase, A, I), new
|
|
4332
|
+
return this.debugRenderPipeline.render(this.bodies, this.colliders, this.impulseJoints, this.multibodyJoints, this.narrowPhase, A, I), new cg(this.debugRenderPipeline.vertices, this.debugRenderPipeline.colors);
|
|
4333
4333
|
}
|
|
4334
4334
|
step(A, I) {
|
|
4335
4335
|
this.physicsPipeline.step(this.gravity, this.integrationParameters, this.islands, this.broadPhase, this.narrowPhase, this.bodies, this.colliders, this.impulseJoints, this.multibodyJoints, this.ccdSolver, A, I);
|
|
@@ -4434,18 +4434,18 @@ class ZA {
|
|
|
4434
4434
|
forEachActiveRigidBody(A) {
|
|
4435
4435
|
this.bodies.forEachActiveRigidBody(this.islands, A);
|
|
4436
4436
|
}
|
|
4437
|
-
castRay(A, I, g, C, E, i, D,
|
|
4438
|
-
return this.broadPhase.castRay(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i ? i.handle : null, D ? D.handle : null, this.colliders.castClosure(
|
|
4437
|
+
castRay(A, I, g, C, E, i, D, K) {
|
|
4438
|
+
return this.broadPhase.castRay(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i ? i.handle : null, D ? D.handle : null, this.colliders.castClosure(K));
|
|
4439
4439
|
}
|
|
4440
|
-
castRayAndGetNormal(A, I, g, C, E, i, D,
|
|
4441
|
-
return this.broadPhase.castRayAndGetNormal(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i ? i.handle : null, D ? D.handle : null, this.colliders.castClosure(
|
|
4440
|
+
castRayAndGetNormal(A, I, g, C, E, i, D, K) {
|
|
4441
|
+
return this.broadPhase.castRayAndGetNormal(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i ? i.handle : null, D ? D.handle : null, this.colliders.castClosure(K));
|
|
4442
4442
|
}
|
|
4443
|
-
intersectionsWithRay(A, I, g, C, E, i, D,
|
|
4444
|
-
this.broadPhase.intersectionsWithRay(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i, D ? D.handle : null,
|
|
4443
|
+
intersectionsWithRay(A, I, g, C, E, i, D, K, k) {
|
|
4444
|
+
this.broadPhase.intersectionsWithRay(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i, D ? D.handle : null, K ? K.handle : null, this.colliders.castClosure(k));
|
|
4445
4445
|
}
|
|
4446
|
-
intersectionWithShape(A, I, g, C, E, i, D,
|
|
4447
|
-
let
|
|
4448
|
-
return
|
|
4446
|
+
intersectionWithShape(A, I, g, C, E, i, D, K) {
|
|
4447
|
+
let k = this.broadPhase.intersectionWithShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i ? i.handle : null, D ? D.handle : null, this.colliders.castClosure(K));
|
|
4448
|
+
return k != null ? this.colliders.get(k) : null;
|
|
4449
4449
|
}
|
|
4450
4450
|
projectPoint(A, I, g, C, E, i, D) {
|
|
4451
4451
|
return this.broadPhase.projectPoint(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E ? E.handle : null, i ? i.handle : null, this.colliders.castClosure(D));
|
|
@@ -4456,11 +4456,11 @@ class ZA {
|
|
|
4456
4456
|
intersectionsWithPoint(A, I, g, C, E, i, D) {
|
|
4457
4457
|
this.broadPhase.intersectionsWithPoint(this.narrowPhase, this.bodies, this.colliders, A, this.colliders.castClosure(I), g, C, E ? E.handle : null, i ? i.handle : null, this.colliders.castClosure(D));
|
|
4458
4458
|
}
|
|
4459
|
-
castShape(A, I, g, C, E, i, D,
|
|
4460
|
-
return this.broadPhase.castShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i, D,
|
|
4459
|
+
castShape(A, I, g, C, E, i, D, K, k, w, h, y) {
|
|
4460
|
+
return this.broadPhase.castShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, E, i, D, K, k, w ? w.handle : null, h ? h.handle : null, this.colliders.castClosure(y));
|
|
4461
4461
|
}
|
|
4462
|
-
intersectionsWithShape(A, I, g, C, E, i, D,
|
|
4463
|
-
this.broadPhase.intersectionsWithShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, this.colliders.castClosure(C), E, i, D ? D.handle : null,
|
|
4462
|
+
intersectionsWithShape(A, I, g, C, E, i, D, K, k) {
|
|
4463
|
+
this.broadPhase.intersectionsWithShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, this.colliders.castClosure(C), E, i, D ? D.handle : null, K ? K.handle : null, this.colliders.castClosure(k));
|
|
4464
4464
|
}
|
|
4465
4465
|
collidersWithAabbIntersectingAabb(A, I, g) {
|
|
4466
4466
|
this.broadPhase.collidersWithAabbIntersectingAabb(this.narrowPhase, this.bodies, this.colliders, A, I, this.colliders.castClosure(g));
|
|
@@ -4534,7 +4534,7 @@ class ZA {
|
|
|
4534
4534
|
}
|
|
4535
4535
|
(function(Q) {
|
|
4536
4536
|
Q[Q.NONE = 0] = "NONE", Q[Q.COLLISION_EVENTS = 1] = "COLLISION_EVENTS", Q[Q.CONTACT_FORCE_EVENTS = 2] = "CONTACT_FORCE_EVENTS";
|
|
4537
|
-
})(
|
|
4537
|
+
})(rA || (rA = {}));
|
|
4538
4538
|
class Hg {
|
|
4539
4539
|
free() {
|
|
4540
4540
|
this.raw && this.raw.free(), this.raw = void 0;
|
|
@@ -4546,13 +4546,13 @@ class Hg {
|
|
|
4546
4546
|
return this.raw.collider2();
|
|
4547
4547
|
}
|
|
4548
4548
|
totalForce() {
|
|
4549
|
-
return
|
|
4549
|
+
return G.fromRaw(this.raw.total_force());
|
|
4550
4550
|
}
|
|
4551
4551
|
totalForceMagnitude() {
|
|
4552
4552
|
return this.raw.total_force_magnitude();
|
|
4553
4553
|
}
|
|
4554
4554
|
maxForceDirection() {
|
|
4555
|
-
return
|
|
4555
|
+
return G.fromRaw(this.raw.max_force_direction());
|
|
4556
4556
|
}
|
|
4557
4557
|
maxForceMagnitude() {
|
|
4558
4558
|
return this.raw.max_force_magnitude();
|
|
@@ -4580,13 +4580,13 @@ class UC {
|
|
|
4580
4580
|
}
|
|
4581
4581
|
(function(Q) {
|
|
4582
4582
|
Q[Q.NONE = 0] = "NONE", Q[Q.FILTER_CONTACT_PAIRS = 1] = "FILTER_CONTACT_PAIRS", Q[Q.FILTER_INTERSECTION_PAIRS = 2] = "FILTER_INTERSECTION_PAIRS";
|
|
4583
|
-
})(
|
|
4583
|
+
})(eA || (eA = {})), function(Q) {
|
|
4584
4584
|
Q[Q.EMPTY = 0] = "EMPTY", Q[Q.COMPUTE_IMPULSE = 1] = "COMPUTE_IMPULSE";
|
|
4585
4585
|
}($A || ($A = {})), function(Q) {
|
|
4586
4586
|
Q[Q.EXCLUDE_FIXED = 1] = "EXCLUDE_FIXED", Q[Q.EXCLUDE_KINEMATIC = 2] = "EXCLUDE_KINEMATIC", Q[Q.EXCLUDE_DYNAMIC = 4] = "EXCLUDE_DYNAMIC", Q[Q.EXCLUDE_SENSORS = 8] = "EXCLUDE_SENSORS", Q[Q.EXCLUDE_SOLIDS = 16] = "EXCLUDE_SOLIDS", Q[Q.ONLY_DYNAMIC = 3] = "ONLY_DYNAMIC", Q[Q.ONLY_KINEMATIC = 5] = "ONLY_KINEMATIC", Q[Q.ONLY_FIXED = 6] = "ONLY_FIXED";
|
|
4587
4587
|
}(AI || (AI = {})), function(Q) {
|
|
4588
4588
|
Q[Q.DYNAMIC_DYNAMIC = 1] = "DYNAMIC_DYNAMIC", Q[Q.DYNAMIC_KINEMATIC = 12] = "DYNAMIC_KINEMATIC", Q[Q.DYNAMIC_FIXED = 2] = "DYNAMIC_FIXED", Q[Q.KINEMATIC_KINEMATIC = 52224] = "KINEMATIC_KINEMATIC", Q[Q.KINEMATIC_FIXED = 8704] = "KINEMATIC_FIXED", Q[Q.FIXED_FIXED = 32] = "FIXED_FIXED", Q[Q.DEFAULT = 15] = "DEFAULT", Q[Q.ALL = 60943] = "ALL";
|
|
4589
|
-
}(
|
|
4589
|
+
}(nA || (nA = {}));
|
|
4590
4590
|
class CI {
|
|
4591
4591
|
constructor(A, I, g, C) {
|
|
4592
4592
|
this.colliderSet = A, this.handle = I, this._parent = g, this._shape = C;
|
|
@@ -4607,16 +4607,16 @@ class CI {
|
|
|
4607
4607
|
return this.colliderSet.raw.contains(this.handle);
|
|
4608
4608
|
}
|
|
4609
4609
|
translation() {
|
|
4610
|
-
return
|
|
4610
|
+
return G.fromRaw(this.colliderSet.raw.coTranslation(this.handle));
|
|
4611
4611
|
}
|
|
4612
4612
|
translationWrtParent() {
|
|
4613
|
-
return
|
|
4613
|
+
return G.fromRaw(this.colliderSet.raw.coTranslationWrtParent(this.handle));
|
|
4614
4614
|
}
|
|
4615
4615
|
rotation() {
|
|
4616
|
-
return
|
|
4616
|
+
return a.fromRaw(this.colliderSet.raw.coRotation(this.handle));
|
|
4617
4617
|
}
|
|
4618
4618
|
rotationWrtParent() {
|
|
4619
|
-
return
|
|
4619
|
+
return a.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle));
|
|
4620
4620
|
}
|
|
4621
4621
|
isSensor() {
|
|
4622
4622
|
return this.colliderSet.raw.coIsSensor(this.handle);
|
|
@@ -4695,7 +4695,7 @@ class CI {
|
|
|
4695
4695
|
this.colliderSet.raw.coSetMass(this.handle, A);
|
|
4696
4696
|
}
|
|
4697
4697
|
setMassProperties(A, I, g, C) {
|
|
4698
|
-
let E =
|
|
4698
|
+
let E = G.intoRaw(I), i = G.intoRaw(g), D = a.intoRaw(C);
|
|
4699
4699
|
this.colliderSet.raw.coSetMassProperties(this.handle, A, E, i, D), E.free(), i.free(), D.free();
|
|
4700
4700
|
}
|
|
4701
4701
|
setTranslation(A) {
|
|
@@ -4714,10 +4714,10 @@ class CI {
|
|
|
4714
4714
|
return this.colliderSet.raw.coShapeType(this.handle);
|
|
4715
4715
|
}
|
|
4716
4716
|
halfExtents() {
|
|
4717
|
-
return
|
|
4717
|
+
return G.fromRaw(this.colliderSet.raw.coHalfExtents(this.handle));
|
|
4718
4718
|
}
|
|
4719
4719
|
setHalfExtents(A) {
|
|
4720
|
-
const I =
|
|
4720
|
+
const I = G.intoRaw(A);
|
|
4721
4721
|
this.colliderSet.raw.coSetHalfExtents(this.handle, I);
|
|
4722
4722
|
}
|
|
4723
4723
|
radius() {
|
|
@@ -4758,7 +4758,7 @@ class CI {
|
|
|
4758
4758
|
}
|
|
4759
4759
|
heightfieldScale() {
|
|
4760
4760
|
let A = this.colliderSet.raw.coHeightfieldScale(this.handle);
|
|
4761
|
-
return
|
|
4761
|
+
return G.fromRaw(A);
|
|
4762
4762
|
}
|
|
4763
4763
|
heightfieldNRows() {
|
|
4764
4764
|
return this.colliderSet.raw.coHeightfieldNRows(this.handle);
|
|
@@ -4791,51 +4791,51 @@ class CI {
|
|
|
4791
4791
|
return this.colliderSet.raw.coSolverGroups(this.handle);
|
|
4792
4792
|
}
|
|
4793
4793
|
containsPoint(A) {
|
|
4794
|
-
let I =
|
|
4794
|
+
let I = G.intoRaw(A), g = this.colliderSet.raw.coContainsPoint(this.handle, I);
|
|
4795
4795
|
return I.free(), g;
|
|
4796
4796
|
}
|
|
4797
4797
|
projectPoint(A, I) {
|
|
4798
|
-
let g =
|
|
4798
|
+
let g = G.intoRaw(A), C = FA.fromRaw(this.colliderSet.raw.coProjectPoint(this.handle, g, I));
|
|
4799
4799
|
return g.free(), C;
|
|
4800
4800
|
}
|
|
4801
4801
|
intersectsRay(A, I) {
|
|
4802
|
-
let g =
|
|
4802
|
+
let g = G.intoRaw(A.origin), C = G.intoRaw(A.dir), E = this.colliderSet.raw.coIntersectsRay(this.handle, g, C, I);
|
|
4803
4803
|
return g.free(), C.free(), E;
|
|
4804
4804
|
}
|
|
4805
|
-
castShape(A, I, g, C, E, i, D,
|
|
4806
|
-
let
|
|
4807
|
-
return
|
|
4805
|
+
castShape(A, I, g, C, E, i, D, K) {
|
|
4806
|
+
let k = G.intoRaw(A), w = G.intoRaw(g), h = a.intoRaw(C), y = G.intoRaw(E), U = I.intoRaw(), J = hA.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, k, U, w, h, y, i, D, K));
|
|
4807
|
+
return k.free(), w.free(), h.free(), y.free(), U.free(), J;
|
|
4808
4808
|
}
|
|
4809
4809
|
castCollider(A, I, g, C, E, i) {
|
|
4810
|
-
let D =
|
|
4811
|
-
return D.free(),
|
|
4810
|
+
let D = G.intoRaw(A), K = G.intoRaw(g), k = aA.fromRaw(this.colliderSet, this.colliderSet.raw.coCastCollider(this.handle, D, I.handle, K, C, E, i));
|
|
4811
|
+
return D.free(), K.free(), k;
|
|
4812
4812
|
}
|
|
4813
4813
|
intersectsShape(A, I, g) {
|
|
4814
|
-
let C =
|
|
4814
|
+
let C = G.intoRaw(I), E = a.intoRaw(g), i = A.intoRaw(), D = this.colliderSet.raw.coIntersectsShape(this.handle, i, C, E);
|
|
4815
4815
|
return C.free(), E.free(), i.free(), D;
|
|
4816
4816
|
}
|
|
4817
4817
|
contactShape(A, I, g, C) {
|
|
4818
|
-
let E =
|
|
4819
|
-
return E.free(), i.free(), D.free(),
|
|
4818
|
+
let E = G.intoRaw(I), i = a.intoRaw(g), D = A.intoRaw(), K = kA.fromRaw(this.colliderSet.raw.coContactShape(this.handle, D, E, i, C));
|
|
4819
|
+
return E.free(), i.free(), D.free(), K;
|
|
4820
4820
|
}
|
|
4821
4821
|
contactCollider(A, I) {
|
|
4822
|
-
return
|
|
4822
|
+
return kA.fromRaw(this.colliderSet.raw.coContactCollider(this.handle, A.handle, I));
|
|
4823
4823
|
}
|
|
4824
4824
|
castRay(A, I, g) {
|
|
4825
|
-
let C =
|
|
4825
|
+
let C = G.intoRaw(A.origin), E = G.intoRaw(A.dir), i = this.colliderSet.raw.coCastRay(this.handle, C, E, I, g);
|
|
4826
4826
|
return C.free(), E.free(), i;
|
|
4827
4827
|
}
|
|
4828
4828
|
castRayAndGetNormal(A, I, g) {
|
|
4829
|
-
let C =
|
|
4829
|
+
let C = G.intoRaw(A.origin), E = G.intoRaw(A.dir), i = NA.fromRaw(this.colliderSet.raw.coCastRayAndGetNormal(this.handle, C, E, I, g));
|
|
4830
4830
|
return C.free(), E.free(), i;
|
|
4831
4831
|
}
|
|
4832
4832
|
}
|
|
4833
4833
|
(function(Q) {
|
|
4834
4834
|
Q[Q.Density = 0] = "Density", Q[Q.Mass = 1] = "Mass", Q[Q.MassProps = 2] = "MassProps";
|
|
4835
|
-
})(
|
|
4835
|
+
})(oA || (oA = {}));
|
|
4836
4836
|
class e {
|
|
4837
4837
|
constructor(A) {
|
|
4838
|
-
this.enabled = !0, this.shape = A, this.massPropsMode =
|
|
4838
|
+
this.enabled = !0, this.shape = A, this.massPropsMode = oA.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = a.identity(), this.translation = G.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = yA.Average, this.restitutionCombineRule = yA.Average, this.activeCollisionTypes = nA.DEFAULT, this.activeEvents = rA.NONE, this.activeHooks = eA.NONE, this.mass = 0, this.centerOfMass = G.zeros(), this.contactForceEventThreshold = 0, this.contactSkin = 0, this.principalAngularInertia = G.zeros(), this.angularInertiaLocalFrame = a.identity();
|
|
4839
4839
|
}
|
|
4840
4840
|
static ball(A) {
|
|
4841
4841
|
const I = new kI(A);
|
|
@@ -4886,11 +4886,11 @@ class e {
|
|
|
4886
4886
|
return new e(g);
|
|
4887
4887
|
}
|
|
4888
4888
|
static roundCylinder(A, I, g) {
|
|
4889
|
-
const C = new
|
|
4889
|
+
const C = new cI(A, I, g);
|
|
4890
4890
|
return new e(C);
|
|
4891
4891
|
}
|
|
4892
4892
|
static cone(A, I) {
|
|
4893
|
-
const g = new
|
|
4893
|
+
const g = new YI(A, I);
|
|
4894
4894
|
return new e(g);
|
|
4895
4895
|
}
|
|
4896
4896
|
static roundCone(A, I, g) {
|
|
@@ -4898,19 +4898,19 @@ class e {
|
|
|
4898
4898
|
return new e(C);
|
|
4899
4899
|
}
|
|
4900
4900
|
static convexHull(A) {
|
|
4901
|
-
const I = new
|
|
4901
|
+
const I = new TA(A, null);
|
|
4902
4902
|
return new e(I);
|
|
4903
4903
|
}
|
|
4904
4904
|
static convexMesh(A, I) {
|
|
4905
|
-
const g = new
|
|
4905
|
+
const g = new TA(A, I);
|
|
4906
4906
|
return new e(g);
|
|
4907
4907
|
}
|
|
4908
4908
|
static roundConvexHull(A, I) {
|
|
4909
|
-
const g = new
|
|
4909
|
+
const g = new OA(A, null, I);
|
|
4910
4910
|
return new e(g);
|
|
4911
4911
|
}
|
|
4912
4912
|
static roundConvexMesh(A, I, g) {
|
|
4913
|
-
const C = new
|
|
4913
|
+
const C = new OA(A, I, g);
|
|
4914
4914
|
return new e(C);
|
|
4915
4915
|
}
|
|
4916
4916
|
setTranslation(A, I, g) {
|
|
@@ -4918,7 +4918,7 @@ class e {
|
|
|
4918
4918
|
return this.translation = { x: A, y: I, z: g }, this;
|
|
4919
4919
|
}
|
|
4920
4920
|
setRotation(A) {
|
|
4921
|
-
return
|
|
4921
|
+
return a.copy(this.rotation, A), this;
|
|
4922
4922
|
}
|
|
4923
4923
|
setSensor(A) {
|
|
4924
4924
|
return this.isSensor = A, this;
|
|
@@ -4930,13 +4930,13 @@ class e {
|
|
|
4930
4930
|
return this.contactSkin = A, this;
|
|
4931
4931
|
}
|
|
4932
4932
|
setDensity(A) {
|
|
4933
|
-
return this.massPropsMode =
|
|
4933
|
+
return this.massPropsMode = oA.Density, this.density = A, this;
|
|
4934
4934
|
}
|
|
4935
4935
|
setMass(A) {
|
|
4936
|
-
return this.massPropsMode =
|
|
4936
|
+
return this.massPropsMode = oA.Mass, this.mass = A, this;
|
|
4937
4937
|
}
|
|
4938
4938
|
setMassProperties(A, I, g, C) {
|
|
4939
|
-
return this.massPropsMode =
|
|
4939
|
+
return this.massPropsMode = oA.MassProps, this.mass = A, G.copy(this.centerOfMass, I), G.copy(this.principalAngularInertia, g), a.copy(this.angularInertiaLocalFrame, C), this;
|
|
4940
4940
|
}
|
|
4941
4941
|
setRestitution(A) {
|
|
4942
4942
|
return this.restitution = A, this;
|
|
@@ -4987,8 +4987,8 @@ class pg {
|
|
|
4987
4987
|
createCollider(A, I, g) {
|
|
4988
4988
|
let C = g != null && g != null;
|
|
4989
4989
|
if (C && isNaN(g)) throw Error("Cannot create a collider with a parent rigid-body handle that is not a number.");
|
|
4990
|
-
let E = I.shape.intoRaw(), i =
|
|
4991
|
-
E.free(), i.free(), D.free(),
|
|
4990
|
+
let E = I.shape.intoRaw(), i = G.intoRaw(I.translation), D = a.intoRaw(I.rotation), K = G.intoRaw(I.centerOfMass), k = G.intoRaw(I.principalAngularInertia), w = a.intoRaw(I.angularInertiaLocalFrame), h = this.raw.createCollider(I.enabled, E, i, D, I.massPropsMode, I.mass, K, k, w, I.density, I.friction, I.restitution, I.frictionCombineRule, I.restitutionCombineRule, I.isSensor, I.collisionGroups, I.solverGroups, I.activeCollisionTypes, I.activeHooks, I.activeEvents, I.contactForceEventThreshold, I.contactSkin, C, C ? g : 0, A.raw);
|
|
4991
|
+
E.free(), i.free(), D.free(), K.free(), k.free(), w.free();
|
|
4992
4992
|
let y = C ? A.get(g) : null, U = new CI(this, h, y, I.shape);
|
|
4993
4993
|
return this.map.set(h, U), U;
|
|
4994
4994
|
}
|
|
@@ -5016,42 +5016,42 @@ class pg {
|
|
|
5016
5016
|
}
|
|
5017
5017
|
function tC(Q, A, I, g) {
|
|
5018
5018
|
return new (I || (I = Promise))(function(C, E) {
|
|
5019
|
-
function i(
|
|
5019
|
+
function i(k) {
|
|
5020
5020
|
try {
|
|
5021
|
-
|
|
5022
|
-
} catch (
|
|
5023
|
-
E(
|
|
5021
|
+
K(g.next(k));
|
|
5022
|
+
} catch (w) {
|
|
5023
|
+
E(w);
|
|
5024
5024
|
}
|
|
5025
5025
|
}
|
|
5026
|
-
function D(
|
|
5026
|
+
function D(k) {
|
|
5027
5027
|
try {
|
|
5028
|
-
|
|
5029
|
-
} catch (
|
|
5030
|
-
E(
|
|
5028
|
+
K(g.throw(k));
|
|
5029
|
+
} catch (w) {
|
|
5030
|
+
E(w);
|
|
5031
5031
|
}
|
|
5032
5032
|
}
|
|
5033
|
-
function k
|
|
5034
|
-
var
|
|
5035
|
-
|
|
5036
|
-
h(
|
|
5033
|
+
function K(k) {
|
|
5034
|
+
var w;
|
|
5035
|
+
k.done ? C(k.value) : (w = k.value, w instanceof I ? w : new I(function(h) {
|
|
5036
|
+
h(w);
|
|
5037
5037
|
})).then(i, D);
|
|
5038
5038
|
}
|
|
5039
|
-
|
|
5039
|
+
K((g = g.apply(Q, [])).next());
|
|
5040
5040
|
});
|
|
5041
5041
|
}
|
|
5042
5042
|
for (var HC = { byteLength: function(Q) {
|
|
5043
5043
|
var A = QC(Q), I = A[0], g = A[1];
|
|
5044
5044
|
return 3 * (I + g) / 4 - g;
|
|
5045
5045
|
}, toByteArray: function(Q) {
|
|
5046
|
-
var A, I, g = QC(Q), C = g[0], E = g[1], i = new pC(function(
|
|
5047
|
-
return 3 * (
|
|
5048
|
-
}(0, C, E)), D = 0,
|
|
5049
|
-
for (I = 0; I <
|
|
5050
|
-
return E === 2 && (A =
|
|
5046
|
+
var A, I, g = QC(Q), C = g[0], E = g[1], i = new pC(function(k, w, h) {
|
|
5047
|
+
return 3 * (w + h) / 4 - h;
|
|
5048
|
+
}(0, C, E)), D = 0, K = E > 0 ? C - 4 : C;
|
|
5049
|
+
for (I = 0; I < K; I += 4) A = V[Q.charCodeAt(I)] << 18 | V[Q.charCodeAt(I + 1)] << 12 | V[Q.charCodeAt(I + 2)] << 6 | V[Q.charCodeAt(I + 3)], i[D++] = A >> 16 & 255, i[D++] = A >> 8 & 255, i[D++] = 255 & A;
|
|
5050
|
+
return E === 2 && (A = V[Q.charCodeAt(I)] << 2 | V[Q.charCodeAt(I + 1)] >> 4, i[D++] = 255 & A), E === 1 && (A = V[Q.charCodeAt(I)] << 10 | V[Q.charCodeAt(I + 1)] << 4 | V[Q.charCodeAt(I + 2)] >> 2, i[D++] = A >> 8 & 255, i[D++] = 255 & A), i;
|
|
5051
5051
|
}, fromByteArray: function(Q) {
|
|
5052
5052
|
for (var A, I = Q.length, g = I % 3, C = [], E = 16383, i = 0, D = I - g; i < D; i += E) C.push(eC(Q, i, i + E > D ? D : i + E));
|
|
5053
|
-
return g === 1 ? (A = Q[I - 1], C.push(
|
|
5054
|
-
} },
|
|
5053
|
+
return g === 1 ? (A = Q[I - 1], C.push(AA[A >> 2] + AA[A << 4 & 63] + "==")) : g === 2 && (A = (Q[I - 2] << 8) + Q[I - 1], C.push(AA[A >> 10] + AA[A >> 4 & 63] + AA[A << 2 & 63] + "=")), C.join("");
|
|
5054
|
+
} }, AA = [], V = [], pC = typeof Uint8Array < "u" ? Uint8Array : Array, mI = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", UA = 0, rC = mI.length; UA < rC; ++UA) AA[UA] = mI[UA], V[mI.charCodeAt(UA)] = UA;
|
|
5055
5055
|
function QC(Q) {
|
|
5056
5056
|
var A = Q.length;
|
|
5057
5057
|
if (A % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -5059,7 +5059,7 @@ function QC(Q) {
|
|
|
5059
5059
|
return I === -1 && (I = A), [I, I === A ? 0 : 4 - I % 4];
|
|
5060
5060
|
}
|
|
5061
5061
|
function eC(Q, A, I) {
|
|
5062
|
-
for (var g, C, E = [], i = A; i < I; i += 3) g = (Q[i] << 16 & 16711680) + (Q[i + 1] << 8 & 65280) + (255 & Q[i + 2]), E.push(
|
|
5062
|
+
for (var g, C, E = [], i = A; i < I; i += 3) g = (Q[i] << 16 & 16711680) + (Q[i + 1] << 8 & 65280) + (255 & Q[i + 2]), E.push(AA[(C = g) >> 18 & 63] + AA[C >> 12 & 63] + AA[C >> 6 & 63] + AA[63 & C]);
|
|
5063
5063
|
return E.join("");
|
|
5064
5064
|
}
|
|
5065
5065
|
function yC() {
|
|
@@ -5084,49 +5084,49 @@ function MC(Q) {
|
|
|
5084
5084
|
var A;
|
|
5085
5085
|
A = Q, B.reserve_memory(A);
|
|
5086
5086
|
}
|
|
5087
|
-
|
|
5088
|
-
var nC = Object.freeze({ __proto__: null, version: JC, reserveMemory: MC, Vector3: Ig, VectorOps:
|
|
5089
|
-
return
|
|
5090
|
-
}, RigidBody: II, RigidBodyDesc:
|
|
5091
|
-
return
|
|
5087
|
+
V[45] = 62, V[95] = 63;
|
|
5088
|
+
var nC = Object.freeze({ __proto__: null, version: JC, reserveMemory: MC, Vector3: Ig, VectorOps: G, Quaternion: XA, RotationOps: a, SdpMatrix3: gg, SdpMatrix3Ops: VA, get RigidBodyType() {
|
|
5089
|
+
return P;
|
|
5090
|
+
}, RigidBody: II, RigidBodyDesc: _, RigidBodySet: Cg, IntegrationParameters: Bg, get JointType() {
|
|
5091
|
+
return W;
|
|
5092
5092
|
}, get MotorModel() {
|
|
5093
5093
|
return PA;
|
|
5094
5094
|
}, get JointAxesMask() {
|
|
5095
5095
|
return uA;
|
|
5096
|
-
}, ImpulseJoint:
|
|
5097
|
-
return
|
|
5096
|
+
}, ImpulseJoint: u, UnitImpulseJoint: SI, FixedImpulseJoint: Qg, RopeImpulseJoint: Eg, SpringImpulseJoint: ig, PrismaticImpulseJoint: Dg, RevoluteImpulseJoint: og, GenericImpulseJoint: wg, SphericalImpulseJoint: Sg, JointData: $, ImpulseJointSet: Gg, MultibodyJoint: EA, UnitMultibodyJoint: GI, FixedMultibodyJoint: kg, PrismaticMultibodyJoint: Kg, RevoluteMultibodyJoint: hg, SphericalMultibodyJoint: Ug, MultibodyJointSet: yg, get CoefficientCombineRule() {
|
|
5097
|
+
return yA;
|
|
5098
5098
|
}, CCDSolver: Jg, IslandManager: Mg, BroadPhase: Ng, NarrowPhase: Fg, TempContactManifold: ag, Shape: O, get ShapeType() {
|
|
5099
5099
|
return n;
|
|
5100
5100
|
}, get HeightFieldFlags() {
|
|
5101
5101
|
return zA;
|
|
5102
5102
|
}, get TriMeshFlags() {
|
|
5103
5103
|
return _A;
|
|
5104
|
-
}, Ball: kI, HalfSpace: sg, Cuboid: KI, RoundCuboid: hI, Capsule: UI, Segment: yI, Triangle: JI, RoundTriangle: MI, Polyline: NI, Voxels: FI, TriMesh: aI, ConvexPolyhedron:
|
|
5105
|
-
return
|
|
5104
|
+
}, Ball: kI, HalfSpace: sg, Cuboid: KI, RoundCuboid: hI, Capsule: UI, Segment: yI, Triangle: JI, RoundTriangle: MI, Polyline: NI, Voxels: FI, TriMesh: aI, ConvexPolyhedron: TA, RoundConvexPolyhedron: OA, Heightfield: sI, Cylinder: RI, RoundCylinder: cI, Cone: YI, RoundCone: qI, get ActiveCollisionTypes() {
|
|
5105
|
+
return nA;
|
|
5106
5106
|
}, Collider: CI, get MassPropsMode() {
|
|
5107
|
-
return
|
|
5107
|
+
return oA;
|
|
5108
5108
|
}, ColliderDesc: e, ColliderSet: pg, get FeatureType() {
|
|
5109
|
-
return
|
|
5110
|
-
}, Ray: hC, RayIntersection:
|
|
5111
|
-
return pA;
|
|
5112
|
-
}, TempContactForceEvent: Hg, EventQueue: UC, get ActiveHooks() {
|
|
5109
|
+
return GA;
|
|
5110
|
+
}, Ray: hC, RayIntersection: NA, RayColliderIntersection: JA, RayColliderHit: ZA, PointProjection: FA, PointColliderProjection: MA, ShapeCastHit: hA, ColliderShapeCastHit: aA, ShapeContact: kA, World: bA, PhysicsPipeline: Rg, SerializationPipeline: gI, get ActiveEvents() {
|
|
5113
5111
|
return rA;
|
|
5112
|
+
}, TempContactForceEvent: Hg, EventQueue: UC, get ActiveHooks() {
|
|
5113
|
+
return eA;
|
|
5114
5114
|
}, get SolverFlags() {
|
|
5115
5115
|
return $A;
|
|
5116
|
-
}, DebugRenderBuffers:
|
|
5116
|
+
}, DebugRenderBuffers: cg, DebugRenderPipeline: Yg, get QueryFilterFlags() {
|
|
5117
5117
|
return AI;
|
|
5118
5118
|
}, init: yC, CharacterCollision: qg, KinematicCharacterController: lg, get PidAxesMask() {
|
|
5119
5119
|
return vA;
|
|
5120
5120
|
}, PidController: Lg, DynamicRayCastVehicleController: tg }), TC = /* @__PURE__ */ Object.freeze({
|
|
5121
5121
|
__proto__: null,
|
|
5122
5122
|
get ActiveCollisionTypes() {
|
|
5123
|
-
return
|
|
5123
|
+
return nA;
|
|
5124
5124
|
},
|
|
5125
5125
|
get ActiveEvents() {
|
|
5126
|
-
return
|
|
5126
|
+
return rA;
|
|
5127
5127
|
},
|
|
5128
5128
|
get ActiveHooks() {
|
|
5129
|
-
return
|
|
5129
|
+
return eA;
|
|
5130
5130
|
},
|
|
5131
5131
|
Ball: kI,
|
|
5132
5132
|
BroadPhase: Ng,
|
|
@@ -5134,22 +5134,22 @@ var nC = Object.freeze({ __proto__: null, version: JC, reserveMemory: MC, Vector
|
|
|
5134
5134
|
Capsule: UI,
|
|
5135
5135
|
CharacterCollision: qg,
|
|
5136
5136
|
get CoefficientCombineRule() {
|
|
5137
|
-
return
|
|
5137
|
+
return yA;
|
|
5138
5138
|
},
|
|
5139
5139
|
Collider: CI,
|
|
5140
5140
|
ColliderDesc: e,
|
|
5141
5141
|
ColliderSet: pg,
|
|
5142
|
-
ColliderShapeCastHit:
|
|
5143
|
-
Cone:
|
|
5144
|
-
ConvexPolyhedron:
|
|
5142
|
+
ColliderShapeCastHit: aA,
|
|
5143
|
+
Cone: YI,
|
|
5144
|
+
ConvexPolyhedron: TA,
|
|
5145
5145
|
Cuboid: KI,
|
|
5146
5146
|
Cylinder: RI,
|
|
5147
|
-
DebugRenderBuffers:
|
|
5148
|
-
DebugRenderPipeline:
|
|
5147
|
+
DebugRenderBuffers: cg,
|
|
5148
|
+
DebugRenderPipeline: Yg,
|
|
5149
5149
|
DynamicRayCastVehicleController: tg,
|
|
5150
5150
|
EventQueue: UC,
|
|
5151
5151
|
get FeatureType() {
|
|
5152
|
-
return
|
|
5152
|
+
return GA;
|
|
5153
5153
|
},
|
|
5154
5154
|
FixedImpulseJoint: Qg,
|
|
5155
5155
|
FixedMultibodyJoint: kg,
|
|
@@ -5159,25 +5159,25 @@ var nC = Object.freeze({ __proto__: null, version: JC, reserveMemory: MC, Vector
|
|
|
5159
5159
|
return zA;
|
|
5160
5160
|
},
|
|
5161
5161
|
Heightfield: sI,
|
|
5162
|
-
ImpulseJoint:
|
|
5162
|
+
ImpulseJoint: u,
|
|
5163
5163
|
ImpulseJointSet: Gg,
|
|
5164
5164
|
IntegrationParameters: Bg,
|
|
5165
5165
|
IslandManager: Mg,
|
|
5166
5166
|
get JointAxesMask() {
|
|
5167
5167
|
return uA;
|
|
5168
5168
|
},
|
|
5169
|
-
JointData:
|
|
5169
|
+
JointData: $,
|
|
5170
5170
|
get JointType() {
|
|
5171
|
-
return
|
|
5171
|
+
return W;
|
|
5172
5172
|
},
|
|
5173
5173
|
KinematicCharacterController: lg,
|
|
5174
5174
|
get MassPropsMode() {
|
|
5175
|
-
return
|
|
5175
|
+
return oA;
|
|
5176
5176
|
},
|
|
5177
5177
|
get MotorModel() {
|
|
5178
5178
|
return PA;
|
|
5179
5179
|
},
|
|
5180
|
-
MultibodyJoint:
|
|
5180
|
+
MultibodyJoint: EA,
|
|
5181
5181
|
MultibodyJointSet: yg,
|
|
5182
5182
|
NarrowPhase: Fg,
|
|
5183
5183
|
PhysicsPipeline: Rg,
|
|
@@ -5185,8 +5185,8 @@ var nC = Object.freeze({ __proto__: null, version: JC, reserveMemory: MC, Vector
|
|
|
5185
5185
|
return vA;
|
|
5186
5186
|
},
|
|
5187
5187
|
PidController: Lg,
|
|
5188
|
-
PointColliderProjection:
|
|
5189
|
-
PointProjection:
|
|
5188
|
+
PointColliderProjection: MA,
|
|
5189
|
+
PointProjection: FA,
|
|
5190
5190
|
Polyline: NI,
|
|
5191
5191
|
PrismaticImpulseJoint: Dg,
|
|
5192
5192
|
PrismaticMultibodyJoint: Kg,
|
|
@@ -5195,31 +5195,31 @@ var nC = Object.freeze({ __proto__: null, version: JC, reserveMemory: MC, Vector
|
|
|
5195
5195
|
return AI;
|
|
5196
5196
|
},
|
|
5197
5197
|
Ray: hC,
|
|
5198
|
-
RayColliderHit:
|
|
5199
|
-
RayColliderIntersection:
|
|
5200
|
-
RayIntersection:
|
|
5198
|
+
RayColliderHit: ZA,
|
|
5199
|
+
RayColliderIntersection: JA,
|
|
5200
|
+
RayIntersection: NA,
|
|
5201
5201
|
RevoluteImpulseJoint: og,
|
|
5202
5202
|
RevoluteMultibodyJoint: hg,
|
|
5203
5203
|
RigidBody: II,
|
|
5204
|
-
RigidBodyDesc:
|
|
5204
|
+
RigidBodyDesc: _,
|
|
5205
5205
|
RigidBodySet: Cg,
|
|
5206
5206
|
get RigidBodyType() {
|
|
5207
|
-
return
|
|
5207
|
+
return P;
|
|
5208
5208
|
},
|
|
5209
5209
|
RopeImpulseJoint: Eg,
|
|
5210
|
-
RotationOps:
|
|
5210
|
+
RotationOps: a,
|
|
5211
5211
|
RoundCone: qI,
|
|
5212
|
-
RoundConvexPolyhedron:
|
|
5212
|
+
RoundConvexPolyhedron: OA,
|
|
5213
5213
|
RoundCuboid: hI,
|
|
5214
|
-
RoundCylinder:
|
|
5214
|
+
RoundCylinder: cI,
|
|
5215
5215
|
RoundTriangle: MI,
|
|
5216
5216
|
SdpMatrix3: gg,
|
|
5217
5217
|
SdpMatrix3Ops: VA,
|
|
5218
5218
|
Segment: yI,
|
|
5219
5219
|
SerializationPipeline: gI,
|
|
5220
5220
|
Shape: O,
|
|
5221
|
-
ShapeCastHit:
|
|
5222
|
-
ShapeContact:
|
|
5221
|
+
ShapeCastHit: hA,
|
|
5222
|
+
ShapeContact: kA,
|
|
5223
5223
|
get ShapeType() {
|
|
5224
5224
|
return n;
|
|
5225
5225
|
},
|
|
@@ -5239,18 +5239,18 @@ var nC = Object.freeze({ __proto__: null, version: JC, reserveMemory: MC, Vector
|
|
|
5239
5239
|
UnitImpulseJoint: SI,
|
|
5240
5240
|
UnitMultibodyJoint: GI,
|
|
5241
5241
|
Vector3: Ig,
|
|
5242
|
-
VectorOps:
|
|
5242
|
+
VectorOps: G,
|
|
5243
5243
|
Voxels: FI,
|
|
5244
|
-
World:
|
|
5244
|
+
World: bA,
|
|
5245
5245
|
default: nC,
|
|
5246
5246
|
init: yC,
|
|
5247
5247
|
reserveMemory: MC,
|
|
5248
5248
|
version: JC
|
|
5249
5249
|
});
|
|
5250
|
-
let Y = null, T = null,
|
|
5251
|
-
const
|
|
5250
|
+
let Y = null, T = null, xA = null;
|
|
5251
|
+
const X = /* @__PURE__ */ new Map(), rg = /* @__PURE__ */ new Map(), KA = /* @__PURE__ */ new Map(), dA = /* @__PURE__ */ new Map();
|
|
5252
5252
|
let lI = "vector", uI = { x: 0, y: -9.81, z: 0 }, NC = { x: 0, y: 0, z: 0 }, FC = 9.81, EC = 0, XI = 1 / 60;
|
|
5253
|
-
function
|
|
5253
|
+
function IA(Q, A = null) {
|
|
5254
5254
|
Q != null && postMessage({ replyTo: Q, result: A });
|
|
5255
5255
|
}
|
|
5256
5256
|
function OC(Q, A) {
|
|
@@ -5259,10 +5259,10 @@ function OC(Q, A) {
|
|
|
5259
5259
|
function dC(Q, A, I) {
|
|
5260
5260
|
return Math.max(A, Math.min(I, Q));
|
|
5261
5261
|
}
|
|
5262
|
-
function
|
|
5262
|
+
function b(Q) {
|
|
5263
5263
|
return { x: +Q[0], y: +Q[1], z: +Q[2] };
|
|
5264
5264
|
}
|
|
5265
|
-
function
|
|
5265
|
+
function LA(Q) {
|
|
5266
5266
|
return { x: +Q[0], y: +Q[1], z: +Q[2], w: +Q[3] };
|
|
5267
5267
|
}
|
|
5268
5268
|
function ZC(Q, A) {
|
|
@@ -5278,12 +5278,12 @@ function WC(Q) {
|
|
|
5278
5278
|
const A = jC(Q) || 1;
|
|
5279
5279
|
return { x: Q.x / A, y: Q.y / A, z: Q.z / A };
|
|
5280
5280
|
}
|
|
5281
|
-
async function
|
|
5282
|
-
if (
|
|
5283
|
-
await
|
|
5281
|
+
async function f() {
|
|
5282
|
+
if (xA) {
|
|
5283
|
+
await xA;
|
|
5284
5284
|
return;
|
|
5285
5285
|
}
|
|
5286
|
-
|
|
5286
|
+
xA = (async () => {
|
|
5287
5287
|
if (!Y) {
|
|
5288
5288
|
postMessage({ type: "debug", msg: "importing rapier module" });
|
|
5289
5289
|
const Q = TC, I = { locateFile: (C) => {
|
|
@@ -5326,7 +5326,7 @@ async function u() {
|
|
|
5326
5326
|
}
|
|
5327
5327
|
})();
|
|
5328
5328
|
try {
|
|
5329
|
-
await
|
|
5329
|
+
await xA;
|
|
5330
5330
|
} finally {
|
|
5331
5331
|
}
|
|
5332
5332
|
}
|
|
@@ -5346,56 +5346,56 @@ function fC(Q, A, I) {
|
|
|
5346
5346
|
throw postMessage({ type: "error", msg: "world.createRigidBody is not a function", value: typeof T.createRigidBody }), new Error("world.createRigidBody is not a function");
|
|
5347
5347
|
postMessage({ type: "debug", msg: "createBody: about to call world.createRigidBody", id: A, descType: typeof Q, descCtor: Q && Q.constructor ? Q.constructor.name : null });
|
|
5348
5348
|
const g = T.createRigidBody(Q);
|
|
5349
|
-
return I?.v && typeof g.setLinvel == "function" && g.setLinvel(
|
|
5349
|
+
return I?.v && typeof g.setLinvel == "function" && g.setLinvel(b(I.v), !1), I?.w && typeof g.setAngvel == "function" && g.setAngvel(b(I.w), !1), X.set(A, g), rg.set(A, { type: I.type, mass: I.mass }), g;
|
|
5350
5350
|
} catch (g) {
|
|
5351
5351
|
throw postMessage({ type: "error", msg: "createBody failed", error: g && (g.message || String(g)) || String(g), id: A, descType: typeof Q }), g;
|
|
5352
5352
|
}
|
|
5353
5353
|
}
|
|
5354
5354
|
function mC(Q) {
|
|
5355
|
-
const A =
|
|
5355
|
+
const A = X.get(Q);
|
|
5356
5356
|
if (A) {
|
|
5357
|
-
for (const [I, g] of Array.from(
|
|
5357
|
+
for (const [I, g] of Array.from(dA.entries()))
|
|
5358
5358
|
if (g === Q) {
|
|
5359
|
-
const C =
|
|
5360
|
-
C && T.removeCollider(C, !0),
|
|
5359
|
+
const C = KA.get(I);
|
|
5360
|
+
C && T.removeCollider(C, !0), KA.delete(I), dA.delete(I);
|
|
5361
5361
|
}
|
|
5362
5362
|
T.removeRigidBody(A);
|
|
5363
5363
|
}
|
|
5364
|
-
|
|
5364
|
+
X.delete(Q), rg.delete(Q);
|
|
5365
5365
|
}
|
|
5366
5366
|
function XC({ id: Q, positions: A, indices: I, bodyId: g, local: C }) {
|
|
5367
5367
|
if (!(A instanceof Float32Array))
|
|
5368
5368
|
throw new Error("attachCollider: positions must be Float32Array");
|
|
5369
5369
|
if (A.length % 3 !== 0)
|
|
5370
5370
|
throw new Error("attachCollider: positions length must be a multiple of 3");
|
|
5371
|
-
const E = new Float32Array(A), i = C && C.s && +C.s[0] || 1, D = C && C.s && +C.s[1] || 1,
|
|
5371
|
+
const E = new Float32Array(A), i = C && C.s && +C.s[0] || 1, D = C && C.s && +C.s[1] || 1, K = C && C.s && +C.s[2] || 1;
|
|
5372
5372
|
for (let U = 0, J = E.length; U < J; U += 3)
|
|
5373
|
-
E[U + 0] *= i, E[U + 1] *= D, E[U + 2] *=
|
|
5374
|
-
let
|
|
5373
|
+
E[U + 0] *= i, E[U + 1] *= D, E[U + 2] *= K;
|
|
5374
|
+
let k = null;
|
|
5375
5375
|
if (I) {
|
|
5376
5376
|
const U = I instanceof Uint32Array ? I : new Uint32Array(I.buffer || I);
|
|
5377
|
-
|
|
5377
|
+
k = new Uint32Array(U);
|
|
5378
5378
|
const J = E.length / 3;
|
|
5379
|
-
for (let
|
|
5380
|
-
const
|
|
5381
|
-
if (!Number.isFinite(
|
|
5382
|
-
throw new Error(`attachCollider: index out of range or invalid at ${
|
|
5379
|
+
for (let F = 0; F < k.length; ++F) {
|
|
5380
|
+
const l = k[F];
|
|
5381
|
+
if (!Number.isFinite(l) || l < 0 || l >= J)
|
|
5382
|
+
throw new Error(`attachCollider: index out of range or invalid at ${F}: ${l} (vertCount=${J})`);
|
|
5383
5383
|
}
|
|
5384
5384
|
}
|
|
5385
5385
|
for (let U = 0; U < E.length; ++U) {
|
|
5386
5386
|
const J = E[U];
|
|
5387
5387
|
if (!Number.isFinite(J)) throw new Error(`attachCollider: invalid position value at ${U}: ${J}`);
|
|
5388
5388
|
}
|
|
5389
|
-
const
|
|
5390
|
-
C?.p &&
|
|
5391
|
-
const h =
|
|
5389
|
+
const w = Y.ColliderDesc.trimesh(E, k);
|
|
5390
|
+
C?.p && w.setTranslation(+C.p[0], +C.p[1], +C.p[2]), C?.q && w.setRotation(LA(C.q));
|
|
5391
|
+
const h = X.get(g);
|
|
5392
5392
|
if (!h) throw new Error(`attachCollider: body not found: ${g}`);
|
|
5393
|
-
const y = T.createCollider(
|
|
5394
|
-
|
|
5393
|
+
const y = T.createCollider(w, h);
|
|
5394
|
+
KA.set(Q, y), dA.set(Q, g);
|
|
5395
5395
|
}
|
|
5396
5396
|
function VC(Q) {
|
|
5397
|
-
const A =
|
|
5398
|
-
A && T.removeCollider(A, !0),
|
|
5397
|
+
const A = KA.get(Q);
|
|
5398
|
+
A && T.removeCollider(A, !0), KA.delete(Q), dA.delete(Q);
|
|
5399
5399
|
}
|
|
5400
5400
|
function PC(Q) {
|
|
5401
5401
|
if (!Q || typeof Q != "object") throw new Error("attachShapeCollider: missing shape");
|
|
@@ -5431,12 +5431,12 @@ function PC(Q) {
|
|
|
5431
5431
|
case "segment": {
|
|
5432
5432
|
const g = I.a || I.p1, C = I.b || I.p2;
|
|
5433
5433
|
if (!g || !C) throw new Error("segment requires a and b (or p1,p2)");
|
|
5434
|
-
return Y.ColliderDesc.segment(
|
|
5434
|
+
return Y.ColliderDesc.segment(b(g), b(C));
|
|
5435
5435
|
}
|
|
5436
5436
|
case "triangle": {
|
|
5437
5437
|
const g = I.a, C = I.b, E = I.c;
|
|
5438
5438
|
if (!g || !C || !E) throw new Error("triangle requires a, b, c");
|
|
5439
|
-
return Y.ColliderDesc.triangle(
|
|
5439
|
+
return Y.ColliderDesc.triangle(b(g), b(C), b(E));
|
|
5440
5440
|
}
|
|
5441
5441
|
case "polyline": {
|
|
5442
5442
|
const g = I.vertices instanceof Float32Array ? I.vertices : new Float32Array(I.vertices);
|
|
@@ -5460,173 +5460,249 @@ function PC(Q) {
|
|
|
5460
5460
|
}
|
|
5461
5461
|
function uC(Q) {
|
|
5462
5462
|
if (lI === "geocentric")
|
|
5463
|
-
for (const [A, I] of
|
|
5463
|
+
for (const [A, I] of X.entries()) {
|
|
5464
5464
|
if (!I || I.isFixed()) continue;
|
|
5465
5465
|
const g = Math.max(1e-6, rg.get(A)?.mass ?? 1), C = I.translation(), E = xC(C), i = { x: E.x * g, y: E.y * g, z: E.z * g };
|
|
5466
|
-
I.
|
|
5466
|
+
I.addForce(i, !0);
|
|
5467
5467
|
}
|
|
5468
5468
|
}
|
|
5469
5469
|
function zC(Q) {
|
|
5470
5470
|
T.timestep = Q, uC(), T.step(), EC += Q * 1e3;
|
|
5471
5471
|
const A = {};
|
|
5472
|
-
for (const [I, g] of
|
|
5472
|
+
for (const [I, g] of X.entries()) {
|
|
5473
5473
|
const C = g.translation(), E = g.rotation();
|
|
5474
5474
|
A[I] = { p: [C.x, C.y, C.z], q: [E.x, E.y, E.z, E.w] };
|
|
5475
5475
|
}
|
|
5476
5476
|
postMessage({ type: "state", state: { timeMs: EC, bodies: A } });
|
|
5477
5477
|
}
|
|
5478
5478
|
function _C(Q, A, I = 1e6) {
|
|
5479
|
-
const g =
|
|
5479
|
+
const g = b(Q), C = b(A), E = new Y.Ray(g, C), i = T.castRay(E, I, !0);
|
|
5480
5480
|
if (!i) return { hits: [] };
|
|
5481
|
-
const D = i.timeOfImpact,
|
|
5481
|
+
const D = i.timeOfImpact, K = E.pointAt(D);
|
|
5482
5482
|
i.normal;
|
|
5483
|
-
let
|
|
5484
|
-
for (const [y, U] of
|
|
5483
|
+
let k = null;
|
|
5484
|
+
for (const [y, U] of KA.entries())
|
|
5485
5485
|
if (U.handle === i.collider.handle) {
|
|
5486
|
-
|
|
5486
|
+
k = y;
|
|
5487
5487
|
break;
|
|
5488
5488
|
}
|
|
5489
|
-
let
|
|
5489
|
+
let w = null;
|
|
5490
5490
|
const h = i.collider.parent()?.handle;
|
|
5491
5491
|
if (h != null) {
|
|
5492
|
-
for (const [y, U] of
|
|
5492
|
+
for (const [y, U] of X.entries())
|
|
5493
5493
|
if (U.handle === h) {
|
|
5494
|
-
|
|
5494
|
+
w = y;
|
|
5495
5495
|
break;
|
|
5496
5496
|
}
|
|
5497
5497
|
}
|
|
5498
5498
|
return {
|
|
5499
5499
|
hits: [{
|
|
5500
5500
|
toi: D,
|
|
5501
|
-
point: [
|
|
5502
|
-
colliderId:
|
|
5503
|
-
bodyId:
|
|
5501
|
+
point: [K.x, K.y, K.z],
|
|
5502
|
+
colliderId: k,
|
|
5503
|
+
bodyId: w
|
|
5504
5504
|
}]
|
|
5505
5505
|
};
|
|
5506
5506
|
}
|
|
5507
5507
|
async function vC(Q) {
|
|
5508
|
-
const A = Q.data || {}, { id: I, type: g, _envId: C, replyTo: E } = A, i = typeof C < "u" ? C : typeof E < "u" ? E : I, D = (
|
|
5508
|
+
const A = Q.data || {}, { id: I, type: g, _envId: C, replyTo: E } = A, i = typeof C < "u" ? C : typeof E < "u" ? E : I, D = (k) => IA(i, k), K = (k) => OC(i, k);
|
|
5509
5509
|
try {
|
|
5510
5510
|
switch (g) {
|
|
5511
5511
|
case "init": {
|
|
5512
5512
|
XI = typeof A.fixedDt == "number" ? A.fixedDt : XI;
|
|
5513
|
-
const
|
|
5514
|
-
(
|
|
5513
|
+
const k = A.gravity || {};
|
|
5514
|
+
(k.mode || "vector").toLowerCase() === "geocentric" ? DC(k.planetCenter || [0, 0, 0], typeof k.intensity == "number" ? k.intensity : 9.81) : iC(k.vector || [0, -9.81, 0]), await f(), D({ ok: !0 });
|
|
5515
5515
|
break;
|
|
5516
5516
|
}
|
|
5517
5517
|
case "addObject": {
|
|
5518
|
-
let
|
|
5519
|
-
return typeof
|
|
5518
|
+
let F = function(R) {
|
|
5519
|
+
return typeof R == "number" && isFinite(R);
|
|
5520
5520
|
};
|
|
5521
|
-
await
|
|
5522
|
-
const
|
|
5523
|
-
if ((!
|
|
5524
|
-
postMessage({ type: "debug", msg: "addObject: invalid rotation detected, using identity quat", bodyId:
|
|
5521
|
+
await f();
|
|
5522
|
+
const k = A.id, w = A.body || {}, h = (w.type || "dynamic").toLowerCase(), y = typeof w.mass == "number" ? w.mass : 1, U = b(w.p || [0, 0, 0]), J = LA(w.q || [0, 0, 0, 1]);
|
|
5523
|
+
if ((!F(U.x) || !F(U.y) || !F(U.z)) && (postMessage({ type: "debug", msg: "addObject: invalid translation detected, resetting to 0", bodyId: k, p: U }), U.x = F(U.x) ? U.x : 0, U.y = F(U.y) ? U.y : 0, U.z = F(U.z) ? U.z : 0), ![J.x, J.y, J.z, J.w].every(F))
|
|
5524
|
+
postMessage({ type: "debug", msg: "addObject: invalid rotation detected, using identity quat", bodyId: k, q: J }), J.x = 0, J.y = 0, J.z = 0, J.w = 1;
|
|
5525
5525
|
else {
|
|
5526
|
-
const
|
|
5527
|
-
J.x /=
|
|
5526
|
+
const R = Math.hypot(J.x, J.y, J.z, J.w) || 1;
|
|
5527
|
+
J.x /= R, J.y /= R, J.z /= R, J.w /= R;
|
|
5528
5528
|
}
|
|
5529
|
-
let
|
|
5530
|
-
h === "fixed" ?
|
|
5529
|
+
let l;
|
|
5530
|
+
h === "fixed" ? l = Y.RigidBodyDesc.fixed() : h === "kinematic" ? l = Y.RigidBodyDesc.kinematicPositionBased() : l = Y.RigidBodyDesc.dynamic().setAdditionalMass(y);
|
|
5531
5531
|
try {
|
|
5532
|
-
|
|
5533
|
-
} catch (
|
|
5534
|
-
throw postMessage({ type: "error", msg: "desc.setTranslation failed", error:
|
|
5532
|
+
l.setTranslation(U.x, U.y, U.z);
|
|
5533
|
+
} catch (R) {
|
|
5534
|
+
throw postMessage({ type: "error", msg: "desc.setTranslation failed", error: R && (R.message || String(R)) || String(R), bodyId: k, p: U }), R;
|
|
5535
5535
|
}
|
|
5536
5536
|
try {
|
|
5537
|
-
|
|
5538
|
-
} catch (
|
|
5539
|
-
throw postMessage({ type: "error", msg: "desc.setRotation failed", error:
|
|
5537
|
+
l.setRotation(J);
|
|
5538
|
+
} catch (R) {
|
|
5539
|
+
throw postMessage({ type: "error", msg: "desc.setRotation failed", error: R && (R.message || String(R)) || String(R), bodyId: k, q: J }), R;
|
|
5540
5540
|
}
|
|
5541
|
-
postMessage({ type: "debug", msg: "addObject: creating body", bodyId:
|
|
5541
|
+
postMessage({ type: "debug", msg: "addObject: creating body", bodyId: k, typeStr: h, mass: y, p: U, q: J }), fC(l, k, { type: h, mass: y, v: w.v, w: w.w }), D({ ok: !0 });
|
|
5542
5542
|
break;
|
|
5543
5543
|
}
|
|
5544
5544
|
case "removeObject": {
|
|
5545
|
-
await
|
|
5545
|
+
await f(), mC(A.id), D({ ok: !0 });
|
|
5546
5546
|
break;
|
|
5547
5547
|
}
|
|
5548
5548
|
// addCollider removed: colliders are created during attachCollider
|
|
5549
5549
|
// disposeCollider removed
|
|
5550
5550
|
case "attachCollider":
|
|
5551
5551
|
case "attachTrimeshCollider": {
|
|
5552
|
-
await
|
|
5553
|
-
const
|
|
5552
|
+
await f();
|
|
5553
|
+
const k = A.bodyId, w = A.id || A.colliderId, h = A.positions, y = A.indices || null, U = A.local || {};
|
|
5554
5554
|
if (!h) {
|
|
5555
|
-
|
|
5555
|
+
IA(I, { ok: !1, reason: "missing positions" });
|
|
5556
5556
|
break;
|
|
5557
5557
|
}
|
|
5558
5558
|
const J = h instanceof Float32Array ? h : new Float32Array(h.buffer || h);
|
|
5559
|
-
let
|
|
5560
|
-
|
|
5561
|
-
id:
|
|
5559
|
+
let F = y;
|
|
5560
|
+
F && !(F instanceof Uint32Array) && (F = new Uint32Array(F.buffer || F)), XC({
|
|
5561
|
+
id: w,
|
|
5562
5562
|
positions: J,
|
|
5563
|
-
indices:
|
|
5564
|
-
bodyId:
|
|
5563
|
+
indices: F || null,
|
|
5564
|
+
bodyId: k,
|
|
5565
5565
|
local: U
|
|
5566
|
-
}), D({ ok: !0, colliderId:
|
|
5566
|
+
}), D({ ok: !0, colliderId: w });
|
|
5567
5567
|
break;
|
|
5568
5568
|
}
|
|
5569
5569
|
case "attachShapeCollider": {
|
|
5570
|
-
await
|
|
5571
|
-
const
|
|
5572
|
-
y?.p && U.setTranslation(+y.p[0], +y.p[1], +y.p[2]), y?.q && U.setRotation(
|
|
5573
|
-
const J =
|
|
5570
|
+
await f();
|
|
5571
|
+
const k = A.bodyId, w = A.id || A.colliderId, h = A.shape, y = A.local || {}, U = PC(h);
|
|
5572
|
+
y?.p && U.setTranslation(+y.p[0], +y.p[1], +y.p[2]), y?.q && U.setRotation(LA(y.q));
|
|
5573
|
+
const J = X.get(k);
|
|
5574
5574
|
if (!J) {
|
|
5575
|
-
|
|
5575
|
+
IA(I, { ok: !1, reason: "unknown body" });
|
|
5576
5576
|
break;
|
|
5577
5577
|
}
|
|
5578
|
-
const
|
|
5579
|
-
|
|
5578
|
+
const F = T.createCollider(U, J);
|
|
5579
|
+
KA.set(w, F), dA.set(w, k), D({ ok: !0, colliderId: w });
|
|
5580
5580
|
break;
|
|
5581
5581
|
}
|
|
5582
5582
|
case "detachCollider": {
|
|
5583
|
-
await
|
|
5584
|
-
const
|
|
5585
|
-
VC(
|
|
5583
|
+
await f();
|
|
5584
|
+
const k = A.colliderId || A.id;
|
|
5585
|
+
VC(k), D({ ok: !0 });
|
|
5586
5586
|
break;
|
|
5587
5587
|
}
|
|
5588
5588
|
case "applyForce": {
|
|
5589
|
-
await
|
|
5590
|
-
const
|
|
5591
|
-
if (!
|
|
5592
|
-
|
|
5589
|
+
await f();
|
|
5590
|
+
const k = A.id, w = X.get(k);
|
|
5591
|
+
if (!w) {
|
|
5592
|
+
IA(I, { ok: !1, reason: "unknown body" });
|
|
5593
|
+
break;
|
|
5594
|
+
}
|
|
5595
|
+
const h = !!A.impulse, y = b(A.force || [0, 0, 0]), U = A.wake !== !1;
|
|
5596
|
+
A.resetForces && (typeof w.clearForces == "function" ? w.clearForces() : typeof w.resetForces == "function" && w.resetForces()), A.resetTorques && (typeof w.clearTorques == "function" ? w.clearTorques() : typeof w.resetTorques == "function" && w.resetTorques()), h ? A.point && typeof w.addImpulseAtPoint == "function" ? w.addImpulseAtPoint(y, b(A.point), U) : typeof w.addImpulse == "function" && w.addImpulse(y, U) : A.point && typeof w.addForceAtPoint == "function" ? w.addForceAtPoint(y, b(A.point), U) : typeof w.addForce == "function" && w.addForce(y, U), D({ ok: !0 });
|
|
5597
|
+
break;
|
|
5598
|
+
}
|
|
5599
|
+
case "applyForces": {
|
|
5600
|
+
await f();
|
|
5601
|
+
const k = A.id, w = X.get(k);
|
|
5602
|
+
if (!w) {
|
|
5603
|
+
IA(I, { ok: !1, reason: "unknown body" });
|
|
5604
|
+
break;
|
|
5605
|
+
}
|
|
5606
|
+
const h = !!A.impulse, y = A.wake !== !1, U = Array.isArray(A.forces) ? A.forces : [], J = Array.isArray(A.points) ? A.points : [];
|
|
5607
|
+
A.resetForces && (typeof w.clearForces == "function" ? w.clearForces() : typeof w.resetForces == "function" && w.resetForces()), A.resetTorques && (typeof w.clearTorques == "function" ? w.clearTorques() : typeof w.resetTorques == "function" && w.resetTorques());
|
|
5608
|
+
try {
|
|
5609
|
+
for (let F = 0; F < U.length; ++F) {
|
|
5610
|
+
const l = b(U[F] || [0, 0, 0]), R = J[F] ? b(J[F]) : null;
|
|
5611
|
+
h ? R && typeof w.addImpulseAtPoint == "function" ? w.addImpulseAtPoint(l, R, y) : typeof w.addImpulse == "function" && w.addImpulse(l, y) : R && typeof w.addForceAtPoint == "function" ? w.addForceAtPoint(l, R, y) : typeof w.addForce == "function" && w.addForce(l, y);
|
|
5612
|
+
}
|
|
5613
|
+
D({ ok: !0, applied: U.length });
|
|
5614
|
+
} catch (F) {
|
|
5615
|
+
K(F);
|
|
5616
|
+
}
|
|
5617
|
+
break;
|
|
5618
|
+
}
|
|
5619
|
+
case "applyTorque": {
|
|
5620
|
+
await f();
|
|
5621
|
+
const k = A.id, w = X.get(k);
|
|
5622
|
+
if (!w) {
|
|
5623
|
+
IA(I, { ok: !1, reason: "unknown body" });
|
|
5624
|
+
break;
|
|
5625
|
+
}
|
|
5626
|
+
const h = !!A.impulse, y = b(A.torque || [0, 0, 0]), U = A.wake !== !1;
|
|
5627
|
+
A.resetTorques && (typeof w.clearTorques == "function" ? w.clearTorques() : typeof w.resetTorques == "function" && w.resetTorques());
|
|
5628
|
+
try {
|
|
5629
|
+
h && typeof w.addTorqueImpulse == "function" ? w.addTorqueImpulse(y, U) : typeof w.addTorque == "function" && w.addTorque(y, U), D({ ok: !0 });
|
|
5630
|
+
} catch (J) {
|
|
5631
|
+
K(J);
|
|
5632
|
+
}
|
|
5633
|
+
break;
|
|
5634
|
+
}
|
|
5635
|
+
case "applyTorques": {
|
|
5636
|
+
await f();
|
|
5637
|
+
const k = A.id, w = X.get(k);
|
|
5638
|
+
if (!w) {
|
|
5639
|
+
IA(I, { ok: !1, reason: "unknown body" });
|
|
5640
|
+
break;
|
|
5641
|
+
}
|
|
5642
|
+
const h = !!A.impulse, y = Array.isArray(A.torques) ? A.torques : [], U = A.wake !== !1;
|
|
5643
|
+
A.resetTorques && (typeof w.clearTorques == "function" ? w.clearTorques() : typeof w.resetTorques == "function" && w.resetTorques());
|
|
5644
|
+
try {
|
|
5645
|
+
for (let J = 0; J < y.length; ++J) {
|
|
5646
|
+
const F = b(y[J] || [0, 0, 0]);
|
|
5647
|
+
h && typeof w.addTorqueImpulse == "function" ? w.addTorqueImpulse(F, U) : typeof w.addTorque == "function" && w.addTorque(F, U);
|
|
5648
|
+
}
|
|
5649
|
+
D({ ok: !0, applied: y.length });
|
|
5650
|
+
} catch (J) {
|
|
5651
|
+
K(J);
|
|
5652
|
+
}
|
|
5653
|
+
break;
|
|
5654
|
+
}
|
|
5655
|
+
case "resetForces": {
|
|
5656
|
+
await f();
|
|
5657
|
+
const k = A.id, w = X.get(k);
|
|
5658
|
+
if (!w) {
|
|
5659
|
+
IA(I, { ok: !1, reason: "unknown body" });
|
|
5660
|
+
break;
|
|
5661
|
+
}
|
|
5662
|
+
typeof w.clearForces == "function" ? w.clearForces() : typeof w.resetForces == "function" && w.resetForces(), D({ ok: !0 });
|
|
5663
|
+
break;
|
|
5664
|
+
}
|
|
5665
|
+
case "resetTorques": {
|
|
5666
|
+
await f();
|
|
5667
|
+
const k = A.id, w = X.get(k);
|
|
5668
|
+
if (!w) {
|
|
5669
|
+
IA(I, { ok: !1, reason: "unknown body" });
|
|
5593
5670
|
break;
|
|
5594
5671
|
}
|
|
5595
|
-
|
|
5596
|
-
h ? A.point && typeof K.applyImpulseAtPoint == "function" ? K.applyImpulseAtPoint(y, f(A.point), U) : K.applyImpulse(y, U) : A.point && typeof K.applyForceAtPoint == "function" ? K.applyForceAtPoint(y, f(A.point), U) : K.applyForce(y, U), D({ ok: !0 });
|
|
5672
|
+
typeof w.clearTorques == "function" ? w.clearTorques() : typeof w.resetTorques == "function" && w.resetTorques(), D({ ok: !0 });
|
|
5597
5673
|
break;
|
|
5598
5674
|
}
|
|
5599
5675
|
case "setPose": {
|
|
5600
|
-
await
|
|
5601
|
-
const
|
|
5602
|
-
if (!
|
|
5676
|
+
await f();
|
|
5677
|
+
const k = A.id, w = X.get(k);
|
|
5678
|
+
if (!w) {
|
|
5603
5679
|
D({ ok: !1, reason: "unknown body" });
|
|
5604
5680
|
break;
|
|
5605
5681
|
}
|
|
5606
5682
|
const h = A.p, y = A.q, U = A.wake !== !1;
|
|
5607
5683
|
try {
|
|
5608
|
-
typeof
|
|
5684
|
+
typeof w.isKinematic == "function" && w.isKinematic() ? (h && w.setNextKinematicTranslation(b(h)), y && w.setNextKinematicRotation(LA(y))) : (h && typeof w.setTranslation == "function" && w.setTranslation(b(h), !0), y && typeof w.setRotation == "function" && w.setRotation(LA(y), !0)), U && typeof w.wakeUp == "function" && w.wakeUp(), D({ ok: !0 });
|
|
5609
5685
|
} catch (J) {
|
|
5610
|
-
|
|
5686
|
+
K(J);
|
|
5611
5687
|
}
|
|
5612
5688
|
break;
|
|
5613
5689
|
}
|
|
5614
5690
|
case "setGravity": {
|
|
5615
|
-
await
|
|
5616
|
-
const
|
|
5617
|
-
(
|
|
5691
|
+
await f();
|
|
5692
|
+
const k = A.gravity || {};
|
|
5693
|
+
(k.mode || "vector").toLowerCase() === "geocentric" ? DC(k.planetCenter || [0, 0, 0], typeof k.intensity == "number" ? k.intensity : 9.81) : iC(k.vector || [0, -9.81, 0]), D({ ok: !0 });
|
|
5618
5694
|
break;
|
|
5619
5695
|
}
|
|
5620
5696
|
case "step": {
|
|
5621
|
-
await
|
|
5622
|
-
const
|
|
5623
|
-
zC(
|
|
5697
|
+
await f();
|
|
5698
|
+
const k = typeof A.dt == "number" ? dC(A.dt, 1 / 600, 1 / 10) : XI;
|
|
5699
|
+
zC(k), D({ ok: !0, dtUsed: k });
|
|
5624
5700
|
break;
|
|
5625
5701
|
}
|
|
5626
5702
|
case "raycast": {
|
|
5627
|
-
await
|
|
5628
|
-
const
|
|
5629
|
-
D(
|
|
5703
|
+
await f();
|
|
5704
|
+
const k = _C(A.origin || [0, 0, 0], A.direction || [0, -1, 0], typeof A.maxToi == "number" ? A.maxToi : 1e6);
|
|
5705
|
+
D(k);
|
|
5630
5706
|
break;
|
|
5631
5707
|
}
|
|
5632
5708
|
default: {
|
|
@@ -5634,9 +5710,9 @@ async function vC(Q) {
|
|
|
5634
5710
|
break;
|
|
5635
5711
|
}
|
|
5636
5712
|
}
|
|
5637
|
-
} catch (
|
|
5638
|
-
k
|
|
5713
|
+
} catch (k) {
|
|
5714
|
+
K(k);
|
|
5639
5715
|
}
|
|
5640
5716
|
}
|
|
5641
5717
|
self.addEventListener("message", vC);
|
|
5642
|
-
//# sourceMappingURL=physicsRapier.worker-
|
|
5718
|
+
//# sourceMappingURL=physicsRapier.worker-BMqv2qnC.js.map
|