import*as e from"../node_modules/@dimforge/rapier3d/rapier_wasm3d_bg.wasm";var t;function n(e){t=e}var r=Array(128).fill(void 0);r.push(void 0,null,!0,!1);function i(e){return r[e]}var a=r.length;function o(e){a===r.length&&r.push(r.length+1);let t=a;return a=r[t],r[t]=e,t}new(typeof TextDecoder>`u`?(0,module.require)(`util`).TextDecoder:TextDecoder)(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode();function s(e){return e==null}var c=null;function l(){return(c===null||c.buffer.detached===!0||c.buffer.detached===void 0&&c.buffer!==t.memory.buffer)&&(c=new DataView(t.memory.buffer)),c}function u(e){e<132||(r[e]=a,a=e)}function d(e){let t=i(e);return u(e),t}function f(e,t){if(!(e instanceof t))throw Error(`expected instance of ${t.name}`)}var p=128;function m(e){if(p==1)throw Error(`out of js stack`);return r[--p]=e,p}var h=null;function g(){return(h===null||h.byteLength===0)&&(h=new Int32Array(t.memory.buffer)),h}function _(e,t){return e>>>=0,g().subarray(e/4,e/4+t)}var v=null;function y(){return(v===null||v.byteLength===0)&&(v=new Float32Array(t.memory.buffer)),v}function b(e,t){return e>>>=0,y().subarray(e/4,e/4+t)}var x=null;function S(){return(x===null||x.byteLength===0)&&(x=new Uint32Array(t.memory.buffer)),x}function ee(e,t){return e>>>=0,S().subarray(e/4,e/4+t)}var C=0;function w(e,t){let n=t(e.length*4,4)>>>0;return S().set(e,n/4),C=e.length,n}function T(e,t){let n=t(e.length*4,4)>>>0;return y().set(e,n/4),C=e.length,n}Object.freeze({Vertex:0,0:`Vertex`,Edge:1,1:`Edge`,Face:2,2:`Face`,Unknown:3,3:`Unknown`});var E=Object.freeze({LinX:0,0:`LinX`,LinY:1,1:`LinY`,LinZ:2,2:`LinZ`,AngX:3,3:`AngX`,AngY:4,4:`AngY`,AngZ:5,5:`AngZ`}),D=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`});Object.freeze({AccelerationBased:0,0:`AccelerationBased`,ForceBased:1,1:`ForceBased`}),Object.freeze({Dynamic:0,0:`Dynamic`,Fixed:1,1:`Fixed`,KinematicPositionBased:2,2:`KinematicPositionBased`,KinematicVelocityBased:3,3:`KinematicVelocityBased`});var O=Object.freeze({Ball:0,0:`Ball`,Cuboid:1,1:`Cuboid`,Capsule:2,2:`Capsule`,Segment:3,3:`Segment`,Polyline:4,4:`Polyline`,Triangle:5,5:`Triangle`,TriMesh:6,6:`TriMesh`,HeightField:7,7:`HeightField`,Compound:8,8:`Compound`,ConvexPolyhedron:9,9:`ConvexPolyhedron`,Cylinder:10,10:`Cylinder`,Cone:11,11:`Cone`,RoundCuboid:12,12:`RoundCuboid`,RoundTriangle:13,13:`RoundTriangle`,RoundCylinder:14,14:`RoundCylinder`,RoundCone:15,15:`RoundCone`,RoundConvexPolyhedron:16,16:`RoundConvexPolyhedron`,HalfSpace:17,17:`HalfSpace`,Voxels:18,18:`Voxels`}),k=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawbroadphase_free(e>>>0,1)),A=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,k.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawbroadphase_free(e,0)}constructor(){let e=t.rawbroadphase_new();return this.__wbg_ptr=e>>>0,k.register(this,this.__wbg_ptr,this),this}castRay(e,n,i,a,o,c,l,u,d,h,g,_){try{f(e,L),f(n,R),f(i,j),f(a,V),f(o,V);let r=t.rawbroadphase_castRay(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c,l,u,s(d)?4294967297:d>>>0,!s(h),s(h)?0:h,!s(g),s(g)?0:g,m(_));return r===0?void 0:Le.__wrap(r)}finally{r[p++]=void 0}}castRayAndGetNormal(e,n,i,a,o,c,l,u,d,h,g,_){try{f(e,L),f(n,R),f(i,j),f(a,V),f(o,V);let r=t.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c,l,u,s(d)?4294967297:d>>>0,!s(h),s(h)?0:h,!s(g),s(g)?0:g,m(_));return r===0?void 0:ze.__wrap(r)}finally{r[p++]=void 0}}intersectionsWithRay(e,n,i,a,o,c,l,u,d,h,g,_,v){try{f(e,L),f(n,R),f(i,j),f(a,V),f(o,V),t.rawbroadphase_intersectionsWithRay(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c,l,m(u),d,s(h)?4294967297:h>>>0,!s(g),s(g)?0:g,!s(_),s(_)?0:_,m(v))}finally{r[p++]=void 0,r[p++]=void 0}}intersectionWithShape(e,n,i,a,o,c,u,d,h,g,_){try{let r=t.__wbindgen_add_to_stack_pointer(-16);f(e,L),f(n,R),f(i,j),f(a,V),f(o,z),f(c,B),t.rawbroadphase_intersectionWithShape(r,this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c.__wbg_ptr,u,s(d)?4294967297:d>>>0,!s(h),s(h)?0:h,!s(g),s(g)?0:g,m(_));var v=l().getInt32(r+0,!0),y=l().getFloat64(r+8,!0);return v===0?void 0:y}finally{t.__wbindgen_add_to_stack_pointer(16),r[p++]=void 0}}projectPoint(e,n,i,a,o,c,l,u,d,h){try{f(e,L),f(n,R),f(i,j),f(a,V);let r=t.rawbroadphase_projectPoint(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o,c,s(l)?4294967297:l>>>0,!s(u),s(u)?0:u,!s(d),s(d)?0:d,m(h));return r===0?void 0:Ne.__wrap(r)}finally{r[p++]=void 0}}projectPointAndGetFeature(e,n,i,a,o,c,l,u,d){try{f(e,L),f(n,R),f(i,j),f(a,V);let r=t.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o,s(c)?4294967297:c>>>0,!s(l),s(l)?0:l,!s(u),s(u)?0:u,m(d));return r===0?void 0:Ne.__wrap(r)}finally{r[p++]=void 0}}intersectionsWithPoint(e,n,i,a,o,c,l,u,d,h){try{f(e,L),f(n,R),f(i,j),f(a,V),t.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,m(o),c,s(l)?4294967297:l>>>0,!s(u),s(u)?0:u,!s(d),s(d)?0:d,m(h))}finally{r[p++]=void 0,r[p++]=void 0}}castShape(e,n,i,a,o,c,l,u,d,h,g,_,v,y,b){try{f(e,L),f(n,R),f(i,j),f(a,V),f(o,z),f(c,V),f(l,B);let r=t.rawbroadphase_castShape(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c.__wbg_ptr,l.__wbg_ptr,u,d,h,g,s(_)?4294967297:_>>>0,!s(v),s(v)?0:v,!s(y),s(y)?0:y,m(b));return r===0?void 0:se.__wrap(r)}finally{r[p++]=void 0}}intersectionsWithShape(e,n,i,a,o,c,l,u,d,h,g,_){try{f(e,L),f(n,R),f(i,j),f(a,V),f(o,z),f(c,B),t.rawbroadphase_intersectionsWithShape(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c.__wbg_ptr,m(l),u,s(d)?4294967297:d>>>0,!s(h),s(h)?0:h,!s(g),s(g)?0:g,m(_))}finally{r[p++]=void 0,r[p++]=void 0}}collidersWithAabbIntersectingAabb(e,n,i,a,o,s){try{f(e,L),f(n,R),f(i,j),f(a,V),f(o,V),t.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,m(s))}finally{r[p++]=void 0}}},te=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawccdsolver_free(e>>>0,1)),ne=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,te.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawccdsolver_free(e,0)}constructor(){let e=t.rawccdsolver_new();return this.__wbg_ptr=e>>>0,te.register(this,this.__wbg_ptr,this),this}},re=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawcharactercollision_free(e>>>0,1)),ie=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,re.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawcharactercollision_free(e,0)}constructor(){let e=t.rawcharactercollision_new();return this.__wbg_ptr=e>>>0,re.register(this,this.__wbg_ptr,this),this}handle(){return t.rawcharactercollision_handle(this.__wbg_ptr)}translationDeltaApplied(){let e=t.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);return V.__wrap(e)}translationDeltaRemaining(){let e=t.rawcharactercollision_translationDeltaRemaining(this.__wbg_ptr);return V.__wrap(e)}toi(){return t.rawcharactercollision_toi(this.__wbg_ptr)}worldWitness1(){let e=t.rawcharactercollision_worldWitness1(this.__wbg_ptr);return V.__wrap(e)}worldWitness2(){let e=t.rawcharactercollision_worldWitness2(this.__wbg_ptr);return V.__wrap(e)}worldNormal1(){let e=t.rawcharactercollision_worldNormal1(this.__wbg_ptr);return V.__wrap(e)}worldNormal2(){let e=t.rawcharactercollision_worldNormal2(this.__wbg_ptr);return V.__wrap(e)}},ae=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawcolliderset_free(e>>>0,1)),j=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,ae.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ae.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawcolliderset_free(e,0)}coTranslation(e){let n=t.rawcolliderset_coTranslation(this.__wbg_ptr,e);return V.__wrap(n)}coRotation(e){let n=t.rawcolliderset_coRotation(this.__wbg_ptr,e);return z.__wrap(n)}coTranslationWrtParent(e){let n=t.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}coRotationWrtParent(e){let n=t.rawcolliderset_coRotationWrtParent(this.__wbg_ptr,e);return n===0?void 0:z.__wrap(n)}coSetTranslation(e,n,r,i){t.rawcolliderset_coSetTranslation(this.__wbg_ptr,e,n,r,i)}coSetTranslationWrtParent(e,n,r,i){t.rawcolliderset_coSetTranslationWrtParent(this.__wbg_ptr,e,n,r,i)}coSetRotation(e,n,r,i,a){t.rawcolliderset_coSetRotation(this.__wbg_ptr,e,n,r,i,a)}coSetRotationWrtParent(e,n,r,i,a){t.rawcolliderset_coSetRotationWrtParent(this.__wbg_ptr,e,n,r,i,a)}coIsSensor(e){return t.rawcolliderset_coIsSensor(this.__wbg_ptr,e)!==0}coShapeType(e){return t.rawcolliderset_coShapeType(this.__wbg_ptr,e)}coHalfspaceNormal(e){let n=t.rawcolliderset_coHalfspaceNormal(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}coHalfExtents(e){let n=t.rawcolliderset_coHalfExtents(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}coSetHalfExtents(e,n){f(n,V),t.rawcolliderset_coSetHalfExtents(this.__wbg_ptr,e,n.__wbg_ptr)}coRadius(e){let n=t.rawcolliderset_coRadius(this.__wbg_ptr,e);return n===4294967297?void 0:n}coSetRadius(e,n){t.rawcolliderset_coSetRadius(this.__wbg_ptr,e,n)}coHalfHeight(e){let n=t.rawcolliderset_coHalfHeight(this.__wbg_ptr,e);return n===4294967297?void 0:n}coSetHalfHeight(e,n){t.rawcolliderset_coSetHalfHeight(this.__wbg_ptr,e,n)}coRoundRadius(e){let n=t.rawcolliderset_coRoundRadius(this.__wbg_ptr,e);return n===4294967297?void 0:n}coSetRoundRadius(e,n){t.rawcolliderset_coSetRoundRadius(this.__wbg_ptr,e,n)}coVoxelData(e){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.rawcolliderset_coVoxelData(i,this.__wbg_ptr,e);var n=l().getInt32(i+0,!0),r=l().getInt32(i+4,!0);let a;return n!==0&&(a=_(n,r).slice(),t.__wbindgen_export_1(n,r*4,4)),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}coVoxelSize(e){let n=t.rawcolliderset_coVoxelSize(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}coSetVoxel(e,n,r,i,a){t.rawcolliderset_coSetVoxel(this.__wbg_ptr,e,n,r,i,a)}coPropagateVoxelChange(e,n,r,i,a,o,s,c){t.rawcolliderset_coPropagateVoxelChange(this.__wbg_ptr,e,n,r,i,a,o,s,c)}coCombineVoxelStates(e,n,r,i,a){t.rawcolliderset_coCombineVoxelStates(this.__wbg_ptr,e,n,r,i,a)}coVertices(e){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.rawcolliderset_coVertices(i,this.__wbg_ptr,e);var n=l().getInt32(i+0,!0),r=l().getInt32(i+4,!0);let a;return n!==0&&(a=b(n,r).slice(),t.__wbindgen_export_1(n,r*4,4)),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}coIndices(e){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.rawcolliderset_coIndices(i,this.__wbg_ptr,e);var n=l().getInt32(i+0,!0),r=l().getInt32(i+4,!0);let a;return n!==0&&(a=ee(n,r).slice(),t.__wbindgen_export_1(n,r*4,4)),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}coTriMeshFlags(e){let n=t.rawcolliderset_coTriMeshFlags(this.__wbg_ptr,e);return n===4294967297?void 0:n}coHeightFieldFlags(e){let n=t.rawcolliderset_coHeightFieldFlags(this.__wbg_ptr,e);return n===4294967297?void 0:n}coHeightfieldHeights(e){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.rawcolliderset_coHeightfieldHeights(i,this.__wbg_ptr,e);var n=l().getInt32(i+0,!0),r=l().getInt32(i+4,!0);let a;return n!==0&&(a=b(n,r).slice(),t.__wbindgen_export_1(n,r*4,4)),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}coHeightfieldScale(e){let n=t.rawcolliderset_coHeightfieldScale(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}coHeightfieldNRows(e){let n=t.rawcolliderset_coHeightfieldNRows(this.__wbg_ptr,e);return n===4294967297?void 0:n}coHeightfieldNCols(e){let n=t.rawcolliderset_coHeightfieldNCols(this.__wbg_ptr,e);return n===4294967297?void 0:n}coParent(e){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.rawcolliderset_coParent(i,this.__wbg_ptr,e);var n=l().getInt32(i+0,!0),r=l().getFloat64(i+8,!0);return n===0?void 0:r}finally{t.__wbindgen_add_to_stack_pointer(16)}}coSetEnabled(e,n){t.rawcolliderset_coSetEnabled(this.__wbg_ptr,e,n)}coIsEnabled(e){return t.rawcolliderset_coIsEnabled(this.__wbg_ptr,e)!==0}coSetContactSkin(e,n){t.rawcolliderset_coSetContactSkin(this.__wbg_ptr,e,n)}coContactSkin(e){return t.rawcolliderset_coContactSkin(this.__wbg_ptr,e)}coFriction(e){return t.rawcolliderset_coFriction(this.__wbg_ptr,e)}coRestitution(e){return t.rawcolliderset_coRestitution(this.__wbg_ptr,e)}coDensity(e){return t.rawcolliderset_coDensity(this.__wbg_ptr,e)}coMass(e){return t.rawcolliderset_coMass(this.__wbg_ptr,e)}coVolume(e){return t.rawcolliderset_coVolume(this.__wbg_ptr,e)}coCollisionGroups(e){return t.rawcolliderset_coCollisionGroups(this.__wbg_ptr,e)>>>0}coSolverGroups(e){return t.rawcolliderset_coSolverGroups(this.__wbg_ptr,e)>>>0}coActiveHooks(e){return t.rawcolliderset_coActiveHooks(this.__wbg_ptr,e)>>>0}coActiveCollisionTypes(e){return t.rawcolliderset_coActiveCollisionTypes(this.__wbg_ptr,e)}coActiveEvents(e){return t.rawcolliderset_coActiveEvents(this.__wbg_ptr,e)>>>0}coContactForceEventThreshold(e){return t.rawcolliderset_coContactForceEventThreshold(this.__wbg_ptr,e)}coContainsPoint(e,n){return f(n,V),t.rawcolliderset_coContainsPoint(this.__wbg_ptr,e,n.__wbg_ptr)!==0}coCastShape(e,n,r,i,a,o,s,c,l){f(n,V),f(r,B),f(i,V),f(a,z),f(o,V);let u=t.rawcolliderset_coCastShape(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,s,c,l);return u===0?void 0:Xe.__wrap(u)}coCastCollider(e,n,r,i,a,o,s){f(n,V),f(i,V);let c=t.rawcolliderset_coCastCollider(this.__wbg_ptr,e,n.__wbg_ptr,r,i.__wbg_ptr,a,o,s);return c===0?void 0:se.__wrap(c)}coIntersectsShape(e,n,r,i){return f(n,B),f(r,V),f(i,z),t.rawcolliderset_coIntersectsShape(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr)!==0}coContactShape(e,n,r,i,a){f(n,B),f(r,V),f(i,z);let o=t.rawcolliderset_coContactShape(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a);return o===0?void 0:Qe.__wrap(o)}coContactCollider(e,n,r){let i=t.rawcolliderset_coContactCollider(this.__wbg_ptr,e,n,r);return i===0?void 0:Qe.__wrap(i)}coProjectPoint(e,n,r){f(n,V);let i=t.rawcolliderset_coProjectPoint(this.__wbg_ptr,e,n.__wbg_ptr,r);return Fe.__wrap(i)}coIntersectsRay(e,n,r,i){return f(n,V),f(r,V),t.rawcolliderset_coIntersectsRay(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i)!==0}coCastRay(e,n,r,i,a){return f(n,V),f(r,V),t.rawcolliderset_coCastRay(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i,a)}coCastRayAndGetNormal(e,n,r,i,a){f(n,V),f(r,V);let o=t.rawcolliderset_coCastRayAndGetNormal(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i,a);return o===0?void 0:Ve.__wrap(o)}coSetSensor(e,n){t.rawcolliderset_coSetSensor(this.__wbg_ptr,e,n)}coSetRestitution(e,n){t.rawcolliderset_coSetRestitution(this.__wbg_ptr,e,n)}coSetFriction(e,n){t.rawcolliderset_coSetFriction(this.__wbg_ptr,e,n)}coFrictionCombineRule(e){return t.rawcolliderset_coFrictionCombineRule(this.__wbg_ptr,e)>>>0}coSetFrictionCombineRule(e,n){t.rawcolliderset_coSetFrictionCombineRule(this.__wbg_ptr,e,n)}coRestitutionCombineRule(e){return t.rawcolliderset_coRestitutionCombineRule(this.__wbg_ptr,e)>>>0}coSetRestitutionCombineRule(e,n){t.rawcolliderset_coSetRestitutionCombineRule(this.__wbg_ptr,e,n)}coSetCollisionGroups(e,n){t.rawcolliderset_coSetCollisionGroups(this.__wbg_ptr,e,n)}coSetSolverGroups(e,n){t.rawcolliderset_coSetSolverGroups(this.__wbg_ptr,e,n)}coSetActiveHooks(e,n){t.rawcolliderset_coSetActiveHooks(this.__wbg_ptr,e,n)}coSetActiveEvents(e,n){t.rawcolliderset_coSetActiveEvents(this.__wbg_ptr,e,n)}coSetActiveCollisionTypes(e,n){t.rawcolliderset_coSetActiveCollisionTypes(this.__wbg_ptr,e,n)}coSetShape(e,n){f(n,B),t.rawcolliderset_coSetShape(this.__wbg_ptr,e,n.__wbg_ptr)}coSetContactForceEventThreshold(e,n){t.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr,e,n)}coSetDensity(e,n){t.rawcolliderset_coSetDensity(this.__wbg_ptr,e,n)}coSetMass(e,n){t.rawcolliderset_coSetMass(this.__wbg_ptr,e,n)}coSetMassProperties(e,n,r,i,a){f(r,V),f(i,V),f(a,z),t.rawcolliderset_coSetMassProperties(this.__wbg_ptr,e,n,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr)}constructor(){let e=t.rawcolliderset_new();return this.__wbg_ptr=e>>>0,ae.register(this,this.__wbg_ptr,this),this}len(){return t.rawcolliderset_len(this.__wbg_ptr)>>>0}contains(e){return t.rawcolliderset_contains(this.__wbg_ptr,e)!==0}createCollider(e,n,r,i,a,o,s,c,u,d,p,m,h,g,_,v,y,b,x,S,ee,C,w,T,E){try{let k=t.__wbindgen_add_to_stack_pointer(-16);f(n,B),f(r,V),f(i,z),f(s,V),f(c,V),f(u,z),f(E,R),t.rawcolliderset_createCollider(k,this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a,o,s.__wbg_ptr,c.__wbg_ptr,u.__wbg_ptr,d,p,m,h,g,_,v,y,b,x,S,ee,C,w,T,E.__wbg_ptr);var D=l().getInt32(k+0,!0),O=l().getFloat64(k+8,!0);return D===0?void 0:O}finally{t.__wbindgen_add_to_stack_pointer(16)}}remove(e,n,r,i){f(n,F),f(r,R),t.rawcolliderset_remove(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i)}isHandleValid(e){return t.rawcolliderset_contains(this.__wbg_ptr,e)!==0}forEachColliderHandle(e){try{t.rawcolliderset_forEachColliderHandle(this.__wbg_ptr,m(e))}finally{r[p++]=void 0}}},oe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawcollidershapecasthit_free(e>>>0,1)),se=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,oe.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,oe.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawcollidershapecasthit_free(e,0)}colliderHandle(){return t.rawcharactercollision_handle(this.__wbg_ptr)}time_of_impact(){return t.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}witness1(){let e=t.rawcollidershapecasthit_witness1(this.__wbg_ptr);return V.__wrap(e)}witness2(){let e=t.rawcollidershapecasthit_witness2(this.__wbg_ptr);return V.__wrap(e)}normal1(){let e=t.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);return V.__wrap(e)}normal2(){let e=t.rawcharactercollision_translationDeltaRemaining(this.__wbg_ptr);return V.__wrap(e)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry(e=>t.__wbg_rawcontactforceevent_free(e>>>0,1));var ce=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawcontactmanifold_free(e>>>0,1)),le=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,ce.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ce.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawcontactmanifold_free(e,0)}normal(){let e=t.rawcontactmanifold_normal(this.__wbg_ptr);return V.__wrap(e)}local_n1(){let e=t.rawcontactmanifold_local_n1(this.__wbg_ptr);return V.__wrap(e)}local_n2(){let e=t.rawcontactmanifold_local_n2(this.__wbg_ptr);return V.__wrap(e)}subshape1(){return t.rawcontactmanifold_subshape1(this.__wbg_ptr)>>>0}subshape2(){return t.rawcontactmanifold_subshape2(this.__wbg_ptr)>>>0}num_contacts(){return t.rawcontactmanifold_num_contacts(this.__wbg_ptr)>>>0}contact_local_p1(e){let n=t.rawcontactmanifold_contact_local_p1(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}contact_local_p2(e){let n=t.rawcontactmanifold_contact_local_p2(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}contact_dist(e){return t.rawcontactmanifold_contact_dist(this.__wbg_ptr,e)}contact_fid1(e){return t.rawcontactmanifold_contact_fid1(this.__wbg_ptr,e)>>>0}contact_fid2(e){return t.rawcontactmanifold_contact_fid2(this.__wbg_ptr,e)>>>0}contact_impulse(e){return t.rawcontactmanifold_contact_impulse(this.__wbg_ptr,e)}contact_tangent_impulse_x(e){return t.rawcontactmanifold_contact_tangent_impulse_x(this.__wbg_ptr,e)}contact_tangent_impulse_y(e){return t.rawcontactmanifold_contact_tangent_impulse_y(this.__wbg_ptr,e)}num_solver_contacts(){return t.rawcontactmanifold_num_solver_contacts(this.__wbg_ptr)>>>0}solver_contact_point(e){let n=t.rawcontactmanifold_solver_contact_point(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}solver_contact_dist(e){return t.rawcontactmanifold_solver_contact_dist(this.__wbg_ptr,e)}solver_contact_friction(e){return t.rawcontactmanifold_solver_contact_friction(this.__wbg_ptr,e)}solver_contact_restitution(e){return t.rawcontactmanifold_solver_contact_restitution(this.__wbg_ptr,e)}solver_contact_tangent_velocity(e){let n=t.rawcontactmanifold_solver_contact_tangent_velocity(this.__wbg_ptr,e);return V.__wrap(n)}},ue=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawcontactpair_free(e>>>0,1)),de=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,ue.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ue.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawcontactpair_free(e,0)}collider1(){return t.rawcontactpair_collider1(this.__wbg_ptr)}collider2(){return t.rawcontactpair_collider2(this.__wbg_ptr)}numContactManifolds(){return t.rawcontactpair_numContactManifolds(this.__wbg_ptr)>>>0}contactManifold(e){let n=t.rawcontactpair_contactManifold(this.__wbg_ptr,e);return n===0?void 0:le.__wrap(n)}},fe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawdebugrenderpipeline_free(e>>>0,1)),pe=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,fe.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawdebugrenderpipeline_free(e,0)}constructor(){let e=t.rawdebugrenderpipeline_new();return this.__wbg_ptr=e>>>0,fe.register(this,this.__wbg_ptr,this),this}vertices(){return d(t.rawdebugrenderpipeline_vertices(this.__wbg_ptr))}colors(){return d(t.rawdebugrenderpipeline_colors(this.__wbg_ptr))}render(e,n,i,a,o,s,c){try{f(e,R),f(n,j),f(i,M),f(a,I),f(o,L),t.rawdebugrenderpipeline_render(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,s,m(c))}finally{r[p++]=void 0}}},me=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawdeserializedworld_free(e>>>0,1)),he=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,me.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,me.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawdeserializedworld_free(e,0)}takeGravity(){let e=t.rawdeserializedworld_takeGravity(this.__wbg_ptr);return e===0?void 0:V.__wrap(e)}takeIntegrationParameters(){let e=t.rawdeserializedworld_takeIntegrationParameters(this.__wbg_ptr);return e===0?void 0:N.__wrap(e)}takeIslandManager(){let e=t.rawdeserializedworld_takeIslandManager(this.__wbg_ptr);return e===0?void 0:F.__wrap(e)}takeBroadPhase(){let e=t.rawdeserializedworld_takeBroadPhase(this.__wbg_ptr);return e===0?void 0:A.__wrap(e)}takeNarrowPhase(){let e=t.rawdeserializedworld_takeNarrowPhase(this.__wbg_ptr);return e===0?void 0:L.__wrap(e)}takeBodies(){let e=t.rawdeserializedworld_takeBodies(this.__wbg_ptr);return e===0?void 0:R.__wrap(e)}takeColliders(){let e=t.rawdeserializedworld_takeColliders(this.__wbg_ptr);return e===0?void 0:j.__wrap(e)}takeImpulseJoints(){let e=t.rawdeserializedworld_takeImpulseJoints(this.__wbg_ptr);return e===0?void 0:M.__wrap(e)}takeMultibodyJoints(){let e=t.rawdeserializedworld_takeMultibodyJoints(this.__wbg_ptr);return e===0?void 0:I.__wrap(e)}},ge=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawdynamicraycastvehiclecontroller_free(e>>>0,1)),_e=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ge.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawdynamicraycastvehiclecontroller_free(e,0)}constructor(e){let n=t.rawdynamicraycastvehiclecontroller_new(e);return this.__wbg_ptr=n>>>0,ge.register(this,this.__wbg_ptr,this),this}current_vehicle_speed(){return t.rawdynamicraycastvehiclecontroller_current_vehicle_speed(this.__wbg_ptr)}chassis(){return t.rawdynamicraycastvehiclecontroller_chassis(this.__wbg_ptr)}index_up_axis(){return t.rawdynamicraycastvehiclecontroller_index_up_axis(this.__wbg_ptr)>>>0}set_index_up_axis(e){t.rawdynamicraycastvehiclecontroller_set_index_up_axis(this.__wbg_ptr,e)}index_forward_axis(){return t.rawdynamicraycastvehiclecontroller_index_forward_axis(this.__wbg_ptr)>>>0}set_index_forward_axis(e){t.rawdynamicraycastvehiclecontroller_set_index_forward_axis(this.__wbg_ptr,e)}add_wheel(e,n,r,i,a){f(e,V),f(n,V),f(r,V),t.rawdynamicraycastvehiclecontroller_add_wheel(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i,a)}num_wheels(){return t.rawdynamicraycastvehiclecontroller_num_wheels(this.__wbg_ptr)>>>0}update_vehicle(e,n,i,a,o,c,l,u){try{f(n,A),f(i,L),f(a,R),f(o,j),t.rawdynamicraycastvehiclecontroller_update_vehicle(this.__wbg_ptr,e,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c,s(l)?4294967297:l>>>0,m(u))}finally{r[p++]=void 0}}wheel_chassis_connection_point_cs(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_chassis_connection_point_cs(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}set_wheel_chassis_connection_point_cs(e,n){f(n,V),t.rawdynamicraycastvehiclecontroller_set_wheel_chassis_connection_point_cs(this.__wbg_ptr,e,n.__wbg_ptr)}wheel_suspension_rest_length(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_suspension_rest_length(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_suspension_rest_length(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_suspension_rest_length(this.__wbg_ptr,e,n)}wheel_max_suspension_travel(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_max_suspension_travel(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_max_suspension_travel(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_travel(this.__wbg_ptr,e,n)}wheel_radius(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_radius(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_radius(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_radius(this.__wbg_ptr,e,n)}wheel_suspension_stiffness(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_suspension_stiffness(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_suspension_stiffness(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_suspension_stiffness(this.__wbg_ptr,e,n)}wheel_suspension_compression(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_suspension_compression(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_suspension_compression(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_suspension_compression(this.__wbg_ptr,e,n)}wheel_suspension_relaxation(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_suspension_relaxation(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_suspension_relaxation(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_suspension_relaxation(this.__wbg_ptr,e,n)}wheel_max_suspension_force(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_max_suspension_force(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_max_suspension_force(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_force(this.__wbg_ptr,e,n)}wheel_brake(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_brake(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_brake(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_brake(this.__wbg_ptr,e,n)}wheel_steering(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_steering(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_steering(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_steering(this.__wbg_ptr,e,n)}wheel_engine_force(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_engine_force(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_engine_force(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_engine_force(this.__wbg_ptr,e,n)}wheel_direction_cs(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_direction_cs(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}set_wheel_direction_cs(e,n){f(n,V),t.rawdynamicraycastvehiclecontroller_set_wheel_direction_cs(this.__wbg_ptr,e,n.__wbg_ptr)}wheel_axle_cs(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_axle_cs(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}set_wheel_axle_cs(e,n){f(n,V),t.rawdynamicraycastvehiclecontroller_set_wheel_axle_cs(this.__wbg_ptr,e,n.__wbg_ptr)}wheel_friction_slip(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_friction_slip(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_friction_slip(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_friction_slip(this.__wbg_ptr,e,n)}wheel_side_friction_stiffness(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_side_friction_stiffness(this.__wbg_ptr,e);return n===4294967297?void 0:n}set_wheel_side_friction_stiffness(e,n){t.rawdynamicraycastvehiclecontroller_set_wheel_side_friction_stiffness(this.__wbg_ptr,e,n)}wheel_rotation(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_rotation(this.__wbg_ptr,e);return n===4294967297?void 0:n}wheel_forward_impulse(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_forward_impulse(this.__wbg_ptr,e);return n===4294967297?void 0:n}wheel_side_impulse(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_side_impulse(this.__wbg_ptr,e);return n===4294967297?void 0:n}wheel_suspension_force(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_suspension_force(this.__wbg_ptr,e);return n===4294967297?void 0:n}wheel_contact_normal_ws(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_contact_normal_ws(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}wheel_contact_point_ws(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_contact_point_ws(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}wheel_suspension_length(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_suspension_length(this.__wbg_ptr,e);return n===4294967297?void 0:n}wheel_hard_point_ws(e){let n=t.rawdynamicraycastvehiclecontroller_wheel_hard_point_ws(this.__wbg_ptr,e);return n===0?void 0:V.__wrap(n)}wheel_is_in_contact(e){return t.rawdynamicraycastvehiclecontroller_wheel_is_in_contact(this.__wbg_ptr,e)!==0}wheel_ground_object(e){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.rawdynamicraycastvehiclecontroller_wheel_ground_object(i,this.__wbg_ptr,e);var n=l().getInt32(i+0,!0),r=l().getFloat64(i+8,!0);return n===0?void 0:r}finally{t.__wbindgen_add_to_stack_pointer(16)}}},ve=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_raweventqueue_free(e>>>0,1)),ye=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ve.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_raweventqueue_free(e,0)}constructor(e){let n=t.raweventqueue_new(e);return this.__wbg_ptr=n>>>0,ve.register(this,this.__wbg_ptr,this),this}drainCollisionEvents(e){try{t.raweventqueue_drainCollisionEvents(this.__wbg_ptr,m(e))}finally{r[p++]=void 0}}drainContactForceEvents(e){try{t.raweventqueue_drainContactForceEvents(this.__wbg_ptr,m(e))}finally{r[p++]=void 0}}clear(){t.raweventqueue_clear(this.__wbg_ptr)}},be=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawgenericjoint_free(e>>>0,1)),xe=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,be.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,be.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawgenericjoint_free(e,0)}static generic(n,r,i,a){f(n,V),f(r,V),f(i,V);let o=t.rawgenericjoint_generic(n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a);return o===0?void 0:e.__wrap(o)}static spring(n,r,i,a,o){f(a,V),f(o,V);let s=t.rawgenericjoint_spring(n,r,i,a.__wbg_ptr,o.__wbg_ptr);return e.__wrap(s)}static rope(n,r,i){f(r,V),f(i,V);let a=t.rawgenericjoint_rope(n,r.__wbg_ptr,i.__wbg_ptr);return e.__wrap(a)}static spherical(n,r){f(n,V),f(r,V);let i=t.rawgenericjoint_spherical(n.__wbg_ptr,r.__wbg_ptr);return e.__wrap(i)}static prismatic(n,r,i,a,o,s){f(n,V),f(r,V),f(i,V);let c=t.rawgenericjoint_prismatic(n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a,o,s);return c===0?void 0:e.__wrap(c)}static fixed(n,r,i,a){f(n,V),f(r,z),f(i,V),f(a,z);let o=t.rawgenericjoint_fixed(n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr);return e.__wrap(o)}static revolute(n,r,i){f(n,V),f(r,V),f(i,V);let a=t.rawgenericjoint_revolute(n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr);return a===0?void 0:e.__wrap(a)}},Se=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawimpulsejointset_free(e>>>0,1)),M=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Se.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Se.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawimpulsejointset_free(e,0)}jointType(e){return t.rawimpulsejointset_jointType(this.__wbg_ptr,e)}jointBodyHandle1(e){return t.rawimpulsejointset_jointBodyHandle1(this.__wbg_ptr,e)}jointBodyHandle2(e){return t.rawimpulsejointset_jointBodyHandle2(this.__wbg_ptr,e)}jointFrameX1(e){let n=t.rawimpulsejointset_jointFrameX1(this.__wbg_ptr,e);return z.__wrap(n)}jointFrameX2(e){let n=t.rawimpulsejointset_jointFrameX2(this.__wbg_ptr,e);return z.__wrap(n)}jointAnchor1(e){let n=t.rawimpulsejointset_jointAnchor1(this.__wbg_ptr,e);return V.__wrap(n)}jointAnchor2(e){let n=t.rawimpulsejointset_jointAnchor2(this.__wbg_ptr,e);return V.__wrap(n)}jointSetAnchor1(e,n){f(n,V),t.rawimpulsejointset_jointSetAnchor1(this.__wbg_ptr,e,n.__wbg_ptr)}jointSetAnchor2(e,n){f(n,V),t.rawimpulsejointset_jointSetAnchor2(this.__wbg_ptr,e,n.__wbg_ptr)}jointContactsEnabled(e){return t.rawimpulsejointset_jointContactsEnabled(this.__wbg_ptr,e)!==0}jointSetContactsEnabled(e,n){t.rawimpulsejointset_jointSetContactsEnabled(this.__wbg_ptr,e,n)}jointLimitsEnabled(e,n){return t.rawimpulsejointset_jointLimitsEnabled(this.__wbg_ptr,e,n)!==0}jointLimitsMin(e,n){return t.rawimpulsejointset_jointLimitsMin(this.__wbg_ptr,e,n)}jointLimitsMax(e,n){return t.rawimpulsejointset_jointLimitsMax(this.__wbg_ptr,e,n)}jointSetLimits(e,n,r,i){t.rawimpulsejointset_jointSetLimits(this.__wbg_ptr,e,n,r,i)}jointConfigureMotorModel(e,n,r){t.rawimpulsejointset_jointConfigureMotorModel(this.__wbg_ptr,e,n,r)}jointConfigureMotorVelocity(e,n,r,i){t.rawimpulsejointset_jointConfigureMotorVelocity(this.__wbg_ptr,e,n,r,i)}jointConfigureMotorPosition(e,n,r,i,a){t.rawimpulsejointset_jointConfigureMotorPosition(this.__wbg_ptr,e,n,r,i,a)}jointConfigureMotor(e,n,r,i,a,o){t.rawimpulsejointset_jointConfigureMotor(this.__wbg_ptr,e,n,r,i,a,o)}constructor(){let e=t.rawimpulsejointset_new();return this.__wbg_ptr=e>>>0,Se.register(this,this.__wbg_ptr,this),this}createJoint(e,n,r,i){return f(e,xe),t.rawimpulsejointset_createJoint(this.__wbg_ptr,e.__wbg_ptr,n,r,i)}remove(e,n){t.rawimpulsejointset_remove(this.__wbg_ptr,e,n)}len(){return t.rawimpulsejointset_len(this.__wbg_ptr)>>>0}contains(e){return t.rawimpulsejointset_contains(this.__wbg_ptr,e)!==0}forEachJointHandle(e){try{t.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr,m(e))}finally{r[p++]=void 0}}forEachJointAttachedToRigidBody(e,n){try{t.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr,e,m(n))}finally{r[p++]=void 0}}},Ce=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawintegrationparameters_free(e>>>0,1)),N=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Ce.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ce.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawintegrationparameters_free(e,0)}constructor(){let e=t.rawintegrationparameters_new();return this.__wbg_ptr=e>>>0,Ce.register(this,this.__wbg_ptr,this),this}get dt(){return t.rawintegrationparameters_dt(this.__wbg_ptr)}get contact_erp(){return t.rawintegrationparameters_contact_erp(this.__wbg_ptr)}get normalizedAllowedLinearError(){return t.rawintegrationparameters_normalizedAllowedLinearError(this.__wbg_ptr)}get normalizedPredictionDistance(){return t.rawintegrationparameters_normalizedPredictionDistance(this.__wbg_ptr)}get numSolverIterations(){return t.rawintegrationparameters_numSolverIterations(this.__wbg_ptr)>>>0}get numInternalPgsIterations(){return t.rawdynamicraycastvehiclecontroller_index_up_axis(this.__wbg_ptr)>>>0}get minIslandSize(){return t.rawintegrationparameters_minIslandSize(this.__wbg_ptr)>>>0}get maxCcdSubsteps(){return t.rawintegrationparameters_maxCcdSubsteps(this.__wbg_ptr)>>>0}get lengthUnit(){return t.rawcontactforceevent_total_force_magnitude(this.__wbg_ptr)}set dt(e){t.rawintegrationparameters_set_dt(this.__wbg_ptr,e)}set contact_natural_frequency(e){t.rawintegrationparameters_set_contact_natural_frequency(this.__wbg_ptr,e)}set normalizedAllowedLinearError(e){t.rawintegrationparameters_set_normalizedAllowedLinearError(this.__wbg_ptr,e)}set normalizedPredictionDistance(e){t.rawintegrationparameters_set_normalizedPredictionDistance(this.__wbg_ptr,e)}set numSolverIterations(e){t.rawintegrationparameters_set_numSolverIterations(this.__wbg_ptr,e)}set numInternalPgsIterations(e){t.rawdynamicraycastvehiclecontroller_set_index_up_axis(this.__wbg_ptr,e)}set minIslandSize(e){t.rawintegrationparameters_set_minIslandSize(this.__wbg_ptr,e)}set maxCcdSubsteps(e){t.rawintegrationparameters_set_maxCcdSubsteps(this.__wbg_ptr,e)}set lengthUnit(e){t.rawintegrationparameters_set_lengthUnit(this.__wbg_ptr,e)}},P=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawislandmanager_free(e>>>0,1)),F=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,P.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawislandmanager_free(e,0)}constructor(){let e=t.rawislandmanager_new();return this.__wbg_ptr=e>>>0,P.register(this,this.__wbg_ptr,this),this}forEachActiveRigidBodyHandle(e){try{t.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr,m(e))}finally{r[p++]=void 0}}},we=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawkinematiccharactercontroller_free(e>>>0,1)),Te=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,we.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawkinematiccharactercontroller_free(e,0)}constructor(e){let n=t.rawkinematiccharactercontroller_new(e);return this.__wbg_ptr=n>>>0,we.register(this,this.__wbg_ptr,this),this}up(){let e=t.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);return V.__wrap(e)}setUp(e){f(e,V),t.rawkinematiccharactercontroller_setUp(this.__wbg_ptr,e.__wbg_ptr)}normalNudgeFactor(){return t.rawkinematiccharactercontroller_normalNudgeFactor(this.__wbg_ptr)}setNormalNudgeFactor(e){t.rawkinematiccharactercontroller_setNormalNudgeFactor(this.__wbg_ptr,e)}offset(){return t.rawkinematiccharactercontroller_offset(this.__wbg_ptr)}setOffset(e){t.rawkinematiccharactercontroller_setOffset(this.__wbg_ptr,e)}slideEnabled(){return t.rawkinematiccharactercontroller_slideEnabled(this.__wbg_ptr)!==0}setSlideEnabled(e){t.rawkinematiccharactercontroller_setSlideEnabled(this.__wbg_ptr,e)}autostepMaxHeight(){let e=t.rawkinematiccharactercontroller_autostepMaxHeight(this.__wbg_ptr);return e===4294967297?void 0:e}autostepMinWidth(){let e=t.rawkinematiccharactercontroller_autostepMinWidth(this.__wbg_ptr);return e===4294967297?void 0:e}autostepIncludesDynamicBodies(){let e=t.rawkinematiccharactercontroller_autostepIncludesDynamicBodies(this.__wbg_ptr);return e===16777215?void 0:e!==0}autostepEnabled(){return t.rawkinematiccharactercontroller_autostepEnabled(this.__wbg_ptr)!==0}enableAutostep(e,n,r){t.rawkinematiccharactercontroller_enableAutostep(this.__wbg_ptr,e,n,r)}disableAutostep(){t.rawkinematiccharactercontroller_disableAutostep(this.__wbg_ptr)}maxSlopeClimbAngle(){return t.rawkinematiccharactercontroller_maxSlopeClimbAngle(this.__wbg_ptr)}setMaxSlopeClimbAngle(e){t.rawkinematiccharactercontroller_setMaxSlopeClimbAngle(this.__wbg_ptr,e)}minSlopeSlideAngle(){return t.rawkinematiccharactercontroller_minSlopeSlideAngle(this.__wbg_ptr)}setMinSlopeSlideAngle(e){t.rawkinematiccharactercontroller_setMinSlopeSlideAngle(this.__wbg_ptr,e)}snapToGroundDistance(){let e=t.rawkinematiccharactercontroller_snapToGroundDistance(this.__wbg_ptr);return e===4294967297?void 0:e}enableSnapToGround(e){t.rawkinematiccharactercontroller_enableSnapToGround(this.__wbg_ptr,e)}disableSnapToGround(){t.rawkinematiccharactercontroller_disableSnapToGround(this.__wbg_ptr)}snapToGroundEnabled(){return t.rawkinematiccharactercontroller_snapToGroundEnabled(this.__wbg_ptr)!==0}computeColliderMovement(e,n,i,a,o,c,l,u,d,h,g,_){try{f(n,A),f(i,L),f(a,R),f(o,j),f(l,V),t.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr,e,n.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,c,l.__wbg_ptr,u,s(d)?4294967297:Math.fround(d),h,s(g)?4294967297:g>>>0,m(_))}finally{r[p++]=void 0}}computedMovement(){let e=t.rawkinematiccharactercontroller_computedMovement(this.__wbg_ptr);return V.__wrap(e)}computedGrounded(){return t.rawkinematiccharactercontroller_computedGrounded(this.__wbg_ptr)!==0}numComputedCollisions(){return t.rawkinematiccharactercontroller_numComputedCollisions(this.__wbg_ptr)>>>0}computedCollision(e,n){return f(n,ie),t.rawkinematiccharactercontroller_computedCollision(this.__wbg_ptr,e,n.__wbg_ptr)!==0}},Ee=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawmultibodyjointset_free(e>>>0,1)),I=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Ee.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ee.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawmultibodyjointset_free(e,0)}jointType(e){return t.rawmultibodyjointset_jointType(this.__wbg_ptr,e)}jointFrameX1(e){let n=t.rawmultibodyjointset_jointFrameX1(this.__wbg_ptr,e);return z.__wrap(n)}jointFrameX2(e){let n=t.rawmultibodyjointset_jointFrameX2(this.__wbg_ptr,e);return z.__wrap(n)}jointAnchor1(e){let n=t.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr,e);return V.__wrap(n)}jointAnchor2(e){let n=t.rawmultibodyjointset_jointAnchor2(this.__wbg_ptr,e);return V.__wrap(n)}jointContactsEnabled(e){return t.rawmultibodyjointset_jointContactsEnabled(this.__wbg_ptr,e)!==0}jointSetContactsEnabled(e,n){t.rawmultibodyjointset_jointSetContactsEnabled(this.__wbg_ptr,e,n)}jointLimitsEnabled(e,n){return t.rawmultibodyjointset_jointLimitsEnabled(this.__wbg_ptr,e,n)!==0}jointLimitsMin(e,n){return t.rawmultibodyjointset_jointLimitsMin(this.__wbg_ptr,e,n)}jointLimitsMax(e,n){return t.rawmultibodyjointset_jointLimitsMax(this.__wbg_ptr,e,n)}constructor(){let e=t.rawmultibodyjointset_new();return this.__wbg_ptr=e>>>0,Ee.register(this,this.__wbg_ptr,this),this}createJoint(e,n,r,i){return f(e,xe),t.rawmultibodyjointset_createJoint(this.__wbg_ptr,e.__wbg_ptr,n,r,i)}remove(e,n){t.rawmultibodyjointset_remove(this.__wbg_ptr,e,n)}contains(e){return t.rawmultibodyjointset_contains(this.__wbg_ptr,e)!==0}forEachJointHandle(e){try{t.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr,m(e))}finally{r[p++]=void 0}}forEachJointAttachedToRigidBody(e,n){try{t.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr,e,m(n))}finally{r[p++]=void 0}}},De=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawnarrowphase_free(e>>>0,1)),L=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,De.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,De.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawnarrowphase_free(e,0)}constructor(){let e=t.rawnarrowphase_new();return this.__wbg_ptr=e>>>0,De.register(this,this.__wbg_ptr,this),this}contact_pairs_with(e,n){t.rawnarrowphase_contact_pairs_with(this.__wbg_ptr,e,o(n))}contact_pair(e,n){let r=t.rawnarrowphase_contact_pair(this.__wbg_ptr,e,n);return r===0?void 0:de.__wrap(r)}intersection_pairs_with(e,n){t.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr,e,o(n))}intersection_pair(e,n){return t.rawnarrowphase_intersection_pair(this.__wbg_ptr,e,n)!==0}},Oe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawphysicspipeline_free(e>>>0,1)),ke=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Oe.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawphysicspipeline_free(e,0)}constructor(){let e=t.rawphysicspipeline_new();return this.__wbg_ptr=e>>>0,Oe.register(this,this.__wbg_ptr,this),this}set_profiler_enabled(e){t.rawphysicspipeline_set_profiler_enabled(this.__wbg_ptr,e)}is_profiler_enabled(){return t.rawphysicspipeline_is_profiler_enabled(this.__wbg_ptr)!==0}timing_step(){return t.rawphysicspipeline_timing_step(this.__wbg_ptr)}timing_collision_detection(){return t.rawphysicspipeline_timing_collision_detection(this.__wbg_ptr)}timing_broad_phase(){return t.rawphysicspipeline_timing_broad_phase(this.__wbg_ptr)}timing_narrow_phase(){return t.rawphysicspipeline_timing_narrow_phase(this.__wbg_ptr)}timing_solver(){return t.rawphysicspipeline_timing_solver(this.__wbg_ptr)}timing_velocity_assembly(){return t.rawphysicspipeline_timing_velocity_assembly(this.__wbg_ptr)}timing_velocity_resolution(){return t.rawphysicspipeline_timing_velocity_resolution(this.__wbg_ptr)}timing_velocity_update(){return t.rawphysicspipeline_timing_velocity_update(this.__wbg_ptr)}timing_velocity_writeback(){return t.rawphysicspipeline_timing_velocity_writeback(this.__wbg_ptr)}timing_ccd(){return t.rawphysicspipeline_timing_ccd(this.__wbg_ptr)}timing_ccd_toi_computation(){return t.rawphysicspipeline_timing_ccd_toi_computation(this.__wbg_ptr)}timing_ccd_broad_phase(){return t.rawphysicspipeline_timing_ccd_broad_phase(this.__wbg_ptr)}timing_ccd_narrow_phase(){return t.rawphysicspipeline_timing_ccd_narrow_phase(this.__wbg_ptr)}timing_ccd_solver(){return t.rawphysicspipeline_timing_ccd_solver(this.__wbg_ptr)}timing_island_construction(){return t.rawphysicspipeline_timing_island_construction(this.__wbg_ptr)}timing_user_changes(){return t.rawphysicspipeline_timing_user_changes(this.__wbg_ptr)}step(e,n,r,i,a,o,s,c,l,u){f(e,V),f(n,N),f(r,F),f(i,A),f(a,L),f(o,R),f(s,j),f(c,M),f(l,I),f(u,ne),t.rawphysicspipeline_step(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,s.__wbg_ptr,c.__wbg_ptr,l.__wbg_ptr,u.__wbg_ptr)}stepWithEvents(e,n,r,i,a,s,c,l,u,d,p,m,h,g){f(e,V),f(n,N),f(r,F),f(i,A),f(a,L),f(s,R),f(c,j),f(l,M),f(u,I),f(d,ne),f(p,ye),t.rawphysicspipeline_stepWithEvents(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,s.__wbg_ptr,c.__wbg_ptr,l.__wbg_ptr,u.__wbg_ptr,d.__wbg_ptr,p.__wbg_ptr,o(m),o(h),o(g))}},Ae=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawpidcontroller_free(e>>>0,1)),je=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ae.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawpidcontroller_free(e,0)}constructor(e,n,r,i){let a=t.rawpidcontroller_new(e,n,r,i);return this.__wbg_ptr=a>>>0,Ae.register(this,this.__wbg_ptr,this),this}set_kp(e,n){t.rawpidcontroller_set_kp(this.__wbg_ptr,e,n)}set_ki(e,n){t.rawpidcontroller_set_ki(this.__wbg_ptr,e,n)}set_kd(e,n){t.rawpidcontroller_set_kd(this.__wbg_ptr,e,n)}set_axes_mask(e){t.rawpidcontroller_set_axes_mask(this.__wbg_ptr,e)}reset_integrals(){t.rawpidcontroller_reset_integrals(this.__wbg_ptr)}apply_linear_correction(e,n,r,i,a){f(n,R),f(i,V),f(a,V),t.rawpidcontroller_apply_linear_correction(this.__wbg_ptr,e,n.__wbg_ptr,r,i.__wbg_ptr,a.__wbg_ptr)}apply_angular_correction(e,n,r,i,a){f(n,R),f(i,z),f(a,V),t.rawpidcontroller_apply_angular_correction(this.__wbg_ptr,e,n.__wbg_ptr,r,i.__wbg_ptr,a.__wbg_ptr)}linear_correction(e,n,r,i,a){f(n,R),f(i,V),f(a,V);let o=t.rawpidcontroller_linear_correction(this.__wbg_ptr,e,n.__wbg_ptr,r,i.__wbg_ptr,a.__wbg_ptr);return V.__wrap(o)}angular_correction(e,n,r,i,a){f(n,R),f(i,z),f(a,V);let o=t.rawpidcontroller_angular_correction(this.__wbg_ptr,e,n.__wbg_ptr,r,i.__wbg_ptr,a.__wbg_ptr);return V.__wrap(o)}},Me=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawpointcolliderprojection_free(e>>>0,1)),Ne=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Me.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Me.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawpointcolliderprojection_free(e,0)}colliderHandle(){return t.rawpointcolliderprojection_colliderHandle(this.__wbg_ptr)}point(){let e=t.rawpointcolliderprojection_point(this.__wbg_ptr);return V.__wrap(e)}isInside(){return t.rawpointcolliderprojection_isInside(this.__wbg_ptr)!==0}featureType(){return t.rawpointcolliderprojection_featureType(this.__wbg_ptr)}featureId(){let e=t.rawpointcolliderprojection_featureId(this.__wbg_ptr);return e===4294967297?void 0:e}},Pe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawpointprojection_free(e>>>0,1)),Fe=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Pe.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Pe.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawpointprojection_free(e,0)}point(){let e=t.rawpointprojection_point(this.__wbg_ptr);return V.__wrap(e)}isInside(){return t.rawpointprojection_isInside(this.__wbg_ptr)!==0}},Ie=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawraycolliderhit_free(e>>>0,1)),Le=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Ie.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ie.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawraycolliderhit_free(e,0)}colliderHandle(){return t.rawcharactercollision_handle(this.__wbg_ptr)}timeOfImpact(){return t.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}},Re=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawraycolliderintersection_free(e>>>0,1)),ze=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Re.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Re.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawraycolliderintersection_free(e,0)}colliderHandle(){return t.rawpointcolliderprojection_colliderHandle(this.__wbg_ptr)}normal(){let e=t.rawcollidershapecasthit_witness1(this.__wbg_ptr);return V.__wrap(e)}time_of_impact(){return t.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}featureType(){return t.rawpointcolliderprojection_featureType(this.__wbg_ptr)}featureId(){let e=t.rawpointcolliderprojection_featureId(this.__wbg_ptr);return e===4294967297?void 0:e}},Be=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawrayintersection_free(e>>>0,1)),Ve=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Be.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Be.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawrayintersection_free(e,0)}normal(){let e=t.rawcollidershapecasthit_witness1(this.__wbg_ptr);return V.__wrap(e)}time_of_impact(){return t.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}featureType(){return t.rawpointcolliderprojection_featureType(this.__wbg_ptr)}featureId(){let e=t.rawpointcolliderprojection_featureId(this.__wbg_ptr);return e===4294967297?void 0:e}},He=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawrigidbodyset_free(e>>>0,1)),R=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,He.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,He.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawrigidbodyset_free(e,0)}rbTranslation(e){let n=t.rawrigidbodyset_rbTranslation(this.__wbg_ptr,e);return V.__wrap(n)}rbRotation(e){let n=t.rawrigidbodyset_rbRotation(this.__wbg_ptr,e);return z.__wrap(n)}rbSleep(e){t.rawrigidbodyset_rbSleep(this.__wbg_ptr,e)}rbIsSleeping(e){return t.rawrigidbodyset_rbIsSleeping(this.__wbg_ptr,e)!==0}rbIsMoving(e){return t.rawrigidbodyset_rbIsMoving(this.__wbg_ptr,e)!==0}rbNextTranslation(e){let n=t.rawrigidbodyset_rbNextTranslation(this.__wbg_ptr,e);return V.__wrap(n)}rbNextRotation(e){let n=t.rawrigidbodyset_rbNextRotation(this.__wbg_ptr,e);return z.__wrap(n)}rbSetTranslation(e,n,r,i,a){t.rawrigidbodyset_rbSetTranslation(this.__wbg_ptr,e,n,r,i,a)}rbSetRotation(e,n,r,i,a,o){t.rawrigidbodyset_rbSetRotation(this.__wbg_ptr,e,n,r,i,a,o)}rbSetLinvel(e,n,r){f(n,V),t.rawrigidbodyset_rbSetLinvel(this.__wbg_ptr,e,n.__wbg_ptr,r)}rbSetAngvel(e,n,r){f(n,V),t.rawrigidbodyset_rbSetAngvel(this.__wbg_ptr,e,n.__wbg_ptr,r)}rbSetNextKinematicTranslation(e,n,r,i){t.rawrigidbodyset_rbSetNextKinematicTranslation(this.__wbg_ptr,e,n,r,i)}rbSetNextKinematicRotation(e,n,r,i,a){t.rawrigidbodyset_rbSetNextKinematicRotation(this.__wbg_ptr,e,n,r,i,a)}rbRecomputeMassPropertiesFromColliders(e,n){f(n,j),t.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr,e,n.__wbg_ptr)}rbSetAdditionalMass(e,n,r){t.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr,e,n,r)}rbSetAdditionalMassProperties(e,n,r,i,a,o){f(r,V),f(i,V),f(a,z),t.rawrigidbodyset_rbSetAdditionalMassProperties(this.__wbg_ptr,e,n,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o)}rbLinvel(e){let n=t.rawrigidbodyset_rbLinvel(this.__wbg_ptr,e);return V.__wrap(n)}rbAngvel(e){let n=t.rawrigidbodyset_rbAngvel(this.__wbg_ptr,e);return V.__wrap(n)}rbVelocityAtPoint(e,n){f(n,V);let r=t.rawrigidbodyset_rbVelocityAtPoint(this.__wbg_ptr,e,n.__wbg_ptr);return V.__wrap(r)}rbLockTranslations(e,n,r){t.rawrigidbodyset_rbLockTranslations(this.__wbg_ptr,e,n,r)}rbSetEnabledTranslations(e,n,r,i,a){t.rawrigidbodyset_rbSetEnabledTranslations(this.__wbg_ptr,e,n,r,i,a)}rbLockRotations(e,n,r){t.rawrigidbodyset_rbLockRotations(this.__wbg_ptr,e,n,r)}rbSetEnabledRotations(e,n,r,i,a){t.rawrigidbodyset_rbSetEnabledRotations(this.__wbg_ptr,e,n,r,i,a)}rbDominanceGroup(e){return t.rawrigidbodyset_rbDominanceGroup(this.__wbg_ptr,e)}rbSetDominanceGroup(e,n){t.rawrigidbodyset_rbSetDominanceGroup(this.__wbg_ptr,e,n)}rbEnableCcd(e,n){t.rawrigidbodyset_rbEnableCcd(this.__wbg_ptr,e,n)}rbSetSoftCcdPrediction(e,n){t.rawrigidbodyset_rbSetSoftCcdPrediction(this.__wbg_ptr,e,n)}rbMass(e){return t.rawrigidbodyset_rbMass(this.__wbg_ptr,e)}rbInvMass(e){return t.rawrigidbodyset_rbInvMass(this.__wbg_ptr,e)}rbEffectiveInvMass(e){let n=t.rawrigidbodyset_rbEffectiveInvMass(this.__wbg_ptr,e);return V.__wrap(n)}rbLocalCom(e){let n=t.rawrigidbodyset_rbLocalCom(this.__wbg_ptr,e);return V.__wrap(n)}rbWorldCom(e){let n=t.rawrigidbodyset_rbWorldCom(this.__wbg_ptr,e);return V.__wrap(n)}rbInvPrincipalInertia(e){let n=t.rawrigidbodyset_rbInvPrincipalInertia(this.__wbg_ptr,e);return V.__wrap(n)}rbPrincipalInertiaLocalFrame(e){let n=t.rawrigidbodyset_rbPrincipalInertiaLocalFrame(this.__wbg_ptr,e);return z.__wrap(n)}rbPrincipalInertia(e){let n=t.rawrigidbodyset_rbPrincipalInertia(this.__wbg_ptr,e);return V.__wrap(n)}rbEffectiveWorldInvInertia(e){let n=t.rawrigidbodyset_rbEffectiveWorldInvInertia(this.__wbg_ptr,e);return Ge.__wrap(n)}rbEffectiveAngularInertia(e){let n=t.rawrigidbodyset_rbEffectiveAngularInertia(this.__wbg_ptr,e);return Ge.__wrap(n)}rbWakeUp(e){t.rawrigidbodyset_rbWakeUp(this.__wbg_ptr,e)}rbIsCcdEnabled(e){return t.rawrigidbodyset_rbIsCcdEnabled(this.__wbg_ptr,e)!==0}rbSoftCcdPrediction(e){return t.rawrigidbodyset_rbSoftCcdPrediction(this.__wbg_ptr,e)}rbNumColliders(e){return t.rawrigidbodyset_rbNumColliders(this.__wbg_ptr,e)>>>0}rbCollider(e,n){return t.rawrigidbodyset_rbCollider(this.__wbg_ptr,e,n)}rbBodyType(e){return t.rawrigidbodyset_rbBodyType(this.__wbg_ptr,e)}rbSetBodyType(e,n,r){t.rawrigidbodyset_rbSetBodyType(this.__wbg_ptr,e,n,r)}rbIsFixed(e){return t.rawrigidbodyset_rbIsFixed(this.__wbg_ptr,e)!==0}rbIsKinematic(e){return t.rawrigidbodyset_rbIsKinematic(this.__wbg_ptr,e)!==0}rbIsDynamic(e){return t.rawrigidbodyset_rbIsDynamic(this.__wbg_ptr,e)!==0}rbLinearDamping(e){return t.rawrigidbodyset_rbLinearDamping(this.__wbg_ptr,e)}rbAngularDamping(e){return t.rawrigidbodyset_rbAngularDamping(this.__wbg_ptr,e)}rbSetLinearDamping(e,n){t.rawrigidbodyset_rbSetLinearDamping(this.__wbg_ptr,e,n)}rbSetAngularDamping(e,n){t.rawrigidbodyset_rbSetAngularDamping(this.__wbg_ptr,e,n)}rbSetEnabled(e,n){t.rawrigidbodyset_rbSetEnabled(this.__wbg_ptr,e,n)}rbIsEnabled(e){return t.rawrigidbodyset_rbIsEnabled(this.__wbg_ptr,e)!==0}rbGravityScale(e){return t.rawrigidbodyset_rbGravityScale(this.__wbg_ptr,e)}rbSetGravityScale(e,n,r){t.rawrigidbodyset_rbSetGravityScale(this.__wbg_ptr,e,n,r)}rbResetForces(e,n){t.rawrigidbodyset_rbResetForces(this.__wbg_ptr,e,n)}rbResetTorques(e,n){t.rawrigidbodyset_rbResetTorques(this.__wbg_ptr,e,n)}rbAddForce(e,n,r){f(n,V),t.rawrigidbodyset_rbAddForce(this.__wbg_ptr,e,n.__wbg_ptr,r)}rbApplyImpulse(e,n,r){f(n,V),t.rawrigidbodyset_rbApplyImpulse(this.__wbg_ptr,e,n.__wbg_ptr,r)}rbAddTorque(e,n,r){f(n,V),t.rawrigidbodyset_rbAddTorque(this.__wbg_ptr,e,n.__wbg_ptr,r)}rbApplyTorqueImpulse(e,n,r){f(n,V),t.rawrigidbodyset_rbApplyTorqueImpulse(this.__wbg_ptr,e,n.__wbg_ptr,r)}rbAddForceAtPoint(e,n,r,i){f(n,V),f(r,V),t.rawrigidbodyset_rbAddForceAtPoint(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i)}rbApplyImpulseAtPoint(e,n,r,i){f(n,V),f(r,V),t.rawrigidbodyset_rbApplyImpulseAtPoint(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i)}rbAdditionalSolverIterations(e){return t.rawrigidbodyset_rbAdditionalSolverIterations(this.__wbg_ptr,e)>>>0}rbSetAdditionalSolverIterations(e,n){t.rawrigidbodyset_rbSetAdditionalSolverIterations(this.__wbg_ptr,e,n)}rbUserData(e){return t.rawrigidbodyset_rbUserData(this.__wbg_ptr,e)>>>0}rbSetUserData(e,n){t.rawrigidbodyset_rbSetUserData(this.__wbg_ptr,e,n)}rbUserForce(e){let n=t.rawrigidbodyset_rbUserForce(this.__wbg_ptr,e);return V.__wrap(n)}rbUserTorque(e){let n=t.rawrigidbodyset_rbUserTorque(this.__wbg_ptr,e);return V.__wrap(n)}constructor(){let e=t.rawrigidbodyset_new();return this.__wbg_ptr=e>>>0,He.register(this,this.__wbg_ptr,this),this}createRigidBody(e,n,r,i,a,o,s,c,l,u,d,p,m,h,g,_,v,y,b,x,S,ee,C,w,T,E){return f(n,V),f(r,z),f(s,V),f(c,V),f(l,V),f(u,V),f(d,z),t.rawrigidbodyset_createRigidBody(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i,a,o,s.__wbg_ptr,c.__wbg_ptr,l.__wbg_ptr,u.__wbg_ptr,d.__wbg_ptr,p,m,h,g,_,v,y,b,x,S,ee,C,w,T,E)}remove(e,n,r,i,a){f(n,F),f(r,j),f(i,M),f(a,I),t.rawrigidbodyset_remove(this.__wbg_ptr,e,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr)}len(){return t.rawrigidbodyset_len(this.__wbg_ptr)>>>0}contains(e){return t.rawrigidbodyset_contains(this.__wbg_ptr,e)!==0}forEachRigidBodyHandle(e){try{t.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr,m(e))}finally{r[p++]=void 0}}propagateModifiedBodyPositionsToColliders(e){f(e,j),t.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr,e.__wbg_ptr)}},Ue=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawrotation_free(e>>>0,1)),z=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Ue.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ue.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawrotation_free(e,0)}constructor(e,n,r,i){let a=t.rawrotation_new(e,n,r,i);return this.__wbg_ptr=a>>>0,Ue.register(this,this.__wbg_ptr,this),this}static identity(){let n=t.rawrotation_identity();return e.__wrap(n)}get x(){return t.rawintegrationparameters_dt(this.__wbg_ptr)}get y(){return t.rawkinematiccharactercontroller_offset(this.__wbg_ptr)}get z(){return t.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}get w(){return t.rawrotation_w(this.__wbg_ptr)}},We=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawsdpmatrix3_free(e>>>0,1)),Ge=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,We.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,We.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawsdpmatrix3_free(e,0)}elements(){return d(t.rawsdpmatrix3_elements(this.__wbg_ptr))}},Ke=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawserializationpipeline_free(e>>>0,1)),qe=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ke.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawserializationpipeline_free(e,0)}constructor(){let e=t.rawccdsolver_new();return this.__wbg_ptr=e>>>0,Ke.register(this,this.__wbg_ptr,this),this}serializeAll(e,n,r,i,a,o,s,c,l){return f(e,V),f(n,N),f(r,F),f(i,A),f(a,L),f(o,R),f(s,j),f(c,M),f(l,I),d(t.rawserializationpipeline_serializeAll(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,s.__wbg_ptr,c.__wbg_ptr,l.__wbg_ptr))}deserializeAll(e){let n=t.rawserializationpipeline_deserializeAll(this.__wbg_ptr,o(e));return n===0?void 0:he.__wrap(n)}},Je=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawshape_free(e>>>0,1)),B=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Je.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Je.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawshape_free(e,0)}static cuboid(n,r,i){let a=t.rawshape_cuboid(n,r,i);return e.__wrap(a)}static roundCuboid(n,r,i,a){let o=t.rawshape_roundCuboid(n,r,i,a);return e.__wrap(o)}static ball(n){let r=t.rawshape_ball(n);return e.__wrap(r)}static halfspace(n){f(n,V);let r=t.rawshape_halfspace(n.__wbg_ptr);return e.__wrap(r)}static capsule(n,r){let i=t.rawshape_capsule(n,r);return e.__wrap(i)}static cylinder(n,r){let i=t.rawshape_cylinder(n,r);return e.__wrap(i)}static roundCylinder(n,r,i){let a=t.rawshape_roundCylinder(n,r,i);return e.__wrap(a)}static cone(n,r){let i=t.rawshape_cone(n,r);return e.__wrap(i)}static roundCone(n,r,i){let a=t.rawshape_roundCone(n,r,i);return e.__wrap(a)}static voxels(n,r){f(n,V);let i=w(r,t.__wbindgen_export_2),a=C,o=t.rawshape_voxels(n.__wbg_ptr,i,a);return e.__wrap(o)}static voxelsFromPoints(n,r){f(n,V);let i=T(r,t.__wbindgen_export_2),a=C,o=t.rawshape_voxelsFromPoints(n.__wbg_ptr,i,a);return e.__wrap(o)}static polyline(n,r){let i=T(n,t.__wbindgen_export_2),a=C,o=w(r,t.__wbindgen_export_2),s=C,c=t.rawshape_polyline(i,a,o,s);return e.__wrap(c)}static trimesh(n,r,i){let a=T(n,t.__wbindgen_export_2),o=C,s=w(r,t.__wbindgen_export_2),c=C,l=t.rawshape_trimesh(a,o,s,c,i);return l===0?void 0:e.__wrap(l)}static heightfield(n,r,i,a,o){let s=T(i,t.__wbindgen_export_2),c=C;f(a,V);let l=t.rawshape_heightfield(n,r,s,c,a.__wbg_ptr,o);return e.__wrap(l)}static segment(n,r){f(n,V),f(r,V);let i=t.rawshape_segment(n.__wbg_ptr,r.__wbg_ptr);return e.__wrap(i)}static triangle(n,r,i){f(n,V),f(r,V),f(i,V);let a=t.rawshape_triangle(n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr);return e.__wrap(a)}static roundTriangle(n,r,i,a){f(n,V),f(r,V),f(i,V);let o=t.rawshape_roundTriangle(n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a);return e.__wrap(o)}static convexHull(n){let r=T(n,t.__wbindgen_export_2),i=C,a=t.rawshape_convexHull(r,i);return a===0?void 0:e.__wrap(a)}static roundConvexHull(n,r){let i=T(n,t.__wbindgen_export_2),a=C,o=t.rawshape_roundConvexHull(i,a,r);return o===0?void 0:e.__wrap(o)}static convexMesh(n,r){let i=T(n,t.__wbindgen_export_2),a=C,o=w(r,t.__wbindgen_export_2),s=C,c=t.rawshape_convexMesh(i,a,o,s);return c===0?void 0:e.__wrap(c)}static roundConvexMesh(n,r,i){let a=T(n,t.__wbindgen_export_2),o=C,s=w(r,t.__wbindgen_export_2),c=C,l=t.rawshape_roundConvexMesh(a,o,s,c,i);return l===0?void 0:e.__wrap(l)}castShape(n,r,i,a,o,s,c,l,u,d){f(n,V),f(r,z),f(i,V),f(a,e),f(o,V),f(s,z),f(c,V);let p=t.rawshape_castShape(this.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,s.__wbg_ptr,c.__wbg_ptr,l,u,d);return p===0?void 0:Xe.__wrap(p)}intersectsShape(n,r,i,a,o){return f(n,V),f(r,z),f(i,e),f(a,V),f(o,z),t.rawshape_intersectsShape(this.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr)!==0}contactShape(n,r,i,a,o,s){f(n,V),f(r,z),f(i,e),f(a,V),f(o,z);let c=t.rawshape_contactShape(this.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a.__wbg_ptr,o.__wbg_ptr,s);return c===0?void 0:Qe.__wrap(c)}containsPoint(e,n,r){return f(e,V),f(n,z),f(r,V),t.rawshape_containsPoint(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr)!==0}projectPoint(e,n,r,i){f(e,V),f(n,z),f(r,V);let a=t.rawshape_projectPoint(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i);return Fe.__wrap(a)}intersectsRay(e,n,r,i,a){return f(e,V),f(n,z),f(r,V),f(i,V),t.rawshape_intersectsRay(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a)!==0}castRay(e,n,r,i,a,o){return f(e,V),f(n,z),f(r,V),f(i,V),t.rawshape_castRay(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a,o)}castRayAndGetNormal(e,n,r,i,a,o){f(e,V),f(n,z),f(r,V),f(i,V);let s=t.rawshape_castRayAndGetNormal(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,a,o);return s===0?void 0:Ve.__wrap(s)}},Ye=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawshapecasthit_free(e>>>0,1)),Xe=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Ye.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ye.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawshapecasthit_free(e,0)}time_of_impact(){return t.rawintegrationparameters_dt(this.__wbg_ptr)}witness1(){let e=t.rawshapecasthit_witness1(this.__wbg_ptr);return V.__wrap(e)}witness2(){let e=t.rawcontactforceevent_total_force(this.__wbg_ptr);return V.__wrap(e)}normal1(){let e=t.rawshapecasthit_normal1(this.__wbg_ptr);return V.__wrap(e)}normal2(){let e=t.rawshapecasthit_normal2(this.__wbg_ptr);return V.__wrap(e)}},Ze=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawshapecontact_free(e>>>0,1)),Qe=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,Ze.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ze.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawshapecontact_free(e,0)}distance(){return t.rawkinematiccharactercontroller_maxSlopeClimbAngle(this.__wbg_ptr)}point1(){let e=t.rawpointprojection_point(this.__wbg_ptr);return V.__wrap(e)}point2(){let e=t.rawcollidershapecasthit_witness1(this.__wbg_ptr);return V.__wrap(e)}normal1(){let e=t.rawcollidershapecasthit_witness2(this.__wbg_ptr);return V.__wrap(e)}normal2(){let e=t.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);return V.__wrap(e)}},$e=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>t.__wbg_rawvector_free(e>>>0,1)),V=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,$e.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,$e.unregister(this),e}free(){let e=this.__destroy_into_raw();t.__wbg_rawvector_free(e,0)}static zero(){let n=t.rawvector_zero();return e.__wrap(n)}constructor(e,n,r){let i=t.rawvector_new(e,n,r);return this.__wbg_ptr=i>>>0,$e.register(this,this.__wbg_ptr,this),this}get x(){return t.rawintegrationparameters_dt(this.__wbg_ptr)}set x(e){t.rawintegrationparameters_set_dt(this.__wbg_ptr,e)}get y(){return t.rawkinematiccharactercontroller_offset(this.__wbg_ptr)}set y(e){t.rawvector_set_y(this.__wbg_ptr,e)}get z(){return t.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}set z(e){t.rawvector_set_z(this.__wbg_ptr,e)}xyz(){let n=t.rawvector_xyz(this.__wbg_ptr);return e.__wrap(n)}yxz(){let n=t.rawvector_yxz(this.__wbg_ptr);return e.__wrap(n)}zxy(){let n=t.rawvector_zxy(this.__wbg_ptr);return e.__wrap(n)}xzy(){let n=t.rawvector_xzy(this.__wbg_ptr);return e.__wrap(n)}yzx(){let n=t.rawvector_yzx(this.__wbg_ptr);return e.__wrap(n)}zyx(){let n=t.rawvector_zyx(this.__wbg_ptr);return e.__wrap(n)}};n(e);var et=class{constructor(e,t,n){this.x=e,this.y=t,this.z=n}},H=class e{static new(e,t,n){return new et(e,t,n)}static intoRaw(e){return new V(e.x,e.y,e.z)}static zeros(){return e.new(0,0,0)}static fromRaw(t){if(!t)return null;let n=e.new(t.x,t.y,t.z);return t.free(),n}static copy(e,t){e.x=t.x,e.y=t.y,e.z=t.z}},tt=class{constructor(e,t,n,r){this.x=e,this.y=t,this.z=n,this.w=r}},U=class{static identity(){return new tt(0,0,0,1)}static fromRaw(e){if(!e)return null;let t=new tt(e.x,e.y,e.z,e.w);return e.free(),t}static intoRaw(e){return new z(e.x,e.y,e.z,e.w)}static copy(e,t){e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w}},nt=class{get m11(){return this.elements[0]}get m12(){return this.elements[1]}get m21(){return this.m12}get m13(){return this.elements[2]}get m31(){return this.m13}get m22(){return this.elements[3]}get m23(){return this.elements[4]}get m32(){return this.m23}get m33(){return this.elements[5]}constructor(e){this.elements=e}},rt=class{static fromRaw(e){let t=new nt(e.elements());return e.free(),t}},W;(function(e){e[e.Dynamic=0]=`Dynamic`,e[e.Fixed=1]=`Fixed`,e[e.KinematicPositionBased=2]=`KinematicPositionBased`,e[e.KinematicVelocityBased=3]=`KinematicVelocityBased`})(W||(W={}));var it=class{constructor(e,t,n){this.rawSet=e,this.colliderSet=t,this.handle=n}finalizeDeserialization(e){this.colliderSet=e}isValid(){return this.rawSet.contains(this.handle)}lockTranslations(e,t){return this.rawSet.rbLockTranslations(this.handle,e,t)}lockRotations(e,t){return this.rawSet.rbLockRotations(this.handle,e,t)}setEnabledTranslations(e,t,n,r){return this.rawSet.rbSetEnabledTranslations(this.handle,e,t,n,r)}restrictTranslations(e,t,n,r){this.setEnabledTranslations(e,t,n,r)}setEnabledRotations(e,t,n,r){return this.rawSet.rbSetEnabledRotations(this.handle,e,t,n,r)}restrictRotations(e,t,n,r){this.setEnabledRotations(e,t,n,r)}dominanceGroup(){return this.rawSet.rbDominanceGroup(this.handle)}setDominanceGroup(e){this.rawSet.rbSetDominanceGroup(this.handle,e)}additionalSolverIterations(){return this.rawSet.rbAdditionalSolverIterations(this.handle)}setAdditionalSolverIterations(e){this.rawSet.rbSetAdditionalSolverIterations(this.handle,e)}enableCcd(e){this.rawSet.rbEnableCcd(this.handle,e)}setSoftCcdPrediction(e){this.rawSet.rbSetSoftCcdPrediction(this.handle,e)}softCcdPrediction(){return this.rawSet.rbSoftCcdPrediction(this.handle)}translation(){let e=this.rawSet.rbTranslation(this.handle);return H.fromRaw(e)}rotation(){let e=this.rawSet.rbRotation(this.handle);return U.fromRaw(e)}nextTranslation(){let e=this.rawSet.rbNextTranslation(this.handle);return H.fromRaw(e)}nextRotation(){let e=this.rawSet.rbNextRotation(this.handle);return U.fromRaw(e)}setTranslation(e,t){this.rawSet.rbSetTranslation(this.handle,e.x,e.y,e.z,t)}setLinvel(e,t){let n=H.intoRaw(e);this.rawSet.rbSetLinvel(this.handle,n,t),n.free()}gravityScale(){return this.rawSet.rbGravityScale(this.handle)}setGravityScale(e,t){this.rawSet.rbSetGravityScale(this.handle,e,t)}setRotation(e,t){this.rawSet.rbSetRotation(this.handle,e.x,e.y,e.z,e.w,t)}setAngvel(e,t){let n=H.intoRaw(e);this.rawSet.rbSetAngvel(this.handle,n,t),n.free()}setNextKinematicTranslation(e){this.rawSet.rbSetNextKinematicTranslation(this.handle,e.x,e.y,e.z)}setNextKinematicRotation(e){this.rawSet.rbSetNextKinematicRotation(this.handle,e.x,e.y,e.z,e.w)}linvel(){return H.fromRaw(this.rawSet.rbLinvel(this.handle))}velocityAtPoint(e){let t=H.intoRaw(e),n=H.fromRaw(this.rawSet.rbVelocityAtPoint(this.handle,t));return t.free(),n}angvel(){return H.fromRaw(this.rawSet.rbAngvel(this.handle))}mass(){return this.rawSet.rbMass(this.handle)}effectiveInvMass(){return H.fromRaw(this.rawSet.rbEffectiveInvMass(this.handle))}invMass(){return this.rawSet.rbInvMass(this.handle)}localCom(){return H.fromRaw(this.rawSet.rbLocalCom(this.handle))}worldCom(){return H.fromRaw(this.rawSet.rbWorldCom(this.handle))}invPrincipalInertia(){return H.fromRaw(this.rawSet.rbInvPrincipalInertia(this.handle))}principalInertia(){return H.fromRaw(this.rawSet.rbPrincipalInertia(this.handle))}principalInertiaLocalFrame(){return U.fromRaw(this.rawSet.rbPrincipalInertiaLocalFrame(this.handle))}effectiveWorldInvInertia(){return rt.fromRaw(this.rawSet.rbEffectiveWorldInvInertia(this.handle))}effectiveAngularInertia(){return rt.fromRaw(this.rawSet.rbEffectiveAngularInertia(this.handle))}sleep(){this.rawSet.rbSleep(this.handle)}wakeUp(){this.rawSet.rbWakeUp(this.handle)}isCcdEnabled(){return this.rawSet.rbIsCcdEnabled(this.handle)}numColliders(){return this.rawSet.rbNumColliders(this.handle)}collider(e){return this.colliderSet.get(this.rawSet.rbCollider(this.handle,e))}setEnabled(e){this.rawSet.rbSetEnabled(this.handle,e)}isEnabled(){return this.rawSet.rbIsEnabled(this.handle)}bodyType(){return this.rawSet.rbBodyType(this.handle)}setBodyType(e,t){return this.rawSet.rbSetBodyType(this.handle,e,t)}isSleeping(){return this.rawSet.rbIsSleeping(this.handle)}isMoving(){return this.rawSet.rbIsMoving(this.handle)}isFixed(){return this.rawSet.rbIsFixed(this.handle)}isKinematic(){return this.rawSet.rbIsKinematic(this.handle)}isDynamic(){return this.rawSet.rbIsDynamic(this.handle)}linearDamping(){return this.rawSet.rbLinearDamping(this.handle)}angularDamping(){return this.rawSet.rbAngularDamping(this.handle)}setLinearDamping(e){this.rawSet.rbSetLinearDamping(this.handle,e)}recomputeMassPropertiesFromColliders(){this.rawSet.rbRecomputeMassPropertiesFromColliders(this.handle,this.colliderSet.raw)}setAdditionalMass(e,t){this.rawSet.rbSetAdditionalMass(this.handle,e,t)}setAdditionalMassProperties(e,t,n,r,i){let a=H.intoRaw(t),o=H.intoRaw(n),s=U.intoRaw(r);this.rawSet.rbSetAdditionalMassProperties(this.handle,e,a,o,s,i),a.free(),o.free(),s.free()}setAngularDamping(e){this.rawSet.rbSetAngularDamping(this.handle,e)}resetForces(e){this.rawSet.rbResetForces(this.handle,e)}resetTorques(e){this.rawSet.rbResetTorques(this.handle,e)}addForce(e,t){let n=H.intoRaw(e);this.rawSet.rbAddForce(this.handle,n,t),n.free()}applyImpulse(e,t){let n=H.intoRaw(e);this.rawSet.rbApplyImpulse(this.handle,n,t),n.free()}addTorque(e,t){let n=H.intoRaw(e);this.rawSet.rbAddTorque(this.handle,n,t),n.free()}applyTorqueImpulse(e,t){let n=H.intoRaw(e);this.rawSet.rbApplyTorqueImpulse(this.handle,n,t),n.free()}addForceAtPoint(e,t,n){let r=H.intoRaw(e),i=H.intoRaw(t);this.rawSet.rbAddForceAtPoint(this.handle,r,i,n),r.free(),i.free()}applyImpulseAtPoint(e,t,n){let r=H.intoRaw(e),i=H.intoRaw(t);this.rawSet.rbApplyImpulseAtPoint(this.handle,r,i,n),r.free(),i.free()}userForce(){return H.fromRaw(this.rawSet.rbUserForce(this.handle))}userTorque(){return H.fromRaw(this.rawSet.rbUserTorque(this.handle))}},at=class e{constructor(e){this.enabled=!0,this.status=e,this.translation=H.zeros(),this.rotation=U.identity(),this.gravityScale=1,this.linvel=H.zeros(),this.mass=0,this.massOnly=!1,this.centerOfMass=H.zeros(),this.translationsEnabledX=!0,this.translationsEnabledY=!0,this.angvel=H.zeros(),this.principalAngularInertia=H.zeros(),this.angularInertiaLocalFrame=U.identity(),this.translationsEnabledZ=!0,this.rotationsEnabledX=!0,this.rotationsEnabledY=!0,this.rotationsEnabledZ=!0,this.linearDamping=0,this.angularDamping=0,this.canSleep=!0,this.sleeping=!1,this.ccdEnabled=!1,this.softCcdPrediction=0,this.dominanceGroup=0,this.additionalSolverIterations=0}static dynamic(){return new e(W.Dynamic)}static kinematicPositionBased(){return new e(W.KinematicPositionBased)}static kinematicVelocityBased(){return new e(W.KinematicVelocityBased)}static fixed(){return new e(W.Fixed)}static newDynamic(){return new e(W.Dynamic)}static newKinematicPositionBased(){return new e(W.KinematicPositionBased)}static newKinematicVelocityBased(){return new e(W.KinematicVelocityBased)}static newStatic(){return new e(W.Fixed)}setDominanceGroup(e){return this.dominanceGroup=e,this}setAdditionalSolverIterations(e){return this.additionalSolverIterations=e,this}setEnabled(e){return this.enabled=e,this}setTranslation(e,t,n){if(typeof e!=`number`||typeof t!=`number`||typeof n!=`number`)throw TypeError(`The translation components must be numbers.`);return this.translation={x:e,y:t,z:n},this}setRotation(e){return U.copy(this.rotation,e),this}setGravityScale(e){return this.gravityScale=e,this}setAdditionalMass(e){return this.mass=e,this.massOnly=!0,this}setLinvel(e,t,n){if(typeof e!=`number`||typeof t!=`number`||typeof n!=`number`)throw TypeError(`The linvel components must be numbers.`);return this.linvel={x:e,y:t,z:n},this}setAngvel(e){return H.copy(this.angvel,e),this}setAdditionalMassProperties(e,t,n,r){return this.mass=e,H.copy(this.centerOfMass,t),H.copy(this.principalAngularInertia,n),U.copy(this.angularInertiaLocalFrame,r),this.massOnly=!1,this}enabledTranslations(e,t,n){return this.translationsEnabledX=e,this.translationsEnabledY=t,this.translationsEnabledZ=n,this}restrictTranslations(e,t,n){return this.enabledTranslations(e,t,n)}lockTranslations(){return this.enabledTranslations(!1,!1,!1)}enabledRotations(e,t,n){return this.rotationsEnabledX=e,this.rotationsEnabledY=t,this.rotationsEnabledZ=n,this}restrictRotations(e,t,n){return this.enabledRotations(e,t,n)}lockRotations(){return this.restrictRotations(!1,!1,!1)}setLinearDamping(e){return this.linearDamping=e,this}setAngularDamping(e){return this.angularDamping=e,this}setCanSleep(e){return this.canSleep=e,this}setSleeping(e){return this.sleeping=e,this}setCcdEnabled(e){return this.ccdEnabled=e,this}setSoftCcdPrediction(e){return this.softCcdPrediction=e,this}setUserData(e){return this.userData=e,this}},G=class{constructor(){this.fconv=new Float64Array(1),this.uconv=new Uint32Array(this.fconv.buffer),this.data=[],this.size=0}set(e,t){let n=this.index(e);for(;this.data.length<=n;)this.data.push(null);this.data[n]??(this.size+=1),this.data[n]=t}len(){return this.size}delete(e){let t=this.index(e);te!=null)}index(e){return this.fconv[0]=e,this.uconv[0]}},ot=class{free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}constructor(e){this.raw=e||new R,this.map=new G,e&&e.forEachRigidBodyHandle(t=>{this.map.set(t,new it(e,null,t))})}finalizeDeserialization(e){this.map.forEach(t=>t.finalizeDeserialization(e))}createRigidBody(e,t){let n=H.intoRaw(t.translation),r=U.intoRaw(t.rotation),i=H.intoRaw(t.linvel),a=H.intoRaw(t.centerOfMass),o=H.intoRaw(t.angvel),s=H.intoRaw(t.principalAngularInertia),c=U.intoRaw(t.angularInertiaLocalFrame),l=this.raw.createRigidBody(t.enabled,n,r,t.gravityScale,t.mass,t.massOnly,a,i,o,s,c,t.translationsEnabledX,t.translationsEnabledY,t.translationsEnabledZ,t.rotationsEnabledX,t.rotationsEnabledY,t.rotationsEnabledZ,t.linearDamping,t.angularDamping,t.status,t.canSleep,t.sleeping,t.softCcdPrediction,t.ccdEnabled,t.dominanceGroup,t.additionalSolverIterations);n.free(),r.free(),i.free(),a.free(),o.free(),s.free(),c.free();let u=new it(this.raw,e,l);return u.userData=t.userData,this.map.set(l,u),u}remove(e,t,n,r,i){for(let t=0;tr.unmap(e)),i.forEachJointHandleAttachedToRigidBody(e,e=>i.unmap(e)),this.raw.remove(e,t.raw,n.raw,r.raw,i.raw),this.map.delete(e)}len(){return this.map.len()}contains(e){return this.get(e)!=null}get(e){return this.map.get(e)}forEach(e){this.map.forEach(e)}forEachActiveRigidBody(e,t){e.forEachActiveRigidBodyHandle(e=>{t(this.get(e))})}getAll(){return this.map.getAll()}},st=class{constructor(e){this.raw=e||new N}free(){this.raw&&this.raw.free(),this.raw=void 0}get dt(){return this.raw.dt}get contact_erp(){return this.raw.contact_erp}get lengthUnit(){return this.raw.lengthUnit}get normalizedAllowedLinearError(){return this.raw.normalizedAllowedLinearError}get normalizedPredictionDistance(){return this.raw.normalizedPredictionDistance}get numSolverIterations(){return this.raw.numSolverIterations}get numInternalPgsIterations(){return this.raw.numInternalPgsIterations}get minIslandSize(){return this.raw.minIslandSize}get maxCcdSubsteps(){return this.raw.maxCcdSubsteps}set dt(e){this.raw.dt=e}set contact_natural_frequency(e){this.raw.contact_natural_frequency=e}set lengthUnit(e){this.raw.lengthUnit=e}set normalizedAllowedLinearError(e){this.raw.normalizedAllowedLinearError=e}set normalizedPredictionDistance(e){this.raw.normalizedPredictionDistance=e}set numSolverIterations(e){this.raw.numSolverIterations=e}set numInternalPgsIterations(e){this.raw.numInternalPgsIterations=e}set minIslandSize(e){this.raw.minIslandSize=e}set maxCcdSubsteps(e){this.raw.maxCcdSubsteps=e}},ct;(function(e){e[e.Revolute=0]=`Revolute`,e[e.Fixed=1]=`Fixed`,e[e.Prismatic=2]=`Prismatic`,e[e.Rope=3]=`Rope`,e[e.Spring=4]=`Spring`,e[e.Spherical=5]=`Spherical`,e[e.Generic=6]=`Generic`})(ct||(ct={}));var lt;(function(e){e[e.AccelerationBased=0]=`AccelerationBased`,e[e.ForceBased=1]=`ForceBased`})(lt||(lt={}));var ut;(function(e){e[e.LinX=1]=`LinX`,e[e.LinY=2]=`LinY`,e[e.LinZ=4]=`LinZ`,e[e.AngX=8]=`AngX`,e[e.AngY=16]=`AngY`,e[e.AngZ=32]=`AngZ`})(ut||(ut={}));var K=class e{constructor(e,t,n){this.rawSet=e,this.bodySet=t,this.handle=n}static newTyped(t,n,r){switch(t.jointType(r)){case D.Revolute:return new gt(t,n,r);case D.Prismatic:return new ht(t,n,r);case D.Fixed:return new ft(t,n,r);case D.Spring:return new mt(t,n,r);case D.Rope:return new pt(t,n,r);case D.Spherical:return new vt(t,n,r);case D.Generic:return new _t(t,n,r);default:return new e(t,n,r)}}finalizeDeserialization(e){this.bodySet=e}isValid(){return this.rawSet.contains(this.handle)}body1(){return this.bodySet.get(this.rawSet.jointBodyHandle1(this.handle))}body2(){return this.bodySet.get(this.rawSet.jointBodyHandle2(this.handle))}type(){return this.rawSet.jointType(this.handle)}frameX1(){return U.fromRaw(this.rawSet.jointFrameX1(this.handle))}frameX2(){return U.fromRaw(this.rawSet.jointFrameX2(this.handle))}anchor1(){return H.fromRaw(this.rawSet.jointAnchor1(this.handle))}anchor2(){return H.fromRaw(this.rawSet.jointAnchor2(this.handle))}setAnchor1(e){let t=H.intoRaw(e);this.rawSet.jointSetAnchor1(this.handle,t),t.free()}setAnchor2(e){let t=H.intoRaw(e);this.rawSet.jointSetAnchor2(this.handle,t),t.free()}setContactsEnabled(e){this.rawSet.jointSetContactsEnabled(this.handle,e)}contactsEnabled(){return this.rawSet.jointContactsEnabled(this.handle)}},dt=class extends K{limitsEnabled(){return this.rawSet.jointLimitsEnabled(this.handle,this.rawAxis())}limitsMin(){return this.rawSet.jointLimitsMin(this.handle,this.rawAxis())}limitsMax(){return this.rawSet.jointLimitsMax(this.handle,this.rawAxis())}setLimits(e,t){this.rawSet.jointSetLimits(this.handle,this.rawAxis(),e,t)}configureMotorModel(e){this.rawSet.jointConfigureMotorModel(this.handle,this.rawAxis(),e)}configureMotorVelocity(e,t){this.rawSet.jointConfigureMotorVelocity(this.handle,this.rawAxis(),e,t)}configureMotorPosition(e,t,n){this.rawSet.jointConfigureMotorPosition(this.handle,this.rawAxis(),e,t,n)}configureMotor(e,t,n,r){this.rawSet.jointConfigureMotor(this.handle,this.rawAxis(),e,t,n,r)}},ft=class extends K{},pt=class extends K{},mt=class extends K{},ht=class extends dt{rawAxis(){return E.LinX}},gt=class extends dt{rawAxis(){return E.AngX}},_t=class extends K{},vt=class extends K{},yt=class{free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}constructor(e){this.raw=e||new M,this.map=new G,e&&e.forEachJointHandle(t=>{this.map.set(t,K.newTyped(e,null,t))})}finalizeDeserialization(e){this.map.forEach(t=>t.finalizeDeserialization(e))}createJoint(e,t,n,r,i){let a=t.intoRaw(),o=this.raw.createJoint(a,n,r,i);a.free();let s=K.newTyped(this.raw,e,o);return this.map.set(o,s),s}remove(e,t){this.raw.remove(e,t),this.unmap(e)}forEachJointHandleAttachedToRigidBody(e,t){this.raw.forEachJointAttachedToRigidBody(e,t)}unmap(e){this.map.delete(e)}len(){return this.map.len()}contains(e){return this.get(e)!=null}get(e){return this.map.get(e)}forEach(e){this.map.forEach(e)}getAll(){return this.map.getAll()}},q=class e{constructor(e,t){this.rawSet=e,this.handle=t}static newTyped(t,n){switch(t.jointType(n)){case D.Revolute:return new Ct(t,n);case D.Prismatic:return new St(t,n);case D.Fixed:return new xt(t,n);case D.Spherical:return new wt(t,n);default:return new e(t,n)}}isValid(){return this.rawSet.contains(this.handle)}setContactsEnabled(e){this.rawSet.jointSetContactsEnabled(this.handle,e)}contactsEnabled(){return this.rawSet.jointContactsEnabled(this.handle)}},bt=class extends q{},xt=class extends q{},St=class extends bt{rawAxis(){return E.LinX}},Ct=class extends bt{rawAxis(){return E.AngX}},wt=class extends q{},Tt=class{free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}constructor(e){this.raw=e||new I,this.map=new G,e&&e.forEachJointHandle(e=>{this.map.set(e,q.newTyped(this.raw,e))})}createJoint(e,t,n,r){let i=e.intoRaw(),a=this.raw.createJoint(i,t,n,r);i.free();let o=q.newTyped(this.raw,a);return this.map.set(a,o),o}remove(e,t){this.raw.remove(e,t),this.map.delete(e)}unmap(e){this.map.delete(e)}len(){return this.map.len()}contains(e){return this.get(e)!=null}get(e){return this.map.get(e)}forEach(e){this.map.forEach(e)}forEachJointHandleAttachedToRigidBody(e,t){this.raw.forEachJointAttachedToRigidBody(e,t)}getAll(){return this.map.getAll()}},J;(function(e){e[e.Average=0]=`Average`,e[e.Min=1]=`Min`,e[e.Multiply=2]=`Multiply`,e[e.Max=3]=`Max`})(J||(J={}));var Et=class{free(){this.raw&&this.raw.free(),this.raw=void 0}constructor(e){this.raw=e||new ne}},Dt=class{free(){this.raw&&this.raw.free(),this.raw=void 0}constructor(e){this.raw=e||new F}forEachActiveRigidBodyHandle(e){this.raw.forEachActiveRigidBodyHandle(e)}},Y;(function(e){e[e.Vertex=0]=`Vertex`,e[e.Edge=1]=`Edge`,e[e.Face=2]=`Face`,e[e.Unknown=3]=`Unknown`})(Y||(Y={}));var Ot=class e{constructor(e,t,n,r){this.featureType=Y.Unknown,this.featureId=void 0,this.timeOfImpact=e,this.normal=t,r!==void 0&&(this.featureId=r),n!==void 0&&(this.featureType=n)}static fromRaw(t){if(!t)return null;let n=new e(t.time_of_impact(),H.fromRaw(t.normal()),t.featureType(),t.featureId());return t.free(),n}},kt=class e{constructor(e,t,n,r,i){this.featureType=Y.Unknown,this.featureId=void 0,this.collider=e,this.timeOfImpact=t,this.normal=n,i!==void 0&&(this.featureId=i),r!==void 0&&(this.featureType=r)}static fromRaw(t,n){if(!n)return null;let r=new e(t.get(n.colliderHandle()),n.time_of_impact(),H.fromRaw(n.normal()),n.featureType(),n.featureId());return n.free(),r}},At=class e{constructor(e,t){this.collider=e,this.timeOfImpact=t}static fromRaw(t,n){if(!n)return null;let r=new e(t.get(n.colliderHandle()),n.timeOfImpact());return n.free(),r}},jt=class e{constructor(e,t){this.point=e,this.isInside=t}static fromRaw(t){if(!t)return null;let n=new e(H.fromRaw(t.point()),t.isInside());return t.free(),n}},Mt=class e{constructor(e,t,n,r,i){this.featureType=Y.Unknown,this.featureId=void 0,this.collider=e,this.point=t,this.isInside=n,i!==void 0&&(this.featureId=i),r!==void 0&&(this.featureType=r)}static fromRaw(t,n){if(!n)return null;let r=new e(t.get(n.colliderHandle()),H.fromRaw(n.point()),n.isInside(),n.featureType(),n.featureId());return n.free(),r}},Nt=class e{constructor(e,t,n,r,i){this.time_of_impact=e,this.witness1=t,this.witness2=n,this.normal1=r,this.normal2=i}static fromRaw(t,n){if(!n)return null;let r=new e(n.time_of_impact(),H.fromRaw(n.witness1()),H.fromRaw(n.witness2()),H.fromRaw(n.normal1()),H.fromRaw(n.normal2()));return n.free(),r}},Pt=class e extends Nt{constructor(e,t,n,r,i,a){super(t,n,r,i,a),this.collider=e}static fromRaw(t,n){if(!n)return null;let r=new e(t.get(n.colliderHandle()),n.time_of_impact(),H.fromRaw(n.witness1()),H.fromRaw(n.witness2()),H.fromRaw(n.normal1()),H.fromRaw(n.normal2()));return n.free(),r}},Ft=class{free(){this.raw&&this.raw.free(),this.raw=void 0}constructor(e){this.raw=e||new A}castRay(e,t,n,r,i,a,o,s,c,l,u){let d=H.intoRaw(r.origin),f=H.intoRaw(r.dir),p=At.fromRaw(n,this.raw.castRay(e.raw,t.raw,n.raw,d,f,i,a,o,s,c,l,u));return d.free(),f.free(),p}castRayAndGetNormal(e,t,n,r,i,a,o,s,c,l,u){let d=H.intoRaw(r.origin),f=H.intoRaw(r.dir),p=kt.fromRaw(n,this.raw.castRayAndGetNormal(e.raw,t.raw,n.raw,d,f,i,a,o,s,c,l,u));return d.free(),f.free(),p}intersectionsWithRay(e,t,n,r,i,a,o,s,c,l,u,d){let f=H.intoRaw(r.origin),p=H.intoRaw(r.dir);this.raw.intersectionsWithRay(e.raw,t.raw,n.raw,f,p,i,a,e=>o(kt.fromRaw(n,e)),s,c,l,u,d),f.free(),p.free()}intersectionWithShape(e,t,n,r,i,a,o,s,c,l,u){let d=H.intoRaw(r),f=U.intoRaw(i),p=a.intoRaw(),m=this.raw.intersectionWithShape(e.raw,t.raw,n.raw,d,f,p,o,s,c,l,u);return d.free(),f.free(),p.free(),m}projectPoint(e,t,n,r,i,a,o,s,c,l){let u=H.intoRaw(r),d=Mt.fromRaw(n,this.raw.projectPoint(e.raw,t.raw,n.raw,u,i,a,o,s,c,l));return u.free(),d}projectPointAndGetFeature(e,t,n,r,i,a,o,s,c){let l=H.intoRaw(r),u=Mt.fromRaw(n,this.raw.projectPointAndGetFeature(e.raw,t.raw,n.raw,l,i,a,o,s,c));return l.free(),u}intersectionsWithPoint(e,t,n,r,i,a,o,s,c,l){let u=H.intoRaw(r);this.raw.intersectionsWithPoint(e.raw,t.raw,n.raw,u,i,a,o,s,c,l),u.free()}castShape(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){let h=H.intoRaw(r),g=U.intoRaw(i),_=H.intoRaw(a),v=o.intoRaw(),y=Pt.fromRaw(n,this.raw.castShape(e.raw,t.raw,n.raw,h,g,_,v,s,c,l,u,d,f,p,m));return h.free(),g.free(),_.free(),v.free(),y}intersectionsWithShape(e,t,n,r,i,a,o,s,c,l,u,d){let f=H.intoRaw(r),p=U.intoRaw(i),m=a.intoRaw();this.raw.intersectionsWithShape(e.raw,t.raw,n.raw,f,p,m,o,s,c,l,u,d),f.free(),p.free(),m.free()}collidersWithAabbIntersectingAabb(e,t,n,r,i,a){let o=H.intoRaw(r),s=H.intoRaw(i);this.raw.collidersWithAabbIntersectingAabb(e.raw,t.raw,n.raw,o,s,a),o.free(),s.free()}},It=class{free(){this.raw&&this.raw.free(),this.raw=void 0}constructor(e){this.raw=e||new L,this.tempManifold=new Lt(null)}contactPairsWith(e,t){this.raw.contact_pairs_with(e,t)}intersectionPairsWith(e,t){this.raw.intersection_pairs_with(e,t)}contactPair(e,t,n){let r=this.raw.contact_pair(e,t);if(r){let t=r.collider1()!=e,i;for(i=0;ie.free()),this.pidControllers.forEach(e=>e.free()),this.vehicleControllers.forEach(e=>e.free()),this.integrationParameters=void 0,this.islands=void 0,this.broadPhase=void 0,this.narrowPhase=void 0,this.bodies=void 0,this.colliders=void 0,this.ccdSolver=void 0,this.impulseJoints=void 0,this.multibodyJoints=void 0,this.physicsPipeline=void 0,this.serializationPipeline=void 0,this.debugRenderPipeline=void 0,this.characterControllers=void 0,this.pidControllers=void 0,this.vehicleControllers=void 0}constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.gravity=e,this.integrationParameters=new st(t),this.islands=new Dt(n),this.broadPhase=new Ft(r),this.narrowPhase=new It(i),this.bodies=new ot(a),this.colliders=new wn(o),this.impulseJoints=new yt(s),this.multibodyJoints=new Tt(c),this.ccdSolver=new Et(l),this.physicsPipeline=new an(u),this.serializationPipeline=new on(d),this.debugRenderPipeline=new cn(f),this.characterControllers=new Set,this.pidControllers=new Set,this.vehicleControllers=new Set,this.impulseJoints.finalizeDeserialization(this.bodies),this.bodies.finalizeDeserialization(this.colliders),this.colliders.finalizeDeserialization(this.bodies)}static fromRaw(t){return t?new e(H.fromRaw(t.takeGravity()),t.takeIntegrationParameters(),t.takeIslandManager(),t.takeBroadPhase(),t.takeNarrowPhase(),t.takeBodies(),t.takeColliders(),t.takeImpulseJoints(),t.takeMultibodyJoints()):null}takeSnapshot(){return this.serializationPipeline.serializeAll(this.gravity,this.integrationParameters,this.islands,this.broadPhase,this.narrowPhase,this.bodies,this.colliders,this.impulseJoints,this.multibodyJoints)}static restoreSnapshot(e){return new on().deserializeAll(e)}debugRender(e,t){return this.debugRenderPipeline.render(this.bodies,this.colliders,this.impulseJoints,this.multibodyJoints,this.narrowPhase,e,t),new sn(this.debugRenderPipeline.vertices,this.debugRenderPipeline.colors)}step(e,t){this.physicsPipeline.step(this.gravity,this.integrationParameters,this.islands,this.broadPhase,this.narrowPhase,this.bodies,this.colliders,this.impulseJoints,this.multibodyJoints,this.ccdSolver,e,t)}propagateModifiedBodyPositionsToColliders(){this.bodies.raw.propagateModifiedBodyPositionsToColliders(this.colliders.raw)}get timestep(){return this.integrationParameters.dt}set timestep(e){this.integrationParameters.dt=e}get lengthUnit(){return this.integrationParameters.lengthUnit}set lengthUnit(e){this.integrationParameters.lengthUnit=e}get numSolverIterations(){return this.integrationParameters.numSolverIterations}set numSolverIterations(e){this.integrationParameters.numSolverIterations=e}get numInternalPgsIterations(){return this.integrationParameters.numInternalPgsIterations}set numInternalPgsIterations(e){this.integrationParameters.numInternalPgsIterations=e}get maxCcdSubsteps(){return this.integrationParameters.maxCcdSubsteps}set maxCcdSubsteps(e){this.integrationParameters.maxCcdSubsteps=e}createRigidBody(e){return this.bodies.createRigidBody(this.colliders,e)}createCharacterController(e){let t=new un(e,this.integrationParameters,this.broadPhase,this.narrowPhase,this.bodies,this.colliders);return this.characterControllers.add(t),t}removeCharacterController(e){this.characterControllers.delete(e),e.free()}createPidController(e,t,n,r){let i=new fn(this.integrationParameters,this.bodies,e,t,n,r);return this.pidControllers.add(i),i}removePidController(e){this.pidControllers.delete(e),e.free()}createVehicleController(e){let t=new pn(e,this.broadPhase,this.narrowPhase,this.bodies,this.colliders);return this.vehicleControllers.add(t),t}removeVehicleController(e){this.vehicleControllers.delete(e),e.free()}createCollider(e,t){let n=t?t.handle:void 0;return this.colliders.createCollider(this.bodies,e,n)}createImpulseJoint(e,t,n,r){return this.impulseJoints.createJoint(this.bodies,e,t.handle,n.handle,r)}createMultibodyJoint(e,t,n,r){return this.multibodyJoints.createJoint(e,t.handle,n.handle,r)}getRigidBody(e){return this.bodies.get(e)}getCollider(e){return this.colliders.get(e)}getImpulseJoint(e){return this.impulseJoints.get(e)}getMultibodyJoint(e){return this.multibodyJoints.get(e)}removeRigidBody(e){this.bodies&&this.bodies.remove(e.handle,this.islands,this.colliders,this.impulseJoints,this.multibodyJoints)}removeCollider(e,t){this.colliders&&this.colliders.remove(e.handle,this.islands,this.bodies,t)}removeImpulseJoint(e,t){this.impulseJoints&&this.impulseJoints.remove(e.handle,t)}removeMultibodyJoint(e,t){this.impulseJoints&&this.multibodyJoints.remove(e.handle,t)}forEachCollider(e){this.colliders.forEach(e)}forEachRigidBody(e){this.bodies.forEach(e)}forEachActiveRigidBody(e){this.bodies.forEachActiveRigidBody(this.islands,e)}castRay(e,t,n,r,i,a,o,s){return this.broadPhase.castRay(this.narrowPhase,this.bodies,this.colliders,e,t,n,r,i,a?a.handle:null,o?o.handle:null,this.colliders.castClosure(s))}castRayAndGetNormal(e,t,n,r,i,a,o,s){return this.broadPhase.castRayAndGetNormal(this.narrowPhase,this.bodies,this.colliders,e,t,n,r,i,a?a.handle:null,o?o.handle:null,this.colliders.castClosure(s))}intersectionsWithRay(e,t,n,r,i,a,o,s,c){this.broadPhase.intersectionsWithRay(this.narrowPhase,this.bodies,this.colliders,e,t,n,r,i,a,o?o.handle:null,s?s.handle:null,this.colliders.castClosure(c))}intersectionWithShape(e,t,n,r,i,a,o,s){let c=this.broadPhase.intersectionWithShape(this.narrowPhase,this.bodies,this.colliders,e,t,n,r,i,a?a.handle:null,o?o.handle:null,this.colliders.castClosure(s));return c==null?null:this.colliders.get(c)}projectPoint(e,t,n,r,i,a,o){return this.broadPhase.projectPoint(this.narrowPhase,this.bodies,this.colliders,e,t,n,r,i?i.handle:null,a?a.handle:null,this.colliders.castClosure(o))}projectPointAndGetFeature(e,t,n,r,i,a){return this.broadPhase.projectPointAndGetFeature(this.narrowPhase,this.bodies,this.colliders,e,t,n,r?r.handle:null,i?i.handle:null,this.colliders.castClosure(a))}intersectionsWithPoint(e,t,n,r,i,a,o){this.broadPhase.intersectionsWithPoint(this.narrowPhase,this.bodies,this.colliders,e,this.colliders.castClosure(t),n,r,i?i.handle:null,a?a.handle:null,this.colliders.castClosure(o))}castShape(e,t,n,r,i,a,o,s,c,l,u,d){return this.broadPhase.castShape(this.narrowPhase,this.bodies,this.colliders,e,t,n,r,i,a,o,s,c,l?l.handle:null,u?u.handle:null,this.colliders.castClosure(d))}intersectionsWithShape(e,t,n,r,i,a,o,s,c){this.broadPhase.intersectionsWithShape(this.narrowPhase,this.bodies,this.colliders,e,t,n,this.colliders.castClosure(r),i,a,o?o.handle:null,s?s.handle:null,this.colliders.castClosure(c))}collidersWithAabbIntersectingAabb(e,t,n){this.broadPhase.collidersWithAabbIntersectingAabb(this.narrowPhase,this.bodies,this.colliders,e,t,this.colliders.castClosure(n))}contactPairsWith(e,t){this.narrowPhase.contactPairsWith(e.handle,this.colliders.castClosure(t))}intersectionPairsWith(e,t){this.narrowPhase.intersectionPairsWith(e.handle,this.colliders.castClosure(t))}contactPair(e,t,n){this.narrowPhase.contactPair(e.handle,t.handle,n)}intersectionPair(e,t){return this.narrowPhase.intersectionPair(e.handle,t.handle)}set profilerEnabled(e){this.physicsPipeline.raw.set_profiler_enabled(e)}get profilerEnabled(){return this.physicsPipeline.raw.is_profiler_enabled()}timingStep(){return this.physicsPipeline.raw.timing_step()}timingCollisionDetection(){return this.physicsPipeline.raw.timing_collision_detection()}timingBroadPhase(){return this.physicsPipeline.raw.timing_broad_phase()}timingNarrowPhase(){return this.physicsPipeline.raw.timing_narrow_phase()}timingSolver(){return this.physicsPipeline.raw.timing_solver()}timingVelocityAssembly(){return this.physicsPipeline.raw.timing_velocity_assembly()}timingVelocityResolution(){return this.physicsPipeline.raw.timing_velocity_resolution()}timingVelocityUpdate(){return this.physicsPipeline.raw.timing_velocity_update()}timingVelocityWriteback(){return this.physicsPipeline.raw.timing_velocity_writeback()}timingCcd(){return this.physicsPipeline.raw.timing_ccd()}timingCcdToiComputation(){return this.physicsPipeline.raw.timing_ccd_toi_computation()}timingCcdBroadPhase(){return this.physicsPipeline.raw.timing_ccd_broad_phase()}timingCcdNarrowPhase(){return this.physicsPipeline.raw.timing_ccd_narrow_phase()}timingCcdSolver(){return this.physicsPipeline.raw.timing_ccd_solver()}timingIslandConstruction(){return this.physicsPipeline.raw.timing_island_construction()}timingUserChanges(){return this.physicsPipeline.raw.timing_user_changes()}},hn;(function(e){e[e.NONE=0]=`NONE`,e[e.COLLISION_EVENTS=1]=`COLLISION_EVENTS`,e[e.CONTACT_FORCE_EVENTS=2]=`CONTACT_FORCE_EVENTS`})(hn||(hn={}));var gn=class{free(){this.raw&&this.raw.free(),this.raw=void 0}collider1(){return this.raw.collider1()}collider2(){return this.raw.collider2()}totalForce(){return H.fromRaw(this.raw.total_force())}totalForceMagnitude(){return this.raw.total_force_magnitude()}maxForceDirection(){return H.fromRaw(this.raw.max_force_direction())}maxForceMagnitude(){return this.raw.max_force_magnitude()}},_n=class{constructor(e,t){this.raw=t||new ye(e)}free(){this.raw&&this.raw.free(),this.raw=void 0}drainCollisionEvents(e){this.raw.drainCollisionEvents(e)}drainContactForceEvents(e){let t=new gn;this.raw.drainContactForceEvents(n=>{t.raw=n,e(t),t.free()})}clear(){this.raw.clear()}},vn;(function(e){e[e.NONE=0]=`NONE`,e[e.FILTER_CONTACT_PAIRS=1]=`FILTER_CONTACT_PAIRS`,e[e.FILTER_INTERSECTION_PAIRS=2]=`FILTER_INTERSECTION_PAIRS`})(vn||(vn={}));var yn;(function(e){e[e.EMPTY=0]=`EMPTY`,e[e.COMPUTE_IMPULSE=1]=`COMPUTE_IMPULSE`})(yn||(yn={}));var bn;(function(e){e[e.EXCLUDE_FIXED=1]=`EXCLUDE_FIXED`,e[e.EXCLUDE_KINEMATIC=2]=`EXCLUDE_KINEMATIC`,e[e.EXCLUDE_DYNAMIC=4]=`EXCLUDE_DYNAMIC`,e[e.EXCLUDE_SENSORS=8]=`EXCLUDE_SENSORS`,e[e.EXCLUDE_SOLIDS=16]=`EXCLUDE_SOLIDS`,e[e.ONLY_DYNAMIC=3]=`ONLY_DYNAMIC`,e[e.ONLY_KINEMATIC=5]=`ONLY_KINEMATIC`,e[e.ONLY_FIXED=6]=`ONLY_FIXED`})(bn||(bn={}));var xn;(function(e){e[e.DYNAMIC_DYNAMIC=1]=`DYNAMIC_DYNAMIC`,e[e.DYNAMIC_KINEMATIC=12]=`DYNAMIC_KINEMATIC`,e[e.DYNAMIC_FIXED=2]=`DYNAMIC_FIXED`,e[e.KINEMATIC_KINEMATIC=52224]=`KINEMATIC_KINEMATIC`,e[e.KINEMATIC_FIXED=8704]=`KINEMATIC_FIXED`,e[e.FIXED_FIXED=32]=`FIXED_FIXED`,e[e.DEFAULT=15]=`DEFAULT`,e[e.ALL=60943]=`ALL`})(xn||(xn={}));var Sn=class{constructor(e,t,n,r){this.colliderSet=e,this.handle=t,this._parent=n,this._shape=r}finalizeDeserialization(e){this.handle!=null&&(this._parent=e.get(this.colliderSet.raw.coParent(this.handle)))}ensureShapeIsCached(){this._shape||(this._shape=X.fromRaw(this.colliderSet.raw,this.handle))}get shape(){return this.ensureShapeIsCached(),this._shape}clearShapeCache(){this._shape=null}isValid(){return this.colliderSet.raw.contains(this.handle)}translation(){return H.fromRaw(this.colliderSet.raw.coTranslation(this.handle))}translationWrtParent(){return H.fromRaw(this.colliderSet.raw.coTranslationWrtParent(this.handle))}rotation(){return U.fromRaw(this.colliderSet.raw.coRotation(this.handle))}rotationWrtParent(){return U.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle))}isSensor(){return this.colliderSet.raw.coIsSensor(this.handle)}setSensor(e){this.colliderSet.raw.coSetSensor(this.handle,e)}setShape(e){let t=e.intoRaw();this.colliderSet.raw.coSetShape(this.handle,t),t.free(),this._shape=e}setEnabled(e){this.colliderSet.raw.coSetEnabled(this.handle,e)}isEnabled(){return this.colliderSet.raw.coIsEnabled(this.handle)}setRestitution(e){this.colliderSet.raw.coSetRestitution(this.handle,e)}setFriction(e){this.colliderSet.raw.coSetFriction(this.handle,e)}frictionCombineRule(){return this.colliderSet.raw.coFrictionCombineRule(this.handle)}setFrictionCombineRule(e){this.colliderSet.raw.coSetFrictionCombineRule(this.handle,e)}restitutionCombineRule(){return this.colliderSet.raw.coRestitutionCombineRule(this.handle)}setRestitutionCombineRule(e){this.colliderSet.raw.coSetRestitutionCombineRule(this.handle,e)}setCollisionGroups(e){this.colliderSet.raw.coSetCollisionGroups(this.handle,e)}setSolverGroups(e){this.colliderSet.raw.coSetSolverGroups(this.handle,e)}contactSkin(){return this.colliderSet.raw.coContactSkin(this.handle)}setContactSkin(e){return this.colliderSet.raw.coSetContactSkin(this.handle,e)}activeHooks(){return this.colliderSet.raw.coActiveHooks(this.handle)}setActiveHooks(e){this.colliderSet.raw.coSetActiveHooks(this.handle,e)}activeEvents(){return this.colliderSet.raw.coActiveEvents(this.handle)}setActiveEvents(e){this.colliderSet.raw.coSetActiveEvents(this.handle,e)}activeCollisionTypes(){return this.colliderSet.raw.coActiveCollisionTypes(this.handle)}setContactForceEventThreshold(e){return this.colliderSet.raw.coSetContactForceEventThreshold(this.handle,e)}contactForceEventThreshold(){return this.colliderSet.raw.coContactForceEventThreshold(this.handle)}setActiveCollisionTypes(e){this.colliderSet.raw.coSetActiveCollisionTypes(this.handle,e)}setDensity(e){this.colliderSet.raw.coSetDensity(this.handle,e)}setMass(e){this.colliderSet.raw.coSetMass(this.handle,e)}setMassProperties(e,t,n,r){let i=H.intoRaw(t),a=H.intoRaw(n),o=U.intoRaw(r);this.colliderSet.raw.coSetMassProperties(this.handle,e,i,a,o),i.free(),a.free(),o.free()}setTranslation(e){this.colliderSet.raw.coSetTranslation(this.handle,e.x,e.y,e.z)}setTranslationWrtParent(e){this.colliderSet.raw.coSetTranslationWrtParent(this.handle,e.x,e.y,e.z)}setRotation(e){this.colliderSet.raw.coSetRotation(this.handle,e.x,e.y,e.z,e.w)}setRotationWrtParent(e){this.colliderSet.raw.coSetRotationWrtParent(this.handle,e.x,e.y,e.z,e.w)}shapeType(){return this.colliderSet.raw.coShapeType(this.handle)}halfExtents(){return H.fromRaw(this.colliderSet.raw.coHalfExtents(this.handle))}setHalfExtents(e){let t=H.intoRaw(e);this.colliderSet.raw.coSetHalfExtents(this.handle,t)}radius(){return this.colliderSet.raw.coRadius(this.handle)}setRadius(e){this.colliderSet.raw.coSetRadius(this.handle,e)}roundRadius(){return this.colliderSet.raw.coRoundRadius(this.handle)}setRoundRadius(e){this.colliderSet.raw.coSetRoundRadius(this.handle,e)}halfHeight(){return this.colliderSet.raw.coHalfHeight(this.handle)}setHalfHeight(e){this.colliderSet.raw.coSetHalfHeight(this.handle,e)}setVoxel(e,t,n,r){this.colliderSet.raw.coSetVoxel(this.handle,e,t,n,r),this._shape=null}propagateVoxelChange(e,t,n,r,i,a,o){this.colliderSet.raw.coPropagateVoxelChange(this.handle,e.handle,t,n,r,i,a,o),this._shape=null}combineVoxelStates(e,t,n,r){this.colliderSet.raw.coCombineVoxelStates(this.handle,e.handle,t,n,r),this._shape=null}vertices(){return this.colliderSet.raw.coVertices(this.handle)}indices(){return this.colliderSet.raw.coIndices(this.handle)}heightfieldHeights(){return this.colliderSet.raw.coHeightfieldHeights(this.handle)}heightfieldScale(){let e=this.colliderSet.raw.coHeightfieldScale(this.handle);return H.fromRaw(e)}heightfieldNRows(){return this.colliderSet.raw.coHeightfieldNRows(this.handle)}heightfieldNCols(){return this.colliderSet.raw.coHeightfieldNCols(this.handle)}parent(){return this._parent}friction(){return this.colliderSet.raw.coFriction(this.handle)}restitution(){return this.colliderSet.raw.coRestitution(this.handle)}density(){return this.colliderSet.raw.coDensity(this.handle)}mass(){return this.colliderSet.raw.coMass(this.handle)}volume(){return this.colliderSet.raw.coVolume(this.handle)}collisionGroups(){return this.colliderSet.raw.coCollisionGroups(this.handle)}solverGroups(){return this.colliderSet.raw.coSolverGroups(this.handle)}containsPoint(e){let t=H.intoRaw(e),n=this.colliderSet.raw.coContainsPoint(this.handle,t);return t.free(),n}projectPoint(e,t){let n=H.intoRaw(e),r=jt.fromRaw(this.colliderSet.raw.coProjectPoint(this.handle,n,t));return n.free(),r}intersectsRay(e,t){let n=H.intoRaw(e.origin),r=H.intoRaw(e.dir),i=this.colliderSet.raw.coIntersectsRay(this.handle,n,r,t);return n.free(),r.free(),i}castShape(e,t,n,r,i,a,o,s){let c=H.intoRaw(e),l=H.intoRaw(n),u=U.intoRaw(r),d=H.intoRaw(i),f=t.intoRaw(),p=Nt.fromRaw(this.colliderSet,this.colliderSet.raw.coCastShape(this.handle,c,f,l,u,d,a,o,s));return c.free(),l.free(),u.free(),d.free(),f.free(),p}castCollider(e,t,n,r,i,a){let o=H.intoRaw(e),s=H.intoRaw(n),c=Pt.fromRaw(this.colliderSet,this.colliderSet.raw.coCastCollider(this.handle,o,t.handle,s,r,i,a));return o.free(),s.free(),c}intersectsShape(e,t,n){let r=H.intoRaw(t),i=U.intoRaw(n),a=e.intoRaw(),o=this.colliderSet.raw.coIntersectsShape(this.handle,a,r,i);return r.free(),i.free(),a.free(),o}contactShape(e,t,n,r){let i=H.intoRaw(t),a=U.intoRaw(n),o=e.intoRaw(),s=Rt.fromRaw(this.colliderSet.raw.coContactShape(this.handle,o,i,a,r));return i.free(),a.free(),o.free(),s}contactCollider(e,t){return Rt.fromRaw(this.colliderSet.raw.coContactCollider(this.handle,e.handle,t))}castRay(e,t,n){let r=H.intoRaw(e.origin),i=H.intoRaw(e.dir),a=this.colliderSet.raw.coCastRay(this.handle,r,i,t,n);return r.free(),i.free(),a}castRayAndGetNormal(e,t,n){let r=H.intoRaw(e.origin),i=H.intoRaw(e.dir),a=Ot.fromRaw(this.colliderSet.raw.coCastRayAndGetNormal(this.handle,r,i,t,n));return r.free(),i.free(),a}},$;(function(e){e[e.Density=0]=`Density`,e[e.Mass=1]=`Mass`,e[e.MassProps=2]=`MassProps`})($||($={}));var Cn=class e{constructor(e){this.enabled=!0,this.shape=e,this.massPropsMode=$.Density,this.density=1,this.friction=.5,this.restitution=0,this.rotation=U.identity(),this.translation=H.zeros(),this.isSensor=!1,this.collisionGroups=4294967295,this.solverGroups=4294967295,this.frictionCombineRule=J.Average,this.restitutionCombineRule=J.Average,this.activeCollisionTypes=xn.DEFAULT,this.activeEvents=hn.NONE,this.activeHooks=vn.NONE,this.mass=0,this.centerOfMass=H.zeros(),this.contactForceEventThreshold=0,this.contactSkin=0,this.principalAngularInertia=H.zeros(),this.angularInertiaLocalFrame=U.identity()}static ball(t){return new e(new Vt(t))}static capsule(t,n){return new e(new Gt(t,n))}static segment(t,n){return new e(new Kt(t,n))}static triangle(t,n,r){return new e(new qt(t,n,r))}static roundTriangle(t,n,r,i){return new e(new Jt(t,n,r,i))}static polyline(t,n){return new e(new Yt(t,n))}static voxels(t,n){return new e(new Xt(t,n))}static trimesh(t,n,r){return new e(new Zt(t,n,r))}static cuboid(t,n,r){return new e(new Ut(t,n,r))}static roundCuboid(t,n,r,i){return new e(new Wt(t,n,r,i))}static heightfield(t,n,r,i,a){return new e(new $t(t,n,r,i,a))}static cylinder(t,n){return new e(new en(t,n))}static roundCylinder(t,n,r){return new e(new tn(t,n,r))}static cone(t,n){return new e(new nn(t,n))}static roundCone(t,n,r){return new e(new rn(t,n,r))}static convexHull(t){return new e(new Q(t,null))}static convexMesh(t,n){return new e(new Q(t,n))}static roundConvexHull(t,n){return new e(new Qt(t,null,n))}static roundConvexMesh(t,n,r){return new e(new Qt(t,n,r))}setTranslation(e,t,n){if(typeof e!=`number`||typeof t!=`number`||typeof n!=`number`)throw TypeError(`The translation components must be numbers.`);return this.translation={x:e,y:t,z:n},this}setRotation(e){return U.copy(this.rotation,e),this}setSensor(e){return this.isSensor=e,this}setEnabled(e){return this.enabled=e,this}setContactSkin(e){return this.contactSkin=e,this}setDensity(e){return this.massPropsMode=$.Density,this.density=e,this}setMass(e){return this.massPropsMode=$.Mass,this.mass=e,this}setMassProperties(e,t,n,r){return this.massPropsMode=$.MassProps,this.mass=e,H.copy(this.centerOfMass,t),H.copy(this.principalAngularInertia,n),U.copy(this.angularInertiaLocalFrame,r),this}setRestitution(e){return this.restitution=e,this}setFriction(e){return this.friction=e,this}setFrictionCombineRule(e){return this.frictionCombineRule=e,this}setRestitutionCombineRule(e){return this.restitutionCombineRule=e,this}setCollisionGroups(e){return this.collisionGroups=e,this}setSolverGroups(e){return this.solverGroups=e,this}setActiveHooks(e){return this.activeHooks=e,this}setActiveEvents(e){return this.activeEvents=e,this}setActiveCollisionTypes(e){return this.activeCollisionTypes=e,this}setContactForceEventThreshold(e){return this.contactForceEventThreshold=e,this}},wn=class{free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}constructor(e){this.raw=e||new j,this.map=new G,e&&e.forEachColliderHandle(e=>{this.map.set(e,new Sn(this,e,null))})}castClosure(e){return t=>{if(e)return e(this.get(t))}}finalizeDeserialization(e){this.map.forEach(t=>t.finalizeDeserialization(e))}createCollider(e,t,n){let r=n!=null&&n!=null;if(r&&isNaN(n))throw Error(`Cannot create a collider with a parent rigid-body handle that is not a number.`);let i=t.shape.intoRaw(),a=H.intoRaw(t.translation),o=U.intoRaw(t.rotation),s=H.intoRaw(t.centerOfMass),c=H.intoRaw(t.principalAngularInertia),l=U.intoRaw(t.angularInertiaLocalFrame),u=this.raw.createCollider(t.enabled,i,a,o,t.massPropsMode,t.mass,s,c,l,t.density,t.friction,t.restitution,t.frictionCombineRule,t.restitutionCombineRule,t.isSensor,t.collisionGroups,t.solverGroups,t.activeCollisionTypes,t.activeHooks,t.activeEvents,t.contactForceEventThreshold,t.contactSkin,r,r?n:0,e.raw);i.free(),a.free(),o.free(),s.free(),c.free(),l.free();let d=r?e.get(n):null,f=new Sn(this,u,d,t.shape);return this.map.set(u,f),f}remove(e,t,n,r){this.raw.remove(e,t.raw,n.raw,r),this.unmap(e)}unmap(e){this.map.delete(e)}get(e){return this.map.get(e)}len(){return this.map.len()}contains(e){return this.get(e)!=null}forEach(e){this.map.forEach(e)}getAll(){return this.map.getAll()}};export{et as a,at as i,_n as n,mn as r,Cn as t};