(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("rogue-engine"), require("three"));
	else if(typeof define === 'function' && define.amd)
		define(["rogue-engine", "three"], factory);
	else if(typeof exports === 'object')
		exports["rogue-engine-user-scripts"] = factory(require("rogue-engine"), require("three"));
	else
		root["rogue-engine-user-scripts"] = factory(root["rogue-engine"], root["three"]);
})(self, function(__WEBPACK_EXTERNAL_MODULE_rogue_engine__, __WEBPACK_EXTERNAL_MODULE_three__) {
return /******/ (() => { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js":
/*!*************************************************************!*\
  !*** ./node_modules/@dimforge/rapier3d-compat/rapier.es.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ActiveCollisionTypes": () => (/* binding */ UA),
/* harmony export */   "ActiveEvents": () => (/* binding */ FA),
/* harmony export */   "ActiveHooks": () => (/* binding */ qA),
/* harmony export */   "Ball": () => (/* binding */ EI),
/* harmony export */   "BroadPhase": () => (/* binding */ VA),
/* harmony export */   "CCDSolver": () => (/* binding */ mA),
/* harmony export */   "Capsule": () => (/* binding */ GI),
/* harmony export */   "CharacterCollision": () => (/* binding */ tI),
/* harmony export */   "CoefficientCombineRule": () => (/* binding */ KA),
/* harmony export */   "Collider": () => (/* binding */ qI),
/* harmony export */   "ColliderDesc": () => (/* binding */ RI),
/* harmony export */   "ColliderSet": () => (/* binding */ sI),
/* harmony export */   "Cone": () => (/* binding */ NI),
/* harmony export */   "ConvexPolyhedron": () => (/* binding */ KI),
/* harmony export */   "Cuboid": () => (/* binding */ DI),
/* harmony export */   "Cylinder": () => (/* binding */ UI),
/* harmony export */   "DebugRenderBuffers": () => (/* binding */ HI),
/* harmony export */   "DebugRenderPipeline": () => (/* binding */ lI),
/* harmony export */   "EventQueue": () => (/* binding */ dI),
/* harmony export */   "FeatureType": () => (/* binding */ yA),
/* harmony export */   "FixedImpulseJoint": () => (/* binding */ pA),
/* harmony export */   "FixedMultibodyJoint": () => (/* binding */ bA),
/* harmony export */   "HalfSpace": () => (/* binding */ iI),
/* harmony export */   "Heightfield": () => (/* binding */ JI),
/* harmony export */   "ImpulseJoint": () => (/* binding */ lA),
/* harmony export */   "ImpulseJointSet": () => (/* binding */ OA),
/* harmony export */   "IntegrationParameters": () => (/* binding */ HA),
/* harmony export */   "IslandManager": () => (/* binding */ XA),
/* harmony export */   "JointData": () => (/* binding */ TA),
/* harmony export */   "JointType": () => (/* binding */ aA),
/* harmony export */   "KinematicCharacterController": () => (/* binding */ pI),
/* harmony export */   "MassPropsMode": () => (/* binding */ hA),
/* harmony export */   "MotorModel": () => (/* binding */ MA),
/* harmony export */   "MultibodyJoint": () => (/* binding */ nA),
/* harmony export */   "MultibodyJointSet": () => (/* binding */ fA),
/* harmony export */   "NarrowPhase": () => (/* binding */ PA),
/* harmony export */   "PhysicsPipeline": () => (/* binding */ cI),
/* harmony export */   "PointColliderProjection": () => (/* binding */ _A),
/* harmony export */   "PointProjection": () => (/* binding */ vA),
/* harmony export */   "Polyline": () => (/* binding */ aI),
/* harmony export */   "PrismaticImpulseJoint": () => (/* binding */ eA),
/* harmony export */   "PrismaticMultibodyJoint": () => (/* binding */ WA),
/* harmony export */   "Quaternion": () => (/* binding */ oA),
/* harmony export */   "QueryFilterFlags": () => (/* binding */ NA),
/* harmony export */   "QueryPipeline": () => (/* binding */ YI),
/* harmony export */   "Ray": () => (/* binding */ $A),
/* harmony export */   "RayColliderIntersection": () => (/* binding */ II),
/* harmony export */   "RayColliderToi": () => (/* binding */ gI),
/* harmony export */   "RayIntersection": () => (/* binding */ AI),
/* harmony export */   "RevoluteImpulseJoint": () => (/* binding */ rA),
/* harmony export */   "RevoluteMultibodyJoint": () => (/* binding */ jA),
/* harmony export */   "RigidBody": () => (/* binding */ sA),
/* harmony export */   "RigidBodyDesc": () => (/* binding */ cA),
/* harmony export */   "RigidBodySet": () => (/* binding */ LA),
/* harmony export */   "RigidBodyType": () => (/* binding */ SA),
/* harmony export */   "RotationOps": () => (/* binding */ GA),
/* harmony export */   "RoundCone": () => (/* binding */ FI),
/* harmony export */   "RoundConvexPolyhedron": () => (/* binding */ yI),
/* harmony export */   "RoundCuboid": () => (/* binding */ oI),
/* harmony export */   "RoundCylinder": () => (/* binding */ hI),
/* harmony export */   "RoundTriangle": () => (/* binding */ SI),
/* harmony export */   "SdpMatrix3": () => (/* binding */ wA),
/* harmony export */   "SdpMatrix3Ops": () => (/* binding */ kA),
/* harmony export */   "Segment": () => (/* binding */ wI),
/* harmony export */   "SerializationPipeline": () => (/* binding */ LI),
/* harmony export */   "Shape": () => (/* binding */ QI),
/* harmony export */   "ShapeColliderTOI": () => (/* binding */ BI),
/* harmony export */   "ShapeContact": () => (/* binding */ uA),
/* harmony export */   "ShapeTOI": () => (/* binding */ CI),
/* harmony export */   "ShapeType": () => (/* binding */ JA),
/* harmony export */   "SolverFlags": () => (/* binding */ RA),
/* harmony export */   "SphericalImpulseJoint": () => (/* binding */ dA),
/* harmony export */   "SphericalMultibodyJoint": () => (/* binding */ xA),
/* harmony export */   "TempContactForceEvent": () => (/* binding */ rI),
/* harmony export */   "TempContactManifold": () => (/* binding */ zA),
/* harmony export */   "TriMesh": () => (/* binding */ MI),
/* harmony export */   "Triangle": () => (/* binding */ kI),
/* harmony export */   "UnitImpulseJoint": () => (/* binding */ tA),
/* harmony export */   "UnitMultibodyJoint": () => (/* binding */ ZA),
/* harmony export */   "Vector3": () => (/* binding */ iA),
/* harmony export */   "VectorOps": () => (/* binding */ DA),
/* harmony export */   "World": () => (/* binding */ eI),
/* harmony export */   "default": () => (/* binding */ PI),
/* harmony export */   "init": () => (/* binding */ XI),
/* harmony export */   "version": () => (/* binding */ VI)
/* harmony export */ });
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=I.length;function B(A){const B=g(A);return function(A){A<36||(I[A]=C,C=A)}(A),B}function Q(A){C===I.length&&I.push(I.length+1);const g=C;return C=I[g],I[g]=A,g}function E(A){return null==A}let i=new Float64Array;function D(){return 0===i.byteLength&&(i=new Float64Array(A.memory.buffer)),i}let o=new Int32Array;function G(){return 0===o.byteLength&&(o=new Int32Array(A.memory.buffer)),o}const w=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});w.decode();let k=new Uint8Array;function S(I,g){return w.decode((0===k.byteLength&&(k=new Uint8Array(A.memory.buffer)),k).subarray(I,I+g))}function a(A,I){if(!(A instanceof I))throw new Error(`expected instance of ${I.name}`);return A.ptr}let M=new Float32Array;function K(){return 0===M.byteLength&&(M=new Float32Array(A.memory.buffer)),M}let y=32;function J(A){if(1==y)throw new Error("out of js stack");return I[--y]=A,y}function U(A,I){return K().subarray(A/4,A/4+I)}let h=new Uint32Array;function N(){return 0===h.byteLength&&(h=new Uint32Array(A.memory.buffer)),h}let F=0;function q(A,I){const g=I(4*A.length);return K().set(A,g/4),F=A.length,g}function R(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(Q(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",HalfSpace:17,17:"HalfSpace"});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_rawcharactercollision_free(I)}constructor(){const I=A.rawcharactercollision_new();return H.__wrap(I)}handle(){return A.rawcharactercollision_handle(this.ptr)}translationApplied(){const I=A.rawcharactercollision_translationApplied(this.ptr);return QA.__wrap(I)}translationRemaining(){const I=A.rawcharactercollision_translationRemaining(this.ptr);return QA.__wrap(I)}toi(){return A.rawcharactercollision_toi(this.ptr)}worldWitness1(){const I=A.rawcharactercollision_worldWitness1(this.ptr);return QA.__wrap(I)}worldWitness2(){const I=A.rawcharactercollision_worldWitness2(this.ptr);return QA.__wrap(I)}worldNormal1(){const I=A.rawcharactercollision_worldNormal1(this.ptr);return QA.__wrap(I)}worldNormal2(){const I=A.rawcharactercollision_worldNormal2(this.ptr);return QA.__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_rawcolliderset_free(I)}coTranslation(I){const g=A.rawcolliderset_coTranslation(this.ptr,I);return QA.__wrap(g)}coRotation(I){const g=A.rawcolliderset_coRotation(this.ptr,I);return _.__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}coHalfspaceNormal(I){const g=A.rawcolliderset_coHalfspaceNormal(this.ptr,I);return 0===g?void 0:QA.__wrap(g)}coHalfExtents(I){const g=A.rawcolliderset_coHalfExtents(this.ptr,I);return 0===g?void 0:QA.__wrap(g)}coSetHalfExtents(I,g){a(g,QA),A.rawcolliderset_coSetHalfExtents(this.ptr,I,g.ptr)}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=K()[B/4+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coSetRadius(I,g){A.rawcolliderset_coSetRadius(this.ptr,I,g)}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=K()[B/4+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coSetHalfHeight(I,g){A.rawcolliderset_coSetHalfHeight(this.ptr,I,g)}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=K()[B/4+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coSetRoundRadius(I,g){A.rawcolliderset_coSetRoundRadius(this.ptr,I,g)}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=U(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=U(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:QA.__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=D()[B/8+1];return 0===g?void 0:C}finally{A.__wbindgen_add_to_stack_pointer(16)}}coSetEnabled(I,g){A.rawcolliderset_coSetEnabled(this.ptr,I,g)}coIsEnabled(I){return 0!==A.rawcolliderset_coIsEnabled(this.ptr,I)}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){a(g,QA);return 0!==A.rawcolliderset_coContainsPoint(this.ptr,I,g.ptr)}coCastShape(I,g,C,B,Q,E,i,D){a(g,QA),a(C,IA),a(B,QA),a(Q,_),a(E,QA);const o=A.rawcolliderset_coCastShape(this.ptr,I,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,i,D);return 0===o?void 0:BA.__wrap(o)}coCastCollider(I,g,C,B,Q,E){a(g,QA),a(B,QA);const i=A.rawcolliderset_coCastCollider(this.ptr,I,g.ptr,C,B.ptr,Q,E);return 0===i?void 0:gA.__wrap(i)}coIntersectsShape(I,g,C,B){a(g,IA),a(C,QA),a(B,_);return 0!==A.rawcolliderset_coIntersectsShape(this.ptr,I,g.ptr,C.ptr,B.ptr)}coContactShape(I,g,C,B,Q){a(g,IA),a(C,QA),a(B,_);const E=A.rawcolliderset_coContactShape(this.ptr,I,g.ptr,C.ptr,B.ptr,Q);return 0===E?void 0:CA.__wrap(E)}coContactCollider(I,g,C){const B=A.rawcolliderset_coContactCollider(this.ptr,I,g,C);return 0===B?void 0:CA.__wrap(B)}coProjectPoint(I,g,C){a(g,QA);const B=A.rawcolliderset_coProjectPoint(this.ptr,I,g.ptr,C);return X.__wrap(B)}coIntersectsRay(I,g,C,B){a(g,QA),a(C,QA);return 0!==A.rawcolliderset_coIntersectsRay(this.ptr,I,g.ptr,C.ptr,B)}coCastRay(I,g,C,B,Q){a(g,QA),a(C,QA);return A.rawcolliderset_coCastRay(this.ptr,I,g.ptr,C.ptr,B,Q)}coCastRayAndGetNormal(I,g,C,B,Q){a(g,QA),a(C,QA);const E=A.rawcolliderset_coCastRayAndGetNormal(this.ptr,I,g.ptr,C.ptr,B,Q);return 0===E?void 0:u.__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){a(g,IA),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){a(C,QA),a(B,QA),a(Q,_),A.rawcolliderset_coSetMassProperties(this.ptr,I,g,C.ptr,B.ptr,Q.ptr)}constructor(){const I=A.rawcolliderset_new();return l.__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,o,w,k,S,M,K,y,J,U,h,N,F,q,R,s,c,Y){try{const l=A.__wbindgen_add_to_stack_pointer(-16);a(g,IA),a(C,QA),a(B,_),a(i,QA),a(o,QA),a(w,_),a(Y,v),A.rawcolliderset_createCollider(l,this.ptr,I,g.ptr,C.ptr,B.ptr,Q,E,i.ptr,o.ptr,w.ptr,k,S,M,K,y,J,U,h,N,F,q,R,s,c,Y.ptr);var L=G()[l/4+0],H=D()[l/8+1];return 0===L?void 0:H}finally{A.__wbindgen_add_to_stack_pointer(16)}}remove(I,g,C,B){a(g,b),a(C,v),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,J(g))}finally{I[y++]=void 0}}}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_rawcontactforceevent_free(I)}collider1(){return A.rawcharactercollision_handle(this.ptr)}collider2(){return A.rawcontactforceevent_collider2(this.ptr)}total_force(){const I=A.rawcontactforceevent_total_force(this.ptr);return QA.__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 QA.__wrap(I)}max_force_magnitude(){return A.rawcontactforceevent_max_force_magnitude(this.ptr)}}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_rawcontactmanifold_free(I)}normal(){const I=A.rawcontactmanifold_normal(this.ptr);return QA.__wrap(I)}local_n1(){const I=A.rawcontactmanifold_local_n1(this.ptr);return QA.__wrap(I)}local_n2(){const I=A.rawcontactmanifold_local_n2(this.ptr);return QA.__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:QA.__wrap(g)}contact_local_p2(I){const g=A.rawcontactmanifold_contact_local_p2(this.ptr,I);return 0===g?void 0:QA.__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:QA.__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 QA.__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_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:p.__wrap(g)}}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_rawdebugrenderpipeline_free(I)}constructor(){const I=A.rawdebugrenderpipeline_new();return r.__wrap(I)}vertices(){return B(A.rawdebugrenderpipeline_vertices(this.ptr))}colors(){return B(A.rawdebugrenderpipeline_colors(this.ptr))}render(I,g,C,B,Q){a(I,v),a(g,l),a(C,n),a(B,j),a(Q,x),A.rawdebugrenderpipeline_render(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.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_rawdeserializedworld_free(I)}takeGravity(){const I=A.rawdeserializedworld_takeGravity(this.ptr);return 0===I?void 0:QA.__wrap(I)}takeIntegrationParameters(){const I=A.rawdeserializedworld_takeIntegrationParameters(this.ptr);return 0===I?void 0:Z.__wrap(I)}takeIslandManager(){const I=A.rawdeserializedworld_takeIslandManager(this.ptr);return 0===I?void 0:b.__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:x.__wrap(I)}takeBodies(){const I=A.rawdeserializedworld_takeBodies(this.ptr);return 0===I?void 0:v.__wrap(I)}takeColliders(){const I=A.rawdeserializedworld_takeColliders(this.ptr);return 0===I?void 0:l.__wrap(I)}takeImpulseJoints(){const I=A.rawdeserializedworld_takeImpulseJoints(this.ptr);return 0===I?void 0:n.__wrap(I)}takeMultibodyJoints(){const I=A.rawdeserializedworld_takeMultibodyJoints(this.ptr);return 0===I?void 0:j.__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,J(g))}finally{I[y++]=void 0}}drainContactForceEvents(g){try{A.raweventqueue_drainContactForceEvents(this.ptr,J(g))}finally{I[y++]=void 0}}clear(){A.raweventqueue_clear(this.ptr)}}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_rawgenericjoint_free(I)}static spherical(I,g){a(I,QA),a(g,QA);const C=A.rawgenericjoint_spherical(I.ptr,g.ptr);return O.__wrap(C)}static prismatic(I,g,C,B,Q,E){a(I,QA),a(g,QA),a(C,QA);const i=A.rawgenericjoint_prismatic(I.ptr,g.ptr,C.ptr,B,Q,E);return 0===i?void 0:O.__wrap(i)}static fixed(I,g,C,B){a(I,QA),a(g,_),a(C,QA),a(B,_);const Q=A.rawgenericjoint_fixed(I.ptr,g.ptr,C.ptr,B.ptr);return O.__wrap(Q)}static revolute(I,g,C){a(I,QA),a(g,QA),a(C,QA);const B=A.rawgenericjoint_revolute(I.ptr,g.ptr,C.ptr);return 0===B?void 0:O.__wrap(B)}}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_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 _.__wrap(g)}jointFrameX2(I){const g=A.rawimpulsejointset_jointFrameX2(this.ptr,I);return _.__wrap(g)}jointAnchor1(I){const g=A.rawimpulsejointset_jointAnchor1(this.ptr,I);return QA.__wrap(g)}jointAnchor2(I){const g=A.rawimpulsejointset_jointAnchor2(this.ptr,I);return QA.__wrap(g)}jointSetAnchor1(I,g){a(g,QA),A.rawimpulsejointset_jointSetAnchor1(this.ptr,I,g.ptr)}jointSetAnchor2(I,g){a(g,QA),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 n.__wrap(I)}createJoint(I,g,C,B){a(I,O);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,J(g))}finally{I[y++]=void 0}}forEachJointAttachedToRigidBody(g,C){try{A.rawimpulsejointset_forEachJointAttachedToRigidBody(this.ptr,g,J(C))}finally{I[y++]=void 0}}}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_rawintegrationparameters_free(I)}constructor(){const I=A.rawintegrationparameters_new();return Z.__wrap(I)}get dt(){return A.rawintegrationparameters_dt(this.ptr)}get erp(){return A.rawcharactercollision_toi(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 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_rawislandmanager_free(I)}constructor(){const I=A.rawislandmanager_new();return b.__wrap(I)}forEachActiveRigidBodyHandle(g){try{A.rawislandmanager_forEachActiveRigidBodyHandle(this.ptr,J(g))}finally{I[y++]=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_rawkinematiccharactercontroller_free(I)}constructor(I){const g=A.rawkinematiccharactercontroller_new(I);return W.__wrap(g)}up(){const I=A.rawkinematiccharactercontroller_up(this.ptr);return QA.__wrap(I)}setUp(I){a(I,QA),A.rawkinematiccharactercontroller_setUp(this.ptr,I.ptr)}offset(){return A.rawkinematiccharactercontroller_offset(this.ptr)}setOffset(I){A.rawkinematiccharactercontroller_setOffset(this.ptr,I)}slideEnabled(){return 0!==A.rawkinematiccharactercontroller_slideEnabled(this.ptr)}setSlideEnabled(I){A.rawkinematiccharactercontroller_setSlideEnabled(this.ptr,I)}autostepMaxHeight(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.rawkinematiccharactercontroller_autostepMaxHeight(C,this.ptr);var I=G()[C/4+0],g=K()[C/4+1];return 0===I?void 0:g}finally{A.__wbindgen_add_to_stack_pointer(16)}}autostepMinWidth(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.rawkinematiccharactercontroller_autostepMinWidth(C,this.ptr);var I=G()[C/4+0],g=K()[C/4+1];return 0===I?void 0:g}finally{A.__wbindgen_add_to_stack_pointer(16)}}autostepIncludesDynamicBodies(){const I=A.rawkinematiccharactercontroller_autostepIncludesDynamicBodies(this.ptr);return 16777215===I?void 0:0!==I}autostepEnabled(){return 0!==A.rawkinematiccharactercontroller_autostepEnabled(this.ptr)}enableAutostep(I,g,C){A.rawkinematiccharactercontroller_enableAutostep(this.ptr,I,g,C)}disableAutostep(){A.rawkinematiccharactercontroller_disableAutostep(this.ptr)}maxSlopeClimbAngle(){return A.rawkinematiccharactercontroller_maxSlopeClimbAngle(this.ptr)}setMaxSlopeClimbAngle(I){A.rawkinematiccharactercontroller_setMaxSlopeClimbAngle(this.ptr,I)}minSlopeSlideAngle(){return A.rawkinematiccharactercontroller_minSlopeSlideAngle(this.ptr)}setMinSlopeSlideAngle(I){A.rawkinematiccharactercontroller_setMinSlopeSlideAngle(this.ptr,I)}snapToGroundDistance(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.rawkinematiccharactercontroller_snapToGroundDistance(C,this.ptr);var I=G()[C/4+0],g=K()[C/4+1];return 0===I?void 0:g}finally{A.__wbindgen_add_to_stack_pointer(16)}}enableSnapToGround(I){A.rawkinematiccharactercontroller_enableSnapToGround(this.ptr,I)}disableSnapToGround(){A.rawkinematiccharactercontroller_disableSnapToGround(this.ptr)}snapToGroundEnabled(){return 0!==A.rawkinematiccharactercontroller_snapToGroundEnabled(this.ptr)}computeColliderMovement(g,C,B,Q,i,D,o,G,w,k,S){try{a(C,v),a(B,l),a(Q,V),a(D,QA),A.rawkinematiccharactercontroller_computeColliderMovement(this.ptr,g,C.ptr,B.ptr,Q.ptr,i,D.ptr,o,!E(G),E(G)?0:G,w,!E(k),E(k)?0:k,J(S))}finally{I[y++]=void 0}}computedMovement(){const I=A.rawkinematiccharactercontroller_computedMovement(this.ptr);return QA.__wrap(I)}computedGrounded(){return 0!==A.rawkinematiccharactercontroller_computedGrounded(this.ptr)}numComputedCollisions(){return A.rawkinematiccharactercontroller_numComputedCollisions(this.ptr)>>>0}computedCollision(I,g){a(g,H);return 0!==A.rawkinematiccharactercontroller_computedCollision(this.ptr,I,g.ptr)}}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_rawmultibodyjointset_free(I)}jointType(I){return A.rawmultibodyjointset_jointType(this.ptr,I)>>>0}jointFrameX1(I){const g=A.rawmultibodyjointset_jointFrameX1(this.ptr,I);return _.__wrap(g)}jointFrameX2(I){const g=A.rawmultibodyjointset_jointFrameX2(this.ptr,I);return _.__wrap(g)}jointAnchor1(I){const g=A.rawmultibodyjointset_jointAnchor1(this.ptr,I);return QA.__wrap(g)}jointAnchor2(I){const g=A.rawmultibodyjointset_jointAnchor2(this.ptr,I);return QA.__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 j.__wrap(I)}createJoint(I,g,C,B){a(I,O);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,J(g))}finally{I[y++]=void 0}}forEachJointAttachedToRigidBody(g,C){try{A.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.ptr,g,J(C))}finally{I[y++]=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_rawnarrowphase_free(I)}constructor(){const I=A.rawnarrowphase_new();return x.__wrap(I)}contacts_with(I,g){A.rawnarrowphase_contacts_with(this.ptr,I,Q(g))}contact_pair(I,g){const C=A.rawnarrowphase_contact_pair(this.ptr,I,g);return 0===C?void 0:e.__wrap(C)}intersections_with(I,g){A.rawnarrowphase_intersections_with(this.ptr,I,Q(g))}intersection_pair(I,g){return 0!==A.rawnarrowphase_intersection_pair(this.ptr,I,g)}}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_rawphysicspipeline_free(I)}constructor(){const I=A.rawphysicspipeline_new();return f.__wrap(I)}step(I,g,C,B,Q,E,i,D,o,G){a(I,QA),a(g,Z),a(C,b),a(B,Y),a(Q,x),a(E,v),a(i,l),a(D,n),a(o,j),a(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,E,i,D,o,G,w,k,S,M,K){a(I,QA),a(g,Z),a(C,b),a(B,Y),a(E,x),a(i,v),a(D,l),a(o,n),a(G,j),a(w,L),a(k,T),A.rawphysicspipeline_stepWithEvents(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,E.ptr,i.ptr,D.ptr,o.ptr,G.ptr,w.ptr,k.ptr,Q(S),Q(M),Q(K))}}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_rawpointcolliderprojection_free(I)}colliderHandle(){return A.rawpointcolliderprojection_colliderHandle(this.ptr)}point(){const I=A.rawkinematiccharactercontroller_computedMovement(this.ptr);return QA.__wrap(I)}isInside(){return 0!==A.rawkinematiccharactercontroller_computedGrounded(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 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_rawpointprojection_free(I)}point(){const I=A.rawkinematiccharactercontroller_computedMovement(this.ptr);return QA.__wrap(I)}isInside(){return 0!==A.rawkinematiccharactercontroller_computedGrounded(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_rawquerypipeline_free(I)}constructor(){const I=A.rawquerypipeline_new();return V.__wrap(I)}update(I,g){a(I,v),a(g,l),A.rawquerypipeline_update(this.ptr,I.ptr,g.ptr)}castRay(g,C,B,Q,i,D,o,G,w,k,S){try{a(g,v),a(C,l),a(B,QA),a(Q,QA);const M=A.rawquerypipeline_castRay(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,i,D,o,!E(G),E(G)?0:G,!E(w),E(w)?0:w,!E(k),E(k)?0:k,J(S));return 0===M?void 0:z.__wrap(M)}finally{I[y++]=void 0}}castRayAndGetNormal(g,C,B,Q,i,D,o,G,w,k,S){try{a(g,v),a(C,l),a(B,QA),a(Q,QA);const M=A.rawquerypipeline_castRayAndGetNormal(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,i,D,o,!E(G),E(G)?0:G,!E(w),E(w)?0:w,!E(k),E(k)?0:k,J(S));return 0===M?void 0:P.__wrap(M)}finally{I[y++]=void 0}}intersectionsWithRay(g,C,B,Q,i,D,o,G,w,k,S,M){try{a(g,v),a(C,l),a(B,QA),a(Q,QA),A.rawquerypipeline_intersectionsWithRay(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,i,D,J(o),G,!E(w),E(w)?0:w,!E(k),E(k)?0:k,!E(S),E(S)?0:S,J(M))}finally{I[y++]=void 0,I[y++]=void 0}}intersectionWithShape(g,C,B,Q,i,o,w,k,S,M){try{const h=A.__wbindgen_add_to_stack_pointer(-16);a(g,v),a(C,l),a(B,QA),a(Q,_),a(i,IA),A.rawquerypipeline_intersectionWithShape(h,this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,i.ptr,o,!E(w),E(w)?0:w,!E(k),E(k)?0:k,!E(S),E(S)?0:S,J(M));var K=G()[h/4+0],U=D()[h/8+1];return 0===K?void 0:U}finally{A.__wbindgen_add_to_stack_pointer(16),I[y++]=void 0}}projectPoint(g,C,B,Q,i,D,o,G,w){try{a(g,v),a(C,l),a(B,QA);const k=A.rawquerypipeline_projectPoint(this.ptr,g.ptr,C.ptr,B.ptr,Q,i,!E(D),E(D)?0:D,!E(o),E(o)?0:o,!E(G),E(G)?0:G,J(w));return 0===k?void 0:m.__wrap(k)}finally{I[y++]=void 0}}projectPointAndGetFeature(g,C,B,Q,i,D,o,G){try{a(g,v),a(C,l),a(B,QA);const w=A.rawquerypipeline_projectPointAndGetFeature(this.ptr,g.ptr,C.ptr,B.ptr,Q,!E(i),E(i)?0:i,!E(D),E(D)?0:D,!E(o),E(o)?0:o,J(G));return 0===w?void 0:m.__wrap(w)}finally{I[y++]=void 0}}intersectionsWithPoint(g,C,B,Q,i,D,o,G,w){try{a(g,v),a(C,l),a(B,QA),A.rawquerypipeline_intersectionsWithPoint(this.ptr,g.ptr,C.ptr,B.ptr,J(Q),i,!E(D),E(D)?0:D,!E(o),E(o)?0:o,!E(G),E(G)?0:G,J(w))}finally{I[y++]=void 0,I[y++]=void 0}}castShape(g,C,B,Q,i,D,o,G,w,k,S,M,K){try{a(g,v),a(C,l),a(B,QA),a(Q,_),a(i,QA),a(D,IA);const U=A.rawquerypipeline_castShape(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,i.ptr,D.ptr,o,G,w,!E(k),E(k)?0:k,!E(S),E(S)?0:S,!E(M),E(M)?0:M,J(K));return 0===U?void 0:gA.__wrap(U)}finally{I[y++]=void 0}}intersectionsWithShape(g,C,B,Q,i,D,o,G,w,k,S){try{a(g,v),a(C,l),a(B,QA),a(Q,_),a(i,IA),A.rawquerypipeline_intersectionsWithShape(this.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,i.ptr,J(D),o,!E(G),E(G)?0:G,!E(w),E(w)?0:w,!E(k),E(k)?0:k,J(S))}finally{I[y++]=void 0,I[y++]=void 0}}collidersWithAabbIntersectingAabb(g,C,B){try{a(g,QA),a(C,QA),A.rawquerypipeline_collidersWithAabbIntersectingAabb(this.ptr,g.ptr,C.ptr,J(B))}finally{I[y++]=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.rawcharactercollision_handle(this.ptr)}normal(){const I=A.rawraycolliderintersection_normal(this.ptr);return QA.__wrap(I)}toi(){return A.rawraycolliderintersection_toi(this.ptr)}featureType(){return A.rawraycolliderintersection_featureType(this.ptr)>>>0}featureId(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.rawraycolliderintersection_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_rawraycollidertoi_free(I)}colliderHandle(){return A.rawcharactercollision_handle(this.ptr)}toi(){return A.rawcharactercollision_toi(this.ptr)}}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_rawrayintersection_free(I)}normal(){const I=A.rawcharactercollision_worldWitness1(this.ptr);return QA.__wrap(I)}toi(){return A.rawcharactercollision_toi(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 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_rawrigidbodyset_free(I)}rbTranslation(I){const g=A.rawrigidbodyset_rbTranslation(this.ptr,I);return QA.__wrap(g)}rbRotation(I){const g=A.rawrigidbodyset_rbRotation(this.ptr,I);return _.__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 QA.__wrap(g)}rbNextRotation(I){const g=A.rawrigidbodyset_rbNextRotation(this.ptr,I);return _.__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){a(g,QA),A.rawrigidbodyset_rbSetLinvel(this.ptr,I,g.ptr,C)}rbSetAngvel(I,g,C){a(g,QA),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){a(g,l),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){a(C,QA),a(B,QA),a(Q,_),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 QA.__wrap(g)}rbAngvel(I){const g=A.rawrigidbodyset_rbAngvel(this.ptr,I);return QA.__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)}rbInvMass(I){return A.rawrigidbodyset_rbInvMass(this.ptr,I)}rbEffectiveInvMass(I){const g=A.rawrigidbodyset_rbEffectiveInvMass(this.ptr,I);return QA.__wrap(g)}rbLocalCom(I){const g=A.rawrigidbodyset_rbLocalCom(this.ptr,I);return QA.__wrap(g)}rbWorldCom(I){const g=A.rawrigidbodyset_rbWorldCom(this.ptr,I);return QA.__wrap(g)}rbInvPrincipalInertiaSqrt(I){const g=A.rawrigidbodyset_rbInvPrincipalInertiaSqrt(this.ptr,I);return QA.__wrap(g)}rbPrincipalInertiaLocalFrame(I){const g=A.rawrigidbodyset_rbPrincipalInertiaLocalFrame(this.ptr,I);return _.__wrap(g)}rbPrincipalInertia(I){const g=A.rawrigidbodyset_rbPrincipalInertia(this.ptr,I);return QA.__wrap(g)}rbEffectiveWorldInvInertiaSqrt(I){const g=A.rawrigidbodyset_rbEffectiveWorldInvInertiaSqrt(this.ptr,I);return $.__wrap(g)}rbEffectiveAngularInertia(I){const g=A.rawrigidbodyset_rbEffectiveAngularInertia(this.ptr,I);return $.__wrap(g)}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,C){A.rawrigidbodyset_rbSetBodyType(this.ptr,I,g,C)}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)}rbSetEnabled(I,g){A.rawrigidbodyset_rbSetEnabled(this.ptr,I,g)}rbIsEnabled(I){return 0!==A.rawrigidbodyset_rbIsEnabled(this.ptr,I)}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){a(g,QA),A.rawrigidbodyset_rbAddForce(this.ptr,I,g.ptr,C)}rbApplyImpulse(I,g,C){a(g,QA),A.rawrigidbodyset_rbApplyImpulse(this.ptr,I,g.ptr,C)}rbAddTorque(I,g,C){a(g,QA),A.rawrigidbodyset_rbAddTorque(this.ptr,I,g.ptr,C)}rbApplyTorqueImpulse(I,g,C){a(g,QA),A.rawrigidbodyset_rbApplyTorqueImpulse(this.ptr,I,g.ptr,C)}rbAddForceAtPoint(I,g,C,B){a(g,QA),a(C,QA),A.rawrigidbodyset_rbAddForceAtPoint(this.ptr,I,g.ptr,C.ptr,B)}rbApplyImpulseAtPoint(I,g,C,B){a(g,QA),a(C,QA),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 v.__wrap(I)}createRigidBody(I,g,C,B,Q,E,i,D,o,G,w,k,S,M,K,y,J,U,h,N,F,q,R,s){a(g,QA),a(C,_),a(i,QA),a(D,QA),a(o,QA),a(G,QA),a(w,_);return A.rawrigidbodyset_createRigidBody(this.ptr,I,g.ptr,C.ptr,B,Q,E,i.ptr,D.ptr,o.ptr,G.ptr,w.ptr,k,S,M,K,y,J,U,h,N,F,q,R,s)}remove(I,g,C,B,Q){a(g,b),a(C,l),a(B,n),a(Q,j),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,J(g))}finally{I[y++]=void 0}}propagateModifiedBodyPositionsToColliders(I){a(I,l),A.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.ptr,I.ptr)}}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_rawrotation_free(I)}constructor(I,g,C,B){const Q=A.rawrotation_new(I,g,C,B);return _.__wrap(Q)}static identity(){const I=A.rawrotation_identity();return _.__wrap(I)}get x(){return A.rawintegrationparameters_dt(this.ptr)}get y(){return A.rawrotation_y(this.ptr)}get z(){return A.rawcharactercollision_toi(this.ptr)}get w(){return A.rawrotation_w(this.ptr)}}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_rawsdpmatrix3_free(I)}elements(){return B(A.rawsdpmatrix3_elements(this.ptr))}}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_rawserializationpipeline_free(I)}constructor(){const I=A.rawserializationpipeline_new();return AA.__wrap(I)}serializeAll(I,g,C,Q,E,i,D,o,G){a(I,QA),a(g,Z),a(C,b),a(Q,Y),a(E,x),a(i,v),a(D,l),a(o,n),a(G,j);return B(A.rawserializationpipeline_serializeAll(this.ptr,I.ptr,g.ptr,C.ptr,Q.ptr,E.ptr,i.ptr,D.ptr,o.ptr,G.ptr))}deserializeAll(I){const g=A.rawserializationpipeline_deserializeAll(this.ptr,Q(I));return 0===g?void 0:d.__wrap(g)}}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_rawshape_free(I)}static cuboid(I,g,C){const B=A.rawshape_cuboid(I,g,C);return IA.__wrap(B)}static roundCuboid(I,g,C,B){const Q=A.rawshape_roundCuboid(I,g,C,B);return IA.__wrap(Q)}static ball(I){const g=A.rawshape_ball(I);return IA.__wrap(g)}static halfspace(I){a(I,QA);const g=A.rawshape_halfspace(I.ptr);return IA.__wrap(g)}static capsule(I,g){const C=A.rawshape_capsule(I,g);return IA.__wrap(C)}static cylinder(I,g){const C=A.rawshape_cylinder(I,g);return IA.__wrap(C)}static roundCylinder(I,g,C){const B=A.rawshape_roundCylinder(I,g,C);return IA.__wrap(B)}static cone(I,g){const C=A.rawshape_cone(I,g);return IA.__wrap(C)}static roundCone(I,g,C){const B=A.rawshape_roundCone(I,g,C);return IA.__wrap(B)}static polyline(I,g){const C=q(I,A.__wbindgen_malloc),B=F,Q=R(g,A.__wbindgen_malloc),E=F,i=A.rawshape_polyline(C,B,Q,E);return IA.__wrap(i)}static trimesh(I,g){const C=q(I,A.__wbindgen_malloc),B=F,Q=R(g,A.__wbindgen_malloc),E=F,i=A.rawshape_trimesh(C,B,Q,E);return IA.__wrap(i)}static heightfield(I,g,C,B){const Q=q(C,A.__wbindgen_malloc),E=F;a(B,QA);const i=A.rawshape_heightfield(I,g,Q,E,B.ptr);return IA.__wrap(i)}static segment(I,g){a(I,QA),a(g,QA);const C=A.rawshape_segment(I.ptr,g.ptr);return IA.__wrap(C)}static triangle(I,g,C){a(I,QA),a(g,QA),a(C,QA);const B=A.rawshape_triangle(I.ptr,g.ptr,C.ptr);return IA.__wrap(B)}static roundTriangle(I,g,C,B){a(I,QA),a(g,QA),a(C,QA);const Q=A.rawshape_roundTriangle(I.ptr,g.ptr,C.ptr,B);return IA.__wrap(Q)}static convexHull(I){const g=q(I,A.__wbindgen_malloc),C=F,B=A.rawshape_convexHull(g,C);return 0===B?void 0:IA.__wrap(B)}static roundConvexHull(I,g){const C=q(I,A.__wbindgen_malloc),B=F,Q=A.rawshape_roundConvexHull(C,B,g);return 0===Q?void 0:IA.__wrap(Q)}static convexMesh(I,g){const C=q(I,A.__wbindgen_malloc),B=F,Q=R(g,A.__wbindgen_malloc),E=F,i=A.rawshape_convexMesh(C,B,Q,E);return 0===i?void 0:IA.__wrap(i)}static roundConvexMesh(I,g,C){const B=q(I,A.__wbindgen_malloc),Q=F,E=R(g,A.__wbindgen_malloc),i=F,D=A.rawshape_roundConvexMesh(B,Q,E,i,C);return 0===D?void 0:IA.__wrap(D)}castShape(I,g,C,B,Q,E,i,D,o){a(I,QA),a(g,_),a(C,QA),a(B,IA),a(Q,QA),a(E,_),a(i,QA);const G=A.rawshape_castShape(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E.ptr,i.ptr,D,o);return 0===G?void 0:BA.__wrap(G)}intersectsShape(I,g,C,B,Q){a(I,QA),a(g,_),a(C,IA),a(B,QA),a(Q,_);return 0!==A.rawshape_intersectsShape(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr)}contactShape(I,g,C,B,Q,E){a(I,QA),a(g,_),a(C,IA),a(B,QA),a(Q,_);const i=A.rawshape_contactShape(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q.ptr,E);return 0===i?void 0:CA.__wrap(i)}containsPoint(I,g,C){a(I,QA),a(g,_),a(C,QA);return 0!==A.rawshape_containsPoint(this.ptr,I.ptr,g.ptr,C.ptr)}projectPoint(I,g,C,B){a(I,QA),a(g,_),a(C,QA);const Q=A.rawshape_projectPoint(this.ptr,I.ptr,g.ptr,C.ptr,B);return X.__wrap(Q)}intersectsRay(I,g,C,B,Q){a(I,QA),a(g,_),a(C,QA),a(B,QA);return 0!==A.rawshape_intersectsRay(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q)}castRay(I,g,C,B,Q,E){a(I,QA),a(g,_),a(C,QA),a(B,QA);return A.rawshape_castRay(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q,E)}castRayAndGetNormal(I,g,C,B,Q,E){a(I,QA),a(g,_),a(C,QA),a(B,QA);const i=A.rawshape_castRayAndGetNormal(this.ptr,I.ptr,g.ptr,C.ptr,B.ptr,Q,E);return 0===i?void 0:u.__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_rawshapecollidertoi_free(I)}colliderHandle(){return A.rawcharactercollision_handle(this.ptr)}toi(){return A.rawcharactercollision_toi(this.ptr)}witness1(){const I=A.rawcharactercollision_worldWitness1(this.ptr);return QA.__wrap(I)}witness2(){const I=A.rawshapecollidertoi_witness2(this.ptr);return QA.__wrap(I)}normal1(){const I=A.rawcharactercollision_worldNormal1(this.ptr);return QA.__wrap(I)}normal2(){const I=A.rawshapecollidertoi_normal2(this.ptr);return QA.__wrap(I)}}class CA{static __wrap(A){const I=Object.create(CA.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.rawkinematiccharactercontroller_computedMovement(this.ptr);return QA.__wrap(I)}point2(){const I=A.rawcharactercollision_worldWitness1(this.ptr);return QA.__wrap(I)}normal1(){const I=A.rawshapecollidertoi_witness2(this.ptr);return QA.__wrap(I)}normal2(){const I=A.rawcharactercollision_worldNormal1(this.ptr);return QA.__wrap(I)}}class BA{static __wrap(A){const I=Object.create(BA.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.rawshapetoi_witness1(this.ptr);return QA.__wrap(I)}witness2(){const I=A.rawcontactforceevent_total_force(this.ptr);return QA.__wrap(I)}normal1(){const I=A.rawshapetoi_normal1(this.ptr);return QA.__wrap(I)}normal2(){const I=A.rawshapetoi_normal2(this.ptr);return QA.__wrap(I)}}class QA{static __wrap(A){const I=Object.create(QA.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 QA.__wrap(I)}constructor(I,g,C){const B=A.rawvector_new(I,g,C);return QA.__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.rawcharactercollision_toi(this.ptr)}set z(I){A.rawintegrationparameters_set_erp(this.ptr,I)}xyz(){const I=A.rawvector_xyz(this.ptr);return QA.__wrap(I)}yxz(){const I=A.rawvector_yxz(this.ptr);return QA.__wrap(I)}zxy(){const I=A.rawvector_zxy(this.ptr);return QA.__wrap(I)}xzy(){const I=A.rawvector_xzy(this.ptr);return QA.__wrap(I)}yzx(){const I=A.rawvector_yzx(this.ptr);return QA.__wrap(I)}zyx(){const I=A.rawvector_zyx(this.ptr);return QA.__wrap(I)}}async function EA(I){void 0===I&&(I=new URL("rapier_wasm3d_bg.wasm","<deleted>"));const C=function(){const I={wbg:{}};return I.wbg.__wbindgen_object_drop_ref=function(A){B(A)},I.wbg.__wbindgen_number_new=function(A){return Q(A)},I.wbg.__wbindgen_number_get=function(A,I){const C=g(I),B="number"==typeof C?C:void 0;D()[A/8+1]=E(B)?0:B,G()[A/4+0]=!E(B)},I.wbg.__wbindgen_boolean_get=function(A){const I=g(A);return"boolean"==typeof I?I?1:0:2},I.wbg.__wbindgen_is_function=function(A){return"function"==typeof g(A)},I.wbg.__wbg_rawraycolliderintersection_new=function(A){return Q(P.__wrap(A))},I.wbg.__wbg_rawcontactforceevent_new=function(A){return Q(t.__wrap(A))},I.wbg.__wbg_call_168da88779e35f61=function(){return s((function(A,I,C){return Q(g(A).call(g(I),g(C)))}),arguments)},I.wbg.__wbg_call_3999bee59e9f7719=function(){return s((function(A,I,C,B){return Q(g(A).call(g(I),g(C),g(B)))}),arguments)},I.wbg.__wbg_call_e1f72c051cdab859=function(){return s((function(A,I,C,B,E){return Q(g(A).call(g(I),g(C),g(B),g(E)))}),arguments)},I.wbg.__wbg_bind_10dfe70e95d2a480=function(A,I,C,B){return Q(g(A).bind(g(I),g(C),g(B)))},I.wbg.__wbg_buffer_3f3d764d4747d564=function(A){return Q(g(A).buffer)},I.wbg.__wbg_newwithbyteoffsetandlength_d9aa266703cb98be=function(A,I,C){return Q(new Uint8Array(g(A),I>>>0,C>>>0))},I.wbg.__wbg_new_8c3f0052272a457a=function(A){return Q(new Uint8Array(g(A)))},I.wbg.__wbg_set_83db9690f9353e79=function(A,I,C){g(A).set(g(I),C>>>0)},I.wbg.__wbg_length_9e1ae1900cb0fbd5=function(A){return g(A).length},I.wbg.__wbg_newwithbyteoffsetandlength_be22e5fcf4f69ab4=function(A,I,C){return Q(new Float32Array(g(A),I>>>0,C>>>0))},I.wbg.__wbg_set_0e0314cf6675c1b9=function(A,I,C){g(A).set(g(I),C>>>0)},I.wbg.__wbg_length_9a2deed95d22668d=function(A){return g(A).length},I.wbg.__wbg_newwithlength_a7168e4a1e8f5e12=function(A){return Q(new Float32Array(A>>>0))},I.wbg.__wbindgen_throw=function(A,I){throw new Error(S(A,I))},I.wbg.__wbindgen_memory=function(){return Q(A.memory)},I}();("string"==typeof I||"function"==typeof Request&&I instanceof Request||"function"==typeof URL&&I instanceof URL)&&(I=fetch(I));const{instance:w,module:a}=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,C);return function(I,g){return A=I.exports,EA.__wbindgen_wasm_module=g,M=new Float32Array,i=new Float64Array,o=new Int32Array,h=new Uint32Array,k=new Uint8Array,A}(w,a)}class iA{constructor(A,I,g){this.x=A,this.y=I,this.z=g}}class DA{static new(A,I,g){return new iA(A,I,g)}static intoRaw(A){return new QA(A.x,A.y,A.z)}static zeros(){return DA.new(0,0,0)}static fromRaw(A){if(!A)return null;let I=DA.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 oA{constructor(A,I,g,C){this.x=A,this.y=I,this.z=g,this.w=C}}class GA{static identity(){return new oA(0,0,0,1)}static fromRaw(A){if(!A)return null;let I=new oA(A.x,A.y,A.z,A.w);return A.free(),I}static intoRaw(A){return new _(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}}class wA{constructor(A){this.elements=A}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]}}class kA{static fromRaw(A){const I=new wA(A.elements());return A.free(),I}}var SA,aA,MA,KA,yA,JA,UA,hA,NA,FA,qA,RA;!function(A){A[A.Dynamic=0]="Dynamic",A[A.Fixed=1]="Fixed",A[A.KinematicPositionBased=2]="KinematicPositionBased",A[A.KinematicVelocityBased=3]="KinematicVelocityBased"}(SA||(SA={}));class sA{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 DA.fromRaw(A)}rotation(){let A=this.rawSet.rbRotation(this.handle);return GA.fromRaw(A)}nextTranslation(){let A=this.rawSet.rbNextTranslation(this.handle);return DA.fromRaw(A)}nextRotation(){let A=this.rawSet.rbNextRotation(this.handle);return GA.fromRaw(A)}setTranslation(A,I){this.rawSet.rbSetTranslation(this.handle,A.x,A.y,A.z,I)}setLinvel(A,I){let g=DA.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=DA.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 DA.fromRaw(this.rawSet.rbLinvel(this.handle))}angvel(){return DA.fromRaw(this.rawSet.rbAngvel(this.handle))}mass(){return this.rawSet.rbMass(this.handle)}effectiveInvMass(){return DA.fromRaw(this.rawSet.rbEffectiveInvMass(this.handle))}invMass(){return this.rawSet.rbInvMass(this.handle)}localCom(){return DA.fromRaw(this.rawSet.rbLocalCom(this.handle))}worldCom(){return DA.fromRaw(this.rawSet.rbWorldCom(this.handle))}invPrincipalInertiaSqrt(){return DA.fromRaw(this.rawSet.rbInvPrincipalInertiaSqrt(this.handle))}principalInertia(){return DA.fromRaw(this.rawSet.rbPrincipalInertia(this.handle))}principalInertiaLocalFrame(){return GA.fromRaw(this.rawSet.rbPrincipalInertiaLocalFrame(this.handle))}effectiveWorldInvInertiaSqrt(){return kA.fromRaw(this.rawSet.rbEffectiveWorldInvInertiaSqrt(this.handle))}effectiveAngularInertia(){return kA.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(A){return this.colliderSet.get(this.rawSet.rbCollider(this.handle,A))}setEnabled(A){this.rawSet.rbSetEnabled(this.handle,A)}isEnabled(){return this.rawSet.rbIsEnabled(this.handle)}bodyType(){return this.rawSet.rbBodyType(this.handle)}setBodyType(A,I){return this.rawSet.rbSetBodyType(this.handle,A,I)}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=DA.intoRaw(I),E=DA.intoRaw(g),i=GA.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=DA.intoRaw(A);this.rawSet.rbAddForce(this.handle,g,I),g.free()}applyImpulse(A,I){const g=DA.intoRaw(A);this.rawSet.rbApplyImpulse(this.handle,g,I),g.free()}addTorque(A,I){const g=DA.intoRaw(A);this.rawSet.rbAddTorque(this.handle,g,I),g.free()}applyTorqueImpulse(A,I){const g=DA.intoRaw(A);this.rawSet.rbApplyTorqueImpulse(this.handle,g,I),g.free()}addForceAtPoint(A,I,g){const C=DA.intoRaw(A),B=DA.intoRaw(I);this.rawSet.rbAddForceAtPoint(this.handle,C,B,g),C.free(),B.free()}applyImpulseAtPoint(A,I,g){const C=DA.intoRaw(A),B=DA.intoRaw(I);this.rawSet.rbApplyImpulseAtPoint(this.handle,C,B,g),C.free(),B.free()}}class cA{constructor(A){this.enabled=!0,this.status=A,this.translation=DA.zeros(),this.rotation=GA.identity(),this.gravityScale=1,this.linvel=DA.zeros(),this.mass=0,this.massOnly=!1,this.centerOfMass=DA.zeros(),this.translationsEnabledX=!0,this.translationsEnabledY=!0,this.angvel=DA.zeros(),this.principalAngularInertia=DA.zeros(),this.angularInertiaLocalFrame=GA.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.dominanceGroup=0}static dynamic(){return new cA(SA.Dynamic)}static kinematicPositionBased(){return new cA(SA.KinematicPositionBased)}static kinematicVelocityBased(){return new cA(SA.KinematicVelocityBased)}static fixed(){return new cA(SA.Fixed)}static newDynamic(){return new cA(SA.Dynamic)}static newKinematicPositionBased(){return new cA(SA.KinematicPositionBased)}static newKinematicVelocityBased(){return new cA(SA.KinematicVelocityBased)}static newStatic(){return new cA(SA.Fixed)}setDominanceGroup(A){return this.dominanceGroup=A,this}setEnabled(A){return this.enabled=A,this}setTranslation(A,I,g){if("number"!=typeof A||"number"!=typeof I||"number"!=typeof g)throw TypeError("The translation components must be numbers.");return this.translation={x:A,y:I,z:g},this}setRotation(A){return GA.copy(this.rotation,A),this}setGravityScale(A){return this.gravityScale=A,this}setAdditionalMass(A){return this.mass=A,this.massOnly=!0,this}setLinvel(A,I,g){if("number"!=typeof A||"number"!=typeof I||"number"!=typeof g)throw TypeError("The linvel components must be numbers.");return this.linvel={x:A,y:I,z:g},this}setAngvel(A){return DA.copy(this.angvel,A),this}setAdditionalMassProperties(A,I,g,C){return this.mass=A,DA.copy(this.centerOfMass,I),DA.copy(this.principalAngularInertia,g),GA.copy(this.angularInertiaLocalFrame,C),this.massOnly=!1,this}enabledTranslations(A,I,g){return this.translationsEnabledX=A,this.translationsEnabledY=I,this.translationsEnabledZ=g,this}restrictTranslations(A,I,g){return this.enabledTranslations(A,I,g)}lockTranslations(){return this.enabledTranslations(!1,!1,!1)}enabledRotations(A,I,g){return this.rotationsEnabledX=A,this.rotationsEnabledY=I,this.rotationsEnabledZ=g,this}restrictRotations(A,I,g){return this.enabledRotations(A,I,g)}lockRotations(){return this.restrictRotations(!1,!1,!1)}setLinearDamping(A){return this.linearDamping=A,this}setAngularDamping(A){return this.angularDamping=A,this}setCanSleep(A){return this.canSleep=A,this}setSleeping(A){return this.sleeping=A,this}setCcdEnabled(A){return this.ccdEnabled=A,this}setUserData(A){return this.userData=A,this}}class YA{constructor(){this.fconv=new Float64Array(1),this.uconv=new Uint32Array(this.fconv.buffer),this.data=new Array,this.size=0}set(A,I){let g=this.index(A);for(;this.data.length<=g;)this.data.push(null);null==this.data[g]&&(this.size+=1),this.data[g]=I}len(){return this.size}delete(A){let I=this.index(A);I<this.data.length&&(null!=this.data[I]&&(this.size-=1),this.data[I]=null)}clear(){this.data=new Array}get(A){let I=this.index(A);return I<this.data.length?this.data[I]:null}forEach(A){for(const I of this.data)null!=I&&A(I)}getAll(){return this.data.filter((A=>null!=A))}index(A){return this.fconv[0]=A,this.uconv[0]}}class LA{constructor(A){this.raw=A||new v,this.map=new YA,A&&A.forEachRigidBodyHandle((I=>{this.map.set(I,new sA(A,null,I))}))}free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}finalizeDeserialization(A){this.map.forEach((I=>I.finalizeDeserialization(A)))}createRigidBody(A,I){let g=DA.intoRaw(I.translation),C=GA.intoRaw(I.rotation),B=DA.intoRaw(I.linvel),Q=DA.intoRaw(I.centerOfMass),E=DA.intoRaw(I.angvel),i=DA.intoRaw(I.principalAngularInertia),D=GA.intoRaw(I.angularInertiaLocalFrame),o=this.raw.createRigidBody(I.enabled,g,C,I.gravityScale,I.mass,I.massOnly,Q,B,E,i,D,I.translationsEnabledX,I.translationsEnabledY,I.translationsEnabledZ,I.rotationsEnabledX,I.rotationsEnabledY,I.rotationsEnabledZ,I.linearDamping,I.angularDamping,I.status,I.canSleep,I.sleeping,I.ccdEnabled,I.dominanceGroup);g.free(),C.free(),B.free(),Q.free(),E.free(),i.free(),D.free();const G=new sA(this.raw,A,o);return G.userData=I.userData,this.map.set(o,G),G}remove(A,I,g,C,B){for(let I=0;I<this.raw.rbNumColliders(A);I+=1)g.unmap(this.raw.rbCollider(A,I));C.forEachJointHandleAttachedToRigidBody(A,(A=>C.unmap(A))),B.forEachJointHandleAttachedToRigidBody(A,(A=>B.unmap(A))),this.raw.remove(A,I.raw,g.raw,C.raw,B.raw),this.map.delete(A)}len(){return this.map.len()}contains(A){return null!=this.get(A)}get(A){return this.map.get(A)}forEach(A){this.map.forEach(A)}forEachActiveRigidBody(A,I){A.forEachActiveRigidBodyHandle((A=>{I(this.get(A))}))}getAll(){return this.map.getAll()}}class HA{constructor(A){this.raw=A||new Z}free(){this.raw&&this.raw.free(),this.raw=void 0}get dt(){return this.raw.dt}get erp(){return this.raw.erp}get allowedLinearError(){return this.raw.allowedLinearError}get predictionDistance(){return this.raw.predictionDistance}get maxVelocityIterations(){return this.raw.maxVelocityIterations}get maxVelocityFrictionIterations(){return this.raw.maxVelocityFrictionIterations}get maxStabilizationIterations(){return this.raw.maxStabilizationIterations}get minIslandSize(){return this.raw.minIslandSize}get maxCcdSubsteps(){return this.raw.maxCcdSubsteps}set dt(A){this.raw.dt=A}set erp(A){this.raw.erp=A}set allowedLinearError(A){this.raw.allowedLinearError=A}set predictionDistance(A){this.raw.predictionDistance=A}set maxVelocityIterations(A){this.raw.maxVelocityIterations=A}set maxVelocityFrictionIterations(A){this.raw.maxVelocityFrictionIterations=A}set maxStabilizationIterations(A){this.raw.maxStabilizationIterations=A}set minIslandSize(A){this.raw.minIslandSize=A}set maxCcdSubsteps(A){this.raw.maxCcdSubsteps=A}}!function(A){A[A.Revolute=0]="Revolute",A[A.Fixed=1]="Fixed",A[A.Prismatic=2]="Prismatic",A[A.Spherical=3]="Spherical"}(aA||(aA={})),function(A){A[A.AccelerationBased=0]="AccelerationBased",A[A.ForceBased=1]="ForceBased"}(MA||(MA={}));class lA{constructor(A,I,g){this.rawSet=A,this.bodySet=I,this.handle=g}static newTyped(A,I,g){switch(A.jointType(g)){case aA.Revolute:return new rA(A,I,g);case aA.Prismatic:return new eA(A,I,g);case aA.Fixed:return new pA(A,I,g);case aA.Spherical:return new dA(A,I,g);default:return new lA(A,I,g)}}finalizeDeserialization(A){this.bodySet=A}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 GA.fromRaw(this.rawSet.jointFrameX1(this.handle))}frameX2(){return GA.fromRaw(this.rawSet.jointFrameX2(this.handle))}anchor1(){return DA.fromRaw(this.rawSet.jointAnchor1(this.handle))}anchor2(){return DA.fromRaw(this.rawSet.jointAnchor2(this.handle))}setAnchor1(A){const I=DA.intoRaw(A);this.rawSet.jointSetAnchor1(this.handle,I),I.free()}setAnchor2(A){const I=DA.intoRaw(A);this.rawSet.jointSetAnchor2(this.handle,I),I.free()}setContactsEnabled(A){this.rawSet.jointSetContactsEnabled(this.handle,A)}contactsEnabled(){return this.rawSet.jointContactsEnabled(this.handle)}}class tA extends lA{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(A,I){this.rawSet.jointSetLimits(this.handle,this.rawAxis(),A,I)}configureMotorModel(A){this.rawSet.jointConfigureMotorModel(this.handle,this.rawAxis(),A)}configureMotorVelocity(A,I){this.rawSet.jointConfigureMotorVelocity(this.handle,this.rawAxis(),A,I)}configureMotorPosition(A,I,g){this.rawSet.jointConfigureMotorPosition(this.handle,this.rawAxis(),A,I,g)}configureMotor(A,I,g,C){this.rawSet.jointConfigureMotor(this.handle,this.rawAxis(),A,I,g,C)}}class pA extends lA{}class eA extends tA{rawAxis(){return c.X}}class rA extends tA{rawAxis(){return c.AngX}}class dA extends lA{}class TA{constructor(){}static fixed(A,I,g,C){let B=new TA;return B.anchor1=A,B.anchor2=g,B.frame1=I,B.frame2=C,B.jointType=aA.Fixed,B}static spherical(A,I){let g=new TA;return g.anchor1=A,g.anchor2=I,g.jointType=aA.Spherical,g}static prismatic(A,I,g){let C=new TA;return C.anchor1=A,C.anchor2=I,C.axis=g,C.jointType=aA.Prismatic,C}static revolute(A,I,g){let C=new TA;return C.anchor1=A,C.anchor2=I,C.axis=g,C.jointType=aA.Revolute,C}intoRaw(){let A,I,g=DA.intoRaw(this.anchor1),C=DA.intoRaw(this.anchor2),B=!1,Q=0,E=0;switch(this.jointType){case aA.Fixed:let i=GA.intoRaw(this.frame1),D=GA.intoRaw(this.frame2);I=O.fixed(g,i,C,D),i.free(),D.free();break;case aA.Prismatic:A=DA.intoRaw(this.axis),this.limitsEnabled&&(B=!0,Q=this.limits[0],E=this.limits[1]),I=O.prismatic(g,C,A,B,Q,E),A.free();break;case aA.Spherical:I=O.spherical(g,C);break;case aA.Revolute:A=DA.intoRaw(this.axis),I=O.revolute(g,C,A),A.free()}return g.free(),C.free(),I}}class OA{constructor(A){this.raw=A||new n,this.map=new YA,A&&A.forEachJointHandle((I=>{this.map.set(I,lA.newTyped(A,null,I))}))}free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}finalizeDeserialization(A){this.map.forEach((I=>I.finalizeDeserialization(A)))}createJoint(A,I,g,C,B){const Q=I.intoRaw(),E=this.raw.createJoint(Q,g,C,B);Q.free();let i=lA.newTyped(this.raw,A,E);return this.map.set(E,i),i}remove(A,I){this.raw.remove(A,I),this.unmap(A)}forEachJointHandleAttachedToRigidBody(A,I){this.raw.forEachJointAttachedToRigidBody(A,I)}unmap(A){this.map.delete(A)}len(){return this.map.len()}contains(A){return null!=this.get(A)}get(A){return this.map.get(A)}forEach(A){this.map.forEach(A)}getAll(){return this.map.getAll()}}class nA{constructor(A,I){this.rawSet=A,this.handle=I}static newTyped(A,I){switch(A.jointType(I)){case aA.Revolute:return new jA(A,I);case aA.Prismatic:return new WA(A,I);case aA.Fixed:return new bA(A,I);case aA.Spherical:return new xA(A,I);default:return new nA(A,I)}}isValid(){return this.rawSet.contains(this.handle)}setContactsEnabled(A){this.rawSet.jointSetContactsEnabled(this.handle,A)}contactsEnabled(){return this.rawSet.jointContactsEnabled(this.handle)}}class ZA extends nA{}class bA extends nA{}class WA extends ZA{rawAxis(){return c.X}}class jA extends ZA{rawAxis(){return c.AngX}}class xA extends nA{}class fA{constructor(A){this.raw=A||new j,this.map=new YA,A&&A.forEachJointHandle((A=>{this.map.set(A,nA.newTyped(this.raw,A))}))}free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}createJoint(A,I,g,C){const B=A.intoRaw(),Q=this.raw.createJoint(B,I,g,C);B.free();let E=nA.newTyped(this.raw,Q);return this.map.set(Q,E),E}remove(A,I){this.raw.remove(A,I),this.map.delete(A)}unmap(A){this.map.delete(A)}len(){return this.map.len()}contains(A){return null!=this.get(A)}get(A){return this.map.get(A)}forEach(A){this.map.forEach(A)}forEachJointHandleAttachedToRigidBody(A,I){this.raw.forEachJointAttachedToRigidBody(A,I)}getAll(){return this.map.getAll()}}!function(A){A[A.Average=0]="Average",A[A.Min=1]="Min",A[A.Multiply=2]="Multiply",A[A.Max=3]="Max"}(KA||(KA={}));class mA{constructor(A){this.raw=A||new L}free(){this.raw&&this.raw.free(),this.raw=void 0}}class XA{constructor(A){this.raw=A||new b}free(){this.raw&&this.raw.free(),this.raw=void 0}forEachActiveRigidBodyHandle(A){this.raw.forEachActiveRigidBodyHandle(A)}}class VA{constructor(A){this.raw=A||new Y}free(){this.raw&&this.raw.free(),this.raw=void 0}}class PA{constructor(A){this.raw=A||new x,this.tempManifold=new zA(null)}free(){this.raw&&this.raw.free(),this.raw=void 0}contactsWith(A,I){this.raw.contacts_with(A,I)}intersectionsWith(A,I){this.raw.intersections_with(A,I)}contactPair(A,I,g){const C=this.raw.contact_pair(A,I);if(C){const I=C.collider1()!=A;let B;for(B=0;B<C.numContactManifolds();++B)this.tempManifold.raw=C.contactManifold(B),this.tempManifold.raw&&g(this.tempManifold,I),this.tempManifold.free();C.free()}}intersectionPair(A,I){return this.raw.intersection_pair(A,I)}}class zA{constructor(A){this.raw=A}free(){this.raw&&this.raw.free(),this.raw=void 0}normal(){return DA.fromRaw(this.raw.normal())}localNormal1(){return DA.fromRaw(this.raw.local_n1())}localNormal2(){return DA.fromRaw(this.raw.local_n2())}subshape1(){return this.raw.subshape1()}subshape2(){return this.raw.subshape2()}numContacts(){return this.raw.num_contacts()}localContactPoint1(A){return DA.fromRaw(this.raw.contact_local_p1(A))}localContactPoint2(A){return DA.fromRaw(this.raw.contact_local_p2(A))}contactDist(A){return this.raw.contact_dist(A)}contactFid1(A){return this.raw.contact_fid1(A)}contactFid2(A){return this.raw.contact_fid2(A)}contactImpulse(A){return this.raw.contact_impulse(A)}contactTangentImpulseX(A){return this.raw.contact_tangent_impulse_x(A)}contactTangentImpulseY(A){return this.raw.contact_tangent_impulse_y(A)}numSolverContacts(){return this.raw.num_solver_contacts()}solverContactPoint(A){return DA.fromRaw(this.raw.solver_contact_point(A))}solverContactDist(A){return this.raw.solver_contact_dist(A)}solverContactFriction(A){return this.raw.solver_contact_friction(A)}solverContactRestitution(A){return this.raw.solver_contact_restitution(A)}solverContactTangentVelocity(A){return DA.fromRaw(this.raw.solver_contact_tangent_velocity(A))}}class uA{constructor(A,I,g,C,B){this.distance=A,this.point1=I,this.point2=g,this.normal1=C,this.normal2=B}static fromRaw(A){if(!A)return null;const I=new uA(A.distance(),DA.fromRaw(A.point1()),DA.fromRaw(A.point2()),DA.fromRaw(A.normal1()),DA.fromRaw(A.normal2()));return A.free(),I}}!function(A){A[A.Vertex=0]="Vertex",A[A.Edge=1]="Edge",A[A.Face=2]="Face",A[A.Unknown=3]="Unknown"}(yA||(yA={}));class vA{constructor(A,I){this.point=A,this.isInside=I}static fromRaw(A){if(!A)return null;const I=new vA(DA.fromRaw(A.point()),A.isInside());return A.free(),I}}class _A{constructor(A,I,g,C,B){this.featureType=yA.Unknown,this.featureId=void 0,this.collider=A,this.point=I,this.isInside=g,void 0!==B&&(this.featureId=B),void 0!==C&&(this.featureType=C)}static fromRaw(A,I){if(!I)return null;const g=new _A(A.get(I.colliderHandle()),DA.fromRaw(I.point()),I.isInside(),I.featureType(),I.featureId());return I.free(),g}}class $A{constructor(A,I){this.origin=A,this.dir=I}pointAt(A){return{x:this.origin.x+this.dir.x*A,y:this.origin.y+this.dir.y*A,z:this.origin.z+this.dir.z*A}}}class AI{constructor(A,I,g,C){this.featureType=yA.Unknown,this.featureId=void 0,this.toi=A,this.normal=I,void 0!==C&&(this.featureId=C),void 0!==g&&(this.featureType=g)}static fromRaw(A){if(!A)return null;const I=new AI(A.toi(),DA.fromRaw(A.normal()),A.featureType(),A.featureId());return A.free(),I}}class II{constructor(A,I,g,C,B){this.featureType=yA.Unknown,this.featureId=void 0,this.collider=A,this.toi=I,this.normal=g,void 0!==B&&(this.featureId=B),void 0!==C&&(this.featureType=C)}static fromRaw(A,I){if(!I)return null;const g=new II(A.get(I.colliderHandle()),I.toi(),DA.fromRaw(I.normal()),I.featureType(),I.featureId());return I.free(),g}}class gI{constructor(A,I){this.collider=A,this.toi=I}static fromRaw(A,I){if(!I)return null;const g=new gI(A.get(I.colliderHandle()),I.toi());return I.free(),g}}class CI{constructor(A,I,g,C,B){this.toi=A,this.witness1=I,this.witness2=g,this.normal1=C,this.normal2=B}static fromRaw(A,I){if(!I)return null;const g=new CI(I.toi(),DA.fromRaw(I.witness1()),DA.fromRaw(I.witness2()),DA.fromRaw(I.normal1()),DA.fromRaw(I.normal2()));return I.free(),g}}class BI extends CI{constructor(A,I,g,C,B,Q){super(I,g,C,B,Q),this.collider=A}static fromRaw(A,I){if(!I)return null;const g=new BI(A.get(I.colliderHandle()),I.toi(),DA.fromRaw(I.witness1()),DA.fromRaw(I.witness2()),DA.fromRaw(I.normal1()),DA.fromRaw(I.normal2()));return I.free(),g}}class QI{static fromRaw(A,I){const g=A.coShapeType(I);let C,B,Q,E,i,D,o;switch(g){case JA.Ball:return new EI(A.coRadius(I));case JA.Cuboid:return C=A.coHalfExtents(I),new DI(C.x,C.y,C.z);case JA.RoundCuboid:return C=A.coHalfExtents(I),B=A.coRoundRadius(I),new oI(C.x,C.y,C.z,B);case JA.Capsule:return i=A.coHalfHeight(I),D=A.coRadius(I),new GI(i,D);case JA.Segment:return Q=A.coVertices(I),new wI(DA.new(Q[0],Q[1],Q[2]),DA.new(Q[3],Q[4],Q[5]));case JA.Polyline:return Q=A.coVertices(I),E=A.coIndices(I),new aI(Q,E);case JA.Triangle:return Q=A.coVertices(I),new kI(DA.new(Q[0],Q[1],Q[2]),DA.new(Q[3],Q[4],Q[5]),DA.new(Q[6],Q[7],Q[8]));case JA.RoundTriangle:return Q=A.coVertices(I),B=A.coRoundRadius(I),new SI(DA.new(Q[0],Q[1],Q[2]),DA.new(Q[3],Q[4],Q[5]),DA.new(Q[6],Q[7],Q[8]),B);case JA.HalfSpace:return o=DA.fromRaw(A.coHalfspaceNormal(I)),new iI(o);case JA.TriMesh:return Q=A.coVertices(I),E=A.coIndices(I),new MI(Q,E);case JA.HeightField:const G=A.coHeightfieldScale(I),w=A.coHeightfieldHeights(I),k=A.coHeightfieldNRows(I),S=A.coHeightfieldNCols(I);return new JI(k,S,w,G);case JA.ConvexPolyhedron:return Q=A.coVertices(I),E=A.coIndices(I),new KI(Q,E);case JA.RoundConvexPolyhedron:return Q=A.coVertices(I),E=A.coIndices(I),B=A.coRoundRadius(I),new yI(Q,E,B);case JA.Cylinder:return i=A.coHalfHeight(I),D=A.coRadius(I),new UI(i,D);case JA.RoundCylinder:return i=A.coHalfHeight(I),D=A.coRadius(I),B=A.coRoundRadius(I),new hI(i,D,B);case JA.Cone:return i=A.coHalfHeight(I),D=A.coRadius(I),new NI(i,D);case JA.RoundCone:return i=A.coHalfHeight(I),D=A.coRadius(I),B=A.coRoundRadius(I),new FI(i,D,B);default:throw new Error("unknown shape type: "+g)}}castShape(A,I,g,C,B,Q,E,i,D){let o=DA.intoRaw(A),G=GA.intoRaw(I),w=DA.intoRaw(g),k=DA.intoRaw(B),S=GA.intoRaw(Q),a=DA.intoRaw(E),M=this.intoRaw(),K=C.intoRaw(),y=CI.fromRaw(null,M.castShape(o,G,w,K,k,S,a,i,D));return o.free(),G.free(),w.free(),k.free(),S.free(),a.free(),M.free(),K.free(),y}intersectsShape(A,I,g,C,B){let Q=DA.intoRaw(A),E=GA.intoRaw(I),i=DA.intoRaw(C),D=GA.intoRaw(B),o=this.intoRaw(),G=g.intoRaw(),w=o.intersectsShape(Q,E,G,i,D);return Q.free(),E.free(),i.free(),D.free(),o.free(),G.free(),w}contactShape(A,I,g,C,B,Q){let E=DA.intoRaw(A),i=GA.intoRaw(I),D=DA.intoRaw(C),o=GA.intoRaw(B),G=this.intoRaw(),w=g.intoRaw(),k=uA.fromRaw(G.contactShape(E,i,w,D,o,Q));return E.free(),i.free(),D.free(),o.free(),G.free(),w.free(),k}containsPoint(A,I,g){let C=DA.intoRaw(A),B=GA.intoRaw(I),Q=DA.intoRaw(g),E=this.intoRaw(),i=E.containsPoint(C,B,Q);return C.free(),B.free(),Q.free(),E.free(),i}projectPoint(A,I,g,C){let B=DA.intoRaw(A),Q=GA.intoRaw(I),E=DA.intoRaw(g),i=this.intoRaw(),D=vA.fromRaw(i.projectPoint(B,Q,E,C));return B.free(),Q.free(),E.free(),i.free(),D}intersectsRay(A,I,g,C){let B=DA.intoRaw(I),Q=GA.intoRaw(g),E=DA.intoRaw(A.origin),i=DA.intoRaw(A.dir),D=this.intoRaw(),o=D.intersectsRay(B,Q,E,i,C);return B.free(),Q.free(),E.free(),i.free(),D.free(),o}castRay(A,I,g,C,B){let Q=DA.intoRaw(I),E=GA.intoRaw(g),i=DA.intoRaw(A.origin),D=DA.intoRaw(A.dir),o=this.intoRaw(),G=o.castRay(Q,E,i,D,C,B);return Q.free(),E.free(),i.free(),D.free(),o.free(),G}castRayAndGetNormal(A,I,g,C,B){let Q=DA.intoRaw(I),E=GA.intoRaw(g),i=DA.intoRaw(A.origin),D=DA.intoRaw(A.dir),o=this.intoRaw(),G=AI.fromRaw(o.castRayAndGetNormal(Q,E,i,D,C,B));return Q.free(),E.free(),i.free(),D.free(),o.free(),G}}!function(A){A[A.Ball=0]="Ball",A[A.Cuboid=1]="Cuboid",A[A.Capsule=2]="Capsule",A[A.Segment=3]="Segment",A[A.Polyline=4]="Polyline",A[A.Triangle=5]="Triangle",A[A.TriMesh=6]="TriMesh",A[A.HeightField=7]="HeightField",A[A.ConvexPolyhedron=9]="ConvexPolyhedron",A[A.Cylinder=10]="Cylinder",A[A.Cone=11]="Cone",A[A.RoundCuboid=12]="RoundCuboid",A[A.RoundTriangle=13]="RoundTriangle",A[A.RoundCylinder=14]="RoundCylinder",A[A.RoundCone=15]="RoundCone",A[A.RoundConvexPolyhedron=16]="RoundConvexPolyhedron",A[A.HalfSpace=17]="HalfSpace"}(JA||(JA={}));class EI extends QI{constructor(A){super(),this.type=JA.Ball,this.radius=A}intoRaw(){return IA.ball(this.radius)}}class iI extends QI{constructor(A){super(),this.type=JA.HalfSpace,this.normal=A}intoRaw(){let A=DA.intoRaw(this.normal),I=IA.halfspace(A);return A.free(),I}}class DI extends QI{constructor(A,I,g){super(),this.type=JA.Cuboid,this.halfExtents=DA.new(A,I,g)}intoRaw(){return IA.cuboid(this.halfExtents.x,this.halfExtents.y,this.halfExtents.z)}}class oI extends QI{constructor(A,I,g,C){super(),this.type=JA.RoundCuboid,this.halfExtents=DA.new(A,I,g),this.borderRadius=C}intoRaw(){return IA.roundCuboid(this.halfExtents.x,this.halfExtents.y,this.halfExtents.z,this.borderRadius)}}class GI extends QI{constructor(A,I){super(),this.type=JA.Capsule,this.halfHeight=A,this.radius=I}intoRaw(){return IA.capsule(this.halfHeight,this.radius)}}class wI extends QI{constructor(A,I){super(),this.type=JA.Segment,this.a=A,this.b=I}intoRaw(){let A=DA.intoRaw(this.a),I=DA.intoRaw(this.b),g=IA.segment(A,I);return A.free(),I.free(),g}}class kI extends QI{constructor(A,I,g){super(),this.type=JA.Triangle,this.a=A,this.b=I,this.c=g}intoRaw(){let A=DA.intoRaw(this.a),I=DA.intoRaw(this.b),g=DA.intoRaw(this.c),C=IA.triangle(A,I,g);return A.free(),I.free(),g.free(),C}}class SI extends QI{constructor(A,I,g,C){super(),this.type=JA.RoundTriangle,this.a=A,this.b=I,this.c=g,this.borderRadius=C}intoRaw(){let A=DA.intoRaw(this.a),I=DA.intoRaw(this.b),g=DA.intoRaw(this.c),C=IA.roundTriangle(A,I,g,this.borderRadius);return A.free(),I.free(),g.free(),C}}class aI extends QI{constructor(A,I){super(),this.type=JA.Polyline,this.vertices=A,this.indices=null!=I?I:new Uint32Array(0)}intoRaw(){return IA.polyline(this.vertices,this.indices)}}class MI extends QI{constructor(A,I){super(),this.type=JA.TriMesh,this.vertices=A,this.indices=I}intoRaw(){return IA.trimesh(this.vertices,this.indices)}}class KI extends QI{constructor(A,I){super(),this.type=JA.ConvexPolyhedron,this.vertices=A,this.indices=I}intoRaw(){return this.indices?IA.convexMesh(this.vertices,this.indices):IA.convexHull(this.vertices)}}class yI extends QI{constructor(A,I,g){super(),this.type=JA.RoundConvexPolyhedron,this.vertices=A,this.indices=I,this.borderRadius=g}intoRaw(){return this.indices?IA.roundConvexMesh(this.vertices,this.indices,this.borderRadius):IA.roundConvexHull(this.vertices,this.borderRadius)}}class JI extends QI{constructor(A,I,g,C){super(),this.type=JA.HeightField,this.nrows=A,this.ncols=I,this.heights=g,this.scale=C}intoRaw(){let A=DA.intoRaw(this.scale),I=IA.heightfield(this.nrows,this.ncols,this.heights,A);return A.free(),I}}class UI extends QI{constructor(A,I){super(),this.type=JA.Cylinder,this.halfHeight=A,this.radius=I}intoRaw(){return IA.cylinder(this.halfHeight,this.radius)}}class hI extends QI{constructor(A,I,g){super(),this.type=JA.RoundCylinder,this.borderRadius=g,this.halfHeight=A,this.radius=I}intoRaw(){return IA.roundCylinder(this.halfHeight,this.radius,this.borderRadius)}}class NI extends QI{constructor(A,I){super(),this.type=JA.Cone,this.halfHeight=A,this.radius=I}intoRaw(){return IA.cone(this.halfHeight,this.radius)}}class FI extends QI{constructor(A,I,g){super(),this.type=JA.RoundCone,this.halfHeight=A,this.radius=I,this.borderRadius=g}intoRaw(){return IA.roundCone(this.halfHeight,this.radius,this.borderRadius)}}!function(A){A[A.DYNAMIC_DYNAMIC=1]="DYNAMIC_DYNAMIC",A[A.DYNAMIC_KINEMATIC=12]="DYNAMIC_KINEMATIC",A[A.DYNAMIC_FIXED=2]="DYNAMIC_FIXED",A[A.KINEMATIC_KINEMATIC=52224]="KINEMATIC_KINEMATIC",A[A.KINEMATIC_FIXED=8704]="KINEMATIC_FIXED",A[A.FIXED_FIXED=32]="FIXED_FIXED",A[A.DEFAULT=15]="DEFAULT",A[A.ALL=60943]="ALL"}(UA||(UA={}));class qI{constructor(A,I,g,C){this.colliderSet=A,this.handle=I,this._parent=g,this._shape=C}finalizeDeserialization(A){null!=this.handle&&(this._parent=A.get(this.colliderSet.raw.coParent(this.handle)))}ensureShapeIsCached(){this._shape||(this._shape=QI.fromRaw(this.colliderSet.raw,this.handle))}get shape(){return this.ensureShapeIsCached(),this._shape}isValid(){return this.colliderSet.raw.contains(this.handle)}translation(){return DA.fromRaw(this.colliderSet.raw.coTranslation(this.handle))}rotation(){return GA.fromRaw(this.colliderSet.raw.coRotation(this.handle))}isSensor(){return this.colliderSet.raw.coIsSensor(this.handle)}setSensor(A){this.colliderSet.raw.coSetSensor(this.handle,A)}setShape(A){let I=A.intoRaw();this.colliderSet.raw.coSetShape(this.handle,I),I.free(),this._shape=A}setEnabled(A){this.colliderSet.raw.coSetEnabled(this.handle,A)}isEnabled(){return this.colliderSet.raw.coIsEnabled(this.handle)}setRestitution(A){this.colliderSet.raw.coSetRestitution(this.handle,A)}setFriction(A){this.colliderSet.raw.coSetFriction(this.handle,A)}frictionCombineRule(){return this.colliderSet.raw.coFrictionCombineRule(this.handle)}setFrictionCombineRule(A){this.colliderSet.raw.coSetFrictionCombineRule(this.handle,A)}restitutionCombineRule(){return this.colliderSet.raw.coRestitutionCombineRule(this.handle)}setRestitutionCombineRule(A){this.colliderSet.raw.coSetRestitutionCombineRule(this.handle,A)}setCollisionGroups(A){this.colliderSet.raw.coSetCollisionGroups(this.handle,A)}setSolverGroups(A){this.colliderSet.raw.coSetSolverGroups(this.handle,A)}activeHooks(){return this.colliderSet.raw.coActiveHooks(this.handle)}setActiveHooks(A){this.colliderSet.raw.coSetActiveHooks(this.handle,A)}activeEvents(){return this.colliderSet.raw.coActiveEvents(this.handle)}setActiveEvents(A){this.colliderSet.raw.coSetActiveEvents(this.handle,A)}activeCollisionTypes(){return this.colliderSet.raw.coActiveCollisionTypes(this.handle)}setContactForceEventThreshold(A){return this.colliderSet.raw.coSetContactForceEventThreshold(this.handle,A)}contactForceEventThreshold(){return this.colliderSet.raw.coContactForceEventThreshold(this.handle)}setActiveCollisionTypes(A){this.colliderSet.raw.coSetActiveCollisionTypes(this.handle,A)}setDensity(A){this.colliderSet.raw.coSetDensity(this.handle,A)}setMass(A){this.colliderSet.raw.coSetMass(this.handle,A)}setMassProperties(A,I,g,C){let B=DA.intoRaw(I),Q=DA.intoRaw(g),E=GA.intoRaw(C);this.colliderSet.raw.coSetMassProperties(this.handle,A,B,Q,E),B.free(),Q.free(),E.free()}setTranslation(A){this.colliderSet.raw.coSetTranslation(this.handle,A.x,A.y,A.z)}setTranslationWrtParent(A){this.colliderSet.raw.coSetTranslationWrtParent(this.handle,A.x,A.y,A.z)}setRotation(A){this.colliderSet.raw.coSetRotation(this.handle,A.x,A.y,A.z,A.w)}setRotationWrtParent(A){this.colliderSet.raw.coSetRotationWrtParent(this.handle,A.x,A.y,A.z,A.w)}shapeType(){return this.colliderSet.raw.coShapeType(this.handle)}halfExtents(){return DA.fromRaw(this.colliderSet.raw.coHalfExtents(this.handle))}setHalfExtents(A){const I=DA.intoRaw(A);this.colliderSet.raw.coSetHalfExtents(this.handle,I)}radius(){return this.colliderSet.raw.coRadius(this.handle)}setRadius(A){this.colliderSet.raw.coSetRadius(this.handle,A)}roundRadius(){return this.colliderSet.raw.coRoundRadius(this.handle)}setRoundRadius(A){this.colliderSet.raw.coSetRoundRadius(this.handle,A)}halfHeight(){return this.colliderSet.raw.coHalfHeight(this.handle)}setHalfHeight(A){this.colliderSet.raw.coSetHalfHeight(this.handle,A)}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 A=this.colliderSet.raw.coHeightfieldScale(this.handle);return DA.fromRaw(A)}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(A){let I=DA.intoRaw(A),g=this.colliderSet.raw.coContainsPoint(this.handle,I);return I.free(),g}projectPoint(A,I){let g=DA.intoRaw(A),C=vA.fromRaw(this.colliderSet.raw.coProjectPoint(this.handle,g,I));return g.free(),C}intersectsRay(A,I){let g=DA.intoRaw(A.origin),C=DA.intoRaw(A.dir),B=this.colliderSet.raw.coIntersectsRay(this.handle,g,C,I);return g.free(),C.free(),B}castShape(A,I,g,C,B,Q,E){let i=DA.intoRaw(A),D=DA.intoRaw(g),o=GA.intoRaw(C),G=DA.intoRaw(B),w=I.intoRaw(),k=CI.fromRaw(this.colliderSet,this.colliderSet.raw.coCastShape(this.handle,i,w,D,o,G,Q,E));return i.free(),D.free(),o.free(),G.free(),w.free(),k}castCollider(A,I,g,C,B){let Q=DA.intoRaw(A),E=DA.intoRaw(g),i=BI.fromRaw(this.colliderSet,this.colliderSet.raw.coCastCollider(this.handle,Q,I.handle,E,C,B));return Q.free(),E.free(),i}intersectsShape(A,I,g){let C=DA.intoRaw(I),B=GA.intoRaw(g),Q=A.intoRaw(),E=this.colliderSet.raw.coIntersectsShape(this.handle,Q,C,B);return C.free(),B.free(),Q.free(),E}contactShape(A,I,g,C){let B=DA.intoRaw(I),Q=GA.intoRaw(g),E=A.intoRaw(),i=uA.fromRaw(this.colliderSet.raw.coContactShape(this.handle,E,B,Q,C));return B.free(),Q.free(),E.free(),i}contactCollider(A,I){return uA.fromRaw(this.colliderSet.raw.coContactCollider(this.handle,A.handle,I))}castRay(A,I,g){let C=DA.intoRaw(A.origin),B=DA.intoRaw(A.dir),Q=this.colliderSet.raw.coCastRay(this.handle,C,B,I,g);return C.free(),B.free(),Q}castRayAndGetNormal(A,I,g){let C=DA.intoRaw(A.origin),B=DA.intoRaw(A.dir),Q=AI.fromRaw(this.colliderSet.raw.coCastRayAndGetNormal(this.handle,C,B,I,g));return C.free(),B.free(),Q}}!function(A){A[A.Density=0]="Density",A[A.Mass=1]="Mass",A[A.MassProps=2]="MassProps"}(hA||(hA={}));class RI{constructor(A){this.enabled=!0,this.shape=A,this.massPropsMode=hA.Density,this.density=1,this.friction=.5,this.restitution=0,this.rotation=GA.identity(),this.translation=DA.zeros(),this.isSensor=!1,this.collisionGroups=4294967295,this.solverGroups=4294967295,this.frictionCombineRule=KA.Average,this.restitutionCombineRule=KA.Average,this.activeCollisionTypes=UA.DEFAULT,this.activeEvents=0,this.activeHooks=0,this.mass=0,this.centerOfMass=DA.zeros(),this.contactForceEventThreshold=0,this.principalAngularInertia=DA.zeros(),this.angularInertiaLocalFrame=GA.identity()}static ball(A){const I=new EI(A);return new RI(I)}static capsule(A,I){const g=new GI(A,I);return new RI(g)}static segment(A,I){const g=new wI(A,I);return new RI(g)}static triangle(A,I,g){const C=new kI(A,I,g);return new RI(C)}static roundTriangle(A,I,g,C){const B=new SI(A,I,g,C);return new RI(B)}static polyline(A,I){const g=new aI(A,I);return new RI(g)}static trimesh(A,I){const g=new MI(A,I);return new RI(g)}static cuboid(A,I,g){const C=new DI(A,I,g);return new RI(C)}static roundCuboid(A,I,g,C){const B=new oI(A,I,g,C);return new RI(B)}static heightfield(A,I,g,C){const B=new JI(A,I,g,C);return new RI(B)}static cylinder(A,I){const g=new UI(A,I);return new RI(g)}static roundCylinder(A,I,g){const C=new hI(A,I,g);return new RI(C)}static cone(A,I){const g=new NI(A,I);return new RI(g)}static roundCone(A,I,g){const C=new FI(A,I,g);return new RI(C)}static convexHull(A){const I=new KI(A,null);return new RI(I)}static convexMesh(A,I){const g=new KI(A,I);return new RI(g)}static roundConvexHull(A,I){const g=new yI(A,null,I);return new RI(g)}static roundConvexMesh(A,I,g){const C=new yI(A,I,g);return new RI(C)}setTranslation(A,I,g){if("number"!=typeof A||"number"!=typeof I||"number"!=typeof g)throw TypeError("The translation components must be numbers.");return this.translation={x:A,y:I,z:g},this}setRotation(A){return GA.copy(this.rotation,A),this}setSensor(A){return this.isSensor=A,this}setEnabled(A){return this.enabled=A,this}setDensity(A){return this.massPropsMode=hA.Density,this.density=A,this}setMass(A){return this.massPropsMode=hA.Mass,this.mass=A,this}setMassProperties(A,I,g,C){return this.massPropsMode=hA.MassProps,this.mass=A,DA.copy(this.centerOfMass,I),DA.copy(this.principalAngularInertia,g),GA.copy(this.angularInertiaLocalFrame,C),this}setRestitution(A){return this.restitution=A,this}setFriction(A){return this.friction=A,this}setFrictionCombineRule(A){return this.frictionCombineRule=A,this}setRestitutionCombineRule(A){return this.restitutionCombineRule=A,this}setCollisionGroups(A){return this.collisionGroups=A,this}setSolverGroups(A){return this.solverGroups=A,this}setActiveHooks(A){return this.activeHooks=A,this}setActiveEvents(A){return this.activeEvents=A,this}setActiveCollisionTypes(A){return this.activeCollisionTypes=A,this}setContactForceEventThreshold(A){return this.contactForceEventThreshold=A,this}}class sI{constructor(A){this.raw=A||new l,this.map=new YA,A&&A.forEachColliderHandle((A=>{this.map.set(A,new qI(this,A,null))}))}free(){this.raw&&this.raw.free(),this.raw=void 0,this.map&&this.map.clear(),this.map=void 0}castClosure(A){return I=>A?A(this.get(I)):void 0}finalizeDeserialization(A){this.map.forEach((I=>I.finalizeDeserialization(A)))}createCollider(A,I,g){let C=null!=g&&null!=g;if(C&&isNaN(g))throw Error("Cannot create a collider with a parent rigid-body handle that is not a number.");let B=I.shape.intoRaw(),Q=DA.intoRaw(I.translation),E=GA.intoRaw(I.rotation),i=DA.intoRaw(I.centerOfMass),D=DA.intoRaw(I.principalAngularInertia),o=GA.intoRaw(I.angularInertiaLocalFrame),G=this.raw.createCollider(I.enabled,B,Q,E,I.massPropsMode,I.mass,i,D,o,I.density,I.friction,I.restitution,I.frictionCombineRule,I.restitutionCombineRule,I.isSensor,I.collisionGroups,I.solverGroups,I.activeCollisionTypes,I.activeHooks,I.activeEvents,I.contactForceEventThreshold,C,C?g:0,A.raw);B.free(),Q.free(),E.free(),i.free(),D.free(),o.free();let w=C?A.get(g):null,k=new qI(this,G,w,I.shape);return this.map.set(G,k),k}remove(A,I,g,C){this.raw.remove(A,I.raw,g.raw,C),this.unmap(A)}unmap(A){this.map.delete(A)}get(A){return this.map.get(A)}len(){return this.map.len()}contains(A){return null!=this.get(A)}forEach(A){this.map.forEach(A)}getAll(){return this.map.getAll()}}class cI{constructor(A){this.raw=A||new f}free(){this.raw&&this.raw.free(),this.raw=void 0}step(A,I,g,C,B,Q,E,i,D,o,G,w){let k=DA.intoRaw(A);G?this.raw.stepWithEvents(k,I.raw,g.raw,C.raw,B.raw,Q.raw,E.raw,i.raw,D.raw,o.raw,G.raw,w,w?w.filterContactPair:null,w?w.filterIntersectionPair:null):this.raw.step(k,I.raw,g.raw,C.raw,B.raw,Q.raw,E.raw,i.raw,D.raw,o.raw),k.free()}}!function(A){A[A.EXCLUDE_FIXED=1]="EXCLUDE_FIXED",A[A.EXCLUDE_KINEMATIC=2]="EXCLUDE_KINEMATIC",A[A.EXCLUDE_DYNAMIC=4]="EXCLUDE_DYNAMIC",A[A.EXCLUDE_SENSORS=8]="EXCLUDE_SENSORS",A[A.EXCLUDE_SOLIDS=16]="EXCLUDE_SOLIDS",A[A.ONLY_DYNAMIC=3]="ONLY_DYNAMIC",A[A.ONLY_KINEMATIC=5]="ONLY_KINEMATIC",A[A.ONLY_FIXED=6]="ONLY_FIXED"}(NA||(NA={}));class YI{constructor(A){this.raw=A||new V}free(){this.raw&&this.raw.free(),this.raw=void 0}update(A,I){this.raw.update(A.raw,I.raw)}castRay(A,I,g,C,B,Q,E,i,D,o){let G=DA.intoRaw(g.origin),w=DA.intoRaw(g.dir),k=gI.fromRaw(I,this.raw.castRay(A.raw,I.raw,G,w,C,B,Q,E,i,D,o));return G.free(),w.free(),k}castRayAndGetNormal(A,I,g,C,B,Q,E,i,D,o){let G=DA.intoRaw(g.origin),w=DA.intoRaw(g.dir),k=II.fromRaw(I,this.raw.castRayAndGetNormal(A.raw,I.raw,G,w,C,B,Q,E,i,D,o));return G.free(),w.free(),k}intersectionsWithRay(A,I,g,C,B,Q,E,i,D,o,G){let w=DA.intoRaw(g.origin),k=DA.intoRaw(g.dir);this.raw.intersectionsWithRay(A.raw,I.raw,w,k,C,B,(A=>Q(II.fromRaw(I,A))),E,i,D,o,G),w.free(),k.free()}intersectionWithShape(A,I,g,C,B,Q,E,i,D,o){let G=DA.intoRaw(g),w=GA.intoRaw(C),k=B.intoRaw(),S=this.raw.intersectionWithShape(A.raw,I.raw,G,w,k,Q,E,i,D,o);return G.free(),w.free(),k.free(),S}projectPoint(A,I,g,C,B,Q,E,i,D){let o=DA.intoRaw(g),G=_A.fromRaw(I,this.raw.projectPoint(A.raw,I.raw,o,C,B,Q,E,i,D));return o.free(),G}projectPointAndGetFeature(A,I,g,C,B,Q,E,i){let D=DA.intoRaw(g),o=_A.fromRaw(I,this.raw.projectPointAndGetFeature(A.raw,I.raw,D,C,B,Q,E,i));return D.free(),o}intersectionsWithPoint(A,I,g,C,B,Q,E,i,D){let o=DA.intoRaw(g);this.raw.intersectionsWithPoint(A.raw,I.raw,o,C,B,Q,E,i,D),o.free()}castShape(A,I,g,C,B,Q,E,i,D,o,G,w,k){let S=DA.intoRaw(g),a=GA.intoRaw(C),M=DA.intoRaw(B),K=Q.intoRaw(),y=BI.fromRaw(I,this.raw.castShape(A.raw,I.raw,S,a,M,K,E,i,D,o,G,w,k));return S.free(),a.free(),M.free(),K.free(),y}intersectionsWithShape(A,I,g,C,B,Q,E,i,D,o,G){let w=DA.intoRaw(g),k=GA.intoRaw(C),S=B.intoRaw();this.raw.intersectionsWithShape(A.raw,I.raw,w,k,S,Q,E,i,D,o,G),w.free(),k.free(),S.free()}collidersWithAabbIntersectingAabb(A,I,g){let C=DA.intoRaw(A),B=DA.intoRaw(I);this.raw.collidersWithAabbIntersectingAabb(C,B,g),C.free(),B.free()}}class LI{constructor(A){this.raw=A||new AA}free(){this.raw&&this.raw.free(),this.raw=void 0}serializeAll(A,I,g,C,B,Q,E,i,D){let o=DA.intoRaw(A);const G=this.raw.serializeAll(o,I.raw,g.raw,C.raw,B.raw,Q.raw,E.raw,i.raw,D.raw);return o.free(),G}deserializeAll(A){return eI.fromRaw(this.raw.deserializeAll(A))}}class HI{constructor(A,I){this.vertices=A,this.colors=I}}class lI{constructor(A){this.raw=A||new r}free(){this.raw&&this.raw.free(),this.raw=void 0,this.vertices=void 0,this.colors=void 0}render(A,I,g,C,B){this.raw.render(A.raw,I.raw,g.raw,C.raw,B.raw),this.vertices=this.raw.vertices(),this.colors=this.raw.colors()}}class tI{}class pI{constructor(A,I,g,C,B){this.params=I,this.bodies=g,this.colliders=C,this.queries=B,this.raw=new W(A),this.rawCharacterCollision=new H,this._applyImpulsesToDynamicBodies=!1,this._characterMass=null}free(){this.raw&&(this.raw.free(),this.rawCharacterCollision.free()),this.raw=void 0,this.rawCharacterCollision=void 0}up(){return this.raw.up()}setUp(A){let I=DA.intoRaw(A);return this.raw.setUp(I)}applyImpulsesToDynamicBodies(){return this._applyImpulsesToDynamicBodies}setApplyImpulsesToDynamicBodies(A){this._applyImpulsesToDynamicBodies=A}characterMass(){return this._characterMass}setCharacterMass(A){this._characterMass=A}offset(){return this.raw.offset()}setOffset(A){this.raw.setOffset(A)}slideEnabled(){return this.raw.slideEnabled()}setSlideEnabled(A){this.raw.setSlideEnabled(A)}autostepMaxHeight(){return this.raw.autostepMaxHeight()}autostepMinWidth(){return this.raw.autostepMinWidth()}autostepIncludesDynamicBodies(){return this.raw.autostepIncludesDynamicBodies()}autostepEnabled(){return this.raw.autostepEnabled()}enableAutostep(A,I,g){this.raw.enableAutostep(A,I,g)}disableAutostep(){return this.raw.disableAutostep()}maxSlopeClimbAngle(){return this.raw.maxSlopeClimbAngle()}setMaxSlopeClimbAngle(A){this.raw.setMaxSlopeClimbAngle(A)}minSlopeSlideAngle(){return this.raw.minSlopeSlideAngle()}setMinSlopeSlideAngle(A){this.raw.setMinSlopeSlideAngle(A)}snapToGroundDistance(){return this.raw.snapToGroundDistance()}enableSnapToGround(A){this.raw.enableSnapToGround(A)}disableSnapToGround(){this.raw.disableSnapToGround()}snapToGroundEnabled(){return this.raw.snapToGroundEnabled()}computeColliderMovement(A,I,g,C,B){let Q=DA.intoRaw(I);this.raw.computeColliderMovement(this.params.dt,this.bodies.raw,this.colliders.raw,this.queries.raw,A.handle,Q,this._applyImpulsesToDynamicBodies,this._characterMass,g,C,this.colliders.castClosure(B)),Q.free()}computedMovement(){return DA.fromRaw(this.raw.computedMovement())}computedGrounded(){return this.raw.computedGrounded()}numComputedCollisions(){return this.raw.numComputedCollisions()}computedCollision(A,I){if(this.raw.computedCollision(A,this.rawCharacterCollision)){let A=this.rawCharacterCollision;return(I=null!=I?I:new tI).translationApplied=DA.fromRaw(A.translationApplied()),I.translationRemaining=DA.fromRaw(A.translationRemaining()),I.toi=A.toi(),I.witness1=DA.fromRaw(A.worldWitness1()),I.witness2=DA.fromRaw(A.worldWitness2()),I.normal1=DA.fromRaw(A.worldNormal1()),I.normal2=DA.fromRaw(A.worldNormal2()),I.collider=this.colliders.get(A.handle()),I}return null}}class eI{constructor(A,I,g,C,B,Q,E,i,D,o,G,w,k,S){this.gravity=A,this.integrationParameters=new HA(I),this.islands=new XA(g),this.broadPhase=new VA(C),this.narrowPhase=new PA(B),this.bodies=new LA(Q),this.colliders=new sI(E),this.impulseJoints=new OA(i),this.multibodyJoints=new fA(D),this.ccdSolver=new mA(o),this.queryPipeline=new YI(G),this.physicsPipeline=new cI(w),this.serializationPipeline=new LI(k),this.debugRenderPipeline=new lI(S),this.characterControllers=new Set,this.impulseJoints.finalizeDeserialization(this.bodies),this.bodies.finalizeDeserialization(this.colliders),this.colliders.finalizeDeserialization(this.bodies)}free(){this.integrationParameters.free(),this.islands.free(),this.broadPhase.free(),this.narrowPhase.free(),this.bodies.free(),this.colliders.free(),this.impulseJoints.free(),this.multibodyJoints.free(),this.ccdSolver.free(),this.queryPipeline.free(),this.physicsPipeline.free(),this.serializationPipeline.free(),this.debugRenderPipeline.free(),this.characterControllers.forEach((A=>A.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.queryPipeline=void 0,this.physicsPipeline=void 0,this.serializationPipeline=void 0,this.debugRenderPipeline=void 0,this.characterControllers=void 0}static fromRaw(A){return A?new eI(DA.fromRaw(A.takeGravity()),A.takeIntegrationParameters(),A.takeIslandManager(),A.takeBroadPhase(),A.takeNarrowPhase(),A.takeBodies(),A.takeColliders(),A.takeImpulseJoints(),A.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(A){return(new LI).deserializeAll(A)}debugRender(){return this.debugRenderPipeline.render(this.bodies,this.colliders,this.impulseJoints,this.multibodyJoints,this.narrowPhase),new HI(this.debugRenderPipeline.vertices,this.debugRenderPipeline.colors)}step(A,I){this.physicsPipeline.step(this.gravity,this.integrationParameters,this.islands,this.broadPhase,this.narrowPhase,this.bodies,this.colliders,this.impulseJoints,this.multibodyJoints,this.ccdSolver,A,I),this.queryPipeline.update(this.bodies,this.colliders)}propagateModifiedBodyPositionsToColliders(){this.bodies.raw.propagateModifiedBodyPositionsToColliders(this.colliders.raw)}updateSceneQueries(){this.propagateModifiedBodyPositionsToColliders(),this.queryPipeline.update(this.bodies,this.colliders)}get timestep(){return this.integrationParameters.dt}set timestep(A){this.integrationParameters.dt=A}get maxVelocityIterations(){return this.integrationParameters.maxVelocityIterations}set maxVelocityIterations(A){this.integrationParameters.maxVelocityIterations=A}get maxVelocityFrictionIterations(){return this.integrationParameters.maxVelocityFrictionIterations}set maxVelocityFrictionIterations(A){this.integrationParameters.maxVelocityFrictionIterations=A}get maxStabilizationIterations(){return this.integrationParameters.maxStabilizationIterations}set maxStabilizationIterations(A){this.integrationParameters.maxStabilizationIterations=A}createRigidBody(A){return this.bodies.createRigidBody(this.colliders,A)}createCharacterController(A){let I=new pI(A,this.integrationParameters,this.bodies,this.colliders,this.queryPipeline);return this.characterControllers.add(I),I}removeCharacterController(A){this.characterControllers.delete(A),A.free()}createCollider(A,I){let g=I?I.handle:void 0;return this.colliders.createCollider(this.bodies,A,g)}createImpulseJoint(A,I,g,C){return this.impulseJoints.createJoint(this.bodies,A,I.handle,g.handle,C)}createMultibodyJoint(A,I,g,C){return this.multibodyJoints.createJoint(A,I.handle,g.handle,C)}getRigidBody(A){return this.bodies.get(A)}getCollider(A){return this.colliders.get(A)}getImpulseJoint(A){return this.impulseJoints.get(A)}getMultibodyJoint(A){return this.multibodyJoints.get(A)}removeRigidBody(A){this.bodies&&this.bodies.remove(A.handle,this.islands,this.colliders,this.impulseJoints,this.multibodyJoints)}removeCollider(A,I){this.colliders&&this.colliders.remove(A.handle,this.islands,this.bodies,I)}removeImpulseJoint(A,I){this.impulseJoints&&this.impulseJoints.remove(A.handle,I)}removeMultibodyJoint(A,I){this.impulseJoints&&this.multibodyJoints.remove(A.handle,I)}forEachCollider(A){this.colliders.forEach(A)}forEachRigidBody(A){this.bodies.forEach(A)}forEachActiveRigidBody(A){this.bodies.forEachActiveRigidBody(this.islands,A)}castRay(A,I,g,C,B,Q,E,i){return this.queryPipeline.castRay(this.bodies,this.colliders,A,I,g,C,B,Q?Q.handle:null,E?E.handle:null,this.colliders.castClosure(i))}castRayAndGetNormal(A,I,g,C,B,Q,E,i){return this.queryPipeline.castRayAndGetNormal(this.bodies,this.colliders,A,I,g,C,B,Q?Q.handle:null,E?E.handle:null,this.colliders.castClosure(i))}intersectionsWithRay(A,I,g,C,B,Q,E,i,D){this.queryPipeline.intersectionsWithRay(this.bodies,this.colliders,A,I,g,C,B,Q,E?E.handle:null,i?i.handle:null,this.colliders.castClosure(D))}intersectionWithShape(A,I,g,C,B,Q,E,i){let D=this.queryPipeline.intersectionWithShape(this.bodies,this.colliders,A,I,g,C,B,Q?Q.handle:null,E?E.handle:null,this.colliders.castClosure(i));return null!=D?this.colliders.get(D):null}projectPoint(A,I,g,C,B,Q,E){return this.queryPipeline.projectPoint(this.bodies,this.colliders,A,I,g,C,B?B.handle:null,Q?Q.handle:null,this.colliders.castClosure(E))}projectPointAndGetFeature(A,I,g,C,B,Q){return this.queryPipeline.projectPointAndGetFeature(this.bodies,this.colliders,A,I,g,C?C.handle:null,B?B.handle:null,this.colliders.castClosure(Q))}intersectionsWithPoint(A,I,g,C,B,Q,E){this.queryPipeline.intersectionsWithPoint(this.bodies,this.colliders,A,this.colliders.castClosure(I),g,C,B?B.handle:null,Q?Q.handle:null,this.colliders.castClosure(E))}castShape(A,I,g,C,B,Q,E,i,D,o,G){return this.queryPipeline.castShape(this.bodies,this.colliders,A,I,g,C,B,Q,E,i,D?D.handle:null,o?o.handle:null,this.colliders.castClosure(G))}intersectionsWithShape(A,I,g,C,B,Q,E,i,D){this.queryPipeline.intersectionsWithShape(this.bodies,this.colliders,A,I,g,this.colliders.castClosure(C),B,Q,E?E.handle:null,i?i.handle:null,this.colliders.castClosure(D))}collidersWithAabbIntersectingAabb(A,I,g){this.queryPipeline.collidersWithAabbIntersectingAabb(A,I,this.colliders.castClosure(g))}contactsWith(A,I){this.narrowPhase.contactsWith(A.handle,this.colliders.castClosure(I))}intersectionsWith(A,I){this.narrowPhase.intersectionsWith(A.handle,this.colliders.castClosure(I))}contactPair(A,I,g){this.narrowPhase.contactPair(A.handle,I.handle,g)}intersectionPair(A,I){return this.narrowPhase.intersectionPair(A.handle,I.handle)}}!function(A){A[A.COLLISION_EVENTS=1]="COLLISION_EVENTS",A[A.CONTACT_FORCE_EVENTS=2]="CONTACT_FORCE_EVENTS"}(FA||(FA={}));class rI{free(){this.raw&&this.raw.free(),this.raw=void 0}collider1(){return this.raw.collider1()}collider2(){return this.raw.collider2()}totalForce(){return DA.fromRaw(this.raw.total_force())}totalForceMagnitude(){return this.raw.total_force_magnitude()}maxForceDirection(){return DA.fromRaw(this.raw.max_force_direction())}maxForceMagnitude(){return this.raw.max_force_magnitude()}}class dI{constructor(A,I){this.raw=I||new T(A)}free(){this.raw&&this.raw.free(),this.raw=void 0}drainCollisionEvents(A){this.raw.drainCollisionEvents(A)}drainContactForceEvents(A){let I=new rI;this.raw.drainContactForceEvents((g=>{I.raw=g,A(I),I.free()}))}clear(){this.raw.clear()}}function TI(A,I,g,C){return new(g||(g=Promise))((function(B,Q){function E(A){try{D(C.next(A))}catch(A){Q(A)}}function i(A){try{D(C.throw(A))}catch(A){Q(A)}}function D(A){var I;A.done?B(A.value):(I=A.value,I instanceof g?I:new g((function(A){A(I)}))).then(E,i)}D((C=C.apply(A,I||[])).next())}))}!function(A){A[A.FILTER_CONTACT_PAIRS=1]="FILTER_CONTACT_PAIRS",A[A.FILTER_INTERSECTION_PAIRS=2]="FILTER_INTERSECTION_PAIRS"}(qA||(qA={})),function(A){A[A.EMPTY=0]="EMPTY",A[A.COMPUTE_IMPULSE=1]="COMPUTE_IMPULSE"}(RA||(RA={}));for(var OI={byteLength:function(A){var I=fI(A),g=I[0],C=I[1];return 3*(g+C)/4-C},toByteArray:function(A){var I,g,C=fI(A),B=C[0],Q=C[1],E=new bI(function(A,I,g){return 3*(I+g)/4-g}(0,B,Q)),i=0,D=Q>0?B-4:B;for(g=0;g<D;g+=4)I=ZI[A.charCodeAt(g)]<<18|ZI[A.charCodeAt(g+1)]<<12|ZI[A.charCodeAt(g+2)]<<6|ZI[A.charCodeAt(g+3)],E[i++]=I>>16&255,E[i++]=I>>8&255,E[i++]=255&I;2===Q&&(I=ZI[A.charCodeAt(g)]<<2|ZI[A.charCodeAt(g+1)]>>4,E[i++]=255&I);1===Q&&(I=ZI[A.charCodeAt(g)]<<10|ZI[A.charCodeAt(g+1)]<<4|ZI[A.charCodeAt(g+2)]>>2,E[i++]=I>>8&255,E[i++]=255&I);return E},fromByteArray:function(A){for(var I,g=A.length,C=g%3,B=[],Q=16383,E=0,i=g-C;E<i;E+=Q)B.push(mI(A,E,E+Q>i?i:E+Q));1===C?(I=A[g-1],B.push(nI[I>>2]+nI[I<<4&63]+"==")):2===C&&(I=(A[g-2]<<8)+A[g-1],B.push(nI[I>>10]+nI[I>>4&63]+nI[I<<2&63]+"="));return B.join("")}},nI=[],ZI=[],bI="undefined"!=typeof Uint8Array?Uint8Array:Array,WI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jI=0,xI=WI.length;jI<xI;++jI)nI[jI]=WI[jI],ZI[WI.charCodeAt(jI)]=jI;function fI(A){var I=A.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=A.indexOf("=");return-1===g&&(g=I),[g,g===I?0:4-g%4]}function mI(A,I,g){for(var C,B,Q=[],E=I;E<g;E+=3)C=(A[E]<<16&16711680)+(A[E+1]<<8&65280)+(255&A[E+2]),Q.push(nI[(B=C)>>18&63]+nI[B>>12&63]+nI[B>>6&63]+nI[63&B]);return Q.join("")}function XI(){return TI(this,void 0,void 0,(function*(){yield EA(OI.toByteArray("[encoded data, 1878948 characters]").buffer)}))}function VI(){return function(){try{const C=A.__wbindgen_add_to_stack_pointer(-16);A.version(C);var I=G()[C/4+0],g=G()[C/4+1];return S(I,g)}finally{A.__wbindgen_add_to_stack_pointer(16),A.__wbindgen_free(I,g)}}()}ZI["-".charCodeAt(0)]=62,ZI["_".charCodeAt(0)]=63;var PI=Object.freeze({__proto__:null,version:VI,Vector3:iA,VectorOps:DA,Quaternion:oA,RotationOps:GA,SdpMatrix3:wA,SdpMatrix3Ops:kA,get RigidBodyType(){return SA},RigidBody:sA,RigidBodyDesc:cA,RigidBodySet:LA,IntegrationParameters:HA,get JointType(){return aA},get MotorModel(){return MA},ImpulseJoint:lA,UnitImpulseJoint:tA,FixedImpulseJoint:pA,PrismaticImpulseJoint:eA,RevoluteImpulseJoint:rA,SphericalImpulseJoint:dA,JointData:TA,ImpulseJointSet:OA,MultibodyJoint:nA,UnitMultibodyJoint:ZA,FixedMultibodyJoint:bA,PrismaticMultibodyJoint:WA,RevoluteMultibodyJoint:jA,SphericalMultibodyJoint:xA,MultibodyJointSet:fA,get CoefficientCombineRule(){return KA},CCDSolver:mA,IslandManager:XA,BroadPhase:VA,NarrowPhase:PA,TempContactManifold:zA,Shape:QI,get ShapeType(){return JA},Ball:EI,HalfSpace:iI,Cuboid:DI,RoundCuboid:oI,Capsule:GI,Segment:wI,Triangle:kI,RoundTriangle:SI,Polyline:aI,TriMesh:MI,ConvexPolyhedron:KI,RoundConvexPolyhedron:yI,Heightfield:JI,Cylinder:UI,RoundCylinder:hI,Cone:NI,RoundCone:FI,get ActiveCollisionTypes(){return UA},Collider:qI,get MassPropsMode(){return hA},ColliderDesc:RI,ColliderSet:sI,get FeatureType(){return yA},Ray:$A,RayIntersection:AI,RayColliderIntersection:II,RayColliderToi:gI,PointProjection:vA,PointColliderProjection:_A,ShapeTOI:CI,ShapeColliderTOI:BI,ShapeContact:uA,World:eI,PhysicsPipeline:cI,SerializationPipeline:LI,get ActiveEvents(){return FA},TempContactForceEvent:rI,EventQueue:dI,get ActiveHooks(){return qA},get SolverFlags(){return RA},DebugRenderBuffers:HI,DebugRenderPipeline:lI,get QueryFilterFlags(){return NA},QueryPipeline:YI,init:XI,CharacterCollision:tI,KinematicCharacterController:pI});
//# sourceMappingURL=rapier.es.js.map


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/directional-light-shadow-fix/DirectionalLightShadowFixForMobileCamera.re.ts":
/*!**********************************************************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/directional-light-shadow-fix/DirectionalLightShadowFixForMobileCamera.re.ts ***!
  \**********************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ DirectionalLightShadowFixForMobileCamera)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });


class DirectionalLightShadowFixForMobileCamera extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.initialOffset = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.currentOffset = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
  }
  getCamera() {
    return rogue_engine__WEBPACK_IMPORTED_MODULE_0__.App.currentScene.getObjectByProperty("uuid", rogue_engine__WEBPACK_IMPORTED_MODULE_0__.App.activeCamera);
  }
  getDirectionalLight() {
    return this.object3d;
  }
  awake() {
  }
  start() {
    const directionalLight = this.getDirectionalLight();
    this.initialOffset.copy(directionalLight.position);
    this.initialOffset.sub(new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 0, 0));
    this.updatePositions();
    directionalLight.target = this.getCamera();
    if (directionalLight.shadow) {
      directionalLight.shadow.normalBias = 0.04;
    }
  }
  update() {
    this.updatePositions();
  }
  updatePositions() {
    const directionalLight = this.getDirectionalLight();
    this.currentOffset.copy(this.initialOffset).add(this.getCamera().position);
    directionalLight.position.set(this.currentOffset.x, this.currentOffset.y, this.currentOffset.z);
    if (directionalLight.shadow) {
      directionalLight.shadow.camera.position.set(this.currentOffset.x, this.currentOffset.y, this.currentOffset.z);
    }
  }
}
__name(DirectionalLightShadowFixForMobileCamera, "DirectionalLightShadowFixForMobileCamera");
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(DirectionalLightShadowFixForMobileCamera);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/GetForwardVector.ts":
/*!*****************************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/GetForwardVector.ts ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ GetForwardVector)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });


class GetForwardVector {
  constructor(object3d) {
    this.vector = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.object3d = object3d;
  }
  getForward() {
    this.vector.set(0, 0, 0);
    if (!this.object3d) {
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Debug.logError("No Object3D provided to get forward vector from.");
      return this.vector;
    }
    this.vector.setFromMatrixColumn(this.object3d.matrix, 0);
    this.vector.crossVectors(this.object3d.up, this.vector);
    return this.vector.normalize();
  }
  getRight() {
    if (!this.object3d) {
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Debug.logError("No Object3D provided to get right vector from.");
      return this.vector;
    }
    this.vector.setFromMatrixColumn(this.object3d.matrix, 0);
    return this.vector.normalize();
  }
}
__name(GetForwardVector, "GetForwardVector");


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/PlayerPawnInput.re.ts":
/*!*******************************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/PlayerPawnInput.re.ts ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ PlayerPawnInput)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RapierMovementController_re__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RapierMovementController.re */ "./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/RapierMovementController.re.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};


class PlayerPawnInput extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.useStrafe = false;
  }
  awake() {
  }
  start() {
    this.object3d.traverse((obj) => {
      const components = rogue_engine__WEBPACK_IMPORTED_MODULE_0__.getObjectComponents(obj);
      components.forEach((comp) => {
        if (comp instanceof _RapierMovementController_re__WEBPACK_IMPORTED_MODULE_1__["default"]) {
          this.movementController = comp;
        }
      });
    });
    this.object3d.traverse((obj) => {
      const components = rogue_engine__WEBPACK_IMPORTED_MODULE_0__.getObjectComponents(obj);
      components.forEach((comp) => {
      });
    });
  }
  update() {
    if (rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.keyboard.getKeyPressed("KeyW")) {
      this.movementController.thrust = true;
    }
    if (rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.keyboard.getKeyPressed("KeyA")) {
      if (this.useStrafe) {
        this.movementController.strafeLeft = true;
      } else {
        this.movementController.rotateLeft = true;
      }
    }
    if (rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.keyboard.getKeyPressed("KeyS")) {
      this.movementController.brake = true;
    }
    if (rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.keyboard.getKeyPressed("KeyD")) {
      if (this.useStrafe) {
        this.movementController.strafeRight = true;
      } else {
        this.movementController.rotateRight = true;
      }
    }
  }
}
__name(PlayerPawnInput, "PlayerPawnInput");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], PlayerPawnInput.prototype, "useStrafe", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(PlayerPawnInput);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/RapierMovementController.re.ts":
/*!****************************************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/RapierMovementController.re.ts ***!
  \****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierMovementController)
/* harmony export */ });
/* harmony import */ var _GetForwardVector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GetForwardVector */ "./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/GetForwardVector.ts");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var _RE_RogueEngine_rogue_rapier_Components_RapierBody_re__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @RE/RogueEngine/rogue-rapier/Components/RapierBody.re */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierBody.re.ts");
/* harmony import */ var _RE_RogueEngine_rogue_rapier_Components_RapierConfig_re__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @RE/RogueEngine/rogue-rapier/Components/RapierConfig.re */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierConfig.re.ts");
/* harmony import */ var _RE_RogueEngine_rogue_rapier_Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @RE/RogueEngine/rogue-rapier/Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};







