@woosh/meep-engine 2.120.0 → 2.120.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/core/binary/FLOAT32_MAX.d.ts +2 -0
- package/src/core/binary/FLOAT32_MAX.d.ts.map +1 -0
- package/src/core/binary/FLOAT32_MAX.js +1 -0
- package/src/core/collection/RingBuffer.d.ts +2 -3
- package/src/core/collection/RingBuffer.d.ts.map +1 -1
- package/src/core/collection/RingBuffer.js +9 -4
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/color/Color.js +15 -1
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +32 -0
- package/src/core/geom/mat2/M2_IDENTITY.d.ts +6 -0
- package/src/core/geom/mat2/M2_IDENTITY.d.ts.map +1 -0
- package/src/core/geom/mat2/M2_IDENTITY.js +8 -0
- package/src/core/geom/mat2/m2_is_diagonal.d.ts +8 -0
- package/src/core/geom/mat2/m2_is_diagonal.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_is_diagonal.js +9 -0
- package/src/core/geom/mat2/m2_is_orthogonal.d.ts +8 -0
- package/src/core/geom/mat2/m2_is_orthogonal.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_is_orthogonal.js +23 -0
- package/src/core/geom/mat2/m2_transpose.d.ts +9 -0
- package/src/core/geom/mat2/m2_transpose.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_transpose.js +17 -0
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts +7 -5
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts.map +1 -1
- package/src/core/graph/graph_compute_adjacency_matrix.js +11 -5
- package/src/core/graph/graph_compute_distance_matrix.d.ts.map +1 -1
- package/src/core/graph/graph_compute_distance_matrix.js +30 -56
- package/src/core/graph/graph_compute_laplacian_matrix.d.ts +6 -6
- package/src/core/graph/graph_compute_laplacian_matrix.js +6 -6
- package/src/core/json/abstractJSONDeserializer.d.ts.map +1 -1
- package/src/core/json/abstractJSONDeserializer.js +7 -1
- package/src/core/math/bell_membership_function.d.ts.map +1 -1
- package/src/core/math/bell_membership_function.js +6 -1
- package/src/core/math/linalg/m2/m2_polar_decomp.d.ts +19 -0
- package/src/core/math/linalg/m2/m2_polar_decomp.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_polar_decomp.js +27 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.d.ts +15 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.js +32 -0
- package/src/core/math/linalg/m2/m2_svd.d.ts +19 -0
- package/src/core/math/linalg/m2/m2_svd.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_svd.js +96 -0
- package/src/core/math/linalg/solve_linear_system_GEPP_2x2.d.ts +1 -1
- package/src/core/math/linalg/solve_linear_system_GEPP_2x2.js +1 -1
- package/src/core/model/node-graph/node/NodeDescription.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeDescription.js +14 -0
- package/src/core/model/node-graph/type/DataType.d.ts.map +1 -1
- package/src/core/model/node-graph/type/DataType.js +4 -0
- package/src/core/process/WatchDog.d.ts +41 -12
- package/src/core/process/WatchDog.d.ts.map +1 -1
- package/src/core/process/WatchDog.js +47 -16
- package/src/engine/development/performance/RingBufferMetric.d.ts +1 -1
- package/src/engine/development/performance/RingBufferMetric.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationAdapter.js +3 -3
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.d.ts +4 -0
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.js +24 -0
- package/src/engine/ecs/terrain/ecs/splat/SplatMapping.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/splat/SplatMapping.js +3 -9
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.d.ts.map +1 -1
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +14 -8
- package/src/engine/ecs/transform/Transform.d.ts +5 -1
- package/src/engine/ecs/transform/Transform.d.ts.map +1 -1
- package/src/engine/ecs/transform/Transform.js +5 -1
- package/src/engine/intelligence/blackboard/BlackboardStack.d.ts +1 -1
- package/src/engine/intelligence/blackboard/BlackboardStack.js +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.js +3 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.js +3 -7
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.d.ts +5 -0
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.d.ts.map +1 -0
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.js +19 -0
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts +1 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.js +9 -114
- package/src/engine/physics/mls-mpm/README.md +5 -0
- package/src/engine/physics/ammo/Body.js +0 -103
- package/src/engine/physics/ammo/PhysicsWorker.d.ts +0 -72
- package/src/engine/physics/ammo/PhysicsWorker.d.ts.map +0 -1
- package/src/engine/physics/ammo/PhysicsWorker.js +0 -437
- package/src/engine/physics/ammo/World.d.ts +0 -68
- package/src/engine/physics/ammo/World.d.ts.map +0 -1
- package/src/engine/physics/ammo/World.js +0 -336
- package/src/engine/physics/ammo/shapes/BoxShape.d.ts +0 -10
- package/src/engine/physics/ammo/shapes/BoxShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/BoxShape.js +0 -11
- package/src/engine/physics/ammo/shapes/CapsuleShape.d.ts +0 -9
- package/src/engine/physics/ammo/shapes/CapsuleShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/CapsuleShape.js +0 -10
- package/src/engine/physics/ammo/shapes/MeshShape.d.ts +0 -8
- package/src/engine/physics/ammo/shapes/MeshShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/MeshShape.js +0 -9
- package/src/engine/physics/ammo/shapes/PlaneShape.d.ts +0 -11
- package/src/engine/physics/ammo/shapes/PlaneShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/PlaneShape.js +0 -14
- package/src/engine/physics/ammo/shapes/Shape.d.ts +0 -7
- package/src/engine/physics/ammo/shapes/Shape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/Shape.js +0 -9
- package/src/engine/physics/ammo/shapes/SphereShape.d.ts +0 -8
- package/src/engine/physics/ammo/shapes/SphereShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/SphereShape.js +0 -9
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.d.ts +0 -15
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.d.ts.map +0 -1
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.js +0 -196
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import Vector3 from "../../../core/geom/Vector3.js";
|
|
2
|
-
import IdPool from '../../../core/IdPool.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {Vector3} v3
|
|
7
|
-
* @returns {{x: number, y: number, z: number}}
|
|
8
|
-
*/
|
|
9
|
-
function v3_toJSON(v3) {
|
|
10
|
-
return { x: v3.x, y: v3.y, z: v3.z };
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
class World {
|
|
14
|
-
constructor(readyCallback) {
|
|
15
|
-
this.worker = new Worker("src/model/physics/PhysicsWorker.js");
|
|
16
|
-
this.shapeIdPool = new IdPool();
|
|
17
|
-
this.bodyIdPool = new IdPool();
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {Shape[]}
|
|
22
|
-
*/
|
|
23
|
-
this.shapes = [];
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {Body[]}
|
|
28
|
-
*/
|
|
29
|
-
const bodies = this.bodies = [];
|
|
30
|
-
this.__updateCallbacks = [];
|
|
31
|
-
const raytestCallbacks = this.__raytestCallbacks = [];
|
|
32
|
-
const raycastCallbacks = this.__raycastCallbacks = [];
|
|
33
|
-
const stepDoneCallbacks = this.__stepDoneCallbacks = [];
|
|
34
|
-
|
|
35
|
-
const api = {
|
|
36
|
-
updateState: function (data) {
|
|
37
|
-
const ids = data.ids;
|
|
38
|
-
const ts = data.states;
|
|
39
|
-
|
|
40
|
-
for (let i = 0; i < ids.length; i++) {
|
|
41
|
-
|
|
42
|
-
const id = ids[i];
|
|
43
|
-
const body = bodies[id];
|
|
44
|
-
|
|
45
|
-
if (body !== void 0) {
|
|
46
|
-
const j = (i * 10);
|
|
47
|
-
|
|
48
|
-
body.position.set(ts[j], ts[j + 1], ts[j + 2]);
|
|
49
|
-
body.rotation.set(ts[j + 3], ts[j + 4], ts[j + 5], ts[j + 6]);
|
|
50
|
-
body.linearVelocity.set(ts[j + 7], ts[j + 8], ts[j + 9]);
|
|
51
|
-
body.changedAttributes = [];
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (stepDoneCallbacks.length > 0) {
|
|
58
|
-
const callback = stepDoneCallbacks.shift();
|
|
59
|
-
callback();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
collisions: function (data) {
|
|
64
|
-
const pairs = data.pairs;
|
|
65
|
-
for (let i = 0; i < pairs.length; i += 2) {
|
|
66
|
-
const a = pairs[i],
|
|
67
|
-
b = pairs[i + 1];
|
|
68
|
-
const b1 = bodies[a];
|
|
69
|
-
const b2 = bodies[b];
|
|
70
|
-
if (b1 !== void 0 && b2 !== void 0) {
|
|
71
|
-
b1.collide(b2);
|
|
72
|
-
b2.collide(b1);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
rayHit: function (data) {
|
|
77
|
-
const callback = raytestCallbacks.shift();
|
|
78
|
-
callback(true, data.point)
|
|
79
|
-
},
|
|
80
|
-
rayMiss: function (data) {
|
|
81
|
-
const callback = raytestCallbacks.shift();
|
|
82
|
-
callback(false, null);
|
|
83
|
-
},
|
|
84
|
-
rayCast: function (data) {
|
|
85
|
-
const callback = raycastCallbacks.shift();
|
|
86
|
-
},
|
|
87
|
-
workerReady: function () {
|
|
88
|
-
if (readyCallback !== void 0) {
|
|
89
|
-
readyCallback();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.worker.onmessage = function (event) {
|
|
97
|
-
const data = event.data;
|
|
98
|
-
const methodName = data.method;
|
|
99
|
-
const method = api[methodName];
|
|
100
|
-
if (method !== void 0) {
|
|
101
|
-
method(data);
|
|
102
|
-
} else {
|
|
103
|
-
throw new Error("received unknown callback from worker '" + methodName + "'");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
*
|
|
112
|
-
* @param {number} id
|
|
113
|
-
* @returns {Body}
|
|
114
|
-
*/
|
|
115
|
-
getBodyById(id) {
|
|
116
|
-
const bodies = this.bodies;
|
|
117
|
-
return bodies[id];
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
*
|
|
122
|
-
* @param {Array} update
|
|
123
|
-
*/
|
|
124
|
-
updateBodies(update) {
|
|
125
|
-
let i;
|
|
126
|
-
|
|
127
|
-
for (i = 0; i < update.length; i++) {
|
|
128
|
-
const info = update[i];
|
|
129
|
-
const position = info.position;
|
|
130
|
-
const rotation = info.rotation;
|
|
131
|
-
const linearVelocity = info.linearVelocity;
|
|
132
|
-
const collisions = info.collisions;
|
|
133
|
-
const id = info.id;
|
|
134
|
-
//get mapped objects
|
|
135
|
-
const body = this.getBodyById(id);
|
|
136
|
-
if (body === undefined || body === null) {
|
|
137
|
-
// console.error("Received update for body " + id + " which no longer exists");
|
|
138
|
-
continue; //this is really an error, but it doesn't seem to cause a leak, it's a synchronization issue
|
|
139
|
-
}
|
|
140
|
-
body.__contacts = []; //reset contacts
|
|
141
|
-
if (collisions) {
|
|
142
|
-
//process collisions
|
|
143
|
-
collisions.forEach(function (contact) {
|
|
144
|
-
const body_id = contact.t;
|
|
145
|
-
const otherBody = this.getBodyById(body_id);
|
|
146
|
-
const p = contact.p;
|
|
147
|
-
const contactPoint = new Vector3(p.x, p.y, p.z);
|
|
148
|
-
const contactObj = { target: otherBody, position: contactPoint };
|
|
149
|
-
body.__contacts.push(contactObj);
|
|
150
|
-
body.collide(otherBody);
|
|
151
|
-
}, this);
|
|
152
|
-
}
|
|
153
|
-
body.update(position, rotation, linearVelocity);
|
|
154
|
-
body.changedAttributes = [];
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
for (i = 0; i < this.__updateCallbacks.length; i++) {
|
|
158
|
-
this.__updateCallbacks[i]();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
*
|
|
164
|
-
* @param {Shape} shape
|
|
165
|
-
*/
|
|
166
|
-
addShape(shape) {
|
|
167
|
-
if (shape.id == null) {
|
|
168
|
-
shape.id = this.shapeIdPool.get();
|
|
169
|
-
}
|
|
170
|
-
this.shapes.push(shape);
|
|
171
|
-
this.worker.postMessage({ method: "addShape", options: shape });
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
*
|
|
176
|
-
* @param {Body} body
|
|
177
|
-
*/
|
|
178
|
-
addBody(body) {
|
|
179
|
-
if (body.id == null) {
|
|
180
|
-
body.id = this.bodyIdPool.get();
|
|
181
|
-
}
|
|
182
|
-
const shape = body.shape;
|
|
183
|
-
if (shape == null) {
|
|
184
|
-
console.error("shape can not be null");
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
//check if shape is registered
|
|
188
|
-
if (this.shapes.indexOf(shape) < 0) {
|
|
189
|
-
//if not registered - add it
|
|
190
|
-
this.addShape(shape);
|
|
191
|
-
}
|
|
192
|
-
const options = {
|
|
193
|
-
shape: shape.id,
|
|
194
|
-
rotation: body.rotation.toJSON(),
|
|
195
|
-
position: body.position.toJSON(),
|
|
196
|
-
linearVelocity: body.linearVelocity.toJSON(),
|
|
197
|
-
angularFactor: body.angularFactor.toJSON(),
|
|
198
|
-
gravity: body.disableGravity,
|
|
199
|
-
disableCollisionResponse: body.disableCollisionResponse,
|
|
200
|
-
id: body.id,
|
|
201
|
-
mass: body.mass,
|
|
202
|
-
friction: body.friction
|
|
203
|
-
};
|
|
204
|
-
body.changedAttributes = [];
|
|
205
|
-
const worker = this.worker;
|
|
206
|
-
this.bodies[body.id] = body;
|
|
207
|
-
worker.postMessage({ method: "addBody", options: options });
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
*
|
|
212
|
-
* @param {Body} body
|
|
213
|
-
*/
|
|
214
|
-
removeBody(body) {
|
|
215
|
-
|
|
216
|
-
const options = {
|
|
217
|
-
id: body.id
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
this.worker.postMessage({ method: "removeBody", options: options });
|
|
221
|
-
|
|
222
|
-
delete this.bodies[body.id];
|
|
223
|
-
|
|
224
|
-
this.bodyIdPool.release(body.id);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
sendImpulses() {
|
|
228
|
-
//get list of bodies with impulses
|
|
229
|
-
const bodies = this.bodies;
|
|
230
|
-
|
|
231
|
-
const options = [];
|
|
232
|
-
|
|
233
|
-
for (let i in bodies) {
|
|
234
|
-
if (!bodies.hasOwnProperty(i)) {
|
|
235
|
-
continue;
|
|
236
|
-
}
|
|
237
|
-
const body = bodies[i];
|
|
238
|
-
const value = body.__centralImpulse;
|
|
239
|
-
if (value == null) {
|
|
240
|
-
continue;
|
|
241
|
-
}
|
|
242
|
-
options.push({
|
|
243
|
-
id: body.id,
|
|
244
|
-
value: value.toJSON()
|
|
245
|
-
});
|
|
246
|
-
body.__centralImpulse = null;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (options.length > 0) {
|
|
250
|
-
this.worker.postMessage({ method: "applyCentralImpulse", options: options });
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
writeChangedAttributes() {
|
|
255
|
-
let body;
|
|
256
|
-
const bodies = this.bodies;
|
|
257
|
-
const options = [];
|
|
258
|
-
for (let i in bodies) {
|
|
259
|
-
if (!bodies.hasOwnProperty(i)) {
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
|
-
body = bodies[i];
|
|
263
|
-
const changedAttributes = body.changedAttributes;
|
|
264
|
-
const numChangedAttributes = changedAttributes.length;
|
|
265
|
-
if (numChangedAttributes > 0) {
|
|
266
|
-
const attributes = {};
|
|
267
|
-
for (let j = 0; j < numChangedAttributes; j++) {
|
|
268
|
-
const attrName = changedAttributes[j];
|
|
269
|
-
let value = body[attrName];
|
|
270
|
-
if (typeof value["toJSON"] === "function") {
|
|
271
|
-
value = value.toJSON();
|
|
272
|
-
}
|
|
273
|
-
attributes[attrName] = value;
|
|
274
|
-
}
|
|
275
|
-
options.push({
|
|
276
|
-
id: body.id,
|
|
277
|
-
attributes: attributes
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
if (options.length > 0) {
|
|
282
|
-
this.worker.postMessage({ method: "writeBodyAttributes", options: options });
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
*
|
|
288
|
-
* @param {Vector3} from
|
|
289
|
-
* @param {Vector3} to
|
|
290
|
-
* @param {function<Vector3>} callback
|
|
291
|
-
*/
|
|
292
|
-
rayTest(from, to, callback) {
|
|
293
|
-
this.__raytestCallbacks.push(callback);
|
|
294
|
-
this.worker.postMessage({
|
|
295
|
-
method: "rayTest",
|
|
296
|
-
options: {
|
|
297
|
-
from: v3_toJSON(from), to: v3_toJSON(to)
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
*
|
|
304
|
-
* @param {Vector3} from
|
|
305
|
-
* @param {Vector3} to
|
|
306
|
-
* @param {function} callback
|
|
307
|
-
*/
|
|
308
|
-
rayCast(from, to, callback) {
|
|
309
|
-
this.__raycastCallbacks.push(callback);
|
|
310
|
-
this.worker.postMessage({
|
|
311
|
-
method: "rayCast",
|
|
312
|
-
options: {
|
|
313
|
-
from: v3_toJSON(from), to: v3_toJSON(to)
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
*
|
|
320
|
-
* @param {number} delta
|
|
321
|
-
* @param {function} callback
|
|
322
|
-
*/
|
|
323
|
-
simulate(delta, callback) {
|
|
324
|
-
//send impulses if there are any
|
|
325
|
-
this.writeChangedAttributes();
|
|
326
|
-
this.sendImpulses();
|
|
327
|
-
//post simulation request
|
|
328
|
-
if (callback) {
|
|
329
|
-
this.__stepDoneCallbacks.push(callback);
|
|
330
|
-
}
|
|
331
|
-
this.worker.postMessage({ method: "simulate", options: delta });
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
export default World;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoxShape.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/ammo/shapes/BoxShape.js"],"names":[],"mappings":";AAEA,wDAMC;;IANgB,oCAMhB;IAJG,aAAiB;IACjB,OAAe;IACf,OAAe;IACf,OAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CapsuleShape.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/ammo/shapes/CapsuleShape.js"],"names":[],"mappings":";AAEA,kDAKC;;IALoB,0BAKpB;IAHG,aAAqB;IACrB,YAAiC;IACjC,YAAiC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Shape from './Shape.js';
|
|
2
|
-
|
|
3
|
-
const CapsuleShape = function (options) {
|
|
4
|
-
Shape.call(this);
|
|
5
|
-
this.type = "capsule";
|
|
6
|
-
this.raidus = options.radius || 1;
|
|
7
|
-
this.height = options.height || 1;
|
|
8
|
-
};
|
|
9
|
-
CapsuleShape.prototype = new Shape();
|
|
10
|
-
export default CapsuleShape;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MeshShape.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/ammo/shapes/MeshShape.js"],"names":[],"mappings":";AAEA,4CAIC;;IAJiB,uBAIjB;IAFG,aAAkB;IAClB,UAAgB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export default PlaneShape;
|
|
2
|
-
declare function PlaneShape(x: any, y: any, z: any, w: any): void;
|
|
3
|
-
declare class PlaneShape {
|
|
4
|
-
constructor(x: any, y: any, z: any, w: any);
|
|
5
|
-
type: string;
|
|
6
|
-
x: any;
|
|
7
|
-
y: any;
|
|
8
|
-
z: any;
|
|
9
|
-
w: any;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=PlaneShape.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlaneShape.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/ammo/shapes/PlaneShape.js"],"names":[],"mappings":";AAEA,kEASC;;IATkB,4CASlB;IAPG,aAAmB;IAEnB,OAAe;IACf,OAAe;IACf,OAAe;IAEf,OAAe"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import Shape from './Shape.js';
|
|
2
|
-
|
|
3
|
-
const PlaneShape = function (x, y, z, w) {
|
|
4
|
-
Shape.call(this);
|
|
5
|
-
this.type = "plane";
|
|
6
|
-
//up axis definition
|
|
7
|
-
this.x = x || 0;
|
|
8
|
-
this.y = y || 0;
|
|
9
|
-
this.z = z || 0;
|
|
10
|
-
//offset along the up axis
|
|
11
|
-
this.w = w || 0;
|
|
12
|
-
};
|
|
13
|
-
PlaneShape.prototype = new Shape();
|
|
14
|
-
export default PlaneShape;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Shape.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/ammo/shapes/Shape.js"],"names":[],"mappings":";AAIA,+BAGC;;IAFG,QAAc;IACd,UAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SphereShape.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/ammo/shapes/SphereShape.js"],"names":[],"mappings":";AAEA,gDAIC;;IAJmB,yBAInB;IAFG,aAAoB;IACpB,YAAyB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export default CannonPhysicsSystem;
|
|
2
|
-
declare class CannonPhysicsSystem {
|
|
3
|
-
dependencies: any[];
|
|
4
|
-
entityManager: any;
|
|
5
|
-
startup(entityManager: any, readyCallback: any, errorCallback: any): void;
|
|
6
|
-
world: any;
|
|
7
|
-
bodies: any[];
|
|
8
|
-
delayRemove: boolean;
|
|
9
|
-
defferredRemoveBodies: any[];
|
|
10
|
-
materials: any[];
|
|
11
|
-
add(component: any, entity: any): void;
|
|
12
|
-
remove(component: any, entity: any): void;
|
|
13
|
-
update(timeDelta: any): void;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=CannonJSPhysicsSystem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CannonJSPhysicsSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/cannon/CannonJSPhysicsSystem.js"],"names":[],"mappings":";AAOA;IAIQ,oBAAkC;IAClC,mBAAyB;IAG7B,0EAWC;IATiB,WAA+B;IAI7C,cAAgB;IAChB,qBAAwB;IACxB,6BAA+B;IAC/B,iBAAmB;IAIvB,uCA6CC;IAED,0CAkBC;IAED,6BAiDC;CACJ"}
|