@needle-tools/engine 5.1.0-experimental.ab2b091 → 5.1.0-experimental.e1fca8a

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.
Files changed (44) hide show
  1. package/dist/{needle-engine.bundle-BCYyOY9H.min.js → needle-engine.bundle-BVMcIQlw.min.js} +2 -2
  2. package/dist/{needle-engine.bundle-CqUYvUIH.umd.cjs → needle-engine.bundle-DN5GLt_w.umd.cjs} +3 -3
  3. package/dist/{needle-engine.bundle-DM0ePqto.js → needle-engine.bundle-h-83OjVL.js} +9 -9
  4. package/dist/needle-engine.d.ts +6 -6
  5. package/dist/needle-engine.js +226 -226
  6. package/dist/needle-engine.min.js +1 -1
  7. package/dist/needle-engine.umd.cjs +1 -1
  8. package/lib/engine/api.d.ts +1 -1
  9. package/lib/engine/api.js +1 -1
  10. package/lib/engine/api.js.map +1 -1
  11. package/lib/engine/engine_init.js +2 -2
  12. package/lib/engine/engine_init.js.map +1 -1
  13. package/lib/engine/engine_license.d.ts +7 -7
  14. package/lib/engine/engine_license.js +49 -49
  15. package/lib/engine/engine_license.js.map +1 -1
  16. package/lib/engine/engine_networking_blob.js +3 -3
  17. package/lib/engine/engine_networking_blob.js.map +1 -1
  18. package/lib/engine/engine_utils_qrcode.js +2 -2
  19. package/lib/engine/engine_utils_qrcode.js.map +1 -1
  20. package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +2 -2
  21. package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js.map +1 -1
  22. package/lib/engine/webcomponents/needle menu/needle-menu.js +5 -5
  23. package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
  24. package/lib/engine/webcomponents/needle-engine.js +2 -2
  25. package/lib/engine/webcomponents/needle-engine.js.map +1 -1
  26. package/lib/engine/webcomponents/needle-engine.loading.js +2 -2
  27. package/lib/engine/webcomponents/needle-engine.loading.js.map +1 -1
  28. package/lib/engine/xr/TempXRContext.js +2 -2
  29. package/lib/engine/xr/TempXRContext.js.map +1 -1
  30. package/lib/engine-components/export/usdz/USDZExporter.js +4 -4
  31. package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
  32. package/package.json +1 -1
  33. package/src/engine/api.ts +1 -1
  34. package/src/engine/engine_init.ts +2 -2
  35. package/src/engine/engine_license.ts +47 -47
  36. package/src/engine/engine_networking_blob.ts +3 -3
  37. package/src/engine/engine_utils_qrcode.ts +2 -2
  38. package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +2 -2
  39. package/src/engine/webcomponents/needle menu/needle-menu.ts +5 -5
  40. package/src/engine/webcomponents/needle-engine.loading.ts +6 -6
  41. package/src/engine/webcomponents/needle-engine.ts +2 -2
  42. package/src/engine/xr/TempXRContext.ts +2 -2
  43. package/src/engine-components/export/usdz/USDZExporter.ts +4 -4
  44. package/src/vite-env.d.ts +0 -16
@@ -140,7 +140,7 @@ void main(){
140
140
  #__vconsole .vc-mask {
141
141
  overflow: hidden;
142
142
  }