class RapierMovementController extends rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Component {
  constructor() {
    super(...arguments);
    this.initialized = false;
    this.speed = 1;
    this.rotationSpeed = 1;
    this.useCameraForward = true;
    this.useObjectForward = false;
    this.velocity = new three__WEBPACK_IMPORTED_MODULE_2__.Vector3(0, 0, 0);
    this.gravityAcceleration = new three__WEBPACK_IMPORTED_MODULE_2__.Vector3(0, 0, 0);
    this.drag = new three__WEBPACK_IMPORTED_MODULE_2__.Vector3(2e-3, 2e-3, 2e-3);
    this.snapToGroundDistance = 1;
    this.autostepMaxHeight = 0.7;
    this.autostepMinWidth = 0.3;
    this.autostepIncludeDynamicBodies = true;
    this.gravityScale = 2;
    this.minimumHeight = -10;
    this.resetPosition = new three__WEBPACK_IMPORTED_MODULE_2__.Vector3(0, 0, 0);
    this.scaledVelocity = new three__WEBPACK_IMPORTED_MODULE_2__.Vector3(0, 0, 0);
    this.rapierScaledVelocity = new _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_6__["default"].Vector3(0, 0, 0);
    this.elapsed = 0;
    this.thrust = false;
    this.brake = false;
    this.strafeLeft = false;
    this.strafeRight = false;
    this.rotateLeft = false;
    this.rotateRight = false;
  }
  awake() {
    this.bodyComponent = rogue_engine__WEBPACK_IMPORTED_MODULE_1__.getComponent(_RE_RogueEngine_rogue_rapier_Components_RapierBody_re__WEBPACK_IMPORTED_MODULE_3__["default"], this.object3d);
  }
  start() {
    this.cameraVectorCalculator = new _GetForwardVector__WEBPACK_IMPORTED_MODULE_0__["default"](rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.camera);
    this.objectVectorCalculator = new _GetForwardVector__WEBPACK_IMPORTED_MODULE_0__["default"](this.object3d);
    this.config = rogue_engine__WEBPACK_IMPORTED_MODULE_1__.getComponent(_RE_RogueEngine_rogue_rapier_Components_RapierConfig_re__WEBPACK_IMPORTED_MODULE_4__["default"]);
  }
  beforeUpdate() {
    if (!_RE_RogueEngine_rogue_rapier_Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_5__["default"].initialized)
      return;
    !this.initialized && this.init();
  }
  init() {
    this.characterController = _RE_RogueEngine_rogue_rapier_Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_5__["default"].world.createCharacterController(0.1);
    this.characterController.enableAutostep(this.autostepMaxHeight, this.autostepMinWidth, this.autostepIncludeDynamicBodies);
    this.characterController.enableSnapToGround(this.snapToGroundDistance);
    this.characterController.setCharacterMass(100);
    this.characterController.setApplyImpulsesToDynamicBodies(true);
  }
  update() {
    if (!this.bodyComponent.body) {
      return;
    }
    this.elapsed += rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime;
    if (this.thrust) {
      this.moveForward(1 * this.speed);
    }
    if (this.brake) {
      this.moveForward(-1 * this.speed);
    }
    if (this.rotateLeft) {
      this.rotate(1 * this.rotationSpeed);
    }
    if (this.rotateRight) {
      this.rotate(-1 * this.rotationSpeed);
    }
    if (this.strafeLeft) {
      this.moveRight(-1 * this.speed);
    }
    if (this.strafeRight) {
      this.moveRight(1 * this.speed);
    }
    this.gravityAcceleration.set(this.config.gravity.x, this.config.gravity.y, this.config.gravity.z);
    this.velocity.add(this.gravityAcceleration.multiplyScalar(this.gravityScale * rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime));
    const fixedStep = rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime;
    const nextPosition = this.bodyComponent.body.translation();
    const nextVelocity = this.convertRapierToThreeVec3(this.bodyComponent.body.linvel());
    nextVelocity.x *= 1 - this.drag.x;
    nextVelocity.y *= 1 - this.drag.y;
    nextVelocity.z *= 1 - this.drag.z;
    this.velocity.x *= 1 - this.drag.x;
    this.velocity.y *= 1 - this.drag.x;
    this.velocity.z *= 1 - this.drag.x;
    nextVelocity.x += this.velocity.x;
    nextVelocity.y += this.velocity.y;
    nextVelocity.z += this.velocity.z;
    this.characterController.computeColliderMovement(this.bodyComponent.body.collider(0), nextVelocity.clone().multiplyScalar(fixedStep));
    const characterMovement = this.characterController.computedMovement();
    nextPosition.x += characterMovement.x;
    nextPosition.y += characterMovement.y;
    nextPosition.z += characterMovement.z;
    if (nextPosition.y < this.minimumHeight) {
      nextPosition.x = this.resetPosition.x;
      nextPosition.y = this.resetPosition.y;
      nextPosition.z = this.resetPosition.z;
    }
    this.bodyComponent.body.setNextKinematicTranslation(nextPosition);
    this.thrust = false;
    this.brake = false;
    this.strafeLeft = false;
    this.strafeRight = false;
    this.rotateLeft = false;
    this.rotateRight = false;
  }
  moveForward(distance) {
    let forwardVector;
    if (this.useCameraForward) {
      forwardVector = this.cameraVectorCalculator.getForward();
      let euler = new three__WEBPACK_IMPORTED_MODULE_2__.Euler(0, 0, 0, "XZY");
      euler.setFromQuaternion(rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.camera.quaternion.normalize());
      euler.x = 0;
      euler.z = 0;
      let newRotation = new three__WEBPACK_IMPORTED_MODULE_2__.Quaternion();
      newRotation.setFromEuler(euler);
      const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation());
      nextRotation.slerp(newRotation, this.rotationSpeed * rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime);
      this.bodyComponent.body.setNextKinematicRotation(nextRotation);
    } else {
      forwardVector = this.objectVectorCalculator.getForward();
    }
    this.scaledVelocity.set(0, 0, 0);
    this.scaledVelocity.addScaledVector(forwardVector, distance);
    this.velocity.x += this.scaledVelocity.x;
    this.velocity.y += this.scaledVelocity.y;
    this.velocity.z += this.scaledVelocity.z;
  }
  moveRight(distance) {
    let rightVector;
    if (this.useCameraForward) {
      rightVector = this.cameraVectorCalculator.getRight();
      let euler = new three__WEBPACK_IMPORTED_MODULE_2__.Euler(0, 0, 0, "XZY");
      euler.setFromQuaternion(rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.camera.quaternion.normalize());
      euler.x = 0;
      euler.z = 0;
      let newRotation = new three__WEBPACK_IMPORTED_MODULE_2__.Quaternion();
      newRotation.setFromEuler(euler);
      const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation());
      nextRotation.slerp(newRotation, this.rotationSpeed * rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime);
      this.bodyComponent.body.setNextKinematicRotation(nextRotation);
    } else {
      rightVector = this.objectVectorCalculator.getRight();
    }
    this.scaledVelocity.set(0, 0, 0);
    this.scaledVelocity.addScaledVector(rightVector, distance);
    this.velocity.x += this.scaledVelocity.x;
    this.velocity.y += this.scaledVelocity.y;
    this.velocity.z += this.scaledVelocity.z;
  }
  rotate(amount) {
    const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation());
    const newRotation = this.quaternionFromAxisAngle(this.object3d.up, amount);
    nextRotation.multiply(newRotation);
    this.bodyComponent.body.setNextKinematicRotation(nextRotation);
  }
  convertRapierToThreeQuat(oldQuaternion) {
    return new three__WEBPACK_IMPORTED_MODULE_2__.Quaternion(oldQuaternion.x, oldQuaternion.y, oldQuaternion.z, oldQuaternion.w);
  }
  convertRapierToThreeVec3(oldVector) {
    return new three__WEBPACK_IMPORTED_MODULE_2__.Vector3(oldVector.x, oldVector.y, oldVector.z);
  }
  quaternionFromAxisAngle(axis, rotationRadians) {
    let factor = Math.sin(rotationRadians / 2);
    let x = axis.x * factor;
    let y = axis.y * factor;
    let z = axis.z * factor;
    let w = Math.cos(rotationRadians / 2);
    let normalized = new three__WEBPACK_IMPORTED_MODULE_2__.Quaternion(x, y, z, w).normalize();
    return new three__WEBPACK_IMPORTED_MODULE_2__.Quaternion(normalized.x, normalized.y, normalized.z, normalized.w);
  }
}
__name(RapierMovementController, "RapierMovementController");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.num()
], RapierMovementController.prototype, "speed", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.num()
], RapierMovementController.prototype, "rotationSpeed", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "useCameraForward", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "useObjectForward", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.vector3()
], RapierMovementController.prototype, "drag", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.num()
], RapierMovementController.prototype, "snapToGroundDistance", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.num()
], RapierMovementController.prototype, "autostepMaxHeight", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.num()
], RapierMovementController.prototype, "autostepMinWidth", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "autostepIncludeDynamicBodies", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.num()
], RapierMovementController.prototype, "gravityScale", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.num()
], RapierMovementController.prototype, "minimumHeight", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.vector3()
], RapierMovementController.prototype, "resetPosition", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "thrust", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "brake", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "strafeLeft", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "strafeRight", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "rotateLeft", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_1__.props.checkbox()
], RapierMovementController.prototype, "rotateRight", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_1__.registerComponent(RapierMovementController);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/targeted-orbit-camera/TargetedOrbitCamera.re.ts":
/*!******************************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/targeted-orbit-camera/TargetedOrbitCamera.re.ts ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TargetedOrbitCamera)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};


class TargetedOrbitCamera extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.enableRotate = true;
    this.rotateSpeed = 1;
    this.minAzimuthAngle = -6.28;
    this.maxAzimuthAngle = 6.28;
    this.minPolarAngle = 0;
    this.maxPolarAngle = Math.PI;
    this.enableDolly = true;
    this.dollySpeed = 1;
    this.minDistance = 1;
    this.maxDistance = 50;
    this.offset = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.rotateMouseButton = 2;
    this.useCameraLock = false;
    this.rotateStart = new three__WEBPACK_IMPORTED_MODULE_1__.Vector2();
    this.rotateEnd = new three__WEBPACK_IMPORTED_MODULE_1__.Vector2();
    this.rotateDelta = new three__WEBPACK_IMPORTED_MODULE_1__.Vector2();
    this.scale = 1;
    this.EPS = 1e-6;
    this.twoPI = 2 * Math.PI;
    this.spherical = new three__WEBPACK_IMPORTED_MODULE_1__.Spherical();
    this.sphericalDelta = new three__WEBPACK_IMPORTED_MODULE_1__.Spherical();
    this.quat = new three__WEBPACK_IMPORTED_MODULE_1__.Quaternion().setFromUnitVectors(new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 1, 0), new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 1, 0));
    this.quatInverse = this.quat.clone().invert();
    this.lastPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.lastQuaternion = new three__WEBPACK_IMPORTED_MODULE_1__.Quaternion();
    this.initialOffset = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
  }
  awake() {
    if (this.useCameraLock) {
      const container = document.getElementById(rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.containerId);
      container?.addEventListener("mousedown", this.lock, false);
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.onStop(this.dispose);
    }
  }
  start() {
    if (!this.target) {
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Debug.logError("Orbit controls not set to an Object3D Target.");
      return;
    }
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.rogueDOMContainer.addEventListener("contextmenu", (event) => {
      event.preventDefault();
    });
    this.quat = new three__WEBPACK_IMPORTED_MODULE_1__.Quaternion().setFromUnitVectors(this.object3d.up, new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 1, 0));
    this.quatInverse = this.quat.clone().invert();
    this.initialOffset.copy(this.object3d.position).sub(this.target.position);
    this.offset.copy(this.initialOffset);
  }
  update() {
    if (!this.target) {
      return;
    }
    if (this.useCameraLock && !!document.pointerLockElement) {
      if (this.enableRotate && rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.isMoving) {
        let normalizedScreenMovement = new three__WEBPACK_IMPORTED_MODULE_1__.Vector2(0, 0);
        this.normalizeScreenMovement({ x: rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.movementX, y: rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.movementY }, normalizedScreenMovement);
        this.rotateLeft(this.twoPI * normalizedScreenMovement.x);
        this.rotateUp(this.twoPI * -normalizedScreenMovement.y);
      }
    } else {
      let normalizedScreenPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector2(0, 0);
      this.normalizeScreenInput(rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse, normalizedScreenPosition);
      if (this.enableRotate && rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.getButtonDown(this.rotateMouseButton)) {
        this.rotateStart.set(normalizedScreenPosition.x, normalizedScreenPosition.y);
      }
      if (this.enableRotate && rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.getButtonPressed(this.rotateMouseButton)) {
        this.rotateEnd.set(normalizedScreenPosition.x, normalizedScreenPosition.y);
        this.rotateDelta.subVectors(this.rotateEnd, this.rotateStart).multiplyScalar(this.rotateSpeed);
        this.rotateLeft(this.twoPI * this.rotateDelta.x);
        this.rotateUp(this.twoPI * -this.rotateDelta.y);
        this.rotateStart.copy(this.rotateEnd);
      }
    }
    if (this.enableDolly && rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.wheelY > 0) {
      this.dollyOut();
    }
    if (this.enableDolly && rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.wheelY < 0) {
      this.dollyIn();
    }
    this.updateCamera();
    if (this.useCameraLock && rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.keyboard.getKeyPressed("Escape")) {
      this.unlock();
    }
  }
  dispose() {
    const container = document.getElementById(rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.containerId);
    container?.removeEventListener("mousedown", this.lock, false);
  }
  rotateLeft(angle) {
    this.sphericalDelta.theta -= angle;
  }
  rotateUp(angle) {
    this.sphericalDelta.phi -= angle;
  }
  updateCamera() {
    this.offset.applyQuaternion(this.quat);
    this.spherical.setFromVector3(this.offset);
    this.spherical.theta += this.sphericalDelta.theta;
    this.spherical.phi += this.sphericalDelta.phi;
    let min = this.minAzimuthAngle;
    let max = this.maxAzimuthAngle;
    if (isFinite(min) && isFinite(max)) {
      if (min < -Math.PI) {
        min += this.twoPI;
      } else if (min > Math.PI) {
        min -= this.twoPI;
      }
      if (max < -Math.PI) {
        max += this.twoPI;
      } else if (max > Math.PI) {
        max -= this.twoPI;
      }
      if (min <= max) {
        this.spherical.theta = Math.max(min, Math.min(max, this.spherical.theta));
      } else {
        this.spherical.theta = this.spherical.theta > (min + max) / 2 ? Math.max(min, this.spherical.theta) : Math.min(max, this.spherical.theta);
      }
    }
    this.spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this.spherical.phi));
    this.spherical.makeSafe();
    this.spherical.radius *= this.scale;
    this.spherical.radius = Math.max(this.minDistance, Math.min(this.maxDistance, this.spherical.radius));
    this.offset.setFromSpherical(this.spherical);
    this.offset.applyQuaternion(this.quatInverse);
    this.object3d.position.copy(this.target.position).add(this.offset);
    this.object3d.lookAt(this.target.position);
    this.sphericalDelta.set(0, 0, 0);
    this.scale = 1;
    if (this.lastPosition.distanceToSquared(this.object3d.position) > this.EPS || 8 * (1 - this.lastQuaternion.dot(this.object3d.quaternion)) > this.EPS) {
      this.lastPosition.copy(this.object3d.position);
      this.lastQuaternion.copy(this.object3d.quaternion);
    }
  }
  dollyOut() {
    this.scale /= Math.pow(0.95, this.dollySpeed);
  }
  dollyIn() {
    this.scale *= Math.pow(0.95, this.dollySpeed);
  }
  normalizeScreenInput(browserVector, gameVector) {
    const bounds = rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.rogueDOMContainer.getBoundingClientRect();
    gameVector.x = (browserVector.x - bounds.left) / bounds.width * 2 - 1;
    gameVector.y = -((browserVector.y - bounds.top) / bounds.height) * 2 + 1;
  }
  normalizeScreenMovement(browserVector, gameVector) {
    const bounds = rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.rogueDOMContainer.getBoundingClientRect();
    gameVector.x = browserVector.x / bounds.width;
    gameVector.y = -(browserVector.y / bounds.height);
  }
  lock() {
    if (!this.useCameraLock) {
      return;
    }
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.lock();
  }
  unlock() {
    if (!this.useCameraLock) {
      return;
    }
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Input.mouse.unlock();
  }
}
__name(TargetedOrbitCamera, "TargetedOrbitCamera");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.object3d()
], TargetedOrbitCamera.prototype, "target", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], TargetedOrbitCamera.prototype, "enableRotate", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "rotateSpeed", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "minAzimuthAngle", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "maxAzimuthAngle", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "minPolarAngle", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "maxPolarAngle", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], TargetedOrbitCamera.prototype, "enableDolly", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "dollySpeed", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "minDistance", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "maxDistance", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TargetedOrbitCamera.prototype, "offset", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TargetedOrbitCamera.prototype, "rotateMouseButton", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], TargetedOrbitCamera.prototype, "useCameraLock", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TargetedOrbitCamera);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraFlyover.re.ts":
/*!************************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraFlyover.re.ts ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TweenCameraFlyover)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/Tween */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
/* harmony import */ var _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Lib/Easings */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};




