@needle-tools/engine 3.0.1-alpha → 3.0.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/needle-engine.js +1 -1
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/engine_constants.d.ts +1 -1
- package/lib/engine/engine_constants.js +1 -1
- package/lib/engine/engine_constants.js.map +1 -1
- package/lib/engine/engine_mainloop_utils.js +12 -0
- package/lib/engine/engine_mainloop_utils.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -2
- package/plugins/vite/alias.js +30 -8
- package/src/engine/engine_constants.ts +1 -1
- package/src/engine/engine_mainloop_utils.ts +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
6
6
|
|
|
7
7
|
## [3.0.1-alpha] - 2023-04-11
|
|
8
8
|
- Change: store static Context.Current in globalThis
|
|
9
|
+
- Change: alias resolve imports `@needle-tools/engine/engine` and `@needle-tools/engine/src` to lib folder
|
|
9
10
|
|
|
10
11
|
## [3.0.0-alpha] - 2023-04-05
|
|
11
12
|
- Add: vite alias plugin
|
package/dist/needle-engine.js
CHANGED
|
@@ -21720,7 +21720,7 @@ function ea(i, A) {
|
|
|
21720
21720
|
}
|
|
21721
21721
|
return !0;
|
|
21722
21722
|
}
|
|
21723
|
-
const ls =
|
|
21723
|
+
const ls = "needle_isActiveInHierarchy", KB = "builtin_components", Xh = "needle_editor_guid", hO = EA("debugnewscripts"), lO = EA("debughierarchy"), mI = [];
|
|
21724
21724
|
function AE(i) {
|
|
21725
21725
|
if (!(i.new_scripts.length <= 0)) {
|
|
21726
21726
|
if (hO && console.log("Register new components", i.new_scripts.length, [...i.new_scripts], i.alias ? "element: " + i.alias : i.hash, i), i.new_scripts_pre_setup_callbacks.length > 0) {
|
|
@@ -3252,7 +3252,7 @@ in script ${i}.ts
|
|
|
3252
3252
|
uv.y = 1.0 - uv.y;
|
|
3253
3253
|
gl_FragColor = texture2D( map, uv);
|
|
3254
3254
|
// gl_FragColor = vec4(uv.xy, 0, 1);
|
|
3255
|
-
}`),n(_C,"blipMaterial",new vg({uniforms:{map:new UA(null)},vertexShader:Br.vertex,fragmentShader:Br.fragment})),n(_C,"mesh",new GA(Br.planeGeometry,Br.blipMaterial));function GO(I){return _C.copyTexture(I)}function fO(I){return typeof HTMLImageElement<"u"&&I instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&I instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&I instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&I instanceof ImageBitmap}const CU=new xh(()=>new M,20);class MO{constructor(A,g,e,i,t){n(this,"_point"),n(this,"_normal"),n(this,"distance"),n(this,"impulse"),n(this,"friction"),this._point=A,this.distance=g,this._normal=e,this.impulse=i,this.friction=t}get point(){return CU.get().set(this._point.x,this._point.y,this._point.z)}get normal(){return CU.get().set(this._normal.x,this._normal.y,this._normal.z)}}class oU{constructor(A,g,e){n(this,"contacts"),n(this,"me"),n(this,"_collider"),n(this,"_gameObject"),this.me=A,this._collider=g,this._gameObject=g.gameObject,this.contacts=e}get collider(){return this._collider}get gameObject(){return this._gameObject}get rigidBody(){var A;return(A=this.collider)==null?void 0:A.attachedRigidbody}}function Xa(I,A){try{A?I(A):I()}catch(g){return console.error(g),!1}return!0}const PC=Symbol("isActiveInHierarchy"),GB="builtin_components",ar="needle_editor_guid",mO=hA("debugnewscripts"),UO=hA("debughierarchy"),GI=[];function Qr(I){if(!(I.new_scripts.length<=0)){if(mO&&console.log("Register new components",I.new_scripts.length,[...I.new_scripts],I.alias?"element: "+I.alias:I.hash,I),I.new_scripts_pre_setup_callbacks.length>0){for(const A of I.new_scripts_pre_setup_callbacks)A&&A();I.new_scripts_pre_setup_callbacks.length=0}GI.length=0,I.new_scripts.length>0&&GI.push(...I.new_scripts),I.new_scripts.length=0;for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed)continue;if(!g.gameObject){console.error("MISSING GAMEOBJECT - will ignore",g),GI.splice(A,1),A--;continue}g.context=I,nr(g.gameObject),BU(g,I)}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed){Xo(GI[A],I),GI.splice(A,1),A--;continue}if(g.registering)try{g.registering()}catch(e){console.error(e)}g.__internalAwake!==void 0&&(g.gameObject||console.error("MISSING GAMEOBJECT",g,g.gameObject),nr(g.gameObject),g.activeAndEnabled&&Xa(g.__internalAwake.bind(g)))}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed||g.enabled===!1||(nr(g.gameObject),g.activeAndEnabled===!1))continue;g.__internalEnable!==void 0&&(g.enabled=!0,Xa(g.__internalEnable.bind(g)))}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed||!g.gameObject)continue;I.new_script_start.push(g)}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}GI.length=0;for(const A of I.new_scripts_post_setup_callbacks)A&&A();I.new_scripts_post_setup_callbacks.length=0}}function RO(I){I&&(I.__internalDisable(),Xo(I,I.context))}function sU(I,A){for(let g=0;g<I.new_script_start.length;g++)try{const e=I.new_script_start[g];if(A!==void 0&&e.gameObject!==A||e.destroyed||e.activeAndEnabled===!1)continue;Xa(e.__internalAwake.bind(e)),Xa(e.__internalEnable.bind(e)),Xa(e.__internalStart.bind(e)),I.new_script_start.splice(g,1),g--}catch(e){console.error(e),Xo(I.new_script_start[g],I),I.new_script_start.splice(g,1),g--}}function BU(I,A){A.scripts.indexOf(I)===-1&&(A.scripts.push(I),I.earlyUpdate&&A.scripts_earlyUpdate.push(I),I.update&&A.scripts_update.push(I),I.lateUpdate&&A.scripts_lateUpdate.push(I),I.onBeforeRender&&A.scripts_onBeforeRender.push(I),I.onAfterRender&&A.scripts_onAfterRender.push(I),I.onPausedChanged&&A.scripts_pausedChanged.push(I))}function Xo(I,A){jC(I,A.new_scripts),jC(I,A.new_script_start),jC(I,A.scripts),jC(I,A.scripts_earlyUpdate),jC(I,A.scripts_update),jC(I,A.scripts_lateUpdate),jC(I,A.scripts_onBeforeRender),jC(I,A.scripts_onAfterRender),jC(I,A.scripts_pausedChanged),A.stopAllCoroutinesFrom(I)}function jC(I,A){const g=A.indexOf(I);g>=0&&A.splice(g,1)}function pl(I){if(I||(I=le.Current.scene),!I){console.trace("Invalid call - no current context.");return}const A=gQ(I);aU(I,A,!0)||(console.error('Failed to update active state in hierarchy of "'+I.name+'"',I),console.warn(" \u2191 this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."))}function aU(I,A,g,e=0){if(e>1e3)return console.warn("Hierarchy is too deep (> 1000 level) - will abort updating active state"),!1;const i=gQ(I);if(A&&(A=i,A&&I.parent)){const o=I.parent;A=o[PC],A===void 0&&(o instanceof gt||(A=!0))}const t=I[PC]!==A;I[PC]=A,t&&(UO&&console.warn("ACTIVE CHANGE",I.name,i,I.visible,A,"changed?"+t,I),g&&FO(I,o=>{A?o.enabled&&(Xa(o.__internalAwake.bind(o)),o.__didEnable=!0,o.onEnable()):o.__didAwake&&(o.__didEnable=!1,o.onDisable())}));let C=!0;if(I.children){const o=e+1;for(const s of I.children)aU(s,A,g,o)===!1&&(C=!1)}return C}function nr(I){let A=!0,g=I,e=!1;for(;g&&g;){if(g.type==="Scene"&&(e=!0),!gQ(g)){A=!1;break}g=g.parent}if(!I){console.error("GO is null");return}I[PC]=A&&e}function FO(I,A){var g;if((g=I.userData)!=null&&g.components)for(const e of I.userData.components)A(e)}const ul=new Map,QU=Symbol("prewarmFlag"),cy=Symbol("waitingForPrewarm"),ly=hA("debugprewarm");function nU(I,A){!I||I[QU]===!0||I[cy]===!0||(ul.has(A)||ul.set(A,[]),I[cy]=!0,ul.get(A).push(I),ly&&console.debug("register prewarm",I.name))}let Dy=null,dy=null;function NO(I){if(!I)return;const A=ul.get(I);if(!(A!=null&&A.length))return;const g=I.mainCamera;if(g){ly&&console.log("prewarm",A.length,"objects",[...A]);const e=I.renderer;if(e.compile){const i=I.scene;e.compile(i,g),Dy??(Dy=new Gc(64)),dy??(dy=new Aw(.001,9999999,Dy)),dy.update(e,i);for(const t of A)t[QU]=!0,t[cy]=!1;A.length=0,ly&&console.log("prewarm done")}}}const KO=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function JO(I){return typeof I=="string"&&KO.test(I)}const pe=[];for(let I=0;I<256;++I)pe.push((I+256).toString(16).slice(1));function qO(I,A=0){return(pe[I[A+0]]+pe[I[A+1]]+pe[I[A+2]]+pe[I[A+3]]+"-"+pe[I[A+4]]+pe[I[A+5]]+"-"+pe[I[A+6]]+pe[I[A+7]]+"-"+pe[I[A+8]]+pe[I[A+9]]+"-"+pe[I[A+10]]+pe[I[A+11]]+pe[I[A+12]]+pe[I[A+13]]+pe[I[A+14]]+pe[I[A+15]]).toLowerCase()}function LO(I){if(!JO(I))throw TypeError("Invalid UUID");let A;const g=new Uint8Array(16);return g[0]=(A=parseInt(I.slice(0,8),16))>>>24,g[1]=A>>>16&255,g[2]=A>>>8&255,g[3]=A&255,g[4]=(A=parseInt(I.slice(9,13),16))>>>8,g[5]=A&255,g[6]=(A=parseInt(I.slice(14,18),16))>>>8,g[7]=A&255,g[8]=(A=parseInt(I.slice(19,23),16))>>>8,g[9]=A&255,g[10]=(A=parseInt(I.slice(24,36),16))/1099511627776&255,g[11]=A/4294967296&255,g[12]=A>>>24&255,g[13]=A>>>16&255,g[14]=A>>>8&255,g[15]=A&255,g}function bO(I){I=unescape(encodeURIComponent(I));const A=[];for(let g=0;g<I.length;++g)A.push(I.charCodeAt(g));return A}const vO="6ba7b810-9dad-11d1-80b4-00c04fd430c8",xO="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function YO(I,A,g){function e(i,t,C,o){var s;if(typeof i=="string"&&(i=bO(i)),typeof t=="string"&&(t=LO(t)),((s=t)===null||s===void 0?void 0:s.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let B=new Uint8Array(16+i.length);if(B.set(t),B.set(i,t.length),B=g(B),B[6]=B[6]&15|A,B[8]=B[8]&63|128,C){o=o||0;for(let a=0;a<16;++a)C[o+a]=B[a];return C}return qO(B)}try{e.name=I}catch{}return e.DNS=vO,e.URL=xO,e}function HO(I,A,g,e){switch(I){case 0:return A&g^~A&e;case 1:return A^g^e;case 2:return A&g^A&e^g&e;case 3:return A^g^e}}function py(I,A){return I<<A|I>>>32-A}function TO(I){const A=[1518500249,1859775393,2400959708,3395469782],g=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof I=="string"){const C=unescape(encodeURIComponent(I));I=[];for(let o=0;o<C.length;++o)I.push(C.charCodeAt(o))}else Array.isArray(I)||(I=Array.prototype.slice.call(I));I.push(128);const e=I.length/4+2,i=Math.ceil(e/16),t=new Array(i);for(let C=0;C<i;++C){const o=new Uint32Array(16);for(let s=0;s<16;++s)o[s]=I[C*64+s*4]<<24|I[C*64+s*4+1]<<16|I[C*64+s*4+2]<<8|I[C*64+s*4+3];t[C]=o}t[i-1][14]=(I.length-1)*8/Math.pow(2,32),t[i-1][14]=Math.floor(t[i-1][14]),t[i-1][15]=(I.length-1)*8&4294967295;for(let C=0;C<i;++C){const o=new Uint32Array(80);for(let E=0;E<16;++E)o[E]=t[C][E];for(let E=16;E<80;++E)o[E]=py(o[E-3]^o[E-8]^o[E-14]^o[E-16],1);let s=g[0],B=g[1],a=g[2],Q=g[3],r=g[4];for(let E=0;E<80;++E){const h=Math.floor(E/20),c=py(s,5)+HO(h,B,a,Q)+r+A[h]+o[E]>>>0;r=Q,Q=a,a=py(B,30)>>>0,B=s,s=c}g[0]=g[0]+s>>>0,g[1]=g[1]+B>>>0,g[2]=g[2]+a>>>0,g[3]=g[3]+Q>>>0,g[4]=g[4]+r>>>0}return[g[0]>>24&255,g[0]>>16&255,g[0]>>8&255,g[0]&255,g[1]>>24&255,g[1]>>16&255,g[1]>>8&255,g[1]&255,g[2]>>24&255,g[2]>>16&255,g[2]>>8&255,g[2]&255,g[3]>>24&255,g[3]>>16&255,g[3]>>8&255,g[3]&255,g[4]>>24&255,g[4]>>16&255,g[4]>>8&255,g[4]&255]}const OO=YO("v5",80,TO),rU=OO;var Ki=(I=>(I[I.OnConnection=0]="OnConnection",I[I.OnRoomJoin=1]="OnRoomJoin",I[I.Queued=2]="Queued",I[I.Immediate=3]="Immediate",I))(Ki||{});le.registerCallback(bt.ContextCreated,I=>{const A=I.context;WO(A),PO(A)});const wl=hA("debugcomponents"),EU="eff8ba80-635d-11ec-90d6-0242ac120003";class wi{constructor(A){n(this,"_originalSeed"),n(this,"_seed"),typeof A=="string"&&(A=wi.hash(A)),this._originalSeed=A,this._seed=A}get seed(){return this._seed}set seed(A){this._seed=A}reset(){this._seed=this._originalSeed}generateUUID(A){if(typeof A=="string")return rU(A,EU);const g=this._seed;return this._seed-=1,rU(g.toString(),EU)}initialize(A){typeof A=="string"?this._seed=wi.hash(A):this._seed=A}static createFromString(A){return new wi(this.hash(A))}static hash(A){let g=0;for(let e=0;e<A.length;e++)g=A.charCodeAt(e)+((g<<5)-g);return g}}class hU{constructor(A){n(this,"guid"),this.guid=A}}function uy(I,A,g=!0){if(!I)return;const e=I;if(As(I,g),!A){console.warn("Can not send destroy: No networking connection provided",I.guid);return}if(!A.isConnected){console.warn("Can not send destroy: not connected",I.guid);return}let i=I.guid;if(!i&&e.uuid&&(i=e.uuid),!i){console.warn("Can not send destroy: failed to find guid",I);return}const t=new hU(i);A.send("instance-destroyed",t,Ki.Queued)}function _O(I,A){const g=new hU(I);A.send("instance-destroyed",g,Ki.Queued)}function PO(I){I.connection.beginListen("instance-destroyed",A=>{wl&&console.log("[Remote] Destroyed",I.scene,A);const g=wr(A.guid,I.scene);g&&As(g)})}class jO{constructor(A,g){n(this,"guid"),n(this,"originalGuid"),n(this,"seed"),n(this,"visible"),n(this,"hostData"),n(this,"dontSave"),n(this,"parent"),n(this,"position"),n(this,"rotation"),n(this,"scale"),this.originalGuid=A,this.guid=g}}function cU(I,A,g,e){var i;const t=I;if(!t.guid)return console.warn("Can not instantiate: No guid",t),null;if(A.context||(A.context=Dg.Current),!A.context)return console.error("Missing network instantiate options / reference to network connection in sync instantiate"),null;const C=A?{...A}:null,{instance:o,seed:s}=ZO(t,A);if(o){const B=o;if(B.guid){wl&&console.log("[Local] new instance","gameobject:",o?.guid);const a=new jO(t.guid,B.guid);a.seed=s,C&&(C.position&&(a.position={x:C.position.x,y:C.position.y,z:C.position.z}),C.rotation&&(a.rotation={x:C.rotation.x,y:C.rotation.y,z:C.rotation.z,w:C.rotation.w}),C.scale&&(a.scale={x:C.scale.x,y:C.scale.y,z:C.scale.z})),a.position||(a.position={x:B.position.x,y:B.position.y,z:B.position.z}),a.rotation||(a.rotation={x:B.quaternion.x,y:B.quaternion.y,z:B.quaternion.z,w:B.quaternion.w}),a.scale||(a.scale={x:B.scale.x,y:B.scale.y,z:B.scale.z}),a.visible=t.visible,C!=null&&C.parent&&(typeof C.parent=="string"?a.parent=C.parent:a.parent=C.parent.guid),a.hostData=g,e===!1&&(a.dontSave=!0),(i=A?.context)==null||i.connection.send("new-instance-created",a)}else console.warn("Missing guid, can not send new instance event",B)}return o}function wy(){return Math.random()*9999999}function WO(I){I.connection.beginListen("new-instance-created",async A=>{const g=await zO(A.originalGuid,I.scene);if(!g){console.warn("could not find object that was instantiated: "+A.guid);return}const e=new _t;A.position&&(e.position=new M(A.position.x,A.position.y,A.position.z)),A.rotation&&(e.rotation=new RA(A.rotation.x,A.rotation.y,A.rotation.z,A.rotation.w)),A.scale&&(e.scale=new M(A.scale.x,A.scale.y,A.scale.z)),e.parent=A.parent,A.seed&&(e.idProvider=new wi(A.seed)),e.visible=A.visible,e.context=I,wl&&I.alias&&console.log("[Remote] instantiate in: "+I.alias);const i=yr(g,e);i&&(A.parent==="scene"&&I.scene.add(i),wl&&console.log("[Remote] new instance","gameobject:",i?.guid,g))})}function ZO(I,A){const g=wy(),e=A??new _t;e.idProvider=new wi(g);const i=yr(I,e);return{seed:g,instance:i}}const lU={};function VO(I,A){lU[I]=A}async function zO(I,A){const g=lU[I];if(g!=null){const e=await g(I);if(e)return e}return DU(I,A)}function DU(I,A){if(A===null||!I)return null;if(A.guid===I)return A;if(A.children)for(const g of A.children){const e=DU(I,g);if(e)return e}return null}const dU=new Map;function XO(I,A){if(!I)return;if(!A){console.warn("No prototype found",I,I.prototype,I.constructor);return}let g=dU.get(A);g&&g.apply(I)}function $O(I){const A=A1(I.prototype);dU.set(I,A)}function A1(I){return new g1(I)}class g1{constructor(A){n(this,"$symbol"),n(this,"extensions"),n(this,"descriptors"),this.$symbol=Symbol("prototype-extension"),this.extensions=Object.keys(A),this.descriptors=new Array;for(let g=0;g<this.extensions.length;g++){const e=this.extensions[g],i=Object.getOwnPropertyDescriptor(A,e);i&&this.descriptors.push(i)}}apply(A){if(!A[this.$symbol]){A[this.$symbol]=!0;for(let g=0;g<this.extensions.length;g++){const e=this.extensions[g],i=this.descriptors[g];i&&Object.defineProperty(A,e,i)}}}}var rr=(I=>(I.Added="component-added",I.Removing="removing-component",I))(rr||{});const pU=hA("debugcomponentevents");class Er{static addComponentLifecylceEventListener(A,g){this.eventListeners.has(A)&&this.eventListeners.set(A,[]);let e=this.eventListeners.get(A);e||(e=[]),e.push(g),this.eventListeners.set(A,e),pU&&console.log("Added event listener for "+A,this.eventListeners)}static removeComponentLifecylceEventListener(A,g){const e=this.eventListeners.get(A);if(!e)return;const i=e.indexOf(g);i<0||e.splice(i,1)}static dispatchComponentLifecycleEvent(A,g){const e=this.eventListeners.get(A);if(pU&&console.log("Dispatching event "+A,e),!!e)for(const i of e)i(g)}}n(Er,"eventListeners",new Map);const yy=hA("debuggetcomponent");function I1(I){return I==null||I.isObject3D?I:I.object&&I.object.isObject3D?I.object:I}function Sy(I,A){if(!I||!I.userData.components)return;const g=I.userData.components.indexOf(A);g<0||(Er.dispatchComponentLifecycleEvent(rr.Removing,A),A.gameObject=null,I.userData.components.splice(g,1))}function ky(I,A){const g=$a(I,A);if(g)return g;const e=new A;return $o(I,e)}const e1=new wi("addComponentIdProvider");function $o(I,A,g=!0){I.userData||(I.userData={}),I.userData.components||(I.userData.components=[]),I.userData.components.push(A),A.gameObject=I,(A.guid===void 0||A.guid==="invalid")&&(A.guid=e1.generateUUID()),Sl(I),rF(A);try{g&&A.__internalAwake&&(nr(I),A.__internalAwake()),Er.dispatchComponentLifecycleEvent(rr.Added,A)}catch(e){console.error(e)}return A}function uU(I,A){if(A.gameObject!==I){if(A.gameObject&&A.gameObject.userData.components){const g=A.gameObject.userData.components.indexOf(A);A.gameObject.userData.components.splice(g,1)}if(!I.userData.components)I.userData.components=[];else if(I.userData.components.includes(A))return;I.userData.components.push(A),A.gameObject=I}}function wU(I){if(I.gameObject&&I.gameObject.userData.components){const A=I.gameObject.userData.components.indexOf(I);I.gameObject.userData.components.splice(A,1)}I.__internalDisable&&I.__internalDisable(),I.onDestroy&&I.onDestroy(),Xo(I,I.context??Dg.Current),I.__internalDestroy(),I.gameObject=null}let yU=!1;function SU(I,A,g){var e;if(I!=null){if(!I.isObject3D){console.error("Object is not object3D");return}if(!((e=I?.userData)!=null&&e.components))return null;if(typeof A=="string"&&(yU||(yU=!0,console.warn(`Accessing components by name is not supported.
|
|
3255
|
+
}`),n(_C,"blipMaterial",new vg({uniforms:{map:new UA(null)},vertexShader:Br.vertex,fragmentShader:Br.fragment})),n(_C,"mesh",new GA(Br.planeGeometry,Br.blipMaterial));function GO(I){return _C.copyTexture(I)}function fO(I){return typeof HTMLImageElement<"u"&&I instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&I instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&I instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&I instanceof ImageBitmap}const CU=new xh(()=>new M,20);class MO{constructor(A,g,e,i,t){n(this,"_point"),n(this,"_normal"),n(this,"distance"),n(this,"impulse"),n(this,"friction"),this._point=A,this.distance=g,this._normal=e,this.impulse=i,this.friction=t}get point(){return CU.get().set(this._point.x,this._point.y,this._point.z)}get normal(){return CU.get().set(this._normal.x,this._normal.y,this._normal.z)}}class oU{constructor(A,g,e){n(this,"contacts"),n(this,"me"),n(this,"_collider"),n(this,"_gameObject"),this.me=A,this._collider=g,this._gameObject=g.gameObject,this.contacts=e}get collider(){return this._collider}get gameObject(){return this._gameObject}get rigidBody(){var A;return(A=this.collider)==null?void 0:A.attachedRigidbody}}function Xa(I,A){try{A?I(A):I()}catch(g){return console.error(g),!1}return!0}const PC="needle_isActiveInHierarchy",GB="builtin_components",ar="needle_editor_guid",mO=hA("debugnewscripts"),UO=hA("debughierarchy"),GI=[];function Qr(I){if(!(I.new_scripts.length<=0)){if(mO&&console.log("Register new components",I.new_scripts.length,[...I.new_scripts],I.alias?"element: "+I.alias:I.hash,I),I.new_scripts_pre_setup_callbacks.length>0){for(const A of I.new_scripts_pre_setup_callbacks)A&&A();I.new_scripts_pre_setup_callbacks.length=0}GI.length=0,I.new_scripts.length>0&&GI.push(...I.new_scripts),I.new_scripts.length=0;for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed)continue;if(!g.gameObject){console.error("MISSING GAMEOBJECT - will ignore",g),GI.splice(A,1),A--;continue}g.context=I,nr(g.gameObject),BU(g,I)}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed){Xo(GI[A],I),GI.splice(A,1),A--;continue}if(g.registering)try{g.registering()}catch(e){console.error(e)}g.__internalAwake!==void 0&&(g.gameObject||console.error("MISSING GAMEOBJECT",g,g.gameObject),nr(g.gameObject),g.activeAndEnabled&&Xa(g.__internalAwake.bind(g)))}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed||g.enabled===!1||(nr(g.gameObject),g.activeAndEnabled===!1))continue;g.__internalEnable!==void 0&&(g.enabled=!0,Xa(g.__internalEnable.bind(g)))}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}for(let A=0;A<GI.length;A++)try{const g=GI[A];if(g.destroyed||!g.gameObject)continue;I.new_script_start.push(g)}catch(g){console.error(g),Xo(GI[A],I),GI.splice(A,1),A--}GI.length=0;for(const A of I.new_scripts_post_setup_callbacks)A&&A();I.new_scripts_post_setup_callbacks.length=0}}function RO(I){I&&(I.__internalDisable(),Xo(I,I.context))}function sU(I,A){for(let g=0;g<I.new_script_start.length;g++)try{const e=I.new_script_start[g];if(A!==void 0&&e.gameObject!==A||e.destroyed||e.activeAndEnabled===!1)continue;Xa(e.__internalAwake.bind(e)),Xa(e.__internalEnable.bind(e)),Xa(e.__internalStart.bind(e)),I.new_script_start.splice(g,1),g--}catch(e){console.error(e),Xo(I.new_script_start[g],I),I.new_script_start.splice(g,1),g--}}function BU(I,A){A.scripts.indexOf(I)===-1&&(A.scripts.push(I),I.earlyUpdate&&A.scripts_earlyUpdate.push(I),I.update&&A.scripts_update.push(I),I.lateUpdate&&A.scripts_lateUpdate.push(I),I.onBeforeRender&&A.scripts_onBeforeRender.push(I),I.onAfterRender&&A.scripts_onAfterRender.push(I),I.onPausedChanged&&A.scripts_pausedChanged.push(I))}function Xo(I,A){jC(I,A.new_scripts),jC(I,A.new_script_start),jC(I,A.scripts),jC(I,A.scripts_earlyUpdate),jC(I,A.scripts_update),jC(I,A.scripts_lateUpdate),jC(I,A.scripts_onBeforeRender),jC(I,A.scripts_onAfterRender),jC(I,A.scripts_pausedChanged),A.stopAllCoroutinesFrom(I)}function jC(I,A){const g=A.indexOf(I);g>=0&&A.splice(g,1)}function pl(I){if(I||(I=le.Current.scene),!I){console.trace("Invalid call - no current context.");return}const A=gQ(I);aU(I,A,!0)||(console.error('Failed to update active state in hierarchy of "'+I.name+'"',I),console.warn(" \u2191 this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."))}function aU(I,A,g,e=0){if(e>1e3)return console.warn("Hierarchy is too deep (> 1000 level) - will abort updating active state"),!1;const i=gQ(I);if(A&&(A=i,A&&I.parent)){const o=I.parent;A=o[PC],A===void 0&&(o instanceof gt||(A=!0))}const t=I[PC]!==A;I[PC]=A,t&&(UO&&console.warn("ACTIVE CHANGE",I.name,i,I.visible,A,"changed?"+t,I),g&&FO(I,o=>{A?o.enabled&&(Xa(o.__internalAwake.bind(o)),o.__didEnable=!0,o.onEnable()):o.__didAwake&&(o.__didEnable=!1,o.onDisable())}));let C=!0;if(I.children){const o=e+1;for(const s of I.children)aU(s,A,g,o)===!1&&(C=!1)}return C}function nr(I){let A=!0,g=I,e=!1;for(;g&&g;){if(g.type==="Scene"&&(e=!0),!gQ(g)){A=!1;break}g=g.parent}if(!I){console.error("GO is null");return}I[PC]=A&&e}function FO(I,A){var g;if((g=I.userData)!=null&&g.components)for(const e of I.userData.components)A(e)}const ul=new Map,QU=Symbol("prewarmFlag"),cy=Symbol("waitingForPrewarm"),ly=hA("debugprewarm");function nU(I,A){!I||I[QU]===!0||I[cy]===!0||(ul.has(A)||ul.set(A,[]),I[cy]=!0,ul.get(A).push(I),ly&&console.debug("register prewarm",I.name))}let Dy=null,dy=null;function NO(I){if(!I)return;const A=ul.get(I);if(!(A!=null&&A.length))return;const g=I.mainCamera;if(g){ly&&console.log("prewarm",A.length,"objects",[...A]);const e=I.renderer;if(e.compile){const i=I.scene;e.compile(i,g),Dy??(Dy=new Gc(64)),dy??(dy=new Aw(.001,9999999,Dy)),dy.update(e,i);for(const t of A)t[QU]=!0,t[cy]=!1;A.length=0,ly&&console.log("prewarm done")}}}const KO=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function JO(I){return typeof I=="string"&&KO.test(I)}const pe=[];for(let I=0;I<256;++I)pe.push((I+256).toString(16).slice(1));function qO(I,A=0){return(pe[I[A+0]]+pe[I[A+1]]+pe[I[A+2]]+pe[I[A+3]]+"-"+pe[I[A+4]]+pe[I[A+5]]+"-"+pe[I[A+6]]+pe[I[A+7]]+"-"+pe[I[A+8]]+pe[I[A+9]]+"-"+pe[I[A+10]]+pe[I[A+11]]+pe[I[A+12]]+pe[I[A+13]]+pe[I[A+14]]+pe[I[A+15]]).toLowerCase()}function LO(I){if(!JO(I))throw TypeError("Invalid UUID");let A;const g=new Uint8Array(16);return g[0]=(A=parseInt(I.slice(0,8),16))>>>24,g[1]=A>>>16&255,g[2]=A>>>8&255,g[3]=A&255,g[4]=(A=parseInt(I.slice(9,13),16))>>>8,g[5]=A&255,g[6]=(A=parseInt(I.slice(14,18),16))>>>8,g[7]=A&255,g[8]=(A=parseInt(I.slice(19,23),16))>>>8,g[9]=A&255,g[10]=(A=parseInt(I.slice(24,36),16))/1099511627776&255,g[11]=A/4294967296&255,g[12]=A>>>24&255,g[13]=A>>>16&255,g[14]=A>>>8&255,g[15]=A&255,g}function bO(I){I=unescape(encodeURIComponent(I));const A=[];for(let g=0;g<I.length;++g)A.push(I.charCodeAt(g));return A}const vO="6ba7b810-9dad-11d1-80b4-00c04fd430c8",xO="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function YO(I,A,g){function e(i,t,C,o){var s;if(typeof i=="string"&&(i=bO(i)),typeof t=="string"&&(t=LO(t)),((s=t)===null||s===void 0?void 0:s.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let B=new Uint8Array(16+i.length);if(B.set(t),B.set(i,t.length),B=g(B),B[6]=B[6]&15|A,B[8]=B[8]&63|128,C){o=o||0;for(let a=0;a<16;++a)C[o+a]=B[a];return C}return qO(B)}try{e.name=I}catch{}return e.DNS=vO,e.URL=xO,e}function HO(I,A,g,e){switch(I){case 0:return A&g^~A&e;case 1:return A^g^e;case 2:return A&g^A&e^g&e;case 3:return A^g^e}}function py(I,A){return I<<A|I>>>32-A}function TO(I){const A=[1518500249,1859775393,2400959708,3395469782],g=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof I=="string"){const C=unescape(encodeURIComponent(I));I=[];for(let o=0;o<C.length;++o)I.push(C.charCodeAt(o))}else Array.isArray(I)||(I=Array.prototype.slice.call(I));I.push(128);const e=I.length/4+2,i=Math.ceil(e/16),t=new Array(i);for(let C=0;C<i;++C){const o=new Uint32Array(16);for(let s=0;s<16;++s)o[s]=I[C*64+s*4]<<24|I[C*64+s*4+1]<<16|I[C*64+s*4+2]<<8|I[C*64+s*4+3];t[C]=o}t[i-1][14]=(I.length-1)*8/Math.pow(2,32),t[i-1][14]=Math.floor(t[i-1][14]),t[i-1][15]=(I.length-1)*8&4294967295;for(let C=0;C<i;++C){const o=new Uint32Array(80);for(let E=0;E<16;++E)o[E]=t[C][E];for(let E=16;E<80;++E)o[E]=py(o[E-3]^o[E-8]^o[E-14]^o[E-16],1);let s=g[0],B=g[1],a=g[2],Q=g[3],r=g[4];for(let E=0;E<80;++E){const h=Math.floor(E/20),c=py(s,5)+HO(h,B,a,Q)+r+A[h]+o[E]>>>0;r=Q,Q=a,a=py(B,30)>>>0,B=s,s=c}g[0]=g[0]+s>>>0,g[1]=g[1]+B>>>0,g[2]=g[2]+a>>>0,g[3]=g[3]+Q>>>0,g[4]=g[4]+r>>>0}return[g[0]>>24&255,g[0]>>16&255,g[0]>>8&255,g[0]&255,g[1]>>24&255,g[1]>>16&255,g[1]>>8&255,g[1]&255,g[2]>>24&255,g[2]>>16&255,g[2]>>8&255,g[2]&255,g[3]>>24&255,g[3]>>16&255,g[3]>>8&255,g[3]&255,g[4]>>24&255,g[4]>>16&255,g[4]>>8&255,g[4]&255]}const OO=YO("v5",80,TO),rU=OO;var Ki=(I=>(I[I.OnConnection=0]="OnConnection",I[I.OnRoomJoin=1]="OnRoomJoin",I[I.Queued=2]="Queued",I[I.Immediate=3]="Immediate",I))(Ki||{});le.registerCallback(bt.ContextCreated,I=>{const A=I.context;WO(A),PO(A)});const wl=hA("debugcomponents"),EU="eff8ba80-635d-11ec-90d6-0242ac120003";class wi{constructor(A){n(this,"_originalSeed"),n(this,"_seed"),typeof A=="string"&&(A=wi.hash(A)),this._originalSeed=A,this._seed=A}get seed(){return this._seed}set seed(A){this._seed=A}reset(){this._seed=this._originalSeed}generateUUID(A){if(typeof A=="string")return rU(A,EU);const g=this._seed;return this._seed-=1,rU(g.toString(),EU)}initialize(A){typeof A=="string"?this._seed=wi.hash(A):this._seed=A}static createFromString(A){return new wi(this.hash(A))}static hash(A){let g=0;for(let e=0;e<A.length;e++)g=A.charCodeAt(e)+((g<<5)-g);return g}}class hU{constructor(A){n(this,"guid"),this.guid=A}}function uy(I,A,g=!0){if(!I)return;const e=I;if(As(I,g),!A){console.warn("Can not send destroy: No networking connection provided",I.guid);return}if(!A.isConnected){console.warn("Can not send destroy: not connected",I.guid);return}let i=I.guid;if(!i&&e.uuid&&(i=e.uuid),!i){console.warn("Can not send destroy: failed to find guid",I);return}const t=new hU(i);A.send("instance-destroyed",t,Ki.Queued)}function _O(I,A){const g=new hU(I);A.send("instance-destroyed",g,Ki.Queued)}function PO(I){I.connection.beginListen("instance-destroyed",A=>{wl&&console.log("[Remote] Destroyed",I.scene,A);const g=wr(A.guid,I.scene);g&&As(g)})}class jO{constructor(A,g){n(this,"guid"),n(this,"originalGuid"),n(this,"seed"),n(this,"visible"),n(this,"hostData"),n(this,"dontSave"),n(this,"parent"),n(this,"position"),n(this,"rotation"),n(this,"scale"),this.originalGuid=A,this.guid=g}}function cU(I,A,g,e){var i;const t=I;if(!t.guid)return console.warn("Can not instantiate: No guid",t),null;if(A.context||(A.context=Dg.Current),!A.context)return console.error("Missing network instantiate options / reference to network connection in sync instantiate"),null;const C=A?{...A}:null,{instance:o,seed:s}=ZO(t,A);if(o){const B=o;if(B.guid){wl&&console.log("[Local] new instance","gameobject:",o?.guid);const a=new jO(t.guid,B.guid);a.seed=s,C&&(C.position&&(a.position={x:C.position.x,y:C.position.y,z:C.position.z}),C.rotation&&(a.rotation={x:C.rotation.x,y:C.rotation.y,z:C.rotation.z,w:C.rotation.w}),C.scale&&(a.scale={x:C.scale.x,y:C.scale.y,z:C.scale.z})),a.position||(a.position={x:B.position.x,y:B.position.y,z:B.position.z}),a.rotation||(a.rotation={x:B.quaternion.x,y:B.quaternion.y,z:B.quaternion.z,w:B.quaternion.w}),a.scale||(a.scale={x:B.scale.x,y:B.scale.y,z:B.scale.z}),a.visible=t.visible,C!=null&&C.parent&&(typeof C.parent=="string"?a.parent=C.parent:a.parent=C.parent.guid),a.hostData=g,e===!1&&(a.dontSave=!0),(i=A?.context)==null||i.connection.send("new-instance-created",a)}else console.warn("Missing guid, can not send new instance event",B)}return o}function wy(){return Math.random()*9999999}function WO(I){I.connection.beginListen("new-instance-created",async A=>{const g=await zO(A.originalGuid,I.scene);if(!g){console.warn("could not find object that was instantiated: "+A.guid);return}const e=new _t;A.position&&(e.position=new M(A.position.x,A.position.y,A.position.z)),A.rotation&&(e.rotation=new RA(A.rotation.x,A.rotation.y,A.rotation.z,A.rotation.w)),A.scale&&(e.scale=new M(A.scale.x,A.scale.y,A.scale.z)),e.parent=A.parent,A.seed&&(e.idProvider=new wi(A.seed)),e.visible=A.visible,e.context=I,wl&&I.alias&&console.log("[Remote] instantiate in: "+I.alias);const i=yr(g,e);i&&(A.parent==="scene"&&I.scene.add(i),wl&&console.log("[Remote] new instance","gameobject:",i?.guid,g))})}function ZO(I,A){const g=wy(),e=A??new _t;e.idProvider=new wi(g);const i=yr(I,e);return{seed:g,instance:i}}const lU={};function VO(I,A){lU[I]=A}async function zO(I,A){const g=lU[I];if(g!=null){const e=await g(I);if(e)return e}return DU(I,A)}function DU(I,A){if(A===null||!I)return null;if(A.guid===I)return A;if(A.children)for(const g of A.children){const e=DU(I,g);if(e)return e}return null}const dU=new Map;function XO(I,A){if(!I)return;if(!A){console.warn("No prototype found",I,I.prototype,I.constructor);return}let g=dU.get(A);g&&g.apply(I)}function $O(I){const A=A1(I.prototype);dU.set(I,A)}function A1(I){return new g1(I)}class g1{constructor(A){n(this,"$symbol"),n(this,"extensions"),n(this,"descriptors"),this.$symbol=Symbol("prototype-extension"),this.extensions=Object.keys(A),this.descriptors=new Array;for(let g=0;g<this.extensions.length;g++){const e=this.extensions[g],i=Object.getOwnPropertyDescriptor(A,e);i&&this.descriptors.push(i)}}apply(A){if(!A[this.$symbol]){A[this.$symbol]=!0;for(let g=0;g<this.extensions.length;g++){const e=this.extensions[g],i=this.descriptors[g];i&&Object.defineProperty(A,e,i)}}}}var rr=(I=>(I.Added="component-added",I.Removing="removing-component",I))(rr||{});const pU=hA("debugcomponentevents");class Er{static addComponentLifecylceEventListener(A,g){this.eventListeners.has(A)&&this.eventListeners.set(A,[]);let e=this.eventListeners.get(A);e||(e=[]),e.push(g),this.eventListeners.set(A,e),pU&&console.log("Added event listener for "+A,this.eventListeners)}static removeComponentLifecylceEventListener(A,g){const e=this.eventListeners.get(A);if(!e)return;const i=e.indexOf(g);i<0||e.splice(i,1)}static dispatchComponentLifecycleEvent(A,g){const e=this.eventListeners.get(A);if(pU&&console.log("Dispatching event "+A,e),!!e)for(const i of e)i(g)}}n(Er,"eventListeners",new Map);const yy=hA("debuggetcomponent");function I1(I){return I==null||I.isObject3D?I:I.object&&I.object.isObject3D?I.object:I}function Sy(I,A){if(!I||!I.userData.components)return;const g=I.userData.components.indexOf(A);g<0||(Er.dispatchComponentLifecycleEvent(rr.Removing,A),A.gameObject=null,I.userData.components.splice(g,1))}function ky(I,A){const g=$a(I,A);if(g)return g;const e=new A;return $o(I,e)}const e1=new wi("addComponentIdProvider");function $o(I,A,g=!0){I.userData||(I.userData={}),I.userData.components||(I.userData.components=[]),I.userData.components.push(A),A.gameObject=I,(A.guid===void 0||A.guid==="invalid")&&(A.guid=e1.generateUUID()),Sl(I),rF(A);try{g&&A.__internalAwake&&(nr(I),A.__internalAwake()),Er.dispatchComponentLifecycleEvent(rr.Added,A)}catch(e){console.error(e)}return A}function uU(I,A){if(A.gameObject!==I){if(A.gameObject&&A.gameObject.userData.components){const g=A.gameObject.userData.components.indexOf(A);A.gameObject.userData.components.splice(g,1)}if(!I.userData.components)I.userData.components=[];else if(I.userData.components.includes(A))return;I.userData.components.push(A),A.gameObject=I}}function wU(I){if(I.gameObject&&I.gameObject.userData.components){const A=I.gameObject.userData.components.indexOf(I);I.gameObject.userData.components.splice(A,1)}I.__internalDisable&&I.__internalDisable(),I.onDestroy&&I.onDestroy(),Xo(I,I.context??Dg.Current),I.__internalDestroy(),I.gameObject=null}let yU=!1;function SU(I,A,g){var e;if(I!=null){if(!I.isObject3D){console.error("Object is not object3D");return}if(!((e=I?.userData)!=null&&e.components))return null;if(typeof A=="string"&&(yU||(yU=!0,console.warn(`Accessing components by name is not supported.
|
|
3256
3256
|
Please use the component type instead. This may keep working in local development but it will fail when bundling your application.
|
|
3257
3257
|
|
|
3258
3258
|
You can import other modules your main module to get access to types
|
|
@@ -3252,7 +3252,7 @@ in script ${I}.ts
|
|
|
3252
3252
|
uv.y = 1.0 - uv.y;
|
|
3253
3253
|
gl_FragColor = texture2D( map, uv);
|
|
3254
3254
|
// gl_FragColor = vec4(uv.xy, 0, 1);
|
|
3255
|
-
}`),Q(qt,"blipMaterial",new Tg({uniforms:{map:new MA(null)},vertexShader:wa.vertex,fragmentShader:wa.fragment})),Q(qt,"mesh",new SA(wa.planeGeometry,wa.blipMaterial));function mO(i){return qt.copyTexture(i)}function FO(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&i instanceof ImageBitmap}const pM=new sd(()=>new M,20);class NO{constructor(A,g,I,e,t){Q(this,"_point");Q(this,"_normal");Q(this,"distance");Q(this,"impulse");Q(this,"friction");this._point=A,this.distance=g,this._normal=I,this.impulse=e,this.friction=t}get point(){return pM.get().set(this._point.x,this._point.y,this._point.z)}get normal(){return pM.get().set(this._normal.x,this._normal.y,this._normal.z)}}class XF{constructor(A,g,I){Q(this,"contacts");Q(this,"me");Q(this,"_collider");Q(this,"_gameObject");this.me=A,this._collider=g,this._gameObject=g.gameObject,this.contacts=I}get collider(){return this._collider}get gameObject(){return this._gameObject}get rigidBody(){var A;return(A=this.collider)==null?void 0:A.attachedRigidbody}}function ka(i,A){try{A?i(A):i()}catch(g){return console.error(g),!1}return!0}const fo=Symbol("isActiveInHierarchy"),Sn="builtin_components",Nr="needle_editor_guid",KO=EA("debugnewscripts"),JO=EA("debughierarchy"),NI=[];function uE(i){if(!(i.new_scripts.length<=0)){if(KO&&console.log("Register new components",i.new_scripts.length,[...i.new_scripts],i.alias?"element: "+i.alias:i.hash,i),i.new_scripts_pre_setup_callbacks.length>0){for(const A of i.new_scripts_pre_setup_callbacks)A&&A();i.new_scripts_pre_setup_callbacks.length=0}NI.length=0,i.new_scripts.length>0&&NI.push(...i.new_scripts),i.new_scripts.length=0;for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed)continue;if(!g.gameObject){console.error("MISSING GAMEOBJECT - will ignore",g),NI.splice(A,1),A--;continue}g.context=i,Kr(g.gameObject),AN(g,i)}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed){hs(NI[A],i),NI.splice(A,1),A--;continue}if(g.registering)try{g.registering()}catch(I){console.error(I)}g.__internalAwake!==void 0&&(g.gameObject||console.error("MISSING GAMEOBJECT",g,g.gameObject),Kr(g.gameObject),g.activeAndEnabled&&ka(g.__internalAwake.bind(g)))}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed||g.enabled===!1||(Kr(g.gameObject),g.activeAndEnabled===!1))continue;g.__internalEnable!==void 0&&(g.enabled=!0,ka(g.__internalEnable.bind(g)))}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed||!g.gameObject)continue;i.new_script_start.push(g)}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}NI.length=0;for(const A of i.new_scripts_post_setup_callbacks)A&&A();i.new_scripts_post_setup_callbacks.length=0}}function qO(i){i&&(i.__internalDisable(),hs(i,i.context))}function $F(i,A){for(let g=0;g<i.new_script_start.length;g++)try{const I=i.new_script_start[g];if(A!==void 0&&I.gameObject!==A||I.destroyed||I.activeAndEnabled===!1)continue;ka(I.__internalAwake.bind(I)),ka(I.__internalEnable.bind(I)),ka(I.__internalStart.bind(I)),i.new_script_start.splice(g,1),g--}catch(I){console.error(I),hs(i.new_script_start[g],i),i.new_script_start.splice(g,1),g--}}function AN(i,A){A.scripts.indexOf(i)===-1&&(A.scripts.push(i),i.earlyUpdate&&A.scripts_earlyUpdate.push(i),i.update&&A.scripts_update.push(i),i.lateUpdate&&A.scripts_lateUpdate.push(i),i.onBeforeRender&&A.scripts_onBeforeRender.push(i),i.onAfterRender&&A.scripts_onAfterRender.push(i),i.onPausedChanged&&A.scripts_pausedChanged.push(i))}function hs(i,A){go(i,A.new_scripts),go(i,A.new_script_start),go(i,A.scripts),go(i,A.scripts_earlyUpdate),go(i,A.scripts_update),go(i,A.scripts_lateUpdate),go(i,A.scripts_onBeforeRender),go(i,A.scripts_onAfterRender),go(i,A.scripts_pausedChanged),A.stopAllCoroutinesFrom(i)}function go(i,A){const g=A.indexOf(i);g>=0&&A.splice(g,1)}function bl(i){if(i||(i=Ke.Current.scene),!i){console.trace("Invalid call - no current context.");return}const A=QQ(i);gN(i,A,!0)||(console.error('Failed to update active state in hierarchy of "'+i.name+'"',i),console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."))}function gN(i,A,g,I=0){if(I>1e3)return console.warn("Hierarchy is too deep (> 1000 level) - will abort updating active state"),!1;const e=QQ(i);if(A&&(A=e,A&&i.parent)){const s=i.parent;A=s[fo],A===void 0&&(s instanceof St||(A=!0))}const C=i[fo]!==A;i[fo]=A,C&&(JO&&console.warn("ACTIVE CHANGE",i.name,e,i.visible,A,"changed?"+C,i),g&&LO(i,s=>{A?s.enabled&&(ka(s.__internalAwake.bind(s)),s.__didEnable=!0,s.onEnable()):s.__didAwake&&(s.__didEnable=!1,s.onDisable())}));let o=!0;if(i.children){const s=I+1;for(const n of i.children)gN(n,A,g,s)===!1&&(o=!1)}return o}function Kr(i){let A=!0,g=i,I=!1;for(;g&&g;){if(g.type==="Scene"&&(I=!0),!QQ(g)){A=!1;break}g=g.parent}if(!i){console.error("GO is null");return}i[fo]=A&&I}function LO(i,A){var g;if((g=i.userData)!=null&&g.components)for(const I of i.userData.components)A(I)}const vl=new Map,IN=Symbol("prewarmFlag"),Hf=Symbol("waitingForPrewarm"),Tf=EA("debugprewarm");function eN(i,A){if(!i||i[IN]===!0||i[Hf]===!0)return;vl.has(A)||vl.set(A,[]),i[Hf]=!0,vl.get(A).push(i),Tf&&console.debug("register prewarm",i.name)}let wM=null,fM=null;function bO(i){if(!i)return;const A=vl.get(i);if(!(A!=null&&A.length))return;const g=i.mainCamera;if(g){Tf&&console.log("prewarm",A.length,"objects",[...A]);const I=i.renderer;if(I.compile){const e=i.scene;I.compile(e,g),wM??(wM=new Dd(64)),fM??(fM=new CS(.001,9999999,wM)),fM.update(I,e);for(const t of A)t[IN]=!0,t[Hf]=!1;A.length=0,Tf&&console.log("prewarm done")}}}const vO=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function xO(i){return typeof i=="string"&&vO.test(i)}const Re=[];for(let i=0;i<256;++i)Re.push((i+256).toString(16).slice(1));function YO(i,A=0){return(Re[i[A+0]]+Re[i[A+1]]+Re[i[A+2]]+Re[i[A+3]]+"-"+Re[i[A+4]]+Re[i[A+5]]+"-"+Re[i[A+6]]+Re[i[A+7]]+"-"+Re[i[A+8]]+Re[i[A+9]]+"-"+Re[i[A+10]]+Re[i[A+11]]+Re[i[A+12]]+Re[i[A+13]]+Re[i[A+14]]+Re[i[A+15]]).toLowerCase()}function HO(i){if(!xO(i))throw TypeError("Invalid UUID");let A;const g=new Uint8Array(16);return g[0]=(A=parseInt(i.slice(0,8),16))>>>24,g[1]=A>>>16&255,g[2]=A>>>8&255,g[3]=A&255,g[4]=(A=parseInt(i.slice(9,13),16))>>>8,g[5]=A&255,g[6]=(A=parseInt(i.slice(14,18),16))>>>8,g[7]=A&255,g[8]=(A=parseInt(i.slice(19,23),16))>>>8,g[9]=A&255,g[10]=(A=parseInt(i.slice(24,36),16))/1099511627776&255,g[11]=A/4294967296&255,g[12]=A>>>24&255,g[13]=A>>>16&255,g[14]=A>>>8&255,g[15]=A&255,g}function TO(i){i=unescape(encodeURIComponent(i));const A=[];for(let g=0;g<i.length;++g)A.push(i.charCodeAt(g));return A}const OO="6ba7b810-9dad-11d1-80b4-00c04fd430c8",_O="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function PO(i,A,g){function I(e,t,C,o){var s;if(typeof e=="string"&&(e=TO(e)),typeof t=="string"&&(t=HO(t)),((s=t)===null||s===void 0?void 0:s.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let n=new Uint8Array(16+e.length);if(n.set(t),n.set(e,t.length),n=g(n),n[6]=n[6]&15|A,n[8]=n[8]&63|128,C){o=o||0;for(let B=0;B<16;++B)C[o+B]=n[B];return C}return YO(n)}try{I.name=i}catch{}return I.DNS=OO,I.URL=_O,I}function WO(i,A,g,I){switch(i){case 0:return A&g^~A&I;case 1:return A^g^I;case 2:return A&g^A&I^g&I;case 3:return A^g^I}}function Zp(i,A){return i<<A|i>>>32-A}function jO(i){const A=[1518500249,1859775393,2400959708,3395469782],g=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const C=unescape(encodeURIComponent(i));i=[];for(let o=0;o<C.length;++o)i.push(C.charCodeAt(o))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const I=i.length/4+2,e=Math.ceil(I/16),t=new Array(e);for(let C=0;C<e;++C){const o=new Uint32Array(16);for(let s=0;s<16;++s)o[s]=i[C*64+s*4]<<24|i[C*64+s*4+1]<<16|i[C*64+s*4+2]<<8|i[C*64+s*4+3];t[C]=o}t[e-1][14]=(i.length-1)*8/Math.pow(2,32),t[e-1][14]=Math.floor(t[e-1][14]),t[e-1][15]=(i.length-1)*8&4294967295;for(let C=0;C<e;++C){const o=new Uint32Array(80);for(let E=0;E<16;++E)o[E]=t[C][E];for(let E=16;E<80;++E)o[E]=Zp(o[E-3]^o[E-8]^o[E-14]^o[E-16],1);let s=g[0],n=g[1],B=g[2],r=g[3],a=g[4];for(let E=0;E<80;++E){const c=Math.floor(E/20),h=Zp(s,5)+WO(c,n,B,r)+a+A[c]+o[E]>>>0;a=r,r=B,B=Zp(n,30)>>>0,n=s,s=h}g[0]=g[0]+s>>>0,g[1]=g[1]+n>>>0,g[2]=g[2]+B>>>0,g[3]=g[3]+r>>>0,g[4]=g[4]+a>>>0}return[g[0]>>24&255,g[0]>>16&255,g[0]>>8&255,g[0]&255,g[1]>>24&255,g[1]>>16&255,g[1]>>8&255,g[1]&255,g[2]>>24&255,g[2]>>16&255,g[2]>>8&255,g[2]&255,g[3]>>24&255,g[3]>>16&255,g[3]>>8&255,g[3]&255,g[4]>>24&255,g[4]>>16&255,g[4]>>8&255,g[4]&255]}const ZO=PO("v5",80,jO),yM=ZO;var xi=(i=>(i[i.OnConnection=0]="OnConnection",i[i.OnRoomJoin=1]="OnRoomJoin",i[i.Queued=2]="Queued",i[i.Immediate=3]="Immediate",i))(xi||{});Ke.registerCallback(SC.ContextCreated,i=>{const A=i.context;$O(A),VO(A)});const SD=EA("debugcomponents"),SM="eff8ba80-635d-11ec-90d6-0242ac120003";class fi{constructor(A){Q(this,"_originalSeed");Q(this,"_seed");typeof A=="string"&&(A=fi.hash(A)),this._originalSeed=A,this._seed=A}get seed(){return this._seed}set seed(A){this._seed=A}reset(){this._seed=this._originalSeed}generateUUID(A){if(typeof A=="string")return yM(A,SM);const g=this._seed;return this._seed-=1,yM(g.toString(),SM)}initialize(A){typeof A=="string"?this._seed=fi.hash(A):this._seed=A}static createFromString(A){return new fi(this.hash(A))}static hash(A){let g=0;for(let I=0;I<A.length;I++)g=A.charCodeAt(I)+((g<<5)-g);return g}}class iN{constructor(A){Q(this,"guid");this.guid=A}}function xS(i,A,g=!0){if(!i)return;const I=i;if(Ks(i,g),!A){console.warn("Can not send destroy: No networking connection provided",i.guid);return}if(!A.isConnected){console.warn("Can not send destroy: not connected",i.guid);return}let e=i.guid;if(!e&&I.uuid&&(e=I.uuid),!e){console.warn("Can not send destroy: failed to find guid",i);return}const t=new iN(e);A.send("instance-destroyed",t,xi.Queued)}function zO(i,A){const g=new iN(i);A.send("instance-destroyed",g,xi.Queued)}function VO(i){i.connection.beginListen("instance-destroyed",A=>{SD&&console.log("[Remote] Destroyed",i.scene,A);const g=hc(A.guid,i.scene);g&&Ks(g)})}class XO{constructor(A,g){Q(this,"guid");Q(this,"originalGuid");Q(this,"seed");Q(this,"visible");Q(this,"hostData");Q(this,"dontSave");Q(this,"parent");Q(this,"position");Q(this,"rotation");Q(this,"scale");this.originalGuid=A,this.guid=g}}function tN(i,A,g,I){var s;const e=i;if(!e.guid)return console.warn("Can not instantiate: No guid",e),null;if(A.context||(A.context=dg.Current),!A.context)return console.error("Missing network instantiate options / reference to network connection in sync instantiate"),null;const t=A?{...A}:null,{instance:C,seed:o}=A_(e,A);if(C){const n=C;if(n.guid){SD&&console.log("[Local] new instance","gameobject:",C==null?void 0:C.guid);const B=new XO(e.guid,n.guid);B.seed=o,t&&(t.position&&(B.position={x:t.position.x,y:t.position.y,z:t.position.z}),t.rotation&&(B.rotation={x:t.rotation.x,y:t.rotation.y,z:t.rotation.z,w:t.rotation.w}),t.scale&&(B.scale={x:t.scale.x,y:t.scale.y,z:t.scale.z})),B.position||(B.position={x:n.position.x,y:n.position.y,z:n.position.z}),B.rotation||(B.rotation={x:n.quaternion.x,y:n.quaternion.y,z:n.quaternion.z,w:n.quaternion.w}),B.scale||(B.scale={x:n.scale.x,y:n.scale.y,z:n.scale.z}),B.visible=e.visible,t!=null&&t.parent&&(typeof t.parent=="string"?B.parent=t.parent:B.parent=t.parent.guid),B.hostData=g,I===!1&&(B.dontSave=!0),(s=A==null?void 0:A.context)==null||s.connection.send("new-instance-created",B)}else console.warn("Missing guid, can not send new instance event",n)}return C}function YS(){return Math.random()*9999999}function $O(i){i.connection.beginListen("new-instance-created",async A=>{const g=await I_(A.originalGuid,i.scene);if(!g){console.warn("could not find object that was instantiated: "+A.guid);return}const I=new mC;A.position&&(I.position=new M(A.position.x,A.position.y,A.position.z)),A.rotation&&(I.rotation=new UA(A.rotation.x,A.rotation.y,A.rotation.z,A.rotation.w)),A.scale&&(I.scale=new M(A.scale.x,A.scale.y,A.scale.z)),I.parent=A.parent,A.seed&&(I.idProvider=new fi(A.seed)),I.visible=A.visible,I.context=i,SD&&i.alias&&console.log("[Remote] instantiate in: "+i.alias);const e=lc(g,I);e&&(A.parent==="scene"&&i.scene.add(e),SD&&console.log("[Remote] new instance","gameobject:",e==null?void 0:e.guid,g))})}function A_(i,A){const g=YS(),I=A??new mC;I.idProvider=new fi(g);const e=lc(i,I);return{seed:g,instance:e}}const CN={};function g_(i,A){CN[i]=A}async function I_(i,A){const g=CN[i];if(g!=null){const I=await g(i);if(I)return I}return oN(i,A)}function oN(i,A){if(A===null||!i)return null;if(A.guid===i)return A;if(A.children)for(const g of A.children){const I=oN(i,g);if(I)return I}return null}const sN=new Map;function e_(i,A){if(!i)return;if(!A){console.warn("No prototype found",i,i.prototype,i.constructor);return}let g=sN.get(A);g&&g.apply(i)}function i_(i){const A=t_(i.prototype);sN.set(i,A)}function t_(i){return new C_(i)}class C_{constructor(A){Q(this,"$symbol");Q(this,"extensions");Q(this,"descriptors");this.$symbol=Symbol("prototype-extension"),this.extensions=Object.keys(A),this.descriptors=new Array;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=Object.getOwnPropertyDescriptor(A,I);e&&this.descriptors.push(e)}}apply(A){if(!A[this.$symbol]){A[this.$symbol]=!0;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=this.descriptors[g];e&&Object.defineProperty(A,I,e)}}}}var Qc=(i=>(i.Added="component-added",i.Removing="removing-component",i))(Qc||{});const GM=EA("debugcomponentevents");class rc{static addComponentLifecylceEventListener(A,g){this.eventListeners.has(A)&&this.eventListeners.set(A,[]);let I=this.eventListeners.get(A);I||(I=[]),I.push(g),this.eventListeners.set(A,I),GM&&console.log("Added event listener for "+A,this.eventListeners)}static removeComponentLifecylceEventListener(A,g){const I=this.eventListeners.get(A);if(!I)return;const e=I.indexOf(g);e<0||I.splice(e,1)}static dispatchComponentLifecycleEvent(A,g){const I=this.eventListeners.get(A);if(GM&&console.log("Dispatching event "+A,I),!!I)for(const e of I)e(g)}}Q(rc,"eventListeners",new Map);const zp=EA("debuggetcomponent");function o_(i){return i==null||i.isObject3D?i:i.object&&i.object.isObject3D?i.object:i}function HS(i,A){if(!i||!i.userData.components)return;const g=i.userData.components.indexOf(A);g<0||(rc.dispatchComponentLifecycleEvent(Qc.Removing,A),A.gameObject=null,i.userData.components.splice(g,1))}function TS(i,A){const g=BQ(i,A);if(g)return g;const I=new A;return Hs(i,I)}const s_=new fi("addComponentIdProvider");function Hs(i,A,g=!0){i.userData||(i.userData={}),i.userData.components||(i.userData.components=[]),i.userData.components.push(A),A.gameObject=i,(A.guid===void 0||A.guid==="invalid")&&(A.guid=s_.generateUUID()),vd(i),MK(A);try{g&&A.__internalAwake&&(Kr(i),A.__internalAwake()),rc.dispatchComponentLifecycleEvent(Qc.Added,A)}catch(I){console.error(I)}return A}function nN(i,A){if(A.gameObject!==i){if(A.gameObject&&A.gameObject.userData.components){const g=A.gameObject.userData.components.indexOf(A);A.gameObject.userData.components.splice(g,1)}if(!i.userData.components)i.userData.components=[];else if(i.userData.components.includes(A))return;i.userData.components.push(A),A.gameObject=i}}function BN(i){if(i.gameObject&&i.gameObject.userData.components){const A=i.gameObject.userData.components.indexOf(i);i.gameObject.userData.components.splice(A,1)}i.__internalDisable&&i.__internalDisable(),i.onDestroy&&i.onDestroy(),hs(i,i.context??dg.Current),i.__internalDestroy(),i.gameObject=null}let kM=!1;function aN(i,A,g){var I;if(i!=null){if(!i.isObject3D){console.error("Object is not object3D");return}if(!((I=i==null?void 0:i.userData)!=null&&I.components))return null;if(typeof A=="string"&&(kM||(kM=!0,console.warn(`Accessing components by name is not supported.
|
|
3255
|
+
}`),Q(qt,"blipMaterial",new Tg({uniforms:{map:new MA(null)},vertexShader:wa.vertex,fragmentShader:wa.fragment})),Q(qt,"mesh",new SA(wa.planeGeometry,wa.blipMaterial));function mO(i){return qt.copyTexture(i)}function FO(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&i instanceof ImageBitmap}const pM=new sd(()=>new M,20);class NO{constructor(A,g,I,e,t){Q(this,"_point");Q(this,"_normal");Q(this,"distance");Q(this,"impulse");Q(this,"friction");this._point=A,this.distance=g,this._normal=I,this.impulse=e,this.friction=t}get point(){return pM.get().set(this._point.x,this._point.y,this._point.z)}get normal(){return pM.get().set(this._normal.x,this._normal.y,this._normal.z)}}class XF{constructor(A,g,I){Q(this,"contacts");Q(this,"me");Q(this,"_collider");Q(this,"_gameObject");this.me=A,this._collider=g,this._gameObject=g.gameObject,this.contacts=I}get collider(){return this._collider}get gameObject(){return this._gameObject}get rigidBody(){var A;return(A=this.collider)==null?void 0:A.attachedRigidbody}}function ka(i,A){try{A?i(A):i()}catch(g){return console.error(g),!1}return!0}const fo="needle_isActiveInHierarchy",Sn="builtin_components",Nr="needle_editor_guid",KO=EA("debugnewscripts"),JO=EA("debughierarchy"),NI=[];function uE(i){if(!(i.new_scripts.length<=0)){if(KO&&console.log("Register new components",i.new_scripts.length,[...i.new_scripts],i.alias?"element: "+i.alias:i.hash,i),i.new_scripts_pre_setup_callbacks.length>0){for(const A of i.new_scripts_pre_setup_callbacks)A&&A();i.new_scripts_pre_setup_callbacks.length=0}NI.length=0,i.new_scripts.length>0&&NI.push(...i.new_scripts),i.new_scripts.length=0;for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed)continue;if(!g.gameObject){console.error("MISSING GAMEOBJECT - will ignore",g),NI.splice(A,1),A--;continue}g.context=i,Kr(g.gameObject),AN(g,i)}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed){hs(NI[A],i),NI.splice(A,1),A--;continue}if(g.registering)try{g.registering()}catch(I){console.error(I)}g.__internalAwake!==void 0&&(g.gameObject||console.error("MISSING GAMEOBJECT",g,g.gameObject),Kr(g.gameObject),g.activeAndEnabled&&ka(g.__internalAwake.bind(g)))}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed||g.enabled===!1||(Kr(g.gameObject),g.activeAndEnabled===!1))continue;g.__internalEnable!==void 0&&(g.enabled=!0,ka(g.__internalEnable.bind(g)))}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}for(let A=0;A<NI.length;A++)try{const g=NI[A];if(g.destroyed||!g.gameObject)continue;i.new_script_start.push(g)}catch(g){console.error(g),hs(NI[A],i),NI.splice(A,1),A--}NI.length=0;for(const A of i.new_scripts_post_setup_callbacks)A&&A();i.new_scripts_post_setup_callbacks.length=0}}function qO(i){i&&(i.__internalDisable(),hs(i,i.context))}function $F(i,A){for(let g=0;g<i.new_script_start.length;g++)try{const I=i.new_script_start[g];if(A!==void 0&&I.gameObject!==A||I.destroyed||I.activeAndEnabled===!1)continue;ka(I.__internalAwake.bind(I)),ka(I.__internalEnable.bind(I)),ka(I.__internalStart.bind(I)),i.new_script_start.splice(g,1),g--}catch(I){console.error(I),hs(i.new_script_start[g],i),i.new_script_start.splice(g,1),g--}}function AN(i,A){A.scripts.indexOf(i)===-1&&(A.scripts.push(i),i.earlyUpdate&&A.scripts_earlyUpdate.push(i),i.update&&A.scripts_update.push(i),i.lateUpdate&&A.scripts_lateUpdate.push(i),i.onBeforeRender&&A.scripts_onBeforeRender.push(i),i.onAfterRender&&A.scripts_onAfterRender.push(i),i.onPausedChanged&&A.scripts_pausedChanged.push(i))}function hs(i,A){go(i,A.new_scripts),go(i,A.new_script_start),go(i,A.scripts),go(i,A.scripts_earlyUpdate),go(i,A.scripts_update),go(i,A.scripts_lateUpdate),go(i,A.scripts_onBeforeRender),go(i,A.scripts_onAfterRender),go(i,A.scripts_pausedChanged),A.stopAllCoroutinesFrom(i)}function go(i,A){const g=A.indexOf(i);g>=0&&A.splice(g,1)}function bl(i){if(i||(i=Ke.Current.scene),!i){console.trace("Invalid call - no current context.");return}const A=QQ(i);gN(i,A,!0)||(console.error('Failed to update active state in hierarchy of "'+i.name+'"',i),console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."))}function gN(i,A,g,I=0){if(I>1e3)return console.warn("Hierarchy is too deep (> 1000 level) - will abort updating active state"),!1;const e=QQ(i);if(A&&(A=e,A&&i.parent)){const s=i.parent;A=s[fo],A===void 0&&(s instanceof St||(A=!0))}const C=i[fo]!==A;i[fo]=A,C&&(JO&&console.warn("ACTIVE CHANGE",i.name,e,i.visible,A,"changed?"+C,i),g&&LO(i,s=>{A?s.enabled&&(ka(s.__internalAwake.bind(s)),s.__didEnable=!0,s.onEnable()):s.__didAwake&&(s.__didEnable=!1,s.onDisable())}));let o=!0;if(i.children){const s=I+1;for(const n of i.children)gN(n,A,g,s)===!1&&(o=!1)}return o}function Kr(i){let A=!0,g=i,I=!1;for(;g&&g;){if(g.type==="Scene"&&(I=!0),!QQ(g)){A=!1;break}g=g.parent}if(!i){console.error("GO is null");return}i[fo]=A&&I}function LO(i,A){var g;if((g=i.userData)!=null&&g.components)for(const I of i.userData.components)A(I)}const vl=new Map,IN=Symbol("prewarmFlag"),Hf=Symbol("waitingForPrewarm"),Tf=EA("debugprewarm");function eN(i,A){if(!i||i[IN]===!0||i[Hf]===!0)return;vl.has(A)||vl.set(A,[]),i[Hf]=!0,vl.get(A).push(i),Tf&&console.debug("register prewarm",i.name)}let wM=null,fM=null;function bO(i){if(!i)return;const A=vl.get(i);if(!(A!=null&&A.length))return;const g=i.mainCamera;if(g){Tf&&console.log("prewarm",A.length,"objects",[...A]);const I=i.renderer;if(I.compile){const e=i.scene;I.compile(e,g),wM??(wM=new Dd(64)),fM??(fM=new CS(.001,9999999,wM)),fM.update(I,e);for(const t of A)t[IN]=!0,t[Hf]=!1;A.length=0,Tf&&console.log("prewarm done")}}}const vO=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function xO(i){return typeof i=="string"&&vO.test(i)}const Re=[];for(let i=0;i<256;++i)Re.push((i+256).toString(16).slice(1));function YO(i,A=0){return(Re[i[A+0]]+Re[i[A+1]]+Re[i[A+2]]+Re[i[A+3]]+"-"+Re[i[A+4]]+Re[i[A+5]]+"-"+Re[i[A+6]]+Re[i[A+7]]+"-"+Re[i[A+8]]+Re[i[A+9]]+"-"+Re[i[A+10]]+Re[i[A+11]]+Re[i[A+12]]+Re[i[A+13]]+Re[i[A+14]]+Re[i[A+15]]).toLowerCase()}function HO(i){if(!xO(i))throw TypeError("Invalid UUID");let A;const g=new Uint8Array(16);return g[0]=(A=parseInt(i.slice(0,8),16))>>>24,g[1]=A>>>16&255,g[2]=A>>>8&255,g[3]=A&255,g[4]=(A=parseInt(i.slice(9,13),16))>>>8,g[5]=A&255,g[6]=(A=parseInt(i.slice(14,18),16))>>>8,g[7]=A&255,g[8]=(A=parseInt(i.slice(19,23),16))>>>8,g[9]=A&255,g[10]=(A=parseInt(i.slice(24,36),16))/1099511627776&255,g[11]=A/4294967296&255,g[12]=A>>>24&255,g[13]=A>>>16&255,g[14]=A>>>8&255,g[15]=A&255,g}function TO(i){i=unescape(encodeURIComponent(i));const A=[];for(let g=0;g<i.length;++g)A.push(i.charCodeAt(g));return A}const OO="6ba7b810-9dad-11d1-80b4-00c04fd430c8",_O="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function PO(i,A,g){function I(e,t,C,o){var s;if(typeof e=="string"&&(e=TO(e)),typeof t=="string"&&(t=HO(t)),((s=t)===null||s===void 0?void 0:s.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let n=new Uint8Array(16+e.length);if(n.set(t),n.set(e,t.length),n=g(n),n[6]=n[6]&15|A,n[8]=n[8]&63|128,C){o=o||0;for(let B=0;B<16;++B)C[o+B]=n[B];return C}return YO(n)}try{I.name=i}catch{}return I.DNS=OO,I.URL=_O,I}function WO(i,A,g,I){switch(i){case 0:return A&g^~A&I;case 1:return A^g^I;case 2:return A&g^A&I^g&I;case 3:return A^g^I}}function Zp(i,A){return i<<A|i>>>32-A}function jO(i){const A=[1518500249,1859775393,2400959708,3395469782],g=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const C=unescape(encodeURIComponent(i));i=[];for(let o=0;o<C.length;++o)i.push(C.charCodeAt(o))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const I=i.length/4+2,e=Math.ceil(I/16),t=new Array(e);for(let C=0;C<e;++C){const o=new Uint32Array(16);for(let s=0;s<16;++s)o[s]=i[C*64+s*4]<<24|i[C*64+s*4+1]<<16|i[C*64+s*4+2]<<8|i[C*64+s*4+3];t[C]=o}t[e-1][14]=(i.length-1)*8/Math.pow(2,32),t[e-1][14]=Math.floor(t[e-1][14]),t[e-1][15]=(i.length-1)*8&4294967295;for(let C=0;C<e;++C){const o=new Uint32Array(80);for(let E=0;E<16;++E)o[E]=t[C][E];for(let E=16;E<80;++E)o[E]=Zp(o[E-3]^o[E-8]^o[E-14]^o[E-16],1);let s=g[0],n=g[1],B=g[2],r=g[3],a=g[4];for(let E=0;E<80;++E){const c=Math.floor(E/20),h=Zp(s,5)+WO(c,n,B,r)+a+A[c]+o[E]>>>0;a=r,r=B,B=Zp(n,30)>>>0,n=s,s=h}g[0]=g[0]+s>>>0,g[1]=g[1]+n>>>0,g[2]=g[2]+B>>>0,g[3]=g[3]+r>>>0,g[4]=g[4]+a>>>0}return[g[0]>>24&255,g[0]>>16&255,g[0]>>8&255,g[0]&255,g[1]>>24&255,g[1]>>16&255,g[1]>>8&255,g[1]&255,g[2]>>24&255,g[2]>>16&255,g[2]>>8&255,g[2]&255,g[3]>>24&255,g[3]>>16&255,g[3]>>8&255,g[3]&255,g[4]>>24&255,g[4]>>16&255,g[4]>>8&255,g[4]&255]}const ZO=PO("v5",80,jO),yM=ZO;var xi=(i=>(i[i.OnConnection=0]="OnConnection",i[i.OnRoomJoin=1]="OnRoomJoin",i[i.Queued=2]="Queued",i[i.Immediate=3]="Immediate",i))(xi||{});Ke.registerCallback(SC.ContextCreated,i=>{const A=i.context;$O(A),VO(A)});const SD=EA("debugcomponents"),SM="eff8ba80-635d-11ec-90d6-0242ac120003";class fi{constructor(A){Q(this,"_originalSeed");Q(this,"_seed");typeof A=="string"&&(A=fi.hash(A)),this._originalSeed=A,this._seed=A}get seed(){return this._seed}set seed(A){this._seed=A}reset(){this._seed=this._originalSeed}generateUUID(A){if(typeof A=="string")return yM(A,SM);const g=this._seed;return this._seed-=1,yM(g.toString(),SM)}initialize(A){typeof A=="string"?this._seed=fi.hash(A):this._seed=A}static createFromString(A){return new fi(this.hash(A))}static hash(A){let g=0;for(let I=0;I<A.length;I++)g=A.charCodeAt(I)+((g<<5)-g);return g}}class iN{constructor(A){Q(this,"guid");this.guid=A}}function xS(i,A,g=!0){if(!i)return;const I=i;if(Ks(i,g),!A){console.warn("Can not send destroy: No networking connection provided",i.guid);return}if(!A.isConnected){console.warn("Can not send destroy: not connected",i.guid);return}let e=i.guid;if(!e&&I.uuid&&(e=I.uuid),!e){console.warn("Can not send destroy: failed to find guid",i);return}const t=new iN(e);A.send("instance-destroyed",t,xi.Queued)}function zO(i,A){const g=new iN(i);A.send("instance-destroyed",g,xi.Queued)}function VO(i){i.connection.beginListen("instance-destroyed",A=>{SD&&console.log("[Remote] Destroyed",i.scene,A);const g=hc(A.guid,i.scene);g&&Ks(g)})}class XO{constructor(A,g){Q(this,"guid");Q(this,"originalGuid");Q(this,"seed");Q(this,"visible");Q(this,"hostData");Q(this,"dontSave");Q(this,"parent");Q(this,"position");Q(this,"rotation");Q(this,"scale");this.originalGuid=A,this.guid=g}}function tN(i,A,g,I){var s;const e=i;if(!e.guid)return console.warn("Can not instantiate: No guid",e),null;if(A.context||(A.context=dg.Current),!A.context)return console.error("Missing network instantiate options / reference to network connection in sync instantiate"),null;const t=A?{...A}:null,{instance:C,seed:o}=A_(e,A);if(C){const n=C;if(n.guid){SD&&console.log("[Local] new instance","gameobject:",C==null?void 0:C.guid);const B=new XO(e.guid,n.guid);B.seed=o,t&&(t.position&&(B.position={x:t.position.x,y:t.position.y,z:t.position.z}),t.rotation&&(B.rotation={x:t.rotation.x,y:t.rotation.y,z:t.rotation.z,w:t.rotation.w}),t.scale&&(B.scale={x:t.scale.x,y:t.scale.y,z:t.scale.z})),B.position||(B.position={x:n.position.x,y:n.position.y,z:n.position.z}),B.rotation||(B.rotation={x:n.quaternion.x,y:n.quaternion.y,z:n.quaternion.z,w:n.quaternion.w}),B.scale||(B.scale={x:n.scale.x,y:n.scale.y,z:n.scale.z}),B.visible=e.visible,t!=null&&t.parent&&(typeof t.parent=="string"?B.parent=t.parent:B.parent=t.parent.guid),B.hostData=g,I===!1&&(B.dontSave=!0),(s=A==null?void 0:A.context)==null||s.connection.send("new-instance-created",B)}else console.warn("Missing guid, can not send new instance event",n)}return C}function YS(){return Math.random()*9999999}function $O(i){i.connection.beginListen("new-instance-created",async A=>{const g=await I_(A.originalGuid,i.scene);if(!g){console.warn("could not find object that was instantiated: "+A.guid);return}const I=new mC;A.position&&(I.position=new M(A.position.x,A.position.y,A.position.z)),A.rotation&&(I.rotation=new UA(A.rotation.x,A.rotation.y,A.rotation.z,A.rotation.w)),A.scale&&(I.scale=new M(A.scale.x,A.scale.y,A.scale.z)),I.parent=A.parent,A.seed&&(I.idProvider=new fi(A.seed)),I.visible=A.visible,I.context=i,SD&&i.alias&&console.log("[Remote] instantiate in: "+i.alias);const e=lc(g,I);e&&(A.parent==="scene"&&i.scene.add(e),SD&&console.log("[Remote] new instance","gameobject:",e==null?void 0:e.guid,g))})}function A_(i,A){const g=YS(),I=A??new mC;I.idProvider=new fi(g);const e=lc(i,I);return{seed:g,instance:e}}const CN={};function g_(i,A){CN[i]=A}async function I_(i,A){const g=CN[i];if(g!=null){const I=await g(i);if(I)return I}return oN(i,A)}function oN(i,A){if(A===null||!i)return null;if(A.guid===i)return A;if(A.children)for(const g of A.children){const I=oN(i,g);if(I)return I}return null}const sN=new Map;function e_(i,A){if(!i)return;if(!A){console.warn("No prototype found",i,i.prototype,i.constructor);return}let g=sN.get(A);g&&g.apply(i)}function i_(i){const A=t_(i.prototype);sN.set(i,A)}function t_(i){return new C_(i)}class C_{constructor(A){Q(this,"$symbol");Q(this,"extensions");Q(this,"descriptors");this.$symbol=Symbol("prototype-extension"),this.extensions=Object.keys(A),this.descriptors=new Array;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=Object.getOwnPropertyDescriptor(A,I);e&&this.descriptors.push(e)}}apply(A){if(!A[this.$symbol]){A[this.$symbol]=!0;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=this.descriptors[g];e&&Object.defineProperty(A,I,e)}}}}var Qc=(i=>(i.Added="component-added",i.Removing="removing-component",i))(Qc||{});const GM=EA("debugcomponentevents");class rc{static addComponentLifecylceEventListener(A,g){this.eventListeners.has(A)&&this.eventListeners.set(A,[]);let I=this.eventListeners.get(A);I||(I=[]),I.push(g),this.eventListeners.set(A,I),GM&&console.log("Added event listener for "+A,this.eventListeners)}static removeComponentLifecylceEventListener(A,g){const I=this.eventListeners.get(A);if(!I)return;const e=I.indexOf(g);e<0||I.splice(e,1)}static dispatchComponentLifecycleEvent(A,g){const I=this.eventListeners.get(A);if(GM&&console.log("Dispatching event "+A,I),!!I)for(const e of I)e(g)}}Q(rc,"eventListeners",new Map);const zp=EA("debuggetcomponent");function o_(i){return i==null||i.isObject3D?i:i.object&&i.object.isObject3D?i.object:i}function HS(i,A){if(!i||!i.userData.components)return;const g=i.userData.components.indexOf(A);g<0||(rc.dispatchComponentLifecycleEvent(Qc.Removing,A),A.gameObject=null,i.userData.components.splice(g,1))}function TS(i,A){const g=BQ(i,A);if(g)return g;const I=new A;return Hs(i,I)}const s_=new fi("addComponentIdProvider");function Hs(i,A,g=!0){i.userData||(i.userData={}),i.userData.components||(i.userData.components=[]),i.userData.components.push(A),A.gameObject=i,(A.guid===void 0||A.guid==="invalid")&&(A.guid=s_.generateUUID()),vd(i),MK(A);try{g&&A.__internalAwake&&(Kr(i),A.__internalAwake()),rc.dispatchComponentLifecycleEvent(Qc.Added,A)}catch(I){console.error(I)}return A}function nN(i,A){if(A.gameObject!==i){if(A.gameObject&&A.gameObject.userData.components){const g=A.gameObject.userData.components.indexOf(A);A.gameObject.userData.components.splice(g,1)}if(!i.userData.components)i.userData.components=[];else if(i.userData.components.includes(A))return;i.userData.components.push(A),A.gameObject=i}}function BN(i){if(i.gameObject&&i.gameObject.userData.components){const A=i.gameObject.userData.components.indexOf(i);i.gameObject.userData.components.splice(A,1)}i.__internalDisable&&i.__internalDisable(),i.onDestroy&&i.onDestroy(),hs(i,i.context??dg.Current),i.__internalDestroy(),i.gameObject=null}let kM=!1;function aN(i,A,g){var I;if(i!=null){if(!i.isObject3D){console.error("Object is not object3D");return}if(!((I=i==null?void 0:i.userData)!=null&&I.components))return null;if(typeof A=="string"&&(kM||(kM=!0,console.warn(`Accessing components by name is not supported.
|
|
3256
3256
|
Please use the component type instead. This may keep working in local development but it will fail when bundling your application.
|
|
3257
3257
|
|
|
3258
3258
|
You can import other modules your main module to get access to types
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const activeInHierarchyFieldName
|
|
1
|
+
export declare const activeInHierarchyFieldName = "needle_isActiveInHierarchy";
|
|
2
2
|
export declare const builtinComponentKeyName = "builtin_components";
|
|
3
3
|
export declare const editorGuidKeyName = "needle_editor_guid";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const activeInHierarchyFieldName =
|
|
1
|
+
export const activeInHierarchyFieldName = "needle_isActiveInHierarchy";
|
|
2
2
|
export const builtinComponentKeyName = "builtin_components";
|
|
3
3
|
// It's easier to use a string than a symbol here because the symbol might not be the same when imported in other packages
|
|
4
4
|
export const editorGuidKeyName = "needle_editor_guid";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine_constants.js","sourceRoot":"","sources":["../../src/engine/engine_constants.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,0BAA0B,GAAG,
|
|
1
|
+
{"version":3,"file":"engine_constants.js","sourceRoot":"","sources":["../../src/engine/engine_constants.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAC5D,0HAA0H;AAC1H,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC"}
|
|
@@ -288,6 +288,18 @@ function updateIsActiveInHierarchyRecursiveRuntime(go, activeInHierarchy, allowE
|
|
|
288
288
|
}
|
|
289
289
|
return success;
|
|
290
290
|
}
|
|
291
|
+
// function tryFindActiveStateInParent(obj: Object3D): boolean {
|
|
292
|
+
// let current: Object3D | undefined | null = obj;
|
|
293
|
+
// while (current) {
|
|
294
|
+
// const activeState = current[constants.activeInHierarchyFieldName];
|
|
295
|
+
// if (activeState !== undefined) return activeState;
|
|
296
|
+
// if (current instanceof Scene && !current.parent) {
|
|
297
|
+
// return true;
|
|
298
|
+
// }
|
|
299
|
+
// current = current.parent;
|
|
300
|
+
// }
|
|
301
|
+
// return false;
|
|
302
|
+
// }
|
|
291
303
|
// let isRunning = false;
|
|
292
304
|
// // Prevent: https://github.com/needle-tools/needle-tiny/issues/641
|
|
293
305
|
// const temporyChildArrayBuffer: Array<Array<THREE.Object3D>> = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine_mainloop_utils.js","sourceRoot":"","sources":["../../src/engine/engine_mainloop_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAY,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,KAAK,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAC1C,MAAM,cAAc,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAElD,8DAA8D;AAC9D,4DAA4D;AAC5D,6BAA6B;AAC7B,MAAM,kBAAkB,GAAU,EAAE,CAAC;AAErC,MAAM,UAAU,iBAAiB,CAAC,OAAiB;IAC/C,IAAI,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