143
- `,Tr?.prepend(i),o===!0&&M_()<=0&&ov(),console.log("\u{1F335} Debug console has loaded")}},e.onerror=()=>{console.warn("\u{1F335} Debug console failed to load."+(window.crossOriginIsolated?"This page is using cross-origin isolation, so external scripts can't be loaded.":"")),Ac=!1,vi=null},e.src="https://cdn.jsdelivr.net/npm/vconsole@3.15.1/dist/vconsole.min.js",document.body.appendChild(e)}function GO(){if(!globalThis.VConsole)return;const o=new VConsole.VConsolePlugin("needle-console","\u{1F335} Inspect glTF"),e=()=>document.querySelector("#__vc_plug_"+o._id+" iframe");return o.on("renderTab",function(t){const i=globalThis["needle:codegen_files"];if(!i||i.length===0)return;let n=globalThis["needle:codegen_files"][0];const s=n.indexOf("?");s>-1&&(n=n.substring(0,s));const r=location.protocol+"//"+location.host+location.pathname+"/"+n,a=encodeURIComponent(r);o.fullUrl="https://viewer.needle.tools?inspect&file="+a;var l='<iframe src="" style="width: 100%; height: 99%; border: none;"></iframe>';t(l)}),o.on("show",function(){const t=e();t&&t.src!==o.fullUrl&&(t.src=o.fullUrl)}),o.on("hide",function(){const t=e();t&&(t.src="")}),o.on("addTopBar",function(t){var i=new Array;i.push({name:"Open in new window \u2197",onClick:function(n){window.open(o.fullUrl,"_blank"),vi?.hide()}}),i.push({name:"Reload",onClick:function(n){const s=e();s&&(s.src=o.fullUrl)}}),i.push({name:"Fullscreen",onClick:function(n){const s=e();s.requestFullscreen?s.requestFullscreen():s.webkitRequestFullscreen instanceof Function&&s.webkitRequestFullscreen()}}),t(i)}),o}const zg="padding: 10px; font-family: monospace;",rv="margin-bottom: 10px;",Rr="margin-bottom: 10px; margin-top: 15px;",qO="width: 100%; border-collapse: collapse; border: 1px solid rgba(0,0,0,0.1); table-layout: fixed;",av="border: 1px solid rgba(0,0,0,0.1); padding: 5px;",XO=av,QO=av+" word-break: break-all;";function Kn(o,e=!1){e&&o.sort((i,n)=>(n.value?1:0)-(i.value?1:0));let t=`<table style='${qO}'>`;t+="<tbody>";for(const i of o){const n=typeof i.value=="boolean"?i.value?"\u2705":"\u274C":i.value;t+=`<tr><td style='${XO}'>${i.label}</td><td style='${QO}'>${n}</td></tr>`}return t+="</tbody></table>",t}function lv(){try{if(document.createElement("canvas").getContext("webgl2"))return"\u2705"}catch{}return"\u274C"}function YO(){if(!globalThis.VConsole)return;const o=new VConsole.VConsolePlugin("device-utilities","\u{1F4F1} Device Info");return o.on("renderTab",function(e){let t=`<div style='${zg}'>`;const i=rE();t+=`<h3 style='${rv}'>Device: ${i}</h3>`,t+=Kn([{label:"\u{1F4BB} Desktop",value:I.isDesktop()},{label:"\u{1F4F1} Mobile Device",value:I.isMobileDevice()},{label:"\u{1F34E} iOS",value:I.isiOS()},{label:"\u{1F4F1} iPad",value:I.isiPad()},{label:"\u{1F916} Android",value:I.isAndroidDevice()},{label:"\u{1F98A} Mozilla XR",value:I.isMozillaXR()},{label:"\u{1F335} Needle App Clip",value:I.isNeedleAppClip()},{label:"\u{1F34F} macOS",value:I.isMacOS()},{label:"\u{1F453} VisionOS",value:I.isVisionOS()},{label:"\u{1F9ED} Safari",value:I.isSafari()},{label:"\u{1F576}\uFE0F Meta Quest",value:I.isQuest()},{label:"\u{1F517} QuickLook AR Support",value:I.supportsQuickLookAR()}],!0);const n=[],s=I.getiOSVersion();s&&n.push({label:"\u{1F34E} iOS Version",value:s});const r=I.getChromeVersion();r&&n.push({label:"\u{1F310} Chrome Version",value:r});const a=I.getSafariVersion();a&&n.push({label:"\u{1F9ED} Safari Version",value:a}),n.length>0&&(t+=Kn(n,!1)),t+="</div>",t+=`<div style='${zg} margin-top: 20px;'>`,t+=`<h3 style='${rv}'>User Agent Info</h3>`;const l=[{label:"User Agent",value:navigator.userAgent},{label:"Platform",value:navigator.platform},{label:"App Version",value:navigator.appVersion},{label:"User Agent Data",value:navigator.userAgentData?`Platform: ${navigator.userAgentData.platform}, Mobile: ${navigator.userAgentData.mobile}`:"Not supported"},{label:"WebXR",value:"xr"in navigator?"\u2705":"\u274C"},{label:"WebGPU",value:"gpu"in navigator?"\u2705":"\u274C"},{label:"WebGL 2",value:lv()}];t+=Kn(l,!1),t+="</div>",e(t)}),o}function KO(){if(!globalThis.VConsole)return;const o=new VConsole.VConsolePlugin("graphics-info","\u{1F3A8} Graphics Info");return o.on("renderTab",async function(e){let t=`<div style='${zg}'>`;const i=ZO();i.length>0&&(t+=`<h3 style='${Rr}'>General GPU Info</h3>`,t+=Kn(i,!1));const n=eE();n.length>0&&(t+=`<h3 style='${Rr}'>WebGL</h3>`,t+=Kn(n,!1));const s=tE();s.length>0&&(t+=`<h3 style='${Rr}'>WebGL 2 Features</h3>`,t+=Kn(s,!1));const r=iE();r.length>0&&(t+=`<h3 style='${Rr}'>WebGL Limits</h3>`,t+=Kn(r,!1));const a=nE();a.length>0&&(t+=`<h3 style='${Rr}'>Texture Formats</h3>`,t+=Kn(a,!1));const l=await oE();if(l.length>0&&(t+=`<h3 style='${Rr}'>WebGPU</h3>`,t+=Kn(l,!1)),I.isSafari()){const c=sE();c.length>0&&(t+=`<h3 style='${Rr}'>Safari GPU Info</h3>`,t+=Kn(c,!1))}t+="</div>",e(t)}),o}function ZO(){const o=[],e=window.devicePixelRatio;o.push({label:"Device Pixel Ratio",value:e.toString()}),o.push({label:"Width (px)",value:(window.innerWidth*e).toString()}),o.push({label:"Height (px)",value:(window.innerHeight*e).toString()});const t=I.isMobileDevice()?150:96,i=screen.width/t,n=screen.height/t,s=i*2.54,r=n*2.54;o.push({label:"Estimated Width (cm)",value:s.toFixed(1)}),o.push({label:"Estimated Height (cm)",value:r.toFixed(1)});const a=cv();if(a){o.push({label:"GPU",value:a.renderer}),o.push({label:"Driver",value:a.vendor}),o.push({label:"ANGLE",value:a.angle||"Not detected"});const l=JO(a.renderer);l&&(l.manufacturer&&o.push({label:"Manufacturer",value:l.manufacturer}),l.cardVersion&&o.push({label:"Card Version",value:l.cardVersion}),l.brand&&o.push({label:"Brand",value:l.brand}),o.push({label:"Integrated",value:l.integrated?"Yes":"No"}),l.layer&&o.push({label:"WebGL Layer",value:l.layer}))}return o}function JO(o){if(!o)return null;const e=(l,c)=>{const d=c.match(l);return d&&d[0]},t=e(/(ANGLE)/g,o)||void 0,i=e(/((NVIDIA|AMD|Intel)[^\d]*[^\s]+)/,o)||o,n=i.split(" ");n.shift();const s=e(/(NVIDIA|AMD|Intel)/g,i)||void 0,r=n.length>0?n.pop():void 0,a=n.length>0?n.join(" "):void 0;return{manufacturer:s,cardVersion:r,brand:a,integrated:s==="Intel",layer:t,card:i}}function eE(){const o=[],e=cv();return e&&(o.push({label:"\u{1F4CA} WebGL Version",value:e.version}),o.push({label:"\u{1F3AE} WebGL 2 Available",value:lv()})),o}function tE(){const o=[];try{const e=document.createElement("canvas").getContext("webgl2");if(!e)return o;o.push({label:"Float Color Buffer",value:e.getExtension("EXT_color_buffer_float")?"\u2705":"\u274C"}),o.push({label:"Anisotropic Filtering",value:e.getExtension("EXT_texture_filter_anisotropic")?"\u2705":"\u274C"}),o.push({label:"Float Texture Linear",value:e.getExtension("OES_texture_float_linear")?"\u2705":"\u274C"}),o.push({label:"S3TC Compression",value:e.getExtension("WEBGL_compressed_texture_s3tc")?"\u2705":"\u274C"}),o.push({label:"ETC Compression",value:e.getExtension("WEBGL_compressed_texture_etc")?"\u2705":"\u274C"}),o.push({label:"PVRTC Compression",value:e.getExtension("WEBGL_compressed_texture_pvrtc")?"\u2705":"\u274C"}),o.push({label:"ASTC Compression",value:e.getExtension("WEBGL_compressed_texture_astc")?"\u2705":"\u274C"})}catch{}return o}function iE(){const o=[];try{const e=document.createElement("canvas"),t=e.getContext("webgl2")||e.getContext("webgl");if(!t)return o;const i=t instanceof WebGL2RenderingContext;o.push({label:"\u{1F4CF} Max Texture Size",value:t.getParameter(t.MAX_TEXTURE_SIZE).toString()}),o.push({label:"\u{1F3A8} Max Renderbuffer Size",value:t.getParameter(t.MAX_RENDERBUFFER_SIZE).toString()}),o.push({label:"\u{1F517} Max Vertex Attribs",value:t.getParameter(t.MAX_VERTEX_ATTRIBS).toString()}),o.push({label:"\u{1F3AF} Max Texture Units",value:t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS).toString()}),i&&(o.push({label:"\u26A1 Max Samples",value:t.getParameter(t.MAX_SAMPLES).toString()}),o.push({label:"\u{1F504} Max Uniform Buffer Bindings",value:t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS).toString()}),o.push({label:"\u{1F4D0} Max 3D Texture Size",value:t.getParameter(t.MAX_3D_TEXTURE_SIZE).toString()}))}catch{}return o}function nE(){const o=[];try{document.createElement("canvas").getContext("webgl")&&(o.push({label:"WebGL 1 RGBA",value:"\u2705"}),o.push({label:"WebGL 1 RGB",value:"\u2705"}));const e=document.createElement("canvas").getContext("webgl2");e&&(o.push({label:"WebGL 2 RGBA32F",value:e.getExtension("EXT_color_buffer_float")?"\u2705":"\u274C"}),o.push({label:"WebGL 2 RGB32F",value:e.getExtension("EXT_color_buffer_float")?"\u2705":"\u274C"}),o.push({label:"WebGL 2 R11F_G11F_B10F",value:"\u2705"}),o.push({label:"WebGL 2 RGB565",value:"\u2705"}),o.push({label:"WebGL 2 RGB5_A1",value:"\u2705"}),o.push({label:"WebGL 2 RGBA4444",value:"\u2705"}))}catch{}return o}async function oE(){const o=[];if(!("gpu"in navigator))return o.push({label:"\u{1F680} WebGPU Support",value:"\u274C Not supported"}),o;o.push({label:"\u{1F680} WebGPU Support",value:"\u2705 Supported"});try{const e=await navigator.gpu.requestAdapter();if(!e)return o.push({label:"\u{1F3AF} Adapter",value:"No adapter available"}),o;o.push({label:"\u{1F3AF} Adapter",value:e.name||"Unknown Adapter"});const t=await e.requestDevice();o.push({label:"\u{1F527} Device",value:t.label||"WebGPU Device"}),o.push({label:"\u{1F4CF} Max Texture 2D",value:t.limits.maxTextureDimension2D.toString()}),o.push({label:"\u{1F4D0} Max Texture 3D",value:t.limits.maxTextureDimension3D.toString()}),o.push({label:"\u{1F4CA} Max Texture Array Layers",value:t.limits.maxTextureArrayLayers.toString()}),o.push({label:"\u{1F4BE} Max Buffer Size",value:`${(t.limits.maxBufferSize/1024/1024).toFixed(1)}MB`}),o.push({label:"\u{1F517} Max Bind Groups",value:t.limits.maxBindGroups.toString()})}catch(e){o.push({label:"\u274C Error",value:e.message})}return o}function cv(){try{const o=document.createElement("canvas"),e=o.getContext("webgl2")||o.getContext("webgl");if(!e)return null;const t=e.getExtension("WEBGL_debug_renderer_info"),i=t?e.getParameter(t.UNMASKED_RENDERER_WEBGL):e.getParameter(e.RENDERER),n=t?e.getParameter(t.UNMASKED_VENDOR_WEBGL):e.getParameter(e.VENDOR),s=e.getParameter(e.VERSION);let r;if(i&&i.includes("ANGLE")){const a=i.match(/ANGLE \(([^)]+)\)/);a&&(r=a[1])}return{renderer:i,vendor:n,version:s,angle:r}}catch{return null}}function sE(){const o=[];try{const e=document.createElement("canvas").getContext("webgl");if(e){const t=e.getExtension("WEBGL_debug_renderer_info");if(t){const i=e.getParameter(t.UNMASKED_RENDERER_WEBGL);i&&i.includes("Apple")&&o.push({label:"\u{1F34E} Apple GPU",value:i})}}}catch{}try{const e=document.createElement("canvas").getContext("webgl");e&&(e.getSupportedExtensions()||[]).includes("WEBGL_compressed_texture_pvrtc")&&o.push({label:"\u{1F5DC}\uFE0F PVRTC Support",value:"\u2705"})}catch{}return o}function rE(){return I.isQuest()?"Meta Quest":I.isVisionOS()?"Vision Pro":I.isiOS()?I.isiPad()?"iPad":"iPhone/iPod":I.isAndroidDevice()?"Android Device":I.isMozillaXR()?"Mozilla XR Browser":I.isNeedleAppClip()?"Needle App Clip":I.isMacOS()?"Mac":I.isDesktop()?"Desktop PC":"Unknown Device"}function aE(){return document.querySelector("#__vconsole .vc-switch")||null}function lE(){return document.querySelector("#__vconsole")||null}const su=w("debugtypes");class cE{_types=new Map;_reverseTypes=new Map;_lazyLoaders=new Map;constructor(){su&&console.warn("TypeStore: Created",this)}add(e,t){su&&console.warn("ADD TYPE",e);const i=this._types.get(e);i?su&&i!==t&&console.warn("Type name exists multiple times in your project and may lead to runtime errors:",e):(this._types.set(e,t),this._reverseTypes.set(t,e))}addLazy(e,t){this._types.has(e)||this._lazyLoaders.set(e,t)}get(e){return this._types.get(e)||null}async getAsync(e){const t=this._types.get(e);if(t)return t;const i=this._lazyLoaders.get(e);if(i){su&&console.warn("LAZY LOAD TYPE",e);const n=await i();return this.add(e,n),this._lazyLoaders.delete(e),n}return null}getKey(e){return this._reverseTypes.get(e)||null}}const hE=Symbol("BuiltInType"),P=new cE,Ng=function(o){P.get(o.name)||P.add(o.name,o)};class dE{context;mixers=[];constructor(e){this.context=e}onDestroy(){this.mixers.forEach(e=>e.stopAllAction()),this.mixers.length=0}registerAnimationMixer(e){if(!e){console.warn("AnimationsRegistry.registerAnimationMixer called with null or undefined mixer");return}this.mixers.includes(e)||this.mixers.push(e)}unregisterAnimationMixer(e){if(!e){console.warn("AnimationsRegistry.unregisterAnimationMixer called with null or undefined mixer");return}const t=this.mixers.indexOf(e);t!==-1&&this.mixers.splice(t,1)}}var ni;(o=>{function e(d,h){const p=d.getRoot();return p&&(p.userData.static||p.matrixAutoUpdate===!1||p.matrixWorldAutoUpdate===!1)?((h===!0||h===void 0&&M())&&console.warn(`AnimationUtils: The root object (${p.name||p.type}) of this AnimationAction has matrixAutoUpdate or matrixWorldAutoUpdate set to false. This may prevent the animation from working correctly. If the object is marked as static, try to change it to dynamic.`,{static:p.userData.static,name:p.userData.name,tag:p.userData.tag,matrixAutoUpdate:p.matrixAutoUpdate,matrixWorldAutoUpdate:p.matrixWorldAutoUpdate}),!1):!0}o.testIfRootCanAnimate=e;function t(d){return d._actions||null}o.tryGetActionsFromMixer=t;function i(d,h){if(h||(h=new Array),d)d.animations&&h.push(...d.animations);else return h;if(d.children)for(const p of d.children)i(p,h);return h}o.tryGetAnimationClipsFromObjectHierarchy=i;const n=Symbol("objectIsAnimatedData");function s(d,h,p){if(!d)return;if(d[n]===void 0){if(!p)return;d[n]=new Set}const m=d[n];p?m.add(h):m.has(h)&&m.delete(h)}o.setObjectAnimated=s;function r(d){if(!d)return!1;const h=d[n];return h!==void 0&&h.size>0}o.getObjectAnimated=r;function a(d){if(!d||!d.animations)return console.debug("No animations found in file"),null;const h="scene"in d?d.scene:d,p=new Array;for(let g=0;g<d.animations.length;g++){const f=d.animations[g];if(!f.tracks||f.tracks.length<=0){console.warn("Animation has no tracks");continue}for(const y in f.tracks){const b=f.tracks[y],v=ja.parseTrackName(b.name);let x=ja.findNode(h,v.nodeName);if(!x){const k=b.__objectName??b.name.substring(0,b.name.indexOf("."));if(x=h.getObjectByProperty("uuid",k),!x)continue}let O=m(x)||m(h);if(!O){const k=P.get("Animation");if(O=h.addComponent(k),!O){console.error("Failed creating Animation component: No 'Animation' component found in TypeStore");break}}p.push(O),O.addClip&&O.addClip(f)}}return p;function m(g){if(!g)return null;const f=g.userData?.components;if(f&&f.length>0)for(let y=0;y<f.length;y++){const b=f[y];if(b.isAnimationComponent===!0)return b}return m(g.parent)}}o.autoplayAnimations=a;function l(){return new Wt("empty",0,[])}o.emptyClip=l;function c(d){const h=d?.duration??.3;let p={x:1,y:1,z:1};d?.scale!==void 0&&(typeof d.scale=="number"?p={x:d.scale,y:d.scale,z:d.scale}:p=d.scale);const m=d?.type??"linear",g=d?.scaleFactor??1.2,f=new Array,y=new Array;switch(m){case"linear":f.push(0,h),y.push(p.x,p.y,p.z,p.x*g,p.y*g,p.z*g);break;case"spring":f.push(0,h*.3,h*.5,h*.7,h*.9,h),y.push(p.x,p.y,p.z,p.x*g,p.y*g,p.z*g,p.x*.9,p.y*.9,p.z*.9,p.x*1.05,p.y*1.05,p.z*1.05,p.x*.98,p.y*.98,p.z*.98,p.x,p.y,p.z);break}const b=new VC(".scale",f,y);return new Wt("scale",f[f.length-1],[b])}o.createScaleClip=c})(ni||(ni={}));const Xe=function(o){return u(o)},u=function(o){if(o===void 0&&(o=null),!Array.isArray(o))o=hv(o);else for(let e=0;e<o.length;e++){const t=o[e];o[e]=hv(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 hv(o){switch(o?.prototype?.constructor?.name){case"Number":case"String":case"Boolean":return null}return o}const dv=w("debugcomponentevents");class ru{static eventListeners=new Map;static addComponentLifecylceEventListener(e,t){this.eventListeners.has(e)&&this.eventListeners.set(e,[]);let i=this.eventListeners.get(e);i||(i=[]),i.push(t),this.eventListeners.set(e,i),dv&&console.log("Added event listener for "+e,this.eventListeners)}static removeComponentLifecylceEventListener(e,t){const i=this.eventListeners.get(e);if(!i)return;const n=i.indexOf(t);n<0||i.splice(n,1)}static dispatchComponentLifecycleEvent(e,t){const i=this.eventListeners.get(e);if(dv&&console.log("Dispatching event "+e,i),!!i)for(const n of i)n(t)}}const uv=w("debugdefines");Ms('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"] = "0.0.0";'),Ms('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";'),Ms('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";'),Ms('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";'),Ms('globalThis["__NEEDLE_ENGINE_VERSION__"] = "5.1.0-alpha.5";'),Ms('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";'),Ms('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri May 08 2026 11:31:15 GMT+0000 (Coordinated Universal Time)";'),Ms('globalThis["__NEEDLE_PUBLIC_KEY__"] = "'+NEEDLE_PUBLIC_KEY+'";');const wi="5.1.0-alpha.5",Ha="undefined",Ic="Fri May 08 2026 11:31:15 GMT+0000 (Coordinated Universal Time)";uv&&console.log(`Engine version: ${wi} (generator: ${Ha})
143
+ `,Tr?.prepend(i),o===!0&&M_()<=0&&ov(),console.log("\u{1F335} Debug console has loaded")}},e.onerror=()=>{console.warn("\u{1F335} Debug console failed to load."+(window.crossOriginIsolated?"This page is using cross-origin isolation, so external scripts can't be loaded.":"")),Ac=!1,vi=null},e.src="https://cdn.jsdelivr.net/npm/vconsole@3.15.1/dist/vconsole.min.js",document.body.appendChild(e)}function GO(){if(!globalThis.VConsole)return;const o=new VConsole.VConsolePlugin("needle-console","\u{1F335} Inspect glTF"),e=()=>document.querySelector("#__vc_plug_"+o._id+" iframe");return o.on("renderTab",function(t){const i=globalThis["needle:codegen_files"];if(!i||i.length===0)return;let n=globalThis["needle:codegen_files"][0];const s=n.indexOf("?");s>-1&&(n=n.substring(0,s));const r=location.protocol+"//"+location.host+location.pathname+"/"+n,a=encodeURIComponent(r);o.fullUrl="https://viewer.needle.tools?inspect&file="+a;var l='<iframe src="" style="width: 100%; height: 99%; border: none;"></iframe>';t(l)}),o.on("show",function(){const t=e();t&&t.src!==o.fullUrl&&(t.src=o.fullUrl)}),o.on("hide",function(){const t=e();t&&(t.src="")}),o.on("addTopBar",function(t){var i=new Array;i.push({name:"Open in new window \u2197",onClick:function(n){window.open(o.fullUrl,"_blank"),vi?.hide()}}),i.push({name:"Reload",onClick:function(n){const s=e();s&&(s.src=o.fullUrl)}}),i.push({name:"Fullscreen",onClick:function(n){const s=e();s.requestFullscreen?s.requestFullscreen():s.webkitRequestFullscreen instanceof Function&&s.webkitRequestFullscreen()}}),t(i)}),o}const zg="padding: 10px; font-family: monospace;",rv="margin-bottom: 10px;",Rr="margin-bottom: 10px; margin-top: 15px;",qO="width: 100%; border-collapse: collapse; border: 1px solid rgba(0,0,0,0.1); table-layout: fixed;",av="border: 1px solid rgba(0,0,0,0.1); padding: 5px;",XO=av,QO=av+" word-break: break-all;";function Kn(o,e=!1){e&&o.sort((i,n)=>(n.value?1:0)-(i.value?1:0));let t=`<table style='${qO}'>`;t+="<tbody>";for(const i of o){const n=typeof i.value=="boolean"?i.value?"\u2705":"\u274C":i.value;t+=`<tr><td style='${XO}'>${i.label}</td><td style='${QO}'>${n}</td></tr>`}return t+="</tbody></table>",t}function lv(){try{if(document.createElement("canvas").getContext("webgl2"))return"\u2705"}catch{}return"\u274C"}function YO(){if(!globalThis.VConsole)return;const o=new VConsole.VConsolePlugin("device-utilities","\u{1F4F1} Device Info");return o.on("renderTab",function(e){let t=`<div style='${zg}'>`;const i=rE();t+=`<h3 style='${rv}'>Device: ${i}</h3>`,t+=Kn([{label:"\u{1F4BB} Desktop",value:I.isDesktop()},{label:"\u{1F4F1} Mobile Device",value:I.isMobileDevice()},{label:"\u{1F34E} iOS",value:I.isiOS()},{label:"\u{1F4F1} iPad",value:I.isiPad()},{label:"\u{1F916} Android",value:I.isAndroidDevice()},{label:"\u{1F98A} Mozilla XR",value:I.isMozillaXR()},{label:"\u{1F335} Needle App Clip",value:I.isNeedleAppClip()},{label:"\u{1F34F} macOS",value:I.isMacOS()},{label:"\u{1F453} VisionOS",value:I.isVisionOS()},{label:"\u{1F9ED} Safari",value:I.isSafari()},{label:"\u{1F576}\uFE0F Meta Quest",value:I.isQuest()},{label:"\u{1F517} QuickLook AR Support",value:I.supportsQuickLookAR()}],!0);const n=[],s=I.getiOSVersion();s&&n.push({label:"\u{1F34E} iOS Version",value:s});const r=I.getChromeVersion();r&&n.push({label:"\u{1F310} Chrome Version",value:r});const a=I.getSafariVersion();a&&n.push({label:"\u{1F9ED} Safari Version",value:a}),n.length>0&&(t+=Kn(n,!1)),t+="</div>",t+=`<div style='${zg} margin-top: 20px;'>`,t+=`<h3 style='${rv}'>User Agent Info</h3>`;const l=[{label:"User Agent",value:navigator.userAgent},{label:"Platform",value:navigator.platform},{label:"App Version",value:navigator.appVersion},{label:"User Agent Data",value:navigator.userAgentData?`Platform: ${navigator.userAgentData.platform}, Mobile: ${navigator.userAgentData.mobile}`:"Not supported"},{label:"WebXR",value:"xr"in navigator?"\u2705":"\u274C"},{label:"WebGPU",value:"gpu"in navigator?"\u2705":"\u274C"},{label:"WebGL 2",value:lv()}];t+=Kn(l,!1),t+="</div>",e(t)}),o}function KO(){if(!globalThis.VConsole)return;const o=new VConsole.VConsolePlugin("graphics-info","\u{1F3A8} Graphics Info");return o.on("renderTab",async function(e){let t=`<div style='${zg}'>`;const i=ZO();i.length>0&&(t+=`<h3 style='${Rr}'>General GPU Info</h3>`,t+=Kn(i,!1));const n=eE();n.length>0&&(t+=`<h3 style='${Rr}'>WebGL</h3>`,t+=Kn(n,!1));const s=tE();s.length>0&&(t+=`<h3 style='${Rr}'>WebGL 2 Features</h3>`,t+=Kn(s,!1));const r=iE();r.length>0&&(t+=`<h3 style='${Rr}'>WebGL Limits</h3>`,t+=Kn(r,!1));const a=nE();a.length>0&&(t+=`<h3 style='${Rr}'>Texture Formats</h3>`,t+=Kn(a,!1));const l=await oE();if(l.length>0&&(t+=`<h3 style='${Rr}'>WebGPU</h3>`,t+=Kn(l,!1)),I.isSafari()){const c=sE();c.length>0&&(t+=`<h3 style='${Rr}'>Safari GPU Info</h3>`,t+=Kn(c,!1))}t+="</div>",e(t)}),o}function ZO(){const o=[],e=window.devicePixelRatio;o.push({label:"Device Pixel Ratio",value:e.toString()}),o.push({label:"Width (px)",value:(window.innerWidth*e).toString()}),o.push({label:"Height (px)",value:(window.innerHeight*e).toString()});const t=I.isMobileDevice()?150:96,i=screen.width/t,n=screen.height/t,s=i*2.54,r=n*2.54;o.push({label:"Estimated Width (cm)",value:s.toFixed(1)}),o.push({label:"Estimated Height (cm)",value:r.toFixed(1)});const a=cv();if(a){o.push({label:"GPU",value:a.renderer}),o.push({label:"Driver",value:a.vendor}),o.push({label:"ANGLE",value:a.angle||"Not detected"});const l=JO(a.renderer);l&&(l.manufacturer&&o.push({label:"Manufacturer",value:l.manufacturer}),l.cardVersion&&o.push({label:"Card Version",value:l.cardVersion}),l.brand&&o.push({label:"Brand",value:l.brand}),o.push({label:"Integrated",value:l.integrated?"Yes":"No"}),l.layer&&o.push({label:"WebGL Layer",value:l.layer}))}return o}function JO(o){if(!o)return null;const e=(l,c)=>{const d=c.match(l);return d&&d[0]},t=e(/(ANGLE)/g,o)||void 0,i=e(/((NVIDIA|AMD|Intel)[^\d]*[^\s]+)/,o)||o,n=i.split(" ");n.shift();const s=e(/(NVIDIA|AMD|Intel)/g,i)||void 0,r=n.length>0?n.pop():void 0,a=n.length>0?n.join(" "):void 0;return{manufacturer:s,cardVersion:r,brand:a,integrated:s==="Intel",layer:t,card:i}}function eE(){const o=[],e=cv();return e&&(o.push({label:"\u{1F4CA} WebGL Version",value:e.version}),o.push({label:"\u{1F3AE} WebGL 2 Available",value:lv()})),o}function tE(){const o=[];try{const e=document.createElement("canvas").getContext("webgl2");if(!e)return o;o.push({label:"Float Color Buffer",value:e.getExtension("EXT_color_buffer_float")?"\u2705":"\u274C"}),o.push({label:"Anisotropic Filtering",value:e.getExtension("EXT_texture_filter_anisotropic")?"\u2705":"\u274C"}),o.push({label:"Float Texture Linear",value:e.getExtension("OES_texture_float_linear")?"\u2705":"\u274C"}),o.push({label:"S3TC Compression",value:e.getExtension("WEBGL_compressed_texture_s3tc")?"\u2705":"\u274C"}),o.push({label:"ETC Compression",value:e.getExtension("WEBGL_compressed_texture_etc")?"\u2705":"\u274C"}),o.push({label:"PVRTC Compression",value:e.getExtension("WEBGL_compressed_texture_pvrtc")?"\u2705":"\u274C"}),o.push({label:"ASTC Compression",value:e.getExtension("WEBGL_compressed_texture_astc")?"\u2705":"\u274C"})}catch{}return o}function iE(){const o=[];try{const e=document.createElement("canvas"),t=e.getContext("webgl2")||e.getContext("webgl");if(!t)return o;const i=t instanceof WebGL2RenderingContext;o.push({label:"\u{1F4CF} Max Texture Size",value:t.getParameter(t.MAX_TEXTURE_SIZE).toString()}),o.push({label:"\u{1F3A8} Max Renderbuffer Size",value:t.getParameter(t.MAX_RENDERBUFFER_SIZE).toString()}),o.push({label:"\u{1F517} Max Vertex Attribs",value:t.getParameter(t.MAX_VERTEX_ATTRIBS).toString()}),o.push({label:"\u{1F3AF} Max Texture Units",value:t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS).toString()}),i&&(o.push({label:"\u26A1 Max Samples",value:t.getParameter(t.MAX_SAMPLES).toString()}),o.push({label:"\u{1F504} Max Uniform Buffer Bindings",value:t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS).toString()}),o.push({label:"\u{1F4D0} Max 3D Texture Size",value:t.getParameter(t.MAX_3D_TEXTURE_SIZE).toString()}))}catch{}return o}function nE(){const o=[];try{document.createElement("canvas").getContext("webgl")&&(o.push({label:"WebGL 1 RGBA",value:"\u2705"}),o.push({label:"WebGL 1 RGB",value:"\u2705"}));const e=document.createElement("canvas").getContext("webgl2");e&&(o.push({label:"WebGL 2 RGBA32F",value:e.getExtension("EXT_color_buffer_float")?"\u2705":"\u274C"}),o.push({label:"WebGL 2 RGB32F",value:e.getExtension("EXT_color_buffer_float")?"\u2705":"\u274C"}),o.push({label:"WebGL 2 R11F_G11F_B10F",value:"\u2705"}),o.push({label:"WebGL 2 RGB565",value:"\u2705"}),o.push({label:"WebGL 2 RGB5_A1",value:"\u2705"}),o.push({label:"WebGL 2 RGBA4444",value:"\u2705"}))}catch{}return o}async function oE(){const o=[];if(!("gpu"in navigator))return o.push({label:"\u{1F680} WebGPU Support",value:"\u274C Not supported"}),o;o.push({label:"\u{1F680} WebGPU Support",value:"\u2705 Supported"});try{const e=await navigator.gpu.requestAdapter();if(!e)return o.push({label:"\u{1F3AF} Adapter",value:"No adapter available"}),o;o.push({label:"\u{1F3AF} Adapter",value:e.name||"Unknown Adapter"});const t=await e.requestDevice();o.push({label:"\u{1F527} Device",value:t.label||"WebGPU Device"}),o.push({label:"\u{1F4CF} Max Texture 2D",value:t.limits.maxTextureDimension2D.toString()}),o.push({label:"\u{1F4D0} Max Texture 3D",value:t.limits.maxTextureDimension3D.toString()}),o.push({label:"\u{1F4CA} Max Texture Array Layers",value:t.limits.maxTextureArrayLayers.toString()}),o.push({label:"\u{1F4BE} Max Buffer Size",value:`${(t.limits.maxBufferSize/1024/1024).toFixed(1)}MB`}),o.push({label:"\u{1F517} Max Bind Groups",value:t.limits.maxBindGroups.toString()})}catch(e){o.push({label:"\u274C Error",value:e.message})}return o}function cv(){try{const o=document.createElement("canvas"),e=o.getContext("webgl2")||o.getContext("webgl");if(!e)return null;const t=e.getExtension("WEBGL_debug_renderer_info"),i=t?e.getParameter(t.UNMASKED_RENDERER_WEBGL):e.getParameter(e.RENDERER),n=t?e.getParameter(t.UNMASKED_VENDOR_WEBGL):e.getParameter(e.VENDOR),s=e.getParameter(e.VERSION);let r;if(i&&i.includes("ANGLE")){const a=i.match(/ANGLE \(([^)]+)\)/);a&&(r=a[1])}return{renderer:i,vendor:n,version:s,angle:r}}catch{return null}}function sE(){const o=[];try{const e=document.createElement("canvas").getContext("webgl");if(e){const t=e.getExtension("WEBGL_debug_renderer_info");if(t){const i=e.getParameter(t.UNMASKED_RENDERER_WEBGL);i&&i.includes("Apple")&&o.push({label:"\u{1F34E} Apple GPU",value:i})}}}catch{}try{const e=document.createElement("canvas").getContext("webgl");e&&(e.getSupportedExtensions()||[]).includes("WEBGL_compressed_texture_pvrtc")&&o.push({label:"\u{1F5DC}\uFE0F PVRTC Support",value:"\u2705"})}catch{}return o}function rE(){return I.isQuest()?"Meta Quest":I.isVisionOS()?"Vision Pro":I.isiOS()?I.isiPad()?"iPad":"iPhone/iPod":I.isAndroidDevice()?"Android Device":I.isMozillaXR()?"Mozilla XR Browser":I.isNeedleAppClip()?"Needle App Clip":I.isMacOS()?"Mac":I.isDesktop()?"Desktop PC":"Unknown Device"}function aE(){return document.querySelector("#__vconsole .vc-switch")||null}function lE(){return document.querySelector("#__vconsole")||null}const su=w("debugtypes");class cE{_types=new Map;_reverseTypes=new Map;_lazyLoaders=new Map;constructor(){su&&console.warn("TypeStore: Created",this)}add(e,t){su&&console.warn("ADD TYPE",e);const i=this._types.get(e);i?su&&i!==t&&console.warn("Type name exists multiple times in your project and may lead to runtime errors:",e):(this._types.set(e,t),this._reverseTypes.set(t,e))}addLazy(e,t){this._types.has(e)||this._lazyLoaders.set(e,t)}get(e){return this._types.get(e)||null}async getAsync(e){const t=this._types.get(e);if(t)return t;const i=this._lazyLoaders.get(e);if(i){su&&console.warn("LAZY LOAD TYPE",e);const n=await i();return this.add(e,n),this._lazyLoaders.delete(e),n}return null}getKey(e){return this._reverseTypes.get(e)||null}}const hE=Symbol("BuiltInType"),P=new cE,Ng=function(o){P.get(o.name)||P.add(o.name,o)};class dE{context;mixers=[];constructor(e){this.context=e}onDestroy(){this.mixers.forEach(e=>e.stopAllAction()),this.mixers.length=0}registerAnimationMixer(e){if(!e){console.warn("AnimationsRegistry.registerAnimationMixer called with null or undefined mixer");return}this.mixers.includes(e)||this.mixers.push(e)}unregisterAnimationMixer(e){if(!e){console.warn("AnimationsRegistry.unregisterAnimationMixer called with null or undefined mixer");return}const t=this.mixers.indexOf(e);t!==-1&&this.mixers.splice(t,1)}}var ni;(o=>{function e(d,h){const p=d.getRoot();return p&&(p.userData.static||p.matrixAutoUpdate===!1||p.matrixWorldAutoUpdate===!1)?((h===!0||h===void 0&&M())&&console.warn(`AnimationUtils: The root object (${p.name||p.type}) of this AnimationAction has matrixAutoUpdate or matrixWorldAutoUpdate set to false. This may prevent the animation from working correctly. If the object is marked as static, try to change it to dynamic.`,{static:p.userData.static,name:p.userData.name,tag:p.userData.tag,matrixAutoUpdate:p.matrixAutoUpdate,matrixWorldAutoUpdate:p.matrixWorldAutoUpdate}),!1):!0}o.testIfRootCanAnimate=e;function t(d){return d._actions||null}o.tryGetActionsFromMixer=t;function i(d,h){if(h||(h=new Array),d)d.animations&&h.push(...d.animations);else return h;if(d.children)for(const p of d.children)i(p,h);return h}o.tryGetAnimationClipsFromObjectHierarchy=i;const n=Symbol("objectIsAnimatedData");function s(d,h,p){if(!d)return;if(d[n]===void 0){if(!p)return;d[n]=new Set}const m=d[n];p?m.add(h):m.has(h)&&m.delete(h)}o.setObjectAnimated=s;function r(d){if(!d)return!1;const h=d[n];return h!==void 0&&h.size>0}o.getObjectAnimated=r;function a(d){if(!d||!d.animations)return console.debug("No animations found in file"),null;const h="scene"in d?d.scene:d,p=new Array;for(let g=0;g<d.animations.length;g++){const f=d.animations[g];if(!f.tracks||f.tracks.length<=0){console.warn("Animation has no tracks");continue}for(const y in f.tracks){const b=f.tracks[y],v=ja.parseTrackName(b.name);let x=ja.findNode(h,v.nodeName);if(!x){const k=b.__objectName??b.name.substring(0,b.name.indexOf("."));if(x=h.getObjectByProperty("uuid",k),!x)continue}let O=m(x)||m(h);if(!O){const k=P.get("Animation");if(O=h.addComponent(k),!O){console.error("Failed creating Animation component: No 'Animation' component found in TypeStore");break}}p.push(O),O.addClip&&O.addClip(f)}}return p;function m(g){if(!g)return null;const f=g.userData?.components;if(f&&f.length>0)for(let y=0;y<f.length;y++){const b=f[y];if(b.isAnimationComponent===!0)return b}return m(g.parent)}}o.autoplayAnimations=a;function l(){return new Wt("empty",0,[])}o.emptyClip=l;function c(d){const h=d?.duration??.3;let p={x:1,y:1,z:1};d?.scale!==void 0&&(typeof d.scale=="number"?p={x:d.scale,y:d.scale,z:d.scale}:p=d.scale);const m=d?.type??"linear",g=d?.scaleFactor??1.2,f=new Array,y=new Array;switch(m){case"linear":f.push(0,h),y.push(p.x,p.y,p.z,p.x*g,p.y*g,p.z*g);break;case"spring":f.push(0,h*.3,h*.5,h*.7,h*.9,h),y.push(p.x,p.y,p.z,p.x*g,p.y*g,p.z*g,p.x*.9,p.y*.9,p.z*.9,p.x*1.05,p.y*1.05,p.z*1.05,p.x*.98,p.y*.98,p.z*.98,p.x,p.y,p.z);break}const b=new VC(".scale",f,y);return new Wt("scale",f[f.length-1],[b])}o.createScaleClip=c})(ni||(ni={}));const Xe=function(o){return u(o)},u=function(o){if(o===void 0&&(o=null),!Array.isArray(o))o=hv(o);else for(let e=0;e<o.length;e++){const t=o[e];o[e]=hv(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 hv(o){switch(o?.prototype?.constructor?.name){case"Number":case"String":case"Boolean":return null}return o}const dv=w("debugcomponentevents");class ru{static eventListeners=new Map;static addComponentLifecylceEventListener(e,t){this.eventListeners.has(e)&&this.eventListeners.set(e,[]);let i=this.eventListeners.get(e);i||(i=[]),i.push(t),this.eventListeners.set(e,i),dv&&console.log("Added event listener for "+e,this.eventListeners)}static removeComponentLifecylceEventListener(e,t){const i=this.eventListeners.get(e);if(!i)return;const n=i.indexOf(t);n<0||i.splice(n,1)}static dispatchComponentLifecycleEvent(e,t){const i=this.eventListeners.get(e);if(dv&&console.log("Dispatching event "+e,i),!!i)for(const n of i)n(t)}}const uv=w("debugdefines");Ms('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"] = "0.0.0";'),Ms('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";'),Ms('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";'),Ms('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";'),Ms('globalThis["__NEEDLE_ENGINE_VERSION__"] = "5.1.0-alpha.5";'),Ms('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";'),Ms('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri May 08 2026 11:49:38 GMT+0000 (Coordinated Universal Time)";'),Ms('globalThis["__NEEDLE_PUBLIC_KEY__"] = "'+NEEDLE_PUBLIC_KEY+'";');const wi="5.1.0-alpha.5",Ha="undefined",Ic="Fri May 08 2026 11:49:38 GMT+0000 (Coordinated Universal Time)";uv&&console.log(`Engine version: ${wi} (generator: ${Ha})
144
144
  Project built at ${Ic}`);const Es=NEEDLE_PUBLIC_KEY,Zn="needle_isActiveInHierarchy",Ar="builtin_components",Lc="needle_editor_guid";function Ms(o){try{(0,eval)(o)}catch(e){uv&&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 Wg={experimentalSmartHierarchyUpdate:!1},zi=Symbol("shadowDomOwner"),uE=w("debugpatch");function au(o,e,t,i){const n=uE===e;if(!t&&!i)return;const s=e+"___needle";mE(o,e,t,i);const r=Object.getOwnPropertyDescriptor(o,e),a=o[e];n&&console.log("Patch",o.constructor.name,e,r,a),r?(n&&console.log("Apply patch with existing descriptor",o.constructor.name,e,r),typeof r.value=="function"&&(o[e]=mv(r.value,o,e))):(n&&console.log("Create patch with new property",o.constructor.name,e,r),Object.defineProperty(o,e,{set:function(l){if(typeof l=="function")this[s]=mv(l,o,e);else{const c=this[s];gv(o,e,this,c,l),this[s]=l,fv(o,e,this,c,l)}},get:function(){const l=this[s];return typeof l=="function"&&l[s]?l[s]:l}}))}function pE(o,e,t){const i=$g(o,e);if(i)for(let n=i.length-1;n>=0;n--){const s=i[n];s.prefix===t&&(s.prefix=null),s.postfix===t&&(s.postfix=null),!s.prefix&&!s.postfix&&i.splice(n,1)}}const pv=Symbol("Needle:Patches:WrappedFunction");function mv(o,e,t){if(o[pv])return o;const i=function(...n){gv(e,t,this,...n);const s=o.apply(this,n);return fv(e,t,this,s,...n),s};return i[pv]=!0,i}const lu="Needle:Patches";function Vg(){return globalThis[lu]||(globalThis[lu]=new WeakMap),globalThis[lu]}function $g(o,e){const t=Vg().get(o);return t?t.get(e):null}function mE(o,e,t,i){let n=Vg().get(o);n||(n=new Map,Vg().set(o,n));let s=n.get(e);s||(s=[],n.set(e,s)),s.push({prefix:t,postfix:i})}function gv(o,e,t,...i){if(!t)return;const n=$g(o,e);if(n)for(const s of n)s.prefix?.call(t,...i)}function fv(o,e,t,i,...n){if(!t)return;const s=$g(o,e);if(s)for(const r of s)r.postfix?.call(t,i,...n)}function gE(o,e){if(typeof window!==void 0&&window.SPECTOR){console.log(window.SPECTOR);const t=new URLSearchParams(window.location.search);if(t.has("spector")){let i=function(){if(n>o.time.frame)return window.requestAnimationFrame(()=>i());const r=s.captureCanvas(e);r&&r instanceof Promise?r.then(()=>s.displayUI()):s.displayUI()};const n=Number.parseInt(t.get("spector")||"0")||0;console.log("Scheduled Spector capture at frame #"+n);const s=new window.SPECTOR.Spector;s.spyCanvases=!0,i();return}else M()&&console.debug("Spector available: Add '?spector=<frame>' to the URL to enable it and capture a frame.")}}function yv(o){const e=o;return!!(e.parser&&e.parser.json)}var cu=(o=>(o[o.None=0]="None",o[o.DontExport=1]="DontExport",o))(cu||{});const hu=Symbol("component-name");function du(o){return o&&typeof o=="object"&&o.isComponent}const fE=Symbol("object"),Hg=new Fi(()=>new _,20);class bv{_point;_normal;_tangentVelocity;distance;impulse;friction;get point(){return Hg.get().set(this._point.x,this._point.y,this._point.z)}get normal(){return Hg.get().set(this._normal.x,this._normal.y,this._normal.z)}get tangentVelocity(){return Hg.get().set(this._tangentVelocity.x,this._tangentVelocity.y,this._tangentVelocity.z)}constructor(e,t,i,n,s,r){this._point=e,this.distance=t,this._normal=i,this.impulse=n,this.friction=s,this._tangentVelocity=r}}class _v{contacts;constructor(e,t,i){this.me=e,this._collider=t,this._gameObject=t.gameObject,this.contacts=i}me;_collider;get collider(){return this._collider}_gameObject;get gameObject(){return this._gameObject}get rigidBody(){return this.collider?.attachedRigidbody}}class vv{object;collider;constructor(e,t){this.object=e,this.collider=t}}class zm{constructor(e){this.context=e,this.root.style.cssText=`