class TweenCameraFlyover extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.run = this.addMoveTween.bind(this);
    this.targetPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-3, 3, -10);
    this.durationMillis = 2e3;
    this.easing = 8;
    this.easingOptions = ["Linear", "Quadratic", "Cubic", "Quartic", "Quintic", "Sinusoidal", "Exponential", "Circular", "Elastic", "Back", "Bounce"];
    this.easingDirection = 2;
    this.easingDirectionOptions = ["EaseNone", "EaseIn", "EaseOut", "EaseInOut"];
    this.firstPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-11.627, 6.991, -16.249);
    this.secondPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(6, 20, -12);
  }
  awake() {
    this.targetPosition = this.secondPosition.clone();
  }
  start() {
  }
  update() {
    if (this.cameraTarget) {
      this.object3d.lookAt(this.cameraTarget.position);
    } else {
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Debug.logWarning("Camera has no look-at target set!");
    }
  }
  addMoveTween() {
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.object3d.position, this.targetPosition, this.durationMillis, _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__["default"][this.easingOptions[this.easing]][this.easingDirectionOptions[this.easingDirection]], this.onCompleted.bind(this));
  }
  onCompleted() {
    if (this.targetPosition.equals(this.firstPosition)) {
      this.targetPosition = this.secondPosition.clone();
    } else {
      this.targetPosition = this.firstPosition.clone();
    }
  }
}
__name(TweenCameraFlyover, "TweenCameraFlyover");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.button()
], TweenCameraFlyover.prototype, "run", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TweenCameraFlyover.prototype, "targetPosition", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TweenCameraFlyover.prototype, "durationMillis", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenCameraFlyover.prototype, "easing", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenCameraFlyover.prototype, "easingDirection", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.object3d()
], TweenCameraFlyover.prototype, "cameraTarget", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TweenCameraFlyover);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraTruck.re copy.ts":
/*!***************************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraTruck.re copy.ts ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TweenCameraPan)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/Tween */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
/* harmony import */ var _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Lib/Easings */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};




