UNPKG

@splinetool/runtime

Version:

1 lines 1.9 MB
let A;const I=new Array(32).fill(void 0);function g(A){return I[A]}I.push(void 0,null,!0,!1);let C,B,Q=I.length;function E(A){const C=g(A);return function(A){A<36||(I[A]=Q,Q=A)}(A),C}function i(A){Q===I.length&&I.push(I.length+1);const g=Q;return Q=I[g],I[g]=A,g}function D(A){return null==A}function o(){return 0===C.byteLength&&(C=new Float64Array(A.memory.buffer)),C}function G(){return 0===B.byteLength&&(B=new Int32Array(A.memory.buffer)),B}const S=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});let w;function k(I,g){return S.decode((0===w.byteLength&&(w=new Uint8Array(A.memory.buffer)),w).subarray(I,I+g))}function U(A,I){if(!(A instanceof I))throw new Error(`expected instance of ${I.name}`);return A.ptr}S.decode();let K,a,J=32;function y(A){if(1==J)throw new Error("out of js stack");return I[--J]=A,J}function M(){return 0===K.byteLength&&(K=new Float32Array(A.memory.buffer)),K}function h(A,I){return M().subarray(A/4,A/4+I)}function N(){return 0===a.byteLength&&(a=new Uint32Array(A.memory.buffer)),a}let F=0;function R(A,I){const g=I(4*A.length);return M().set(A,g/4),F=A.length,g}function q(A,I){const g=I(4*A.length);return N().set(A,g/4),F=A.length,g}function s(I,g){try{return I.apply(this,g)}catch(I){A.__wbindgen_exn_store(i(I))}}Object.freeze({Revolute:0,0:"Revolute",Fixed:1,1:"Fixed",Prismatic:2,2:"Prismatic",Spherical:3,3:"Spherical",Generic:4,4:"Generic"}),Object.freeze({AccelerationBased:0,0:"AccelerationBased",ForceBased:1,1:"ForceBased"});const c=Object.freeze({X:0,0:"X",Y:1,1:"Y",Z:2,2:"Z",AngX:3,3:"AngX",AngY:4,4:"AngY",AngZ:5,5:"AngZ"});Object.freeze({Dynamic:0,0:"Dynamic",Fixed:1,1:"Fixed",KinematicPositionBased:2,2:"KinematicPositionBased",KinematicVelocityBased:3,3:"KinematicVelocityBased"}),Object.freeze({Vertex:0,0:"Vertex",Edge:1,1:"Edge",Face:2,2:"Face",Unknown:3,3:"Unknown"}),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"});class Y{static __wrap(A){const I=Object.create(Y.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawbroadphase_free(I)}constructor(){const I=A.rawbroadphase_new();return Y.__wrap(I)}}class L{static __wrap(A){const I=Object.create(L.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawccdsolver_free(I)}constructor(){const I=A.rawccdsolver_new();return L.__wrap(I)}}class H{static __wrap(A){const I=Object.create(H.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawcolliderset_free(I)}coTranslation(I){const g=A.rawcolliderset_coTranslation(this.ptr,I);return gA.__wrap(g)}coRotation(I){const g=A.rawcolliderset_coRotation(this.ptr,I);return u.__wrap(g)}coSetTranslation(I,g,C,B){A.rawcolliderset_coSetTranslation(this.ptr,I,g,C,B)}coSetTranslationWrtParent(I,g,C,B){A.rawcolliderset_coSetTranslationWrtParent(this.ptr,I,g,C,B)}coSetRotation(I,g,C,B,Q){A.rawcolliderset_coSetRotation(this.ptr,I,g,C,B,Q)}coSetRotationWrtParent(I,g,C,B,Q){A.rawcolliderset_coSetRotationWrtParent(this.ptr,I,g,C,B,Q)}coIsSensor(I){return 0!==A.rawcolliderset_coIsSensor(this.ptr,I)}coShapeType(I){return A.rawcolliderset_coShapeType(this.ptr,I)>>>0}coHalfExtents(I){const g=A.rawcolliderset_coHalfExtents(this.ptr,I);return 0===g?void 0:gA.__wrap(g)}coRadius(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coRadius(B,this.ptr,I);var g=G()[B/4+0],C=M()[B/4+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coHalfHeight(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coHalfHeight(B,this.ptr,I);var g=G()[B/4+0],C=M()[B/4+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coRoundRadius(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coRoundRadius(B,this.ptr,I);var g=G()[B/4+0],C=M()[B/4+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coVertices(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coVertices(B,this.ptr,I);var g=G()[B/4+0],C=G()[B/4+1];let Q;return 0!==g&&(Q=h(g,C).slice(),A.__wbindgen_free(g,4*C)),Q}finally{A.__wbindgen_add_to_stack_pointer(16)}}coIndices(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coIndices(B,this.ptr,I);var g=G()[B/4+0],C=G()[B/4+1];let Q;return 0!==g&&(Q=function(A,I){return N().subarray(A/4,A/4+I)}(g,C).slice(),A.__wbindgen_free(g,4*C)),Q}finally{A.__wbindgen_add_to_stack_pointer(16)}}coHeightfieldHeights(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coHeightfieldHeights(B,this.ptr,I);var g=G()[B/4+0],C=G()[B/4+1];let Q;return 0!==g&&(Q=h(g,C).slice(),A.__wbindgen_free(g,4*C)),Q}finally{A.__wbindgen_add_to_stack_pointer(16)}}coHeightfieldScale(I){const g=A.rawcolliderset_coHeightfieldScale(this.ptr,I);return 0===g?void 0:gA.__wrap(g)}coHeightfieldNRows(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coHeightfieldNRows(B,this.ptr,I);var g=G()[B/4+0],C=G()[B/4+1];return 0===g?void 0:C>>>0}finally{A.__wbindgen_add_to_stack_pointer(16)}}coHeightfieldNCols(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coHeightfieldNCols(B,this.ptr,I);var g=G()[B/4+0],C=G()[B/4+1];return 0===g?void 0:C>>>0}finally{A.__wbindgen_add_to_stack_pointer(16)}}coParent(I){try{const B=A.__wbindgen_add_to_stack_pointer(-16);A.rawcolliderset_coParent(B,this.ptr,I);var g=G()[B/4+0],C=o()[B/8+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coFriction(I){return A.rawcolliderset_coFriction(this.ptr,I)}coRestitution(I){return A.rawcolliderset_coRestitution(this.ptr,I)}coDensity(I){return A.rawcolliderset_coDensity(this.ptr,I)}coMass(I){return A.rawcolliderset_coMass(this.ptr,I)}coVolume(I){return A.rawcolliderset_coVolume(this.ptr,I)}coCollisionGroups(I){return A.rawcolliderset_coCollisionGroups(this.ptr,I)>>>0}coSolverGroups(I){return A.rawcolliderset_coSolverGroups(this.ptr,I)>>>0}coActiveHooks(I){return A.rawcolliderset_coActiveHooks(this.ptr,I)>>>0}coActiveCollisionTypes(I){return A.rawcolliderset_coActiveCollisionTypes(this.ptr,I)}coActiveEvents(I){return A.rawcolliderset_coActiveEvents(this.ptr,I)>>>0}coContactForceEventThreshold(I){return A.rawcolliderset_coContactForceEventThreshold(this.ptr,I)}coContainsPoint(I,g){U(g,gA);return 0!==A.rawcolliderset_coContainsPoint(this.ptr,I,g.ptr)}coCastShape(I,g,C,B,Q,E,i){U(g,gA),U(C,_),U(B,gA),U(Q,u),U(E,gA);const D=A.rawcolliderset_coCastShape(this.ptr,I,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,i);return 0===D?void 0:IA.__wrap(D)}coCastCollider(I,g,C,B,Q){U(g,gA),U(B,gA);const E=A.rawcolliderset_coCastCollider(this.ptr,I,g.ptr,C,B.ptr,Q);return 0===E?void 0:$.__wrap(E)}coIntersectsShape(I,g,C,B){U(g,_),U(C,gA),U(B,u);return 0!==A.rawcolliderset_coIntersectsShape(this.ptr,I,g.ptr,C.ptr,B.ptr)}coContactShape(I,g,C,B,Q){U(g,_),U(C,gA),U(B,u);const E=A.rawcolliderset_coContactShape(this.ptr,I,g.ptr,C.ptr,B.ptr,Q);return 0===E?void 0:AA.__wrap(E)}coContactCollider(I,g,C){const B=A.rawcolliderset_coContactCollider(this.ptr,I,g,C);return 0===B?void 0:AA.__wrap(B)}coProjectPoint(I,g,C){U(g,gA);const B=A.rawcolliderset_coProjectPoint(this.ptr,I,g.ptr,C);return V.__wrap(B)}coIntersectsRay(I,g,C,B){U(g,gA),U(C,gA);return 0!==A.rawcolliderset_coIntersectsRay(this.ptr,I,g.ptr,C.ptr,B)}coCastRay(I,g,C,B,Q){U(g,gA),U(C,gA);return A.rawcolliderset_coCastRay(this.ptr,I,g.ptr,C.ptr,B,Q)}coCastRayAndGetNormal(I,g,C,B,Q){U(g,gA),U(C,gA);const E=A.rawcolliderset_coCastRayAndGetNormal(this.ptr,I,g.ptr,C.ptr,B,Q);return 0===E?void 0:X.__wrap(E)}coSetSensor(I,g){A.rawcolliderset_coSetSensor(this.ptr,I,g)}coSetRestitution(I,g){A.rawcolliderset_coSetRestitution(this.ptr,I,g)}coSetFriction(I,g){A.rawcolliderset_coSetFriction(this.ptr,I,g)}coFrictionCombineRule(I){return A.rawcolliderset_coFrictionCombineRule(this.ptr,I)>>>0}coSetFrictionCombineRule(I,g){A.rawcolliderset_coSetFrictionCombineRule(this.ptr,I,g)}coRestitutionCombineRule(I){return A.rawcolliderset_coRestitutionCombineRule(this.ptr,I)>>>0}coSetRestitutionCombineRule(I,g){A.rawcolliderset_coSetRestitutionCombineRule(this.ptr,I,g)}coSetCollisionGroups(I,g){A.rawcolliderset_coSetCollisionGroups(this.ptr,I,g)}coSetSolverGroups(I,g){A.rawcolliderset_coSetSolverGroups(this.ptr,I,g)}coSetActiveHooks(I,g){A.rawcolliderset_coSetActiveHooks(this.ptr,I,g)}coSetActiveEvents(I,g){A.rawcolliderset_coSetActiveEvents(this.ptr,I,g)}coSetActiveCollisionTypes(I,g){A.rawcolliderset_coSetActiveCollisionTypes(this.ptr,I,g)}coSetShape(I,g){U(g,_),A.rawcolliderset_coSetShape(this.ptr,I,g.ptr)}coSetContactForceEventThreshold(I,g){A.rawcolliderset_coSetContactForceEventThreshold(this.ptr,I,g)}coSetDensity(I,g){A.rawcolliderset_coSetDensity(this.ptr,I,g)}coSetMass(I,g){A.rawcolliderset_coSetMass(this.ptr,I,g)}coSetMassProperties(I,g,C,B,Q){U(C,gA),U(B,gA),U(Q,u),A.rawcolliderset_coSetMassProperties(this.ptr,I,g,C.ptr,B.ptr,Q.ptr)}constructor(){const I=A.rawcolliderset_new();return H.__wrap(I)}len(){return A.rawcolliderset_len(this.ptr)>>>0}contains(I){return 0!==A.rawcolliderset_contains(this.ptr,I)}createCollider(I,g,C,B,Q,E,i,D,S,w,k,K,a,J,y,M,h,N,F,R,q,s,c){try{const H=A.__wbindgen_add_to_stack_pointer(-16);U(I,_),U(g,gA),U(C,u),U(E,gA),U(i,gA),U(D,u),U(c,z),A.rawcolliderset_createCollider(H,this.ptr,I.ptr,g.ptr,C.ptr,B,Q,E.ptr,i.ptr,D.ptr,S,w,k,K,a,J,y,M,h,N,F,R,q,s,c.ptr);var Y=G()[H/4+0],L=o()[H/8+1];return 0===Y?void 0:L}finally{A.__wbindgen_add_to_stack_pointer(16)}}remove(I,g,C,B){U(g,Z),U(C,z),A.rawcolliderset_remove(this.ptr,I,g.ptr,C.ptr,B)}isHandleValid(I){return 0!==A.rawcolliderset_contains(this.ptr,I)}forEachColliderHandle(g){try{A.rawcolliderset_forEachColliderHandle(this.ptr,y(g))}finally{I[J++]=void 0}}}class l{static __wrap(A){const I=Object.create(l.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawcontactforceevent_free(I)}collider1(){return A.rawcontactforceevent_collider1(this.ptr)}collider2(){return A.rawcontactforceevent_collider2(this.ptr)}total_force(){const I=A.rawcontactforceevent_total_force(this.ptr);return gA.__wrap(I)}total_force_magnitude(){return A.rawcontactforceevent_total_force_magnitude(this.ptr)}max_force_direction(){const I=A.rawcontactforceevent_max_force_direction(this.ptr);return gA.__wrap(I)}max_force_magnitude(){return A.rawcontactforceevent_max_force_magnitude(this.ptr)}}class t{static __wrap(A){const I=Object.create(t.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawcontactmanifold_free(I)}normal(){const I=A.rawcontactmanifold_normal(this.ptr);return gA.__wrap(I)}local_n1(){const I=A.rawcontactmanifold_local_n1(this.ptr);return gA.__wrap(I)}local_n2(){const I=A.rawcontactmanifold_local_n2(this.ptr);return gA.__wrap(I)}subshape1(){return A.rawcontactmanifold_subshape1(this.ptr)>>>0}subshape2(){return A.rawcontactmanifold_subshape2(this.ptr)>>>0}num_contacts(){return A.rawcontactmanifold_num_contacts(this.ptr)>>>0}contact_local_p1(I){const g=A.rawcontactmanifold_contact_local_p1(this.ptr,I);return 0===g?void 0:gA.__wrap(g)}contact_local_p2(I){const g=A.rawcontactmanifold_contact_local_p2(this.ptr,I);return 0===g?void 0:gA.__wrap(g)}contact_dist(I){return A.rawcontactmanifold_contact_dist(this.ptr,I)}contact_fid1(I){return A.rawcontactmanifold_contact_fid1(this.ptr,I)>>>0}contact_fid2(I){return A.rawcontactmanifold_contact_fid2(this.ptr,I)>>>0}contact_impulse(I){return A.rawcontactmanifold_contact_impulse(this.ptr,I)}contact_tangent_impulse_x(I){return A.rawcontactmanifold_contact_tangent_impulse_x(this.ptr,I)}contact_tangent_impulse_y(I){return A.rawcontactmanifold_contact_tangent_impulse_y(this.ptr,I)}num_solver_contacts(){return A.rawcontactmanifold_num_solver_contacts(this.ptr)>>>0}solver_contact_point(I){const g=A.rawcontactmanifold_solver_contact_point(this.ptr,I);return 0===g?void 0:gA.__wrap(g)}solver_contact_dist(I){return A.rawcontactmanifold_solver_contact_dist(this.ptr,I)}solver_contact_friction(I){return A.rawcontactmanifold_solver_contact_friction(this.ptr,I)}solver_contact_restitution(I){return A.rawcontactmanifold_solver_contact_restitution(this.ptr,I)}solver_contact_tangent_velocity(I){const g=A.rawcontactmanifold_solver_contact_tangent_velocity(this.ptr,I);return gA.__wrap(g)}}class p{static __wrap(A){const I=Object.create(p.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawcontactpair_free(I)}collider1(){return A.rawcontactpair_collider1(this.ptr)}collider2(){return A.rawcontactpair_collider2(this.ptr)}numContactManifolds(){return A.rawcontactpair_numContactManifolds(this.ptr)>>>0}contactManifold(I){const g=A.rawcontactpair_contactManifold(this.ptr,I);return 0===g?void 0:t.__wrap(g)}}class e{static __wrap(A){const I=Object.create(e.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawdebugrenderpipeline_free(I)}constructor(){const I=A.rawdebugrenderpipeline_new();return e.__wrap(I)}vertices(){return E(A.rawdebugrenderpipeline_vertices(this.ptr))}colors(){return E(A.rawdebugrenderpipeline_colors(this.ptr))}render(I,g,C,B,Q){U(I,z),U(g,H),U(C,O),U(B,x),U(Q,W),A.rawdebugrenderpipeline_render(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr)}}class r{static __wrap(A){const I=Object.create(r.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawdeserializedworld_free(I)}takeGravity(){const I=A.rawdeserializedworld_takeGravity(this.ptr);return 0===I?void 0:gA.__wrap(I)}takeIntegrationParameters(){const I=A.rawdeserializedworld_takeIntegrationParameters(this.ptr);return 0===I?void 0:n.__wrap(I)}takeIslandManager(){const I=A.rawdeserializedworld_takeIslandManager(this.ptr);return 0===I?void 0:Z.__wrap(I)}takeBroadPhase(){const I=A.rawdeserializedworld_takeBroadPhase(this.ptr);return 0===I?void 0:Y.__wrap(I)}takeNarrowPhase(){const I=A.rawdeserializedworld_takeNarrowPhase(this.ptr);return 0===I?void 0:W.__wrap(I)}takeBodies(){const I=A.rawdeserializedworld_takeBodies(this.ptr);return 0===I?void 0:z.__wrap(I)}takeColliders(){const I=A.rawdeserializedworld_takeColliders(this.ptr);return 0===I?void 0:H.__wrap(I)}takeImpulseJoints(){const I=A.rawdeserializedworld_takeImpulseJoints(this.ptr);return 0===I?void 0:O.__wrap(I)}takeMultibodyJoints(){const I=A.rawdeserializedworld_takeMultibodyJoints(this.ptr);return 0===I?void 0:x.__wrap(I)}}class T{static __wrap(A){const I=Object.create(T.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_raweventqueue_free(I)}constructor(I){const g=A.raweventqueue_new(I);return T.__wrap(g)}drainCollisionEvents(g){try{A.raweventqueue_drainCollisionEvents(this.ptr,y(g))}finally{I[J++]=void 0}}drainContactForceEvents(g){try{A.raweventqueue_drainContactForceEvents(this.ptr,y(g))}finally{I[J++]=void 0}}clear(){A.raweventqueue_clear(this.ptr)}}class d{static __wrap(A){const I=Object.create(d.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawgenericjoint_free(I)}static spherical(I,g){U(I,gA),U(g,gA);const C=A.rawgenericjoint_spherical(I.ptr,g.ptr);return d.__wrap(C)}static prismatic(I,g,C,B,Q,E){U(I,gA),U(g,gA),U(C,gA);const i=A.rawgenericjoint_prismatic(I.ptr,g.ptr,C.ptr,B,Q,E);return 0===i?void 0:d.__wrap(i)}static fixed(I,g,C,B){U(I,gA),U(g,u),U(C,gA),U(B,u);const Q=A.rawgenericjoint_fixed(I.ptr,g.ptr,C.ptr,B.ptr);return d.__wrap(Q)}static revolute(I,g,C){U(I,gA),U(g,gA),U(C,gA);const B=A.rawgenericjoint_revolute(I.ptr,g.ptr,C.ptr);return 0===B?void 0:d.__wrap(B)}}class O{static __wrap(A){const I=Object.create(O.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawimpulsejointset_free(I)}jointType(I){return A.rawimpulsejointset_jointType(this.ptr,I)>>>0}jointBodyHandle1(I){return A.rawimpulsejointset_jointBodyHandle1(this.ptr,I)}jointBodyHandle2(I){return A.rawimpulsejointset_jointBodyHandle2(this.ptr,I)}jointFrameX1(I){const g=A.rawimpulsejointset_jointFrameX1(this.ptr,I);return u.__wrap(g)}jointFrameX2(I){const g=A.rawimpulsejointset_jointFrameX2(this.ptr,I);return u.__wrap(g)}jointAnchor1(I){const g=A.rawimpulsejointset_jointAnchor1(this.ptr,I);return gA.__wrap(g)}jointAnchor2(I){const g=A.rawimpulsejointset_jointAnchor2(this.ptr,I);return gA.__wrap(g)}jointSetAnchor1(I,g){U(g,gA),A.rawimpulsejointset_jointSetAnchor1(this.ptr,I,g.ptr)}jointSetAnchor2(I,g){U(g,gA),A.rawimpulsejointset_jointSetAnchor2(this.ptr,I,g.ptr)}jointContactsEnabled(I){return 0!==A.rawimpulsejointset_jointContactsEnabled(this.ptr,I)}jointSetContactsEnabled(I,g){A.rawimpulsejointset_jointSetContactsEnabled(this.ptr,I,g)}jointLimitsEnabled(I,g){return 0!==A.rawimpulsejointset_jointLimitsEnabled(this.ptr,I,g)}jointLimitsMin(I,g){return A.rawimpulsejointset_jointLimitsMin(this.ptr,I,g)}jointLimitsMax(I,g){return A.rawimpulsejointset_jointLimitsMax(this.ptr,I,g)}jointSetLimits(I,g,C,B){A.rawimpulsejointset_jointSetLimits(this.ptr,I,g,C,B)}jointConfigureMotorModel(I,g,C){A.rawimpulsejointset_jointConfigureMotorModel(this.ptr,I,g,C)}jointConfigureMotorVelocity(I,g,C,B){A.rawimpulsejointset_jointConfigureMotorVelocity(this.ptr,I,g,C,B)}jointConfigureMotorPosition(I,g,C,B,Q){A.rawimpulsejointset_jointConfigureMotorPosition(this.ptr,I,g,C,B,Q)}jointConfigureMotor(I,g,C,B,Q,E){A.rawimpulsejointset_jointConfigureMotor(this.ptr,I,g,C,B,Q,E)}constructor(){const I=A.rawimpulsejointset_new();return O.__wrap(I)}createJoint(I,g,C,B){U(I,d);return A.rawimpulsejointset_createJoint(this.ptr,I.ptr,g,C,B)}remove(I,g){A.rawimpulsejointset_remove(this.ptr,I,g)}len(){return A.rawimpulsejointset_len(this.ptr)>>>0}contains(I){return 0!==A.rawimpulsejointset_contains(this.ptr,I)}forEachJointHandle(g){try{A.rawimpulsejointset_forEachJointHandle(this.ptr,y(g))}finally{I[J++]=void 0}}forEachJointAttachedToRigidBody(g,C){try{A.rawimpulsejointset_forEachJointAttachedToRigidBody(this.ptr,g,y(C))}finally{I[J++]=void 0}}}class n{static __wrap(A){const I=Object.create(n.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawintegrationparameters_free(I)}constructor(){const I=A.rawintegrationparameters_new();return n.__wrap(I)}get dt(){return A.rawintegrationparameters_dt(this.ptr)}get erp(){return A.rawintegrationparameters_erp(this.ptr)}get allowedLinearError(){return A.rawintegrationparameters_allowedLinearError(this.ptr)}get predictionDistance(){return A.rawintegrationparameters_predictionDistance(this.ptr)}get maxVelocityIterations(){return A.rawintegrationparameters_maxVelocityIterations(this.ptr)>>>0}get maxVelocityFrictionIterations(){return A.rawintegrationparameters_maxVelocityFrictionIterations(this.ptr)>>>0}get maxStabilizationIterations(){return A.rawintegrationparameters_maxStabilizationIterations(this.ptr)>>>0}get minIslandSize(){return A.rawintegrationparameters_minIslandSize(this.ptr)>>>0}get maxCcdSubsteps(){return A.rawintegrationparameters_maxCcdSubsteps(this.ptr)>>>0}set dt(I){A.rawintegrationparameters_set_dt(this.ptr,I)}set erp(I){A.rawintegrationparameters_set_erp(this.ptr,I)}set allowedLinearError(I){A.rawintegrationparameters_set_allowedLinearError(this.ptr,I)}set predictionDistance(I){A.rawintegrationparameters_set_predictionDistance(this.ptr,I)}set maxVelocityIterations(I){A.rawintegrationparameters_set_maxVelocityIterations(this.ptr,I)}set maxVelocityFrictionIterations(I){A.rawintegrationparameters_set_maxVelocityFrictionIterations(this.ptr,I)}set maxStabilizationIterations(I){A.rawintegrationparameters_set_maxStabilizationIterations(this.ptr,I)}set minIslandSize(I){A.rawintegrationparameters_set_minIslandSize(this.ptr,I)}set maxCcdSubsteps(I){A.rawintegrationparameters_set_maxCcdSubsteps(this.ptr,I)}}class Z{static __wrap(A){const I=Object.create(Z.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawislandmanager_free(I)}constructor(){const I=A.rawislandmanager_new();return Z.__wrap(I)}forEachActiveRigidBodyHandle(g){try{A.rawislandmanager_forEachActiveRigidBodyHandle(this.ptr,y(g))}finally{I[J++]=void 0}}}class x{static __wrap(A){const I=Object.create(x.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawmultibodyjointset_free(I)}jointType(I){return A.rawmultibodyjointset_jointType(this.ptr,I)>>>0}jointFrameX1(I){const g=A.rawmultibodyjointset_jointFrameX1(this.ptr,I);return u.__wrap(g)}jointFrameX2(I){const g=A.rawmultibodyjointset_jointFrameX2(this.ptr,I);return u.__wrap(g)}jointAnchor1(I){const g=A.rawmultibodyjointset_jointAnchor1(this.ptr,I);return gA.__wrap(g)}jointAnchor2(I){const g=A.rawmultibodyjointset_jointAnchor2(this.ptr,I);return gA.__wrap(g)}jointContactsEnabled(I){return 0!==A.rawmultibodyjointset_jointContactsEnabled(this.ptr,I)}jointSetContactsEnabled(I,g){A.rawmultibodyjointset_jointSetContactsEnabled(this.ptr,I,g)}jointLimitsEnabled(I,g){return 0!==A.rawmultibodyjointset_jointLimitsEnabled(this.ptr,I,g)}jointLimitsMin(I,g){return A.rawmultibodyjointset_jointLimitsMin(this.ptr,I,g)}jointLimitsMax(I,g){return A.rawmultibodyjointset_jointLimitsMax(this.ptr,I,g)}constructor(){const I=A.rawmultibodyjointset_new();return x.__wrap(I)}createJoint(I,g,C,B){U(I,d);return A.rawmultibodyjointset_createJoint(this.ptr,I.ptr,g,C,B)}remove(I,g){A.rawmultibodyjointset_remove(this.ptr,I,g)}contains(I){return 0!==A.rawmultibodyjointset_contains(this.ptr,I)}forEachJointHandle(g){try{A.rawmultibodyjointset_forEachJointHandle(this.ptr,y(g))}finally{I[J++]=void 0}}forEachJointAttachedToRigidBody(g,C){try{A.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.ptr,g,y(C))}finally{I[J++]=void 0}}}class W{static __wrap(A){const I=Object.create(W.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawnarrowphase_free(I)}constructor(){const I=A.rawnarrowphase_new();return W.__wrap(I)}contacts_with(I,g){A.rawnarrowphase_contacts_with(this.ptr,I,i(g))}contact_pair(I,g){const C=A.rawnarrowphase_contact_pair(this.ptr,I,g);return 0===C?void 0:p.__wrap(C)}intersections_with(I,g){A.rawnarrowphase_intersections_with(this.ptr,I,i(g))}intersection_pair(I,g){return 0!==A.rawnarrowphase_intersection_pair(this.ptr,I,g)}}class b{static __wrap(A){const I=Object.create(b.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawphysicspipeline_free(I)}constructor(){const I=A.rawphysicspipeline_new();return b.__wrap(I)}step(I,g,C,B,Q,E,i,D,o,G){U(I,gA),U(g,n),U(C,Z),U(B,Y),U(Q,W),U(E,z),U(i,H),U(D,O),U(o,x),U(G,L),A.rawphysicspipeline_step(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,i.ptr,D.ptr,o.ptr,G.ptr)}stepWithEvents(I,g,C,B,Q,E,D,o,G,S,w,k,K,a){U(I,gA),U(g,n),U(C,Z),U(B,Y),U(Q,W),U(E,z),U(D,H),U(o,O),U(G,x),U(S,L),U(w,T),A.rawphysicspipeline_stepWithEvents(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,D.ptr,o.ptr,G.ptr,S.ptr,w.ptr,i(k),i(K),i(a))}}class j{static __wrap(A){const I=Object.create(j.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawpointcolliderprojection_free(I)}colliderHandle(){return A.rawcontactforceevent_collider1(this.ptr)}point(){const I=A.rawpointcolliderprojection_point(this.ptr);return gA.__wrap(I)}isInside(){return 0!==A.rawpointcolliderprojection_isInside(this.ptr)}featureType(){return A.rawpointcolliderprojection_featureType(this.ptr)>>>0}featureId(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.rawpointcolliderprojection_featureId(C,this.ptr);var I=G()[C/4+0],g=G()[C/4+1];return 0===I?void 0:g>>>0}finally{A.__wbindgen_add_to_stack_pointer(16)}}}class V{static __wrap(A){const I=Object.create(V.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawpointprojection_free(I)}point(){const I=A.rawpointprojection_point(this.ptr);return gA.__wrap(I)}isInside(){return 0!==A.rawpointprojection_isInside(this.ptr)}}class f{static __wrap(A){const I=Object.create(f.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawquerypipeline_free(I)}constructor(){const I=A.rawquerypipeline_new();return f.__wrap(I)}update(I,g,C){U(I,Z),U(g,z),U(C,H),A.rawquerypipeline_update(this.ptr,I.ptr,g.ptr,C.ptr)}castRay(g,C,B,Q,E,i,o,G,S,w,k){try{U(g,z),U(C,H),U(B,gA),U(Q,gA);const K=A.rawquerypipeline_castRay(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E,i,o,!D(G),D(G)?0:G,!D(S),D(S)?0:S,!D(w),D(w)?0:w,y(k));return 0===K?void 0:m.__wrap(K)}finally{I[J++]=void 0}}castRayAndGetNormal(g,C,B,Q,E,i,o,G,S,w,k){try{U(g,z),U(C,H),U(B,gA),U(Q,gA);const K=A.rawquerypipeline_castRayAndGetNormal(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E,i,o,!D(G),D(G)?0:G,!D(S),D(S)?0:S,!D(w),D(w)?0:w,y(k));return 0===K?void 0:P.__wrap(K)}finally{I[J++]=void 0}}intersectionsWithRay(g,C,B,Q,E,i,o,G,S,w,k,K){try{U(g,z),U(C,H),U(B,gA),U(Q,gA),A.rawquerypipeline_intersectionsWithRay(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E,i,y(o),G,!D(S),D(S)?0:S,!D(w),D(w)?0:w,!D(k),D(k)?0:k,y(K))}finally{I[J++]=void 0,I[J++]=void 0}}intersectionWithShape(g,C,B,Q,E,i,S,w,k,K){try{const h=A.__wbindgen_add_to_stack_pointer(-16);U(g,z),U(C,H),U(B,gA),U(Q,u),U(E,_),A.rawquerypipeline_intersectionWithShape(h,this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,i,!D(S),D(S)?0:S,!D(w),D(w)?0:w,!D(k),D(k)?0:k,y(K));var a=G()[h/4+0],M=o()[h/8+1];return 0===a?void 0:M}finally{A.__wbindgen_add_to_stack_pointer(16),I[J++]=void 0}}projectPoint(g,C,B,Q,E,i,o,G,S){try{U(g,z),U(C,H),U(B,gA);const w=A.rawquerypipeline_projectPoint(this.ptr,g.ptr,C.ptr,B.ptr,Q,E,!D(i),D(i)?0:i,!D(o),D(o)?0:o,!D(G),D(G)?0:G,y(S));return 0===w?void 0:j.__wrap(w)}finally{I[J++]=void 0}}projectPointAndGetFeature(g,C,B,Q,E,i,o,G){try{U(g,z),U(C,H),U(B,gA);const S=A.rawquerypipeline_projectPointAndGetFeature(this.ptr,g.ptr,C.ptr,B.ptr,Q,!D(E),D(E)?0:E,!D(i),D(i)?0:i,!D(o),D(o)?0:o,y(G));return 0===S?void 0:j.__wrap(S)}finally{I[J++]=void 0}}intersectionsWithPoint(g,C,B,Q,E,i,o,G,S){try{U(g,z),U(C,H),U(B,gA),A.rawquerypipeline_intersectionsWithPoint(this.ptr,g.ptr,C.ptr,B.ptr,y(Q),E,!D(i),D(i)?0:i,!D(o),D(o)?0:o,!D(G),D(G)?0:G,y(S))}finally{I[J++]=void 0,I[J++]=void 0}}castShape(g,C,B,Q,E,i,o,G,S,w,k,K){try{U(g,z),U(C,H),U(B,gA),U(Q,u),U(E,gA),U(i,_);const a=A.rawquerypipeline_castShape(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,i.ptr,o,G,!D(S),D(S)?0:S,!D(w),D(w)?0:w,!D(k),D(k)?0:k,y(K));return 0===a?void 0:$.__wrap(a)}finally{I[J++]=void 0}}intersectionsWithShape(g,C,B,Q,E,i,o,G,S,w,k){try{U(g,z),U(C,H),U(B,gA),U(Q,u),U(E,_),A.rawquerypipeline_intersectionsWithShape(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,y(i),o,!D(G),D(G)?0:G,!D(S),D(S)?0:S,!D(w),D(w)?0:w,y(k))}finally{I[J++]=void 0,I[J++]=void 0}}collidersWithAabbIntersectingAabb(g,C,B){try{U(g,gA),U(C,gA),A.rawquerypipeline_collidersWithAabbIntersectingAabb(this.ptr,g.ptr,C.ptr,y(B))}finally{I[J++]=void 0}}}class P{static __wrap(A){const I=Object.create(P.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawraycolliderintersection_free(I)}colliderHandle(){return A.rawcontactforceevent_collider1(this.ptr)}normal(){const I=A.rawraycolliderintersection_normal(this.ptr);return gA.__wrap(I)}toi(){return A.rawraycolliderintersection_toi(this.ptr)}featureType(){return A.rawpointcolliderprojection_featureType(this.ptr)>>>0}featureId(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.rawpointcolliderprojection_featureId(C,this.ptr);var I=G()[C/4+0],g=G()[C/4+1];return 0===I?void 0:g>>>0}finally{A.__wbindgen_add_to_stack_pointer(16)}}}class m{static __wrap(A){const I=Object.create(m.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawraycollidertoi_free(I)}colliderHandle(){return A.rawcontactforceevent_collider1(this.ptr)}toi(){return A.rawraycolliderintersection_toi(this.ptr)}}class X{static __wrap(A){const I=Object.create(X.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawrayintersection_free(I)}normal(){const I=A.rawrayintersection_normal(this.ptr);return gA.__wrap(I)}toi(){return A.rawintegrationparameters_dt(this.ptr)}featureType(){return A.rawrayintersection_featureType(this.ptr)>>>0}featureId(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.rawrayintersection_featureId(C,this.ptr);var I=G()[C/4+0],g=G()[C/4+1];return 0===I?void 0:g>>>0}finally{A.__wbindgen_add_to_stack_pointer(16)}}}class z{static __wrap(A){const I=Object.create(z.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawrigidbodyset_free(I)}rbTranslation(I){const g=A.rawrigidbodyset_rbTranslation(this.ptr,I);return gA.__wrap(g)}rbRotation(I){const g=A.rawrigidbodyset_rbRotation(this.ptr,I);return u.__wrap(g)}rbSleep(I){A.rawrigidbodyset_rbSleep(this.ptr,I)}rbIsSleeping(I){return 0!==A.rawrigidbodyset_rbIsSleeping(this.ptr,I)}rbIsMoving(I){return 0!==A.rawrigidbodyset_rbIsMoving(this.ptr,I)}rbNextTranslation(I){const g=A.rawrigidbodyset_rbNextTranslation(this.ptr,I);return gA.__wrap(g)}rbNextRotation(I){const g=A.rawrigidbodyset_rbNextRotation(this.ptr,I);return u.__wrap(g)}rbSetTranslation(I,g,C,B,Q){A.rawrigidbodyset_rbSetTranslation(this.ptr,I,g,C,B,Q)}rbSetRotation(I,g,C,B,Q,E){A.rawrigidbodyset_rbSetRotation(this.ptr,I,g,C,B,Q,E)}rbSetLinvel(I,g,C){U(g,gA),A.rawrigidbodyset_rbSetLinvel(this.ptr,I,g.ptr,C)}rbSetAngvel(I,g,C){U(g,gA),A.rawrigidbodyset_rbSetAngvel(this.ptr,I,g.ptr,C)}rbSetNextKinematicTranslation(I,g,C,B){A.rawrigidbodyset_rbSetNextKinematicTranslation(this.ptr,I,g,C,B)}rbSetNextKinematicRotation(I,g,C,B,Q){A.rawrigidbodyset_rbSetNextKinematicRotation(this.ptr,I,g,C,B,Q)}rbRecomputeMassPropertiesFromColliders(I,g){U(g,H),A.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.ptr,I,g.ptr)}rbSetAdditionalMass(I,g,C){A.rawrigidbodyset_rbSetAdditionalMass(this.ptr,I,g,C)}rbSetAdditionalMassProperties(I,g,C,B,Q,E){U(C,gA),U(B,gA),U(Q,u),A.rawrigidbodyset_rbSetAdditionalMassProperties(this.ptr,I,g,C.ptr,B.ptr,Q.ptr,E)}rbLinvel(I){const g=A.rawrigidbodyset_rbLinvel(this.ptr,I);return gA.__wrap(g)}rbAngvel(I){const g=A.rawrigidbodyset_rbAngvel(this.ptr,I);return gA.__wrap(g)}rbLockTranslations(I,g,C){A.rawrigidbodyset_rbLockTranslations(this.ptr,I,g,C)}rbSetEnabledTranslations(I,g,C,B,Q){A.rawrigidbodyset_rbSetEnabledTranslations(this.ptr,I,g,C,B,Q)}rbLockRotations(I,g,C){A.rawrigidbodyset_rbLockRotations(this.ptr,I,g,C)}rbSetEnabledRotations(I,g,C,B,Q){A.rawrigidbodyset_rbSetEnabledRotations(this.ptr,I,g,C,B,Q)}rbDominanceGroup(I){return A.rawrigidbodyset_rbDominanceGroup(this.ptr,I)}rbSetDominanceGroup(I,g){A.rawrigidbodyset_rbSetDominanceGroup(this.ptr,I,g)}rbEnableCcd(I,g){A.rawrigidbodyset_rbEnableCcd(this.ptr,I,g)}rbMass(I){return A.rawrigidbodyset_rbMass(this.ptr,I)}rbWakeUp(I){A.rawrigidbodyset_rbWakeUp(this.ptr,I)}rbIsCcdEnabled(I){return 0!==A.rawrigidbodyset_rbIsCcdEnabled(this.ptr,I)}rbNumColliders(I){return A.rawrigidbodyset_rbNumColliders(this.ptr,I)>>>0}rbCollider(I,g){return A.rawrigidbodyset_rbCollider(this.ptr,I,g)}rbBodyType(I){return A.rawrigidbodyset_rbBodyType(this.ptr,I)>>>0}rbSetBodyType(I,g){A.rawrigidbodyset_rbSetBodyType(this.ptr,I,g)}rbIsFixed(I){return 0!==A.rawrigidbodyset_rbIsFixed(this.ptr,I)}rbIsKinematic(I){return 0!==A.rawrigidbodyset_rbIsKinematic(this.ptr,I)}rbIsDynamic(I){return 0!==A.rawrigidbodyset_rbIsDynamic(this.ptr,I)}rbLinearDamping(I){return A.rawrigidbodyset_rbLinearDamping(this.ptr,I)}rbAngularDamping(I){return A.rawrigidbodyset_rbAngularDamping(this.ptr,I)}rbSetLinearDamping(I,g){A.rawrigidbodyset_rbSetLinearDamping(this.ptr,I,g)}rbSetAngularDamping(I,g){A.rawrigidbodyset_rbSetAngularDamping(this.ptr,I,g)}rbGravityScale(I){return A.rawrigidbodyset_rbGravityScale(this.ptr,I)}rbSetGravityScale(I,g,C){A.rawrigidbodyset_rbSetGravityScale(this.ptr,I,g,C)}rbResetForces(I,g){A.rawrigidbodyset_rbResetForces(this.ptr,I,g)}rbResetTorques(I,g){A.rawrigidbodyset_rbResetTorques(this.ptr,I,g)}rbAddForce(I,g,C){U(g,gA),A.rawrigidbodyset_rbAddForce(this.ptr,I,g.ptr,C)}rbApplyImpulse(I,g,C){U(g,gA),A.rawrigidbodyset_rbApplyImpulse(this.ptr,I,g.ptr,C)}rbAddTorque(I,g,C){U(g,gA),A.rawrigidbodyset_rbAddTorque(this.ptr,I,g.ptr,C)}rbApplyTorqueImpulse(I,g,C){U(g,gA),A.rawrigidbodyset_rbApplyTorqueImpulse(this.ptr,I,g.ptr,C)}rbAddForceAtPoint(I,g,C,B){U(g,gA),U(C,gA),A.rawrigidbodyset_rbAddForceAtPoint(this.ptr,I,g.ptr,C.ptr,B)}rbApplyImpulseAtPoint(I,g,C,B){U(g,gA),U(C,gA),A.rawrigidbodyset_rbApplyImpulseAtPoint(this.ptr,I,g.ptr,C.ptr,B)}rbUserData(I){return A.rawrigidbodyset_rbUserData(this.ptr,I)>>>0}rbSetUserData(I,g){A.rawrigidbodyset_rbSetUserData(this.ptr,I,g)}constructor(){const I=A.rawrigidbodyset_new();return z.__wrap(I)}createRigidBody(I,g,C,B,Q,E,i,D,o,G,S,w,k,K,a,J,y,M,h,N,F,R,q){U(I,gA),U(g,u),U(E,gA),U(i,gA),U(D,gA),U(o,gA),U(G,u);return A.rawrigidbodyset_createRigidBody(this.ptr,I.ptr,g.ptr,C,B,Q,E.ptr,i.ptr,D.ptr,o.ptr,G.ptr,S,w,k,K,a,J,y,M,h,N,F,R,q)}remove(I,g,C,B,Q){U(g,Z),U(C,H),U(B,O),U(Q,x),A.rawrigidbodyset_remove(this.ptr,I,g.ptr,C.ptr,B.ptr,Q.ptr)}len(){return A.rawrigidbodyset_len(this.ptr)>>>0}contains(I){return 0!==A.rawrigidbodyset_contains(this.ptr,I)}forEachRigidBodyHandle(g){try{A.rawrigidbodyset_forEachRigidBodyHandle(this.ptr,y(g))}finally{I[J++]=void 0}}}class u{static __wrap(A){const I=Object.create(u.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawrotation_free(I)}constructor(I,g,C,B){const Q=A.rawrotation_new(I,g,C,B);return u.__wrap(Q)}static identity(){const I=A.rawrotation_identity();return u.__wrap(I)}get x(){return A.rawintegrationparameters_dt(this.ptr)}get y(){return A.rawrotation_y(this.ptr)}get z(){return A.rawintegrationparameters_erp(this.ptr)}get w(){return A.rawrotation_w(this.ptr)}}class v{static __wrap(A){const I=Object.create(v.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawserializationpipeline_free(I)}constructor(){const I=A.rawserializationpipeline_new();return v.__wrap(I)}serializeAll(I,g,C,B,Q,i,D,o,G){U(I,gA),U(g,n),U(C,Z),U(B,Y),U(Q,W),U(i,z),U(D,H),U(o,O),U(G,x);return E(A.rawserializationpipeline_serializeAll(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,i.ptr,D.ptr,o.ptr,G.ptr))}deserializeAll(I){const g=A.rawserializationpipeline_deserializeAll(this.ptr,i(I));return 0===g?void 0:r.__wrap(g)}}class _{static __wrap(A){const I=Object.create(_.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawshape_free(I)}static cuboid(I,g,C){const B=A.rawshape_cuboid(I,g,C);return _.__wrap(B)}static roundCuboid(I,g,C,B){const Q=A.rawshape_roundCuboid(I,g,C,B);return _.__wrap(Q)}static ball(I){const g=A.rawshape_ball(I);return _.__wrap(g)}static capsule(I,g){const C=A.rawshape_capsule(I,g);return _.__wrap(C)}static cylinder(I,g){const C=A.rawshape_cylinder(I,g);return _.__wrap(C)}static roundCylinder(I,g,C){const B=A.rawshape_roundCylinder(I,g,C);return _.__wrap(B)}static cone(I,g){const C=A.rawshape_cone(I,g);return _.__wrap(C)}static roundCone(I,g,C){const B=A.rawshape_roundCone(I,g,C);return _.__wrap(B)}static polyline(I,g){const C=R(I,A.__wbindgen_malloc),B=F,Q=q(g,A.__wbindgen_malloc),E=F,i=A.rawshape_polyline(C,B,Q,E);return _.__wrap(i)}static trimesh(I,g){const C=R(I,A.__wbindgen_malloc),B=F,Q=q(g,A.__wbindgen_malloc),E=F,i=A.rawshape_trimesh(C,B,Q,E);return _.__wrap(i)}static heightfield(I,g,C,B){const Q=R(C,A.__wbindgen_malloc),E=F;U(B,gA);const i=A.rawshape_heightfield(I,g,Q,E,B.ptr);return _.__wrap(i)}static segment(I,g){U(I,gA),U(g,gA);const C=A.rawshape_segment(I.ptr,g.ptr);return _.__wrap(C)}static triangle(I,g,C){U(I,gA),U(g,gA),U(C,gA);const B=A.rawshape_triangle(I.ptr,g.ptr,C.ptr);return _.__wrap(B)}static roundTriangle(I,g,C,B){U(I,gA),U(g,gA),U(C,gA);const Q=A.rawshape_roundTriangle(I.ptr,g.ptr,C.ptr,B);return _.__wrap(Q)}static convexHull(I){const g=R(I,A.__wbindgen_malloc),C=F,B=A.rawshape_convexHull(g,C);return 0===B?void 0:_.__wrap(B)}static roundConvexHull(I,g){const C=R(I,A.__wbindgen_malloc),B=F,Q=A.rawshape_roundConvexHull(C,B,g);return 0===Q?void 0:_.__wrap(Q)}static convexMesh(I,g){const C=R(I,A.__wbindgen_malloc),B=F,Q=q(g,A.__wbindgen_malloc),E=F,i=A.rawshape_convexMesh(C,B,Q,E);return 0===i?void 0:_.__wrap(i)}static roundConvexMesh(I,g,C){const B=R(I,A.__wbindgen_malloc),Q=F,E=q(g,A.__wbindgen_malloc),i=F,D=A.rawshape_roundConvexMesh(B,Q,E,i,C);return 0===D?void 0:_.__wrap(D)}castShape(I,g,C,B,Q,E,i,D){U(I,gA),U(g,u),U(C,gA),U(B,_),U(Q,gA),U(E,u),U(i,gA);const o=A.rawshape_castShape(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,i.ptr,D);return 0===o?void 0:IA.__wrap(o)}intersectsShape(I,g,C,B,Q){U(I,gA),U(g,u),U(C,_),U(B,gA),U(Q,u);return 0!==A.rawshape_intersectsShape(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr)}contactShape(I,g,C,B,Q,E){U(I,gA),U(g,u),U(C,_),U(B,gA),U(Q,u);const i=A.rawshape_contactShape(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E);return 0===i?void 0:AA.__wrap(i)}containsPoint(I,g,C){U(I,gA),U(g,u),U(C,gA);return 0!==A.rawshape_containsPoint(this.ptr,I.ptr,g.ptr,C.ptr)}projectPoint(I,g,C,B){U(I,gA),U(g,u),U(C,gA);const Q=A.rawshape_projectPoint(this.ptr,I.ptr,g.ptr,C.ptr,B);return V.__wrap(Q)}intersectsRay(I,g,C,B,Q){U(I,gA),U(g,u),U(C,gA),U(B,gA);return 0!==A.rawshape_intersectsRay(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q)}castRay(I,g,C,B,Q,E){U(I,gA),U(g,u),U(C,gA),U(B,gA);return A.rawshape_castRay(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q,E)}castRayAndGetNormal(I,g,C,B,Q,E){U(I,gA),U(g,u),U(C,gA),U(B,gA);const i=A.rawshape_castRayAndGetNormal(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q,E);return 0===i?void 0:X.__wrap(i)}}class ${static __wrap(A){const I=Object.create($.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawshapecollidertoi_free(I)}colliderHandle(){return A.rawcontactforceevent_collider1(this.ptr)}toi(){return A.rawraycolliderintersection_toi(this.ptr)}witness1(){const I=A.rawraycolliderintersection_normal(this.ptr);return gA.__wrap(I)}witness2(){const I=A.rawshapecollidertoi_witness2(this.ptr);return gA.__wrap(I)}normal1(){const I=A.rawshapecollidertoi_normal1(this.ptr);return gA.__wrap(I)}normal2(){const I=A.rawshapecollidertoi_normal2(this.ptr);return gA.__wrap(I)}}class AA{static __wrap(A){const I=Object.create(AA.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawshapecontact_free(I)}distance(){return A.rawshapecontact_distance(this.ptr)}point1(){const I=A.rawpointprojection_point(this.ptr);return gA.__wrap(I)}point2(){const I=A.rawshapecontact_point2(this.ptr);return gA.__wrap(I)}normal1(){const I=A.rawshapecontact_normal1(this.ptr);return gA.__wrap(I)}normal2(){const I=A.rawshapecontact_normal2(this.ptr);return gA.__wrap(I)}}class IA{static __wrap(A){const I=Object.create(IA.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawshapetoi_free(I)}toi(){return A.rawintegrationparameters_dt(this.ptr)}witness1(){const I=A.rawrayintersection_normal(this.ptr);return gA.__wrap(I)}witness2(){const I=A.rawshapetoi_witness2(this.ptr);return gA.__wrap(I)}normal1(){const I=A.rawshapetoi_normal1(this.ptr);return gA.__wrap(I)}normal2(){const I=A.rawshapetoi_normal2(this.ptr);return gA.__wrap(I)}}class gA{static __wrap(A){const I=Object.create(gA.prototype);return I.ptr=A,I}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,A}free(){const I=this.__destroy_into_raw();A.__wbg_rawvector_free(I)}static zero(){const I=A.rawvector_zero();return gA.__wrap(I)}constructor(I,g,C){const B=A.rawvector_new(I,g,C);return gA.__wrap(B)}get x(){return A.rawintegrationparameters_dt(this.ptr)}set x(I){A.rawintegrationparameters_set_dt(this.ptr,I)}get y(){return A.rawrotation_y(this.ptr)}set y(I){A.rawvector_set_y(this.ptr,I)}get z(){return A.rawintegrationparameters_erp(this.ptr)}set z(I){A.rawintegrationparameters_set_erp(this.ptr,I)}xyz(){const I=A.rawvector_xyz(this.ptr);return gA.__wrap(I)}yxz(){const I=A.rawvector_yxz(this.ptr);return gA.__wrap(I)}zxy(){const I=A.rawvector_zxy(this.ptr);return gA.__wrap(I)}xzy(){const I=A.rawvector_xzy(this.ptr);return gA.__wrap(I)}yzx(){const I=A.rawvector_yzx(this.ptr);return gA.__wrap(I)}zyx(){const I=A.rawvector_zyx(this.ptr);return gA.__wrap(I)}}async function CA(I){void 0===I&&(I=new URL("rapier_wasm3d_bg.wasm","<deleted>"));const Q=function(){const I={wbg:{}};return I.wbg.__wbindgen_object_drop_ref=function(A){E(A)},I.wbg.__wbindgen_number_new=function(A){return i(A)},I.wbg.__wbindgen_number_get=function(A,I){const C=g(I),B="number"==typeof C?C:void 0;o()[A/8+1]=D(B)?0:B,G()[A/4+0]=!D(B)},I.wbg.__wbindgen_boolean_get=function(A){const I=g(A);return"boolean"==typeof I?I?1:0:2},I.wbg.__wbg_rawraycolliderintersection_new=function(A){return i(P.__wrap(A))},I.wbg.__wbg_rawcontactforceevent_new=function(A){return i(l.__wrap(A))},I.wbg.__wbindgen_is_function=function(A){return"function"==typeof g(A)},I.wbg.__wbg_call_9855a4612eb496cb=function(){return s((function(A,I,C){return i(g(A).call(g(I),g(C)))}),arguments)},I.wbg.__wbg_call_8e1338b908441bd2=function(){return s((function(A,I,C,B){return i(g(A).call(g(I),g(C),g(B)))}),arguments)},I.wbg.__wbg_call_0a54fa4fb42023f0=function(){return s((function(A,I,C,B,Q){return i(g(A).call(g(I),g(C),g(B),g(Q)))}),arguments)},I.wbg.__wbg_bind_2ae44992222e2f45=function(A,I,C,B){return i(g(A).bind(g(I),g(C),g(B)))},I.wbg.__wbg_buffer_de1150f91b23aa89=function(A){return i(g(A).buffer)},I.wbg.__wbg_newwithbyteoffsetandlength_9ca61320599a2c84=function(A,I,C){return i(new Uint8Array(g(A),I>>>0,C>>>0))},I.wbg.__wbg_new_97cf52648830a70d=function(A){return i(new Uint8Array(g(A)))},I.wbg.__wbg_set_a0172b213e2469e9=function(A,I,C){g(A).set(g(I),C>>>0)},I.wbg.__wbg_length_e09c0b925ab8de5d=function(A){return g(A).length},I.wbg.__wbg_newwithbyteoffsetandlength_b0ff18b468a0d3f8=function(A,I,C){return i(new Float32Array(g(A),I>>>0,C>>>0))},I.wbg.__wbg_set_66067e08ab6cefb5=function(A,I,C){g(A).set(g(I),C>>>0)},I.wbg.__wbg_length_211080f5c116c01f=function(A){return g(A).length},I.wbg.__wbg_newwithlength_f28ac7a9191c7e26=function(A){return i(new Float32Array(A>>>0))},I.wbg.__wbindgen_throw=function(A,I){throw new Error(k(A,I))},I.wbg.__wbindgen_memory=function(){return i(A.memory)},I}();("string"==typeof I||"function"==typeof Request&&I instanceof Request||"function"==typeof URL&&I instanceof URL)&&(I=fetch(I));const{instance:S,module:U}=await async function(A,I){if("function"==typeof Response&&A instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(A,I)}catch(I){if("application/wasm"==A.headers.get("Content-Type"))throw I;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",I)}const g=await A.arrayBuffer();return await WebAssembly.instantiate(g,I)}{const g=await WebAssembly.instantiate(A,I);return g instanceof WebAssembly.Instance?{instance:g,module:A}:g}}(await I,Q);return function(I,g){return A=I.exports,CA.__wbindgen_wasm_module=g,K=new Float32Array(A.memory.buffer),C=new Float64Array(A.memory.buffer),B=new Int32Array(A.memory.buffer),a=new Uint32Array(A.memory.buffer),w=new Uint8Array(A.memory.buffer),A}(S,U)}class BA{constructor(A,I,g){this.x=A,this.y=I,this.z=g}}class QA{static new(A,I,g){return new BA(A,I,g)}static intoRaw(A){return new gA(A.x,A.y,A.z)}static zeros(){return QA.new(0,0,0)}static fromRaw(A){if(!A)return null;let I=QA.new(A.x,A.y,A.z);return A.free(),I}static copy(A,I){A.x=I.x,A.y=I.y,A.z=I.z}}class EA{constructor(A,I,g,C){this.x=A,this.y=I,this.z=g,this.w=C}}class iA{static identity(){return new EA(0,0,0,1)}static fromRaw(A){if(!A)return null;let I=new EA(A.x,A.y,A.z,A.w);return A.free(),I}static intoRaw(A){return new u(A.x,A.y,A.z,A.w)}static copy(A,I){A.x=I.x,A.y=I.y,A.z=I.z,A.w=I.w}}var DA,oA,GA,SA,wA,kA,UA,KA,aA,JA,yA,MA;!function(A){A[A.Dynamic=0]="Dynamic",A[A.Fixed=1]="Fixed",A[A.KinematicPositionBased=2]="KinematicPositionBased",A[A.KinematicVelocityBased=3]="KinematicVelocityBased"}(DA||(DA={}));class hA{constructor(A,I,g){this.rawSet=A,this.colliderSet=I,this.handle=g}finalizeDeserialization(A){this.colliderSet=A}isValid(){return this.rawSet.contains(this.handle)}lockTranslations(A,I){return this.rawSet.rbLockTranslations(this.handle,A,I)}lockRotations(A,I){return this.rawSet.rbLockRotations(this.handle,A,I)}setEnabledTranslations(A,I,g,C){return this.rawSet.rbSetEnabledTranslations(this.handle,A,I,g,C)}restrictTranslations(A,I,g,C){this.setEnabledTranslations(A,I,g,C)}setEnabledRotations(A,I,g,C){return this.rawSet.rbSetEnabledRotations(this.handle,A,I,g,C)}restrictRotations(A,I,g,C){this.setEnabledRotations(A,I,g,C)}dominanceGroup(){return this.rawSet.rbDominanceGroup(this.handle)}setDominanceGroup(A){this.rawSet.rbSetDominanceGroup(this.handle,A)}enableCcd(A){this.rawSet.rbEnableCcd(this.handle,A)}translation(){let A=this.rawSet.rbTranslation(this.handle);return QA.fromRaw(A)}rotation(){let A=this.rawSet.rbRotation(this.handle);return iA.fromRaw(A)}nextTranslation(){let A=this.rawSet.rbNextTranslation(this.handle);return QA.fromRaw(A)}nextRotation(){let A=this.rawSet.rbNextRotation(this.handle);return iA.fromRaw(A)}setTranslation(A,I){this.rawSet.rbSetTranslation(this.handle,A.x,A.y,A.z,I)}setLinvel(A,I){let g=QA.intoRaw(A);this.rawSet.rbSetLinvel(this.handle,g,I),g.free()}gravityScale(){return this.rawSet.rbGravityScale(this.handle)}setGravityScale(A,I){this.rawSet.rbSetGravityScale(this.handle,A,I)}setRotation(A,I){this.rawSet.rbSetRotation(this.handle,A.x,A.y,A.z,A.w,I)}setAngvel(A,I){let g=QA.intoRaw(A);this.rawSet.rbSetAngvel(this.handle,g,I),g.free()}setNextKinematicTranslation(A){this.rawSet.rbSetNextKinematicTranslation(this.handle,A.x,A.y,A.z)}setNextKinematicRotation(A){this.rawSet.rbSetNextKinematicRotation(this.handle,A.x,A.y,A.z,A.w)}linvel(){return QA.fromRaw(this.rawSet.rbLinvel(this.handle))}angvel(){return QA.fromRaw(this.rawSet.rbAngvel(this.handle))}mass(){return this.rawSet.rbMass(this.handle)}sleep(){this.rawSet.rbSleep(this.handle)}wakeUp(){this.rawSet.rbWakeUp(this.handle)}isCcdEnabled(){this.rawSet.rbIsCcdEnabled(this.handle)}numColliders(){return this.rawSet.rbNumColliders(this.handle)}collider(A){return this.colliderSet.get(this.rawSet.rbCollider(this.handle,A))}bodyType(){return this.rawSet.rbBodyType(this.handle)}setBodyType(A){return this.rawSet.rbSetBodyType(this.handle,A)}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(A){this.rawSet.rbSetLinearDamping(this.handle,A)}recomputeMassPropertiesFromColliders(){this.rawSet.rbRecomputeMassPropertiesFromColliders(this.handle,this.colliderSet.raw)}setAdditionalMass(A,I){this.rawSet.rbSetAdditionalMass(this.handle,A,I)}setAdditionalMassProperties(A,I,g,C,B){let Q=QA.intoRaw(I),E=QA.intoRaw(g),i=iA.intoRaw(C);this.rawSet.rbSetAdditionalMassProperties(this.handle,A,Q,E,i,B),Q.free(),E.free(),i.free()}setAngularDamping(A){this.rawSet.rbSetAngularDamping(this.handle,A)}resetForces(A){this.rawSet.rbResetForces(this.handle,A)}resetTorques(A){this.rawSet.rbResetTorques(this.handle,A)}addForce(A,I){const g=QA.intoRaw(A);this.rawSet.rbAddForce(this.handle,g,I),g.free()}applyImpulse(A,I){const g=QA.intoRaw(A);this.rawSet.rbApplyImpulse(this.handle,g,I),g.free()}addTorque(A,I){const g=QA.intoRaw(A);this.rawSet.rbAddTorque(this.handle,g,I),g.free()}applyTorqueImpulse(A,I){const g=QA.intoRaw(A);this.rawSet.rbApplyTorqueImpulse(this.handle,g,I),g.free()}addForceAtPoint(A,I,g){const C=QA.intoRaw(A),B=QA.intoRaw(I);this.rawSet.rbAddForceAtPoint(this.handle,C,B,g),C.free(),B.free()}applyImpulseAtPoint(A,I,g){const C=QA.intoRaw(A),B=QA.intoRaw(I);this.rawSet.rbApplyImpulseAtPoint(this.handle,C,B,g),C.free(),B.free()}}class NA{constructor(A){this.status=A,this.translation=QA.zeros(),this.rotation=iA.identity(),this.gravityScale=1,this.linvel=QA.zeros(),this.mass=0,this.massOnly=!1,this.centerOfMass=QA.zeros(),this.translationsEnabledX=!0,this.translationsEnabledY=!0,this.angvel=QA.zeros(),this.principalAngularInertia=QA.zeros(),this.angularInertiaLocalFrame=iA.identity(),this.translationsEna