@alexandernanberg/rapier3d 0.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rapier.mjs","names":["version","vers","wasmInit","RAPIER"],"sources":["../wasm/release/rapier_wasm_3d.js","../src/math.ts","../src/dynamics/rigid_body.ts","../src/coarena.ts","../src/dynamics/rigid_body_set.ts","../src/dynamics/integration_parameters.ts","../src/dynamics/impulse_joint.ts","../src/dynamics/impulse_joint_set.ts","../src/dynamics/multibody_joint.ts","../src/dynamics/multibody_joint_set.ts","../src/dynamics/coefficient_combine_rule.ts","../src/dynamics/ccd_solver.ts","../src/dynamics/island_manager.ts","../src/geometry/feature.ts","../src/geometry/point.ts","../src/geometry/ray.ts","../src/geometry/toi.ts","../src/geometry/broad_phase.ts","../src/geometry/narrow_phase.ts","../src/geometry/contact.ts","../src/geometry/shape.ts","../src/control/character_controller.ts","../src/control/pid_controller.ts","../src/control/ray_cast_vehicle_controller.ts","../src/pipeline/debug_render_pipeline.ts","../src/pipeline/physics_pipeline.ts","../src/pipeline/serialization_pipeline.ts","../src/pipeline/world.ts","../src/pipeline/event_queue.ts","../src/pipeline/physics_hooks.ts","../src/pipeline/query_pipeline.ts","../src/geometry/collider.ts","../src/geometry/collider_set.ts","../src/exports.ts","../src/init.ts","../src/rapier.ts"],"sourcesContent":["/* @ts-self-types=\"./rapier_wasm_3d.d.ts\" */\n\nexport class RawBroadPhase {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawBroadPhase.prototype);\n obj.__wbg_ptr = ptr;\n RawBroadPhaseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawBroadPhaseFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawbroadphase_free(ptr, 0);\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @param {boolean} solid\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawRayColliderHit | undefined}\n */\n castRay(narrow_phase, bodies, colliders, rayOrig, rayDir, maxToi, solid, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawbroadphase_castRay(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid, filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n return ret === 0 ? undefined : RawRayColliderHit.__wrap(ret);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @param {boolean} solid\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawRayColliderIntersection | undefined}\n */\n castRayAndGetNormal(narrow_phase, bodies, colliders, rayOrig, rayDir, maxToi, solid, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid, filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n return ret === 0 ? undefined : RawRayColliderIntersection.__wrap(ret);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawVector} shapeVel\n * @param {RawShape} shape\n * @param {number} target_distance\n * @param {number} maxToi\n * @param {boolean} stop_at_penetration\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawColliderShapeCastHit | undefined}\n */\n castShape(narrow_phase, bodies, colliders, shapePos, shapeRot, shapeVel, shape, target_distance, maxToi, stop_at_penetration, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(shapeVel, RawVector);\n _assertClass(shape, RawShape);\n const ret = wasm.rawbroadphase_castShape(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, shapeVel.__wbg_ptr, shape.__wbg_ptr, target_distance, maxToi, stop_at_penetration, filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n return ret === 0 ? undefined : RawColliderShapeCastHit.__wrap(ret);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} aabbCenter\n * @param {RawVector} aabbHalfExtents\n * @param {Function} callback\n */\n collidersWithAabbIntersectingAabb(narrow_phase, bodies, colliders, aabbCenter, aabbHalfExtents, callback) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(aabbCenter, RawVector);\n _assertClass(aabbHalfExtents, RawVector);\n wasm.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, aabbCenter.__wbg_ptr, aabbHalfExtents.__wbg_ptr, addBorrowedObject(callback));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawShape} shape\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {number | undefined}\n */\n intersectionWithShape(narrow_phase, bodies, colliders, shapePos, shapeRot, shape, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(shape, RawShape);\n wasm.rawbroadphase_intersectionWithShape(retptr, this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, shape.__wbg_ptr, filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);\n return r0 === 0 ? undefined : r2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} point\n * @param {Function} callback\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n */\n intersectionsWithPoint(narrow_phase, bodies, colliders, point, callback, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(point, RawVector);\n wasm.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, point.__wbg_ptr, addBorrowedObject(callback), filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @param {boolean} solid\n * @param {Function} callback\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n */\n intersectionsWithRay(narrow_phase, bodies, colliders, rayOrig, rayDir, maxToi, solid, callback, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n wasm.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid, addBorrowedObject(callback), filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawShape} shape\n * @param {Function} callback\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n */\n intersectionsWithShape(narrow_phase, bodies, colliders, shapePos, shapeRot, shape, callback, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(shape, RawShape);\n wasm.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, shape.__wbg_ptr, addBorrowedObject(callback), filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n heap[stack_pointer++] = undefined;\n }\n }\n constructor() {\n const ret = wasm.rawbroadphase_new();\n this.__wbg_ptr = ret >>> 0;\n RawBroadPhaseFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} point\n * @param {boolean} solid\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawPointColliderProjection | undefined}\n */\n projectPoint(narrow_phase, bodies, colliders, point, solid, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(point, RawVector);\n const ret = wasm.rawbroadphase_projectPoint(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, point.__wbg_ptr, solid, filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n return ret === 0 ? undefined : RawPointColliderProjection.__wrap(ret);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} point\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {number | null | undefined} filter_exclude_collider\n * @param {number | null | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawPointColliderProjection | undefined}\n */\n projectPointAndGetFeature(narrow_phase, bodies, colliders, point, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(point, RawVector);\n const ret = wasm.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, point.__wbg_ptr, filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, !isLikeNone(filter_exclude_collider), isLikeNone(filter_exclude_collider) ? 0 : filter_exclude_collider, !isLikeNone(filter_exclude_rigid_body), isLikeNone(filter_exclude_rigid_body) ? 0 : filter_exclude_rigid_body, addBorrowedObject(filter_predicate));\n return ret === 0 ? undefined : RawPointColliderProjection.__wrap(ret);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n}\nif (Symbol.dispose) RawBroadPhase.prototype[Symbol.dispose] = RawBroadPhase.prototype.free;\n\nexport class RawCCDSolver {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawCCDSolverFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawccdsolver_free(ptr, 0);\n }\n constructor() {\n const ret = wasm.rawccdsolver_new();\n this.__wbg_ptr = ret >>> 0;\n RawCCDSolverFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n}\nif (Symbol.dispose) RawCCDSolver.prototype[Symbol.dispose] = RawCCDSolver.prototype.free;\n\nexport class RawCharacterCollision {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawCharacterCollisionFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcharactercollision_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n handle() {\n const ret = wasm.rawcharactercollision_handle(this.__wbg_ptr);\n return ret;\n }\n constructor() {\n const ret = wasm.rawcharactercollision_new();\n this.__wbg_ptr = ret >>> 0;\n RawCharacterCollisionFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @returns {number}\n */\n toi() {\n const ret = wasm.rawcharactercollision_toi(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n translationDeltaApplied() {\n const ret = wasm.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n translationDeltaRemaining() {\n const ret = wasm.rawcharactercollision_translationDeltaRemaining(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n worldNormal1() {\n const ret = wasm.rawcharactercollision_worldNormal1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n worldNormal2() {\n const ret = wasm.rawcharactercollision_worldNormal2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n worldWitness1() {\n const ret = wasm.rawcharactercollision_worldWitness1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n worldWitness2() {\n const ret = wasm.rawcharactercollision_worldWitness2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawCharacterCollision.prototype[Symbol.dispose] = RawCharacterCollision.prototype.free;\n\nexport class RawColliderSet {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawColliderSet.prototype);\n obj.__wbg_ptr = ptr;\n RawColliderSetFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawColliderSetFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcolliderset_free(ptr, 0);\n }\n /**\n * The collision types enabled for this collider.\n * @param {number} handle\n * @returns {number}\n */\n coActiveCollisionTypes(handle) {\n const ret = wasm.rawcolliderset_coActiveCollisionTypes(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The events enabled for this collider.\n * @param {number} handle\n * @returns {number}\n */\n coActiveEvents(handle) {\n const ret = wasm.rawcolliderset_coActiveEvents(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * The physics hooks enabled for this collider.\n * @param {number} handle\n * @returns {number}\n */\n coActiveHooks(handle) {\n const ret = wasm.rawcolliderset_coActiveHooks(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * @param {number} handle\n * @param {RawVector} collider1Vel\n * @param {number} collider2handle\n * @param {RawVector} collider2Vel\n * @param {number} target_distance\n * @param {number} max_toi\n * @param {boolean} stop_at_penetration\n * @returns {RawColliderShapeCastHit | undefined}\n */\n coCastCollider(handle, collider1Vel, collider2handle, collider2Vel, target_distance, max_toi, stop_at_penetration) {\n _assertClass(collider1Vel, RawVector);\n _assertClass(collider2Vel, RawVector);\n const ret = wasm.rawcolliderset_coCastCollider(this.__wbg_ptr, handle, collider1Vel.__wbg_ptr, collider2handle, collider2Vel.__wbg_ptr, target_distance, max_toi, stop_at_penetration);\n return ret === 0 ? undefined : RawColliderShapeCastHit.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @param {boolean} solid\n * @returns {number}\n */\n coCastRay(handle, rayOrig, rayDir, maxToi, solid) {\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawcolliderset_coCastRay(this.__wbg_ptr, handle, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid);\n return ret;\n }\n /**\n * @param {number} handle\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @param {boolean} solid\n * @returns {RawRayIntersection | undefined}\n */\n coCastRayAndGetNormal(handle, rayOrig, rayDir, maxToi, solid) {\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawcolliderset_coCastRayAndGetNormal(this.__wbg_ptr, handle, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid);\n return ret === 0 ? undefined : RawRayIntersection.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @param {RawVector} colliderVel\n * @param {RawShape} shape2\n * @param {RawVector} shape2Pos\n * @param {RawRotation} shape2Rot\n * @param {RawVector} shape2Vel\n * @param {number} target_distance\n * @param {number} maxToi\n * @param {boolean} stop_at_penetration\n * @returns {RawShapeCastHit | undefined}\n */\n coCastShape(handle, colliderVel, shape2, shape2Pos, shape2Rot, shape2Vel, target_distance, maxToi, stop_at_penetration) {\n _assertClass(colliderVel, RawVector);\n _assertClass(shape2, RawShape);\n _assertClass(shape2Pos, RawVector);\n _assertClass(shape2Rot, RawRotation);\n _assertClass(shape2Vel, RawVector);\n const ret = wasm.rawcolliderset_coCastShape(this.__wbg_ptr, handle, colliderVel.__wbg_ptr, shape2.__wbg_ptr, shape2Pos.__wbg_ptr, shape2Rot.__wbg_ptr, shape2Vel.__wbg_ptr, target_distance, maxToi, stop_at_penetration);\n return ret === 0 ? undefined : RawShapeCastHit.__wrap(ret);\n }\n /**\n * The collision groups of this collider.\n * @param {number} handle\n * @returns {number}\n */\n coCollisionGroups(handle) {\n const ret = wasm.rawcolliderset_coCollisionGroups(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * @param {number} handle1\n * @param {number} handle2\n * @param {number} shift_x\n * @param {number} shift_y\n * @param {number} shift_z\n */\n coCombineVoxelStates(handle1, handle2, shift_x, shift_y, shift_z) {\n wasm.rawcolliderset_coCombineVoxelStates(this.__wbg_ptr, handle1, handle2, shift_x, shift_y, shift_z);\n }\n /**\n * @param {number} handle\n * @param {number} collider2handle\n * @param {number} prediction\n * @returns {RawShapeContact | undefined}\n */\n coContactCollider(handle, collider2handle, prediction) {\n const ret = wasm.rawcolliderset_coContactCollider(this.__wbg_ptr, handle, collider2handle, prediction);\n return ret === 0 ? undefined : RawShapeContact.__wrap(ret);\n }\n /**\n * The total force magnitude beyond which a contact force event can be emitted.\n * @param {number} handle\n * @returns {number}\n */\n coContactForceEventThreshold(handle) {\n const ret = wasm.rawcolliderset_coContactForceEventThreshold(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * @param {number} handle\n * @param {RawShape} shape2\n * @param {RawVector} shapePos2\n * @param {RawRotation} shapeRot2\n * @param {number} prediction\n * @returns {RawShapeContact | undefined}\n */\n coContactShape(handle, shape2, shapePos2, shapeRot2, prediction) {\n _assertClass(shape2, RawShape);\n _assertClass(shapePos2, RawVector);\n _assertClass(shapeRot2, RawRotation);\n const ret = wasm.rawcolliderset_coContactShape(this.__wbg_ptr, handle, shape2.__wbg_ptr, shapePos2.__wbg_ptr, shapeRot2.__wbg_ptr, prediction);\n return ret === 0 ? undefined : RawShapeContact.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @returns {number}\n */\n coContactSkin(handle) {\n const ret = wasm.rawcolliderset_coContactSkin(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * @param {number} handle\n * @param {RawVector} point\n * @returns {boolean}\n */\n coContainsPoint(handle, point) {\n _assertClass(point, RawVector);\n const ret = wasm.rawcolliderset_coContainsPoint(this.__wbg_ptr, handle, point.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * The density of this collider.\n * @param {number} handle\n * @returns {number}\n */\n coDensity(handle) {\n const ret = wasm.rawcolliderset_coDensity(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The friction coefficient of this collider.\n * @param {number} handle\n * @returns {number}\n */\n coFriction(handle) {\n const ret = wasm.rawcolliderset_coFriction(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * @param {number} handle\n * @returns {number}\n */\n coFrictionCombineRule(handle) {\n const ret = wasm.rawcolliderset_coFrictionCombineRule(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * The half-extents of this collider if it is has a cuboid shape.\n * @param {number} handle\n * @returns {RawVector | undefined}\n */\n coHalfExtents(handle) {\n const ret = wasm.rawcolliderset_coHalfExtents(this.__wbg_ptr, handle);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * The half height of this collider if it is a capsule, cylinder, or cone shape.\n * @param {number} handle\n * @returns {number | undefined}\n */\n coHalfHeight(handle) {\n const ret = wasm.rawcolliderset_coHalfHeight(this.__wbg_ptr, handle);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} handle\n * @returns {RawVector | undefined}\n */\n coHalfspaceNormal(handle) {\n const ret = wasm.rawcolliderset_coHalfspaceNormal(this.__wbg_ptr, handle);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @returns {number | undefined}\n */\n coHeightFieldFlags(handle) {\n const ret = wasm.rawcolliderset_coHeightFieldFlags(this.__wbg_ptr, handle);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * The height of this heightfield if it is one.\n * @param {number} handle\n * @returns {Float32Array | undefined}\n */\n coHeightfieldHeights(handle) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coHeightfieldHeights(retptr, this.__wbg_ptr, handle);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n let v1;\n if (r0 !== 0) {\n v1 = getArrayF32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_export2(r0, r1 * 4, 4);\n }\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * The number of columns on this heightfield's height matrix, if it is one.\n * @param {number} handle\n * @returns {number | undefined}\n */\n coHeightfieldNCols(handle) {\n const ret = wasm.rawcolliderset_coHeightfieldNCols(this.__wbg_ptr, handle);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * The number of rows on this heightfield's height matrix, if it is one.\n * @param {number} handle\n * @returns {number | undefined}\n */\n coHeightfieldNRows(handle) {\n const ret = wasm.rawcolliderset_coHeightfieldNRows(this.__wbg_ptr, handle);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * The scaling factor applied of this heightfield if it is one.\n * @param {number} handle\n * @returns {RawVector | undefined}\n */\n coHeightfieldScale(handle) {\n const ret = wasm.rawcolliderset_coHeightfieldScale(this.__wbg_ptr, handle);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * The indices of this triangle mesh, polyline, or convex polyhedron, if it is one.\n * @param {number} handle\n * @returns {Uint32Array | undefined}\n */\n coIndices(handle) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coIndices(retptr, this.__wbg_ptr, handle);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n let v1;\n if (r0 !== 0) {\n v1 = getArrayU32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_export2(r0, r1 * 4, 4);\n }\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} handle\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @returns {boolean}\n */\n coIntersectsRay(handle, rayOrig, rayDir, maxToi) {\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawcolliderset_coIntersectsRay(this.__wbg_ptr, handle, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi);\n return ret !== 0;\n }\n /**\n * @param {number} handle\n * @param {RawShape} shape2\n * @param {RawVector} shapePos2\n * @param {RawRotation} shapeRot2\n * @returns {boolean}\n */\n coIntersectsShape(handle, shape2, shapePos2, shapeRot2) {\n _assertClass(shape2, RawShape);\n _assertClass(shapePos2, RawVector);\n _assertClass(shapeRot2, RawRotation);\n const ret = wasm.rawcolliderset_coIntersectsShape(this.__wbg_ptr, handle, shape2.__wbg_ptr, shapePos2.__wbg_ptr, shapeRot2.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {number} handle\n * @returns {boolean}\n */\n coIsEnabled(handle) {\n const ret = wasm.rawcolliderset_coIsEnabled(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * Is this collider a sensor?\n * @param {number} handle\n * @returns {boolean}\n */\n coIsSensor(handle) {\n const ret = wasm.rawcolliderset_coIsSensor(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * The mass of this collider.\n * @param {number} handle\n * @returns {number}\n */\n coMass(handle) {\n const ret = wasm.rawcolliderset_coMass(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The unique integer identifier of the collider this collider is attached to.\n * @param {number} handle\n * @returns {number | undefined}\n */\n coParent(handle) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coParent(retptr, this.__wbg_ptr, handle);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);\n return r0 === 0 ? undefined : r2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} handle\n * @param {RawVector} point\n * @param {boolean} solid\n * @returns {RawPointProjection}\n */\n coProjectPoint(handle, point, solid) {\n _assertClass(point, RawVector);\n const ret = wasm.rawcolliderset_coProjectPoint(this.__wbg_ptr, handle, point.__wbg_ptr, solid);\n return RawPointProjection.__wrap(ret);\n }\n /**\n * @param {number} handle1\n * @param {number} handle2\n * @param {number} ix\n * @param {number} iy\n * @param {number} iz\n * @param {number} shift_x\n * @param {number} shift_y\n * @param {number} shift_z\n */\n coPropagateVoxelChange(handle1, handle2, ix, iy, iz, shift_x, shift_y, shift_z) {\n wasm.rawcolliderset_coPropagateVoxelChange(this.__wbg_ptr, handle1, handle2, ix, iy, iz, shift_x, shift_y, shift_z);\n }\n /**\n * The radius of this collider if it is a ball, capsule, cylinder, or cone shape.\n * @param {number} handle\n * @returns {number | undefined}\n */\n coRadius(handle) {\n const ret = wasm.rawcolliderset_coRadius(this.__wbg_ptr, handle);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * The restitution coefficient of this collider.\n * @param {number} handle\n * @returns {number}\n */\n coRestitution(handle) {\n const ret = wasm.rawcolliderset_coRestitution(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * @param {number} handle\n * @returns {number}\n */\n coRestitutionCombineRule(handle) {\n const ret = wasm.rawcolliderset_coRestitutionCombineRule(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * The world-space orientation of this collider, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n coRotation(handle, buffer) {\n try {\n wasm.rawcolliderset_coRotation(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The orientation of this collider relative to its parent rigid-body, written to a buffer.\n * Returns false if it doesn't have a parent.\n * @param {number} handle\n * @param {Float32Array} buffer\n * @returns {boolean}\n */\n coRotationWrtParent(handle, buffer) {\n try {\n const ret = wasm.rawcolliderset_coRotationWrtParent(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n return ret !== 0;\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The radius of the round edges of this collider.\n * @param {number} handle\n * @returns {number | undefined}\n */\n coRoundRadius(handle) {\n const ret = wasm.rawcolliderset_coRoundRadius(this.__wbg_ptr, handle);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} handle\n * @param {number} types\n */\n coSetActiveCollisionTypes(handle, types) {\n wasm.rawcolliderset_coSetActiveCollisionTypes(this.__wbg_ptr, handle, types);\n }\n /**\n * @param {number} handle\n * @param {number} events\n */\n coSetActiveEvents(handle, events) {\n wasm.rawcolliderset_coSetActiveEvents(this.__wbg_ptr, handle, events);\n }\n /**\n * @param {number} handle\n * @param {number} hooks\n */\n coSetActiveHooks(handle, hooks) {\n wasm.rawcolliderset_coSetActiveHooks(this.__wbg_ptr, handle, hooks);\n }\n /**\n * @param {number} handle\n * @param {number} groups\n */\n coSetCollisionGroups(handle, groups) {\n wasm.rawcolliderset_coSetCollisionGroups(this.__wbg_ptr, handle, groups);\n }\n /**\n * @param {number} handle\n * @param {number} threshold\n */\n coSetContactForceEventThreshold(handle, threshold) {\n wasm.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr, handle, threshold);\n }\n /**\n * @param {number} handle\n * @param {number} contact_skin\n */\n coSetContactSkin(handle, contact_skin) {\n wasm.rawcolliderset_coSetContactSkin(this.__wbg_ptr, handle, contact_skin);\n }\n /**\n * @param {number} handle\n * @param {number} density\n */\n coSetDensity(handle, density) {\n wasm.rawcolliderset_coSetDensity(this.__wbg_ptr, handle, density);\n }\n /**\n * @param {number} handle\n * @param {boolean} enabled\n */\n coSetEnabled(handle, enabled) {\n wasm.rawcolliderset_coSetEnabled(this.__wbg_ptr, handle, enabled);\n }\n /**\n * @param {number} handle\n * @param {number} friction\n */\n coSetFriction(handle, friction) {\n wasm.rawcolliderset_coSetFriction(this.__wbg_ptr, handle, friction);\n }\n /**\n * @param {number} handle\n * @param {number} rule\n */\n coSetFrictionCombineRule(handle, rule) {\n wasm.rawcolliderset_coSetFrictionCombineRule(this.__wbg_ptr, handle, rule);\n }\n /**\n * Set the half-extents of this collider if it has a cuboid shape.\n * @param {number} handle\n * @param {RawVector} newHalfExtents\n */\n coSetHalfExtents(handle, newHalfExtents) {\n _assertClass(newHalfExtents, RawVector);\n wasm.rawcolliderset_coSetHalfExtents(this.__wbg_ptr, handle, newHalfExtents.__wbg_ptr);\n }\n /**\n * Set the half height of this collider if it is a capsule, cylinder, or cone shape.\n * @param {number} handle\n * @param {number} newHalfheight\n */\n coSetHalfHeight(handle, newHalfheight) {\n wasm.rawcolliderset_coSetHalfHeight(this.__wbg_ptr, handle, newHalfheight);\n }\n /**\n * @param {number} handle\n * @param {number} mass\n */\n coSetMass(handle, mass) {\n wasm.rawcolliderset_coSetMass(this.__wbg_ptr, handle, mass);\n }\n /**\n * @param {number} handle\n * @param {number} mass\n * @param {RawVector} centerOfMass\n * @param {RawVector} principalAngularInertia\n * @param {RawRotation} angularInertiaFrame\n */\n coSetMassProperties(handle, mass, centerOfMass, principalAngularInertia, angularInertiaFrame) {\n _assertClass(centerOfMass, RawVector);\n _assertClass(principalAngularInertia, RawVector);\n _assertClass(angularInertiaFrame, RawRotation);\n wasm.rawcolliderset_coSetMassProperties(this.__wbg_ptr, handle, mass, centerOfMass.__wbg_ptr, principalAngularInertia.__wbg_ptr, angularInertiaFrame.__wbg_ptr);\n }\n /**\n * Set the radius of this collider if it is a ball, capsule, cylinder, or cone shape.\n * @param {number} handle\n * @param {number} newRadius\n */\n coSetRadius(handle, newRadius) {\n wasm.rawcolliderset_coSetRadius(this.__wbg_ptr, handle, newRadius);\n }\n /**\n * @param {number} handle\n * @param {number} restitution\n */\n coSetRestitution(handle, restitution) {\n wasm.rawcolliderset_coSetRestitution(this.__wbg_ptr, handle, restitution);\n }\n /**\n * @param {number} handle\n * @param {number} rule\n */\n coSetRestitutionCombineRule(handle, rule) {\n wasm.rawcolliderset_coSetRestitutionCombineRule(this.__wbg_ptr, handle, rule);\n }\n /**\n * Sets the rotation quaternion of this collider.\n *\n * This does nothing if a zero quaternion is provided.\n *\n * # Parameters\n * - `x`: the first vector component of the quaternion.\n * - `y`: the second vector component of the quaternion.\n * - `z`: the third vector component of the quaternion.\n * - `w`: the scalar component of the quaternion.\n * - `wakeUp`: forces the collider to wake-up so it is properly affected by forces if it\n * wasn't moving before modifying its position.\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n * @param {number} w\n */\n coSetRotation(handle, x, y, z, w) {\n wasm.rawcolliderset_coSetRotation(this.__wbg_ptr, handle, x, y, z, w);\n }\n /**\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n * @param {number} w\n */\n coSetRotationWrtParent(handle, x, y, z, w) {\n wasm.rawcolliderset_coSetRotationWrtParent(this.__wbg_ptr, handle, x, y, z, w);\n }\n /**\n * Set the radius of the round edges of this collider.\n * @param {number} handle\n * @param {number} newBorderRadius\n */\n coSetRoundRadius(handle, newBorderRadius) {\n wasm.rawcolliderset_coSetRoundRadius(this.__wbg_ptr, handle, newBorderRadius);\n }\n /**\n * @param {number} handle\n * @param {boolean} is_sensor\n */\n coSetSensor(handle, is_sensor) {\n wasm.rawcolliderset_coSetSensor(this.__wbg_ptr, handle, is_sensor);\n }\n /**\n * @param {number} handle\n * @param {RawShape} shape\n */\n coSetShape(handle, shape) {\n _assertClass(shape, RawShape);\n wasm.rawcolliderset_coSetShape(this.__wbg_ptr, handle, shape.__wbg_ptr);\n }\n /**\n * @param {number} handle\n * @param {number} groups\n */\n coSetSolverGroups(handle, groups) {\n wasm.rawcolliderset_coSetSolverGroups(this.__wbg_ptr, handle, groups);\n }\n /**\n * Sets the translation of this collider.\n *\n * # Parameters\n * - `x`: the world-space position of the collider along the `x` axis.\n * - `y`: the world-space position of the collider along the `y` axis.\n * - `z`: the world-space position of the collider along the `z` axis.\n * - `wakeUp`: forces the collider to wake-up so it is properly affected by forces if it\n * wasn't moving before modifying its position.\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n */\n coSetTranslation(handle, x, y, z) {\n wasm.rawcolliderset_coSetTranslation(this.__wbg_ptr, handle, x, y, z);\n }\n /**\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n */\n coSetTranslationWrtParent(handle, x, y, z) {\n wasm.rawcolliderset_coSetTranslationWrtParent(this.__wbg_ptr, handle, x, y, z);\n }\n /**\n * @param {number} handle\n * @param {number} ix\n * @param {number} iy\n * @param {number} iz\n * @param {boolean} filled\n */\n coSetVoxel(handle, ix, iy, iz, filled) {\n wasm.rawcolliderset_coSetVoxel(this.__wbg_ptr, handle, ix, iy, iz, filled);\n }\n /**\n * The type of the shape of this collider.\n * @param {number} handle\n * @returns {RawShapeType}\n */\n coShapeType(handle) {\n const ret = wasm.rawcolliderset_coShapeType(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The solver groups of this collider.\n * @param {number} handle\n * @returns {number}\n */\n coSolverGroups(handle) {\n const ret = wasm.rawcolliderset_coSolverGroups(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * The world-space translation of this collider, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n coTranslation(handle, buffer) {\n try {\n wasm.rawcolliderset_coTranslation(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The translation of this collider relative to its parent rigid-body, written to a buffer.\n * Returns false if it doesn't have a parent.\n * @param {number} handle\n * @param {Float32Array} buffer\n * @returns {boolean}\n */\n coTranslationWrtParent(handle, buffer) {\n try {\n const ret = wasm.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n return ret !== 0;\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {number} handle\n * @returns {number | undefined}\n */\n coTriMeshFlags(handle) {\n const ret = wasm.rawcolliderset_coTriMeshFlags(this.__wbg_ptr, handle);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * The vertices of this triangle mesh, polyline, convex polyhedron, segment, triangle or convex polyhedron, if it is one.\n * @param {number} handle\n * @returns {Float32Array | undefined}\n */\n coVertices(handle) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coVertices(retptr, this.__wbg_ptr, handle);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n let v1;\n if (r0 !== 0) {\n v1 = getArrayF32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_export2(r0, r1 * 4, 4);\n }\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * The volume of this collider.\n * @param {number} handle\n * @returns {number}\n */\n coVolume(handle) {\n const ret = wasm.rawcolliderset_coVolume(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * @param {number} handle\n * @returns {Int32Array | undefined}\n */\n coVoxelData(handle) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coVoxelData(retptr, this.__wbg_ptr, handle);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n let v1;\n if (r0 !== 0) {\n v1 = getArrayI32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_export2(r0, r1 * 4, 4);\n }\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} handle\n * @returns {RawVector | undefined}\n */\n coVoxelSize(handle) {\n const ret = wasm.rawcolliderset_coVoxelSize(this.__wbg_ptr, handle);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @returns {boolean}\n */\n contains(handle) {\n const ret = wasm.rawcolliderset_contains(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * @param {boolean} enabled\n * @param {RawShape} shape\n * @param {RawVector} translation\n * @param {RawRotation} rotation\n * @param {number} massPropsMode\n * @param {number} mass\n * @param {RawVector} centerOfMass\n * @param {RawVector} principalAngularInertia\n * @param {RawRotation} angularInertiaFrame\n * @param {number} density\n * @param {number} friction\n * @param {number} restitution\n * @param {number} frictionCombineRule\n * @param {number} restitutionCombineRule\n * @param {boolean} isSensor\n * @param {number} collisionGroups\n * @param {number} solverGroups\n * @param {number} activeCollisionTypes\n * @param {number} activeHooks\n * @param {number} activeEvents\n * @param {number} contactForceEventThreshold\n * @param {number} contactSkin\n * @param {boolean} hasParent\n * @param {number} parent\n * @param {RawRigidBodySet} bodies\n * @returns {number | undefined}\n */\n createCollider(enabled, shape, translation, rotation, massPropsMode, mass, centerOfMass, principalAngularInertia, angularInertiaFrame, density, friction, restitution, frictionCombineRule, restitutionCombineRule, isSensor, collisionGroups, solverGroups, activeCollisionTypes, activeHooks, activeEvents, contactForceEventThreshold, contactSkin, hasParent, parent, bodies) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(shape, RawShape);\n _assertClass(translation, RawVector);\n _assertClass(rotation, RawRotation);\n _assertClass(centerOfMass, RawVector);\n _assertClass(principalAngularInertia, RawVector);\n _assertClass(angularInertiaFrame, RawRotation);\n _assertClass(bodies, RawRigidBodySet);\n wasm.rawcolliderset_createCollider(retptr, this.__wbg_ptr, enabled, shape.__wbg_ptr, translation.__wbg_ptr, rotation.__wbg_ptr, massPropsMode, mass, centerOfMass.__wbg_ptr, principalAngularInertia.__wbg_ptr, angularInertiaFrame.__wbg_ptr, density, friction, restitution, frictionCombineRule, restitutionCombineRule, isSensor, collisionGroups, solverGroups, activeCollisionTypes, activeHooks, activeEvents, contactForceEventThreshold, contactSkin, hasParent, parent, bodies.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);\n return r0 === 0 ? undefined : r2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Applies the given JavaScript function to the integer handle of each collider managed by this collider set.\n *\n * # Parameters\n * - `f(handle)`: the function to apply to the integer handle of each collider managed by this collider set. Called as `f(handle)`.\n * @param {Function} f\n */\n forEachColliderHandle(f) {\n try {\n wasm.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * Checks if a collider with the given integer handle exists.\n * @param {number} handle\n * @returns {boolean}\n */\n isHandleValid(handle) {\n const ret = wasm.rawcolliderset_contains(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * @returns {number}\n */\n len() {\n const ret = wasm.rawcolliderset_len(this.__wbg_ptr);\n return ret >>> 0;\n }\n constructor() {\n const ret = wasm.rawcolliderset_new();\n this.__wbg_ptr = ret >>> 0;\n RawColliderSetFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * Removes a collider from this set and wake-up the rigid-body it is attached to.\n * @param {number} handle\n * @param {RawIslandManager} islands\n * @param {RawRigidBodySet} bodies\n * @param {boolean} wakeUp\n */\n remove(handle, islands, bodies, wakeUp) {\n _assertClass(islands, RawIslandManager);\n _assertClass(bodies, RawRigidBodySet);\n wasm.rawcolliderset_remove(this.__wbg_ptr, handle, islands.__wbg_ptr, bodies.__wbg_ptr, wakeUp);\n }\n}\nif (Symbol.dispose) RawColliderSet.prototype[Symbol.dispose] = RawColliderSet.prototype.free;\n\nexport class RawColliderShapeCastHit {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawColliderShapeCastHit.prototype);\n obj.__wbg_ptr = ptr;\n RawColliderShapeCastHitFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawColliderShapeCastHitFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcollidershapecasthit_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawcollidershapecasthit_colliderHandle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n normal1() {\n const ret = wasm.rawcollidershapecasthit_normal1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal2() {\n const ret = wasm.rawcollidershapecasthit_normal2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n time_of_impact() {\n const ret = wasm.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n witness1() {\n const ret = wasm.rawcollidershapecasthit_witness1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n witness2() {\n const ret = wasm.rawcollidershapecasthit_witness2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawColliderShapeCastHit.prototype[Symbol.dispose] = RawColliderShapeCastHit.prototype.free;\n\nexport class RawContactForceEvent {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawContactForceEvent.prototype);\n obj.__wbg_ptr = ptr;\n RawContactForceEventFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawContactForceEventFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcontactforceevent_free(ptr, 0);\n }\n /**\n * The first collider involved in the contact.\n * @returns {number}\n */\n collider1() {\n const ret = wasm.rawcollidershapecasthit_colliderHandle(this.__wbg_ptr);\n return ret;\n }\n /**\n * The second collider involved in the contact.\n * @returns {number}\n */\n collider2() {\n const ret = wasm.rawcontactforceevent_collider2(this.__wbg_ptr);\n return ret;\n }\n /**\n * The world-space (unit) direction of the force with strongest magnitude.\n * @returns {RawVector}\n */\n max_force_direction() {\n const ret = wasm.rawcontactforceevent_max_force_direction(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * The magnitude of the largest force at a contact point of this contact pair.\n * @returns {number}\n */\n max_force_magnitude() {\n const ret = wasm.rawcontactforceevent_max_force_magnitude(this.__wbg_ptr);\n return ret;\n }\n /**\n * The sum of all the forces between the two colliders.\n * @returns {RawVector}\n */\n total_force() {\n const ret = wasm.rawcontactforceevent_total_force(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * The sum of the magnitudes of each force between the two colliders.\n *\n * Note that this is **not** the same as the magnitude of `self.total_force`.\n * Here we are summing the magnitude of all the forces, instead of taking\n * the magnitude of their sum.\n * @returns {number}\n */\n total_force_magnitude() {\n const ret = wasm.rawcontactforceevent_total_force_magnitude(this.__wbg_ptr);\n return ret;\n }\n}\nif (Symbol.dispose) RawContactForceEvent.prototype[Symbol.dispose] = RawContactForceEvent.prototype.free;\n\nexport class RawContactManifold {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawContactManifold.prototype);\n obj.__wbg_ptr = ptr;\n RawContactManifoldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawContactManifoldFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcontactmanifold_free(ptr, 0);\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n contact_dist(i) {\n const ret = wasm.rawcontactmanifold_contact_dist(this.__wbg_ptr, i);\n return ret;\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n contact_fid1(i) {\n const ret = wasm.rawcontactmanifold_contact_fid1(this.__wbg_ptr, i);\n return ret >>> 0;\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n contact_fid2(i) {\n const ret = wasm.rawcontactmanifold_contact_fid2(this.__wbg_ptr, i);\n return ret >>> 0;\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n contact_impulse(i) {\n const ret = wasm.rawcontactmanifold_contact_impulse(this.__wbg_ptr, i);\n return ret;\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n contact_local_p1(i) {\n const ret = wasm.rawcontactmanifold_contact_local_p1(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n contact_local_p2(i) {\n const ret = wasm.rawcontactmanifold_contact_local_p2(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n contact_tangent_impulse_x(i) {\n const ret = wasm.rawcontactmanifold_contact_tangent_impulse_x(this.__wbg_ptr, i);\n return ret;\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n contact_tangent_impulse_y(i) {\n const ret = wasm.rawcontactmanifold_contact_tangent_impulse_y(this.__wbg_ptr, i);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n local_n1() {\n const ret = wasm.rawcontactmanifold_local_n1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n local_n2() {\n const ret = wasm.rawcontactmanifold_local_n2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal() {\n const ret = wasm.rawcontactmanifold_normal(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n num_contacts() {\n const ret = wasm.rawcontactmanifold_num_contacts(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n num_solver_contacts() {\n const ret = wasm.rawcontactmanifold_num_solver_contacts(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n solver_contact_dist(i) {\n const ret = wasm.rawcontactmanifold_solver_contact_dist(this.__wbg_ptr, i);\n return ret;\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n solver_contact_friction(i) {\n const ret = wasm.rawcontactmanifold_solver_contact_friction(this.__wbg_ptr, i);\n return ret;\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n solver_contact_point(i) {\n const ret = wasm.rawcontactmanifold_solver_contact_point(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {number}\n */\n solver_contact_restitution(i) {\n const ret = wasm.rawcontactmanifold_solver_contact_restitution(this.__wbg_ptr, i);\n return ret;\n }\n /**\n * @param {number} i\n * @returns {RawVector}\n */\n solver_contact_tangent_velocity(i) {\n const ret = wasm.rawcontactmanifold_solver_contact_tangent_velocity(this.__wbg_ptr, i);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n subshape1() {\n const ret = wasm.rawcontactmanifold_subshape1(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n subshape2() {\n const ret = wasm.rawcontactmanifold_subshape2(this.__wbg_ptr);\n return ret >>> 0;\n }\n}\nif (Symbol.dispose) RawContactManifold.prototype[Symbol.dispose] = RawContactManifold.prototype.free;\n\nexport class RawContactPair {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawContactPair.prototype);\n obj.__wbg_ptr = ptr;\n RawContactPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawContactPairFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcontactpair_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n collider1() {\n const ret = wasm.rawcontactpair_collider1(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n collider2() {\n const ret = wasm.rawcontactpair_collider2(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} i\n * @returns {RawContactManifold | undefined}\n */\n contactManifold(i) {\n const ret = wasm.rawcontactpair_contactManifold(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawContactManifold.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n numContactManifolds() {\n const ret = wasm.rawcontactpair_numContactManifolds(this.__wbg_ptr);\n return ret >>> 0;\n }\n}\nif (Symbol.dispose) RawContactPair.prototype[Symbol.dispose] = RawContactPair.prototype.free;\n\nexport class RawDebugRenderPipeline {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawDebugRenderPipelineFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawdebugrenderpipeline_free(ptr, 0);\n }\n /**\n * @returns {Float32Array}\n */\n colors() {\n const ret = wasm.rawdebugrenderpipeline_colors(this.__wbg_ptr);\n return takeObject(ret);\n }\n constructor() {\n const ret = wasm.rawdebugrenderpipeline_new();\n this.__wbg_ptr = ret >>> 0;\n RawDebugRenderPipelineFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawImpulseJointSet} impulse_joints\n * @param {RawMultibodyJointSet} multibody_joints\n * @param {RawNarrowPhase} narrow_phase\n * @param {number} filter_flags\n * @param {Function} filter_predicate\n */\n render(bodies, colliders, impulse_joints, multibody_joints, narrow_phase, filter_flags, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(impulse_joints, RawImpulseJointSet);\n _assertClass(multibody_joints, RawMultibodyJointSet);\n _assertClass(narrow_phase, RawNarrowPhase);\n wasm.rawdebugrenderpipeline_render(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, impulse_joints.__wbg_ptr, multibody_joints.__wbg_ptr, narrow_phase.__wbg_ptr, filter_flags, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @returns {Float32Array}\n */\n vertices() {\n const ret = wasm.rawdebugrenderpipeline_vertices(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\nif (Symbol.dispose) RawDebugRenderPipeline.prototype[Symbol.dispose] = RawDebugRenderPipeline.prototype.free;\n\nexport class RawDeserializedWorld {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawDeserializedWorld.prototype);\n obj.__wbg_ptr = ptr;\n RawDeserializedWorldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawDeserializedWorldFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawdeserializedworld_free(ptr, 0);\n }\n /**\n * @returns {RawRigidBodySet | undefined}\n */\n takeBodies() {\n const ret = wasm.rawdeserializedworld_takeBodies(this.__wbg_ptr);\n return ret === 0 ? undefined : RawRigidBodySet.__wrap(ret);\n }\n /**\n * @returns {RawBroadPhase | undefined}\n */\n takeBroadPhase() {\n const ret = wasm.rawdeserializedworld_takeBroadPhase(this.__wbg_ptr);\n return ret === 0 ? undefined : RawBroadPhase.__wrap(ret);\n }\n /**\n * @returns {RawColliderSet | undefined}\n */\n takeColliders() {\n const ret = wasm.rawdeserializedworld_takeColliders(this.__wbg_ptr);\n return ret === 0 ? undefined : RawColliderSet.__wrap(ret);\n }\n /**\n * @returns {RawVector | undefined}\n */\n takeGravity() {\n const ret = wasm.rawdeserializedworld_takeGravity(this.__wbg_ptr);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @returns {RawImpulseJointSet | undefined}\n */\n takeImpulseJoints() {\n const ret = wasm.rawdeserializedworld_takeImpulseJoints(this.__wbg_ptr);\n return ret === 0 ? undefined : RawImpulseJointSet.__wrap(ret);\n }\n /**\n * @returns {RawIntegrationParameters | undefined}\n */\n takeIntegrationParameters() {\n const ret = wasm.rawdeserializedworld_takeIntegrationParameters(this.__wbg_ptr);\n return ret === 0 ? undefined : RawIntegrationParameters.__wrap(ret);\n }\n /**\n * @returns {RawIslandManager | undefined}\n */\n takeIslandManager() {\n const ret = wasm.rawdeserializedworld_takeIslandManager(this.__wbg_ptr);\n return ret === 0 ? undefined : RawIslandManager.__wrap(ret);\n }\n /**\n * @returns {RawMultibodyJointSet | undefined}\n */\n takeMultibodyJoints() {\n const ret = wasm.rawdeserializedworld_takeMultibodyJoints(this.__wbg_ptr);\n return ret === 0 ? undefined : RawMultibodyJointSet.__wrap(ret);\n }\n /**\n * @returns {RawNarrowPhase | undefined}\n */\n takeNarrowPhase() {\n const ret = wasm.rawdeserializedworld_takeNarrowPhase(this.__wbg_ptr);\n return ret === 0 ? undefined : RawNarrowPhase.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawDeserializedWorld.prototype[Symbol.dispose] = RawDeserializedWorld.prototype.free;\n\nexport class RawDynamicRayCastVehicleController {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawDynamicRayCastVehicleControllerFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawdynamicraycastvehiclecontroller_free(ptr, 0);\n }\n /**\n * @param {RawVector} chassis_connection_cs\n * @param {RawVector} direction_cs\n * @param {RawVector} axle_cs\n * @param {number} suspension_rest_length\n * @param {number} radius\n */\n add_wheel(chassis_connection_cs, direction_cs, axle_cs, suspension_rest_length, radius) {\n _assertClass(chassis_connection_cs, RawVector);\n _assertClass(direction_cs, RawVector);\n _assertClass(axle_cs, RawVector);\n wasm.rawdynamicraycastvehiclecontroller_add_wheel(this.__wbg_ptr, chassis_connection_cs.__wbg_ptr, direction_cs.__wbg_ptr, axle_cs.__wbg_ptr, suspension_rest_length, radius);\n }\n /**\n * @returns {number}\n */\n chassis() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_chassis(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n current_vehicle_speed() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_current_vehicle_speed(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n index_forward_axis() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_index_forward_axis(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n index_up_axis() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_index_up_axis(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} chassis\n */\n constructor(chassis) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_new(chassis);\n this.__wbg_ptr = ret >>> 0;\n RawDynamicRayCastVehicleControllerFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @returns {number}\n */\n num_wheels() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_num_wheels(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} axis\n */\n set_index_forward_axis(axis) {\n wasm.rawdynamicraycastvehiclecontroller_set_index_forward_axis(this.__wbg_ptr, axis);\n }\n /**\n * @param {number} axis\n */\n set_index_up_axis(axis) {\n wasm.rawdynamicraycastvehiclecontroller_set_index_up_axis(this.__wbg_ptr, axis);\n }\n /**\n * @param {number} i\n * @param {RawVector} value\n */\n set_wheel_axle_cs(i, value) {\n _assertClass(value, RawVector);\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_axle_cs(this.__wbg_ptr, i, value.__wbg_ptr);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_brake(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_brake(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {RawVector} value\n */\n set_wheel_chassis_connection_point_cs(i, value) {\n _assertClass(value, RawVector);\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_chassis_connection_point_cs(this.__wbg_ptr, i, value.__wbg_ptr);\n }\n /**\n * @param {number} i\n * @param {RawVector} value\n */\n set_wheel_direction_cs(i, value) {\n _assertClass(value, RawVector);\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_direction_cs(this.__wbg_ptr, i, value.__wbg_ptr);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_engine_force(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_engine_force(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_friction_slip(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_friction_slip(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_max_suspension_force(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_force(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_max_suspension_travel(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_travel(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_radius(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_radius(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} stiffness\n */\n set_wheel_side_friction_stiffness(i, stiffness) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_side_friction_stiffness(this.__wbg_ptr, i, stiffness);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_steering(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_steering(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_suspension_compression(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_suspension_compression(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_suspension_relaxation(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_suspension_relaxation(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_suspension_rest_length(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_suspension_rest_length(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} i\n * @param {number} value\n */\n set_wheel_suspension_stiffness(i, value) {\n wasm.rawdynamicraycastvehiclecontroller_set_wheel_suspension_stiffness(this.__wbg_ptr, i, value);\n }\n /**\n * @param {number} dt\n * @param {RawBroadPhase} broad_phase\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {Function} filter_predicate\n */\n update_vehicle(dt, broad_phase, narrow_phase, bodies, colliders, filter_flags, filter_groups, filter_predicate) {\n try {\n _assertClass(broad_phase, RawBroadPhase);\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n wasm.rawdynamicraycastvehiclecontroller_update_vehicle(this.__wbg_ptr, dt, broad_phase.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n wheel_axle_cs(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_axle_cs(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_brake(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_brake(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n wheel_chassis_connection_point_cs(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_chassis_connection_point_cs(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n wheel_contact_normal_ws(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_contact_normal_ws(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n wheel_contact_point_ws(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_contact_point_ws(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n wheel_direction_cs(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_direction_cs(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_engine_force(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_engine_force(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_forward_impulse(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_forward_impulse(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_friction_slip(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_friction_slip(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_ground_object(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_ground_object(retptr, this.__wbg_ptr, i);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);\n return r0 === 0 ? undefined : r2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} i\n * @returns {RawVector | undefined}\n */\n wheel_hard_point_ws(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_hard_point_ws(this.__wbg_ptr, i);\n return ret === 0 ? undefined : RawVector.__wrap(ret);\n }\n /**\n * @param {number} i\n * @returns {boolean}\n */\n wheel_is_in_contact(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_is_in_contact(this.__wbg_ptr, i);\n return ret !== 0;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_max_suspension_force(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_max_suspension_force(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_max_suspension_travel(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_max_suspension_travel(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_radius(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_radius(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_rotation(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_rotation(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_side_friction_stiffness(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_side_friction_stiffness(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_side_impulse(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_side_impulse(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_steering(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_steering(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_suspension_compression(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_compression(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_suspension_force(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_force(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_suspension_length(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_length(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_suspension_relaxation(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_relaxation(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_suspension_rest_length(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_rest_length(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_suspension_stiffness(i) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_stiffness(this.__wbg_ptr, i);\n return ret === 0x100000001 ? undefined : ret;\n }\n}\nif (Symbol.dispose) RawDynamicRayCastVehicleController.prototype[Symbol.dispose] = RawDynamicRayCastVehicleController.prototype.free;\n\n/**\n * A structure responsible for collecting events generated\n * by the physics engine.\n */\nexport class RawEventQueue {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawEventQueueFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_raweventqueue_free(ptr, 0);\n }\n /**\n * Removes all events contained by this collector.\n */\n clear() {\n wasm.raweventqueue_clear(this.__wbg_ptr);\n }\n /**\n * Applies the given javascript closure on each collision event of this collector, then clear\n * the internal collision event buffer.\n *\n * # Parameters\n * - `f(handle1, handle2, started)`: JavaScript closure applied to each collision event. The\n * closure should take three arguments: two integers representing the handles of the colliders\n * involved in the collision, and a boolean indicating if the collision started (true) or stopped\n * (false).\n * @param {Function} f\n */\n drainCollisionEvents(f) {\n try {\n wasm.raweventqueue_drainCollisionEvents(this.__wbg_ptr, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {Function} f\n */\n drainContactForceEvents(f) {\n try {\n wasm.raweventqueue_drainContactForceEvents(this.__wbg_ptr, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * Creates a new event collector.\n *\n * # Parameters\n * - `autoDrain`: setting this to `true` is strongly recommended. If true, the collector will\n * be automatically drained before each `world.step(collector)`. If false, the collector will\n * keep all events in memory unless it is manually drained/cleared; this may lead to unbounded use of\n * RAM if no drain is performed.\n * @param {boolean} autoDrain\n */\n constructor(autoDrain) {\n const ret = wasm.raweventqueue_new(autoDrain);\n this.__wbg_ptr = ret >>> 0;\n RawEventQueueFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n}\nif (Symbol.dispose) RawEventQueue.prototype[Symbol.dispose] = RawEventQueue.prototype.free;\n\n/**\n * @enum {0 | 1 | 2 | 3}\n */\nexport const RawFeatureType = Object.freeze({\n Vertex: 0, \"0\": \"Vertex\",\n Edge: 1, \"1\": \"Edge\",\n Face: 2, \"2\": \"Face\",\n Unknown: 3, \"3\": \"Unknown\",\n});\n\nexport class RawGenericJoint {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawGenericJoint.prototype);\n obj.__wbg_ptr = ptr;\n RawGenericJointFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawGenericJointFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawgenericjoint_free(ptr, 0);\n }\n /**\n * Creates a new joint descriptor that builds a Fixed joint.\n *\n * A fixed joint removes all the degrees of freedom between the affected bodies.\n * @param {RawVector} anchor1\n * @param {RawRotation} axes1\n * @param {RawVector} anchor2\n * @param {RawRotation} axes2\n * @returns {RawGenericJoint}\n */\n static fixed(anchor1, axes1, anchor2, axes2) {\n _assertClass(anchor1, RawVector);\n _assertClass(axes1, RawRotation);\n _assertClass(anchor2, RawVector);\n _assertClass(axes2, RawRotation);\n const ret = wasm.rawgenericjoint_fixed(anchor1.__wbg_ptr, axes1.__wbg_ptr, anchor2.__wbg_ptr, axes2.__wbg_ptr);\n return RawGenericJoint.__wrap(ret);\n }\n /**\n * Creates a new joint descriptor that builds generic joints.\n *\n * Generic joints allow arbitrary axes of freedom to be selected\n * for the joint from the available 6 degrees of freedom.\n * @param {RawVector} anchor1\n * @param {RawVector} anchor2\n * @param {RawVector} axis\n * @param {number} lockedAxes\n * @returns {RawGenericJoint | undefined}\n */\n static generic(anchor1, anchor2, axis, lockedAxes) {\n _assertClass(anchor1, RawVector);\n _assertClass(anchor2, RawVector);\n _assertClass(axis, RawVector);\n const ret = wasm.rawgenericjoint_generic(anchor1.__wbg_ptr, anchor2.__wbg_ptr, axis.__wbg_ptr, lockedAxes);\n return ret === 0 ? undefined : RawGenericJoint.__wrap(ret);\n }\n /**\n * Creates a new joint descriptor that builds a Prismatic joint.\n *\n * A prismatic joint removes all the degrees of freedom between the\n * affected bodies, except for the translation along one axis.\n *\n * Returns `None` if any of the provided axes cannot be normalized.\n * @param {RawVector} anchor1\n * @param {RawVector} anchor2\n * @param {RawVector} axis\n * @param {boolean} limitsEnabled\n * @param {number} limitsMin\n * @param {number} limitsMax\n * @returns {RawGenericJoint | undefined}\n */\n static prismatic(anchor1, anchor2, axis, limitsEnabled, limitsMin, limitsMax) {\n _assertClass(anchor1, RawVector);\n _assertClass(anchor2, RawVector);\n _assertClass(axis, RawVector);\n const ret = wasm.rawgenericjoint_prismatic(anchor1.__wbg_ptr, anchor2.__wbg_ptr, axis.__wbg_ptr, limitsEnabled, limitsMin, limitsMax);\n return ret === 0 ? undefined : RawGenericJoint.__wrap(ret);\n }\n /**\n * Create a new joint descriptor that builds Revolute joints.\n *\n * A revolute joint removes all degrees of freedom between the affected\n * bodies except for the rotation along one axis.\n * @param {RawVector} anchor1\n * @param {RawVector} anchor2\n * @param {RawVector} axis\n * @returns {RawGenericJoint | undefined}\n */\n static revolute(anchor1, anchor2, axis) {\n _assertClass(anchor1, RawVector);\n _assertClass(anchor2, RawVector);\n _assertClass(axis, RawVector);\n const ret = wasm.rawgenericjoint_revolute(anchor1.__wbg_ptr, anchor2.__wbg_ptr, axis.__wbg_ptr);\n return ret === 0 ? undefined : RawGenericJoint.__wrap(ret);\n }\n /**\n * @param {number} length\n * @param {RawVector} anchor1\n * @param {RawVector} anchor2\n * @returns {RawGenericJoint}\n */\n static rope(length, anchor1, anchor2) {\n _assertClass(anchor1, RawVector);\n _assertClass(anchor2, RawVector);\n const ret = wasm.rawgenericjoint_rope(length, anchor1.__wbg_ptr, anchor2.__wbg_ptr);\n return RawGenericJoint.__wrap(ret);\n }\n /**\n * Create a new joint descriptor that builds spherical joints.\n *\n * A spherical joints allows three relative rotational degrees of freedom\n * by preventing any relative translation between the anchors of the\n * two attached rigid-bodies.\n * @param {RawVector} anchor1\n * @param {RawVector} anchor2\n * @returns {RawGenericJoint}\n */\n static spherical(anchor1, anchor2) {\n _assertClass(anchor1, RawVector);\n _assertClass(anchor2, RawVector);\n const ret = wasm.rawgenericjoint_spherical(anchor1.__wbg_ptr, anchor2.__wbg_ptr);\n return RawGenericJoint.__wrap(ret);\n }\n /**\n * @param {number} rest_length\n * @param {number} stiffness\n * @param {number} damping\n * @param {RawVector} anchor1\n * @param {RawVector} anchor2\n * @returns {RawGenericJoint}\n */\n static spring(rest_length, stiffness, damping, anchor1, anchor2) {\n _assertClass(anchor1, RawVector);\n _assertClass(anchor2, RawVector);\n const ret = wasm.rawgenericjoint_spring(rest_length, stiffness, damping, anchor1.__wbg_ptr, anchor2.__wbg_ptr);\n return RawGenericJoint.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawGenericJoint.prototype[Symbol.dispose] = RawGenericJoint.prototype.free;\n\nexport class RawImpulseJointSet {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawImpulseJointSet.prototype);\n obj.__wbg_ptr = ptr;\n RawImpulseJointSetFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawImpulseJointSetFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawimpulsejointset_free(ptr, 0);\n }\n /**\n * @param {number} handle\n * @returns {boolean}\n */\n contains(handle) {\n const ret = wasm.rawimpulsejointset_contains(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * @param {RawGenericJoint} params\n * @param {number} parent1\n * @param {number} parent2\n * @param {boolean} wake_up\n * @returns {number}\n */\n createJoint(params, parent1, parent2, wake_up) {\n _assertClass(params, RawGenericJoint);\n const ret = wasm.rawimpulsejointset_createJoint(this.__wbg_ptr, params.__wbg_ptr, parent1, parent2, wake_up);\n return ret;\n }\n /**\n * Applies the given JavaScript function to the integer handle of each joint attached to the given rigid-body.\n *\n * # Parameters\n * - `f(handle)`: the function to apply to the integer handle of each joint attached to the rigid-body. Called as `f(collider)`.\n * @param {number} body\n * @param {Function} f\n */\n forEachJointAttachedToRigidBody(body, f) {\n try {\n wasm.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, body, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * Applies the given JavaScript function to the integer handle of each joint managed by this physics world.\n *\n * # Parameters\n * - `f(handle)`: the function to apply to the integer handle of each joint managed by this set. Called as `f(collider)`.\n * @param {Function} f\n */\n forEachJointHandle(f) {\n try {\n wasm.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The position of the first anchor of this joint.\n *\n * The first anchor gives the position of the points application point on the\n * local frame of the first rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawVector}\n */\n jointAnchor1(handle) {\n const ret = wasm.rawimpulsejointset_jointAnchor1(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The position of the second anchor of this joint.\n *\n * The second anchor gives the position of the points application point on the\n * local frame of the second rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawVector}\n */\n jointAnchor2(handle) {\n const ret = wasm.rawimpulsejointset_jointAnchor2(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The unique integer identifier of the first rigid-body this joint it attached to.\n * @param {number} handle\n * @returns {number}\n */\n jointBodyHandle1(handle) {\n const ret = wasm.rawimpulsejointset_jointBodyHandle1(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The unique integer identifier of the second rigid-body this joint is attached to.\n * @param {number} handle\n * @returns {number}\n */\n jointBodyHandle2(handle) {\n const ret = wasm.rawimpulsejointset_jointBodyHandle2(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @param {number} targetPos\n * @param {number} targetVel\n * @param {number} stiffness\n * @param {number} damping\n */\n jointConfigureMotor(handle, axis, targetPos, targetVel, stiffness, damping) {\n wasm.rawimpulsejointset_jointConfigureMotor(this.__wbg_ptr, handle, axis, targetPos, targetVel, stiffness, damping);\n }\n /**\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @param {RawMotorModel} model\n */\n jointConfigureMotorModel(handle, axis, model) {\n wasm.rawimpulsejointset_jointConfigureMotorModel(this.__wbg_ptr, handle, axis, model);\n }\n /**\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @param {number} targetPos\n * @param {number} stiffness\n * @param {number} damping\n */\n jointConfigureMotorPosition(handle, axis, targetPos, stiffness, damping) {\n wasm.rawimpulsejointset_jointConfigureMotorPosition(this.__wbg_ptr, handle, axis, targetPos, stiffness, damping);\n }\n /**\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @param {number} targetVel\n * @param {number} factor\n */\n jointConfigureMotorVelocity(handle, axis, targetVel, factor) {\n wasm.rawimpulsejointset_jointConfigureMotorVelocity(this.__wbg_ptr, handle, axis, targetVel, factor);\n }\n /**\n * Are contacts between the rigid-bodies attached by this joint enabled?\n * @param {number} handle\n * @returns {boolean}\n */\n jointContactsEnabled(handle) {\n const ret = wasm.rawimpulsejointset_jointContactsEnabled(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * The angular part of the joint’s local frame relative to the first rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawRotation}\n */\n jointFrameX1(handle) {\n const ret = wasm.rawimpulsejointset_jointFrameX1(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\n }\n /**\n * The angular part of the joint’s local frame relative to the second rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawRotation}\n */\n jointFrameX2(handle) {\n const ret = wasm.rawimpulsejointset_jointFrameX2(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\n }\n /**\n * Are the limits for this joint enabled?\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @returns {boolean}\n */\n jointLimitsEnabled(handle, axis) {\n const ret = wasm.rawimpulsejointset_jointLimitsEnabled(this.__wbg_ptr, handle, axis);\n return ret !== 0;\n }\n /**\n * If this is a prismatic joint, returns its upper limit.\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @returns {number}\n */\n jointLimitsMax(handle, axis) {\n const ret = wasm.rawimpulsejointset_jointLimitsMax(this.__wbg_ptr, handle, axis);\n return ret;\n }\n /**\n * Return the lower limit along the given joint axis.\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @returns {number}\n */\n jointLimitsMin(handle, axis) {\n const ret = wasm.rawimpulsejointset_jointLimitsMin(this.__wbg_ptr, handle, axis);\n return ret;\n }\n /**\n * Sets the position of the first local anchor\n * @param {number} handle\n * @param {RawVector} newPos\n */\n jointSetAnchor1(handle, newPos) {\n _assertClass(newPos, RawVector);\n wasm.rawimpulsejointset_jointSetAnchor1(this.__wbg_ptr, handle, newPos.__wbg_ptr);\n }\n /**\n * Sets the position of the second local anchor\n * @param {number} handle\n * @param {RawVector} newPos\n */\n jointSetAnchor2(handle, newPos) {\n _assertClass(newPos, RawVector);\n wasm.rawimpulsejointset_jointSetAnchor2(this.__wbg_ptr, handle, newPos.__wbg_ptr);\n }\n /**\n * Sets whether contacts are enabled between the rigid-bodies attached by this joint.\n * @param {number} handle\n * @param {boolean} enabled\n */\n jointSetContactsEnabled(handle, enabled) {\n wasm.rawimpulsejointset_jointSetContactsEnabled(this.__wbg_ptr, handle, enabled);\n }\n /**\n * Enables and sets the joint limits\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @param {number} min\n * @param {number} max\n */\n jointSetLimits(handle, axis, min, max) {\n wasm.rawimpulsejointset_jointSetLimits(this.__wbg_ptr, handle, axis, min, max);\n }\n /**\n * The type of this joint.\n * @param {number} handle\n * @returns {RawJointType}\n */\n jointType(handle) {\n const ret = wasm.rawimpulsejointset_jointType(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * @returns {number}\n */\n len() {\n const ret = wasm.rawimpulsejointset_len(this.__wbg_ptr);\n return ret >>> 0;\n }\n constructor() {\n const ret = wasm.rawimpulsejointset_new();\n this.__wbg_ptr = ret >>> 0;\n RawImpulseJointSetFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {number} handle\n * @param {boolean} wakeUp\n */\n remove(handle, wakeUp) {\n wasm.rawimpulsejointset_remove(this.__wbg_ptr, handle, wakeUp);\n }\n}\nif (Symbol.dispose) RawImpulseJointSet.prototype[Symbol.dispose] = RawImpulseJointSet.prototype.free;\n\nexport class RawIntegrationParameters {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawIntegrationParameters.prototype);\n obj.__wbg_ptr = ptr;\n RawIntegrationParametersFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawIntegrationParametersFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawintegrationparameters_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n get contact_erp() {\n const ret = wasm.rawintegrationparameters_contact_erp(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n get dt() {\n const ret = wasm.rawintegrationparameters_dt(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n get lengthUnit() {\n const ret = wasm.rawintegrationparameters_lengthUnit(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n get maxCcdSubsteps() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_index_forward_axis(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n get minIslandSize() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_index_up_axis(this.__wbg_ptr);\n return ret >>> 0;\n }\n constructor() {\n const ret = wasm.rawintegrationparameters_new();\n this.__wbg_ptr = ret >>> 0;\n RawIntegrationParametersFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @returns {number}\n */\n get normalizedAllowedLinearError() {\n const ret = wasm.rawintegrationparameters_normalizedAllowedLinearError(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n get normalizedPredictionDistance() {\n const ret = wasm.rawintegrationparameters_normalizedPredictionDistance(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n get numInternalPgsIterations() {\n const ret = wasm.rawintegrationparameters_numInternalPgsIterations(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n get numSolverIterations() {\n const ret = wasm.rawintegrationparameters_numSolverIterations(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} value\n */\n set contact_natural_frequency(value) {\n wasm.rawintegrationparameters_set_contact_natural_frequency(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set dt(value) {\n wasm.rawintegrationparameters_set_dt(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set lengthUnit(value) {\n wasm.rawintegrationparameters_set_lengthUnit(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set maxCcdSubsteps(value) {\n wasm.rawdynamicraycastvehiclecontroller_set_index_forward_axis(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set minIslandSize(value) {\n wasm.rawdynamicraycastvehiclecontroller_set_index_up_axis(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set normalizedAllowedLinearError(value) {\n wasm.rawintegrationparameters_set_normalizedAllowedLinearError(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set normalizedPredictionDistance(value) {\n wasm.rawintegrationparameters_set_normalizedPredictionDistance(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set numInternalPgsIterations(value) {\n wasm.rawintegrationparameters_set_numInternalPgsIterations(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set numSolverIterations(value) {\n wasm.rawintegrationparameters_set_numSolverIterations(this.__wbg_ptr, value);\n }\n}\nif (Symbol.dispose) RawIntegrationParameters.prototype[Symbol.dispose] = RawIntegrationParameters.prototype.free;\n\nexport class RawIslandManager {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawIslandManager.prototype);\n obj.__wbg_ptr = ptr;\n RawIslandManagerFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawIslandManagerFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawislandmanager_free(ptr, 0);\n }\n /**\n * Applies the given JavaScript function to the integer handle of each active rigid-body\n * managed by this island manager.\n *\n * After a short time of inactivity, a rigid-body is automatically deactivated (\"asleep\") by\n * the physics engine in order to save computational power. A sleeping rigid-body never moves\n * unless it is moved manually by the user.\n *\n * # Parameters\n * - `f(handle)`: the function to apply to the integer handle of each active rigid-body managed by this\n * set. Called as `f(collider)`.\n * @param {Function} f\n */\n forEachActiveRigidBodyHandle(f) {\n try {\n wasm.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n constructor() {\n const ret = wasm.rawislandmanager_new();\n this.__wbg_ptr = ret >>> 0;\n RawIslandManagerFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n}\nif (Symbol.dispose) RawIslandManager.prototype[Symbol.dispose] = RawIslandManager.prototype.free;\n\n/**\n * @enum {0 | 1 | 2 | 3 | 4 | 5}\n */\nexport const RawJointAxis = Object.freeze({\n LinX: 0, \"0\": \"LinX\",\n LinY: 1, \"1\": \"LinY\",\n LinZ: 2, \"2\": \"LinZ\",\n AngX: 3, \"3\": \"AngX\",\n AngY: 4, \"4\": \"AngY\",\n AngZ: 5, \"5\": \"AngZ\",\n});\n\n/**\n * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6}\n */\nexport const RawJointType = Object.freeze({\n Revolute: 0, \"0\": \"Revolute\",\n Fixed: 1, \"1\": \"Fixed\",\n Prismatic: 2, \"2\": \"Prismatic\",\n Rope: 3, \"3\": \"Rope\",\n Spring: 4, \"4\": \"Spring\",\n Spherical: 5, \"5\": \"Spherical\",\n Generic: 6, \"6\": \"Generic\",\n});\n\nexport class RawKinematicCharacterController {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawKinematicCharacterControllerFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawkinematiccharactercontroller_free(ptr, 0);\n }\n /**\n * @returns {boolean}\n */\n autostepEnabled() {\n const ret = wasm.rawkinematiccharactercontroller_autostepEnabled(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean | undefined}\n */\n autostepIncludesDynamicBodies() {\n const ret = wasm.rawkinematiccharactercontroller_autostepIncludesDynamicBodies(this.__wbg_ptr);\n return ret === 0xFFFFFF ? undefined : ret !== 0;\n }\n /**\n * @returns {number | undefined}\n */\n autostepMaxHeight() {\n const ret = wasm.rawkinematiccharactercontroller_autostepMaxHeight(this.__wbg_ptr);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @returns {number | undefined}\n */\n autostepMinWidth() {\n const ret = wasm.rawkinematiccharactercontroller_autostepMinWidth(this.__wbg_ptr);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {number} dt\n * @param {RawBroadPhase} broad_phase\n * @param {RawNarrowPhase} narrow_phase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {number} collider_handle\n * @param {RawVector} desired_translation_delta\n * @param {boolean} apply_impulses_to_dynamic_bodies\n * @param {number | null | undefined} character_mass\n * @param {number} filter_flags\n * @param {number | null | undefined} filter_groups\n * @param {Function} filter_predicate\n */\n computeColliderMovement(dt, broad_phase, narrow_phase, bodies, colliders, collider_handle, desired_translation_delta, apply_impulses_to_dynamic_bodies, character_mass, filter_flags, filter_groups, filter_predicate) {\n try {\n _assertClass(broad_phase, RawBroadPhase);\n _assertClass(narrow_phase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(desired_translation_delta, RawVector);\n wasm.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, dt, broad_phase.__wbg_ptr, narrow_phase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, collider_handle, desired_translation_delta.__wbg_ptr, apply_impulses_to_dynamic_bodies, isLikeNone(character_mass) ? 0x100000001 : Math.fround(character_mass), filter_flags, isLikeNone(filter_groups) ? 0x100000001 : (filter_groups) >>> 0, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {number} i\n * @param {RawCharacterCollision} collision\n * @returns {boolean}\n */\n computedCollision(i, collision) {\n _assertClass(collision, RawCharacterCollision);\n const ret = wasm.rawkinematiccharactercontroller_computedCollision(this.__wbg_ptr, i, collision.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n computedGrounded() {\n const ret = wasm.rawkinematiccharactercontroller_computedGrounded(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {RawVector}\n */\n computedMovement() {\n const ret = wasm.rawkinematiccharactercontroller_computedMovement(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n disableAutostep() {\n wasm.rawkinematiccharactercontroller_disableAutostep(this.__wbg_ptr);\n }\n disableSnapToGround() {\n wasm.rawkinematiccharactercontroller_disableSnapToGround(this.__wbg_ptr);\n }\n /**\n * @param {number} maxHeight\n * @param {number} minWidth\n * @param {boolean} includeDynamicBodies\n */\n enableAutostep(maxHeight, minWidth, includeDynamicBodies) {\n wasm.rawkinematiccharactercontroller_enableAutostep(this.__wbg_ptr, maxHeight, minWidth, includeDynamicBodies);\n }\n /**\n * @param {number} distance\n */\n enableSnapToGround(distance) {\n wasm.rawkinematiccharactercontroller_enableSnapToGround(this.__wbg_ptr, distance);\n }\n /**\n * @returns {number}\n */\n maxSlopeClimbAngle() {\n const ret = wasm.rawkinematiccharactercontroller_maxSlopeClimbAngle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n minSlopeSlideAngle() {\n const ret = wasm.rawkinematiccharactercontroller_minSlopeSlideAngle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} offset\n */\n constructor(offset) {\n const ret = wasm.rawkinematiccharactercontroller_new(offset);\n this.__wbg_ptr = ret >>> 0;\n RawKinematicCharacterControllerFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @returns {number}\n */\n normalNudgeFactor() {\n const ret = wasm.rawkinematiccharactercontroller_normalNudgeFactor(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n numComputedCollisions() {\n const ret = wasm.rawkinematiccharactercontroller_numComputedCollisions(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n offset() {\n const ret = wasm.rawkinematiccharactercontroller_offset(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} angle\n */\n setMaxSlopeClimbAngle(angle) {\n wasm.rawkinematiccharactercontroller_setMaxSlopeClimbAngle(this.__wbg_ptr, angle);\n }\n /**\n * @param {number} angle\n */\n setMinSlopeSlideAngle(angle) {\n wasm.rawkinematiccharactercontroller_setMinSlopeSlideAngle(this.__wbg_ptr, angle);\n }\n /**\n * @param {number} value\n */\n setNormalNudgeFactor(value) {\n wasm.rawkinematiccharactercontroller_setNormalNudgeFactor(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n setOffset(value) {\n wasm.rawkinematiccharactercontroller_setOffset(this.__wbg_ptr, value);\n }\n /**\n * @param {boolean} enabled\n */\n setSlideEnabled(enabled) {\n wasm.rawkinematiccharactercontroller_setSlideEnabled(this.__wbg_ptr, enabled);\n }\n /**\n * @param {RawVector} vector\n */\n setUp(vector) {\n _assertClass(vector, RawVector);\n wasm.rawkinematiccharactercontroller_setUp(this.__wbg_ptr, vector.__wbg_ptr);\n }\n /**\n * @returns {boolean}\n */\n slideEnabled() {\n const ret = wasm.rawkinematiccharactercontroller_slideEnabled(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {number | undefined}\n */\n snapToGroundDistance() {\n const ret = wasm.rawkinematiccharactercontroller_snapToGroundDistance(this.__wbg_ptr);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @returns {boolean}\n */\n snapToGroundEnabled() {\n const ret = wasm.rawkinematiccharactercontroller_snapToGroundEnabled(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {RawVector}\n */\n up() {\n const ret = wasm.rawcollidershapecasthit_normal1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawKinematicCharacterController.prototype[Symbol.dispose] = RawKinematicCharacterController.prototype.free;\n\n/**\n * @enum {0 | 1}\n */\nexport const RawMotorModel = Object.freeze({\n AccelerationBased: 0, \"0\": \"AccelerationBased\",\n ForceBased: 1, \"1\": \"ForceBased\",\n});\n\nexport class RawMultibodyJointSet {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawMultibodyJointSet.prototype);\n obj.__wbg_ptr = ptr;\n RawMultibodyJointSetFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawMultibodyJointSetFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawmultibodyjointset_free(ptr, 0);\n }\n /**\n * @param {number} handle\n * @returns {boolean}\n */\n contains(handle) {\n const ret = wasm.rawmultibodyjointset_contains(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * @param {RawGenericJoint} params\n * @param {number} parent1\n * @param {number} parent2\n * @param {boolean} wakeUp\n * @returns {number}\n */\n createJoint(params, parent1, parent2, wakeUp) {\n _assertClass(params, RawGenericJoint);\n const ret = wasm.rawmultibodyjointset_createJoint(this.__wbg_ptr, params.__wbg_ptr, parent1, parent2, wakeUp);\n return ret;\n }\n /**\n * Applies the given JavaScript function to the integer handle of each joint attached to the given rigid-body.\n *\n * # Parameters\n * - `f(handle)`: the function to apply to the integer handle of each joint attached to the rigid-body. Called as `f(collider)`.\n * @param {number} body\n * @param {Function} f\n */\n forEachJointAttachedToRigidBody(body, f) {\n try {\n wasm.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, body, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * Applies the given JavaScript function to the integer handle of each joint managed by this physics world.\n *\n * # Parameters\n * - `f(handle)`: the function to apply to the integer handle of each joint managed by this set. Called as `f(collider)`.\n * @param {Function} f\n */\n forEachJointHandle(f) {\n try {\n wasm.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The position of the first anchor of this joint.\n *\n * The first anchor gives the position of the points application point on the\n * local frame of the first rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawVector}\n */\n jointAnchor1(handle) {\n const ret = wasm.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The position of the second anchor of this joint.\n *\n * The second anchor gives the position of the points application point on the\n * local frame of the second rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawVector}\n */\n jointAnchor2(handle) {\n const ret = wasm.rawmultibodyjointset_jointAnchor2(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * Are contacts between the rigid-bodies attached by this joint enabled?\n * @param {number} handle\n * @returns {boolean}\n */\n jointContactsEnabled(handle) {\n const ret = wasm.rawmultibodyjointset_jointContactsEnabled(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * The angular part of the joint’s local frame relative to the first rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawRotation}\n */\n jointFrameX1(handle) {\n const ret = wasm.rawmultibodyjointset_jointFrameX1(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\n }\n /**\n * The angular part of the joint’s local frame relative to the second rigid-body it is attached to.\n * @param {number} handle\n * @returns {RawRotation}\n */\n jointFrameX2(handle) {\n const ret = wasm.rawmultibodyjointset_jointFrameX2(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\n }\n /**\n * Are the limits for this joint enabled?\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @returns {boolean}\n */\n jointLimitsEnabled(handle, axis) {\n const ret = wasm.rawmultibodyjointset_jointLimitsEnabled(this.__wbg_ptr, handle, axis);\n return ret !== 0;\n }\n /**\n * If this is a prismatic joint, returns its upper limit.\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @returns {number}\n */\n jointLimitsMax(handle, axis) {\n const ret = wasm.rawmultibodyjointset_jointLimitsMax(this.__wbg_ptr, handle, axis);\n return ret;\n }\n /**\n * Return the lower limit along the given joint axis.\n * @param {number} handle\n * @param {RawJointAxis} axis\n * @returns {number}\n */\n jointLimitsMin(handle, axis) {\n const ret = wasm.rawmultibodyjointset_jointLimitsMin(this.__wbg_ptr, handle, axis);\n return ret;\n }\n /**\n * Sets whether contacts are enabled between the rigid-bodies attached by this joint.\n * @param {number} handle\n * @param {boolean} enabled\n */\n jointSetContactsEnabled(handle, enabled) {\n wasm.rawmultibodyjointset_jointSetContactsEnabled(this.__wbg_ptr, handle, enabled);\n }\n /**\n * The type of this joint.\n * @param {number} handle\n * @returns {RawJointType}\n */\n jointType(handle) {\n const ret = wasm.rawmultibodyjointset_jointType(this.__wbg_ptr, handle);\n return ret;\n }\n constructor() {\n const ret = wasm.rawmultibodyjointset_new();\n this.__wbg_ptr = ret >>> 0;\n RawMultibodyJointSetFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {number} handle\n * @param {boolean} wakeUp\n */\n remove(handle, wakeUp) {\n wasm.rawmultibodyjointset_remove(this.__wbg_ptr, handle, wakeUp);\n }\n}\nif (Symbol.dispose) RawMultibodyJointSet.prototype[Symbol.dispose] = RawMultibodyJointSet.prototype.free;\n\nexport class RawNarrowPhase {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawNarrowPhase.prototype);\n obj.__wbg_ptr = ptr;\n RawNarrowPhaseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawNarrowPhaseFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawnarrowphase_free(ptr, 0);\n }\n /**\n * @param {number} handle1\n * @param {number} handle2\n * @returns {RawContactPair | undefined}\n */\n contact_pair(handle1, handle2) {\n const ret = wasm.rawnarrowphase_contact_pair(this.__wbg_ptr, handle1, handle2);\n return ret === 0 ? undefined : RawContactPair.__wrap(ret);\n }\n /**\n * @param {number} handle1\n * @param {Function} f\n */\n contact_pairs_with(handle1, f) {\n wasm.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, handle1, addHeapObject(f));\n }\n /**\n * @param {number} handle1\n * @param {number} handle2\n * @returns {boolean}\n */\n intersection_pair(handle1, handle2) {\n const ret = wasm.rawnarrowphase_intersection_pair(this.__wbg_ptr, handle1, handle2);\n return ret !== 0;\n }\n /**\n * @param {number} handle1\n * @param {Function} f\n */\n intersection_pairs_with(handle1, f) {\n wasm.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, handle1, addHeapObject(f));\n }\n constructor() {\n const ret = wasm.rawnarrowphase_new();\n this.__wbg_ptr = ret >>> 0;\n RawNarrowPhaseFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n}\nif (Symbol.dispose) RawNarrowPhase.prototype[Symbol.dispose] = RawNarrowPhase.prototype.free;\n\nexport class RawPhysicsPipeline {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawPhysicsPipelineFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawphysicspipeline_free(ptr, 0);\n }\n /**\n * @returns {boolean}\n */\n is_profiler_enabled() {\n const ret = wasm.rawphysicspipeline_is_profiler_enabled(this.__wbg_ptr);\n return ret !== 0;\n }\n constructor() {\n const ret = wasm.rawphysicspipeline_new();\n this.__wbg_ptr = ret >>> 0;\n RawPhysicsPipelineFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {boolean} enabled\n */\n set_profiler_enabled(enabled) {\n wasm.rawphysicspipeline_set_profiler_enabled(this.__wbg_ptr, enabled);\n }\n /**\n * @param {RawVector} gravity\n * @param {RawIntegrationParameters} integrationParameters\n * @param {RawIslandManager} islands\n * @param {RawBroadPhase} broadPhase\n * @param {RawNarrowPhase} narrowPhase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawImpulseJointSet} joints\n * @param {RawMultibodyJointSet} articulations\n * @param {RawCCDSolver} ccd_solver\n */\n step(gravity, integrationParameters, islands, broadPhase, narrowPhase, bodies, colliders, joints, articulations, ccd_solver) {\n _assertClass(gravity, RawVector);\n _assertClass(integrationParameters, RawIntegrationParameters);\n _assertClass(islands, RawIslandManager);\n _assertClass(broadPhase, RawBroadPhase);\n _assertClass(narrowPhase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(joints, RawImpulseJointSet);\n _assertClass(articulations, RawMultibodyJointSet);\n _assertClass(ccd_solver, RawCCDSolver);\n wasm.rawphysicspipeline_step(this.__wbg_ptr, gravity.__wbg_ptr, integrationParameters.__wbg_ptr, islands.__wbg_ptr, broadPhase.__wbg_ptr, narrowPhase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, joints.__wbg_ptr, articulations.__wbg_ptr, ccd_solver.__wbg_ptr);\n }\n /**\n * @param {RawVector} gravity\n * @param {RawIntegrationParameters} integrationParameters\n * @param {RawIslandManager} islands\n * @param {RawBroadPhase} broadPhase\n * @param {RawNarrowPhase} narrowPhase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawImpulseJointSet} joints\n * @param {RawMultibodyJointSet} articulations\n * @param {RawCCDSolver} ccd_solver\n * @param {RawEventQueue} eventQueue\n * @param {object} hookObject\n * @param {Function} hookFilterContactPair\n * @param {Function} hookFilterIntersectionPair\n */\n stepWithEvents(gravity, integrationParameters, islands, broadPhase, narrowPhase, bodies, colliders, joints, articulations, ccd_solver, eventQueue, hookObject, hookFilterContactPair, hookFilterIntersectionPair) {\n _assertClass(gravity, RawVector);\n _assertClass(integrationParameters, RawIntegrationParameters);\n _assertClass(islands, RawIslandManager);\n _assertClass(broadPhase, RawBroadPhase);\n _assertClass(narrowPhase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(joints, RawImpulseJointSet);\n _assertClass(articulations, RawMultibodyJointSet);\n _assertClass(ccd_solver, RawCCDSolver);\n _assertClass(eventQueue, RawEventQueue);\n wasm.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, gravity.__wbg_ptr, integrationParameters.__wbg_ptr, islands.__wbg_ptr, broadPhase.__wbg_ptr, narrowPhase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, joints.__wbg_ptr, articulations.__wbg_ptr, ccd_solver.__wbg_ptr, eventQueue.__wbg_ptr, addHeapObject(hookObject), addHeapObject(hookFilterContactPair), addHeapObject(hookFilterIntersectionPair));\n }\n /**\n * @returns {number}\n */\n timing_broad_phase() {\n const ret = wasm.rawphysicspipeline_timing_broad_phase(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_ccd() {\n const ret = wasm.rawphysicspipeline_timing_ccd(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_ccd_broad_phase() {\n const ret = wasm.rawphysicspipeline_timing_ccd_broad_phase(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_ccd_narrow_phase() {\n const ret = wasm.rawphysicspipeline_timing_ccd_narrow_phase(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_ccd_solver() {\n const ret = wasm.rawphysicspipeline_timing_ccd_solver(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_ccd_toi_computation() {\n const ret = wasm.rawphysicspipeline_timing_ccd_toi_computation(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_collision_detection() {\n const ret = wasm.rawphysicspipeline_timing_collision_detection(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_island_construction() {\n const ret = wasm.rawphysicspipeline_timing_island_construction(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_narrow_phase() {\n const ret = wasm.rawphysicspipeline_timing_narrow_phase(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_solver() {\n const ret = wasm.rawphysicspipeline_timing_solver(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_step() {\n const ret = wasm.rawphysicspipeline_timing_step(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_user_changes() {\n const ret = wasm.rawphysicspipeline_timing_user_changes(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_velocity_assembly() {\n const ret = wasm.rawphysicspipeline_timing_velocity_assembly(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_velocity_resolution() {\n const ret = wasm.rawphysicspipeline_timing_velocity_resolution(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_velocity_update() {\n const ret = wasm.rawphysicspipeline_timing_velocity_update(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timing_velocity_writeback() {\n const ret = wasm.rawphysicspipeline_timing_velocity_writeback(this.__wbg_ptr);\n return ret;\n }\n}\nif (Symbol.dispose) RawPhysicsPipeline.prototype[Symbol.dispose] = RawPhysicsPipeline.prototype.free;\n\nexport class RawPidController {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawPidControllerFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawpidcontroller_free(ptr, 0);\n }\n /**\n * @param {number} dt\n * @param {RawRigidBodySet} bodies\n * @param {number} rb_handle\n * @param {RawRotation} target_rotation\n * @param {RawVector} target_angvel\n * @returns {RawVector}\n */\n angular_correction(dt, bodies, rb_handle, target_rotation, target_angvel) {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(target_rotation, RawRotation);\n _assertClass(target_angvel, RawVector);\n const ret = wasm.rawpidcontroller_angular_correction(this.__wbg_ptr, dt, bodies.__wbg_ptr, rb_handle, target_rotation.__wbg_ptr, target_angvel.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @param {number} dt\n * @param {RawRigidBodySet} bodies\n * @param {number} rb_handle\n * @param {RawRotation} target_rotation\n * @param {RawVector} target_angvel\n */\n apply_angular_correction(dt, bodies, rb_handle, target_rotation, target_angvel) {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(target_rotation, RawRotation);\n _assertClass(target_angvel, RawVector);\n wasm.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, dt, bodies.__wbg_ptr, rb_handle, target_rotation.__wbg_ptr, target_angvel.__wbg_ptr);\n }\n /**\n * @param {number} dt\n * @param {RawRigidBodySet} bodies\n * @param {number} rb_handle\n * @param {RawVector} target_translation\n * @param {RawVector} target_linvel\n */\n apply_linear_correction(dt, bodies, rb_handle, target_translation, target_linvel) {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(target_translation, RawVector);\n _assertClass(target_linvel, RawVector);\n wasm.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, dt, bodies.__wbg_ptr, rb_handle, target_translation.__wbg_ptr, target_linvel.__wbg_ptr);\n }\n /**\n * @param {number} dt\n * @param {RawRigidBodySet} bodies\n * @param {number} rb_handle\n * @param {RawVector} target_translation\n * @param {RawVector} target_linvel\n * @returns {RawVector}\n */\n linear_correction(dt, bodies, rb_handle, target_translation, target_linvel) {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(target_translation, RawVector);\n _assertClass(target_linvel, RawVector);\n const ret = wasm.rawpidcontroller_linear_correction(this.__wbg_ptr, dt, bodies.__wbg_ptr, rb_handle, target_translation.__wbg_ptr, target_linvel.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @param {number} kp\n * @param {number} ki\n * @param {number} kd\n * @param {number} axes_mask\n */\n constructor(kp, ki, kd, axes_mask) {\n const ret = wasm.rawpidcontroller_new(kp, ki, kd, axes_mask);\n this.__wbg_ptr = ret >>> 0;\n RawPidControllerFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n reset_integrals() {\n wasm.rawpidcontroller_reset_integrals(this.__wbg_ptr);\n }\n /**\n * @param {number} axes_mask\n */\n set_axes_mask(axes_mask) {\n wasm.rawpidcontroller_set_axes_mask(this.__wbg_ptr, axes_mask);\n }\n /**\n * @param {number} kd\n * @param {number} axes\n */\n set_kd(kd, axes) {\n wasm.rawpidcontroller_set_kd(this.__wbg_ptr, kd, axes);\n }\n /**\n * @param {number} ki\n * @param {number} axes\n */\n set_ki(ki, axes) {\n wasm.rawpidcontroller_set_ki(this.__wbg_ptr, ki, axes);\n }\n /**\n * @param {number} kp\n * @param {number} axes\n */\n set_kp(kp, axes) {\n wasm.rawpidcontroller_set_kp(this.__wbg_ptr, kp, axes);\n }\n}\nif (Symbol.dispose) RawPidController.prototype[Symbol.dispose] = RawPidController.prototype.free;\n\nexport class RawPointColliderProjection {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawPointColliderProjection.prototype);\n obj.__wbg_ptr = ptr;\n RawPointColliderProjectionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawPointColliderProjectionFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawpointcolliderprojection_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawpointcolliderprojection_colliderHandle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number | undefined}\n */\n featureId() {\n const ret = wasm.rawpointcolliderprojection_featureId(this.__wbg_ptr);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @returns {RawFeatureType}\n */\n featureType() {\n const ret = wasm.rawpointcolliderprojection_featureType(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {boolean}\n */\n isInside() {\n const ret = wasm.rawpointcolliderprojection_isInside(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {RawVector}\n */\n point() {\n const ret = wasm.rawpointcolliderprojection_point(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawPointColliderProjection.prototype[Symbol.dispose] = RawPointColliderProjection.prototype.free;\n\nexport class RawPointProjection {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawPointProjection.prototype);\n obj.__wbg_ptr = ptr;\n RawPointProjectionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawPointProjectionFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawpointprojection_free(ptr, 0);\n }\n /**\n * @returns {boolean}\n */\n isInside() {\n const ret = wasm.rawpointprojection_isInside(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {RawVector}\n */\n point() {\n const ret = wasm.rawpointprojection_point(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawPointProjection.prototype[Symbol.dispose] = RawPointProjection.prototype.free;\n\nexport class RawRayColliderHit {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRayColliderHit.prototype);\n obj.__wbg_ptr = ptr;\n RawRayColliderHitFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawRayColliderHitFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawraycolliderhit_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawcollidershapecasthit_colliderHandle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n timeOfImpact() {\n const ret = wasm.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr);\n return ret;\n }\n}\nif (Symbol.dispose) RawRayColliderHit.prototype[Symbol.dispose] = RawRayColliderHit.prototype.free;\n\nexport class RawRayColliderIntersection {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRayColliderIntersection.prototype);\n obj.__wbg_ptr = ptr;\n RawRayColliderIntersectionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawRayColliderIntersectionFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawraycolliderintersection_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawpointcolliderprojection_colliderHandle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number | undefined}\n */\n featureId() {\n const ret = wasm.rawpointcolliderprojection_featureId(this.__wbg_ptr);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @returns {RawFeatureType}\n */\n featureType() {\n const ret = wasm.rawpointcolliderprojection_featureType(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n normal() {\n const ret = wasm.rawcollidershapecasthit_witness1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n time_of_impact() {\n const ret = wasm.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr);\n return ret;\n }\n}\nif (Symbol.dispose) RawRayColliderIntersection.prototype[Symbol.dispose] = RawRayColliderIntersection.prototype.free;\n\nexport class RawRayIntersection {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRayIntersection.prototype);\n obj.__wbg_ptr = ptr;\n RawRayIntersectionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawRayIntersectionFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawrayintersection_free(ptr, 0);\n }\n /**\n * @returns {number | undefined}\n */\n featureId() {\n const ret = wasm.rawpointcolliderprojection_featureId(this.__wbg_ptr);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @returns {RawFeatureType}\n */\n featureType() {\n const ret = wasm.rawpointcolliderprojection_featureType(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n normal() {\n const ret = wasm.rawcollidershapecasthit_witness1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n time_of_impact() {\n const ret = wasm.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr);\n return ret;\n }\n}\nif (Symbol.dispose) RawRayIntersection.prototype[Symbol.dispose] = RawRayIntersection.prototype.free;\n\nexport class RawRigidBodySet {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRigidBodySet.prototype);\n obj.__wbg_ptr = ptr;\n RawRigidBodySetFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawRigidBodySetFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawrigidbodyset_free(ptr, 0);\n }\n /**\n * Checks if a rigid-body with the given integer handle exists.\n * @param {number} handle\n * @returns {boolean}\n */\n contains(handle) {\n const ret = wasm.rawrigidbodyset_contains(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * @param {boolean} enabled\n * @param {RawVector} translation\n * @param {RawRotation} rotation\n * @param {number} gravityScale\n * @param {number} mass\n * @param {boolean} massOnly\n * @param {RawVector} centerOfMass\n * @param {RawVector} linvel\n * @param {RawVector} angvel\n * @param {RawVector} principalAngularInertia\n * @param {RawRotation} angularInertiaFrame\n * @param {boolean} translationEnabledX\n * @param {boolean} translationEnabledY\n * @param {boolean} translationEnabledZ\n * @param {boolean} rotationEnabledX\n * @param {boolean} rotationEnabledY\n * @param {boolean} rotationEnabledZ\n * @param {number} linearDamping\n * @param {number} angularDamping\n * @param {RawRigidBodyType} rb_type\n * @param {boolean} canSleep\n * @param {boolean} sleeping\n * @param {number} softCcdPrediction\n * @param {boolean} ccdEnabled\n * @param {number} dominanceGroup\n * @param {number} additional_solver_iterations\n * @returns {number}\n */\n createRigidBody(enabled, translation, rotation, gravityScale, mass, massOnly, centerOfMass, linvel, angvel, principalAngularInertia, angularInertiaFrame, translationEnabledX, translationEnabledY, translationEnabledZ, rotationEnabledX, rotationEnabledY, rotationEnabledZ, linearDamping, angularDamping, rb_type, canSleep, sleeping, softCcdPrediction, ccdEnabled, dominanceGroup, additional_solver_iterations) {\n _assertClass(translation, RawVector);\n _assertClass(rotation, RawRotation);\n _assertClass(centerOfMass, RawVector);\n _assertClass(linvel, RawVector);\n _assertClass(angvel, RawVector);\n _assertClass(principalAngularInertia, RawVector);\n _assertClass(angularInertiaFrame, RawRotation);\n const ret = wasm.rawrigidbodyset_createRigidBody(this.__wbg_ptr, enabled, translation.__wbg_ptr, rotation.__wbg_ptr, gravityScale, mass, massOnly, centerOfMass.__wbg_ptr, linvel.__wbg_ptr, angvel.__wbg_ptr, principalAngularInertia.__wbg_ptr, angularInertiaFrame.__wbg_ptr, translationEnabledX, translationEnabledY, translationEnabledZ, rotationEnabledX, rotationEnabledY, rotationEnabledZ, linearDamping, angularDamping, rb_type, canSleep, sleeping, softCcdPrediction, ccdEnabled, dominanceGroup, additional_solver_iterations);\n return ret;\n }\n /**\n * Applies the given JavaScript function to the integer handle of each rigid-body managed by this set.\n *\n * # Parameters\n * - `f(handle)`: the function to apply to the integer handle of each rigid-body managed by this set. Called as `f(collider)`.\n * @param {Function} f\n */\n forEachRigidBodyHandle(f) {\n try {\n wasm.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, addBorrowedObject(f));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The number of rigid-bodies on this set.\n * @returns {number}\n */\n len() {\n const ret = wasm.rawrigidbodyset_len(this.__wbg_ptr);\n return ret >>> 0;\n }\n constructor() {\n const ret = wasm.rawrigidbodyset_new();\n this.__wbg_ptr = ret >>> 0;\n RawRigidBodySetFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {RawColliderSet} colliders\n */\n propagateModifiedBodyPositionsToColliders(colliders) {\n _assertClass(colliders, RawColliderSet);\n wasm.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, colliders.__wbg_ptr);\n }\n /**\n * Adds a force at the center-of-mass of this rigid-body.\n *\n * # Parameters\n * - `force`: the world-space force to apply on the rigid-body.\n * - `wakeUp`: should the rigid-body be automatically woken-up?\n * @param {number} handle\n * @param {RawVector} force\n * @param {boolean} wakeUp\n */\n rbAddForce(handle, force, wakeUp) {\n _assertClass(force, RawVector);\n wasm.rawrigidbodyset_rbAddForce(this.__wbg_ptr, handle, force.__wbg_ptr, wakeUp);\n }\n /**\n * Adds a force at the given world-space point of this rigid-body.\n *\n * # Parameters\n * - `force`: the world-space force to apply on the rigid-body.\n * - `point`: the world-space point where the impulse is to be applied on the rigid-body.\n * - `wakeUp`: should the rigid-body be automatically woken-up?\n * @param {number} handle\n * @param {RawVector} force\n * @param {RawVector} point\n * @param {boolean} wakeUp\n */\n rbAddForceAtPoint(handle, force, point, wakeUp) {\n _assertClass(force, RawVector);\n _assertClass(point, RawVector);\n wasm.rawrigidbodyset_rbAddForceAtPoint(this.__wbg_ptr, handle, force.__wbg_ptr, point.__wbg_ptr, wakeUp);\n }\n /**\n * Adds a torque at the center-of-mass of this rigid-body.\n *\n * # Parameters\n * - `torque`: the world-space torque to apply on the rigid-body.\n * - `wakeUp`: should the rigid-body be automatically woken-up?\n * @param {number} handle\n * @param {RawVector} torque\n * @param {boolean} wakeUp\n */\n rbAddTorque(handle, torque, wakeUp) {\n _assertClass(torque, RawVector);\n wasm.rawrigidbodyset_rbAddTorque(this.__wbg_ptr, handle, torque.__wbg_ptr, wakeUp);\n }\n /**\n * @param {number} handle\n * @returns {number}\n */\n rbAdditionalSolverIterations(handle) {\n const ret = wasm.rawrigidbodyset_rbAdditionalSolverIterations(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * The angular damping coefficient of this rigid-body.\n * @param {number} handle\n * @returns {number}\n */\n rbAngularDamping(handle) {\n const ret = wasm.rawrigidbodyset_rbAngularDamping(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The angular velocity of this rigid-body, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbAngvel(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbAngvel(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * Applies an impulse at the center-of-mass of this rigid-body.\n *\n * # Parameters\n * - `impulse`: the world-space impulse to apply on the rigid-body.\n * - `wakeUp`: should the rigid-body be automatically woken-up?\n * @param {number} handle\n * @param {RawVector} impulse\n * @param {boolean} wakeUp\n */\n rbApplyImpulse(handle, impulse, wakeUp) {\n _assertClass(impulse, RawVector);\n wasm.rawrigidbodyset_rbApplyImpulse(this.__wbg_ptr, handle, impulse.__wbg_ptr, wakeUp);\n }\n /**\n * Applies an impulse at the given world-space point of this rigid-body.\n *\n * # Parameters\n * - `impulse`: the world-space impulse to apply on the rigid-body.\n * - `point`: the world-space point where the impulse is to be applied on the rigid-body.\n * - `wakeUp`: should the rigid-body be automatically woken-up?\n * @param {number} handle\n * @param {RawVector} impulse\n * @param {RawVector} point\n * @param {boolean} wakeUp\n */\n rbApplyImpulseAtPoint(handle, impulse, point, wakeUp) {\n _assertClass(impulse, RawVector);\n _assertClass(point, RawVector);\n wasm.rawrigidbodyset_rbApplyImpulseAtPoint(this.__wbg_ptr, handle, impulse.__wbg_ptr, point.__wbg_ptr, wakeUp);\n }\n /**\n * Applies an impulsive torque at the center-of-mass of this rigid-body.\n *\n * # Parameters\n * - `torque impulse`: the world-space torque impulse to apply on the rigid-body.\n * - `wakeUp`: should the rigid-body be automatically woken-up?\n * @param {number} handle\n * @param {RawVector} torque_impulse\n * @param {boolean} wakeUp\n */\n rbApplyTorqueImpulse(handle, torque_impulse, wakeUp) {\n _assertClass(torque_impulse, RawVector);\n wasm.rawrigidbodyset_rbApplyTorqueImpulse(this.__wbg_ptr, handle, torque_impulse.__wbg_ptr, wakeUp);\n }\n /**\n * The status of this rigid-body: fixed, dynamic, or kinematic.\n * @param {number} handle\n * @returns {RawRigidBodyType}\n */\n rbBodyType(handle) {\n const ret = wasm.rawrigidbodyset_rbBodyType(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * Retrieves the `i-th` collider attached to this rigid-body.\n *\n * # Parameters\n * - `at`: The index of the collider to retrieve. Must be a number in `[0, this.numColliders()[`.\n * This index is **not** the same as the unique identifier of the collider.\n * @param {number} handle\n * @param {number} at\n * @returns {number}\n */\n rbCollider(handle, at) {\n const ret = wasm.rawrigidbodyset_rbCollider(this.__wbg_ptr, handle, at);\n return ret;\n }\n /**\n * @param {number} handle\n * @returns {number}\n */\n rbDominanceGroup(handle) {\n const ret = wasm.rawrigidbodyset_rbDominanceGroup(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The effective world-space angular inertia (that takes the potential rotation locking into account) of\n * this rigid-body.\n * @param {number} handle\n * @returns {RawSdpMatrix3}\n */\n rbEffectiveAngularInertia(handle) {\n const ret = wasm.rawrigidbodyset_rbEffectiveAngularInertia(this.__wbg_ptr, handle);\n return RawSdpMatrix3.__wrap(ret);\n }\n /**\n * The inverse mass taking into account translation locking.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbEffectiveInvMass(handle) {\n const ret = wasm.rawrigidbodyset_rbEffectiveInvMass(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The world-space inverse angular inertia tensor of the rigid-body,\n * taking into account rotation locking.\n * @param {number} handle\n * @returns {RawSdpMatrix3}\n */\n rbEffectiveWorldInvInertia(handle) {\n const ret = wasm.rawrigidbodyset_rbEffectiveWorldInvInertia(this.__wbg_ptr, handle);\n return RawSdpMatrix3.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @param {boolean} enabled\n */\n rbEnableCcd(handle, enabled) {\n wasm.rawrigidbodyset_rbEnableCcd(this.__wbg_ptr, handle, enabled);\n }\n /**\n * @param {number} handle\n * @returns {number}\n */\n rbGravityScale(handle) {\n const ret = wasm.rawrigidbodyset_rbGravityScale(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The inverse of the mass of a rigid-body.\n *\n * If this is zero, the rigid-body is assumed to have infinite mass.\n * @param {number} handle\n * @returns {number}\n */\n rbInvMass(handle) {\n const ret = wasm.rawrigidbodyset_rbInvMass(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The inverse of the principal angular inertia of the rigid-body.\n *\n * Components set to zero are assumed to be infinite along the corresponding principal axis.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbInvPrincipalInertia(handle) {\n const ret = wasm.rawrigidbodyset_rbInvPrincipalInertia(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * Is Continuous Collision Detection enabled for this rigid-body?\n * @param {number} handle\n * @returns {boolean}\n */\n rbIsCcdEnabled(handle) {\n const ret = wasm.rawrigidbodyset_rbIsCcdEnabled(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * Is this rigid-body dynamic?\n * @param {number} handle\n * @returns {boolean}\n */\n rbIsDynamic(handle) {\n const ret = wasm.rawrigidbodyset_rbIsDynamic(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * @param {number} handle\n * @returns {boolean}\n */\n rbIsEnabled(handle) {\n const ret = wasm.rawrigidbodyset_rbIsEnabled(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * Is this rigid-body fixed?\n * @param {number} handle\n * @returns {boolean}\n */\n rbIsFixed(handle) {\n const ret = wasm.rawrigidbodyset_rbIsFixed(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * Is this rigid-body kinematic?\n * @param {number} handle\n * @returns {boolean}\n */\n rbIsKinematic(handle) {\n const ret = wasm.rawrigidbodyset_rbIsKinematic(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * Is the velocity of this rigid-body not zero?\n * @param {number} handle\n * @returns {boolean}\n */\n rbIsMoving(handle) {\n const ret = wasm.rawrigidbodyset_rbIsMoving(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * Is this rigid-body sleeping?\n * @param {number} handle\n * @returns {boolean}\n */\n rbIsSleeping(handle) {\n const ret = wasm.rawrigidbodyset_rbIsSleeping(this.__wbg_ptr, handle);\n return ret !== 0;\n }\n /**\n * The linear damping coefficient of this rigid-body.\n * @param {number} handle\n * @returns {number}\n */\n rbLinearDamping(handle) {\n const ret = wasm.rawrigidbodyset_rbLinearDamping(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The linear velocity of this rigid-body, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbLinvel(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbLinvel(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The center of mass of a rigid-body expressed in its local-space, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbLocalCom(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbLocalCom(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {number} handle\n * @param {boolean} locked\n * @param {boolean} wake_up\n */\n rbLockRotations(handle, locked, wake_up) {\n wasm.rawrigidbodyset_rbLockRotations(this.__wbg_ptr, handle, locked, wake_up);\n }\n /**\n * @param {number} handle\n * @param {boolean} locked\n * @param {boolean} wake_up\n */\n rbLockTranslations(handle, locked, wake_up) {\n wasm.rawrigidbodyset_rbLockTranslations(this.__wbg_ptr, handle, locked, wake_up);\n }\n /**\n * The mass of this rigid-body.\n * @param {number} handle\n * @returns {number}\n */\n rbMass(handle) {\n const ret = wasm.rawrigidbodyset_rbMass(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The world-space next orientation of this rigid-body, written to a buffer.\n *\n * If this rigid-body is kinematic this value is set by the `setNextKinematicRotation`\n * method and is used for estimating the kinematic body velocity at the next timestep.\n * For non-kinematic bodies, this value is currently unspecified.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbNextRotation(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The world-space next translation of this rigid-body, written to a buffer.\n *\n * If this rigid-body is kinematic this value is set by the `setNextKinematicTranslation`\n * method and is used for estimating the kinematic body velocity at the next timestep.\n * For non-kinematic bodies, this value is currently unspecified.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbNextTranslation(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbNextTranslation(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * The number of colliders attached to this rigid-body.\n * @param {number} handle\n * @returns {number}\n */\n rbNumColliders(handle) {\n const ret = wasm.rawrigidbodyset_rbNumColliders(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * The angular inertia along the principal inertia axes of the rigid-body.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbPrincipalInertia(handle) {\n const ret = wasm.rawrigidbodyset_rbPrincipalInertia(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The principal vectors of the local angular inertia tensor of the rigid-body.\n * @param {number} handle\n * @returns {RawRotation}\n */\n rbPrincipalInertiaLocalFrame(handle) {\n const ret = wasm.rawrigidbodyset_rbPrincipalInertiaLocalFrame(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @param {RawColliderSet} colliders\n */\n rbRecomputeMassPropertiesFromColliders(handle, colliders) {\n _assertClass(colliders, RawColliderSet);\n wasm.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr, handle, colliders.__wbg_ptr);\n }\n /**\n * Resets to zero all user-added forces added to this rigid-body.\n * @param {number} handle\n * @param {boolean} wakeUp\n */\n rbResetForces(handle, wakeUp) {\n wasm.rawrigidbodyset_rbResetForces(this.__wbg_ptr, handle, wakeUp);\n }\n /**\n * Resets to zero all user-added torques added to this rigid-body.\n * @param {number} handle\n * @param {boolean} wakeUp\n */\n rbResetTorques(handle, wakeUp) {\n wasm.rawrigidbodyset_rbResetTorques(this.__wbg_ptr, handle, wakeUp);\n }\n /**\n * The world-space orientation of this rigid-body, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbRotation(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbRotation(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {number} handle\n * @param {number} mass\n * @param {boolean} wake_up\n */\n rbSetAdditionalMass(handle, mass, wake_up) {\n wasm.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr, handle, mass, wake_up);\n }\n /**\n * @param {number} handle\n * @param {number} mass\n * @param {RawVector} centerOfMass\n * @param {RawVector} principalAngularInertia\n * @param {RawRotation} angularInertiaFrame\n * @param {boolean} wake_up\n */\n rbSetAdditionalMassProperties(handle, mass, centerOfMass, principalAngularInertia, angularInertiaFrame, wake_up) {\n _assertClass(centerOfMass, RawVector);\n _assertClass(principalAngularInertia, RawVector);\n _assertClass(angularInertiaFrame, RawRotation);\n wasm.rawrigidbodyset_rbSetAdditionalMassProperties(this.__wbg_ptr, handle, mass, centerOfMass.__wbg_ptr, principalAngularInertia.__wbg_ptr, angularInertiaFrame.__wbg_ptr, wake_up);\n }\n /**\n * @param {number} handle\n * @param {number} iters\n */\n rbSetAdditionalSolverIterations(handle, iters) {\n wasm.rawrigidbodyset_rbSetAdditionalSolverIterations(this.__wbg_ptr, handle, iters);\n }\n /**\n * @param {number} handle\n * @param {number} factor\n */\n rbSetAngularDamping(handle, factor) {\n wasm.rawrigidbodyset_rbSetAngularDamping(this.__wbg_ptr, handle, factor);\n }\n /**\n * Sets the angular velocity of this rigid-body.\n * @param {number} handle\n * @param {RawVector} angvel\n * @param {boolean} wakeUp\n */\n rbSetAngvel(handle, angvel, wakeUp) {\n _assertClass(angvel, RawVector);\n wasm.rawrigidbodyset_rbSetAngvel(this.__wbg_ptr, handle, angvel.__wbg_ptr, wakeUp);\n }\n /**\n * Set a new status for this rigid-body: fixed, dynamic, or kinematic.\n * @param {number} handle\n * @param {RawRigidBodyType} status\n * @param {boolean} wake_up\n */\n rbSetBodyType(handle, status, wake_up) {\n wasm.rawrigidbodyset_rbSetBodyType(this.__wbg_ptr, handle, status, wake_up);\n }\n /**\n * @param {number} handle\n * @param {number} group\n */\n rbSetDominanceGroup(handle, group) {\n wasm.rawrigidbodyset_rbSetDominanceGroup(this.__wbg_ptr, handle, group);\n }\n /**\n * @param {number} handle\n * @param {boolean} enabled\n */\n rbSetEnabled(handle, enabled) {\n wasm.rawrigidbodyset_rbSetEnabled(this.__wbg_ptr, handle, enabled);\n }\n /**\n * @param {number} handle\n * @param {boolean} allow_x\n * @param {boolean} allow_y\n * @param {boolean} allow_z\n * @param {boolean} wake_up\n */\n rbSetEnabledRotations(handle, allow_x, allow_y, allow_z, wake_up) {\n wasm.rawrigidbodyset_rbSetEnabledRotations(this.__wbg_ptr, handle, allow_x, allow_y, allow_z, wake_up);\n }\n /**\n * @param {number} handle\n * @param {boolean} allow_x\n * @param {boolean} allow_y\n * @param {boolean} allow_z\n * @param {boolean} wake_up\n */\n rbSetEnabledTranslations(handle, allow_x, allow_y, allow_z, wake_up) {\n wasm.rawrigidbodyset_rbSetEnabledTranslations(this.__wbg_ptr, handle, allow_x, allow_y, allow_z, wake_up);\n }\n /**\n * @param {number} handle\n * @param {number} factor\n * @param {boolean} wakeUp\n */\n rbSetGravityScale(handle, factor, wakeUp) {\n wasm.rawrigidbodyset_rbSetGravityScale(this.__wbg_ptr, handle, factor, wakeUp);\n }\n /**\n * @param {number} handle\n * @param {number} factor\n */\n rbSetLinearDamping(handle, factor) {\n wasm.rawrigidbodyset_rbSetLinearDamping(this.__wbg_ptr, handle, factor);\n }\n /**\n * Sets the linear velocity of this rigid-body.\n * @param {number} handle\n * @param {RawVector} linvel\n * @param {boolean} wakeUp\n */\n rbSetLinvel(handle, linvel, wakeUp) {\n _assertClass(linvel, RawVector);\n wasm.rawrigidbodyset_rbSetLinvel(this.__wbg_ptr, handle, linvel.__wbg_ptr, wakeUp);\n }\n /**\n * If this rigid body is kinematic, sets its future rotation after the next timestep integration.\n *\n * This should be used instead of `rigidBody.setRotation` to make the dynamic object\n * interacting with this kinematic body behave as expected. Internally, Rapier will compute\n * an artificial velocity for this rigid-body from its current position and its next kinematic\n * position. This velocity will be used to compute forces on dynamic bodies interacting with\n * this body.\n *\n * # Parameters\n * - `x`: the first vector component of the quaternion.\n * - `y`: the second vector component of the quaternion.\n * - `z`: the third vector component of the quaternion.\n * - `w`: the scalar component of the quaternion.\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n * @param {number} w\n */\n rbSetNextKinematicRotation(handle, x, y, z, w) {\n wasm.rawrigidbodyset_rbSetNextKinematicRotation(this.__wbg_ptr, handle, x, y, z, w);\n }\n /**\n * If this rigid body is kinematic, sets its future translation after the next timestep integration.\n *\n * This should be used instead of `rigidBody.setTranslation` to make the dynamic object\n * interacting with this kinematic body behave as expected. Internally, Rapier will compute\n * an artificial velocity for this rigid-body from its current position and its next kinematic\n * position. This velocity will be used to compute forces on dynamic bodies interacting with\n * this body.\n *\n * # Parameters\n * - `x`: the world-space position of the rigid-body along the `x` axis.\n * - `y`: the world-space position of the rigid-body along the `y` axis.\n * - `z`: the world-space position of the rigid-body along the `z` axis.\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n */\n rbSetNextKinematicTranslation(handle, x, y, z) {\n wasm.rawrigidbodyset_rbSetNextKinematicTranslation(this.__wbg_ptr, handle, x, y, z);\n }\n /**\n * Sets the rotation quaternion of this rigid-body.\n *\n * This does nothing if a zero quaternion is provided.\n *\n * # Parameters\n * - `x`: the first vector component of the quaternion.\n * - `y`: the second vector component of the quaternion.\n * - `z`: the third vector component of the quaternion.\n * - `w`: the scalar component of the quaternion.\n * - `wakeUp`: forces the rigid-body to wake-up so it is properly affected by forces if it\n * wasn't moving before modifying its position.\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n * @param {number} w\n * @param {boolean} wakeUp\n */\n rbSetRotation(handle, x, y, z, w, wakeUp) {\n wasm.rawrigidbodyset_rbSetRotation(this.__wbg_ptr, handle, x, y, z, w, wakeUp);\n }\n /**\n * @param {number} handle\n * @param {number} prediction\n */\n rbSetSoftCcdPrediction(handle, prediction) {\n wasm.rawrigidbodyset_rbSetSoftCcdPrediction(this.__wbg_ptr, handle, prediction);\n }\n /**\n * Sets the translation of this rigid-body.\n *\n * # Parameters\n * - `x`: the world-space position of the rigid-body along the `x` axis.\n * - `y`: the world-space position of the rigid-body along the `y` axis.\n * - `z`: the world-space position of the rigid-body along the `z` axis.\n * - `wakeUp`: forces the rigid-body to wake-up so it is properly affected by forces if it\n * wasn't moving before modifying its position.\n * @param {number} handle\n * @param {number} x\n * @param {number} y\n * @param {number} z\n * @param {boolean} wakeUp\n */\n rbSetTranslation(handle, x, y, z, wakeUp) {\n wasm.rawrigidbodyset_rbSetTranslation(this.__wbg_ptr, handle, x, y, z, wakeUp);\n }\n /**\n * Sets the user-defined 32-bit integer of this rigid-body.\n *\n * # Parameters\n * - `data`: an arbitrary user-defined 32-bit integer.\n * @param {number} handle\n * @param {number} data\n */\n rbSetUserData(handle, data) {\n wasm.rawrigidbodyset_rbSetUserData(this.__wbg_ptr, handle, data);\n }\n /**\n * Put the given rigid-body to sleep.\n * @param {number} handle\n */\n rbSleep(handle) {\n wasm.rawrigidbodyset_rbSleep(this.__wbg_ptr, handle);\n }\n /**\n * @param {number} handle\n * @returns {number}\n */\n rbSoftCcdPrediction(handle) {\n const ret = wasm.rawrigidbodyset_rbSoftCcdPrediction(this.__wbg_ptr, handle);\n return ret;\n }\n /**\n * The world-space translation of this rigid-body, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbTranslation(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbTranslation(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * An arbitrary user-defined 32-bit integer\n * @param {number} handle\n * @returns {number}\n */\n rbUserData(handle) {\n const ret = wasm.rawrigidbodyset_rbUserData(this.__wbg_ptr, handle);\n return ret >>> 0;\n }\n /**\n * Retrieves the constant force(s) the user added to this rigid-body.\n * Returns zero if the rigid-body is not dynamic.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbUserForce(handle) {\n const ret = wasm.rawrigidbodyset_rbUserForce(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * Retrieves the constant torque(s) the user added to this rigid-body.\n * Returns zero if the rigid-body is not dynamic.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbUserTorque(handle) {\n const ret = wasm.rawrigidbodyset_rbUserTorque(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The velocity of the given world-space point on this rigid-body.\n * @param {number} handle\n * @param {RawVector} point\n * @returns {RawVector}\n */\n rbVelocityAtPoint(handle, point) {\n _assertClass(point, RawVector);\n const ret = wasm.rawrigidbodyset_rbVelocityAtPoint(this.__wbg_ptr, handle, point.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * Wakes this rigid-body up.\n *\n * A dynamic rigid-body that does not move during several consecutive frames will\n * be put to sleep by the physics engine, i.e., it will stop being simulated in order\n * to avoid useless computations.\n * This method forces a sleeping rigid-body to wake-up. This is useful, e.g., before modifying\n * the position of a dynamic body so that it is properly simulated afterwards.\n * @param {number} handle\n */\n rbWakeUp(handle) {\n wasm.rawrigidbodyset_rbWakeUp(this.__wbg_ptr, handle);\n }\n /**\n * The world-space center of mass of the rigid-body, written to a buffer.\n * @param {number} handle\n * @param {Float32Array} buffer\n */\n rbWorldCom(handle, buffer) {\n try {\n wasm.rawrigidbodyset_rbWorldCom(this.__wbg_ptr, handle, addBorrowedObject(buffer));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @param {number} handle\n * @param {RawIslandManager} islands\n * @param {RawColliderSet} colliders\n * @param {RawImpulseJointSet} joints\n * @param {RawMultibodyJointSet} articulations\n */\n remove(handle, islands, colliders, joints, articulations) {\n _assertClass(islands, RawIslandManager);\n _assertClass(colliders, RawColliderSet);\n _assertClass(joints, RawImpulseJointSet);\n _assertClass(articulations, RawMultibodyJointSet);\n wasm.rawrigidbodyset_remove(this.__wbg_ptr, handle, islands.__wbg_ptr, colliders.__wbg_ptr, joints.__wbg_ptr, articulations.__wbg_ptr);\n }\n}\nif (Symbol.dispose) RawRigidBodySet.prototype[Symbol.dispose] = RawRigidBodySet.prototype.free;\n\n/**\n * @enum {0 | 1 | 2 | 3}\n */\nexport const RawRigidBodyType = Object.freeze({\n Dynamic: 0, \"0\": \"Dynamic\",\n Fixed: 1, \"1\": \"Fixed\",\n KinematicPositionBased: 2, \"2\": \"KinematicPositionBased\",\n KinematicVelocityBased: 3, \"3\": \"KinematicVelocityBased\",\n});\n\n/**\n * A rotation quaternion.\n */\nexport class RawRotation {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRotation.prototype);\n obj.__wbg_ptr = ptr;\n RawRotationFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawRotationFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawrotation_free(ptr, 0);\n }\n /**\n * The identity quaternion.\n * @returns {RawRotation}\n */\n static identity() {\n const ret = wasm.rawrotation_identity();\n return RawRotation.__wrap(ret);\n }\n /**\n * @param {number} x\n * @param {number} y\n * @param {number} z\n * @param {number} w\n */\n constructor(x, y, z, w) {\n const ret = wasm.rawrotation_new(x, y, z, w);\n this.__wbg_ptr = ret >>> 0;\n RawRotationFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * The `w` component of this quaternion.\n * @returns {number}\n */\n get w() {\n const ret = wasm.rawrotation_w(this.__wbg_ptr);\n return ret;\n }\n /**\n * The `x` component of this quaternion.\n * @returns {number}\n */\n get x() {\n const ret = wasm.rawrotation_x(this.__wbg_ptr);\n return ret;\n }\n /**\n * The `y` component of this quaternion.\n * @returns {number}\n */\n get y() {\n const ret = wasm.rawrotation_y(this.__wbg_ptr);\n return ret;\n }\n /**\n * The `z` component of this quaternion.\n * @returns {number}\n */\n get z() {\n const ret = wasm.rawrotation_z(this.__wbg_ptr);\n return ret;\n }\n}\nif (Symbol.dispose) RawRotation.prototype[Symbol.dispose] = RawRotation.prototype.free;\n\nexport class RawSdpMatrix3 {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawSdpMatrix3.prototype);\n obj.__wbg_ptr = ptr;\n RawSdpMatrix3Finalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawSdpMatrix3Finalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawsdpmatrix3_free(ptr, 0);\n }\n /**\n * Row major list of the upper-triangular part of the symmetric matrix.\n * @returns {Float32Array}\n */\n elements() {\n const ret = wasm.rawsdpmatrix3_elements(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\nif (Symbol.dispose) RawSdpMatrix3.prototype[Symbol.dispose] = RawSdpMatrix3.prototype.free;\n\nexport class RawSerializationPipeline {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawSerializationPipelineFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawserializationpipeline_free(ptr, 0);\n }\n /**\n * @param {Uint8Array} data\n * @returns {RawDeserializedWorld | undefined}\n */\n deserializeAll(data) {\n const ret = wasm.rawserializationpipeline_deserializeAll(this.__wbg_ptr, addHeapObject(data));\n return ret === 0 ? undefined : RawDeserializedWorld.__wrap(ret);\n }\n constructor() {\n const ret = wasm.rawccdsolver_new();\n this.__wbg_ptr = ret >>> 0;\n RawSerializationPipelineFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {RawVector} gravity\n * @param {RawIntegrationParameters} integrationParameters\n * @param {RawIslandManager} islands\n * @param {RawBroadPhase} broadPhase\n * @param {RawNarrowPhase} narrowPhase\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawImpulseJointSet} impulse_joints\n * @param {RawMultibodyJointSet} multibody_joints\n * @returns {Uint8Array | undefined}\n */\n serializeAll(gravity, integrationParameters, islands, broadPhase, narrowPhase, bodies, colliders, impulse_joints, multibody_joints) {\n _assertClass(gravity, RawVector);\n _assertClass(integrationParameters, RawIntegrationParameters);\n _assertClass(islands, RawIslandManager);\n _assertClass(broadPhase, RawBroadPhase);\n _assertClass(narrowPhase, RawNarrowPhase);\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(impulse_joints, RawImpulseJointSet);\n _assertClass(multibody_joints, RawMultibodyJointSet);\n const ret = wasm.rawserializationpipeline_serializeAll(this.__wbg_ptr, gravity.__wbg_ptr, integrationParameters.__wbg_ptr, islands.__wbg_ptr, broadPhase.__wbg_ptr, narrowPhase.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, impulse_joints.__wbg_ptr, multibody_joints.__wbg_ptr);\n return takeObject(ret);\n }\n}\nif (Symbol.dispose) RawSerializationPipeline.prototype[Symbol.dispose] = RawSerializationPipeline.prototype.free;\n\nexport class RawShape {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawShape.prototype);\n obj.__wbg_ptr = ptr;\n RawShapeFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawShapeFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawshape_free(ptr, 0);\n }\n /**\n * @param {number} radius\n * @returns {RawShape}\n */\n static ball(radius) {\n const ret = wasm.rawshape_ball(radius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {number} halfHeight\n * @param {number} radius\n * @returns {RawShape}\n */\n static capsule(halfHeight, radius) {\n const ret = wasm.rawshape_capsule(halfHeight, radius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @param {boolean} solid\n * @returns {number}\n */\n castRay(shapePos, shapeRot, rayOrig, rayDir, maxToi, solid) {\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawshape_castRay(this.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid);\n return ret;\n }\n /**\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @param {boolean} solid\n * @returns {RawRayIntersection | undefined}\n */\n castRayAndGetNormal(shapePos, shapeRot, rayOrig, rayDir, maxToi, solid) {\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawshape_castRayAndGetNormal(this.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid);\n return ret === 0 ? undefined : RawRayIntersection.__wrap(ret);\n }\n /**\n * @param {RawVector} shapePos1\n * @param {RawRotation} shapeRot1\n * @param {RawVector} shapeVel1\n * @param {RawShape} shape2\n * @param {RawVector} shapePos2\n * @param {RawRotation} shapeRot2\n * @param {RawVector} shapeVel2\n * @param {number} target_distance\n * @param {number} maxToi\n * @param {boolean} stop_at_penetration\n * @returns {RawShapeCastHit | undefined}\n */\n castShape(shapePos1, shapeRot1, shapeVel1, shape2, shapePos2, shapeRot2, shapeVel2, target_distance, maxToi, stop_at_penetration) {\n _assertClass(shapePos1, RawVector);\n _assertClass(shapeRot1, RawRotation);\n _assertClass(shapeVel1, RawVector);\n _assertClass(shape2, RawShape);\n _assertClass(shapePos2, RawVector);\n _assertClass(shapeRot2, RawRotation);\n _assertClass(shapeVel2, RawVector);\n const ret = wasm.rawshape_castShape(this.__wbg_ptr, shapePos1.__wbg_ptr, shapeRot1.__wbg_ptr, shapeVel1.__wbg_ptr, shape2.__wbg_ptr, shapePos2.__wbg_ptr, shapeRot2.__wbg_ptr, shapeVel2.__wbg_ptr, target_distance, maxToi, stop_at_penetration);\n return ret === 0 ? undefined : RawShapeCastHit.__wrap(ret);\n }\n /**\n * @param {number} halfHeight\n * @param {number} radius\n * @returns {RawShape}\n */\n static cone(halfHeight, radius) {\n const ret = wasm.rawshape_cone(halfHeight, radius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} shapePos1\n * @param {RawRotation} shapeRot1\n * @param {RawShape} shape2\n * @param {RawVector} shapePos2\n * @param {RawRotation} shapeRot2\n * @param {number} prediction\n * @returns {RawShapeContact | undefined}\n */\n contactShape(shapePos1, shapeRot1, shape2, shapePos2, shapeRot2, prediction) {\n _assertClass(shapePos1, RawVector);\n _assertClass(shapeRot1, RawRotation);\n _assertClass(shape2, RawShape);\n _assertClass(shapePos2, RawVector);\n _assertClass(shapeRot2, RawRotation);\n const ret = wasm.rawshape_contactShape(this.__wbg_ptr, shapePos1.__wbg_ptr, shapeRot1.__wbg_ptr, shape2.__wbg_ptr, shapePos2.__wbg_ptr, shapeRot2.__wbg_ptr, prediction);\n return ret === 0 ? undefined : RawShapeContact.__wrap(ret);\n }\n /**\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawVector} point\n * @returns {boolean}\n */\n containsPoint(shapePos, shapeRot, point) {\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(point, RawVector);\n const ret = wasm.rawshape_containsPoint(this.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, point.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {Float32Array} points\n * @returns {RawShape | undefined}\n */\n static convexHull(points) {\n const ptr0 = passArrayF32ToWasm0(points, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_convexHull(ptr0, len0);\n return ret === 0 ? undefined : RawShape.__wrap(ret);\n }\n /**\n * @param {Float32Array} vertices\n * @param {Uint32Array} indices\n * @returns {RawShape | undefined}\n */\n static convexMesh(vertices, indices) {\n const ptr0 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_export3);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_convexMesh(ptr0, len0, ptr1, len1);\n return ret === 0 ? undefined : RawShape.__wrap(ret);\n }\n /**\n * @param {number} hx\n * @param {number} hy\n * @param {number} hz\n * @returns {RawShape}\n */\n static cuboid(hx, hy, hz) {\n const ret = wasm.rawshape_cuboid(hx, hy, hz);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {number} halfHeight\n * @param {number} radius\n * @returns {RawShape}\n */\n static cylinder(halfHeight, radius) {\n const ret = wasm.rawshape_cylinder(halfHeight, radius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} normal\n * @returns {RawShape}\n */\n static halfspace(normal) {\n _assertClass(normal, RawVector);\n const ret = wasm.rawshape_halfspace(normal.__wbg_ptr);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {number} nrows\n * @param {number} ncols\n * @param {Float32Array} heights\n * @param {RawVector} scale\n * @param {number} flags\n * @returns {RawShape}\n */\n static heightfield(nrows, ncols, heights, scale, flags) {\n const ptr0 = passArrayF32ToWasm0(heights, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(scale, RawVector);\n const ret = wasm.rawshape_heightfield(nrows, ncols, ptr0, len0, scale.__wbg_ptr, flags);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawVector} rayOrig\n * @param {RawVector} rayDir\n * @param {number} maxToi\n * @returns {boolean}\n */\n intersectsRay(shapePos, shapeRot, rayOrig, rayDir, maxToi) {\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawshape_intersectsRay(this.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi);\n return ret !== 0;\n }\n /**\n * @param {RawVector} shapePos1\n * @param {RawRotation} shapeRot1\n * @param {RawShape} shape2\n * @param {RawVector} shapePos2\n * @param {RawRotation} shapeRot2\n * @returns {boolean}\n */\n intersectsShape(shapePos1, shapeRot1, shape2, shapePos2, shapeRot2) {\n _assertClass(shapePos1, RawVector);\n _assertClass(shapeRot1, RawRotation);\n _assertClass(shape2, RawShape);\n _assertClass(shapePos2, RawVector);\n _assertClass(shapeRot2, RawRotation);\n const ret = wasm.rawshape_intersectsShape(this.__wbg_ptr, shapePos1.__wbg_ptr, shapeRot1.__wbg_ptr, shape2.__wbg_ptr, shapePos2.__wbg_ptr, shapeRot2.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {Float32Array} vertices\n * @param {Uint32Array} indices\n * @returns {RawShape}\n */\n static polyline(vertices, indices) {\n const ptr0 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_export3);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_polyline(ptr0, len0, ptr1, len1);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} shapePos\n * @param {RawRotation} shapeRot\n * @param {RawVector} point\n * @param {boolean} solid\n * @returns {RawPointProjection}\n */\n projectPoint(shapePos, shapeRot, point, solid) {\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(point, RawVector);\n const ret = wasm.rawshape_projectPoint(this.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, point.__wbg_ptr, solid);\n return RawPointProjection.__wrap(ret);\n }\n /**\n * @param {number} halfHeight\n * @param {number} radius\n * @param {number} borderRadius\n * @returns {RawShape}\n */\n static roundCone(halfHeight, radius, borderRadius) {\n const ret = wasm.rawshape_roundCone(halfHeight, radius, borderRadius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {Float32Array} points\n * @param {number} borderRadius\n * @returns {RawShape | undefined}\n */\n static roundConvexHull(points, borderRadius) {\n const ptr0 = passArrayF32ToWasm0(points, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_roundConvexHull(ptr0, len0, borderRadius);\n return ret === 0 ? undefined : RawShape.__wrap(ret);\n }\n /**\n * @param {Float32Array} vertices\n * @param {Uint32Array} indices\n * @param {number} borderRadius\n * @returns {RawShape | undefined}\n */\n static roundConvexMesh(vertices, indices, borderRadius) {\n const ptr0 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_export3);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_roundConvexMesh(ptr0, len0, ptr1, len1, borderRadius);\n return ret === 0 ? undefined : RawShape.__wrap(ret);\n }\n /**\n * @param {number} hx\n * @param {number} hy\n * @param {number} hz\n * @param {number} borderRadius\n * @returns {RawShape}\n */\n static roundCuboid(hx, hy, hz, borderRadius) {\n const ret = wasm.rawshape_roundCuboid(hx, hy, hz, borderRadius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {number} halfHeight\n * @param {number} radius\n * @param {number} borderRadius\n * @returns {RawShape}\n */\n static roundCylinder(halfHeight, radius, borderRadius) {\n const ret = wasm.rawshape_roundCylinder(halfHeight, radius, borderRadius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} p1\n * @param {RawVector} p2\n * @param {RawVector} p3\n * @param {number} borderRadius\n * @returns {RawShape}\n */\n static roundTriangle(p1, p2, p3, borderRadius) {\n _assertClass(p1, RawVector);\n _assertClass(p2, RawVector);\n _assertClass(p3, RawVector);\n const ret = wasm.rawshape_roundTriangle(p1.__wbg_ptr, p2.__wbg_ptr, p3.__wbg_ptr, borderRadius);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} p1\n * @param {RawVector} p2\n * @returns {RawShape}\n */\n static segment(p1, p2) {\n _assertClass(p1, RawVector);\n _assertClass(p2, RawVector);\n const ret = wasm.rawshape_segment(p1.__wbg_ptr, p2.__wbg_ptr);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} p1\n * @param {RawVector} p2\n * @param {RawVector} p3\n * @returns {RawShape}\n */\n static triangle(p1, p2, p3) {\n _assertClass(p1, RawVector);\n _assertClass(p2, RawVector);\n _assertClass(p3, RawVector);\n const ret = wasm.rawshape_triangle(p1.__wbg_ptr, p2.__wbg_ptr, p3.__wbg_ptr);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {Float32Array} vertices\n * @param {Uint32Array} indices\n * @param {number} flags\n * @returns {RawShape | undefined}\n */\n static trimesh(vertices, indices, flags) {\n const ptr0 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_export3);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_trimesh(ptr0, len0, ptr1, len1, flags);\n return ret === 0 ? undefined : RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} voxel_size\n * @param {Int32Array} grid_coords\n * @returns {RawShape}\n */\n static voxels(voxel_size, grid_coords) {\n _assertClass(voxel_size, RawVector);\n const ptr0 = passArray32ToWasm0(grid_coords, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_voxels(voxel_size.__wbg_ptr, ptr0, len0);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {RawVector} voxel_size\n * @param {Float32Array} points\n * @returns {RawShape}\n */\n static voxelsFromPoints(voxel_size, points) {\n _assertClass(voxel_size, RawVector);\n const ptr0 = passArrayF32ToWasm0(points, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_voxelsFromPoints(voxel_size.__wbg_ptr, ptr0, len0);\n return RawShape.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawShape.prototype[Symbol.dispose] = RawShape.prototype.free;\n\nexport class RawShapeCastHit {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawShapeCastHit.prototype);\n obj.__wbg_ptr = ptr;\n RawShapeCastHitFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawShapeCastHitFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawshapecasthit_free(ptr, 0);\n }\n /**\n * @returns {RawVector}\n */\n normal1() {\n const ret = wasm.rawshapecasthit_normal1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal2() {\n const ret = wasm.rawshapecasthit_normal2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n time_of_impact() {\n const ret = wasm.rawintegrationparameters_dt(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n witness1() {\n const ret = wasm.rawshapecasthit_witness1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n witness2() {\n const ret = wasm.rawcontactforceevent_total_force(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawShapeCastHit.prototype[Symbol.dispose] = RawShapeCastHit.prototype.free;\n\nexport class RawShapeContact {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawShapeContact.prototype);\n obj.__wbg_ptr = ptr;\n RawShapeContactFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawShapeContactFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawshapecontact_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n distance() {\n const ret = wasm.rawkinematiccharactercontroller_maxSlopeClimbAngle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n normal1() {\n const ret = wasm.rawcollidershapecasthit_witness2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal2() {\n const ret = wasm.rawcollidershapecasthit_normal1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n point1() {\n const ret = wasm.rawpointprojection_point(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n point2() {\n const ret = wasm.rawcollidershapecasthit_witness1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawShapeContact.prototype[Symbol.dispose] = RawShapeContact.prototype.free;\n\n/**\n * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18}\n */\nexport const RawShapeType = Object.freeze({\n Ball: 0, \"0\": \"Ball\",\n Cuboid: 1, \"1\": \"Cuboid\",\n Capsule: 2, \"2\": \"Capsule\",\n Segment: 3, \"3\": \"Segment\",\n Polyline: 4, \"4\": \"Polyline\",\n Triangle: 5, \"5\": \"Triangle\",\n TriMesh: 6, \"6\": \"TriMesh\",\n HeightField: 7, \"7\": \"HeightField\",\n Compound: 8, \"8\": \"Compound\",\n ConvexPolyhedron: 9, \"9\": \"ConvexPolyhedron\",\n Cylinder: 10, \"10\": \"Cylinder\",\n Cone: 11, \"11\": \"Cone\",\n RoundCuboid: 12, \"12\": \"RoundCuboid\",\n RoundTriangle: 13, \"13\": \"RoundTriangle\",\n RoundCylinder: 14, \"14\": \"RoundCylinder\",\n RoundCone: 15, \"15\": \"RoundCone\",\n RoundConvexPolyhedron: 16, \"16\": \"RoundConvexPolyhedron\",\n HalfSpace: 17, \"17\": \"HalfSpace\",\n Voxels: 18, \"18\": \"Voxels\",\n});\n\n/**\n * A vector.\n */\nexport class RawVector {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawVector.prototype);\n obj.__wbg_ptr = ptr;\n RawVectorFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RawVectorFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawvector_free(ptr, 0);\n }\n /**\n * Creates a new 3D vector from its two components.\n *\n * # Parameters\n * - `x`: the `x` component of this 3D vector.\n * - `y`: the `y` component of this 3D vector.\n * - `z`: the `z` component of this 3D vector.\n * @param {number} x\n * @param {number} y\n * @param {number} z\n */\n constructor(x, y, z) {\n const ret = wasm.rawvector_new(x, y, z);\n this.__wbg_ptr = ret >>> 0;\n RawVectorFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * Sets the `x` component of this vector.\n * @param {number} x\n */\n set x(x) {\n wasm.rawintegrationparameters_set_dt(this.__wbg_ptr, x);\n }\n /**\n * Sets the `y` component of this vector.\n * @param {number} y\n */\n set y(y) {\n wasm.rawvector_set_y(this.__wbg_ptr, y);\n }\n /**\n * Sets the `z` component of this vector.\n * @param {number} z\n */\n set z(z) {\n wasm.rawintegrationparameters_set_contact_natural_frequency(this.__wbg_ptr, z);\n }\n /**\n * The `x` component of this vector.\n * @returns {number}\n */\n get x() {\n const ret = wasm.rawintegrationparameters_dt(this.__wbg_ptr);\n return ret;\n }\n /**\n * Create a new 3D vector from this vector with its components rearranged as `{x, y, z}`.\n *\n * This will effectively return a copy of `this`. This method exist for completeness with the\n * other swizzling functions.\n * @returns {RawVector}\n */\n xyz() {\n const ret = wasm.rawpointprojection_point(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * Create a new 3D vector from this vector with its components rearranged as `{x, z, y}`.\n * @returns {RawVector}\n */\n xzy() {\n const ret = wasm.rawvector_xzy(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * The `y` component of this vector.\n * @returns {number}\n */\n get y() {\n const ret = wasm.rawkinematiccharactercontroller_offset(this.__wbg_ptr);\n return ret;\n }\n /**\n * Create a new 3D vector from this vector with its components rearranged as `{y, x, z}`.\n * @returns {RawVector}\n */\n yxz() {\n const ret = wasm.rawvector_yxz(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * Create a new 3D vector from this vector with its components rearranged as `{y, z, x}`.\n * @returns {RawVector}\n */\n yzx() {\n const ret = wasm.rawvector_yzx(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * The `z` component of this vector.\n * @returns {number}\n */\n get z() {\n const ret = wasm.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr);\n return ret;\n }\n /**\n * Creates a new vector filled with zeros.\n * @returns {RawVector}\n */\n static zero() {\n const ret = wasm.rawvector_zero();\n return RawVector.__wrap(ret);\n }\n /**\n * Create a new 3D vector from this vector with its components rearranged as `{z, x, y}`.\n * @returns {RawVector}\n */\n zxy() {\n const ret = wasm.rawvector_zxy(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * Create a new 3D vector from this vector with its components rearranged as `{z, y, x}`.\n * @returns {RawVector}\n */\n zyx() {\n const ret = wasm.rawvector_zyx(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\nif (Symbol.dispose) RawVector.prototype[Symbol.dispose] = RawVector.prototype.free;\n\n/**\n * @param {number} extra_bytes_count\n */\nexport function reserve_memory(extra_bytes_count) {\n wasm.reserve_memory(extra_bytes_count);\n}\n\n/**\n * @returns {string}\n */\nexport function version() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.version(retptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);\n }\n}\n\nfunction __wbg_get_imports() {\n const import0 = {\n __proto__: null,\n __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {\n const v = getObject(arg0);\n const ret = typeof(v) === 'boolean' ? v : undefined;\n return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;\n },\n __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n },\n __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n },\n __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n },\n __wbg_call_41bedb84c3e5c0c9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4), getObject(arg5));\n return addHeapObject(ret);\n }, arguments); },\n __wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments); },\n __wbg_call_e8c868596c950cf6: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));\n return addHeapObject(ret);\n }, arguments); },\n __wbg_length_32ed9a279acd054c: function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n },\n __wbg_length_9a7876c9728a0979: function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n },\n __wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {\n const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));\n return addHeapObject(ret);\n },\n __wbg_new_with_length_63f2683cc2521026: function(arg0) {\n const ret = new Float32Array(arg0 >>> 0);\n return addHeapObject(ret);\n },\n __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {\n Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));\n },\n __wbg_rawcontactforceevent_new: function(arg0) {\n const ret = RawContactForceEvent.__wrap(arg0);\n return addHeapObject(ret);\n },\n __wbg_rawraycolliderintersection_new: function(arg0) {\n const ret = RawRayColliderIntersection.__wrap(arg0);\n return addHeapObject(ret);\n },\n __wbg_set_f8edeec46569cc70: function(arg0, arg1, arg2) {\n getObject(arg0).set(getArrayF32FromWasm0(arg1, arg2));\n },\n __wbg_set_index_41955224420ba3c6: function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = arg2;\n },\n __wbindgen_cast_0000000000000001: function(arg0) {\n // Cast intrinsic for `F64 -> Externref`.\n const ret = arg0;\n return addHeapObject(ret);\n },\n __wbindgen_object_drop_ref: function(arg0) {\n takeObject(arg0);\n },\n };\n return {\n __proto__: null,\n \"./rapier_wasm_3d_bg.js\": import0,\n };\n}\n\nconst RawBroadPhaseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawbroadphase_free(ptr >>> 0, 1));\nconst RawCCDSolverFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawccdsolver_free(ptr >>> 0, 1));\nconst RawCharacterCollisionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawcharactercollision_free(ptr >>> 0, 1));\nconst RawColliderSetFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawcolliderset_free(ptr >>> 0, 1));\nconst RawColliderShapeCastHitFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawcollidershapecasthit_free(ptr >>> 0, 1));\nconst RawContactForceEventFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawcontactforceevent_free(ptr >>> 0, 1));\nconst RawContactManifoldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawcontactmanifold_free(ptr >>> 0, 1));\nconst RawContactPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawcontactpair_free(ptr >>> 0, 1));\nconst RawDebugRenderPipelineFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawdebugrenderpipeline_free(ptr >>> 0, 1));\nconst RawDeserializedWorldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawdeserializedworld_free(ptr >>> 0, 1));\nconst RawDynamicRayCastVehicleControllerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawdynamicraycastvehiclecontroller_free(ptr >>> 0, 1));\nconst RawEventQueueFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_raweventqueue_free(ptr >>> 0, 1));\nconst RawGenericJointFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawgenericjoint_free(ptr >>> 0, 1));\nconst RawImpulseJointSetFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawimpulsejointset_free(ptr >>> 0, 1));\nconst RawIntegrationParametersFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawintegrationparameters_free(ptr >>> 0, 1));\nconst RawIslandManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawislandmanager_free(ptr >>> 0, 1));\nconst RawKinematicCharacterControllerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawkinematiccharactercontroller_free(ptr >>> 0, 1));\nconst RawMultibodyJointSetFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawmultibodyjointset_free(ptr >>> 0, 1));\nconst RawNarrowPhaseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawnarrowphase_free(ptr >>> 0, 1));\nconst RawPhysicsPipelineFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawphysicspipeline_free(ptr >>> 0, 1));\nconst RawPidControllerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawpidcontroller_free(ptr >>> 0, 1));\nconst RawPointColliderProjectionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawpointcolliderprojection_free(ptr >>> 0, 1));\nconst RawPointProjectionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawpointprojection_free(ptr >>> 0, 1));\nconst RawRayColliderHitFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawraycolliderhit_free(ptr >>> 0, 1));\nconst RawRayColliderIntersectionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawraycolliderintersection_free(ptr >>> 0, 1));\nconst RawRayIntersectionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawrayintersection_free(ptr >>> 0, 1));\nconst RawRigidBodySetFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawrigidbodyset_free(ptr >>> 0, 1));\nconst RawRotationFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawrotation_free(ptr >>> 0, 1));\nconst RawSdpMatrix3Finalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawsdpmatrix3_free(ptr >>> 0, 1));\nconst RawSerializationPipelineFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawserializationpipeline_free(ptr >>> 0, 1));\nconst RawShapeFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawshape_free(ptr >>> 0, 1));\nconst RawShapeCastHitFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawshapecasthit_free(ptr >>> 0, 1));\nconst RawShapeContactFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawshapecontact_free(ptr >>> 0, 1));\nconst RawVectorFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_rawvector_free(ptr >>> 0, 1));\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n}\n\nfunction addBorrowedObject(obj) {\n if (stack_pointer == 1) throw new Error('out of js stack');\n heap[--stack_pointer] = obj;\n return stack_pointer;\n}\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction getArrayF32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayI32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nlet cachedFloat32ArrayMemory0 = null;\nfunction getFloat32ArrayMemory0() {\n if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {\n cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);\n }\n return cachedFloat32ArrayMemory0;\n}\n\nlet cachedInt32ArrayMemory0 = null;\nfunction getInt32ArrayMemory0() {\n if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) {\n cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return decodeText(ptr, len);\n}\n\nlet cachedUint32ArrayMemory0 = null;\nfunction getUint32ArrayMemory0() {\n if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {\n cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32ArrayMemory0;\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getObject(idx) { return heap[idx]; }\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_export(addHeapObject(e));\n }\n}\n\nlet heap = new Array(128).fill(undefined);\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction passArray32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getUint32ArrayMemory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction passArrayF32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getFloat32ArrayMemory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nlet stack_pointer = 128;\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet wasmModule, wasm;\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n wasmModule = module;\n cachedDataViewMemory0 = null;\n cachedFloat32ArrayMemory0 = null;\n cachedInt32ArrayMemory0 = null;\n cachedUint32ArrayMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n return wasm;\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n } catch (e) {\n const validResponse = module.ok && expectedResponseType(module.type);\n\n if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else { throw e; }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n\n function expectedResponseType(type) {\n switch (type) {\n case 'basic': case 'cors': case 'default': return true;\n }\n return false;\n }\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (module !== undefined) {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (module_or_path !== undefined) {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (module_or_path === undefined) {\n module_or_path = new URL('rapier_wasm_3d_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync, __wbg_init as default };\n","import {RawVector, RawRotation, RawSdpMatrix3} from \"./raw\";\n\nexport interface Vector {\n x: number;\n y: number;\n z: number;\n}\n\n/**\n * A 3D vector.\n */\nexport class Vector3 implements Vector {\n x: number;\n y: number;\n z: number;\n\n constructor(x: number, y: number, z: number) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n}\n\nexport class VectorOps {\n public static new(x: number, y: number, z: number): Vector {\n return new Vector3(x, y, z);\n }\n\n public static intoRaw(v: Vector): RawVector {\n return new RawVector(v.x, v.y, v.z);\n }\n\n public static zeros(): Vector {\n return VectorOps.new(0.0, 0.0, 0.0);\n }\n\n public static fromRaw(raw: RawVector, target?: Vector): Vector | null {\n if (!raw) return null;\n\n target ??= VectorOps.zeros();\n target.x = raw.x;\n target.y = raw.y;\n target.z = raw.z;\n raw.free();\n return target;\n }\n\n public static copy(out: Vector, input: Vector) {\n out.x = input.x;\n out.y = input.y;\n out.z = input.z;\n }\n\n public static fromBuffer(buffer: Float32Array, target?: Vector): Vector {\n target ??= VectorOps.zeros();\n target.x = buffer[0];\n target.y = buffer[1];\n target.z = buffer[2];\n return target;\n }\n}\n\nexport interface Rotation {\n x: number;\n y: number;\n z: number;\n w: number;\n}\n\n/**\n * A quaternion.\n */\nexport class Quaternion implements Rotation {\n x: number;\n y: number;\n z: number;\n w: number;\n\n constructor(x: number, y: number, z: number, w: number) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n}\n\nexport class RotationOps {\n public static identity(): Rotation {\n return new Quaternion(0.0, 0.0, 0.0, 1.0);\n }\n\n public static fromRaw(raw: RawRotation, target?: Rotation): Rotation | null {\n if (!raw) return null;\n\n target ??= RotationOps.identity();\n target.x = raw.x;\n target.y = raw.y;\n target.z = raw.z;\n target.w = raw.w;\n raw.free();\n return target;\n }\n\n public static intoRaw(rot: Rotation): RawRotation {\n return new RawRotation(rot.x, rot.y, rot.z, rot.w);\n }\n\n public static copy(out: Rotation, input: Rotation) {\n out.x = input.x;\n out.y = input.y;\n out.z = input.z;\n out.w = input.w;\n }\n\n public static fromBuffer(buffer: Float32Array, target?: Rotation): Rotation {\n target ??= RotationOps.identity();\n target.x = buffer[0];\n target.y = buffer[1];\n target.z = buffer[2];\n target.w = buffer[3];\n return target;\n }\n}\n\n/**\n * A 3D symmetric-positive-definite matrix.\n */\nexport class SdpMatrix3 {\n /**\n * Row major list of the upper-triangular part of the symmetric matrix.\n */\n elements: Float32Array;\n\n /**\n * Matrix element at row 1, column 1.\n */\n public get m11(): number {\n return this.elements[0];\n }\n\n /**\n * Matrix element at row 1, column 2.\n */\n public get m12(): number {\n return this.elements[1];\n }\n\n /**\n * Matrix element at row 2, column 1.\n */\n public get m21(): number {\n return this.m12;\n }\n\n /**\n * Matrix element at row 1, column 3.\n */\n public get m13(): number {\n return this.elements[2];\n }\n\n /**\n * Matrix element at row 3, column 1.\n */\n public get m31(): number {\n return this.m13;\n }\n\n /**\n * Matrix element at row 2, column 2.\n */\n public get m22(): number {\n return this.elements[3];\n }\n\n /**\n * Matrix element at row 2, column 3.\n */\n public get m23(): number {\n return this.elements[4];\n }\n\n /**\n * Matrix element at row 3, column 2.\n */\n public get m32(): number {\n return this.m23;\n }\n\n /**\n * Matrix element at row 3, column 3.\n */\n public get m33(): number {\n return this.elements[5];\n }\n\n constructor(elements: Float32Array) {\n this.elements = elements;\n }\n}\n\nexport class SdpMatrix3Ops {\n public static fromRaw(raw: RawSdpMatrix3): SdpMatrix3 {\n const sdpMatrix3 = new SdpMatrix3(raw.elements());\n raw.free();\n return sdpMatrix3;\n }\n}\n","import {Collider, ColliderSet} from \"../geometry\";\nimport {Rotation, RotationOps, Vector, VectorOps} from \"../math\";\nimport {SdpMatrix3, SdpMatrix3Ops} from \"../math\";\nimport {RawRigidBodySet, RawRigidBodyType} from \"../raw\";\n\n/**\n * The integer identifier of a collider added to a `ColliderSet`.\n */\nexport type RigidBodyHandle = number;\n\n/**\n * The simulation status of a rigid-body.\n */\n// TODO: rename this to RigidBodyType\nexport enum RigidBodyType {\n /**\n * A `RigidBodyType::Dynamic` body can be affected by all external forces.\n */\n Dynamic = 0,\n /**\n * A `RigidBodyType::Fixed` body cannot be affected by external forces.\n */\n Fixed,\n /**\n * A `RigidBodyType::KinematicPositionBased` body cannot be affected by any external forces but can be controlled\n * by the user at the position level while keeping realistic one-way interaction with dynamic bodies.\n *\n * One-way interaction means that a kinematic body can push a dynamic body, but a kinematic body\n * cannot be pushed by anything. In other words, the trajectory of a kinematic body can only be\n * modified by the user and is independent from any contact or joint it is involved in.\n */\n KinematicPositionBased,\n /**\n * A `RigidBodyType::KinematicVelocityBased` body cannot be affected by any external forces but can be controlled\n * by the user at the velocity level while keeping realistic one-way interaction with dynamic bodies.\n *\n * One-way interaction means that a kinematic body can push a dynamic body, but a kinematic body\n * cannot be pushed by anything. In other words, the trajectory of a kinematic body can only be\n * modified by the user and is independent from any contact or joint it is involved in.\n */\n KinematicVelocityBased,\n}\n\n/**\n * A rigid-body.\n */\nexport class RigidBody {\n private rawSet: RawRigidBodySet; // The RigidBody won't need to free this.\n private colliderSet: ColliderSet;\n readonly handle: RigidBodyHandle;\n private scratchBuffer: Float32Array;\n\n /**\n * An arbitrary user-defined object associated with this rigid-body.\n */\n public userData?: unknown;\n\n constructor(rawSet: RawRigidBodySet, colliderSet: ColliderSet, handle: RigidBodyHandle) {\n this.rawSet = rawSet;\n this.colliderSet = colliderSet;\n this.handle = handle;\n this.scratchBuffer = new Float32Array(4);\n }\n\n /** @internal */\n public finalizeDeserialization(colliderSet: ColliderSet) {\n this.colliderSet = colliderSet;\n }\n\n /**\n * Checks if this rigid-body is still valid (i.e. that it has\n * not been deleted from the rigid-body set yet.\n */\n public isValid(): boolean {\n return this.rawSet.contains(this.handle);\n }\n\n /**\n * Locks or unlocks the ability of this rigid-body to translate.\n *\n * @param locked - If `true`, this rigid-body will no longer translate due to forces and impulses.\n * @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.\n */\n public lockTranslations(locked: boolean, wakeUp: boolean) {\n return this.rawSet.rbLockTranslations(this.handle, locked, wakeUp);\n }\n\n /**\n * Locks or unlocks the ability of this rigid-body to rotate.\n *\n * @param locked - If `true`, this rigid-body will no longer rotate due to torques and impulses.\n * @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.\n */\n public lockRotations(locked: boolean, wakeUp: boolean) {\n return this.rawSet.rbLockRotations(this.handle, locked, wakeUp);\n }\n\n /**\n * Locks or unlocks the ability of this rigid-body to translate along individual coordinate axes.\n *\n * @param enableX - If `false`, this rigid-body will no longer translate due to torques and impulses, along the X coordinate axis.\n * @param enableY - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Y coordinate axis.\n * @param enableZ - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Z coordinate axis.\n * @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.\n */\n public setEnabledTranslations(\n enableX: boolean,\n enableY: boolean,\n enableZ: boolean,\n wakeUp: boolean,\n ) {\n return this.rawSet.rbSetEnabledTranslations(this.handle, enableX, enableY, enableZ, wakeUp);\n }\n\n /**\n * Locks or unlocks the ability of this rigid-body to translate along individual coordinate axes.\n *\n * @param enableX - If `false`, this rigid-body will no longer translate due to torques and impulses, along the X coordinate axis.\n * @param enableY - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Y coordinate axis.\n * @param enableZ - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Z coordinate axis.\n * @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.\n * @deprecated use `this.setEnabledTranslations` with the same arguments instead.\n */\n public restrictTranslations(\n enableX: boolean,\n enableY: boolean,\n enableZ: boolean,\n wakeUp: boolean,\n ) {\n this.setEnabledTranslations(enableX, enableY, enableZ, wakeUp);\n }\n\n /**\n * Locks or unlocks the ability of this rigid-body to rotate along individual coordinate axes.\n *\n * @param enableX - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the X coordinate axis.\n * @param enableY - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Y coordinate axis.\n * @param enableZ - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Z coordinate axis.\n * @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.\n */\n public setEnabledRotations(\n enableX: boolean,\n enableY: boolean,\n enableZ: boolean,\n wakeUp: boolean,\n ) {\n return this.rawSet.rbSetEnabledRotations(this.handle, enableX, enableY, enableZ, wakeUp);\n }\n\n /**\n * Locks or unlocks the ability of this rigid-body to rotate along individual coordinate axes.\n *\n * @param enableX - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the X coordinate axis.\n * @param enableY - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Y coordinate axis.\n * @param enableZ - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Z coordinate axis.\n * @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.\n * @deprecated use `this.setEnabledRotations` with the same arguments instead.\n */\n public restrictRotations(\n enableX: boolean,\n enableY: boolean,\n enableZ: boolean,\n wakeUp: boolean,\n ) {\n this.setEnabledRotations(enableX, enableY, enableZ, wakeUp);\n }\n\n /**\n * The dominance group, in [-127, +127] this rigid-body is part of.\n */\n public dominanceGroup(): number {\n return this.rawSet.rbDominanceGroup(this.handle);\n }\n\n /**\n * Sets the dominance group of this rigid-body.\n *\n * @param group - The dominance group of this rigid-body. Must be a signed integer in the range [-127, +127].\n */\n public setDominanceGroup(group: number) {\n this.rawSet.rbSetDominanceGroup(this.handle, group);\n }\n\n /**\n * The number of additional solver iterations that will be run for this\n * rigid-body and everything that interacts with it directly or indirectly\n * through contacts or joints.\n */\n public additionalSolverIterations(): number {\n return this.rawSet.rbAdditionalSolverIterations(this.handle);\n }\n\n /**\n * Sets the number of additional solver iterations that will be run for this\n * rigid-body and everything that interacts with it directly or indirectly\n * through contacts or joints.\n *\n * Compared to increasing the global `World.numSolverIteration`, setting this\n * value lets you increase accuracy on only a subset of the scene, resulting in reduced\n * performance loss.\n *\n * @param iters - The new number of additional solver iterations (default: 0).\n */\n public setAdditionalSolverIterations(iters: number) {\n this.rawSet.rbSetAdditionalSolverIterations(this.handle, iters);\n }\n\n /**\n * Enable or disable CCD (Continuous Collision Detection) for this rigid-body.\n *\n * @param enabled - If `true`, CCD will be enabled for this rigid-body.\n */\n public enableCcd(enabled: boolean) {\n this.rawSet.rbEnableCcd(this.handle, enabled);\n }\n\n /**\n * Sets the soft-CCD prediction distance for this rigid-body.\n *\n * See the documentation of `RigidBodyDesc.setSoftCcdPrediction` for\n * additional details.\n */\n public setSoftCcdPrediction(distance: number) {\n this.rawSet.rbSetSoftCcdPrediction(this.handle, distance);\n }\n\n /**\n * Gets the soft-CCD prediction distance for this rigid-body.\n *\n * See the documentation of `RigidBodyDesc.setSoftCcdPrediction` for\n * additional details.\n */\n public softCcdPrediction(): number {\n return this.rawSet.rbSoftCcdPrediction(this.handle);\n }\n\n /**\n * The world-space translation of this rigid-body.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public translation(target?: Vector): Vector {\n this.rawSet.rbTranslation(this.handle, this.scratchBuffer);\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The world-space orientation of this rigid-body.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public rotation(target?: Rotation): Rotation {\n this.rawSet.rbRotation(this.handle, this.scratchBuffer);\n return RotationOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The world-space next translation of this rigid-body.\n *\n * If this rigid-body is kinematic this value is set by the `setNextKinematicTranslation`\n * method and is used for estimating the kinematic body velocity at the next timestep.\n * For non-kinematic bodies, this value is currently unspecified.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public nextTranslation(target?: Vector): Vector {\n this.rawSet.rbNextTranslation(this.handle, this.scratchBuffer);\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The world-space next orientation of this rigid-body.\n *\n * If this rigid-body is kinematic this value is set by the `setNextKinematicRotation`\n * method and is used for estimating the kinematic body velocity at the next timestep.\n * For non-kinematic bodies, this value is currently unspecified.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public nextRotation(target?: Rotation): Rotation {\n this.rawSet.rbNextRotation(this.handle, this.scratchBuffer);\n return RotationOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * Sets the translation of this rigid-body.\n *\n * @param tra - The world-space position of the rigid-body.\n * @param wakeUp - Forces the rigid-body to wake-up so it is properly affected by forces if it\n * wasn't moving before modifying its position.\n */\n public setTranslation(tra: Vector, wakeUp: boolean) {\n this.rawSet.rbSetTranslation(this.handle, tra.x, tra.y, tra.z, wakeUp);\n }\n\n /**\n * Sets the linear velocity of this rigid-body.\n *\n * @param vel - The linear velocity to set.\n * @param wakeUp - Forces the rigid-body to wake-up if it was asleep.\n */\n public setLinvel(vel: Vector, wakeUp: boolean) {\n let rawVel = VectorOps.intoRaw(vel);\n this.rawSet.rbSetLinvel(this.handle, rawVel, wakeUp);\n rawVel.free();\n }\n\n /**\n * The scale factor applied to the gravity affecting\n * this rigid-body.\n */\n public gravityScale(): number {\n return this.rawSet.rbGravityScale(this.handle);\n }\n\n /**\n * Sets the scale factor applied to the gravity affecting\n * this rigid-body.\n *\n * @param factor - The scale factor to set. A value of 0.0 means\n * that this rigid-body will on longer be affected by gravity.\n * @param wakeUp - Forces the rigid-body to wake-up if it was asleep.\n */\n public setGravityScale(factor: number, wakeUp: boolean) {\n this.rawSet.rbSetGravityScale(this.handle, factor, wakeUp);\n }\n\n /**\n * Sets the rotation quaternion of this rigid-body.\n *\n * This does nothing if a zero quaternion is provided.\n *\n * @param rotation - The rotation to set.\n * @param wakeUp - Forces the rigid-body to wake-up so it is properly affected by forces if it\n * wasn't moving before modifying its position.\n */\n public setRotation(rot: Rotation, wakeUp: boolean) {\n this.rawSet.rbSetRotation(this.handle, rot.x, rot.y, rot.z, rot.w, wakeUp);\n }\n\n /**\n * Sets the angular velocity fo this rigid-body.\n *\n * @param vel - The angular velocity to set.\n * @param wakeUp - Forces the rigid-body to wake-up if it was asleep.\n */\n public setAngvel(vel: Vector, wakeUp: boolean) {\n let rawVel = VectorOps.intoRaw(vel);\n this.rawSet.rbSetAngvel(this.handle, rawVel, wakeUp);\n rawVel.free();\n }\n\n /**\n * If this rigid body is kinematic, sets its future translation after the next timestep integration.\n *\n * This should be used instead of `rigidBody.setTranslation` to make the dynamic object\n * interacting with this kinematic body behave as expected. Internally, Rapier will compute\n * an artificial velocity for this rigid-body from its current position and its next kinematic\n * position. This velocity will be used to compute forces on dynamic bodies interacting with\n * this body.\n *\n * @param t - The kinematic translation to set.\n */\n public setNextKinematicTranslation(t: Vector) {\n this.rawSet.rbSetNextKinematicTranslation(this.handle, t.x, t.y, t.z);\n }\n\n /**\n * If this rigid body is kinematic, sets its future rotation after the next timestep integration.\n *\n * This should be used instead of `rigidBody.setRotation` to make the dynamic object\n * interacting with this kinematic body behave as expected. Internally, Rapier will compute\n * an artificial velocity for this rigid-body from its current position and its next kinematic\n * position. This velocity will be used to compute forces on dynamic bodies interacting with\n * this body.\n *\n * @param rot - The kinematic rotation to set.\n */\n public setNextKinematicRotation(rot: Rotation) {\n this.rawSet.rbSetNextKinematicRotation(this.handle, rot.x, rot.y, rot.z, rot.w);\n }\n\n /**\n * The linear velocity of this rigid-body.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public linvel(target?: Vector): Vector {\n this.rawSet.rbLinvel(this.handle, this.scratchBuffer);\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The velocity of the given world-space point on this rigid-body.\n */\n public velocityAtPoint(point: Vector): Vector {\n const rawPoint = VectorOps.intoRaw(point);\n let result = VectorOps.fromRaw(this.rawSet.rbVelocityAtPoint(this.handle, rawPoint));\n rawPoint.free();\n return result!;\n }\n\n /**\n * The angular velocity of this rigid-body.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public angvel(target?: Vector): Vector {\n this.rawSet.rbAngvel(this.handle, this.scratchBuffer);\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The mass of this rigid-body.\n */\n public mass(): number {\n return this.rawSet.rbMass(this.handle);\n }\n\n /**\n * The inverse mass taking into account translation locking.\n */\n public effectiveInvMass(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbEffectiveInvMass(this.handle))!;\n }\n\n /**\n * The inverse of the mass of a rigid-body.\n *\n * If this is zero, the rigid-body is assumed to have infinite mass.\n */\n public invMass(): number {\n return this.rawSet.rbInvMass(this.handle);\n }\n\n /**\n * The center of mass of a rigid-body expressed in its local-space.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public localCom(target?: Vector): Vector {\n this.rawSet.rbLocalCom(this.handle, this.scratchBuffer);\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The world-space center of mass of the rigid-body.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public worldCom(target?: Vector): Vector {\n this.rawSet.rbWorldCom(this.handle, this.scratchBuffer);\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The inverse of the principal angular inertia of the rigid-body.\n *\n * Components set to zero are assumed to be infinite along the corresponding principal axis.\n */\n public invPrincipalInertia(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbInvPrincipalInertia(this.handle))!;\n }\n\n /**\n * The angular inertia along the principal inertia axes of the rigid-body.\n */\n public principalInertia(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbPrincipalInertia(this.handle))!;\n }\n\n /**\n * The principal vectors of the local angular inertia tensor of the rigid-body.\n */\n public principalInertiaLocalFrame(): Rotation {\n return RotationOps.fromRaw(this.rawSet.rbPrincipalInertiaLocalFrame(this.handle))!;\n }\n\n /**\n * The world-space inverse angular inertia tensor of the rigid-body,\n * taking into account rotation locking.\n */\n public effectiveWorldInvInertia(): SdpMatrix3 {\n return SdpMatrix3Ops.fromRaw(this.rawSet.rbEffectiveWorldInvInertia(this.handle));\n }\n\n /**\n * The effective world-space angular inertia (that takes the potential rotation locking into account) of\n * this rigid-body.\n */\n public effectiveAngularInertia(): SdpMatrix3 {\n return SdpMatrix3Ops.fromRaw(this.rawSet.rbEffectiveAngularInertia(this.handle));\n }\n\n /**\n * Put this rigid body to sleep.\n *\n * A sleeping body no longer moves and is no longer simulated by the physics engine unless\n * it is waken up. It can be woken manually with `this.wakeUp()` or automatically due to\n * external forces like contacts.\n */\n public sleep() {\n this.rawSet.rbSleep(this.handle);\n }\n\n /**\n * Wakes this rigid-body up.\n *\n * A dynamic rigid-body that does not move during several consecutive frames will\n * be put to sleep by the physics engine, i.e., it will stop being simulated in order\n * to avoid useless computations.\n * This methods forces a sleeping rigid-body to wake-up. This is useful, e.g., before modifying\n * the position of a dynamic body so that it is properly simulated afterwards.\n */\n public wakeUp() {\n this.rawSet.rbWakeUp(this.handle);\n }\n\n /**\n * Is CCD enabled for this rigid-body?\n */\n public isCcdEnabled(): boolean {\n return this.rawSet.rbIsCcdEnabled(this.handle);\n }\n\n /**\n * The number of colliders attached to this rigid-body.\n */\n public numColliders(): number {\n return this.rawSet.rbNumColliders(this.handle);\n }\n\n /**\n * Retrieves the `i-th` collider attached to this rigid-body.\n *\n * @param i - The index of the collider to retrieve. Must be a number in `[0, this.numColliders()[`.\n * This index is **not** the same as the unique identifier of the collider.\n */\n public collider(i: number): Collider {\n return this.colliderSet.get(this.rawSet.rbCollider(this.handle, i))!;\n }\n\n /**\n * Sets whether this rigid-body is enabled or not.\n *\n * @param enabled - Set to `false` to disable this rigid-body and all its attached colliders.\n */\n public setEnabled(enabled: boolean) {\n this.rawSet.rbSetEnabled(this.handle, enabled);\n }\n\n /**\n * Is this rigid-body enabled?\n */\n public isEnabled(): boolean {\n return this.rawSet.rbIsEnabled(this.handle);\n }\n\n /**\n * The status of this rigid-body: static, dynamic, or kinematic.\n */\n public bodyType(): RigidBodyType {\n return this.rawSet.rbBodyType(this.handle) as number as RigidBodyType;\n }\n\n /**\n * Set a new status for this rigid-body: static, dynamic, or kinematic.\n */\n public setBodyType(type: RigidBodyType, wakeUp: boolean) {\n return this.rawSet.rbSetBodyType(this.handle, type as number as RawRigidBodyType, wakeUp);\n }\n\n /**\n * Is this rigid-body sleeping?\n */\n public isSleeping(): boolean {\n return this.rawSet.rbIsSleeping(this.handle);\n }\n\n /**\n * Is the velocity of this rigid-body not zero?\n */\n public isMoving(): boolean {\n return this.rawSet.rbIsMoving(this.handle);\n }\n\n /**\n * Is this rigid-body static?\n */\n public isFixed(): boolean {\n return this.rawSet.rbIsFixed(this.handle);\n }\n\n /**\n * Is this rigid-body kinematic?\n */\n public isKinematic(): boolean {\n return this.rawSet.rbIsKinematic(this.handle);\n }\n\n /**\n * Is this rigid-body dynamic?\n */\n public isDynamic(): boolean {\n return this.rawSet.rbIsDynamic(this.handle);\n }\n\n /**\n * The linear damping coefficient of this rigid-body.\n */\n public linearDamping(): number {\n return this.rawSet.rbLinearDamping(this.handle);\n }\n\n /**\n * The angular damping coefficient of this rigid-body.\n */\n public angularDamping(): number {\n return this.rawSet.rbAngularDamping(this.handle);\n }\n\n /**\n * Sets the linear damping factor applied to this rigid-body.\n *\n * @param factor - The damping factor to set.\n */\n public setLinearDamping(factor: number) {\n this.rawSet.rbSetLinearDamping(this.handle, factor);\n }\n\n /**\n * Recompute the mass-properties of this rigid-bodies based on its currently attached colliders.\n */\n public recomputeMassPropertiesFromColliders() {\n this.rawSet.rbRecomputeMassPropertiesFromColliders(this.handle, this.colliderSet.raw);\n }\n\n /**\n * Sets the rigid-body's additional mass.\n *\n * The total angular inertia of the rigid-body will be scaled automatically based on this additional mass. If this\n * scaling effect isn’t desired, use Self::additional_mass_properties instead of this method.\n *\n * This is only the \"additional\" mass because the total mass of the rigid-body is equal to the sum of this\n * additional mass and the mass computed from the colliders (with non-zero densities) attached to this rigid-body.\n *\n * That total mass (which includes the attached colliders’ contributions) will be updated at the name physics step,\n * or can be updated manually with `this.recomputeMassPropertiesFromColliders`.\n *\n * This will override any previous additional mass-properties set by `this.setAdditionalMass`,\n * `this.setAdditionalMassProperties`, `RigidBodyDesc::setAdditionalMass`, or\n * `RigidBodyDesc.setAdditionalMassfProperties` for this rigid-body.\n *\n * @param mass - The additional mass to set.\n * @param wakeUp - If `true` then the rigid-body will be woken up if it was put to sleep because it did not move for a while.\n */\n public setAdditionalMass(mass: number, wakeUp: boolean) {\n this.rawSet.rbSetAdditionalMass(this.handle, mass, wakeUp);\n }\n\n /**\n * Sets the rigid-body's additional mass-properties.\n *\n * This is only the \"additional\" mass-properties because the total mass-properties of the rigid-body is equal to the\n * sum of this additional mass-properties and the mass computed from the colliders (with non-zero densities) attached\n * to this rigid-body.\n *\n * That total mass-properties (which include the attached colliders’ contributions) will be updated at the name\n * physics step, or can be updated manually with `this.recomputeMassPropertiesFromColliders`.\n *\n * This will override any previous mass-properties set by `this.setAdditionalMass`,\n * `this.setAdditionalMassProperties`, `RigidBodyDesc.setAdditionalMass`, or `RigidBodyDesc.setAdditionalMassProperties`\n * for this rigid-body.\n *\n * If `wake_up` is true then the rigid-body will be woken up if it was put to sleep because it did not move for a while.\n */\n public setAdditionalMassProperties(\n mass: number,\n centerOfMass: Vector,\n principalAngularInertia: Vector,\n angularInertiaLocalFrame: Rotation,\n wakeUp: boolean,\n ) {\n let rawCom = VectorOps.intoRaw(centerOfMass);\n let rawPrincipalInertia = VectorOps.intoRaw(principalAngularInertia);\n let rawInertiaFrame = RotationOps.intoRaw(angularInertiaLocalFrame);\n\n this.rawSet.rbSetAdditionalMassProperties(\n this.handle,\n mass,\n rawCom,\n rawPrincipalInertia,\n rawInertiaFrame,\n wakeUp,\n );\n\n rawCom.free();\n rawPrincipalInertia.free();\n rawInertiaFrame.free();\n }\n\n /**\n * Sets the linear damping factor applied to this rigid-body.\n *\n * @param factor - The damping factor to set.\n */\n public setAngularDamping(factor: number) {\n this.rawSet.rbSetAngularDamping(this.handle, factor);\n }\n\n /**\n * Resets to zero the user forces (but not torques) applied to this rigid-body.\n *\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public resetForces(wakeUp: boolean) {\n this.rawSet.rbResetForces(this.handle, wakeUp);\n }\n\n /**\n * Resets to zero the user torques applied to this rigid-body.\n *\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public resetTorques(wakeUp: boolean) {\n this.rawSet.rbResetTorques(this.handle, wakeUp);\n }\n\n /**\n * Adds a force at the center-of-mass of this rigid-body.\n *\n * @param force - the world-space force to add to the rigid-body.\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public addForce(force: Vector, wakeUp: boolean) {\n const rawForce = VectorOps.intoRaw(force);\n this.rawSet.rbAddForce(this.handle, rawForce, wakeUp);\n rawForce.free();\n }\n\n /**\n * Applies an impulse at the center-of-mass of this rigid-body.\n *\n * @param impulse - the world-space impulse to apply on the rigid-body.\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public applyImpulse(impulse: Vector, wakeUp: boolean) {\n const rawImpulse = VectorOps.intoRaw(impulse);\n this.rawSet.rbApplyImpulse(this.handle, rawImpulse, wakeUp);\n rawImpulse.free();\n }\n\n /**\n * Adds a torque at the center-of-mass of this rigid-body.\n *\n * @param torque - the world-space torque to add to the rigid-body.\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public addTorque(torque: Vector, wakeUp: boolean) {\n const rawTorque = VectorOps.intoRaw(torque);\n this.rawSet.rbAddTorque(this.handle, rawTorque, wakeUp);\n rawTorque.free();\n }\n\n /**\n * Applies an impulsive torque at the center-of-mass of this rigid-body.\n *\n * @param torqueImpulse - the world-space torque impulse to apply on the rigid-body.\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public applyTorqueImpulse(torqueImpulse: Vector, wakeUp: boolean) {\n const rawTorqueImpulse = VectorOps.intoRaw(torqueImpulse);\n this.rawSet.rbApplyTorqueImpulse(this.handle, rawTorqueImpulse, wakeUp);\n rawTorqueImpulse.free();\n }\n\n /**\n * Adds a force at the given world-space point of this rigid-body.\n *\n * @param force - the world-space force to add to the rigid-body.\n * @param point - the world-space point where the impulse is to be applied on the rigid-body.\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public addForceAtPoint(force: Vector, point: Vector, wakeUp: boolean) {\n const rawForce = VectorOps.intoRaw(force);\n const rawPoint = VectorOps.intoRaw(point);\n this.rawSet.rbAddForceAtPoint(this.handle, rawForce, rawPoint, wakeUp);\n rawForce.free();\n rawPoint.free();\n }\n\n /**\n * Applies an impulse at the given world-space point of this rigid-body.\n *\n * @param impulse - the world-space impulse to apply on the rigid-body.\n * @param point - the world-space point where the impulse is to be applied on the rigid-body.\n * @param wakeUp - should the rigid-body be automatically woken-up?\n */\n public applyImpulseAtPoint(impulse: Vector, point: Vector, wakeUp: boolean) {\n const rawImpulse = VectorOps.intoRaw(impulse);\n const rawPoint = VectorOps.intoRaw(point);\n this.rawSet.rbApplyImpulseAtPoint(this.handle, rawImpulse, rawPoint, wakeUp);\n rawImpulse.free();\n rawPoint.free();\n }\n\n /**\n * Retrieves the constant force(s) the user added to this rigid-body\n * Returns zero if the rigid-body is not dynamic.\n */\n public userForce(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbUserForce(this.handle))!;\n }\n\n /**\n * Retrieves the constant torque(s) the user added to this rigid-body\n * Returns zero if the rigid-body is not dynamic.\n */\n public userTorque(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbUserTorque(this.handle))!;\n }\n}\n\nexport class RigidBodyDesc {\n enabled: boolean;\n translation: Vector;\n rotation: Rotation;\n gravityScale: number;\n mass: number;\n massOnly: boolean;\n centerOfMass: Vector;\n translationsEnabledX: boolean;\n translationsEnabledY: boolean;\n linvel: Vector;\n angvel: Vector;\n principalAngularInertia: Vector;\n angularInertiaLocalFrame: Rotation;\n translationsEnabledZ: boolean;\n rotationsEnabledX: boolean;\n rotationsEnabledY: boolean;\n rotationsEnabledZ: boolean;\n linearDamping: number;\n angularDamping: number;\n status: RigidBodyType;\n canSleep: boolean;\n sleeping: boolean;\n ccdEnabled: boolean;\n softCcdPrediction: number;\n dominanceGroup: number;\n additionalSolverIterations: number;\n userData?: unknown;\n\n constructor(status: RigidBodyType) {\n this.enabled = true;\n this.status = status;\n this.translation = VectorOps.zeros();\n this.rotation = RotationOps.identity();\n this.gravityScale = 1.0;\n this.linvel = VectorOps.zeros();\n this.mass = 0.0;\n this.massOnly = false;\n this.centerOfMass = VectorOps.zeros();\n this.translationsEnabledX = true;\n this.translationsEnabledY = true;\n this.angvel = VectorOps.zeros();\n this.principalAngularInertia = VectorOps.zeros();\n this.angularInertiaLocalFrame = RotationOps.identity();\n this.translationsEnabledZ = true;\n this.rotationsEnabledX = true;\n this.rotationsEnabledY = true;\n this.rotationsEnabledZ = true;\n this.linearDamping = 0.0;\n this.angularDamping = 0.0;\n this.canSleep = true;\n this.sleeping = false;\n this.ccdEnabled = false;\n this.softCcdPrediction = 0.0;\n this.dominanceGroup = 0;\n this.additionalSolverIterations = 0;\n }\n\n /**\n * A rigid-body descriptor used to build a dynamic rigid-body.\n */\n public static dynamic(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.Dynamic);\n }\n\n /**\n * A rigid-body descriptor used to build a position-based kinematic rigid-body.\n */\n public static kinematicPositionBased(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.KinematicPositionBased);\n }\n\n /**\n * A rigid-body descriptor used to build a velocity-based kinematic rigid-body.\n */\n public static kinematicVelocityBased(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.KinematicVelocityBased);\n }\n\n /**\n * A rigid-body descriptor used to build a fixed rigid-body.\n */\n public static fixed(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.Fixed);\n }\n\n /**\n * A rigid-body descriptor used to build a dynamic rigid-body.\n *\n * @deprecated The method has been renamed to `.dynamic()`.\n */\n public static newDynamic(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.Dynamic);\n }\n\n /**\n * A rigid-body descriptor used to build a position-based kinematic rigid-body.\n *\n * @deprecated The method has been renamed to `.kinematicPositionBased()`.\n */\n public static newKinematicPositionBased(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.KinematicPositionBased);\n }\n\n /**\n * A rigid-body descriptor used to build a velocity-based kinematic rigid-body.\n *\n * @deprecated The method has been renamed to `.kinematicVelocityBased()`.\n */\n public static newKinematicVelocityBased(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.KinematicVelocityBased);\n }\n\n /**\n * A rigid-body descriptor used to build a fixed rigid-body.\n *\n * @deprecated The method has been renamed to `.fixed()`.\n */\n public static newStatic(): RigidBodyDesc {\n return new RigidBodyDesc(RigidBodyType.Fixed);\n }\n\n public setDominanceGroup(group: number): RigidBodyDesc {\n this.dominanceGroup = group;\n return this;\n }\n\n /**\n * Sets the number of additional solver iterations that will be run for this\n * rigid-body and everything that interacts with it directly or indirectly\n * through contacts or joints.\n *\n * Compared to increasing the global `World.numSolverIteration`, setting this\n * value lets you increase accuracy on only a subset of the scene, resulting in reduced\n * performance loss.\n *\n * @param iters - The new number of additional solver iterations (default: 0).\n */\n public setAdditionalSolverIterations(iters: number): RigidBodyDesc {\n this.additionalSolverIterations = iters;\n return this;\n }\n\n /**\n * Sets whether the created rigid-body will be enabled or disabled.\n * @param enabled − If set to `false` the rigid-body will be disabled at creation.\n */\n public setEnabled(enabled: boolean): RigidBodyDesc {\n this.enabled = enabled;\n return this;\n }\n\n /**\n * Sets the initial translation of the rigid-body to create.\n *\n * @param tra - The translation to set.\n */\n public setTranslation(x: number, y: number, z: number): RigidBodyDesc {\n if (typeof x != \"number\" || typeof y != \"number\" || typeof z != \"number\")\n throw TypeError(\"The translation components must be numbers.\");\n\n this.translation = {x: x, y: y, z: z};\n return this;\n }\n\n /**\n * Sets the initial rotation of the rigid-body to create.\n *\n * @param rot - The rotation to set.\n */\n public setRotation(rot: Rotation): RigidBodyDesc {\n RotationOps.copy(this.rotation, rot);\n return this;\n }\n\n /**\n * Sets the scale factor applied to the gravity affecting\n * the rigid-body being built.\n *\n * @param scale - The scale factor. Set this to `0.0` if the rigid-body\n * needs to ignore gravity.\n */\n public setGravityScale(scale: number): RigidBodyDesc {\n this.gravityScale = scale;\n return this;\n }\n\n /**\n * Sets the initial mass of the rigid-body being built, before adding colliders' contributions.\n *\n * @param mass − The initial mass of the rigid-body to create.\n */\n public setAdditionalMass(mass: number): RigidBodyDesc {\n this.mass = mass;\n this.massOnly = true;\n return this;\n }\n\n /**\n * Sets the initial linear velocity of the rigid-body to create.\n *\n * @param x - The linear velocity to set along the `x` axis.\n * @param y - The linear velocity to set along the `y` axis.\n * @param z - The linear velocity to set along the `z` axis.\n */\n public setLinvel(x: number, y: number, z: number): RigidBodyDesc {\n if (typeof x != \"number\" || typeof y != \"number\" || typeof z != \"number\")\n throw TypeError(\"The linvel components must be numbers.\");\n\n this.linvel = {x: x, y: y, z: z};\n return this;\n }\n\n /**\n * Sets the initial angular velocity of the rigid-body to create.\n *\n * @param vel - The angular velocity to set.\n */\n public setAngvel(vel: Vector): RigidBodyDesc {\n VectorOps.copy(this.angvel, vel);\n return this;\n }\n\n /**\n * Sets the mass properties of the rigid-body being built.\n *\n * Note that the final mass properties of the rigid-bodies depends\n * on the initial mass-properties of the rigid-body (set by this method)\n * to which is added the contributions of all the colliders with non-zero density\n * attached to this rigid-body.\n *\n * Therefore, if you want your provided mass properties to be the final\n * mass properties of your rigid-body, don't attach colliders to it, or\n * only attach colliders with densities equal to zero.\n *\n * @param mass − The initial mass of the rigid-body to create.\n * @param centerOfMass − The initial center-of-mass of the rigid-body to create.\n * @param principalAngularInertia − The initial principal angular inertia of the rigid-body to create.\n * These are the eigenvalues of the angular inertia matrix.\n * @param angularInertiaLocalFrame − The initial local angular inertia frame of the rigid-body to create.\n * These are the eigenvectors of the angular inertia matrix.\n */\n public setAdditionalMassProperties(\n mass: number,\n centerOfMass: Vector,\n principalAngularInertia: Vector,\n angularInertiaLocalFrame: Rotation,\n ): RigidBodyDesc {\n this.mass = mass;\n VectorOps.copy(this.centerOfMass, centerOfMass);\n VectorOps.copy(this.principalAngularInertia, principalAngularInertia);\n RotationOps.copy(this.angularInertiaLocalFrame, angularInertiaLocalFrame);\n this.massOnly = false;\n return this;\n }\n\n /**\n * Allow translation of this rigid-body only along specific axes.\n * @param translationsEnabledX - Are translations along the X axis enabled?\n * @param translationsEnabledY - Are translations along the y axis enabled?\n * @param translationsEnabledZ - Are translations along the Z axis enabled?\n */\n public enabledTranslations(\n translationsEnabledX: boolean,\n translationsEnabledY: boolean,\n translationsEnabledZ: boolean,\n ): RigidBodyDesc {\n this.translationsEnabledX = translationsEnabledX;\n this.translationsEnabledY = translationsEnabledY;\n this.translationsEnabledZ = translationsEnabledZ;\n return this;\n }\n\n /**\n * Allow translation of this rigid-body only along specific axes.\n * @param translationsEnabledX - Are translations along the X axis enabled?\n * @param translationsEnabledY - Are translations along the y axis enabled?\n * @param translationsEnabledZ - Are translations along the Z axis enabled?\n * @deprecated use `this.enabledTranslations` with the same arguments instead.\n */\n public restrictTranslations(\n translationsEnabledX: boolean,\n translationsEnabledY: boolean,\n translationsEnabledZ: boolean,\n ): RigidBodyDesc {\n return this.enabledTranslations(\n translationsEnabledX,\n translationsEnabledY,\n translationsEnabledZ,\n );\n }\n\n /**\n * Locks all translations that would have resulted from forces on\n * the created rigid-body.\n */\n public lockTranslations(): RigidBodyDesc {\n return this.enabledTranslations(false, false, false);\n }\n\n /**\n * Allow rotation of this rigid-body only along specific axes.\n * @param rotationsEnabledX - Are rotations along the X axis enabled?\n * @param rotationsEnabledY - Are rotations along the y axis enabled?\n * @param rotationsEnabledZ - Are rotations along the Z axis enabled?\n */\n public enabledRotations(\n rotationsEnabledX: boolean,\n rotationsEnabledY: boolean,\n rotationsEnabledZ: boolean,\n ): RigidBodyDesc {\n this.rotationsEnabledX = rotationsEnabledX;\n this.rotationsEnabledY = rotationsEnabledY;\n this.rotationsEnabledZ = rotationsEnabledZ;\n return this;\n }\n\n /**\n * Allow rotation of this rigid-body only along specific axes.\n * @param rotationsEnabledX - Are rotations along the X axis enabled?\n * @param rotationsEnabledY - Are rotations along the y axis enabled?\n * @param rotationsEnabledZ - Are rotations along the Z axis enabled?\n * @deprecated use `this.enabledRotations` with the same arguments instead.\n */\n public restrictRotations(\n rotationsEnabledX: boolean,\n rotationsEnabledY: boolean,\n rotationsEnabledZ: boolean,\n ): RigidBodyDesc {\n return this.enabledRotations(rotationsEnabledX, rotationsEnabledY, rotationsEnabledZ);\n }\n\n /**\n * Locks all rotations that would have resulted from forces on\n * the created rigid-body.\n */\n public lockRotations(): RigidBodyDesc {\n return this.restrictRotations(false, false, false);\n }\n\n /**\n * Sets the linear damping of the rigid-body to create.\n *\n * This will progressively slowdown the translational movement of the rigid-body.\n *\n * @param damping - The angular damping coefficient. Should be >= 0. The higher this\n * value is, the stronger the translational slowdown will be.\n */\n public setLinearDamping(damping: number): RigidBodyDesc {\n this.linearDamping = damping;\n return this;\n }\n\n /**\n * Sets the angular damping of the rigid-body to create.\n *\n * This will progressively slowdown the rotational movement of the rigid-body.\n *\n * @param damping - The angular damping coefficient. Should be >= 0. The higher this\n * value is, the stronger the rotational slowdown will be.\n */\n public setAngularDamping(damping: number): RigidBodyDesc {\n this.angularDamping = damping;\n return this;\n }\n\n /**\n * Sets whether or not the rigid-body to create can sleep.\n *\n * @param can - true if the rigid-body can sleep, false if it can't.\n */\n public setCanSleep(can: boolean): RigidBodyDesc {\n this.canSleep = can;\n return this;\n }\n\n /**\n * Sets whether or not the rigid-body is to be created asleep.\n *\n * @param can - true if the rigid-body should be in sleep, default false.\n */\n setSleeping(sleeping: boolean): RigidBodyDesc {\n this.sleeping = sleeping;\n return this;\n }\n\n /**\n * Sets whether Continuous Collision Detection (CCD) is enabled for this rigid-body.\n *\n * @param enabled - true if the rigid-body has CCD enabled.\n */\n public setCcdEnabled(enabled: boolean): RigidBodyDesc {\n this.ccdEnabled = enabled;\n return this;\n }\n\n /**\n * Sets the maximum prediction distance Soft Continuous Collision-Detection.\n *\n * When set to 0, soft-CCD is disabled. Soft-CCD helps prevent tunneling especially of\n * slow-but-thin to moderately fast objects. The soft CCD prediction distance indicates how\n * far in the object’s path the CCD algorithm is allowed to inspect. Large values can impact\n * performance badly by increasing the work needed from the broad-phase.\n *\n * It is a generally cheaper variant of regular CCD (that can be enabled with\n * `RigidBodyDesc::setCcdEnabled` since it relies on predictive constraints instead of\n * shape-cast and substeps.\n */\n public setSoftCcdPrediction(distance: number): RigidBodyDesc {\n this.softCcdPrediction = distance;\n return this;\n }\n\n /**\n * Sets the user-defined object of this rigid-body.\n *\n * @param userData - The user-defined object to set.\n */\n public setUserData(data?: unknown): RigidBodyDesc {\n this.userData = data;\n return this;\n }\n}\n","export class Coarena<T> {\n fconv: Float64Array;\n uconv: Uint32Array;\n data: Array<T | null>;\n size: number;\n\n public constructor() {\n this.fconv = new Float64Array(1);\n this.uconv = new Uint32Array(this.fconv.buffer);\n this.data = new Array<T | null>();\n this.size = 0;\n }\n\n public set(handle: number, data: T) {\n let i = this.index(handle);\n while (this.data.length <= i) {\n this.data.push(null);\n }\n\n if (this.data[i] == null) this.size += 1;\n this.data[i] = data;\n }\n\n public len(): number {\n return this.size;\n }\n\n public delete(handle: number) {\n let i = this.index(handle);\n if (i < this.data.length) {\n if (this.data[i] != null) this.size -= 1;\n this.data[i] = null;\n }\n }\n\n public clear() {\n this.data = new Array<T | null>();\n }\n\n public get(handle: number): T | null {\n let i = this.index(handle);\n if (i < this.data.length) {\n return this.data[i];\n } else {\n return null;\n }\n }\n\n public forEach(f: (elt: T) => void) {\n for (const elt of this.data) {\n if (elt != null) f(elt);\n }\n }\n\n public getAll(): Array<T> {\n return this.data.filter((elt) => elt != null);\n }\n\n private index(handle: number): number {\n /// Extracts the index part of a handle (the lower 32 bits).\n /// This is done by first injecting the handle into an Float64Array\n /// which is itself injected into an Uint32Array (at construction time).\n /// The 0-th value of the Uint32Array will become the `number` integer\n /// representation of the lower 32 bits.\n /// Also `this.uconv[1]` then contains the generation number as a `number`,\n /// which we don’t really need.\n this.fconv[0] = handle;\n return this.uconv[0];\n }\n}\n","import {Coarena} from \"../coarena\";\nimport {ColliderSet} from \"../geometry\";\nimport {VectorOps, RotationOps} from \"../math\";\nimport {RawRigidBodySet, RawRigidBodyType} from \"../raw\";\nimport {ImpulseJointSet} from \"./impulse_joint_set\";\nimport {IslandManager} from \"./island_manager\";\nimport {MultibodyJointSet} from \"./multibody_joint_set\";\nimport {RigidBody, RigidBodyDesc, RigidBodyHandle} from \"./rigid_body\";\n\n/**\n * A set of rigid bodies that can be handled by a physics pipeline.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `rigidBodySet.free()`\n * once you are done using it (and all the rigid-bodies it created).\n */\nexport class RigidBodySet {\n raw: RawRigidBodySet;\n private map: Coarena<RigidBody>;\n\n /**\n * Release the WASM memory occupied by this rigid-body set.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n\n if (!!this.map) {\n this.map.clear();\n }\n this.map = undefined!;\n }\n\n constructor(raw?: RawRigidBodySet) {\n this.raw = raw || new RawRigidBodySet();\n this.map = new Coarena<RigidBody>();\n // deserialize\n if (raw) {\n raw.forEachRigidBodyHandle((handle: RigidBodyHandle) => {\n this.map.set(handle, new RigidBody(raw, null!, handle));\n });\n }\n }\n\n /**\n * Internal method, do not call this explicitly.\n */\n public finalizeDeserialization(colliderSet: ColliderSet) {\n this.map.forEach((rb) => rb.finalizeDeserialization(colliderSet));\n }\n\n /**\n * Creates a new rigid-body and return its integer handle.\n *\n * @param desc - The description of the rigid-body to create.\n */\n public createRigidBody(colliderSet: ColliderSet, desc: RigidBodyDesc): RigidBody {\n let rawTra = VectorOps.intoRaw(desc.translation);\n let rawRot = RotationOps.intoRaw(desc.rotation);\n let rawLv = VectorOps.intoRaw(desc.linvel);\n let rawCom = VectorOps.intoRaw(desc.centerOfMass);\n\n let rawAv = VectorOps.intoRaw(desc.angvel);\n let rawPrincipalInertia = VectorOps.intoRaw(desc.principalAngularInertia);\n let rawInertiaFrame = RotationOps.intoRaw(desc.angularInertiaLocalFrame);\n\n let handle = this.raw.createRigidBody(\n desc.enabled,\n rawTra,\n rawRot,\n desc.gravityScale,\n desc.mass,\n desc.massOnly,\n rawCom,\n rawLv,\n rawAv,\n rawPrincipalInertia,\n rawInertiaFrame,\n desc.translationsEnabledX,\n desc.translationsEnabledY,\n desc.translationsEnabledZ,\n desc.rotationsEnabledX,\n desc.rotationsEnabledY,\n desc.rotationsEnabledZ,\n desc.linearDamping,\n desc.angularDamping,\n desc.status as number as RawRigidBodyType,\n desc.canSleep,\n desc.sleeping,\n desc.softCcdPrediction,\n desc.ccdEnabled,\n desc.dominanceGroup,\n desc.additionalSolverIterations,\n );\n\n rawTra.free();\n rawRot.free();\n rawLv.free();\n rawCom.free();\n\n rawAv.free();\n rawPrincipalInertia.free();\n rawInertiaFrame.free();\n\n const body = new RigidBody(this.raw, colliderSet, handle);\n body.userData = desc.userData;\n\n this.map.set(handle, body);\n\n return body;\n }\n\n /**\n * Removes a rigid-body from this set.\n *\n * This will also remove all the colliders and joints attached to the rigid-body.\n *\n * @param handle - The integer handle of the rigid-body to remove.\n * @param colliders - The set of colliders that may contain colliders attached to the removed rigid-body.\n * @param impulseJoints - The set of impulse joints that may contain joints attached to the removed rigid-body.\n * @param multibodyJoints - The set of multibody joints that may contain joints attached to the removed rigid-body.\n */\n public remove(\n handle: RigidBodyHandle,\n islands: IslandManager,\n colliders: ColliderSet,\n impulseJoints: ImpulseJointSet,\n multibodyJoints: MultibodyJointSet,\n ) {\n // Unmap the entities that will be removed automatically because of the rigid-body removals.\n for (let i = 0; i < this.raw.rbNumColliders(handle); i += 1) {\n colliders.unmap(this.raw.rbCollider(handle, i));\n }\n\n impulseJoints.forEachJointHandleAttachedToRigidBody(handle, (handle) =>\n impulseJoints.unmap(handle),\n );\n multibodyJoints.forEachJointHandleAttachedToRigidBody(handle, (handle) =>\n multibodyJoints.unmap(handle),\n );\n\n // Remove the rigid-body.\n this.raw.remove(handle, islands.raw, colliders.raw, impulseJoints.raw, multibodyJoints.raw);\n this.map.delete(handle);\n }\n\n /**\n * The number of rigid-bodies on this set.\n */\n public len(): number {\n return this.map.len();\n }\n\n /**\n * Does this set contain a rigid-body with the given handle?\n *\n * @param handle - The rigid-body handle to check.\n */\n public contains(handle: RigidBodyHandle): boolean {\n return this.get(handle) != null;\n }\n\n /**\n * Gets the rigid-body with the given handle.\n *\n * @param handle - The handle of the rigid-body to retrieve.\n */\n public get(handle: RigidBodyHandle): RigidBody | null {\n return this.map.get(handle);\n }\n\n /**\n * Applies the given closure to each rigid-body contained by this set.\n *\n * @param f - The closure to apply.\n */\n public forEach(f: (body: RigidBody) => void) {\n this.map.forEach(f);\n }\n\n /**\n * Applies the given closure to each active rigid-bodies contained by this set.\n *\n * A rigid-body is active if it is not sleeping, i.e., if it moved recently.\n *\n * @param f - The closure to apply.\n */\n public forEachActiveRigidBody(islands: IslandManager, f: (body: RigidBody) => void) {\n islands.forEachActiveRigidBodyHandle((handle) => {\n f(this.get(handle)!);\n });\n }\n\n /**\n * Gets all rigid-bodies in the list.\n *\n * @returns rigid-bodies list.\n */\n public getAll(): RigidBody[] {\n return this.map.getAll();\n }\n}\n","import {RawIntegrationParameters} from \"../raw\";\n\nexport class IntegrationParameters {\n raw: RawIntegrationParameters;\n\n constructor(raw?: RawIntegrationParameters) {\n this.raw = raw || new RawIntegrationParameters();\n }\n\n /**\n * Free the WASM memory used by these integration parameters.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n /**\n * The timestep length (default: `1.0 / 60.0`)\n */\n get dt(): number {\n return this.raw.dt;\n }\n\n /**\n * The Error Reduction Parameter in `[0, 1]` is the proportion of\n * the positional error to be corrected at each time step (default: `0.2`).\n */\n get contact_erp(): number {\n return this.raw.contact_erp;\n }\n\n get lengthUnit(): number {\n return this.raw.lengthUnit;\n }\n\n /**\n * Normalized amount of penetration the engine won’t attempt to correct (default: `0.001m`).\n *\n * This threshold considered by the physics engine is this value multiplied by the `lengthUnit`.\n */\n get normalizedAllowedLinearError(): number {\n return this.raw.normalizedAllowedLinearError;\n }\n\n /**\n * The maximal normalized distance separating two objects that will generate predictive contacts (default: `0.002`).\n *\n * This threshold considered by the physics engine is this value multiplied by the `lengthUnit`.\n */\n get normalizedPredictionDistance(): number {\n return this.raw.normalizedPredictionDistance;\n }\n\n /**\n * The number of solver iterations run by the constraints solver for calculating forces (default: `4`).\n */\n get numSolverIterations(): number {\n return this.raw.numSolverIterations;\n }\n\n /**\n * Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).\n */\n get numInternalPgsIterations(): number {\n return this.raw.numInternalPgsIterations;\n }\n\n /**\n * Minimum number of dynamic bodies in each active island (default: `128`).\n */\n get minIslandSize(): number {\n return this.raw.minIslandSize;\n }\n\n /**\n * Maximum number of substeps performed by the solver (default: `1`).\n */\n get maxCcdSubsteps(): number {\n return this.raw.maxCcdSubsteps;\n }\n\n set dt(value: number) {\n this.raw.dt = value;\n }\n\n set contact_natural_frequency(value: number) {\n this.raw.contact_natural_frequency = value;\n }\n\n set lengthUnit(value: number) {\n this.raw.lengthUnit = value;\n }\n\n set normalizedAllowedLinearError(value: number) {\n this.raw.normalizedAllowedLinearError = value;\n }\n\n set normalizedPredictionDistance(value: number) {\n this.raw.normalizedPredictionDistance = value;\n }\n\n /**\n * Sets the number of solver iterations run by the constraints solver for calculating forces (default: `4`).\n */\n set numSolverIterations(value: number) {\n this.raw.numSolverIterations = value;\n }\n\n /**\n * Sets the number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).\n */\n set numInternalPgsIterations(value: number) {\n this.raw.numInternalPgsIterations = value;\n }\n\n set minIslandSize(value: number) {\n this.raw.minIslandSize = value;\n }\n\n set maxCcdSubsteps(value: number) {\n this.raw.maxCcdSubsteps = value;\n }\n}\n","import {Rotation, Vector, VectorOps, RotationOps} from \"../math\";\nimport {\n RawGenericJoint,\n RawImpulseJointSet,\n RawJointAxis,\n RawJointType,\n RawMotorModel,\n} from \"../raw\";\nimport {RigidBody} from \"./rigid_body\";\nimport {RigidBodySet} from \"./rigid_body_set\";\n\n/**\n * The integer identifier of a collider added to a `ColliderSet`.\n */\nexport type ImpulseJointHandle = number;\n\n/**\n * An enum grouping all possible types of joints:\n *\n * - `Revolute`: A revolute joint that removes all degrees of freedom between the affected\n * bodies except for the rotation along one axis.\n * - `Fixed`: A fixed joint that removes all relative degrees of freedom between the affected bodies.\n * - `Prismatic`: A prismatic joint that removes all degrees of freedom between the affected\n * bodies except for the translation along one axis.\n * - `Spherical`: (3D only) A spherical joint that removes all relative linear degrees of freedom between the affected bodies.\n * - `Generic`: (3D only) A joint with customizable degrees of freedom, allowing any of the 6 axes to be locked.\n */\nexport enum JointType {\n Revolute,\n Fixed,\n Prismatic,\n Rope,\n Spring,\n Spherical,\n Generic,\n}\n\nexport enum MotorModel {\n AccelerationBased,\n ForceBased,\n}\n\n/**\n * An enum representing the possible joint axes of a generic joint.\n * They can be ORed together, like:\n * JointAxesMask.LinX || JointAxesMask.LinY\n * to get a joint that is only free in the X and Y translational (positional) axes.\n *\n * Possible free axes are:\n *\n * - `X`: X translation axis\n * - `Y`: Y translation axis\n * - `Z`: Z translation axis\n * - `AngX`: X angular rotation axis\n * - `AngY`: Y angular rotations axis\n * - `AngZ`: Z angular rotation axis\n */\nexport enum JointAxesMask {\n LinX = 1 << 0,\n LinY = 1 << 1,\n LinZ = 1 << 2,\n AngX = 1 << 3,\n AngY = 1 << 4,\n AngZ = 1 << 5,\n}\n\nexport class ImpulseJoint {\n protected rawSet: RawImpulseJointSet; // The ImpulseJoint won't need to free this.\n protected bodySet: RigidBodySet; // The ImpulseJoint won’t need to free this.\n handle: ImpulseJointHandle;\n\n constructor(rawSet: RawImpulseJointSet, bodySet: RigidBodySet, handle: ImpulseJointHandle) {\n this.rawSet = rawSet;\n this.bodySet = bodySet;\n this.handle = handle;\n }\n\n public static newTyped(\n rawSet: RawImpulseJointSet,\n bodySet: RigidBodySet,\n handle: ImpulseJointHandle,\n ): ImpulseJoint {\n switch (rawSet.jointType(handle)) {\n case RawJointType.Revolute:\n return new RevoluteImpulseJoint(rawSet, bodySet, handle);\n case RawJointType.Prismatic:\n return new PrismaticImpulseJoint(rawSet, bodySet, handle);\n case RawJointType.Fixed:\n return new FixedImpulseJoint(rawSet, bodySet, handle);\n case RawJointType.Spring:\n return new SpringImpulseJoint(rawSet, bodySet, handle);\n case RawJointType.Rope:\n return new RopeImpulseJoint(rawSet, bodySet, handle);\n case RawJointType.Spherical:\n return new SphericalImpulseJoint(rawSet, bodySet, handle);\n case RawJointType.Generic:\n return new GenericImpulseJoint(rawSet, bodySet, handle);\n default:\n return new ImpulseJoint(rawSet, bodySet, handle);\n }\n }\n\n /** @internal */\n public finalizeDeserialization(bodySet: RigidBodySet) {\n this.bodySet = bodySet;\n }\n\n /**\n * Checks if this joint is still valid (i.e. that it has\n * not been deleted from the joint set yet).\n */\n public isValid(): boolean {\n return this.rawSet.contains(this.handle);\n }\n\n /**\n * The first rigid-body this joint it attached to.\n */\n public body1(): RigidBody {\n return this.bodySet.get(this.rawSet.jointBodyHandle1(this.handle))!;\n }\n\n /**\n * The second rigid-body this joint is attached to.\n */\n public body2(): RigidBody {\n return this.bodySet.get(this.rawSet.jointBodyHandle2(this.handle))!;\n }\n\n /**\n * The type of this joint given as a string.\n */\n public type(): JointType {\n return this.rawSet.jointType(this.handle) as number as JointType;\n }\n\n /**\n * The rotation quaternion that aligns this joint's first local axis to the `x` axis.\n */\n public frameX1(): Rotation {\n return RotationOps.fromRaw(this.rawSet.jointFrameX1(this.handle))!;\n }\n\n /**\n * The rotation matrix that aligns this joint's second local axis to the `x` axis.\n */\n public frameX2(): Rotation {\n return RotationOps.fromRaw(this.rawSet.jointFrameX2(this.handle))!;\n }\n\n /**\n * The position of the first anchor of this joint.\n *\n * The first anchor gives the position of the application point on the\n * local frame of the first rigid-body it is attached to.\n */\n public anchor1(): Vector {\n return VectorOps.fromRaw(this.rawSet.jointAnchor1(this.handle))!;\n }\n\n /**\n * The position of the second anchor of this joint.\n *\n * The second anchor gives the position of the application point on the\n * local frame of the second rigid-body it is attached to.\n */\n public anchor2(): Vector {\n return VectorOps.fromRaw(this.rawSet.jointAnchor2(this.handle))!;\n }\n\n /**\n * Sets the position of the first anchor of this joint.\n *\n * The first anchor gives the position of the application point on the\n * local frame of the first rigid-body it is attached to.\n */\n public setAnchor1(newPos: Vector) {\n const rawPoint = VectorOps.intoRaw(newPos);\n this.rawSet.jointSetAnchor1(this.handle, rawPoint);\n rawPoint.free();\n }\n\n /**\n * Sets the position of the second anchor of this joint.\n *\n * The second anchor gives the position of the application point on the\n * local frame of the second rigid-body it is attached to.\n */\n public setAnchor2(newPos: Vector) {\n const rawPoint = VectorOps.intoRaw(newPos);\n this.rawSet.jointSetAnchor2(this.handle, rawPoint);\n rawPoint.free();\n }\n\n /**\n * Controls whether contacts are computed between colliders attached\n * to the rigid-bodies linked by this joint.\n */\n public setContactsEnabled(enabled: boolean) {\n this.rawSet.jointSetContactsEnabled(this.handle, enabled);\n }\n\n /**\n * Indicates if contacts are enabled between colliders attached\n * to the rigid-bodies linked by this joint.\n */\n public contactsEnabled(): boolean {\n return this.rawSet.jointContactsEnabled(this.handle);\n }\n}\n\nexport class UnitImpulseJoint extends ImpulseJoint {\n /**\n * The axis left free by this joint.\n */\n protected rawAxis(): RawJointAxis {\n throw new Error(\"rawAxis must be implemented by subclasses\");\n }\n\n /**\n * Are the limits enabled for this joint?\n */\n public limitsEnabled(): boolean {\n return this.rawSet.jointLimitsEnabled(this.handle, this.rawAxis());\n }\n\n /**\n * The min limit of this joint.\n */\n public limitsMin(): number {\n return this.rawSet.jointLimitsMin(this.handle, this.rawAxis());\n }\n\n /**\n * The max limit of this joint.\n */\n public limitsMax(): number {\n return this.rawSet.jointLimitsMax(this.handle, this.rawAxis());\n }\n\n /**\n * Sets the limits of this joint.\n *\n * @param min - The minimum bound of this joint’s free coordinate.\n * @param max - The maximum bound of this joint’s free coordinate.\n */\n public setLimits(min: number, max: number) {\n this.rawSet.jointSetLimits(this.handle, this.rawAxis(), min, max);\n }\n\n public configureMotorModel(model: MotorModel) {\n this.rawSet.jointConfigureMotorModel(\n this.handle,\n this.rawAxis(),\n model as number as RawMotorModel,\n );\n }\n\n public configureMotorVelocity(targetVel: number, factor: number) {\n this.rawSet.jointConfigureMotorVelocity(this.handle, this.rawAxis(), targetVel, factor);\n }\n\n public configureMotorPosition(targetPos: number, stiffness: number, damping: number) {\n this.rawSet.jointConfigureMotorPosition(\n this.handle,\n this.rawAxis(),\n targetPos,\n stiffness,\n damping,\n );\n }\n\n public configureMotor(\n targetPos: number,\n targetVel: number,\n stiffness: number,\n damping: number,\n ) {\n this.rawSet.jointConfigureMotor(\n this.handle,\n this.rawAxis(),\n targetPos,\n targetVel,\n stiffness,\n damping,\n );\n }\n}\n\nexport class FixedImpulseJoint extends ImpulseJoint {}\n\nexport class RopeImpulseJoint extends ImpulseJoint {}\n\nexport class SpringImpulseJoint extends ImpulseJoint {}\n\nexport class PrismaticImpulseJoint extends UnitImpulseJoint {\n public rawAxis(): RawJointAxis {\n return RawJointAxis.LinX;\n }\n}\n\nexport class RevoluteImpulseJoint extends UnitImpulseJoint {\n public rawAxis(): RawJointAxis {\n return RawJointAxis.AngX;\n }\n}\n\nexport class GenericImpulseJoint extends ImpulseJoint {}\n\nexport class SphericalImpulseJoint extends ImpulseJoint {\n /* Unsupported by this alpha release.\n public configureMotorModel(model: MotorModel) {\n this.rawSet.jointConfigureMotorModel(this.handle, model);\n }\n\n public configureMotorVelocity(targetVel: Vector, factor: number) {\n this.rawSet.jointConfigureBallMotorVelocity(this.handle, targetVel.x, targetVel.y, targetVel.z, factor);\n }\n\n public configureMotorPosition(targetPos: Quaternion, stiffness: number, damping: number) {\n this.rawSet.jointConfigureBallMotorPosition(this.handle, targetPos.w, targetPos.x, targetPos.y, targetPos.z, stiffness, damping);\n }\n\n public configureMotor(targetPos: Quaternion, targetVel: Vector, stiffness: number, damping: number) {\n this.rawSet.jointConfigureBallMotor(this.handle,\n targetPos.w, targetPos.x, targetPos.y, targetPos.z,\n targetVel.x, targetVel.y, targetVel.z,\n stiffness, damping);\n }\n */\n}\n\nexport class JointData {\n anchor1!: Vector;\n anchor2!: Vector;\n axis!: Vector;\n frame1!: Rotation;\n frame2!: Rotation;\n jointType!: JointType;\n limitsEnabled!: boolean;\n limits!: Array<number>;\n axesMask!: JointAxesMask;\n stiffness!: number;\n damping!: number;\n length!: number;\n\n private constructor() {}\n\n /**\n * Creates a new joint descriptor that builds a Fixed joint.\n *\n * A fixed joint removes all the degrees of freedom between the affected bodies, ensuring their\n * anchor and local frames coincide in world-space.\n *\n * @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param frame1 - The reference orientation of the joint wrt. the first rigid-body.\n * @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param frame2 - The reference orientation of the joint wrt. the second rigid-body.\n */\n public static fixed(\n anchor1: Vector,\n frame1: Rotation,\n anchor2: Vector,\n frame2: Rotation,\n ): JointData {\n let res = new JointData();\n res.anchor1 = anchor1;\n res.anchor2 = anchor2;\n res.frame1 = frame1;\n res.frame2 = frame2;\n res.jointType = JointType.Fixed;\n return res;\n }\n\n public static spring(\n rest_length: number,\n stiffness: number,\n damping: number,\n anchor1: Vector,\n anchor2: Vector,\n ): JointData {\n let res = new JointData();\n res.anchor1 = anchor1;\n res.anchor2 = anchor2;\n res.length = rest_length;\n res.stiffness = stiffness;\n res.damping = damping;\n res.jointType = JointType.Spring;\n return res;\n }\n\n public static rope(length: number, anchor1: Vector, anchor2: Vector): JointData {\n let res = new JointData();\n res.anchor1 = anchor1;\n res.anchor2 = anchor2;\n res.length = length;\n res.jointType = JointType.Rope;\n return res;\n }\n\n /**\n * Create a new joint descriptor that builds generic joints.\n *\n * A generic joint allows customizing its degrees of freedom\n * by supplying a mask of the joint axes that should remain locked.\n *\n * @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param axis - The X axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.\n * @param axesMask - Mask representing the locked axes of the joint. You can use logical OR to select these from\n * the JointAxesMask enum. For example, passing (JointAxesMask.AngX || JointAxesMask.AngY) will\n * create a joint locked in the X and Y rotational axes.\n */\n public static generic(\n anchor1: Vector,\n anchor2: Vector,\n axis: Vector,\n axesMask: JointAxesMask,\n ): JointData {\n let res = new JointData();\n res.anchor1 = anchor1;\n res.anchor2 = anchor2;\n res.axis = axis;\n res.axesMask = axesMask;\n res.jointType = JointType.Generic;\n return res;\n }\n\n /**\n * Create a new joint descriptor that builds spherical joints.\n *\n * A spherical joint allows three relative rotational degrees of freedom\n * by preventing any relative translation between the anchors of the\n * two attached rigid-bodies.\n *\n * @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n */\n public static spherical(anchor1: Vector, anchor2: Vector): JointData {\n let res = new JointData();\n res.anchor1 = anchor1;\n res.anchor2 = anchor2;\n res.jointType = JointType.Spherical;\n return res;\n }\n\n /**\n * Creates a new joint descriptor that builds a Prismatic joint.\n *\n * A prismatic joint removes all the degrees of freedom between the\n * affected bodies, except for the translation along one axis.\n *\n * @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param axis - Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.\n */\n public static prismatic(anchor1: Vector, anchor2: Vector, axis: Vector): JointData {\n let res = new JointData();\n res.anchor1 = anchor1;\n res.anchor2 = anchor2;\n res.axis = axis;\n res.jointType = JointType.Prismatic;\n return res;\n }\n\n /**\n * Create a new joint descriptor that builds Revolute joints.\n *\n * A revolute joint removes all degrees of freedom between the affected\n * bodies except for the rotation along one axis.\n *\n * @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the\n * local-space of the rigid-body.\n * @param axis - Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.\n */\n public static revolute(anchor1: Vector, anchor2: Vector, axis: Vector): JointData {\n let res = new JointData();\n res.anchor1 = anchor1;\n res.anchor2 = anchor2;\n res.axis = axis;\n res.jointType = JointType.Revolute;\n return res;\n }\n\n public intoRaw(): RawGenericJoint {\n let rawA1 = VectorOps.intoRaw(this.anchor1);\n let rawA2 = VectorOps.intoRaw(this.anchor2);\n let rawAx;\n let result;\n let limitsEnabled = false;\n let limitsMin = 0.0;\n let limitsMax = 0.0;\n\n switch (this.jointType) {\n case JointType.Fixed:\n let rawFra1 = RotationOps.intoRaw(this.frame1);\n let rawFra2 = RotationOps.intoRaw(this.frame2);\n result = RawGenericJoint.fixed(rawA1, rawFra1, rawA2, rawFra2);\n rawFra1.free();\n rawFra2.free();\n break;\n case JointType.Spring:\n result = RawGenericJoint.spring(\n this.length,\n this.stiffness,\n this.damping,\n rawA1,\n rawA2,\n );\n break;\n case JointType.Rope:\n result = RawGenericJoint.rope(this.length, rawA1, rawA2);\n break;\n case JointType.Prismatic:\n rawAx = VectorOps.intoRaw(this.axis);\n\n if (!!this.limitsEnabled) {\n limitsEnabled = true;\n limitsMin = this.limits[0];\n limitsMax = this.limits[1];\n }\n\n result = RawGenericJoint.prismatic(\n rawA1,\n rawA2,\n rawAx,\n limitsEnabled,\n limitsMin,\n limitsMax,\n );\n\n rawAx.free();\n break;\n case JointType.Generic:\n rawAx = VectorOps.intoRaw(this.axis);\n // implicit type cast: axesMask is a JointAxesMask bitflag enum,\n // we're treating it as a u8 on the Rust side\n let rawAxesMask = this.axesMask;\n result = RawGenericJoint.generic(rawA1, rawA2, rawAx, rawAxesMask);\n break;\n case JointType.Spherical:\n result = RawGenericJoint.spherical(rawA1, rawA2);\n break;\n case JointType.Revolute:\n rawAx = VectorOps.intoRaw(this.axis);\n result = RawGenericJoint.revolute(rawA1, rawA2, rawAx);\n rawAx.free();\n break;\n }\n\n rawA1.free();\n rawA2.free();\n\n return result!;\n }\n}\n","import {Coarena} from \"../coarena\";\nimport {RawImpulseJointSet} from \"../raw\";\nimport {ImpulseJoint, ImpulseJointHandle, JointData} from \"./impulse_joint\";\nimport {RigidBodyHandle} from \"./rigid_body\";\nimport {RigidBodySet} from \"./rigid_body_set\";\n\n/**\n * A set of joints.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `jointSet.free()`\n * once you are done using it (and all the joints it created).\n */\nexport class ImpulseJointSet {\n raw: RawImpulseJointSet;\n private map: Coarena<ImpulseJoint>;\n\n /**\n * Release the WASM memory occupied by this joint set.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n\n if (!!this.map) {\n this.map.clear();\n }\n this.map = undefined!;\n }\n\n constructor(raw?: RawImpulseJointSet) {\n this.raw = raw || new RawImpulseJointSet();\n this.map = new Coarena<ImpulseJoint>();\n // Initialize the map with the existing elements, if any.\n if (raw) {\n raw.forEachJointHandle((handle: ImpulseJointHandle) => {\n this.map.set(handle, ImpulseJoint.newTyped(raw, null!, handle));\n });\n }\n }\n\n /** @internal */\n public finalizeDeserialization(bodies: RigidBodySet) {\n this.map.forEach((joint) => joint.finalizeDeserialization(bodies));\n }\n\n /**\n * Creates a new joint and return its integer handle.\n *\n * @param bodies - The set of rigid-bodies containing the bodies the joint is attached to.\n * @param desc - The joint's parameters.\n * @param parent1 - The handle of the first rigid-body this joint is attached to.\n * @param parent2 - The handle of the second rigid-body this joint is attached to.\n * @param wakeUp - Should the attached rigid-bodies be awakened?\n */\n public createJoint(\n bodies: RigidBodySet,\n desc: JointData,\n parent1: RigidBodyHandle,\n parent2: RigidBodyHandle,\n wakeUp: boolean,\n ): ImpulseJoint {\n const rawParams = desc.intoRaw();\n const handle = this.raw.createJoint(rawParams, parent1, parent2, wakeUp);\n rawParams.free();\n let joint = ImpulseJoint.newTyped(this.raw, bodies, handle);\n this.map.set(handle, joint);\n return joint;\n }\n\n /**\n * Remove a joint from this set.\n *\n * @param handle - The integer handle of the joint.\n * @param wakeUp - If `true`, the rigid-bodies attached by the removed joint will be woken-up automatically.\n */\n public remove(handle: ImpulseJointHandle, wakeUp: boolean) {\n this.raw.remove(handle, wakeUp);\n this.unmap(handle);\n }\n\n /**\n * Calls the given closure with the integer handle of each impulse joint attached to this rigid-body.\n *\n * @param f - The closure called with the integer handle of each impulse joint attached to the rigid-body.\n */\n public forEachJointHandleAttachedToRigidBody(\n handle: RigidBodyHandle,\n f: (handle: ImpulseJointHandle) => void,\n ) {\n this.raw.forEachJointAttachedToRigidBody(handle, f);\n }\n\n /**\n * Internal function, do not call directly.\n * @param handle\n */\n public unmap(handle: ImpulseJointHandle) {\n this.map.delete(handle);\n }\n\n /**\n * The number of joints on this set.\n */\n public len(): number {\n return this.map.len();\n }\n\n /**\n * Does this set contain a joint with the given handle?\n *\n * @param handle - The joint handle to check.\n */\n public contains(handle: ImpulseJointHandle): boolean {\n return this.get(handle) != null;\n }\n\n /**\n * Gets the joint with the given handle.\n *\n * Returns `null` if no joint with the specified handle exists.\n *\n * @param handle - The integer handle of the joint to retrieve.\n */\n public get(handle: ImpulseJointHandle): ImpulseJoint | null {\n return this.map.get(handle);\n }\n\n /**\n * Applies the given closure to each joint contained by this set.\n *\n * @param f - The closure to apply.\n */\n public forEach(f: (joint: ImpulseJoint) => void) {\n this.map.forEach(f);\n }\n\n /**\n * Gets all joints in the list.\n *\n * @returns joint list.\n */\n public getAll(): ImpulseJoint[] {\n return this.map.getAll();\n }\n}\n","import {RawJointAxis, RawJointType, RawMultibodyJointSet} from \"../raw\";\n\n/**\n * The integer identifier of a collider added to a `ColliderSet`.\n */\nexport type MultibodyJointHandle = number;\n\nexport class MultibodyJoint {\n protected rawSet: RawMultibodyJointSet; // The MultibodyJoint won't need to free this.\n handle: MultibodyJointHandle;\n\n constructor(rawSet: RawMultibodyJointSet, handle: MultibodyJointHandle) {\n this.rawSet = rawSet;\n this.handle = handle;\n }\n\n public static newTyped(\n rawSet: RawMultibodyJointSet,\n handle: MultibodyJointHandle,\n ): MultibodyJoint {\n switch (rawSet.jointType(handle)) {\n case RawJointType.Revolute:\n return new RevoluteMultibodyJoint(rawSet, handle);\n case RawJointType.Prismatic:\n return new PrismaticMultibodyJoint(rawSet, handle);\n case RawJointType.Fixed:\n return new FixedMultibodyJoint(rawSet, handle);\n case RawJointType.Spherical:\n return new SphericalMultibodyJoint(rawSet, handle);\n default:\n return new MultibodyJoint(rawSet, handle);\n }\n }\n\n /**\n * Checks if this joint is still valid (i.e. that it has\n * not been deleted from the joint set yet).\n */\n public isValid(): boolean {\n return this.rawSet.contains(this.handle);\n }\n\n // /**\n // * The unique integer identifier of the first rigid-body this joint it attached to.\n // */\n // public bodyHandle1(): RigidBodyHandle {\n // return this.rawSet.jointBodyHandle1(this.handle);\n // }\n //\n // /**\n // * The unique integer identifier of the second rigid-body this joint is attached to.\n // */\n // public bodyHandle2(): RigidBodyHandle {\n // return this.rawSet.jointBodyHandle2(this.handle);\n // }\n //\n // /**\n // * The type of this joint given as a string.\n // */\n // public type(): JointType {\n // return this.rawSet.jointType(this.handle);\n // }\n //\n // /**\n // * The rotation quaternion that aligns this joint's first local axis to the `x` axis.\n // */\n // public frameX1(): Rotation {\n // return RotationOps.fromRaw(this.rawSet.jointFrameX1(this.handle));\n // }\n //\n //\n // /**\n // * The rotation matrix that aligns this joint's second local axis to the `x` axis.\n // */\n // public frameX2(): Rotation {\n // return RotationOps.fromRaw(this.rawSet.jointFrameX2(this.handle));\n // }\n //\n //\n // /**\n // * The position of the first anchor of this joint.\n // *\n // * The first anchor gives the position of the points application point on the\n // * local frame of the first rigid-body it is attached to.\n // */\n // public anchor1(): Vector {\n // return VectorOps.fromRaw(this.rawSet.jointAnchor1(this.handle));\n // }\n //\n // /**\n // * The position of the second anchor of this joint.\n // *\n // * The second anchor gives the position of the points application point on the\n // * local frame of the second rigid-body it is attached to.\n // */\n // public anchor2(): Vector {\n // return VectorOps.fromRaw(this.rawSet.jointAnchor2(this.handle));\n // }\n\n /**\n * Controls whether contacts are computed between colliders attached\n * to the rigid-bodies linked by this joint.\n */\n public setContactsEnabled(enabled: boolean) {\n this.rawSet.jointSetContactsEnabled(this.handle, enabled);\n }\n\n /**\n * Indicates if contacts are enabled between colliders attached\n * to the rigid-bodies linked by this joint.\n */\n public contactsEnabled(): boolean {\n return this.rawSet.jointContactsEnabled(this.handle);\n }\n}\n\nexport class UnitMultibodyJoint extends MultibodyJoint {\n /**\n * The axis left free by this joint.\n */\n protected rawAxis(): RawJointAxis {\n throw new Error(\"rawAxis must be implemented by subclasses\");\n }\n\n // /**\n // * Are the limits enabled for this joint?\n // */\n // public limitsEnabled(): boolean {\n // return this.rawSet.jointLimitsEnabled(this.handle, this.rawAxis());\n // }\n //\n // /**\n // * The min limit of this joint.\n // */\n // public limitsMin(): number {\n // return this.rawSet.jointLimitsMin(this.handle, this.rawAxis());\n // }\n //\n // /**\n // * The max limit of this joint.\n // */\n // public limitsMax(): number {\n // return this.rawSet.jointLimitsMax(this.handle, this.rawAxis());\n // }\n //\n // public configureMotorModel(model: MotorModel) {\n // this.rawSet.jointConfigureMotorModel(this.handle, this.rawAxis(), model);\n // }\n //\n // public configureMotorVelocity(targetVel: number, factor: number) {\n // this.rawSet.jointConfigureMotorVelocity(this.handle, this.rawAxis(), targetVel, factor);\n // }\n //\n // public configureMotorPosition(targetPos: number, stiffness: number, damping: number) {\n // this.rawSet.jointConfigureMotorPosition(this.handle, this.rawAxis(), targetPos, stiffness, damping);\n // }\n //\n // public configureMotor(targetPos: number, targetVel: number, stiffness: number, damping: number) {\n // this.rawSet.jointConfigureMotor(this.handle, this.rawAxis(), targetPos, targetVel, stiffness, damping);\n // }\n}\n\nexport class FixedMultibodyJoint extends MultibodyJoint {}\n\nexport class PrismaticMultibodyJoint extends UnitMultibodyJoint {\n public rawAxis(): RawJointAxis {\n return RawJointAxis.LinX;\n }\n}\n\nexport class RevoluteMultibodyJoint extends UnitMultibodyJoint {\n public rawAxis(): RawJointAxis {\n return RawJointAxis.AngX;\n }\n}\n\nexport class SphericalMultibodyJoint extends MultibodyJoint {\n /* Unsupported by this alpha release.\n public configureMotorModel(model: MotorModel) {\n this.rawSet.jointConfigureMotorModel(this.handle, model);\n }\n\n public configureMotorVelocity(targetVel: Vector, factor: number) {\n this.rawSet.jointConfigureBallMotorVelocity(this.handle, targetVel.x, targetVel.y, targetVel.z, factor);\n }\n\n public configureMotorPosition(targetPos: Quaternion, stiffness: number, damping: number) {\n this.rawSet.jointConfigureBallMotorPosition(this.handle, targetPos.w, targetPos.x, targetPos.y, targetPos.z, stiffness, damping);\n }\n\n public configureMotor(targetPos: Quaternion, targetVel: Vector, stiffness: number, damping: number) {\n this.rawSet.jointConfigureBallMotor(this.handle,\n targetPos.w, targetPos.x, targetPos.y, targetPos.z,\n targetVel.x, targetVel.y, targetVel.z,\n stiffness, damping);\n }\n */\n}\n","import {Coarena} from \"../coarena\";\nimport {RawMultibodyJointSet} from \"../raw\";\nimport {JointData} from \"./impulse_joint\";\nimport {MultibodyJoint, MultibodyJointHandle} from \"./multibody_joint\";\nimport {RigidBodyHandle} from \"./rigid_body\";\n\n/**\n * A set of joints.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `jointSet.free()`\n * once you are done using it (and all the joints it created).\n */\nexport class MultibodyJointSet {\n raw: RawMultibodyJointSet;\n private map: Coarena<MultibodyJoint>;\n\n /**\n * Release the WASM memory occupied by this joint set.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n\n if (!!this.map) {\n this.map.clear();\n }\n this.map = undefined!;\n }\n\n constructor(raw?: RawMultibodyJointSet) {\n this.raw = raw || new RawMultibodyJointSet();\n this.map = new Coarena<MultibodyJoint>();\n // Initialize the map with the existing elements, if any.\n if (raw) {\n raw.forEachJointHandle((handle: MultibodyJointHandle) => {\n this.map.set(handle, MultibodyJoint.newTyped(this.raw, handle));\n });\n }\n }\n\n /**\n * Creates a new joint and return its integer handle.\n *\n * @param desc - The joint's parameters.\n * @param parent1 - The handle of the first rigid-body this joint is attached to.\n * @param parent2 - The handle of the second rigid-body this joint is attached to.\n * @param wakeUp - Should the attached rigid-bodies be awakened?\n */\n public createJoint(\n desc: JointData,\n parent1: RigidBodyHandle,\n parent2: RigidBodyHandle,\n wakeUp: boolean,\n ): MultibodyJoint {\n const rawParams = desc.intoRaw();\n const handle = this.raw.createJoint(rawParams, parent1, parent2, wakeUp);\n rawParams.free();\n let joint = MultibodyJoint.newTyped(this.raw, handle);\n this.map.set(handle, joint);\n return joint;\n }\n\n /**\n * Remove a joint from this set.\n *\n * @param handle - The integer handle of the joint.\n * @param wake_up - If `true`, the rigid-bodies attached by the removed joint will be woken-up automatically.\n */\n public remove(handle: MultibodyJointHandle, wake_up: boolean) {\n this.raw.remove(handle, wake_up);\n this.map.delete(handle);\n }\n\n /**\n * Internal function, do not call directly.\n * @param handle\n */\n public unmap(handle: MultibodyJointHandle) {\n this.map.delete(handle);\n }\n\n /**\n * The number of joints on this set.\n */\n public len(): number {\n return this.map.len();\n }\n\n /**\n * Does this set contain a joint with the given handle?\n *\n * @param handle - The joint handle to check.\n */\n public contains(handle: MultibodyJointHandle): boolean {\n return this.get(handle) != null;\n }\n\n /**\n * Gets the joint with the given handle.\n *\n * Returns `null` if no joint with the specified handle exists.\n *\n * @param handle - The integer handle of the joint to retrieve.\n */\n public get(handle: MultibodyJointHandle): MultibodyJoint | null {\n return this.map.get(handle);\n }\n\n /**\n * Applies the given closure to each joint contained by this set.\n *\n * @param f - The closure to apply.\n */\n public forEach(f: (joint: MultibodyJoint) => void) {\n this.map.forEach(f);\n }\n\n /**\n * Calls the given closure with the integer handle of each multibody joint attached to this rigid-body.\n *\n * @param f - The closure called with the integer handle of each multibody joint attached to the rigid-body.\n */\n public forEachJointHandleAttachedToRigidBody(\n handle: RigidBodyHandle,\n f: (handle: MultibodyJointHandle) => void,\n ) {\n this.raw.forEachJointAttachedToRigidBody(handle, f);\n }\n\n /**\n * Gets all joints in the list.\n *\n * @returns joint list.\n */\n public getAll(): MultibodyJoint[] {\n return this.map.getAll();\n }\n}\n","/**\n * A rule applied to combine coefficients.\n *\n * Use this when configuring the `ColliderDesc` to specify\n * how friction and restitution coefficient should be combined\n * in a contact.\n */\nexport enum CoefficientCombineRule {\n Average = 0,\n Min = 1,\n Multiply = 2,\n Max = 3,\n}\n","import {RawCCDSolver} from \"../raw\";\n\n/**\n * The CCD solver responsible for resolving Continuous Collision Detection.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `ccdSolver.free()`\n * once you are done using it.\n */\nexport class CCDSolver {\n raw: RawCCDSolver;\n\n /**\n * Release the WASM memory occupied by this narrow-phase.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n constructor(raw?: RawCCDSolver) {\n this.raw = raw || new RawCCDSolver();\n }\n}\n","import {RawIslandManager} from \"../raw\";\nimport {RigidBodyHandle} from \"./rigid_body\";\n\n/**\n * The CCD solver responsible for resolving Continuous Collision Detection.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `ccdSolver.free()`\n * once you are done using it.\n */\nexport class IslandManager {\n raw: RawIslandManager;\n\n /**\n * Release the WASM memory occupied by this narrow-phase.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n constructor(raw?: RawIslandManager) {\n this.raw = raw || new RawIslandManager();\n }\n\n /**\n * Applies the given closure to the handle of each active rigid-bodies contained by this set.\n *\n * A rigid-body is active if it is not sleeping, i.e., if it moved recently.\n *\n * @param f - The closure to apply.\n */\n public forEachActiveRigidBodyHandle(f: (handle: RigidBodyHandle) => void) {\n this.raw.forEachActiveRigidBodyHandle(f);\n }\n}\n","export enum FeatureType {\n Vertex,\n Edge,\n Face,\n Unknown,\n}\n","import {Vector, VectorOps} from \"../math\";\nimport {RawPointColliderProjection, RawPointProjection} from \"../raw\";\nimport {Collider} from \"./collider\";\nimport {ColliderSet} from \"./collider_set\";\nimport {FeatureType} from \"./feature\";\n\n/**\n * The projection of a point on a collider.\n */\nexport class PointProjection {\n /**\n * The projection of the point on the collider.\n */\n point: Vector;\n /**\n * Is the point inside of the collider?\n */\n isInside: boolean;\n\n constructor(point: Vector, isInside: boolean) {\n this.point = point;\n this.isInside = isInside;\n }\n\n public static fromRaw(raw: RawPointProjection): PointProjection | null {\n if (!raw) return null;\n\n const result = new PointProjection(VectorOps.fromRaw(raw.point())!, raw.isInside());\n raw.free();\n return result;\n }\n}\n\n/**\n * The projection of a point on a collider (includes the collider handle).\n */\nexport class PointColliderProjection {\n /**\n * The collider hit by the ray.\n */\n collider: Collider;\n /**\n * The projection of the point on the collider.\n */\n point: Vector;\n /**\n * Is the point inside of the collider?\n */\n isInside: boolean;\n\n /**\n * The type of the geometric feature the point was projected on.\n */\n featureType = FeatureType.Unknown;\n\n /**\n * The id of the geometric feature the point was projected on.\n */\n featureId: number | undefined = undefined;\n\n constructor(\n collider: Collider,\n point: Vector,\n isInside: boolean,\n featureType?: FeatureType,\n featureId?: number,\n ) {\n this.collider = collider;\n this.point = point;\n this.isInside = isInside;\n if (featureId !== undefined) this.featureId = featureId;\n if (featureType !== undefined) this.featureType = featureType;\n }\n\n public static fromRaw(\n colliderSet: ColliderSet,\n raw: RawPointColliderProjection,\n ): PointColliderProjection | null {\n if (!raw) return null;\n\n const result = new PointColliderProjection(\n colliderSet.get(raw.colliderHandle())!,\n VectorOps.fromRaw(raw.point())!,\n raw.isInside(),\n raw.featureType() as number as FeatureType,\n raw.featureId(),\n );\n raw.free();\n return result;\n }\n}\n","import {Vector, VectorOps} from \"../math\";\nimport {RawRayColliderIntersection, RawRayColliderHit, RawRayIntersection} from \"../raw\";\nimport {Collider} from \"./collider\";\nimport {ColliderSet} from \"./collider_set\";\nimport {FeatureType} from \"./feature\";\n\n/**\n * A ray. This is a directed half-line.\n */\nexport class Ray {\n /**\n * The starting point of the ray.\n */\n public origin: Vector;\n /**\n * The direction of propagation of the ray.\n */\n public dir: Vector;\n\n /**\n * Builds a ray from its origin and direction.\n *\n * @param origin - The ray's starting point.\n * @param dir - The ray's direction of propagation.\n */\n constructor(origin: Vector, dir: Vector) {\n this.origin = origin;\n this.dir = dir;\n }\n\n public pointAt(t: number): Vector {\n return {\n x: this.origin.x + this.dir.x * t,\n y: this.origin.y + this.dir.y * t,\n z: this.origin.z + this.dir.z * t,\n };\n }\n}\n\n/**\n * The intersection between a ray and a collider.\n */\nexport class RayIntersection {\n /**\n * The time-of-impact of the ray with the collider.\n *\n * The hit point is obtained from the ray's origin and direction: `origin + dir * timeOfImpact`.\n */\n timeOfImpact: number;\n /**\n * The normal of the collider at the hit point.\n */\n normal: Vector;\n\n /**\n * The type of the geometric feature the point was projected on.\n */\n featureType = FeatureType.Unknown;\n\n /**\n * The id of the geometric feature the point was projected on.\n */\n featureId: number | undefined = undefined;\n\n constructor(\n timeOfImpact: number,\n normal: Vector,\n featureType?: FeatureType,\n featureId?: number,\n ) {\n this.timeOfImpact = timeOfImpact;\n this.normal = normal;\n if (featureId !== undefined) this.featureId = featureId;\n if (featureType !== undefined) this.featureType = featureType;\n }\n\n public static fromRaw(raw: RawRayIntersection): RayIntersection | null {\n if (!raw) return null;\n\n const result = new RayIntersection(\n raw.time_of_impact(),\n VectorOps.fromRaw(raw.normal())!,\n raw.featureType() as number as FeatureType,\n raw.featureId(),\n );\n raw.free();\n return result;\n }\n}\n\n/**\n * The intersection between a ray and a collider (includes the collider handle).\n */\nexport class RayColliderIntersection {\n /**\n * The collider hit by the ray.\n */\n collider: Collider;\n /**\n * The time-of-impact of the ray with the collider.\n *\n * The hit point is obtained from the ray's origin and direction: `origin + dir * timeOfImpact`.\n */\n timeOfImpact: number;\n /**\n * The normal of the collider at the hit point.\n */\n normal: Vector;\n\n /**\n * The type of the geometric feature the point was projected on.\n */\n featureType = FeatureType.Unknown;\n\n /**\n * The id of the geometric feature the point was projected on.\n */\n featureId: number | undefined = undefined;\n\n constructor(\n collider: Collider,\n timeOfImpact: number,\n normal: Vector,\n featureType?: FeatureType,\n featureId?: number,\n ) {\n this.collider = collider;\n this.timeOfImpact = timeOfImpact;\n this.normal = normal;\n if (featureId !== undefined) this.featureId = featureId;\n if (featureType !== undefined) this.featureType = featureType;\n }\n\n public static fromRaw(\n colliderSet: ColliderSet,\n raw: RawRayColliderIntersection,\n ): RayColliderIntersection | null {\n if (!raw) return null;\n\n const result = new RayColliderIntersection(\n colliderSet.get(raw.colliderHandle())!,\n raw.time_of_impact(),\n VectorOps.fromRaw(raw.normal())!,\n raw.featureType() as number as FeatureType,\n raw.featureId(),\n );\n raw.free();\n return result;\n }\n}\n\n/**\n * The time of impact between a ray and a collider.\n */\nexport class RayColliderHit {\n /**\n * The handle of the collider hit by the ray.\n */\n collider: Collider;\n /**\n * The time-of-impact of the ray with the collider.\n *\n * The hit point is obtained from the ray's origin and direction: `origin + dir * timeOfImpact`.\n */\n timeOfImpact: number;\n\n constructor(collider: Collider, timeOfImpact: number) {\n this.collider = collider;\n this.timeOfImpact = timeOfImpact;\n }\n\n public static fromRaw(colliderSet: ColliderSet, raw: RawRayColliderHit): RayColliderHit | null {\n if (!raw) return null;\n\n const result = new RayColliderHit(\n colliderSet.get(raw.colliderHandle())!,\n raw.timeOfImpact(),\n );\n raw.free();\n return result;\n }\n}\n","import {Vector, VectorOps} from \"../math\";\nimport {RawShapeCastHit, RawColliderShapeCastHit} from \"../raw\";\nimport {Collider} from \"./collider\";\nimport {ColliderSet} from \"./collider_set\";\n\n/**\n * The intersection between a ray and a collider.\n */\nexport class ShapeCastHit {\n /**\n * The time of impact of the two shapes.\n */\n time_of_impact: number;\n /**\n * The local-space contact point on the first shape, at\n * the time of impact.\n */\n witness1: Vector;\n /**\n * The local-space contact point on the second shape, at\n * the time of impact.\n */\n witness2: Vector;\n /**\n * The local-space normal on the first shape, at\n * the time of impact.\n */\n normal1: Vector;\n /**\n * The local-space normal on the second shape, at\n * the time of impact.\n */\n normal2: Vector;\n\n constructor(\n time_of_impact: number,\n witness1: Vector,\n witness2: Vector,\n normal1: Vector,\n normal2: Vector,\n ) {\n this.time_of_impact = time_of_impact;\n this.witness1 = witness1;\n this.witness2 = witness2;\n this.normal1 = normal1;\n this.normal2 = normal2;\n }\n\n public static fromRaw(\n colliderSet: ColliderSet | null,\n raw: RawShapeCastHit,\n ): ShapeCastHit | null {\n if (!raw) return null;\n\n const result = new ShapeCastHit(\n raw.time_of_impact(),\n VectorOps.fromRaw(raw.witness1())!,\n VectorOps.fromRaw(raw.witness2())!,\n VectorOps.fromRaw(raw.normal1())!,\n VectorOps.fromRaw(raw.normal2())!,\n );\n raw.free();\n return result;\n }\n}\n\n/**\n * The intersection between a ray and a collider.\n */\nexport class ColliderShapeCastHit extends ShapeCastHit {\n /**\n * The handle of the collider hit by the ray.\n */\n collider: Collider;\n\n constructor(\n collider: Collider,\n time_of_impact: number,\n witness1: Vector,\n witness2: Vector,\n normal1: Vector,\n normal2: Vector,\n ) {\n super(time_of_impact, witness1, witness2, normal1, normal2);\n this.collider = collider;\n }\n\n public static fromRaw(\n colliderSet: ColliderSet,\n raw: RawColliderShapeCastHit,\n ): ColliderShapeCastHit | null {\n if (!raw) return null;\n\n const result = new ColliderShapeCastHit(\n colliderSet.get(raw.colliderHandle())!,\n raw.time_of_impact(),\n VectorOps.fromRaw(raw.witness1())!,\n VectorOps.fromRaw(raw.witness2())!,\n VectorOps.fromRaw(raw.normal1())!,\n VectorOps.fromRaw(raw.normal2())!,\n );\n raw.free();\n return result;\n }\n}\n","import {RigidBodyHandle, RigidBodySet} from \"../dynamics\";\nimport {Rotation, RotationOps, Vector, VectorOps} from \"../math\";\nimport {QueryFilterFlags} from \"../pipeline\";\nimport {RawBroadPhase, RawRayColliderIntersection} from \"../raw\";\nimport {ColliderHandle} from \"./collider\";\nimport {ColliderSet} from \"./collider_set\";\nimport {InteractionGroups} from \"./interaction_groups\";\nimport {NarrowPhase} from \"./narrow_phase\";\nimport {PointColliderProjection} from \"./point\";\nimport {Ray, RayColliderHit, RayColliderIntersection} from \"./ray\";\nimport {Shape} from \"./shape\";\nimport {ColliderShapeCastHit} from \"./toi\";\n\n/**\n * The broad-phase used for coarse collision-detection.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `broadPhase.free()`\n * once you are done using it.\n */\nexport class BroadPhase {\n raw: RawBroadPhase;\n\n /**\n * Release the WASM memory occupied by this broad-phase.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n constructor(raw?: RawBroadPhase) {\n this.raw = raw || new RawBroadPhase();\n }\n\n /**\n * Find the closest intersection between a ray and a set of collider.\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n * @param groups - Used to filter the colliders that can or cannot be hit by the ray.\n * @param filter - The callback to filter out which collider will be hit.\n */\n public castRay(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n ray: Ray,\n maxToi: number,\n solid: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ): RayColliderHit | null {\n let rawOrig = VectorOps.intoRaw(ray.origin);\n let rawDir = VectorOps.intoRaw(ray.dir);\n let result = RayColliderHit.fromRaw(\n colliders,\n this.raw.castRay(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n )!,\n );\n\n rawOrig.free();\n rawDir.free();\n\n return result;\n }\n\n /**\n * Find the closest intersection between a ray and a set of collider.\n *\n * This also computes the normal at the hit point.\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n * @param groups - Used to filter the colliders that can or cannot be hit by the ray.\n */\n public castRayAndGetNormal(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n ray: Ray,\n maxToi: number,\n solid: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ): RayColliderIntersection | null {\n let rawOrig = VectorOps.intoRaw(ray.origin);\n let rawDir = VectorOps.intoRaw(ray.dir);\n let result = RayColliderIntersection.fromRaw(\n colliders,\n this.raw.castRayAndGetNormal(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n )!,\n );\n\n rawOrig.free();\n rawDir.free();\n\n return result;\n }\n\n /**\n * Cast a ray and collects all the intersections between a ray and the scene.\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n * @param groups - Used to filter the colliders that can or cannot be hit by the ray.\n * @param callback - The callback called once per hit (in no particular order) between a ray and a collider.\n * If this callback returns `false`, then the cast will stop and no further hits will be detected/reported.\n */\n public intersectionsWithRay(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n ray: Ray,\n maxToi: number,\n solid: boolean,\n callback: (intersect: RayColliderIntersection) => boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ) {\n let rawOrig = VectorOps.intoRaw(ray.origin);\n let rawDir = VectorOps.intoRaw(ray.dir);\n let rawCallback = (rawInter: RawRayColliderIntersection) => {\n return callback(RayColliderIntersection.fromRaw(colliders, rawInter)!);\n };\n\n this.raw.intersectionsWithRay(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n rawCallback,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n );\n\n rawOrig.free();\n rawDir.free();\n }\n\n /**\n * Gets the handle of up to one collider intersecting the given shape.\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param shapePos - The position of the shape used for the intersection test.\n * @param shapeRot - The orientation of the shape used for the intersection test.\n * @param shape - The shape used for the intersection test.\n * @param groups - The bit groups and filter associated to the ray, in order to only\n * hit the colliders with collision groups compatible with the ray's group.\n */\n public intersectionWithShape(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n shapePos: Vector,\n shapeRot: Rotation,\n shape: Shape,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ): ColliderHandle | null {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawShape = shape.intoRaw();\n let result = this.raw.intersectionWithShape(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawPos,\n rawRot,\n rawShape,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n );\n\n rawPos.free();\n rawRot.free();\n rawShape.free();\n\n return result ?? null;\n }\n\n /**\n * Find the projection of a point on the closest collider.\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param point - The point to project.\n * @param solid - If this is set to `true` then the collider shapes are considered to\n * be plain (if the point is located inside of a plain shape, its projection is the point\n * itself). If it is set to `false` the collider shapes are considered to be hollow\n * (if the point is located inside of an hollow shape, it is projected on the shape's\n * boundary).\n * @param groups - The bit groups and filter associated to the point to project, in order to only\n * project on colliders with collision groups compatible with the ray's group.\n */\n public projectPoint(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n point: Vector,\n solid: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ): PointColliderProjection | null {\n let rawPoint = VectorOps.intoRaw(point);\n let result = PointColliderProjection.fromRaw(\n colliders,\n this.raw.projectPoint(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawPoint,\n solid,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n )!,\n );\n\n rawPoint.free();\n\n return result;\n }\n\n /**\n * Find the projection of a point on the closest collider.\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param point - The point to project.\n * @param groups - The bit groups and filter associated to the point to project, in order to only\n * project on colliders with collision groups compatible with the ray's group.\n */\n public projectPointAndGetFeature(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n point: Vector,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ): PointColliderProjection | null {\n let rawPoint = VectorOps.intoRaw(point);\n let result = PointColliderProjection.fromRaw(\n colliders,\n this.raw.projectPointAndGetFeature(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawPoint,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n )!,\n );\n\n rawPoint.free();\n\n return result;\n }\n\n /**\n * Find all the colliders containing the given point.\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param point - The point used for the containment test.\n * @param groups - The bit groups and filter associated to the point to test, in order to only\n * test on colliders with collision groups compatible with the ray's group.\n * @param callback - A function called with the handles of each collider with a shape\n * containing the `point`.\n */\n public intersectionsWithPoint(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n point: Vector,\n callback: (handle: ColliderHandle) => boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ) {\n let rawPoint = VectorOps.intoRaw(point);\n\n this.raw.intersectionsWithPoint(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawPoint,\n callback,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n );\n\n rawPoint.free();\n }\n\n /**\n * Casts a shape at a constant linear velocity and retrieve the first collider it hits.\n * This is similar to ray-casting except that we are casting a whole shape instead of\n * just a point (the ray origin).\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param shapePos - The initial position of the shape to cast.\n * @param shapeRot - The initial rotation of the shape to cast.\n * @param shapeVel - The constant velocity of the shape to cast (i.e. the cast direction).\n * @param shape - The shape to cast.\n * @param targetDistance − If the shape moves closer to this distance from a collider, a hit\n * will be returned.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the distance traveled by the shape to `shapeVel.norm() * maxToi`.\n * @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if\n * the shape is penetrating another shape at its starting point **and** its trajectory is such\n * that it’s on a path to exit that penetration state.\n * @param groups - The bit groups and filter associated to the shape to cast, in order to only\n * test on colliders with collision groups compatible with this group.\n */\n public castShape(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n shapePos: Vector,\n shapeRot: Rotation,\n shapeVel: Vector,\n shape: Shape,\n targetDistance: number,\n maxToi: number,\n stopAtPenetration: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ): ColliderShapeCastHit | null {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawVel = VectorOps.intoRaw(shapeVel);\n let rawShape = shape.intoRaw();\n\n let result = ColliderShapeCastHit.fromRaw(\n colliders,\n this.raw.castShape(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawPos,\n rawRot,\n rawVel,\n rawShape,\n targetDistance,\n maxToi,\n stopAtPenetration,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n )!,\n );\n\n rawPos.free();\n rawRot.free();\n rawVel.free();\n rawShape.free();\n\n return result;\n }\n\n /**\n * Retrieve all the colliders intersecting the given shape.\n *\n * @param colliders - The set of colliders taking part in this pipeline.\n * @param shapePos - The position of the shape to test.\n * @param shapeRot - The orientation of the shape to test.\n * @param shape - The shape to test.\n * @param groups - The bit groups and filter associated to the shape to test, in order to only\n * test on colliders with collision groups compatible with this group.\n * @param callback - A function called with the handles of each collider intersecting the `shape`.\n */\n public intersectionsWithShape(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n shapePos: Vector,\n shapeRot: Rotation,\n shape: Shape,\n callback: (handle: ColliderHandle) => boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ) {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawShape = shape.intoRaw();\n\n this.raw.intersectionsWithShape(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawPos,\n rawRot,\n rawShape,\n callback,\n filterFlags ?? 0,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate as unknown as Function,\n );\n\n rawPos.free();\n rawRot.free();\n rawShape.free();\n }\n\n /**\n * Finds the handles of all the colliders with an AABB intersecting the given AABB.\n *\n * @param aabbCenter - The center of the AABB to test.\n * @param aabbHalfExtents - The half-extents of the AABB to test.\n * @param callback - The callback that will be called with the handles of all the colliders\n * currently intersecting the given AABB.\n */\n public collidersWithAabbIntersectingAabb(\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n aabbCenter: Vector,\n aabbHalfExtents: Vector,\n callback: (handle: ColliderHandle) => boolean,\n ) {\n let rawCenter = VectorOps.intoRaw(aabbCenter);\n let rawHalfExtents = VectorOps.intoRaw(aabbHalfExtents);\n this.raw.collidersWithAabbIntersectingAabb(\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n rawCenter,\n rawHalfExtents,\n callback,\n );\n rawCenter.free();\n rawHalfExtents.free();\n }\n}\n","import {Vector, VectorOps} from \"../math\";\nimport {RawNarrowPhase, RawContactManifold} from \"../raw\";\nimport {ColliderHandle} from \"./collider\";\n\n/**\n * The narrow-phase used for precise collision-detection.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `narrowPhase.free()`\n * once you are done using it.\n */\nexport class NarrowPhase {\n raw: RawNarrowPhase;\n tempManifold: TempContactManifold;\n\n /**\n * Release the WASM memory occupied by this narrow-phase.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n constructor(raw?: RawNarrowPhase) {\n this.raw = raw || new RawNarrowPhase();\n this.tempManifold = new TempContactManifold(null!);\n }\n\n /**\n * Enumerates all the colliders potentially in contact with the given collider.\n *\n * @param collider1 - The second collider involved in the contact.\n * @param f - Closure that will be called on each collider that is in contact with `collider1`.\n */\n public contactPairsWith(collider1: ColliderHandle, f: (collider2: ColliderHandle) => void) {\n this.raw.contact_pairs_with(collider1, f);\n }\n\n /**\n * Enumerates all the colliders intersecting the given colliders, assuming one of them\n * is a sensor.\n */\n public intersectionPairsWith(\n collider1: ColliderHandle,\n f: (collider2: ColliderHandle) => void,\n ) {\n this.raw.intersection_pairs_with(collider1, f);\n }\n\n /**\n * Iterates through all the contact manifolds between the given pair of colliders.\n *\n * @param collider1 - The first collider involved in the contact.\n * @param collider2 - The second collider involved in the contact.\n * @param f - Closure that will be called on each contact manifold between the two colliders. If the second argument\n * passed to this closure is `true`, then the contact manifold data is flipped, i.e., methods like `localNormal1`\n * actually apply to the `collider2` and fields like `localNormal2` apply to the `collider1`.\n */\n public contactPair(\n collider1: ColliderHandle,\n collider2: ColliderHandle,\n f: (manifold: TempContactManifold, flipped: boolean) => void,\n ) {\n const rawPair = this.raw.contact_pair(collider1, collider2);\n\n if (!!rawPair) {\n const flipped = rawPair.collider1() != collider1;\n\n let i;\n for (i = 0; i < rawPair.numContactManifolds(); ++i) {\n this.tempManifold.raw = rawPair.contactManifold(i)!;\n if (!!this.tempManifold.raw) {\n f(this.tempManifold, flipped);\n }\n\n // SAFETY: The RawContactManifold stores a raw pointer that will be invalidated\n // at the next timestep. So we must be sure to free the pair here\n // to avoid unsoundness in the Rust code.\n this.tempManifold.free();\n }\n rawPair.free();\n }\n }\n\n /**\n * Returns `true` if `collider1` and `collider2` intersect and at least one of them is a sensor.\n * @param collider1 − The first collider involved in the intersection.\n * @param collider2 − The second collider involved in the intersection.\n */\n public intersectionPair(collider1: ColliderHandle, collider2: ColliderHandle): boolean {\n return this.raw.intersection_pair(collider1, collider2);\n }\n}\n\nexport class TempContactManifold {\n raw: RawContactManifold;\n\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n constructor(raw: RawContactManifold) {\n this.raw = raw;\n }\n\n public normal(target?: Vector): Vector {\n return VectorOps.fromRaw(this.raw.normal(), target)!;\n }\n\n public localNormal1(target?: Vector): Vector {\n return VectorOps.fromRaw(this.raw.local_n1(), target)!;\n }\n\n public localNormal2(target?: Vector): Vector {\n return VectorOps.fromRaw(this.raw.local_n2(), target)!;\n }\n\n public subshape1(): number {\n return this.raw.subshape1();\n }\n\n public subshape2(): number {\n return this.raw.subshape2();\n }\n\n public numContacts(): number {\n return this.raw.num_contacts();\n }\n\n public localContactPoint1(i: number, target?: Vector): Vector | null {\n return VectorOps.fromRaw(this.raw.contact_local_p1(i)!, target);\n }\n\n public localContactPoint2(i: number, target?: Vector): Vector | null {\n return VectorOps.fromRaw(this.raw.contact_local_p2(i)!, target);\n }\n\n public contactDist(i: number): number {\n return this.raw.contact_dist(i);\n }\n\n public contactFid1(i: number): number {\n return this.raw.contact_fid1(i);\n }\n\n public contactFid2(i: number): number {\n return this.raw.contact_fid2(i);\n }\n\n public contactImpulse(i: number): number {\n return this.raw.contact_impulse(i);\n }\n\n public contactTangentImpulseX(i: number): number {\n return this.raw.contact_tangent_impulse_x(i);\n }\n\n public contactTangentImpulseY(i: number): number {\n return this.raw.contact_tangent_impulse_y(i);\n }\n\n public numSolverContacts(): number {\n return this.raw.num_solver_contacts();\n }\n\n public solverContactPoint(i: number, target?: Vector): Vector {\n return VectorOps.fromRaw(this.raw.solver_contact_point(i)!, target)!;\n }\n\n public solverContactDist(i: number): number {\n return this.raw.solver_contact_dist(i);\n }\n\n public solverContactFriction(i: number): number {\n return this.raw.solver_contact_friction(i);\n }\n\n public solverContactRestitution(i: number): number {\n return this.raw.solver_contact_restitution(i);\n }\n\n public solverContactTangentVelocity(i: number, target?: Vector): Vector {\n return VectorOps.fromRaw(this.raw.solver_contact_tangent_velocity(i)!, target)!;\n }\n}\n","import {Vector, VectorOps} from \"../math\";\nimport {RawShapeContact} from \"../raw\";\n\n/**\n * The contact info between two shapes.\n */\nexport class ShapeContact {\n /**\n * Distance between the two contact points.\n * If this is negative, this contact represents a penetration.\n */\n distance: number;\n\n /**\n * Position of the contact on the first shape.\n */\n point1: Vector;\n\n /**\n * Position of the contact on the second shape.\n */\n point2: Vector;\n\n /**\n * Contact normal, pointing towards the exterior of the first shape.\n */\n normal1: Vector;\n\n /**\n * Contact normal, pointing towards the exterior of the second shape.\n * If these contact data are expressed in world-space, this normal is equal to -normal1.\n */\n normal2: Vector;\n\n constructor(dist: number, point1: Vector, point2: Vector, normal1: Vector, normal2: Vector) {\n this.distance = dist;\n this.point1 = point1;\n this.point2 = point2;\n this.normal1 = normal1;\n this.normal2 = normal2;\n }\n\n public static fromRaw(raw: RawShapeContact): ShapeContact | null {\n if (!raw) return null;\n\n const result = new ShapeContact(\n raw.distance(),\n VectorOps.fromRaw(raw.point1())!,\n VectorOps.fromRaw(raw.point2())!,\n VectorOps.fromRaw(raw.normal1())!,\n VectorOps.fromRaw(raw.normal2())!,\n );\n raw.free();\n return result;\n }\n}\n","import {Vector, VectorOps, Rotation, RotationOps} from \"../math\";\nimport {RawColliderSet, RawShape, RawShapeType} from \"../raw\";\nimport {ColliderHandle} from \"./collider\";\nimport {ShapeContact} from \"./contact\";\nimport {PointProjection} from \"./point\";\nimport {Ray, RayIntersection} from \"./ray\";\nimport {ShapeCastHit} from \"./toi\";\n\nexport abstract class Shape {\n public abstract intoRaw(): RawShape;\n\n /**\n * The concrete type of this shape.\n */\n public abstract get type(): ShapeType;\n\n /**\n * instant mode without cache\n */\n public static fromRaw(rawSet: RawColliderSet, handle: ColliderHandle): Shape {\n const rawType = rawSet.coShapeType(handle);\n\n let extents: Vector;\n let borderRadius: number;\n let vs: Float32Array;\n let indices: Uint32Array;\n let halfHeight: number;\n let radius: number;\n let normal: Vector;\n\n switch (rawType) {\n case RawShapeType.Ball:\n return new Ball(rawSet.coRadius(handle)!);\n case RawShapeType.Cuboid:\n extents = rawSet.coHalfExtents(handle)!;\n\n return new Cuboid(extents.x, extents.y, extents.z);\n\n case RawShapeType.RoundCuboid:\n extents = rawSet.coHalfExtents(handle)!;\n borderRadius = rawSet.coRoundRadius(handle)!;\n\n return new RoundCuboid(extents.x, extents.y, extents.z, borderRadius);\n\n case RawShapeType.Capsule:\n halfHeight = rawSet.coHalfHeight(handle)!;\n radius = rawSet.coRadius(handle)!;\n return new Capsule(halfHeight, radius);\n case RawShapeType.Segment:\n vs = rawSet.coVertices(handle)!;\n\n return new Segment(\n VectorOps.new(vs[0], vs[1], vs[2]),\n VectorOps.new(vs[3], vs[4], vs[5]),\n );\n\n case RawShapeType.Polyline:\n vs = rawSet.coVertices(handle)!;\n indices = rawSet.coIndices(handle)!;\n return new Polyline(vs, indices);\n case RawShapeType.Triangle:\n vs = rawSet.coVertices(handle)!;\n\n return new Triangle(\n VectorOps.new(vs[0], vs[1], vs[2]),\n VectorOps.new(vs[3], vs[4], vs[5]),\n VectorOps.new(vs[6], vs[7], vs[8]),\n );\n\n case RawShapeType.RoundTriangle:\n vs = rawSet.coVertices(handle)!;\n borderRadius = rawSet.coRoundRadius(handle)!;\n\n return new RoundTriangle(\n VectorOps.new(vs[0], vs[1], vs[2]),\n VectorOps.new(vs[3], vs[4], vs[5]),\n VectorOps.new(vs[6], vs[7], vs[8]),\n borderRadius,\n );\n\n case RawShapeType.HalfSpace:\n normal = VectorOps.fromRaw(rawSet.coHalfspaceNormal(handle)!)!;\n return new HalfSpace(normal);\n\n case RawShapeType.Voxels:\n const vox_data = rawSet.coVoxelData(handle)!;\n const vox_size = rawSet.coVoxelSize(handle)!;\n return new Voxels(vox_data, vox_size);\n\n case RawShapeType.TriMesh:\n vs = rawSet.coVertices(handle)!;\n indices = rawSet.coIndices(handle)!;\n const tri_flags = rawSet.coTriMeshFlags(handle);\n return new TriMesh(vs, indices, tri_flags);\n\n case RawShapeType.HeightField:\n const scale = rawSet.coHeightfieldScale(handle)!;\n const heights = rawSet.coHeightfieldHeights(handle)!;\n\n const nrows = rawSet.coHeightfieldNRows(handle)!;\n const ncols = rawSet.coHeightfieldNCols(handle)!;\n const hf_flags = rawSet.coHeightFieldFlags(handle);\n return new Heightfield(nrows, ncols, heights, scale, hf_flags);\n\n case RawShapeType.ConvexPolyhedron:\n vs = rawSet.coVertices(handle)!;\n indices = rawSet.coIndices(handle)!;\n return new ConvexPolyhedron(vs, indices);\n case RawShapeType.RoundConvexPolyhedron:\n vs = rawSet.coVertices(handle)!;\n indices = rawSet.coIndices(handle)!;\n borderRadius = rawSet.coRoundRadius(handle)!;\n return new RoundConvexPolyhedron(vs, indices, borderRadius);\n case RawShapeType.Cylinder:\n halfHeight = rawSet.coHalfHeight(handle)!;\n radius = rawSet.coRadius(handle)!;\n return new Cylinder(halfHeight, radius);\n case RawShapeType.RoundCylinder:\n halfHeight = rawSet.coHalfHeight(handle)!;\n radius = rawSet.coRadius(handle)!;\n borderRadius = rawSet.coRoundRadius(handle)!;\n return new RoundCylinder(halfHeight, radius, borderRadius);\n case RawShapeType.Cone:\n halfHeight = rawSet.coHalfHeight(handle)!;\n radius = rawSet.coRadius(handle)!;\n return new Cone(halfHeight, radius);\n case RawShapeType.RoundCone:\n halfHeight = rawSet.coHalfHeight(handle)!;\n radius = rawSet.coRadius(handle)!;\n borderRadius = rawSet.coRoundRadius(handle)!;\n return new RoundCone(halfHeight, radius, borderRadius);\n\n default:\n throw new Error(\"unknown shape type: \" + rawType);\n }\n }\n\n /**\n * Computes the time of impact between two moving shapes.\n * @param shapePos1 - The initial position of this sahpe.\n * @param shapeRot1 - The rotation of this shape.\n * @param shapeVel1 - The velocity of this shape.\n * @param shape2 - The second moving shape.\n * @param shapePos2 - The initial position of the second shape.\n * @param shapeRot2 - The rotation of the second shape.\n * @param shapeVel2 - The velocity of the second shape.\n * @param targetDistance − If the shape moves closer to this distance from a collider, a hit\n * will be returned.\n * @param maxToi - The maximum time when the impact can happen.\n * @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if\n * the shape is penetrating another shape at its starting point **and** its trajectory is such\n * that it’s on a path to exit that penetration state.\n * @returns If the two moving shapes collider at some point along their trajectories, this returns the\n * time at which the two shape collider as well as the contact information during the impact. Returns\n * `null`if the two shapes never collide along their paths.\n */\n public castShape(\n shapePos1: Vector,\n shapeRot1: Rotation,\n shapeVel1: Vector,\n shape2: Shape,\n shapePos2: Vector,\n shapeRot2: Rotation,\n shapeVel2: Vector,\n targetDistance: number,\n maxToi: number,\n stopAtPenetration: boolean,\n ): ShapeCastHit | null {\n let rawPos1 = VectorOps.intoRaw(shapePos1);\n let rawRot1 = RotationOps.intoRaw(shapeRot1);\n let rawVel1 = VectorOps.intoRaw(shapeVel1);\n let rawPos2 = VectorOps.intoRaw(shapePos2);\n let rawRot2 = RotationOps.intoRaw(shapeRot2);\n let rawVel2 = VectorOps.intoRaw(shapeVel2);\n\n let rawShape1 = this.intoRaw();\n let rawShape2 = shape2.intoRaw();\n\n let result = ShapeCastHit.fromRaw(\n null,\n rawShape1.castShape(\n rawPos1,\n rawRot1,\n rawVel1,\n rawShape2,\n rawPos2,\n rawRot2,\n rawVel2,\n targetDistance,\n maxToi,\n stopAtPenetration,\n )!,\n );\n\n rawPos1.free();\n rawRot1.free();\n rawVel1.free();\n rawPos2.free();\n rawRot2.free();\n rawVel2.free();\n\n rawShape1.free();\n rawShape2.free();\n\n return result;\n }\n\n /**\n * Tests if this shape intersects another shape.\n *\n * @param shapePos1 - The position of this shape.\n * @param shapeRot1 - The rotation of this shape.\n * @param shape2 - The second shape to test.\n * @param shapePos2 - The position of the second shape.\n * @param shapeRot2 - The rotation of the second shape.\n * @returns `true` if the two shapes intersect, `false` if they don’t.\n */\n public intersectsShape(\n shapePos1: Vector,\n shapeRot1: Rotation,\n shape2: Shape,\n shapePos2: Vector,\n shapeRot2: Rotation,\n ): boolean {\n let rawPos1 = VectorOps.intoRaw(shapePos1);\n let rawRot1 = RotationOps.intoRaw(shapeRot1);\n let rawPos2 = VectorOps.intoRaw(shapePos2);\n let rawRot2 = RotationOps.intoRaw(shapeRot2);\n\n let rawShape1 = this.intoRaw();\n let rawShape2 = shape2.intoRaw();\n\n let result = rawShape1.intersectsShape(rawPos1, rawRot1, rawShape2, rawPos2, rawRot2);\n\n rawPos1.free();\n rawRot1.free();\n rawPos2.free();\n rawRot2.free();\n\n rawShape1.free();\n rawShape2.free();\n\n return result;\n }\n\n /**\n * Computes one pair of contact points between two shapes.\n *\n * @param shapePos1 - The initial position of this sahpe.\n * @param shapeRot1 - The rotation of this shape.\n * @param shape2 - The second shape.\n * @param shapePos2 - The initial position of the second shape.\n * @param shapeRot2 - The rotation of the second shape.\n * @param prediction - The prediction value, if the shapes are separated by a distance greater than this value, test will fail.\n * @returns `null` if the shapes are separated by a distance greater than prediction, otherwise contact details. The result is given in world-space.\n */\n contactShape(\n shapePos1: Vector,\n shapeRot1: Rotation,\n shape2: Shape,\n shapePos2: Vector,\n shapeRot2: Rotation,\n prediction: number,\n ): ShapeContact | null {\n let rawPos1 = VectorOps.intoRaw(shapePos1);\n let rawRot1 = RotationOps.intoRaw(shapeRot1);\n let rawPos2 = VectorOps.intoRaw(shapePos2);\n let rawRot2 = RotationOps.intoRaw(shapeRot2);\n\n let rawShape1 = this.intoRaw();\n let rawShape2 = shape2.intoRaw();\n\n let result = ShapeContact.fromRaw(\n rawShape1.contactShape(rawPos1, rawRot1, rawShape2, rawPos2, rawRot2, prediction)!,\n );\n\n rawPos1.free();\n rawRot1.free();\n rawPos2.free();\n rawRot2.free();\n\n rawShape1.free();\n rawShape2.free();\n\n return result;\n }\n\n containsPoint(shapePos: Vector, shapeRot: Rotation, point: Vector): boolean {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawPoint = VectorOps.intoRaw(point);\n let rawShape = this.intoRaw();\n\n let result = rawShape.containsPoint(rawPos, rawRot, rawPoint);\n\n rawPos.free();\n rawRot.free();\n rawPoint.free();\n rawShape.free();\n\n return result;\n }\n\n projectPoint(\n shapePos: Vector,\n shapeRot: Rotation,\n point: Vector,\n solid: boolean,\n ): PointProjection {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawPoint = VectorOps.intoRaw(point);\n let rawShape = this.intoRaw();\n\n let result = PointProjection.fromRaw(\n rawShape.projectPoint(rawPos, rawRot, rawPoint, solid),\n );\n\n rawPos.free();\n rawRot.free();\n rawPoint.free();\n rawShape.free();\n\n return result!;\n }\n\n intersectsRay(ray: Ray, shapePos: Vector, shapeRot: Rotation, maxToi: number): boolean {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawRayOrig = VectorOps.intoRaw(ray.origin);\n let rawRayDir = VectorOps.intoRaw(ray.dir);\n let rawShape = this.intoRaw();\n\n let result = rawShape.intersectsRay(rawPos, rawRot, rawRayOrig, rawRayDir, maxToi);\n\n rawPos.free();\n rawRot.free();\n rawRayOrig.free();\n rawRayDir.free();\n rawShape.free();\n\n return result;\n }\n\n castRay(\n ray: Ray,\n shapePos: Vector,\n shapeRot: Rotation,\n maxToi: number,\n solid: boolean,\n ): number {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawRayOrig = VectorOps.intoRaw(ray.origin);\n let rawRayDir = VectorOps.intoRaw(ray.dir);\n let rawShape = this.intoRaw();\n\n let result = rawShape.castRay(rawPos, rawRot, rawRayOrig, rawRayDir, maxToi, solid);\n\n rawPos.free();\n rawRot.free();\n rawRayOrig.free();\n rawRayDir.free();\n rawShape.free();\n\n return result;\n }\n\n castRayAndGetNormal(\n ray: Ray,\n shapePos: Vector,\n shapeRot: Rotation,\n maxToi: number,\n solid: boolean,\n ): RayIntersection {\n let rawPos = VectorOps.intoRaw(shapePos);\n let rawRot = RotationOps.intoRaw(shapeRot);\n let rawRayOrig = VectorOps.intoRaw(ray.origin);\n let rawRayDir = VectorOps.intoRaw(ray.dir);\n let rawShape = this.intoRaw();\n\n let result = RayIntersection.fromRaw(\n rawShape.castRayAndGetNormal(rawPos, rawRot, rawRayOrig, rawRayDir, maxToi, solid)!,\n );\n\n rawPos.free();\n rawRot.free();\n rawRayOrig.free();\n rawRayDir.free();\n rawShape.free();\n\n return result!;\n }\n}\n\n/**\n * An enumeration representing the type of a shape.\n */\nexport enum ShapeType {\n Ball = 0,\n Cuboid = 1,\n Capsule = 2,\n Segment = 3,\n Polyline = 4,\n Triangle = 5,\n TriMesh = 6,\n HeightField = 7,\n // Compound = 8,\n ConvexPolyhedron = 9,\n Cylinder = 10,\n Cone = 11,\n RoundCuboid = 12,\n RoundTriangle = 13,\n RoundCylinder = 14,\n RoundCone = 15,\n RoundConvexPolyhedron = 16,\n HalfSpace = 17,\n Voxels = 18,\n}\n\n// NOTE: this **must** match the bits in the HeightFieldFlags on the rust side.\n/**\n * Flags controlling the behavior of some operations involving heightfields.\n */\nexport enum HeightFieldFlags {\n /**\n * If set, a special treatment will be applied to contact manifold calculation to eliminate\n * or fix contacts normals that could lead to incorrect bumps in physics simulation (especially\n * on flat surfaces).\n *\n * This is achieved by taking into account adjacent triangle normals when computing contact\n * points for a given triangle.\n */\n FIX_INTERNAL_EDGES = 0b0000_0001,\n}\n\n// NOTE: this **must** match the TriMeshFlags on the rust side.\n/**\n * Flags controlling the behavior of the triangle mesh creation and of some\n * operations involving triangle meshes.\n */\nexport enum TriMeshFlags {\n // NOTE: these two flags are not really useful in JS.\n //\n // /**\n // * If set, the half-edge topology of the trimesh will be computed if possible.\n // */\n // HALF_EDGE_TOPOLOGY = 0b0000_0001,\n // /** If set, the half-edge topology and connected components of the trimesh will be computed if possible.\n // *\n // * Because of the way it is currently implemented, connected components can only be computed on\n // * a mesh where the half-edge topology computation succeeds. It will no longer be the case in the\n // * future once we decouple the computations.\n // */\n // CONNECTED_COMPONENTS = 0b0000_0010,\n /**\n * If set, any triangle that results in a failing half-hedge topology computation will be deleted.\n */\n DELETE_BAD_TOPOLOGY_TRIANGLES = 0b0000_0100,\n /**\n * If set, the trimesh will be assumed to be oriented (with outward normals).\n *\n * The pseudo-normals of its vertices and edges will be computed.\n */\n ORIENTED = 0b0000_1000,\n /**\n * If set, the duplicate vertices of the trimesh will be merged.\n *\n * Two vertices with the exact same coordinates will share the same entry on the\n * vertex buffer and the index buffer is adjusted accordingly.\n */\n MERGE_DUPLICATE_VERTICES = 0b0001_0000,\n /**\n * If set, the triangles sharing two vertices with identical index values will be removed.\n *\n * Because of the way it is currently implemented, this methods implies that duplicate\n * vertices will be merged. It will no longer be the case in the future once we decouple\n * the computations.\n */\n DELETE_DEGENERATE_TRIANGLES = 0b0010_0000,\n /**\n * If set, two triangles sharing three vertices with identical index values (in any order)\n * will be removed.\n *\n * Because of the way it is currently implemented, this methods implies that duplicate\n * vertices will be merged. It will no longer be the case in the future once we decouple\n * the computations.\n */\n DELETE_DUPLICATE_TRIANGLES = 0b0100_0000,\n /**\n * If set, a special treatment will be applied to contact manifold calculation to eliminate\n * or fix contacts normals that could lead to incorrect bumps in physics simulation\n * (especially on flat surfaces).\n *\n * This is achieved by taking into account adjacent triangle normals when computing contact\n * points for a given triangle.\n *\n * /!\\ NOT SUPPORTED IN THE 2D VERSION OF RAPIER.\n */\n FIX_INTERNAL_EDGES = 0b1000_0000 | TriMeshFlags.MERGE_DUPLICATE_VERTICES,\n}\n\n/**\n * A shape that is a sphere in 3D and a circle in 2D.\n */\nexport class Ball extends Shape {\n readonly type = ShapeType.Ball;\n\n /**\n * The balls radius.\n */\n radius: number;\n\n /**\n * Creates a new ball with the given radius.\n * @param radius - The balls radius.\n */\n constructor(radius: number) {\n super();\n this.radius = radius;\n }\n\n public intoRaw(): RawShape {\n return RawShape.ball(this.radius);\n }\n}\n\nexport class HalfSpace extends Shape {\n readonly type = ShapeType.HalfSpace;\n\n /**\n * The outward normal of the half-space.\n */\n normal: Vector;\n\n /**\n * Creates a new halfspace delimited by an infinite plane.\n *\n * @param normal - The outward normal of the plane.\n */\n constructor(normal: Vector) {\n super();\n this.normal = normal;\n }\n\n public intoRaw(): RawShape {\n let n = VectorOps.intoRaw(this.normal);\n let result = RawShape.halfspace(n);\n n.free();\n return result;\n }\n}\n\n/**\n * A shape that is a box in 3D and a rectangle in 2D.\n */\nexport class Cuboid extends Shape {\n readonly type = ShapeType.Cuboid;\n\n /**\n * The half extent of the cuboid along each coordinate axis.\n */\n halfExtents: Vector;\n\n /**\n * Creates a new 3D cuboid.\n * @param hx - The half width of the cuboid.\n * @param hy - The half height of the cuboid.\n * @param hz - The half depth of the cuboid.\n */\n constructor(hx: number, hy: number, hz: number) {\n super();\n this.halfExtents = VectorOps.new(hx, hy, hz);\n }\n\n public intoRaw(): RawShape {\n return RawShape.cuboid(this.halfExtents.x, this.halfExtents.y, this.halfExtents.z);\n }\n}\n\n/**\n * A shape that is a box in 3D and a rectangle in 2D, with round corners.\n */\nexport class RoundCuboid extends Shape {\n readonly type = ShapeType.RoundCuboid;\n\n /**\n * The half extent of the cuboid along each coordinate axis.\n */\n halfExtents: Vector;\n\n /**\n * The radius of the cuboid's round border.\n */\n borderRadius: number;\n\n /**\n * Creates a new 3D cuboid.\n * @param hx - The half width of the cuboid.\n * @param hy - The half height of the cuboid.\n * @param hz - The half depth of the cuboid.\n * @param borderRadius - The radius of the borders of this cuboid. This will\n * effectively increase the half-extents of the cuboid by this radius.\n */\n constructor(hx: number, hy: number, hz: number, borderRadius: number) {\n super();\n this.halfExtents = VectorOps.new(hx, hy, hz);\n this.borderRadius = borderRadius;\n }\n\n public intoRaw(): RawShape {\n return RawShape.roundCuboid(\n this.halfExtents.x,\n this.halfExtents.y,\n this.halfExtents.z,\n this.borderRadius,\n );\n }\n}\n\n/**\n * A shape that is a capsule.\n */\nexport class Capsule extends Shape {\n readonly type = ShapeType.Capsule;\n\n /**\n * The radius of the capsule's basis.\n */\n radius: number;\n\n /**\n * The capsule's half height, along the `y` axis.\n */\n halfHeight: number;\n\n /**\n * Creates a new capsule with the given radius and half-height.\n * @param halfHeight - The balls half-height along the `y` axis.\n * @param radius - The balls radius.\n */\n constructor(halfHeight: number, radius: number) {\n super();\n this.halfHeight = halfHeight;\n this.radius = radius;\n }\n\n public intoRaw(): RawShape {\n return RawShape.capsule(this.halfHeight, this.radius);\n }\n}\n\n/**\n * A shape that is a segment.\n */\nexport class Segment extends Shape {\n readonly type = ShapeType.Segment;\n\n /**\n * The first point of the segment.\n */\n a: Vector;\n\n /**\n * The second point of the segment.\n */\n b: Vector;\n\n /**\n * Creates a new segment shape.\n * @param a - The first point of the segment.\n * @param b - The second point of the segment.\n */\n constructor(a: Vector, b: Vector) {\n super();\n this.a = a;\n this.b = b;\n }\n\n public intoRaw(): RawShape {\n let ra = VectorOps.intoRaw(this.a);\n let rb = VectorOps.intoRaw(this.b);\n let result = RawShape.segment(ra, rb);\n ra.free();\n rb.free();\n return result;\n }\n}\n\n/**\n * A shape that is a segment.\n */\nexport class Triangle extends Shape {\n readonly type = ShapeType.Triangle;\n\n /**\n * The first point of the triangle.\n */\n a: Vector;\n\n /**\n * The second point of the triangle.\n */\n b: Vector;\n\n /**\n * The second point of the triangle.\n */\n c: Vector;\n\n /**\n * Creates a new triangle shape.\n *\n * @param a - The first point of the triangle.\n * @param b - The second point of the triangle.\n * @param c - The third point of the triangle.\n */\n constructor(a: Vector, b: Vector, c: Vector) {\n super();\n this.a = a;\n this.b = b;\n this.c = c;\n }\n\n public intoRaw(): RawShape {\n let ra = VectorOps.intoRaw(this.a);\n let rb = VectorOps.intoRaw(this.b);\n let rc = VectorOps.intoRaw(this.c);\n let result = RawShape.triangle(ra, rb, rc);\n ra.free();\n rb.free();\n rc.free();\n return result;\n }\n}\n\n/**\n * A shape that is a triangle with round borders and a non-zero thickness.\n */\nexport class RoundTriangle extends Shape {\n readonly type = ShapeType.RoundTriangle;\n\n /**\n * The first point of the triangle.\n */\n a: Vector;\n\n /**\n * The second point of the triangle.\n */\n b: Vector;\n\n /**\n * The second point of the triangle.\n */\n c: Vector;\n\n /**\n * The radius of the triangles's rounded edges and vertices.\n * In 3D, this is also equal to half the thickness of the round triangle.\n */\n borderRadius: number;\n\n /**\n * Creates a new triangle shape with round corners.\n *\n * @param a - The first point of the triangle.\n * @param b - The second point of the triangle.\n * @param c - The third point of the triangle.\n * @param borderRadius - The radius of the borders of this triangle. In 3D,\n * this is also equal to half the thickness of the triangle.\n */\n constructor(a: Vector, b: Vector, c: Vector, borderRadius: number) {\n super();\n this.a = a;\n this.b = b;\n this.c = c;\n this.borderRadius = borderRadius;\n }\n\n public intoRaw(): RawShape {\n let ra = VectorOps.intoRaw(this.a);\n let rb = VectorOps.intoRaw(this.b);\n let rc = VectorOps.intoRaw(this.c);\n let result = RawShape.roundTriangle(ra, rb, rc, this.borderRadius);\n ra.free();\n rb.free();\n rc.free();\n return result;\n }\n}\n\n/**\n * A shape that is a triangle mesh.\n */\nexport class Polyline extends Shape {\n readonly type = ShapeType.Polyline;\n\n /**\n * The vertices of the polyline.\n */\n vertices: Float32Array;\n\n /**\n * The indices of the segments.\n */\n indices: Uint32Array;\n\n /**\n * Creates a new polyline shape.\n *\n * @param vertices - The coordinates of the polyline's vertices.\n * @param indices - The indices of the polyline's segments. If this is `null` or not provided, then\n * the vertices are assumed to form a line strip.\n */\n constructor(vertices: Float32Array, indices?: Uint32Array) {\n super();\n this.vertices = vertices;\n this.indices = indices ?? new Uint32Array(0);\n }\n\n public intoRaw(): RawShape {\n return RawShape.polyline(this.vertices, this.indices);\n }\n}\n\n/**\n * A shape made of voxels.\n */\nexport class Voxels extends Shape {\n readonly type = ShapeType.Voxels;\n\n /**\n * The points or grid coordinates used to initialize the voxels.\n */\n data: Float32Array | Int32Array;\n\n /**\n * The dimensions of each voxel.\n */\n voxelSize: Vector;\n\n /**\n * Creates a new shape made of voxels.\n *\n * @param data - Defines the set of voxels. If this is a `Int32Array` then\n * each voxel is defined from its (signed) grid coordinates,\n * with 3 (resp 2) contiguous integers per voxel in 3D (resp 2D).\n * If this is a `Float32Array`, each voxel will be such that\n * they contain at least one point from this array (where each\n * point is defined from 3 (resp 2) contiguous numbers per point\n * in 3D (resp 2D).\n * @param voxelSize - The size of each voxel.\n */\n constructor(data: Float32Array | Int32Array, voxelSize: Vector) {\n super();\n this.data = data;\n this.voxelSize = voxelSize;\n }\n\n public intoRaw(): RawShape {\n let voxelSize = VectorOps.intoRaw(this.voxelSize);\n\n let result;\n if (this.data instanceof Int32Array) {\n result = RawShape.voxels(voxelSize, this.data);\n } else {\n result = RawShape.voxelsFromPoints(voxelSize, this.data);\n }\n\n voxelSize.free();\n return result;\n }\n}\n\n/**\n * A shape that is a triangle mesh.\n */\nexport class TriMesh extends Shape {\n readonly type = ShapeType.TriMesh;\n\n /**\n * The vertices of the triangle mesh.\n */\n vertices: Float32Array;\n\n /**\n * The indices of the triangles.\n */\n indices: Uint32Array;\n\n /**\n * The triangle mesh flags.\n */\n flags?: TriMeshFlags;\n\n /**\n * Creates a new triangle mesh shape.\n *\n * @param vertices - The coordinates of the triangle mesh's vertices.\n * @param indices - The indices of the triangle mesh's triangles.\n */\n constructor(vertices: Float32Array, indices: Uint32Array, flags?: TriMeshFlags) {\n super();\n this.vertices = vertices;\n this.indices = indices;\n this.flags = flags;\n }\n\n public intoRaw(): RawShape {\n return RawShape.trimesh(this.vertices, this.indices, this.flags ?? 0)!;\n }\n}\n\n/**\n * A shape that is a convex polygon.\n */\nexport class ConvexPolyhedron extends Shape {\n readonly type = ShapeType.ConvexPolyhedron;\n\n /**\n * The vertices of the convex polygon.\n */\n vertices: Float32Array;\n\n /**\n * The indices of the convex polygon.\n */\n indices?: Uint32Array | null;\n\n /**\n * Creates a new convex polygon shape.\n *\n * @param vertices - The coordinates of the convex polygon's vertices.\n * @param indices - The index buffer of this convex mesh. If this is `null`\n * or `undefined`, the convex-hull of the input vertices will be computed\n * automatically. Otherwise, it will be assumed that the mesh you provide\n * is already convex.\n */\n constructor(vertices: Float32Array, indices?: Uint32Array | null) {\n super();\n this.vertices = vertices;\n this.indices = indices;\n }\n\n public intoRaw(): RawShape {\n if (!!this.indices) {\n return RawShape.convexMesh(this.vertices, this.indices)!;\n } else {\n return RawShape.convexHull(this.vertices)!;\n }\n }\n}\n\n/**\n * A shape that is a convex polygon.\n */\nexport class RoundConvexPolyhedron extends Shape {\n readonly type = ShapeType.RoundConvexPolyhedron;\n\n /**\n * The vertices of the convex polygon.\n */\n vertices: Float32Array;\n\n /**\n * The indices of the convex polygon.\n */\n indices?: Uint32Array | null;\n\n /**\n * The radius of the convex polyhedron's rounded edges and vertices.\n */\n borderRadius: number;\n\n /**\n * Creates a new convex polygon shape.\n *\n * @param vertices - The coordinates of the convex polygon's vertices.\n * @param indices - The index buffer of this convex mesh. If this is `null`\n * or `undefined`, the convex-hull of the input vertices will be computed\n * automatically. Otherwise, it will be assumed that the mesh you provide\n * is already convex.\n * @param borderRadius - The radius of the borders of this convex polyhedron.\n */\n constructor(\n vertices: Float32Array,\n indices: Uint32Array | null | undefined,\n borderRadius: number,\n ) {\n super();\n this.vertices = vertices;\n this.indices = indices;\n this.borderRadius = borderRadius;\n }\n\n public intoRaw(): RawShape {\n if (!!this.indices) {\n return RawShape.roundConvexMesh(this.vertices, this.indices, this.borderRadius)!;\n } else {\n return RawShape.roundConvexHull(this.vertices, this.borderRadius)!;\n }\n }\n}\n\n/**\n * A shape that is a heightfield.\n */\nexport class Heightfield extends Shape {\n readonly type = ShapeType.HeightField;\n\n /**\n * The number of rows in the heights matrix.\n */\n nrows: number;\n\n /**\n * The number of columns in the heights matrix.\n */\n ncols: number;\n\n /**\n * The heights of the heightfield along its local `y` axis,\n * provided as a matrix stored in column-major order.\n */\n heights: Float32Array;\n\n /**\n * The dimensions of the heightfield's local `x,z` plane.\n */\n scale: Vector;\n\n /**\n * Flags applied to the heightfield.\n */\n flags?: HeightFieldFlags;\n\n /**\n * Creates a new heightfield shape.\n *\n * @param nrows − The number of rows in the heights matrix.\n * @param ncols - The number of columns in the heights matrix.\n * @param heights - The heights of the heightfield along its local `y` axis,\n * provided as a matrix stored in column-major order.\n * @param scale - The dimensions of the heightfield's local `x,z` plane.\n */\n constructor(\n nrows: number,\n ncols: number,\n heights: Float32Array,\n scale: Vector,\n flags?: HeightFieldFlags,\n ) {\n super();\n this.nrows = nrows;\n this.ncols = ncols;\n this.heights = heights;\n this.scale = scale;\n this.flags = flags;\n }\n\n public intoRaw(): RawShape {\n let rawScale = VectorOps.intoRaw(this.scale);\n let rawShape = RawShape.heightfield(\n this.nrows,\n this.ncols,\n this.heights,\n rawScale,\n this.flags ?? 0,\n );\n rawScale.free();\n return rawShape;\n }\n}\n\n/**\n * A shape that is a 3D cylinder.\n */\nexport class Cylinder extends Shape {\n readonly type = ShapeType.Cylinder;\n\n /**\n * The radius of the cylinder's basis.\n */\n radius: number;\n\n /**\n * The cylinder's half height, along the `y` axis.\n */\n halfHeight: number;\n\n /**\n * Creates a new cylinder with the given radius and half-height.\n * @param halfHeight - The balls half-height along the `y` axis.\n * @param radius - The balls radius.\n */\n constructor(halfHeight: number, radius: number) {\n super();\n this.halfHeight = halfHeight;\n this.radius = radius;\n }\n\n public intoRaw(): RawShape {\n return RawShape.cylinder(this.halfHeight, this.radius);\n }\n}\n\n/**\n * A shape that is a 3D cylinder with round corners.\n */\nexport class RoundCylinder extends Shape {\n readonly type = ShapeType.RoundCylinder;\n\n /**\n * The radius of the cylinder's basis.\n */\n radius: number;\n\n /**\n * The cylinder's half height, along the `y` axis.\n */\n halfHeight: number;\n\n /**\n * The radius of the cylinder's rounded edges and vertices.\n */\n borderRadius: number;\n\n /**\n * Creates a new cylinder with the given radius and half-height.\n * @param halfHeight - The balls half-height along the `y` axis.\n * @param radius - The balls radius.\n * @param borderRadius - The radius of the borders of this cylinder.\n */\n constructor(halfHeight: number, radius: number, borderRadius: number) {\n super();\n this.borderRadius = borderRadius;\n this.halfHeight = halfHeight;\n this.radius = radius;\n }\n\n public intoRaw(): RawShape {\n return RawShape.roundCylinder(this.halfHeight, this.radius, this.borderRadius);\n }\n}\n\n/**\n * A shape that is a 3D cone.\n */\nexport class Cone extends Shape {\n readonly type = ShapeType.Cone;\n\n /**\n * The radius of the cone's basis.\n */\n radius: number;\n\n /**\n * The cone's half height, along the `y` axis.\n */\n halfHeight: number;\n\n /**\n * Creates a new cone with the given radius and half-height.\n * @param halfHeight - The balls half-height along the `y` axis.\n * @param radius - The balls radius.\n */\n constructor(halfHeight: number, radius: number) {\n super();\n this.halfHeight = halfHeight;\n this.radius = radius;\n }\n\n public intoRaw(): RawShape {\n return RawShape.cone(this.halfHeight, this.radius);\n }\n}\n\n/**\n * A shape that is a 3D cone with round corners.\n */\nexport class RoundCone extends Shape {\n readonly type = ShapeType.RoundCone;\n\n /**\n * The radius of the cone's basis.\n */\n radius: number;\n\n /**\n * The cone's half height, along the `y` axis.\n */\n halfHeight: number;\n\n /**\n * The radius of the cylinder's rounded edges and vertices.\n */\n borderRadius: number;\n\n /**\n * Creates a new cone with the given radius and half-height.\n * @param halfHeight - The balls half-height along the `y` axis.\n * @param radius - The balls radius.\n * @param borderRadius - The radius of the borders of this cone.\n */\n constructor(halfHeight: number, radius: number, borderRadius: number) {\n super();\n this.halfHeight = halfHeight;\n this.radius = radius;\n this.borderRadius = borderRadius;\n }\n\n public intoRaw(): RawShape {\n return RawShape.roundCone(this.halfHeight, this.radius, this.borderRadius);\n }\n}\n","import {IntegrationParameters, RigidBodySet} from \"../dynamics\";\nimport {\n BroadPhase,\n Collider,\n ColliderSet,\n InteractionGroups,\n NarrowPhase,\n} from \"../geometry\";\nimport {Vector, VectorOps} from \"../math\";\nimport {QueryFilterFlags} from \"../pipeline\";\nimport {RawKinematicCharacterController, RawCharacterCollision} from \"../raw\";\n\n/**\n * A collision between the character and an obstacle hit on its path.\n */\nexport class CharacterCollision {\n /** The collider involved in the collision. Null if the collider no longer exists in the physics world. */\n public collider: Collider | null = null;\n /** The translation delta applied to the character before this collision took place. */\n public translationDeltaApplied!: Vector;\n /** The translation delta the character would move after this collision if there is no other obstacles. */\n public translationDeltaRemaining!: Vector;\n /** The time-of-impact between the character and the obstacles. */\n public toi!: number;\n /** The world-space contact point on the collider when the collision happens. */\n public witness1!: Vector;\n /** The local-space contact point on the character when the collision happens. */\n public witness2!: Vector;\n /** The world-space outward contact normal on the collider when the collision happens. */\n public normal1!: Vector;\n /** The local-space outward contact normal on the character when the collision happens. */\n public normal2!: Vector;\n}\n\n/**\n * A character controller for controlling kinematic bodies and parentless colliders by hitting\n * and sliding against obstacles.\n */\nexport class KinematicCharacterController {\n private raw: RawKinematicCharacterController;\n private rawCharacterCollision: RawCharacterCollision;\n\n private params: IntegrationParameters;\n private broadPhase: BroadPhase;\n private narrowPhase: NarrowPhase;\n private bodies: RigidBodySet;\n private colliders: ColliderSet;\n private _applyImpulsesToDynamicBodies: boolean;\n private _characterMass: number | null;\n\n constructor(\n offset: number,\n params: IntegrationParameters,\n broadPhase: BroadPhase,\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n ) {\n this.params = params;\n this.bodies = bodies;\n this.colliders = colliders;\n this.broadPhase = broadPhase;\n this.narrowPhase = narrowPhase;\n this.raw = new RawKinematicCharacterController(offset);\n this.rawCharacterCollision = new RawCharacterCollision();\n this._applyImpulsesToDynamicBodies = false;\n this._characterMass = null;\n }\n\n /** @internal */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n this.rawCharacterCollision.free();\n }\n\n this.raw = undefined!;\n this.rawCharacterCollision = undefined!;\n }\n\n /**\n * The direction that goes \"up\". Used to determine where the floor is, and the floor’s angle.\n */\n public up(): Vector {\n return this.raw.up();\n }\n\n /**\n * Sets the direction that goes \"up\". Used to determine where the floor is, and the floor’s angle.\n */\n public setUp(vector: Vector) {\n let rawVect = VectorOps.intoRaw(vector);\n this.raw.setUp(rawVect);\n rawVect.free();\n }\n\n public applyImpulsesToDynamicBodies(): boolean {\n return this._applyImpulsesToDynamicBodies;\n }\n\n public setApplyImpulsesToDynamicBodies(enabled: boolean) {\n this._applyImpulsesToDynamicBodies = enabled;\n }\n\n /**\n * Returns the custom value of the character mass, if it was set by `this.setCharacterMass`.\n */\n public characterMass(): number | null {\n return this._characterMass;\n }\n\n /**\n * Set the mass of the character to be used for impulse resolution if `self.applyImpulsesToDynamicBodies`\n * is set to `true`.\n *\n * If no character mass is set explicitly (or if it is set to `null`) it is automatically assumed to be equal\n * to the mass of the rigid-body the character collider is attached to; or equal to 0 if the character collider\n * isn’t attached to any rigid-body.\n *\n * @param mass - The mass to set.\n */\n public setCharacterMass(mass: number | null) {\n this._characterMass = mass;\n }\n\n /**\n * A small gap to preserve between the character and its surroundings.\n *\n * This value should not be too large to avoid visual artifacts, but shouldn’t be too small\n * (must not be zero) to improve numerical stability of the character controller.\n */\n public offset(): number {\n return this.raw.offset();\n }\n\n /**\n * Sets a small gap to preserve between the character and its surroundings.\n *\n * This value should not be too large to avoid visual artifacts, but shouldn’t be too small\n * (must not be zero) to improve numerical stability of the character controller.\n */\n public setOffset(value: number) {\n this.raw.setOffset(value);\n }\n\n /// Increase this number if your character appears to get stuck when sliding against surfaces.\n ///\n /// This is a small distance applied to the movement toward the contact normals of shapes hit\n /// by the character controller. This helps shape-casting not getting stuck in an always-penetrating\n /// state during the sliding calculation.\n ///\n /// This value should remain fairly small since it can introduce artificial \"bumps\" when sliding\n /// along a flat surface.\n public normalNudgeFactor(): number {\n return this.raw.normalNudgeFactor();\n }\n\n /// Increase this number if your character appears to get stuck when sliding against surfaces.\n ///\n /// This is a small distance applied to the movement toward the contact normals of shapes hit\n /// by the character controller. This helps shape-casting not getting stuck in an always-penetrating\n /// state during the sliding calculation.\n ///\n /// This value should remain fairly small since it can introduce artificial \"bumps\" when sliding\n /// along a flat surface.\n public setNormalNudgeFactor(value: number) {\n this.raw.setNormalNudgeFactor(value);\n }\n\n /**\n * Is sliding against obstacles enabled?\n */\n public slideEnabled(): boolean {\n return this.raw.slideEnabled();\n }\n\n /**\n * Enable or disable sliding against obstacles.\n */\n public setSlideEnabled(enabled: boolean) {\n this.raw.setSlideEnabled(enabled);\n }\n\n /**\n * The maximum step height a character can automatically step over.\n */\n public autostepMaxHeight(): number | null {\n return this.raw.autostepMaxHeight() ?? null;\n }\n\n /**\n * The minimum width of free space that must be available after stepping on a stair.\n */\n public autostepMinWidth(): number | null {\n return this.raw.autostepMinWidth() ?? null;\n }\n\n /**\n * Can the character automatically step over dynamic bodies too?\n */\n public autostepIncludesDynamicBodies(): boolean | null {\n return this.raw.autostepIncludesDynamicBodies() ?? null;\n }\n\n /**\n * Is automatically stepping over small objects enabled?\n */\n public autostepEnabled(): boolean {\n return this.raw.autostepEnabled();\n }\n\n /**\n * Enabled automatically stepping over small objects.\n *\n * @param maxHeight - The maximum step height a character can automatically step over.\n * @param minWidth - The minimum width of free space that must be available after stepping on a stair.\n * @param includeDynamicBodies - Can the character automatically step over dynamic bodies too?\n */\n public enableAutostep(maxHeight: number, minWidth: number, includeDynamicBodies: boolean) {\n this.raw.enableAutostep(maxHeight, minWidth, includeDynamicBodies);\n }\n\n /**\n * Disable automatically stepping over small objects.\n */\n public disableAutostep() {\n return this.raw.disableAutostep();\n }\n\n /**\n * The maximum angle (radians) between the floor’s normal and the `up` vector that the\n * character is able to climb.\n */\n public maxSlopeClimbAngle(): number {\n return this.raw.maxSlopeClimbAngle();\n }\n\n /**\n * Sets the maximum angle (radians) between the floor’s normal and the `up` vector that the\n * character is able to climb.\n */\n public setMaxSlopeClimbAngle(angle: number) {\n this.raw.setMaxSlopeClimbAngle(angle);\n }\n\n /**\n * The minimum angle (radians) between the floor’s normal and the `up` vector before the\n * character starts to slide down automatically.\n */\n public minSlopeSlideAngle(): number {\n return this.raw.minSlopeSlideAngle();\n }\n\n /**\n * Sets the minimum angle (radians) between the floor’s normal and the `up` vector before the\n * character starts to slide down automatically.\n */\n public setMinSlopeSlideAngle(angle: number) {\n this.raw.setMinSlopeSlideAngle(angle);\n }\n\n /**\n * If snap-to-ground is enabled, should the character be automatically snapped to the ground if\n * the distance between the ground and its feet are smaller than the specified threshold?\n */\n public snapToGroundDistance(): number | null {\n return this.raw.snapToGroundDistance() ?? null;\n }\n\n /**\n * Enables automatically snapping the character to the ground if the distance between\n * the ground and its feet are smaller than the specified threshold.\n */\n public enableSnapToGround(distance: number) {\n this.raw.enableSnapToGround(distance);\n }\n\n /**\n * Disables automatically snapping the character to the ground.\n */\n public disableSnapToGround() {\n this.raw.disableSnapToGround();\n }\n\n /**\n * Is automatically snapping the character to the ground enabled?\n */\n public snapToGroundEnabled(): boolean {\n return this.raw.snapToGroundEnabled();\n }\n\n /**\n * Computes the movement the given collider is able to execute after hitting and sliding on obstacles.\n *\n * @param collider - The collider to move.\n * @param desiredTranslationDelta - The desired collider movement.\n * @param filterFlags - Flags for excluding whole subsets of colliders from the obstacles taken into account.\n * @param filterGroups - Groups for excluding colliders with incompatible collision groups from the obstacles\n * taken into account.\n * @param filterPredicate - Any collider for which this closure returns `false` will be excluded from the\n * obstacles taken into account.\n */\n public computeColliderMovement(\n collider: Collider,\n desiredTranslationDelta: Vector,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterPredicate?: (collider: Collider) => boolean,\n ) {\n let rawTranslationDelta = VectorOps.intoRaw(desiredTranslationDelta);\n this.raw.computeColliderMovement(\n this.params.dt,\n this.broadPhase.raw,\n this.narrowPhase.raw,\n this.bodies.raw,\n this.colliders.raw,\n collider.handle,\n rawTranslationDelta,\n this._applyImpulsesToDynamicBodies,\n this._characterMass,\n filterFlags ?? 0,\n filterGroups,\n this.colliders.castClosure(filterPredicate) as unknown as Function,\n );\n rawTranslationDelta.free();\n }\n\n /**\n * The movement computed by the last call to `this.computeColliderMovement`.\n */\n public computedMovement(): Vector {\n return VectorOps.fromRaw(this.raw.computedMovement())!;\n }\n\n /**\n * The result of ground detection computed by the last call to `this.computeColliderMovement`.\n */\n public computedGrounded(): boolean {\n return this.raw.computedGrounded();\n }\n\n /**\n * The number of collisions against obstacles detected along the path of the last call\n * to `this.computeColliderMovement`.\n */\n public numComputedCollisions(): number {\n return this.raw.numComputedCollisions();\n }\n\n /**\n * Returns the collision against one of the obstacles detected along the path of the last\n * call to `this.computeColliderMovement`.\n *\n * @param i - The i-th collision will be returned.\n * @param out - If this argument is set, it will be filled with the collision information.\n */\n public computedCollision(i: number, out?: CharacterCollision): CharacterCollision | null {\n if (!this.raw.computedCollision(i, this.rawCharacterCollision)) {\n return null;\n } else {\n let c = this.rawCharacterCollision;\n out = out ?? new CharacterCollision();\n out.translationDeltaApplied = VectorOps.fromRaw(c.translationDeltaApplied())!;\n out.translationDeltaRemaining = VectorOps.fromRaw(c.translationDeltaRemaining())!;\n out.toi = c.toi();\n out.witness1 = VectorOps.fromRaw(c.worldWitness1())!;\n out.witness2 = VectorOps.fromRaw(c.worldWitness2())!;\n out.normal1 = VectorOps.fromRaw(c.worldNormal1())!;\n out.normal2 = VectorOps.fromRaw(c.worldNormal2())!;\n out.collider = this.colliders.get(c.handle());\n return out;\n }\n }\n}\n","import {IntegrationParameters, RigidBody, RigidBodySet} from \"../dynamics\";\nimport {Rotation, RotationOps, Vector, VectorOps} from \"../math\";\nimport {RawPidController} from \"../raw\";\n\n// TODO: unify with the JointAxesMask\n/**\n * An enum representing the possible joint axes controlled by a PidController.\n * They can be ORed together, like:\n * PidAxesMask.LinX || PidAxesMask.LinY\n * to get a pid controller that only constraints the translational X and Y axes.\n *\n * Possible axes are:\n *\n * - `X`: X translation axis\n * - `Y`: Y translation axis\n * - `Z`: Z translation axis\n * - `AngX`: X angular rotation axis (3D only)\n * - `AngY`: Y angular rotation axis (3D only)\n * - `AngZ`: Z angular rotation axis\n */\nexport enum PidAxesMask {\n None = 0,\n LinX = 1 << 0,\n LinY = 1 << 1,\n LinZ = 1 << 2,\n AngX = 1 << 3,\n AngY = 1 << 4,\n AngZ = 1 << 5,\n AllLin = PidAxesMask.LinX | PidAxesMask.LinY | PidAxesMask.LinZ,\n AllAng = PidAxesMask.AngX | PidAxesMask.AngY | PidAxesMask.AngZ,\n All = PidAxesMask.AllLin | PidAxesMask.AllAng,\n}\n\n/**\n * A controller for controlling dynamic bodies using the\n * Proportional-Integral-Derivative correction model.\n */\nexport class PidController {\n private raw: RawPidController;\n\n private params: IntegrationParameters;\n private bodies: RigidBodySet;\n\n constructor(\n params: IntegrationParameters,\n bodies: RigidBodySet,\n kp: number,\n ki: number,\n kd: number,\n axes: PidAxesMask,\n ) {\n this.params = params;\n this.bodies = bodies;\n this.raw = new RawPidController(kp, ki, kd, axes);\n }\n\n /** @internal */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n\n this.raw = undefined!;\n }\n\n public setKp(kp: number, axes: PidAxesMask) {\n this.raw.set_kp(kp, axes);\n }\n\n public setKi(ki: number, axes: PidAxesMask) {\n this.raw.set_kp(ki, axes);\n }\n\n public setKd(kd: number, axes: PidAxesMask) {\n this.raw.set_kp(kd, axes);\n }\n\n public setAxes(axes: PidAxesMask) {\n this.raw.set_axes_mask(axes);\n }\n\n public resetIntegrals() {\n this.raw.reset_integrals();\n }\n\n public applyLinearCorrection(body: RigidBody, targetPosition: Vector, targetLinvel: Vector) {\n let rawPos = VectorOps.intoRaw(targetPosition);\n let rawVel = VectorOps.intoRaw(targetLinvel);\n this.raw.apply_linear_correction(\n this.params.dt,\n this.bodies.raw,\n body.handle,\n rawPos,\n rawVel,\n );\n rawPos.free();\n rawVel.free();\n }\n\n public applyAngularCorrection(body: RigidBody, targetRotation: Rotation, targetAngVel: Vector) {\n let rawPos = RotationOps.intoRaw(targetRotation);\n let rawVel = VectorOps.intoRaw(targetAngVel);\n this.raw.apply_angular_correction(\n this.params.dt,\n this.bodies.raw,\n body.handle,\n rawPos,\n rawVel,\n );\n rawPos.free();\n rawVel.free();\n }\n\n public linearCorrection(body: RigidBody, targetPosition: Vector, targetLinvel: Vector): Vector {\n let rawPos = VectorOps.intoRaw(targetPosition);\n let rawVel = VectorOps.intoRaw(targetLinvel);\n let correction = this.raw.linear_correction(\n this.params.dt,\n this.bodies.raw,\n body.handle,\n rawPos,\n rawVel,\n );\n rawPos.free();\n rawVel.free();\n\n return VectorOps.fromRaw(correction)!;\n }\n\n public angularCorrection(\n body: RigidBody,\n targetRotation: Rotation,\n targetAngVel: Vector,\n ): Vector {\n let rawPos = RotationOps.intoRaw(targetRotation);\n let rawVel = VectorOps.intoRaw(targetAngVel);\n let correction = this.raw.angular_correction(\n this.params.dt,\n this.bodies.raw,\n body.handle,\n rawPos,\n rawVel,\n );\n rawPos.free();\n rawVel.free();\n\n return VectorOps.fromRaw(correction)!;\n }\n}\n","import {RigidBody, RigidBodySet} from \"../dynamics\";\nimport {BroadPhase, Collider, ColliderSet, InteractionGroups, NarrowPhase} from \"../geometry\";\nimport {Vector, VectorOps} from \"../math\";\nimport {QueryFilterFlags} from \"../pipeline\";\nimport {RawDynamicRayCastVehicleController} from \"../raw\";\n\n/**\n * A character controller to simulate vehicles using ray-casting for the wheels.\n */\nexport class DynamicRayCastVehicleController {\n private raw: RawDynamicRayCastVehicleController;\n private broadPhase: BroadPhase;\n private narrowPhase: NarrowPhase;\n private bodies: RigidBodySet;\n private colliders: ColliderSet;\n private _chassis: RigidBody;\n\n constructor(\n chassis: RigidBody,\n broadPhase: BroadPhase,\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n ) {\n this.raw = new RawDynamicRayCastVehicleController(chassis.handle);\n this.broadPhase = broadPhase;\n this.narrowPhase = narrowPhase;\n this.bodies = bodies;\n this.colliders = colliders;\n this._chassis = chassis;\n }\n\n /** @internal */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n\n this.raw = undefined!;\n }\n\n /**\n * Updates the vehicle’s velocity based on its suspension, engine force, and brake.\n *\n * This directly updates the velocity of its chassis rigid-body.\n *\n * @param dt - Time increment used to integrate forces.\n * @param filterFlags - Flag to exclude categories of objects from the wheels’ ray-cast.\n * @param filterGroups - Only colliders compatible with these groups will be hit by the wheels’ ray-casts.\n * @param filterPredicate - Callback to filter out which collider will be hit by the wheels’ ray-casts.\n */\n public updateVehicle(\n dt: number,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterPredicate?: (collider: Collider) => boolean,\n ) {\n this.raw.update_vehicle(\n dt,\n this.broadPhase.raw,\n this.narrowPhase.raw,\n this.bodies.raw,\n this.colliders.raw,\n filterFlags ?? 0,\n filterGroups,\n this.colliders.castClosure(filterPredicate) as unknown as Function,\n );\n }\n\n /**\n * The current forward speed of the vehicle.\n */\n public currentVehicleSpeed(): number {\n return this.raw.current_vehicle_speed();\n }\n\n /**\n * The rigid-body used as the chassis.\n */\n public chassis(): RigidBody {\n return this._chassis;\n }\n\n /**\n * The chassis’ local _up_ direction (`0 = x, 1 = y, 2 = z`).\n */\n get indexUpAxis(): number {\n return this.raw.index_up_axis();\n }\n\n /**\n * Sets the chassis’ local _up_ direction (`0 = x, 1 = y, 2 = z`).\n */\n set indexUpAxis(axis: number) {\n this.raw.set_index_up_axis(axis);\n }\n\n /**\n * The chassis’ local _forward_ direction (`0 = x, 1 = y, 2 = z`).\n */\n get indexForwardAxis(): number {\n return this.raw.index_forward_axis();\n }\n\n /**\n * Sets the chassis’ local _forward_ direction (`0 = x, 1 = y, 2 = z`).\n */\n set setIndexForwardAxis(axis: number) {\n this.raw.set_index_forward_axis(axis);\n }\n\n /**\n * Adds a new wheel attached to this vehicle.\n * @param chassisConnectionCs - The position of the wheel relative to the chassis.\n * @param directionCs - The direction of the wheel’s suspension, relative to the chassis. The ray-casting will\n * happen following this direction to detect the ground.\n * @param axleCs - The wheel’s axle axis, relative to the chassis.\n * @param suspensionRestLength - The rest length of the wheel’s suspension spring.\n * @param radius - The wheel’s radius.\n */\n public addWheel(\n chassisConnectionCs: Vector,\n directionCs: Vector,\n axleCs: Vector,\n suspensionRestLength: number,\n radius: number,\n ) {\n let rawChassisConnectionCs = VectorOps.intoRaw(chassisConnectionCs);\n let rawDirectionCs = VectorOps.intoRaw(directionCs);\n let rawAxleCs = VectorOps.intoRaw(axleCs);\n\n this.raw.add_wheel(\n rawChassisConnectionCs,\n rawDirectionCs,\n rawAxleCs,\n suspensionRestLength,\n radius,\n );\n\n rawChassisConnectionCs.free();\n rawDirectionCs.free();\n rawAxleCs.free();\n }\n\n /**\n * The number of wheels attached to this vehicle.\n */\n public numWheels(): number {\n return this.raw.num_wheels();\n }\n\n /*\n *\n * Access to wheel properties.\n *\n */\n /*\n * Getters + setters\n */\n /**\n * The position of the i-th wheel, relative to the chassis.\n */\n public wheelChassisConnectionPointCs(i: number): Vector | null {\n return VectorOps.fromRaw(this.raw.wheel_chassis_connection_point_cs(i)!);\n }\n\n /**\n * Sets the position of the i-th wheel, relative to the chassis.\n */\n public setWheelChassisConnectionPointCs(i: number, value: Vector) {\n let rawValue = VectorOps.intoRaw(value);\n this.raw.set_wheel_chassis_connection_point_cs(i, rawValue);\n rawValue.free();\n }\n\n /**\n * The rest length of the i-th wheel’s suspension spring.\n */\n public wheelSuspensionRestLength(i: number): number | null {\n return this.raw.wheel_suspension_rest_length(i) ?? null;\n }\n\n /**\n * Sets the rest length of the i-th wheel’s suspension spring.\n */\n public setWheelSuspensionRestLength(i: number, value: number) {\n this.raw.set_wheel_suspension_rest_length(i, value);\n }\n\n /**\n * The maximum distance the i-th wheel suspension can travel before and after its resting length.\n */\n public wheelMaxSuspensionTravel(i: number): number | null {\n return this.raw.wheel_max_suspension_travel(i) ?? null;\n }\n\n /**\n * Sets the maximum distance the i-th wheel suspension can travel before and after its resting length.\n */\n public setWheelMaxSuspensionTravel(i: number, value: number) {\n this.raw.set_wheel_max_suspension_travel(i, value);\n }\n\n /**\n * The i-th wheel’s radius.\n */\n public wheelRadius(i: number): number | null {\n return this.raw.wheel_radius(i) ?? null;\n }\n\n /**\n * Sets the i-th wheel’s radius.\n */\n public setWheelRadius(i: number, value: number) {\n this.raw.set_wheel_radius(i, value);\n }\n\n /**\n * The i-th wheel’s suspension stiffness.\n *\n * Increase this value if the suspension appears to not push the vehicle strong enough.\n */\n public wheelSuspensionStiffness(i: number): number | null {\n return this.raw.wheel_suspension_stiffness(i) ?? null;\n }\n\n /**\n * Sets the i-th wheel’s suspension stiffness.\n *\n * Increase this value if the suspension appears to not push the vehicle strong enough.\n */\n public setWheelSuspensionStiffness(i: number, value: number) {\n this.raw.set_wheel_suspension_stiffness(i, value);\n }\n\n /**\n * The i-th wheel’s suspension’s damping when it is being compressed.\n */\n public wheelSuspensionCompression(i: number): number | null {\n return this.raw.wheel_suspension_compression(i) ?? null;\n }\n\n /**\n * The i-th wheel’s suspension’s damping when it is being compressed.\n */\n public setWheelSuspensionCompression(i: number, value: number) {\n this.raw.set_wheel_suspension_compression(i, value);\n }\n\n /**\n * The i-th wheel’s suspension’s damping when it is being released.\n *\n * Increase this value if the suspension appears to overshoot.\n */\n public wheelSuspensionRelaxation(i: number): number | null {\n return this.raw.wheel_suspension_relaxation(i) ?? null;\n }\n\n /**\n * Sets the i-th wheel’s suspension’s damping when it is being released.\n *\n * Increase this value if the suspension appears to overshoot.\n */\n public setWheelSuspensionRelaxation(i: number, value: number) {\n this.raw.set_wheel_suspension_relaxation(i, value);\n }\n\n /**\n * The maximum force applied by the i-th wheel’s suspension.\n */\n public wheelMaxSuspensionForce(i: number): number | null {\n return this.raw.wheel_max_suspension_force(i) ?? null;\n }\n\n /**\n * Sets the maximum force applied by the i-th wheel’s suspension.\n */\n public setWheelMaxSuspensionForce(i: number, value: number) {\n this.raw.set_wheel_max_suspension_force(i, value);\n }\n\n /**\n * The maximum amount of braking impulse applied on the i-th wheel to slow down the vehicle.\n */\n public wheelBrake(i: number): number | null {\n return this.raw.wheel_brake(i) ?? null;\n }\n\n /**\n * Set the maximum amount of braking impulse applied on the i-th wheel to slow down the vehicle.\n */\n public setWheelBrake(i: number, value: number) {\n this.raw.set_wheel_brake(i, value);\n }\n\n /**\n * The steering angle (radians) for the i-th wheel.\n */\n public wheelSteering(i: number): number | null {\n return this.raw.wheel_steering(i) ?? null;\n }\n\n /**\n * Sets the steering angle (radians) for the i-th wheel.\n */\n public setWheelSteering(i: number, value: number) {\n this.raw.set_wheel_steering(i, value);\n }\n\n /**\n * The forward force applied by the i-th wheel on the chassis.\n */\n public wheelEngineForce(i: number): number | null {\n return this.raw.wheel_engine_force(i) ?? null;\n }\n\n /**\n * Sets the forward force applied by the i-th wheel on the chassis.\n */\n public setWheelEngineForce(i: number, value: number) {\n this.raw.set_wheel_engine_force(i, value);\n }\n\n /**\n * The direction of the i-th wheel’s suspension, relative to the chassis.\n *\n * The ray-casting will happen following this direction to detect the ground.\n */\n public wheelDirectionCs(i: number): Vector | null {\n return VectorOps.fromRaw(this.raw.wheel_direction_cs(i)!);\n }\n\n /**\n * Sets the direction of the i-th wheel’s suspension, relative to the chassis.\n *\n * The ray-casting will happen following this direction to detect the ground.\n */\n public setWheelDirectionCs(i: number, value: Vector) {\n let rawValue = VectorOps.intoRaw(value);\n this.raw.set_wheel_direction_cs(i, rawValue);\n rawValue.free();\n }\n\n /**\n * The i-th wheel’s axle axis, relative to the chassis.\n *\n * The axis index defined as 0 = X, 1 = Y, 2 = Z.\n */\n public wheelAxleCs(i: number): Vector | null {\n return VectorOps.fromRaw(this.raw.wheel_axle_cs(i)!);\n }\n\n /**\n * Sets the i-th wheel’s axle axis, relative to the chassis.\n *\n * The axis index defined as 0 = X, 1 = Y, 2 = Z.\n */\n public setWheelAxleCs(i: number, value: Vector) {\n let rawValue = VectorOps.intoRaw(value);\n this.raw.set_wheel_axle_cs(i, rawValue);\n rawValue.free();\n }\n\n /**\n * Parameter controlling how much traction the tire has.\n *\n * The larger the value, the more instantaneous braking will happen (with the risk of\n * causing the vehicle to flip if it’s too strong).\n */\n public wheelFrictionSlip(i: number): number | null {\n return this.raw.wheel_friction_slip(i) ?? null;\n }\n\n /**\n * Sets the parameter controlling how much traction the tire has.\n *\n * The larger the value, the more instantaneous braking will happen (with the risk of\n * causing the vehicle to flip if it’s too strong).\n */\n public setWheelFrictionSlip(i: number, value: number) {\n this.raw.set_wheel_friction_slip(i, value);\n }\n\n /**\n * The multiplier of friction between a tire and the collider it’s on top of.\n *\n * The larger the value, the stronger side friction will be.\n */\n public wheelSideFrictionStiffness(i: number): number | null {\n return this.raw.wheel_side_friction_stiffness(i) ?? null;\n }\n\n /**\n * The multiplier of friction between a tire and the collider it’s on top of.\n *\n * The larger the value, the stronger side friction will be.\n */\n public setWheelSideFrictionStiffness(i: number, value: number) {\n this.raw.set_wheel_side_friction_stiffness(i, value);\n }\n\n /*\n * Getters only.\n */\n\n /**\n * The i-th wheel’s current rotation angle (radians) on its axle.\n */\n public wheelRotation(i: number): number | null {\n return this.raw.wheel_rotation(i) ?? null;\n }\n\n /**\n * The forward impulses applied by the i-th wheel on the chassis.\n */\n public wheelForwardImpulse(i: number): number | null {\n return this.raw.wheel_forward_impulse(i) ?? null;\n }\n\n /**\n * The side impulses applied by the i-th wheel on the chassis.\n */\n public wheelSideImpulse(i: number): number | null {\n return this.raw.wheel_side_impulse(i) ?? null;\n }\n\n /**\n * The force applied by the i-th wheel suspension.\n */\n public wheelSuspensionForce(i: number): number | null {\n return this.raw.wheel_suspension_force(i) ?? null;\n }\n\n /**\n * The (world-space) contact normal between the i-th wheel and the floor.\n */\n public wheelContactNormal(i: number): Vector | null {\n return VectorOps.fromRaw(this.raw.wheel_contact_normal_ws(i)!);\n }\n\n /**\n * The (world-space) point hit by the wheel’s ray-cast for the i-th wheel.\n */\n public wheelContactPoint(i: number): Vector | null {\n return VectorOps.fromRaw(this.raw.wheel_contact_point_ws(i)!);\n }\n\n /**\n * The suspension length for the i-th wheel.\n */\n public wheelSuspensionLength(i: number): number | null {\n return this.raw.wheel_suspension_length(i) ?? null;\n }\n\n /**\n * The (world-space) starting point of the ray-cast for the i-th wheel.\n */\n public wheelHardPoint(i: number): Vector | null {\n return VectorOps.fromRaw(this.raw.wheel_hard_point_ws(i)!);\n }\n\n /**\n * Is the i-th wheel in contact with the ground?\n */\n public wheelIsInContact(i: number): boolean {\n return this.raw.wheel_is_in_contact(i);\n }\n\n /**\n * The collider hit by the ray-cast for the i-th wheel.\n */\n public wheelGroundObject(i: number): Collider | null {\n return this.colliders.get(this.raw.wheel_ground_object(i)!);\n }\n}\n","import {ImpulseJointSet, MultibodyJointSet, RigidBodySet} from \"../dynamics\";\nimport {Collider, ColliderSet, NarrowPhase} from \"../geometry\";\nimport {RawDebugRenderPipeline} from \"../raw\";\nimport {QueryFilterFlags} from \"./query_pipeline\";\n\n/**\n * The vertex and color buffers for debug-redering the physics scene.\n */\nexport class DebugRenderBuffers {\n /**\n * The lines to render. This is a flat array containing all the lines\n * to render. Each line is described as two consecutive point. Each\n * point is described as two (in 2D) or three (in 3D) consecutive\n * floats. For example, in 2D, the array: `[1, 2, 3, 4, 5, 6, 7, 8]`\n * describes the two segments `[[1, 2], [3, 4]]` and `[[5, 6], [7, 8]]`.\n */\n public vertices: Float32Array;\n /**\n * The color buffer. There is one color per vertex, and each color\n * has four consecutive components (in RGBA format).\n */\n public colors: Float32Array;\n\n constructor(vertices: Float32Array, colors: Float32Array) {\n this.vertices = vertices;\n this.colors = colors;\n }\n}\n\n/**\n * A pipeline for rendering the physics scene.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `debugRenderPipeline.free()`\n * once you are done using it (and all the rigid-bodies it created).\n */\nexport class DebugRenderPipeline {\n raw: RawDebugRenderPipeline;\n public vertices!: Float32Array;\n public colors!: Float32Array;\n\n /**\n * Release the WASM memory occupied by this serialization pipeline.\n */\n free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n this.vertices = undefined!;\n this.colors = undefined!;\n }\n\n constructor(raw?: RawDebugRenderPipeline) {\n this.raw = raw || new RawDebugRenderPipeline();\n }\n\n public render(\n bodies: RigidBodySet,\n colliders: ColliderSet,\n impulse_joints: ImpulseJointSet,\n multibody_joints: MultibodyJointSet,\n narrow_phase: NarrowPhase,\n filterFlags?: QueryFilterFlags,\n filterPredicate?: (collider: Collider) => boolean,\n ) {\n this.raw.render(\n bodies.raw,\n colliders.raw,\n impulse_joints.raw,\n multibody_joints.raw,\n narrow_phase.raw,\n filterFlags ?? 0,\n colliders.castClosure(filterPredicate) as unknown as Function,\n );\n this.vertices = this.raw.vertices();\n this.colors = this.raw.colors();\n }\n}\n","import {\n IntegrationParameters,\n ImpulseJointSet,\n MultibodyJointSet,\n RigidBodySet,\n CCDSolver,\n IslandManager,\n} from \"../dynamics\";\nimport {BroadPhase, ColliderSet, NarrowPhase} from \"../geometry\";\nimport {Vector, VectorOps} from \"../math\";\nimport {RawPhysicsPipeline, RawVector} from \"../raw\";\nimport {EventQueue} from \"./event_queue\";\nimport {PhysicsHooks} from \"./physics_hooks\";\n\nexport class PhysicsPipeline {\n raw: RawPhysicsPipeline;\n private cachedGravity: RawVector | null = null;\n private lastGravityX = 0;\n private lastGravityY = 0;\n private lastGravityZ = 0;\n\n public free() {\n if (this.cachedGravity) {\n this.cachedGravity.free();\n this.cachedGravity = null;\n }\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined as unknown as RawPhysicsPipeline;\n }\n\n constructor(raw?: RawPhysicsPipeline) {\n this.raw = raw || new RawPhysicsPipeline();\n }\n\n public step(\n gravity: Vector,\n integrationParameters: IntegrationParameters,\n islands: IslandManager,\n broadPhase: BroadPhase,\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n impulseJoints: ImpulseJointSet,\n multibodyJoints: MultibodyJointSet,\n ccdSolver: CCDSolver,\n eventQueue?: EventQueue,\n hooks?: PhysicsHooks,\n ) {\n if (\n !this.cachedGravity ||\n gravity.x !== this.lastGravityX ||\n gravity.y !== this.lastGravityY ||\n gravity.z !== this.lastGravityZ\n ) {\n this.cachedGravity?.free();\n this.cachedGravity = VectorOps.intoRaw(gravity);\n this.lastGravityX = gravity.x;\n this.lastGravityY = gravity.y;\n this.lastGravityZ = gravity.z;\n }\n\n if (!!eventQueue) {\n this.raw.stepWithEvents(\n this.cachedGravity,\n integrationParameters.raw,\n islands.raw,\n broadPhase.raw,\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n impulseJoints.raw,\n multibodyJoints.raw,\n ccdSolver.raw,\n eventQueue.raw,\n hooks as object,\n hooks?.filterContactPair as Function,\n hooks?.filterIntersectionPair as Function,\n );\n } else {\n this.raw.step(\n this.cachedGravity,\n integrationParameters.raw,\n islands.raw,\n broadPhase.raw,\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n impulseJoints.raw,\n multibodyJoints.raw,\n ccdSolver.raw,\n );\n }\n }\n}\n","import {\n IntegrationParameters,\n IslandManager,\n ImpulseJointSet,\n MultibodyJointSet,\n RigidBodySet,\n} from \"../dynamics\";\nimport {BroadPhase, ColliderSet, NarrowPhase} from \"../geometry\";\nimport {Vector, VectorOps} from \"../math\";\nimport {RawSerializationPipeline} from \"../raw\";\nimport {World} from \"./world\";\n\n/**\n * A pipeline for serializing the physics scene.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `serializationPipeline.free()`\n * once you are done using it (and all the rigid-bodies it created).\n */\nexport class SerializationPipeline {\n raw: RawSerializationPipeline;\n\n /**\n * Release the WASM memory occupied by this serialization pipeline.\n */\n free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n constructor(raw?: RawSerializationPipeline) {\n this.raw = raw || new RawSerializationPipeline();\n }\n\n /**\n * Serialize a complete physics state into a single byte array.\n * @param gravity - The current gravity affecting the simulation.\n * @param integrationParameters - The integration parameters of the simulation.\n * @param broadPhase - The broad-phase of the simulation.\n * @param narrowPhase - The narrow-phase of the simulation.\n * @param bodies - The rigid-bodies taking part into the simulation.\n * @param colliders - The colliders taking part into the simulation.\n * @param impulseJoints - The impulse joints taking part into the simulation.\n * @param multibodyJoints - The multibody joints taking part into the simulation.\n */\n public serializeAll(\n gravity: Vector,\n integrationParameters: IntegrationParameters,\n islands: IslandManager,\n broadPhase: BroadPhase,\n narrowPhase: NarrowPhase,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n impulseJoints: ImpulseJointSet,\n multibodyJoints: MultibodyJointSet,\n ): Uint8Array {\n let rawGra = VectorOps.intoRaw(gravity);\n\n const res = this.raw.serializeAll(\n rawGra,\n integrationParameters.raw,\n islands.raw,\n broadPhase.raw,\n narrowPhase.raw,\n bodies.raw,\n colliders.raw,\n impulseJoints.raw,\n multibodyJoints.raw,\n );\n rawGra.free();\n\n return res!;\n }\n\n /**\n * Deserialize the complete physics state from a single byte array.\n *\n * @param data - The byte array to deserialize.\n */\n public deserializeAll(data: Uint8Array): World | null {\n return World.fromRaw(this.raw.deserializeAll(data)!);\n }\n}\n","import {KinematicCharacterController, PidAxesMask, PidController} from \"../control\";\nimport {DynamicRayCastVehicleController} from \"../control\";\nimport {\n CCDSolver,\n IntegrationParameters,\n IslandManager,\n ImpulseJoint,\n ImpulseJointHandle,\n MultibodyJoint,\n MultibodyJointHandle,\n JointData,\n ImpulseJointSet,\n MultibodyJointSet,\n RigidBody,\n RigidBodyDesc,\n RigidBodyHandle,\n RigidBodySet,\n} from \"../dynamics\";\nimport {\n BroadPhase,\n Collider,\n ColliderDesc,\n ColliderHandle,\n ColliderSet,\n InteractionGroups,\n NarrowPhase,\n PointColliderProjection,\n Ray,\n RayColliderIntersection,\n RayColliderHit,\n Shape,\n ColliderShapeCastHit,\n TempContactManifold,\n} from \"../geometry\";\nimport {Rotation, Vector, VectorOps} from \"../math\";\nimport {\n RawBroadPhase,\n RawCCDSolver,\n RawColliderSet,\n RawDeserializedWorld,\n RawIntegrationParameters,\n RawIslandManager,\n RawImpulseJointSet,\n RawMultibodyJointSet,\n RawNarrowPhase,\n RawPhysicsPipeline,\n RawRigidBodySet,\n RawSerializationPipeline,\n RawDebugRenderPipeline,\n} from \"../raw\";\nimport {DebugRenderBuffers, DebugRenderPipeline} from \"./debug_render_pipeline\";\nimport {EventQueue} from \"./event_queue\";\nimport {PhysicsHooks} from \"./physics_hooks\";\nimport {PhysicsPipeline} from \"./physics_pipeline\";\nimport {QueryFilterFlags} from \"./query_pipeline\";\nimport {SerializationPipeline} from \"./serialization_pipeline\";\n\n/**\n * The physics world.\n *\n * This contains all the data-structures necessary for creating and simulating\n * bodies with contacts, joints, and external forces.\n */\nexport class World {\n public gravity: Vector;\n integrationParameters: IntegrationParameters;\n islands: IslandManager;\n broadPhase: BroadPhase;\n narrowPhase: NarrowPhase;\n bodies: RigidBodySet;\n colliders: ColliderSet;\n impulseJoints: ImpulseJointSet;\n multibodyJoints: MultibodyJointSet;\n ccdSolver: CCDSolver;\n physicsPipeline: PhysicsPipeline;\n serializationPipeline: SerializationPipeline;\n debugRenderPipeline: DebugRenderPipeline;\n characterControllers: Set<KinematicCharacterController>;\n pidControllers: Set<PidController>;\n\n vehicleControllers: Set<DynamicRayCastVehicleController>;\n\n /**\n * Release the WASM memory occupied by this physics world.\n *\n * All the fields of this physics world will be freed as well,\n * so there is no need to call their `.free()` methods individually.\n */\n public free() {\n this.integrationParameters.free();\n this.islands.free();\n this.broadPhase.free();\n this.narrowPhase.free();\n this.bodies.free();\n this.colliders.free();\n this.impulseJoints.free();\n this.multibodyJoints.free();\n this.ccdSolver.free();\n this.physicsPipeline.free();\n this.serializationPipeline.free();\n this.debugRenderPipeline.free();\n this.characterControllers.forEach((controller) => controller.free());\n this.pidControllers.forEach((controller) => controller.free());\n\n this.vehicleControllers.forEach((controller) => controller.free());\n\n this.integrationParameters = undefined!;\n this.islands = undefined!;\n this.broadPhase = undefined!;\n this.narrowPhase = undefined!;\n this.bodies = undefined!;\n this.colliders = undefined!;\n this.ccdSolver = undefined!;\n this.impulseJoints = undefined!;\n this.multibodyJoints = undefined!;\n this.physicsPipeline = undefined!;\n this.serializationPipeline = undefined!;\n this.debugRenderPipeline = undefined!;\n this.characterControllers = undefined!;\n this.pidControllers = undefined!;\n\n this.vehicleControllers = undefined!;\n }\n\n constructor(\n gravity: Vector,\n rawIntegrationParameters?: RawIntegrationParameters,\n rawIslands?: RawIslandManager,\n rawBroadPhase?: RawBroadPhase,\n rawNarrowPhase?: RawNarrowPhase,\n rawBodies?: RawRigidBodySet,\n rawColliders?: RawColliderSet,\n rawImpulseJoints?: RawImpulseJointSet,\n rawMultibodyJoints?: RawMultibodyJointSet,\n rawCCDSolver?: RawCCDSolver,\n rawPhysicsPipeline?: RawPhysicsPipeline,\n rawSerializationPipeline?: RawSerializationPipeline,\n rawDebugRenderPipeline?: RawDebugRenderPipeline,\n ) {\n this.gravity = gravity;\n this.integrationParameters = new IntegrationParameters(rawIntegrationParameters);\n this.islands = new IslandManager(rawIslands);\n this.broadPhase = new BroadPhase(rawBroadPhase);\n this.narrowPhase = new NarrowPhase(rawNarrowPhase);\n this.bodies = new RigidBodySet(rawBodies);\n this.colliders = new ColliderSet(rawColliders);\n this.impulseJoints = new ImpulseJointSet(rawImpulseJoints);\n this.multibodyJoints = new MultibodyJointSet(rawMultibodyJoints);\n this.ccdSolver = new CCDSolver(rawCCDSolver);\n this.physicsPipeline = new PhysicsPipeline(rawPhysicsPipeline);\n this.serializationPipeline = new SerializationPipeline(rawSerializationPipeline);\n this.debugRenderPipeline = new DebugRenderPipeline(rawDebugRenderPipeline);\n this.characterControllers = new Set<KinematicCharacterController>();\n this.pidControllers = new Set<PidController>();\n\n this.vehicleControllers = new Set<DynamicRayCastVehicleController>();\n\n this.impulseJoints.finalizeDeserialization(this.bodies);\n this.bodies.finalizeDeserialization(this.colliders);\n this.colliders.finalizeDeserialization(this.bodies);\n }\n\n public static fromRaw(raw: RawDeserializedWorld): World | null {\n if (!raw) return null;\n\n return new World(\n VectorOps.fromRaw(raw.takeGravity()!)!,\n raw.takeIntegrationParameters(),\n raw.takeIslandManager(),\n raw.takeBroadPhase(),\n raw.takeNarrowPhase(),\n raw.takeBodies(),\n raw.takeColliders(),\n raw.takeImpulseJoints(),\n raw.takeMultibodyJoints(),\n );\n }\n\n /**\n * Takes a snapshot of this world.\n *\n * Use `World.restoreSnapshot` to create a new physics world with a state identical to\n * the state when `.takeSnapshot()` is called.\n */\n public takeSnapshot(): Uint8Array {\n return this.serializationPipeline.serializeAll(\n this.gravity,\n this.integrationParameters,\n this.islands,\n this.broadPhase,\n this.narrowPhase,\n this.bodies,\n this.colliders,\n this.impulseJoints,\n this.multibodyJoints,\n );\n }\n\n /**\n * Creates a new physics world from a snapshot.\n *\n * This new physics world will be an identical copy of the snapshoted physics world.\n */\n public static restoreSnapshot(data: Uint8Array): World | null {\n let deser = new SerializationPipeline();\n return deser.deserializeAll(data);\n }\n\n /**\n * Computes all the lines (and their colors) needed to render the scene.\n *\n * @param filterFlags - Flags for excluding whole subsets of colliders from rendering.\n * @param filterPredicate - Any collider for which this closure returns `false` will be excluded from the\n * debug rendering.\n */\n public debugRender(\n filterFlags?: QueryFilterFlags,\n filterPredicate?: (collider: Collider) => boolean,\n ): DebugRenderBuffers {\n this.debugRenderPipeline.render(\n this.bodies,\n this.colliders,\n this.impulseJoints,\n this.multibodyJoints,\n this.narrowPhase,\n filterFlags,\n filterPredicate,\n );\n return new DebugRenderBuffers(\n this.debugRenderPipeline.vertices,\n this.debugRenderPipeline.colors,\n );\n }\n\n /**\n * Advance the simulation by one time step.\n *\n * All events generated by the physics engine are ignored.\n *\n * @param EventQueue - (optional) structure responsible for collecting\n * events generated by the physics engine.\n */\n public step(eventQueue?: EventQueue, hooks?: PhysicsHooks) {\n this.physicsPipeline.step(\n this.gravity,\n this.integrationParameters,\n this.islands,\n this.broadPhase,\n this.narrowPhase,\n this.bodies,\n this.colliders,\n this.impulseJoints,\n this.multibodyJoints,\n this.ccdSolver,\n eventQueue,\n hooks,\n );\n }\n\n /**\n * Update colliders positions after rigid-bodies moved.\n *\n * When a rigid-body moves, the positions of the colliders attached to it need to be updated. This update is\n * generally automatically done at the beginning and the end of each simulation step with World.step.\n * If the positions need to be updated without running a simulation step this method can be called manually.\n */\n public propagateModifiedBodyPositionsToColliders() {\n this.bodies.raw.propagateModifiedBodyPositionsToColliders(this.colliders.raw);\n }\n\n // TODO: This needs to trigger a broad-phase update but without emitting collision events?\n // /**\n // * Ensure subsequent scene queries take into account the collider positions set before this method is called.\n // *\n // * This does not step the physics simulation forward.\n // */\n // public updateSceneQueries() {\n // this.propagateModifiedBodyPositionsToColliders();\n // this.queryPipeline.update(this.colliders);\n // }\n\n /**\n * The current simulation timestep.\n */\n get timestep(): number {\n return this.integrationParameters.dt;\n }\n\n /**\n * Sets the new simulation timestep.\n *\n * The simulation timestep governs by how much the physics state of the world will\n * be integrated. A simulation timestep should:\n * - be as small as possible. Typical values evolve around 0.016 (assuming the chosen unit is milliseconds,\n * corresponds to the time between two frames of a game running at 60FPS).\n * - not vary too much during the course of the simulation. A timestep with large variations may\n * cause instabilities in the simulation.\n *\n * @param dt - The timestep length, in seconds.\n */\n set timestep(dt: number) {\n this.integrationParameters.dt = dt;\n }\n\n /**\n * The approximate size of most dynamic objects in the scene.\n *\n * See the documentation of the `World.lengthUnit` setter for further details.\n */\n get lengthUnit(): number {\n return this.integrationParameters.lengthUnit;\n }\n\n /**\n * The approximate size of most dynamic objects in the scene.\n *\n * This value is used internally to estimate some length-based tolerance. In particular, the\n * values `IntegrationParameters.allowedLinearError`,\n * `IntegrationParameters.maxPenetrationCorrection`,\n * `IntegrationParameters.predictionDistance`, `RigidBodyActivation.linearThreshold`\n * are scaled by this value implicitly.\n *\n * This value can be understood as the number of units-per-meter in your physical world compared\n * to a human-sized world in meter. For example, in a 2d game, if your typical object size is 100\n * pixels, set the `[`Self::length_unit`]` parameter to 100.0. The physics engine will interpret\n * it as if 100 pixels is equivalent to 1 meter in its various internal threshold.\n * (default `1.0`).\n */\n set lengthUnit(unitsPerMeter: number) {\n this.integrationParameters.lengthUnit = unitsPerMeter;\n }\n\n /**\n * The number of solver iterations run by the constraints solver for calculating forces (default: `4`).\n */\n get numSolverIterations(): number {\n return this.integrationParameters.numSolverIterations;\n }\n\n /**\n * Sets the number of solver iterations run by the constraints solver for calculating forces (default: `4`).\n *\n * The greater this value is, the most rigid and realistic the physics simulation will be.\n * However a greater number of iterations is more computationally intensive.\n *\n * @param niter - The new number of solver iterations.\n */\n set numSolverIterations(niter: number) {\n this.integrationParameters.numSolverIterations = niter;\n }\n\n /**\n * Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).\n */\n get numInternalPgsIterations(): number {\n return this.integrationParameters.numInternalPgsIterations;\n }\n\n /**\n * Sets the Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).\n *\n * Increasing this parameter will improve stability of the simulation. It will have a lesser effect than\n * increasing `numSolverIterations` but is also less computationally expensive.\n *\n * @param niter - The new number of internal PGS iterations.\n */\n set numInternalPgsIterations(niter: number) {\n this.integrationParameters.numInternalPgsIterations = niter;\n }\n\n /**\n * The number of substeps continuous collision-detection can run (default: `1`).\n */\n get maxCcdSubsteps(): number {\n return this.integrationParameters.maxCcdSubsteps;\n }\n\n /**\n * Sets the number of substeps continuous collision-detection can run (default: `1`).\n *\n * CCD operates using a \"motion clamping\" mechanism where all fast-moving object trajectories will\n * be truncated to their first impact on their path. The number of CCD substeps beyond 1 indicate how\n * many times that trajectory will be updated and continued after a hit. This can results in smoother\n * paths, but at a significant computational cost.\n *\n * @param niter - The new maximum number of CCD substeps. Setting to `0` disables CCD entirely.\n */\n set maxCcdSubsteps(substeps: number) {\n this.integrationParameters.maxCcdSubsteps = substeps;\n }\n\n /**\n * Creates a new rigid-body from the given rigid-body descriptor.\n *\n * @param body - The description of the rigid-body to create.\n */\n public createRigidBody(body: RigidBodyDesc): RigidBody {\n return this.bodies.createRigidBody(this.colliders, body);\n }\n\n /**\n * Creates a new character controller.\n *\n * @param offset - The artificial gap added between the character’s chape and its environment.\n */\n public createCharacterController(offset: number): KinematicCharacterController {\n let controller = new KinematicCharacterController(\n offset,\n this.integrationParameters,\n this.broadPhase,\n this.narrowPhase,\n this.bodies,\n this.colliders,\n );\n this.characterControllers.add(controller);\n return controller;\n }\n\n /**\n * Removes a character controller from this world.\n *\n * @param controller - The character controller to remove.\n */\n public removeCharacterController(controller: KinematicCharacterController) {\n this.characterControllers.delete(controller);\n controller.free();\n }\n\n /**\n * Creates a new PID (Proportional-Integral-Derivative) controller.\n *\n * @param kp - The Proportional gain applied to the instantaneous linear position errors.\n * This is usually set to a multiple of the inverse of simulation step time\n * (e.g. `60` if the delta-time is `1.0 / 60.0`).\n * @param ki - The linear gain applied to the Integral part of the PID controller.\n * @param kd - The Derivative gain applied to the instantaneous linear velocity errors.\n * This is usually set to a value in `[0.0, 1.0]` where `0.0` implies no damping\n * (no correction of velocity errors) and `1.0` implies complete damping (velocity errors\n * are corrected in a single simulation step).\n * @param axes - The axes affected by this controller.\n * Only coordinate axes with a bit flags set to `true` will be taken into\n * account when calculating the errors and corrections.\n */\n public createPidController(\n kp: number,\n ki: number,\n kd: number,\n axes: PidAxesMask,\n ): PidController {\n let controller = new PidController(\n this.integrationParameters,\n this.bodies,\n kp,\n ki,\n kd,\n axes,\n );\n this.pidControllers.add(controller);\n return controller;\n }\n\n /**\n * Removes a PID controller from this world.\n *\n * @param controller - The PID controller to remove.\n */\n public removePidController(controller: PidController) {\n this.pidControllers.delete(controller);\n controller.free();\n }\n\n /**\n * Creates a new vehicle controller.\n *\n * @param chassis - The rigid-body used as the chassis of the vehicle controller. When the vehicle\n * controller is updated, it will change directly the rigid-body’s velocity. This\n * rigid-body must be a dynamic or kinematic-velocity-based rigid-body.\n */\n public createVehicleController(chassis: RigidBody): DynamicRayCastVehicleController {\n let controller = new DynamicRayCastVehicleController(\n chassis,\n this.broadPhase,\n this.narrowPhase,\n this.bodies,\n this.colliders,\n );\n this.vehicleControllers.add(controller);\n return controller;\n }\n\n /**\n * Removes a vehicle controller from this world.\n *\n * @param controller - The vehicle controller to remove.\n */\n public removeVehicleController(controller: DynamicRayCastVehicleController) {\n this.vehicleControllers.delete(controller);\n controller.free();\n }\n\n /**\n * Creates a new collider.\n *\n * @param desc - The description of the collider.\n * @param parent - The rigid-body this collider is attached to.\n */\n public createCollider(desc: ColliderDesc, parent?: RigidBody): Collider {\n let parentHandle = parent ? parent.handle : undefined;\n return this.colliders.createCollider(this.bodies, desc, parentHandle);\n }\n\n /**\n * Creates a new impulse joint from the given joint descriptor.\n *\n * @param params - The description of the joint to create.\n * @param parent1 - The first rigid-body attached to this joint.\n * @param parent2 - The second rigid-body attached to this joint.\n * @param wakeUp - Should the attached rigid-bodies be awakened?\n */\n public createImpulseJoint(\n params: JointData,\n parent1: RigidBody,\n parent2: RigidBody,\n wakeUp: boolean,\n ): ImpulseJoint {\n return this.impulseJoints.createJoint(\n this.bodies,\n params,\n parent1.handle,\n parent2.handle,\n wakeUp,\n );\n }\n\n /**\n * Creates a new multibody joint from the given joint descriptor.\n *\n * @param params - The description of the joint to create.\n * @param parent1 - The first rigid-body attached to this joint.\n * @param parent2 - The second rigid-body attached to this joint.\n * @param wakeUp - Should the attached rigid-bodies be awakened?\n */\n public createMultibodyJoint(\n params: JointData,\n parent1: RigidBody,\n parent2: RigidBody,\n wakeUp: boolean,\n ): MultibodyJoint {\n return this.multibodyJoints.createJoint(params, parent1.handle, parent2.handle, wakeUp);\n }\n\n /**\n * Retrieves a rigid-body from its handle.\n *\n * @param handle - The integer handle of the rigid-body to retrieve.\n */\n public getRigidBody(handle: RigidBodyHandle): RigidBody | null {\n return this.bodies.get(handle);\n }\n\n /**\n * Retrieves a collider from its handle.\n *\n * @param handle - The integer handle of the collider to retrieve.\n */\n public getCollider(handle: ColliderHandle): Collider | null {\n return this.colliders.get(handle);\n }\n\n /**\n * Retrieves an impulse joint from its handle.\n *\n * @param handle - The integer handle of the impulse joint to retrieve.\n */\n public getImpulseJoint(handle: ImpulseJointHandle): ImpulseJoint | null {\n return this.impulseJoints.get(handle);\n }\n\n /**\n * Retrieves an multibody joint from its handle.\n *\n * @param handle - The integer handle of the multibody joint to retrieve.\n */\n public getMultibodyJoint(handle: MultibodyJointHandle): MultibodyJoint | null {\n return this.multibodyJoints.get(handle);\n }\n\n /**\n * Removes the given rigid-body from this physics world.\n *\n * This will remove this rigid-body as well as all its attached colliders and joints.\n * Every other bodies touching or attached by joints to this rigid-body will be woken-up.\n *\n * @param body - The rigid-body to remove.\n */\n public removeRigidBody(body: RigidBody) {\n if (this.bodies) {\n this.bodies.remove(\n body.handle,\n this.islands,\n this.colliders,\n this.impulseJoints,\n this.multibodyJoints,\n );\n }\n }\n\n /**\n * Removes the given collider from this physics world.\n *\n * @param collider - The collider to remove.\n * @param wakeUp - If set to `true`, the rigid-body this collider is attached to will be awaken.\n */\n public removeCollider(collider: Collider, wakeUp: boolean) {\n if (this.colliders) {\n this.colliders.remove(collider.handle, this.islands, this.bodies, wakeUp);\n }\n }\n\n /**\n * Removes the given impulse joint from this physics world.\n *\n * @param joint - The impulse joint to remove.\n * @param wakeUp - If set to `true`, the rigid-bodies attached by this joint will be awaken.\n */\n public removeImpulseJoint(joint: ImpulseJoint, wakeUp: boolean) {\n if (this.impulseJoints) {\n this.impulseJoints.remove(joint.handle, wakeUp);\n }\n }\n\n /**\n * Removes the given multibody joint from this physics world.\n *\n * @param joint - The multibody joint to remove.\n * @param wakeUp - If set to `true`, the rigid-bodies attached by this joint will be awaken.\n */\n public removeMultibodyJoint(joint: MultibodyJoint, wakeUp: boolean) {\n if (this.impulseJoints) {\n this.multibodyJoints.remove(joint.handle, wakeUp);\n }\n }\n\n /**\n * Applies the given closure to each collider managed by this physics world.\n *\n * @param f(collider) - The function to apply to each collider managed by this physics world. Called as `f(collider)`.\n */\n public forEachCollider(f: (collider: Collider) => void) {\n this.colliders.forEach(f);\n }\n\n /**\n * Applies the given closure to each rigid-body managed by this physics world.\n *\n * @param f(body) - The function to apply to each rigid-body managed by this physics world. Called as `f(collider)`.\n */\n public forEachRigidBody(f: (body: RigidBody) => void) {\n this.bodies.forEach(f);\n }\n\n /**\n * Applies the given closure to each active rigid-body managed by this physics world.\n *\n * After a short time of inactivity, a rigid-body is automatically deactivated (\"asleep\") by\n * the physics engine in order to save computational power. A sleeping rigid-body never moves\n * unless it is moved manually by the user.\n *\n * @param f - The function to apply to each active rigid-body managed by this physics world. Called as `f(collider)`.\n */\n public forEachActiveRigidBody(f: (body: RigidBody) => void) {\n this.bodies.forEachActiveRigidBody(this.islands, f);\n }\n\n /**\n * Find the closest intersection between a ray and the physics world.\n *\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n * @param groups - Used to filter the colliders that can or cannot be hit by the ray.\n * @param filter - The callback to filter out which collider will be hit.\n */\n public castRay(\n ray: Ray,\n maxToi: number,\n solid: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ): RayColliderHit | null {\n return this.broadPhase.castRay(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n ray,\n maxToi,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Find the closest intersection between a ray and the physics world.\n *\n * This also computes the normal at the hit point.\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n * @param groups - Used to filter the colliders that can or cannot be hit by the ray.\n */\n public castRayAndGetNormal(\n ray: Ray,\n maxToi: number,\n solid: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ): RayColliderIntersection | null {\n return this.broadPhase.castRayAndGetNormal(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n ray,\n maxToi,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Cast a ray and collects all the intersections between a ray and the scene.\n *\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n * @param groups - Used to filter the colliders that can or cannot be hit by the ray.\n * @param callback - The callback called once per hit (in no particular order) between a ray and a collider.\n * If this callback returns `false`, then the cast will stop and no further hits will be detected/reported.\n */\n public intersectionsWithRay(\n ray: Ray,\n maxToi: number,\n solid: boolean,\n callback: (intersect: RayColliderIntersection) => boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ) {\n this.broadPhase.intersectionsWithRay(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n ray,\n maxToi,\n solid,\n callback,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Gets the handle of up to one collider intersecting the given shape.\n *\n * @param shapePos - The position of the shape used for the intersection test.\n * @param shapeRot - The orientation of the shape used for the intersection test.\n * @param shape - The shape used for the intersection test.\n * @param groups - The bit groups and filter associated to the ray, in order to only\n * hit the colliders with collision groups compatible with the ray's group.\n */\n public intersectionWithShape(\n shapePos: Vector,\n shapeRot: Rotation,\n shape: Shape,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ): Collider | null {\n let handle = this.broadPhase.intersectionWithShape(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n shapePos,\n shapeRot,\n shape,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n return handle != null ? this.colliders.get(handle) : null;\n }\n\n /**\n * Find the projection of a point on the closest collider.\n *\n * @param point - The point to project.\n * @param solid - If this is set to `true` then the collider shapes are considered to\n * be plain (if the point is located inside of a plain shape, its projection is the point\n * itself). If it is set to `false` the collider shapes are considered to be hollow\n * (if the point is located inside of an hollow shape, it is projected on the shape's\n * boundary).\n * @param groups - The bit groups and filter associated to the point to project, in order to only\n * project on colliders with collision groups compatible with the ray's group.\n */\n public projectPoint(\n point: Vector,\n solid: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ): PointColliderProjection | null {\n return this.broadPhase.projectPoint(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n point,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Find the projection of a point on the closest collider.\n *\n * @param point - The point to project.\n * @param groups - The bit groups and filter associated to the point to project, in order to only\n * project on colliders with collision groups compatible with the ray's group.\n */\n public projectPointAndGetFeature(\n point: Vector,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ): PointColliderProjection | null {\n return this.broadPhase.projectPointAndGetFeature(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n point,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Find all the colliders containing the given point.\n *\n * @param point - The point used for the containment test.\n * @param groups - The bit groups and filter associated to the point to test, in order to only\n * test on colliders with collision groups compatible with the ray's group.\n * @param callback - A function called with the handles of each collider with a shape\n * containing the `point`.\n */\n public intersectionsWithPoint(\n point: Vector,\n callback: (handle: Collider) => boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ) {\n this.broadPhase.intersectionsWithPoint(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n point,\n this.colliders.castClosure(callback)!,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Casts a shape at a constant linear velocity and retrieve the first collider it hits.\n * This is similar to ray-casting except that we are casting a whole shape instead of\n * just a point (the ray origin).\n *\n * @param shapePos - The initial position of the shape to cast.\n * @param shapeRot - The initial rotation of the shape to cast.\n * @param shapeVel - The constant velocity of the shape to cast (i.e. the cast direction).\n * @param shape - The shape to cast.\n * @param targetDistance − If the shape moves closer to this distance from a collider, a hit\n * will be returned.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the distance traveled by the shape to `shapeVel.norm() * maxToi`.\n * @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if\n * the shape is penetrating another shape at its starting point **and** its trajectory is such\n * that it’s on a path to exit that penetration state.\n * @param groups - The bit groups and filter associated to the shape to cast, in order to only\n * test on colliders with collision groups compatible with this group.\n */\n public castShape(\n shapePos: Vector,\n shapeRot: Rotation,\n shapeVel: Vector,\n shape: Shape,\n targetDistance: number,\n maxToi: number,\n stopAtPenetration: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ): ColliderShapeCastHit | null {\n return this.broadPhase.castShape(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n shapePos,\n shapeRot,\n shapeVel,\n shape,\n targetDistance,\n maxToi,\n stopAtPenetration,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Retrieve all the colliders intersecting the given shape.\n *\n * @param shapePos - The position of the shape to test.\n * @param shapeRot - The orientation of the shape to test.\n * @param shape - The shape to test.\n * @param groups - The bit groups and filter associated to the shape to test, in order to only\n * test on colliders with collision groups compatible with this group.\n * @param callback - A function called with the handles of each collider intersecting the `shape`.\n */\n public intersectionsWithShape(\n shapePos: Vector,\n shapeRot: Rotation,\n shape: Shape,\n callback: (collider: Collider) => boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ) {\n this.broadPhase.intersectionsWithShape(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n shapePos,\n shapeRot,\n shape,\n this.colliders.castClosure(callback)!,\n filterFlags,\n filterGroups,\n filterExcludeCollider?.handle,\n filterExcludeRigidBody?.handle,\n this.colliders.castClosure(filterPredicate),\n );\n }\n\n /**\n * Finds the handles of all the colliders with an AABB intersecting the given AABB.\n *\n * @param aabbCenter - The center of the AABB to test.\n * @param aabbHalfExtents - The half-extents of the AABB to test.\n * @param callback - The callback that will be called with the handles of all the colliders\n * currently intersecting the given AABB.\n */\n public collidersWithAabbIntersectingAabb(\n aabbCenter: Vector,\n aabbHalfExtents: Vector,\n callback: (handle: Collider) => boolean,\n ) {\n this.broadPhase.collidersWithAabbIntersectingAabb(\n this.narrowPhase,\n this.bodies,\n this.colliders,\n aabbCenter,\n aabbHalfExtents,\n this.colliders.castClosure(callback)!,\n );\n }\n\n /**\n * Enumerates all the colliders potentially in contact with the given collider.\n *\n * @param collider1 - The second collider involved in the contact.\n * @param f - Closure that will be called on each collider that is in contact with `collider1`.\n */\n public contactPairsWith(collider1: Collider, f: (collider2: Collider) => void) {\n this.narrowPhase.contactPairsWith(collider1.handle, this.colliders.castClosure(f)!);\n }\n\n /**\n * Enumerates all the colliders intersecting the given colliders, assuming one of them\n * is a sensor.\n */\n public intersectionPairsWith(collider1: Collider, f: (collider2: Collider) => void) {\n this.narrowPhase.intersectionPairsWith(collider1.handle, this.colliders.castClosure(f)!);\n }\n\n /**\n * Iterates through all the contact manifolds between the given pair of colliders.\n *\n * @param collider1 - The first collider involved in the contact.\n * @param collider2 - The second collider involved in the contact.\n * @param f - Closure that will be called on each contact manifold between the two colliders. If the second argument\n * passed to this closure is `true`, then the contact manifold data is flipped, i.e., methods like `localNormal1`\n * actually apply to the `collider2` and fields like `localNormal2` apply to the `collider1`.\n */\n public contactPair(\n collider1: Collider,\n collider2: Collider,\n f: (manifold: TempContactManifold, flipped: boolean) => void,\n ) {\n this.narrowPhase.contactPair(collider1.handle, collider2.handle, f);\n }\n\n /**\n * Returns `true` if `collider1` and `collider2` intersect and at least one of them is a sensor.\n * @param collider1 − The first collider involved in the intersection.\n * @param collider2 − The second collider involved in the intersection.\n */\n public intersectionPair(collider1: Collider, collider2: Collider): boolean {\n return this.narrowPhase.intersectionPair(collider1.handle, collider2.handle);\n }\n\n /**\n * Sets whether internal performance profiling is enabled (default: false).\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n set profilerEnabled(enabled: boolean) {\n this.physicsPipeline.raw.set_profiler_enabled(enabled);\n }\n\n /**\n * Indicates if the internal performance profiling is enabled.\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n get profilerEnabled(): boolean {\n return this.physicsPipeline.raw.is_profiler_enabled();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the entire simulation step.\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingStep(): number {\n return this.physicsPipeline.raw.timing_step();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the collision-detection\n * (broad-phase + narrow-phase).\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingCollisionDetection(): number {\n return this.physicsPipeline.raw.timing_collision_detection();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the broad-phase.\n *\n * This timing is included in `timingCollisionDetection`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingBroadPhase(): number {\n return this.physicsPipeline.raw.timing_broad_phase();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the narrow-phase.\n *\n * This timing is included in `timingCollisionDetection`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingNarrowPhase(): number {\n return this.physicsPipeline.raw.timing_narrow_phase();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the constraint solver.\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingSolver(): number {\n return this.physicsPipeline.raw.timing_solver();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the constraint\n * initialization.\n *\n * This timing is included in `timingSolver`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingVelocityAssembly(): number {\n return this.physicsPipeline.raw.timing_velocity_assembly();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the constraint\n * resolution.\n *\n * This timing is included in `timingSolver`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingVelocityResolution(): number {\n return this.physicsPipeline.raw.timing_velocity_resolution();\n }\n\n /**\n * The time spent in milliseconds by the last step to run the rigid-body\n * velocity update.\n *\n * This timing is included in `timingSolver`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingVelocityUpdate(): number {\n return this.physicsPipeline.raw.timing_velocity_update();\n }\n\n /**\n * The time spent in milliseconds by writing rigid-body velocities\n * calculated by the solver back into the rigid-bodies.\n *\n * This timing is included in `timingSolver`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingVelocityWriteback(): number {\n return this.physicsPipeline.raw.timing_velocity_writeback();\n }\n\n /**\n * The total time spent in CCD detection and resolution.\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingCcd(): number {\n return this.physicsPipeline.raw.timing_ccd();\n }\n\n /**\n * The total time spent searching for the continuous hits during CCD.\n *\n * This timing is included in `timingCcd`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingCcdToiComputation(): number {\n return this.physicsPipeline.raw.timing_ccd_toi_computation();\n }\n\n /**\n * The total time spent in the broad-phase during CCD.\n *\n * This timing is included in `timingCcd`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingCcdBroadPhase(): number {\n return this.physicsPipeline.raw.timing_ccd_broad_phase();\n }\n\n /**\n * The total time spent in the narrow-phase during CCD.\n *\n * This timing is included in `timingCcd`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingCcdNarrowPhase(): number {\n return this.physicsPipeline.raw.timing_ccd_narrow_phase();\n }\n\n /**\n * The total time spent in the constraints resolution during CCD.\n *\n * This timing is included in `timingCcd`.\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingCcdSolver(): number {\n return this.physicsPipeline.raw.timing_ccd_solver();\n }\n\n /**\n * The total time spent in the islands calculation during CCD.\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingIslandConstruction(): number {\n return this.physicsPipeline.raw.timing_island_construction();\n }\n\n /**\n * The total time spent propagating detected user changes.\n *\n * Only works if the internal profiler is enabled with `World.profilerEnabled = true`.\n */\n public timingUserChanges(): number {\n return this.physicsPipeline.raw.timing_user_changes();\n }\n}\n","import {ColliderHandle} from \"../geometry\";\nimport {Vector, VectorOps} from \"../math\";\nimport {RawContactForceEvent, RawEventQueue} from \"../raw\";\n\n/**\n * Flags indicating what events are enabled for colliders.\n */\nexport enum ActiveEvents {\n NONE = 0,\n /**\n * Enable collision events.\n */\n COLLISION_EVENTS = 0b0001,\n /**\n * Enable contact force events.\n */\n CONTACT_FORCE_EVENTS = 0b0010,\n}\n\n/**\n * Event occurring when the sum of the magnitudes of the\n * contact forces between two colliders exceed a threshold.\n *\n * This object should **not** be stored anywhere. Its properties can only be\n * read from within the closure given to `EventHandler.drainContactForceEvents`.\n */\nexport class TempContactForceEvent {\n raw!: RawContactForceEvent;\n\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n /**\n * The first collider involved in the contact.\n */\n public collider1(): ColliderHandle {\n return this.raw.collider1();\n }\n\n /**\n * The second collider involved in the contact.\n */\n public collider2(): ColliderHandle {\n return this.raw.collider2();\n }\n\n /**\n * The sum of all the forces between the two colliders.\n */\n public totalForce(): Vector {\n return VectorOps.fromRaw(this.raw.total_force())!;\n }\n\n /**\n * The sum of the magnitudes of each force between the two colliders.\n *\n * Note that this is **not** the same as the magnitude of `self.total_force`.\n * Here we are summing the magnitude of all the forces, instead of taking\n * the magnitude of their sum.\n */\n public totalForceMagnitude(): number {\n return this.raw.total_force_magnitude();\n }\n\n /**\n * The world-space (unit) direction of the force with strongest magnitude.\n */\n public maxForceDirection(): Vector {\n return VectorOps.fromRaw(this.raw.max_force_direction())!;\n }\n\n /**\n * The magnitude of the largest force at a contact point of this contact pair.\n */\n public maxForceMagnitude(): number {\n return this.raw.max_force_magnitude();\n }\n}\n\n/**\n * A structure responsible for collecting events generated\n * by the physics engine.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `eventQueue.free()`\n * once you are done using it.\n */\nexport class EventQueue {\n raw: RawEventQueue;\n\n /**\n * Creates a new event collector.\n *\n * @param autoDrain -setting this to `true` is strongly recommended. If true, the collector will\n * be automatically drained before each `world.step(collector)`. If false, the collector will\n * keep all events in memory unless it is manually drained/cleared; this may lead to unbounded use of\n * RAM if no drain is performed.\n */\n constructor(autoDrain: boolean, raw?: RawEventQueue) {\n this.raw = raw || new RawEventQueue(autoDrain);\n }\n\n /**\n * Release the WASM memory occupied by this event-queue.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n }\n\n /**\n * Applies the given javascript closure on each collision event of this collector, then clear\n * the internal collision event buffer.\n *\n * @param f - JavaScript closure applied to each collision event. The\n * closure must take three arguments: two integers representing the handles of the colliders\n * involved in the collision, and a boolean indicating if the collision started (true) or stopped\n * (false).\n */\n public drainCollisionEvents(\n f: (handle1: ColliderHandle, handle2: ColliderHandle, started: boolean) => void,\n ) {\n this.raw.drainCollisionEvents(f);\n }\n\n /**\n * Applies the given javascript closure on each contact force event of this collector, then clear\n * the internal collision event buffer.\n *\n * @param f - JavaScript closure applied to each collision event. The\n * closure must take one `TempContactForceEvent` argument.\n */\n public drainContactForceEvents(f: (event: TempContactForceEvent) => void) {\n let event = new TempContactForceEvent();\n this.raw.drainContactForceEvents((raw: RawContactForceEvent) => {\n event.raw = raw;\n f(event);\n event.free();\n });\n }\n\n /**\n * Removes all events contained by this collector\n */\n public clear() {\n this.raw.clear();\n }\n}\n","import {RigidBodyHandle} from \"../dynamics\";\nimport {ColliderHandle} from \"../geometry\";\n\nexport enum ActiveHooks {\n NONE = 0,\n FILTER_CONTACT_PAIRS = 0b0001,\n FILTER_INTERSECTION_PAIRS = 0b0010,\n // MODIFY_SOLVER_CONTACTS = 0b0100, /* Not supported yet in JS. */\n}\n\nexport enum SolverFlags {\n EMPTY = 0b000,\n COMPUTE_IMPULSE = 0b001,\n}\n\nexport interface PhysicsHooks {\n /**\n * Function that determines if contacts computation should happen between two colliders, and how the\n * constraints solver should behave for these contacts.\n *\n * This will only be executed and taken into account if at least one of the involved colliders contains the\n * `ActiveHooks.FILTER_CONTACT_PAIR` flag in its active hooks.\n *\n * @param collider1 − Handle of the first collider involved in the potential contact.\n * @param collider2 − Handle of the second collider involved in the potential contact.\n * @param body1 − Handle of the first body involved in the potential contact.\n * @param body2 − Handle of the second body involved in the potential contact.\n */\n filterContactPair(\n collider1: ColliderHandle,\n collider2: ColliderHandle,\n body1: RigidBodyHandle,\n body2: RigidBodyHandle,\n ): SolverFlags | null;\n\n /**\n * Function that determines if intersection computation should happen between two colliders (where at least\n * one is a sensor).\n *\n * This will only be executed and taken into account if `one of the involved colliders contains the\n * `ActiveHooks.FILTER_INTERSECTION_PAIR` flag in its active hooks.\n *\n * @param collider1 − Handle of the first collider involved in the potential contact.\n * @param collider2 − Handle of the second collider involved in the potential contact.\n * @param body1 − Handle of the first body involved in the potential contact.\n * @param body2 − Handle of the second body involved in the potential contact.\n */\n filterIntersectionPair(\n collider1: ColliderHandle,\n collider2: ColliderHandle,\n body1: RigidBodyHandle,\n body2: RigidBodyHandle,\n ): boolean;\n}\n","// NOTE: must match the bits in the QueryFilterFlags on the Rust side.\n\n// NOTE: must match the bits in the QueryFilterFlags on the Rust side.\n/**\n * Flags for excluding whole sets of colliders from a scene query.\n */\nexport enum QueryFilterFlags {\n /**\n * Exclude from the query any collider attached to a fixed rigid-body and colliders with no rigid-body attached.\n */\n EXCLUDE_FIXED = 0b0000_0001,\n /**\n * Exclude from the query any collider attached to a dynamic rigid-body.\n */\n EXCLUDE_KINEMATIC = 0b0000_0010,\n /**\n * Exclude from the query any collider attached to a kinematic rigid-body.\n */\n EXCLUDE_DYNAMIC = 0b0000_0100,\n /**\n * Exclude from the query any collider that is a sensor.\n */\n EXCLUDE_SENSORS = 0b0000_1000,\n /**\n * Exclude from the query any collider that is not a sensor.\n */\n EXCLUDE_SOLIDS = 0b0001_0000,\n /**\n * Excludes all colliders not attached to a dynamic rigid-body.\n */\n ONLY_DYNAMIC = QueryFilterFlags.EXCLUDE_FIXED | QueryFilterFlags.EXCLUDE_KINEMATIC,\n /**\n * Excludes all colliders not attached to a kinematic rigid-body.\n */\n ONLY_KINEMATIC = QueryFilterFlags.EXCLUDE_DYNAMIC | QueryFilterFlags.EXCLUDE_FIXED,\n /**\n * Exclude all colliders attached to a non-fixed rigid-body\n * (this will not exclude colliders not attached to any rigid-body).\n */\n ONLY_FIXED = QueryFilterFlags.EXCLUDE_DYNAMIC | QueryFilterFlags.EXCLUDE_KINEMATIC,\n}\n","import {CoefficientCombineRule, RigidBody, RigidBodySet} from \"../dynamics\";\nimport {Rotation, RotationOps, Vector, VectorOps} from \"../math\";\nimport {ActiveHooks, ActiveEvents} from \"../pipeline\";\nimport {ColliderSet} from \"./collider_set\";\nimport {ShapeContact} from \"./contact\";\nimport {InteractionGroups} from \"./interaction_groups\";\nimport {PointProjection} from \"./point\";\nimport {Ray, RayIntersection} from \"./ray\";\nimport {\n Shape,\n Cuboid,\n Ball,\n ShapeType,\n Capsule,\n Voxels,\n TriMesh,\n Polyline,\n Heightfield,\n Segment,\n Triangle,\n RoundTriangle,\n RoundCuboid,\n TriMeshFlags,\n Cylinder,\n RoundCylinder,\n Cone,\n RoundCone,\n ConvexPolyhedron,\n RoundConvexPolyhedron,\n HeightFieldFlags,\n} from \"./shape\";\nimport {ColliderShapeCastHit, ShapeCastHit} from \"./toi\";\n\n/**\n * Flags affecting whether collision-detection happens between two colliders\n * depending on the type of rigid-bodies they are attached to.\n */\nexport enum ActiveCollisionTypes {\n /**\n * Enable collision-detection between a collider attached to a dynamic body\n * and another collider attached to a dynamic body.\n */\n DYNAMIC_DYNAMIC = 0b0000_0000_0000_0001,\n /**\n * Enable collision-detection between a collider attached to a dynamic body\n * and another collider attached to a kinematic body.\n */\n DYNAMIC_KINEMATIC = 0b0000_0000_0000_1100,\n /**\n * Enable collision-detection between a collider attached to a dynamic body\n * and another collider attached to a fixed body (or not attached to any body).\n */\n DYNAMIC_FIXED = 0b0000_0000_0000_0010,\n /**\n * Enable collision-detection between a collider attached to a kinematic body\n * and another collider attached to a kinematic body.\n */\n KINEMATIC_KINEMATIC = 0b1100_1100_0000_0000,\n\n /**\n * Enable collision-detection between a collider attached to a kinematic body\n * and another collider attached to a fixed body (or not attached to any body).\n */\n KINEMATIC_FIXED = 0b0010_0010_0000_0000,\n\n /**\n * Enable collision-detection between a collider attached to a fixed body (or\n * not attached to any body) and another collider attached to a fixed body (or\n * not attached to any body).\n */\n FIXED_FIXED = 0b0000_0000_0010_0000,\n /**\n * The default active collision types, enabling collisions between a dynamic body\n * and another body of any type, but not enabling collisions between two non-dynamic bodies.\n */\n DEFAULT = DYNAMIC_KINEMATIC | DYNAMIC_DYNAMIC | DYNAMIC_FIXED,\n /**\n * Enable collisions between any kind of rigid-bodies (including between two non-dynamic bodies).\n */\n ALL = DYNAMIC_KINEMATIC |\n DYNAMIC_DYNAMIC |\n DYNAMIC_FIXED |\n KINEMATIC_KINEMATIC |\n KINEMATIC_FIXED |\n KINEMATIC_KINEMATIC,\n}\n\n/**\n * The integer identifier of a collider added to a `ColliderSet`.\n */\nexport type ColliderHandle = number;\n\n/**\n * A geometric entity that can be attached to a body so it can be affected\n * by contacts and proximity queries.\n */\nexport class Collider {\n private colliderSet: ColliderSet; // The Collider won't need to free this.\n readonly handle: ColliderHandle;\n private _shape: Shape; // TODO: deprecate/remove this since it isn't a reliable way of getting the latest shape properties.\n private _parent: RigidBody | null;\n private scratchBuffer: Float32Array;\n\n constructor(\n colliderSet: ColliderSet,\n handle: ColliderHandle,\n parent: RigidBody | null,\n shape?: Shape,\n ) {\n this.colliderSet = colliderSet;\n this.handle = handle;\n this._parent = parent;\n this._shape = shape!;\n this.scratchBuffer = new Float32Array(4);\n }\n\n /** @internal */\n public finalizeDeserialization(bodies: RigidBodySet) {\n if (this.handle != null) {\n this._parent = bodies.get(this.colliderSet.raw.coParent(this.handle)!);\n }\n }\n\n private ensureShapeIsCached() {\n if (!this._shape) this._shape = Shape.fromRaw(this.colliderSet.raw, this.handle);\n }\n\n /**\n * The shape of this collider.\n */\n public get shape(): Shape {\n this.ensureShapeIsCached();\n return this._shape;\n }\n\n /**\n * Set the internal cached JS shape to null.\n *\n * This can be useful if you want to free some memory (assuming you are not\n * holding any other references to the shape object), or in order to force\n * the recalculation of the JS shape (the next time the `shape` getter is\n * accessed) from the WASM source of truth.\n */\n public clearShapeCache() {\n this._shape = null!;\n }\n\n /**\n * Checks if this collider is still valid (i.e. that it has\n * not been deleted from the collider set yet).\n */\n public isValid(): boolean {\n return this.colliderSet.raw.contains(this.handle);\n }\n\n /**\n * The world-space translation of this collider.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public translation(target?: Vector): Vector {\n this.colliderSet.raw.coTranslation(this.handle, this.scratchBuffer);\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The translation of this collider relative to its parent rigid-body.\n *\n * Returns `null` if the collider doesn't have a parent rigid-body.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public translationWrtParent(target?: Vector): Vector | null {\n const hasParent = this.colliderSet.raw.coTranslationWrtParent(\n this.handle,\n this.scratchBuffer,\n );\n if (!hasParent) return null;\n return VectorOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The world-space orientation of this collider.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public rotation(target?: Rotation): Rotation {\n this.colliderSet.raw.coRotation(this.handle, this.scratchBuffer);\n return RotationOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * The orientation of this collider relative to its parent rigid-body.\n *\n * Returns `null` if the collider doesn't have a parent rigid-body.\n *\n * @param target - Optional target object to write the result to (avoids allocation).\n */\n public rotationWrtParent(target?: Rotation): Rotation | null {\n const hasParent = this.colliderSet.raw.coRotationWrtParent(this.handle, this.scratchBuffer);\n if (!hasParent) return null;\n return RotationOps.fromBuffer(this.scratchBuffer, target);\n }\n\n /**\n * Is this collider a sensor?\n */\n public isSensor(): boolean {\n return this.colliderSet.raw.coIsSensor(this.handle);\n }\n\n /**\n * Sets whether this collider is a sensor.\n * @param isSensor - If `true`, the collider will be a sensor.\n */\n public setSensor(isSensor: boolean) {\n this.colliderSet.raw.coSetSensor(this.handle, isSensor);\n }\n\n /**\n * Sets the new shape of the collider.\n * @param shape - The collider’s new shape.\n */\n public setShape(shape: Shape) {\n let rawShape = shape.intoRaw();\n this.colliderSet.raw.coSetShape(this.handle, rawShape);\n rawShape.free();\n this._shape = shape;\n }\n\n /**\n * Sets whether this collider is enabled or not.\n *\n * @param enabled - Set to `false` to disable this collider (its parent rigid-body won’t be disabled automatically by this).\n */\n public setEnabled(enabled: boolean) {\n this.colliderSet.raw.coSetEnabled(this.handle, enabled);\n }\n\n /**\n * Is this collider enabled?\n */\n public isEnabled(): boolean {\n return this.colliderSet.raw.coIsEnabled(this.handle);\n }\n\n /**\n * Sets the restitution coefficient of the collider to be created.\n *\n * @param restitution - The restitution coefficient in `[0, 1]`. A value of 0 (the default) means no bouncing behavior\n * while 1 means perfect bouncing (though energy may still be lost due to numerical errors of the\n * constraints solver).\n */\n public setRestitution(restitution: number) {\n this.colliderSet.raw.coSetRestitution(this.handle, restitution);\n }\n\n /**\n * Sets the friction coefficient of the collider to be created.\n *\n * @param friction - The friction coefficient. Must be greater or equal to 0. This is generally smaller than 1. The\n * higher the coefficient, the stronger friction forces will be for contacts with the collider\n * being built.\n */\n public setFriction(friction: number) {\n this.colliderSet.raw.coSetFriction(this.handle, friction);\n }\n\n /**\n * Gets the rule used to combine the friction coefficients of two colliders\n * colliders involved in a contact.\n */\n public frictionCombineRule(): CoefficientCombineRule {\n return this.colliderSet.raw.coFrictionCombineRule(this.handle);\n }\n\n /**\n * Sets the rule used to combine the friction coefficients of two colliders\n * colliders involved in a contact.\n *\n * @param rule − The combine rule to apply.\n */\n public setFrictionCombineRule(rule: CoefficientCombineRule) {\n this.colliderSet.raw.coSetFrictionCombineRule(this.handle, rule);\n }\n\n /**\n * Gets the rule used to combine the restitution coefficients of two colliders\n * colliders involved in a contact.\n */\n public restitutionCombineRule(): CoefficientCombineRule {\n return this.colliderSet.raw.coRestitutionCombineRule(this.handle);\n }\n\n /**\n * Sets the rule used to combine the restitution coefficients of two colliders\n * colliders involved in a contact.\n *\n * @param rule − The combine rule to apply.\n */\n public setRestitutionCombineRule(rule: CoefficientCombineRule) {\n this.colliderSet.raw.coSetRestitutionCombineRule(this.handle, rule);\n }\n\n /**\n * Sets the collision groups used by this collider.\n *\n * Two colliders will interact iff. their collision groups are compatible.\n * See the documentation of `InteractionGroups` for details on teh used bit pattern.\n *\n * @param groups - The collision groups used for the collider being built.\n */\n public setCollisionGroups(groups: InteractionGroups) {\n this.colliderSet.raw.coSetCollisionGroups(this.handle, groups);\n }\n\n /**\n * Sets the solver groups used by this collider.\n *\n * Forces between two colliders in contact will be computed iff their solver\n * groups are compatible.\n * See the documentation of `InteractionGroups` for details on the used bit pattern.\n *\n * @param groups - The solver groups used for the collider being built.\n */\n public setSolverGroups(groups: InteractionGroups) {\n this.colliderSet.raw.coSetSolverGroups(this.handle, groups);\n }\n\n /**\n * Sets the contact skin for this collider.\n *\n * See the documentation of `ColliderDesc.setContactSkin` for additional details.\n */\n public contactSkin(): number {\n return this.colliderSet.raw.coContactSkin(this.handle);\n }\n\n /**\n * Sets the contact skin for this collider.\n *\n * See the documentation of `ColliderDesc.setContactSkin` for additional details.\n *\n * @param thickness - The contact skin thickness.\n */\n public setContactSkin(thickness: number) {\n return this.colliderSet.raw.coSetContactSkin(this.handle, thickness);\n }\n\n /**\n * Get the physics hooks active for this collider.\n */\n public activeHooks(): ActiveHooks {\n return this.colliderSet.raw.coActiveHooks(this.handle);\n }\n\n /**\n * Set the physics hooks active for this collider.\n *\n * Use this to enable custom filtering rules for contact/intersecstion pairs involving this collider.\n *\n * @param activeHooks - The hooks active for contact/intersection pairs involving this collider.\n */\n public setActiveHooks(activeHooks: ActiveHooks) {\n this.colliderSet.raw.coSetActiveHooks(this.handle, activeHooks);\n }\n\n /**\n * The events active for this collider.\n */\n public activeEvents(): ActiveEvents {\n return this.colliderSet.raw.coActiveEvents(this.handle);\n }\n\n /**\n * Set the events active for this collider.\n *\n * Use this to enable contact and/or intersection event reporting for this collider.\n *\n * @param activeEvents - The events active for contact/intersection pairs involving this collider.\n */\n public setActiveEvents(activeEvents: ActiveEvents) {\n this.colliderSet.raw.coSetActiveEvents(this.handle, activeEvents);\n }\n\n /**\n * Gets the collision types active for this collider.\n */\n public activeCollisionTypes(): ActiveCollisionTypes {\n return this.colliderSet.raw.coActiveCollisionTypes(this.handle);\n }\n\n /**\n * Sets the total force magnitude beyond which a contact force event can be emitted.\n *\n * @param threshold - The new force threshold.\n */\n public setContactForceEventThreshold(threshold: number) {\n return this.colliderSet.raw.coSetContactForceEventThreshold(this.handle, threshold);\n }\n\n /**\n * The total force magnitude beyond which a contact force event can be emitted.\n */\n public contactForceEventThreshold(): number {\n return this.colliderSet.raw.coContactForceEventThreshold(this.handle);\n }\n\n /**\n * Set the collision types active for this collider.\n *\n * @param activeCollisionTypes - The hooks active for contact/intersection pairs involving this collider.\n */\n public setActiveCollisionTypes(activeCollisionTypes: ActiveCollisionTypes) {\n this.colliderSet.raw.coSetActiveCollisionTypes(this.handle, activeCollisionTypes);\n }\n\n /**\n * Sets the uniform density of this collider.\n *\n * This will override any previous mass-properties set by `this.setDensity`,\n * `this.setMass`, `this.setMassProperties`, `ColliderDesc.density`,\n * `ColliderDesc.mass`, or `ColliderDesc.massProperties` for this collider.\n *\n * The mass and angular inertia of this collider will be computed automatically based on its\n * shape.\n */\n public setDensity(density: number) {\n this.colliderSet.raw.coSetDensity(this.handle, density);\n }\n\n /**\n * Sets the mass of this collider.\n *\n * This will override any previous mass-properties set by `this.setDensity`,\n * `this.setMass`, `this.setMassProperties`, `ColliderDesc.density`,\n * `ColliderDesc.mass`, or `ColliderDesc.massProperties` for this collider.\n *\n * The angular inertia of this collider will be computed automatically based on its shape\n * and this mass value.\n */\n public setMass(mass: number) {\n this.colliderSet.raw.coSetMass(this.handle, mass);\n }\n\n /**\n * Sets the mass of this collider.\n *\n * This will override any previous mass-properties set by `this.setDensity`,\n * `this.setMass`, `this.setMassProperties`, `ColliderDesc.density`,\n * `ColliderDesc.mass`, or `ColliderDesc.massProperties` for this collider.\n */\n public setMassProperties(\n mass: number,\n centerOfMass: Vector,\n principalAngularInertia: Vector,\n angularInertiaLocalFrame: Rotation,\n ) {\n let rawCom = VectorOps.intoRaw(centerOfMass);\n let rawPrincipalInertia = VectorOps.intoRaw(principalAngularInertia);\n let rawInertiaFrame = RotationOps.intoRaw(angularInertiaLocalFrame);\n\n this.colliderSet.raw.coSetMassProperties(\n this.handle,\n mass,\n rawCom,\n rawPrincipalInertia,\n rawInertiaFrame,\n );\n\n rawCom.free();\n rawPrincipalInertia.free();\n rawInertiaFrame.free();\n }\n\n /**\n * Sets the translation of this collider.\n *\n * @param tra - The world-space position of the collider.\n */\n public setTranslation(tra: Vector) {\n this.colliderSet.raw.coSetTranslation(this.handle, tra.x, tra.y, tra.z);\n }\n\n /**\n * Sets the translation of this collider relative to its parent rigid-body.\n *\n * Does nothing if this collider isn't attached to a rigid-body.\n *\n * @param tra - The new translation of the collider relative to its parent.\n */\n public setTranslationWrtParent(tra: Vector) {\n this.colliderSet.raw.coSetTranslationWrtParent(this.handle, tra.x, tra.y, tra.z);\n }\n\n /**\n * Sets the rotation quaternion of this collider.\n *\n * This does nothing if a zero quaternion is provided.\n *\n * @param rotation - The rotation to set.\n */\n public setRotation(rot: Rotation) {\n this.colliderSet.raw.coSetRotation(this.handle, rot.x, rot.y, rot.z, rot.w);\n }\n\n /**\n * Sets the rotation quaternion of this collider relative to its parent rigid-body.\n *\n * This does nothing if a zero quaternion is provided or if this collider isn't\n * attached to a rigid-body.\n *\n * @param rotation - The rotation to set.\n */\n public setRotationWrtParent(rot: Rotation) {\n this.colliderSet.raw.coSetRotationWrtParent(this.handle, rot.x, rot.y, rot.z, rot.w);\n }\n\n /**\n * The type of the shape of this collider.\n */\n public shapeType(): ShapeType {\n return this.colliderSet.raw.coShapeType(this.handle) as number as ShapeType;\n }\n\n /**\n * The half-extents of this collider if it is a cuboid shape.\n */\n public halfExtents(): Vector {\n return VectorOps.fromRaw(this.colliderSet.raw.coHalfExtents(this.handle)!)!;\n }\n\n /**\n * Sets the half-extents of this collider if it is a cuboid shape.\n *\n * @param newHalfExtents - desired half extents.\n */\n public setHalfExtents(newHalfExtents: Vector) {\n const rawPoint = VectorOps.intoRaw(newHalfExtents);\n this.colliderSet.raw.coSetHalfExtents(this.handle, rawPoint);\n }\n\n /**\n * The radius of this collider if it is a ball, cylinder, capsule, or cone shape.\n */\n public radius(): number {\n return this.colliderSet.raw.coRadius(this.handle)!;\n }\n\n /**\n * Sets the radius of this collider if it is a ball, cylinder, capsule, or cone shape.\n *\n * @param newRadius - desired radius.\n */\n public setRadius(newRadius: number): void {\n this.colliderSet.raw.coSetRadius(this.handle, newRadius);\n }\n\n /**\n * The radius of the round edges of this collider if it is a round cylinder.\n */\n public roundRadius(): number {\n return this.colliderSet.raw.coRoundRadius(this.handle)!;\n }\n\n /**\n * Sets the radius of the round edges of this collider if it has round edges.\n *\n * @param newBorderRadius - desired round edge radius.\n */\n public setRoundRadius(newBorderRadius: number) {\n this.colliderSet.raw.coSetRoundRadius(this.handle, newBorderRadius);\n }\n\n /**\n * The half height of this collider if it is a cylinder, capsule, or cone shape.\n */\n public halfHeight(): number {\n return this.colliderSet.raw.coHalfHeight(this.handle)!;\n }\n\n /**\n * Sets the half height of this collider if it is a cylinder, capsule, or cone shape.\n *\n * @param newHalfheight - desired half height.\n */\n public setHalfHeight(newHalfheight: number) {\n this.colliderSet.raw.coSetHalfHeight(this.handle, newHalfheight);\n }\n\n /**\n * If this collider has a Voxels shape, this will mark the voxel at the\n * given grid coordinates as filled or empty (depending on the `filled`\n * argument).\n *\n * Each input value is assumed to be an integer.\n *\n * The operation is O(1), unless the provided coordinates are out of the\n * bounds of the currently allocated internal grid in which case the grid\n * will be grown automatically.\n */\n public setVoxel(ix: number, iy: number, iz: number, filled: boolean) {\n this.colliderSet.raw.coSetVoxel(this.handle, ix, iy, iz, filled);\n // We modified the shape, invalidate it to keep our cache\n // up-to-date the next time the user requests the shape data.\n // PERF: this isn’t ideal for performances as this adds a\n // hidden, non-constant, cost.\n this._shape = null!;\n }\n\n /**\n * If this and `voxels2` are voxel colliders, and a voxel from `this` was\n * modified with `setVoxel`, this will ensure that a\n * moving object transitioning across the boundaries of these colliders\n * won’t suffer from the \"internal edges\" artifact.\n *\n * The indices `ix, iy, iz` indicate the integer coordinates of the voxel in\n * the local coordinate frame of `this`.\n *\n * If the voxels in `voxels2` live in a different coordinate space from `this`,\n * then the `shift_*` argument indicate the distance, in voxel units, between\n * the origin of `this` to the origin of `voxels2`.\n *\n * This method is intended to be called between `this` and all the other\n * voxels colliders with a domain intersecting `this` or sharing a domain\n * boundary. This is an incremental maintenance of the effect of\n * `combineVoxelStates`.\n */\n public propagateVoxelChange(\n voxels2: Collider,\n ix: number,\n iy: number,\n iz: number,\n shift_x: number,\n shift_y: number,\n shift_z: number,\n ) {\n this.colliderSet.raw.coPropagateVoxelChange(\n this.handle,\n voxels2.handle,\n ix,\n iy,\n iz,\n shift_x,\n shift_y,\n shift_z,\n );\n // We modified the shape, invalidate it to keep our cache\n // up-to-date the next time the user requests the shape data.\n // PERF: this isn’t ideal for performances as this adds a\n // hidden, non-constant, cost.\n this._shape = null!;\n }\n\n /**\n * If this and `voxels2` are voxel colliders, this will ensure that a\n * moving object transitioning across the boundaries of these colliders\n * won’t suffer from the \"internal edges\" artifact.\n *\n * If the voxels in `voxels2` live in a different coordinate space from `this`,\n * then the `shift_*` argument indicate the distance, in voxel units, between\n * the origin of `this` to the origin of `voxels2`.\n *\n * This method is intended to be called once between all pairs of voxels\n * colliders with intersecting domains or shared boundaries.\n *\n * If either voxels collider is then modified with `setVoxel`, the\n * `propagateVoxelChange` method must be called to maintain the coupling\n * between the voxels shapes after the modification.\n */\n public combineVoxelStates(\n voxels2: Collider,\n shift_x: number,\n shift_y: number,\n shift_z: number,\n ) {\n this.colliderSet.raw.coCombineVoxelStates(\n this.handle,\n voxels2.handle,\n shift_x,\n shift_y,\n shift_z,\n );\n // We modified the shape, invalidate it to keep our cache\n // up-to-date the next time the user requests the shape data.\n // PERF: this isn’t ideal for performances as this adds a\n // hidden, non-constant, cost.\n this._shape = null!;\n }\n\n /**\n * If this collider has a triangle mesh, polyline, convex polygon, or convex polyhedron shape,\n * this returns the vertex buffer of said shape.\n */\n public vertices(): Float32Array {\n return this.colliderSet.raw.coVertices(this.handle)!;\n }\n\n /**\n * If this collider has a triangle mesh, polyline, or convex polyhedron shape,\n * this returns the index buffer of said shape.\n */\n public indices(): Uint32Array | undefined {\n return this.colliderSet.raw.coIndices(this.handle);\n }\n\n /**\n * If this collider has a heightfield shape, this returns the heights buffer of\n * the heightfield.\n * In 3D, the returned height matrix is provided in column-major order.\n */\n public heightfieldHeights(): Float32Array {\n return this.colliderSet.raw.coHeightfieldHeights(this.handle)!;\n }\n\n /**\n * If this collider has a heightfield shape, this returns the scale\n * applied to it.\n */\n public heightfieldScale(): Vector {\n let scale = this.colliderSet.raw.coHeightfieldScale(this.handle)!;\n return VectorOps.fromRaw(scale)!;\n }\n\n /**\n * If this collider has a heightfield shape, this returns the number of\n * rows of its height matrix.\n */\n public heightfieldNRows(): number {\n return this.colliderSet.raw.coHeightfieldNRows(this.handle)!;\n }\n\n /**\n * If this collider has a heightfield shape, this returns the number of\n * columns of its height matrix.\n */\n public heightfieldNCols(): number {\n return this.colliderSet.raw.coHeightfieldNCols(this.handle)!;\n }\n\n /**\n * The rigid-body this collider is attached to.\n */\n public parent(): RigidBody | null {\n return this._parent;\n }\n\n /**\n * The friction coefficient of this collider.\n */\n public friction(): number {\n return this.colliderSet.raw.coFriction(this.handle);\n }\n\n /**\n * The restitution coefficient of this collider.\n */\n public restitution(): number {\n return this.colliderSet.raw.coRestitution(this.handle);\n }\n\n /**\n * The density of this collider.\n */\n public density(): number {\n return this.colliderSet.raw.coDensity(this.handle);\n }\n\n /**\n * The mass of this collider.\n */\n public mass(): number {\n return this.colliderSet.raw.coMass(this.handle);\n }\n\n /**\n * The volume of this collider.\n */\n public volume(): number {\n return this.colliderSet.raw.coVolume(this.handle);\n }\n\n /**\n * The collision groups of this collider.\n */\n public collisionGroups(): InteractionGroups {\n return this.colliderSet.raw.coCollisionGroups(this.handle);\n }\n\n /**\n * The solver groups of this collider.\n */\n public solverGroups(): InteractionGroups {\n return this.colliderSet.raw.coSolverGroups(this.handle);\n }\n\n /**\n * Tests if this collider contains a point.\n *\n * @param point - The point to test.\n */\n public containsPoint(point: Vector): boolean {\n let rawPoint = VectorOps.intoRaw(point);\n let result = this.colliderSet.raw.coContainsPoint(this.handle, rawPoint);\n\n rawPoint.free();\n\n return result;\n }\n\n /**\n * Find the projection of a point on this collider.\n *\n * @param point - The point to project.\n * @param solid - If this is set to `true` then the collider shapes are considered to\n * be plain (if the point is located inside of a plain shape, its projection is the point\n * itself). If it is set to `false` the collider shapes are considered to be hollow\n * (if the point is located inside of an hollow shape, it is projected on the shape's\n * boundary).\n */\n public projectPoint(point: Vector, solid: boolean): PointProjection | null {\n let rawPoint = VectorOps.intoRaw(point);\n let result = PointProjection.fromRaw(\n this.colliderSet.raw.coProjectPoint(this.handle, rawPoint, solid),\n );\n\n rawPoint.free();\n\n return result;\n }\n\n /**\n * Tests if this collider intersects the given ray.\n *\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n */\n public intersectsRay(ray: Ray, maxToi: number): boolean {\n let rawOrig = VectorOps.intoRaw(ray.origin);\n let rawDir = VectorOps.intoRaw(ray.dir);\n let result = this.colliderSet.raw.coIntersectsRay(this.handle, rawOrig, rawDir, maxToi);\n\n rawOrig.free();\n rawDir.free();\n\n return result;\n }\n\n /*\n * Computes the smallest time between this and the given shape under translational movement are separated by a distance smaller or equal to distance.\n *\n * @param collider1Vel - The constant velocity of the current shape to cast (i.e. the cast direction).\n * @param shape2 - The shape to cast against.\n * @param shape2Pos - The position of the second shape.\n * @param shape2Rot - The rotation of the second shape.\n * @param shape2Vel - The constant velocity of the second shape.\n * @param targetDistance − If the shape moves closer to this distance from a collider, a hit\n * will be returned.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the distance traveled by the shape to `collider1Vel.norm() * maxToi`.\n * @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if\n * the shape is penetrating another shape at its starting point **and** its trajectory is such\n * that it’s on a path to exit that penetration state.\n */\n public castShape(\n collider1Vel: Vector,\n shape2: Shape,\n shape2Pos: Vector,\n shape2Rot: Rotation,\n shape2Vel: Vector,\n targetDistance: number,\n maxToi: number,\n stopAtPenetration: boolean,\n ): ShapeCastHit | null {\n let rawCollider1Vel = VectorOps.intoRaw(collider1Vel);\n let rawShape2Pos = VectorOps.intoRaw(shape2Pos);\n let rawShape2Rot = RotationOps.intoRaw(shape2Rot);\n let rawShape2Vel = VectorOps.intoRaw(shape2Vel);\n let rawShape2 = shape2.intoRaw();\n\n let result = ShapeCastHit.fromRaw(\n this.colliderSet,\n this.colliderSet.raw.coCastShape(\n this.handle,\n rawCollider1Vel,\n rawShape2,\n rawShape2Pos,\n rawShape2Rot,\n rawShape2Vel,\n targetDistance,\n maxToi,\n stopAtPenetration,\n )!,\n );\n\n rawCollider1Vel.free();\n rawShape2Pos.free();\n rawShape2Rot.free();\n rawShape2Vel.free();\n rawShape2.free();\n\n return result;\n }\n\n /*\n * Computes the smallest time between this and the given collider under translational movement are separated by a distance smaller or equal to distance.\n *\n * @param collider1Vel - The constant velocity of the current collider to cast (i.e. the cast direction).\n * @param collider2 - The collider to cast against.\n * @param collider2Vel - The constant velocity of the second collider.\n * @param targetDistance − If the shape moves closer to this distance from a collider, a hit\n * will be returned.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the distance traveled by the shape to `shapeVel.norm() * maxToi`.\n * @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if\n * the shape is penetrating another shape at its starting point **and** its trajectory is such\n * that it’s on a path to exit that penetration state.\n */\n public castCollider(\n collider1Vel: Vector,\n collider2: Collider,\n collider2Vel: Vector,\n targetDistance: number,\n maxToi: number,\n stopAtPenetration: boolean,\n ): ColliderShapeCastHit | null {\n let rawCollider1Vel = VectorOps.intoRaw(collider1Vel);\n let rawCollider2Vel = VectorOps.intoRaw(collider2Vel);\n\n let result = ColliderShapeCastHit.fromRaw(\n this.colliderSet,\n this.colliderSet.raw.coCastCollider(\n this.handle,\n rawCollider1Vel,\n collider2.handle,\n rawCollider2Vel,\n targetDistance,\n maxToi,\n stopAtPenetration,\n )!,\n );\n\n rawCollider1Vel.free();\n rawCollider2Vel.free();\n\n return result;\n }\n\n public intersectsShape(shape2: Shape, shapePos2: Vector, shapeRot2: Rotation): boolean {\n let rawPos2 = VectorOps.intoRaw(shapePos2);\n let rawRot2 = RotationOps.intoRaw(shapeRot2);\n let rawShape2 = shape2.intoRaw();\n\n let result = this.colliderSet.raw.coIntersectsShape(\n this.handle,\n rawShape2,\n rawPos2,\n rawRot2,\n );\n\n rawPos2.free();\n rawRot2.free();\n rawShape2.free();\n\n return result;\n }\n\n /**\n * Computes one pair of contact points between the shape owned by this collider and the given shape.\n *\n * @param shape2 - The second shape.\n * @param shape2Pos - The initial position of the second shape.\n * @param shape2Rot - The rotation of the second shape.\n * @param prediction - The prediction value, if the shapes are separated by a distance greater than this value, test will fail.\n * @returns `null` if the shapes are separated by a distance greater than prediction, otherwise contact details. The result is given in world-space.\n */\n contactShape(\n shape2: Shape,\n shape2Pos: Vector,\n shape2Rot: Rotation,\n prediction: number,\n ): ShapeContact | null {\n let rawPos2 = VectorOps.intoRaw(shape2Pos);\n let rawRot2 = RotationOps.intoRaw(shape2Rot);\n let rawShape2 = shape2.intoRaw();\n\n let result = ShapeContact.fromRaw(\n this.colliderSet.raw.coContactShape(\n this.handle,\n rawShape2,\n rawPos2,\n rawRot2,\n prediction,\n )!,\n );\n\n rawPos2.free();\n rawRot2.free();\n rawShape2.free();\n\n return result;\n }\n\n /**\n * Computes one pair of contact points between the collider and the given collider.\n *\n * @param collider2 - The second collider.\n * @param prediction - The prediction value, if the shapes are separated by a distance greater than this value, test will fail.\n * @returns `null` if the shapes are separated by a distance greater than prediction, otherwise contact details. The result is given in world-space.\n */\n contactCollider(collider2: Collider, prediction: number): ShapeContact | null {\n let result = ShapeContact.fromRaw(\n this.colliderSet.raw.coContactCollider(this.handle, collider2.handle, prediction)!,\n );\n\n return result;\n }\n\n /**\n * Find the closest intersection between a ray and this collider.\n *\n * This also computes the normal at the hit point.\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n * @returns The time-of-impact between this collider and the ray, or `-1` if there is no intersection.\n */\n public castRay(ray: Ray, maxToi: number, solid: boolean): number {\n let rawOrig = VectorOps.intoRaw(ray.origin);\n let rawDir = VectorOps.intoRaw(ray.dir);\n let result = this.colliderSet.raw.coCastRay(this.handle, rawOrig, rawDir, maxToi, solid);\n\n rawOrig.free();\n rawDir.free();\n\n return result;\n }\n\n /**\n * Find the closest intersection between a ray and this collider.\n *\n * This also computes the normal at the hit point.\n * @param ray - The ray to cast.\n * @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively\n * limits the length of the ray to `ray.dir.norm() * maxToi`.\n * @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its\n * origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,\n * whereas `false` implies that all shapes are hollow for this ray-cast.\n */\n public castRayAndGetNormal(ray: Ray, maxToi: number, solid: boolean): RayIntersection | null {\n let rawOrig = VectorOps.intoRaw(ray.origin);\n let rawDir = VectorOps.intoRaw(ray.dir);\n let result = RayIntersection.fromRaw(\n this.colliderSet.raw.coCastRayAndGetNormal(\n this.handle,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n )!,\n );\n\n rawOrig.free();\n rawDir.free();\n\n return result;\n }\n}\n\nexport enum MassPropsMode {\n Density,\n Mass,\n MassProps,\n}\n\nexport class ColliderDesc {\n enabled: boolean;\n shape: Shape;\n massPropsMode: MassPropsMode;\n mass: number;\n centerOfMass: Vector;\n principalAngularInertia: Vector;\n angularInertiaLocalFrame: Rotation;\n density: number;\n friction: number;\n restitution: number;\n rotation: Rotation;\n translation: Vector;\n isSensor: boolean;\n collisionGroups: InteractionGroups;\n solverGroups: InteractionGroups;\n frictionCombineRule: CoefficientCombineRule;\n restitutionCombineRule: CoefficientCombineRule;\n activeEvents: ActiveEvents;\n activeHooks: ActiveHooks;\n activeCollisionTypes: ActiveCollisionTypes;\n contactForceEventThreshold: number;\n contactSkin: number;\n\n /**\n * Initializes a collider descriptor from the collision shape.\n *\n * @param shape - The shape of the collider being built.\n */\n constructor(shape: Shape) {\n this.enabled = true;\n this.shape = shape;\n this.massPropsMode = MassPropsMode.Density;\n this.density = 1.0;\n this.friction = 0.5;\n this.restitution = 0.0;\n this.rotation = RotationOps.identity();\n this.translation = VectorOps.zeros();\n this.isSensor = false;\n this.collisionGroups = 0xffff_ffff;\n this.solverGroups = 0xffff_ffff;\n this.frictionCombineRule = CoefficientCombineRule.Average;\n this.restitutionCombineRule = CoefficientCombineRule.Average;\n this.activeCollisionTypes = ActiveCollisionTypes.DEFAULT;\n this.activeEvents = ActiveEvents.NONE;\n this.activeHooks = ActiveHooks.NONE;\n this.mass = 0.0;\n this.centerOfMass = VectorOps.zeros();\n this.contactForceEventThreshold = 0.0;\n this.contactSkin = 0.0;\n\n this.principalAngularInertia = VectorOps.zeros();\n this.angularInertiaLocalFrame = RotationOps.identity();\n }\n\n /**\n * Create a new collider descriptor with a ball shape.\n *\n * @param radius - The radius of the ball.\n */\n public static ball(radius: number): ColliderDesc {\n const shape = new Ball(radius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Create a new collider descriptor with a capsule shape.\n *\n * @param halfHeight - The half-height of the capsule, along the `y` axis.\n * @param radius - The radius of the capsule basis.\n */\n public static capsule(halfHeight: number, radius: number): ColliderDesc {\n const shape = new Capsule(halfHeight, radius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new segment shape.\n *\n * @param a - The first point of the segment.\n * @param b - The second point of the segment.\n */\n public static segment(a: Vector, b: Vector): ColliderDesc {\n const shape = new Segment(a, b);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new triangle shape.\n *\n * @param a - The first point of the triangle.\n * @param b - The second point of the triangle.\n * @param c - The third point of the triangle.\n */\n public static triangle(a: Vector, b: Vector, c: Vector): ColliderDesc {\n const shape = new Triangle(a, b, c);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new triangle shape with round corners.\n *\n * @param a - The first point of the triangle.\n * @param b - The second point of the triangle.\n * @param c - The third point of the triangle.\n * @param borderRadius - The radius of the borders of this triangle. In 3D,\n * this is also equal to half the thickness of the triangle.\n */\n public static roundTriangle(\n a: Vector,\n b: Vector,\n c: Vector,\n borderRadius: number,\n ): ColliderDesc {\n const shape = new RoundTriangle(a, b, c, borderRadius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor with a polyline shape.\n *\n * @param vertices - The coordinates of the polyline's vertices.\n * @param indices - The indices of the polyline's segments. If this is `undefined` or `null`,\n * the vertices are assumed to describe a line strip.\n */\n public static polyline(vertices: Float32Array, indices?: Uint32Array | null): ColliderDesc {\n const shape = new Polyline(vertices, indices ?? undefined);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor with a shape made of voxels.\n *\n * @param data - Defines the set of voxels. If this is a `Int32Array` then\n * each voxel is defined from its (signed) grid coordinates,\n * with 3 (resp 2) contiguous integers per voxel in 3D (resp 2D).\n * If this is a `Float32Array`, each voxel will be such that\n * they contain at least one point from this array (where each\n * point is defined from 3 (resp 2) contiguous numbers per point\n * in 3D (resp 2D).\n * @param voxelSize - The size of each voxel.\n */\n public static voxels(voxels: Float32Array | Int32Array, voxelSize: Vector): ColliderDesc {\n const shape = new Voxels(voxels, voxelSize);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor with a triangle mesh shape.\n *\n * @param vertices - The coordinates of the triangle mesh's vertices.\n * @param indices - The indices of the triangle mesh's triangles.\n */\n public static trimesh(\n vertices: Float32Array,\n indices: Uint32Array,\n flags?: TriMeshFlags,\n ): ColliderDesc {\n const shape = new TriMesh(vertices, indices, flags);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor with a cuboid shape.\n *\n * @param hx - The half-width of the rectangle along its local `x` axis.\n * @param hy - The half-width of the rectangle along its local `y` axis.\n * @param hz - The half-width of the rectangle along its local `z` axis.\n */\n public static cuboid(hx: number, hy: number, hz: number): ColliderDesc {\n const shape = new Cuboid(hx, hy, hz);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor with a rectangular shape with round borders.\n *\n * @param hx - The half-width of the rectangle along its local `x` axis.\n * @param hy - The half-width of the rectangle along its local `y` axis.\n * @param hz - The half-width of the rectangle along its local `z` axis.\n * @param borderRadius - The radius of the cuboid's borders.\n */\n public static roundCuboid(\n hx: number,\n hy: number,\n hz: number,\n borderRadius: number,\n ): ColliderDesc {\n const shape = new RoundCuboid(hx, hy, hz, borderRadius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor with a heightfield shape.\n *\n * @param nrows − The number of rows in the heights matrix.\n * @param ncols - The number of columns in the heights matrix.\n * @param heights - The heights of the heightfield along its local `y` axis,\n * provided as a matrix stored in column-major order.\n * @param scale - The scale factor applied to the heightfield.\n */\n public static heightfield(\n nrows: number,\n ncols: number,\n heights: Float32Array,\n scale: Vector,\n flags?: HeightFieldFlags,\n ): ColliderDesc {\n const shape = new Heightfield(nrows, ncols, heights, scale, flags);\n return new ColliderDesc(shape);\n }\n\n /**\n * Create a new collider descriptor with a cylinder shape.\n *\n * @param halfHeight - The half-height of the cylinder, along the `y` axis.\n * @param radius - The radius of the cylinder basis.\n */\n public static cylinder(halfHeight: number, radius: number): ColliderDesc {\n const shape = new Cylinder(halfHeight, radius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Create a new collider descriptor with a cylinder shape with rounded corners.\n *\n * @param halfHeight - The half-height of the cylinder, along the `y` axis.\n * @param radius - The radius of the cylinder basis.\n * @param borderRadius - The radius of the cylinder's rounded edges and vertices.\n */\n public static roundCylinder(\n halfHeight: number,\n radius: number,\n borderRadius: number,\n ): ColliderDesc {\n const shape = new RoundCylinder(halfHeight, radius, borderRadius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Create a new collider descriptor with a cone shape.\n *\n * @param halfHeight - The half-height of the cone, along the `y` axis.\n * @param radius - The radius of the cone basis.\n */\n public static cone(halfHeight: number, radius: number): ColliderDesc {\n const shape = new Cone(halfHeight, radius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Create a new collider descriptor with a cone shape with rounded corners.\n *\n * @param halfHeight - The half-height of the cone, along the `y` axis.\n * @param radius - The radius of the cone basis.\n * @param borderRadius - The radius of the cone's rounded edges and vertices.\n */\n public static roundCone(\n halfHeight: number,\n radius: number,\n borderRadius: number,\n ): ColliderDesc {\n const shape = new RoundCone(halfHeight, radius, borderRadius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Computes the convex-hull of the given points and use the resulting\n * convex polyhedron as the shape for this new collider descriptor.\n *\n * @param points - The point that will be used to compute the convex-hull.\n */\n public static convexHull(points: Float32Array): ColliderDesc | null {\n const shape = new ConvexPolyhedron(points, null);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor that uses the given set of points assumed\n * to form a convex polyline (no convex-hull computation will be done).\n *\n * @param vertices - The vertices of the convex polyline.\n */\n public static convexMesh(\n vertices: Float32Array,\n indices?: Uint32Array | null,\n ): ColliderDesc | null {\n const shape = new ConvexPolyhedron(vertices, indices);\n return new ColliderDesc(shape);\n }\n\n /**\n * Computes the convex-hull of the given points and use the resulting\n * convex polyhedron as the shape for this new collider descriptor. A\n * border is added to that convex polyhedron to give it round corners.\n *\n * @param points - The point that will be used to compute the convex-hull.\n * @param borderRadius - The radius of the round border added to the convex polyhedron.\n */\n public static roundConvexHull(points: Float32Array, borderRadius: number): ColliderDesc | null {\n const shape = new RoundConvexPolyhedron(points, null, borderRadius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Creates a new collider descriptor that uses the given set of points assumed\n * to form a round convex polyline (no convex-hull computation will be done).\n *\n * @param vertices - The vertices of the convex polyline.\n * @param borderRadius - The radius of the round border added to the convex polyline.\n */\n public static roundConvexMesh(\n vertices: Float32Array,\n indices: Uint32Array | null,\n borderRadius: number,\n ): ColliderDesc | null {\n const shape = new RoundConvexPolyhedron(vertices, indices, borderRadius);\n return new ColliderDesc(shape);\n }\n\n /**\n * Sets the position of the collider to be created relative to the rigid-body it is attached to.\n */\n public setTranslation(x: number, y: number, z: number): ColliderDesc {\n if (typeof x != \"number\" || typeof y != \"number\" || typeof z != \"number\")\n throw TypeError(\"The translation components must be numbers.\");\n\n this.translation = {x: x, y: y, z: z};\n return this;\n }\n\n /**\n * Sets the rotation of the collider to be created relative to the rigid-body it is attached to.\n *\n * @param rot - The rotation of the collider to be created relative to the rigid-body it is attached to.\n */\n public setRotation(rot: Rotation): ColliderDesc {\n RotationOps.copy(this.rotation, rot);\n return this;\n }\n\n /**\n * Sets whether or not the collider being created is a sensor.\n *\n * A sensor collider does not take part of the physics simulation, but generates\n * proximity events.\n *\n * @param sensor - Set to `true` of the collider built is to be a sensor.\n */\n public setSensor(sensor: boolean): ColliderDesc {\n this.isSensor = sensor;\n return this;\n }\n\n /**\n * Sets whether the created collider will be enabled or disabled.\n * @param enabled − If set to `false` the collider will be disabled at creation.\n */\n public setEnabled(enabled: boolean): ColliderDesc {\n this.enabled = enabled;\n return this;\n }\n\n /**\n * Sets the contact skin of the collider.\n *\n * The contact skin acts as if the collider was enlarged with a skin of width `skin_thickness`\n * around it, keeping objects further apart when colliding.\n *\n * A non-zero contact skin can increase performance, and in some cases, stability. However\n * it creates a small gap between colliding object (equal to the sum of their skin). If the\n * skin is sufficiently small, this might not be visually significant or can be hidden by the\n * rendering assets.\n */\n public setContactSkin(thickness: number): ColliderDesc {\n this.contactSkin = thickness;\n return this;\n }\n\n /**\n * Sets the density of the collider being built.\n *\n * The mass and angular inertia tensor will be computed automatically based on this density and the collider’s shape.\n *\n * @param density - The density to set, must be greater or equal to 0. A density of 0 means that this collider\n * will not affect the mass or angular inertia of the rigid-body it is attached to.\n */\n public setDensity(density: number): ColliderDesc {\n this.massPropsMode = MassPropsMode.Density;\n this.density = density;\n return this;\n }\n\n /**\n * Sets the mass of the collider being built.\n *\n * The angular inertia tensor will be computed automatically based on this mass and the collider’s shape.\n *\n * @param mass - The mass to set, must be greater or equal to 0.\n */\n public setMass(mass: number): ColliderDesc {\n this.massPropsMode = MassPropsMode.Mass;\n this.mass = mass;\n return this;\n }\n\n /**\n * Sets the mass properties of the collider being built.\n *\n * This replaces the mass-properties automatically computed from the collider's density and shape.\n * These mass-properties will be added to the mass-properties of the rigid-body this collider will be attached to.\n *\n * @param mass − The mass of the collider to create.\n * @param centerOfMass − The center-of-mass of the collider to create.\n * @param principalAngularInertia − The initial principal angular inertia of the collider to create.\n * These are the eigenvalues of the angular inertia matrix.\n * @param angularInertiaLocalFrame − The initial local angular inertia frame of the collider to create.\n * These are the eigenvectors of the angular inertia matrix.\n */\n public setMassProperties(\n mass: number,\n centerOfMass: Vector,\n principalAngularInertia: Vector,\n angularInertiaLocalFrame: Rotation,\n ): ColliderDesc {\n this.massPropsMode = MassPropsMode.MassProps;\n this.mass = mass;\n VectorOps.copy(this.centerOfMass, centerOfMass);\n VectorOps.copy(this.principalAngularInertia, principalAngularInertia);\n RotationOps.copy(this.angularInertiaLocalFrame, angularInertiaLocalFrame);\n return this;\n }\n\n /**\n * Sets the restitution coefficient of the collider to be created.\n *\n * @param restitution - The restitution coefficient in `[0, 1]`. A value of 0 (the default) means no bouncing behavior\n * while 1 means perfect bouncing (though energy may still be lost due to numerical errors of the\n * constraints solver).\n */\n public setRestitution(restitution: number): ColliderDesc {\n this.restitution = restitution;\n return this;\n }\n\n /**\n * Sets the friction coefficient of the collider to be created.\n *\n * @param friction - The friction coefficient. Must be greater or equal to 0. This is generally smaller than 1. The\n * higher the coefficient, the stronger friction forces will be for contacts with the collider\n * being built.\n */\n public setFriction(friction: number): ColliderDesc {\n this.friction = friction;\n return this;\n }\n\n /**\n * Sets the rule used to combine the friction coefficients of two colliders\n * colliders involved in a contact.\n *\n * @param rule − The combine rule to apply.\n */\n public setFrictionCombineRule(rule: CoefficientCombineRule): ColliderDesc {\n this.frictionCombineRule = rule;\n return this;\n }\n\n /**\n * Sets the rule used to combine the restitution coefficients of two colliders\n * colliders involved in a contact.\n *\n * @param rule − The combine rule to apply.\n */\n public setRestitutionCombineRule(rule: CoefficientCombineRule): ColliderDesc {\n this.restitutionCombineRule = rule;\n return this;\n }\n\n /**\n * Sets the collision groups used by this collider.\n *\n * Two colliders will interact iff. their collision groups are compatible.\n * See the documentation of `InteractionGroups` for details on teh used bit pattern.\n *\n * @param groups - The collision groups used for the collider being built.\n */\n public setCollisionGroups(groups: InteractionGroups): ColliderDesc {\n this.collisionGroups = groups;\n return this;\n }\n\n /**\n * Sets the solver groups used by this collider.\n *\n * Forces between two colliders in contact will be computed iff their solver\n * groups are compatible.\n * See the documentation of `InteractionGroups` for details on the used bit pattern.\n *\n * @param groups - The solver groups used for the collider being built.\n */\n public setSolverGroups(groups: InteractionGroups): ColliderDesc {\n this.solverGroups = groups;\n return this;\n }\n\n /**\n * Set the physics hooks active for this collider.\n *\n * Use this to enable custom filtering rules for contact/intersecstion pairs involving this collider.\n *\n * @param activeHooks - The hooks active for contact/intersection pairs involving this collider.\n */\n public setActiveHooks(activeHooks: ActiveHooks): ColliderDesc {\n this.activeHooks = activeHooks;\n return this;\n }\n\n /**\n * Set the events active for this collider.\n *\n * Use this to enable contact and/or intersection event reporting for this collider.\n *\n * @param activeEvents - The events active for contact/intersection pairs involving this collider.\n */\n public setActiveEvents(activeEvents: ActiveEvents): ColliderDesc {\n this.activeEvents = activeEvents;\n return this;\n }\n\n /**\n * Set the collision types active for this collider.\n *\n * @param activeCollisionTypes - The hooks active for contact/intersection pairs involving this collider.\n */\n public setActiveCollisionTypes(activeCollisionTypes: ActiveCollisionTypes): ColliderDesc {\n this.activeCollisionTypes = activeCollisionTypes;\n return this;\n }\n\n /**\n * Sets the total force magnitude beyond which a contact force event can be emitted.\n *\n * @param threshold - The force threshold to set.\n */\n public setContactForceEventThreshold(threshold: number): ColliderDesc {\n this.contactForceEventThreshold = threshold;\n return this;\n }\n}\n","import {Coarena} from \"../coarena\";\nimport {ImpulseJointHandle, IslandManager, RigidBodyHandle} from \"../dynamics\";\nimport {RigidBodySet} from \"../dynamics\";\nimport {RotationOps, VectorOps} from \"../math\";\nimport {RawColliderSet} from \"../raw\";\nimport {Collider, ColliderDesc, ColliderHandle} from \"./collider\";\n\n/**\n * A set of rigid bodies that can be handled by a physics pipeline.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `colliderSet.free()`\n * once you are done using it (and all the rigid-bodies it created).\n */\nexport class ColliderSet {\n raw: RawColliderSet;\n private map: Coarena<Collider>;\n\n /**\n * Release the WASM memory occupied by this collider set.\n */\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined!;\n\n if (!!this.map) {\n this.map.clear();\n }\n this.map = undefined!;\n }\n\n constructor(raw?: RawColliderSet) {\n this.raw = raw || new RawColliderSet();\n this.map = new Coarena<Collider>();\n // Initialize the map with the existing elements, if any.\n if (raw) {\n raw.forEachColliderHandle((handle: ColliderHandle) => {\n this.map.set(handle, new Collider(this, handle, null));\n });\n }\n }\n\n /** @internal */\n public castClosure<Res>(\n f?: (collider: Collider) => Res,\n ): ((handle: ColliderHandle) => Res) | undefined {\n if (!f) return undefined;\n return (handle) => {\n return f(this.get(handle)!);\n };\n }\n\n /** @internal */\n public finalizeDeserialization(bodies: RigidBodySet) {\n this.map.forEach((collider) => collider.finalizeDeserialization(bodies));\n }\n\n /**\n * Creates a new collider and return its integer handle.\n *\n * @param bodies - The set of bodies where the collider's parent can be found.\n * @param desc - The collider's description.\n * @param parentHandle - The integer handle of the rigid-body this collider is attached to.\n */\n public createCollider(\n bodies: RigidBodySet,\n desc: ColliderDesc,\n parentHandle?: RigidBodyHandle,\n ): Collider {\n let hasParent = parentHandle != undefined && parentHandle != null;\n\n if (hasParent && isNaN(parentHandle!))\n throw Error(\n \"Cannot create a collider with a parent rigid-body handle that is not a number.\",\n );\n\n let rawShape = desc.shape.intoRaw();\n let rawTra = VectorOps.intoRaw(desc.translation);\n let rawRot = RotationOps.intoRaw(desc.rotation);\n let rawCom = VectorOps.intoRaw(desc.centerOfMass);\n\n let rawPrincipalInertia = VectorOps.intoRaw(desc.principalAngularInertia);\n let rawInertiaFrame = RotationOps.intoRaw(desc.angularInertiaLocalFrame);\n\n let handle = this.raw.createCollider(\n desc.enabled,\n rawShape,\n rawTra,\n rawRot,\n desc.massPropsMode,\n desc.mass,\n rawCom,\n rawPrincipalInertia,\n rawInertiaFrame,\n desc.density,\n desc.friction,\n desc.restitution,\n desc.frictionCombineRule,\n desc.restitutionCombineRule,\n desc.isSensor,\n desc.collisionGroups,\n desc.solverGroups,\n desc.activeCollisionTypes,\n desc.activeHooks,\n desc.activeEvents,\n desc.contactForceEventThreshold,\n desc.contactSkin,\n hasParent,\n hasParent ? parentHandle! : 0,\n bodies.raw,\n );\n\n rawShape.free();\n rawTra.free();\n rawRot.free();\n rawCom.free();\n\n rawPrincipalInertia.free();\n rawInertiaFrame.free();\n\n let parent = hasParent ? bodies.get(parentHandle!) : null;\n let collider = new Collider(this, handle!, parent, desc.shape);\n this.map.set(handle!, collider);\n return collider;\n }\n\n /**\n * Remove a collider from this set.\n *\n * @param handle - The integer handle of the collider to remove.\n * @param bodies - The set of rigid-body containing the rigid-body the collider is attached to.\n * @param wakeUp - If `true`, the rigid-body the removed collider is attached to will be woken-up automatically.\n */\n public remove(\n handle: ColliderHandle,\n islands: IslandManager,\n bodies: RigidBodySet,\n wakeUp: boolean,\n ) {\n this.raw.remove(handle, islands.raw, bodies.raw, wakeUp);\n this.unmap(handle);\n }\n\n /**\n * Internal function, do not call directly.\n * @param handle\n */\n public unmap(handle: ImpulseJointHandle) {\n this.map.delete(handle);\n }\n\n /**\n * Gets the rigid-body with the given handle.\n *\n * @param handle - The handle of the rigid-body to retrieve.\n */\n public get(handle: ColliderHandle): Collider | null {\n return this.map.get(handle);\n }\n\n /**\n * The number of colliders on this set.\n */\n public len(): number {\n return this.map.len();\n }\n\n /**\n * Does this set contain a collider with the given handle?\n *\n * @param handle - The collider handle to check.\n */\n public contains(handle: ColliderHandle): boolean {\n return this.get(handle) != null;\n }\n\n /**\n * Applies the given closure to each collider contained by this set.\n *\n * @param f - The closure to apply.\n */\n public forEach(f: (collider: Collider) => void) {\n this.map.forEach(f);\n }\n\n /**\n * Gets all colliders in the list.\n *\n * @returns collider list.\n */\n public getAll(): Collider[] {\n return this.map.getAll();\n }\n}\n","import {version as vers, reserve_memory as reserve} from \"./raw\";\n\nexport function version(): string {\n return vers();\n}\n\n/// Reserves additional memory in WASM land.\n///\n/// This will grow the internal WASM memory buffer so that it can fit at least\n/// the specified amount of extra bytes. This can help reduce future runtime\n/// overhead due to dynamic internal memory growth once the limit of the\n/// pre-allocated memory is reached.\n///\n/// This feature is still experimental. Due to the nature of the internal\n/// allocator, there can be situations where the allocator decides to perform\n/// additional internal memory growth even though not all `extraBytesCount`\n/// are occupied yet.\nexport function reserveMemory(extraBytesCount: number) {\n reserve(extraBytesCount);\n}\n\nexport * from \"./math\";\nexport * from \"./dynamics\";\nexport * from \"./geometry\";\nexport * from \"./pipeline\";\nexport * from \"./control\";\n","import wasmInit, {InitInput} from \"../wasm/release/rapier_wasm_3d\";\n\n/**\n * Initializes RAPIER using fetch (requires WASM file to be served).\n * Has to be called and awaited before using any library methods.\n */\nexport async function init(input?: InitInput) {\n if (!input) {\n input = new URL(\"rapier_wasm_3d_bg.wasm\", import.meta.url);\n }\n await wasmInit(input);\n}\n","import * as RAPIER from \"./exports\";\nexport * from \"./exports\";\nexport * from \"./init\";\nexport default RAPIER;\n"],"mappings":";;;AAEA,IAAa,gBAAb,MAAa,cAAc;CACvB,OAAO,OAAO,KAAK;AACf,QAAM,QAAQ;EACd,MAAM,MAAM,OAAO,OAAO,cAAc,UAAU;AAClD,MAAI,YAAY;AAChB,4BAA0B,SAAS,KAAK,IAAI,WAAW,IAAI;AAC3D,SAAO;;CAEX,qBAAqB;EACjB,MAAM,MAAM,KAAK;AACjB,OAAK,YAAY;AACjB,4BAA0B,WAAW,KAAK;AAC1C,SAAO;;CAEX,OAAO;EACH,MAAM,MAAM,KAAK,oBAAoB;AACrC,OAAK,yBAAyB,KAAK,EAAE;;;;;;;;;;;;;;;;;CAiBzC,QAAQ,cAAc,QAAQ,WAAW,SAAS,QAAQ,QAAQ,OAAO,cAAc,eAAe,yBAAyB,2BAA2B,kBAAkB;AACxK,MAAI;AACA,gBAAa,cAAc,eAAe;AAC1C,gBAAa,QAAQ,gBAAgB;AACrC,gBAAa,WAAW,eAAe;AACvC,gBAAa,SAAS,UAAU;AAChC,gBAAa,QAAQ,UAAU;GAC/B,MAAM,MAAM,KAAK,sBAAsB,KAAK,WAAW,aAAa,WAAW,OA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