class TweenCameraPan extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.run = this.addMoveTween.bind(this);
    this.targetFocusPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-3, 3, -10);
    this.durationMillis = 2e3;
    this.easing = 5;
    this.easingOptions = ["Linear", "Quadratic", "Cubic", "Quartic", "Quintic", "Sinusoidal", "Exponential", "Circular", "Elastic", "Back", "Bounce"];
    this.easingDirection = 3;
    this.easingDirectionOptions = ["EaseNone", "EaseIn", "EaseOut", "EaseInOut"];
    this.firstFocusPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 0, 0);
    this.secondFocusPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(17.627, 0, 4.249);
  }
  awake() {
    this.targetFocusPosition = this.secondFocusPosition.clone();
  }
  start() {
  }
  update() {
    if (this.cameraTarget) {
      this.object3d.lookAt(this.cameraTarget.position);
    } else {
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Debug.logWarning("Camera has no look-at target set!");
    }
  }
  addMoveTween() {
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.cameraTarget.position, this.targetFocusPosition, this.durationMillis, _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__["default"][this.easingOptions[this.easing]][this.easingDirectionOptions[this.easingDirection]], this.onCompleted.bind(this));
  }
  onCompleted() {
    if (this.targetFocusPosition.equals(this.firstFocusPosition)) {
      this.targetFocusPosition = this.secondFocusPosition.clone();
    } else {
      this.targetFocusPosition = this.firstFocusPosition.clone();
    }
  }
}
__name(TweenCameraPan, "TweenCameraPan");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.button()
], TweenCameraPan.prototype, "run", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TweenCameraPan.prototype, "targetFocusPosition", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TweenCameraPan.prototype, "durationMillis", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenCameraPan.prototype, "easing", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenCameraPan.prototype, "easingDirection", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.object3d()
], TweenCameraPan.prototype, "cameraTarget", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TweenCameraPan);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraTruck.re.ts":
/*!**********************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraTruck.re.ts ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TweenCameraTruck)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/Tween */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
/* harmony import */ var _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Lib/Easings */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};




