@needle-tools/engine 5.1.0-canary.244f23e → 5.1.0-canary.3d7c58a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{needle-engine.bundle-rcR8UYgV.umd.cjs → needle-engine.bundle-Cb806egV.umd.cjs} +4 -4
- package/dist/{needle-engine.bundle-CcPGKcD_.js → needle-engine.bundle-D6w6CUmG.js} +3 -3
- package/dist/{needle-engine.bundle-CJmix0Oo.min.js → needle-engine.bundle-DyafERqr.min.js} +2 -2
- package/dist/needle-engine.d.ts +22 -22
- package/dist/needle-engine.js +2 -2
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/engine_gameobject.js +2 -2
- package/lib/engine/engine_gameobject.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/engine_gameobject.ts +2 -2
|
@@ -148,7 +148,7 @@ void main(){
|
|
|
148
148
|
clip: rect(0, 0, 0, 0);
|
|
149
149
|
white-space: nowrap;
|
|
150
150
|
border: 0;
|
|
151
|
-
`,this.root.setAttribute("role","region"),this.root.setAttribute("aria-label","3D Needle Engine scene"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("aria-atomic","true"),this.liveRegion.setAttribute("role","status"),this.root.appendChild(this.liveRegion),this.enabled=!0}static _managers=new WeakMap;static get(e){return Bg(e)?this._managers.get(e.context):this._managers.get(e)}_enabled;set enabled(e){e!==this._enabled&&(this._enabled=e,e?(Dm._managers.set(this.context,this),(this.context.domElement.shadowRoot||this.context.domElement).prepend(this.root)):this.root.remove())}clear(){this.root.childNodes.forEach(e=>e.remove()),this.root.appendChild(this.liveRegion)}dispose(){this.root.remove(),Dm._managers.delete(this.context)}root=document.createElement("div");liveRegion=document.createElement("div");treeElements=new WeakMap;updateElement(e,t){let i=this.treeElements.get(e);i||(i=document.createElement("div"),this.treeElements.set(e,i),this.root.appendChild(i),typeof t=="object"&&(t.role&&i.setAttribute("role",t.role),t.label&&i.setAttribute("aria-label",t.label),t.hidden!==void 0&&i.setAttribute("aria-hidden",String(t.hidden)),t.busy!==void 0&&i.setAttribute("aria-busy",String(t.busy))))}focus(e){const t=this.treeElements.get(e);t&&t.focus()}unfocus(e){const t=this.treeElements.get(e);t&&t.blur()}hover(e,t){const i=this.treeElements.get(e);this.liveRegion.textContent=t||i?.getAttribute("aria-label")||""}removeElement(e){this.treeElements.get(e)?.remove(),this.treeElements.delete(e)}set liveRegionMode(e){this.liveRegion.setAttribute("aria-live",e)}}let dv,uv=null;function En(){return dv}function pv(o){if(o==null){console.warn("Oh no: someone tried registering a non-existend gltf-loader. When you see this log it might mean that needle-engine is being imported multiple times. Please check your project setup.");return}uv!==o&&(uv=o,dv=new o)}const mv=w("debugdefines");ks('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"] = "0.0.0";'),ks('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";'),ks('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";'),ks('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";'),ks('globalThis["__NEEDLE_ENGINE_VERSION__"] = "5.1.0-alpha.2";'),ks('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";'),ks('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Apr 20 2026
|
|
151
|
+
`,this.root.setAttribute("role","region"),this.root.setAttribute("aria-label","3D Needle Engine scene"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("aria-atomic","true"),this.liveRegion.setAttribute("role","status"),this.root.appendChild(this.liveRegion),this.enabled=!0}static _managers=new WeakMap;static get(e){return Bg(e)?this._managers.get(e.context):this._managers.get(e)}_enabled;set enabled(e){e!==this._enabled&&(this._enabled=e,e?(Dm._managers.set(this.context,this),(this.context.domElement.shadowRoot||this.context.domElement).prepend(this.root)):this.root.remove())}clear(){this.root.childNodes.forEach(e=>e.remove()),this.root.appendChild(this.liveRegion)}dispose(){this.root.remove(),Dm._managers.delete(this.context)}root=document.createElement("div");liveRegion=document.createElement("div");treeElements=new WeakMap;updateElement(e,t){let i=this.treeElements.get(e);i||(i=document.createElement("div"),this.treeElements.set(e,i),this.root.appendChild(i),typeof t=="object"&&(t.role&&i.setAttribute("role",t.role),t.label&&i.setAttribute("aria-label",t.label),t.hidden!==void 0&&i.setAttribute("aria-hidden",String(t.hidden)),t.busy!==void 0&&i.setAttribute("aria-busy",String(t.busy))))}focus(e){const t=this.treeElements.get(e);t&&t.focus()}unfocus(e){const t=this.treeElements.get(e);t&&t.blur()}hover(e,t){const i=this.treeElements.get(e);this.liveRegion.textContent=t||i?.getAttribute("aria-label")||""}removeElement(e){this.treeElements.get(e)?.remove(),this.treeElements.delete(e)}set liveRegionMode(e){this.liveRegion.setAttribute("aria-live",e)}}let dv,uv=null;function En(){return dv}function pv(o){if(o==null){console.warn("Oh no: someone tried registering a non-existend gltf-loader. When you see this log it might mean that needle-engine is being imported multiple times. Please check your project setup.");return}uv!==o&&(uv=o,dv=new o)}const mv=w("debugdefines");ks('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"] = "0.0.0";'),ks('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";'),ks('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";'),ks('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";'),ks('globalThis["__NEEDLE_ENGINE_VERSION__"] = "5.1.0-alpha.2";'),ks('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";'),ks('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Apr 20 2026 16:47:29 GMT+0000 (Coordinated Universal Time)";'),ks('globalThis["__NEEDLE_PUBLIC_KEY__"] = "'+NEEDLE_PUBLIC_KEY+'";');const fi="5.1.0-alpha.2",$a="undefined",Ec="Mon Apr 20 2026 16:47:29 GMT+0000 (Coordinated Universal Time)";mv&&console.log(`Engine version: ${fi} (generator: ${$a})
|
|
152
152
|
Project built at ${Ec}`);const Os=NEEDLE_PUBLIC_KEY,Jn="needle_isActiveInHierarchy",Tr="builtin_components",Rc="needle_editor_guid";function ks(o){try{(0,eval)(o)}catch(e){mv&&console.error(e)}}globalThis.NEEDLE_USE_RAPIER=globalThis.NEEDLE_USE_RAPIER!==void 0?globalThis.NEEDLE_USE_RAPIER:!0,globalThis.NEEDLE_USE_POSTPROCESSING=globalThis.NEEDLE_USE_POSTPROCESSING!==void 0?globalThis.NEEDLE_USE_POSTPROCESSING:!0;const Ug={experimentalSmartHierarchyUpdate:!1};function Tc(o,e){try{e||o()}catch(t){return console.error(t),!1}return!0}const zg=w("debugnewscripts"),oM=w("debughierarchy"),Ae=[];function sM(){return Ae.length>0}function au(o){if(zg&&console.log("Register new components",o.new_scripts.length,[...o.new_scripts],o.alias?"element: "+o.alias:o.hash,o),o.new_scripts_pre_setup_callbacks.length>0){for(const e of o.new_scripts_pre_setup_callbacks)e&&e();o.new_scripts_pre_setup_callbacks.length=0}if(!(o.new_scripts.length<=0)){Ae.length=0,o.new_scripts.length>0&&Ae.push(...o.new_scripts),o.new_scripts.length=0;for(let e=0;e<Ae.length;e++)try{const t=Ae[e];if(t.isComponent!==!0){(A()||zg)&&console.error(`Registered script is not a Needle Engine component.
|
|
153
153
|
The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
|
|
154
154
|
`,t),Ae.splice(e,1),e--;continue}if(t.destroyed)continue;if(!t.gameObject){console.warn(`Component can not be initialized: no GameObject assigned.
|
|
@@ -888,7 +888,7 @@ Possible solutions:
|
|
|
888
888
|
Render:`,{shaders:this.renderer.info.programs?.length,...this.renderer.info.render},`
|
|
889
889
|
Memory:`,{usedMemory:t,...this.renderer.info.memory},`
|
|
890
890
|
Target Framerate: `+this.targetFrameRate)}}this._dispatchReadyAfterFrame&&(this._dispatchReadyAfterFrame=!1,this.domElement.dispatchEvent(new CustomEvent("ready")),ue.dispatchCallback(pe.ContextFirstFrameRendered,this))}_tempClearColor=new oe;_tempClearColor2=new oe;renderNow(e){if(!e&&(e=this.mainCamera,!e))return!1;if(this.handleRendererContextLost(),this._isRendering=!0,this.renderRequiredTextures(),this.renderer.toneMapping!==zd&&xw(),this.postprocessing.update(),this.composer&&!this.isInXR){e&&"setMainCamera"in this.composer&&this.composer.passes[0]?.mainCamera!=e&&this.composer.setMainCamera(e);const t=this.renderer.getClearColor(this._tempClearColor),i=this.renderer.getClearAlpha();this._tempClearColor2.copy(t),this.renderer.setClearColor(t.convertSRGBToLinear(),this.renderer.getClearAlpha()),this.composer.render(this.time.deltaTime),this.renderer.setClearColor(this._tempClearColor2,i)}else e&&(this.isInXR&&I.isMacOS()&&this.renderer.clearDepth(),this.renderer.render(this.scene,e));return this._isRendering=!1,!0}_contextRestoreTries=0;handleRendererContextLost(){this.time.frame%10&&this.renderer.getContext().isContextLost()&&this._contextRestoreTries++<100&&(console.warn("Attempting to recover WebGL context..."),this.renderer.forceContextRestore())}_wasPaused=!1;onHandlePaused(){const e=this.evaluatePaused();if(this._wasPaused!==e){$E&&console.log("Paused?",e,"context:"+this.alias);for(let t=0;t<this.scripts_pausedChanged.length;t++){const i=this.scripts_pausedChanged[t];i.activeAndEnabled&&i.onPausedChanged!==void 0&&(U.Current=this,i.onPausedChanged(e,this._wasPaused))}}return this._wasPaused=e,e}evaluatePaused(){return this.isInXR?!1:this.isPaused?!0:this.runInBackground?!1:!this.isVisibleToUser}renderRequiredTextures(){if(!this.mainCamera||!this._requireDepthTexture&&!this._requireColorTexture)return;if(!this._renderTarget){if(this._renderTarget=new Yn(this.domWidth,this.domHeight),this._requireDepthTexture){const i=new Wb(this.domWidth,this.domHeight);this._renderTarget.depthTexture=i}this._requireColorTexture&&(this._renderTarget.texture=new xe,this._renderTarget.texture.generateMipmaps=!1,this._renderTarget.texture.minFilter=Nd,this._renderTarget.texture.magFilter=Nd,this._renderTarget.texture.format=Bd)}const e=this._renderTarget;e.texture&&(e.texture.colorSpace=this.renderer.outputColorSpace);const t=this.renderer.getRenderTarget();this.renderer.setRenderTarget(e),this.renderer.render(this.scene,this.mainCamera),this.renderer.setRenderTarget(t)}executeCoroutines(e){if(this.coroutines[e]){const i=this.coroutines[e];for(let n=0;n<i.length;n++)try{const s=i[n];if(!s.comp||s.comp.destroyed||!s.main||s.comp.enabled===!1){GE&&console.log("Removing coroutine",s.comp,s.comp.enabled),i.splice(n,1),--n;continue}const r=s.chained;if(r&&r.length>0){const c=r[r.length-1].next();if(c.done&&r.pop(),t(c)&&(s.chained||(s.chained=[]),s.chained.push(c.value)),!c.done)continue}const a=s.main.next();if(a.done===!0){i.splice(n,1),--n;continue}const l=a.value;if(t(l)){if(l.next().done)continue;s.chained||(s.chained=[]),s.chained.push(l)}else if(l instanceof Promise){const c=l;s.chained||(s.chained=[]);const h=Uv(c);s.chained?.push(h);continue}}catch(s){console.error(s)}}function t(i){return!!(i&&i.next&&i.return)}}}const Bf=w("debugwebxr");class Vw{static tryFindAvatarObjects(e,t,i){if(i.head&&i.leftHand&&i.rightHand)return;const n=e.name.toLocaleLowerCase();!i.head&&n.includes("head")&&(Bf&&console.log("FOUND AVATAR HEAD",e.name),i.head=new te("",t,e)),n.includes("hand")&&(!i.leftHand&&n.includes("left")&&(Bf&&console.log("FOUND AVATAR LEFT HAND",e.name),i.leftHand=new te("",t,e)),!i.rightHand&&n.includes("right")&&(Bf&&console.log("FOUND AVATAR RIGHT HAND",e.name),i.rightHand=new te("",t,e)));for(let s=0;s<e.children.length;s++){if(i.head&&i.leftHand&&i.rightHand)return;const r=e.children[s];this.tryFindAvatarObjects(r,t,i)}}}const Wt=new _,$w=new _,Hw=new N,QE=w("debuggizmos"),In=8947848,Ff=32;class B{constructor(){}static enabled=!0;static isGizmo(e){return e[zf]!==void 0}static setVisible(e){for(const t of sn.timedObjectsBuffer)t.visible=e}static DrawLabel(e,t,i=.05,n=0,s,r,a){if(!B.enabled)return null;s||(s=In);const l=Y.active?.rigScale??1,c=sn.getTextLabel(n,t,i*l,s,r);return a instanceof M&&a.add(c),c.position.x=e.x,c.position.y=e.y,c.position.z=e.z,c}static DrawRay(e,t,i=In,n=0,s=!0){if(!B.enabled)return;const r=sn.getLine(n),a=r.geometry.getAttribute("position");a.setXYZ(0,e.x,e.y,e.z),Wt.set(t.x,t.y,t.z).multiplyScalar(999999999),a.setXYZ(1,e.x+Wt.x,e.y+Wt.y,e.z+Wt.z),a.needsUpdate=!0,r.material.depthTest=s,r.material.depthWrite=!1,r.material.fog=!1,Ln(r.material,i)}static DrawDirection(e,t,i=In,n=0,s=!0,r=1){if(!B.enabled)return;const a=sn.getLine(n),l=a.geometry.getAttribute("position");l.setXYZ(0,e.x,e.y,e.z),t.w!==void 0?(Wt.set(0,0,-r),Hw.set(t.x,t.y,t.z,t.w),Wt.applyQuaternion(Hw)):(Wt.set(t.x,t.y,t.z),Wt.multiplyScalar(r)),l.setXYZ(1,e.x+Wt.x,e.y+Wt.y,e.z+Wt.z),l.needsUpdate=!0,a.material.depthTest=s,a.material.depthWrite=!1,Ln(a.material,i)}static DrawLine(e,t,i=In,n=0,s=!0){if(!B.enabled)return;const r=sn.getLine(n),a=r.geometry.getAttribute("position");a.setXYZ(0,e.x,e.y,e.z),a.setXYZ(1,t.x,t.y,t.z),a.needsUpdate=!0,r.material.depthTest=s,r.material.depthWrite=!1,r.material.fog=!1,Ln(r.material,i)}static DrawCircle(e,t,i,n=In,s=0,r=!0){if(!B.enabled)return;const a=sn.getCircle(s);a.position.set(e.x,e.y,e.z),a.scale.set(i,i,i),a.quaternion.setFromUnitVectors(this._up,Wt.set(t.x,t.y,t.z).normalize()),a.material.depthTest=r,a.material.depthWrite=!1,a.material.fog=!1,Ln(a.material,n)}static DrawWireSphere(e,t,i=In,n=0,s=!0){if(!B.enabled)return;const r=sn.getSphere(t,n,!0);Or(r,e.x,e.y,e.z),r.material.depthTest=s,r.material.depthWrite=!1,r.material.fog=!1,Ln(r.material,i)}static DrawSphere(e,t,i=In,n=0,s=!0){if(!B.enabled)return;const r=sn.getSphere(t,n,!1);Or(r,e.x,e.y,e.z),r.material.depthTest=s,r.material.depthWrite=!1,Ln(r.material,i)}static DrawWireBox(e,t,i=In,n=0,s=!0,r=void 0){if(!B.enabled)return;const a=sn.getBox(n);a.position.set(e.x,e.y,e.z),a.scale.set(t.x,t.y,t.z),r?a.quaternion.copy(r):a.quaternion.identity(),a.material.depthTest=s,a.material.wireframe=!0,a.material.depthWrite=!1,a.material.fog=!1,Ln(a.material,i)}static DrawWireBox3(e,t=In,i=0,n=!0){if(!B.enabled)return;const s=sn.getBox(i);s.position.copy(e.getCenter(Wt)),s.scale.copy(e.getSize(Wt)),s.material.depthTest=n,s.material.wireframe=!0,s.material.depthWrite=!1,s.material.fog=!1,Ln(s.material,t)}static _up=new _(0,1,0);static DrawArrow(e,t,i=In,n=0,s=!0,r=!1){if(!B.enabled)return;const a=sn.getArrowHead(n);a.position.set(t.x,t.y,t.z),a.quaternion.setFromUnitVectors(this._up.set(0,1,0),Wt.set(t.x,t.y,t.z).sub($w.set(e.x,e.y,e.z)).normalize());const l=Wt.set(t.x,t.y,t.z).sub($w.set(e.x,e.y,e.z)).length()*.1;a.scale.set(l,l,l),a.material.depthTest=s,a.material.wireframe=r,Ln(a.material,i),this.DrawLine(e,t,i,n,s)}static DrawWireMesh(e){const t=sn.getMesh(e.duration??0);"mesh"in e?(t.geometry=e.mesh.geometry,t.matrixWorld.copy(e.mesh.matrixWorld)):(t.geometry=e.geometry,t.matrixWorld.copy(e.matrix)),t.matrixAutoUpdate=!1,t.matrixWorldAutoUpdate=!1,t.material.depthTest=e.depthTest??!0,t.material.wireframe=!0,Ln(t.material,e.color??In)}}const YE=new ja(1,1,1);function Uf(o=null){const e=new oe(o??14540253),t=new NC(YE);return new Hm(t,new Wd({color:e}))}function Ln(o,e){if(Array.isArray(o)){for(const i of o)Ln(i,e);return}const t=e instanceof se?e.a:1;o.color.set(e),o.opacity=t,o.transparent=t<1}const zf=Symbol("GizmoCache");class sn{static familyName="needle-gizmos";static ensureFont(){let e=Oe.FontLibrary.getFontFamily(this.familyName);e||(e=Oe.FontLibrary.addFontFamily(this.familyName),e.addVariant("normal","normal","https://cdn.needle.tools/static/fonts/msdf/arial/arial-msdf.json","https://cdn.needle.tools/static/fonts/msdf/arial/arial.png")?.addEventListener("ready",()=>{Oe.update()}))}static getTextLabel(e,t,i,n,s){this.ensureFont();let r=this.textLabelCache.pop(),a=1;s&&typeof s=="string"&&s?.length>=8&&s.startsWith("#")?(a=parseInt(s.substring(7),16)/255,s=s.substring(0,7),QE&&console.log(s,a)):typeof s=="object"&&s.a!==void 0&&(a=s.a);const l={boxSizing:"border-box",fontFamily:this.familyName,width:"auto",fontSize:i,color:n,lineHeight:1,backgroundColor:s??void 0,backgroundOpacity:a,textContent:t,borderRadius:.5*i,padding:.8*i,whiteSpace:"pre",offset:.05*i};if(r)r.set(l);else{r=new l_(l);const c=this,h=r;h.setText=function(d){this.set({textContent:d}),c.tmuiNeedsUpdate=!0}}return this.tmuiNeedsUpdate=!0,this.registerTimedObject(U.Current,r,e,this.textLabelCache),r}static getBox(e){let t=this.boxesCache.pop();if(!t){const i=new ja(1,1,1);t=new H(i)}return this.registerTimedObject(U.Current,t,e,this.boxesCache),t}static getLine(e){let t=this.linesCache.pop();if(!t){t=new Ba;let i=t.geometry.getAttribute("position");i||(i=new tt(new Float32Array(6),3),t.geometry.setAttribute("position",i))}return t.frustumCulled=!1,this.registerTimedObject(U.Current,t,e,this.linesCache),t}static getCircle(e){let t=this.circlesCache.pop();if(!t){t=new Ba;let i=t.geometry.getAttribute("position");if(!i){i=new tt(new Float32Array(Ff*3),3),t.geometry.setAttribute("position",i);const n=F(0,1,0),s=F(0,0,1),r=F(s);r.cross(n).normalize();const a=F(r),l=Math.PI*2/(Ff-1);for(let c=0;c<Ff+1;c++){const h=l*c;n.copy(a).multiplyScalar(Math.cos(h)*1),r.copy(s).multiplyScalar(Math.sin(h)*1);const d=n.add(r);i.setXYZ(c,d.x,d.y,d.z)}}}return t.frustumCulled=!1,this.registerTimedObject(U.Current,t,e,this.circlesCache),t}static getSphere(e,t,i){let n=this.spheresCache.pop();return n||(n=new H(new jd(1,8,8))),n.scale.set(e,e,e),n.material.wireframe=i,this.registerTimedObject(U.Current,n,t,this.spheresCache),n}static getArrowHead(e){let t=this.arrowHeadsCache.pop();return t||(t=new H(new zb(0,.5,1,8))),this.registerTimedObject(U.Current,t,e,this.arrowHeadsCache),t}static getMesh(e){let t=this.mesh.pop();return t||(t=new H,t.material=new Se),this.registerTimedObject(U.Current,t,e,this.mesh),t}static linesCache=[];static circlesCache=[];static spheresCache=[];static boxesCache=[];static arrowHeadsCache=[];static mesh=[];static textLabelCache=[];static registerTimedObject(e,t,i,n){if(!e){console.error("No Needle Engine context available. Did you call a Gizmos function in global scope?");return}const s=this.contextBeforeRenderCallbacks.get(e),r=this.contextPostRenderCallbacks.get(e);if(s){if(e.pre_render_callbacks[e.pre_render_callbacks.length-1]!==s){const a=e.pre_render_callbacks.indexOf(s);a>=0&&e.pre_render_callbacks.splice(a,1),e.pre_render_callbacks.push(s)}}else{const a=()=>{this.onBeforeRender(e,this.timedObjectsBuffer)};this.contextBeforeRenderCallbacks.set(e,a),e.pre_render_callbacks.push(a)}if(r){if(e.post_render_callbacks[e.post_render_callbacks.length-1]!==r){const a=e.post_render_callbacks.indexOf(r);a>=0&&e.post_render_callbacks.splice(a,1),e.post_render_callbacks.push(r)}}else{const a=()=>{this.onPostRender(e,this.timedObjectsBuffer,this.timesBuffer)};this.contextPostRenderCallbacks.set(e,a),e.post_render_callbacks.push(a)}t.traverse(a=>{a.layers.disableAll(),a.layers.enable(2)}),t.renderOrder=999999,t[zf]=n,t.castShadow=!1,t.receiveShadow=!1,t.isGizmo=!0,this.timedObjectsBuffer.push(t),this.timesBuffer.push(U.Current.time.realtimeSinceStartup+i),e.scene.add(t)}static timedObjectsBuffer=new Array;static timesBuffer=new Array;static contextPostRenderCallbacks=new Map;static contextBeforeRenderCallbacks=new Map;static tmuiNeedsUpdate=!1;static onBeforeRender(e,t){this.tmuiNeedsUpdate&&(this.tmuiNeedsUpdate=!1,Oe.update());for(let i=0;i<t.length;i++){const n=t[i];if(e.mainCamera&&n instanceof Oe.MeshUIBaseElement){if(Nr(n))continue;const s=e.isInVR,r=!1,a=!s;Sc(n,e.mainCamera,r,a)}}}static onPostRender(e,t,i){const n=e.time.realtimeSinceStartup;for(let s=t.length-1;s>=0;s--){const r=t[s];n>=i[s]-1e-6&&(t.splice(s,1),i.splice(s,1),r.removeFromParent(),Nr(r)!=!0&&r[zf].push(r))}}}const ti=w("debugphysics"),ZE=w("debugworker"),Gw=new xs;class As{static AllLayers=4294967295;ray;cam;screenPoint;raycaster;results;targets;recursive=!0;minDistance;maxDistance;lineThreshold;layerMask;ignore;testObject;useAcceleratedRaycast;allowSlowRaycastFallback=!0;screenPointFromOffset(e,t){this.screenPoint===void 0&&(this.screenPoint=new K),this.screenPoint.x=e/window.innerWidth*2-1,this.screenPoint.y=-(t/window.innerHeight)*2+1}setLayer(e){Gw.set(e),this.layerMask=Gw}setMask(e){this.layerMask||(this.layerMask=new xs);const t=this.layerMask;t?t.mask=e:this.layerMask=e}}class Nf{distance;point;object;constructor(e,t,i){this.object=e,this.distance=t,this.point=i}}class dc{static _raycasting=0;static get raycasting(){return this._raycasting>0}raycastPhysicsFast(e,t=void 0,i=1/0,n=!0){return this.context.physics.engine?.raycast(e,t,{maxDistance:i,solid:n})??null}raycastPhysicsFastAndGetNormal(e,t=void 0,i=1/0,n=!0){return this.context.physics.engine?.raycastAndGetNormal(e,t,{maxDistance:i,solid:n})??null}sphereOverlapPhysics(e,t){return this.context.physics.engine?.sphereOverlap(e,t)??null}context;engine;constructor(e){this.context=e}raycaster=new Vd;defaultRaycastOptions=new As;targetBuffer=new Array(1);defaultThresholds={Mesh:{},Line:{threshold:-1},LOD:{},Points:{threshold:0},Sprite:{}};sphereResults=new Array;sphereMask=new xs;sphere=new Dd;sphereOverlap(e,t,i=!0,n=!1,s=null){if(this.sphereResults.length=0,!this.context.scene)return this.sphereResults;const r=this.sphereMask;r.enableAll(),r.disable(2);for(const a of this.context.scene.children)this.intersectSphere(a,e,t,r,this.sphereResults,i,n,s);return this.sphereResults.sort((a,l)=>a.distance-l.distance)}raycastFromRay(e,t=null){const i=t??this.defaultRaycastOptions;i.ray=e;const n=this.raycast(i);return i===this.defaultRaycastOptions&&(i.ray=void 0),n}raycast(e=null){ti&&performance.mark("raycast.start"),e||(e=this.defaultRaycastOptions);const t=e.screenPoint??this.context.input.mousePositionRC,i=e.raycaster??this.raycaster;if(i.near=e.minDistance??0,i.far=e.maxDistance??1/0,i.params=this.defaultThresholds,e.lineThreshold===void 0&&(e.lineThreshold=-1),i.params.Line={threshold:e.lineThreshold},e.ray)i.ray.copy(e.ray);else{const a=e.cam??this.context.mainCamera;if(!a)return ti&&console.error("Can not perform raycast - no main camera found"),this.defaultRaycastOptions.results&&(this.defaultRaycastOptions.results.length=0),this.defaultRaycastOptions.results??[];const l=this.context.xrCamera;this.context.isInXR&&l instanceof WC&&l.cameras.length>0?i.setFromCamera(t,l.cameras[0]):i.setFromCamera(t,a)}let n=e.targets;n||(n=this.targetBuffer,n.length=1,n[0]=this.context.scene);let s=e.results;this.defaultRaycastOptions.results&&(this.defaultRaycastOptions.results.length=0),s||(this.defaultRaycastOptions.results||(this.defaultRaycastOptions.results=new Array),s=this.defaultRaycastOptions.results),e.layerMask!==void 0?e.layerMask instanceof xs?i.layers.mask=e.layerMask.mask:i.layers.mask=e.layerMask:(i.layers.enableAll(),i.layers.disable(2)),ti&&console.time("raycast"),s.length=0,dc._raycasting++,this.intersect(this.raycaster,n,s,e),s.sort((a,l)=>a.distance-l.distance);const r=e.ignore;return r!==void 0&&r.length>0&&(s=s.filter(a=>!r.includes(a.object))),dc._raycasting--,ti&&(console.timeEnd("raycast"),console.warn("#"+this.context.time.frame+", hits:",s?.length?[...s]:"nothing"),performance.mark("raycast.end"),performance.measure("raycast","raycast.start","raycast.end")),s}intersect(e,t,i,n){for(const s of t){if(!s||s.visible===!1||B.isGizmo(s)||n.lineThreshold!==void 0&&n.lineThreshold<0&&s instanceof Ba)continue;let r=!0;const a=s,l=a.geometry;if(s.raycastAllowed===!1&&(r=!1),r&&n.testObject){const c=n.testObject?.(s);if(c===!1)continue;c==="continue in children"&&(r=!1)}else r&&(l&&qw(l)||(r=!1));if(r){const c=i.length,h=s.raycastPreference||"lod";let d=h!=="bounds";if(n.precise===!1&&(d=!1),l&&(d||=l.getAttribute("position")?.array?.length<64),a instanceof Fa&&(d=!1),h==="lod"){const p=jb(s);p&&(a.geometry=p)}if(!d&&JE(a,e,i)||(n.useAcceleratedRaycast!==!1?Bu.runMeshBVHRaycast(e,a,i,this.context,n):e.intersectObject(a,!1,i)),a.geometry=l,ti&&i.length!=c){const p=i[i.length-1];B.DrawWireSphere(p.point,.1,7798784,1,!1),B.DrawWireMesh({mesh:s,depthTest:!1,duration:.2,color:7798784})}}n.recursive!==!1&&this.intersect(e,s.children,i,n)}return i}tempBoundingBox=new Nt;intersectSphere(e,t,i,n,s,r,a,l){let c=e&&e.isMesh&&e.layers.test(n)&&!B.isGizmo(e);c&&=e.visible,c&&=!(e instanceof Ba),c&&=!(e instanceof Fa);const h=e,d=h.geometry;if(c&&l){const p=l(e);if(p===!1)return;p==="continue in children"&&(c=!1)}if(d&&qw(d)||(c=!1),c){if(a){const p=this.sphere;p.center.copy(t),p.radius=i;const m=s.length;if(Bu.runMeshBVHRaycast(this.sphere,h,s,this.context,{}),m!=s.length&&!r)return}else if(d.boundingBox||d.computeBoundingBox(),d.boundingBox){h.matrixWorldNeedsUpdate&&h.updateWorldMatrix(!1,!1);const p=this.tempBoundingBox.copy(d.boundingBox).applyMatrix4(h.matrixWorld),m=this.sphere;if(m.center.copy(t),m.radius=i,m.intersectsBox(p)){const g=ee(e),f=g.distanceTo(m.center),y=new Nf(e,f,g);if(s.push(y),!r)return}}}if(e.children)for(const p of e.children){const m=s.length;if(this.intersectSphere(p,t,i,n,s,r,a,l),m!=s.length&&!r)return}}}function qw(o){return!(o.index&&o.index.array.length<3)}const Br=new Dd,Du=new Sr,KE=new Fb;function JE(o,e,t){const i=o._computeIntersections;if(!i)return!1;let n=o["_computeIntersections:Needle"];return n||(n=o["_computeIntersections:Needle"]=function(s,r,a){const l=this,c=l.geometry.boundingSphere;if(c){if(l instanceof Fa){Du.setFromNormalAndCoplanarPoint(F(0,1,0),F(0,-l.position.y,0)),Du.applyMatrix4(l.matrixWorld,KE);const d=s.ray.intersectPlane(Du,F());if(d){Br.copy(c),Br.applyMatrix4(l.matrixWorld);const p=F(d).sub(s.ray.origin).length(),m=Br.radius*.5;p<m&&r.push({distance:p,point:d,object:l,normal:Du.normal.clone()})}return}Br.copy(c),Br.applyMatrix4(l.matrixWorld);const h=s.ray.intersectSphere(Br,F());if(h){const d=F(h).sub(s.ray.origin),p=d.length();if(p>Br.radius){const m=d.clone().normalize();r.push({distance:p,point:h,object:l,normal:m})}}}}),o._computeIntersections=n,e.intersectObject(o,!1,t),o._computeIntersections=i,!0}var Bu;(o=>{let e=0;function t(v,C,O,k,L){if(!C.geometry||!C.geometry.hasAttribute("position"))return!1;const j=C.geometry;if(C?.isSkinnedMesh){const V=C,W=V.bvhNeedsUpdate;if(!V.staticGenerator)l(),r&&(V.staticGenerator=new r(C),V.staticGenerator.applyWorldTransforms=!1,V.staticGeometry=V.staticGenerator.generate(),j.boundsTree=a?.call(V.staticGeometry),V.staticGeometryLastUpdate=performance.now()+Math.random()*200,V.bvhNeedsUpdate=!0);else if(j.boundsTree&&(V.autoUpdateMeshBvhInterval!==void 0&&V.autoUpdateMeshBvhInterval>=0||W===!0)){const G=performance.now(),X=G-V.staticGeometryLastUpdate,R=V.autoUpdateMeshBvhInterval??100;(W||X>R)&&(ti&&console.warn(`Physics: updating skinned mesh bvh for ${C.name} after ${X.toFixed(2)}ms`),V.bvhNeedsUpdate=!1,V.staticGeometryLastUpdate=G,V.staticGenerator?.generate(V.staticGeometry),j.boundsTree.refit())}}else if(!j.boundsTree){h||b();let V=!0;if((k.xr||j[g]===!1||j.getAttribute("position")?.isInterleavedBufferAttribute||j.index&&j.index?.isInterleavedBufferAttribute||e>10)&&(V=!1),V&&p){if(j[m]===void 0){let W=null;if(y.length>0){const G=y.shift();G&&!G.running&&(W=G)}if(!W&&f.length<3)try{ZE&&console.warn("[GenerateMeshBVHWorker] Creating worker with import.meta.url:",import.meta.url),W=new p,f.push(W)}catch(G){G instanceof DOMException&&G.name==="SecurityError"?(console.warn("Failed to create MeshBVH worker, falling back to main thread generation. This can happen when running from file://, if the browser does not support workers or if the browser is blocking workers for other reasons."),console.debug(G),e+=10):(console.error("Failed to create MeshBVH worker. Please see below for more details:"),console.log(G)),e++}if(W!=null&&!W.running){const G=C.name;ti&&console.log("<<<< worker start",G,W),j[m]="queued",performance.mark("bvh.create.start");const X=j.clone();try{W.generate(X).then(R=>{j[m]="done",j.boundsTree=R}).catch(R=>{j[m]="failed - "+R?.message,j[g]=!1,ti&&console.error("Failed to generate mesh bvh on worker",R)}).finally(()=>{ti&&console.log(">>>>> worker done",G,{hasBoundsTre:j.boundsTree!=null}),y.push(W),X.dispose(),performance.mark("bvh.create.end"),performance.measure("bvh.create (worker)","bvh.create.start","bvh.create.end")})}catch(R){console.error("Failed to generate mesh bvh on worker",R)}}else ti&&console.warn("No worker available")}}else(!d||!V)&&(l(),s&&(performance.mark("bvh.create.start"),j.boundsTree=new s(j),performance.mark("bvh.create.end"),performance.measure("bvh.create","bvh.create.start","bvh.create.end")))}if(v instanceof Vd){const V=v,W=C.raycast;if(j.boundsTree)l(),n&&(C.acceleratedRaycast||(C.acceleratedRaycast=n.bind(C),ti&&console.debug(`Physics: bind acceleratedRaycast fn to "${C.name}"`)),C.raycast=C.acceleratedRaycast);else if(ti&&console.warn("No bounds tree found for mesh",C.name,{workerTask:j[m],hasAcceleratedRaycast:n!=null}),L.allowSlowRaycastFallback===!1&&(j.getAttribute("position")?.array?.length??0)>2e3)return ti&&console.warn("Skipping raycast because no bounds tree is available and allowSlowRaycastFallback is false"),!1;const G=V.firstHitOnly;return V.firstHitOnly=!1,V.intersectObject(C,!1,O),V.firstHitOnly=G,C.raycast=W,!0}else if(v instanceof Dd){const V=j.boundsTree;if(V){const W=v;if(c.copy(C.matrixWorld).invert(),W.applyMatrix4(c),V.intersectsSphere(W)){const G=ee(C),X=G.distanceTo(W.center),R=new Nf(C,X,G);O.push(R)}}return!0}return!1}o.runMeshBVHRaycast=t;let i=!1,n=null,s=null,r=null,a=null;function l(){i||(i=!0,import("./vendor-CJmyOrCq.min.js").then(v=>v.index$1).then(v=>{n=v.acceleratedRaycast,s=v.MeshBVH,r=v.StaticGeometryGenerator,a=v.computeBoundsTree}).catch(v=>{(ti||A())&&console.error("Failed to load BVH library...",v.message)}))}const c=new J;let h=!1,d=!1,p=null;const m=Symbol("Needle:MeshBVH-Worker"),g=Symbol("Needle:MeshBVH-CanUseWorker"),f=[],y=[];function b(){h=!0,d=!0,Promise.resolve().then(()=>mD).then(v=>{p=v.GenerateMeshBVHWorker}).catch(v=>{ti||A()?console.warn("Failed to setup mesh bvh worker"):console.debug("Failed to setup mesh bvh worker",v)}).finally(()=>{d=!1})}})(Bu||(Bu={}));const Xw=Symbol("gltf-loader-internal-usage-tracker"),eR=w("debugusers");class uc{get name(){return"NEEDLE_internal_usage_tracker"}static isLoading(e){return uc._loadingProcesses>0}static _loadingProcesses=0;parser;_getDependency;_loadingId;_loadedObjects=new Set;constructor(e){this.parser=e,this._getDependency=this.parser.getDependency,this._loadingId=Date.now().toString()}beforeRoot(){uc._loadingProcesses++;const e=this,t=this._getDependency;return this.parser.getDependency=function(i,n){const s=t.call(this,i,n);return s.then(r=>(r&&(e._loadedObjects.add(r),r[Xw]=e._loadingId),r)),s},null}afterRoot(e){uc._loadingProcesses--,this.parser.getDependency=this._getDependency;for(const t of this._loadedObjects)delete t[Xw],t instanceof M&&(t.parent||t instanceof H&&setTimeout(()=>{eR&&console.warn("> GLTF LOADER: Mesh not used in scene!",t),t.material=null,t.geometry=null},1e3));return null}}class Qw{constructor(){window.addEventListener("unhandledrejection",e=>{if(e.defaultPrevented)return;const t=e?.reason?.path;if(t){const i=t[0];i&&i.tagName==="IMG"&&(console.warn(`Could not load image:
|
|
891
|
-
`+i.src),e.preventDefault())}})}}const Fu=w("trackresources");function Yw(){return Fu==="dispose"}let Fr=!0;Fu===0&&(Fr=!1);function tR(o){Fr=o}function Zw(){return Fr}const Kw=Symbol("disposable");function Jw(o,e){o&&(o[Kw]=e,Ur&&console.warn("Set disposable",e,o))}const ex=Symbol("disposed");function iR(o){return o[ex]===!0}function Me(o){if(o){if(o[Kw]===!1){Ur&&console.warn("Object is marked as not disposable",o);return}if(typeof o=="object"&&(o[ex]=!0),o instanceof Ti)Me(o.environment),Me(o.background),Me(o.customDepthMaterial),Me(o.customDistanceMaterial);else if(o instanceof Ss)Me(o.geometry),Me(o.material),Me(o.skeleton),Me(o.bindMatrix),Me(o.bindMatrixInverse),Me(o.customDepthMaterial),Me(o.customDistanceMaterial),o.visible=!1;else if(o instanceof H)Me(o.geometry),Me(o.material),Me(o.customDepthMaterial),Me(o.customDistanceMaterial),o.visible=!1;else if(o instanceof M)o.visible=!1;else if(o instanceof Ji){cl(o);for(const e of Object.keys(o.attributes)){const t=o.attributes[e];Me(t)}}else if(o instanceof tt||o instanceof Vb)Ur&&console.warn("BufferAttribute dispose not supported",o.count);else if(o instanceof Array)for(const e of o)e instanceof we&&Me(e);else if(o instanceof we){cl(o);for(const t of Object.keys(o)){const i=o[t];i instanceof xe&&Me(i)}const e=o.uniforms;if(e)for(const t of Object.keys(e)){const i=e[t];i instanceof xe?Me(i):i instanceof Ki&&Me(i.value)}}else o instanceof xe?(cl(o),cl(o.source),o.source?.data instanceof ImageBitmap&&cl(o.source.data)):o instanceof VC?(cl(o.boneTexture),o.boneTexture=null):o instanceof $C||!(o instanceof M)&&Ur&&console.warn("Unknown object type",o)}}function cl(o){o&&((Ur||Yw()||Fu)&&console.warn("\u{1F9E8} FREE",o),o instanceof ImageBitmap||"dispose"in o&&typeof o.dispose=="function"&&o.dispose())}function nR(o){}const oR=new Set;function Wf(o,e,t=null,i){if(i||(i=oR,i.clear()),!o)return i;const n=o[qc];if(n)for(const s of n)i.has(s)||t?.call(null,s)!==!1&&(i.add(s),e&&Wf(s,!0,t,i));return i}function sR(o){return o[Xc]}const Ur=w("debugresourceusers")||w("debugmemory"),qc=Symbol("needle-resource-users"),Xc=Symbol("needle-resource-users-count");function ii(o,e){ou(o,e,function(t,i){Fr&&!dc.raycasting&&(Uu(qc,this,t,!1),Uu(qc,this,i,!0))})}Fr&&(ii(H.prototype,"material"),ii(H.prototype,"geometry"),ii(we.prototype,"map"),ii(we.prototype,"bumpMap"),ii(we.prototype,"alphaMap"),ii(we.prototype,"normalMap"),ii(we.prototype,"displacementMap"),ii(we.prototype,"roughnessMap"),ii(we.prototype,"metalnessMap"),ii(we.prototype,"emissiveMap"),ii(we.prototype,"specularMap"),ii(we.prototype,"envMap"),ii(we.prototype,"lightMap"),ii(we.prototype,"aoMap"),ii(we.prototype,"gradientMap"));function rR(o){if(Fr===!1)return;const e=o[qc];if(e)for(const t of e)Uu(qc,t,o,!1)}Fr&&ou(we.prototype,"dispose",function(){rR(this)});let Vf=0;function Uu(o,e,t,i){if(Vf>0)return;if(Array.isArray(t)){for(const s of t)Uu(o,e,s,i);return}if(!t)return;let n=t[o];if(n||(n=new Set),i){if(e&&!n.has(e)){n.add(e);let s=t[Xc]||0;s+=1,t[Xc]=s,Ur&&console.warn(`\u{1F7E2} Added user of "${t.type}"`,e,t,s,"users:",n)}}else if(e&&n.has(e)){n.delete(e);let s=t[Xc]||0;s>0&&(s-=1,t[Xc]=s),Ur&&console.warn(`\u{1F534} Removed user of "${t.type}"`,e,t,s,"users:",n),s<=0&&(uc.isLoading(t)||(Fu&&console.warn(`\u{1F534} Removed all user of "${t.type}"`,t),Yw()&&Me(t)))}t[o]=n}try{ou(wr.prototype,"render",function(){Vf++},function(){Vf--})}catch(o){console.warn("Could not wrap WebGLRenderer.render",o)}const Qc=Symbol("NEEDLE_NEED_UPDATE_INSTANCE"),tx=Symbol("isUsingInstancing"),ix=Symbol("instancingRenderer"),Yc=Symbol("instancingAutoUpdateBounds");class vn{static isUsingInstancing(e){return e[tx]===!0}static getRenderer(e){return e[ix]||null}setAutoUpdateBounds(e,t){const i=vn.getRenderer(e);i&&(i[Yc]=t)}static markDirty(e,t=!0){if(e&&(this.isUsingInstancing(e)&&(e[Qc]=!0,e.matrixWorldNeedsUpdate=!0),t))for(const i of e.children)vn.markDirty(i,!0)}}const zu=w("debuggetcomponent"),zr=w("debuginstantiate");class Xn{idProvider;parent;keepWorldPosition;position;rotation;scale;visible;context;components;clone(){const e=new Xn;return e.idProvider=this.idProvider,e.parent=this.parent,e.keepWorldPosition=this.keepWorldPosition,e.position=Array.isArray(this.position)?[...this.position]:this.position?.clone(),e.rotation=Array.isArray(this.rotation)?[...this.rotation]:this.rotation?.clone(),e.scale=Array.isArray(this.scale)?[...this.scale]:this.scale?.clone(),e.visible=this.visible,e.context=this.context,e.components=this.components,e}cloneAssign(e){this.idProvider=e.idProvider,this.parent=e.parent,this.keepWorldPosition=e.keepWorldPosition,this.position=Array.isArray(e.position)?[...e.position]:e.position?.clone(),this.rotation=Array.isArray(e.rotation)?[...e.rotation]:e.rotation?.clone(),this.scale=Array.isArray(e.scale)?[...e.scale]:e.scale?.clone(),this.visible=e.visible,this.context=e.context,this.components=e.components}}function hl(o){return o.visible}function Zc(o,e){return typeof e=="number"&&(e=e>.5),o.visible=e,o.visible}function nx(o){return o[Jn]||Nu(o)}function ox(o,e){o[tx]=e}function Nu(o){return vn.isUsingInstancing(o)}function $f(o,e){return Ua(o,e,!0,!0)}const sx=Symbol("isDestroyed");function Nr(o){return o[sx]}function rx(o,e){o[sx]=e}const Hf=Symbol("isDontDestroy");function dl(o,e=!0){o[Hf]=e}const Wu=[],Vu=[];function Ui(o,e=!0,t=!1){Wu.length=0,Vu.length=0,Gf(o,e,!0);for(const i of Wu)i.gameObject=null,i.context=null;for(const i of Vu)rx(i,!0),t&&Me(i);Vu.length=0,Wu.length=0}function Gf(o,e=!0,t=!0){if(o==null)return;const i=o;if(i.isComponent){if(i[Hf])return;Wu.push(i);const r=i.gameObject;i.__internalDisable?.(),i.__internalDestroy?.(),i.gameObject=r;return}if(o[Hf])return;const n=o;zu&&console.log(n),Vu.push(n);const s=n.userData?.components;if(s!=null&&Array.isArray(s)){let r=s.length;for(let a=0;a<s.length;a++){const l=s[a];Gf(l,e,!1),s.length<r&&(r=s.length,a--)}}if(e&&n.children)for(const r of n.children)Gf(r,e,!1);t&&n.removeFromParent()}function Wr(o,e,t=!0){return ax(o,e,t)}function*qf(o,e,t=!1,i=999,n=0){if(o?.userData.components&&!(n>i)){for(const s of o.userData.components)e&&s?.isComponent===!0&&s instanceof e?yield s:yield s;if(t===!0)for(const s of o.children)yield*qf(s,e,!0,i,n+1)}}function ax(o,e,t,i=0){if(o){if(o.isObject3D,i>1e3){console.warn("Failed to iterate components: too many levels");return}if(o.userData?.components)for(let n=0;n<o.userData.components.length;n++){const s=o.userData.components[n];if(s?.isComponent===!0){const r=e(s);if(r!==void 0)return r}}if(t&&o.children){const n=i+1;for(let s=0;s<o.children.length;s++){const r=o.children[s];if(!r)continue;const a=ax(r,e,t,n);if(a!==void 0)return a}}}}function Vr(o,e){if("isAssetReference"in o)return o.instantiate(e??void 0);let t=null;e!=null&&(e.x!==void 0?(t=new Xn,t.position=e):t=e);let i=U.Current;t?.context&&(i=t.context),zu&&i.alias&&console.log("context",i.alias),t&&!t.idProvider&&(t.idProvider=new kt(Date.now()));const n=[],s={},r={},a=lx(i,o,t,n,s,r);a&&(cR(a,s),lR(r,s)),zu&&(tu(o,!0),tu(a,!0));const l={};if(t?.components!==!1){for(const c in n){const h=n[c],d=h.guid;t&&t.idProvider&&(h.guid=t.idProvider.generateUUID(),l[d]=h.guid,zu&&console.log(h.name,h.guid)),ju(h,i),h.__internalNewInstanceCreated&&h.__internalNewInstanceCreated()}for(const c in n){const h=n[c];h.resolveGuids&&h.resolveGuids(l),h.enabled!==!1&&(h.enabled=!0)}au(i)}return a}function lx(o,e,t,i,n,s){if(!e||e[Fi])return null;const r=e.userData;e.userData={};const a=e.children;e.children=[];const l=e.clone(!1);if(Ou(l),e.userData=r,e.children=a,n[e.uuid]={original:e,clone:l},zr&&console.log("ADD",e,l),e.type==="SkinnedMesh"&&(s[e.uuid]={original:e,clone:l}),t?.visible!==void 0&&(l.visible=t.visible),t?.idProvider){l.uuid=t.idProvider.generateUUID();const h=l;h&&(h.guid=l.uuid)}e.animations&&e.animations.length>0&&(l.animations=[...e.animations]);const c=e.parent;if(c&&c.add(l),t?.position)if(Array.isArray(t.position)){const h=new _;h.fromArray(t.position),l.worldPosition=h}else l.worldPosition=t.position;else l.position.copy(e.position);if(t?.rotation){if(t.rotation instanceof N)l.worldQuaternion=t.rotation;else if(t.rotation instanceof ht)l.worldQuaternion=ui().setFromEuler(t.rotation);else if(Array.isArray(t.rotation)){const h=new ht;h.fromArray(t.rotation),l.worldQuaternion=ui().setFromEuler(h)}}else l.quaternion.copy(e.quaternion);if(t?.scale)if(Array.isArray(t.scale)){const h=new _;h.fromArray(t.scale),t.scale=h}else l.scale.copy(t.scale);else l.scale.copy(e.scale);if(t?.parent&&t.parent!=="scene"){let h=null;if(typeof t.parent=="string"?h=Ua(t.parent,o.scene,!0):h=t.parent,h){const d=t.keepWorldPosition===!0?h.attach:h.add;d?d.call(h,l):console.error("Invalid parent object",h,"received when instantiating:",e)}else console.warn("could not find parent:",t.parent)}for(const[h,d]of Object.entries(e.userData))h!=="components"&&(l.userData[h]=d);if(e.userData?.components){const h=e.userData.components,d=[];l.userData.components=d;for(let p=0;p<h.length;p++){const m=h[p],g=new m.constructor;aR(m,g),m[Rc]!==void 0&&(g[Rc]=m[Rc]),d.push(g),g.gameObject=l,i.push(g),n[m.guid]={original:m,clone:g},Pu.dispatchComponentLifecycleEvent("component-added",g)}}t&&(t.position=void 0,t.rotation=void 0,t.scale=void 0,t.parent=void 0,t.visible=void 0);for(const h in e.children){const d=e.children[h],p=lx(o,d,t,i,n,s);p&&(n[p.uuid]={original:d,clone:p},l.add(p))}return l}function aR(o,e,t){qa(e,o,void 0,{})}function lR(o,e){for(const t in o){const i=o[t],n=i.original,s=n.skeleton,r=i.clone;if(!s){console.warn("Skinned mesh has no skeleton?",i);continue}const a=s.bones,l=r.skeleton.clone();r.skeleton=l,r.bindMatrix.clone().copy(n.bindMatrix),r.bindMatrixInverse.copy(n.bindMatrixInverse);const c=[];l.bones=c;for(let h=0;h<a.length;h++){const d=a[h],p=e[d.uuid].clone;c.push(p)}}for(const t in o){const i=o[t].clone;i.skeleton.update(),i.bind(i.skeleton,i.bindMatrix),i.updateMatrixWorld(!0)}}function cR(o,e){for(const t in e){const i=e[t].clone;if(i?.isObject3D&&i?.userData?.components)for(let n=0;n<i.userData.components.length;n++){const s=i.userData.components[n],r=Object.entries(s);for(const[a,l]of r)if(Array.isArray(l)){const c=[];s[a]=c;for(let h=0;h<l.length;h++){const d=l[h];if(typeof d!="object"){c.push(d);continue}const p=cx(s,a,d,e);p!==void 0?(zr&&console.log("Found new instance for",a,d,"->",p),c.push(p)):(zr&&console.warn("Could not find new instance for",a,d),c.push(d))}}else if(typeof l=="object"){const c=cx(s,a,l,e);c!==void 0?s[a]=c:zr&&console.warn("Could not find new instance for",a,l)}}}}function cx(o,e,t,i){if(t!=null)if(t.isComponent===!0){const n=t.gameObject;if(n){const s=n.uuid,r=i[s]?.clone;if(!r){zr&&console.log("reference did not change",e,o,t);return}const a=n.userData.components.indexOf(t);if(a>=0&&r.isObject3D)return zr&&console.log(e,s),r.userData.components[a];console.warn("could not find component",e,t)}}else if(t.isObject3D===!0){if(e==="gameObject")return;const n=t;if(n){const s=n.uuid,r=i[s]?.clone;if(r)return zr&&console.log(e,"old",t,"new",r),r}}else{if(t.isVector4||t.isVector3||t.isVector2||t.isQuaternion||t.isEuler||t.isColor===!0)return t.clone();if(t.isEventList===!0)return t.__internalOnInstantiate(i)}}const Kc={},ul={register(o,e){Kc[o]=e},unregister(o){delete Kc[o]},list(){return Object.keys(Kc)},has(o){return o in Kc},async resolve(o){const e=Kc[o];return e?e(o):null}};ue.registerCallback(pe.ContextCreated,o=>{const e=o.context;fx(e),ux(e)});const $u=w("debugcomponents"),hx="eff8ba80-635d-11ec-90d6-0242ac120003";class kt{get seed(){return this._seed}set seed(e){this._seed=e}_originalSeed;_seed;constructor(e){typeof e=="string"&&(e=kt.hash(e)),this._originalSeed=e,this._seed=e}reset(){this._seed=this._originalSeed}generateUUID(e){if(typeof e=="string")return tg(e,hx);const t=this._seed;return this._seed-=1,tg(t.toString(),hx)}initialize(e){typeof e=="string"?this._seed=kt.hash(e):this._seed=e}static createFromString(e){return new kt(this.hash(e))}static hash(e){let t=0;for(let i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);return t}}var dx=(o=>(o.NewInstanceCreated="new-instance-created",o.InstanceDestroyed="instance-destroyed",o))(dx||{});class hR{guid;dontSave;constructor(e){this.guid=e}}function Jc(o,e,t=!0,i){if(!o)return;const n=o;if(Ui(o,t),!e){console.warn("Can not send destroy: No networking connection provided",o.guid);return}if(!e.isConnected){A()&&console.debug("Can not send destroy: not connected",o.guid);return}let s=o.guid;if(!s&&n.uuid&&(s=n.uuid),!s){console.warn("Can not send destroy: failed to find guid",o);return}Xf(s,e,i)}function Xf(o,e,t){const i=new hR(o);t?.saveInRoom===!1&&(i.dontSave=!0),e.send("instance-destroyed",i,Tn.Queued)}const Hu=[];function dR(o){return Hu.push(o),()=>{const e=Hu.indexOf(o);e>=0&&Hu.splice(e,1)}}function ux(o){o.connection.beginListen("instance-destroyed",e=>{$u&&console.log("[Remote] Destroyed",o.scene,e);const t=$f(e.guid,o.scene);if(t){for(const i of Hu)try{i(e.guid,t)}catch(n){console.error("Error in onSyncDestroy callback",n)}Ui(t)}})}class uR{filename;hash;size;constructor(e,t,i){this.filename=e,this.hash=t,this.size=i}}class px{guid;originalGuid;seed;visible;hostData;dontSave;parent;position;rotation;scale;preventCreation=void 0;deleteStateOnDisconnect;constructor(e,t){this.originalGuid=e,this.guid=t}}const Gu=[];function mx(o){return Gu.push(o),()=>{const e=Gu.indexOf(o);e>=0&&Gu.splice(e,1)}}function Qf(o,e,t,i){const n=o;if(!n.guid)if(n.name)n.guid=n.name;else return console.error("[syncInstantiate] Can not instantiate: a 'guid' is required. For runtime-created objects, either set a name (`obj.name = 'my-prefab'`) or a guid (`obj.guid = 'my-prefab-id'`). The identifier must be the same on all clients.",n),null;if(ul.has(n.guid)||ul.register(n.guid,async()=>n),e.context||(e.context=U.Current),!e.context)return console.error("[syncInstantiate] Missing network instantiate options / reference to network connection in sync instantiate. Please pass in the Needle Engine context."),null;const s=e?{...e}:null,{instance:r,seed:a}=pR(n,e);if(r){const l=r;if(l.guid){$u&&console.log("[Local] new instance","gameobject:",r?.guid);const c=new px(n.guid,l.guid);c.seed=a,e.deleteOnDisconnect===!0&&(c.deleteStateOnDisconnect=!0),s&&(s.position&&(Array.isArray(s.position)?c.position={x:s.position[0],y:s.position[1],z:s.position[2]}:c.position={x:s.position.x,y:s.position.y,z:s.position.z}),s.rotation&&(s.rotation instanceof ht?s.rotation=new N().setFromEuler(s.rotation):s.rotation instanceof Array&&(s.rotation=new N().fromArray(s.rotation)),c.rotation={x:s.rotation.x,y:s.rotation.y,z:s.rotation.z,w:s.rotation.w}),s.scale&&(Array.isArray(s.scale)?c.scale={x:s.scale[0],y:s.scale[1],z:s.scale[2]}:c.scale={x:s.scale.x,y:s.scale.y,z:s.scale.z})),c.position||(c.position={x:l.position.x,y:l.position.y,z:l.position.z}),c.rotation||(c.rotation={x:l.quaternion.x,y:l.quaternion.y,z:l.quaternion.z,w:l.quaternion.w}),c.scale||(c.scale={x:l.scale.x,y:l.scale.y,z:l.scale.z}),c.visible=n.visible,s?.parent&&(typeof s.parent=="string"?c.parent=s.parent:s.parent?.guid?c.parent=s.parent.guid:s.parent instanceof Ti?c.parent="scene":console.warn("Unsupported parent type in sync instantiate options: "+s.parent?.name)),c.hostData=t,i===!1&&(c.dontSave=!0),!e?.context?.connection&&A()&&console.debug("Object will be instantiated but it will not be synced: not connected",n.guid),e.context.connection.isInRoom&&pl.push(new WeakRef(l)),e?.context?.connection.send("new-instance-created",c)}else console.warn("Missing guid, can not send new instance event",l)}return r}function gx(){return Math.random()*9999999}const pl=new Array;function fx(o){const e=o.connection.beginListen("new-instance-created",async i=>{const n=await gR(i.originalGuid,o.scene);if(i.preventCreation===!0)return;if(!n){console.warn("could not find object that was instantiated: "+i.guid);return}const s=new Xn;i.position&&(s.position=new _(i.position.x,i.position.y,i.position.z)),i.rotation&&(s.rotation=new N(i.rotation.x,i.rotation.y,i.rotation.z,i.rotation.w)),i.scale&&(s.scale=new _(i.scale.x,i.scale.y,i.scale.z)),s.parent=i.parent,i.seed&&(s.idProvider=new kt(i.seed)),s.visible=i.visible,s.context=o,$u&&o.alias&&console.log("[Remote] instantiate in: "+o.alias);const r=Vr(n,s);if(pl.push(new WeakRef(r)),r){i.parent==="scene"&&o.scene.add(r),$u&&console.log("[Remote] new instance","gameobject:",r?.guid,n);for(const a of Gu)try{a(r,i,o)}catch(l){console.error("Error in onSyncInstantiate callback",l)}}}),t=o.connection.beginListen("left-room",()=>{pl.length>0&&console.debug(`Left networking room, cleaning up ${pl.length} instantiated objects`);for(const i of pl){const n=i.deref();n&&n.destroy()}pl.length=0});return()=>{o.connection.stopListen("new-instance-created",e),o.connection.stopListen("left-room",t)}}function pR(o,e){const t=gx(),i=e??new Xn;i.idProvider=new kt(t);const n=Vr(o,i);return{seed:t,instance:n}}function yx(o,e){ul.register(o,e)}function mR(o){ul.unregister(o)}async function gR(o,e){return await ul.resolve(o)||bx(o,e)}function bx(o,e){if(e===null||!o)return null;if(e.guid===o)return e;if(e.children)for(const t of e.children){const i=bx(o,t);if(i)return i}return null}class fR{_context;get context(){return this._context??U.Current}get isStateMachineBehaviour(){return!0}}class eh{name;nameHash;normalizedTime;length;speed;action;hasTransitions;constructor(e,t,i,n){this.name=e.name,this.nameHash=e.hash,this.normalizedTime=t,this.length=i,this.speed=n,this.action=e.motion.action||null,this.hasTransitions=e.transitions?.length>0||!1}}function _x(o,e){return{name:"Empty",isLooping:!1,guid:e?.generateUUID()??Lo.generateUUID(),index:-1,clip:new Ai(o,0,[])}}var _i=(o=>(o[o.If=1]="If",o[o.IfNot=2]="IfNot",o[o.Greater=3]="Greater",o[o.Less=4]="Less",o[o.Equals=6]="Equals",o[o.NotEqual=7]="NotEqual",o))(_i||{}),$r=(o=>(o[o.Float=1]="Float",o[o.Int=3]="Int",o[o.Bool=4]="Bool",o[o.Trigger=9]="Trigger",o))($r||{});const dt=w("debuganimatorcontroller"),qu=w("debugrootmotion");function yR(o){switch(o){case"if":return _i.If;case"ifNot":return _i.IfNot;case"greater":return _i.Greater;case"less":return _i.Less;case"equals":return _i.Equals;case"notEqual":return _i.NotEqual}}class Yf{_name;_parameters=[];_states=[];_anyStateTransitions=[];_defaultStateName=null;_lastTransition=null;constructor(e){this._name=e??"AnimatorController"}floatParameter(e,t=0){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Float,value:t}),this}intParameter(e,t=0){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Int,value:t}),this}boolParameter(e,t=!1){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Bool,value:t}),this}triggerParameter(e){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Trigger,value:!1}),this}state(e,t){return this._states.push({name:e,options:t,transitions:[]}),this}transition(e,t,i){const n={to:t,options:i??{},conditions:[]};if(e==="*")this._anyStateTransitions.push(n);else{const s=this._states.find(r=>r.name===e);if(!s)throw new Error(`AnimatorControllerBuilder: source state "${e}" not found. Add it with .state() first.`);s.transitions.push(n)}return this._lastTransition=n,this}condition(e,t,i=0){if(!this._lastTransition)throw new Error("AnimatorControllerBuilder: .condition() must be called after .transition()");return this._lastTransition.conditions.push({parameter:e,mode:t,threshold:i}),this}defaultState(e){return this._defaultStateName=e,this}build(){const e=new Map;this._states.forEach((r,a)=>e.set(r.name,a));let t=0;if(this._defaultStateName!==null){const r=e.get(this._defaultStateName);if(r===void 0)throw new Error(`AnimatorControllerBuilder: default state "${this._defaultStateName}" not found`);t=r}const i=r=>{const a=e.get(r.to);if(a===void 0)throw new Error(`AnimatorControllerBuilder: transition target "${r.to}" not found`);return{exitTime:r.options.exitTime??1,hasExitTime:r.options.hasExitTime??!1,duration:r.options.duration??0,offset:r.options.offset??0,hasFixedDuration:r.options.hasFixedDuration??!1,destinationState:a,conditions:r.conditions.map(l=>({parameter:l.parameter,mode:yR(l.mode),threshold:l.threshold}))}},n=this._states.map((r,a)=>{const l=r.transitions.map(i);for(const c of this._anyStateTransitions)e.get(c.to)!==a&&l.push(i(c));return{name:r.name,hash:a,motion:{name:r.options.clip.name,clip:r.options.clip,isLooping:r.options.loop??!1},transitions:l,behaviours:[],speed:r.options.speed,speedParameter:r.options.speedParameter,cycleOffset:r.options.cycleOffset,cycleOffsetParameter:r.options.cycleOffsetParameter}}),s={name:this._name,guid:new kt(Date.now()).generateUUID(),parameters:this._parameters,layers:[{name:"Base Layer",stateMachine:{defaultState:t,states:n}}]};return new Zi(s)}}class Zi{static createFromClips(e,t={looping:!1,autoTransition:!0,transitionDuration:0}){const i=[];for(let s=0;s<e.length;s++){const r=e[s],a=[];if(t.autoTransition!==!1){const c=t.transitionDuration??0,h=c/r.duration;let d=s;(t.autoTransition===void 0||t.autoTransition===!0)&&(d=(s+1)%e.length),a.push({exitTime:1-h,offset:0,duration:c,hasExitTime:!0,destinationState:d,conditions:[]})}const l={name:r.name,hash:s,motion:{name:r.name,clip:r,isLooping:t?.looping??!1},transitions:a,behaviours:[]};i.push(l)}const n={name:"AnimatorController",guid:new kt(Date.now()).generateUUID(),parameters:[],layers:[{name:"Base Layer",stateMachine:{defaultState:0,states:i}}]};return new Zi(n)}static build(e){return new Yf(e)}play(e,t=-1,i=Number.NEGATIVE_INFINITY,n=0){if(t<0)t=0;else if(t>=this.model.layers.length){console.warn("invalid layer");return}const s=this.model.layers[t].stateMachine;for(const r of s.states)if(r.name===e||r.hash===e){dt&&console.log("transition to ",r),this.transitionTo(r,n,i);return}console.warn("Could not find "+e+" to play")}reset(){this.setStartTransition()}setBool(e,t){const i=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(n=>n[i]===e).forEach(n=>n.value=t)}getBool(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??!1}setFloat(e,t){const i=typeof e=="string"?"name":"hash",n=this.model?.parameters?.filter(s=>s[i]===e);return n.forEach(s=>s.value=t),n?.length>0}getFloat(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??0}setInteger(e,t){const i=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(n=>n[i]===e).forEach(n=>n.value=t)}getInteger(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??0}setTrigger(e){dt&&console.log("SET TRIGGER",e);const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(i=>i[t]===e).forEach(i=>i.value=!0)}resetTrigger(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(i=>i[t]===e).forEach(i=>i.value=!1)}getTrigger(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??!1}isInTransition(){return this._activeStates.length>1}setSpeed(e){this._speed=e}_speed=1;FindState(e){return this.findState(e)}findState(e){if(!e)return null;if(Array.isArray(this.model.layers)){for(const t of this.model.layers)for(const i of t.stateMachine.states)if(i.name===e||i.hash==e)return i}return null}getCurrentStateInfo(){if(!this._activeState)return null;const e=this._activeState.motion.action;if(!e)return null;const t=this._activeState.motion.clip.duration,i=t<=0?0:Math.abs(e.time/t);return new eh(this._activeState,i,t,this._speed)}get currentAction(){return this._activeState&&this._activeState.motion.action||null}normalizedStartOffset=0;animator;model;get context(){return this.animator?.context}get mixer(){return this._mixer}dispose(){if(this._mixer.stopAllAction(),this.animator){this._mixer.uncacheRoot(this.animator.gameObject);for(const e of this._activeStates)e.motion.clip&&this.mixer.uncacheAction(e.motion.clip,this.animator.gameObject)}this.context?.animations.unregisterAnimationMixer(this._mixer)}bind(e){e?this.animator!==e&&(this._mixer&&(this._mixer.stopAllAction(),this.context?.animations.unregisterAnimationMixer(this._mixer)),this.animator=e,this._mixer=new Gm(this.animator.gameObject),this.context?.animations.registerAnimationMixer(this._mixer),this.createActions(this.animator)):console.error("AnimatorController.bind: animator is null")}clone(){if(typeof this.model=="string")return console.warn("AnimatorController has not been resolved, can not create model from string",this.model),null;dt&&console.warn("AnimatorController clone()",this.model);const e=wc(this.model,(t,i,n)=>n==null?!0:!(n.type==="Object3D"||n.isObject3D===!0||V_(n)||n.tracks!==void 0||n instanceof Zi));return console.assert(e!==this.model),new Zi(e)}update(e){if(!this.animator)return;this.evaluateTransitions(),this.updateActiveStates(e);const t=this.animator.context.time.deltaTime;this.animator.applyRootMotion&&this.rootMotionHandler?.onBeforeUpdate(e),this._mixer.update(t),this.animator.applyRootMotion&&this.rootMotionHandler?.onAfterUpdate(e)}_mixer;_activeState;get activeState(){return this._activeState}constructor(e){this.model=e,dt&&console.log(this)}_activeStates=[];updateActiveStates(e){for(let t=0;t<this._activeStates.length;t++){const i=this._activeStates[t],n=i.motion;if(!n.action)this._activeStates.splice(t,1),t--;else{const s=n.action;s.weight=e,s.getEffectiveWeight()<=0&&!s.isRunning()&&(dt&&console.debug("REMOVE",i.name,s.getEffectiveWeight(),s.isRunning(),s.isScheduled()),this._activeStates.splice(t,1),t--)}}}setStartTransition(){this.model.layers.length>1&&(dt||A())&&console.warn("Multiple layers are not supported yet "+this.animator?.name);for(const e of this.model.layers){const t=e.stateMachine;t.defaultState===void 0&&(dt&&console.warn("AnimatorController default state is undefined, will assign state 0 as default",e),t.defaultState=0);const i=t.states[t.defaultState];this.transitionTo(i,0,this.normalizedStartOffset);break}}evaluateTransitions(){let e=!1;if(!this._activeState){if(this.setStartTransition(),!this._activeState)return;e=!0}const t=this._activeState,i=t.motion.action;for(const s of t.transitions){if(!s.hasExitTime&&s.conditions.length<=0)continue;let r=!0;for(const a of s.conditions)if(!this.evaluateCondition(a)){r=!1;break}if(r)if(i){const a=t.motion.clip.duration,l=a<=0?1:Math.abs(i.time/a);let c=s.exitTime;i.timeScale<0&&(c=1-c);let h=!1;if(s.hasExitTime?i.timeScale>0?h=l>=s.exitTime:i.timeScale<0&&(h=1-l>=s.exitTime):h=!0,h){for(const d of s.conditions){const p=this.model.parameters.find(m=>m.name===d.parameter);p?.type===$r.Trigger&&p.value&&(p.value=!1)}if(i.clampWhenFinished=!0,dt){const d=this.getState(s.destinationState,0);console.log(`Transition to ${s.destinationState} / ${d?.name}`,s,`
|
|
891
|
+
`+i.src),e.preventDefault())}})}}const Fu=w("trackresources");function Yw(){return Fu==="dispose"}let Fr=!0;Fu===0&&(Fr=!1);function tR(o){Fr=o}function Zw(){return Fr}const Kw=Symbol("disposable");function Jw(o,e){o&&(o[Kw]=e,Ur&&console.warn("Set disposable",e,o))}const ex=Symbol("disposed");function iR(o){return o[ex]===!0}function Me(o){if(o){if(o[Kw]===!1){Ur&&console.warn("Object is marked as not disposable",o);return}if(typeof o=="object"&&(o[ex]=!0),o instanceof Ti)Me(o.environment),Me(o.background),Me(o.customDepthMaterial),Me(o.customDistanceMaterial);else if(o instanceof Ss)Me(o.geometry),Me(o.material),Me(o.skeleton),Me(o.bindMatrix),Me(o.bindMatrixInverse),Me(o.customDepthMaterial),Me(o.customDistanceMaterial),o.visible=!1;else if(o instanceof H)Me(o.geometry),Me(o.material),Me(o.customDepthMaterial),Me(o.customDistanceMaterial),o.visible=!1;else if(o instanceof M)o.visible=!1;else if(o instanceof Ji){cl(o);for(const e of Object.keys(o.attributes)){const t=o.attributes[e];Me(t)}}else if(o instanceof tt||o instanceof Vb)Ur&&console.warn("BufferAttribute dispose not supported",o.count);else if(o instanceof Array)for(const e of o)e instanceof we&&Me(e);else if(o instanceof we){cl(o);for(const t of Object.keys(o)){const i=o[t];i instanceof xe&&Me(i)}const e=o.uniforms;if(e)for(const t of Object.keys(e)){const i=e[t];i instanceof xe?Me(i):i instanceof Ki&&Me(i.value)}}else o instanceof xe?(cl(o),cl(o.source),o.source?.data instanceof ImageBitmap&&cl(o.source.data)):o instanceof VC?(cl(o.boneTexture),o.boneTexture=null):o instanceof $C||!(o instanceof M)&&Ur&&console.warn("Unknown object type",o)}}function cl(o){o&&((Ur||Yw()||Fu)&&console.warn("\u{1F9E8} FREE",o),o instanceof ImageBitmap||"dispose"in o&&typeof o.dispose=="function"&&o.dispose())}function nR(o){}const oR=new Set;function Wf(o,e,t=null,i){if(i||(i=oR,i.clear()),!o)return i;const n=o[qc];if(n)for(const s of n)i.has(s)||t?.call(null,s)!==!1&&(i.add(s),e&&Wf(s,!0,t,i));return i}function sR(o){return o[Xc]}const Ur=w("debugresourceusers")||w("debugmemory"),qc=Symbol("needle-resource-users"),Xc=Symbol("needle-resource-users-count");function ii(o,e){ou(o,e,function(t,i){Fr&&!dc.raycasting&&(Uu(qc,this,t,!1),Uu(qc,this,i,!0))})}Fr&&(ii(H.prototype,"material"),ii(H.prototype,"geometry"),ii(we.prototype,"map"),ii(we.prototype,"bumpMap"),ii(we.prototype,"alphaMap"),ii(we.prototype,"normalMap"),ii(we.prototype,"displacementMap"),ii(we.prototype,"roughnessMap"),ii(we.prototype,"metalnessMap"),ii(we.prototype,"emissiveMap"),ii(we.prototype,"specularMap"),ii(we.prototype,"envMap"),ii(we.prototype,"lightMap"),ii(we.prototype,"aoMap"),ii(we.prototype,"gradientMap"));function rR(o){if(Fr===!1)return;const e=o[qc];if(e)for(const t of e)Uu(qc,t,o,!1)}Fr&&ou(we.prototype,"dispose",function(){rR(this)});let Vf=0;function Uu(o,e,t,i){if(Vf>0)return;if(Array.isArray(t)){for(const s of t)Uu(o,e,s,i);return}if(!t)return;let n=t[o];if(n||(n=new Set),i){if(e&&!n.has(e)){n.add(e);let s=t[Xc]||0;s+=1,t[Xc]=s,Ur&&console.warn(`\u{1F7E2} Added user of "${t.type}"`,e,t,s,"users:",n)}}else if(e&&n.has(e)){n.delete(e);let s=t[Xc]||0;s>0&&(s-=1,t[Xc]=s),Ur&&console.warn(`\u{1F534} Removed user of "${t.type}"`,e,t,s,"users:",n),s<=0&&(uc.isLoading(t)||(Fu&&console.warn(`\u{1F534} Removed all user of "${t.type}"`,t),Yw()&&Me(t)))}t[o]=n}try{ou(wr.prototype,"render",function(){Vf++},function(){Vf--})}catch(o){console.warn("Could not wrap WebGLRenderer.render",o)}const Qc=Symbol("NEEDLE_NEED_UPDATE_INSTANCE"),tx=Symbol("isUsingInstancing"),ix=Symbol("instancingRenderer"),Yc=Symbol("instancingAutoUpdateBounds");class vn{static isUsingInstancing(e){return e[tx]===!0}static getRenderer(e){return e[ix]||null}setAutoUpdateBounds(e,t){const i=vn.getRenderer(e);i&&(i[Yc]=t)}static markDirty(e,t=!0){if(e&&(this.isUsingInstancing(e)&&(e[Qc]=!0,e.matrixWorldNeedsUpdate=!0),t))for(const i of e.children)vn.markDirty(i,!0)}}const zu=w("debuggetcomponent"),zr=w("debuginstantiate");class Xn{idProvider;parent;keepWorldPosition;position;rotation;scale;visible;context;components;clone(){const e=new Xn;return e.idProvider=this.idProvider,e.parent=this.parent,e.keepWorldPosition=this.keepWorldPosition,e.position=Array.isArray(this.position)?[...this.position]:this.position?.clone(),e.rotation=Array.isArray(this.rotation)?[...this.rotation]:this.rotation?.clone(),e.scale=Array.isArray(this.scale)?[...this.scale]:this.scale?.clone(),e.visible=this.visible,e.context=this.context,e.components=this.components,e}cloneAssign(e){this.idProvider=e.idProvider,this.parent=e.parent,this.keepWorldPosition=e.keepWorldPosition,this.position=Array.isArray(e.position)?[...e.position]:e.position?.clone(),this.rotation=Array.isArray(e.rotation)?[...e.rotation]:e.rotation?.clone(),this.scale=Array.isArray(e.scale)?[...e.scale]:e.scale?.clone(),this.visible=e.visible,this.context=e.context,this.components=e.components}}function hl(o){return o.visible}function Zc(o,e){return typeof e=="number"&&(e=e>.5),o.visible=e,o.visible}function nx(o){return o[Jn]||Nu(o)}function ox(o,e){o[tx]=e}function Nu(o){return vn.isUsingInstancing(o)}function $f(o,e){return Ua(o,e,!0,!0)}const sx=Symbol("isDestroyed");function Nr(o){return o[sx]}function rx(o,e){o[sx]=e}const Hf=Symbol("isDontDestroy");function dl(o,e=!0){o[Hf]=e}const Wu=[],Vu=[];function Ui(o,e=!0,t=!1){Wu.length=0,Vu.length=0,Gf(o,e,!0);for(const i of Wu)i.gameObject=null,i.context=null;for(const i of Vu)rx(i,!0),t&&Me(i);Vu.length=0,Wu.length=0}function Gf(o,e=!0,t=!0){if(o==null)return;const i=o;if(i.isComponent){if(i[Hf])return;Wu.push(i);const r=i.gameObject;i.__internalDisable(),i.__internalDestroy(),i.gameObject=r;return}if(o[Hf])return;const n=o;zu&&console.log(n),Vu.push(n);const s=n.userData?.components;if(s!=null&&Array.isArray(s)){let r=s.length;for(let a=0;a<s.length;a++){const l=s[a];Gf(l,e,!1),s.length<r&&(r=s.length,a--)}}if(e&&n.children)for(const r of n.children)Gf(r,e,!1);t&&n.removeFromParent()}function Wr(o,e,t=!0){return ax(o,e,t)}function*qf(o,e,t=!1,i=999,n=0){if(o?.userData.components&&!(n>i)){for(const s of o.userData.components)e&&s?.isComponent===!0&&s instanceof e?yield s:yield s;if(t===!0)for(const s of o.children)yield*qf(s,e,!0,i,n+1)}}function ax(o,e,t,i=0){if(o){if(o.isObject3D,i>1e3){console.warn("Failed to iterate components: too many levels");return}if(o.userData?.components)for(let n=0;n<o.userData.components.length;n++){const s=o.userData.components[n];if(s?.isComponent===!0){const r=e(s);if(r!==void 0)return r}}if(t&&o.children){const n=i+1;for(let s=0;s<o.children.length;s++){const r=o.children[s];if(!r)continue;const a=ax(r,e,t,n);if(a!==void 0)return a}}}}function Vr(o,e){if("isAssetReference"in o)return o.instantiate(e??void 0);let t=null;e!=null&&(e.x!==void 0?(t=new Xn,t.position=e):t=e);let i=U.Current;t?.context&&(i=t.context),zu&&i.alias&&console.log("context",i.alias),t&&!t.idProvider&&(t.idProvider=new kt(Date.now()));const n=[],s={},r={},a=lx(i,o,t,n,s,r);a&&(cR(a,s),lR(r,s)),zu&&(tu(o,!0),tu(a,!0));const l={};if(t?.components!==!1){for(const c in n){const h=n[c],d=h.guid;t&&t.idProvider&&(h.guid=t.idProvider.generateUUID(),l[d]=h.guid,zu&&console.log(h.name,h.guid)),ju(h,i),h.__internalNewInstanceCreated&&h.__internalNewInstanceCreated()}for(const c in n){const h=n[c];h.resolveGuids&&h.resolveGuids(l),h.enabled!==!1&&(h.enabled=!0)}au(i)}return a}function lx(o,e,t,i,n,s){if(!e||e[Fi])return null;const r=e.userData;e.userData={};const a=e.children;e.children=[];const l=e.clone(!1);if(Ou(l),e.userData=r,e.children=a,n[e.uuid]={original:e,clone:l},zr&&console.log("ADD",e,l),e.type==="SkinnedMesh"&&(s[e.uuid]={original:e,clone:l}),t?.visible!==void 0&&(l.visible=t.visible),t?.idProvider){l.uuid=t.idProvider.generateUUID();const h=l;h&&(h.guid=l.uuid)}e.animations&&e.animations.length>0&&(l.animations=[...e.animations]);const c=e.parent;if(c&&c.add(l),t?.position)if(Array.isArray(t.position)){const h=new _;h.fromArray(t.position),l.worldPosition=h}else l.worldPosition=t.position;else l.position.copy(e.position);if(t?.rotation){if(t.rotation instanceof N)l.worldQuaternion=t.rotation;else if(t.rotation instanceof ht)l.worldQuaternion=ui().setFromEuler(t.rotation);else if(Array.isArray(t.rotation)){const h=new ht;h.fromArray(t.rotation),l.worldQuaternion=ui().setFromEuler(h)}}else l.quaternion.copy(e.quaternion);if(t?.scale)if(Array.isArray(t.scale)){const h=new _;h.fromArray(t.scale),t.scale=h}else l.scale.copy(t.scale);else l.scale.copy(e.scale);if(t?.parent&&t.parent!=="scene"){let h=null;if(typeof t.parent=="string"?h=Ua(t.parent,o.scene,!0):h=t.parent,h){const d=t.keepWorldPosition===!0?h.attach:h.add;d?d.call(h,l):console.error("Invalid parent object",h,"received when instantiating:",e)}else console.warn("could not find parent:",t.parent)}for(const[h,d]of Object.entries(e.userData))h!=="components"&&(l.userData[h]=d);if(e.userData?.components){const h=e.userData.components,d=[];l.userData.components=d;for(let p=0;p<h.length;p++){const m=h[p],g=new m.constructor;aR(m,g),m[Rc]!==void 0&&(g[Rc]=m[Rc]),d.push(g),g.gameObject=l,i.push(g),n[m.guid]={original:m,clone:g},Pu.dispatchComponentLifecycleEvent("component-added",g)}}t&&(t.position=void 0,t.rotation=void 0,t.scale=void 0,t.parent=void 0,t.visible=void 0);for(const h in e.children){const d=e.children[h],p=lx(o,d,t,i,n,s);p&&(n[p.uuid]={original:d,clone:p},l.add(p))}return l}function aR(o,e,t){qa(e,o,void 0,{})}function lR(o,e){for(const t in o){const i=o[t],n=i.original,s=n.skeleton,r=i.clone;if(!s){console.warn("Skinned mesh has no skeleton?",i);continue}const a=s.bones,l=r.skeleton.clone();r.skeleton=l,r.bindMatrix.clone().copy(n.bindMatrix),r.bindMatrixInverse.copy(n.bindMatrixInverse);const c=[];l.bones=c;for(let h=0;h<a.length;h++){const d=a[h],p=e[d.uuid].clone;c.push(p)}}for(const t in o){const i=o[t].clone;i.skeleton.update(),i.bind(i.skeleton,i.bindMatrix),i.updateMatrixWorld(!0)}}function cR(o,e){for(const t in e){const i=e[t].clone;if(i?.isObject3D&&i?.userData?.components)for(let n=0;n<i.userData.components.length;n++){const s=i.userData.components[n],r=Object.entries(s);for(const[a,l]of r)if(Array.isArray(l)){const c=[];s[a]=c;for(let h=0;h<l.length;h++){const d=l[h];if(typeof d!="object"){c.push(d);continue}const p=cx(s,a,d,e);p!==void 0?(zr&&console.log("Found new instance for",a,d,"->",p),c.push(p)):(zr&&console.warn("Could not find new instance for",a,d),c.push(d))}}else if(typeof l=="object"){const c=cx(s,a,l,e);c!==void 0?s[a]=c:zr&&console.warn("Could not find new instance for",a,l)}}}}function cx(o,e,t,i){if(t!=null)if(t.isComponent===!0){const n=t.gameObject;if(n){const s=n.uuid,r=i[s]?.clone;if(!r){zr&&console.log("reference did not change",e,o,t);return}const a=n.userData.components.indexOf(t);if(a>=0&&r.isObject3D)return zr&&console.log(e,s),r.userData.components[a];console.warn("could not find component",e,t)}}else if(t.isObject3D===!0){if(e==="gameObject")return;const n=t;if(n){const s=n.uuid,r=i[s]?.clone;if(r)return zr&&console.log(e,"old",t,"new",r),r}}else{if(t.isVector4||t.isVector3||t.isVector2||t.isQuaternion||t.isEuler||t.isColor===!0)return t.clone();if(t.isEventList===!0)return t.__internalOnInstantiate(i)}}const Kc={},ul={register(o,e){Kc[o]=e},unregister(o){delete Kc[o]},list(){return Object.keys(Kc)},has(o){return o in Kc},async resolve(o){const e=Kc[o];return e?e(o):null}};ue.registerCallback(pe.ContextCreated,o=>{const e=o.context;fx(e),ux(e)});const $u=w("debugcomponents"),hx="eff8ba80-635d-11ec-90d6-0242ac120003";class kt{get seed(){return this._seed}set seed(e){this._seed=e}_originalSeed;_seed;constructor(e){typeof e=="string"&&(e=kt.hash(e)),this._originalSeed=e,this._seed=e}reset(){this._seed=this._originalSeed}generateUUID(e){if(typeof e=="string")return tg(e,hx);const t=this._seed;return this._seed-=1,tg(t.toString(),hx)}initialize(e){typeof e=="string"?this._seed=kt.hash(e):this._seed=e}static createFromString(e){return new kt(this.hash(e))}static hash(e){let t=0;for(let i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);return t}}var dx=(o=>(o.NewInstanceCreated="new-instance-created",o.InstanceDestroyed="instance-destroyed",o))(dx||{});class hR{guid;dontSave;constructor(e){this.guid=e}}function Jc(o,e,t=!0,i){if(!o)return;const n=o;if(Ui(o,t),!e){console.warn("Can not send destroy: No networking connection provided",o.guid);return}if(!e.isConnected){A()&&console.debug("Can not send destroy: not connected",o.guid);return}let s=o.guid;if(!s&&n.uuid&&(s=n.uuid),!s){console.warn("Can not send destroy: failed to find guid",o);return}Xf(s,e,i)}function Xf(o,e,t){const i=new hR(o);t?.saveInRoom===!1&&(i.dontSave=!0),e.send("instance-destroyed",i,Tn.Queued)}const Hu=[];function dR(o){return Hu.push(o),()=>{const e=Hu.indexOf(o);e>=0&&Hu.splice(e,1)}}function ux(o){o.connection.beginListen("instance-destroyed",e=>{$u&&console.log("[Remote] Destroyed",o.scene,e);const t=$f(e.guid,o.scene);if(t){for(const i of Hu)try{i(e.guid,t)}catch(n){console.error("Error in onSyncDestroy callback",n)}Ui(t)}})}class uR{filename;hash;size;constructor(e,t,i){this.filename=e,this.hash=t,this.size=i}}class px{guid;originalGuid;seed;visible;hostData;dontSave;parent;position;rotation;scale;preventCreation=void 0;deleteStateOnDisconnect;constructor(e,t){this.originalGuid=e,this.guid=t}}const Gu=[];function mx(o){return Gu.push(o),()=>{const e=Gu.indexOf(o);e>=0&&Gu.splice(e,1)}}function Qf(o,e,t,i){const n=o;if(!n.guid)if(n.name)n.guid=n.name;else return console.error("[syncInstantiate] Can not instantiate: a 'guid' is required. For runtime-created objects, either set a name (`obj.name = 'my-prefab'`) or a guid (`obj.guid = 'my-prefab-id'`). The identifier must be the same on all clients.",n),null;if(ul.has(n.guid)||ul.register(n.guid,async()=>n),e.context||(e.context=U.Current),!e.context)return console.error("[syncInstantiate] Missing network instantiate options / reference to network connection in sync instantiate. Please pass in the Needle Engine context."),null;const s=e?{...e}:null,{instance:r,seed:a}=pR(n,e);if(r){const l=r;if(l.guid){$u&&console.log("[Local] new instance","gameobject:",r?.guid);const c=new px(n.guid,l.guid);c.seed=a,e.deleteOnDisconnect===!0&&(c.deleteStateOnDisconnect=!0),s&&(s.position&&(Array.isArray(s.position)?c.position={x:s.position[0],y:s.position[1],z:s.position[2]}:c.position={x:s.position.x,y:s.position.y,z:s.position.z}),s.rotation&&(s.rotation instanceof ht?s.rotation=new N().setFromEuler(s.rotation):s.rotation instanceof Array&&(s.rotation=new N().fromArray(s.rotation)),c.rotation={x:s.rotation.x,y:s.rotation.y,z:s.rotation.z,w:s.rotation.w}),s.scale&&(Array.isArray(s.scale)?c.scale={x:s.scale[0],y:s.scale[1],z:s.scale[2]}:c.scale={x:s.scale.x,y:s.scale.y,z:s.scale.z})),c.position||(c.position={x:l.position.x,y:l.position.y,z:l.position.z}),c.rotation||(c.rotation={x:l.quaternion.x,y:l.quaternion.y,z:l.quaternion.z,w:l.quaternion.w}),c.scale||(c.scale={x:l.scale.x,y:l.scale.y,z:l.scale.z}),c.visible=n.visible,s?.parent&&(typeof s.parent=="string"?c.parent=s.parent:s.parent?.guid?c.parent=s.parent.guid:s.parent instanceof Ti?c.parent="scene":console.warn("Unsupported parent type in sync instantiate options: "+s.parent?.name)),c.hostData=t,i===!1&&(c.dontSave=!0),!e?.context?.connection&&A()&&console.debug("Object will be instantiated but it will not be synced: not connected",n.guid),e.context.connection.isInRoom&&pl.push(new WeakRef(l)),e?.context?.connection.send("new-instance-created",c)}else console.warn("Missing guid, can not send new instance event",l)}return r}function gx(){return Math.random()*9999999}const pl=new Array;function fx(o){const e=o.connection.beginListen("new-instance-created",async i=>{const n=await gR(i.originalGuid,o.scene);if(i.preventCreation===!0)return;if(!n){console.warn("could not find object that was instantiated: "+i.guid);return}const s=new Xn;i.position&&(s.position=new _(i.position.x,i.position.y,i.position.z)),i.rotation&&(s.rotation=new N(i.rotation.x,i.rotation.y,i.rotation.z,i.rotation.w)),i.scale&&(s.scale=new _(i.scale.x,i.scale.y,i.scale.z)),s.parent=i.parent,i.seed&&(s.idProvider=new kt(i.seed)),s.visible=i.visible,s.context=o,$u&&o.alias&&console.log("[Remote] instantiate in: "+o.alias);const r=Vr(n,s);if(pl.push(new WeakRef(r)),r){i.parent==="scene"&&o.scene.add(r),$u&&console.log("[Remote] new instance","gameobject:",r?.guid,n);for(const a of Gu)try{a(r,i,o)}catch(l){console.error("Error in onSyncInstantiate callback",l)}}}),t=o.connection.beginListen("left-room",()=>{pl.length>0&&console.debug(`Left networking room, cleaning up ${pl.length} instantiated objects`);for(const i of pl){const n=i.deref();n&&n.destroy()}pl.length=0});return()=>{o.connection.stopListen("new-instance-created",e),o.connection.stopListen("left-room",t)}}function pR(o,e){const t=gx(),i=e??new Xn;i.idProvider=new kt(t);const n=Vr(o,i);return{seed:t,instance:n}}function yx(o,e){ul.register(o,e)}function mR(o){ul.unregister(o)}async function gR(o,e){return await ul.resolve(o)||bx(o,e)}function bx(o,e){if(e===null||!o)return null;if(e.guid===o)return e;if(e.children)for(const t of e.children){const i=bx(o,t);if(i)return i}return null}class fR{_context;get context(){return this._context??U.Current}get isStateMachineBehaviour(){return!0}}class eh{name;nameHash;normalizedTime;length;speed;action;hasTransitions;constructor(e,t,i,n){this.name=e.name,this.nameHash=e.hash,this.normalizedTime=t,this.length=i,this.speed=n,this.action=e.motion.action||null,this.hasTransitions=e.transitions?.length>0||!1}}function _x(o,e){return{name:"Empty",isLooping:!1,guid:e?.generateUUID()??Lo.generateUUID(),index:-1,clip:new Ai(o,0,[])}}var _i=(o=>(o[o.If=1]="If",o[o.IfNot=2]="IfNot",o[o.Greater=3]="Greater",o[o.Less=4]="Less",o[o.Equals=6]="Equals",o[o.NotEqual=7]="NotEqual",o))(_i||{}),$r=(o=>(o[o.Float=1]="Float",o[o.Int=3]="Int",o[o.Bool=4]="Bool",o[o.Trigger=9]="Trigger",o))($r||{});const dt=w("debuganimatorcontroller"),qu=w("debugrootmotion");function yR(o){switch(o){case"if":return _i.If;case"ifNot":return _i.IfNot;case"greater":return _i.Greater;case"less":return _i.Less;case"equals":return _i.Equals;case"notEqual":return _i.NotEqual}}class Yf{_name;_parameters=[];_states=[];_anyStateTransitions=[];_defaultStateName=null;_lastTransition=null;constructor(e){this._name=e??"AnimatorController"}floatParameter(e,t=0){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Float,value:t}),this}intParameter(e,t=0){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Int,value:t}),this}boolParameter(e,t=!1){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Bool,value:t}),this}triggerParameter(e){return this._parameters.push({name:e,hash:this._parameters.length,type:$r.Trigger,value:!1}),this}state(e,t){return this._states.push({name:e,options:t,transitions:[]}),this}transition(e,t,i){const n={to:t,options:i??{},conditions:[]};if(e==="*")this._anyStateTransitions.push(n);else{const s=this._states.find(r=>r.name===e);if(!s)throw new Error(`AnimatorControllerBuilder: source state "${e}" not found. Add it with .state() first.`);s.transitions.push(n)}return this._lastTransition=n,this}condition(e,t,i=0){if(!this._lastTransition)throw new Error("AnimatorControllerBuilder: .condition() must be called after .transition()");return this._lastTransition.conditions.push({parameter:e,mode:t,threshold:i}),this}defaultState(e){return this._defaultStateName=e,this}build(){const e=new Map;this._states.forEach((r,a)=>e.set(r.name,a));let t=0;if(this._defaultStateName!==null){const r=e.get(this._defaultStateName);if(r===void 0)throw new Error(`AnimatorControllerBuilder: default state "${this._defaultStateName}" not found`);t=r}const i=r=>{const a=e.get(r.to);if(a===void 0)throw new Error(`AnimatorControllerBuilder: transition target "${r.to}" not found`);return{exitTime:r.options.exitTime??1,hasExitTime:r.options.hasExitTime??!1,duration:r.options.duration??0,offset:r.options.offset??0,hasFixedDuration:r.options.hasFixedDuration??!1,destinationState:a,conditions:r.conditions.map(l=>({parameter:l.parameter,mode:yR(l.mode),threshold:l.threshold}))}},n=this._states.map((r,a)=>{const l=r.transitions.map(i);for(const c of this._anyStateTransitions)e.get(c.to)!==a&&l.push(i(c));return{name:r.name,hash:a,motion:{name:r.options.clip.name,clip:r.options.clip,isLooping:r.options.loop??!1},transitions:l,behaviours:[],speed:r.options.speed,speedParameter:r.options.speedParameter,cycleOffset:r.options.cycleOffset,cycleOffsetParameter:r.options.cycleOffsetParameter}}),s={name:this._name,guid:new kt(Date.now()).generateUUID(),parameters:this._parameters,layers:[{name:"Base Layer",stateMachine:{defaultState:t,states:n}}]};return new Zi(s)}}class Zi{static createFromClips(e,t={looping:!1,autoTransition:!0,transitionDuration:0}){const i=[];for(let s=0;s<e.length;s++){const r=e[s],a=[];if(t.autoTransition!==!1){const c=t.transitionDuration??0,h=c/r.duration;let d=s;(t.autoTransition===void 0||t.autoTransition===!0)&&(d=(s+1)%e.length),a.push({exitTime:1-h,offset:0,duration:c,hasExitTime:!0,destinationState:d,conditions:[]})}const l={name:r.name,hash:s,motion:{name:r.name,clip:r,isLooping:t?.looping??!1},transitions:a,behaviours:[]};i.push(l)}const n={name:"AnimatorController",guid:new kt(Date.now()).generateUUID(),parameters:[],layers:[{name:"Base Layer",stateMachine:{defaultState:0,states:i}}]};return new Zi(n)}static build(e){return new Yf(e)}play(e,t=-1,i=Number.NEGATIVE_INFINITY,n=0){if(t<0)t=0;else if(t>=this.model.layers.length){console.warn("invalid layer");return}const s=this.model.layers[t].stateMachine;for(const r of s.states)if(r.name===e||r.hash===e){dt&&console.log("transition to ",r),this.transitionTo(r,n,i);return}console.warn("Could not find "+e+" to play")}reset(){this.setStartTransition()}setBool(e,t){const i=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(n=>n[i]===e).forEach(n=>n.value=t)}getBool(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??!1}setFloat(e,t){const i=typeof e=="string"?"name":"hash",n=this.model?.parameters?.filter(s=>s[i]===e);return n.forEach(s=>s.value=t),n?.length>0}getFloat(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??0}setInteger(e,t){const i=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(n=>n[i]===e).forEach(n=>n.value=t)}getInteger(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??0}setTrigger(e){dt&&console.log("SET TRIGGER",e);const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(i=>i[t]===e).forEach(i=>i.value=!0)}resetTrigger(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.filter(i=>i[t]===e).forEach(i=>i.value=!1)}getTrigger(e){const t=typeof e=="string"?"name":"hash";return this.model?.parameters?.find(i=>i[t]===e)?.value??!1}isInTransition(){return this._activeStates.length>1}setSpeed(e){this._speed=e}_speed=1;FindState(e){return this.findState(e)}findState(e){if(!e)return null;if(Array.isArray(this.model.layers)){for(const t of this.model.layers)for(const i of t.stateMachine.states)if(i.name===e||i.hash==e)return i}return null}getCurrentStateInfo(){if(!this._activeState)return null;const e=this._activeState.motion.action;if(!e)return null;const t=this._activeState.motion.clip.duration,i=t<=0?0:Math.abs(e.time/t);return new eh(this._activeState,i,t,this._speed)}get currentAction(){return this._activeState&&this._activeState.motion.action||null}normalizedStartOffset=0;animator;model;get context(){return this.animator?.context}get mixer(){return this._mixer}dispose(){if(this._mixer.stopAllAction(),this.animator){this._mixer.uncacheRoot(this.animator.gameObject);for(const e of this._activeStates)e.motion.clip&&this.mixer.uncacheAction(e.motion.clip,this.animator.gameObject)}this.context?.animations.unregisterAnimationMixer(this._mixer)}bind(e){e?this.animator!==e&&(this._mixer&&(this._mixer.stopAllAction(),this.context?.animations.unregisterAnimationMixer(this._mixer)),this.animator=e,this._mixer=new Gm(this.animator.gameObject),this.context?.animations.registerAnimationMixer(this._mixer),this.createActions(this.animator)):console.error("AnimatorController.bind: animator is null")}clone(){if(typeof this.model=="string")return console.warn("AnimatorController has not been resolved, can not create model from string",this.model),null;dt&&console.warn("AnimatorController clone()",this.model);const e=wc(this.model,(t,i,n)=>n==null?!0:!(n.type==="Object3D"||n.isObject3D===!0||V_(n)||n.tracks!==void 0||n instanceof Zi));return console.assert(e!==this.model),new Zi(e)}update(e){if(!this.animator)return;this.evaluateTransitions(),this.updateActiveStates(e);const t=this.animator.context.time.deltaTime;this.animator.applyRootMotion&&this.rootMotionHandler?.onBeforeUpdate(e),this._mixer.update(t),this.animator.applyRootMotion&&this.rootMotionHandler?.onAfterUpdate(e)}_mixer;_activeState;get activeState(){return this._activeState}constructor(e){this.model=e,dt&&console.log(this)}_activeStates=[];updateActiveStates(e){for(let t=0;t<this._activeStates.length;t++){const i=this._activeStates[t],n=i.motion;if(!n.action)this._activeStates.splice(t,1),t--;else{const s=n.action;s.weight=e,s.getEffectiveWeight()<=0&&!s.isRunning()&&(dt&&console.debug("REMOVE",i.name,s.getEffectiveWeight(),s.isRunning(),s.isScheduled()),this._activeStates.splice(t,1),t--)}}}setStartTransition(){this.model.layers.length>1&&(dt||A())&&console.warn("Multiple layers are not supported yet "+this.animator?.name);for(const e of this.model.layers){const t=e.stateMachine;t.defaultState===void 0&&(dt&&console.warn("AnimatorController default state is undefined, will assign state 0 as default",e),t.defaultState=0);const i=t.states[t.defaultState];this.transitionTo(i,0,this.normalizedStartOffset);break}}evaluateTransitions(){let e=!1;if(!this._activeState){if(this.setStartTransition(),!this._activeState)return;e=!0}const t=this._activeState,i=t.motion.action;for(const s of t.transitions){if(!s.hasExitTime&&s.conditions.length<=0)continue;let r=!0;for(const a of s.conditions)if(!this.evaluateCondition(a)){r=!1;break}if(r)if(i){const a=t.motion.clip.duration,l=a<=0?1:Math.abs(i.time/a);let c=s.exitTime;i.timeScale<0&&(c=1-c);let h=!1;if(s.hasExitTime?i.timeScale>0?h=l>=s.exitTime:i.timeScale<0&&(h=1-l>=s.exitTime):h=!0,h){for(const d of s.conditions){const p=this.model.parameters.find(m=>m.name===d.parameter);p?.type===$r.Trigger&&p.value&&(p.value=!1)}if(i.clampWhenFinished=!0,dt){const d=this.getState(s.destinationState,0);console.log(`Transition to ${s.destinationState} / ${d?.name}`,s,`
|
|
892
892
|
Timescale: `+i.timeScale,`
|
|
893
893
|
Normalized time: `+l.toFixed(3),`
|
|
894
894
|
Exit Time: `+c,s.hasExitTime)}this.transitionTo(s.destinationState,s.duration,s.offset);return}}else{this.transitionTo(s.destinationState,s.duration,s.offset);return}}i&&this.setTimescale(i,t);let n=!1;if(t.motion.isLooping&&i&&(i.time>=i.getClip().duration?(n=!0,i.reset(),i.time=0,i.play()):i.time<=0&&i.timeScale<0&&(n=!0,i.reset(),i.time=i.getClip().duration,i.play())),!n&&t&&!e&&i&&this.animator&&t.behaviours){const s=i?.getClip().duration,r=i.time/s,a=new eh(this._activeState,r,s,this._speed);for(const l of t.behaviours)l.instance&&l.instance.onStateUpdate?.call(l.instance,this.animator,a,0)}}setTimescale(e,t){let i=t.speed??1;t.speedParameter&&(i*=this.getFloat(t.speedParameter)),i!==void 0&&(e.timeScale=i*this._speed)}getState(e,t){return typeof e=="number"&&(e==-1&&(e=this.model.layers[t].stateMachine.defaultState,e===void 0&&(dt&&console.warn("AnimatorController default state is undefined: ",this.model,"Layer: "+t),e=0)),e=this.model.layers[t].stateMachine.states[e]),e}_heldActions=[];releaseHeldActions(e){for(const t of this._heldActions)t.fadeOut(e);this._heldActions.length=0}transitionTo(e,t,i){if(!this.animator)return;const n=0;if(e=this.getState(e,n),!e?.motion||!e.motion.clip||!(e.motion.clip instanceof Ai))return;const s=this._activeState===e;if(s){const h=e.motion;if(!h.action_loopback&&h.clip){const d=this.rootMotionHandler?this.animator.gameObject.matrix.clone():null;this._mixer.uncacheAction(h.clip,this.animator.gameObject),d&&d.decompose(this.animator.gameObject.position,this.animator.gameObject.quaternion,this.animator.gameObject.scale),h.action_loopback=this.createAction(h.clip)}}if(this._activeState?.behaviours&&this._activeState.motion.action){const h=this._activeState?.motion.clip.duration,d=this._activeState.motion.action.time/h,p=new eh(this._activeState,d,h,this._speed);for(const m of this._activeState.behaviours)m.instance?.onStateExit?.call(m.instance,this.animator,p,n)}const r=this._activeState?.motion.action;s&&(e.motion.action=e.motion.action_loopback,e.motion.action_loopback=r);const a=this._activeState;this._activeState=e;const l=e.motion?.action,c=e.motion.clip;if(c?.duration<=0&&c.tracks.length<=0?r&&this._heldActions.push(r):r&&(r.fadeOut(t),this.releaseHeldActions(t)),l){if(i=Math.max(0,Math.min(1,i)),e.cycleOffsetParameter){let d=this.getFloat(e.cycleOffsetParameter);typeof d=="number"?(d<0&&(d+=1),i+=d,i%=1):dt&&console.warn("AnimatorController cycle offset parameter is not a number",e.cycleOffsetParameter)}else typeof e.cycleOffset=="number"&&(i+=e.cycleOffset,i%=1);l.isRunning()&&l.stop(),l.reset(),l.enabled=!0,this.setTimescale(l,e);const h=e.motion.clip.duration;if(l.time=s?0:i*h,l.timeScale<0&&(l.time=h-l.time),l.clampWhenFinished=!0,l.setLoop(qm,0),t>0?l.fadeIn(t):l.weight=1,l.play(),window.requestAnimationFrame(()=>gi.testIfRootCanAnimate(l)),this.rootMotionHandler&&this.rootMotionHandler.onStart(l),this._activeStates.includes(e)||this._activeStates.push(e),this._activeState.behaviours){const d=new eh(e,i,h,this._speed);for(const p of this._activeState.behaviours)p.instance?.onStateEnter?.call(p.instance,this.animator,d,n)}}else dt&&(e.__warned_no_motion||(e.__warned_no_motion=!0,console.warn("No action",e.motion,this)));dt&&console.log("TRANSITION FROM "+a?.name+" TO "+e.name,t,r,l,l?.getEffectiveTimeScale(),l?.getEffectiveWeight(),l?.isRunning(),l?.isScheduled(),l?.paused)}createAction(e){if(this._mixer.existingAction(e)&&this._mixer.uncacheAction(e,this.animator?.gameObject),this.animator?.applyRootMotion){this.rootMotionHandler||(this.rootMotionHandler=new bR(this));const t=this.animator.gameObject;return this.rootMotionHandler.createClip(this._mixer,t,e)}else return this._mixer.clipAction(e)}evaluateCondition(e){const t=this.model.parameters.find(i=>i.name===e.parameter);if(!t)return!1;switch(e.mode){case _i.If:return t.value===!0;case _i.IfNot:return t.value===!1;case _i.Greater:return t.value>e.threshold;case _i.Less:return t.value<e.threshold;case _i.Equals:return t.value===e.threshold;case _i.NotEqual:return t.value!==e.threshold}return!1}createActions(e){dt&&console.log("AnimatorController createActions",this.model);for(const t of this.model.layers){const i=t.stateMachine;for(let n=0;n<i.states.length;n++){const s=i.states[n];s.transitions||(s.transitions=[]);for(const r of s.transitions)r.conditions||(r.conditions=[]);if(s.motion||(dt&&console.warn("No motion",s),s.motion=_x(s.name)),this.animator&&s.motion.clips){const r=s.motion.clips?.find(a=>a.node.name===this.animator?.gameObject?.name);r?s.motion.clip=r.clip:(dt||A())&&console.warn('Could not find clip for animator "'+this.animator?.gameObject?.name+'"',s.motion.clips.map(a=>a.node.name))}if(!s.motion.clip){dt&&console.warn("No clip assigned to state",s);const r=new Ai(void 0,void 0,[]);s.motion.clip=r}if(s.motion?.clip){const r=s.motion.clip;if(r instanceof Ai){const a=this.createAction(r);s.motion.action=a}else(dt||A())&&console.warn("No valid animationclip assigned",s)}if(s.behaviours&&Array.isArray(s.behaviours))for(const r of s.behaviours){if(!r?.typeName)continue;const a=P.get(r.typeName);if(a){const l=new a;l.isStateMachineBehaviour&&(l._context=this.context??void 0,qa(l,r.properties),r.instance=l),dt&&console.log("Created animator controller behaviour",s.name,r.typeName,r.properties,l)}else(dt||A())&&console.warn("Could not find AnimatorBehaviour type: "+r.typeName)}}}}*enumerateActions(){if(this.model.layers)for(const e of this.model.layers){const t=e.stateMachine;for(let i=0;i<t.states.length;i++){const n=t.states[i];n?.motion&&(n.motion.action&&(yield n.motion.action),n.motion.action_loopback&&(yield n.motion.action_loopback))}}}rootMotionHandler}class vx{track;createdInterpolant;originalEvaluate;customEvaluate;constructor(e,t){this.track=e;const i=e,n=i.createInterpolant.bind(e);i.createInterpolant=()=>(i.createInterpolant=n,this.createdInterpolant=n(),this.originalEvaluate=this.createdInterpolant.evaluate.bind(this.createdInterpolant),this.customEvaluate=s=>{if(!this.originalEvaluate)return;const r=this.originalEvaluate(s);return t(s,r)},this.createdInterpolant.evaluate=this.customEvaluate,this.createdInterpolant)}dispose(){this.createdInterpolant&&this.originalEvaluate&&(this.createdInterpolant.evaluate=this.originalEvaluate),this.track=void 0,this.createdInterpolant=null,this.originalEvaluate=void 0,this.customEvaluate=void 0}}class ft{static lastObjPosition={};static lastObjRotation={};static firstKeyframeRotation={};static spaceRotation={};static effectiveSpaceRotation={};static clipOffsetRotation={};set action(e){this._action=e}get action(){return this._action}get cacheId(){return this.root.uuid}_action;root;clip;positionWrapper=null;rotationWrapper=null;context;positionChange=new _;rotationChange=new N;constructor(e,t,i,n,s){if(this.context=e,this.root=t,this.clip=i,ft.firstKeyframeRotation[this.cacheId]||(ft.firstKeyframeRotation[this.cacheId]=new N),s){const r=s.values;ft.firstKeyframeRotation[this.cacheId].set(r[0],r[1],r[2],r[3])}ft.spaceRotation[this.cacheId]||(ft.spaceRotation[this.cacheId]=new N),ft.effectiveSpaceRotation[this.cacheId]||(ft.effectiveSpaceRotation[this.cacheId]=new N),ft.clipOffsetRotation[this.cacheId]=new N,s&&ft.clipOffsetRotation[this.cacheId].set(s.values[0],s.values[1],s.values[2],s.values[3]).invert(),this.handlePosition(i,n),this.handleRotation(i,s)}onStart(e){if(e.getClip()!==this.clip)return;ft.lastObjRotation[this.cacheId]||(ft.lastObjRotation[this.cacheId]=this.root.quaternion.clone());const t=ft.lastObjRotation[this.cacheId];if(ft.spaceRotation[this.cacheId].copy(t),qu){const i=new ht().setFromQuaternion(t);console.log("START",this.clip.name,D.toDegrees(i.y),this.root.position.z)}}getClipRotationOffset(){return ft.clipOffsetRotation[this.cacheId]}_prevTime=0;handlePosition(e,t){if(t){const i=this.root;qu&&i.add(new Li),ft.lastObjPosition[this.cacheId]||(ft.lastObjPosition[this.cacheId]=this.root.position.clone());const n=new _,s=new _;this.positionWrapper=new vx(t,(r,a)=>{const l=this.action.getEffectiveWeight();return qu&&i.position.length()>8&&i.position.set(0,i.position.y,0),r>this._prevTime&&(n.set(a[0],a[1],a[2]),n.sub(s),n.multiplyScalar(l),n.applyQuaternion(this.getClipRotationOffset()),n.applyQuaternion(i.quaternion),this.positionChange.copy(n)),s.fromArray(a),this._prevTime=r,a[0]=0,a[1]=0,a[2]=0,a})}}static identityQuaternion=new N;handleRotation(e,t){if(t){if(qu){const r=t.values,a=new ht().setFromQuaternion(new N(r[0],r[1],r[2],r[3]));console.log(e.name,t.name,"FIRST ROTATION IN TRACK",D.toDegrees(a.y));const l=t.values.length-4,c=new N().set(r[l],r[l+1],r[l+2],r[l+3]),h=new ht().setFromQuaternion(c);console.log(e.name,t.name,"LAST ROTATION IN TRACK",D.toDegrees(h.y))}let i=0;const n=new N,s=new N;this.rotationWrapper=new vx(t,(r,a)=>(r>i&&(s.set(a[0],a[1],a[2],a[3]),n.invert(),s.multiply(n),this.rotationChange.copy(s)),n.fromArray(a),i=r,a[0]=0,a[1]=0,a[2]=0,a[3]=1,a))}}onBeforeUpdate(e){this.positionChange.set(0,0,0),this.rotationChange.set(0,0,0,1)}onAfterUpdate(e){return!this.action||(e*=this.action.getEffectiveWeight(),e<=0)?!1:(this.positionChange.multiplyScalar(e),this.rotationChange.slerp(ft.identityQuaternion,1-e),!0)}}class bR{controller;handler=[];root;basePosition=new _;baseQuaternion=new N;baseRotation=new ht;constructor(e){this.controller=e}createClip(e,t,i){this.root=t,t&&"name"in t&&t.name;const n=this.findRootTrack(i,".position"),s=this.findRootTrack(i,".quaternion"),r=new ft(this.controller.context,t,i,n,s);this.handler.push(r);const a=e.clipAction(i);return r.action=a,a}onStart(e){for(const t of this.handler)t.onStart(e)}onBeforeUpdate(e){this.basePosition.copy(this.root.position),this.baseQuaternion.copy(this.root.quaternion);for(const t of this.handler)t.onBeforeUpdate(e)}summedPosition=new _;summedRotation=new N;onAfterUpdate(e){if(!(e<=0)){this.root.position.copy(this.basePosition),this.root.quaternion.copy(this.baseQuaternion),this.summedPosition.set(0,0,0),this.summedRotation.set(0,0,0,1);for(const t of this.handler)t.onAfterUpdate(e)&&(this.summedPosition.add(t.positionChange),this.summedRotation.multiply(t.rotationChange));this.root.position.add(this.summedPosition),this.root.quaternion.multiply(this.summedRotation)}}findRootTrack(e,t){const i=e.tracks;if(!i)return null;for(const n of i)if(n.name.endsWith(t))return n;return null}}class _R extends tn{onSerialize(e,t){}onDeserialize(e,t){if(t.type===Zi&&e?.__type==="AnimatorController")return new Zi(e)}}function vR(){new _R(Zi)}const qe=function(o){return u(o)},u=function(o){if(o===void 0&&(o=null),!Array.isArray(o))o=wx(o);else for(let e=0;e<o.length;e++){const t=o[e];o[e]=wx(t)}return function(e,t){if(!e){const n=typeof t=="string"?t:t.name;console.warn(`@serializable without a target at '${n}'.`);return}typeof t!="string"&&(t=t.name),Object.getOwnPropertyDescriptor(e,"$serializedTypes")||(e.$serializedTypes={});const i=e.$serializedTypes=e.$serializedTypes||{};i[t]=o}};function wx(o){switch(o?.prototype?.constructor?.name){case"Number":case"String":case"Boolean":return null}return o}const Is=w("debughotreload");let th=!1;const ih=new Map;function wR(){return th}function Zf(){return globalThis.NEEDLE_HOT_RELOAD_ENABLED===!0}function xx(o){if(th){Is&&console.warn("[Needle Engine] Hot reloading is in progress, not registering instance",o);return}Is&&console.log("[Needle Engine] Registering hot reload instance",o);const e=o.constructor.name;ih.has(e)?ih.get(e)?.push(o):ih.set(e,[o])}function Sx(o){if(th){Is&&console.warn("[Needle Engine] Hot reloading is in progress, not unregistering instance",o);return}Is&&console.log("[Needle Engine] Unregistering hot reload instance",o);const e=o.constructor.name,t=ih.get(e);if(!t)return;const i=t.indexOf(o);i!==-1&&t.splice(i,1)}let Cx=!1;function xR(){if(Is||Cx)return;Cx=!0;const o=console.error;console.error=(...e)=>{if(e.length){const t=e[0];if(typeof t=="string"&&t.includes("[hmr] Failed to reload ")){console.log("[Needle Engine] Hot reloading failed"),window.location.reload();return}}o.apply(console,e)}}function SR(o){Is&&console.log("[HMR] Apply changes",o,Object.keys(o)),xR();for(const e of Object.keys(o))try{th=!0;const t=P.get(e);if(!t){Is&&console.log("[HMR] Type not found: "+e);continue}const i=o[e],n=ih.get(i.name);let s="[Needle Engine] Updating type: "+e;const r=n?.length??-1;r>0?s+=" x"+r:s+=" (No instances registered)",console.log(s);const a=Object.getOwnPropertyNames(t.prototype),l=Object.getOwnPropertyDescriptors(i.prototype);for(const c in l)l[c].writable&&(t.prototype[c]=o[e].prototype[c]);for(const c of a)l[c]||delete t.prototype[c];if(n){const c=new i,h=Object.getOwnPropertyDescriptors(c);for(const d of n){const p=d,m=p.isComponent===!0,g=m?p.activeAndEnabled:!0,f=m?p.context:void 0;try{if(m&&f&&Uo(p,f),m&&g&&(p.enabled=!1),d.onBeforeHotReloadFields&&d.onBeforeHotReloadFields()===!1)continue;for(const y in h)if(h[y].writable){if(d[y]===void 0)d[y]=c[y];else if(typeof d[y]=="function"&&!d[y].prototype){const b=d[y],v=b.name,C="bound ";if(v===C)continue;const O=b.name.substring(C.length),k=i.prototype[O];k&&(d[y]=k.bind(d))}}d.onAfterHotReloadFields&&d.onAfterHotReloadFields()}finally{m&&f&&Ng(p,f),m&&g&&(p.enabled=!0)}}}}catch(t){if(Is)console.error(t);else return!1}finally{th=!1,Pr(Bi.Log,"Script changes applied (HMR)")}return!0}class x extends M{guid;static isDestroyed(e){return Nr(e)}static setActive(e,t,i=!0){e&&(Zc(e,t),lu(e),t&&i&&gv(U.Current,e))}static isActiveSelf(e){return hl(e)}static isActiveInHierarchy(e){return nx(e)}static markAsInstancedRendered(e,t){ox(e,t)}static isUsingInstancing(e){return Nu(e)}static foreachComponent(e,t,i=!0){return Wr(e,t,i)}static instantiateSynced(e,t){return e?Qf(e,t):null}static instantiate(e,t=null){return"isAssetReference"in e,Vr(e,t)}static destroySynced(e,t,i=!0){if(!e)return;const n=e;t=t??U.Current,Jc(n,t.connection,i)}static destroy(e,t=!0){return Ui(e,t)}static add(e,t,i){if(!(!e||!t)){if(e===t){console.warn("Can not add object to self",e);return}i||(i=U.Current),t.add(e),Zc(e,!0),lu(e),i?x.foreachComponent(e,n=>{Ng(n,i),!n.__internalDidAwakeAndStart&&i.new_script_start.includes(n)===!1&&i.new_script_start.push(n)},!0):console.warn("Missing context")}}static remove(e){e&&(e.parent?.remove(e),Zc(e,!1),lu(e),x.foreachComponent(e,t=>{rM(t)},!0))}static invokeOnChildren(e,t,...i){this.invoke(e,t,!0,i)}static invoke(e,t,i=!1,...n){e&&this.foreachComponent(e,s=>{const r=s[t];r&&typeof r=="function"&&r?.call(s,...n)},i)}static addNewComponent(e,t,i,n=!0){return so(e,t,i,{callAwake:n})}static addComponent(e,t,i,n){return so(e,t,i,n)}static moveComponent(e,t){return so(e,t)}static removeComponent(e){return Sf(e.gameObject,e),e}static getOrAddComponent(e,t){return Uc(e,t)}static getComponent(e,t){return e===null?null:Ts(e,t)}static getComponents(e,t,i=null){return e===null?i??[]:Ja(e,t,i)}static findByGuid(e,t){return $f(e,t)}static findObjectOfType(e,t,i=!0){return tl(e,t??U.Current,i)}static findObjectsOfType(e,t){const i=[];return gw(e,i,t),i}static getComponentInChildren(e,t,i=!1){return zc(e,t,i)}static getComponentsInChildren(e,t,i=null){return el(e,t,i??void 0)}static getComponentInParent(e,t){return Nc(e,t)}static getComponentsInParent(e,t,i=null){return ku(e,t,i)}static getAllComponents(e){const t=e.userData?.components;return t?[...t]:[]}static*iterateComponents(e){const t=e?.userData?.components;if(t&&Array.isArray(t))for(let i=0;i<t.length;i++)yield t[i]}}class E{get isComponent(){return!0}get[Dg](){return P.getKey(this.constructor)||void 0}__context;get context(){return this.__context??U.Current}set context(e){this.__context=e}get scene(){return this.context.scene}get layer(){return this.gameObject?.userData?.layer}get name(){return this.gameObject?.name?this.gameObject.name:this.gameObject?.userData.name}__name;set name(e){this.gameObject?(this.gameObject.userData||(this.gameObject.userData={}),this.gameObject.userData.name=e,this.__name=e):this.__name=e}get tag(){return this.gameObject?.userData.tag}set tag(e){this.gameObject&&(this.gameObject.userData||(this.gameObject.userData={}),this.gameObject.userData.tag=e)}get static(){return this.gameObject?.userData.static}set static(e){this.gameObject&&(this.gameObject.userData||(this.gameObject.userData={}),this.gameObject.userData.static=e)}get activeAndEnabled(){return!(this.destroyed||this.__isEnabled===!1||!this.__isActiveInHierarchy)}get __isActive(){return this.gameObject.visible}get __isActiveInHierarchy(){if(!this.gameObject)return!1;const e=this.gameObject[Jn];return e===void 0?!0:e}set __isActiveInHierarchy(e){this.gameObject&&(this.gameObject[Jn]=e)}gameObject;guid="invalid";sourceId;awake(){}onEnable(){}onDisable(){}onDestroy(){this.__destroyed=!0}startCoroutine(e,t=Ce.Update){return this.context.registerCoroutineUpdate(this,e,t)}stopCoroutine(e,t=Ce.Update){this.context.unregisterCoroutineUpdate(e,t)}get destroyed(){return this.__destroyed}destroy(){this.__destroyed||this.__internalDestroy()}__didAwake=!1;__didStart=!1;__didEnable=!1;__isEnabled=void 0;__destroyed=!1;get __internalDidAwakeAndStart(){return this.__didAwake&&this.__didStart}constructor(e){this.__didAwake=!1,this.__didStart=!1,this.__didEnable=!1,this.__isEnabled=void 0,this.__destroyed=!1,this._internalInit(e),Zf()&&xx(this)}__internalNewInstanceCreated(e){return this.__didAwake=!1,this.__didStart=!1,this.__didEnable=!1,this.__isEnabled=void 0,this.__destroyed=!1,this._internalInit(e),this}_internalInit(e){if(typeof e=="object")for(const t of Object.keys(e)){const i=e[t];typeof i!="function"&&(this[t]=i)}}__internalAwake(){this.__didAwake||(this.__didAwake=!0,this.awake())}__internalStart(){this.__didStart||(this.__didStart=!0,this.start&&this.start())}__internalEnable(e){return this.__destroyed?(A()&&console.warn("[Needle Engine Dev] Trying to enable destroyed component"),!1):this.__didAwake?this.__didEnable?(e!==!0&&(this.__isEnabled=!0),!1):(this.__didEnable=!0,this.__isEnabled=!0,this.onEnable(),!0):!1}__internalDisable(e){if(this.__didAwake){if(!this.__didEnable){e!==!0&&(this.__isEnabled=!1);return}this.__didEnable=!1,this.__isEnabled=!1,this.onDisable()}}__internalDestroy(){this.__destroyed||(this.__destroyed=!0,this.__didAwake&&(this.onDestroy?.call(this),this.dispatchEvent(new CustomEvent("destroyed",{detail:this}))),uw(this),Zf()&&Sx(this))}get enabled(){return typeof this.__isEnabled=="boolean"?this.__isEnabled:!0}set enabled(e){if(this.__destroyed){A()&&console.warn(`[Needle Engine Dev] Trying to ${e?"enable":"disable"} destroyed component`);return}if(typeof e=="number"&&(e>=.5?e=!0:e=!1),!this.__didAwake){this.__isEnabled=e;return}e?this.__internalEnable():this.__internalDisable()}get worldPosition(){return ee(this.gameObject)}set worldPosition(e){bt(this.gameObject,e)}setWorldPosition(e,t,i){Or(this.gameObject,e,t,i)}get worldQuaternion(){return _e(this.gameObject)}set worldQuaternion(e){Mn(this.gameObject,e)}setWorldQuaternion(e,t,i,n){Og(this.gameObject,e,t,i,n)}get worldEuler(){return kg(this.gameObject)}set worldEuler(e){Mg(this.gameObject,e)}get worldRotation(){return this.gameObject.worldRotation}set worldRotation(e){this.setWorldRotation(e.x,e.y,e.z,!0)}setWorldRotation(e,t,i,n=!0){Cc(this.gameObject,e,t,i,n)}static _forward=new _;get forward(){return E._forward.set(0,0,-1).applyQuaternion(this.worldQuaternion)}static _right=new _;get right(){return E._right.set(1,0,0).applyQuaternion(this.worldQuaternion)}static _up=new _;get up(){return E._up.set(0,1,0).applyQuaternion(this.worldQuaternion)}_eventListeners=new Map;addEventListener(e,t){this._eventListeners[e]=this._eventListeners[e]||[],this._eventListeners[e].push(t)}removeEventListener(e,t){if(!this._eventListeners[e])return;const i=this._eventListeners[e].indexOf(t);i>=0&&this._eventListeners[e].splice(i,1)}dispatchEvent(e){if(!e||!this._eventListeners[e.type])return!1;const t=this._eventListeners[e.type];for(let i=0;i<t.length;i++)t[i](e);return!1}}const CR=Object.freeze(Object.defineProperty({__proto__:null,Behaviour:E,Component:E,GameObject:x},Symbol.toStringTag,{value:"Module"}));var PR=Object.defineProperty,OR=Object.getOwnPropertyDescriptor,Hr=(o,e,t,i)=>{for(var n=i>1?void 0:i?OR(e,t):e,s=o.length-1,r;s>=0;s--)(r=o[s])&&(n=(i?r(e,t,n):r(n))||n);return i&&n&&PR(e,t,n),n};const Ls=w("debuganimation");let Px=class{x;y};class Vt extends E{get isAnimationComponent(){return!0}addClip(e){this.animations||(this.animations=[]),this.animations.includes(e)||this.animations.push(e)}playAutomatically=!0;randomStartTime=!1;minMaxSpeed;minMaxOffsetNormalized;loop=!0;clampWhenFinished=!1;get time(){if(this.actions){for(const e of this.actions)if(e.isRunning())return e.time}return 0}set time(e){if(this.actions)for(const t of this.actions)t.time=e}get duration(){if(this.actions){for(const e of this.actions)if(e.isRunning())return e.getClip().duration}return 0}_tempAnimationClipBeforeGameObjectExisted=null;get clip(){return this.animations?.length?this.animations[0]:null}set clip(e){if(!this.__didAwake){Ls&&console.warn("Assign clip during serialization",e),this._tempAnimationClipBeforeGameObjectExisted=e;return}e&&(this.gameObject.animations||(this.gameObject.animations=[]),!this.animations.includes(e)&&(this.animations.length>0?this.animations.splice(0,0,e):this.animations.push(e)))}set clips(e){this.animations=e}_tempAnimationsArray;set animations(e){e==null||!Array.isArray(e)||(this.gameObject?this.gameObject.animations=e:this._tempAnimationsArray=e)}get animations(){return this.gameObject?.animations||this._tempAnimationsArray||[]}mixer=void 0;get actions(){return this._actions}set actions(e){this._actions=e}_actions;_handles;awake(){this.mixer=void 0,Ls&&console.log("Animation Awake",this.name,this),this._tempAnimationsArray&&(this.animations=this._tempAnimationsArray,this._tempAnimationsArray=void 0),this._tempAnimationClipBeforeGameObjectExisted&&(this.clip=this._tempAnimationClipBeforeGameObjectExisted,this._tempAnimationClipBeforeGameObjectExisted=null),this.actions=[],this._handles=[]}onEnable(){if(this.playAutomatically&&this.animations?.length>0){const e=Math.floor(Math.random()*this.animations.length),t=this.animations[e];this.play(e,{exclusive:!0,fadeDuration:0,startTime:this.randomStartTime?Math.random()*t.duration:0,loop:this.loop,clampWhenFinished:this.clampWhenFinished})}}update(){this.mixer&&(this.mixer.update(this.context.time.deltaTime),this._handles.forEach(e=>e.update()))}onDisable(){this.mixer&&this.mixer.stopAllAction()}onDestroy(){this.context.animations.unregisterAnimationMixer(this.mixer)}getAction(e){return this.actions?.find(t=>t.getClip().name===e)||null}get isPlaying(){if(this.actions){for(let e=0;e<this.actions.length;e++)if(this.actions[e].isRunning())return!0}return!1}stopAll(e){if(this.actions)for(const t of this.actions)e?.fadeDuration?t.fadeOut(e.fadeDuration):t.stop()}stop(e,t){if(e===void 0){this.stopAll();return}else if(typeof e=="number"){if(e>=this.animations.length){Ls&&console.log("No animation at index",e);return}e=this.animations[e]}else typeof e=="string"&&(e=this.animations.find(n=>n.name===e));if(!e){console.error("Could not find clip",e);return}const i=this.actions.find(n=>n.getClip()===e);if(!i){console.error("Could not find action",e);return}t?.fadeDuration?i.fadeOut(t.fadeDuration):i.stop()}pause(e,t=!1){if(e===void 0){for(const n of this.actions)n.paused=!t;return}else if(typeof e=="number"){if(e>=this.animations.length){Ls&&console.log("No animation at index",e);return}e=this.animations[e]}else typeof e=="string"&&(e=this.animations.find(n=>n.name===e));if(!e){console.error("Could not find clip",e);return}const i=this.actions.find(n=>n.getClip()===e);if(!i){console.error("Could not find action",e);return}i.paused=!t}resume(){for(const e of this.actions)e.paused=!1}play(e=0,t){if(Ls&&console.log("PLAY",e),this.ensureMixer(),!this.mixer){Ls&&console.warn("Missing mixer",this);return}e===void 0&&(e=0);let i=e;if(typeof e=="number"){if(e>=this.animations.length){Ls&&console.log("No animation at index",e);return}i=this.animations[e]}else typeof e=="string"&&(i=this.animations.find(s=>s.name===e));if(!i){console.error("Could not find clip",e);return}t||(t={});for(const s of this.actions)if(s.getClip()===i)return this.internalOnPlay(s,t);if(!i.tracks){console.warn("Clip is no AnimationClip",i);return}const n=this.mixer.clipAction(i);return this.actions.push(n),this.internalOnPlay(n,t)}internalOnPlay(e,t){var i=this.actions.find(s=>s===e);if(i===e&&i.isRunning()&&i.time<i.getClip().duration){const s=this.tryFindHandle(e);if(i.paused&&(i.paused=!1),s)return s.waitForFinish()}if(t.loop===void 0&&(t.loop=this.loop),t.clampWhenFinished===void 0&&(t.clampWhenFinished=this.clampWhenFinished),t.minMaxOffsetNormalized===void 0&&this.randomStartTime&&(t.minMaxOffsetNormalized=this.minMaxOffsetNormalized),t.minMaxSpeed===void 0&&(t.minMaxSpeed=this.minMaxSpeed),t?.exclusive??!0)for(const s of this.actions)s!=i&&(t.fadeDuration?s.fadeOut(t.fadeDuration):s.stop());if(t?.fadeDuration&&e.fadeIn(t.fadeDuration),e.enabled=!0,t?.startTime!=null)e.time=t.startTime;else if(t?.minMaxOffsetNormalized&&t.minMaxOffsetNormalized.x!=0&&t.minMaxOffsetNormalized.y!=0){const s=e.getClip();e.time=D.lerp(t.minMaxOffsetNormalized.x,t.minMaxOffsetNormalized.y,Math.random())*s.duration}else e.time>=e.getClip().duration&&(e.time=0);t?.minMaxSpeed?e.timeScale=D.lerp(t.minMaxSpeed.x,t.minMaxSpeed.y,Math.random()):e.timeScale=t?.speed??1,t?.loop!=null?e.loop=t.loop?HC:qm:e.loop=qm,t?.clampWhenFinished&&(e.clampWhenFinished=!0),e.paused=!1,e.play(),window.requestAnimationFrame(()=>gi.testIfRootCanAnimate(e)),Ls&&console.log("PLAY",e.getClip().name,e);const n=new kR(e,this.mixer,t,s=>{this._handles.splice(this._handles.indexOf(n),1)});return this._handles.push(n),n.waitForFinish()}tryFindHandle(e){for(const t of this._handles)if(t.action===e)return t}ensureMixer(){if(!this.mixer){const e="animationMixer";this.gameObject[e]&&(this.mixer=this.gameObject[e]),(!this.mixer||!this.mixer.clipAction)&&(this.mixer=new Gm(this.gameObject),this.gameObject[e]=this.mixer)}this.context.animations.registerAnimationMixer(this.mixer)}}Hr([u()],Vt.prototype,"playAutomatically",2),Hr([u()],Vt.prototype,"randomStartTime",2),Hr([u(Px)],Vt.prototype,"minMaxSpeed",2),Hr([u(Px)],Vt.prototype,"minMaxOffsetNormalized",2),Hr([u()],Vt.prototype,"loop",2),Hr([u()],Vt.prototype,"clampWhenFinished",2),Hr([u(Ai)],Vt.prototype,"clips",1);class kR{mixer;action;promise=null;_options;_resolveCallback=null;_resolvedOrRejectedCallback;constructor(e,t,i,n){this.action=e,this.mixer=t,this._resolvedOrRejectedCallback=n,this._options=i}waitForFinish(){return this.promise?this.promise:(this.promise=new Promise(e=>{this._resolveCallback=e}),this.mixer.addEventListener("finished",this.onFinished),this.promise)}update(){this._options&&this._options.endTime!==void 0&&this.action.time>this._options.endTime&&(this._options.loop===!0?this.action.time=this._options.startTime??0:(this.action.time=this._options.endTime,this.action.timeScale=0,this.onResolve()))}onResolve(){this.dispose(),this._resolvedOrRejectedCallback?.call(this,this),this._resolveCallback?.call(this,this.action)}onFinished=e=>{e.action===this.action&&this.onResolve()};dispose(){this.mixer.removeEventListener("finished",this.onFinished)}}function Ox(o,e,t){return gi.setObjectAnimated(o,e,t)}function MR(o){return gi.getObjectAnimated(o)||!1}var ER=Object.defineProperty,RR=Object.getOwnPropertyDescriptor,Xu=(o,e,t,i)=>{for(var n=i>1?void 0:i?RR(e,t):e,s=o.length-1,r;s>=0;s--)(r=o[s])&&(n=(i?r(e,t,n):r(n))||n);return i&&n&&ER(e,t,n),n};const rn=w("debuganimator");class wt extends E{get isAnimationComponent(){return!0}applyRootMotion=!1;hasRootMotion=!1;keepAnimatorControllerStateOnDisable=!1;set runtimeAnimatorController(e){this._animatorController&&this._animatorController.model===e||(e?e instanceof Zi?(e.animator&&e.animator!==this&&(console.warn("AnimatorController can not be bound to multiple animators",e.model?.name),e.model||console.error("AnimatorController has no model"),e=new Zi(e.model)),this._animatorController=e,this._animatorController.bind(this)):(rn&&console.log("Assign animator controller",e,this),this._animatorController=new Zi(e),this.__didAwake&&this._animatorController.bind(this)):this._animatorController=null)}get runtimeAnimatorController(){return this._animatorController}getCurrentStateInfo(){return this.runtimeAnimatorController?.getCurrentStateInfo()}get currentAction(){return this.runtimeAnimatorController?.currentAction||null}get parametersAreDirty(){return this._parametersAreDirty}_parametersAreDirty=!1;get isDirty(){return this._isDirty}_isDirty=!1;Play(e,t=-1,i=Number.NEGATIVE_INFINITY,n=0){this.play(e,t,i,n)}play(e,t=-1,i=Number.NEGATIVE_INFINITY,n=0){this.runtimeAnimatorController?.play(e,t,i,n),this._isDirty=!0}Reset(){this.reset()}reset(){this._animatorController?.reset(),this._isDirty=!0}SetBool(e,t){this.setBool(e,t)}setBool(e,t){rn&&console.log("setBool",e,t),this.runtimeAnimatorController?.getBool(e)!==t&&(this._parametersAreDirty=!0),this.runtimeAnimatorController?.setBool(e,t)}GetBool(e){return this.getBool(e)}getBool(e){const t=this.runtimeAnimatorController?.getBool(e)??!1;return rn&&console.log("getBool",e,t),t}toggleBool(e){this.setBool(e,!this.getBool(e))}SetFloat(e,t){this.setFloat(e,t)}setFloat(e,t){this.runtimeAnimatorController?.getFloat(e)!==t&&(this._parametersAreDirty=!0),rn&&console.log("setFloat",e,t),this.runtimeAnimatorController?.setFloat(e,t)}GetFloat(e){return this.getFloat(e)}getFloat(e){const t=this.runtimeAnimatorController?.getFloat(e)??-1;return rn&&console.log("getFloat",e,t),t}SetInteger(e,t){this.setInteger(e,t)}setInteger(e,t){this.runtimeAnimatorController?.getInteger(e)!==t&&(this._parametersAreDirty=!0),rn&&console.log("setInteger",e,t),this.runtimeAnimatorController?.setInteger(e,t)}GetInteger(e){return this.getInteger(e)}getInteger(e){const t=this.runtimeAnimatorController?.getInteger(e)??-1;return rn&&console.log("getInteger",e,t),t}SetTrigger(e){this.setTrigger(e)}setTrigger(e){this._parametersAreDirty=!0,rn&&console.log("setTrigger",e),this.runtimeAnimatorController?.setTrigger(e)}ResetTrigger(e){this.resetTrigger(e)}resetTrigger(e){this._parametersAreDirty=!0,rn&&console.log("resetTrigger",e),this.runtimeAnimatorController?.resetTrigger(e)}GetTrigger(e){this.getTrigger(e)}getTrigger(e){const t=this.runtimeAnimatorController?.getTrigger(e);return rn&&console.log("getTrigger",e,t),t}IsInTransition(){return this.isInTransition()}isInTransition(){return this.runtimeAnimatorController?.isInTransition()??!1}SetSpeed(e){return this.setSpeed(e)}setSpeed(e){e!==this._speed&&(rn&&console.log("setSpeed",e),this._speed=e,this._animatorController?.animator==this&&this._animatorController.setSpeed(e))}set minMaxSpeed(e){this._speed=D.lerp(e.x,e.y,Math.random()),this._animatorController?.animator==this&&this._animatorController.setSpeed(this._speed)}set minMaxOffsetNormalized(e){this._normalizedStartOffset=D.lerp(e.x,e.y,Math.random()),this.runtimeAnimatorController?.animator==this&&(this.runtimeAnimatorController.normalizedStartOffset=this._normalizedStartOffset)}_speed=1;_normalizedStartOffset=0;_animatorController=null;awake(){rn&&console.log("ANIMATOR",this.name,this),this.gameObject&&this.initializeRuntimeAnimatorController()}_initializeWithRuntimeAnimatorController;initializeRuntimeAnimatorController(e=!1){const t=e||this.runtimeAnimatorController!==this._initializeWithRuntimeAnimatorController;if(this.runtimeAnimatorController&&t){const i=this.runtimeAnimatorController.clone();this._initializeWithRuntimeAnimatorController=i,i?(console.assert(this.runtimeAnimatorController!==i),this.runtimeAnimatorController=i,console.assert(this.runtimeAnimatorController===i),this.runtimeAnimatorController.bind(this),this.runtimeAnimatorController.setSpeed(this._speed),this.runtimeAnimatorController.normalizedStartOffset=this._normalizedStartOffset):console.warn("Could not clone animator controller",this.runtimeAnimatorController)}}onDisable(){this.keepAnimatorControllerStateOnDisable||this._animatorController?.reset()}onBeforeRender(){this._isDirty=!1,this._parametersAreDirty=!1,!MR(this.gameObject)&&this._animatorController&&this._animatorController.update(1)}}Xu([u()],wt.prototype,"applyRootMotion",2),Xu([u()],wt.prototype,"hasRootMotion",2),Xu([u()],wt.prototype,"keepAnimatorControllerStateOnDisable",2),Xu([u()],wt.prototype,"runtimeAnimatorController",1);const $o=new Array;class Ho{enabled=!0;target;methodName;arguments;get canClone(){return this.target instanceof Object}constructor(e,t,i,n){this.target=e,this.methodName=t||null,this.arguments=i,n!=null&&(this.enabled=n)}invoke(...e){if(this.enabled!==!1){if(typeof this.target=="function")this.arguments?($o.length=0,e!==void 0&&e.length>0&&$o.push(...e),$o.push(...this.arguments),this.target(...this.arguments),$o.length=0):this.target(...e);else if(this.methodName!=null){const t=this.target[this.methodName];typeof t=="function"?this.arguments?($o.length=0,e!==void 0&&e.length>0&&$o.push(...e),$o.push(...this.arguments),t.call(this.target,...$o),$o.length=0):t.call(this.target,...e):this.arguments?e!==void 0&&e.length>0?this.target[this.methodName]=e[0]:this.target[this.methodName]=this.arguments[0]:this.target[this.methodName]=e[0]}}}}const TR=o=>/^[A-Z]*$/.test(o);class Qu extends Event{args}class ae{isEventList=!0;__internalOnInstantiate(e){const t=new Array;for(let i=0;i<this.methods.length;i++){const n=this.methods[i];if(!(n.target instanceof Function)){const s=n.target;let r=s?.uuid;if(s&&(r=s.guid),r){const a=e[r];if(a){const l=n.arguments?.map(c=>c instanceof Object&&c.uuid?e[c.uuid].clone:c?.isComponent?e[c.guid].clone:c);t.push(new Ho(a.clone,n.methodName,l,n.enabled))}else A()&&console.warn("Could not find target for event listener")}}}return new ae(t)}target;key;setEventTarget(e,t){if(this.key=e,this.target=t,this.key!==void 0){let i="",n=!1;for(const s of this.key)n&&TR(s)&&(i+="-"),n=!0,i+=s.toLowerCase();this.key=i}}get listenerCount(){return this.methods?.length??0}get isInvoking(){return this._isInvoking}_isInvoking=!1;methods=[];_methodsCopy=[];static from(...e){return new ae(e)}constructor(e){if(this.methods=[],Array.isArray(e))for(const t of e)t instanceof Ho?this.methods.push(t):typeof t=="function"&&this.methods.push(new Ho(t));else typeof e=="function"&&this.methods.push(new Ho(e))}invoke(...e){if(this._isInvoking)return console.warn("Circular event invocation detected. Please check your event listeners for circular references.",this),!1;if(this.methods?.length<=0)return!1;this._isInvoking=!0;try{this._methodsCopy.length=0,this._methodsCopy.push(...this.methods);for(const t of this._methodsCopy)t.invoke(...e);if(typeof this.target=="object"&&typeof this.key=="string"){const t=this.target.dispatchEvent;if(typeof t=="function"){const i=new Qu(this.key);i.args=e,t.call(this.target,i)}}}finally{this._isInvoking=!1,this._methodsCopy.length=0}return!0}addEventListener(e){return this.methods.push(new Ho(e)),()=>this.removeEventListener(e)}removeEventListener(e){if(!e)return!1;let t=!1;for(let i=this.methods.length-1;i>=0;i--)this.methods[i].target===e&&(this.methods[i].enabled=!1,this.methods.splice(i,1),t=!0);return t}removeAllEventListeners(){this.methods.length=0}}const kx=Symbol("previous-visibility");class Mo extends Yn{render(e,t,i){if("addPass"in i)this._unsupported_effectcomposer_warning||(console.warn("RenderTexture.render() does not yet support EffectComposer"),this._unsupported_effectcomposer_warning=!0);else if(i instanceof wr){this.onBeforeRender();const n=i.getRenderTarget(),s=i.xr.enabled;i.xr.enabled=!1,i.setRenderTarget(this),i.clear(!0,!0,!0),i.render(e,t),i.setRenderTarget(n),i.xr.enabled=s,this.onAfterRender()}}static _userSet=new Set;onBeforeRender(){Mo._userSet.clear();const e=Wf(this.texture,!0,null,Mo._userSet);for(const t of e)t instanceof H&&(t[kx]=t.visible,t.visible=!1)}onAfterRender(){for(const e of Mo._userSet)e instanceof H&&(e.visible=e[kx]);Mo._userSet.clear()}}class AR extends tn{constructor(){super([oe,se],"ColorSerializer")}onDeserialize(e){if(e!=null)return e.a!==void 0?new se(e.r,e.g,e.b,e.a):e.alpha!==void 0?new se(e.r,e.g,e.b,e.alpha):new oe(e.r,e.g,e.b)}onSerialize(e){if(e!=null)return e.a!==void 0?{r:e.r,g:e.g,b:e.b,a:e.a}:{r:e.r,g:e.g,b:e.b}}}class IR extends tn{constructor(){super([ht],"EulerSerializer")}onDeserialize(e,t){if(e!=null){if(e.order)return new ht(e.x,e.y,e.z,e.order);if(e.x!=null)return new ht(e.x,e.y,e.z)}}onSerialize(e,t){return{x:e.x,y:e.y,z:e.z,order:e.order}}}class LR extends tn{constructor(){super(M,"ObjectSerializer")}onSerialize(e,t){if(t.objectToNode!==void 0&&e.uuid){const i=t.objectToNode[e.uuid];return _t&&console.log(i,e.name,e.uuid),{node:i}}}onDeserialize(e,t){if(typeof e=="string"){if(e.endsWith(".glb")||e.endsWith(".gltf")){if(t.serializable instanceof Array&&t.serializable.includes(te))return;A()&&be("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");const i=t.target?.constructor?.name;console.warn(`Wrong usage of @serializable detected in your script "${i}"
|
package/dist/needle-engine.d.ts
CHANGED
|
@@ -23519,6 +23519,28 @@ export declare class OrbitControls extends Component implements ICameraControlle
|
|
|
23519
23519
|
export { }
|
|
23520
23520
|
|
|
23521
23521
|
|
|
23522
|
+
declare module 'three' {
|
|
23523
|
+
interface SkinnedMesh {
|
|
23524
|
+
staticGenerator?: StaticGeometryGenerator;
|
|
23525
|
+
staticGeometry?: BufferGeometry;
|
|
23526
|
+
staticGeometryLastUpdate?: number;
|
|
23527
|
+
}
|
|
23528
|
+
interface Mesh {
|
|
23529
|
+
acceleratedRaycast?: any;
|
|
23530
|
+
}
|
|
23531
|
+
interface SkinnedMesh {
|
|
23532
|
+
/** @deprecated use autoUpdateMeshBvhInterval */
|
|
23533
|
+
autoUpdateMeshBVH?: boolean;
|
|
23534
|
+
/**
|
|
23535
|
+
* Interval in milliseconds to automatically update the mesh BVH. When set to >= 0 the BVH will be updated every x milliseconds.
|
|
23536
|
+
* @default undefined (disabled)
|
|
23537
|
+
*/
|
|
23538
|
+
autoUpdateMeshBvhInterval?: number;
|
|
23539
|
+
bvhNeedsUpdate?: boolean;
|
|
23540
|
+
}
|
|
23541
|
+
}
|
|
23542
|
+
|
|
23543
|
+
|
|
23522
23544
|
declare module 'three' {
|
|
23523
23545
|
interface Object3D {
|
|
23524
23546
|
get guid(): string | undefined;
|
|
@@ -23664,25 +23686,3 @@ declare module 'three' {
|
|
|
23664
23686
|
slerp(end: Vector3, t: number): Vector3;
|
|
23665
23687
|
}
|
|
23666
23688
|
}
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
declare module 'three' {
|
|
23670
|
-
interface SkinnedMesh {
|
|
23671
|
-
staticGenerator?: StaticGeometryGenerator;
|
|
23672
|
-
staticGeometry?: BufferGeometry;
|
|
23673
|
-
staticGeometryLastUpdate?: number;
|
|
23674
|
-
}
|
|
23675
|
-
interface Mesh {
|
|
23676
|
-
acceleratedRaycast?: any;
|
|
23677
|
-
}
|
|
23678
|
-
interface SkinnedMesh {
|
|
23679
|
-
/** @deprecated use autoUpdateMeshBvhInterval */
|
|
23680
|
-
autoUpdateMeshBVH?: boolean;
|
|
23681
|
-
/**
|
|
23682
|
-
* Interval in milliseconds to automatically update the mesh BVH. When set to >= 0 the BVH will be updated every x milliseconds.
|
|
23683
|
-
* @default undefined (disabled)
|
|
23684
|
-
*/
|
|
23685
|
-
autoUpdateMeshBvhInterval?: number;
|
|
23686
|
-
bvhNeedsUpdate?: boolean;
|
|
23687
|
-
}
|
|
23688
|
-
}
|
package/dist/needle-engine.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { initEngine as i, GameObject as r, onClear as a, onDestroy as s, onInitialized as l, onAfterRender as d, onBeforeRender as c, onUpdate as m, onStart as p, TypeStore as g, loadAsset as S, NeedleXRSession as u, Context as C, VERSION as y, Component as E, Components as R } from "./needle-engine.bundle-
|
|
2
|
-
import { $componentName as T, $physicsKey as b, ActionBuilder as M, ActionCollection as I, ActionModel as D, Addressables as O, AlignmentConstraint as x, AmbientMode as k, Animation as L, AnimationCurve as B, AnimationExtension as N, AnimationTrackHandler as F, AnimationUtils as w, Animator as U, AnimatorConditionMode as W, AnimatorController as G, AnimatorControllerBuilder as H, AnimatorControllerParameterType as X, AnimatorStateInfo as z, Antialiasing as V, Application as _, AssetDatabase as j, AssetReference as Z, Attractor as K, AudioExtension as Q, AudioListener as $, AudioSource as Y, AudioTrackHandler as J, Avatar as q, AvatarBlink_Simple as ee, AvatarEyeLook_Rotation as te, AvatarLoader as oe, AvatarMarker as re, AvatarModel as ne, Avatar_Brain_LookAt as ie, Avatar_MouthShapes as ae, Avatar_MustacheShake as se, Avatar_POI as le, Axes as de, AxesHelper as ce, BUILD_TIME as me, BaseUIComponent as pe, BasicIKConstraint as ge, BehaviorExtension as Se, BehaviorModel as ue, Component$1 as Ce, BlobStorage as ye, BloomEffect as Ee, BoxCollider as Re, BoxGizmo as he, BoxHelperComponent as fe, Button as ve, ButtonsFactory as Pe, CallDirection as Ae, CallInfo as Te, Camera as be, CameraTargetReachedEvent as Me, Canvas as Ie, CanvasGroup as De, CapsuleCollider as Oe, ChangeMaterialOnClick as xe, ChangeTransformOnClick as ke, CharacterController as Le, CharacterControllerInput as Be, ChromaticAberration as Ne, CircularBuffer as Fe, ClearFlags as we, ClickThrough as Ue, ClipExtrapolation as We, Collider as Ge, Collision as He, CollisionDetectionMode as Xe, ColorAdjustments as ze, ColorBySpeedModule as Ve, ColorOverLifetimeModule as _e, Component$1 as je, ComponentLifecycleEvents as Ze, ConnectionEvents as Ke, ContactPoint as Qe, ContactShadows as $e, ContextArgs as Ye, ContextEvent as Je, ContextRegistry as qe, ControlTrackHandler as et, CursorFollow as tt, CustomBranding as ot, CustomShader as rt, DefaultReflectionMode as nt, Deletable as it, DeleteBox as at, DepthOfField as st, DeviceFlag as lt, DeviceUtilities as dt, DocumentExtension as ct, DragControls as mt, DragMode as pt, DropListener as gt, Duplicatable as St, EffectWrapper as ut, EmissionModule as Ct, EmphasizeOnClick as yt, EngineLoadingView as Et, EnvironmentScene as Rt, EventList as ht, EventListEvent as ft, EventSystem as vt, EventTrigger as Pt, FieldWithDefault as At, FileReference as Tt, FileReferenceSerializer as bt, FileSpawnModel as Mt, File_Event as It, FixedJoint as Dt, Fog as Ot, FontStyle as xt, FrameEvent as kt, GENERATOR as Lt, Gizmos as Bt, GltfExport as Nt, GltfExportBox as Ft, Gradient as wt, Graphic as Ut, GraphicRaycaster as Wt, Graphics as Gt, GridHelper as Ht, GridLayoutGroup as Xt, GroundProjectedEnv as zt, GroupActionModel as Vt, HideFlags as _t, HideOnStart as jt, HingeJoint as Zt, HorizontalLayoutGroup as Kt, HorizontalWrapMode as Qt, HostData as $t, HoverAnimation as Yt, Image as Jt, ImageReference as qt, ImageReferenceSerializer as eo, InheritVelocityModule as to, Input as oo, InputEventQueue as ro, InputEvents as no, InputField as io, InstanceHandle as ao, InstancingHandler as so, InstancingUtil as lo, InstantiateEvent as co, InstantiateIdProvider as mo, InstantiateOptions as po, Interactable as go, InternalScreenshotUtils as So, JoinedRoomResponse as uo, KeyEventArgs as Co, Keyframe as yo, LODGroup as Eo, LODModel as Ro, LeftRoomResponse as ho, Light as fo, LightData as vo, LimitVelocityOverLifetimeModule as Po, LoadingElementOptions as Ao, LogStats as To, LogType as bo, LookAt as Mo, LookAtConstraint as Io, MainModule as Do, MarkerTrackHandler as Oo, MarkerType as xo, MaskableGraphic as ko, MaterialPropertyBlock as Lo, MaterialX as Bo, Mathf as No, MeshCollider as Fo, MeshRenderer as wo, MinMaxCurve as Uo, MinMaxGradient as Wo, NEEDLE_ENGINE_FEATURE_FLAGS as Go, MODULES as Ho, NEKeyboardEvent as Xo, NEPointerEvent as zo, NeedleButtonElement as Vo, ContextRegistry as _o, NeedleEngineModelLoader as jo, NeedleEngineWebComponent as Zo, NeedleMenu as Ko, NeedlePatchesKey as Qo, USDZExporter as $o, NeedleXRController as Yo, NeedleXRSync as Jo, NeedleXRUtils as qo, NestedGltf as er, NetworkConnection as tr, NetworkedStreamEvents as or, NetworkedStreams as rr, Networking as nr, NewInstanceModel as ir, NoiseModule as ar, ObjectRaycaster as sr, ObjectUtils as lr, OffsetConstraint as dr, OneEuroFilter as cr, OneEuroFilterXYZ as mr, OpenURL as pr, OrbitControls as gr, Outline as Sr, OwnershipEvent as ur, OwnershipModel as Cr, PUBLIC_KEY as yr, Padding as Er, ParticleBurst as Rr, ParticleSubEmitter as hr, ParticleSystem as fr, ParticleSystemBaseBehaviour as vr, ParticleSystemRenderer as Pr, ParticleSystemShapeType as Ar, PeerHandle as Tr, PeerNetworking as br, Physics as Mr, PhysicsExtension as Ir, PhysicsMaterialCombine as Dr, PixelationEffect as Or, PlayAnimationOnClick as xr, PlayAudioOnClick as kr, PlayableDirector as Lr, PlayerColor as Br, PlayerState as Nr, PlayerStateEvent as Fr, PlayerSync as wr, PlayerView as Ur, PlayerViewManager as Wr, PointerEventData as Gr, PointerType as Hr, PostProcessing as Xr, PostProcessingEffect as zr, PostProcessingEffectOrder as Vr, PostProcessingHandler as _r, Volume as jr, Prefabs as Zr, PreliminaryAction as Kr, PreliminaryTrigger as Qr, PreviewHelper as $r, PrimitiveType as Yr, Progress as Jr, PromiseAllWithErrors as qr, PromiseErrorResult as en, RGBAColor as tn, RapierPhysics as on, RawImage as rn, RaycastOptions as nn, Rect as an, RectTransform as sn, ReflectionProbe as ln, RegisteredAnimationInfo as dn, RemoteSkybox as cn, RenderTexture as mn, RenderTextureSerializer as pn, Renderer as gn, RendererData as Sn, RendererLightmap as un, Rigidbody as Cn, RigidbodyConstraints as yn, RoomEvents as En, RotationBySpeedModule as Rn, RotationOverLifetimeModule as hn, SceneLightSettings as fn, SceneSwitcher as vn, ScreenCapture as Pn, ScreenSpaceAmbientOcclusion as An, ScreenSpaceAmbientOcclusionN8 as Tn, ScrollFollow as bn, SeeThrough as Mn, SendQueue as In, SerializationContext as Dn, SetActiveOnClick as On, ShadowCatcher as xn, ShapeModule as kn, ShapeOverlapResult as Ln, SharpeningEffect as Bn, SignalAsset as Nn, SignalReceiver as Fn, SignalReceiverEvent as wn, SignalTrackHandler as Un, Size as Wn, SizeBySpeedModule as Gn, SizeOverLifetimeModule as Hn, SkinnedMeshRenderer as Xn, SmoothFollow as zn, SpatialGrabRaycaster as Vn, SpatialHtml as _n, SpatialTrigger as jn, SpatialTriggerReceiver as Zn, SpectatorCamera as Kn, SphereCollider as Qn, SphereIntersection as $n, SplineContainer as Yn, SplineData as Jn, SplineUtils as qn, SplineWalker as ei, Sprite as ti, SpriteData as oi, SpriteRenderer as ri, SpriteSheet as ni, StateMachineBehaviour as ii, StreamEndedEvent as ai, StreamReceivedEvent as si, SubEmitterSystem as li, SyncedCamera as di, SyncedRoom as ci, SyncedTransform as mi, TapGestureTrigger as pi, TeleportTarget as gi, TestRunner as Si, TestSimulateUserData as ui, Text as Ci, TextAnchor as yi, TextBuilder as Ei, TextExtension as Ri, TextureSheetAnimationModule as hi, TiltShiftEffect as fi, Time as vi, ToneMappingEffect as Pi, TrackHandler as Ai, TrackType as Ti, TrailModule as bi, TransformData as Mi, TransformGizmo as Ii, TriggerBuilder as Di, TriggerModel as Oi, UIRaycastUtils as xi, UIRootComponent as ki, USDDocument as Li, USDObject as Bi, USDWriter as Ni, USDZExporter$1 as Fi, USDZText as wi, USDZUIExtension as Ui, UriSerializer as Wi, UsageMarker as Gi, UserJoinedOrLeftRoomModel as Hi, VariantAction as Xi, VelocityOverLifetimeModule as zi, VerticalLayoutGroup as Vi, VerticalWrapMode as _i, VideoPlayer as ji, ViewBox as Zi, ViewDevice as Ki, Vignette as Qi, VisibilityAction as $i, Voip as Yi, Volume as Ji, VolumeParameter as qi, VolumeProfile as ea, WaitForFrames as ta, WaitForPromise as oa, WaitForSeconds as ra, Watch as na, WebARCameraBackground as ia, WebARSessionRoot as aa, WebXR as sa, WebXRButtonFactory as la, WebXRImageTracking as da, WebXRImageTrackingModel as ca, WebXRPlaneTracking as ma, WebXRTrackedImage as pa, XRControllerFollow as ga, XRControllerModel as Sa, XRControllerMovement as ua, XRFlag as Ca, XRRig as ya, XRState as Ea, XRStateFlag as Ra, __Ignore as ha, __internalNotifyObjectDestroyed as fa, activeInHierarchyFieldName as va, addAttributeChangeCallback as Pa, addComponent as Aa, addCustomExtensionPlugin as Ta, addNewComponent as ba, addPatch as Ma, apply as Ia, applyHMRChanges as Da, applyPrototypeExtensions as Oa, beginListenDestroy as xa, beginListenInstantiate as ka, binaryIdentifierCasts as La, build_scene_functions as Ba, builtinComponentKeyName as Na, calculateProgress01 as Fa, clearMessages as wa, clearMessages as Ua, colorSerializer as Wa, compareAssociation as Ga, componentSerializer as Ha, copyTexture as Xa, createMotion as za, debugNet as Va, debugOwner as _a, decompressGpuTexture as ja, deepClone as Za, delay as Ka, delayForFrames as Qa, deserializeObject as $a, destroy as Ya, destroyComponentInstance as Ja, determineMimeTypeFromExtension as qa, disposeObjectResources as es, disposeStream as ts, editorGuidKeyName as os, enableSpatialConsole as rs, eventListSerializer as ns, exportAsGLTF as is, findByGuid as as, findObjectOfType as ss, findObjectsOfType as ls, findResourceUsers as ds, fitCamera as cs, fitObjectIntoVolume as ms, foreachComponent as ps, foreachComponentEnumerator as gs, forward as Ss, generateQRCode as us, generateSeed as Cs, getBoundingBox as ys, getCameraController as Es, getComponent as Rs, getComponentInChildren as hs, getComponentInParent as fs, getComponents as vs, getComponentsInChildren as Ps, getComponentsInParent as As, getFormattedDate as Ts, getIconElement as bs, getIconTexture as Ms, getLoader as Is, getOrAddComponent as Ds, getParam as Os, getParentHierarchyPath as xs, getPath as ks, getPeerOptions as Ls, getPeerjsInstance as Bs, getResourceUserCount as Ns, getSceneData as Fs, getTempColor as ws, getTempQuaternion as Us, getTempVector as Ws, getUrlParams as Gs, getVisibleInCustomShadowRendering as Hs, getWorldDirection as Xs, getWorldEuler as zs, getWorldPosition as Vs, getWorldQuaternion as _s, getWorldRotation as js, getWorldScale as Zs, hasCommercialLicense as Ks, hasIndieLicense as Qs, hasPointerEventComponent as $s, hasProLicense as Ys, hideDebugConsole as Js, imageToCanvas as qs, initAddressableSerializers as el, initBuiltinSerializers as tl, initPhysics as ol, initVolumeParameterSerializer as rl, instantiate as nl, invokeLoadedImportPluginHooks as il, invokeXRSessionEnd as al, invokeXRSessionStart as sl, isActiveInHierarchy as ll, isActiveSelf as dl, isAndroidDevice as cl, isAnimationAction as ml, isComponent as pl, isDebugMode as gl, isDesktop as Sl, isDestroyed as ul, isDevEnvironment as Cl, isDisposed as yl, isExporting as El, isGLTFModel as Rl, isHostedOnGlitch as hl, isHotReloadEnabled as fl, isHotReloading as vl, isIPad as Pl, isIconElement as Al, isLocalNetwork as Tl, isMacOS as bl, isMobileDevice as Ml, isMozillaXR as Il, isQuest as Dl, isResourceTrackingEnabled as Ol, isSafari as xl, isUsingInstancing as kl, isiOS as Ll, isiPad as Bl, loadPMREM as Nl, loadSync as Fl, logHierarchy as wl, lookAtInverse as Ul, lookAtObject as Wl, lookAtScreenPoint as Gl, makeId as Hl, makeIdFromRandomWords as Xl, makeNameSafe as zl, markAsInstancedRendered as Vl, microphonePermissionsGranted as _l, nameof as jl, nameofFactory as Zl, needle as Kl, objectSerializer as Ql, offBeforeXRSession as $l, offXRSessionEnd as Yl, offXRSessionStart as Jl, onBeforeXRSession as ql, onSyncDestroy as ed, onSyncInstantiate as td, onXRSessionEnd as od, onXRSessionStart as rd, parseSync as nd, placeOnSurface as id, postprocessFBXMaterials as ad, prefix as sd, pushState as ld, randomNumber as dd, registerBinaryType as cd, registerComponent as md, registerComponentExtension as pd, registerCustomEffectType as gd, registerExportExtensions as Sd, registerExtensions as ud, registerHotReloadType as Cd, registerLoader as yd, registerPrefabProvider as Ed, registerPrototypeExtensions as Rd, registerType as hd, relativePathPrefix as fd, removeAttributeChangeCallback as vd, removeComponent as Pd, removeCustomImportExtensionType as Ad, removePatch as Td, resolveUrl as bd, sanitizeString as Md, saveImage as Id, screenshot as Dd, screenshot2 as Od, sendDestroyed as xd, serializable as kd, serializeObject as Ld, serializeable as Bd, setActive as Nd, setAllowBalloonMessages as Fd, setAllowOverlayMessages as wd, setAutoFitEnabled as Ud, setCameraController as Wd, setDestroyed as Gd, setDevEnvironment as Hd, setDisposable as Xd, setDontDestroy as zd, setOrAddParamsToUrl as Vd, setParam as _d, setParamWithoutReload as jd, setPeerOptions as Zd, setResourceTrackingEnabled as Kd, setState as Qd, setVisibleInCustomShadowRendering as $d, setWorldEuler as Yd, setWorldPosition as Jd, setWorldPositionXYZ as qd, setWorldQuaternion as ec, setWorldQuaternionXYZW as tc, setWorldRotation as oc, setWorldRotationXYZ as rc, setWorldScale as nc, showBalloonError as ic, showBalloonMessage as ac, showBalloonWarning as sc, showDebugConsole as lc, slerp as dc, syncDestroy as cc, syncField as mc, syncInstantiate as pc, textureToCanvas as gc, toSourceId as Sc, tryCastBinary as uc, tryDetermineMimetypeFromBinary as Cc, tryDetermineMimetypeFromURL as yc, tryFindObject as Ec, tryGetGuid as Rc, unregisterHotReloadType as hc, unregisterPrefabProvider as fc, unwatchWrite as vc, useForAutoFit as Pc, validate as Ac, watchWrite as Tc } from "./needle-engine.bundle-CcPGKcD_.js";
|
|
1
|
+
import { initEngine as i, GameObject as r, onClear as a, onDestroy as s, onInitialized as l, onAfterRender as d, onBeforeRender as c, onUpdate as m, onStart as p, TypeStore as g, loadAsset as S, NeedleXRSession as u, Context as C, VERSION as y, Component as E, Components as R } from "./needle-engine.bundle-D6w6CUmG.js";
|
|
2
|
+
import { $componentName as T, $physicsKey as b, ActionBuilder as M, ActionCollection as I, ActionModel as D, Addressables as O, AlignmentConstraint as x, AmbientMode as k, Animation as L, AnimationCurve as B, AnimationExtension as N, AnimationTrackHandler as F, AnimationUtils as w, Animator as U, AnimatorConditionMode as W, AnimatorController as G, AnimatorControllerBuilder as H, AnimatorControllerParameterType as X, AnimatorStateInfo as z, Antialiasing as V, Application as _, AssetDatabase as j, AssetReference as Z, Attractor as K, AudioExtension as Q, AudioListener as $, AudioSource as Y, AudioTrackHandler as J, Avatar as q, AvatarBlink_Simple as ee, AvatarEyeLook_Rotation as te, AvatarLoader as oe, AvatarMarker as re, AvatarModel as ne, Avatar_Brain_LookAt as ie, Avatar_MouthShapes as ae, Avatar_MustacheShake as se, Avatar_POI as le, Axes as de, AxesHelper as ce, BUILD_TIME as me, BaseUIComponent as pe, BasicIKConstraint as ge, BehaviorExtension as Se, BehaviorModel as ue, Component$1 as Ce, BlobStorage as ye, BloomEffect as Ee, BoxCollider as Re, BoxGizmo as he, BoxHelperComponent as fe, Button as ve, ButtonsFactory as Pe, CallDirection as Ae, CallInfo as Te, Camera as be, CameraTargetReachedEvent as Me, Canvas as Ie, CanvasGroup as De, CapsuleCollider as Oe, ChangeMaterialOnClick as xe, ChangeTransformOnClick as ke, CharacterController as Le, CharacterControllerInput as Be, ChromaticAberration as Ne, CircularBuffer as Fe, ClearFlags as we, ClickThrough as Ue, ClipExtrapolation as We, Collider as Ge, Collision as He, CollisionDetectionMode as Xe, ColorAdjustments as ze, ColorBySpeedModule as Ve, ColorOverLifetimeModule as _e, Component$1 as je, ComponentLifecycleEvents as Ze, ConnectionEvents as Ke, ContactPoint as Qe, ContactShadows as $e, ContextArgs as Ye, ContextEvent as Je, ContextRegistry as qe, ControlTrackHandler as et, CursorFollow as tt, CustomBranding as ot, CustomShader as rt, DefaultReflectionMode as nt, Deletable as it, DeleteBox as at, DepthOfField as st, DeviceFlag as lt, DeviceUtilities as dt, DocumentExtension as ct, DragControls as mt, DragMode as pt, DropListener as gt, Duplicatable as St, EffectWrapper as ut, EmissionModule as Ct, EmphasizeOnClick as yt, EngineLoadingView as Et, EnvironmentScene as Rt, EventList as ht, EventListEvent as ft, EventSystem as vt, EventTrigger as Pt, FieldWithDefault as At, FileReference as Tt, FileReferenceSerializer as bt, FileSpawnModel as Mt, File_Event as It, FixedJoint as Dt, Fog as Ot, FontStyle as xt, FrameEvent as kt, GENERATOR as Lt, Gizmos as Bt, GltfExport as Nt, GltfExportBox as Ft, Gradient as wt, Graphic as Ut, GraphicRaycaster as Wt, Graphics as Gt, GridHelper as Ht, GridLayoutGroup as Xt, GroundProjectedEnv as zt, GroupActionModel as Vt, HideFlags as _t, HideOnStart as jt, HingeJoint as Zt, HorizontalLayoutGroup as Kt, HorizontalWrapMode as Qt, HostData as $t, HoverAnimation as Yt, Image as Jt, ImageReference as qt, ImageReferenceSerializer as eo, InheritVelocityModule as to, Input as oo, InputEventQueue as ro, InputEvents as no, InputField as io, InstanceHandle as ao, InstancingHandler as so, InstancingUtil as lo, InstantiateEvent as co, InstantiateIdProvider as mo, InstantiateOptions as po, Interactable as go, InternalScreenshotUtils as So, JoinedRoomResponse as uo, KeyEventArgs as Co, Keyframe as yo, LODGroup as Eo, LODModel as Ro, LeftRoomResponse as ho, Light as fo, LightData as vo, LimitVelocityOverLifetimeModule as Po, LoadingElementOptions as Ao, LogStats as To, LogType as bo, LookAt as Mo, LookAtConstraint as Io, MainModule as Do, MarkerTrackHandler as Oo, MarkerType as xo, MaskableGraphic as ko, MaterialPropertyBlock as Lo, MaterialX as Bo, Mathf as No, MeshCollider as Fo, MeshRenderer as wo, MinMaxCurve as Uo, MinMaxGradient as Wo, NEEDLE_ENGINE_FEATURE_FLAGS as Go, MODULES as Ho, NEKeyboardEvent as Xo, NEPointerEvent as zo, NeedleButtonElement as Vo, ContextRegistry as _o, NeedleEngineModelLoader as jo, NeedleEngineWebComponent as Zo, NeedleMenu as Ko, NeedlePatchesKey as Qo, USDZExporter as $o, NeedleXRController as Yo, NeedleXRSync as Jo, NeedleXRUtils as qo, NestedGltf as er, NetworkConnection as tr, NetworkedStreamEvents as or, NetworkedStreams as rr, Networking as nr, NewInstanceModel as ir, NoiseModule as ar, ObjectRaycaster as sr, ObjectUtils as lr, OffsetConstraint as dr, OneEuroFilter as cr, OneEuroFilterXYZ as mr, OpenURL as pr, OrbitControls as gr, Outline as Sr, OwnershipEvent as ur, OwnershipModel as Cr, PUBLIC_KEY as yr, Padding as Er, ParticleBurst as Rr, ParticleSubEmitter as hr, ParticleSystem as fr, ParticleSystemBaseBehaviour as vr, ParticleSystemRenderer as Pr, ParticleSystemShapeType as Ar, PeerHandle as Tr, PeerNetworking as br, Physics as Mr, PhysicsExtension as Ir, PhysicsMaterialCombine as Dr, PixelationEffect as Or, PlayAnimationOnClick as xr, PlayAudioOnClick as kr, PlayableDirector as Lr, PlayerColor as Br, PlayerState as Nr, PlayerStateEvent as Fr, PlayerSync as wr, PlayerView as Ur, PlayerViewManager as Wr, PointerEventData as Gr, PointerType as Hr, PostProcessing as Xr, PostProcessingEffect as zr, PostProcessingEffectOrder as Vr, PostProcessingHandler as _r, Volume as jr, Prefabs as Zr, PreliminaryAction as Kr, PreliminaryTrigger as Qr, PreviewHelper as $r, PrimitiveType as Yr, Progress as Jr, PromiseAllWithErrors as qr, PromiseErrorResult as en, RGBAColor as tn, RapierPhysics as on, RawImage as rn, RaycastOptions as nn, Rect as an, RectTransform as sn, ReflectionProbe as ln, RegisteredAnimationInfo as dn, RemoteSkybox as cn, RenderTexture as mn, RenderTextureSerializer as pn, Renderer as gn, RendererData as Sn, RendererLightmap as un, Rigidbody as Cn, RigidbodyConstraints as yn, RoomEvents as En, RotationBySpeedModule as Rn, RotationOverLifetimeModule as hn, SceneLightSettings as fn, SceneSwitcher as vn, ScreenCapture as Pn, ScreenSpaceAmbientOcclusion as An, ScreenSpaceAmbientOcclusionN8 as Tn, ScrollFollow as bn, SeeThrough as Mn, SendQueue as In, SerializationContext as Dn, SetActiveOnClick as On, ShadowCatcher as xn, ShapeModule as kn, ShapeOverlapResult as Ln, SharpeningEffect as Bn, SignalAsset as Nn, SignalReceiver as Fn, SignalReceiverEvent as wn, SignalTrackHandler as Un, Size as Wn, SizeBySpeedModule as Gn, SizeOverLifetimeModule as Hn, SkinnedMeshRenderer as Xn, SmoothFollow as zn, SpatialGrabRaycaster as Vn, SpatialHtml as _n, SpatialTrigger as jn, SpatialTriggerReceiver as Zn, SpectatorCamera as Kn, SphereCollider as Qn, SphereIntersection as $n, SplineContainer as Yn, SplineData as Jn, SplineUtils as qn, SplineWalker as ei, Sprite as ti, SpriteData as oi, SpriteRenderer as ri, SpriteSheet as ni, StateMachineBehaviour as ii, StreamEndedEvent as ai, StreamReceivedEvent as si, SubEmitterSystem as li, SyncedCamera as di, SyncedRoom as ci, SyncedTransform as mi, TapGestureTrigger as pi, TeleportTarget as gi, TestRunner as Si, TestSimulateUserData as ui, Text as Ci, TextAnchor as yi, TextBuilder as Ei, TextExtension as Ri, TextureSheetAnimationModule as hi, TiltShiftEffect as fi, Time as vi, ToneMappingEffect as Pi, TrackHandler as Ai, TrackType as Ti, TrailModule as bi, TransformData as Mi, TransformGizmo as Ii, TriggerBuilder as Di, TriggerModel as Oi, UIRaycastUtils as xi, UIRootComponent as ki, USDDocument as Li, USDObject as Bi, USDWriter as Ni, USDZExporter$1 as Fi, USDZText as wi, USDZUIExtension as Ui, UriSerializer as Wi, UsageMarker as Gi, UserJoinedOrLeftRoomModel as Hi, VariantAction as Xi, VelocityOverLifetimeModule as zi, VerticalLayoutGroup as Vi, VerticalWrapMode as _i, VideoPlayer as ji, ViewBox as Zi, ViewDevice as Ki, Vignette as Qi, VisibilityAction as $i, Voip as Yi, Volume as Ji, VolumeParameter as qi, VolumeProfile as ea, WaitForFrames as ta, WaitForPromise as oa, WaitForSeconds as ra, Watch as na, WebARCameraBackground as ia, WebARSessionRoot as aa, WebXR as sa, WebXRButtonFactory as la, WebXRImageTracking as da, WebXRImageTrackingModel as ca, WebXRPlaneTracking as ma, WebXRTrackedImage as pa, XRControllerFollow as ga, XRControllerModel as Sa, XRControllerMovement as ua, XRFlag as Ca, XRRig as ya, XRState as Ea, XRStateFlag as Ra, __Ignore as ha, __internalNotifyObjectDestroyed as fa, activeInHierarchyFieldName as va, addAttributeChangeCallback as Pa, addComponent as Aa, addCustomExtensionPlugin as Ta, addNewComponent as ba, addPatch as Ma, apply as Ia, applyHMRChanges as Da, applyPrototypeExtensions as Oa, beginListenDestroy as xa, beginListenInstantiate as ka, binaryIdentifierCasts as La, build_scene_functions as Ba, builtinComponentKeyName as Na, calculateProgress01 as Fa, clearMessages as wa, clearMessages as Ua, colorSerializer as Wa, compareAssociation as Ga, componentSerializer as Ha, copyTexture as Xa, createMotion as za, debugNet as Va, debugOwner as _a, decompressGpuTexture as ja, deepClone as Za, delay as Ka, delayForFrames as Qa, deserializeObject as $a, destroy as Ya, destroyComponentInstance as Ja, determineMimeTypeFromExtension as qa, disposeObjectResources as es, disposeStream as ts, editorGuidKeyName as os, enableSpatialConsole as rs, eventListSerializer as ns, exportAsGLTF as is, findByGuid as as, findObjectOfType as ss, findObjectsOfType as ls, findResourceUsers as ds, fitCamera as cs, fitObjectIntoVolume as ms, foreachComponent as ps, foreachComponentEnumerator as gs, forward as Ss, generateQRCode as us, generateSeed as Cs, getBoundingBox as ys, getCameraController as Es, getComponent as Rs, getComponentInChildren as hs, getComponentInParent as fs, getComponents as vs, getComponentsInChildren as Ps, getComponentsInParent as As, getFormattedDate as Ts, getIconElement as bs, getIconTexture as Ms, getLoader as Is, getOrAddComponent as Ds, getParam as Os, getParentHierarchyPath as xs, getPath as ks, getPeerOptions as Ls, getPeerjsInstance as Bs, getResourceUserCount as Ns, getSceneData as Fs, getTempColor as ws, getTempQuaternion as Us, getTempVector as Ws, getUrlParams as Gs, getVisibleInCustomShadowRendering as Hs, getWorldDirection as Xs, getWorldEuler as zs, getWorldPosition as Vs, getWorldQuaternion as _s, getWorldRotation as js, getWorldScale as Zs, hasCommercialLicense as Ks, hasIndieLicense as Qs, hasPointerEventComponent as $s, hasProLicense as Ys, hideDebugConsole as Js, imageToCanvas as qs, initAddressableSerializers as el, initBuiltinSerializers as tl, initPhysics as ol, initVolumeParameterSerializer as rl, instantiate as nl, invokeLoadedImportPluginHooks as il, invokeXRSessionEnd as al, invokeXRSessionStart as sl, isActiveInHierarchy as ll, isActiveSelf as dl, isAndroidDevice as cl, isAnimationAction as ml, isComponent as pl, isDebugMode as gl, isDesktop as Sl, isDestroyed as ul, isDevEnvironment as Cl, isDisposed as yl, isExporting as El, isGLTFModel as Rl, isHostedOnGlitch as hl, isHotReloadEnabled as fl, isHotReloading as vl, isIPad as Pl, isIconElement as Al, isLocalNetwork as Tl, isMacOS as bl, isMobileDevice as Ml, isMozillaXR as Il, isQuest as Dl, isResourceTrackingEnabled as Ol, isSafari as xl, isUsingInstancing as kl, isiOS as Ll, isiPad as Bl, loadPMREM as Nl, loadSync as Fl, logHierarchy as wl, lookAtInverse as Ul, lookAtObject as Wl, lookAtScreenPoint as Gl, makeId as Hl, makeIdFromRandomWords as Xl, makeNameSafe as zl, markAsInstancedRendered as Vl, microphonePermissionsGranted as _l, nameof as jl, nameofFactory as Zl, needle as Kl, objectSerializer as Ql, offBeforeXRSession as $l, offXRSessionEnd as Yl, offXRSessionStart as Jl, onBeforeXRSession as ql, onSyncDestroy as ed, onSyncInstantiate as td, onXRSessionEnd as od, onXRSessionStart as rd, parseSync as nd, placeOnSurface as id, postprocessFBXMaterials as ad, prefix as sd, pushState as ld, randomNumber as dd, registerBinaryType as cd, registerComponent as md, registerComponentExtension as pd, registerCustomEffectType as gd, registerExportExtensions as Sd, registerExtensions as ud, registerHotReloadType as Cd, registerLoader as yd, registerPrefabProvider as Ed, registerPrototypeExtensions as Rd, registerType as hd, relativePathPrefix as fd, removeAttributeChangeCallback as vd, removeComponent as Pd, removeCustomImportExtensionType as Ad, removePatch as Td, resolveUrl as bd, sanitizeString as Md, saveImage as Id, screenshot as Dd, screenshot2 as Od, sendDestroyed as xd, serializable as kd, serializeObject as Ld, serializeable as Bd, setActive as Nd, setAllowBalloonMessages as Fd, setAllowOverlayMessages as wd, setAutoFitEnabled as Ud, setCameraController as Wd, setDestroyed as Gd, setDevEnvironment as Hd, setDisposable as Xd, setDontDestroy as zd, setOrAddParamsToUrl as Vd, setParam as _d, setParamWithoutReload as jd, setPeerOptions as Zd, setResourceTrackingEnabled as Kd, setState as Qd, setVisibleInCustomShadowRendering as $d, setWorldEuler as Yd, setWorldPosition as Jd, setWorldPositionXYZ as qd, setWorldQuaternion as ec, setWorldQuaternionXYZW as tc, setWorldRotation as oc, setWorldRotationXYZ as rc, setWorldScale as nc, showBalloonError as ic, showBalloonMessage as ac, showBalloonWarning as sc, showDebugConsole as lc, slerp as dc, syncDestroy as cc, syncField as mc, syncInstantiate as pc, textureToCanvas as gc, toSourceId as Sc, tryCastBinary as uc, tryDetermineMimetypeFromBinary as Cc, tryDetermineMimetypeFromURL as yc, tryFindObject as Ec, tryGetGuid as Rc, unregisterHotReloadType as hc, unregisterPrefabProvider as fc, unwatchWrite as vc, useForAutoFit as Pc, validate as Ac, watchWrite as Tc } from "./needle-engine.bundle-D6w6CUmG.js";
|
|
3
3
|
import { THREE as h } from "./three.js";
|
|
4
4
|
import { NEEDLE_progressive as Mc } from "./gltf-progressive-DUlhxdv4.js";
|
|
5
5
|
i();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initEngine as y,GameObject as s,onClear as o,onDestroy as r,onInitialized as n,onAfterRender as i,onBeforeRender as l,onUpdate as d,onStart as c,TypeStore as m,loadAsset as p,NeedleXRSession as g,Context as S,VERSION as u,Component as E,Components as R}from"./needle-engine.bundle-CJmix0Oo.min.js";import{$componentName as h,$physicsKey as f,ActionBuilder as v,ActionCollection as P,ActionModel as A,Addressables as T,AlignmentConstraint as M,AmbientMode as b,Animation as I,AnimationCurve as D,AnimationExtension as O,AnimationTrackHandler as x,AnimationUtils as k,Animator as L,AnimatorConditionMode as B,AnimatorController as F,AnimatorControllerBuilder as N,AnimatorControllerParameterType as W,AnimatorStateInfo as w,Antialiasing as G,Application as U,AssetDatabase as H,AssetReference as X,Attractor as z,AudioExtension as V,AudioListener as _,AudioSource as j,AudioTrackHandler as K,Avatar as Q,AvatarBlink_Simple as Z,AvatarEyeLook_Rotation as Y,AvatarLoader as J,AvatarMarker as $,AvatarModel as q,Avatar_Brain_LookAt as ee,Avatar_MouthShapes as ae,Avatar_MustacheShake as se,Avatar_POI as te,Axes as oe,AxesHelper as re,BUILD_TIME as ne,BaseUIComponent as ie,BasicIKConstraint as le,BehaviorExtension as de,BehaviorModel as ce,Component$1 as me,BlobStorage as pe,BloomEffect as ge,BoxCollider as Se,BoxGizmo as ue,BoxHelperComponent as Ce,Button as ye,ButtonsFactory as Ee,CallDirection as Re,CallInfo as he,Camera as fe,CameraTargetReachedEvent as ve,Canvas as Pe,CanvasGroup as Ae,CapsuleCollider as Te,ChangeMaterialOnClick as Me,ChangeTransformOnClick as be,CharacterController as Ie,CharacterControllerInput as De,ChromaticAberration as Oe,CircularBuffer as xe,ClearFlags as ke,ClickThrough as Le,ClipExtrapolation as Be,Collider as Fe,Collision as Ne,CollisionDetectionMode as We,ColorAdjustments as we,ColorBySpeedModule as Ge,ColorOverLifetimeModule as Ue,Component$1 as He,ComponentLifecycleEvents as Xe,ConnectionEvents as ze,ContactPoint as Ve,ContactShadows as _e,ContextArgs as je,ContextEvent as Ke,ContextRegistry as Qe,ControlTrackHandler as Ze,CursorFollow as Ye,CustomBranding as Je,CustomShader as $e,DefaultReflectionMode as qe,Deletable as ea,DeleteBox as aa,DepthOfField as sa,DeviceFlag as ta,DeviceUtilities as oa,DocumentExtension as ra,DragControls as na,DragMode as ia,DropListener as la,Duplicatable as da,EffectWrapper as ca,EmissionModule as ma,EmphasizeOnClick as pa,EngineLoadingView as ga,EnvironmentScene as Sa,EventList as ua,EventListEvent as Ca,EventSystem as ya,EventTrigger as Ea,FieldWithDefault as Ra,FileReference as ha,FileReferenceSerializer as fa,FileSpawnModel as va,File_Event as Pa,FixedJoint as Aa,Fog as Ta,FontStyle as Ma,FrameEvent as ba,GENERATOR as Ia,Gizmos as Da,GltfExport as Oa,GltfExportBox as xa,Gradient as ka,Graphic as La,GraphicRaycaster as Ba,Graphics as Fa,GridHelper as Na,GridLayoutGroup as Wa,GroundProjectedEnv as wa,GroupActionModel as Ga,HideFlags as Ua,HideOnStart as Ha,HingeJoint as Xa,HorizontalLayoutGroup as za,HorizontalWrapMode as Va,HostData as _a,HoverAnimation as ja,Image as Ka,ImageReference as Qa,ImageReferenceSerializer as Za,InheritVelocityModule as Ya,Input as Ja,InputEventQueue as $a,InputEvents as qa,InputField as es,InstanceHandle as as,InstancingHandler as ss,InstancingUtil as ts,InstantiateEvent as os,InstantiateIdProvider as rs,InstantiateOptions as ns,Interactable as is,InternalScreenshotUtils as ls,JoinedRoomResponse as ds,KeyEventArgs as cs,Keyframe as ms,LODGroup as ps,LODModel as gs,LeftRoomResponse as Ss,Light as us,LightData as Cs,LimitVelocityOverLifetimeModule as ys,LoadingElementOptions as Es,LogStats as Rs,LogType as hs,LookAt as fs,LookAtConstraint as vs,MainModule as Ps,MarkerTrackHandler as As,MarkerType as Ts,MaskableGraphic as Ms,MaterialPropertyBlock as bs,MaterialX as Is,Mathf as Ds,MeshCollider as Os,MeshRenderer as xs,MinMaxCurve as ks,MinMaxGradient as Ls,NEEDLE_ENGINE_FEATURE_FLAGS as Bs,MODULES as Fs,NEKeyboardEvent as Ns,NEPointerEvent as Ws,NeedleButtonElement as ws,ContextRegistry as Gs,NeedleEngineModelLoader as Us,NeedleEngineWebComponent as Hs,NeedleMenu as Xs,NeedlePatchesKey as zs,USDZExporter as Vs,NeedleXRController as _s,NeedleXRSync as js,NeedleXRUtils as Ks,NestedGltf as Qs,NetworkConnection as Zs,NetworkedStreamEvents as Ys,NetworkedStreams as Js,Networking as $s,NewInstanceModel as qs,NoiseModule as et,ObjectRaycaster as at,ObjectUtils as st,OffsetConstraint as tt,OneEuroFilter as ot,OneEuroFilterXYZ as rt,OpenURL as nt,OrbitControls as it,Outline as lt,OwnershipEvent as dt,OwnershipModel as ct,PUBLIC_KEY as mt,Padding as pt,ParticleBurst as gt,ParticleSubEmitter as St,ParticleSystem as ut,ParticleSystemBaseBehaviour as Ct,ParticleSystemRenderer as yt,ParticleSystemShapeType as Et,PeerHandle as Rt,PeerNetworking as ht,Physics as ft,PhysicsExtension as vt,PhysicsMaterialCombine as Pt,PixelationEffect as At,PlayAnimationOnClick as Tt,PlayAudioOnClick as Mt,PlayableDirector as bt,PlayerColor as It,PlayerState as Dt,PlayerStateEvent as Ot,PlayerSync as xt,PlayerView as kt,PlayerViewManager as Lt,PointerEventData as Bt,PointerType as Ft,PostProcessing as Nt,PostProcessingEffect as Wt,PostProcessingEffectOrder as wt,PostProcessingHandler as Gt,Volume as Ut,Prefabs as Ht,PreliminaryAction as Xt,PreliminaryTrigger as zt,PreviewHelper as Vt,PrimitiveType as _t,Progress as jt,PromiseAllWithErrors as Kt,PromiseErrorResult as Qt,RGBAColor as Zt,RapierPhysics as Yt,RawImage as Jt,RaycastOptions as $t,Rect as qt,RectTransform as eo,ReflectionProbe as ao,RegisteredAnimationInfo as so,RemoteSkybox as to,RenderTexture as oo,RenderTextureSerializer as ro,Renderer as no,RendererData as io,RendererLightmap as lo,Rigidbody as co,RigidbodyConstraints as mo,RoomEvents as po,RotationBySpeedModule as go,RotationOverLifetimeModule as So,SceneLightSettings as uo,SceneSwitcher as Co,ScreenCapture as yo,ScreenSpaceAmbientOcclusion as Eo,ScreenSpaceAmbientOcclusionN8 as Ro,ScrollFollow as ho,SeeThrough as fo,SendQueue as vo,SerializationContext as Po,SetActiveOnClick as Ao,ShadowCatcher as To,ShapeModule as Mo,ShapeOverlapResult as bo,SharpeningEffect as Io,SignalAsset as Do,SignalReceiver as Oo,SignalReceiverEvent as xo,SignalTrackHandler as ko,Size as Lo,SizeBySpeedModule as Bo,SizeOverLifetimeModule as Fo,SkinnedMeshRenderer as No,SmoothFollow as Wo,SpatialGrabRaycaster as wo,SpatialHtml as Go,SpatialTrigger as Uo,SpatialTriggerReceiver as Ho,SpectatorCamera as Xo,SphereCollider as zo,SphereIntersection as Vo,SplineContainer as _o,SplineData as jo,SplineUtils as Ko,SplineWalker as Qo,Sprite as Zo,SpriteData as Yo,SpriteRenderer as Jo,SpriteSheet as $o,StateMachineBehaviour as qo,StreamEndedEvent as er,StreamReceivedEvent as ar,SubEmitterSystem as sr,SyncedCamera as tr,SyncedRoom as or,SyncedTransform as rr,TapGestureTrigger as nr,TeleportTarget as ir,TestRunner as lr,TestSimulateUserData as dr,Text as cr,TextAnchor as mr,TextBuilder as pr,TextExtension as gr,TextureSheetAnimationModule as Sr,TiltShiftEffect as ur,Time as Cr,ToneMappingEffect as yr,TrackHandler as Er,TrackType as Rr,TrailModule as hr,TransformData as fr,TransformGizmo as vr,TriggerBuilder as Pr,TriggerModel as Ar,UIRaycastUtils as Tr,UIRootComponent as Mr,USDDocument as br,USDObject as Ir,USDWriter as Dr,USDZExporter$1 as Or,USDZText as xr,USDZUIExtension as kr,UriSerializer as Lr,UsageMarker as Br,UserJoinedOrLeftRoomModel as Fr,VariantAction as Nr,VelocityOverLifetimeModule as Wr,VerticalLayoutGroup as wr,VerticalWrapMode as Gr,VideoPlayer as Ur,ViewBox as Hr,ViewDevice as Xr,Vignette as zr,VisibilityAction as Vr,Voip as _r,Volume as jr,VolumeParameter as Kr,VolumeProfile as Qr,WaitForFrames as Zr,WaitForPromise as Yr,WaitForSeconds as Jr,Watch as $r,WebARCameraBackground as qr,WebARSessionRoot as en,WebXR as an,WebXRButtonFactory as sn,WebXRImageTracking as tn,WebXRImageTrackingModel as on,WebXRPlaneTracking as rn,WebXRTrackedImage as nn,XRControllerFollow as ln,XRControllerModel as dn,XRControllerMovement as cn,XRFlag as mn,XRRig as pn,XRState as gn,XRStateFlag as Sn,__Ignore as un,__internalNotifyObjectDestroyed as Cn,activeInHierarchyFieldName as yn,addAttributeChangeCallback as En,addComponent as Rn,addCustomExtensionPlugin as hn,addNewComponent as fn,addPatch as vn,apply as Pn,applyHMRChanges as An,applyPrototypeExtensions as Tn,beginListenDestroy as Mn,beginListenInstantiate as bn,binaryIdentifierCasts as In,build_scene_functions as Dn,builtinComponentKeyName as On,calculateProgress01 as xn,clearMessages as kn,clearMessages as Ln,colorSerializer as Bn,compareAssociation as Fn,componentSerializer as Nn,copyTexture as Wn,createMotion as wn,debugNet as Gn,debugOwner as Un,decompressGpuTexture as Hn,deepClone as Xn,delay as zn,delayForFrames as Vn,deserializeObject as _n,destroy as jn,destroyComponentInstance as Kn,determineMimeTypeFromExtension as Qn,disposeObjectResources as Zn,disposeStream as Yn,editorGuidKeyName as Jn,enableSpatialConsole as $n,eventListSerializer as qn,exportAsGLTF as ei,findByGuid as ai,findObjectOfType as si,findObjectsOfType as ti,findResourceUsers as oi,fitCamera as ri,fitObjectIntoVolume as ni,foreachComponent as ii,foreachComponentEnumerator as li,forward as di,generateQRCode as ci,generateSeed as mi,getBoundingBox as pi,getCameraController as gi,getComponent as Si,getComponentInChildren as ui,getComponentInParent as Ci,getComponents as yi,getComponentsInChildren as Ei,getComponentsInParent as Ri,getFormattedDate as hi,getIconElement as fi,getIconTexture as vi,getLoader as Pi,getOrAddComponent as Ai,getParam as Ti,getParentHierarchyPath as Mi,getPath as bi,getPeerOptions as Ii,getPeerjsInstance as Di,getResourceUserCount as Oi,getSceneData as xi,getTempColor as ki,getTempQuaternion as Li,getTempVector as Bi,getUrlParams as Fi,getVisibleInCustomShadowRendering as Ni,getWorldDirection as Wi,getWorldEuler as wi,getWorldPosition as Gi,getWorldQuaternion as Ui,getWorldRotation as Hi,getWorldScale as Xi,hasCommercialLicense as zi,hasIndieLicense as Vi,hasPointerEventComponent as _i,hasProLicense as ji,hideDebugConsole as Ki,imageToCanvas as Qi,initAddressableSerializers as Zi,initBuiltinSerializers as Yi,initPhysics as Ji,initVolumeParameterSerializer as $i,instantiate as qi,invokeLoadedImportPluginHooks as el,invokeXRSessionEnd as al,invokeXRSessionStart as sl,isActiveInHierarchy as tl,isActiveSelf as ol,isAndroidDevice as rl,isAnimationAction as nl,isComponent as il,isDebugMode as ll,isDesktop as dl,isDestroyed as cl,isDevEnvironment as ml,isDisposed as pl,isExporting as gl,isGLTFModel as Sl,isHostedOnGlitch as ul,isHotReloadEnabled as Cl,isHotReloading as yl,isIPad as El,isIconElement as Rl,isLocalNetwork as hl,isMacOS as fl,isMobileDevice as vl,isMozillaXR as Pl,isQuest as Al,isResourceTrackingEnabled as Tl,isSafari as Ml,isUsingInstancing as bl,isiOS as Il,isiPad as Dl,loadPMREM as Ol,loadSync as xl,logHierarchy as kl,lookAtInverse as Ll,lookAtObject as Bl,lookAtScreenPoint as Fl,makeId as Nl,makeIdFromRandomWords as Wl,makeNameSafe as wl,markAsInstancedRendered as Gl,microphonePermissionsGranted as Ul,nameof as Hl,nameofFactory as Xl,needle as zl,objectSerializer as Vl,offBeforeXRSession as _l,offXRSessionEnd as jl,offXRSessionStart as Kl,onBeforeXRSession as Ql,onSyncDestroy as Zl,onSyncInstantiate as Yl,onXRSessionEnd as Jl,onXRSessionStart as $l,parseSync as ql,placeOnSurface as ed,postprocessFBXMaterials as ad,prefix as sd,pushState as td,randomNumber as od,registerBinaryType as rd,registerComponent as nd,registerComponentExtension as id,registerCustomEffectType as ld,registerExportExtensions as dd,registerExtensions as cd,registerHotReloadType as md,registerLoader as pd,registerPrefabProvider as gd,registerPrototypeExtensions as Sd,registerType as ud,relativePathPrefix as Cd,removeAttributeChangeCallback as yd,removeComponent as Ed,removeCustomImportExtensionType as Rd,removePatch as hd,resolveUrl as fd,sanitizeString as vd,saveImage as Pd,screenshot as Ad,screenshot2 as Td,sendDestroyed as Md,serializable as bd,serializeObject as Id,serializeable as Dd,setActive as Od,setAllowBalloonMessages as xd,setAllowOverlayMessages as kd,setAutoFitEnabled as Ld,setCameraController as Bd,setDestroyed as Fd,setDevEnvironment as Nd,setDisposable as Wd,setDontDestroy as wd,setOrAddParamsToUrl as Gd,setParam as Ud,setParamWithoutReload as Hd,setPeerOptions as Xd,setResourceTrackingEnabled as zd,setState as Vd,setVisibleInCustomShadowRendering as _d,setWorldEuler as jd,setWorldPosition as Kd,setWorldPositionXYZ as Qd,setWorldQuaternion as Zd,setWorldQuaternionXYZW as Yd,setWorldRotation as Jd,setWorldRotationXYZ as $d,setWorldScale as qd,showBalloonError as ec,showBalloonMessage as ac,showBalloonWarning as sc,showDebugConsole as tc,slerp as oc,syncDestroy as rc,syncField as nc,syncInstantiate as ic,textureToCanvas as lc,toSourceId as dc,tryCastBinary as cc,tryDetermineMimetypeFromBinary as mc,tryDetermineMimetypeFromURL as pc,tryFindObject as gc,tryGetGuid as Sc,unregisterHotReloadType as uc,unregisterPrefabProvider as Cc,unwatchWrite as yc,useForAutoFit as Ec,validate as Rc,watchWrite as hc}from"./needle-engine.bundle-CJmix0Oo.min.js";import{THREE as fc}from"./three.min.js";import{NEEDLE_progressive as vc}from"./gltf-progressive-CN_mbb66.min.js";y();const a={VERSION:u,Context:S,NeedleXRSession:g,assets:{loadFromURL:p},types:m,onStart:c,onUpdate:d,onBeforeRender:l,onAfterRender:i,onInitializedContext:n,onDestroyContext:r,onClearContext:o};globalThis.Needle?.VERSION!==void 0&&console.warn(`Needle Engine is already imported: ${globalThis.Needle.VERSION}`);function C(e){for(const t in e)a[t]=e[t]}C(E),C(R);for(const e of Object.getOwnPropertyNames(s))switch(e){case"prototype":case"constructor":case"length":case"name":continue;default:a[e]=s[e];break}if(!globalThis.Needle)globalThis.Needle=a;else for(const e in a)globalThis.Needle[e]=a[e];globalThis.THREE?console.warn("Three.js is already imported"):globalThis.THREE=fc;export{h as $componentName,f as $physicsKey,v as ActionBuilder,P as ActionCollection,A as ActionModel,T as Addressables,M as AlignmentConstraint,b as AmbientMode,I as Animation,D as AnimationCurve,O as AnimationExtension,x as AnimationTrackHandler,k as AnimationUtils,L as Animator,B as AnimatorConditionMode,F as AnimatorController,N as AnimatorControllerBuilder,W as AnimatorControllerParameterType,w as AnimatorStateInfo,G as Antialiasing,U as Application,H as AssetDatabase,X as AssetReference,z as Attractor,V as AudioExtension,_ as AudioListener,j as AudioSource,K as AudioTrackHandler,Q as Avatar,Z as AvatarBlink_Simple,Y as AvatarEyeLook_Rotation,J as AvatarLoader,$ as AvatarMarker,q as AvatarModel,ee as Avatar_Brain_LookAt,ae as Avatar_MouthShapes,se as Avatar_MustacheShake,te as Avatar_POI,oe as Axes,re as AxesHelper,ne as BUILD_TIME,ie as BaseUIComponent,le as BasicIKConstraint,de as BehaviorExtension,ce as BehaviorModel,me as Behaviour,pe as BlobStorage,ge as BloomEffect,Se as BoxCollider,ue as BoxGizmo,Ce as BoxHelperComponent,ye as Button,Ee as ButtonsFactory,Re as CallDirection,he as CallInfo,fe as Camera,ve as CameraTargetReachedEvent,Pe as Canvas,Ae as CanvasGroup,Te as CapsuleCollider,Me as ChangeMaterialOnClick,be as ChangeTransformOnClick,Ie as CharacterController,De as CharacterControllerInput,Oe as ChromaticAberration,xe as CircularBuffer,ke as ClearFlags,Le as ClickThrough,Be as ClipExtrapolation,Fe as Collider,Ne as Collision,We as CollisionDetectionMode,we as ColorAdjustments,Ge as ColorBySpeedModule,Ue as ColorOverLifetimeModule,He as Component,Xe as ComponentLifecycleEvents,ze as ConnectionEvents,Ve as ContactPoint,_e as ContactShadows,S as Context,je as ContextArgs,Ke as ContextEvent,Qe as ContextRegistry,Ze as ControlTrackHandler,Ye as CursorFollow,Je as CustomBranding,$e as CustomShader,qe as DefaultReflectionMode,ea as Deletable,aa as DeleteBox,sa as DepthOfField,ta as DeviceFlag,oa as DeviceUtilities,ra as DocumentExtension,na as DragControls,ia as DragMode,la as DropListener,da as Duplicatable,ca as EffectWrapper,ma as EmissionModule,pa as EmphasizeOnClick,ga as EngineLoadingView,Sa as EnvironmentScene,ua as EventList,Ca as EventListEvent,ya as EventSystem,Ea as EventTrigger,Ra as FieldWithDefault,ha as FileReference,fa as FileReferenceSerializer,va as FileSpawnModel,Pa as File_Event,Aa as FixedJoint,Ta as Fog,Ma as FontStyle,ba as FrameEvent,Ia as GENERATOR,s as GameObject,Da as Gizmos,Oa as GltfExport,xa as GltfExportBox,ka as Gradient,La as Graphic,Ba as GraphicRaycaster,Fa as Graphics,Na as GridHelper,Wa as GridLayoutGroup,wa as GroundProjectedEnv,Ga as GroupActionModel,Ua as HideFlags,Ha as HideOnStart,Xa as HingeJoint,za as HorizontalLayoutGroup,Va as HorizontalWrapMode,_a as HostData,ja as HoverAnimation,Ka as Image,Qa as ImageReference,Za as ImageReferenceSerializer,Ya as InheritVelocityModule,Ja as Input,$a as InputEventQueue,qa as InputEvents,es as InputField,as as InstanceHandle,ss as InstancingHandler,ts as InstancingUtil,os as InstantiateEvent,rs as InstantiateIdProvider,ns as InstantiateOptions,is as Interactable,ls as InternalScreenshotUtils,ds as JoinedRoomResponse,cs as KeyEventArgs,ms as Keyframe,ps as LODGroup,gs as LODModel,Ss as LeftRoomResponse,us as Light,Cs as LightData,ys as LimitVelocityOverLifetimeModule,Es as LoadingElementOptions,Rs as LogStats,hs as LogType,fs as LookAt,vs as LookAtConstraint,Ps as MainModule,As as MarkerTrackHandler,Ts as MarkerType,Ms as MaskableGraphic,bs as MaterialPropertyBlock,Is as MaterialX,Ds as Mathf,Os as MeshCollider,xs as MeshRenderer,ks as MinMaxCurve,Ls as MinMaxGradient,Bs as NEEDLE_ENGINE_FEATURE_FLAGS,Fs as NEEDLE_ENGINE_MODULES,vc as NEEDLE_progressive,Ns as NEKeyboardEvent,Ws as NEPointerEvent,ws as NeedleButtonElement,Gs as NeedleEngine,Us as NeedleEngineModelLoader,Hs as NeedleEngineWebComponent,Xs as NeedleMenu,zs as NeedlePatchesKey,Vs as NeedleUSDZExporter,_s as NeedleXRController,g as NeedleXRSession,js as NeedleXRSync,Ks as NeedleXRUtils,Qs as NestedGltf,Zs as NetworkConnection,Ys as NetworkedStreamEvents,Js as NetworkedStreams,$s as Networking,qs as NewInstanceModel,et as NoiseModule,at as ObjectRaycaster,st as ObjectUtils,tt as OffsetConstraint,ot as OneEuroFilter,rt as OneEuroFilterXYZ,nt as OpenURL,it as OrbitControls,lt as Outline,dt as OwnershipEvent,ct as OwnershipModel,mt as PUBLIC_KEY,pt as Padding,gt as ParticleBurst,St as ParticleSubEmitter,ut as ParticleSystem,Ct as ParticleSystemBaseBehaviour,yt as ParticleSystemRenderer,Et as ParticleSystemShapeType,Rt as PeerHandle,ht as PeerNetworking,ft as Physics,vt as PhysicsExtension,Pt as PhysicsMaterialCombine,At as PixelationEffect,Tt as PlayAnimationOnClick,Mt as PlayAudioOnClick,bt as PlayableDirector,It as PlayerColor,Dt as PlayerState,Ot as PlayerStateEvent,xt as PlayerSync,kt as PlayerView,Lt as PlayerViewManager,Bt as PointerEventData,Ft as PointerType,Nt as PostProcessing,Wt as PostProcessingEffect,wt as PostProcessingEffectOrder,Gt as PostProcessingHandler,Ut as PostProcessingManager,Ht as Prefabs,Xt as PreliminaryAction,zt as PreliminaryTrigger,Vt as PreviewHelper,_t as PrimitiveType,jt as Progress,Kt as PromiseAllWithErrors,Qt as PromiseErrorResult,Zt as RGBAColor,Yt as RapierPhysics,Jt as RawImage,$t as RaycastOptions,qt as Rect,eo as RectTransform,ao as ReflectionProbe,so as RegisteredAnimationInfo,to as RemoteSkybox,oo as RenderTexture,ro as RenderTextureSerializer,no as Renderer,io as RendererData,lo as RendererLightmap,co as Rigidbody,mo as RigidbodyConstraints,po as RoomEvents,go as RotationBySpeedModule,So as RotationOverLifetimeModule,uo as SceneLightSettings,Co as SceneSwitcher,yo as ScreenCapture,Eo as ScreenSpaceAmbientOcclusion,Ro as ScreenSpaceAmbientOcclusionN8,ho as ScrollFollow,fo as SeeThrough,vo as SendQueue,Po as SerializationContext,Ao as SetActiveOnClick,To as ShadowCatcher,Mo as ShapeModule,bo as ShapeOverlapResult,Io as SharpeningEffect,Do as SignalAsset,Oo as SignalReceiver,xo as SignalReceiverEvent,ko as SignalTrackHandler,Lo as Size,Bo as SizeBySpeedModule,Fo as SizeOverLifetimeModule,No as SkinnedMeshRenderer,Wo as SmoothFollow,wo as SpatialGrabRaycaster,Go as SpatialHtml,Uo as SpatialTrigger,Ho as SpatialTriggerReceiver,Xo as SpectatorCamera,zo as SphereCollider,Vo as SphereIntersection,_o as SplineContainer,jo as SplineData,Ko as SplineUtils,Qo as SplineWalker,Zo as Sprite,Yo as SpriteData,Jo as SpriteRenderer,$o as SpriteSheet,qo as StateMachineBehaviour,er as StreamEndedEvent,ar as StreamReceivedEvent,sr as SubEmitterSystem,tr as SyncedCamera,or as SyncedRoom,rr as SyncedTransform,nr as TapGestureTrigger,ir as TeleportTarget,lr as TestRunner,dr as TestSimulateUserData,cr as Text,mr as TextAnchor,pr as TextBuilder,gr as TextExtension,Sr as TextureSheetAnimationModule,ur as TiltShiftEffect,Cr as Time,yr as ToneMappingEffect,Er as TrackHandler,Rr as TrackType,hr as TrailModule,fr as TransformData,vr as TransformGizmo,Pr as TriggerBuilder,Ar as TriggerModel,m as TypeStore,Tr as UIRaycastUtils,Mr as UIRootComponent,br as USDDocument,Ir as USDObject,Dr as USDWriter,Or as USDZExporter,xr as USDZText,kr as USDZUIExtension,Lr as UriSerializer,Br as UsageMarker,Fr as UserJoinedOrLeftRoomModel,u as VERSION,Nr as VariantAction,Wr as VelocityOverLifetimeModule,wr as VerticalLayoutGroup,Gr as VerticalWrapMode,Ur as VideoPlayer,Hr as ViewBox,Xr as ViewDevice,zr as Vignette,Vr as VisibilityAction,_r as Voip,jr as Volume,Kr as VolumeParameter,Qr as VolumeProfile,Zr as WaitForFrames,Yr as WaitForPromise,Jr as WaitForSeconds,$r as Watch,qr as WebARCameraBackground,en as WebARSessionRoot,an as WebXR,sn as WebXRButtonFactory,tn as WebXRImageTracking,on as WebXRImageTrackingModel,rn as WebXRPlaneTracking,nn as WebXRTrackedImage,ln as XRControllerFollow,dn as XRControllerModel,cn as XRControllerMovement,mn as XRFlag,pn as XRRig,gn as XRState,Sn as XRStateFlag,un as __Ignore,Cn as __internalNotifyObjectDestroyed,yn as activeInHierarchyFieldName,En as addAttributeChangeCallback,Rn as addComponent,hn as addCustomExtensionPlugin,fn as addNewComponent,vn as addPatch,Pn as apply,An as applyHMRChanges,Tn as applyPrototypeExtensions,Mn as beginListenDestroy,bn as beginListenInstantiate,In as binaryIdentifierCasts,Dn as build_scene_functions,On as builtinComponentKeyName,xn as calculateProgress01,kn as clearBalloonMessages,Ln as clearOverlayMessages,Bn as colorSerializer,Fn as compareAssociation,Nn as componentSerializer,Wn as copyTexture,wn as createMotion,Gn as debugNet,Un as debugOwner,Hn as decompressGpuTexture,Xn as deepClone,zn as delay,Vn as delayForFrames,_n as deserializeObject,jn as destroy,Kn as destroyComponentInstance,Qn as determineMimeTypeFromExtension,Zn as disposeObjectResources,Yn as disposeStream,Jn as editorGuidKeyName,$n as enableSpatialConsole,qn as eventListSerializer,ei as exportAsGLTF,ai as findByGuid,si as findObjectOfType,ti as findObjectsOfType,oi as findResourceUsers,ri as fitCamera,ni as fitObjectIntoVolume,ii as foreachComponent,li as foreachComponentEnumerator,di as forward,ci as generateQRCode,mi as generateSeed,pi as getBoundingBox,gi as getCameraController,Si as getComponent,ui as getComponentInChildren,Ci as getComponentInParent,yi as getComponents,Ei as getComponentsInChildren,Ri as getComponentsInParent,hi as getFormattedDate,fi as getIconElement,vi as getIconTexture,Pi as getLoader,Ai as getOrAddComponent,Ti as getParam,Mi as getParentHierarchyPath,bi as getPath,Ii as getPeerOptions,Di as getPeerjsInstance,Oi as getResourceUserCount,xi as getSceneData,ki as getTempColor,Li as getTempQuaternion,Bi as getTempVector,Fi as getUrlParams,Ni as getVisibleInCustomShadowRendering,Wi as getWorldDirection,wi as getWorldEuler,Gi as getWorldPosition,Ui as getWorldQuaternion,Hi as getWorldRotation,Xi as getWorldScale,zi as hasCommercialLicense,Vi as hasIndieLicense,_i as hasPointerEventComponent,ji as hasProLicense,Ki as hideDebugConsole,Qi as imageToCanvas,Zi as initAddressableSerializers,Yi as initBuiltinSerializers,Ji as initPhysics,$i as initVolumeParameterSerializer,qi as instantiate,el as invokeLoadedImportPluginHooks,al as invokeXRSessionEnd,sl as invokeXRSessionStart,tl as isActiveInHierarchy,ol as isActiveSelf,rl as isAndroidDevice,nl as isAnimationAction,il as isComponent,ll as isDebugMode,dl as isDesktop,cl as isDestroyed,ml as isDevEnvironment,pl as isDisposed,gl as isExporting,Sl as isGLTFModel,ul as isHostedOnGlitch,Cl as isHotReloadEnabled,yl as isHotReloading,El as isIPad,Rl as isIconElement,hl as isLocalNetwork,fl as isMacOS,vl as isMobileDevice,Pl as isMozillaXR,Al as isQuest,Tl as isResourceTrackingEnabled,Ml as isSafari,bl as isUsingInstancing,Il as isiOS,Dl as isiPad,p as loadAsset,Ol as loadPMREM,xl as loadSync,kl as logHierarchy,Ll as lookAtInverse,Bl as lookAtObject,Fl as lookAtScreenPoint,Nl as makeId,Wl as makeIdFromRandomWords,wl as makeNameSafeForUSD,Gl as markAsInstancedRendered,Ul as microphonePermissionsGranted,Hl as nameof,Xl as nameofFactory,zl as needle,Vl as objectSerializer,_l as offBeforeXRSession,jl as offXRSessionEnd,Kl as offXRSessionStart,i as onAfterRender,l as onBeforeRender,Ql as onBeforeXRSession,o as onClear,r as onDestroy,n as onInitialized,c as onStart,Zl as onSyncDestroy,Yl as onSyncInstantiate,d as onUpdate,Jl as onXRSessionEnd,$l as onXRSessionStart,ql as parseSync,ed as placeOnSurface,ad as postprocessFBXMaterials,sd as prefix,td as pushState,od as randomNumber,rd as registerBinaryType,nd as registerComponent,id as registerComponentExtension,ld as registerCustomEffectType,dd as registerExportExtensions,cd as registerExtensions,md as registerHotReloadType,pd as registerLoader,gd as registerPrefabProvider,Sd as registerPrototypeExtensions,ud as registerType,Cd as relativePathPrefix,yd as removeAttributeChangeCallback,Ed as removeComponent,Rd as removeCustomImportExtensionType,hd as removePatch,fd as resolveUrl,vd as sanitizeString,Pd as saveImage,Ad as screenshot,Td as screenshot2,Md as sendDestroyed,bd as serializable,Id as serializeObject,Dd as serializeable,Od as setActive,xd as setAllowBalloonMessages,kd as setAllowOverlayMessages,Ld as setAutoFitEnabled,Bd as setCameraController,Fd as setDestroyed,Nd as setDevEnvironment,Wd as setDisposable,wd as setDontDestroy,Gd as setOrAddParamsToUrl,Ud as setParam,Hd as setParamWithoutReload,Xd as setPeerOptions,zd as setResourceTrackingEnabled,Vd as setState,_d as setVisibleInCustomShadowRendering,jd as setWorldEuler,Kd as setWorldPosition,Qd as setWorldPositionXYZ,Zd as setWorldQuaternion,Yd as setWorldQuaternionXYZW,Jd as setWorldRotation,$d as setWorldRotationXYZ,qd as setWorldScale,ec as showBalloonError,ac as showBalloonMessage,sc as showBalloonWarning,tc as showDebugConsole,oc as slerp,rc as syncDestroy,nc as syncField,ic as syncInstantiate,lc as textureToCanvas,dc as toSourceId,cc as tryCastBinary,mc as tryDetermineMimetypeFromBinary,pc as tryDetermineMimetypeFromURL,gc as tryFindObject,Sc as tryGetGuid,uc as unregisterHotReloadType,Cc as unregisterPrefabProvider,yc as unwatchWrite,Ec as useForAutoFit,Rc as validate,hc as watchWrite};
|
|
1
|
+
import{initEngine as y,GameObject as s,onClear as o,onDestroy as r,onInitialized as n,onAfterRender as i,onBeforeRender as l,onUpdate as d,onStart as c,TypeStore as m,loadAsset as p,NeedleXRSession as g,Context as S,VERSION as u,Component as E,Components as R}from"./needle-engine.bundle-DyafERqr.min.js";import{$componentName as h,$physicsKey as f,ActionBuilder as v,ActionCollection as P,ActionModel as A,Addressables as T,AlignmentConstraint as M,AmbientMode as b,Animation as I,AnimationCurve as D,AnimationExtension as O,AnimationTrackHandler as x,AnimationUtils as k,Animator as L,AnimatorConditionMode as B,AnimatorController as F,AnimatorControllerBuilder as N,AnimatorControllerParameterType as W,AnimatorStateInfo as w,Antialiasing as G,Application as U,AssetDatabase as H,AssetReference as X,Attractor as z,AudioExtension as V,AudioListener as _,AudioSource as j,AudioTrackHandler as K,Avatar as Q,AvatarBlink_Simple as Z,AvatarEyeLook_Rotation as Y,AvatarLoader as J,AvatarMarker as $,AvatarModel as q,Avatar_Brain_LookAt as ee,Avatar_MouthShapes as ae,Avatar_MustacheShake as se,Avatar_POI as te,Axes as oe,AxesHelper as re,BUILD_TIME as ne,BaseUIComponent as ie,BasicIKConstraint as le,BehaviorExtension as de,BehaviorModel as ce,Component$1 as me,BlobStorage as pe,BloomEffect as ge,BoxCollider as Se,BoxGizmo as ue,BoxHelperComponent as Ce,Button as ye,ButtonsFactory as Ee,CallDirection as Re,CallInfo as he,Camera as fe,CameraTargetReachedEvent as ve,Canvas as Pe,CanvasGroup as Ae,CapsuleCollider as Te,ChangeMaterialOnClick as Me,ChangeTransformOnClick as be,CharacterController as Ie,CharacterControllerInput as De,ChromaticAberration as Oe,CircularBuffer as xe,ClearFlags as ke,ClickThrough as Le,ClipExtrapolation as Be,Collider as Fe,Collision as Ne,CollisionDetectionMode as We,ColorAdjustments as we,ColorBySpeedModule as Ge,ColorOverLifetimeModule as Ue,Component$1 as He,ComponentLifecycleEvents as Xe,ConnectionEvents as ze,ContactPoint as Ve,ContactShadows as _e,ContextArgs as je,ContextEvent as Ke,ContextRegistry as Qe,ControlTrackHandler as Ze,CursorFollow as Ye,CustomBranding as Je,CustomShader as $e,DefaultReflectionMode as qe,Deletable as ea,DeleteBox as aa,DepthOfField as sa,DeviceFlag as ta,DeviceUtilities as oa,DocumentExtension as ra,DragControls as na,DragMode as ia,DropListener as la,Duplicatable as da,EffectWrapper as ca,EmissionModule as ma,EmphasizeOnClick as pa,EngineLoadingView as ga,EnvironmentScene as Sa,EventList as ua,EventListEvent as Ca,EventSystem as ya,EventTrigger as Ea,FieldWithDefault as Ra,FileReference as ha,FileReferenceSerializer as fa,FileSpawnModel as va,File_Event as Pa,FixedJoint as Aa,Fog as Ta,FontStyle as Ma,FrameEvent as ba,GENERATOR as Ia,Gizmos as Da,GltfExport as Oa,GltfExportBox as xa,Gradient as ka,Graphic as La,GraphicRaycaster as Ba,Graphics as Fa,GridHelper as Na,GridLayoutGroup as Wa,GroundProjectedEnv as wa,GroupActionModel as Ga,HideFlags as Ua,HideOnStart as Ha,HingeJoint as Xa,HorizontalLayoutGroup as za,HorizontalWrapMode as Va,HostData as _a,HoverAnimation as ja,Image as Ka,ImageReference as Qa,ImageReferenceSerializer as Za,InheritVelocityModule as Ya,Input as Ja,InputEventQueue as $a,InputEvents as qa,InputField as es,InstanceHandle as as,InstancingHandler as ss,InstancingUtil as ts,InstantiateEvent as os,InstantiateIdProvider as rs,InstantiateOptions as ns,Interactable as is,InternalScreenshotUtils as ls,JoinedRoomResponse as ds,KeyEventArgs as cs,Keyframe as ms,LODGroup as ps,LODModel as gs,LeftRoomResponse as Ss,Light as us,LightData as Cs,LimitVelocityOverLifetimeModule as ys,LoadingElementOptions as Es,LogStats as Rs,LogType as hs,LookAt as fs,LookAtConstraint as vs,MainModule as Ps,MarkerTrackHandler as As,MarkerType as Ts,MaskableGraphic as Ms,MaterialPropertyBlock as bs,MaterialX as Is,Mathf as Ds,MeshCollider as Os,MeshRenderer as xs,MinMaxCurve as ks,MinMaxGradient as Ls,NEEDLE_ENGINE_FEATURE_FLAGS as Bs,MODULES as Fs,NEKeyboardEvent as Ns,NEPointerEvent as Ws,NeedleButtonElement as ws,ContextRegistry as Gs,NeedleEngineModelLoader as Us,NeedleEngineWebComponent as Hs,NeedleMenu as Xs,NeedlePatchesKey as zs,USDZExporter as Vs,NeedleXRController as _s,NeedleXRSync as js,NeedleXRUtils as Ks,NestedGltf as Qs,NetworkConnection as Zs,NetworkedStreamEvents as Ys,NetworkedStreams as Js,Networking as $s,NewInstanceModel as qs,NoiseModule as et,ObjectRaycaster as at,ObjectUtils as st,OffsetConstraint as tt,OneEuroFilter as ot,OneEuroFilterXYZ as rt,OpenURL as nt,OrbitControls as it,Outline as lt,OwnershipEvent as dt,OwnershipModel as ct,PUBLIC_KEY as mt,Padding as pt,ParticleBurst as gt,ParticleSubEmitter as St,ParticleSystem as ut,ParticleSystemBaseBehaviour as Ct,ParticleSystemRenderer as yt,ParticleSystemShapeType as Et,PeerHandle as Rt,PeerNetworking as ht,Physics as ft,PhysicsExtension as vt,PhysicsMaterialCombine as Pt,PixelationEffect as At,PlayAnimationOnClick as Tt,PlayAudioOnClick as Mt,PlayableDirector as bt,PlayerColor as It,PlayerState as Dt,PlayerStateEvent as Ot,PlayerSync as xt,PlayerView as kt,PlayerViewManager as Lt,PointerEventData as Bt,PointerType as Ft,PostProcessing as Nt,PostProcessingEffect as Wt,PostProcessingEffectOrder as wt,PostProcessingHandler as Gt,Volume as Ut,Prefabs as Ht,PreliminaryAction as Xt,PreliminaryTrigger as zt,PreviewHelper as Vt,PrimitiveType as _t,Progress as jt,PromiseAllWithErrors as Kt,PromiseErrorResult as Qt,RGBAColor as Zt,RapierPhysics as Yt,RawImage as Jt,RaycastOptions as $t,Rect as qt,RectTransform as eo,ReflectionProbe as ao,RegisteredAnimationInfo as so,RemoteSkybox as to,RenderTexture as oo,RenderTextureSerializer as ro,Renderer as no,RendererData as io,RendererLightmap as lo,Rigidbody as co,RigidbodyConstraints as mo,RoomEvents as po,RotationBySpeedModule as go,RotationOverLifetimeModule as So,SceneLightSettings as uo,SceneSwitcher as Co,ScreenCapture as yo,ScreenSpaceAmbientOcclusion as Eo,ScreenSpaceAmbientOcclusionN8 as Ro,ScrollFollow as ho,SeeThrough as fo,SendQueue as vo,SerializationContext as Po,SetActiveOnClick as Ao,ShadowCatcher as To,ShapeModule as Mo,ShapeOverlapResult as bo,SharpeningEffect as Io,SignalAsset as Do,SignalReceiver as Oo,SignalReceiverEvent as xo,SignalTrackHandler as ko,Size as Lo,SizeBySpeedModule as Bo,SizeOverLifetimeModule as Fo,SkinnedMeshRenderer as No,SmoothFollow as Wo,SpatialGrabRaycaster as wo,SpatialHtml as Go,SpatialTrigger as Uo,SpatialTriggerReceiver as Ho,SpectatorCamera as Xo,SphereCollider as zo,SphereIntersection as Vo,SplineContainer as _o,SplineData as jo,SplineUtils as Ko,SplineWalker as Qo,Sprite as Zo,SpriteData as Yo,SpriteRenderer as Jo,SpriteSheet as $o,StateMachineBehaviour as qo,StreamEndedEvent as er,StreamReceivedEvent as ar,SubEmitterSystem as sr,SyncedCamera as tr,SyncedRoom as or,SyncedTransform as rr,TapGestureTrigger as nr,TeleportTarget as ir,TestRunner as lr,TestSimulateUserData as dr,Text as cr,TextAnchor as mr,TextBuilder as pr,TextExtension as gr,TextureSheetAnimationModule as Sr,TiltShiftEffect as ur,Time as Cr,ToneMappingEffect as yr,TrackHandler as Er,TrackType as Rr,TrailModule as hr,TransformData as fr,TransformGizmo as vr,TriggerBuilder as Pr,TriggerModel as Ar,UIRaycastUtils as Tr,UIRootComponent as Mr,USDDocument as br,USDObject as Ir,USDWriter as Dr,USDZExporter$1 as Or,USDZText as xr,USDZUIExtension as kr,UriSerializer as Lr,UsageMarker as Br,UserJoinedOrLeftRoomModel as Fr,VariantAction as Nr,VelocityOverLifetimeModule as Wr,VerticalLayoutGroup as wr,VerticalWrapMode as Gr,VideoPlayer as Ur,ViewBox as Hr,ViewDevice as Xr,Vignette as zr,VisibilityAction as Vr,Voip as _r,Volume as jr,VolumeParameter as Kr,VolumeProfile as Qr,WaitForFrames as Zr,WaitForPromise as Yr,WaitForSeconds as Jr,Watch as $r,WebARCameraBackground as qr,WebARSessionRoot as en,WebXR as an,WebXRButtonFactory as sn,WebXRImageTracking as tn,WebXRImageTrackingModel as on,WebXRPlaneTracking as rn,WebXRTrackedImage as nn,XRControllerFollow as ln,XRControllerModel as dn,XRControllerMovement as cn,XRFlag as mn,XRRig as pn,XRState as gn,XRStateFlag as Sn,__Ignore as un,__internalNotifyObjectDestroyed as Cn,activeInHierarchyFieldName as yn,addAttributeChangeCallback as En,addComponent as Rn,addCustomExtensionPlugin as hn,addNewComponent as fn,addPatch as vn,apply as Pn,applyHMRChanges as An,applyPrototypeExtensions as Tn,beginListenDestroy as Mn,beginListenInstantiate as bn,binaryIdentifierCasts as In,build_scene_functions as Dn,builtinComponentKeyName as On,calculateProgress01 as xn,clearMessages as kn,clearMessages as Ln,colorSerializer as Bn,compareAssociation as Fn,componentSerializer as Nn,copyTexture as Wn,createMotion as wn,debugNet as Gn,debugOwner as Un,decompressGpuTexture as Hn,deepClone as Xn,delay as zn,delayForFrames as Vn,deserializeObject as _n,destroy as jn,destroyComponentInstance as Kn,determineMimeTypeFromExtension as Qn,disposeObjectResources as Zn,disposeStream as Yn,editorGuidKeyName as Jn,enableSpatialConsole as $n,eventListSerializer as qn,exportAsGLTF as ei,findByGuid as ai,findObjectOfType as si,findObjectsOfType as ti,findResourceUsers as oi,fitCamera as ri,fitObjectIntoVolume as ni,foreachComponent as ii,foreachComponentEnumerator as li,forward as di,generateQRCode as ci,generateSeed as mi,getBoundingBox as pi,getCameraController as gi,getComponent as Si,getComponentInChildren as ui,getComponentInParent as Ci,getComponents as yi,getComponentsInChildren as Ei,getComponentsInParent as Ri,getFormattedDate as hi,getIconElement as fi,getIconTexture as vi,getLoader as Pi,getOrAddComponent as Ai,getParam as Ti,getParentHierarchyPath as Mi,getPath as bi,getPeerOptions as Ii,getPeerjsInstance as Di,getResourceUserCount as Oi,getSceneData as xi,getTempColor as ki,getTempQuaternion as Li,getTempVector as Bi,getUrlParams as Fi,getVisibleInCustomShadowRendering as Ni,getWorldDirection as Wi,getWorldEuler as wi,getWorldPosition as Gi,getWorldQuaternion as Ui,getWorldRotation as Hi,getWorldScale as Xi,hasCommercialLicense as zi,hasIndieLicense as Vi,hasPointerEventComponent as _i,hasProLicense as ji,hideDebugConsole as Ki,imageToCanvas as Qi,initAddressableSerializers as Zi,initBuiltinSerializers as Yi,initPhysics as Ji,initVolumeParameterSerializer as $i,instantiate as qi,invokeLoadedImportPluginHooks as el,invokeXRSessionEnd as al,invokeXRSessionStart as sl,isActiveInHierarchy as tl,isActiveSelf as ol,isAndroidDevice as rl,isAnimationAction as nl,isComponent as il,isDebugMode as ll,isDesktop as dl,isDestroyed as cl,isDevEnvironment as ml,isDisposed as pl,isExporting as gl,isGLTFModel as Sl,isHostedOnGlitch as ul,isHotReloadEnabled as Cl,isHotReloading as yl,isIPad as El,isIconElement as Rl,isLocalNetwork as hl,isMacOS as fl,isMobileDevice as vl,isMozillaXR as Pl,isQuest as Al,isResourceTrackingEnabled as Tl,isSafari as Ml,isUsingInstancing as bl,isiOS as Il,isiPad as Dl,loadPMREM as Ol,loadSync as xl,logHierarchy as kl,lookAtInverse as Ll,lookAtObject as Bl,lookAtScreenPoint as Fl,makeId as Nl,makeIdFromRandomWords as Wl,makeNameSafe as wl,markAsInstancedRendered as Gl,microphonePermissionsGranted as Ul,nameof as Hl,nameofFactory as Xl,needle as zl,objectSerializer as Vl,offBeforeXRSession as _l,offXRSessionEnd as jl,offXRSessionStart as Kl,onBeforeXRSession as Ql,onSyncDestroy as Zl,onSyncInstantiate as Yl,onXRSessionEnd as Jl,onXRSessionStart as $l,parseSync as ql,placeOnSurface as ed,postprocessFBXMaterials as ad,prefix as sd,pushState as td,randomNumber as od,registerBinaryType as rd,registerComponent as nd,registerComponentExtension as id,registerCustomEffectType as ld,registerExportExtensions as dd,registerExtensions as cd,registerHotReloadType as md,registerLoader as pd,registerPrefabProvider as gd,registerPrototypeExtensions as Sd,registerType as ud,relativePathPrefix as Cd,removeAttributeChangeCallback as yd,removeComponent as Ed,removeCustomImportExtensionType as Rd,removePatch as hd,resolveUrl as fd,sanitizeString as vd,saveImage as Pd,screenshot as Ad,screenshot2 as Td,sendDestroyed as Md,serializable as bd,serializeObject as Id,serializeable as Dd,setActive as Od,setAllowBalloonMessages as xd,setAllowOverlayMessages as kd,setAutoFitEnabled as Ld,setCameraController as Bd,setDestroyed as Fd,setDevEnvironment as Nd,setDisposable as Wd,setDontDestroy as wd,setOrAddParamsToUrl as Gd,setParam as Ud,setParamWithoutReload as Hd,setPeerOptions as Xd,setResourceTrackingEnabled as zd,setState as Vd,setVisibleInCustomShadowRendering as _d,setWorldEuler as jd,setWorldPosition as Kd,setWorldPositionXYZ as Qd,setWorldQuaternion as Zd,setWorldQuaternionXYZW as Yd,setWorldRotation as Jd,setWorldRotationXYZ as $d,setWorldScale as qd,showBalloonError as ec,showBalloonMessage as ac,showBalloonWarning as sc,showDebugConsole as tc,slerp as oc,syncDestroy as rc,syncField as nc,syncInstantiate as ic,textureToCanvas as lc,toSourceId as dc,tryCastBinary as cc,tryDetermineMimetypeFromBinary as mc,tryDetermineMimetypeFromURL as pc,tryFindObject as gc,tryGetGuid as Sc,unregisterHotReloadType as uc,unregisterPrefabProvider as Cc,unwatchWrite as yc,useForAutoFit as Ec,validate as Rc,watchWrite as hc}from"./needle-engine.bundle-DyafERqr.min.js";import{THREE as fc}from"./three.min.js";import{NEEDLE_progressive as vc}from"./gltf-progressive-CN_mbb66.min.js";y();const a={VERSION:u,Context:S,NeedleXRSession:g,assets:{loadFromURL:p},types:m,onStart:c,onUpdate:d,onBeforeRender:l,onAfterRender:i,onInitializedContext:n,onDestroyContext:r,onClearContext:o};globalThis.Needle?.VERSION!==void 0&&console.warn(`Needle Engine is already imported: ${globalThis.Needle.VERSION}`);function C(e){for(const t in e)a[t]=e[t]}C(E),C(R);for(const e of Object.getOwnPropertyNames(s))switch(e){case"prototype":case"constructor":case"length":case"name":continue;default:a[e]=s[e];break}if(!globalThis.Needle)globalThis.Needle=a;else for(const e in a)globalThis.Needle[e]=a[e];globalThis.THREE?console.warn("Three.js is already imported"):globalThis.THREE=fc;export{h as $componentName,f as $physicsKey,v as ActionBuilder,P as ActionCollection,A as ActionModel,T as Addressables,M as AlignmentConstraint,b as AmbientMode,I as Animation,D as AnimationCurve,O as AnimationExtension,x as AnimationTrackHandler,k as AnimationUtils,L as Animator,B as AnimatorConditionMode,F as AnimatorController,N as AnimatorControllerBuilder,W as AnimatorControllerParameterType,w as AnimatorStateInfo,G as Antialiasing,U as Application,H as AssetDatabase,X as AssetReference,z as Attractor,V as AudioExtension,_ as AudioListener,j as AudioSource,K as AudioTrackHandler,Q as Avatar,Z as AvatarBlink_Simple,Y as AvatarEyeLook_Rotation,J as AvatarLoader,$ as AvatarMarker,q as AvatarModel,ee as Avatar_Brain_LookAt,ae as Avatar_MouthShapes,se as Avatar_MustacheShake,te as Avatar_POI,oe as Axes,re as AxesHelper,ne as BUILD_TIME,ie as BaseUIComponent,le as BasicIKConstraint,de as BehaviorExtension,ce as BehaviorModel,me as Behaviour,pe as BlobStorage,ge as BloomEffect,Se as BoxCollider,ue as BoxGizmo,Ce as BoxHelperComponent,ye as Button,Ee as ButtonsFactory,Re as CallDirection,he as CallInfo,fe as Camera,ve as CameraTargetReachedEvent,Pe as Canvas,Ae as CanvasGroup,Te as CapsuleCollider,Me as ChangeMaterialOnClick,be as ChangeTransformOnClick,Ie as CharacterController,De as CharacterControllerInput,Oe as ChromaticAberration,xe as CircularBuffer,ke as ClearFlags,Le as ClickThrough,Be as ClipExtrapolation,Fe as Collider,Ne as Collision,We as CollisionDetectionMode,we as ColorAdjustments,Ge as ColorBySpeedModule,Ue as ColorOverLifetimeModule,He as Component,Xe as ComponentLifecycleEvents,ze as ConnectionEvents,Ve as ContactPoint,_e as ContactShadows,S as Context,je as ContextArgs,Ke as ContextEvent,Qe as ContextRegistry,Ze as ControlTrackHandler,Ye as CursorFollow,Je as CustomBranding,$e as CustomShader,qe as DefaultReflectionMode,ea as Deletable,aa as DeleteBox,sa as DepthOfField,ta as DeviceFlag,oa as DeviceUtilities,ra as DocumentExtension,na as DragControls,ia as DragMode,la as DropListener,da as Duplicatable,ca as EffectWrapper,ma as EmissionModule,pa as EmphasizeOnClick,ga as EngineLoadingView,Sa as EnvironmentScene,ua as EventList,Ca as EventListEvent,ya as EventSystem,Ea as EventTrigger,Ra as FieldWithDefault,ha as FileReference,fa as FileReferenceSerializer,va as FileSpawnModel,Pa as File_Event,Aa as FixedJoint,Ta as Fog,Ma as FontStyle,ba as FrameEvent,Ia as GENERATOR,s as GameObject,Da as Gizmos,Oa as GltfExport,xa as GltfExportBox,ka as Gradient,La as Graphic,Ba as GraphicRaycaster,Fa as Graphics,Na as GridHelper,Wa as GridLayoutGroup,wa as GroundProjectedEnv,Ga as GroupActionModel,Ua as HideFlags,Ha as HideOnStart,Xa as HingeJoint,za as HorizontalLayoutGroup,Va as HorizontalWrapMode,_a as HostData,ja as HoverAnimation,Ka as Image,Qa as ImageReference,Za as ImageReferenceSerializer,Ya as InheritVelocityModule,Ja as Input,$a as InputEventQueue,qa as InputEvents,es as InputField,as as InstanceHandle,ss as InstancingHandler,ts as InstancingUtil,os as InstantiateEvent,rs as InstantiateIdProvider,ns as InstantiateOptions,is as Interactable,ls as InternalScreenshotUtils,ds as JoinedRoomResponse,cs as KeyEventArgs,ms as Keyframe,ps as LODGroup,gs as LODModel,Ss as LeftRoomResponse,us as Light,Cs as LightData,ys as LimitVelocityOverLifetimeModule,Es as LoadingElementOptions,Rs as LogStats,hs as LogType,fs as LookAt,vs as LookAtConstraint,Ps as MainModule,As as MarkerTrackHandler,Ts as MarkerType,Ms as MaskableGraphic,bs as MaterialPropertyBlock,Is as MaterialX,Ds as Mathf,Os as MeshCollider,xs as MeshRenderer,ks as MinMaxCurve,Ls as MinMaxGradient,Bs as NEEDLE_ENGINE_FEATURE_FLAGS,Fs as NEEDLE_ENGINE_MODULES,vc as NEEDLE_progressive,Ns as NEKeyboardEvent,Ws as NEPointerEvent,ws as NeedleButtonElement,Gs as NeedleEngine,Us as NeedleEngineModelLoader,Hs as NeedleEngineWebComponent,Xs as NeedleMenu,zs as NeedlePatchesKey,Vs as NeedleUSDZExporter,_s as NeedleXRController,g as NeedleXRSession,js as NeedleXRSync,Ks as NeedleXRUtils,Qs as NestedGltf,Zs as NetworkConnection,Ys as NetworkedStreamEvents,Js as NetworkedStreams,$s as Networking,qs as NewInstanceModel,et as NoiseModule,at as ObjectRaycaster,st as ObjectUtils,tt as OffsetConstraint,ot as OneEuroFilter,rt as OneEuroFilterXYZ,nt as OpenURL,it as OrbitControls,lt as Outline,dt as OwnershipEvent,ct as OwnershipModel,mt as PUBLIC_KEY,pt as Padding,gt as ParticleBurst,St as ParticleSubEmitter,ut as ParticleSystem,Ct as ParticleSystemBaseBehaviour,yt as ParticleSystemRenderer,Et as ParticleSystemShapeType,Rt as PeerHandle,ht as PeerNetworking,ft as Physics,vt as PhysicsExtension,Pt as PhysicsMaterialCombine,At as PixelationEffect,Tt as PlayAnimationOnClick,Mt as PlayAudioOnClick,bt as PlayableDirector,It as PlayerColor,Dt as PlayerState,Ot as PlayerStateEvent,xt as PlayerSync,kt as PlayerView,Lt as PlayerViewManager,Bt as PointerEventData,Ft as PointerType,Nt as PostProcessing,Wt as PostProcessingEffect,wt as PostProcessingEffectOrder,Gt as PostProcessingHandler,Ut as PostProcessingManager,Ht as Prefabs,Xt as PreliminaryAction,zt as PreliminaryTrigger,Vt as PreviewHelper,_t as PrimitiveType,jt as Progress,Kt as PromiseAllWithErrors,Qt as PromiseErrorResult,Zt as RGBAColor,Yt as RapierPhysics,Jt as RawImage,$t as RaycastOptions,qt as Rect,eo as RectTransform,ao as ReflectionProbe,so as RegisteredAnimationInfo,to as RemoteSkybox,oo as RenderTexture,ro as RenderTextureSerializer,no as Renderer,io as RendererData,lo as RendererLightmap,co as Rigidbody,mo as RigidbodyConstraints,po as RoomEvents,go as RotationBySpeedModule,So as RotationOverLifetimeModule,uo as SceneLightSettings,Co as SceneSwitcher,yo as ScreenCapture,Eo as ScreenSpaceAmbientOcclusion,Ro as ScreenSpaceAmbientOcclusionN8,ho as ScrollFollow,fo as SeeThrough,vo as SendQueue,Po as SerializationContext,Ao as SetActiveOnClick,To as ShadowCatcher,Mo as ShapeModule,bo as ShapeOverlapResult,Io as SharpeningEffect,Do as SignalAsset,Oo as SignalReceiver,xo as SignalReceiverEvent,ko as SignalTrackHandler,Lo as Size,Bo as SizeBySpeedModule,Fo as SizeOverLifetimeModule,No as SkinnedMeshRenderer,Wo as SmoothFollow,wo as SpatialGrabRaycaster,Go as SpatialHtml,Uo as SpatialTrigger,Ho as SpatialTriggerReceiver,Xo as SpectatorCamera,zo as SphereCollider,Vo as SphereIntersection,_o as SplineContainer,jo as SplineData,Ko as SplineUtils,Qo as SplineWalker,Zo as Sprite,Yo as SpriteData,Jo as SpriteRenderer,$o as SpriteSheet,qo as StateMachineBehaviour,er as StreamEndedEvent,ar as StreamReceivedEvent,sr as SubEmitterSystem,tr as SyncedCamera,or as SyncedRoom,rr as SyncedTransform,nr as TapGestureTrigger,ir as TeleportTarget,lr as TestRunner,dr as TestSimulateUserData,cr as Text,mr as TextAnchor,pr as TextBuilder,gr as TextExtension,Sr as TextureSheetAnimationModule,ur as TiltShiftEffect,Cr as Time,yr as ToneMappingEffect,Er as TrackHandler,Rr as TrackType,hr as TrailModule,fr as TransformData,vr as TransformGizmo,Pr as TriggerBuilder,Ar as TriggerModel,m as TypeStore,Tr as UIRaycastUtils,Mr as UIRootComponent,br as USDDocument,Ir as USDObject,Dr as USDWriter,Or as USDZExporter,xr as USDZText,kr as USDZUIExtension,Lr as UriSerializer,Br as UsageMarker,Fr as UserJoinedOrLeftRoomModel,u as VERSION,Nr as VariantAction,Wr as VelocityOverLifetimeModule,wr as VerticalLayoutGroup,Gr as VerticalWrapMode,Ur as VideoPlayer,Hr as ViewBox,Xr as ViewDevice,zr as Vignette,Vr as VisibilityAction,_r as Voip,jr as Volume,Kr as VolumeParameter,Qr as VolumeProfile,Zr as WaitForFrames,Yr as WaitForPromise,Jr as WaitForSeconds,$r as Watch,qr as WebARCameraBackground,en as WebARSessionRoot,an as WebXR,sn as WebXRButtonFactory,tn as WebXRImageTracking,on as WebXRImageTrackingModel,rn as WebXRPlaneTracking,nn as WebXRTrackedImage,ln as XRControllerFollow,dn as XRControllerModel,cn as XRControllerMovement,mn as XRFlag,pn as XRRig,gn as XRState,Sn as XRStateFlag,un as __Ignore,Cn as __internalNotifyObjectDestroyed,yn as activeInHierarchyFieldName,En as addAttributeChangeCallback,Rn as addComponent,hn as addCustomExtensionPlugin,fn as addNewComponent,vn as addPatch,Pn as apply,An as applyHMRChanges,Tn as applyPrototypeExtensions,Mn as beginListenDestroy,bn as beginListenInstantiate,In as binaryIdentifierCasts,Dn as build_scene_functions,On as builtinComponentKeyName,xn as calculateProgress01,kn as clearBalloonMessages,Ln as clearOverlayMessages,Bn as colorSerializer,Fn as compareAssociation,Nn as componentSerializer,Wn as copyTexture,wn as createMotion,Gn as debugNet,Un as debugOwner,Hn as decompressGpuTexture,Xn as deepClone,zn as delay,Vn as delayForFrames,_n as deserializeObject,jn as destroy,Kn as destroyComponentInstance,Qn as determineMimeTypeFromExtension,Zn as disposeObjectResources,Yn as disposeStream,Jn as editorGuidKeyName,$n as enableSpatialConsole,qn as eventListSerializer,ei as exportAsGLTF,ai as findByGuid,si as findObjectOfType,ti as findObjectsOfType,oi as findResourceUsers,ri as fitCamera,ni as fitObjectIntoVolume,ii as foreachComponent,li as foreachComponentEnumerator,di as forward,ci as generateQRCode,mi as generateSeed,pi as getBoundingBox,gi as getCameraController,Si as getComponent,ui as getComponentInChildren,Ci as getComponentInParent,yi as getComponents,Ei as getComponentsInChildren,Ri as getComponentsInParent,hi as getFormattedDate,fi as getIconElement,vi as getIconTexture,Pi as getLoader,Ai as getOrAddComponent,Ti as getParam,Mi as getParentHierarchyPath,bi as getPath,Ii as getPeerOptions,Di as getPeerjsInstance,Oi as getResourceUserCount,xi as getSceneData,ki as getTempColor,Li as getTempQuaternion,Bi as getTempVector,Fi as getUrlParams,Ni as getVisibleInCustomShadowRendering,Wi as getWorldDirection,wi as getWorldEuler,Gi as getWorldPosition,Ui as getWorldQuaternion,Hi as getWorldRotation,Xi as getWorldScale,zi as hasCommercialLicense,Vi as hasIndieLicense,_i as hasPointerEventComponent,ji as hasProLicense,Ki as hideDebugConsole,Qi as imageToCanvas,Zi as initAddressableSerializers,Yi as initBuiltinSerializers,Ji as initPhysics,$i as initVolumeParameterSerializer,qi as instantiate,el as invokeLoadedImportPluginHooks,al as invokeXRSessionEnd,sl as invokeXRSessionStart,tl as isActiveInHierarchy,ol as isActiveSelf,rl as isAndroidDevice,nl as isAnimationAction,il as isComponent,ll as isDebugMode,dl as isDesktop,cl as isDestroyed,ml as isDevEnvironment,pl as isDisposed,gl as isExporting,Sl as isGLTFModel,ul as isHostedOnGlitch,Cl as isHotReloadEnabled,yl as isHotReloading,El as isIPad,Rl as isIconElement,hl as isLocalNetwork,fl as isMacOS,vl as isMobileDevice,Pl as isMozillaXR,Al as isQuest,Tl as isResourceTrackingEnabled,Ml as isSafari,bl as isUsingInstancing,Il as isiOS,Dl as isiPad,p as loadAsset,Ol as loadPMREM,xl as loadSync,kl as logHierarchy,Ll as lookAtInverse,Bl as lookAtObject,Fl as lookAtScreenPoint,Nl as makeId,Wl as makeIdFromRandomWords,wl as makeNameSafeForUSD,Gl as markAsInstancedRendered,Ul as microphonePermissionsGranted,Hl as nameof,Xl as nameofFactory,zl as needle,Vl as objectSerializer,_l as offBeforeXRSession,jl as offXRSessionEnd,Kl as offXRSessionStart,i as onAfterRender,l as onBeforeRender,Ql as onBeforeXRSession,o as onClear,r as onDestroy,n as onInitialized,c as onStart,Zl as onSyncDestroy,Yl as onSyncInstantiate,d as onUpdate,Jl as onXRSessionEnd,$l as onXRSessionStart,ql as parseSync,ed as placeOnSurface,ad as postprocessFBXMaterials,sd as prefix,td as pushState,od as randomNumber,rd as registerBinaryType,nd as registerComponent,id as registerComponentExtension,ld as registerCustomEffectType,dd as registerExportExtensions,cd as registerExtensions,md as registerHotReloadType,pd as registerLoader,gd as registerPrefabProvider,Sd as registerPrototypeExtensions,ud as registerType,Cd as relativePathPrefix,yd as removeAttributeChangeCallback,Ed as removeComponent,Rd as removeCustomImportExtensionType,hd as removePatch,fd as resolveUrl,vd as sanitizeString,Pd as saveImage,Ad as screenshot,Td as screenshot2,Md as sendDestroyed,bd as serializable,Id as serializeObject,Dd as serializeable,Od as setActive,xd as setAllowBalloonMessages,kd as setAllowOverlayMessages,Ld as setAutoFitEnabled,Bd as setCameraController,Fd as setDestroyed,Nd as setDevEnvironment,Wd as setDisposable,wd as setDontDestroy,Gd as setOrAddParamsToUrl,Ud as setParam,Hd as setParamWithoutReload,Xd as setPeerOptions,zd as setResourceTrackingEnabled,Vd as setState,_d as setVisibleInCustomShadowRendering,jd as setWorldEuler,Kd as setWorldPosition,Qd as setWorldPositionXYZ,Zd as setWorldQuaternion,Yd as setWorldQuaternionXYZW,Jd as setWorldRotation,$d as setWorldRotationXYZ,qd as setWorldScale,ec as showBalloonError,ac as showBalloonMessage,sc as showBalloonWarning,tc as showDebugConsole,oc as slerp,rc as syncDestroy,nc as syncField,ic as syncInstantiate,lc as textureToCanvas,dc as toSourceId,cc as tryCastBinary,mc as tryDetermineMimetypeFromBinary,pc as tryDetermineMimetypeFromURL,gc as tryFindObject,Sc as tryGetGuid,uc as unregisterHotReloadType,Cc as unregisterPrefabProvider,yc as unwatchWrite,Ec as useForAutoFit,Rc as validate,hc as watchWrite};
|