145
145
  position: absolute;
146
146
  width: 1px; height: 1px;
@@ -1730,4 +1730,4 @@ Needle Engine: finished loading `+i+`
1730
1730
  ---------------------------------
1731
1731
  \u2022 `+r.passes.map(h=>h.name||h.constructor.name+"*").join(`
1732
1732
  \u2022 `)+`
1733
- `),Ai&&this._onCreateEffectsDebug(this._composer,s)}createPassForMergeableEffects(e,t,i,n){if(e.length>0){const s=new A.POSTPROCESSING.MODULE.EffectPass(i,...e);s.name=e.map(r=>r.name).join(", "),s.mainScene=n,s.enabled=!0,s.renderToScreen=!1,t.addPass(s),e.length=0}}handleDevicePixelRatio(){typeof this.context.devicePixelRatio=="number"&&this.context.requestSizeUpdate()}_menuEntry=null;_passIndices=null;_onCreateEffectsDebug(e,t){if(Ai==="passes"){const i=new A.POSTPROCESSING.MODULE.DepthEffect({blendFunction:A.POSTPROCESSING.MODULE.BlendFunction.NORMAL,inverted:!0});i.name="Depth Effect";const n=new A.POSTPROCESSING.MODULE.EffectPass(t,i);if(n.name="Depth Effect Pass",n.enabled=!1,e.passes.push(n),this._passIndices!==null){const r=[e.passes[0]];this._passIndices.length>0&&r.push(...this._passIndices.filter(a=>a!==0).map(a=>e.passes[a]).filter(a=>a)),r.length>0&&console.log("[PostProcessing] Passes (selected) \u2192",r),e.passes.length=0;for(const a of r)a.enabled=!0,a.renderToScreen=!1,e.addPass(a)}const s=this.context.menu;if(s&&this._passIndices===null){this._menuEntry&&this._menuEntry.remove();const r=document.createElement("select");r.multiple=!0;const a=document.createElement("option");a.innerText="Final Output",a.value="-1",r.appendChild(a);for(const l of e.passes){const c=document.createElement("option");c.innerText=l.name,c.value=`${e.passes.indexOf(l)}`,c.title=l.name,r.appendChild(c)}s.appendChild(r),this._menuEntry=r,r.addEventListener("change",()=>{const l=Array.from(r.selectedOptions).map(c=>parseInt(c.value));l.length===1&&l[0]===-1?this._passIndices=null:this._passIndices=l,this.applyEffects(this.context)})}}}}const Qj=Object.freeze(Object.defineProperty({__proto__:null,PostProcessingHandler:bc},Symbol.toStringTag,{value:"Module"}));class Gm{_name;_tracks=[];_currentTrack=null;_pendingSignals=[];_idProvider;constructor(e,t){this._name=e,this._idProvider=new _t(t??Date.now())}static create(e,t){return new Gm(e??"Timeline",t)}animationTrack(e,t){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Animation,t??null),this}audioTrack(e,t,i){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Audio,t??null),this._currentTrack.volume=i,this}activationTrack(e,t){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Activation,t??null),this}controlTrack(e){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Control,null),this}signalTrack(e,t){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Signal,t??null),this}markerTrack(e){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Marker,null),this}clip(e,t){if(!this._currentTrack)throw new Error("TimelineBuilder: .clip() must be called after a track method (e.g. .animationTrack())");this.commitInlineTracks();const i=this._currentTrack;switch(i.type){case xe.Animation:{let n;if(e instanceof Wt)n=e;else{const d=Array.isArray(e)?e:[e],h=i.outputs[0],p=h instanceof E?h:h!=null&&"gameObject"in h?h.gameObject:void 0;n=ah(d,p)}const s=t??{},r=s.duration??n.duration,a=s.start??i.cursor,l=a+r,c={start:a,end:l,duration:r,timeScale:s.speed??1,clipIn:s.clipIn??0,easeInDuration:s.easeIn??0,easeOutDuration:s.easeOut??0,preExtrapolationMode:s.preExtrapolation??ot.None,postExtrapolationMode:s.postExtrapolation??ot.None,reversed:s.reversed,asset:{clip:n,loop:s.loop??!1,duration:n.duration,removeStartOffset:s.removeStartOffset??!1}};i.clips.push(c),i.cursor=l;break}case xe.Audio:{const n=e,s=t??{},r=s.duration,a=s.start??i.cursor,l=a+r,c={start:a,end:l,duration:r,timeScale:s.speed??1,clipIn:0,easeInDuration:s.easeIn??0,easeOutDuration:s.easeOut??0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{clip:n,loop:s.loop??!1,volume:s.volume??1}};i.clips.push(c),i.cursor=l;break}case xe.Activation:{const n=e,s=n.start??i.cursor,r=s+n.duration,a={start:s,end:r,duration:n.duration,timeScale:1,clipIn:0,easeInDuration:n.easeIn??0,easeOutDuration:n.easeOut??0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{}};i.clips.push(a),i.cursor=r;break}case xe.Control:{const n=e,s=t??{},r=s.start??i.cursor,a=s.duration,l=r+a,c={start:r,end:l,duration:a,timeScale:1,clipIn:0,easeInDuration:0,easeOutDuration:0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{sourceObject:n,controlActivation:s.controlActivation??!0,updateDirector:s.updateDirector??!0}};i.clips.push(c),i.cursor=l;break}default:throw new Error(`TimelineBuilder: .clip() is not supported on track type "${i.type}"`)}return this}marker(e,t,i){if(!this._currentTrack)throw new Error("TimelineBuilder: .marker() must be called after a track method");if(this._currentTrack.type!==xe.Signal&&this._currentTrack.type!==xe.Marker)throw new Error(`TimelineBuilder: .marker() is only supported on signal and marker tracks, not "${this._currentTrack.type}"`);const n={type:fh.Signal,time:e,retroActive:i?.retroActive??!1,emitOnce:i?.emitOnce??!1,asset:t};return this._currentTrack.markers.push(n),e>this._currentTrack.cursor&&(this._currentTrack.cursor=e),this}signal(e,t,i){if(!this._currentTrack)throw new Error("TimelineBuilder: .signal() must be called after a track method");if(this._currentTrack.type!==xe.Signal&&this._currentTrack.type!==xe.Marker)throw new Error(`TimelineBuilder: .signal() is only supported on signal and marker tracks, not "${this._currentTrack.type}"`);const n=this._idProvider.generateUUID(),s=this._tracks.indexOf(this._currentTrack),r={type:fh.Signal,time:e,retroActive:i?.retroActive??!1,emitOnce:i?.emitOnce??!1,asset:n};return this._currentTrack.markers.push(r),this._pendingSignals.push({trackIndex:s,guid:n,callback:t}),e>this._currentTrack.cursor&&(this._currentTrack.cursor=e),this}muted(e=!0){if(!this._currentTrack)throw new Error("TimelineBuilder: .muted() must be called after a track method");return this._currentTrack.muted=e,this}track(e,t,i,n){if(!this._currentTrack)throw new Error("TimelineBuilder: .track() must be called after .animationTrack()");if(this._currentTrack.type!==xe.Animation)throw new Error("TimelineBuilder: .track() is only supported on animation tracks");return this._currentTrack.inlineTracks.push(ay(e,t,i,n)),this}build(){this.commitInlineTracks();const e=this._tracks.map(t=>{const i={name:t.name,type:t.type,muted:t.muted,outputs:t.outputs};return t.clips.length>0&&(i.clips=t.clips),t.markers.length>0&&(i.markers=t.markers),t.volume!==void 0&&(i.volume=t.volume),t.trackOffset!==void 0&&(i.trackOffset=t.trackOffset),i});return{name:this._name,tracks:e}}install(e){const t=this.build();if(this._pendingSignals.length>0){const i=e.gameObject;let n=C.getComponent(i,Kr);n||(n=C.addComponent(i,Kr)),n.events||(n.events=[]);for(const s of this._pendingSignals){const r=new gh;r.guid=s.guid;const a=new bl;a.signal=r,a.reaction=new oe([s.callback]),n.events.push(a);const l=t.tracks[s.trackIndex];l&&!l.outputs.includes(n)&&l.outputs.push(n)}}return e.playableAsset=t,t}pushTrack(e,t,i){const n={name:e,type:t,muted:!1,outputs:i?[i]:[],clips:[],markers:[],cursor:0,inlineTracks:[]};return this._tracks.push(n),n}commitInlineTracks(){if(!this._currentTrack||this._currentTrack.inlineTracks.length===0)return;const e=this._currentTrack,t=e.outputs[0],i=t instanceof E?t:t!=null&&"gameObject"in t?t.gameObject:void 0,n=ah(e.inlineTracks,i),s=e.cursor,r=n.duration,a={start:s,end:s+r,duration:r,timeScale:1,clipIn:0,easeInDuration:0,easeOutDuration:0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{clip:n,loop:!1,duration:n.duration,removeStartOffset:!1}};e.clips.push(a),e.cursor=s+r,e.inlineTracks=[]}}class kC{}const Yj=Object.freeze(Object.defineProperty({__proto__:null,ActionBuilder:fe,ActionCollection:sS,ActionModel:Ii,AlignmentConstraint:xh,Animation:Ht,AnimationBuilder:Vm,AnimationCurve:Vh,AnimationExtension:Wp,Animator:St,AnimatorController:so,Antialiasing:qh,Attractor:Kl,AudioExtension:Ma,AudioListener:Go,AudioSource:$i,Avatar:Xs,AvatarMarker:pt,AxesHelper:vl,BaseUIComponent:yn,BasicIKConstraint:Py,BehaviorExtension:v0,BehaviorModel:zt,BloomEffect:gm,BoxCollider:bp,BoxGizmo:da,BoxHelperComponent:Nt,Button:hs,CallInfo:Bs,Camera:ki,CameraTargetReachedEvent:mh,Canvas:Vl,CanvasGroup:er,CapsuleCollider:qo,ChangeMaterialOnClick:c0,ChangeTransformOnClick:aa,CharacterController:ea,CharacterControllerInput:Qo,ChromaticAberration:Xh,ClickThrough:Tm,ColorAdjustments:rr,ColorBySpeedModule:Ql,ColorOverLifetimeModule:lm,ContactShadows:Ch,CursorFollow:Sa,CustomBranding:ha,Deletable:Ty,DeleteBox:_r,DepthOfField:Nn,DeviceFlag:_p,DocumentExtension:PC,DragControls:ia,DropListener:Jo,Duplicatable:Gy,EffectWrapper:Yh,EmissionModule:rs,EmphasizeOnClick:Ll,EnvironmentScene:pp,EventList:oe,EventListEvent:ly,EventSystem:fi,EventTrigger:Ap,FieldWithDefault:I1,FixedJoint:F0,Fog:$l,GltfExport:Zy,GltfExportBox:Yy,Gradient:pa,Graphic:Uh,GraphicRaycaster:sp,GridHelper:Hl,GridLayoutGroup:M0,GroundProjectedEnv:ro,GroupActionModel:ra,HideOnStart:vn,HingeJoint:Wh,HorizontalLayoutGroup:E0,get HoverAnimation(){return Co},Image:nc,InheritVelocityModule:G0,InputField:fb,InstanceHandle:La,InstancingHandler:Ta,Interactable:My,Keyframe:Ti,LODGroup:tm,LODModel:ql,Light:Dt,LimitVelocityOverLifetimeModule:gt,LogStats:Ey,LookAt:yb,LookAtConstraint:Xr,MainModule:Zt,MaskableGraphic:zh,MeshCollider:Vs,MeshRenderer:Oh,MinMaxCurve:K,MinMaxGradient:ma,NeedleMenu:go,NestedGltf:Xl,Networking:V0,NoiseModule:_e,ObjectRaycaster:ln,OffsetConstraint:ua,OpenURL:oc,OrbitControls:me,Outline:Nl,Padding:ca,ParticleBurst:am,ParticleSubEmitter:q0,ParticleSystem:Gh,ParticleSystemRenderer:pn,PhysicsExtension:w0,PixelationEffect:Kh,PlayAnimationOnClick:Th,PlayAudioOnClick:qs,PlayableDirector:_l,PlayerColor:gc,PointerEventData:Md,PostProcessingHandler:bc,PreliminaryAction:Dl,PreliminaryTrigger:Rh,RawImage:Om,Rect:_S,RectTransform:Un,ReflectionProbe:Ko,RegisteredAnimationInfo:vr,RemoteSkybox:yp,Renderer:hi,RendererLightmap:Vy,Rigidbody:tt,RotationBySpeedModule:un,RotationOverLifetimeModule:zn,SceneSwitcher:it,ScreenCapture:ar,ScreenSpaceAmbientOcclusion:as,ScreenSpaceAmbientOcclusionN8:Wn,ScrollFollow:ds,SeeThrough:ls,SetActiveOnClick:h0,ShadowCatcher:td,ShapeModule:H0,SharpeningEffect:Jh,SignalAsset:gh,SignalReceiver:Kr,SignalReceiverEvent:bl,SignalTrackHandler:bh,Size:bS,SizeBySpeedModule:Ri,SizeOverLifetimeModule:ga,SkinnedMeshRenderer:$y,SmoothFollow:wm,SpatialGrabRaycaster:Ea,SpatialHtml:rd,SpatialTrigger:xm,SpatialTriggerReceiver:xo,SpectatorCamera:Sm,SphereCollider:wl,SplineContainer:va,SplineData:So,SplineWalker:gn,Sprite:ts,SpriteData:Bl,SpriteRenderer:Oi,SpriteSheet:jl,SubEmitterSystem:um,SyncedCamera:hb,SyncedRoom:$n,SyncedTransform:An,TapGestureTrigger:u0,TeleportTarget:Xp,TestRunner:pb,TestSimulateUserData:mb,Text:Kt,TextBuilder:k0,TextExtension:Jp,TextureSheetAnimationModule:Jt,TiltShiftEffect:vo,TimelineActivationTrack:hp,TimelineAnimationTrack:yh,TimelineAudioTrack:vs,TimelineBuilder:Gm,TimelineControlTrack:dp,TimelineMarkerTrack:cp,ToneMappingEffect:sr,TrailModule:Fe,TransformData:Ve,TransformGizmo:wa,TriggerBuilder:Qt,TriggerModel:gr,UIRaycastUtils:py,UIRootComponent:jh,USDZExporter:bo,USDZText:Wl,USDZUIExtension:A0,UsageMarker:Ph,VariantAction:a0,VelocityOverLifetimeModule:Ye,VerticalLayoutGroup:O0,VideoPlayer:yt,get ViewBox(){return dt},Vignette:_a,VisibilityAction:Ah,Voip:cs,Volume:Jl,VolumeParameter:N,VolumeProfile:pm,WebARCameraBackground:dd,WebARSessionRoot:wn,WebXR:Qp,WebXRImageTracking:ud,WebXRImageTrackingModel:ps,WebXRPlaneTracking:ms,WebXRTrackedImage:fc,XRControllerFollow:us,XRControllerModel:is,XRControllerMovement:qi,XRFlag:Bn,XRRig:Lm,XRState:gi,__Ignore:kC},Symbol.toStringTag,{value:"Module"}));var Lb;(o=>{function e(t,i=!1,n=.75){const s=new va,r=1-j.clamp(n,0,1);return t.forEach((a,l)=>{const c=new _;l<t.length-1?c.subVectors(t[l+1],a).normalize().multiplyScalar(r):i&&t.length>1&&c.subVectors(t[0],a).normalize().multiplyScalar(r);const d=new So;d.position.copy(a),d.tangentIn.copy(c),d.tangentOut.copy(c),s.addKnot(d)}),s.closed=i,s}o.createFromPoints=e})(Lb||(Lb={}));class Kj extends Ak{constructor(){super(new Worker(URL.createObjectURL(new Blob([`import '${new URL("./generateMeshBVH.worker-DiCnZlf3.js",import.meta.url).toString()}';`],{type:"text/javascript"})),{type:"module"})),this.name="GenerateMeshBVHWorker"}runTask(e,t,i={}){return new Promise((n,s)=>{if(t.getAttribute("position").isInterleavedBufferAttribute||t.index&&t.index.isInterleavedBufferAttribute)throw new Error("GenerateMeshBVHWorker: InterleavedBufferAttribute are not supported for the geometry attributes.");e.onerror=c=>{s(new Error(`[GenerateMeshBVHWorker] ${c.message||"Could not load worker."}`))},e.onmessage=c=>{const{data:d}=c;if(d.error)s(new Error(d.error)),e.onmessage=null;else if(d.serialized){const{serialized:h,position:p}=d,m=Ik.deserialize(h,t,{setIndex:!1}),g=Object.assign({setBoundingBox:!0},i);if(t.attributes.position.array=p,h.index)if(t.index)t.index.array=h.index;else{const f=new nt(h.index,1,!1);t.setIndex(f)}g.setBoundingBox&&(t.boundingBox=m.getBoundingBox(new ti)),i.onProgress&&i.onProgress(d.progress),n(m),e.onmessage=null}else i.onProgress&&i.onProgress(d.progress)};const r=t.index?t.index.array:null,a=t.attributes.position.array,l=[a];r&&l.push(r),e.postMessage({index:r,position:a,options:{...i,onProgress:null,includedProgressCallback:!!i.onProgress,groups:[...t.groups]}},l.map(c=>c.buffer).filter(c=>typeof SharedArrayBuffer>"u"||!(c instanceof SharedArrayBuffer)))})}}const Zj=Object.freeze(Object.defineProperty({__proto__:null,GenerateMeshBVHWorker:Kj},Symbol.toStringTag,{value:"Module"}));export{hu as $componentName,fE as $physicsKey,fe as ActionBuilder,sS as ActionCollection,Ii as ActionModel,Qv as Addressables,xh as AlignmentConstraint,il as AmbientMode,Ht as Animation,Vm as AnimationBuilder,Vh as AnimationCurve,Wp as AnimationExtension,ni as AnimationUtils,St as Animator,Ci as AnimatorConditionMode,so as AnimatorController,$m as AnimatorControllerBuilder,qr as AnimatorControllerParameterType,rh as AnimatorStateInfo,qh as Antialiasing,Gn as Application,Jw as AssetDatabase,ee as AssetReference,Kl as Attractor,cy as AudioClip,Ma as AudioExtension,Go as AudioListener,$i as AudioSource,Xs as Avatar,pt as AvatarMarker,fl as Axes,vl as AxesHelper,Ic as BUILD_TIME,yn as BaseUIComponent,Py as BasicIKConstraint,v0 as BehaviorExtension,zt as BehaviorModel,Ir as BlobStorage,gm as BloomEffect,bp as BoxCollider,da as BoxGizmo,Nt as BoxHelperComponent,hs as Button,bn as ButtonsFactory,zS as CallDirection,Bs as CallInfo,ki as Camera,mh as CameraTargetReachedEvent,Vl as Canvas,er as CanvasGroup,qo as CapsuleCollider,c0 as ChangeMaterialOnClick,aa as ChangeTransformOnClick,ea as CharacterController,Qo as CharacterControllerInput,Xh as ChromaticAberration,Fi as CircularBuffer,Yr as ClearFlags,Tm as ClickThrough,ot as ClipExtrapolation,Hi as Collider,_v as Collision,np as CollisionDetectionMode,rr as ColorAdjustments,Ql as ColorBySpeedModule,lm as ColorOverLifetimeModule,GT as Component,R as Component$1,ru as ComponentLifecycleEvents,Yj as Components,dw as ConnectionEvents,bv as ContactPoint,Ch as ContactShadows,z as Context,nT as ContextArgs,pe as ContextEvent,ue as ContextRegistry,Sa as CursorFollow,ha as CustomBranding,Ae as CustomShader,Tu as DefaultReflectionMode,Ty as Deletable,_r as DeleteBox,Nn as DepthOfField,_p as DeviceFlag,I as DeviceUtilities,e1 as DirectorWrapMode,Zu as DisposableStore,PC as DocumentExtension,ia as DragControls,Ay as DragMode,Jo as DropListener,Gy as Duplicatable,Yh as EffectWrapper,rs as EmissionModule,Ll as EmphasizeOnClick,Id as EngineLoadingView,pp as EnvironmentScene,pf as EventBus,oe as EventList,ly as EventListEvent,fi as EventSystem,Ap as EventTrigger,I1 as FieldWithDefault,Ia as FileReference,Kv as FileReferenceSerializer,NA as FileSpawnModel,g1 as File_Event,F0 as FixedJoint,$l as Fog,Zp as FontStyle,Pe as FrameEvent,Ha as GENERATOR,C as GameObject,B as Gizmos,Zy as GltfExport,Yy as GltfExportBox,pa as Gradient,Uh as Graphic,sp as GraphicRaycaster,yr as Graphics,Hl as GridHelper,M0 as GridLayoutGroup,ro as GroundProjectedEnv,ra as GroupActionModel,cu as HideFlags,vn as HideOnStart,Wh as HingeJoint,E0 as HorizontalLayoutGroup,SS as HorizontalWrapMode,jE as HostData,Co as HoverAnimation,nc as Image,Aa as ImageReference,Yv as ImageReferenceSerializer,G0 as InheritVelocityModule,iw as Input,xi as InputEventQueue,Ie as InputEvents,fb as InputField,La as InstanceHandle,Ta as InstancingHandler,_n as InstancingUtil,Lv as InstantiateEvent,_t as InstantiateIdProvider,Oo as InstantiateOptions,My as Interactable,hd as InternalScreenshotUtils,gM as JoinedRoomResponse,rM as KeyEventArgs,Ti as Keyframe,tm as LODGroup,ql as LODModel,fM as LeftRoomResponse,Dt as Light,xw as LightData,gt as LimitVelocityOverLifetimeModule,Dj as LoadingElementOptions,Ey as LogStats,Ui as LogType,yb as LookAt,Xr as LookAtConstraint,A as MODULES,Zt as MainModule,fh as MarkerType,zh as MaskableGraphic,bs as MaterialPropertyBlock,kp as MaterialX,j as Mathf,Vs as MeshCollider,Oh as MeshRenderer,K as MinMaxCurve,ma as MinMaxGradient,Wg as NEEDLE_ENGINE_FEATURE_FLAGS,zc as NEKeyboardEvent,zo as NEPointerEvent,yC as NeedleButtonElement,Ly as NeedleEngineModelLoader,Rb as NeedleEngineWebComponent,go as NeedleMenu,lu as NeedlePatchesKey,Cf as NeedleXRController,Y as NeedleXRSession,Rw as NeedleXRSync,qw as NeedleXRUtils,Xl as NestedGltf,Rd as NetworkConnection,wo as NetworkedStreamEvents,Td as NetworkedStreams,V0 as Networking,jv as NewInstanceModel,_e as NoiseModule,ln as ObjectRaycaster,As as ObjectUtils,ua as OffsetConstraint,Zd as OneEuroFilter,Eg as OneEuroFilterXYZ,oc as OpenURL,me as OrbitControls,Nl as Outline,uw as OwnershipEvent,pw as OwnershipModel,Es as PUBLIC_KEY,ca as Padding,am as ParticleBurst,q0 as ParticleSubEmitter,Gh as ParticleSystem,or as ParticleSystemBaseBehaviour,pn as ParticleSystemRenderer,rm as ParticleSystemShapeType,ws as PeerHandle,cw as PeerNetworking,pc as Physics,w0 as PhysicsExtension,Ct as PhysicsMaterialCombine,Kh as PixelationEffect,Th as PlayAnimationOnClick,qs as PlayAudioOnClick,_l as PlayableDirector,gc as PlayerColor,Ei as PlayerState,cS as PlayerStateEvent,g0 as PlayerSync,mw as PlayerView,gw as PlayerViewManager,Md as PointerEventData,Cu as PointerType,Ew as PostProcessing,lt as PostProcessingEffect,ft as PostProcessingEffectOrder,bc as PostProcessingHandler,Xa as Prefabs,Dl as PreliminaryAction,Rh as PreliminaryTrigger,$s as PreviewHelper,Ka as PrimitiveType,le as Progress,wg as PromiseAllWithErrors,vg as PromiseErrorResult,re as RGBAColor,yc as RapierPhysics,Om as RawImage,Is as RaycastOptions,_S as Rect,Un as RectTransform,Ko as ReflectionProbe,vr as RegisteredAnimationInfo,yp as RemoteSkybox,Mo as RenderTexture,zx as RenderTextureSerializer,hi as Renderer,ww as RendererData,Vy as RendererLightmap,tt as Rigidbody,et as RigidbodyConstraints,ie as RoomEvents,un as RotationBySpeedModule,zn as RotationOverLifetimeModule,Pp as SceneLightSettings,it as SceneSwitcher,ar as ScreenCapture,as as ScreenSpaceAmbientOcclusion,Wn as ScreenSpaceAmbientOcclusionN8,ds as ScrollFollow,ls as SeeThrough,En as SendQueue,lf as SerializationContext,h0 as SetActiveOnClick,td as ShadowCatcher,H0 as ShapeModule,vv as ShapeOverlapResult,Jh as SharpeningEffect,gh as SignalAsset,Kr as SignalReceiver,bl as SignalReceiverEvent,bh as SignalTrackHandler,bS as Size,Ri as SizeBySpeedModule,ga as SizeOverLifetimeModule,$y as SkinnedMeshRenderer,wm as SmoothFollow,Ea as SpatialGrabRaycaster,rd as SpatialHtml,xm as SpatialTrigger,xo as SpatialTriggerReceiver,Sm as SpectatorCamera,wl as SphereCollider,zf as SphereIntersection,va as SplineContainer,So as SplineData,Lb as SplineUtils,gn as SplineWalker,ts as Sprite,Bl as SpriteData,Oi as SpriteRenderer,jl as SpriteSheet,KT as StateMachineBehaviour,cb as StreamEndedEvent,US as StreamReceivedEvent,um as SubEmitterSystem,hb as SyncedCamera,$n as SyncedRoom,An as SyncedTransform,u0 as TapGestureTrigger,Xp as TeleportTarget,pb as TestRunner,mb as TestSimulateUserData,Kt as Text,st as TextAnchor,k0 as TextBuilder,Jp as TextExtension,Jt as TextureSheetAnimationModule,vo as TiltShiftEffect,Cw as Time,hp as TimelineActivationTrack,yh as TimelineAnimationTrack,vs as TimelineAudioTrack,Gm as TimelineBuilder,dp as TimelineControlTrack,cp as TimelineMarkerTrack,Zr as TimelineTrackHandler,sr as ToneMappingEffect,xe as TrackType,Fe as TrailModule,Ve as TransformData,wa as TransformGizmo,Qt as TriggerBuilder,gr as TriggerModel,P as TypeStore,py as UIRaycastUtils,jh as UIRootComponent,Jy as USDDocument,ut as USDObject,W1 as USDWriter,$1 as USDZExporter,bo as USDZExporter$1,Wl as USDZText,A0 as USDZUIExtension,Nx as UriSerializer,Ph as UsageMarker,yM as UserJoinedOrLeftRoomModel,wi as VERSION,a0 as VariantAction,Ye as VelocityOverLifetimeModule,O0 as VerticalLayoutGroup,xS as VerticalWrapMode,yt as VideoPlayer,dt as ViewBox,Wo as ViewDevice,_a as Vignette,Ah as VisibilityAction,cs as Voip,Jl as Volume,N as VolumeParameter,pm as VolumeProfile,iM as WaitForFrames,Jv as WaitForPromise,mf as WaitForSeconds,ys as Watch,dd as WebARCameraBackground,wn as WebARSessionRoot,Qp as WebXR,fr as WebXRButtonFactory,ud as WebXRImageTracking,ps as WebXRImageTrackingModel,ms as WebXRPlaneTracking,fc as WebXRTrackedImage,us as XRControllerFollow,is as XRControllerModel,qi as XRControllerMovement,Bn as XRFlag,Lm as XRRig,gi as XRState,fo as XRStateFlag,eo as YUP,to as _$SxmJTJik,Dc as _$nJruVQEw,kC as __Ignore,uT as __internalNotifyObjectDestroyed,Zn as activeInHierarchyFieldName,bg as addAttributeChangeCallback,oo as addComponent,d2 as addCustomExtensionPlugin,Hr as addNewComponent,au as addPatch,Vu as apply,VT as applyHMRChanges,hx as applyPrototypeExtensions,Dv as beginListenDestroy,Uv as beginListenInstantiate,bf as binaryIdentifierCasts,iT as build_scene_functions,Ar as builtinComponentKeyName,Tb as calculateProgress01,cO as clearMessages,Wx as colorSerializer,Wv as compareAssociation,lh as componentSerializer,K_ as copyTexture,Ax as createMotion,Si as debugNet,el as debugOwner,Q1 as decompressGpuTexture,kc as deepClone,Bo as delay,Xd as delayForFrames,xu as deserializeObject,Wi as destroy,Cx as destroyComponentInstance,f1 as determineMimeTypeFromExtension,Me as disposeObjectResources,Vn as disposeStream,Lc as editorGuidKeyName,$a as enableSpatialConsole,Vx as eventListSerializer,Gj as exportAsGLTF,qf as findByGuid,gl as findObjectOfType,Ox as findObjectsOfType,Nf as findResourceUsers,Xx as fitCamera,J_ as fitObjectIntoVolume,Vr as foreachComponent,Yf as foreachComponentEnumerator,EO as forward,Nw as generateQRCode,Fv as generateSeed,_i as getBoundingBox,F_ as getCameraController,Ls as getComponent,ih as getComponentInChildren,nh as getComponentInParent,pl as getComponents,ml as getComponentsInChildren,Ku as getComponentsInParent,F1 as getFormattedDate,xt as getIconElement,Rf as getIconTexture,Fo as getLoader,th as getOrAddComponent,w as getParam,RO as getParentHierarchyPath,Nk as getPath,hM as getPeerOptions,aw as getPeerjsInstance,mT as getResourceUserCount,bw as getSceneData,W_ as getTempColor,bi as getTempQuaternion,F as getTempVector,Sc as getUrlParams,Z_ as getVisibleInCustomShadowRendering,G_ as getWorldDirection,Dg as getWorldEuler,ne as getWorldPosition,we as getWorldQuaternion,iu as getWorldRotation,qe as getWorldScale,op as hasPointerEventComponent,ov as hideDebugConsole,Y1 as imageToCanvas,Zv as initAddressableSerializers,$x as initBuiltinSerializers,Vj as initEngine,mC as initPhysics,s1 as initVolumeParameterSerializer,$r as instantiate,E1 as invokeLoadedImportPluginHooks,zw as invokeXRSessionEnd,Uw as invokeXRSessionStart,ux as isActiveInHierarchy,dl as isActiveSelf,qk as isAndroidDevice,Y_ as isAnimationAction,du as isComponent,Bk as isDebugMode,Vk as isDesktop,Wr as isDestroyed,M as isDevEnvironment,$T as isDisposable,dT as isDisposed,$j as isExporting,yv as isGLTFModel,v_ as isHostedOnGlitch,ry as isHotReloadEnabled,NT as isHotReloading,Hk as isIPad,Ww as isIconElement,Bi as isLocalNetwork,Qk as isMacOS,$k as isMobileDevice,Xk as isMozillaXR,Zk as isQuest,tx as isResourceTrackingEnabled,Kk as isSafari,tA as isTrackModel,Hu as isUsingInstancing,Yk as isiOS,Gk as isiPad,Pj as loadAsset,Sy as loadPMREM,kb as loadSync,nu as logHierarchy,vO as lookAtInverse,Oc as lookAtObject,wO as lookAtScreenPoint,Uk as makeId,P_ as makeIdFromRandomWords,Gi as makeNameSafe,px as markAsInstancedRendered,Jk as microphonePermissionsGranted,jk as nameof,w_ as nameofFactory,_M as needle,hy as objectSerializer,Fw as offBeforeXRSession,Bw as offXRSessionEnd,jw as offXRSessionStart,HT as on,xE as onAfterRender,wE as onBeforeRender,qM as onBeforeXRSession,_E as onClear,vE as onDestroy,Xg as onInitialized,mu as onStart,DE as onSyncDestroy,Bv as onSyncInstantiate,Ev as onUpdate,Mf as onXRSessionEnd,Iu as onXRSessionStart,dC as parseSync,ev as placeOnSurface,Fg as postprocessFBXMaterials,DR as prefix,x_ as pushState,zk as randomNumber,_f as registerBinaryType,Fu as registerComponent,Ny as registerComponentExtension,mn as registerCustomEffectType,Wy as registerExportExtensions,Ep as registerExtensions,Ex as registerHotReloadType,Sv as registerLoader,zv as registerPrefabProvider,Gf as registerPrototypeExtensions,Ng as registerType,O_ as relativePathPrefix,_g as removeAttributeChangeCallback,sy as removeComponent,u2 as removeCustomImportExtensionType,pE as removePatch,Qn as resolveUrl,k_ as sanitizeString,oC as saveImage,sj as screenshot,Sb as screenshot2,tf as sendDestroyed,u as serializable,Gv as serializeObject,Xe as serializeable,Zc as setActive,R_ as setAllowBalloonMessages,sO as setAllowOverlayMessages,eu as setAutoFitEnabled,Mg as setCameraController,gx as setDestroyed,mO as setDevEnvironment,nx as setDisposable,ul as setDontDestroy,gg as setOrAddParamsToUrl,Fk as setParam,Cc as setParamWithoutReload,dM as setPeerOptions,hT as setResourceTrackingEnabled,fg as setState,Bg as setVisibleInCustomShadowRendering,jg as setWorldEuler,Vt as setWorldPosition,Or as setWorldPositionXYZ,On as setWorldQuaternion,Lg as setWorldQuaternionXYZW,Q_ as setWorldRotation,Ec as setWorldRotationXYZ,Va as setWorldScale,Rc as showBalloonError,Ee as showBalloonMessage,be as showBalloonWarning,Ug as showDebugConsole,z_ as slerp,Bc as syncDestroy,xy as syncField,nf as syncInstantiate,AO as textureToCanvas,E_ as toSourceId,sw as tryCastBinary,b1 as tryDetermineMimetypeFromBinary,y1 as tryDetermineMimetypeFromURL,Pc as tryFindObject,rw as tryGetGuid,Mx as unregisterHotReloadType,FE as unregisterPrefabProvider,yg as unwatchWrite,U_ as useForAutoFit,Qe as validate,Yd as watchWrite};
1733
+ `),Ai&&this._onCreateEffectsDebug(this._composer,s)}createPassForMergeableEffects(e,t,i,n){if(e.length>0){const s=new A.POSTPROCESSING.MODULE.EffectPass(i,...e);s.name=e.map(r=>r.name).join(", "),s.mainScene=n,s.enabled=!0,s.renderToScreen=!1,t.addPass(s),e.length=0}}handleDevicePixelRatio(){typeof this.context.devicePixelRatio=="number"&&this.context.requestSizeUpdate()}_menuEntry=null;_passIndices=null;_onCreateEffectsDebug(e,t){if(Ai==="passes"){const i=new A.POSTPROCESSING.MODULE.DepthEffect({blendFunction:A.POSTPROCESSING.MODULE.BlendFunction.NORMAL,inverted:!0});i.name="Depth Effect";const n=new A.POSTPROCESSING.MODULE.EffectPass(t,i);if(n.name="Depth Effect Pass",n.enabled=!1,e.passes.push(n),this._passIndices!==null){const r=[e.passes[0]];this._passIndices.length>0&&r.push(...this._passIndices.filter(a=>a!==0).map(a=>e.passes[a]).filter(a=>a)),r.length>0&&console.log("[PostProcessing] Passes (selected) \u2192",r),e.passes.length=0;for(const a of r)a.enabled=!0,a.renderToScreen=!1,e.addPass(a)}const s=this.context.menu;if(s&&this._passIndices===null){this._menuEntry&&this._menuEntry.remove();const r=document.createElement("select");r.multiple=!0;const a=document.createElement("option");a.innerText="Final Output",a.value="-1",r.appendChild(a);for(const l of e.passes){const c=document.createElement("option");c.innerText=l.name,c.value=`${e.passes.indexOf(l)}`,c.title=l.name,r.appendChild(c)}s.appendChild(r),this._menuEntry=r,r.addEventListener("change",()=>{const l=Array.from(r.selectedOptions).map(c=>parseInt(c.value));l.length===1&&l[0]===-1?this._passIndices=null:this._passIndices=l,this.applyEffects(this.context)})}}}}const Qj=Object.freeze(Object.defineProperty({__proto__:null,PostProcessingHandler:bc},Symbol.toStringTag,{value:"Module"}));class Gm{_name;_tracks=[];_currentTrack=null;_pendingSignals=[];_idProvider;constructor(e,t){this._name=e,this._idProvider=new _t(t??Date.now())}static create(e,t){return new Gm(e??"Timeline",t)}animationTrack(e,t){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Animation,t??null),this}audioTrack(e,t,i){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Audio,t??null),this._currentTrack.volume=i,this}activationTrack(e,t){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Activation,t??null),this}controlTrack(e){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Control,null),this}signalTrack(e,t){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Signal,t??null),this}markerTrack(e){return this.commitInlineTracks(),this._currentTrack=this.pushTrack(e,xe.Marker,null),this}clip(e,t){if(!this._currentTrack)throw new Error("TimelineBuilder: .clip() must be called after a track method (e.g. .animationTrack())");this.commitInlineTracks();const i=this._currentTrack;switch(i.type){case xe.Animation:{let n;if(e instanceof Wt)n=e;else{const d=Array.isArray(e)?e:[e],h=i.outputs[0],p=h instanceof E?h:h!=null&&"gameObject"in h?h.gameObject:void 0;n=ah(d,p)}const s=t??{},r=s.duration??n.duration,a=s.start??i.cursor,l=a+r,c={start:a,end:l,duration:r,timeScale:s.speed??1,clipIn:s.clipIn??0,easeInDuration:s.easeIn??0,easeOutDuration:s.easeOut??0,preExtrapolationMode:s.preExtrapolation??ot.None,postExtrapolationMode:s.postExtrapolation??ot.None,reversed:s.reversed,asset:{clip:n,loop:s.loop??!1,duration:n.duration,removeStartOffset:s.removeStartOffset??!1}};i.clips.push(c),i.cursor=l;break}case xe.Audio:{const n=e,s=t??{},r=s.duration,a=s.start??i.cursor,l=a+r,c={start:a,end:l,duration:r,timeScale:s.speed??1,clipIn:0,easeInDuration:s.easeIn??0,easeOutDuration:s.easeOut??0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{clip:n,loop:s.loop??!1,volume:s.volume??1}};i.clips.push(c),i.cursor=l;break}case xe.Activation:{const n=e,s=n.start??i.cursor,r=s+n.duration,a={start:s,end:r,duration:n.duration,timeScale:1,clipIn:0,easeInDuration:n.easeIn??0,easeOutDuration:n.easeOut??0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{}};i.clips.push(a),i.cursor=r;break}case xe.Control:{const n=e,s=t??{},r=s.start??i.cursor,a=s.duration,l=r+a,c={start:r,end:l,duration:a,timeScale:1,clipIn:0,easeInDuration:0,easeOutDuration:0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{sourceObject:n,controlActivation:s.controlActivation??!0,updateDirector:s.updateDirector??!0}};i.clips.push(c),i.cursor=l;break}default:throw new Error(`TimelineBuilder: .clip() is not supported on track type "${i.type}"`)}return this}marker(e,t,i){if(!this._currentTrack)throw new Error("TimelineBuilder: .marker() must be called after a track method");if(this._currentTrack.type!==xe.Signal&&this._currentTrack.type!==xe.Marker)throw new Error(`TimelineBuilder: .marker() is only supported on signal and marker tracks, not "${this._currentTrack.type}"`);const n={type:fh.Signal,time:e,retroActive:i?.retroActive??!1,emitOnce:i?.emitOnce??!1,asset:t};return this._currentTrack.markers.push(n),e>this._currentTrack.cursor&&(this._currentTrack.cursor=e),this}signal(e,t,i){if(!this._currentTrack)throw new Error("TimelineBuilder: .signal() must be called after a track method");if(this._currentTrack.type!==xe.Signal&&this._currentTrack.type!==xe.Marker)throw new Error(`TimelineBuilder: .signal() is only supported on signal and marker tracks, not "${this._currentTrack.type}"`);const n=this._idProvider.generateUUID(),s=this._tracks.indexOf(this._currentTrack),r={type:fh.Signal,time:e,retroActive:i?.retroActive??!1,emitOnce:i?.emitOnce??!1,asset:n};return this._currentTrack.markers.push(r),this._pendingSignals.push({trackIndex:s,guid:n,callback:t}),e>this._currentTrack.cursor&&(this._currentTrack.cursor=e),this}muted(e=!0){if(!this._currentTrack)throw new Error("TimelineBuilder: .muted() must be called after a track method");return this._currentTrack.muted=e,this}track(e,t,i,n){if(!this._currentTrack)throw new Error("TimelineBuilder: .track() must be called after .animationTrack()");if(this._currentTrack.type!==xe.Animation)throw new Error("TimelineBuilder: .track() is only supported on animation tracks");return this._currentTrack.inlineTracks.push(ay(e,t,i,n)),this}build(){this.commitInlineTracks();const e=this._tracks.map(t=>{const i={name:t.name,type:t.type,muted:t.muted,outputs:t.outputs};return t.clips.length>0&&(i.clips=t.clips),t.markers.length>0&&(i.markers=t.markers),t.volume!==void 0&&(i.volume=t.volume),t.trackOffset!==void 0&&(i.trackOffset=t.trackOffset),i});return{name:this._name,tracks:e}}install(e){const t=this.build();if(this._pendingSignals.length>0){const i=e.gameObject;let n=C.getComponent(i,Kr);n||(n=C.addComponent(i,Kr)),n.events||(n.events=[]);for(const s of this._pendingSignals){const r=new gh;r.guid=s.guid;const a=new bl;a.signal=r,a.reaction=new oe([s.callback]),n.events.push(a);const l=t.tracks[s.trackIndex];l&&!l.outputs.includes(n)&&l.outputs.push(n)}}return e.playableAsset=t,t}pushTrack(e,t,i){const n={name:e,type:t,muted:!1,outputs:i?[i]:[],clips:[],markers:[],cursor:0,inlineTracks:[]};return this._tracks.push(n),n}commitInlineTracks(){if(!this._currentTrack||this._currentTrack.inlineTracks.length===0)return;const e=this._currentTrack,t=e.outputs[0],i=t instanceof E?t:t!=null&&"gameObject"in t?t.gameObject:void 0,n=ah(e.inlineTracks,i),s=e.cursor,r=n.duration,a={start:s,end:s+r,duration:r,timeScale:1,clipIn:0,easeInDuration:0,easeOutDuration:0,preExtrapolationMode:ot.None,postExtrapolationMode:ot.None,asset:{clip:n,loop:!1,duration:n.duration,removeStartOffset:!1}};e.clips.push(a),e.cursor=s+r,e.inlineTracks=[]}}class kC{}const Yj=Object.freeze(Object.defineProperty({__proto__:null,ActionBuilder:fe,ActionCollection:sS,ActionModel:Ii,AlignmentConstraint:xh,Animation:Ht,AnimationBuilder:Vm,AnimationCurve:Vh,AnimationExtension:Wp,Animator:St,AnimatorController:so,Antialiasing:qh,Attractor:Kl,AudioExtension:Ma,AudioListener:Go,AudioSource:$i,Avatar:Xs,AvatarMarker:pt,AxesHelper:vl,BaseUIComponent:yn,BasicIKConstraint:Py,BehaviorExtension:v0,BehaviorModel:zt,BloomEffect:gm,BoxCollider:bp,BoxGizmo:da,BoxHelperComponent:Nt,Button:hs,CallInfo:Bs,Camera:ki,CameraTargetReachedEvent:mh,Canvas:Vl,CanvasGroup:er,CapsuleCollider:qo,ChangeMaterialOnClick:c0,ChangeTransformOnClick:aa,CharacterController:ea,CharacterControllerInput:Qo,ChromaticAberration:Xh,ClickThrough:Tm,ColorAdjustments:rr,ColorBySpeedModule:Ql,ColorOverLifetimeModule:lm,ContactShadows:Ch,CursorFollow:Sa,CustomBranding:ha,Deletable:Ty,DeleteBox:_r,DepthOfField:Nn,DeviceFlag:_p,DocumentExtension:PC,DragControls:ia,DropListener:Jo,Duplicatable:Gy,EffectWrapper:Yh,EmissionModule:rs,EmphasizeOnClick:Ll,EnvironmentScene:pp,EventList:oe,EventListEvent:ly,EventSystem:fi,EventTrigger:Ap,FieldWithDefault:I1,FixedJoint:F0,Fog:$l,GltfExport:Zy,GltfExportBox:Yy,Gradient:pa,Graphic:Uh,GraphicRaycaster:sp,GridHelper:Hl,GridLayoutGroup:M0,GroundProjectedEnv:ro,GroupActionModel:ra,HideOnStart:vn,HingeJoint:Wh,HorizontalLayoutGroup:E0,get HoverAnimation(){return Co},Image:nc,InheritVelocityModule:G0,InputField:fb,InstanceHandle:La,InstancingHandler:Ta,Interactable:My,Keyframe:Ti,LODGroup:tm,LODModel:ql,Light:Dt,LimitVelocityOverLifetimeModule:gt,LogStats:Ey,LookAt:yb,LookAtConstraint:Xr,MainModule:Zt,MaskableGraphic:zh,MeshCollider:Vs,MeshRenderer:Oh,MinMaxCurve:K,MinMaxGradient:ma,NeedleMenu:go,NestedGltf:Xl,Networking:V0,NoiseModule:_e,ObjectRaycaster:ln,OffsetConstraint:ua,OpenURL:oc,OrbitControls:me,Outline:Nl,Padding:ca,ParticleBurst:am,ParticleSubEmitter:q0,ParticleSystem:Gh,ParticleSystemRenderer:pn,PhysicsExtension:w0,PixelationEffect:Kh,PlayAnimationOnClick:Th,PlayAudioOnClick:qs,PlayableDirector:_l,PlayerColor:gc,PointerEventData:Md,PostProcessingHandler:bc,PreliminaryAction:Dl,PreliminaryTrigger:Rh,RawImage:Om,Rect:_S,RectTransform:Un,ReflectionProbe:Ko,RegisteredAnimationInfo:vr,RemoteSkybox:yp,Renderer:hi,RendererLightmap:Vy,Rigidbody:tt,RotationBySpeedModule:un,RotationOverLifetimeModule:zn,SceneSwitcher:it,ScreenCapture:ar,ScreenSpaceAmbientOcclusion:as,ScreenSpaceAmbientOcclusionN8:Wn,ScrollFollow:ds,SeeThrough:ls,SetActiveOnClick:h0,ShadowCatcher:td,ShapeModule:H0,SharpeningEffect:Jh,SignalAsset:gh,SignalReceiver:Kr,SignalReceiverEvent:bl,SignalTrackHandler:bh,Size:bS,SizeBySpeedModule:Ri,SizeOverLifetimeModule:ga,SkinnedMeshRenderer:$y,SmoothFollow:wm,SpatialGrabRaycaster:Ea,SpatialHtml:rd,SpatialTrigger:xm,SpatialTriggerReceiver:xo,SpectatorCamera:Sm,SphereCollider:wl,SplineContainer:va,SplineData:So,SplineWalker:gn,Sprite:ts,SpriteData:Bl,SpriteRenderer:Oi,SpriteSheet:jl,SubEmitterSystem:um,SyncedCamera:hb,SyncedRoom:$n,SyncedTransform:An,TapGestureTrigger:u0,TeleportTarget:Xp,TestRunner:pb,TestSimulateUserData:mb,Text:Kt,TextBuilder:k0,TextExtension:Jp,TextureSheetAnimationModule:Jt,TiltShiftEffect:vo,TimelineActivationTrack:hp,TimelineAnimationTrack:yh,TimelineAudioTrack:vs,TimelineBuilder:Gm,TimelineControlTrack:dp,TimelineMarkerTrack:cp,ToneMappingEffect:sr,TrailModule:Fe,TransformData:Ve,TransformGizmo:wa,TriggerBuilder:Qt,TriggerModel:gr,UIRaycastUtils:py,UIRootComponent:jh,USDZExporter:bo,USDZText:Wl,USDZUIExtension:A0,UsageMarker:Ph,VariantAction:a0,VelocityOverLifetimeModule:Ye,VerticalLayoutGroup:O0,VideoPlayer:yt,get ViewBox(){return dt},Vignette:_a,VisibilityAction:Ah,Voip:cs,Volume:Jl,VolumeParameter:N,VolumeProfile:pm,WebARCameraBackground:dd,WebARSessionRoot:wn,WebXR:Qp,WebXRImageTracking:ud,WebXRImageTrackingModel:ps,WebXRPlaneTracking:ms,WebXRTrackedImage:fc,XRControllerFollow:us,XRControllerModel:is,XRControllerMovement:qi,XRFlag:Bn,XRRig:Lm,XRState:gi,__Ignore:kC},Symbol.toStringTag,{value:"Module"}));var Lb;(o=>{function e(t,i=!1,n=.75){const s=new va,r=1-j.clamp(n,0,1);return t.forEach((a,l)=>{const c=new _;l<t.length-1?c.subVectors(t[l+1],a).normalize().multiplyScalar(r):i&&t.length>1&&c.subVectors(t[0],a).normalize().multiplyScalar(r);const d=new So;d.position.copy(a),d.tangentIn.copy(c),d.tangentOut.copy(c),s.addKnot(d)}),s.closed=i,s}o.createFromPoints=e})(Lb||(Lb={}));class Kj extends Ak{constructor(){super(new Worker(URL.createObjectURL(new Blob([`import '${new URL("./generateMeshBVH.worker-DiCnZlf3.js",import.meta.url).toString()}';`],{type:"text/javascript"})),{type:"module"})),this.name="GenerateMeshBVHWorker"}runTask(e,t,i={}){return new Promise((n,s)=>{if(t.getAttribute("position").isInterleavedBufferAttribute||t.index&&t.index.isInterleavedBufferAttribute)throw new Error("GenerateMeshBVHWorker: InterleavedBufferAttribute are not supported for the geometry attributes.");e.onerror=c=>{s(new Error(`[GenerateMeshBVHWorker] ${c.message||"Could not load worker."}`))},e.onmessage=c=>{const{data:d}=c;if(d.error)s(new Error(d.error)),e.onmessage=null;else if(d.serialized){const{serialized:h,position:p}=d,m=Ik.deserialize(h,t,{setIndex:!1}),g=Object.assign({setBoundingBox:!0},i);if(t.attributes.position.array=p,h.index)if(t.index)t.index.array=h.index;else{const f=new nt(h.index,1,!1);t.setIndex(f)}g.setBoundingBox&&(t.boundingBox=m.getBoundingBox(new ti)),i.onProgress&&i.onProgress(d.progress),n(m),e.onmessage=null}else i.onProgress&&i.onProgress(d.progress)};const r=t.index?t.index.array:null,a=t.attributes.position.array,l=[a];r&&l.push(r),e.postMessage({index:r,position:a,options:{...i,onProgress:null,includedProgressCallback:!!i.onProgress,groups:[...t.groups]}},l.map(c=>c.buffer).filter(c=>typeof SharedArrayBuffer>"u"||!(c instanceof SharedArrayBuffer)))})}}const Zj=Object.freeze(Object.defineProperty({__proto__:null,GenerateMeshBVHWorker:Kj},Symbol.toStringTag,{value:"Module"}));export{hu as $componentName,fE as $physicsKey,fe as ActionBuilder,sS as ActionCollection,Ii as ActionModel,Qv as Addressables,xh as AlignmentConstraint,il as AmbientMode,Ht as Animation,Vm as AnimationBuilder,Vh as AnimationCurve,Wp as AnimationExtension,ni as AnimationUtils,St as Animator,Ci as AnimatorConditionMode,so as AnimatorController,$m as AnimatorControllerBuilder,qr as AnimatorControllerParameterType,rh as AnimatorStateInfo,qh as Antialiasing,Gn as Application,Jw as AssetDatabase,ee as AssetReference,Kl as Attractor,cy as AudioClip,Ma as AudioExtension,Go as AudioListener,$i as AudioSource,Xs as Avatar,pt as AvatarMarker,fl as Axes,vl as AxesHelper,Ic as BUILD_TIME,yn as BaseUIComponent,Py as BasicIKConstraint,v0 as BehaviorExtension,zt as BehaviorModel,Ir as BlobStorage,gm as BloomEffect,bp as BoxCollider,da as BoxGizmo,Nt as BoxHelperComponent,hs as Button,bn as ButtonsFactory,zS as CallDirection,Bs as CallInfo,ki as Camera,mh as CameraTargetReachedEvent,Vl as Canvas,er as CanvasGroup,qo as CapsuleCollider,c0 as ChangeMaterialOnClick,aa as ChangeTransformOnClick,ea as CharacterController,Qo as CharacterControllerInput,Xh as ChromaticAberration,Fi as CircularBuffer,Yr as ClearFlags,Tm as ClickThrough,ot as ClipExtrapolation,Hi as Collider,_v as Collision,np as CollisionDetectionMode,rr as ColorAdjustments,Ql as ColorBySpeedModule,lm as ColorOverLifetimeModule,GT as Component,R as Component$1,ru as ComponentLifecycleEvents,Yj as Components,dw as ConnectionEvents,bv as ContactPoint,Ch as ContactShadows,z as Context,nT as ContextArgs,pe as ContextEvent,ue as ContextRegistry,Sa as CursorFollow,ha as CustomBranding,Ae as CustomShader,Tu as DefaultReflectionMode,Ty as Deletable,_r as DeleteBox,Nn as DepthOfField,_p as DeviceFlag,I as DeviceUtilities,e1 as DirectorWrapMode,Zu as DisposableStore,PC as DocumentExtension,ia as DragControls,Ay as DragMode,Jo as DropListener,Gy as Duplicatable,Yh as EffectWrapper,rs as EmissionModule,Ll as EmphasizeOnClick,Id as EngineLoadingView,pp as EnvironmentScene,pf as EventBus,oe as EventList,ly as EventListEvent,fi as EventSystem,Ap as EventTrigger,I1 as FieldWithDefault,Ia as FileReference,Kv as FileReferenceSerializer,NA as FileSpawnModel,g1 as File_Event,F0 as FixedJoint,$l as Fog,Zp as FontStyle,Pe as FrameEvent,Ha as GENERATOR,C as GameObject,B as Gizmos,Zy as GltfExport,Yy as GltfExportBox,pa as Gradient,Uh as Graphic,sp as GraphicRaycaster,yr as Graphics,Hl as GridHelper,M0 as GridLayoutGroup,ro as GroundProjectedEnv,ra as GroupActionModel,cu as HideFlags,vn as HideOnStart,Wh as HingeJoint,E0 as HorizontalLayoutGroup,SS as HorizontalWrapMode,jE as HostData,Co as HoverAnimation,nc as Image,Aa as ImageReference,Yv as ImageReferenceSerializer,G0 as InheritVelocityModule,iw as Input,xi as InputEventQueue,Ie as InputEvents,fb as InputField,La as InstanceHandle,Ta as InstancingHandler,_n as InstancingUtil,Lv as InstantiateEvent,_t as InstantiateIdProvider,Oo as InstantiateOptions,My as Interactable,hd as InternalScreenshotUtils,gM as JoinedRoomResponse,rM as KeyEventArgs,Ti as Keyframe,tm as LODGroup,ql as LODModel,fM as LeftRoomResponse,Dt as Light,xw as LightData,gt as LimitVelocityOverLifetimeModule,Dj as LoadingElementOptions,Ey as LogStats,Ui as LogType,yb as LookAt,Xr as LookAtConstraint,A as MODULES,Zt as MainModule,fh as MarkerType,zh as MaskableGraphic,bs as MaterialPropertyBlock,kp as MaterialX,j as Mathf,Vs as MeshCollider,Oh as MeshRenderer,K as MinMaxCurve,ma as MinMaxGradient,Wg as NEEDLE_ENGINE_FEATURE_FLAGS,zc as NEKeyboardEvent,zo as NEPointerEvent,yC as NeedleButtonElement,Ly as NeedleEngineModelLoader,Rb as NeedleEngineWebComponent,go as NeedleMenu,lu as NeedlePatchesKey,Cf as NeedleXRController,Y as NeedleXRSession,Rw as NeedleXRSync,qw as NeedleXRUtils,Xl as NestedGltf,Rd as NetworkConnection,wo as NetworkedStreamEvents,Td as NetworkedStreams,V0 as Networking,jv as NewInstanceModel,_e as NoiseModule,ln as ObjectRaycaster,As as ObjectUtils,ua as OffsetConstraint,Zd as OneEuroFilter,Eg as OneEuroFilterXYZ,oc as OpenURL,me as OrbitControls,Nl as Outline,uw as OwnershipEvent,pw as OwnershipModel,Es as PUBLIC_KEY,ca as Padding,am as ParticleBurst,q0 as ParticleSubEmitter,Gh as ParticleSystem,or as ParticleSystemBaseBehaviour,pn as ParticleSystemRenderer,rm as ParticleSystemShapeType,ws as PeerHandle,cw as PeerNetworking,pc as Physics,w0 as PhysicsExtension,Ct as PhysicsMaterialCombine,Kh as PixelationEffect,Th as PlayAnimationOnClick,qs as PlayAudioOnClick,_l as PlayableDirector,gc as PlayerColor,Ei as PlayerState,cS as PlayerStateEvent,g0 as PlayerSync,mw as PlayerView,gw as PlayerViewManager,Md as PointerEventData,Cu as PointerType,Ew as PostProcessing,lt as PostProcessingEffect,ft as PostProcessingEffectOrder,bc as PostProcessingHandler,Xa as Prefabs,Dl as PreliminaryAction,Rh as PreliminaryTrigger,$s as PreviewHelper,Ka as PrimitiveType,le as Progress,wg as PromiseAllWithErrors,vg as PromiseErrorResult,re as RGBAColor,yc as RapierPhysics,Om as RawImage,Is as RaycastOptions,_S as Rect,Un as RectTransform,Ko as ReflectionProbe,vr as RegisteredAnimationInfo,yp as RemoteSkybox,Mo as RenderTexture,zx as RenderTextureSerializer,hi as Renderer,ww as RendererData,Vy as RendererLightmap,tt as Rigidbody,et as RigidbodyConstraints,ie as RoomEvents,un as RotationBySpeedModule,zn as RotationOverLifetimeModule,Pp as SceneLightSettings,it as SceneSwitcher,ar as ScreenCapture,as as ScreenSpaceAmbientOcclusion,Wn as ScreenSpaceAmbientOcclusionN8,ds as ScrollFollow,ls as SeeThrough,En as SendQueue,lf as SerializationContext,h0 as SetActiveOnClick,td as ShadowCatcher,H0 as ShapeModule,vv as ShapeOverlapResult,Jh as SharpeningEffect,gh as SignalAsset,Kr as SignalReceiver,bl as SignalReceiverEvent,bh as SignalTrackHandler,bS as Size,Ri as SizeBySpeedModule,ga as SizeOverLifetimeModule,$y as SkinnedMeshRenderer,wm as SmoothFollow,Ea as SpatialGrabRaycaster,rd as SpatialHtml,xm as SpatialTrigger,xo as SpatialTriggerReceiver,Sm as SpectatorCamera,wl as SphereCollider,zf as SphereIntersection,va as SplineContainer,So as SplineData,Lb as SplineUtils,gn as SplineWalker,ts as Sprite,Bl as SpriteData,Oi as SpriteRenderer,jl as SpriteSheet,KT as StateMachineBehaviour,cb as StreamEndedEvent,US as StreamReceivedEvent,um as SubEmitterSystem,hb as SyncedCamera,$n as SyncedRoom,An as SyncedTransform,u0 as TapGestureTrigger,Xp as TeleportTarget,pb as TestRunner,mb as TestSimulateUserData,Kt as Text,st as TextAnchor,k0 as TextBuilder,Jp as TextExtension,Jt as TextureSheetAnimationModule,vo as TiltShiftEffect,Cw as Time,hp as TimelineActivationTrack,yh as TimelineAnimationTrack,vs as TimelineAudioTrack,Gm as TimelineBuilder,dp as TimelineControlTrack,cp as TimelineMarkerTrack,Zr as TimelineTrackHandler,sr as ToneMappingEffect,xe as TrackType,Fe as TrailModule,Ve as TransformData,wa as TransformGizmo,Qt as TriggerBuilder,gr as TriggerModel,P as TypeStore,py as UIRaycastUtils,jh as UIRootComponent,Jy as USDDocument,ut as USDObject,W1 as USDWriter,$1 as USDZExporter,bo as USDZExporter$1,Wl as USDZText,A0 as USDZUIExtension,Nx as UriSerializer,Ph as UsageMarker,yM as UserJoinedOrLeftRoomModel,wi as VERSION,a0 as VariantAction,Ye as VelocityOverLifetimeModule,O0 as VerticalLayoutGroup,xS as VerticalWrapMode,yt as VideoPlayer,dt as ViewBox,Wo as ViewDevice,_a as Vignette,Ah as VisibilityAction,cs as Voip,Jl as Volume,N as VolumeParameter,pm as VolumeProfile,iM as WaitForFrames,Jv as WaitForPromise,mf as WaitForSeconds,ys as Watch,dd as WebARCameraBackground,wn as WebARSessionRoot,Qp as WebXR,fr as WebXRButtonFactory,ud as WebXRImageTracking,ps as WebXRImageTrackingModel,ms as WebXRPlaneTracking,fc as WebXRTrackedImage,us as XRControllerFollow,is as XRControllerModel,qi as XRControllerMovement,Bn as XRFlag,Lm as XRRig,gi as XRState,fo as XRStateFlag,kC as __Ignore,to as __RsyLK,uT as __internalNotifyObjectDestroyed,eo as __tmUDtSjM,Zn as activeInHierarchyFieldName,bg as addAttributeChangeCallback,oo as addComponent,d2 as addCustomExtensionPlugin,Hr as addNewComponent,au as addPatch,Vu as apply,VT as applyHMRChanges,hx as applyPrototypeExtensions,Dv as beginListenDestroy,Uv as beginListenInstantiate,bf as binaryIdentifierCasts,iT as build_scene_functions,Ar as builtinComponentKeyName,Tb as calculateProgress01,cO as clearMessages,Wx as colorSerializer,Wv as compareAssociation,lh as componentSerializer,K_ as copyTexture,Ax as createMotion,Si as debugNet,el as debugOwner,Q1 as decompressGpuTexture,kc as deepClone,Bo as delay,Xd as delayForFrames,xu as deserializeObject,Wi as destroy,Cx as destroyComponentInstance,f1 as determineMimeTypeFromExtension,Me as disposeObjectResources,Vn as disposeStream,Lc as editorGuidKeyName,$a as enableSpatialConsole,Vx as eventListSerializer,Gj as exportAsGLTF,qf as findByGuid,gl as findObjectOfType,Ox as findObjectsOfType,Nf as findResourceUsers,Xx as fitCamera,J_ as fitObjectIntoVolume,Vr as foreachComponent,Yf as foreachComponentEnumerator,EO as forward,Nw as generateQRCode,Fv as generateSeed,_i as getBoundingBox,F_ as getCameraController,Ls as getComponent,ih as getComponentInChildren,nh as getComponentInParent,pl as getComponents,ml as getComponentsInChildren,Ku as getComponentsInParent,F1 as getFormattedDate,xt as getIconElement,Rf as getIconTexture,Fo as getLoader,th as getOrAddComponent,w as getParam,RO as getParentHierarchyPath,Nk as getPath,hM as getPeerOptions,aw as getPeerjsInstance,mT as getResourceUserCount,bw as getSceneData,W_ as getTempColor,bi as getTempQuaternion,F as getTempVector,Sc as getUrlParams,Z_ as getVisibleInCustomShadowRendering,G_ as getWorldDirection,Dg as getWorldEuler,ne as getWorldPosition,we as getWorldQuaternion,iu as getWorldRotation,qe as getWorldScale,op as hasPointerEventComponent,ov as hideDebugConsole,Y1 as imageToCanvas,Zv as initAddressableSerializers,$x as initBuiltinSerializers,Vj as initEngine,mC as initPhysics,s1 as initVolumeParameterSerializer,$r as instantiate,E1 as invokeLoadedImportPluginHooks,zw as invokeXRSessionEnd,Uw as invokeXRSessionStart,ux as isActiveInHierarchy,dl as isActiveSelf,qk as isAndroidDevice,Y_ as isAnimationAction,du as isComponent,Bk as isDebugMode,Vk as isDesktop,Wr as isDestroyed,M as isDevEnvironment,$T as isDisposable,dT as isDisposed,$j as isExporting,yv as isGLTFModel,v_ as isHostedOnGlitch,ry as isHotReloadEnabled,NT as isHotReloading,Hk as isIPad,Ww as isIconElement,Bi as isLocalNetwork,Qk as isMacOS,$k as isMobileDevice,Xk as isMozillaXR,Zk as isQuest,tx as isResourceTrackingEnabled,Kk as isSafari,tA as isTrackModel,Hu as isUsingInstancing,Yk as isiOS,Gk as isiPad,Pj as loadAsset,Sy as loadPMREM,kb as loadSync,nu as logHierarchy,vO as lookAtInverse,Oc as lookAtObject,wO as lookAtScreenPoint,Uk as makeId,P_ as makeIdFromRandomWords,Gi as makeNameSafe,px as markAsInstancedRendered,Jk as microphonePermissionsGranted,jk as nameof,w_ as nameofFactory,_M as needle,hy as objectSerializer,Fw as offBeforeXRSession,Bw as offXRSessionEnd,jw as offXRSessionStart,HT as on,xE as onAfterRender,wE as onBeforeRender,qM as onBeforeXRSession,_E as onClear,vE as onDestroy,Xg as onInitialized,mu as onStart,DE as onSyncDestroy,Bv as onSyncInstantiate,Ev as onUpdate,Mf as onXRSessionEnd,Iu as onXRSessionStart,dC as parseSync,ev as placeOnSurface,Fg as postprocessFBXMaterials,DR as prefix,x_ as pushState,zk as randomNumber,_f as registerBinaryType,Fu as registerComponent,Ny as registerComponentExtension,mn as registerCustomEffectType,Wy as registerExportExtensions,Ep as registerExtensions,Ex as registerHotReloadType,Sv as registerLoader,zv as registerPrefabProvider,Gf as registerPrototypeExtensions,Ng as registerType,O_ as relativePathPrefix,_g as removeAttributeChangeCallback,sy as removeComponent,u2 as removeCustomImportExtensionType,pE as removePatch,Qn as resolveUrl,Dc as sLAk,k_ as sanitizeString,oC as saveImage,sj as screenshot,Sb as screenshot2,tf as sendDestroyed,u as serializable,Gv as serializeObject,Xe as serializeable,Zc as setActive,R_ as setAllowBalloonMessages,sO as setAllowOverlayMessages,eu as setAutoFitEnabled,Mg as setCameraController,gx as setDestroyed,mO as setDevEnvironment,nx as setDisposable,ul as setDontDestroy,gg as setOrAddParamsToUrl,Fk as setParam,Cc as setParamWithoutReload,dM as setPeerOptions,hT as setResourceTrackingEnabled,fg as setState,Bg as setVisibleInCustomShadowRendering,jg as setWorldEuler,Vt as setWorldPosition,Or as setWorldPositionXYZ,On as setWorldQuaternion,Lg as setWorldQuaternionXYZW,Q_ as setWorldRotation,Ec as setWorldRotationXYZ,Va as setWorldScale,Rc as showBalloonError,Ee as showBalloonMessage,be as showBalloonWarning,Ug as showDebugConsole,z_ as slerp,Bc as syncDestroy,xy as syncField,nf as syncInstantiate,AO as textureToCanvas,E_ as toSourceId,sw as tryCastBinary,b1 as tryDetermineMimetypeFromBinary,y1 as tryDetermineMimetypeFromURL,Pc as tryFindObject,rw as tryGetGuid,Mx as unregisterHotReloadType,FE as unregisterPrefabProvider,yg as unwatchWrite,U_ as useForAutoFit,Qe as validate,Yd as watchWrite};