class TweenCameraTruck extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.run = this.addMoveTween.bind(this);
    this.targetCameraPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-3, 3, -10);
    this.targetFocusPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-3, 3, -10);
    this.durationMillis = 2e3;
    this.easing = 1;
    this.easingOptions = ["Linear", "Quadratic", "Cubic", "Quartic", "Quintic", "Sinusoidal", "Exponential", "Circular", "Elastic", "Back", "Bounce"];
    this.easingDirection = 3;
    this.easingDirectionOptions = ["EaseNone", "EaseIn", "EaseOut", "EaseInOut"];
    this.firstCameraPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-11.627, 6.991, -16.249);
    this.secondCameraPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(6, 6.991, -12);
    this.firstFocusPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 0, 0);
    this.secondFocusPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(17.627, 0, 4.249);
  }
  awake() {
    this.targetCameraPosition = this.secondCameraPosition.clone();
    this.targetFocusPosition = this.secondFocusPosition.clone();
  }
  start() {
  }
  update() {
    if (this.cameraTarget) {
      this.object3d.lookAt(this.cameraTarget.position);
    } else {
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Debug.logWarning("Camera has no look-at target set!");
    }
  }
  addMoveTween() {
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.object3d.position, this.targetCameraPosition, this.durationMillis, _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__["default"][this.easingOptions[this.easing]][this.easingDirectionOptions[this.easingDirection]], this.onCompleted.bind(this));
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.cameraTarget.position, this.targetFocusPosition, this.durationMillis, _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__["default"][this.easingOptions[this.easing]][this.easingDirectionOptions[this.easingDirection]]);
  }
  onCompleted() {
    if (this.targetCameraPosition.equals(this.firstCameraPosition)) {
      this.targetCameraPosition = this.secondCameraPosition.clone();
      this.targetFocusPosition = this.secondFocusPosition.clone();
    } else {
      this.targetCameraPosition = this.firstCameraPosition.clone();
      this.targetFocusPosition = this.firstFocusPosition.clone();
    }
  }
}
__name(TweenCameraTruck, "TweenCameraTruck");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.button()
], TweenCameraTruck.prototype, "run", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TweenCameraTruck.prototype, "targetCameraPosition", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TweenCameraTruck.prototype, "targetFocusPosition", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TweenCameraTruck.prototype, "durationMillis", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenCameraTruck.prototype, "easing", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenCameraTruck.prototype, "easingDirection", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.object3d()
], TweenCameraTruck.prototype, "cameraTarget", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TweenCameraTruck);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenConfig.re.ts":
/*!*****************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenConfig.re.ts ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TweenConfig)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Lib_Tween__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Lib/Tween */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });


