@absolutejs/rapier3d 0.0.0-stage → 0.1.0
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/LICENSE +201 -0
- package/README.md +56 -2
- package/absolutejs/README.md +57 -0
- package/dist/provenance.json +10 -0
- package/dist/rapier.mjs +1 -0
- package/dist/types/coarena.d.ts +15 -0
- package/dist/types/control/character_controller.d.ts +191 -0
- package/dist/types/control/index.d.ts +3 -0
- package/dist/types/control/pid_controller.d.ts +50 -0
- package/dist/types/control/ray_cast_vehicle_controller.d.ts +277 -0
- package/dist/types/dynamics/ccd_solver.d.ts +15 -0
- package/dist/types/dynamics/coefficient_combine_rule.d.ts +13 -0
- package/dist/types/dynamics/impulse_joint.d.ts +359 -0
- package/dist/types/dynamics/impulse_joint_set.d.ts +84 -0
- package/dist/types/dynamics/index.d.ts +12 -0
- package/dist/types/dynamics/integration_parameters.d.ts +101 -0
- package/dist/types/dynamics/island_manager.d.ts +24 -0
- package/dist/types/dynamics/multibody_joint.d.ts +42 -0
- package/dist/types/dynamics/multibody_joint_set.d.ts +81 -0
- package/dist/types/dynamics/rigid_body.d.ts +839 -0
- package/dist/types/dynamics/rigid_body_set.d.ts +90 -0
- package/dist/types/dynamics/soft_body.d.ts +1210 -0
- package/dist/types/dynamics/soft_body_set.d.ts +99 -0
- package/dist/types/exports.d.ts +8 -0
- package/dist/types/geometry/broad_phase.d.ts +162 -0
- package/dist/types/geometry/collider.d.ts +1016 -0
- package/dist/types/geometry/collider_set.d.ts +97 -0
- package/dist/types/geometry/contact.d.ts +36 -0
- package/dist/types/geometry/feature.d.ts +6 -0
- package/dist/types/geometry/index.d.ts +11 -0
- package/dist/types/geometry/interaction_groups.d.ts +18 -0
- package/dist/types/geometry/narrow_phase.d.ts +140 -0
- package/dist/types/geometry/point.d.ts +58 -0
- package/dist/types/geometry/ray.d.ts +108 -0
- package/dist/types/geometry/shape.d.ts +681 -0
- package/dist/types/geometry/toi.d.ts +59 -0
- package/dist/types/init.d.ts +3 -0
- package/dist/types/math.d.ts +98 -0
- package/dist/types/pipeline/debug_render_pipeline.d.ts +40 -0
- package/dist/types/pipeline/event_queue.d.ts +113 -0
- package/dist/types/pipeline/index.d.ts +7 -0
- package/dist/types/pipeline/physics_hooks.d.ts +39 -0
- package/dist/types/pipeline/physics_pipeline.d.ts +12 -0
- package/dist/types/pipeline/query_pipeline.d.ts +38 -0
- package/dist/types/pipeline/serialization_pipeline.d.ts +37 -0
- package/dist/types/pipeline/world.d.ts +674 -0
- package/dist/types/rapier.d.ts +3 -0
- package/dist/types/rapier_wasm3d.d.ts +2908 -0
- package/dist/types/raw.d.ts +1 -0
- package/package.json +33 -4
|
@@ -0,0 +1,674 @@
|
|
|
1
|
+
import { RawBroadPhase, RawCCDSolver, RawColliderSet, RawDeserializedWorld, RawIntegrationParameters, RawIslandManager, RawImpulseJointSet, RawMultibodyJointSet, RawNarrowPhase, RawPhysicsPipeline, RawRigidBodySet, RawSerializationPipeline, RawDebugRenderPipeline, RawSoftBodySet } from "../raw";
|
|
2
|
+
import { BroadPhase, Collider, ColliderDesc, ColliderHandle, ColliderSet, InteractionGroups, NarrowPhase, PointColliderProjection, Ray, RayColliderIntersection, RayColliderHit, Shape, ColliderShapeCastHit, TempContactManifold, SolverContactManifold } from "../geometry";
|
|
3
|
+
import { CCDSolver, IntegrationParameters, IslandManager, ImpulseJoint, ImpulseJointHandle, MultibodyJoint, MultibodyJointHandle, JointData, ImpulseJointSet, MultibodyJointSet, RigidBody, RigidBodyDesc, RigidBodyHandle, RigidBodySet, SoftBody, SoftBodyDesc, SoftBodyHandle, SoftBodySet, SoftBodyTearEvent, SoftMeshBinding } from "../dynamics";
|
|
4
|
+
import { Rotation, Vector } from "../math";
|
|
5
|
+
import { PhysicsPipeline } from "./physics_pipeline";
|
|
6
|
+
import { QueryFilterFlags } from "./query_pipeline";
|
|
7
|
+
import { SerializationPipeline } from "./serialization_pipeline";
|
|
8
|
+
import { EventQueue } from "./event_queue";
|
|
9
|
+
import { PhysicsHooks } from "./physics_hooks";
|
|
10
|
+
import { DebugRenderBuffers, DebugRenderPipeline } from "./debug_render_pipeline";
|
|
11
|
+
import { KinematicCharacterController, PidAxesMask, PidController } from "../control";
|
|
12
|
+
import { DynamicRayCastVehicleController } from "../control";
|
|
13
|
+
/**
|
|
14
|
+
* The physics world.
|
|
15
|
+
*
|
|
16
|
+
* This contains all the data-structures necessary for creating and simulating
|
|
17
|
+
* bodies with contacts, joints, and external forces.
|
|
18
|
+
*/
|
|
19
|
+
export declare class World {
|
|
20
|
+
gravity: Vector;
|
|
21
|
+
integrationParameters: IntegrationParameters;
|
|
22
|
+
islands: IslandManager;
|
|
23
|
+
broadPhase: BroadPhase;
|
|
24
|
+
narrowPhase: NarrowPhase;
|
|
25
|
+
bodies: RigidBodySet;
|
|
26
|
+
colliders: ColliderSet;
|
|
27
|
+
impulseJoints: ImpulseJointSet;
|
|
28
|
+
multibodyJoints: MultibodyJointSet;
|
|
29
|
+
softBodies: SoftBodySet;
|
|
30
|
+
ccdSolver: CCDSolver;
|
|
31
|
+
physicsPipeline: PhysicsPipeline;
|
|
32
|
+
serializationPipeline: SerializationPipeline;
|
|
33
|
+
debugRenderPipeline: DebugRenderPipeline;
|
|
34
|
+
characterControllers: Set<KinematicCharacterController>;
|
|
35
|
+
pidControllers: Set<PidController>;
|
|
36
|
+
vehicleControllers: Set<DynamicRayCastVehicleController>;
|
|
37
|
+
/**
|
|
38
|
+
* Release the WASM memory occupied by this physics world.
|
|
39
|
+
*
|
|
40
|
+
* All the fields of this physics world will be freed as well,
|
|
41
|
+
* so there is no need to call their `.free()` methods individually.
|
|
42
|
+
*/
|
|
43
|
+
free(): void;
|
|
44
|
+
constructor(gravity: Vector, rawIntegrationParameters?: RawIntegrationParameters, rawIslands?: RawIslandManager, rawBroadPhase?: RawBroadPhase, rawNarrowPhase?: RawNarrowPhase, rawBodies?: RawRigidBodySet, rawColliders?: RawColliderSet, rawSoftBodies?: RawSoftBodySet, rawImpulseJoints?: RawImpulseJointSet, rawMultibodyJoints?: RawMultibodyJointSet, rawCCDSolver?: RawCCDSolver, rawPhysicsPipeline?: RawPhysicsPipeline, rawSerializationPipeline?: RawSerializationPipeline, rawDebugRenderPipeline?: RawDebugRenderPipeline);
|
|
45
|
+
static fromRaw(raw: RawDeserializedWorld): World;
|
|
46
|
+
/**
|
|
47
|
+
* Takes a snapshot of this world.
|
|
48
|
+
*
|
|
49
|
+
* Use `World.restoreSnapshot` to create a new physics world with a state identical to
|
|
50
|
+
* the state when `.takeSnapshot()` is called.
|
|
51
|
+
*/
|
|
52
|
+
takeSnapshot(): Uint8Array;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new physics world from a snapshot.
|
|
55
|
+
*
|
|
56
|
+
* This new physics world will be an identical copy of the snapshoted physics world.
|
|
57
|
+
*/
|
|
58
|
+
static restoreSnapshot(data: Uint8Array): World;
|
|
59
|
+
/**
|
|
60
|
+
* Computes all the lines (and their colors) needed to render the scene.
|
|
61
|
+
*
|
|
62
|
+
* @param filterFlags - Flags for excluding whole subsets of colliders from rendering.
|
|
63
|
+
* @param filterPredicate - Any collider for which this closure returns `false` will be excluded from the
|
|
64
|
+
* debug rendering.
|
|
65
|
+
*/
|
|
66
|
+
debugRender(filterFlags?: QueryFilterFlags, filterPredicate?: (collider: Collider) => boolean): DebugRenderBuffers;
|
|
67
|
+
/**
|
|
68
|
+
* Advance the simulation by one time step.
|
|
69
|
+
*
|
|
70
|
+
* All events generated by the physics engine are ignored.
|
|
71
|
+
*
|
|
72
|
+
* @param EventQueue - (optional) structure responsible for collecting
|
|
73
|
+
* events generated by the physics engine.
|
|
74
|
+
*/
|
|
75
|
+
step(eventQueue?: EventQueue, hooks?: PhysicsHooks): void;
|
|
76
|
+
/**
|
|
77
|
+
* Wraps the soft bodies, rigid-body proxies and colliders the engine created on its own
|
|
78
|
+
* during the last step (the pieces tears split off), and drops the wrappers of what it
|
|
79
|
+
* removed. Called by `World.step`.
|
|
80
|
+
*/
|
|
81
|
+
mapNewSoftBodies(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Update colliders positions after rigid-bodies moved.
|
|
84
|
+
*
|
|
85
|
+
* When a rigid-body moves, the positions of the colliders attached to it need to be updated. This update is
|
|
86
|
+
* generally automatically done at the beginning and the end of each simulation step with World.step.
|
|
87
|
+
* If the positions need to be updated without running a simulation step this method can be called manually.
|
|
88
|
+
*/
|
|
89
|
+
propagateModifiedBodyPositionsToColliders(): void;
|
|
90
|
+
/**
|
|
91
|
+
* The current simulation timestep.
|
|
92
|
+
*/
|
|
93
|
+
get timestep(): number;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the new simulation timestep.
|
|
96
|
+
*
|
|
97
|
+
* The simulation timestep governs by how much the physics state of the world will
|
|
98
|
+
* be integrated. A simulation timestep should:
|
|
99
|
+
* - be as small as possible. Typical values evolve around 0.016 (assuming the chosen unit is milliseconds,
|
|
100
|
+
* corresponds to the time between two frames of a game running at 60FPS).
|
|
101
|
+
* - not vary too much during the course of the simulation. A timestep with large variations may
|
|
102
|
+
* cause instabilities in the simulation.
|
|
103
|
+
*
|
|
104
|
+
* @param dt - The timestep length, in seconds.
|
|
105
|
+
*/
|
|
106
|
+
set timestep(dt: number);
|
|
107
|
+
/**
|
|
108
|
+
* The approximate size of most dynamic objects in the scene.
|
|
109
|
+
*
|
|
110
|
+
* See the documentation of the `World.lengthUnit` setter for further details.
|
|
111
|
+
*/
|
|
112
|
+
get lengthUnit(): number;
|
|
113
|
+
/**
|
|
114
|
+
* The approximate size of most dynamic objects in the scene.
|
|
115
|
+
*
|
|
116
|
+
* This value is used internally to estimate some length-based tolerance. In particular, the
|
|
117
|
+
* values `IntegrationParameters.allowedLinearError`,
|
|
118
|
+
* `IntegrationParameters.maxPenetrationCorrection`,
|
|
119
|
+
* `IntegrationParameters.predictionDistance`, `RigidBodyActivation.linearThreshold`
|
|
120
|
+
* are scaled by this value implicitly.
|
|
121
|
+
*
|
|
122
|
+
* This value can be understood as the number of units-per-meter in your physical world compared
|
|
123
|
+
* to a human-sized world in meter. For example, in a 2d game, if your typical object size is 100
|
|
124
|
+
* pixels, set the `[`Self::length_unit`]` parameter to 100.0. The physics engine will interpret
|
|
125
|
+
* it as if 100 pixels is equivalent to 1 meter in its various internal threshold.
|
|
126
|
+
* (default `1.0`).
|
|
127
|
+
*/
|
|
128
|
+
set lengthUnit(unitsPerMeter: number);
|
|
129
|
+
/**
|
|
130
|
+
* The number of solver iterations run by the constraints solver for calculating forces (default: `4`).
|
|
131
|
+
*/
|
|
132
|
+
get numSolverIterations(): number;
|
|
133
|
+
/**
|
|
134
|
+
* Sets the number of solver iterations run by the constraints solver for calculating forces (default: `4`).
|
|
135
|
+
*
|
|
136
|
+
* The greater this value is, the most rigid and realistic the physics simulation will be.
|
|
137
|
+
* However a greater number of iterations is more computationally intensive.
|
|
138
|
+
*
|
|
139
|
+
* @param niter - The new number of solver iterations.
|
|
140
|
+
*/
|
|
141
|
+
set numSolverIterations(niter: number);
|
|
142
|
+
/**
|
|
143
|
+
* Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).
|
|
144
|
+
*/
|
|
145
|
+
get numInternalPgsIterations(): number;
|
|
146
|
+
/**
|
|
147
|
+
* Sets the Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).
|
|
148
|
+
*
|
|
149
|
+
* Increasing this parameter will improve stability of the simulation. It will have a lesser effect than
|
|
150
|
+
* increasing `numSolverIterations` but is also less computationally expensive.
|
|
151
|
+
*
|
|
152
|
+
* @param niter - The new number of internal PGS iterations.
|
|
153
|
+
*/
|
|
154
|
+
set numInternalPgsIterations(niter: number);
|
|
155
|
+
/**
|
|
156
|
+
* The number of substeps continuous collision-detection can run (default: `1`).
|
|
157
|
+
*/
|
|
158
|
+
get maxCcdSubsteps(): number;
|
|
159
|
+
/**
|
|
160
|
+
* Sets the number of substeps continuous collision-detection can run (default: `1`).
|
|
161
|
+
*
|
|
162
|
+
* CCD operates using a "motion clamping" mechanism where all fast-moving object trajectories will
|
|
163
|
+
* be truncated to their first impact on their path. The number of CCD substeps beyond 1 indicate how
|
|
164
|
+
* many times that trajectory will be updated and continued after a hit. This can results in smoother
|
|
165
|
+
* paths, but at a significant computational cost.
|
|
166
|
+
*
|
|
167
|
+
* @param niter - The new maximum number of CCD substeps. Setting to `0` disables CCD entirely.
|
|
168
|
+
*/
|
|
169
|
+
set maxCcdSubsteps(substeps: number);
|
|
170
|
+
/**
|
|
171
|
+
* Creates a new rigid-body from the given rigid-body descriptor.
|
|
172
|
+
*
|
|
173
|
+
* @param body - The description of the rigid-body to create.
|
|
174
|
+
*/
|
|
175
|
+
createRigidBody(body: RigidBodyDesc): RigidBody;
|
|
176
|
+
/**
|
|
177
|
+
* Creates a new character controller.
|
|
178
|
+
*
|
|
179
|
+
* @param offset - The artificial gap added between the character’s chape and its environment.
|
|
180
|
+
*/
|
|
181
|
+
createCharacterController(offset: number): KinematicCharacterController;
|
|
182
|
+
/**
|
|
183
|
+
* Removes a character controller from this world.
|
|
184
|
+
*
|
|
185
|
+
* @param controller - The character controller to remove.
|
|
186
|
+
*/
|
|
187
|
+
removeCharacterController(controller: KinematicCharacterController): void;
|
|
188
|
+
/**
|
|
189
|
+
* Creates a new PID (Proportional-Integral-Derivative) controller.
|
|
190
|
+
*
|
|
191
|
+
* @param kp - The Proportional gain applied to the instantaneous linear position errors.
|
|
192
|
+
* This is usually set to a multiple of the inverse of simulation step time
|
|
193
|
+
* (e.g. `60` if the delta-time is `1.0 / 60.0`).
|
|
194
|
+
* @param ki - The linear gain applied to the Integral part of the PID controller.
|
|
195
|
+
* @param kd - The Derivative gain applied to the instantaneous linear velocity errors.
|
|
196
|
+
* This is usually set to a value in `[0.0, 1.0]` where `0.0` implies no damping
|
|
197
|
+
* (no correction of velocity errors) and `1.0` implies complete damping (velocity errors
|
|
198
|
+
* are corrected in a single simulation step).
|
|
199
|
+
* @param axes - The axes affected by this controller.
|
|
200
|
+
* Only coordinate axes with a bit flags set to `true` will be taken into
|
|
201
|
+
* account when calculating the errors and corrections.
|
|
202
|
+
*/
|
|
203
|
+
createPidController(kp: number, ki: number, kd: number, axes: PidAxesMask): PidController;
|
|
204
|
+
/**
|
|
205
|
+
* Removes a PID controller from this world.
|
|
206
|
+
*
|
|
207
|
+
* @param controller - The PID controller to remove.
|
|
208
|
+
*/
|
|
209
|
+
removePidController(controller: PidController): void;
|
|
210
|
+
/**
|
|
211
|
+
* Creates a new vehicle controller.
|
|
212
|
+
*
|
|
213
|
+
* @param chassis - The rigid-body used as the chassis of the vehicle controller. When the vehicle
|
|
214
|
+
* controller is updated, it will change directly the rigid-body’s velocity. This
|
|
215
|
+
* rigid-body must be a dynamic or kinematic-velocity-based rigid-body.
|
|
216
|
+
*/
|
|
217
|
+
createVehicleController(chassis: RigidBody): DynamicRayCastVehicleController;
|
|
218
|
+
/**
|
|
219
|
+
* Removes a vehicle controller from this world.
|
|
220
|
+
*
|
|
221
|
+
* @param controller - The vehicle controller to remove.
|
|
222
|
+
*/
|
|
223
|
+
removeVehicleController(controller: DynamicRayCastVehicleController): void;
|
|
224
|
+
/**
|
|
225
|
+
* Creates a new collider.
|
|
226
|
+
*
|
|
227
|
+
* @param desc - The description of the collider.
|
|
228
|
+
* @param parent - The rigid-body this collider is attached to.
|
|
229
|
+
*/
|
|
230
|
+
createCollider(desc: ColliderDesc, parent?: RigidBody): Collider;
|
|
231
|
+
/**
|
|
232
|
+
* Creates a new soft body from the given description, with its hidden root rigid body
|
|
233
|
+
* and the colliders of its collision meshes.
|
|
234
|
+
*
|
|
235
|
+
* @param desc - The description of the soft body to create.
|
|
236
|
+
*/
|
|
237
|
+
createSoftBody(desc: SoftBodyDesc): SoftBody;
|
|
238
|
+
/**
|
|
239
|
+
* Creates a collider holding a soft body's deformable collision mesh (a polyline in 2D or
|
|
240
|
+
* a triangle mesh in 3D built with the `DEFORMABLE` flag), bound to the cluster whose
|
|
241
|
+
* proxy is `parent` (see `SoftBody.rootBody` and `SoftBody.clusterProxy`).
|
|
242
|
+
*
|
|
243
|
+
* Returns `null` when the binding fails.
|
|
244
|
+
*
|
|
245
|
+
* @param desc - The description of the collider; its shape's vertices are given in the
|
|
246
|
+
* collider's local frame relative to the proxy.
|
|
247
|
+
* @param binding - How the mesh's vertices follow the cluster's particles.
|
|
248
|
+
* @param parent - The cluster proxy the collider is attached to.
|
|
249
|
+
*/
|
|
250
|
+
createDeformableCollider(desc: ColliderDesc, binding: SoftMeshBinding, parent: RigidBody): Collider | null;
|
|
251
|
+
/**
|
|
252
|
+
* Adds a cluster to a soft body: a rigid proxy over the given particles that joints and
|
|
253
|
+
* colliders can attach to. Returns the cluster's index, or `null` if no particle was
|
|
254
|
+
* valid.
|
|
255
|
+
*/
|
|
256
|
+
addSoftBodyCluster(body: SoftBody, particles: Uint32Array | number[]): number | null;
|
|
257
|
+
/**
|
|
258
|
+
* Removes a cluster of a soft body, with its proxy, colliders and joints.
|
|
259
|
+
*/
|
|
260
|
+
removeSoftBodyCluster(body: SoftBody, cluster: number): boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Tears a soft body at once along the given edges and through the given cells (indices
|
|
263
|
+
* into `SoftBody.edges` and `SoftBody.cells`), without removing material. Pieces
|
|
264
|
+
* disconnected by the tear become soft bodies of their own.
|
|
265
|
+
*
|
|
266
|
+
* Returns the tear event (to be freed with `.free()`), or `null` when nothing changed.
|
|
267
|
+
*/
|
|
268
|
+
tearSoftBody(body: SoftBody, edges: Uint32Array | number[], cells: Uint32Array | number[]): SoftBodyTearEvent | null;
|
|
269
|
+
/**
|
|
270
|
+
* Cuts a soft body along a blade: a segment (two points) in 2D, a triangle (three points)
|
|
271
|
+
* in 3D. Pieces disconnected by the cut become soft bodies of their own.
|
|
272
|
+
*
|
|
273
|
+
* Returns the tear event (to be freed with `.free()`), or `null` when nothing changed.
|
|
274
|
+
*/
|
|
275
|
+
cutSoftBody(body: SoftBody, blade: Vector[]): SoftBodyTearEvent | null;
|
|
276
|
+
/**
|
|
277
|
+
* Wakes a soft body and everything it touches up.
|
|
278
|
+
*/
|
|
279
|
+
wakeUpSoftBody(body: SoftBody, strong: boolean): void;
|
|
280
|
+
/**
|
|
281
|
+
* Creates a new impulse joint from the given joint descriptor.
|
|
282
|
+
*
|
|
283
|
+
* @param params - The description of the joint to create.
|
|
284
|
+
* @param parent1 - The first rigid-body attached to this joint.
|
|
285
|
+
* @param parent2 - The second rigid-body attached to this joint.
|
|
286
|
+
* @param wakeUp - Should the attached rigid-bodies be awakened?
|
|
287
|
+
*/
|
|
288
|
+
createImpulseJoint(params: JointData, parent1: RigidBody, parent2: RigidBody, wakeUp: boolean): ImpulseJoint;
|
|
289
|
+
/**
|
|
290
|
+
* Creates a new multibody joint from the given joint descriptor.
|
|
291
|
+
*
|
|
292
|
+
* @param params - The description of the joint to create.
|
|
293
|
+
* @param parent1 - The first rigid-body attached to this joint.
|
|
294
|
+
* @param parent2 - The second rigid-body attached to this joint.
|
|
295
|
+
* @param wakeUp - Should the attached rigid-bodies be awakened?
|
|
296
|
+
*/
|
|
297
|
+
createMultibodyJoint(params: JointData, parent1: RigidBody, parent2: RigidBody, wakeUp: boolean): MultibodyJoint;
|
|
298
|
+
/**
|
|
299
|
+
* Retrieves a rigid-body from its handle.
|
|
300
|
+
*
|
|
301
|
+
* @param handle - The integer handle of the rigid-body to retrieve.
|
|
302
|
+
*/
|
|
303
|
+
getRigidBody(handle: RigidBodyHandle): RigidBody;
|
|
304
|
+
/**
|
|
305
|
+
* Retrieves a collider from its handle.
|
|
306
|
+
*
|
|
307
|
+
* @param handle - The integer handle of the collider to retrieve.
|
|
308
|
+
*/
|
|
309
|
+
getCollider(handle: ColliderHandle): Collider;
|
|
310
|
+
/**
|
|
311
|
+
* Retrieves an impulse joint from its handle.
|
|
312
|
+
*
|
|
313
|
+
* @param handle - The integer handle of the impulse joint to retrieve.
|
|
314
|
+
*/
|
|
315
|
+
getImpulseJoint(handle: ImpulseJointHandle): ImpulseJoint;
|
|
316
|
+
/**
|
|
317
|
+
* Retrieves an multibody joint from its handle.
|
|
318
|
+
*
|
|
319
|
+
* @param handle - The integer handle of the multibody joint to retrieve.
|
|
320
|
+
*/
|
|
321
|
+
getMultibodyJoint(handle: MultibodyJointHandle): MultibodyJoint;
|
|
322
|
+
/**
|
|
323
|
+
* Retrieves a soft body from its handle.
|
|
324
|
+
*
|
|
325
|
+
* @param handle - The integer handle of the soft body to retrieve.
|
|
326
|
+
*/
|
|
327
|
+
getSoftBody(handle: SoftBodyHandle): SoftBody;
|
|
328
|
+
/**
|
|
329
|
+
* Removes the given rigid-body from this physics world.
|
|
330
|
+
*
|
|
331
|
+
* This will remove this rigid-body as well as all its attached colliders and joints.
|
|
332
|
+
* Every other bodies touching or attached by joints to this rigid-body will be woken-up.
|
|
333
|
+
*
|
|
334
|
+
* @param body - The rigid-body to remove.
|
|
335
|
+
*/
|
|
336
|
+
removeRigidBody(body: RigidBody): void;
|
|
337
|
+
/**
|
|
338
|
+
* Removes the given soft body from this physics world, with its proxies, colliders and
|
|
339
|
+
* attached joints.
|
|
340
|
+
*
|
|
341
|
+
* @param body - The soft body to remove.
|
|
342
|
+
*/
|
|
343
|
+
removeSoftBody(body: SoftBody): void;
|
|
344
|
+
/**
|
|
345
|
+
* Removes the given collider from this physics world.
|
|
346
|
+
*
|
|
347
|
+
* @param collider - The collider to remove.
|
|
348
|
+
* @param wakeUp - If set to `true`, the rigid-body this collider is attached to will be awaken.
|
|
349
|
+
*/
|
|
350
|
+
removeCollider(collider: Collider, wakeUp: boolean): void;
|
|
351
|
+
/**
|
|
352
|
+
* Removes the given impulse joint from this physics world.
|
|
353
|
+
*
|
|
354
|
+
* @param joint - The impulse joint to remove.
|
|
355
|
+
* @param wakeUp - If set to `true`, the rigid-bodies attached by this joint will be awaken.
|
|
356
|
+
*/
|
|
357
|
+
removeImpulseJoint(joint: ImpulseJoint, wakeUp: boolean): void;
|
|
358
|
+
/**
|
|
359
|
+
* Removes the given multibody joint from this physics world.
|
|
360
|
+
*
|
|
361
|
+
* @param joint - The multibody joint to remove.
|
|
362
|
+
* @param wakeUp - If set to `true`, the rigid-bodies attached by this joint will be awaken.
|
|
363
|
+
*/
|
|
364
|
+
removeMultibodyJoint(joint: MultibodyJoint, wakeUp: boolean): void;
|
|
365
|
+
/**
|
|
366
|
+
* Applies the given closure to each collider managed by this physics world.
|
|
367
|
+
*
|
|
368
|
+
* @param f(collider) - The function to apply to each collider managed by this physics world. Called as `f(collider)`.
|
|
369
|
+
*/
|
|
370
|
+
forEachCollider(f: (collider: Collider) => void): void;
|
|
371
|
+
/**
|
|
372
|
+
* Applies the given closure to each rigid-body managed by this physics world.
|
|
373
|
+
*
|
|
374
|
+
* @param f(body) - The function to apply to each rigid-body managed by this physics world. Called as `f(collider)`.
|
|
375
|
+
*/
|
|
376
|
+
forEachRigidBody(f: (body: RigidBody) => void): void;
|
|
377
|
+
/**
|
|
378
|
+
* Applies the given closure to each active rigid-body managed by this physics world.
|
|
379
|
+
*
|
|
380
|
+
* After a short time of inactivity, a rigid-body is automatically deactivated ("asleep") by
|
|
381
|
+
* the physics engine in order to save computational power. A sleeping rigid-body never moves
|
|
382
|
+
* unless it is moved manually by the user.
|
|
383
|
+
*
|
|
384
|
+
* @param f - The function to apply to each active rigid-body managed by this physics world. Called as `f(collider)`.
|
|
385
|
+
*/
|
|
386
|
+
forEachActiveRigidBody(f: (body: RigidBody) => void): void;
|
|
387
|
+
/**
|
|
388
|
+
* Applies the given closure to each soft body managed by this physics world.
|
|
389
|
+
*
|
|
390
|
+
* @param f(body) - The function to apply to each soft body managed by this physics world.
|
|
391
|
+
*/
|
|
392
|
+
forEachSoftBody(f: (body: SoftBody) => void): void;
|
|
393
|
+
/**
|
|
394
|
+
* Find the closest intersection between a ray and the physics world.
|
|
395
|
+
*
|
|
396
|
+
* @param ray - The ray to cast.
|
|
397
|
+
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
|
398
|
+
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
|
399
|
+
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
|
400
|
+
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
|
401
|
+
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
|
402
|
+
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
|
403
|
+
* @param filter - The callback to filter out which collider will be hit.
|
|
404
|
+
*/
|
|
405
|
+
castRay(ray: Ray, maxToi: number, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): RayColliderHit | null;
|
|
406
|
+
/**
|
|
407
|
+
* Find the closest intersection between a ray and the physics world.
|
|
408
|
+
*
|
|
409
|
+
* This also computes the normal at the hit point.
|
|
410
|
+
* @param ray - The ray to cast.
|
|
411
|
+
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
|
412
|
+
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
|
413
|
+
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
|
414
|
+
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
|
415
|
+
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
|
416
|
+
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
|
417
|
+
*/
|
|
418
|
+
castRayAndGetNormal(ray: Ray, maxToi: number, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): RayColliderIntersection | null;
|
|
419
|
+
/**
|
|
420
|
+
* Cast a ray and collects all the intersections between a ray and the scene.
|
|
421
|
+
*
|
|
422
|
+
* @param ray - The ray to cast.
|
|
423
|
+
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
|
424
|
+
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
|
425
|
+
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
|
426
|
+
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
|
427
|
+
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
|
428
|
+
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
|
429
|
+
* @param callback - The callback called once per hit (in no particular order) between a ray and a collider.
|
|
430
|
+
* If this callback returns `false`, then the cast will stop and no further hits will be detected/reported.
|
|
431
|
+
*/
|
|
432
|
+
intersectionsWithRay(ray: Ray, maxToi: number, solid: boolean, callback: (intersect: RayColliderIntersection) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): void;
|
|
433
|
+
/**
|
|
434
|
+
* Gets the handle of up to one collider intersecting the given shape.
|
|
435
|
+
*
|
|
436
|
+
* @param shapePos - The position of the shape used for the intersection test.
|
|
437
|
+
* @param shapeRot - The orientation of the shape used for the intersection test.
|
|
438
|
+
* @param shape - The shape used for the intersection test.
|
|
439
|
+
* @param groups - The bit groups and filter associated to the ray, in order to only
|
|
440
|
+
* hit the colliders with collision groups compatible with the ray's group.
|
|
441
|
+
*/
|
|
442
|
+
intersectionWithShape(shapePos: Vector, shapeRot: Rotation, shape: Shape, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): Collider | null;
|
|
443
|
+
/**
|
|
444
|
+
* Find the projection of a point on the closest collider.
|
|
445
|
+
*
|
|
446
|
+
* @param point - The point to project.
|
|
447
|
+
* @param solid - If this is set to `true` then the collider shapes are considered to
|
|
448
|
+
* be plain (if the point is located inside of a plain shape, its projection is the point
|
|
449
|
+
* itself). If it is set to `false` the collider shapes are considered to be hollow
|
|
450
|
+
* (if the point is located inside of an hollow shape, it is projected on the shape's
|
|
451
|
+
* boundary).
|
|
452
|
+
* @param groups - The bit groups and filter associated to the point to project, in order to only
|
|
453
|
+
* project on colliders with collision groups compatible with the ray's group.
|
|
454
|
+
*/
|
|
455
|
+
projectPoint(point: Vector, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): PointColliderProjection | null;
|
|
456
|
+
/**
|
|
457
|
+
* Find the projection of a point on the closest collider.
|
|
458
|
+
*
|
|
459
|
+
* @param point - The point to project.
|
|
460
|
+
* @param groups - The bit groups and filter associated to the point to project, in order to only
|
|
461
|
+
* project on colliders with collision groups compatible with the ray's group.
|
|
462
|
+
*/
|
|
463
|
+
projectPointAndGetFeature(point: Vector, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): PointColliderProjection | null;
|
|
464
|
+
/**
|
|
465
|
+
* Find all the colliders containing the given point.
|
|
466
|
+
*
|
|
467
|
+
* @param point - The point used for the containment test.
|
|
468
|
+
* @param groups - The bit groups and filter associated to the point to test, in order to only
|
|
469
|
+
* test on colliders with collision groups compatible with the ray's group.
|
|
470
|
+
* @param callback - A function called with the handles of each collider with a shape
|
|
471
|
+
* containing the `point`.
|
|
472
|
+
*/
|
|
473
|
+
intersectionsWithPoint(point: Vector, callback: (handle: Collider) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): void;
|
|
474
|
+
/**
|
|
475
|
+
* Casts a shape at a constant linear velocity and retrieve the first collider it hits.
|
|
476
|
+
* This is similar to ray-casting except that we are casting a whole shape instead of
|
|
477
|
+
* just a point (the ray origin).
|
|
478
|
+
*
|
|
479
|
+
* In the returned hit, `witness1` and `normal1` lie on the hit collider and are expressed in
|
|
480
|
+
* world-space, while `witness2` and `normal2` lie on the cast shape and are expressed in its
|
|
481
|
+
* local-space (relative to `shapePos` and `shapeRot`).
|
|
482
|
+
*
|
|
483
|
+
* @param shapePos - The initial position of the shape to cast.
|
|
484
|
+
* @param shapeRot - The initial rotation of the shape to cast.
|
|
485
|
+
* @param shapeVel - The constant velocity of the shape to cast (i.e. the cast direction).
|
|
486
|
+
* @param shape - The shape to cast.
|
|
487
|
+
* @param targetDistance − If the shape moves closer to this distance from a collider, a hit
|
|
488
|
+
* will be returned.
|
|
489
|
+
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
|
490
|
+
* limits the distance traveled by the shape to `shapeVel.norm() * maxToi`.
|
|
491
|
+
* @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if
|
|
492
|
+
* the shape is penetrating another shape at its starting point **and** its trajectory is such
|
|
493
|
+
* that it’s on a path to exit that penetration state.
|
|
494
|
+
* @param groups - The bit groups and filter associated to the shape to cast, in order to only
|
|
495
|
+
* test on colliders with collision groups compatible with this group.
|
|
496
|
+
*/
|
|
497
|
+
castShape(shapePos: Vector, shapeRot: Rotation, shapeVel: Vector, shape: Shape, targetDistance: number, maxToi: number, stopAtPenetration: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): ColliderShapeCastHit | null;
|
|
498
|
+
/**
|
|
499
|
+
* Retrieve all the colliders intersecting the given shape.
|
|
500
|
+
*
|
|
501
|
+
* @param shapePos - The position of the shape to test.
|
|
502
|
+
* @param shapeRot - The orientation of the shape to test.
|
|
503
|
+
* @param shape - The shape to test.
|
|
504
|
+
* @param groups - The bit groups and filter associated to the shape to test, in order to only
|
|
505
|
+
* test on colliders with collision groups compatible with this group.
|
|
506
|
+
* @param callback - A function called with the handles of each collider intersecting the `shape`.
|
|
507
|
+
*/
|
|
508
|
+
intersectionsWithShape(shapePos: Vector, shapeRot: Rotation, shape: Shape, callback: (collider: Collider) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): void;
|
|
509
|
+
/**
|
|
510
|
+
* Finds the handles of all the colliders with an AABB intersecting the given AABB.
|
|
511
|
+
*
|
|
512
|
+
* @param aabbCenter - The center of the AABB to test.
|
|
513
|
+
* @param aabbHalfExtents - The half-extents of the AABB to test.
|
|
514
|
+
* @param callback - The callback that will be called with the handles of all the colliders
|
|
515
|
+
* currently intersecting the given AABB.
|
|
516
|
+
*/
|
|
517
|
+
collidersWithAabbIntersectingAabb(aabbCenter: Vector, aabbHalfExtents: Vector, callback: (handle: Collider) => boolean): void;
|
|
518
|
+
/**
|
|
519
|
+
* Enumerates all the colliders potentially in contact with the given collider.
|
|
520
|
+
*
|
|
521
|
+
* @param collider1 - The second collider involved in the contact.
|
|
522
|
+
* @param f - Closure that will be called on each collider that is in contact with `collider1`.
|
|
523
|
+
*/
|
|
524
|
+
contactPairsWith(collider1: Collider, f: (collider2: Collider) => void): void;
|
|
525
|
+
/**
|
|
526
|
+
* Enumerates all the colliders intersecting the given colliders, assuming one of them
|
|
527
|
+
* is a sensor.
|
|
528
|
+
*/
|
|
529
|
+
intersectionPairsWith(collider1: Collider, f: (collider2: Collider) => void): void;
|
|
530
|
+
/**
|
|
531
|
+
* Iterates through all the contact manifolds between the given pair of colliders.
|
|
532
|
+
*
|
|
533
|
+
* @param collider1 - The first collider involved in the contact.
|
|
534
|
+
* @param collider2 - The second collider involved in the contact.
|
|
535
|
+
* @param f - Closure that will be called on each contact manifold between the two colliders. If the second argument
|
|
536
|
+
* passed to this closure is `true`, then the contact manifold data is flipped, i.e., methods like `localNormal1`
|
|
537
|
+
* actually apply to the `collider2` and fields like `localNormal2` apply to the `collider1`.
|
|
538
|
+
*/
|
|
539
|
+
contactPair(collider1: Collider, collider2: Collider, f: (manifold: TempContactManifold, flipped: boolean) => void): void;
|
|
540
|
+
/**
|
|
541
|
+
* Visits solver manifolds, including contact clusters not exposed by contactPair().
|
|
542
|
+
* The callback view is temporary. Do not mutate, step or free this world inside it.
|
|
543
|
+
*/
|
|
544
|
+
solverContactPair(collider1: Collider, collider2: Collider, f: (manifold: SolverContactManifold, flipped: boolean) => void): void;
|
|
545
|
+
/**
|
|
546
|
+
* Returns `true` if `collider1` and `collider2` intersect and at least one of them is a sensor.
|
|
547
|
+
* @param collider1 − The first collider involved in the intersection.
|
|
548
|
+
* @param collider2 − The second collider involved in the intersection.
|
|
549
|
+
*/
|
|
550
|
+
intersectionPair(collider1: Collider, collider2: Collider): boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Sets whether internal performance profiling is enabled (default: false).
|
|
553
|
+
*
|
|
554
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
555
|
+
*/
|
|
556
|
+
set profilerEnabled(enabled: boolean);
|
|
557
|
+
/**
|
|
558
|
+
* Indicates if the internal performance profiling is enabled.
|
|
559
|
+
*
|
|
560
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
561
|
+
*/
|
|
562
|
+
get profilerEnabled(): boolean;
|
|
563
|
+
/**
|
|
564
|
+
* The time spent in milliseconds by the last step to run the entire simulation step.
|
|
565
|
+
*
|
|
566
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
567
|
+
*/
|
|
568
|
+
timingStep(): number;
|
|
569
|
+
/**
|
|
570
|
+
* The time spent in milliseconds by the last step to run the collision-detection
|
|
571
|
+
* (broad-phase + narrow-phase).
|
|
572
|
+
*
|
|
573
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
574
|
+
*/
|
|
575
|
+
timingCollisionDetection(): number;
|
|
576
|
+
/**
|
|
577
|
+
* The time spent in milliseconds by the last step to run the broad-phase.
|
|
578
|
+
*
|
|
579
|
+
* This timing is included in `timingCollisionDetection`.
|
|
580
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
581
|
+
*/
|
|
582
|
+
timingBroadPhase(): number;
|
|
583
|
+
/**
|
|
584
|
+
* The time spent in milliseconds by the last step to run the narrow-phase.
|
|
585
|
+
*
|
|
586
|
+
* This timing is included in `timingCollisionDetection`.
|
|
587
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
588
|
+
*/
|
|
589
|
+
timingNarrowPhase(): number;
|
|
590
|
+
/**
|
|
591
|
+
* The time spent in milliseconds by the last step to run the constraint solver.
|
|
592
|
+
*
|
|
593
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
594
|
+
*/
|
|
595
|
+
timingSolver(): number;
|
|
596
|
+
/**
|
|
597
|
+
* The time spent in milliseconds by the last step to run the constraint
|
|
598
|
+
* initialization.
|
|
599
|
+
*
|
|
600
|
+
* This timing is included in `timingSolver`.
|
|
601
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
602
|
+
*/
|
|
603
|
+
timingVelocityAssembly(): number;
|
|
604
|
+
/**
|
|
605
|
+
* The time spent in milliseconds by the last step to run the constraint
|
|
606
|
+
* resolution.
|
|
607
|
+
*
|
|
608
|
+
* This timing is included in `timingSolver`.
|
|
609
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
610
|
+
*/
|
|
611
|
+
timingVelocityResolution(): number;
|
|
612
|
+
/**
|
|
613
|
+
* The time spent in milliseconds by the last step to run the rigid-body
|
|
614
|
+
* velocity update.
|
|
615
|
+
*
|
|
616
|
+
* This timing is included in `timingSolver`.
|
|
617
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
618
|
+
*/
|
|
619
|
+
timingVelocityUpdate(): number;
|
|
620
|
+
/**
|
|
621
|
+
* The time spent in milliseconds by writing rigid-body velocities
|
|
622
|
+
* calculated by the solver back into the rigid-bodies.
|
|
623
|
+
*
|
|
624
|
+
* This timing is included in `timingSolver`.
|
|
625
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
626
|
+
*/
|
|
627
|
+
timingVelocityWriteback(): number;
|
|
628
|
+
/**
|
|
629
|
+
* The total time spent in CCD detection and resolution.
|
|
630
|
+
*
|
|
631
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
632
|
+
*/
|
|
633
|
+
timingCcd(): number;
|
|
634
|
+
/**
|
|
635
|
+
* The total time spent searching for the continuous hits during CCD.
|
|
636
|
+
*
|
|
637
|
+
* This timing is included in `timingCcd`.
|
|
638
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
639
|
+
*/
|
|
640
|
+
timingCcdToiComputation(): number;
|
|
641
|
+
/**
|
|
642
|
+
* The total time spent in the broad-phase during CCD.
|
|
643
|
+
*
|
|
644
|
+
* This timing is included in `timingCcd`.
|
|
645
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
646
|
+
*/
|
|
647
|
+
timingCcdBroadPhase(): number;
|
|
648
|
+
/**
|
|
649
|
+
* The total time spent in the narrow-phase during CCD.
|
|
650
|
+
*
|
|
651
|
+
* This timing is included in `timingCcd`.
|
|
652
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
653
|
+
*/
|
|
654
|
+
timingCcdNarrowPhase(): number;
|
|
655
|
+
/**
|
|
656
|
+
* The total time spent in the constraints resolution during CCD.
|
|
657
|
+
*
|
|
658
|
+
* This timing is included in `timingCcd`.
|
|
659
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
660
|
+
*/
|
|
661
|
+
timingCcdSolver(): number;
|
|
662
|
+
/**
|
|
663
|
+
* The total time spent in the islands calculation during CCD.
|
|
664
|
+
*
|
|
665
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
666
|
+
*/
|
|
667
|
+
timingIslandConstruction(): number;
|
|
668
|
+
/**
|
|
669
|
+
* The total time spent propagating detected user changes.
|
|
670
|
+
*
|
|
671
|
+
* Only works if the internal profiler is enabled with `World.profilerEnabled = true`.
|
|
672
|
+
*/
|
|
673
|
+
timingUserChanges(): number;
|
|
674
|
+
}
|