three-player-controller 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -1
- package/dist/index.d.mts +103 -12
- package/dist/index.d.ts +103 -12
- package/dist/index.js +6318 -422
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1272 -330
- package/dist/index.mjs.map +1 -1
- package/dist/rapier.es-XQHNYU2P.mjs +4966 -0
- package/dist/rapier.es-XQHNYU2P.mjs.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/@dimforge/rapier3d-compat/rapier_wasm3d.js","../node_modules/@dimforge/gen3d/gen3d/math.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/rigid_body.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/impulse_joint.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/coefficient_combine_rule.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/feature.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/shape.ts","../node_modules/@dimforge/gen3d/gen3d/pipeline/query_pipeline.ts","../node_modules/@dimforge/gen3d/gen3d/pipeline/event_queue.ts","../node_modules/@dimforge/gen3d/gen3d/pipeline/physics_hooks.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/collider.ts","../node_modules/@dimforge/gen3d/gen3d/coarena.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/rigid_body_set.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/integration_parameters.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/impulse_joint_set.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/multibody_joint.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/multibody_joint_set.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/ccd_solver.ts","../node_modules/@dimforge/gen3d/gen3d/dynamics/island_manager.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/broad_phase.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/narrow_phase.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/contact.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/point.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/ray.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/toi.ts","../node_modules/@dimforge/gen3d/gen3d/pipeline/physics_pipeline.ts","../node_modules/@dimforge/gen3d/gen3d/pipeline/serialization_pipeline.ts","../node_modules/@dimforge/gen3d/gen3d/pipeline/debug_render_pipeline.ts","../node_modules/@dimforge/gen3d/gen3d/control/character_controller.ts","../node_modules/@dimforge/gen3d/gen3d/control/ray_cast_vehicle_controller.ts","../node_modules/@dimforge/gen3d/gen3d/pipeline/world.ts","../node_modules/@dimforge/gen3d/gen3d/geometry/collider_set.ts","../node_modules/@dimforge/node_modules/tslib/tslib.es6.js","../node_modules/@dimforge/node_modules/base64-js/index.js","../node_modules/@dimforge/gen3d/gen3d/init.ts","../node_modules/@dimforge/gen3d/gen3d/exports.ts"],"sourcesContent":["let wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\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 getObject(idx) { return heap[idx]; }\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedFloat64Memory0 = null;\n\nfunction getFloat64Memory0() {\n if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {\n cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64Memory0;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\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 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\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_free(deferred1_0, deferred1_1, 1);\n }\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nlet cachedFloat32Memory0 = null;\n\nfunction getFloat32Memory0() {\n if (cachedFloat32Memory0 === null || cachedFloat32Memory0.byteLength === 0) {\n cachedFloat32Memory0 = new Float32Array(wasm.memory.buffer);\n }\n return cachedFloat32Memory0;\n}\n\nlet stack_pointer = 128;\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 getArrayF32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getFloat32Memory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nlet cachedUint32Memory0 = null;\n\nfunction getUint32Memory0() {\n if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {\n cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32Memory0;\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArrayF32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getFloat32Memory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction passArray32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getUint32Memory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\n/**\n*/\nexport const RawRigidBodyType = Object.freeze({ Dynamic:0,\"0\":\"Dynamic\",Fixed:1,\"1\":\"Fixed\",KinematicPositionBased:2,\"2\":\"KinematicPositionBased\",KinematicVelocityBased:3,\"3\":\"KinematicVelocityBased\", });\n/**\n*/\nexport const RawFeatureType = Object.freeze({ Vertex:0,\"0\":\"Vertex\",Edge:1,\"1\":\"Edge\",Face:2,\"2\":\"Face\",Unknown:3,\"3\":\"Unknown\", });\n/**\n*/\nexport const RawMotorModel = Object.freeze({ AccelerationBased:0,\"0\":\"AccelerationBased\",ForceBased:1,\"1\":\"ForceBased\", });\n/**\n*/\nexport const RawShapeType = Object.freeze({ Ball:0,\"0\":\"Ball\",Cuboid:1,\"1\":\"Cuboid\",Capsule:2,\"2\":\"Capsule\",Segment:3,\"3\":\"Segment\",Polyline:4,\"4\":\"Polyline\",Triangle:5,\"5\":\"Triangle\",TriMesh:6,\"6\":\"TriMesh\",HeightField:7,\"7\":\"HeightField\",Compound:8,\"8\":\"Compound\",ConvexPolyhedron:9,\"9\":\"ConvexPolyhedron\",Cylinder:10,\"10\":\"Cylinder\",Cone:11,\"11\":\"Cone\",RoundCuboid:12,\"12\":\"RoundCuboid\",RoundTriangle:13,\"13\":\"RoundTriangle\",RoundCylinder:14,\"14\":\"RoundCylinder\",RoundCone:15,\"15\":\"RoundCone\",RoundConvexPolyhedron:16,\"16\":\"RoundConvexPolyhedron\",HalfSpace:17,\"17\":\"HalfSpace\", });\n/**\n*/\nexport const RawJointAxis = Object.freeze({ X:0,\"0\":\"X\",Y:1,\"1\":\"Y\",Z:2,\"2\":\"Z\",AngX:3,\"3\":\"AngX\",AngY:4,\"4\":\"AngY\",AngZ:5,\"5\":\"AngZ\", });\n/**\n*/\nexport const RawJointType = Object.freeze({ Revolute:0,\"0\":\"Revolute\",Fixed:1,\"1\":\"Fixed\",Prismatic:2,\"2\":\"Prismatic\",Rope:3,\"3\":\"Rope\",Spring:4,\"4\":\"Spring\",Spherical:5,\"5\":\"Spherical\",Generic:6,\"6\":\"Generic\", });\n/**\n*/\nexport class RawBroadPhase {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawBroadPhase.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawbroadphase_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawbroadphase_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n}\n/**\n*/\nexport class RawCCDSolver {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawccdsolver_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawccdsolver_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n}\n/**\n*/\nexport class RawCharacterCollision {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcharactercollision_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawcharactercollision_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * @returns {number}\n */\n handle() {\n const ret = wasm.rawcharactercollision_handle(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 {number}\n */\n toi() {\n const ret = wasm.rawcharactercollision_toi(this.__wbg_ptr);\n return 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 /**\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/**\n*/\nexport class RawColliderSet {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawColliderSet.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcolliderset_free(ptr);\n }\n /**\n * The world-space translation of this collider.\n * @param {number} handle\n * @returns {RawVector}\n */\n coTranslation(handle) {\n const ret = wasm.rawcolliderset_coTranslation(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The world-space orientation of this collider.\n * @param {number} handle\n * @returns {RawRotation}\n */\n coRotation(handle) {\n const ret = wasm.rawcolliderset_coRotation(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\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 * 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 * 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 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 * @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 * 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 * 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 * 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 try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coRadius(retptr, this.__wbg_ptr, handle);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * 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 try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coHalfHeight(retptr, this.__wbg_ptr, handle);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * The radius of the round edges of this collider.\n * @param {number} handle\n * @returns {number | undefined}\n */\n coRoundRadius(handle) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coRoundRadius(retptr, this.__wbg_ptr, handle);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * 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 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n let v1;\n if (r0 !== 0) {\n v1 = getArrayF32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n }\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n let v1;\n if (r0 !== 0) {\n v1 = getArrayU32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n }\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n let v1;\n if (r0 !== 0) {\n v1 = getArrayF32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n }\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 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 try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coHeightfieldNRows(retptr, this.__wbg_ptr, handle);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1 >>> 0;\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 try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawcolliderset_coHeightfieldNCols(retptr, this.__wbg_ptr, handle);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1 >>> 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 = getInt32Memory0()[retptr / 4 + 0];\n var r2 = getFloat64Memory0()[retptr / 8 + 1];\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 {boolean} enabled\n */\n coSetEnabled(handle, enabled) {\n wasm.rawcolliderset_coSetEnabled(this.__wbg_ptr, handle, enabled);\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 * 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 * 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 * 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 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 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 * 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 * 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 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 * 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 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 {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 * @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} maxToi\n * @param {boolean} stop_at_penetration\n * @returns {RawShapeTOI | undefined}\n */\n coCastShape(handle, colliderVel, shape2, shape2Pos, shape2Rot, shape2Vel, 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, maxToi, stop_at_penetration);\n return ret === 0 ? undefined : RawShapeTOI.__wrap(ret);\n }\n /**\n * @param {number} handle\n * @param {RawVector} collider1Vel\n * @param {number} collider2handle\n * @param {RawVector} collider2Vel\n * @param {number} max_toi\n * @param {boolean} stop_at_penetration\n * @returns {RawShapeColliderTOI | undefined}\n */\n coCastCollider(handle, collider1Vel, collider2handle, collider2Vel, 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, max_toi, stop_at_penetration);\n return ret === 0 ? undefined : RawShapeColliderTOI.__wrap(ret);\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 * @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 * @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 * @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} 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 {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 {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 {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} friction\n */\n coSetFriction(handle, friction) {\n wasm.rawcolliderset_coSetFriction(this.__wbg_ptr, handle, friction);\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 * @param {number} handle\n * @param {number} rule\n */\n coSetFrictionCombineRule(handle, rule) {\n wasm.rawcolliderset_coSetFrictionCombineRule(this.__wbg_ptr, handle, rule);\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 * @param {number} handle\n * @param {number} rule\n */\n coSetRestitutionCombineRule(handle, rule) {\n wasm.rawcolliderset_coSetRestitutionCombineRule(this.__wbg_ptr, handle, rule);\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} groups\n */\n coSetSolverGroups(handle, groups) {\n wasm.rawcolliderset_coSetSolverGroups(this.__wbg_ptr, handle, groups);\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} events\n */\n coSetActiveEvents(handle, events) {\n wasm.rawcolliderset_coSetActiveEvents(this.__wbg_ptr, handle, events);\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 {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} threshold\n */\n coSetContactForceEventThreshold(handle, threshold) {\n wasm.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr, handle, threshold);\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 {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 */\n constructor() {\n const ret = wasm.rawcolliderset_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * @returns {number}\n */\n len() {\n const ret = wasm.rawcolliderset_len(this.__wbg_ptr);\n return ret >>> 0;\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 {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, 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, hasParent, parent, bodies.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r2 = getFloat64Memory0()[retptr / 8 + 1];\n return r0 === 0 ? undefined : r2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 /**\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 * 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/**\n*/\nexport class RawContactForceEvent {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawContactForceEvent.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcontactforceevent_free(ptr);\n }\n /**\n * The first collider involved in the contact.\n * @returns {number}\n */\n collider1() {\n const ret = wasm.rawcharactercollision_handle(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 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 /**\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/**\n*/\nexport class RawContactManifold {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawContactManifold.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcontactmanifold_free(ptr);\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 {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 {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 /**\n * @returns {number}\n */\n num_contacts() {\n const ret = wasm.rawcontactmanifold_num_contacts(this.__wbg_ptr);\n return ret >>> 0;\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_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 {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 {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 {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_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 {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/**\n*/\nexport class RawContactPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawContactPair.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawcontactpair_free(ptr);\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 * @returns {number}\n */\n numContactManifolds() {\n const ret = wasm.rawcontactpair_numContactManifolds(this.__wbg_ptr);\n return ret >>> 0;\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/**\n*/\nexport class RawDebugRenderPipeline {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawdebugrenderpipeline_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawdebugrenderpipeline_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * @returns {Float32Array}\n */\n vertices() {\n const ret = wasm.rawdebugrenderpipeline_vertices(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * @returns {Float32Array}\n */\n colors() {\n const ret = wasm.rawdebugrenderpipeline_colors(this.__wbg_ptr);\n return takeObject(ret);\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 */\n render(bodies, colliders, impulse_joints, multibody_joints, narrow_phase) {\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);\n }\n}\n/**\n*/\nexport class RawDeserializedWorld {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawDeserializedWorld.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawdeserializedworld_free(ptr);\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 {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 {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 {RawNarrowPhase | undefined}\n */\n takeNarrowPhase() {\n const ret = wasm.rawdeserializedworld_takeNarrowPhase(this.__wbg_ptr);\n return ret === 0 ? undefined : RawNarrowPhase.__wrap(ret);\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 {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 {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 {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/**\n*/\nexport class RawDynamicRayCastVehicleController {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawdynamicraycastvehiclecontroller_free(ptr);\n }\n /**\n * @param {number} chassis\n */\n constructor(chassis) {\n const ret = wasm.rawdynamicraycastvehiclecontroller_new(chassis);\n this.__wbg_ptr = ret >>> 0;\n return this;\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 chassis() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_chassis(this.__wbg_ptr);\n return ret;\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} axis\n */\n set_index_up_axis(axis) {\n wasm.rawdynamicraycastvehiclecontroller_set_index_up_axis(this.__wbg_ptr, axis);\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 * @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 {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 num_wheels() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_num_wheels(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} dt\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawQueryPipeline} queries\n * @param {number} filter_flags\n * @param {number | undefined} filter_groups\n * @param {Function} filter_predicate\n */\n update_vehicle(dt, bodies, colliders, queries, filter_flags, filter_groups, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(queries, RawQueryPipeline);\n wasm.rawdynamicraycastvehiclecontroller_update_vehicle(this.__wbg_ptr, dt, bodies.__wbg_ptr, colliders.__wbg_ptr, queries.__wbg_ptr, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n }\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 * @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 * @returns {number | undefined}\n */\n wheel_suspension_rest_length(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_rest_length(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_max_suspension_travel(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_max_suspension_travel(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_radius(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_radius(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_suspension_stiffness(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_stiffness(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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} i\n * @returns {number | undefined}\n */\n wheel_suspension_compression(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_compression(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_suspension_relaxation(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_relaxation(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_max_suspension_force(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_max_suspension_force(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_brake(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_brake(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_steering(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_steering(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_engine_force(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_engine_force(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @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 * @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 * @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 * @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 * @returns {number | undefined}\n */\n wheel_friction_slip(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_friction_slip(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_side_friction_stiffness(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_side_friction_stiffness(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 * @returns {number | undefined}\n */\n wheel_rotation(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_rotation(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_forward_impulse(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_forward_impulse(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_side_impulse(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_side_impulse(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} i\n * @returns {number | undefined}\n */\n wheel_suspension_force(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_force(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 {number | undefined}\n */\n wheel_suspension_length(i) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawdynamicraycastvehiclecontroller_wheel_suspension_length(retptr, this.__wbg_ptr, i);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\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_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 = getInt32Memory0()[retptr / 4 + 0];\n var r2 = getFloat64Memory0()[retptr / 8 + 1];\n return r0 === 0 ? undefined : r2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n/**\n* A structure responsible for collecting events generated\n* by the physics engine.\n*/\nexport class RawEventQueue {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_raweventqueue_free(ptr);\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 return this;\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 * Removes all events contained by this collector.\n */\n clear() {\n wasm.raweventqueue_clear(this.__wbg_ptr);\n }\n}\n/**\n*/\nexport class RawGenericJoint {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawGenericJoint.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawgenericjoint_free(ptr);\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 * @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 /**\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 * 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 * 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 * 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/**\n*/\nexport class RawImpulseJointSet {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawImpulseJointSet.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawimpulsejointset_free(ptr);\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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * @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} 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 * @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} 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 */\n constructor() {\n const ret = wasm.rawimpulsejointset_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\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 * @param {number} handle\n * @param {boolean} wakeUp\n */\n remove(handle, wakeUp) {\n wasm.rawimpulsejointset_remove(this.__wbg_ptr, handle, wakeUp);\n }\n /**\n * @returns {number}\n */\n len() {\n const ret = wasm.rawimpulsejointset_len(this.__wbg_ptr);\n return ret >>> 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 * 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 * 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/**\n*/\nexport class RawIntegrationParameters {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawIntegrationParameters.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawintegrationparameters_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawintegrationparameters_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\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 erp() {\n const ret = wasm.rawintegrationparameters_erp(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n get allowedLinearError() {\n const ret = wasm.rawcontactforceevent_total_force_magnitude(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n get predictionDistance() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_current_vehicle_speed(this.__wbg_ptr);\n return ret;\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 * @returns {number}\n */\n get numAdditionalFrictionIterations() {\n const ret = wasm.rawintegrationparameters_numAdditionalFrictionIterations(this.__wbg_ptr);\n return ret >>> 0;\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 minIslandSize() {\n const ret = wasm.rawdynamicraycastvehiclecontroller_index_up_axis(this.__wbg_ptr);\n return ret >>> 0;\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 * @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 erp(value) {\n wasm.rawintegrationparameters_set_erp(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set allowedLinearError(value) {\n wasm.rawintegrationparameters_set_allowedLinearError(this.__wbg_ptr, value);\n }\n /**\n * @param {number} value\n */\n set predictionDistance(value) {\n wasm.rawintegrationparameters_set_predictionDistance(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 /**\n * @param {number} value\n */\n set numAdditionalFrictionIterations(value) {\n wasm.rawintegrationparameters_set_numAdditionalFrictionIterations(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 minIslandSize(value) {\n wasm.rawdynamicraycastvehiclecontroller_set_index_up_axis(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 */\n switchToStandardPgsSolver() {\n wasm.rawintegrationparameters_switchToStandardPgsSolver(this.__wbg_ptr);\n }\n /**\n */\n switchToSmallStepsPgsSolver() {\n wasm.rawintegrationparameters_switchToSmallStepsPgsSolver(this.__wbg_ptr);\n }\n}\n/**\n*/\nexport class RawIslandManager {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawIslandManager.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawislandmanager_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawislandmanager_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\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}\n/**\n*/\nexport class RawKinematicCharacterController {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawkinematiccharactercontroller_free(ptr);\n }\n /**\n * @param {number} offset\n */\n constructor(offset) {\n const ret = wasm.rawkinematiccharactercontroller_new(offset);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * @returns {RawVector}\n */\n up() {\n const ret = wasm.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);\n return RawVector.__wrap(ret);\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 {number}\n */\n offset() {\n const ret = wasm.rawintegrationparameters_dt(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} value\n */\n setOffset(value) {\n wasm.rawkinematiccharactercontroller_setOffset(this.__wbg_ptr, value);\n }\n /**\n * @returns {boolean}\n */\n slideEnabled() {\n const ret = wasm.rawkinematiccharactercontroller_slideEnabled(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {boolean} enabled\n */\n setSlideEnabled(enabled) {\n wasm.rawkinematiccharactercontroller_setSlideEnabled(this.__wbg_ptr, enabled);\n }\n /**\n * @returns {number | undefined}\n */\n autostepMaxHeight() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawkinematiccharactercontroller_autostepMaxHeight(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @returns {number | undefined}\n */\n autostepMinWidth() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawkinematiccharactercontroller_autostepMinWidth(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\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 {boolean}\n */\n autostepEnabled() {\n const ret = wasm.rawkinematiccharactercontroller_autostepEnabled(this.__wbg_ptr);\n return ret !== 0;\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 */\n disableAutostep() {\n wasm.rawkinematiccharactercontroller_disableAutostep(this.__wbg_ptr);\n }\n /**\n * @returns {number}\n */\n maxSlopeClimbAngle() {\n const ret = wasm.rawkinematiccharactercontroller_maxSlopeClimbAngle(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 * @returns {number}\n */\n minSlopeSlideAngle() {\n const ret = wasm.rawkinematiccharactercontroller_minSlopeSlideAngle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} angle\n */\n setMinSlopeSlideAngle(angle) {\n wasm.rawkinematiccharactercontroller_setMinSlopeSlideAngle(this.__wbg_ptr, angle);\n }\n /**\n * @returns {number | undefined}\n */\n snapToGroundDistance() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawkinematiccharactercontroller_snapToGroundDistance(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getFloat32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {number} distance\n */\n enableSnapToGround(distance) {\n wasm.rawkinematiccharactercontroller_enableSnapToGround(this.__wbg_ptr, distance);\n }\n /**\n */\n disableSnapToGround() {\n wasm.rawkinematiccharactercontroller_disableSnapToGround(this.__wbg_ptr);\n }\n /**\n * @returns {boolean}\n */\n snapToGroundEnabled() {\n const ret = wasm.rawkinematiccharactercontroller_snapToGroundEnabled(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {number} dt\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawQueryPipeline} queries\n * @param {number} collider_handle\n * @param {RawVector} desired_translation_delta\n * @param {boolean} apply_impulses_to_dynamic_bodies\n * @param {number | undefined} character_mass\n * @param {number} filter_flags\n * @param {number | undefined} filter_groups\n * @param {Function} filter_predicate\n */\n computeColliderMovement(dt, bodies, colliders, queries, collider_handle, desired_translation_delta, apply_impulses_to_dynamic_bodies, character_mass, filter_flags, filter_groups, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(queries, RawQueryPipeline);\n _assertClass(desired_translation_delta, RawVector);\n wasm.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, dt, bodies.__wbg_ptr, colliders.__wbg_ptr, queries.__wbg_ptr, collider_handle, desired_translation_delta.__wbg_ptr, apply_impulses_to_dynamic_bodies, !isLikeNone(character_mass), isLikeNone(character_mass) ? 0 : character_mass, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, addBorrowedObject(filter_predicate));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\n * @returns {RawVector}\n */\n computedMovement() {\n const ret = wasm.rawkinematiccharactercontroller_computedMovement(this.__wbg_ptr);\n return RawVector.__wrap(ret);\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 {number}\n */\n numComputedCollisions() {\n const ret = wasm.rawkinematiccharactercontroller_numComputedCollisions(this.__wbg_ptr);\n return ret >>> 0;\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/**\n*/\nexport class RawMultibodyJointSet {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawMultibodyJointSet.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawmultibodyjointset_free(ptr);\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 /**\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 * 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 * 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 * 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 * 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 * 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 */\n constructor() {\n const ret = wasm.rawmultibodyjointset_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\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 * @param {number} handle\n * @param {boolean} wakeUp\n */\n remove(handle, wakeUp) {\n wasm.rawmultibodyjointset_remove(this.__wbg_ptr, handle, wakeUp);\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 * 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 * 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/**\n*/\nexport class RawNarrowPhase {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawNarrowPhase.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawnarrowphase_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawnarrowphase_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\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 {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 intersection_pairs_with(handle1, f) {\n wasm.rawnarrowphase_intersection_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/**\n*/\nexport class RawPhysicsPipeline {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawphysicspipeline_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawphysicspipeline_new();\n this.__wbg_ptr = ret >>> 0;\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} 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/**\n*/\nexport class RawPointColliderProjection {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawPointColliderProjection.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawpointcolliderprojection_free(ptr);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawpointcolliderprojection_colliderHandle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n point() {\n const ret = wasm.rawpointcolliderprojection_point(this.__wbg_ptr);\n return RawVector.__wrap(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 {RawFeatureType}\n */\n featureType() {\n const ret = wasm.rawpointcolliderprojection_featureType(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number | undefined}\n */\n featureId() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawpointcolliderprojection_featureId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1 >>> 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n/**\n*/\nexport class RawPointProjection {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawPointProjection.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawpointprojection_free(ptr);\n }\n /**\n * @returns {RawVector}\n */\n point() {\n const ret = wasm.rawpointprojection_point(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {boolean}\n */\n isInside() {\n const ret = wasm.rawpointprojection_isInside(this.__wbg_ptr);\n return ret !== 0;\n }\n}\n/**\n*/\nexport class RawQueryPipeline {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawquerypipeline_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawquerypipeline_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * @param {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n */\n update(bodies, colliders) {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n wasm.rawquerypipeline_update(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr);\n }\n /**\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 | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawRayColliderToi | undefined}\n */\n castRay(bodies, colliders, rayOrig, rayDir, maxToi, solid, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawquerypipeline_castRay(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 : RawRayColliderToi.__wrap(ret);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\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 | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawRayColliderIntersection | undefined}\n */\n castRayAndGetNormal(bodies, colliders, rayOrig, rayDir, maxToi, solid, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n const ret = wasm.rawquerypipeline_castRayAndGetNormal(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 {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 | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n */\n intersectionsWithRay(bodies, colliders, rayOrig, rayDir, maxToi, solid, callback, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(rayOrig, RawVector);\n _assertClass(rayDir, RawVector);\n wasm.rawquerypipeline_intersectionsWithRay(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, rayOrig.__wbg_ptr, rayDir.__wbg_ptr, maxToi, solid, addBorrowedObject(callback), filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 {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 | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {number | undefined}\n */\n intersectionWithShape(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(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(shape, RawShape);\n wasm.rawquerypipeline_intersectionWithShape(retptr, this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, shape.__wbg_ptr, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 = getInt32Memory0()[retptr / 4 + 0];\n var r2 = getFloat64Memory0()[retptr / 8 + 1];\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 {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} point\n * @param {boolean} solid\n * @param {number} filter_flags\n * @param {number | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawPointColliderProjection | undefined}\n */\n projectPoint(bodies, colliders, point, solid, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(point, RawVector);\n const ret = wasm.rawquerypipeline_projectPoint(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, point.__wbg_ptr, solid, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} point\n * @param {number} filter_flags\n * @param {number | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawPointColliderProjection | undefined}\n */\n projectPointAndGetFeature(bodies, colliders, point, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(point, RawVector);\n const ret = wasm.rawquerypipeline_projectPointAndGetFeature(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, point.__wbg_ptr, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 {RawRigidBodySet} bodies\n * @param {RawColliderSet} colliders\n * @param {RawVector} point\n * @param {Function} callback\n * @param {number} filter_flags\n * @param {number | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n */\n intersectionsWithPoint(bodies, colliders, point, callback, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(point, RawVector);\n wasm.rawquerypipeline_intersectionsWithPoint(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, point.__wbg_ptr, addBorrowedObject(callback), filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 {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} maxToi\n * @param {boolean} stop_at_penetration\n * @param {number} filter_flags\n * @param {number | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n * @returns {RawShapeColliderTOI | undefined}\n */\n castShape(bodies, colliders, shapePos, shapeRot, shapeVel, shape, maxToi, stop_at_penetration, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\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.rawquerypipeline_castShape(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, shapeVel.__wbg_ptr, shape.__wbg_ptr, maxToi, stop_at_penetration, filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 : RawShapeColliderTOI.__wrap(ret);\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n /**\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 | undefined} filter_groups\n * @param {number | undefined} filter_exclude_collider\n * @param {number | undefined} filter_exclude_rigid_body\n * @param {Function} filter_predicate\n */\n intersectionsWithShape(bodies, colliders, shapePos, shapeRot, shape, callback, filter_flags, filter_groups, filter_exclude_collider, filter_exclude_rigid_body, filter_predicate) {\n try {\n _assertClass(bodies, RawRigidBodySet);\n _assertClass(colliders, RawColliderSet);\n _assertClass(shapePos, RawVector);\n _assertClass(shapeRot, RawRotation);\n _assertClass(shape, RawShape);\n wasm.rawquerypipeline_intersectionsWithShape(this.__wbg_ptr, bodies.__wbg_ptr, colliders.__wbg_ptr, shapePos.__wbg_ptr, shapeRot.__wbg_ptr, shape.__wbg_ptr, addBorrowedObject(callback), filter_flags, !isLikeNone(filter_groups), isLikeNone(filter_groups) ? 0 : filter_groups, !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 {RawVector} aabbCenter\n * @param {RawVector} aabbHalfExtents\n * @param {Function} callback\n */\n collidersWithAabbIntersectingAabb(aabbCenter, aabbHalfExtents, callback) {\n try {\n _assertClass(aabbCenter, RawVector);\n _assertClass(aabbHalfExtents, RawVector);\n wasm.rawquerypipeline_collidersWithAabbIntersectingAabb(this.__wbg_ptr, aabbCenter.__wbg_ptr, aabbHalfExtents.__wbg_ptr, addBorrowedObject(callback));\n } finally {\n heap[stack_pointer++] = undefined;\n }\n }\n}\n/**\n*/\nexport class RawRayColliderIntersection {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRayColliderIntersection.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawraycolliderintersection_free(ptr);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawpointcolliderprojection_colliderHandle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n normal() {\n const ret = wasm.rawraycolliderintersection_normal(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n toi() {\n const ret = wasm.rawraycolliderintersection_toi(this.__wbg_ptr);\n return 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 {number | undefined}\n */\n featureId() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawpointcolliderprojection_featureId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1 >>> 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n/**\n*/\nexport class RawRayColliderToi {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRayColliderToi.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawraycollidertoi_free(ptr);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawcharactercollision_handle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n toi() {\n const ret = wasm.rawraycolliderintersection_toi(this.__wbg_ptr);\n return ret;\n }\n}\n/**\n*/\nexport class RawRayIntersection {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRayIntersection.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawrayintersection_free(ptr);\n }\n /**\n * @returns {RawVector}\n */\n normal() {\n const ret = wasm.rawraycolliderintersection_normal(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n toi() {\n const ret = wasm.rawraycolliderintersection_toi(this.__wbg_ptr);\n return 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 {number | undefined}\n */\n featureId() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.rawpointcolliderprojection_featureId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n return r0 === 0 ? undefined : r1 >>> 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n/**\n*/\nexport class RawRigidBodySet {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRigidBodySet.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawrigidbodyset_free(ptr);\n }\n /**\n * The world-space translation of this rigid-body.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbTranslation(handle) {\n const ret = wasm.rawrigidbodyset_rbTranslation(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The world-space orientation of this rigid-body.\n * @param {number} handle\n * @returns {RawRotation}\n */\n rbRotation(handle) {\n const ret = wasm.rawrigidbodyset_rbRotation(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\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 * 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 * 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 * The world-space predicted 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 * @param {number} handle\n * @returns {RawVector}\n */\n rbNextTranslation(handle) {\n const ret = wasm.rawrigidbodyset_rbNextTranslation(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The world-space predicted 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 * @param {number} handle\n * @returns {RawRotation}\n */\n rbNextRotation(handle) {\n const ret = wasm.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, handle);\n return RawRotation.__wrap(ret);\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 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 * 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 * 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 * 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 * 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 * @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 * @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 * The linear velocity of this rigid-body.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbLinvel(handle) {\n const ret = wasm.rawrigidbodyset_rbLinvel(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The angular velocity of this rigid-body.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbAngvel(handle) {\n const ret = wasm.rawrigidbodyset_rbAngvel(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\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 * @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 {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} 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 * @returns {number}\n */\n rbDominanceGroup(handle) {\n const ret = wasm.rawrigidbodyset_rbDominanceGroup(this.__wbg_ptr, handle);\n return ret;\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 rbEnableCcd(handle, enabled) {\n wasm.rawrigidbodyset_rbEnableCcd(this.__wbg_ptr, handle, enabled);\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 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 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 center of mass of a rigid-body expressed in its local-space.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbLocalCom(handle) {\n const ret = wasm.rawrigidbodyset_rbLocalCom(this.__wbg_ptr, handle);\n return RawVector.__wrap(ret);\n }\n /**\n * The world-space center of mass of the rigid-body.\n * @param {number} handle\n * @returns {RawVector}\n */\n rbWorldCom(handle) {\n const ret = wasm.rawrigidbodyset_rbWorldCom(this.__wbg_ptr, handle);\n return RawVector.__wrap(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 rbInvPrincipalInertiaSqrt(handle) {\n const ret = wasm.rawrigidbodyset_rbInvPrincipalInertiaSqrt(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 * 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 square-root of 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 rbEffectiveWorldInvInertiaSqrt(handle) {\n const ret = wasm.rawrigidbodyset_rbEffectiveWorldInvInertiaSqrt(this.__wbg_ptr, handle);\n return RawSdpMatrix3.__wrap(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 * 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 * @param {number} handle\n */\n rbWakeUp(handle) {\n wasm.rawrigidbodyset_rbWakeUp(this.__wbg_ptr, handle);\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 * 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 * 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 * 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 * 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 * 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 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 * 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 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 * @param {number} handle\n * @param {number} factor\n */\n rbSetLinearDamping(handle, factor) {\n wasm.rawrigidbodyset_rbSetLinearDamping(this.__wbg_ptr, handle, factor);\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 * @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 * @returns {boolean}\n */\n rbIsEnabled(handle) {\n const ret = wasm.rawrigidbodyset_rbIsEnabled(this.__wbg_ptr, handle);\n return ret !== 0;\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 * @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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * @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 * @param {number} handle\n * @param {number} iters\n */\n rbSetAdditionalSolverIterations(handle, iters) {\n wasm.rawrigidbodyset_rbSetAdditionalSolverIterations(this.__wbg_ptr, handle, iters);\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 * 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 */\n constructor() {\n const ret = wasm.rawrigidbodyset_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\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 {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, 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, ccdEnabled, dominanceGroup, additional_solver_iterations);\n return ret;\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 /**\n * The number of rigid-bodies on this set.\n * @returns {number}\n */\n len() {\n const ret = wasm.rawcolliderset_len(this.__wbg_ptr);\n return ret >>> 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 * 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 * @param {RawColliderSet} colliders\n */\n propagateModifiedBodyPositionsToColliders(colliders) {\n _assertClass(colliders, RawColliderSet);\n wasm.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, colliders.__wbg_ptr);\n }\n}\n/**\n* A rotation quaternion.\n*/\nexport class RawRotation {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawRotation.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawrotation_free(ptr);\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 return this;\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 * 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.rawintegrationparameters_dt(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.rawraycolliderintersection_toi(this.__wbg_ptr);\n return ret;\n }\n /**\n * The `w` component of this quaternion.\n * @returns {number}\n */\n get w() {\n const ret = wasm.rawintegrationparameters_erp(this.__wbg_ptr);\n return ret;\n }\n}\n/**\n*/\nexport class RawSdpMatrix3 {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawSdpMatrix3.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawsdpmatrix3_free(ptr);\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}\n/**\n*/\nexport class RawSerializationPipeline {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawserializationpipeline_free(ptr);\n }\n /**\n */\n constructor() {\n const ret = wasm.rawserializationpipeline_new();\n this.__wbg_ptr = ret >>> 0;\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 /**\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}\n/**\n*/\nexport class RawShape {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawShape.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawshape_free(ptr);\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} 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} 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 {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} 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 {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 {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 {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 {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} vertices\n * @param {Uint32Array} indices\n * @returns {RawShape}\n */\n static polyline(vertices, indices) {\n const ptr0 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_malloc);\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 {Float32Array} vertices\n * @param {Uint32Array} indices\n * @returns {RawShape}\n */\n static trimesh(vertices, indices) {\n const ptr0 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.rawshape_trimesh(ptr0, len0, ptr1, len1);\n return RawShape.__wrap(ret);\n }\n /**\n * @param {number} nrows\n * @param {number} ncols\n * @param {Float32Array} heights\n * @param {RawVector} scale\n * @returns {RawShape}\n */\n static heightfield(nrows, ncols, heights, scale) {\n const ptr0 = passArrayF32ToWasm0(heights, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(scale, RawVector);\n const ret = wasm.rawshape_heightfield(nrows, ncols, ptr0, len0, scale.__wbg_ptr);\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 {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 {Float32Array} points\n * @returns {RawShape | undefined}\n */\n static convexHull(points) {\n const ptr0 = passArrayF32ToWasm0(points, wasm.__wbindgen_malloc);\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} points\n * @param {number} borderRadius\n * @returns {RawShape | undefined}\n */\n static roundConvexHull(points, borderRadius) {\n const ptr0 = passArrayF32ToWasm0(points, wasm.__wbindgen_malloc);\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 * @returns {RawShape | undefined}\n */\n static convexMesh(vertices, indices) {\n const ptr0 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_malloc);\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 {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_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_malloc);\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 {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} maxToi\n * @param {boolean} stop_at_penetration\n * @returns {RawShapeTOI | undefined}\n */\n castShape(shapePos1, shapeRot1, shapeVel1, shape2, shapePos2, shapeRot2, shapeVel2, 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, maxToi, stop_at_penetration);\n return ret === 0 ? undefined : RawShapeTOI.__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 * @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 {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 {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 {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} 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/**\n*/\nexport class RawShapeColliderTOI {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawShapeColliderTOI.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawshapecollidertoi_free(ptr);\n }\n /**\n * @returns {number}\n */\n colliderHandle() {\n const ret = wasm.rawcharactercollision_handle(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n toi() {\n const ret = wasm.rawraycolliderintersection_toi(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n witness1() {\n const ret = wasm.rawraycolliderintersection_normal(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n witness2() {\n const ret = wasm.rawshapecollidertoi_witness2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal1() {\n const ret = wasm.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal2() {\n const ret = wasm.rawcharactercollision_translationDeltaRemaining(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\n/**\n*/\nexport class RawShapeContact {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawShapeContact.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawshapecontact_free(ptr);\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 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.rawraycolliderintersection_normal(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal1() {\n const ret = wasm.rawshapecollidertoi_witness2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal2() {\n const ret = wasm.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\n/**\n*/\nexport class RawShapeTOI {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawShapeTOI.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawshapetoi_free(ptr);\n }\n /**\n * @returns {number}\n */\n toi() {\n const ret = wasm.rawrotation_x(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {RawVector}\n */\n witness1() {\n const ret = wasm.rawshapetoi_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 /**\n * @returns {RawVector}\n */\n normal1() {\n const ret = wasm.rawshapetoi_normal1(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n /**\n * @returns {RawVector}\n */\n normal2() {\n const ret = wasm.rawshapetoi_normal2(this.__wbg_ptr);\n return RawVector.__wrap(ret);\n }\n}\n/**\n* A vector.\n*/\nexport class RawVector {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RawVector.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_rawvector_free(ptr);\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 * 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 return this;\n }\n /**\n * The `x` component of this vector.\n * @returns {number}\n */\n get x() {\n const ret = wasm.rawrotation_x(this.__wbg_ptr);\n return ret;\n }\n /**\n * Sets the `x` component of this vector.\n * @param {number} x\n */\n set x(x) {\n wasm.rawvector_set_x(this.__wbg_ptr, x);\n }\n /**\n * The `y` component of this vector.\n * @returns {number}\n */\n get y() {\n const ret = wasm.rawintegrationparameters_dt(this.__wbg_ptr);\n return ret;\n }\n /**\n * Sets the `y` component of this vector.\n * @param {number} y\n */\n set y(y) {\n wasm.rawintegrationparameters_set_dt(this.__wbg_ptr, y);\n }\n /**\n * The `z` component of this vector.\n * @returns {number}\n */\n get z() {\n const ret = wasm.rawraycolliderintersection_toi(this.__wbg_ptr);\n return ret;\n }\n /**\n * Sets the `z` component of this vector.\n * @param {number} z\n */\n set z(z) {\n wasm.rawvector_set_z(this.__wbg_ptr, z);\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.rawvector_xyz(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, 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 `{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 `{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 * 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 * 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}\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\n } catch (e) {\n if (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 {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_boolean_get = function(arg0) {\n const v = getObject(arg0);\n const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;\n return ret;\n };\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbindgen_number_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;\n getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);\n };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_rawraycolliderintersection_new = function(arg0) {\n const ret = RawRayColliderIntersection.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_rawcontactforceevent_new = function(arg0) {\n const ret = RawContactForceEvent.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_call_4c92f6aec1e1d6e6 = function() { return handleError(function (arg0, arg1, arg2, arg3) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_call_776890ca77946e2f = 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 imports.wbg.__wbg_bind_60a9a80cada2f33c = function(arg0, arg1, arg2, arg3) {\n const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_69193e31c844b792 = function(arg0, arg1, arg2) {\n const ret = new Float32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_6146c51d49a2c0df = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_length_d7327c75a759af37 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_newwithlength_68d29ab115d0099c = function(arg0) {\n const ret = new Float32Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedFloat32Memory0 = null;\n cachedFloat64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint32Memory0 = null;\n cachedUint8Memory0 = null;\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input) {\n if (wasm !== undefined) return wasm;\n\n if (typeof input === 'undefined') {\n input = new URL('rapier_wasm3d_bg.wasm', \"<deleted>\");\n }\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync }\nexport default __wbg_init;\n","import {RawVector, RawRotation} from \"./raw\";\n// #if DIM3\nimport {RawSdpMatrix3} from \"./raw\";\n// #endif\n\n\n// #if DIM3\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 // FIXME: type ram: RawVector?\n public static fromRaw(raw: RawVector): Vector {\n if (!raw) return null;\n\n let res = VectorOps.new(raw.x, raw.y, raw.z);\n raw.free();\n return res;\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\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): Rotation {\n if (!raw) return null;\n\n let res = new Quaternion(raw.x, raw.y, raw.z, raw.w);\n raw.free();\n return res;\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\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\n// #endif\n","import {RawRigidBodySet, RawRigidBodyType} from \"../raw\";\nimport {Rotation, RotationOps, Vector, VectorOps} from \"../math\";\n// #if DIM3\nimport {SdpMatrix3, SdpMatrix3Ops} from \"../math\";\n// #endif\nimport {Collider, ColliderSet} from \"../geometry\";\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\n /**\n * An arbitrary user-defined object associated with this rigid-body.\n */\n public userData?: unknown;\n\n constructor(\n rawSet: RawRigidBodySet,\n colliderSet: ColliderSet,\n handle: RigidBodyHandle,\n ) {\n this.rawSet = rawSet;\n this.colliderSet = colliderSet;\n this.handle = handle;\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 // #if DIM3\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(\n this.handle,\n enableX,\n enableY,\n enableZ,\n wakeUp,\n );\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(\n this.handle,\n enableX,\n enableY,\n enableZ,\n wakeUp,\n );\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 // #endif\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 * The world-space translation of this rigid-body.\n */\n public translation(): Vector {\n let res = this.rawSet.rbTranslation(this.handle);\n return VectorOps.fromRaw(res);\n }\n\n /**\n * The world-space orientation of this rigid-body.\n */\n public rotation(): Rotation {\n let res = this.rawSet.rbRotation(this.handle);\n return RotationOps.fromRaw(res);\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 public nextTranslation(): Vector {\n let res = this.rawSet.rbNextTranslation(this.handle);\n return VectorOps.fromRaw(res);\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 public nextRotation(): Rotation {\n let res = this.rawSet.rbNextRotation(this.handle);\n return RotationOps.fromRaw(res);\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 // #if DIM3\n this.rawSet.rbSetTranslation(this.handle, tra.x, tra.y, tra.z, wakeUp);\n // #endif\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 // #if DIM3\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(\n this.handle,\n rot.x,\n rot.y,\n rot.z,\n rot.w,\n wakeUp,\n );\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 // #endif\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 // #if DIM3\n this.rawSet.rbSetNextKinematicTranslation(this.handle, t.x, t.y, t.z);\n // #endif\n }\n\n // #if DIM3\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(\n this.handle,\n rot.x,\n rot.y,\n rot.z,\n rot.w,\n );\n }\n\n // #endif\n\n\n /**\n * The linear velocity of this rigid-body.\n */\n public linvel(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbLinvel(this.handle));\n }\n\n // #if DIM3\n /**\n * The angular velocity of this rigid-body.\n */\n public angvel(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbAngvel(this.handle));\n }\n\n // #endif\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 public localCom(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbLocalCom(this.handle));\n }\n\n /**\n * The world-space center of mass of the rigid-body.\n */\n public worldCom(): Vector {\n return VectorOps.fromRaw(this.rawSet.rbWorldCom(this.handle));\n }\n\n\n // #if DIM3\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 invPrincipalInertiaSqrt(): Vector {\n return VectorOps.fromRaw(\n this.rawSet.rbInvPrincipalInertiaSqrt(this.handle),\n );\n }\n // #endif\n\n\n // #if DIM3\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 // #endif\n\n // #if DIM3\n /**\n * The principal vectors of the local angular inertia tensor of the rigid-body.\n */\n public principalInertiaLocalFrame(): Rotation {\n return RotationOps.fromRaw(\n this.rawSet.rbPrincipalInertiaLocalFrame(this.handle),\n );\n }\n // #endif\n\n\n // #if DIM3\n /**\n * The square-root of the world-space inverse angular inertia tensor of the rigid-body,\n * taking into account rotation locking.\n */\n public effectiveWorldInvInertiaSqrt(): SdpMatrix3 {\n return SdpMatrix3Ops.fromRaw(\n this.rawSet.rbEffectiveWorldInvInertiaSqrt(this.handle),\n );\n }\n // #endif\n\n\n // #if DIM3\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(\n this.rawSet.rbEffectiveAngularInertia(this.handle),\n );\n }\n // #endif\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(\n this.handle,\n type as number as RawRigidBodyType,\n wakeUp,\n );\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(\n this.handle,\n this.colliderSet.raw,\n );\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 // #if DIM3\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 // #endif\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 // #if DIM3\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 // #endif\n\n\n // #if DIM3\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 // #endif\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(\n impulse: Vector,\n point: Vector,\n wakeUp: boolean,\n ) {\n const rawImpulse = VectorOps.intoRaw(impulse);\n const rawPoint = VectorOps.intoRaw(point);\n this.rawSet.rbApplyImpulseAtPoint(\n this.handle,\n rawImpulse,\n rawPoint,\n wakeUp,\n );\n rawImpulse.free();\n rawPoint.free();\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 // #if DIM3\n angvel: Vector;\n principalAngularInertia: Vector;\n angularInertiaLocalFrame: Rotation;\n translationsEnabledZ: boolean;\n rotationsEnabledX: boolean;\n rotationsEnabledY: boolean;\n rotationsEnabledZ: boolean;\n // #endif\n linearDamping: number;\n angularDamping: number;\n status: RigidBodyType;\n canSleep: boolean;\n sleeping: boolean;\n ccdEnabled: boolean;\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 // #if DIM3\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 // #endif\n this.linearDamping = 0.0;\n this.angularDamping = 0.0;\n this.canSleep = true;\n this.sleeping = false;\n this.ccdEnabled = false;\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 // #if DIM3\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 (\n typeof x != \"number\" ||\n typeof y != \"number\" ||\n typeof z != \"number\"\n )\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 // #endif\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 // #if DIM3\n RotationOps.copy(this.rotation, rot);\n // #endif\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 // #if DIM3\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 (\n typeof x != \"number\" ||\n typeof y != \"number\" ||\n typeof z != \"number\"\n )\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(\n this.angularInertiaLocalFrame,\n angularInertiaLocalFrame,\n );\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 * 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(\n rotationsEnabledX,\n rotationsEnabledY,\n rotationsEnabledZ,\n );\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 // #endif\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 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","import {Rotation, Vector, VectorOps, RotationOps} from \"../math\";\nimport {\n RawGenericJoint,\n RawImpulseJointSet,\n RawRigidBodySet,\n RawJointAxis,\n RawJointType,\n RawMotorModel,\n} from \"../raw\";\nimport {RigidBody, RigidBodyHandle} from \"./rigid_body\";\nimport {RigidBodySet} from \"./rigid_body_set\";\n// #if DIM3\nimport {Quaternion} from \"../math\";\n// #endif\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 // #if DIM3\n Spherical,\n Generic,\n // #endif\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.X || JointAxesMask.Y\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 X = 1 << 0,\n Y = 1 << 1,\n Z = 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(\n rawSet: RawImpulseJointSet,\n bodySet: RigidBodySet,\n handle: ImpulseJointHandle,\n ) {\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 // #if DIM3\n case RawJointType.Spherical:\n return new SphericalImpulseJoint(rawSet, bodySet, handle);\n case RawJointType.Generic:\n return new GenericImpulseJoint(rawSet, bodySet, handle);\n // #endif\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 // #if DIM3\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 // #endif\n\n // #if DIM3\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 // #endif\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\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(\n this.handle,\n this.rawAxis(),\n targetVel,\n factor,\n );\n }\n\n public configureMotorPosition(\n targetPos: number,\n stiffness: number,\n damping: number,\n ) {\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.X;\n }\n}\n\nexport class RevoluteImpulseJoint extends UnitImpulseJoint {\n public rawAxis(): RawJointAxis {\n return RawJointAxis.AngX;\n }\n}\n\n// #if DIM3\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// #endif\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(\n length: 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 = length;\n res.jointType = JointType.Rope;\n return res;\n }\n\n\n // #if DIM3\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(\n anchor1: Vector,\n anchor2: Vector,\n axis: Vector,\n ): 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(\n anchor1: Vector,\n anchor2: Vector,\n axis: Vector,\n ): 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 // #endif\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\n // #if DIM3\n result = RawGenericJoint.prismatic(\n rawA1,\n rawA2,\n rawAx,\n limitsEnabled,\n limitsMin,\n limitsMax,\n );\n // #endif\n\n rawAx.free();\n break;\n // #if DIM3\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(\n rawA1,\n rawA2,\n rawAx,\n rawAxesMask,\n );\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 // #endif\n }\n\n rawA1.free();\n rawA2.free();\n\n return result;\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","\n// #if DIM3\nexport enum FeatureType {\n Vertex,\n Edge,\n Face,\n Unknown,\n}\n// #endif\n","import {Vector, VectorOps, Rotation, RotationOps} from \"../math\";\nimport {RawColliderSet, RawShape, RawShapeType} from \"../raw\";\nimport {ShapeContact} from \"./contact\";\nimport {PointProjection} from \"./point\";\nimport {Ray, RayIntersection} from \"./ray\";\nimport {ShapeTOI} from \"./toi\";\nimport {ColliderHandle} from \"./collider\";\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(\n rawSet: RawColliderSet,\n handle: ColliderHandle,\n ): 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 // #if DIM3\n return new Cuboid(extents.x, extents.y, extents.z);\n // #endif\n\n case RawShapeType.RoundCuboid:\n extents = rawSet.coHalfExtents(handle);\n borderRadius = rawSet.coRoundRadius(handle);\n\n\n // #if DIM3\n return new RoundCuboid(\n extents.x,\n extents.y,\n extents.z,\n borderRadius,\n );\n // #endif\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\n // #if DIM3\n return new Segment(\n VectorOps.new(vs[0], vs[1], vs[2]),\n VectorOps.new(vs[3], vs[4], vs[5]),\n );\n // #endif\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\n // #if DIM3\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 // #endif\n\n case RawShapeType.RoundTriangle:\n vs = rawSet.coVertices(handle);\n borderRadius = rawSet.coRoundRadius(handle);\n\n\n // #if DIM3\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 // #endif\n\n case RawShapeType.HalfSpace:\n normal = VectorOps.fromRaw(rawSet.coHalfspaceNormal(handle));\n return new HalfSpace(normal);\n\n case RawShapeType.TriMesh:\n vs = rawSet.coVertices(handle);\n indices = rawSet.coIndices(handle);\n return new TriMesh(vs, indices);\n\n case RawShapeType.HeightField:\n const scale = rawSet.coHeightfieldScale(handle);\n const heights = rawSet.coHeightfieldHeights(handle);\n\n\n // #if DIM3\n const nrows = rawSet.coHeightfieldNRows(handle);\n const ncols = rawSet.coHeightfieldNCols(handle);\n return new Heightfield(nrows, ncols, heights, scale);\n // #endif\n\n\n // #if DIM3\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 // #endif\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 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 exist 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 maxToi: number,\n stopAtPenetration: boolean,\n ): ShapeTOI | 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 = ShapeTOI.fromRaw(\n null,\n rawShape1.castShape(\n rawPos1,\n rawRot1,\n rawVel1,\n rawShape2,\n rawPos2,\n rawRot2,\n rawVel2,\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(\n rawPos1,\n rawRot1,\n rawShape2,\n rawPos2,\n rawRot2,\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 /**\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(\n rawPos1,\n rawRot1,\n rawShape2,\n rawPos2,\n rawRot2,\n prediction,\n ),\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(\n shapePos: Vector,\n shapeRot: Rotation,\n point: Vector,\n ): 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(\n ray: Ray,\n shapePos: Vector,\n shapeRot: Rotation,\n maxToi: number,\n ): 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(\n rawPos,\n rawRot,\n rawRayOrig,\n rawRayDir,\n maxToi,\n );\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(\n rawPos,\n rawRot,\n rawRayOrig,\n rawRayDir,\n maxToi,\n 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 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(\n rawPos,\n rawRot,\n rawRayOrig,\n rawRayDir,\n maxToi,\n solid,\n ),\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// #if DIM3\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}\n\n// #endif\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 // #if DIM3\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 // #endif\n\n public intoRaw(): RawShape {\n\n // #if DIM3\n return RawShape.cuboid(\n this.halfExtents.x,\n this.halfExtents.y,\n this.halfExtents.z,\n );\n // #endif\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 // #if DIM3\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 // #endif\n\n public intoRaw(): RawShape {\n\n // #if DIM3\n return RawShape.roundCuboid(\n this.halfExtents.x,\n this.halfExtents.y,\n this.halfExtents.z,\n this.borderRadius,\n );\n // #endif\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 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 * 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) {\n super();\n this.vertices = vertices;\n this.indices = indices;\n }\n\n public intoRaw(): RawShape {\n return RawShape.trimesh(this.vertices, this.indices);\n }\n}\n\n\n// #if DIM3\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;\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(\n this.vertices,\n this.indices,\n this.borderRadius,\n );\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 * 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 ) {\n super();\n this.nrows = nrows;\n this.ncols = ncols;\n this.heights = heights;\n this.scale = scale;\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 );\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(\n this.halfHeight,\n this.radius,\n this.borderRadius,\n );\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(\n this.halfHeight,\n this.radius,\n this.borderRadius,\n );\n }\n}\n\n// #endif\n","import {RawQueryPipeline, RawRayColliderIntersection} from \"../raw\";\nimport {\n ColliderHandle,\n ColliderSet,\n InteractionGroups,\n PointColliderProjection,\n Ray,\n RayColliderIntersection,\n RayColliderToi,\n Shape,\n ShapeColliderTOI,\n} from \"../geometry\";\nimport {IslandManager, RigidBodyHandle, RigidBodySet} from \"../dynamics\";\nimport {Rotation, RotationOps, Vector, VectorOps} from \"../math\";\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 |\n QueryFilterFlags.EXCLUDE_KINEMATIC,\n /**\n * Excludes all colliders not attached to a kinematic rigid-body.\n */\n ONLY_KINEMATIC = QueryFilterFlags.EXCLUDE_DYNAMIC |\n 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 |\n QueryFilterFlags.EXCLUDE_KINEMATIC,\n}\n\n/**\n * A pipeline for performing queries on all the colliders of a scene.\n *\n * To avoid leaking WASM resources, this MUST be freed manually with `queryPipeline.free()`\n * once you are done using it (and all the rigid-bodies it created).\n */\nexport class QueryPipeline {\n raw: RawQueryPipeline;\n\n /**\n * Release the WASM memory occupied by this query pipeline.\n */\n free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined;\n }\n\n constructor(raw?: RawQueryPipeline) {\n this.raw = raw || new RawQueryPipeline();\n }\n\n /**\n * Updates the acceleration structure of the query pipeline.\n * @param bodies - The set of rigid-bodies taking part in this pipeline.\n * @param colliders - The set of colliders taking part in this pipeline.\n */\n public update(bodies: RigidBodySet, colliders: ColliderSet) {\n this.raw.update(bodies.raw, colliders.raw);\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 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 ): RayColliderToi | null {\n let rawOrig = VectorOps.intoRaw(ray.origin);\n let rawDir = VectorOps.intoRaw(ray.dir);\n let result = RayColliderToi.fromRaw(\n colliders,\n this.raw.castRay(\n bodies.raw,\n colliders.raw,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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 bodies.raw,\n colliders.raw,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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(\n RayColliderIntersection.fromRaw(colliders, rawInter),\n );\n };\n\n this.raw.intersectionsWithRay(\n bodies.raw,\n colliders.raw,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n rawCallback,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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 bodies.raw,\n colliders.raw,\n rawPos,\n rawRot,\n rawShape,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\n );\n\n rawPos.free();\n rawRot.free();\n rawShape.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 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 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 bodies.raw,\n colliders.raw,\n rawPoint,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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 bodies.raw,\n colliders.raw,\n rawPoint,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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 bodies.raw,\n colliders.raw,\n rawPoint,\n callback,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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 exist 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 bodies: RigidBodySet,\n colliders: ColliderSet,\n shapePos: Vector,\n shapeRot: Rotation,\n shapeVel: Vector,\n shape: Shape,\n maxToi: number,\n stopAtPenetration: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: ColliderHandle,\n filterExcludeRigidBody?: RigidBodyHandle,\n filterPredicate?: (collider: ColliderHandle) => boolean,\n ): ShapeColliderTOI | 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 = ShapeColliderTOI.fromRaw(\n colliders,\n this.raw.castShape(\n bodies.raw,\n colliders.raw,\n rawPos,\n rawRot,\n rawVel,\n rawShape,\n maxToi,\n stopAtPenetration,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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 bodies.raw,\n colliders.raw,\n rawPos,\n rawRot,\n rawShape,\n callback,\n filterFlags,\n filterGroups,\n filterExcludeCollider,\n filterExcludeRigidBody,\n filterPredicate,\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 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 rawCenter,\n rawHalfExtents,\n callback,\n );\n rawCenter.free();\n rawHalfExtents.free();\n }\n}\n","import {RawContactForceEvent, RawEventQueue} from \"../raw\";\nimport {RigidBodyHandle} from \"../dynamics\";\nimport {Collider, ColliderHandle} from \"../geometry\";\nimport {Vector, VectorOps} from \"../math\";\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: (\n handle1: ColliderHandle,\n handle2: ColliderHandle,\n started: boolean,\n ) => 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","import {RawColliderSet} from \"../raw\";\nimport {Rotation, RotationOps, Vector, VectorOps} from \"../math\";\nimport {\n CoefficientCombineRule,\n RigidBody,\n RigidBodyHandle,\n RigidBodySet,\n} from \"../dynamics\";\nimport {ActiveHooks, ActiveEvents} from \"../pipeline\";\nimport {InteractionGroups} from \"./interaction_groups\";\nimport {\n Shape,\n Cuboid,\n Ball,\n ShapeType,\n Capsule,\n TriMesh,\n Polyline,\n Heightfield,\n Segment,\n Triangle,\n RoundTriangle,\n RoundCuboid,\n HalfSpace,\n // #if DIM3\n Cylinder,\n RoundCylinder,\n Cone,\n RoundCone,\n ConvexPolyhedron,\n RoundConvexPolyhedron,\n // #endif\n} from \"./shape\";\nimport {Ray, RayIntersection} from \"./ray\";\nimport {PointProjection} from \"./point\";\nimport {ShapeColliderTOI, ShapeTOI} from \"./toi\";\nimport {ShapeContact} from \"./contact\";\nimport {ColliderSet} from \"./collider_set\";\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;\n private _parent: RigidBody | null;\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 }\n\n /** @internal */\n public finalizeDeserialization(bodies: RigidBodySet) {\n if (this.handle != null) {\n this._parent = bodies.get(\n this.colliderSet.raw.coParent(this.handle),\n );\n }\n }\n\n private ensureShapeIsCached() {\n if (!this._shape)\n 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 * 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 rigid-body.\n */\n public translation(): Vector {\n return VectorOps.fromRaw(\n this.colliderSet.raw.coTranslation(this.handle),\n );\n }\n\n /**\n * The world-space orientation of this rigid-body.\n */\n public rotation(): Rotation {\n return RotationOps.fromRaw(\n this.colliderSet.raw.coRotation(this.handle),\n );\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 or not 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 * Get the physics hooks active for this collider.\n */\n public 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(\n this.handle,\n threshold,\n );\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(\n this.handle,\n activeCollisionTypes,\n );\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 // #if DIM3\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 // #endif\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 // #if DIM3\n this.colliderSet.raw.coSetTranslation(this.handle, tra.x, tra.y, tra.z);\n // #endif\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 // #if DIM3\n this.colliderSet.raw.coSetTranslationWrtParent(\n this.handle,\n tra.x,\n tra.y,\n tra.z,\n );\n // #endif\n }\n\n // #if DIM3\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(\n this.handle,\n rot.x,\n rot.y,\n rot.z,\n rot.w,\n );\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(\n this.handle,\n rot.x,\n rot.y,\n rot.z,\n rot.w,\n );\n }\n // #endif\n\n /**\n * The type of the shape of this collider.\n * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\n */\n public shapeType(): ShapeType {\n return this.colliderSet.raw.coShapeType(\n this.handle,\n ) as number as ShapeType;\n }\n\n /**\n * The half-extents of this collider if it is a cuboid shape.\n * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\n */\n public halfExtents(): Vector {\n return VectorOps.fromRaw(\n this.colliderSet.raw.coHalfExtents(this.handle),\n );\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 * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\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 * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\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 * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\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 triangle mesh, polyline, convex polygon, or convex polyhedron shape,\n * this returns the vertex buffer of said shape.\n * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\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 * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\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 * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\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 * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\n */\n public heightfieldScale(): Vector {\n let scale = this.colliderSet.raw.coHeightfieldScale(this.handle);\n return VectorOps.fromRaw(scale);\n }\n\n // #if DIM3\n /**\n * If this collider has a heightfield shape, this returns the number of\n * rows of its height matrix.\n * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\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 * @deprecated this field will be removed in the future, please access this field on `shape` member instead.\n */\n public heightfieldNCols(): number {\n return this.colliderSet.raw.coHeightfieldNCols(this.handle);\n }\n\n // #endif\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(\n this.handle,\n rawPoint,\n );\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(\n this.handle,\n rawOrig,\n rawDir,\n maxToi,\n );\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 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 exist that penetration state.\n */\n public castShape(\n collider1Vel: Vector,\n shape2: Shape,\n shape2Pos: Vector,\n shape2Rot: Rotation,\n shape2Vel: Vector,\n maxToi: number,\n stopAtPenetration: boolean,\n ): ShapeTOI | 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 = ShapeTOI.fromRaw(\n this.colliderSet,\n this.colliderSet.raw.coCastShape(\n this.handle,\n rawCollider1Vel,\n rawShape2,\n rawShape2Pos,\n rawShape2Rot,\n rawShape2Vel,\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 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 exist that penetration state.\n */\n public castCollider(\n collider1Vel: Vector,\n collider2: Collider,\n collider2Vel: Vector,\n maxToi: number,\n stopAtPenetration: boolean,\n ): ShapeColliderTOI | null {\n let rawCollider1Vel = VectorOps.intoRaw(collider1Vel);\n let rawCollider2Vel = VectorOps.intoRaw(collider2Vel);\n\n let result = ShapeColliderTOI.fromRaw(\n this.colliderSet,\n this.colliderSet.raw.coCastCollider(\n this.handle,\n rawCollider1Vel,\n collider2.handle,\n rawCollider2Vel,\n maxToi,\n stopAtPenetration,\n ),\n );\n\n rawCollider1Vel.free();\n rawCollider2Vel.free();\n\n return result;\n }\n\n public intersectsShape(\n shape2: Shape,\n shapePos2: Vector,\n shapeRot2: Rotation,\n ): 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(\n collider2: Collider,\n prediction: number,\n ): ShapeContact | null {\n let result = ShapeContact.fromRaw(\n this.colliderSet.raw.coContactCollider(\n this.handle,\n collider2.handle,\n prediction,\n ),\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(\n this.handle,\n rawOrig,\n rawDir,\n maxToi,\n solid,\n );\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(\n ray: Ray,\n maxToi: number,\n solid: boolean,\n ): 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 // #if DIM3\n principalAngularInertia: Vector;\n angularInertiaLocalFrame: Rotation;\n // #endif\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\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\n // #if DIM3\n this.principalAngularInertia = VectorOps.zeros();\n this.angularInertiaLocalFrame = RotationOps.identity();\n // #endif\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(\n vertices: Float32Array,\n indices?: Uint32Array | null,\n ): ColliderDesc {\n const shape = new Polyline(vertices, indices);\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 ): ColliderDesc {\n const shape = new TriMesh(vertices, indices);\n return new ColliderDesc(shape);\n }\n\n\n // #if DIM3\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 ): ColliderDesc {\n const shape = new Heightfield(nrows, ncols, heights, scale);\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(\n points: Float32Array,\n borderRadius: number,\n ): 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(\n vertices,\n indices,\n borderRadius,\n );\n return new ColliderDesc(shape);\n }\n\n // #endif\n\n\n // #if DIM3\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 (\n typeof x != \"number\" ||\n typeof y != \"number\" ||\n typeof z != \"number\"\n )\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 // #endif\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 // #if DIM3\n RotationOps.copy(this.rotation, rot);\n // #endif\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 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 // #if DIM3\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(\n this.angularInertiaLocalFrame,\n angularInertiaLocalFrame,\n );\n return this;\n }\n // #endif\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(\n rule: CoefficientCombineRule,\n ): 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(\n activeCollisionTypes: ActiveCollisionTypes,\n ): 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","export class Coarena<T> {\n fconv: Float64Array;\n uconv: Uint32Array;\n data: Array<T>;\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>();\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>();\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 {RawRigidBodySet, RawRigidBodyType} from \"../raw\";\nimport {Coarena} from \"../coarena\";\nimport {VectorOps, RotationOps} from \"../math\";\nimport {\n RigidBody,\n RigidBodyDesc,\n RigidBodyHandle,\n RigidBodyType,\n} from \"./rigid_body\";\nimport {ColliderSet} from \"../geometry\";\nimport {ImpulseJointSet} from \"./impulse_joint_set\";\nimport {MultibodyJointSet} from \"./multibody_joint_set\";\nimport {IslandManager} from \"./island_manager\";\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(\n colliderSet: ColliderSet,\n desc: RigidBodyDesc,\n ): 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 // #if DIM3\n let rawAv = VectorOps.intoRaw(desc.angvel);\n let rawPrincipalInertia = VectorOps.intoRaw(\n desc.principalAngularInertia,\n );\n let rawInertiaFrame = RotationOps.intoRaw(\n desc.angularInertiaLocalFrame,\n );\n // #endif\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 // #if DIM3\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 // #endif\n desc.linearDamping,\n desc.angularDamping,\n desc.status as number as RawRigidBodyType,\n desc.canSleep,\n desc.sleeping,\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 // #if DIM3\n rawAv.free();\n rawPrincipalInertia.free();\n rawInertiaFrame.free();\n // #endif\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(\n handle,\n (handle) => multibodyJoints.unmap(handle),\n );\n\n // Remove the rigid-body.\n this.raw.remove(\n handle,\n islands.raw,\n colliders.raw,\n impulseJoints.raw,\n multibodyJoints.raw,\n );\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(\n islands: IslandManager,\n f: (body: RigidBody) => void,\n ) {\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 erp(): number {\n return this.raw.erp;\n }\n\n /**\n * Amount of penetration the engine wont attempt to correct (default: `0.001m`).\n */\n get allowedLinearError(): number {\n return this.raw.allowedLinearError;\n }\n\n /**\n * The maximal distance separating two objects that will generate predictive contacts (default: `0.002`).\n */\n get predictionDistance(): number {\n return this.raw.predictionDistance;\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 addition friction resolution iteration run during the last solver sub-step (default: `4`).\n */\n get numAdditionalFrictionIterations(): number {\n return this.raw.numAdditionalFrictionIterations;\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 erp(value: number) {\n this.raw.erp = value;\n }\n\n set allowedLinearError(value: number) {\n this.raw.allowedLinearError = value;\n }\n\n set predictionDistance(value: number) {\n this.raw.predictionDistance = 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 * Sets the number of addition friction resolution iteration run during the last solver sub-step (default: `4`).\n */\n set numAdditionalFrictionIterations(value: number) {\n this.raw.numAdditionalFrictionIterations = 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 public switchToStandardPgsSolver() {\n this.raw.switchToStandardPgsSolver();\n }\n\n public switchToSmallStepsPgsSolver() {\n this.raw.switchToSmallStepsPgsSolver();\n }\n}\n","import {RawImpulseJointSet} from \"../raw\";\nimport {Coarena} from \"../coarena\";\nimport {RigidBodySet} from \"./rigid_body_set\";\nimport {\n RevoluteImpulseJoint,\n FixedImpulseJoint,\n ImpulseJoint,\n ImpulseJointHandle,\n JointData,\n JointType,\n PrismaticImpulseJoint,\n // #if DIM3\n SphericalImpulseJoint,\n // #endif\n} from \"./impulse_joint\";\nimport {IslandManager} from \"./island_manager\";\nimport {RigidBodyHandle} from \"./rigid_body\";\nimport {Collider, ColliderHandle} from \"../geometry\";\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(\n rawParams,\n parent1,\n parent2,\n wakeUp,\n );\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 {\n RawImpulseJointSet,\n RawJointAxis,\n RawJointType,\n RawMultibodyJointSet,\n} from \"../raw\";\nimport {\n FixedImpulseJoint,\n ImpulseJointHandle,\n JointType,\n MotorModel,\n PrismaticImpulseJoint,\n RevoluteImpulseJoint,\n} from \"./impulse_joint\";\n\n// #if DIM3\nimport {Quaternion} from \"../math\";\nimport {SphericalImpulseJoint} from \"./impulse_joint\";\n// #endif\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 // #if DIM3\n case RawJointType.Spherical:\n return new SphericalMultibodyJoint(rawSet, handle);\n // #endif\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 // // #if DIM3\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 // // #endif\n //\n // // #if DIM3\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 // // #endif\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\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.X;\n }\n}\n\nexport class RevoluteMultibodyJoint extends UnitMultibodyJoint {\n public rawAxis(): RawJointAxis {\n return RawJointAxis.AngX;\n }\n}\n\n// #if DIM3\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// #endif\n","import {RawMultibodyJointSet} from \"../raw\";\nimport {Coarena} from \"../coarena\";\nimport {RigidBodySet} from \"./rigid_body_set\";\nimport {\n MultibodyJoint,\n MultibodyJointHandle,\n RevoluteMultibodyJoint,\n FixedMultibodyJoint,\n PrismaticMultibodyJoint,\n // #if DIM3\n SphericalMultibodyJoint,\n // #endif\n} from \"./multibody_joint\";\nimport {ImpulseJointHandle, JointData, JointType} from \"./impulse_joint\";\nimport {IslandManager} from \"./island_manager\";\nimport {ColliderHandle} from \"../geometry\";\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(\n rawParams,\n parent1,\n parent2,\n wakeUp,\n );\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","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","import {RawBroadPhase} from \"../raw\";\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","import {RawNarrowPhase, RawContactManifold} from \"../raw\";\nimport {ColliderHandle} from \"./collider\";\nimport {Vector, VectorOps} from \"../math\";\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(\n collider1: ColliderHandle,\n f: (collider2: ColliderHandle) => void,\n ) {\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(\n collider1: ColliderHandle,\n collider2: ColliderHandle,\n ): 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(): Vector {\n return VectorOps.fromRaw(this.raw.normal());\n }\n\n public localNormal1(): Vector {\n return VectorOps.fromRaw(this.raw.local_n1());\n }\n\n public localNormal2(): Vector {\n return VectorOps.fromRaw(this.raw.local_n2());\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): Vector | null {\n return VectorOps.fromRaw(this.raw.contact_local_p1(i));\n }\n\n public localContactPoint2(i: number): Vector | null {\n return VectorOps.fromRaw(this.raw.contact_local_p2(i));\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\n // #if DIM3\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 // #endif\n\n public numSolverContacts(): number {\n return this.raw.num_solver_contacts();\n }\n\n public solverContactPoint(i: number): Vector {\n return VectorOps.fromRaw(this.raw.solver_contact_point(i));\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): Vector {\n return VectorOps.fromRaw(this.raw.solver_contact_tangent_velocity(i));\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(\n dist: number,\n point1: Vector,\n point2: Vector,\n normal1: Vector,\n normal2: Vector,\n ) {\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 {\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 {Collider, ColliderHandle} from \"./collider\";\nimport {Vector, VectorOps} from \"../math\";\nimport {\n RawFeatureType,\n RawPointColliderProjection,\n RawPointProjection,\n} from \"../raw\";\nimport {FeatureType} from \"./feature\";\nimport {ColliderSet} from \"./collider_set\";\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 {\n if (!raw) return null;\n\n const result = new PointProjection(\n VectorOps.fromRaw(raw.point()),\n raw.isInside(),\n );\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 {\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 {\n RawFeatureType,\n RawRayColliderIntersection,\n RawRayColliderToi,\n RawRayIntersection,\n} from \"../raw\";\nimport {Collider} from \"./collider\";\nimport {FeatureType} from \"./feature\";\nimport {ColliderSet} from \"./collider_set\";\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 // #if DIM3\n z: this.origin.z + this.dir.z * t,\n // #endif\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 * toi`.\n */\n toi: 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 toi: number,\n normal: Vector,\n featureType?: FeatureType,\n featureId?: number,\n ) {\n this.toi = toi;\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 {\n if (!raw) return null;\n\n const result = new RayIntersection(\n raw.toi(),\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 * toi`.\n */\n toi: 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 toi: number,\n normal: Vector,\n featureType?: FeatureType,\n featureId?: number,\n ) {\n this.collider = collider;\n this.toi = toi;\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 {\n if (!raw) return null;\n\n const result = new RayColliderIntersection(\n colliderSet.get(raw.colliderHandle()),\n raw.toi(),\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 RayColliderToi {\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 * toi`.\n */\n toi: number;\n\n constructor(collider: Collider, toi: number) {\n this.collider = collider;\n this.toi = toi;\n }\n\n public static fromRaw(\n colliderSet: ColliderSet,\n raw: RawRayColliderToi,\n ): RayColliderToi {\n if (!raw) return null;\n\n const result = new RayColliderToi(\n colliderSet.get(raw.colliderHandle()),\n raw.toi(),\n );\n raw.free();\n return result;\n }\n}\n","import {Collider} from \"./collider\";\nimport {Vector, VectorOps} from \"../math\";\nimport {RawShapeTOI, RawShapeColliderTOI} from \"../raw\";\nimport {ColliderSet} from \"./collider_set\";\n\n/**\n * The intersection between a ray and a collider.\n */\nexport class ShapeTOI {\n /**\n * The time of impact of the two shapes.\n */\n toi: 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 toi: number,\n witness1: Vector,\n witness2: Vector,\n normal1: Vector,\n normal2: Vector,\n ) {\n this.toi = toi;\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,\n raw: RawShapeTOI,\n ): ShapeTOI {\n if (!raw) return null;\n\n const result = new ShapeTOI(\n raw.toi(),\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 ShapeColliderTOI extends ShapeTOI {\n /**\n * The handle of the collider hit by the ray.\n */\n collider: Collider;\n\n constructor(\n collider: Collider,\n toi: number,\n witness1: Vector,\n witness2: Vector,\n normal1: Vector,\n normal2: Vector,\n ) {\n super(toi, witness1, witness2, normal1, normal2);\n this.collider = collider;\n }\n\n public static fromRaw(\n colliderSet: ColliderSet,\n raw: RawShapeColliderTOI,\n ): ShapeColliderTOI {\n if (!raw) return null;\n\n const result = new ShapeColliderTOI(\n colliderSet.get(raw.colliderHandle()),\n raw.toi(),\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 {RawPhysicsPipeline} from \"../raw\";\nimport {Vector, VectorOps} from \"../math\";\nimport {\n IntegrationParameters,\n ImpulseJointSet,\n MultibodyJointSet,\n RigidBodyHandle,\n RigidBodySet,\n CCDSolver,\n IslandManager,\n} from \"../dynamics\";\nimport {\n BroadPhase,\n ColliderHandle,\n ColliderSet,\n NarrowPhase,\n} from \"../geometry\";\nimport {EventQueue} from \"./event_queue\";\nimport {PhysicsHooks} from \"./physics_hooks\";\n\nexport class PhysicsPipeline {\n raw: RawPhysicsPipeline;\n\n public free() {\n if (!!this.raw) {\n this.raw.free();\n }\n this.raw = undefined;\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 let rawG = VectorOps.intoRaw(gravity);\n\n if (!!eventQueue) {\n this.raw.stepWithEvents(\n rawG,\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,\n !!hooks ? hooks.filterContactPair : null,\n !!hooks ? hooks.filterIntersectionPair : null,\n );\n } else {\n this.raw.step(\n rawG,\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 rawG.free();\n }\n}\n","import {RawSerializationPipeline} from \"../raw\";\nimport {Vector, VectorOps} from \"../math\";\nimport {\n IntegrationParameters,\n IslandManager,\n ImpulseJointSet,\n MultibodyJointSet,\n RigidBodySet,\n} from \"../dynamics\";\nimport {BroadPhase, ColliderSet, NarrowPhase} from \"../geometry\";\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 `queryPipeline.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 {\n return World.fromRaw(this.raw.deserializeAll(data));\n }\n}\n","import {RawDebugRenderPipeline} from \"../raw\";\nimport {Vector, VectorOps} from \"../math\";\nimport {\n IntegrationParameters,\n IslandManager,\n ImpulseJointSet,\n MultibodyJointSet,\n RigidBodySet,\n} from \"../dynamics\";\nimport {BroadPhase, ColliderSet, NarrowPhase} from \"../geometry\";\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 ) {\n this.raw.render(\n bodies.raw,\n colliders.raw,\n impulse_joints.raw,\n multibody_joints.raw,\n narrow_phase.raw,\n );\n this.vertices = this.raw.vertices();\n this.colors = this.raw.colors();\n }\n}\n","import {RawKinematicCharacterController, RawCharacterCollision} from \"../raw\";\nimport {Rotation, Vector, VectorOps} from \"../math\";\nimport {Collider, ColliderSet, InteractionGroups, Shape} from \"../geometry\";\nimport {QueryFilterFlags, QueryPipeline, World} from \"../pipeline\";\nimport {IntegrationParameters, RigidBody, RigidBodySet} from \"../dynamics\";\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;\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 bodies: RigidBodySet;\n private colliders: ColliderSet;\n private queries: QueryPipeline;\n private _applyImpulsesToDynamicBodies: boolean;\n private _characterMass: number | null;\n\n constructor(\n offset: number,\n params: IntegrationParameters,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n queries: QueryPipeline,\n ) {\n this.params = params;\n this.bodies = bodies;\n this.colliders = colliders;\n this.queries = queries;\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 return 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 /**\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();\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();\n }\n\n /**\n * Can the character automatically step over dynamic bodies too?\n */\n public autostepIncludesDynamicBodies(): boolean | null {\n return this.raw.autostepIncludesDynamicBodies();\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(\n maxHeight: number,\n minWidth: number,\n includeDynamicBodies: boolean,\n ) {\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();\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.bodies.raw,\n this.colliders.raw,\n this.queries.raw,\n collider.handle,\n rawTranslationDelta,\n this._applyImpulsesToDynamicBodies,\n this._characterMass,\n filterFlags,\n filterGroups,\n this.colliders.castClosure(filterPredicate),\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(\n i: number,\n out?: CharacterCollision,\n ): 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(\n c.translationDeltaApplied(),\n );\n out.translationDeltaRemaining = VectorOps.fromRaw(\n c.translationDeltaRemaining(),\n );\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 {RawDynamicRayCastVehicleController} from \"../raw\";\nimport {Vector, VectorOps} from \"../math\";\nimport {Collider, ColliderSet, InteractionGroups} from \"../geometry\";\nimport {QueryFilterFlags, QueryPipeline} from \"../pipeline\";\nimport {RigidBody, RigidBodyHandle, RigidBodySet} from \"../dynamics\";\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 bodies: RigidBodySet;\n private colliders: ColliderSet;\n private queries: QueryPipeline;\n private _chassis: RigidBody;\n\n constructor(\n chassis: RigidBody,\n bodies: RigidBodySet,\n colliders: ColliderSet,\n queries: QueryPipeline,\n ) {\n this.raw = new RawDynamicRayCastVehicleController(chassis.handle);\n this.bodies = bodies;\n this.colliders = colliders;\n this.queries = queries;\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.bodies.raw,\n this.colliders.raw,\n this.queries.raw,\n filterFlags,\n filterGroups,\n this.colliders.castClosure(filterPredicate),\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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);\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 {\n RawBroadPhase,\n RawCCDSolver,\n RawColliderSet,\n RawDeserializedWorld,\n RawIntegrationParameters,\n RawIslandManager,\n RawImpulseJointSet,\n RawMultibodyJointSet,\n RawNarrowPhase,\n RawPhysicsPipeline,\n RawQueryPipeline,\n RawRigidBodySet,\n RawSerializationPipeline,\n RawDebugRenderPipeline,\n} from \"../raw\";\n\nimport {\n BroadPhase,\n Collider,\n ColliderDesc,\n ColliderHandle,\n ColliderSet,\n InteractionGroups,\n NarrowPhase,\n PointColliderProjection,\n Ray,\n RayColliderIntersection,\n RayColliderToi,\n Shape,\n ShapeColliderTOI,\n TempContactManifold,\n} from \"../geometry\";\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 {Rotation, Vector, VectorOps} from \"../math\";\nimport {PhysicsPipeline} from \"./physics_pipeline\";\nimport {QueryFilterFlags, QueryPipeline} from \"./query_pipeline\";\nimport {SerializationPipeline} from \"./serialization_pipeline\";\nimport {EventQueue} from \"./event_queue\";\nimport {PhysicsHooks} from \"./physics_hooks\";\nimport {DebugRenderBuffers, DebugRenderPipeline} from \"./debug_render_pipeline\";\nimport {KinematicCharacterController} from \"../control\";\nimport {Coarena} from \"../coarena\";\n\n// #if DIM3\nimport {DynamicRayCastVehicleController} from \"../control\";\n// #endif\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 queryPipeline: QueryPipeline;\n physicsPipeline: PhysicsPipeline;\n serializationPipeline: SerializationPipeline;\n debugRenderPipeline: DebugRenderPipeline;\n characterControllers: Set<KinematicCharacterController>;\n\n // #if DIM3\n vehicleControllers: Set<DynamicRayCastVehicleController>;\n // #endif\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.queryPipeline.free();\n this.physicsPipeline.free();\n this.serializationPipeline.free();\n this.debugRenderPipeline.free();\n this.characterControllers.forEach((controller) => controller.free());\n\n // #if DIM3\n this.vehicleControllers.forEach((controller) => controller.free());\n // #endif\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.queryPipeline = undefined;\n this.physicsPipeline = undefined;\n this.serializationPipeline = undefined;\n this.debugRenderPipeline = undefined;\n this.characterControllers = undefined;\n\n // #if DIM3\n this.vehicleControllers = undefined;\n // #endif\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 rawQueryPipeline?: RawQueryPipeline,\n rawPhysicsPipeline?: RawPhysicsPipeline,\n rawSerializationPipeline?: RawSerializationPipeline,\n rawDebugRenderPipeline?: RawDebugRenderPipeline,\n ) {\n this.gravity = gravity;\n this.integrationParameters = new IntegrationParameters(\n rawIntegrationParameters,\n );\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.queryPipeline = new QueryPipeline(rawQueryPipeline);\n this.physicsPipeline = new PhysicsPipeline(rawPhysicsPipeline);\n this.serializationPipeline = new SerializationPipeline(\n rawSerializationPipeline,\n );\n this.debugRenderPipeline = new DebugRenderPipeline(\n rawDebugRenderPipeline,\n );\n this.characterControllers = new Set<KinematicCharacterController>();\n\n // #if DIM3\n this.vehicleControllers = new Set<DynamicRayCastVehicleController>();\n // #endif\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 {\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 {\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 public debugRender(): DebugRenderBuffers {\n this.debugRenderPipeline.render(\n this.bodies,\n this.colliders,\n this.impulseJoints,\n this.multibodyJoints,\n this.narrowPhase,\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 this.queryPipeline.update(this.bodies, this.colliders);\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(\n this.colliders.raw,\n );\n }\n\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.bodies, 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 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 addition friction resolution iteration run during the last solver sub-step (default: `4`).\n */\n get numAdditionalFrictionIterations(): number {\n return this.integrationParameters.numAdditionalFrictionIterations;\n }\n\n /**\n * Sets the number of addition friction resolution iteration run during the last solver sub-step (default: `4`).\n *\n * The greater this value is, the most realistic friction will be.\n * However a greater number of iterations is more computationally intensive.\n *\n * @param niter - The new number of additional friction iterations.\n */\n set numAdditionalFrictionIterations(niter: number) {\n this.integrationParameters.numAdditionalFrictionIterations = 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 /// Configures the integration parameters to match the old PGS solver\n /// from Rapier JS version <= 0.11.\n ///\n /// This solver was slightly faster than the new one but resulted\n /// in less stable joints and worse convergence rates.\n ///\n /// This should only be used for comparison purpose or if you are\n /// experiencing problems with the new solver.\n ///\n /// NOTE: this does not affect any `RigidBody.additional_solver_iterations` that will\n /// still create solver iterations based on the new \"small-steps\" PGS solver.\n public switchToStandardPgsSolver() {\n this.integrationParameters.switchToStandardPgsSolver();\n }\n\n /// Configures the integration parameters to match the new \"small-steps\" PGS solver\n /// from Rapier version >= 0.12.\n ///\n /// The \"small-steps\" PGS solver is the default one when creating the physics world. So\n /// calling this function is generally not needed unless `World.switch_to_standard_pgs_solver`\n /// was called.\n ///\n /// This solver results in more stable joints and significantly better convergence\n /// rates but is slightly slower in its default settings.\n public switchToSmallStepsPgsSolver() {\n this.integrationParameters.switchToSmallStepsPgsSolver();\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(\n offset: number,\n ): KinematicCharacterController {\n let controller = new KinematicCharacterController(\n offset,\n this.integrationParameters,\n this.bodies,\n this.colliders,\n this.queryPipeline,\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 // #if DIM3\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(\n chassis: RigidBody,\n ): DynamicRayCastVehicleController {\n let controller = new DynamicRayCastVehicleController(\n chassis,\n this.bodies,\n this.colliders,\n this.queryPipeline,\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(\n controller: DynamicRayCastVehicleController,\n ) {\n this.vehicleControllers.delete(controller);\n controller.free();\n }\n // #endif\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(\n params,\n parent1.handle,\n parent2.handle,\n wakeUp,\n );\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 {\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 {\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 {\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 {\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(\n collider.handle,\n this.islands,\n this.bodies,\n wakeUp,\n );\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 ): RayColliderToi | null {\n return this.queryPipeline.castRay(\n this.bodies,\n this.colliders,\n ray,\n maxToi,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.castRayAndGetNormal(\n this.bodies,\n this.colliders,\n ray,\n maxToi,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.intersectionsWithRay(\n this.bodies,\n this.colliders,\n ray,\n maxToi,\n solid,\n callback,\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.intersectionWithShape(\n this.bodies,\n this.colliders,\n shapePos,\n shapeRot,\n shape,\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.projectPoint(\n this.bodies,\n this.colliders,\n point,\n solid,\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.projectPointAndGetFeature(\n this.bodies,\n this.colliders,\n point,\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.intersectionsWithPoint(\n this.bodies,\n this.colliders,\n point,\n this.colliders.castClosure(callback),\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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 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 exist 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 maxToi: number,\n stopAtPenetration: boolean,\n filterFlags?: QueryFilterFlags,\n filterGroups?: InteractionGroups,\n filterExcludeCollider?: Collider,\n filterExcludeRigidBody?: RigidBody,\n filterPredicate?: (collider: Collider) => boolean,\n ): ShapeColliderTOI | null {\n return this.queryPipeline.castShape(\n this.bodies,\n this.colliders,\n shapePos,\n shapeRot,\n shapeVel,\n shape,\n maxToi,\n stopAtPenetration,\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.intersectionsWithShape(\n this.bodies,\n this.colliders,\n shapePos,\n shapeRot,\n shape,\n this.colliders.castClosure(callback),\n filterFlags,\n filterGroups,\n filterExcludeCollider ? filterExcludeCollider.handle : null,\n filterExcludeRigidBody ? filterExcludeRigidBody.handle : null,\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.queryPipeline.collidersWithAabbIntersectingAabb(\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(\n collider1: Collider,\n f: (collider2: Collider) => void,\n ) {\n this.narrowPhase.contactPairsWith(\n collider1.handle,\n this.colliders.castClosure(f),\n );\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: Collider,\n f: (collider2: Collider) => void,\n ) {\n this.narrowPhase.intersectionPairsWith(\n collider1.handle,\n this.colliders.castClosure(f),\n );\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(\n collider1.handle,\n collider2.handle,\n );\n }\n}\n","import {RawColliderSet} from \"../raw\";\nimport {Coarena} from \"../coarena\";\nimport {RotationOps, VectorOps} from \"../math\";\nimport {Collider, ColliderDesc, ColliderHandle} from \"./collider\";\nimport {ImpulseJointHandle, IslandManager, RigidBodyHandle} from \"../dynamics\";\nimport {RigidBodySet} from \"../dynamics\";\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 return (handle) => {\n if (!!f) {\n return f(this.get(handle));\n } else {\n return undefined;\n }\n };\n }\n\n /** @internal */\n public finalizeDeserialization(bodies: RigidBodySet) {\n this.map.forEach((collider) =>\n collider.finalizeDeserialization(bodies),\n );\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 // #if DIM3\n let rawPrincipalInertia = VectorOps.intoRaw(\n desc.principalAngularInertia,\n );\n let rawInertiaFrame = RotationOps.intoRaw(\n desc.angularInertiaLocalFrame,\n );\n // #endif\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 // #if DIM3\n rawPrincipalInertia,\n rawInertiaFrame,\n // #endif\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 hasParent,\n hasParent ? parentHandle : 0,\n bodies.raw,\n );\n\n rawShape.free();\n rawTra.free();\n rawRot.free();\n rawCom.free();\n\n // #if DIM3\n rawPrincipalInertia.free();\n rawInertiaFrame.free();\n // #endif\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","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","// @ts-ignore\nimport wasmBase64 from \"../pkg3d/rapier_wasm3d_bg.wasm\";\nimport wasmInit from \"../pkg3d/rapier_wasm3d\";\nimport base64 from \"base64-js\";\n\n/**\n * Initializes RAPIER.\n * Has to be called and awaited before using any library methods.\n */\nexport async function init() {\n await wasmInit(base64.toByteArray(wasmBase64 as unknown as string).buffer);\n}\n","import {version as vers} from \"./raw\";\n\nexport function version(): string {\n return vers();\n}\n\nexport * from \"./math\";\nexport * from \"./dynamics\";\nexport * from \"./geometry\";\nexport * from \"./pipeline\";\nexport * from \"./init\";\nexport * from \"./control\";\n"],"mappings":";AAAA,IAAIA;AAEJ,IAAMC,IAAO,IAAIC,MAAM,GAAA,EAAKC,KAAAA,MAAKC;AAEjCH,EAAKI,KAAAA,QAAgB,MAAA,MAAM,KAAM;AAEjC,IAAIC,IAAYL,EAAKM;AAErB,SAASC,EAAcC,IAAAA;AACfH,QAAcL,EAAKM,UAAQN,EAAKI,KAAKJ,EAAKM,SAAS,CAAA;AACvD,QAAMG,KAAMJ;AAIZ,SAHAA,IAAYL,EAAKS,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IAAA,WAAA,IAAA,IAAA,uBAAA;AAAA,SAAA;AAAA,GAAA,UAAA,IAAA,IAAA,gBAAA;AAAA,SAAA;AAAA,GAAA,cAAA,IAAA,aAAA,IAAA,IAAA,cAAA;AAAA,SAAA;AAAA,GAAA,KAAA,IAAA,iBAAA,IAAA,yBAAA,IAAA,gBAAA,IAAA,iBAAA,IAAA,yBAAA,IAAA,UAAA,IAAA,kBAAA,IAAA,cAAA,IAAA,OAAA,IAAA,iBAAA,IAAA,uBAAA,IAAA,IAAA,eAAA;AAAA,SAAA;AAAA,GAAA,uBAAA,IAAA,YAAA,IAAA,IAAA,cAAA;AAAA,SAAA;AAAA,GAAA,IAAA,cAAA;AAAA,SAAA;AAAA,GAAA,oBAAA,IAAA,qBAAA,IAAA,IAAA,mBAAA;AAAA,SAAA;AAAA,GAAA,eAAA,IAAA,MAAA,IAAA,oBAAA,IAAA,8BAAA,IAAA,iCAAA,GAAA,CAAA;","names":["wasm","heap","Array","fill","undefined","push","heap_next","length","addHeapObject","obj","idx","getObject","takeObject","ret","isLikeNone","x","cachedFloat64Memory0","getFloat64Memory0","byteLength","Float64Array","memory","buffer","cachedInt32Memory0","getInt32Memory0","Int32Array","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","Error","cachedUint8Memory0","getStringFromWasm0","ptr","len","Uint8Array","subarray","_assertClass","instance","klass","name","cachedFloat32Memory0","getFloat32Memory0","Float32Array","stack_pointer","addBorrowedObject","getArrayF32FromWasm0","cachedUint32Memory0","getUint32Memory0","Uint32Array","WASM_VECTOR_LEN","passArrayF32ToWasm0","arg","malloc","set","passArray32ToWasm0","handleError","f","args","apply","this","e","__wbindgen_exn_store","Object","freeze","Dynamic","Fixed","KinematicPositionBased","KinematicVelocityBased","Vertex","Edge","Face","Unknown","AccelerationBased","ForceBased","RawShapeType","Ball","Cuboid","Capsule","Segment","Polyline","Triangle","TriMesh","HeightField","Compound","ConvexPolyhedron","Cylinder","Cone","RoundCuboid","RoundTriangle","RoundCylinder","RoundCone","RoundConvexPolyhedron","HalfSpace","RawJointAxis","X","Y","Z","AngX","AngY","AngZ","RawJointType","Revolute","Prismatic","Rope","Spring","Spherical","Generic","RawBroadPhase","static","create","prototype","__wbg_ptr","__destroy_into_raw","free","__wbg_rawbroadphase_free","constructor","rawbroadphase_new","RawCCDSolver","__wbg_rawccdsolver_free","rawccdsolver_new","RawCharacterCollision","__wbg_rawcharactercollision_free","rawcharactercollision_new","handle","rawcharactercollision_handle","translationDeltaApplied","rawcharactercollision_translationDeltaApplied","RawVector","__wrap","translationDeltaRemaining","rawcharactercollision_translationDeltaRemaining","toi","rawcharactercollision_toi","worldWitness1","rawcharactercollision_worldWitness1","worldWitness2","rawcharactercollision_worldWitness2","worldNormal1","rawcharactercollision_worldNormal1","worldNormal2","rawcharactercollision_worldNormal2","RawColliderSet","__wbg_rawcolliderset_free","coTranslation","rawcolliderset_coTranslation","coRotation","rawcolliderset_coRotation","RawRotation","coSetTranslation","y","z","rawcolliderset_coSetTranslation","coSetTranslationWrtParent","rawcolliderset_coSetTranslationWrtParent","coSetRotation","w","rawcolliderset_coSetRotation","coSetRotationWrtParent","rawcolliderset_coSetRotationWrtParent","coIsSensor","rawcolliderset_coIsSensor","coShapeType","rawcolliderset_coShapeType","coHalfspaceNormal","rawcolliderset_coHalfspaceNormal","coHalfExtents","rawcolliderset_coHalfExtents","coSetHalfExtents","newHalfExtents","rawcolliderset_coSetHalfExtents","coRadius","retptr","__wbindgen_add_to_stack_pointer","rawcolliderset_coRadius","r0","r1","coSetRadius","newRadius","rawcolliderset_coSetRadius","coHalfHeight","rawcolliderset_coHalfHeight","coSetHalfHeight","newHalfheight","rawcolliderset_coSetHalfHeight","coRoundRadius","rawcolliderset_coRoundRadius","coSetRoundRadius","newBorderRadius","rawcolliderset_coSetRoundRadius","coVertices","rawcolliderset_coVertices","v1","slice","__wbindgen_free","coIndices","rawcolliderset_coIndices","coHeightfieldHeights","rawcolliderset_coHeightfieldHeights","coHeightfieldScale","rawcolliderset_coHeightfieldScale","coHeightfieldNRows","rawcolliderset_coHeightfieldNRows","coHeightfieldNCols","rawcolliderset_coHeightfieldNCols","coParent","rawcolliderset_coParent","r2","coSetEnabled","enabled","rawcolliderset_coSetEnabled","coIsEnabled","rawcolliderset_coIsEnabled","coFriction","rawcolliderset_coFriction","coRestitution","rawcolliderset_coRestitution","coDensity","rawcolliderset_coDensity","coMass","rawcolliderset_coMass","coVolume","rawcolliderset_coVolume","coCollisionGroups","rawcolliderset_coCollisionGroups","coSolverGroups","rawcolliderset_coSolverGroups","coActiveHooks","rawcolliderset_coActiveHooks","coActiveCollisionTypes","rawcolliderset_coActiveCollisionTypes","coActiveEvents","rawcolliderset_coActiveEvents","coContactForceEventThreshold","rawcolliderset_coContactForceEventThreshold","coContainsPoint","point","rawcolliderset_coContainsPoint","coCastShape","colliderVel","shape2","shape2Pos","shape2Rot","shape2Vel","maxToi","stop_at_penetration","RawShape","rawcolliderset_coCastShape","RawShapeTOI","coCastCollider","collider1Vel","collider2handle","collider2Vel","max_toi","rawcolliderset_coCastCollider","RawShapeColliderTOI","coIntersectsShape","shapePos2","shapeRot2","rawcolliderset_coIntersectsShape","coContactShape","prediction","rawcolliderset_coContactShape","RawShapeContact","coContactCollider","rawcolliderset_coContactCollider","coProjectPoint","solid","rawcolliderset_coProjectPoint","RawPointProjection","coIntersectsRay","rayOrig","rayDir","rawcolliderset_coIntersectsRay","coCastRay","rawcolliderset_coCastRay","coCastRayAndGetNormal","rawcolliderset_coCastRayAndGetNormal","RawRayIntersection","coSetSensor","is_sensor","rawcolliderset_coSetSensor","coSetRestitution","restitution","rawcolliderset_coSetRestitution","coSetFriction","friction","rawcolliderset_coSetFriction","coFrictionCombineRule","rawcolliderset_coFrictionCombineRule","coSetFrictionCombineRule","rule","rawcolliderset_coSetFrictionCombineRule","coRestitutionCombineRule","rawcolliderset_coRestitutionCombineRule","coSetRestitutionCombineRule","rawcolliderset_coSetRestitutionCombineRule","coSetCollisionGroups","groups","rawcolliderset_coSetCollisionGroups","coSetSolverGroups","rawcolliderset_coSetSolverGroups","coSetActiveHooks","hooks","rawcolliderset_coSetActiveHooks","coSetActiveEvents","events","rawcolliderset_coSetActiveEvents","coSetActiveCollisionTypes","types","rawcolliderset_coSetActiveCollisionTypes","coSetShape","shape","rawcolliderset_coSetShape","coSetContactForceEventThreshold","threshold","rawcolliderset_coSetContactForceEventThreshold","coSetDensity","density","rawcolliderset_coSetDensity","coSetMass","mass","rawcolliderset_coSetMass","coSetMassProperties","centerOfMass","principalAngularInertia","angularInertiaFrame","rawcolliderset_coSetMassProperties","rawcolliderset_new","rawcolliderset_len","contains","rawcolliderset_contains","createCollider","translation","rotation","massPropsMode","frictionCombineRule","restitutionCombineRule","isSensor","collisionGroups","solverGroups","activeCollisionTypes","activeHooks","activeEvents","contactForceEventThreshold","hasParent","parent","bodies","RawRigidBodySet","rawcolliderset_createCollider","remove","islands","wakeUp","RawIslandManager","rawcolliderset_remove","isHandleValid","forEachColliderHandle","rawcolliderset_forEachColliderHandle","RawContactForceEvent","__wbg_rawcontactforceevent_free","collider1","collider2","rawcontactforceevent_collider2","total_force","rawcontactforceevent_total_force","total_force_magnitude","rawcontactforceevent_total_force_magnitude","max_force_direction","rawcontactforceevent_max_force_direction","max_force_magnitude","rawcontactforceevent_max_force_magnitude","RawContactManifold","__wbg_rawcontactmanifold_free","normal","rawcontactmanifold_normal","local_n1","rawcontactmanifold_local_n1","local_n2","rawcontactmanifold_local_n2","subshape1","rawcontactmanifold_subshape1","subshape2","rawcontactmanifold_subshape2","num_contacts","rawcontactmanifold_num_contacts","contact_local_p1","i","rawcontactmanifold_contact_local_p1","contact_local_p2","rawcontactmanifold_contact_local_p2","contact_dist","rawcontactmanifold_contact_dist","contact_fid1","rawcontactmanifold_contact_fid1","contact_fid2","rawcontactmanifold_contact_fid2","contact_impulse","rawcontactmanifold_contact_impulse","contact_tangent_impulse_x","rawcontactmanifold_contact_tangent_impulse_x","contact_tangent_impulse_y","rawcontactmanifold_contact_tangent_impulse_y","num_solver_contacts","rawcontactmanifold_num_solver_contacts","solver_contact_point","rawcontactmanifold_solver_contact_point","solver_contact_dist","rawcontactmanifold_solver_contact_dist","solver_contact_friction","rawcontactmanifold_solver_contact_friction","solver_contact_restitution","rawcontactmanifold_solver_contact_restitution","solver_contact_tangent_velocity","rawcontactmanifold_solver_contact_tangent_velocity","RawContactPair","__wbg_rawcontactpair_free","rawcontactpair_collider1","rawcontactpair_collider2","numContactManifolds","rawcontactpair_numContactManifolds","contactManifold","rawcontactpair_contactManifold","RawDebugRenderPipeline","__wbg_rawdebugrenderpipeline_free","rawdebugrenderpipeline_new","vertices","rawdebugrenderpipeline_vertices","colors","rawdebugrenderpipeline_colors","render","colliders","impulse_joints","multibody_joints","narrow_phase","RawImpulseJointSet","RawMultibodyJointSet","RawNarrowPhase","rawdebugrenderpipeline_render","RawDeserializedWorld","__wbg_rawdeserializedworld_free","takeGravity","rawdeserializedworld_takeGravity","takeIntegrationParameters","rawdeserializedworld_takeIntegrationParameters","RawIntegrationParameters","takeIslandManager","rawdeserializedworld_takeIslandManager","takeBroadPhase","rawdeserializedworld_takeBroadPhase","takeNarrowPhase","rawdeserializedworld_takeNarrowPhase","takeBodies","rawdeserializedworld_takeBodies","takeColliders","rawdeserializedworld_takeColliders","takeImpulseJoints","rawdeserializedworld_takeImpulseJoints","takeMultibodyJoints","rawdeserializedworld_takeMultibodyJoints","RawDynamicRayCastVehicleController","__wbg_rawdynamicraycastvehiclecontroller_free","chassis","rawdynamicraycastvehiclecontroller_new","current_vehicle_speed","rawdynamicraycastvehiclecontroller_current_vehicle_speed","rawdynamicraycastvehiclecontroller_chassis","index_up_axis","rawdynamicraycastvehiclecontroller_index_up_axis","set_index_up_axis","axis","rawdynamicraycastvehiclecontroller_set_index_up_axis","index_forward_axis","rawdynamicraycastvehiclecontroller_index_forward_axis","set_index_forward_axis","rawdynamicraycastvehiclecontroller_set_index_forward_axis","add_wheel","chassis_connection_cs","direction_cs","axle_cs","suspension_rest_length","radius","rawdynamicraycastvehiclecontroller_add_wheel","num_wheels","rawdynamicraycastvehiclecontroller_num_wheels","update_vehicle","dt","queries","filter_flags","filter_groups","filter_predicate","RawQueryPipeline","rawdynamicraycastvehiclecontroller_update_vehicle","wheel_chassis_connection_point_cs","rawdynamicraycastvehiclecontroller_wheel_chassis_connection_point_cs","set_wheel_chassis_connection_point_cs","value","rawdynamicraycastvehiclecontroller_set_wheel_chassis_connection_point_cs","wheel_suspension_rest_length","rawdynamicraycastvehiclecontroller_wheel_suspension_rest_length","set_wheel_suspension_rest_length","rawdynamicraycastvehiclecontroller_set_wheel_suspension_rest_length","wheel_max_suspension_travel","rawdynamicraycastvehiclecontroller_wheel_max_suspension_travel","set_wheel_max_suspension_travel","rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_travel","wheel_radius","rawdynamicraycastvehiclecontroller_wheel_radius","set_wheel_radius","rawdynamicraycastvehiclecontroller_set_wheel_radius","wheel_suspension_stiffness","rawdynamicraycastvehiclecontroller_wheel_suspension_stiffness","set_wheel_suspension_stiffness","rawdynamicraycastvehiclecontroller_set_wheel_suspension_stiffness","wheel_suspension_compression","rawdynamicraycastvehiclecontroller_wheel_suspension_compression","set_wheel_suspension_compression","rawdynamicraycastvehiclecontroller_set_wheel_suspension_compression","wheel_suspension_relaxation","rawdynamicraycastvehiclecontroller_wheel_suspension_relaxation","set_wheel_suspension_relaxation","rawdynamicraycastvehiclecontroller_set_wheel_suspension_relaxation","wheel_max_suspension_force","rawdynamicraycastvehiclecontroller_wheel_max_suspension_force","set_wheel_max_suspension_force","rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_force","wheel_brake","rawdynamicraycastvehiclecontroller_wheel_brake","set_wheel_brake","rawdynamicraycastvehiclecontroller_set_wheel_brake","wheel_steering","rawdynamicraycastvehiclecontroller_wheel_steering","set_wheel_steering","rawdynamicraycastvehiclecontroller_set_wheel_steering","wheel_engine_force","rawdynamicraycastvehiclecontroller_wheel_engine_force","set_wheel_engine_force","rawdynamicraycastvehiclecontroller_set_wheel_engine_force","wheel_direction_cs","rawdynamicraycastvehiclecontroller_wheel_direction_cs","set_wheel_direction_cs","rawdynamicraycastvehiclecontroller_set_wheel_direction_cs","wheel_axle_cs","rawdynamicraycastvehiclecontroller_wheel_axle_cs","set_wheel_axle_cs","rawdynamicraycastvehiclecontroller_set_wheel_axle_cs","wheel_friction_slip","rawdynamicraycastvehiclecontroller_wheel_friction_slip","set_wheel_friction_slip","rawdynamicraycastvehiclecontroller_set_wheel_friction_slip","wheel_side_friction_stiffness","rawdynamicraycastvehiclecontroller_wheel_side_friction_stiffness","set_wheel_side_friction_stiffness","stiffness","rawdynamicraycastvehiclecontroller_set_wheel_side_friction_stiffness","wheel_rotation","rawdynamicraycastvehiclecontroller_wheel_rotation","wheel_forward_impulse","rawdynamicraycastvehiclecontroller_wheel_forward_impulse","wheel_side_impulse","rawdynamicraycastvehiclecontroller_wheel_side_impulse","wheel_suspension_force","rawdynamicraycastvehiclecontroller_wheel_suspension_force","wheel_contact_normal_ws","rawdynamicraycastvehiclecontroller_wheel_contact_normal_ws","wheel_contact_point_ws","rawdynamicraycastvehiclecontroller_wheel_contact_point_ws","wheel_suspension_length","rawdynamicraycastvehiclecontroller_wheel_suspension_length","wheel_hard_point_ws","rawdynamicraycastvehiclecontroller_wheel_hard_point_ws","wheel_is_in_contact","rawdynamicraycastvehiclecontroller_wheel_is_in_contact","wheel_ground_object","rawdynamicraycastvehiclecontroller_wheel_ground_object","RawEventQueue","__wbg_raweventqueue_free","autoDrain","raweventqueue_new","drainCollisionEvents","raweventqueue_drainCollisionEvents","drainContactForceEvents","raweventqueue_drainContactForceEvents","clear","raweventqueue_clear","RawGenericJoint","__wbg_rawgenericjoint_free","anchor1","anchor2","lockedAxes","rawgenericjoint_generic","rest_length","damping","rawgenericjoint_spring","rawgenericjoint_rope","rawgenericjoint_spherical","limitsEnabled","limitsMin","limitsMax","rawgenericjoint_prismatic","axes1","axes2","rawgenericjoint_fixed","rawgenericjoint_revolute","__wbg_rawimpulsejointset_free","jointType","rawimpulsejointset_jointType","jointBodyHandle1","rawimpulsejointset_jointBodyHandle1","jointBodyHandle2","rawimpulsejointset_jointBodyHandle2","jointFrameX1","rawimpulsejointset_jointFrameX1","jointFrameX2","rawimpulsejointset_jointFrameX2","jointAnchor1","rawimpulsejointset_jointAnchor1","jointAnchor2","rawimpulsejointset_jointAnchor2","jointSetAnchor1","newPos","rawimpulsejointset_jointSetAnchor1","jointSetAnchor2","rawimpulsejointset_jointSetAnchor2","jointContactsEnabled","rawimpulsejointset_jointContactsEnabled","jointSetContactsEnabled","rawimpulsejointset_jointSetContactsEnabled","jointLimitsEnabled","rawimpulsejointset_jointLimitsEnabled","jointLimitsMin","rawimpulsejointset_jointLimitsMin","jointLimitsMax","rawimpulsejointset_jointLimitsMax","jointSetLimits","min","max","rawimpulsejointset_jointSetLimits","jointConfigureMotorModel","model","rawimpulsejointset_jointConfigureMotorModel","jointConfigureMotorVelocity","targetVel","factor","rawimpulsejointset_jointConfigureMotorVelocity","jointConfigureMotorPosition","targetPos","rawimpulsejointset_jointConfigureMotorPosition","jointConfigureMotor","rawimpulsejointset_jointConfigureMotor","rawimpulsejointset_new","createJoint","params","parent1","parent2","wake_up","rawimpulsejointset_createJoint","rawimpulsejointset_remove","rawimpulsejointset_len","rawimpulsejointset_contains","forEachJointHandle","rawimpulsejointset_forEachJointHandle","forEachJointAttachedToRigidBody","body","rawimpulsejointset_forEachJointAttachedToRigidBody","__wbg_rawintegrationparameters_free","rawintegrationparameters_new","rawintegrationparameters_dt","erp","rawintegrationparameters_erp","allowedLinearError","predictionDistance","numSolverIterations","rawintegrationparameters_numSolverIterations","numAdditionalFrictionIterations","rawintegrationparameters_numAdditionalFrictionIterations","numInternalPgsIterations","rawintegrationparameters_numInternalPgsIterations","minIslandSize","maxCcdSubsteps","rawintegrationparameters_set_dt","rawintegrationparameters_set_erp","rawintegrationparameters_set_allowedLinearError","rawintegrationparameters_set_predictionDistance","rawintegrationparameters_set_numSolverIterations","rawintegrationparameters_set_numAdditionalFrictionIterations","rawintegrationparameters_set_numInternalPgsIterations","switchToStandardPgsSolver","rawintegrationparameters_switchToStandardPgsSolver","switchToSmallStepsPgsSolver","rawintegrationparameters_switchToSmallStepsPgsSolver","__wbg_rawislandmanager_free","rawislandmanager_new","forEachActiveRigidBodyHandle","rawislandmanager_forEachActiveRigidBodyHandle","RawKinematicCharacterController","__wbg_rawkinematiccharactercontroller_free","offset","rawkinematiccharactercontroller_new","up","setUp","vector","rawkinematiccharactercontroller_setUp","setOffset","rawkinematiccharactercontroller_setOffset","slideEnabled","rawkinematiccharactercontroller_slideEnabled","setSlideEnabled","rawkinematiccharactercontroller_setSlideEnabled","autostepMaxHeight","rawkinematiccharactercontroller_autostepMaxHeight","autostepMinWidth","rawkinematiccharactercontroller_autostepMinWidth","autostepIncludesDynamicBodies","rawkinematiccharactercontroller_autostepIncludesDynamicBodies","autostepEnabled","rawkinematiccharactercontroller_autostepEnabled","enableAutostep","maxHeight","minWidth","includeDynamicBodies","rawkinematiccharactercontroller_enableAutostep","disableAutostep","rawkinematiccharactercontroller_disableAutostep","maxSlopeClimbAngle","rawkinematiccharactercontroller_maxSlopeClimbAngle","setMaxSlopeClimbAngle","angle","rawkinematiccharactercontroller_setMaxSlopeClimbAngle","minSlopeSlideAngle","rawkinematiccharactercontroller_minSlopeSlideAngle","setMinSlopeSlideAngle","rawkinematiccharactercontroller_setMinSlopeSlideAngle","snapToGroundDistance","rawkinematiccharactercontroller_snapToGroundDistance","enableSnapToGround","distance","rawkinematiccharactercontroller_enableSnapToGround","disableSnapToGround","rawkinematiccharactercontroller_disableSnapToGround","snapToGroundEnabled","rawkinematiccharactercontroller_snapToGroundEnabled","computeColliderMovement","collider_handle","desired_translation_delta","apply_impulses_to_dynamic_bodies","character_mass","rawkinematiccharactercontroller_computeColliderMovement","computedMovement","rawkinematiccharactercontroller_computedMovement","computedGrounded","rawkinematiccharactercontroller_computedGrounded","numComputedCollisions","rawkinematiccharactercontroller_numComputedCollisions","computedCollision","collision","rawkinematiccharactercontroller_computedCollision","__wbg_rawmultibodyjointset_free","rawmultibodyjointset_jointType","rawmultibodyjointset_jointFrameX1","rawmultibodyjointset_jointFrameX2","rawmultibodyjointset_jointAnchor1","rawmultibodyjointset_jointAnchor2","rawmultibodyjointset_jointContactsEnabled","rawmultibodyjointset_jointSetContactsEnabled","rawmultibodyjointset_jointLimitsEnabled","rawmultibodyjointset_jointLimitsMin","rawmultibodyjointset_jointLimitsMax","rawmultibodyjointset_new","rawmultibodyjointset_createJoint","rawmultibodyjointset_remove","rawmultibodyjointset_contains","rawmultibodyjointset_forEachJointHandle","rawmultibodyjointset_forEachJointAttachedToRigidBody","__wbg_rawnarrowphase_free","rawnarrowphase_new","contact_pairs_with","handle1","rawnarrowphase_contact_pairs_with","contact_pair","handle2","rawnarrowphase_contact_pair","intersection_pairs_with","rawnarrowphase_intersection_pairs_with","intersection_pair","rawnarrowphase_intersection_pair","RawPhysicsPipeline","__wbg_rawphysicspipeline_free","rawphysicspipeline_new","step","gravity","integrationParameters","broadPhase","narrowPhase","joints","articulations","ccd_solver","rawphysicspipeline_step","stepWithEvents","eventQueue","hookObject","hookFilterContactPair","hookFilterIntersectionPair","rawphysicspipeline_stepWithEvents","RawPointColliderProjection","__wbg_rawpointcolliderprojection_free","colliderHandle","rawpointcolliderprojection_colliderHandle","rawpointcolliderprojection_point","isInside","rawpointcolliderprojection_isInside","featureType","rawpointcolliderprojection_featureType","featureId","rawpointcolliderprojection_featureId","__wbg_rawpointprojection_free","rawpointprojection_point","rawpointprojection_isInside","__wbg_rawquerypipeline_free","rawquerypipeline_new","update","rawquerypipeline_update","castRay","filter_exclude_collider","filter_exclude_rigid_body","rawquerypipeline_castRay","RawRayColliderToi","castRayAndGetNormal","rawquerypipeline_castRayAndGetNormal","RawRayColliderIntersection","intersectionsWithRay","callback","rawquerypipeline_intersectionsWithRay","intersectionWithShape","shapePos","shapeRot","rawquerypipeline_intersectionWithShape","projectPoint","rawquerypipeline_projectPoint","projectPointAndGetFeature","rawquerypipeline_projectPointAndGetFeature","intersectionsWithPoint","rawquerypipeline_intersectionsWithPoint","castShape","shapeVel","rawquerypipeline_castShape","intersectionsWithShape","rawquerypipeline_intersectionsWithShape","collidersWithAabbIntersectingAabb","aabbCenter","aabbHalfExtents","rawquerypipeline_collidersWithAabbIntersectingAabb","__wbg_rawraycolliderintersection_free","rawraycolliderintersection_normal","rawraycolliderintersection_toi","__wbg_rawraycollidertoi_free","__wbg_rawrayintersection_free","__wbg_rawrigidbodyset_free","rbTranslation","rawrigidbodyset_rbTranslation","rbRotation","rawrigidbodyset_rbRotation","rbSleep","rawrigidbodyset_rbSleep","rbIsSleeping","rawrigidbodyset_rbIsSleeping","rbIsMoving","rawrigidbodyset_rbIsMoving","rbNextTranslation","rawrigidbodyset_rbNextTranslation","rbNextRotation","rawrigidbodyset_rbNextRotation","rbSetTranslation","rawrigidbodyset_rbSetTranslation","rbSetRotation","rawrigidbodyset_rbSetRotation","rbSetLinvel","linvel","rawrigidbodyset_rbSetLinvel","rbSetAngvel","angvel","rawrigidbodyset_rbSetAngvel","rbSetNextKinematicTranslation","rawrigidbodyset_rbSetNextKinematicTranslation","rbSetNextKinematicRotation","rawrigidbodyset_rbSetNextKinematicRotation","rbRecomputeMassPropertiesFromColliders","rawrigidbodyset_rbRecomputeMassPropertiesFromColliders","rbSetAdditionalMass","rawrigidbodyset_rbSetAdditionalMass","rbSetAdditionalMassProperties","rawrigidbodyset_rbSetAdditionalMassProperties","rbLinvel","rawrigidbodyset_rbLinvel","rbAngvel","rawrigidbodyset_rbAngvel","rbLockTranslations","locked","rawrigidbodyset_rbLockTranslations","rbSetEnabledTranslations","allow_x","allow_y","allow_z","rawrigidbodyset_rbSetEnabledTranslations","rbLockRotations","rawrigidbodyset_rbLockRotations","rbSetEnabledRotations","rawrigidbodyset_rbSetEnabledRotations","rbDominanceGroup","rawrigidbodyset_rbDominanceGroup","rbSetDominanceGroup","group","rawrigidbodyset_rbSetDominanceGroup","rbEnableCcd","rawrigidbodyset_rbEnableCcd","rbMass","rawrigidbodyset_rbMass","rbInvMass","rawrigidbodyset_rbInvMass","rbEffectiveInvMass","rawrigidbodyset_rbEffectiveInvMass","rbLocalCom","rawrigidbodyset_rbLocalCom","rbWorldCom","rawrigidbodyset_rbWorldCom","rbInvPrincipalInertiaSqrt","rawrigidbodyset_rbInvPrincipalInertiaSqrt","rbPrincipalInertiaLocalFrame","rawrigidbodyset_rbPrincipalInertiaLocalFrame","rbPrincipalInertia","rawrigidbodyset_rbPrincipalInertia","rbEffectiveWorldInvInertiaSqrt","rawrigidbodyset_rbEffectiveWorldInvInertiaSqrt","RawSdpMatrix3","rbEffectiveAngularInertia","rawrigidbodyset_rbEffectiveAngularInertia","rbWakeUp","rawrigidbodyset_rbWakeUp","rbIsCcdEnabled","rawrigidbodyset_rbIsCcdEnabled","rbNumColliders","rawrigidbodyset_rbNumColliders","rbCollider","at","rawrigidbodyset_rbCollider","rbBodyType","rawrigidbodyset_rbBodyType","rbSetBodyType","status","rawrigidbodyset_rbSetBodyType","rbIsFixed","rawrigidbodyset_rbIsFixed","rbIsKinematic","rawrigidbodyset_rbIsKinematic","rbIsDynamic","rawrigidbodyset_rbIsDynamic","rbLinearDamping","rawrigidbodyset_rbLinearDamping","rbAngularDamping","rawrigidbodyset_rbAngularDamping","rbSetLinearDamping","rawrigidbodyset_rbSetLinearDamping","rbSetAngularDamping","rawrigidbodyset_rbSetAngularDamping","rbSetEnabled","rawrigidbodyset_rbSetEnabled","rbIsEnabled","rawrigidbodyset_rbIsEnabled","rbGravityScale","rawrigidbodyset_rbGravityScale","rbSetGravityScale","rawrigidbodyset_rbSetGravityScale","rbResetForces","rawrigidbodyset_rbResetForces","rbResetTorques","rawrigidbodyset_rbResetTorques","rbAddForce","force","rawrigidbodyset_rbAddForce","rbApplyImpulse","impulse","rawrigidbodyset_rbApplyImpulse","rbAddTorque","torque","rawrigidbodyset_rbAddTorque","rbApplyTorqueImpulse","torque_impulse","rawrigidbodyset_rbApplyTorqueImpulse","rbAddForceAtPoint","rawrigidbodyset_rbAddForceAtPoint","rbApplyImpulseAtPoint","rawrigidbodyset_rbApplyImpulseAtPoint","rbAdditionalSolverIterations","rawrigidbodyset_rbAdditionalSolverIterations","rbSetAdditionalSolverIterations","iters","rawrigidbodyset_rbSetAdditionalSolverIterations","rbUserData","rawrigidbodyset_rbUserData","rbSetUserData","data","rawrigidbodyset_rbSetUserData","rawrigidbodyset_new","createRigidBody","gravityScale","massOnly","translationEnabledX","translationEnabledY","translationEnabledZ","rotationEnabledX","rotationEnabledY","rotationEnabledZ","linearDamping","angularDamping","rb_type","canSleep","sleeping","ccdEnabled","dominanceGroup","additional_solver_iterations","rawrigidbodyset_createRigidBody","rawrigidbodyset_remove","rawrigidbodyset_contains","forEachRigidBodyHandle","rawrigidbodyset_forEachRigidBodyHandle","propagateModifiedBodyPositionsToColliders","rawrigidbodyset_propagateModifiedBodyPositionsToColliders","__wbg_rawrotation_free","rawrotation_new","rawrotation_identity","rawrotation_x","__wbg_rawsdpmatrix3_free","elements","rawsdpmatrix3_elements","RawSerializationPipeline","__wbg_rawserializationpipeline_free","rawserializationpipeline_new","serializeAll","rawserializationpipeline_serializeAll","deserializeAll","rawserializationpipeline_deserializeAll","__wbg_rawshape_free","hx","hy","hz","rawshape_cuboid","borderRadius","rawshape_roundCuboid","rawshape_ball","rawshape_halfspace","halfHeight","rawshape_capsule","rawshape_cylinder","rawshape_roundCylinder","rawshape_cone","rawshape_roundCone","indices","ptr0","__wbindgen_malloc","len0","ptr1","len1","rawshape_polyline","rawshape_trimesh","nrows","ncols","heights","scale","rawshape_heightfield","p1","p2","rawshape_segment","p3","rawshape_triangle","rawshape_roundTriangle","points","rawshape_convexHull","rawshape_roundConvexHull","rawshape_convexMesh","rawshape_roundConvexMesh","shapePos1","shapeRot1","shapeVel1","shapeVel2","rawshape_castShape","intersectsShape","rawshape_intersectsShape","contactShape","rawshape_contactShape","containsPoint","rawshape_containsPoint","rawshape_projectPoint","intersectsRay","rawshape_intersectsRay","rawshape_castRay","rawshape_castRayAndGetNormal","__wbg_rawshapecollidertoi_free","witness1","witness2","rawshapecollidertoi_witness2","normal1","normal2","__wbg_rawshapecontact_free","point1","point2","__wbg_rawshapetoi_free","rawshapetoi_witness1","rawshapetoi_normal1","rawshapetoi_normal2","__wbg_rawvector_free","rawvector_zero","rawvector_new","rawvector_set_x","rawvector_set_z","xyz","rawvector_xyz","yxz","rawvector_yxz","zxy","rawvector_zxy","xzy","rawvector_xzy","yzx","rawvector_yzx","zyx","rawvector_zyx","async","__wbg_init","input","URL","imports","wbg","__wbindgen_number_new","arg0","__wbindgen_boolean_get","v","I","__wbindgen_object_drop_ref","__wbindgen_number_get","arg1","g","__wbindgen_is_function","__wbg_rawraycolliderintersection_new","__wbg_rawcontactforceevent_new","__wbg_call_01734de55d61e11d","arg2","call","arguments","__wbg_call_4c92f6aec1e1d6e6","arg3","__wbg_call_776890ca77946e2f","arg4","__wbg_bind_60a9a80cada2f33c","bind","__wbg_buffer_085ec1f694018c4f","__wbg_newwithbyteoffsetandlength_6da8e527659b86aa","__wbg_new_8125e318e6245eed","__wbg_set_5cf90238115182c3","__wbg_length_72e2208bbc0efc61","__wbg_newwithbyteoffsetandlength_69193e31c844b792","__wbg_set_6146c51d49a2c0df","__wbg_length_d7327c75a759af37","__wbg_newwithlength_68d29ab115d0099c","__wbindgen_throw","__wbindgen_memory","__wbg_get_imports","Request","fetch","module","Response","WebAssembly","instantiateStreaming","headers","get","console","warn","bytes","arrayBuffer","instantiate","Instance","__wbg_load","exports","__wbindgen_wasm_module","Vector3","VectorOps","new","raw","res","out","Quaternion","RotationOps","rot","SdpMatrix3","m11","m12","m21","m13","m31","m22","m23","m32","m33","SdpMatrix3Ops","sdpMatrix3","RigidBodyType","JointType","MotorModel","JointAxesMask","CoefficientCombineRule","FeatureType","ShapeType","QueryFilterFlags","ActiveEvents","ActiveHooks","SolverFlags","ActiveCollisionTypes","MassPropsMode","RigidBody","rawSet","colliderSet","finalizeDeserialization","isValid","lockTranslations","lockRotations","setEnabledTranslations","enableX","enableY","enableZ","restrictTranslations","setEnabledRotations","restrictRotations","setDominanceGroup","additionalSolverIterations","setAdditionalSolverIterations","enableCcd","fromRaw","nextTranslation","nextRotation","setTranslation","tra","setLinvel","vel","rawVel","intoRaw","setGravityScale","setRotation","setAngvel","setNextKinematicTranslation","t","setNextKinematicRotation","effectiveInvMass","invMass","localCom","worldCom","invPrincipalInertiaSqrt","principalInertia","principalInertiaLocalFrame","effectiveWorldInvInertiaSqrt","effectiveAngularInertia","sleep","isCcdEnabled","numColliders","collider","setEnabled","isEnabled","bodyType","setBodyType","type","isSleeping","isMoving","isFixed","isKinematic","isDynamic","setLinearDamping","recomputeMassPropertiesFromColliders","setAdditionalMass","setAdditionalMassProperties","angularInertiaLocalFrame","rawCom","rawPrincipalInertia","rawInertiaFrame","setAngularDamping","resetForces","resetTorques","addForce","rawForce","applyImpulse","rawImpulse","addTorque","rawTorque","applyTorqueImpulse","torqueImpulse","rawTorqueImpulse","addForceAtPoint","rawPoint","applyImpulseAtPoint","RigidBodyDesc","zeros","identity","translationsEnabledX","translationsEnabledY","translationsEnabledZ","rotationsEnabledX","rotationsEnabledY","rotationsEnabledZ","TypeError","copy","enabledTranslations","enabledRotations","setCanSleep","can","setSleeping","setCcdEnabled","setUserData","userData","Coarena","fconv","uconv","size","index","delete","forEach","elt","getAll","filter","RigidBodySet","map","rb","desc","rawTra","rawRot","rawLv","rawAv","impulseJoints","multibodyJoints","unmap","forEachJointHandleAttachedToRigidBody","forEachActiveRigidBody","IntegrationParameters","ImpulseJoint","bodySet","RevoluteImpulseJoint","PrismaticImpulseJoint","FixedImpulseJoint","SpringImpulseJoint","RopeImpulseJoint","SphericalImpulseJoint","GenericImpulseJoint","body1","body2","frameX1","frameX2","setAnchor1","setAnchor2","setContactsEnabled","contactsEnabled","UnitImpulseJoint","rawAxis","setLimits","configureMotorModel","configureMotorVelocity","configureMotorPosition","configureMotor","JointData","frame1","frame2","axesMask","rawAx","result","rawA1","rawA2","rawFra1","rawFra2","fixed","spring","rope","limits","prismatic","rawAxesMask","generic","spherical","revolute","ImpulseJointSet","newTyped","joint","rawParams","MultibodyJoint","RevoluteMultibodyJoint","PrismaticMultibodyJoint","FixedMultibodyJoint","SphericalMultibodyJoint","UnitMultibodyJoint","MultibodyJointSet","CCDSolver","IslandManager","BroadPhase","NarrowPhase","tempManifold","TempContactManifold","contactPairsWith","intersectionPairsWith","contactPair","rawPair","flipped","intersectionPair","localNormal1","localNormal2","numContacts","localContactPoint1","localContactPoint2","contactDist","contactFid1","contactFid2","contactImpulse","contactTangentImpulseX","contactTangentImpulseY","numSolverContacts","solverContactPoint","solverContactDist","solverContactFriction","solverContactRestitution","solverContactTangentVelocity","ShapeContact","dist","PointProjection","PointColliderProjection","Ray","origin","dir","pointAt","RayIntersection","RayColliderIntersection","RayColliderToi","ShapeTOI","ShapeColliderTOI","super","Shape","rawType","extents","vs","Heightfield","stopAtPenetration","rawPos1","rawRot1","rawVel1","rawPos2","rawRot2","rawVel2","rawShape1","rawShape2","rawPos","rawShape","ray","rawRayOrig","rawRayDir","ball","n","halfspace","halfExtents","cuboid","roundCuboid","capsule","a","b","ra","segment","c","rc","triangle","roundTriangle","polyline","trimesh","convexMesh","convexHull","roundConvexMesh","roundConvexHull","rawScale","heightfield","cylinder","roundCylinder","cone","roundCone","PhysicsPipeline","ccdSolver","rawG","filterContactPair","filterIntersectionPair","QueryPipeline","filterFlags","filterGroups","filterExcludeCollider","filterExcludeRigidBody","filterPredicate","rawOrig","rawDir","rawInter","rawCenter","rawHalfExtents","SerializationPipeline","rawGra","World","DebugRenderBuffers","DebugRenderPipeline","CharacterCollision","KinematicCharacterController","rawCharacterCollision","_applyImpulsesToDynamicBodies","_characterMass","rawVect","applyImpulsesToDynamicBodies","setApplyImpulsesToDynamicBodies","characterMass","setCharacterMass","desiredTranslationDelta","rawTranslationDelta","castClosure","DynamicRayCastVehicleController","_chassis","updateVehicle","currentVehicleSpeed","indexUpAxis","indexForwardAxis","setIndexForwardAxis","addWheel","chassisConnectionCs","directionCs","axleCs","suspensionRestLength","rawChassisConnectionCs","rawDirectionCs","rawAxleCs","numWheels","wheelChassisConnectionPointCs","setWheelChassisConnectionPointCs","rawValue","wheelSuspensionRestLength","setWheelSuspensionRestLength","wheelMaxSuspensionTravel","setWheelMaxSuspensionTravel","wheelRadius","setWheelRadius","wheelSuspensionStiffness","setWheelSuspensionStiffness","wheelSuspensionCompression","setWheelSuspensionCompression","wheelSuspensionRelaxation","setWheelSuspensionRelaxation","wheelMaxSuspensionForce","setWheelMaxSuspensionForce","wheelBrake","setWheelBrake","wheelSteering","setWheelSteering","wheelEngineForce","setWheelEngineForce","wheelDirectionCs","setWheelDirectionCs","wheelAxleCs","setWheelAxleCs","wheelFrictionSlip","setWheelFrictionSlip","wheelSideFrictionStiffness","setWheelSideFrictionStiffness","wheelRotation","wheelForwardImpulse","wheelSideImpulse","wheelSuspensionForce","wheelContactNormal","wheelContactPoint","wheelSuspensionLength","wheelHardPoint","wheelIsInContact","wheelGroundObject","rawIntegrationParameters","rawIslands","rawBroadPhase","rawNarrowPhase","rawBodies","rawColliders","rawImpulseJoints","rawMultibodyJoints","rawCCDSolver","rawQueryPipeline","rawPhysicsPipeline","rawSerializationPipeline","rawDebugRenderPipeline","ColliderSet","queryPipeline","physicsPipeline","serializationPipeline","debugRenderPipeline","characterControllers","Set","vehicleControllers","controller","takeSnapshot","debugRender","updateSceneQueries","timestep","niter","createCharacterController","add","removeCharacterController","createVehicleController","removeVehicleController","parentHandle","createImpulseJoint","createMultibodyJoint","getRigidBody","getCollider","getImpulseJoint","getMultibodyJoint","removeRigidBody","removeCollider","removeImpulseJoint","removeMultibodyJoint","forEachCollider","forEachRigidBody","TempContactForceEvent","totalForce","totalForceMagnitude","maxForceDirection","maxForceMagnitude","EventQueue","event","Collider","_parent","_shape","ensureShapeIsCached","setSensor","setShape","setRestitution","setFriction","setFrictionCombineRule","setRestitutionCombineRule","setCollisionGroups","setSolverGroups","setActiveHooks","setActiveEvents","setContactForceEventThreshold","setActiveCollisionTypes","setDensity","setMass","setMassProperties","setTranslationWrtParent","setRotationWrtParent","shapeType","setHalfExtents","setRadius","roundRadius","setRoundRadius","setHalfHeight","heightfieldHeights","heightfieldScale","heightfieldNRows","heightfieldNCols","volume","rawCollider1Vel","rawShape2Pos","rawShape2Rot","rawShape2Vel","castCollider","rawCollider2Vel","contactCollider","ColliderDesc","Density","Average","DEFAULT","NONE","sensor","Mass","MassProps","isNaN","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","next","rejected","done","then","base64Js","b64","lens","getLens","validLen","placeHoldersLen","tmp","arr","Arr","curByte","revLookup","charCodeAt","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","join","code","indexOf","start","end","num","output","init","wasmInit","base64","toByteArray","version","deferred1_0","deferred1_1","vers"]}
|