class TweenConfig extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  awake() {
  }
  start() {
  }
  update() {
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_1__["default"].update();
  }
}
__name(TweenConfig, "TweenConfig");
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TweenConfig);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenPosition.re.ts":
/*!*******************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenPosition.re.ts ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TweenPosition)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/Tween */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
/* harmony import */ var _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Lib/Easings */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};




class TweenPosition extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.run = this.addMoveTween.bind(this);
    this.targetPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-3, 3, -10);
    this.durationMillis = 2e3;
    this.easing = 8;
    this.easingOptions = ["Linear", "Quadratic", "Cubic", "Quartic", "Quintic", "Sinusoidal", "Exponential", "Circular", "Elastic", "Back", "Bounce"];
    this.easingDirection = 2;
    this.easingDirectionOptions = ["EaseNone", "EaseIn", "EaseOut", "EaseInOut"];
    this.firstPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-3, 3, 0);
    this.secondPosition = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(-3, 3, -10);
  }
  awake() {
    this.targetPosition = this.secondPosition.clone();
  }
  start() {
  }
  update() {
  }
  addMoveTween() {
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.object3d.position, this.targetPosition, this.durationMillis, _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__["default"][this.easingOptions[this.easing]][this.easingDirectionOptions[this.easingDirection]], this.onCompleted.bind(this));
  }
  onCompleted() {
    if (this.targetPosition.equals(this.firstPosition)) {
      this.targetPosition = this.secondPosition.clone();
    } else {
      this.targetPosition = this.firstPosition.clone();
    }
  }
}
__name(TweenPosition, "TweenPosition");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.button()
], TweenPosition.prototype, "run", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TweenPosition.prototype, "targetPosition", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TweenPosition.prototype, "durationMillis", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenPosition.prototype, "easing", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenPosition.prototype, "easingDirection", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TweenPosition);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenRotation.re.ts":
/*!*******************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenRotation.re.ts ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TweenRotation)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/Tween */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
/* harmony import */ var _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Lib/Easings */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};




class TweenRotation extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.run = this.addRotateTween.bind(this);
    this.targetRotationDegrees = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 90, 90);
    this.durationMillis = 2e3;
    this.easing = 1;
    this.easingOptions = ["Linear", "Quadratic", "Cubic", "Quartic", "Quintic", "Sinusoidal", "Exponential", "Circular", "Elastic", "Back", "Bounce"];
    this.easingDirection = 3;
    this.easingDirectionOptions = ["EaseNone", "EaseIn", "EaseOut", "EaseInOut"];
    this.firstRotation = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 0, 0);
    this.secondRotation = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, 90, 90);
  }
  awake() {
    this.targetRotationDegrees = this.secondRotation.clone();
  }
  addRotateTween() {
    const rotationInRadians = this.targetRotationDegrees.clone().multiplyScalar(Math.PI / 180);
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.object3d.rotation, rotationInRadians, this.durationMillis, _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__["default"][this.easingOptions[this.easing]][this.easingDirectionOptions[this.easingDirection]], this.onCompleted.bind(this));
  }
  onCompleted() {
    if (this.targetRotationDegrees.equals(this.firstRotation)) {
      this.targetRotationDegrees = this.secondRotation.clone();
    } else {
      this.targetRotationDegrees = this.firstRotation.clone();
    }
  }
}
__name(TweenRotation, "TweenRotation");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.button()
], TweenRotation.prototype, "run", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TweenRotation.prototype, "targetRotationDegrees", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TweenRotation.prototype, "durationMillis", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenRotation.prototype, "easing", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenRotation.prototype, "easingDirection", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TweenRotation);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenScale.re.ts":
/*!****************************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenScale.re.ts ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ TweenScale)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/Tween */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
/* harmony import */ var _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Lib/Easings */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};




class TweenScale extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.run = this.addScaleTween.bind(this);
    this.targetScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(2, 2, 2);
    this.durationMillis = 2e3;
    this.easing = 10;
    this.easingOptions = ["Linear", "Quadratic", "Cubic", "Quartic", "Quintic", "Sinusoidal", "Exponential", "Circular", "Elastic", "Back", "Bounce"];
    this.easingDirection = 2;
    this.easingDirectionOptions = ["EaseNone", "EaseIn", "EaseOut", "EaseInOut"];
    this.firstScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(1, 1, 1);
    this.secondScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(2, 2, 2);
  }
  awake() {
    this.targetScale = this.secondScale.clone();
  }
  start() {
  }
  update() {
  }
  addScaleTween() {
    _Lib_Tween__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.object3d.scale, this.targetScale, this.durationMillis, _Lib_Easings__WEBPACK_IMPORTED_MODULE_3__["default"][this.easingOptions[this.easing]][this.easingDirectionOptions[this.easingDirection]], this.onCompleted.bind(this));
  }
  onCompleted() {
    if (this.targetScale.equals(this.firstScale)) {
      this.targetScale = this.secondScale.clone();
    } else {
      this.targetScale = this.firstScale.clone();
    }
  }
}
__name(TweenScale, "TweenScale");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.button()
], TweenScale.prototype, "run", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], TweenScale.prototype, "targetScale", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], TweenScale.prototype, "durationMillis", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenScale.prototype, "easing", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], TweenScale.prototype, "easingDirection", 2);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(TweenScale);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts":
/*!***************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
const EASINGS = {
  Linear: {
    EaseNone: (percentageComplete) => percentageComplete
  },
  Quadratic: {
    EaseIn: (percentageComplete) => percentageComplete * percentageComplete,
    EaseOut: (percentageComplete) => -percentageComplete * (percentageComplete - 2),
    EaseInOut: (percentageComplete) => {
      if ((percentageComplete *= 2) < 1)
        return 0.5 * percentageComplete * percentageComplete;
      return -0.5 * (--percentageComplete * (percentageComplete - 2) - 1);
    }
  },
  Cubic: {
    EaseIn: (percentageComplete) => percentageComplete * percentageComplete * percentageComplete,
    EaseOut: (percentageComplete) => --percentageComplete * percentageComplete * percentageComplete + 1,
    EaseInOut: (percentageComplete) => {
      if ((percentageComplete *= 2) < 1)
        return 0.5 * percentageComplete * percentageComplete * percentageComplete;
      return 0.5 * ((percentageComplete -= 2) * percentageComplete * percentageComplete + 2);
    }
  },
  Quartic: {
    EaseIn: (percentageComplete) => percentageComplete * percentageComplete * percentageComplete * percentageComplete,
    EaseOut: (percentageComplete) => -(--percentageComplete * percentageComplete * percentageComplete * percentageComplete - 1),
    EaseInOut: (percentageComplete) => {
      if ((percentageComplete *= 2) < 1)
        return 0.5 * percentageComplete * percentageComplete * percentageComplete * percentageComplete;
      return -0.5 * ((percentageComplete -= 2) * percentageComplete * percentageComplete * percentageComplete - 2);
    }
  },
  Quintic: {
    EaseIn: (percentageComplete) => percentageComplete * percentageComplete * percentageComplete * percentageComplete * percentageComplete,
    EaseOut: (percentageComplete) => (percentageComplete = percentageComplete - 1) * percentageComplete * percentageComplete * percentageComplete * percentageComplete + 1,
    EaseInOut: (percentageComplete) => {
      if ((percentageComplete *= 2) < 1)
        return 0.5 * percentageComplete * percentageComplete * percentageComplete * percentageComplete * percentageComplete;
      return 0.5 * ((percentageComplete -= 2) * percentageComplete * percentageComplete * percentageComplete * percentageComplete + 2);
    }
  },
  Sinusoidal: {
    EaseIn: (percentageComplete) => -Math.cos(percentageComplete * Math.PI / 2) + 1,
    EaseOut: (percentageComplete) => Math.sin(percentageComplete * Math.PI / 2),
    EaseInOut: (percentageComplete) => -0.5 * (Math.cos(Math.PI * percentageComplete) - 1)
  },
  Exponential: {
    EaseIn: (percentageComplete) => {
      return percentageComplete == 0 ? 0 : Math.pow(2, 10 * (percentageComplete - 1));
    },
    EaseOut: (percentageComplete) => {
      return percentageComplete == 1 ? 1 : -Math.pow(2, -10 * percentageComplete) + 1;
    },
    EaseInOut: (percentageComplete) => {
      if (percentageComplete == 0)
        return 0;
      if (percentageComplete == 1)
        return 1;
      if ((percentageComplete *= 2) < 1)
        return 0.5 * Math.pow(2, 10 * (percentageComplete - 1));
      return 0.5 * (-Math.pow(2, -10 * (percentageComplete - 1)) + 2);
    }
  },
  Circular: {
    EaseIn: (percentageComplete) => -(Math.sqrt(1 - percentageComplete * percentageComplete) - 1),
    EaseOut: (percentageComplete) => Math.sqrt(1 - --percentageComplete * percentageComplete),
    EaseInOut: (percentageComplete) => {
      if ((percentageComplete /= 0.5) < 1)
        return -0.5 * (Math.sqrt(1 - percentageComplete * percentageComplete) - 1);
      return 0.5 * (Math.sqrt(1 - (percentageComplete -= 2) * percentageComplete) + 1);
    }
  },
  Elastic: {
    EaseIn: (percentageComplete) => {
      var s, a = 0.1, p = 0.4;
      if (percentageComplete == 0)
        return 0;
      if (percentageComplete == 1)
        return 1;
      if (!p)
        p = 0.3;
      if (!a || a < 1) {
        a = 1;
        s = p / 4;
      } else
        s = p / (2 * Math.PI) * Math.asin(1 / a);
      return -(a * Math.pow(2, 10 * (percentageComplete -= 1)) * Math.sin((percentageComplete - s) * (2 * Math.PI) / p));
    },
    EaseOut: (percentageComplete) => {
      var s, a = 0.1, p = 0.4;
      if (percentageComplete == 0)
        return 0;
      if (percentageComplete == 1)
        return 1;
      if (!p)
        p = 0.3;
      if (!a || a < 1) {
        a = 1;
        s = p / 4;
      } else
        s = p / (2 * Math.PI) * Math.asin(1 / a);
      return a * Math.pow(2, -10 * percentageComplete) * Math.sin((percentageComplete - s) * (2 * Math.PI) / p) + 1;
    },
    EaseInOut: (percentageComplete) => {
      var s, a = 0.1, p = 0.4;
      if (percentageComplete == 0)
        return 0;
      if (percentageComplete == 1)
        return 1;
      if (!p)
        p = 0.3;
      if (!a || a < 1) {
        a = 1;
        s = p / 4;
      } else
        s = p / (2 * Math.PI) * Math.asin(1 / a);
      if ((percentageComplete *= 2) < 1)
        return -0.5 * (a * Math.pow(2, 10 * (percentageComplete -= 1)) * Math.sin((percentageComplete - s) * (2 * Math.PI) / p));
      return a * Math.pow(2, -10 * (percentageComplete -= 1)) * Math.sin((percentageComplete - s) * (2 * Math.PI) / p) * 0.5 + 1;
    }
  },
  Back: {
    EaseIn: (percentageComplete) => {
      var s = 1.70158;
      return percentageComplete * percentageComplete * ((s + 1) * percentageComplete - s);
    },
    EaseOut: (percentageComplete) => {
      var s = 1.70158;
      return (percentageComplete = percentageComplete - 1) * percentageComplete * ((s + 1) * percentageComplete + s) + 1;
    },
    EaseInOut: (percentageComplete) => {
      var s = 1.70158 * 1.525;
      if ((percentageComplete *= 2) < 1)
        return 0.5 * (percentageComplete * percentageComplete * ((s + 1) * percentageComplete - s));
      return 0.5 * ((percentageComplete -= 2) * percentageComplete * ((s + 1) * percentageComplete + s) + 2);
    }
  },
  Bounce: {
    EaseIn: (percentageComplete) => 1 - EASINGS.Bounce.EaseOut(1 - percentageComplete),
    EaseOut: (percentageComplete) => {
      if ((percentageComplete /= 1) < 1 / 2.75) {
        return 7.5625 * percentageComplete * percentageComplete;
      } else if (percentageComplete < 2 / 2.75) {
        return 7.5625 * (percentageComplete -= 1.5 / 2.75) * percentageComplete + 0.75;
      } else if (percentageComplete < 2.5 / 2.75) {
        return 7.5625 * (percentageComplete -= 2.25 / 2.75) * percentageComplete + 0.9375;
      } else {
        return 7.5625 * (percentageComplete -= 2.625 / 2.75) * percentageComplete + 0.984375;
      }
    },
    EaseInOut: (percentageComplete) => {
      if (percentageComplete < 0.5)
        return EASINGS.Bounce.EaseIn(percentageComplete * 2) * 0.5;
      return EASINGS.Bounce.EaseOut(percentageComplete * 2 - 1) * 0.5 + 0.5;
    }
  }
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EASINGS);


/***/ }),

/***/ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts":
/*!*************************************************************!*\
  !*** ./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ Tween)
/* harmony export */ });
/* harmony import */ var _Easings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Easings */ "./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

const _Tween = class {
  static create(obj, targetProperties, duration, easing = _Easings__WEBPACK_IMPORTED_MODULE_0__["default"].Linear.EaseNone, completedCallback = () => {
  }) {
    let singleTween = new _Tween();
    singleTween.id = ++_Tween.idCounter;
    singleTween.obj = obj;
    singleTween.objStart = {};
    singleTween.objTarget = targetProperties;
    _Tween.saveProperties(singleTween.objStart, obj, targetProperties);
    singleTween.startTime = new Date().getTime();
    singleTween.endTime = singleTween.startTime + duration;
    singleTween.easing = easing;
    singleTween.completedCallback = completedCallback;
    _Tween.activeTweens.push(singleTween);
    return singleTween.id;
  }
  static cancel(tweenId) {
    let tween = _Tween.activeTweens.find((tween2) => tweenId == tween2.id);
    if (tween) {
      let index = _Tween.activeTweens.indexOf(tween);
      _Tween.activeTweens.splice(index, 1);
      return tween;
    }
    return;
  }
  static stop(tweenId) {
    let tween = _Tween.cancel(tweenId);
    tween?.completedCallback();
    return tween;
  }
  static saveProperties(singleTweenStart, obj, targetProperties) {
    for (let property in targetProperties) {
      let startValue = obj[property];
      if (typeof startValue == "object") {
        singleTweenStart[property] = {};
        _Tween.saveProperties(singleTweenStart[property], obj[property], targetProperties[property]);
        continue;
      }
      singleTweenStart[property] = startValue;
    }
  }
  static update() {
    let completed = [];
    for (let i = 0; i < _Tween.activeTweens.length; i++) {
      let singleTween = _Tween.activeTweens[i];
      if (_Tween.updateSingleTween(singleTween) == 1) {
        completed.push(singleTween);
      }
    }
    for (let i = 0; i < completed.length; i++) {
      let singleTween = completed[i];
      singleTween.completedCallback();
      let foundIndex = _Tween.activeTweens.indexOf(singleTween);
      if (foundIndex != -1) {
        _Tween.activeTweens.splice(foundIndex, 1);
      }
    }
  }
  static updateSingleTween(singleTween) {
    let currentTime = new Date().getTime();
    let runTime = currentTime - singleTween.startTime;
    let duration = singleTween.endTime - singleTween.startTime;
    let percentageComplete = Math.min(1, runTime / duration);
    let valueToUpdate = singleTween.easing(percentageComplete);
    _Tween.updateProperties(singleTween.obj, singleTween.objStart, singleTween.objTarget, valueToUpdate);
    return percentageComplete;
  }
  static updateProperties(obj, objStart, objTarget, valueToUpdate) {
    for (let property in objStart) {
      let startValue = objStart[property];
      if (typeof startValue == "object") {
        _Tween.updateProperties(obj[property], objStart[property], objTarget[property], valueToUpdate);
        continue;
      }
      let endValue = objTarget[property];
      let delta = endValue - startValue;
      obj[property] = startValue + delta * valueToUpdate;
    }
  }
};
let Tween = _Tween;
__name(Tween, "Tween");
Tween.activeTweens = [];
Tween.idCounter = 0;

;


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierBall.re.ts":
/*!**********************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierBall.re.ts ***!
  \**********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierBall)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierCollider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RapierCollider */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};





class RapierBall extends _RapierCollider__WEBPACK_IMPORTED_MODULE_3__["default"] {
  constructor() {
    super(...arguments);
    this._radiusOffset = 0;
    this.worldScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
  }
  get radiusOffset() {
    return this._radiusOffset;
  }
  set radiusOffset(value) {
    const oldValue = this._radiusOffset;
    this._radiusOffset = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  createShape() {
    this.object3d.getWorldScale(this.worldScale);
    const maxSide = Math.max(this.worldScale.x, this.worldScale.y, this.worldScale.z);
    let colliderDesc = _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ColliderDesc.ball(this.radiusOffset + maxSide);
    this.collider = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.createCollider(colliderDesc, this.body);
  }
}
__name(RapierBall, "RapierBall");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierBall.prototype, "radiusOffset", 1);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierBall);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCapsule.re.ts":
/*!*************************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCapsule.re.ts ***!
  \*************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierCapsule)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierCollider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RapierCollider */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};





class RapierCapsule extends _RapierCollider__WEBPACK_IMPORTED_MODULE_3__["default"] {
  constructor() {
    super(...arguments);
    this._halfHeight = 0.5;
    this._radius = 0.5;
    this.worldScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
  }
  get halfHeight() {
    return this._halfHeight;
  }
  set halfHeight(value) {
    const oldValue = this._halfHeight;
    this._halfHeight = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  get radius() {
    return this._radius;
  }
  set radius(value) {
    const oldValue = this._radius;
    this._radius = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  createShape() {
    this.object3d.getWorldScale(this.worldScale);
    const maxSide = Math.max(this.worldScale.x, this.worldScale.z);
    let colliderDesc = _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ColliderDesc.capsule(this.halfHeight * this.worldScale.y, this.radius * maxSide);
    this.collider = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.createCollider(colliderDesc, this.body);
  }
}
__name(RapierCapsule, "RapierCapsule");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCapsule.prototype, "halfHeight", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCapsule.prototype, "radius", 1);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierCapsule);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts":
/*!***********************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts ***!
  \***********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierCollider)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierBody_re__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../RapierBody.re */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierBody.re.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};





const _RapierCollider = class extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.initialized = false;
    this.localPos = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.worldPos = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.localRot = new three__WEBPACK_IMPORTED_MODULE_1__.Quaternion();
    this.worldQuaternion = new three__WEBPACK_IMPORTED_MODULE_1__.Quaternion();
    this.isSensor = false;
    this.collisionEvents = false;
  }
  static findByShape(shape) {
    let shapeComponent;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.traverseComponents((component) => {
      if (shapeComponent)
        return;
      if (component instanceof _RapierCollider && component.collider === shape) {
        shapeComponent = component;
      }
    });
    return shapeComponent;
  }
  init() {
    this.bodyComponent = this.getBodyComponent(this.object3d);
    if (!this.bodyComponent)
      return;
    if (!this.bodyComponent.body)
      return;
    this.body = this.bodyComponent.body;
    this.createShape();
    this.collider.setSensor(this.isSensor);
    this.collisionEvents && this.collider.setActiveEvents(_dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ActiveEvents.COLLISION_EVENTS);
    this.setColliderPos();
    this.setColliderRot();
    this.initialized = true;
  }
  setColliderPos() {
    this.object3d.updateWorldMatrix(true, true);
    this.object3d.getWorldPosition(this.worldPos);
    this.collider.setTranslation(this.worldPos);
  }
  setColliderRot() {
    this.object3d.updateWorldMatrix(true, true);
    this.object3d.getWorldQuaternion(this.worldQuaternion);
    this.collider.setRotation(this.worldQuaternion);
  }
  beforeUpdate() {
    if (!_Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].initialized)
      return;
    if (!this.initialized)
      this.init();
    if (!this.collider)
      return;
    this.setColliderPos();
    this.setColliderRot();
  }
  onDisabled() {
    _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
  }
  onBeforeObjectRemoved() {
    _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
  }
  getBodyComponent(object3d) {
    const bodyComponent = rogue_engine__WEBPACK_IMPORTED_MODULE_0__.getComponent(_RapierBody_re__WEBPACK_IMPORTED_MODULE_3__["default"], object3d);
    if (bodyComponent) {
      return bodyComponent;
    }
    if (!object3d.parent)
      return;
    return this.getBodyComponent(object3d.parent);
  }
  createShape() {
  }
};
let RapierCollider = _RapierCollider;
__name(RapierCollider, "RapierCollider");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierCollider.prototype, "isSensor", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierCollider.prototype, "collisionEvents", 2);



/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCone.re.ts":
/*!**********************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCone.re.ts ***!
  \**********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierCone)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierCollider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RapierCollider */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};





class RapierCone extends _RapierCollider__WEBPACK_IMPORTED_MODULE_3__["default"] {
  constructor() {
    super(...arguments);
    this._halfHeight = 0.5;
    this._radius = 0.5;
    this.worldScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
  }
  get halfHeight() {
    return this._halfHeight;
  }
  set halfHeight(value) {
    const oldValue = this._halfHeight;
    this._halfHeight = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  get radius() {
    return this._radius;
  }
  set radius(value) {
    const oldValue = this._radius;
    this._radius = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  createShape() {
    this.object3d.getWorldScale(this.worldScale);
    const maxSide = Math.max(this.worldScale.x, this.worldScale.z);
    let colliderDesc = _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ColliderDesc.cone(this.halfHeight * this.worldScale.y, this.radius * maxSide);
    this.collider = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.createCollider(colliderDesc, this.body);
  }
}
__name(RapierCone, "RapierCone");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCone.prototype, "halfHeight", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCone.prototype, "radius", 1);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierCone);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCuboid.re.ts":
/*!************************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCuboid.re.ts ***!
  \************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierCuboid)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierCollider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RapierCollider */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};





class RapierCuboid extends _RapierCollider__WEBPACK_IMPORTED_MODULE_3__["default"] {
  constructor() {
    super(...arguments);
    this._sizeOffsetX = 1;
    this._sizeOffsetY = 1;
    this._sizeOffsetZ = 1;
    this.worldScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
  }
  get sizeOffsetX() {
    return this._sizeOffsetX;
  }
  set sizeOffsetX(value) {
    const oldValue = this._sizeOffsetX;
    this._sizeOffsetX = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  get sizeOffsetY() {
    return this._sizeOffsetY;
  }
  set sizeOffsetY(value) {
    const oldValue = this._sizeOffsetY;
    this._sizeOffsetY = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  get sizeOffsetZ() {
    return this._sizeOffsetZ;
  }
  set sizeOffsetZ(value) {
    const oldValue = this._sizeOffsetZ;
    this._sizeOffsetZ = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  createShape() {
    this.object3d.getWorldScale(this.worldScale);
    let colliderDesc = _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ColliderDesc.cuboid(this._sizeOffsetX * (this.worldScale.x / 2), this._sizeOffsetY * (this.worldScale.y / 2), this._sizeOffsetZ * (this.worldScale.z / 2));
    this.collider = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.createCollider(colliderDesc, this.body);
  }
}
__name(RapierCuboid, "RapierCuboid");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCuboid.prototype, "sizeOffsetX", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCuboid.prototype, "sizeOffsetY", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCuboid.prototype, "sizeOffsetZ", 1);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierCuboid);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCylinder.re.ts":
/*!**************************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCylinder.re.ts ***!
  \**************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierCylinder)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierCollider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RapierCollider */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};





class RapierCylinder extends _RapierCollider__WEBPACK_IMPORTED_MODULE_3__["default"] {
  constructor() {
    super(...arguments);
    this._halfHeight = 0.5;
    this._radius = 1;
    this.worldScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
  }
  get halfHeight() {
    return this._halfHeight;
  }
  set halfHeight(value) {
    const oldValue = this._halfHeight;
    this._halfHeight = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  get radius() {
    return this._radius;
  }
  set radius(value) {
    const oldValue = this._radius;
    this._radius = value;
    if (oldValue !== value && this.collider && _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeCollider(this.collider, false);
      this.init();
    }
  }
  createShape() {
    this.object3d.getWorldScale(this.worldScale);
    const maxSide = Math.max(this.worldScale.x, this.worldScale.z);
    let colliderDesc = _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ColliderDesc.cylinder(this.halfHeight * this.worldScale.y, this.radius * maxSide);
    this.collider = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.createCollider(colliderDesc, this.body);
  }
}
__name(RapierCylinder, "RapierCylinder");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCylinder.prototype, "halfHeight", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierCylinder.prototype, "radius", 1);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierCylinder);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierTrimesh.re.ts":
/*!*************************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierTrimesh.re.ts ***!
  \*************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierTrimesh)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierCollider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RapierCollider */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts");
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });





class RapierTrimesh extends _RapierCollider__WEBPACK_IMPORTED_MODULE_3__["default"] {
  constructor() {
    super(...arguments);
    this.worldScale = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.worldPos = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.tmpVec0 = new _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].Vector3(0, 0, 0);
    this.tmpVec1 = new _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].Vector3(0, 0, 0);
    this.tmpVec2 = new _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].Vector3(0, 0, 0);
    this.tmpQuat0 = new _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].Vector3(0, 0, 0);
  }
  createShape() {
    if (!(this.object3d instanceof three__WEBPACK_IMPORTED_MODULE_1__.Mesh))
      return;
    this.object3d.updateWorldMatrix(true, true);
    this.object3d.getWorldScale(this.worldScale);
    this.object3d.getWorldPosition(this.worldPos);
    this.object3d.getWorldQuaternion(this.worldQuaternion);
    const mesh = this.object3d;
    let geometry = mesh.geometry;
    const vertices = this.getVertices(geometry);
    if (!vertices.length)
      return;
    const indices = geometry.getIndex();
    if (!indices)
      return;
    let cleanIndiArray = [];
    for (let i = 0; i < indices.count; i += 3) {
      const a = indices.getX(i);
      const b = indices.getX(i + 1);
      const c = indices.getX(i + 2);
      cleanIndiArray.push(a, b, c);
    }
    let colliderDesc = _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ColliderDesc.trimesh(vertices, new Uint32Array(cleanIndiArray));
    this.collider = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.createCollider(colliderDesc, this.body);
  }
  getVertices(geometry) {
    const position = geometry.attributes.position;
    const vertices = new Float32Array(position.count * 3);
    for (let i = 0; i < position.count; i++) {
      vertices[i * 3] = position.getX(i) * this.worldScale.x;
      vertices[i * 3 + 1] = position.getY(i) * this.worldScale.y;
      vertices[i * 3 + 2] = position.getZ(i) * this.worldScale.z;
    }
    return vertices;
  }
}
__name(RapierTrimesh, "RapierTrimesh");
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierTrimesh);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierBody.re.ts":
/*!************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierBody.re.ts ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierBody)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};




class RapierBody extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.type = 0;
    this.typeOptions = ["Dynamic", "Fixed", "KinematicPositionBased", "KinematicVelocityBased"];
    this.mass = 1;
    this._gravityScale = 1;
    this._angularDamping = 0;
    this._linearDamping = 0;
    this._xTranslation = true;
    this._yTranslation = true;
    this._zTranslation = true;
    this._xRotation = true;
    this._yRotation = true;
    this._zRotation = true;
    this.initialized = false;
    this.onCollisionStart = /* @__PURE__ */ __name(() => {
    }, "onCollisionStart");
    this.onCollisionEnd = /* @__PURE__ */ __name(() => {
    }, "onCollisionEnd");
    this.newPos = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3();
    this.newRot = new three__WEBPACK_IMPORTED_MODULE_1__.Quaternion();
    this.matrixA = new three__WEBPACK_IMPORTED_MODULE_1__.Matrix4();
    this.matrixB = new three__WEBPACK_IMPORTED_MODULE_1__.Matrix4();
    this.matrixC = new three__WEBPACK_IMPORTED_MODULE_1__.Matrix4();
  }
  get gravityScale() {
    return this._gravityScale;
  }
  set gravityScale(value) {
    this._gravityScale = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setGravityScale(value, true);
  }
  get angularDamping() {
    return this._angularDamping;
  }
  set angularDamping(value) {
    this._angularDamping = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setAngularDamping(value);
  }
  get linearDamping() {
    this.body;
    return this._linearDamping;
  }
  set linearDamping(value) {
    this._linearDamping = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setLinearDamping(value);
  }
  get xTranslation() {
    return this._xTranslation;
  }
  set xTranslation(value) {
    this._xTranslation = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setEnabledTranslations(value, this._yTranslation, this._zTranslation, true);
  }
  get yTranslation() {
    return this._yTranslation;
  }
  set yTranslation(value) {
    this._yTranslation = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setEnabledTranslations(this._xTranslation, value, this._zTranslation, true);
  }
  get zTranslation() {
    return this._zTranslation;
  }
  set zTranslation(value) {
    this._zTranslation = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setEnabledTranslations(this._xTranslation, this._yTranslation, value, true);
  }
  get xRotation() {
    return this._xRotation;
  }
  set xRotation(value) {
    this._xRotation = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setEnabledRotations(value, this._yRotation, this._zRotation, true);
  }
  get yRotation() {
    return this._yRotation;
  }
  set yRotation(value) {
    this._yRotation = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setEnabledRotations(this._xRotation, value, this._zRotation, true);
  }
  get zRotation() {
    return this._zRotation;
  }
  set zRotation(value) {
    this._zRotation = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && this.body && this.body.setEnabledRotations(this._xRotation, this._yRotation, value, true);
  }
  init() {
    let rigidBodyDesc = this.getType();
    this.object3d.getWorldPosition(this.newPos);
    this.object3d.getWorldQuaternion(this.newRot);
    rigidBodyDesc.setGravityScale(this._gravityScale).setTranslation(this.newPos.x, this.newPos.y, this.newPos.z).setRotation(this.newRot).setAngularDamping(this._angularDamping).setLinearDamping(this._linearDamping).enabledRotations(this._xRotation, this._yRotation, this._zRotation).enabledTranslations(this._xTranslation, this._yTranslation, this._zTranslation);
    rigidBodyDesc.mass = this.mass;
    this.body = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.createRigidBody(rigidBodyDesc);
    this.body.userData = { object3d: this.object3d.uuid };
    this.initialized = true;
  }
  getType() {
    if (Number(this.type) === 1)
      return _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_3__["default"].RigidBodyDesc.fixed();
    else if (Number(this.type) === 2)
      return _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_3__["default"].RigidBodyDesc.kinematicPositionBased();
    else if (Number(this.type) === 3)
      return _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_3__["default"].RigidBodyDesc.kinematicVelocityBased();
    else
      return _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_3__["default"].RigidBodyDesc.dynamic();
  }
  onBeforeRemoved() {
    if (this.body) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeRigidBody(this.body);
    }
  }
  onDisabled() {
    if (this.body) {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.removeRigidBody(this.body);
    }
  }
  beforeUpdate() {
    if (!_Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].initialized)
      return;
    !this.initialized && this.init();
    this.type !== _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_3__["default"].RigidBodyType.Fixed && this.updatePhysics();
  }
  updatePhysics() {
    this.copyBodyPosition();
    this.copyBodyRotation();
  }
  copyBodyPosition() {
    const pos = this.body.translation();
    this.newPos.set(pos.x, pos.y, pos.z);
    this.object3d.parent?.worldToLocal(this.newPos);
    this.object3d.position.copy(this.newPos);
  }
  copyBodyRotation() {
    const rot = this.body.rotation();
    this.newRot.set(rot.x, rot.y, rot.z, rot.w);
    this.matrixA.makeRotationFromQuaternion(this.newRot);
    this.object3d.updateMatrixWorld();
    this.matrixB.copy(this.object3d.parent.matrixWorld).invert();
    this.matrixC.extractRotation(this.matrixB);
    this.matrixA.premultiply(this.matrixC);
    this.object3d.quaternion.setFromRotationMatrix(this.matrixA);
  }
}
__name(RapierBody, "RapierBody");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.select()
], RapierBody.prototype, "type", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierBody.prototype, "mass", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierBody.prototype, "gravityScale", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierBody.prototype, "angularDamping", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.num()
], RapierBody.prototype, "linearDamping", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierBody.prototype, "xTranslation", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierBody.prototype, "yTranslation", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierBody.prototype, "zTranslation", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierBody.prototype, "xRotation", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierBody.prototype, "yRotation", 1);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierBody.prototype, "zRotation", 1);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierBody);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierConfig.re.ts":
/*!**************************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierConfig.re.ts ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RapierConfig)
/* harmony export */ });
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rogue-engine */ "rogue-engine");
/* harmony import */ var rogue_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(rogue_engine__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! three */ "three");
/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Lib/RogueRapier */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/* harmony import */ var _RapierBody_re__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RapierBody.re */ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierBody.re.ts");
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};





class RapierConfig extends rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Component {
  constructor() {
    super(...arguments);
    this.gravity = new three__WEBPACK_IMPORTED_MODULE_1__.Vector3(0, -9.81, 0);
    this._debug = false;
    this.lines = new three__WEBPACK_IMPORTED_MODULE_1__.LineSegments(new three__WEBPACK_IMPORTED_MODULE_1__.BufferGeometry(), new three__WEBPACK_IMPORTED_MODULE_1__.LineBasicMaterial({ color: new three__WEBPACK_IMPORTED_MODULE_1__.Color("#00FF00") }));
  }
  get debug() {
    return this._debug;
  }
  set debug(value) {
    this._debug = value;
    rogue_engine__WEBPACK_IMPORTED_MODULE_0__.Runtime.isRunning && value ? rogue_engine__WEBPACK_IMPORTED_MODULE_0__.App.currentScene.add(this.lines) : rogue_engine__WEBPACK_IMPORTED_MODULE_0__.App.currentScene.remove(this.lines);
  }
  awake() {
    this.lines.name = "Rapier Debug Lines";
    _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].init(() => {
      _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.gravity = this.gravity;
    });
  }
  start() {
    if (this.debug) {
      rogue_engine__WEBPACK_IMPORTED_MODULE_0__.App.currentScene.add(this.lines);
    }
  }
  beforeUpdate() {
    if (!_Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].initialized)
      return;
    if (this.debug) {
      let buffers = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.debugRender();
      this.lines.geometry.setAttribute("position", new three__WEBPACK_IMPORTED_MODULE_1__.BufferAttribute(buffers.vertices, 3));
      this.lines.geometry.setAttribute("color", new three__WEBPACK_IMPORTED_MODULE_1__.BufferAttribute(buffers.colors, 4));
    }
    _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.step(_Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].eventQueue);
    _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].eventQueue.drainCollisionEvents((handle1, handle2, started) => {
      const col1 = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.getCollider(handle1);
      const col2 = _Lib_RogueRapier__WEBPACK_IMPORTED_MODULE_2__["default"].world.getCollider(handle2);
      const body1 = col1.parent();
      const body2 = col2.parent();
      const components = rogue_engine__WEBPACK_IMPORTED_MODULE_0__.getComponents(_RapierBody_re__WEBPACK_IMPORTED_MODULE_3__["default"]);
      let bodyComp1;
      let bodyComp2;
      components.forEach((bodyComp) => {
        if (bodyComp.body.handle === body1?.handle) {
          bodyComp1 = bodyComp;
        } else if (bodyComp.body.handle === body2?.handle) {
          bodyComp2 = bodyComp;
        }
      });
      if (bodyComp1 && col1.activeEvents() === _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ActiveEvents.COLLISION_EVENTS) {
        const colInfo = { ownCollider: col1, otherCollider: col2, otherBody: bodyComp2 };
        started ? bodyComp1.onCollisionStart(colInfo) : bodyComp1.onCollisionEnd(colInfo);
      }
      if (bodyComp2 && col2.activeEvents() === _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_4__["default"].ActiveEvents.COLLISION_EVENTS) {
        const colInfo = { ownCollider: col1, otherCollider: col2, otherBody: bodyComp1 };
        started ? bodyComp2.onCollisionStart(colInfo) : bodyComp2.onCollisionEnd(colInfo);
      }
    });
  }
}
__name(RapierConfig, "RapierConfig");
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.vector3()
], RapierConfig.prototype, "gravity", 2);
__decorateClass([
  rogue_engine__WEBPACK_IMPORTED_MODULE_0__.props.checkbox()
], RapierConfig.prototype, "debug", 1);
rogue_engine__WEBPACK_IMPORTED_MODULE_0__.registerComponent(RapierConfig);


/***/ }),

/***/ "./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts":
/*!***************************************************************************!*\
  !*** ./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ RogueRapier)
/* harmony export */ });
/* harmony import */ var _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @dimforge/rapier3d-compat */ "./node_modules/@dimforge/rapier3d-compat/rapier.es.js");
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

class RogueRapier {
  static init(onDone) {
    this.initialized = false;
    const done = this.doInit();
    done.then(() => onDone());
  }
  static async doInit() {
    await _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_0__["default"].init();
    this.world = new _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_0__["default"].World({ x: 0, y: -9.81, z: 0 });
    this.eventQueue && this.eventQueue.clear();
    this.eventQueue = this.eventQueue || new _dimforge_rapier3d_compat__WEBPACK_IMPORTED_MODULE_0__["default"].EventQueue(true);
    this.initialized = true;
  }
}
__name(RogueRapier, "RogueRapier");
RogueRapier.initialized = false;


/***/ }),

/***/ "rogue-engine":
/*!******************************************************************************************************************!*\
  !*** external {"commonjs":"rogue-engine","commonjs2":"rogue-engine","amd":"rogue-engine","root":"rogue-engine"} ***!
  \******************************************************************************************************************/
/***/ ((module) => {

module.exports = __WEBPACK_EXTERNAL_MODULE_rogue_engine__;

/***/ }),

/***/ "three":
/*!**************************************************************************************!*\
  !*** external {"commonjs":"three","commonjs2":"three","amd":"three","root":"three"} ***!
  \**************************************************************************************/
/***/ ((module) => {

module.exports = __WEBPACK_EXTERNAL_MODULE_three__;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = __webpack_modules__;
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/chunk loaded */
/******/ 	(() => {
/******/ 		var deferred = [];
/******/ 		__webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ 			if(chunkIds) {
/******/ 				priority = priority || 0;
/******/ 				for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ 				deferred[i] = [chunkIds, fn, priority];
/******/ 				return;
/******/ 			}
/******/ 			var notFulfilled = Infinity;
/******/ 			for (var i = 0; i < deferred.length; i++) {
/******/ 				var [chunkIds, fn, priority] = deferred[i];
/******/ 				var fulfilled = true;
/******/ 				for (var j = 0; j < chunkIds.length; j++) {
/******/ 					if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ 						chunkIds.splice(j--, 1);
/******/ 					} else {
/******/ 						fulfilled = false;
/******/ 						if(priority < notFulfilled) notFulfilled = priority;
/******/ 					}
/******/ 				}
/******/ 				if(fulfilled) {
/******/ 					deferred.splice(i--, 1)
/******/ 					var r = fn();
/******/ 					if (r !== undefined) result = r;
/******/ 				}
/******/ 			}
/******/ 			return result;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/jsonp chunk loading */
/******/ 	(() => {
/******/ 		// no baseURI
/******/ 		
/******/ 		// object to store loaded and loading chunks
/******/ 		// undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ 		// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ 		var installedChunks = {
/******/ 			"rogue-engine-user-scripts": 0
/******/ 		};
/******/ 		
/******/ 		// no chunk on demand loading
/******/ 		
/******/ 		// no prefetching
/******/ 		
/******/ 		// no preloaded
/******/ 		
/******/ 		// no HMR
/******/ 		
/******/ 		// no HMR manifest
/******/ 		
/******/ 		__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/ 		
/******/ 		// install a JSONP callback for chunk loading
/******/ 		var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ 			var [chunkIds, moreModules, runtime] = data;
/******/ 			// add "moreModules" to the modules object,
/******/ 			// then flag all "chunkIds" as loaded and fire callback
/******/ 			var moduleId, chunkId, i = 0;
/******/ 			if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ 				for(moduleId in moreModules) {
/******/ 					if(__webpack_require__.o(moreModules, moduleId)) {
/******/ 						__webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ 					}
/******/ 				}
/******/ 				if(runtime) var result = runtime(__webpack_require__);
/******/ 			}
/******/ 			if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ 			for(;i < chunkIds.length; i++) {
/******/ 				chunkId = chunkIds[i];
/******/ 				if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ 					installedChunks[chunkId][0]();
/******/ 				}
/******/ 				installedChunks[chunkId] = 0;
/******/ 			}
/******/ 			return __webpack_require__.O(result);
/******/ 		}
/******/ 		
/******/ 		var chunkLoadingGlobal = self["webpackChunk_name_"] = self["webpackChunk_name_"] || [];
/******/ 		chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ 		chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/directional-light-shadow-fix/DirectionalLightShadowFixForMobileCamera.re.ts");
/******/ 	// This entry module is referenced by other modules so it can't be inlined
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/GetForwardVector.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/PlayerPawnInput.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/RapierMovementController.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/targeted-orbit-camera/TargetedOrbitCamera.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraFlyover.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraTruck.re copy.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenCameraTruck.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenConfig.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenPosition.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenRotation.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Components/TweenScale.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Lib/Easings.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/EyeOfMidas/tween/Lib/Tween.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierBall.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCapsule.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCollider.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCone.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCuboid.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierCylinder.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/Colliders/RapierTrimesh.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierBody.re.ts");
/******/ 	__webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Components/RapierConfig.re.ts");
/******/ 	var __webpack_exports__ = __webpack_require__("./Assets/rogue_packages/RogueEngine/rogue-rapier/Lib/RogueRapier.ts");
/******/ 	__webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/ 	
/******/ 	return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=rogue-engine-user-scripts.js.map