fix(needle): correct vite gzip option and rebuild dist
Replace invalid ddeleteOriginalAssets with deleteOriginalAssets: false so vite-plugin-compression2 keeps uncompressed JS/CSS alongside .gz files. Without this, index.html referenced missing chunks and the scene failed to load. Rebuild MenuScene and SampleScene production bundles. Made-with: Cursor
This commit is contained in:
BIN
Needle/MenuScene/dist/assets/MenuScene.glb
vendored
BIN
Needle/MenuScene/dist/assets/MenuScene.glb
vendored
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./register_types.C910Zu9b.js","./needle-engine-webxr.DQA26K-l.js","./materialx.CnHmG--Y.js","./rolldown-runtime.CYVBeYYp.js","./three@0.169.19.js","./needle-engine-ui.BzyLX9fs.js","./gltf-progressive.BBJGcb3s.js","./three-examples@0.169.19.js","./three-mesh-ui.CgGzZ3ml.js","./needle-engine@5.0.3.js","./needle-engine.extras.t1Dx-yNB.js","./needle-engine-particles.Bw3zzNt3.js","./three-quarks.DALdLWPD.js","./needle-engine.extras.CDv9-f43.js","./postprocessing.Wy71DpiM.js","./three-mesh-bvh.B-oXEGo2.js","./needle-engine.V_YEpsUE.js"])))=>i.map(i=>d[i]);
|
||||
import{d as e}from"./materialx.CnHmG--Y.js";import{_t as t,fn as n,wi as r}from"./needle-engine-ui.BzyLX9fs.js";import"./needle-engine@5.0.3.js";import{x as i}from"./needle-engine-webxr.DQA26K-l.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),globalThis[`needle:dependencies:ready`]=e(()=>import(`./register_types.C910Zu9b.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url);var a=[];globalThis[`needle:codegen_files`]=a,a.push(`./assets/MenuScene.glb`),document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelector(`needle-engine`);e&&e.getAttribute(`src`)===null&&(e.setAttribute(`hash`,`1776630853539`),e.setAttribute(`src`,JSON.stringify(a)))}),console.log(`Made with ♥ by 🌵 Needle - https://needle.tools — Version 5.0.3`),r(e=>{let t=e.scene.getComponentInChildren(i);t||(t=e.scene.addComponent(i),t.createARButton=!0,t.createVRButton=!0),t.autoPlace=!0,t.autoCenter=!0,t.arScale=1});function o(e){document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0}):e()}function s(){let e=document.querySelector(`needle-engine`),r=document.querySelector(`#asset-picker-prev`),i=document.querySelector(`#asset-picker-next`),a=document.querySelector(`#asset-picker-ar`),s=document.querySelector(`#asset-picker-label`),c=document.querySelector(`#asset-picker-index`);if(!e||!r||!i||!a||!s||!c)return;let l=null,u=!1,d=!1,f=!1,p=()=>{l&&l.getDishSlotCount()>0?(s.textContent=l.getPickerLabel(),c.textContent=``):l?(s.textContent=`Menu (assign dishes in Unity)`,c.textContent=``):(s.textContent=`Menu scene`,c.textContent=`—`);let e=l!==null&&l.getDishSlotCount()>1;r.disabled=!e,i.disabled=!e,a.disabled=!d||f||u},m=async()=>{try{let n=await e.getContext();l=t(MenuController,n)}catch{l=null}p()};n.isARSupported().then(e=>{d=e,p()});let h=e=>{!l||l.getDishSlotCount()<=1||(e<0?l.selectPreviousDish():l.selectNextDish(),p())},g=async()=>{if(!(!d||f||u)){f=!0,p();try{let t=await e.getContext();await n.start(`immersive-ar`,void 0,t)}catch(e){console.warn(`[assetPicker] Failed to start AR session:`,e)}finally{f=!1,p()}}};r.addEventListener(`click`,()=>h(-1)),i.addEventListener(`click`,()=>h(1)),a.addEventListener(`click`,()=>void g()),e.addEventListener(`enter-ar`,()=>{u=!0,p()}),e.addEventListener(`exit-ar`,()=>{u=!1,p()}),e.addEventListener(`enter-vr`,()=>{u=!0,p()}),e.addEventListener(`exit-vr`,()=>{u=!1,p()}),e.addEventListener(`loadfinished`,()=>void m()),o(()=>{requestAnimationFrame(()=>void m())})}s(),e(()=>import(`./needle-engine.V_YEpsUE.js`),__vite__mapDeps([16,10,2,3,4,1,5,6,7,8,11,12,13,14,9,15]),import.meta.url);
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./register_types.JDIhnf6T.js","./needle-engine-webxr.DDCPc9_g.js","./materialx.CnHmG--Y.js","./rolldown-runtime.CYVBeYYp.js","./three@0.169.19.js","./needle-engine-ui.iRWmt52F.js","./gltf-progressive.BBJGcb3s.js","./three-examples@0.169.19.js","./three-mesh-ui.CgGzZ3ml.js","./needle-engine@5.0.3.js","./needle-engine.extras.D0CNgtSQ.js","./needle-engine-particles.B21Zru40.js","./three-quarks.DALdLWPD.js","./needle-engine.extras.D-PG1GOa.js","./postprocessing.Wy71DpiM.js","./three-mesh-bvh.B-oXEGo2.js","./needle-engine.Bq13_677.js"])))=>i.map(i=>d[i]);
|
||||
import{d as e}from"./materialx.CnHmG--Y.js";import{_t as t,fn as n,wi as r}from"./needle-engine-ui.iRWmt52F.js";import"./needle-engine@5.0.3.js";import{x as i}from"./needle-engine-webxr.DDCPc9_g.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),globalThis[`needle:dependencies:ready`]=e(()=>import(`./register_types.JDIhnf6T.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url);var a=[];globalThis[`needle:codegen_files`]=a,a.push(`./assets/MenuScene.glb`),document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelector(`needle-engine`);e&&e.getAttribute(`src`)===null&&(e.setAttribute(`hash`,`1776632064266`),e.setAttribute(`src`,JSON.stringify(a)))}),console.log(`Made with ♥ by 🌵 Needle - https://needle.tools — Version 5.0.3`),r(e=>{let t=e.scene.getComponentInChildren(i);t||(t=e.scene.addComponent(i),t.createARButton=!0,t.createVRButton=!0),t.autoPlace=!0,t.autoCenter=!0,t.arScale=1});function o(e){document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0}):e()}function s(){let e=document.querySelector(`needle-engine`),r=document.querySelector(`#asset-picker-prev`),i=document.querySelector(`#asset-picker-next`),a=document.querySelector(`#asset-picker-ar`),s=document.querySelector(`#asset-picker-label`),c=document.querySelector(`#asset-picker-index`);if(!e||!r||!i||!a||!s||!c)return;let l=null,u=!1,d=!1,f=!1,p=()=>{l&&l.getDishSlotCount()>0?(s.textContent=l.getPickerLabel(),c.textContent=``):l?(s.textContent=`Menu (assign dishes in Unity)`,c.textContent=``):(s.textContent=`Menu scene`,c.textContent=`—`);let e=l!==null&&l.getDishSlotCount()>1;r.disabled=!e,i.disabled=!e,a.disabled=!d||f||u},m=async()=>{try{let n=await e.getContext();l=t(MenuController,n)}catch{l=null}p()};n.isARSupported().then(e=>{d=e,p()});let h=e=>{!l||l.getDishSlotCount()<=1||(e<0?l.selectPreviousDish():l.selectNextDish(),p())},g=async()=>{if(!(!d||f||u)){f=!0,p();try{let t=await e.getContext();await n.start(`immersive-ar`,void 0,t)}catch(e){console.warn(`[assetPicker] Failed to start AR session:`,e)}finally{f=!1,p()}}};r.addEventListener(`click`,()=>h(-1)),i.addEventListener(`click`,()=>h(1)),a.addEventListener(`click`,()=>void g()),e.addEventListener(`enter-ar`,()=>{u=!0,p()}),e.addEventListener(`exit-ar`,()=>{u=!1,p()}),e.addEventListener(`enter-vr`,()=>{u=!0,p()}),e.addEventListener(`exit-vr`,()=>{u=!1,p()}),e.addEventListener(`loadfinished`,()=>void m()),o(()=>{requestAnimationFrame(()=>void m())})}s(),e(()=>import(`./needle-engine.Bq13_677.js`),__vite__mapDeps([16,10,2,3,4,1,5,6,7,8,11,12,13,14,9,15]),import.meta.url);
|
||||
BIN
Needle/MenuScene/dist/assets/index-C4yn7lK8.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/index-C4yn7lK8.js.gz
vendored
Normal file
Binary file not shown.
BIN
Needle/MenuScene/dist/assets/index-CkG2vTVa.js.gz
vendored
BIN
Needle/MenuScene/dist/assets/index-CkG2vTVa.js.gz
vendored
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/MenuScene/dist/assets/needle-engine-particles.B21Zru40.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/needle-engine-particles.B21Zru40.js.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/MenuScene/dist/assets/needle-engine-ui.iRWmt52F.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/needle-engine-ui.iRWmt52F.js.gz
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/MenuScene/dist/assets/needle-engine-webxr.DDCPc9_g.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/needle-engine-webxr.DDCPc9_g.js.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/MenuScene/dist/assets/needle-engine.Bq13_677.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/needle-engine.Bq13_677.js.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/MenuScene/dist/assets/needle-engine.extras.D-PG1GOa.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/needle-engine.extras.D-PG1GOa.js.gz
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/MenuScene/dist/assets/needle-engine.extras.D0CNgtSQ.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/needle-engine.extras.D0CNgtSQ.js.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
import{n as e}from"./rolldown-runtime.CYVBeYYp.js";import{A as t,Ar as n,Bt as r,F as i,Fr as a,Ft as o,Nt as s,On as c,Rr as l,S as u,St as ee,Xt as te,Zt as ne,_ as re,c as ie,fn as d,gn as f,gr as ae,hn as oe,in as se,tt as ce,wn as le,x as p}from"./three@0.169.19.js";import{$ as ue,$a as de,$i as fe,A as pe,Br as me,C as he,Ci as ge,Cn as _e,D as ve,Da as ye,Di as be,Dn as xe,Dt as Se,E as Ce,En as we,G as Te,Gi as Ee,Gr as De,Gt as Oe,H as m,Hn as ke,Ho as Ae,Ii as je,J as Me,Ja as Ne,Ji as Pe,Jr as Fe,Ka as h,Kr as Ie,L as Le,La as Re,Lr as ze,M as Be,Mi as Ve,Na as He,O as Ue,Oi as We,On as Ge,Ot as Ke,P as qe,Pi as Je,Pn as Ye,Q as Xe,Qi as Ze,Ro as Qe,S as $e,Si as et,T as tt,Ti as nt,Tn as rt,Tt as it,Ua as g,Uo as at,Ut as ot,V as st,Vn as ct,Wi as lt,Wo as ut,X as _,Xa as dt,Xr as ft,Y as pt,Yr as mt,Z as ht,_ as gt,_a as v,_n as _t,a as vt,ai as yt,b as bt,ba as y,bi as xt,co as b,ct as x,d as St,dn as S,eo as C,f as Ct,fn as wt,g as Tt,gi as Et,gr as w,h as Dt,ht as Ot,i as kt,j as At,ja as jt,ji as Mt,jo as Nt,jt as Pt,k as Ft,kn as It,l as Lt,n as Rt,na as zt,o as Bt,ot as Vt,p as Ht,q as Ut,qr as T,r as Wt,ra as E,s as Gt,st as Kt,t as qt,ti as D,u as Jt,un as O,v as Yt,va as k,vi as Xt,w as Zt,wi as Qt,wn as $t,x as en,xi as tn,y as nn,yi as rn,za as an}from"./needle-engine-ui.BzyLX9fs.js";import{A,d as on,j as sn,n as cn,t as ln}from"./three-examples@0.169.19.js";import{$ as un,A as dn,B as fn,Bt as pn,C as mn,Ct as hn,D as gn,Dt as _n,E as vn,Et as yn,F as bn,G as xn,Gt as Sn,H as Cn,I as wn,It as Tn,J as En,Jt as Dn,K as On,Kt as kn,L as An,Nt as jn,O as Mn,Ot as Nn,P as Pn,Q as Fn,Qt as In,R as Ln,Rt as Rn,S as zn,St as Bn,T as Vn,U as Hn,Ut as Un,V as Wn,Vt as Gn,W as Kn,Wt as qn,X as Jn,Xt as Yn,Y as Xn,Z as Zn,Zt as Qn,_ as $n,_t as er,a as tr,at as nr,b as rr,bt as ir,cn as ar,d as or,et as sr,f as cr,fn as lr,g as ur,h as dr,i as fr,it as pr,k as mr,kt as hr,ln as gr,m as _r,mn as vr,n as yr,nt as br,o as xr,ot as Sr,p as Cr,pn as wr,q as Tr,qt as Er,r as Dr,rt as Or,sn as kr,t as Ar,tt as jr,v as Mr,vt as Nr,w as Pr,wt as Fr,x as Ir,xt as Lr,y as Rr,yt as zr,z as Br,zt as Vr}from"./needle-engine-webxr.DQA26K-l.js";import{A as Hr,B as Ur,C as Wr,Ct as Gr,D as Kr,E as qr,Et as Jr,F as Yr,G as Xr,H as Zr,I as Qr,K as $r,L as ei,M as ti,Mt as ni,N as ri,Nt as ii,O as ai,P as oi,Q as si,R as ci,S as li,St as ui,T as di,Tt as fi,U as pi,V as mi,W as hi,X as gi,_ as _i,_t as vi,a as yi,at as bi,b as xi,bt as Si,c as Ci,ct as wi,d as Ti,dt as Ei,f as Di,ft as Oi,g as ki,gt as Ai,h as ji,ht as Mi,i as Ni,it as Pi,j as Fi,jt as Ii,k as Li,l as Ri,lt as zi,m as Bi,mt as Vi,n as Hi,nt as Ui,o as Wi,ot as Gi,p as Ki,pt as qi,q as Ji,r as Yi,s as Xi,st as Zi,t as Qi,u as $i,ut as ea,v as ta,vt as na,w as ra,wt as ia,x as aa,xt as oa,y as sa,yt as ca,z as la}from"./needle-engine.extras.t1Dx-yNB.js";import{C as ua,D as da,E as fa,S as pa,T as ma,a as ha,b as ga,c as _a,d as va,f as ya,g as ba,h as xa,i as Sa,l as Ca,m as wa,o as Ta,p as Ea,r as Da,s as Oa,t as ka,u as Aa,v as ja,w as Ma,x as Na,y as Pa}from"./needle-engine-particles.Bw3zzNt3.js";import{a as Fa,c as Ia,d as La,f as Ra,g as za,h as Ba,i as Va,l as Ha,m as Ua,n as Wa,o as Ga,p as Ka,r as qa,s as Ja,t as Ya,u as Xa,y as Za}from"./needle-engine.extras.CDv9-f43.js";import{a as Qa,t as $a}from"./three-mesh-bvh.B-oXEGo2.js";var j=void 0,M=null,N=null,P=!1,eo=null,to=`terminal`;b(`console`)&&ro();var no=Symbol(`consoleParent`);function ro(){if(j){j.showSwitch();return}uo()}function io(){j&&(j.hide(),j.hideSwitch())}function ao(){eo||=setInterval(so,500)}var oo=0;function so(){let e=dt(),t=e!==oo;oo=e,t&&co()}function co(){ro(),N&&(N.setAttribute(`error`,`true`),N.innerText=`🤬`)}function lo(){N&&(N.removeAttribute(`error`),N.innerText=to)}function uo(e=!1){if(j!==void 0||P)return;P=!0;let t=document.createElement(`script`);t.onload=()=>{if(!globalThis.VConsole){console.warn(`🌵 Debug console failed to load.`),P=!1,j=null;return}P=!1,ao(),j=new VConsole({pluginOrder:[`default`,`needle-console`]});let t=globalThis[`needle:codegen_files`];if(t&&t.length>0&&j.addPlugin(fo()),j.addPlugin(bo()),j.addPlugin(xo()),M=No(),M&&(M[no]=M.parentElement,M.style.position=`absolute`,M.style.zIndex=(2**53-1).toString()),j.setSwitchPosition(20,30),N=Mo(),N){N.innerText=to,N.addEventListener(`click`,lo);let t=document.createElement(`style`);t.innerHTML=`
|
||||
import{n as e}from"./rolldown-runtime.CYVBeYYp.js";import{A as t,Ar as n,Bt as r,F as i,Fr as a,Ft as o,Nt as s,On as c,Rr as l,S as u,St as ee,Xt as te,Zt as ne,_ as re,c as ie,fn as d,gn as f,gr as ae,hn as oe,in as se,tt as ce,wn as le,x as p}from"./three@0.169.19.js";import{$ as ue,$a as de,$i as fe,A as pe,Br as me,C as he,Ci as ge,Cn as _e,D as ve,Da as ye,Di as be,Dn as xe,Dt as Se,E as Ce,En as we,G as Te,Gi as Ee,Gr as De,Gt as Oe,H as m,Hn as ke,Ho as Ae,Ii as je,J as Me,Ja as Ne,Ji as Pe,Jr as Fe,Ka as h,Kr as Ie,L as Le,La as Re,Lr as ze,M as Be,Mi as Ve,Na as He,O as Ue,Oi as We,On as Ge,Ot as Ke,P as qe,Pi as Je,Pn as Ye,Q as Xe,Qi as Ze,Ro as Qe,S as $e,Si as et,T as tt,Ti as nt,Tn as rt,Tt as it,Ua as g,Uo as at,Ut as ot,V as st,Vn as ct,Wi as lt,Wo as ut,X as _,Xa as dt,Xr as ft,Y as pt,Yr as mt,Z as ht,_ as gt,_a as v,_n as _t,a as vt,ai as yt,b as bt,ba as y,bi as xt,co as b,ct as x,d as St,dn as S,eo as C,f as Ct,fn as wt,g as Tt,gi as Et,gr as w,h as Dt,ht as Ot,i as kt,j as At,ja as jt,ji as Mt,jo as Nt,jt as Pt,k as Ft,kn as It,l as Lt,n as Rt,na as zt,o as Bt,ot as Vt,p as Ht,q as Ut,qr as T,r as Wt,ra as E,s as Gt,st as Kt,t as qt,ti as D,u as Jt,un as O,v as Yt,va as k,vi as Xt,w as Zt,wi as Qt,wn as $t,x as en,xi as tn,y as nn,yi as rn,za as an}from"./needle-engine-ui.iRWmt52F.js";import{A,d as on,j as sn,n as cn,t as ln}from"./three-examples@0.169.19.js";import{$ as un,A as dn,B as fn,Bt as pn,C as mn,Ct as hn,D as gn,Dt as _n,E as vn,Et as yn,F as bn,G as xn,Gt as Sn,H as Cn,I as wn,It as Tn,J as En,Jt as Dn,K as On,Kt as kn,L as An,Nt as jn,O as Mn,Ot as Nn,P as Pn,Q as Fn,Qt as In,R as Ln,Rt as Rn,S as zn,St as Bn,T as Vn,U as Hn,Ut as Un,V as Wn,Vt as Gn,W as Kn,Wt as qn,X as Jn,Xt as Yn,Y as Xn,Z as Zn,Zt as Qn,_ as $n,_t as er,a as tr,at as nr,b as rr,bt as ir,cn as ar,d as or,et as sr,f as cr,fn as lr,g as ur,h as dr,i as fr,it as pr,k as mr,kt as hr,ln as gr,m as _r,mn as vr,n as yr,nt as br,o as xr,ot as Sr,p as Cr,pn as wr,q as Tr,qt as Er,r as Dr,rt as Or,sn as kr,t as Ar,tt as jr,v as Mr,vt as Nr,w as Pr,wt as Fr,x as Ir,xt as Lr,y as Rr,yt as zr,z as Br,zt as Vr}from"./needle-engine-webxr.DDCPc9_g.js";import{A as Hr,B as Ur,C as Wr,Ct as Gr,D as Kr,E as qr,Et as Jr,F as Yr,G as Xr,H as Zr,I as Qr,K as $r,L as ei,M as ti,Mt as ni,N as ri,Nt as ii,O as ai,P as oi,Q as si,R as ci,S as li,St as ui,T as di,Tt as fi,U as pi,V as mi,W as hi,X as gi,_ as _i,_t as vi,a as yi,at as bi,b as xi,bt as Si,c as Ci,ct as wi,d as Ti,dt as Ei,f as Di,ft as Oi,g as ki,gt as Ai,h as ji,ht as Mi,i as Ni,it as Pi,j as Fi,jt as Ii,k as Li,l as Ri,lt as zi,m as Bi,mt as Vi,n as Hi,nt as Ui,o as Wi,ot as Gi,p as Ki,pt as qi,q as Ji,r as Yi,s as Xi,st as Zi,t as Qi,u as $i,ut as ea,v as ta,vt as na,w as ra,wt as ia,x as aa,xt as oa,y as sa,yt as ca,z as la}from"./needle-engine.extras.D0CNgtSQ.js";import{C as ua,D as da,E as fa,S as pa,T as ma,a as ha,b as ga,c as _a,d as va,f as ya,g as ba,h as xa,i as Sa,l as Ca,m as wa,o as Ta,p as Ea,r as Da,s as Oa,t as ka,u as Aa,v as ja,w as Ma,x as Na,y as Pa}from"./needle-engine-particles.B21Zru40.js";import{a as Fa,c as Ia,d as La,f as Ra,g as za,h as Ba,i as Va,l as Ha,m as Ua,n as Wa,o as Ga,p as Ka,r as qa,s as Ja,t as Ya,u as Xa,y as Za}from"./needle-engine.extras.D-PG1GOa.js";import{a as Qa,t as $a}from"./three-mesh-bvh.B-oXEGo2.js";var j=void 0,M=null,N=null,P=!1,eo=null,to=`terminal`;b(`console`)&&ro();var no=Symbol(`consoleParent`);function ro(){if(j){j.showSwitch();return}uo()}function io(){j&&(j.hide(),j.hideSwitch())}function ao(){eo||=setInterval(so,500)}var oo=0;function so(){let e=dt(),t=e!==oo;oo=e,t&&co()}function co(){ro(),N&&(N.setAttribute(`error`,`true`),N.innerText=`🤬`)}function lo(){N&&(N.removeAttribute(`error`),N.innerText=to)}function uo(e=!1){if(j!==void 0||P)return;P=!0;let t=document.createElement(`script`);t.onload=()=>{if(!globalThis.VConsole){console.warn(`🌵 Debug console failed to load.`),P=!1,j=null;return}P=!1,ao(),j=new VConsole({pluginOrder:[`default`,`needle-console`]});let t=globalThis[`needle:codegen_files`];if(t&&t.length>0&&j.addPlugin(fo()),j.addPlugin(bo()),j.addPlugin(xo()),M=No(),M&&(M[no]=M.parentElement,M.style.position=`absolute`,M.style.zIndex=(2**53-1).toString()),j.setSwitchPosition(20,30),N=Mo(),N){N.innerText=to,N.addEventListener(`click`,lo);let t=document.createElement(`style`);t.innerHTML=`
|
||||
#__vconsole .vc-switch {
|
||||
border: 1px solid rgba(255, 255, 255, .1);
|
||||
border-radius: 50%;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
import{Ar as e,Kn as t,_n as n,fn as r,kr as i}from"./three@0.169.19.js";import{$i as a,Xi as o,ct as s,eo as c,ot as l}from"./needle-engine-ui.BzyLX9fs.js";import"./needle-engine@5.0.3.js";import{m as u}from"./needle-engine-webxr.DQA26K-l.js";import{m as d,t as f}from"./needle-engine.extras.CDv9-f43.js";var p=class extends l{raycaster=new t;touchPos=new i;plane=new n(new e(0,1,0),0);initialPinchDistance=0;initialScale=new e;isScaling=!1;onEnable(){let e=this.context.renderer.domElement;e.addEventListener(`touchstart`,this.onTouchStart),e.addEventListener(`touchmove`,this.onTouchMove),e.addEventListener(`touchend`,this.onTouchEnd)}onDisable(){let e=this.context.renderer.domElement;e.removeEventListener(`touchstart`,this.onTouchStart),e.removeEventListener(`touchmove`,this.onTouchMove),e.removeEventListener(`touchend`,this.onTouchEnd)}onTouchStart=e=>{if(e.touches.length===2){this.isScaling=!0;let t=e.touches[0],n=e.touches[1];this.initialPinchDistance=Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY),this.initialScale.copy(this.gameObject.scale)}};onTouchMove=t=>{if(t.preventDefault(),this.isScaling&&t.touches.length===2){let e=t.touches[0],n=t.touches[1],r=Math.hypot(n.clientX-e.clientX,n.clientY-e.clientY)/this.initialPinchDistance,i=this.initialScale.clone().multiplyScalar(r);this.gameObject.scale.copy(i)}else if(t.touches.length===1&&!this.isScaling){let n=t.touches[0],r=this.context.renderer.domElement.getBoundingClientRect();this.touchPos.set((n.clientX-r.left)/r.width*2-1,-((n.clientY-r.top)/r.height)*2+1),this.raycaster.setFromCamera(this.touchPos,this.context.mainCamera);let i=new e;this.raycaster.ray.intersectPlane(this.plane,i)&&this.gameObject.position.copy(i)}};onTouchEnd=e=>{e.touches.length<2&&(this.isScaling=!1)}};function m(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var h=new WeakMap,g=class extends l{isMobile=!1;isDesktop=!1;isXR=!1;dishName=``;dishes=[];webXROrigin;dishBobAmplitude=.05;dishBobSpeed=2.5;usdzExporter;arSessionBobPaused=!1;selectedDishIndex=0;onEnable(){if(this.dishName=new URLSearchParams(window.location.search).get(`dishName`)??``,this.webXROrigin&&(this.usdzExporter=this.webXROrigin.getComponent(u)??void 0),this.dishName){let e=!1;this.dishes.forEach((t,n)=>{t&&t.name===this.dishName&&(this.selectedDishIndex=n,e=!0)}),this.dishes.forEach(t=>{if(!t)return;let n=e&&t.name===this.dishName;n||this.restoreDishBaseY(t),s.setActive(t,n)}),e||this.ensureOnlySelectedDishVisible()}else this.ensureOnlySelectedDishVisible();this.updateUSDZExporterTarget(),this.checkForDeviceType().then(()=>{this.isMobile?console.log(`[MenuController] isMobile`):this.isDesktop?this.setupDesktopControls():this.isXR}),this.setupMobileControls(),this.disableDoubleTapZoom()}onEnterXR(e){e.xr.mode===`immersive-ar`&&(this.arSessionBobPaused=!0,this.snapActiveDishToBaseY())}onLeaveXR(e){this.arSessionBobPaused=!1}update(){if(this.arSessionBobPaused||this.dishBobAmplitude<=0||this.getValidDishIndices().length===0)return;let e=this.dishes[this.selectedDishIndex];if(!e)return;let t=h.get(e);t===void 0&&(t=e.position.y,h.set(e,t));let n=this.context.time.time;e.position.y=t+Math.sin(n*this.dishBobSpeed)*this.dishBobAmplitude}async checkForDeviceType(){await this.isXRDevice()?this.isXR=!0:(console.log(`DeviceUtilities.isMobileDevice()`,c.isMobileDevice()),this.isMobile=c.isMobileDevice(),this.isMobile||(this.isDesktop=c.isDesktop()))}async isXRDevice(){if(navigator.xr)try{return await navigator.xr.isSessionSupported(`immersive-vr`)}catch{return console.log(`XR check error!`),!1}return!1}setupMobileControls(){typeof document<`u`&&document.querySelector(`#asset-picker`)||this.createMenuMobileControls()}setupDesktopControls(){}createMenuMobileControls(){let e=document.createElement(`div`);e.id=`menuControlsZone`,e.style.cssText=`
|
||||
import{Ar as e,Kn as t,_n as n,fn as r,kr as i}from"./three@0.169.19.js";import{$i as a,Xi as o,ct as s,eo as c,ot as l}from"./needle-engine-ui.iRWmt52F.js";import"./needle-engine@5.0.3.js";import{m as u}from"./needle-engine-webxr.DDCPc9_g.js";import{m as d,t as f}from"./needle-engine.extras.D-PG1GOa.js";var p=class extends l{raycaster=new t;touchPos=new i;plane=new n(new e(0,1,0),0);initialPinchDistance=0;initialScale=new e;isScaling=!1;onEnable(){let e=this.context.renderer.domElement;e.addEventListener(`touchstart`,this.onTouchStart),e.addEventListener(`touchmove`,this.onTouchMove),e.addEventListener(`touchend`,this.onTouchEnd)}onDisable(){let e=this.context.renderer.domElement;e.removeEventListener(`touchstart`,this.onTouchStart),e.removeEventListener(`touchmove`,this.onTouchMove),e.removeEventListener(`touchend`,this.onTouchEnd)}onTouchStart=e=>{if(e.touches.length===2){this.isScaling=!0;let t=e.touches[0],n=e.touches[1];this.initialPinchDistance=Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY),this.initialScale.copy(this.gameObject.scale)}};onTouchMove=t=>{if(t.preventDefault(),this.isScaling&&t.touches.length===2){let e=t.touches[0],n=t.touches[1],r=Math.hypot(n.clientX-e.clientX,n.clientY-e.clientY)/this.initialPinchDistance,i=this.initialScale.clone().multiplyScalar(r);this.gameObject.scale.copy(i)}else if(t.touches.length===1&&!this.isScaling){let n=t.touches[0],r=this.context.renderer.domElement.getBoundingClientRect();this.touchPos.set((n.clientX-r.left)/r.width*2-1,-((n.clientY-r.top)/r.height)*2+1),this.raycaster.setFromCamera(this.touchPos,this.context.mainCamera);let i=new e;this.raycaster.ray.intersectPlane(this.plane,i)&&this.gameObject.position.copy(i)}};onTouchEnd=e=>{e.touches.length<2&&(this.isScaling=!1)}};function m(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var h=new WeakMap,g=class extends l{isMobile=!1;isDesktop=!1;isXR=!1;dishName=``;dishes=[];webXROrigin;dishBobAmplitude=.05;dishBobSpeed=2.5;usdzExporter;arSessionBobPaused=!1;selectedDishIndex=0;onEnable(){if(this.dishName=new URLSearchParams(window.location.search).get(`dishName`)??``,this.webXROrigin&&(this.usdzExporter=this.webXROrigin.getComponent(u)??void 0),this.dishName){let e=!1;this.dishes.forEach((t,n)=>{t&&t.name===this.dishName&&(this.selectedDishIndex=n,e=!0)}),this.dishes.forEach(t=>{if(!t)return;let n=e&&t.name===this.dishName;n||this.restoreDishBaseY(t),s.setActive(t,n)}),e||this.ensureOnlySelectedDishVisible()}else this.ensureOnlySelectedDishVisible();this.updateUSDZExporterTarget(),this.checkForDeviceType().then(()=>{this.isMobile?console.log(`[MenuController] isMobile`):this.isDesktop?this.setupDesktopControls():this.isXR}),this.setupMobileControls(),this.disableDoubleTapZoom()}onEnterXR(e){e.xr.mode===`immersive-ar`&&(this.arSessionBobPaused=!0,this.snapActiveDishToBaseY())}onLeaveXR(e){this.arSessionBobPaused=!1}update(){if(this.arSessionBobPaused||this.dishBobAmplitude<=0||this.getValidDishIndices().length===0)return;let e=this.dishes[this.selectedDishIndex];if(!e)return;let t=h.get(e);t===void 0&&(t=e.position.y,h.set(e,t));let n=this.context.time.time;e.position.y=t+Math.sin(n*this.dishBobSpeed)*this.dishBobAmplitude}async checkForDeviceType(){await this.isXRDevice()?this.isXR=!0:(console.log(`DeviceUtilities.isMobileDevice()`,c.isMobileDevice()),this.isMobile=c.isMobileDevice(),this.isMobile||(this.isDesktop=c.isDesktop()))}async isXRDevice(){if(navigator.xr)try{return await navigator.xr.isSessionSupported(`immersive-vr`)}catch{return console.log(`XR check error!`),!1}return!1}setupMobileControls(){typeof document<`u`&&document.querySelector(`#asset-picker`)||this.createMenuMobileControls()}setupDesktopControls(){}createMenuMobileControls(){let e=document.createElement(`div`);e.id=`menuControlsZone`,e.style.cssText=`
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
BIN
Needle/MenuScene/dist/assets/register_types.JDIhnf6T.js.gz
vendored
Normal file
BIN
Needle/MenuScene/dist/assets/register_types.JDIhnf6T.js.gz
vendored
Normal file
Binary file not shown.
21
Needle/MenuScene/dist/index.html
vendored
21
Needle/MenuScene/dist/index.html
vendored
@@ -14,10 +14,15 @@
|
||||
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=block" crossorigin="" onload="this.rel='stylesheet'">
|
||||
<link rel="preload" fetchpriority="high" as="image" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTYwIDE4Ny43NCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4MT0iODkuNjQiIHkxPSIxODQuODEiIHgyPSI5MC40OCIgeTI9IjIxLjg1IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjNjJkMzk5Ii8+PHN0b3Agb2Zmc2V0PSIuNTEiIHN0b3AtY29sb3I9IiNhY2Q4NDIiLz48c3RvcCBvZmZzZXQ9Ii45IiBzdG9wLWNvbG9yPSIjZDdkYjBhIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiIHgxPSI2OS42OCIgeTE9IjE3OC45IiB4Mj0iNjguMDgiIHkyPSIxNi43NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzBiYTM5OCIvPjxzdG9wIG9mZnNldD0iLjUiIHN0b3AtY29sb3I9IiM0Y2EzNTIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM3NmEzMGEiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYyIgeDE9IjM2LjYiIHkxPSIxNTIuMTciIHgyPSIzNC43IiB5Mj0iODQuMTkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xOSIgc3RvcC1jb2xvcj0iIzM2YTM4MiIvPjxzdG9wIG9mZnNldD0iLjU0IiBzdG9wLWNvbG9yPSIjNDlhNDU5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNzZhMzBiIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIxNS44MiIgeTE9IjE1My4yNCIgeDI9IjE4IiB5Mj0iOTAuODYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMyNjc4ODAiLz48c3RvcCBvZmZzZXQ9Ii41MSIgc3RvcC1jb2xvcj0iIzQ1N2E1YyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzcxNzUxNiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJlIiB4MT0iMTM1LjA4IiB5MT0iMTM1LjQzIiB4Mj0iMTQ4LjkzIiB5Mj0iNjMuNDciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNiMGQ5MzkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNlYWRiMDQiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZiIgeDE9Ii00MTYzLjI1IiB5MT0iMjI4NS4xMiIgeDI9Ii00MTYwLjgxIiB5Mj0iMjIxNS4zNCIgZ3JhZGllbnRUcmFuc2Zvcm09InJvdGF0ZSgyMCA0MDg4LjQ5IDEzMzE2LjcxMikiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xNyIgc3RvcC1jb2xvcj0iIzc0YWY1MiIvPjxzdG9wIG9mZnNldD0iLjQ4IiBzdG9wLWNvbG9yPSIjOTliZTMyIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjYzBjNDBhIi8+PC9saW5lYXJHcmFkaWVudD48c3ltYm9sIGlkPSJnIiB2aWV3Qm94PSIwIDAgMTYwIDE4Ny43NCI+PHBhdGggc3R5bGU9ImZpbGw6dXJsKCNhKSIgZD0iTTc5LjMyIDM2Ljk4djE1MC43Nkw5NSAxNzQuNTRsNi41OS0xNTYuMzEtMjIuMjcgMTguNzV6Ii8+PHBhdGggc3R5bGU9ImZpbGw6dXJsKCNiKSIgZD0iTTc5LjMyIDM2Ljk4IDU3LjA1IDE4LjIzbDYuNTkgMTU2LjMxIDE1LjY4IDEzLjJWMzYuOTh6Ii8+PHBhdGggc3R5bGU9ImZpbGw6dXJsKCNjKSIgZD0ibTI1LjE5IDEwNC44MyA4LjYzIDQ5LjA0IDEyLjUtMTQuOTUtMi40Ni01Ni40Mi0xOC42NyAyMi4zM3oiLz48cGF0aCBzdHlsZT0iZmlsbDp1cmwoI2QpIiBkPSJNMjUuMTkgMTA0LjgzIDAgOTAuMjRsMTYuOTcgNTMuODYgMTYuODUgOS43Ny04LjYzLTQ5LjA0eiIvPjxwYXRoIHN0eWxlPSJmaWxsOiM5YzMiIGQ9Ik00My44NiA4Mi41IDE4LjY5IDY3Ljk4IDAgOTAuMjRsMjUuMTggMTQuNTlMNDMuODYgODIuNXoiLz48cGF0aCBzdHlsZT0iZmlsbDp1cmwoI2UpIiBkPSJtMTM0LjgyIDc4LjY5LTkuOTcgNTYuNSAxNS41OC05LjA0TDE2MCA2NC4xbC0yNS4xOCAxNC41OXoiLz48cGF0aCBzdHlsZT0iZmlsbDp1cmwoI2YpIiBkPSJtMTM0LjgyIDc4LjY5LTE4LjY4LTIyLjMzLTIuODYgNjUgMTEuNTcgMTMuODMgOS45Ny01Ni41eiIvPjxwYXRoIHN0eWxlPSJmaWxsOiNmZmUxMTMiIGQ9Im0xNjAgNjQuMS0xOC42OS0yMi4yNi0yNS4xNyAxNC41MiAxOC42NyAyMi4zM0wxNjAgNjQuMXoiLz48cGF0aCBzdHlsZT0iZmlsbDojZjNlNjAwIiBkPSJNMTAxLjU5IDE4LjIzIDc5LjMyIDAgNTcuMDUgMTguMjNsMjIuMjcgMTguNzUgMjIuMjctMTguNzV6Ii8+PC9zeW1ib2w+PC9kZWZzPjx1c2Ugd2lkdGg9IjE2MCIgaGVpZ2h0PSIxODcuNzQiIHhsaW5rOmhyZWY9IiNnIi8+PC9zdmc+" type="image/svg+xml">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="https://localhost:3000/include/poster.webp">
|
||||
<meta name="og:image" content="https://localhost:3000/include/poster.webp">
|
||||
<meta name="og:image:width" content="1080">
|
||||
<meta name="og:image:height" content="1080">
|
||||
<meta name="og:title" content="Menu Scene">
|
||||
<meta name="generator" content="Unity 6000.4.3f1, Needle Engine Integration @5.0.3">
|
||||
<meta name="needle-engine" content="5.0.3">
|
||||
<meta name="needle:buildtime" content="2026-04-19T20:37:35.867Z">
|
||||
<meta name="needle:buildtime" content="2026-04-19T20:57:04.006Z">
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="./assets/favicon.DtN_Fmav.ico">
|
||||
@@ -30,22 +35,22 @@
|
||||
<meta property="og:description" content="🌵 Made with Needle Engine" />
|
||||
|
||||
<meta name="robots" content="index,follow">
|
||||
<meta name="url" content="https://needle.tools">
|
||||
<meta name="url" content="https://localhost:3000">
|
||||
|
||||
<script type="module" crossorigin src="./assets/index-CkG2vTVa.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-C4yn7lK8.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime.CYVBeYYp.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three@0.169.19.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/materialx.CnHmG--Y.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-examples@0.169.19.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/gltf-progressive.BBJGcb3s.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-mesh-ui.CgGzZ3ml.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-ui.BzyLX9fs.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-webxr.DQA26K-l.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-ui.iRWmt52F.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-webxr.DDCPc9_g.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-quarks.DALdLWPD.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-particles.Bw3zzNt3.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-particles.B21Zru40.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/postprocessing.Wy71DpiM.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.CDv9-f43.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.t1Dx-yNB.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.D-PG1GOa.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.D0CNgtSQ.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-mesh-bvh.B-oXEGo2.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine@5.0.3.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/index.2XwOwFJz.css">
|
||||
|
||||
BIN
Needle/MenuScene/dist/index.html.gz
vendored
BIN
Needle/MenuScene/dist/index.html.gz
vendored
Binary file not shown.
2
Needle/MenuScene/dist/needle-app.js
vendored
2
Needle/MenuScene/dist/needle-app.js
vendored
@@ -53,7 +53,7 @@ if (!customElements.get(componentName)) {
|
||||
while(this.basePath.endsWith('/')) {
|
||||
this.basePath = this.basePath.slice(0, -1);
|
||||
}
|
||||
script.src = this.getAttribute('script-src') || `${this.basePath}/assets/index-CkG2vTVa.js`;
|
||||
script.src = this.getAttribute('script-src') || `${this.basePath}/assets/index-C4yn7lK8.js`;
|
||||
this.shadowRoot.appendChild(script);
|
||||
|
||||
this.needleEngine = document.createElement('needle-engine');
|
||||
|
||||
2
Needle/MenuScene/dist/needle.buildinfo.json
vendored
2
Needle/MenuScene/dist/needle.buildinfo.json
vendored
File diff suppressed because one or more lines are too long
@@ -11,7 +11,9 @@ export default defineConfig(async ({ command }) => {
|
||||
base: "./",
|
||||
plugins: [
|
||||
basicSsl(),
|
||||
useGzip(needleConfig) ? viteCompression({ ddeleteOriginalAssets: true, algorithms: ['gzip']}) : null,
|
||||
useGzip(needleConfig)
|
||||
? viteCompression({ deleteOriginalAssets: false, algorithms: ["gzip"] })
|
||||
: null,
|
||||
needlePlugins(command, needleConfig),
|
||||
],
|
||||
server: {
|
||||
|
||||
BIN
Needle/SampleScene/dist/assets/Box.glb
vendored
BIN
Needle/SampleScene/dist/assets/Box.glb
vendored
Binary file not shown.
BIN
Needle/SampleScene/dist/assets/Duck.glb
vendored
BIN
Needle/SampleScene/dist/assets/Duck.glb
vendored
Binary file not shown.
BIN
Needle/SampleScene/dist/assets/SampleScene.glb
vendored
BIN
Needle/SampleScene/dist/assets/SampleScene.glb
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./register_types.OB5V_DGw.js","./needle-engine-webxr.Cp-vkXLP.js","./materialx.CnHmG--Y.js","./rolldown-runtime.CYVBeYYp.js","./three@0.169.19.js","./needle-engine-ui.DC9_O2Mo.js","./gltf-progressive.U_EoiMHF.js","./three-examples@0.169.19.js","./three-mesh-ui.CgGzZ3ml.js","./three-examples.extras@0.169.19.js","./needle-engine@5.0.3.js","./needle-engine.extras.ChmId5tE.js","./needle-engine-particles.ByRryBGL.js","./three-quarks.DALdLWPD.js","./needle-engine.extras.X7Svjxj0.js","./postprocessing.Wy71DpiM.js","./three-mesh-bvh.B-oXEGo2.js","./needle-engine.BlkazeHq.js"])))=>i.map(i=>d[i]);
|
||||
import{d as e}from"./materialx.CnHmG--Y.js";import{_t as t,fn as n,wi as r}from"./needle-engine-ui.DC9_O2Mo.js";import"./needle-engine@5.0.3.js";import{x as i}from"./needle-engine-webxr.Cp-vkXLP.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),globalThis[`needle:dependencies:ready`]=e(()=>import(`./register_types.OB5V_DGw.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url);var a=[];globalThis[`needle:codegen_files`]=a,a.push(`./assets/SampleScene.glb`),document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelector(`needle-engine`);e&&e.getAttribute(`src`)===null&&(e.setAttribute(`hash`,`1776607707382`),e.setAttribute(`src`,JSON.stringify(a)))}),console.log(`Made with ♥ by 🌵 Needle - https://needle.tools — Version 5.0.3`),r(e=>{let t=e.scene.getComponentInChildren(i);t||(t=e.scene.addComponent(i),t.createARButton=!0,t.createVRButton=!0),t.autoPlace=!0,t.autoCenter=!0,t.arScale=1});function o(e){document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0}):e()}function s(){let e=document.querySelector(`needle-engine`),r=document.querySelector(`#asset-picker-prev`),i=document.querySelector(`#asset-picker-next`),a=document.querySelector(`#asset-picker-ar`),s=document.querySelector(`#asset-picker-label`),c=document.querySelector(`#asset-picker-index`);if(!e||!r||!i||!a||!s||!c)return;let l=null,u=!1,d=!1,f=!1,p=()=>{l&&l.getDishSlotCount()>0?(s.textContent=l.getPickerLabel(),c.textContent=``):l?(s.textContent=`Menu (assign dishes in Unity)`,c.textContent=``):(s.textContent=`Sample scene`,c.textContent=`—`);let e=l!==null&&l.getDishSlotCount()>1;r.disabled=!e,i.disabled=!e,a.disabled=!d||f||u},m=async()=>{try{let n=await e.getContext();l=t(MenuController,n)}catch{l=null}p()};n.isARSupported().then(e=>{d=e,p()});let h=e=>{!l||l.getDishSlotCount()<=1||(e<0?l.selectPreviousDish():l.selectNextDish(),p())},g=async()=>{if(!(!d||f||u)){f=!0,p();try{let t=await e.getContext();await n.start(`immersive-ar`,void 0,t)}catch(e){console.warn(`[assetPicker] Failed to start AR session:`,e)}finally{f=!1,p()}}};r.addEventListener(`click`,()=>h(-1)),i.addEventListener(`click`,()=>h(1)),a.addEventListener(`click`,()=>void g()),e.addEventListener(`enter-ar`,()=>{u=!0,p()}),e.addEventListener(`exit-ar`,()=>{u=!1,p()}),e.addEventListener(`enter-vr`,()=>{u=!0,p()}),e.addEventListener(`exit-vr`,()=>{u=!1,p()}),e.addEventListener(`loadfinished`,()=>void m()),o(()=>{requestAnimationFrame(()=>void m())})}s(),e(()=>import(`./needle-engine.BlkazeHq.js`),__vite__mapDeps([17,11,2,3,4,1,5,6,7,8,9,12,13,14,15,10,16]),import.meta.url);
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./register_types.e1J8KIxr.js","./needle-engine-webxr.XIy9opUR.js","./materialx.CnHmG--Y.js","./rolldown-runtime.CYVBeYYp.js","./three@0.169.19.js","./needle-engine-ui.B3WhUziG.js","./gltf-progressive.U_EoiMHF.js","./three-examples@0.169.19.js","./three-mesh-ui.CgGzZ3ml.js","./three-examples.extras@0.169.19.js","./needle-engine@5.0.3.js","./needle-engine.extras.BMGdeUIm.js","./needle-engine-particles.W2HGH_-A.js","./three-quarks.DALdLWPD.js","./needle-engine.extras.BWlo-D5V.js","./postprocessing.Wy71DpiM.js","./three-mesh-bvh.B-oXEGo2.js","./needle-engine.NdjW02WD.js"])))=>i.map(i=>d[i]);
|
||||
import{d as e}from"./materialx.CnHmG--Y.js";import{_t as t,fn as n,wi as r}from"./needle-engine-ui.B3WhUziG.js";import"./needle-engine@5.0.3.js";import{x as i}from"./needle-engine-webxr.XIy9opUR.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),globalThis[`needle:dependencies:ready`]=e(()=>import(`./register_types.e1J8KIxr.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url);var a=[];globalThis[`needle:codegen_files`]=a,a.push(`./assets/SampleScene.glb`),document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelector(`needle-engine`);e&&e.getAttribute(`src`)===null&&(e.setAttribute(`hash`,`1776607707382`),e.setAttribute(`src`,JSON.stringify(a)))}),console.log(`Made with ♥ by 🌵 Needle - https://needle.tools — Version 5.0.3`),r(e=>{let t=e.scene.getComponentInChildren(i);t||(t=e.scene.addComponent(i),t.createARButton=!0,t.createVRButton=!0),t.autoPlace=!0,t.autoCenter=!0,t.arScale=1});function o(e){document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0}):e()}function s(){let e=document.querySelector(`needle-engine`),r=document.querySelector(`#asset-picker-prev`),i=document.querySelector(`#asset-picker-next`),a=document.querySelector(`#asset-picker-ar`),s=document.querySelector(`#asset-picker-label`),c=document.querySelector(`#asset-picker-index`);if(!e||!r||!i||!a||!s||!c)return;let l=null,u=!1,d=!1,f=!1,p=()=>{l&&l.getDishSlotCount()>0?(s.textContent=l.getPickerLabel(),c.textContent=``):l?(s.textContent=`Menu (assign dishes in Unity)`,c.textContent=``):(s.textContent=`Sample scene`,c.textContent=`—`);let e=l!==null&&l.getDishSlotCount()>1;r.disabled=!e,i.disabled=!e,a.disabled=!d||f||u},m=async()=>{try{let n=await e.getContext();l=t(MenuController,n)}catch{l=null}p()};n.isARSupported().then(e=>{d=e,p()});let h=e=>{!l||l.getDishSlotCount()<=1||(e<0?l.selectPreviousDish():l.selectNextDish(),p())},g=async()=>{if(!(!d||f||u)){f=!0,p();try{let t=await e.getContext();await n.start(`immersive-ar`,void 0,t)}catch(e){console.warn(`[assetPicker] Failed to start AR session:`,e)}finally{f=!1,p()}}};r.addEventListener(`click`,()=>h(-1)),i.addEventListener(`click`,()=>h(1)),a.addEventListener(`click`,()=>void g()),e.addEventListener(`enter-ar`,()=>{u=!0,p()}),e.addEventListener(`exit-ar`,()=>{u=!1,p()}),e.addEventListener(`enter-vr`,()=>{u=!0,p()}),e.addEventListener(`exit-vr`,()=>{u=!1,p()}),e.addEventListener(`loadfinished`,()=>void m()),o(()=>{requestAnimationFrame(()=>void m())})}s(),e(()=>import(`./needle-engine.NdjW02WD.js`),__vite__mapDeps([17,11,2,3,4,1,5,6,7,8,9,12,13,14,15,10,16]),import.meta.url);
|
||||
BIN
Needle/SampleScene/dist/assets/index-CPvnPsNu.js.gz
vendored
Normal file
BIN
Needle/SampleScene/dist/assets/index-CPvnPsNu.js.gz
vendored
Normal file
Binary file not shown.
BIN
Needle/SampleScene/dist/assets/index-Dng8tdEB.js.gz
vendored
BIN
Needle/SampleScene/dist/assets/index-Dng8tdEB.js.gz
vendored
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/SampleScene/dist/assets/needle-engine-particles.W2HGH_-A.js.gz
vendored
Normal file
BIN
Needle/SampleScene/dist/assets/needle-engine-particles.W2HGH_-A.js.gz
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/SampleScene/dist/assets/needle-engine-ui.B3WhUziG.js.gz
vendored
Normal file
BIN
Needle/SampleScene/dist/assets/needle-engine-ui.B3WhUziG.js.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/SampleScene/dist/assets/needle-engine.NdjW02WD.js.gz
vendored
Normal file
BIN
Needle/SampleScene/dist/assets/needle-engine.NdjW02WD.js.gz
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/SampleScene/dist/assets/needle-engine.extras.BMGdeUIm.js.gz
vendored
Normal file
BIN
Needle/SampleScene/dist/assets/needle-engine.extras.BMGdeUIm.js.gz
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Needle/SampleScene/dist/assets/needle-engine.extras.BWlo-D5V.js.gz
vendored
Normal file
BIN
Needle/SampleScene/dist/assets/needle-engine.extras.BWlo-D5V.js.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
import{n as e}from"./rolldown-runtime.CYVBeYYp.js";import{A as t,Ar as n,Bt as r,F as i,Fr as a,Ft as o,Nt as s,On as c,Rr as l,S as u,St as ee,Xt as te,Zt as ne,_ as re,c as ie,fn as d,gn as f,gr as ae,hn as oe,in as se,tt as ce,wn as le,x as p}from"./three@0.169.19.js";import{$ as ue,$a as de,$i as fe,A as pe,Br as me,C as he,Ci as ge,Cn as _e,D as ve,Da as ye,Di as be,Dn as xe,Dt as Se,E as Ce,En as we,G as Te,Gi as Ee,Gr as De,Gt as Oe,H as m,Hn as ke,Ho as Ae,Ii as je,J as Me,Ja as Ne,Ji as Pe,Jr as Fe,Ka as h,Kr as Ie,L as Le,La as Re,Lr as ze,M as Be,Mi as Ve,Na as He,O as Ue,Oi as We,On as Ge,Ot as Ke,P as qe,Pi as Je,Pn as Ye,Q as Xe,Qi as Ze,Ro as Qe,S as $e,Si as et,T as tt,Ti as nt,Tn as rt,Tt as it,Ua as g,Uo as at,Ut as ot,V as st,Vn as ct,Wi as lt,Wo as ut,X as _,Xa as dt,Xr as ft,Y as pt,Yr as mt,Z as ht,_ as gt,_a as v,_n as _t,a as vt,ai as yt,b as bt,ba as y,bi as xt,co as b,ct as x,d as St,dn as S,eo as C,f as Ct,fn as wt,g as Tt,gi as Et,gr as w,h as Dt,ht as Ot,i as kt,j as At,ja as jt,ji as Mt,jo as Nt,jt as Pt,k as Ft,kn as It,l as Lt,n as Rt,na as zt,o as Bt,ot as Vt,p as Ht,q as Ut,qr as T,r as Wt,ra as E,s as Gt,st as Kt,t as qt,ti as D,u as Jt,un as O,v as Yt,va as k,vi as Xt,w as Zt,wi as Qt,wn as $t,x as en,xi as tn,y as nn,yi as rn,za as an}from"./needle-engine-ui.DC9_O2Mo.js";import{l as on}from"./three-examples.extras@0.169.19.js";import{C as sn,S as A,n as cn,t as ln}from"./three-examples@0.169.19.js";import{$ as un,A as dn,B as fn,Bt as pn,C as mn,Ct as hn,D as gn,Dt as _n,E as vn,Et as yn,F as bn,G as xn,Gt as Sn,H as Cn,I as wn,It as Tn,J as En,Jt as Dn,K as On,Kt as kn,L as An,Nt as jn,O as Mn,Ot as Nn,P as Pn,Q as Fn,Qt as In,R as Ln,Rt as Rn,S as zn,St as Bn,T as Vn,U as Hn,Ut as Un,V as Wn,Vt as Gn,W as Kn,Wt as qn,X as Jn,Xt as Yn,Y as Xn,Z as Zn,Zt as Qn,_ as $n,_t as er,a as tr,at as nr,b as rr,bt as ir,cn as ar,d as or,et as sr,f as cr,fn as lr,g as ur,h as dr,i as fr,it as pr,k as mr,kt as hr,ln as gr,m as _r,mn as vr,n as yr,nt as br,o as xr,ot as Sr,p as Cr,pn as wr,q as Tr,qt as Er,r as Dr,rt as Or,sn as kr,t as Ar,tt as jr,v as Mr,vt as Nr,w as Pr,wt as Fr,x as Ir,xt as Lr,y as Rr,yt as zr,z as Br,zt as Vr}from"./needle-engine-webxr.Cp-vkXLP.js";import{A as Hr,B as Ur,C as Wr,Ct as Gr,D as Kr,E as qr,Et as Jr,F as Yr,G as Xr,H as Zr,I as Qr,K as $r,L as ei,M as ti,Mt as ni,N as ri,Nt as ii,O as ai,P as oi,Q as si,R as ci,S as li,St as ui,T as di,Tt as fi,U as pi,V as mi,W as hi,X as gi,_ as _i,_t as vi,a as yi,at as bi,b as xi,bt as Si,c as Ci,ct as wi,d as Ti,dt as Ei,f as Di,ft as Oi,g as ki,gt as Ai,h as ji,ht as Mi,i as Ni,it as Pi,j as Fi,jt as Ii,k as Li,l as Ri,lt as zi,m as Bi,mt as Vi,n as Hi,nt as Ui,o as Wi,ot as Gi,p as Ki,pt as qi,q as Ji,r as Yi,s as Xi,st as Zi,t as Qi,u as $i,ut as ea,v as ta,vt as na,w as ra,wt as ia,x as aa,xt as oa,y as sa,yt as ca,z as la}from"./needle-engine.extras.ChmId5tE.js";import{C as ua,D as da,E as fa,S as pa,T as ma,a as ha,b as ga,c as _a,d as va,f as ya,g as ba,h as xa,i as Sa,l as Ca,m as wa,o as Ta,p as Ea,r as Da,s as Oa,t as ka,u as Aa,v as ja,w as Ma,x as Na,y as Pa}from"./needle-engine-particles.ByRryBGL.js";import{a as Fa,c as Ia,d as La,f as Ra,g as za,h as Ba,i as Va,l as Ha,m as Ua,n as Wa,o as Ga,p as Ka,r as qa,s as Ja,t as Ya,u as Xa,y as Za}from"./needle-engine.extras.X7Svjxj0.js";import{a as Qa,t as $a}from"./three-mesh-bvh.B-oXEGo2.js";var j=void 0,M=null,N=null,P=!1,eo=null,to=`terminal`;b(`console`)&&ro();var no=Symbol(`consoleParent`);function ro(){if(j){j.showSwitch();return}uo()}function io(){j&&(j.hide(),j.hideSwitch())}function ao(){eo||=setInterval(so,500)}var oo=0;function so(){let e=dt(),t=e!==oo;oo=e,t&&co()}function co(){ro(),N&&(N.setAttribute(`error`,`true`),N.innerText=`🤬`)}function lo(){N&&(N.removeAttribute(`error`),N.innerText=to)}function uo(e=!1){if(j!==void 0||P)return;P=!0;let t=document.createElement(`script`);t.onload=()=>{if(!globalThis.VConsole){console.warn(`🌵 Debug console failed to load.`),P=!1,j=null;return}P=!1,ao(),j=new VConsole({pluginOrder:[`default`,`needle-console`]});let t=globalThis[`needle:codegen_files`];if(t&&t.length>0&&j.addPlugin(fo()),j.addPlugin(bo()),j.addPlugin(xo()),M=No(),M&&(M[no]=M.parentElement,M.style.position=`absolute`,M.style.zIndex=(2**53-1).toString()),j.setSwitchPosition(20,30),N=Mo(),N){N.innerText=to,N.addEventListener(`click`,lo);let t=document.createElement(`style`);t.innerHTML=`
|
||||
import{n as e}from"./rolldown-runtime.CYVBeYYp.js";import{A as t,Ar as n,Bt as r,F as i,Fr as a,Ft as o,Nt as s,On as c,Rr as l,S as u,St as ee,Xt as te,Zt as ne,_ as re,c as ie,fn as d,gn as f,gr as ae,hn as oe,in as se,tt as ce,wn as le,x as p}from"./three@0.169.19.js";import{$ as ue,$a as de,$i as fe,A as pe,Br as me,C as he,Ci as ge,Cn as _e,D as ve,Da as ye,Di as be,Dn as xe,Dt as Se,E as Ce,En as we,G as Te,Gi as Ee,Gr as De,Gt as Oe,H as m,Hn as ke,Ho as Ae,Ii as je,J as Me,Ja as Ne,Ji as Pe,Jr as Fe,Ka as h,Kr as Ie,L as Le,La as Re,Lr as ze,M as Be,Mi as Ve,Na as He,O as Ue,Oi as We,On as Ge,Ot as Ke,P as qe,Pi as Je,Pn as Ye,Q as Xe,Qi as Ze,Ro as Qe,S as $e,Si as et,T as tt,Ti as nt,Tn as rt,Tt as it,Ua as g,Uo as at,Ut as ot,V as st,Vn as ct,Wi as lt,Wo as ut,X as _,Xa as dt,Xr as ft,Y as pt,Yr as mt,Z as ht,_ as gt,_a as v,_n as _t,a as vt,ai as yt,b as bt,ba as y,bi as xt,co as b,ct as x,d as St,dn as S,eo as C,f as Ct,fn as wt,g as Tt,gi as Et,gr as w,h as Dt,ht as Ot,i as kt,j as At,ja as jt,ji as Mt,jo as Nt,jt as Pt,k as Ft,kn as It,l as Lt,n as Rt,na as zt,o as Bt,ot as Vt,p as Ht,q as Ut,qr as T,r as Wt,ra as E,s as Gt,st as Kt,t as qt,ti as D,u as Jt,un as O,v as Yt,va as k,vi as Xt,w as Zt,wi as Qt,wn as $t,x as en,xi as tn,y as nn,yi as rn,za as an}from"./needle-engine-ui.B3WhUziG.js";import{l as on}from"./three-examples.extras@0.169.19.js";import{C as sn,S as A,n as cn,t as ln}from"./three-examples@0.169.19.js";import{$ as un,A as dn,B as fn,Bt as pn,C as mn,Ct as hn,D as gn,Dt as _n,E as vn,Et as yn,F as bn,G as xn,Gt as Sn,H as Cn,I as wn,It as Tn,J as En,Jt as Dn,K as On,Kt as kn,L as An,Nt as jn,O as Mn,Ot as Nn,P as Pn,Q as Fn,Qt as In,R as Ln,Rt as Rn,S as zn,St as Bn,T as Vn,U as Hn,Ut as Un,V as Wn,Vt as Gn,W as Kn,Wt as qn,X as Jn,Xt as Yn,Y as Xn,Z as Zn,Zt as Qn,_ as $n,_t as er,a as tr,at as nr,b as rr,bt as ir,cn as ar,d as or,et as sr,f as cr,fn as lr,g as ur,h as dr,i as fr,it as pr,k as mr,kt as hr,ln as gr,m as _r,mn as vr,n as yr,nt as br,o as xr,ot as Sr,p as Cr,pn as wr,q as Tr,qt as Er,r as Dr,rt as Or,sn as kr,t as Ar,tt as jr,v as Mr,vt as Nr,w as Pr,wt as Fr,x as Ir,xt as Lr,y as Rr,yt as zr,z as Br,zt as Vr}from"./needle-engine-webxr.XIy9opUR.js";import{A as Hr,B as Ur,C as Wr,Ct as Gr,D as Kr,E as qr,Et as Jr,F as Yr,G as Xr,H as Zr,I as Qr,K as $r,L as ei,M as ti,Mt as ni,N as ri,Nt as ii,O as ai,P as oi,Q as si,R as ci,S as li,St as ui,T as di,Tt as fi,U as pi,V as mi,W as hi,X as gi,_ as _i,_t as vi,a as yi,at as bi,b as xi,bt as Si,c as Ci,ct as wi,d as Ti,dt as Ei,f as Di,ft as Oi,g as ki,gt as Ai,h as ji,ht as Mi,i as Ni,it as Pi,j as Fi,jt as Ii,k as Li,l as Ri,lt as zi,m as Bi,mt as Vi,n as Hi,nt as Ui,o as Wi,ot as Gi,p as Ki,pt as qi,q as Ji,r as Yi,s as Xi,st as Zi,t as Qi,u as $i,ut as ea,v as ta,vt as na,w as ra,wt as ia,x as aa,xt as oa,y as sa,yt as ca,z as la}from"./needle-engine.extras.BMGdeUIm.js";import{C as ua,D as da,E as fa,S as pa,T as ma,a as ha,b as ga,c as _a,d as va,f as ya,g as ba,h as xa,i as Sa,l as Ca,m as wa,o as Ta,p as Ea,r as Da,s as Oa,t as ka,u as Aa,v as ja,w as Ma,x as Na,y as Pa}from"./needle-engine-particles.W2HGH_-A.js";import{a as Fa,c as Ia,d as La,f as Ra,g as za,h as Ba,i as Va,l as Ha,m as Ua,n as Wa,o as Ga,p as Ka,r as qa,s as Ja,t as Ya,u as Xa,y as Za}from"./needle-engine.extras.BWlo-D5V.js";import{a as Qa,t as $a}from"./three-mesh-bvh.B-oXEGo2.js";var j=void 0,M=null,N=null,P=!1,eo=null,to=`terminal`;b(`console`)&&ro();var no=Symbol(`consoleParent`);function ro(){if(j){j.showSwitch();return}uo()}function io(){j&&(j.hide(),j.hideSwitch())}function ao(){eo||=setInterval(so,500)}var oo=0;function so(){let e=dt(),t=e!==oo;oo=e,t&&co()}function co(){ro(),N&&(N.setAttribute(`error`,`true`),N.innerText=`🤬`)}function lo(){N&&(N.removeAttribute(`error`),N.innerText=to)}function uo(e=!1){if(j!==void 0||P)return;P=!0;let t=document.createElement(`script`);t.onload=()=>{if(!globalThis.VConsole){console.warn(`🌵 Debug console failed to load.`),P=!1,j=null;return}P=!1,ao(),j=new VConsole({pluginOrder:[`default`,`needle-console`]});let t=globalThis[`needle:codegen_files`];if(t&&t.length>0&&j.addPlugin(fo()),j.addPlugin(bo()),j.addPlugin(xo()),M=No(),M&&(M[no]=M.parentElement,M.style.position=`absolute`,M.style.zIndex=(2**53-1).toString()),j.setSwitchPosition(20,30),N=Mo(),N){N.innerText=to,N.addEventListener(`click`,lo);let t=document.createElement(`style`);t.innerHTML=`
|
||||
#__vconsole .vc-switch {
|
||||
border: 1px solid rgba(255, 255, 255, .1);
|
||||
border-radius: 50%;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
import{Ar as e,Kn as t,_n as n,fn as r,kr as i}from"./three@0.169.19.js";import{$i as a,Xi as o,ct as s,eo as c,ot as l}from"./needle-engine-ui.DC9_O2Mo.js";import"./needle-engine@5.0.3.js";import{m as u}from"./needle-engine-webxr.Cp-vkXLP.js";import{m as d,t as f}from"./needle-engine.extras.X7Svjxj0.js";var p=class extends l{raycaster=new t;touchPos=new i;plane=new n(new e(0,1,0),0);initialPinchDistance=0;initialScale=new e;isScaling=!1;onEnable(){let e=this.context.renderer.domElement;e.addEventListener(`touchstart`,this.onTouchStart),e.addEventListener(`touchmove`,this.onTouchMove),e.addEventListener(`touchend`,this.onTouchEnd)}onDisable(){let e=this.context.renderer.domElement;e.removeEventListener(`touchstart`,this.onTouchStart),e.removeEventListener(`touchmove`,this.onTouchMove),e.removeEventListener(`touchend`,this.onTouchEnd)}onTouchStart=e=>{if(e.touches.length===2){this.isScaling=!0;let t=e.touches[0],n=e.touches[1];this.initialPinchDistance=Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY),this.initialScale.copy(this.gameObject.scale)}};onTouchMove=t=>{if(t.preventDefault(),this.isScaling&&t.touches.length===2){let e=t.touches[0],n=t.touches[1],r=Math.hypot(n.clientX-e.clientX,n.clientY-e.clientY)/this.initialPinchDistance,i=this.initialScale.clone().multiplyScalar(r);this.gameObject.scale.copy(i)}else if(t.touches.length===1&&!this.isScaling){let n=t.touches[0],r=this.context.renderer.domElement.getBoundingClientRect();this.touchPos.set((n.clientX-r.left)/r.width*2-1,-((n.clientY-r.top)/r.height)*2+1),this.raycaster.setFromCamera(this.touchPos,this.context.mainCamera);let i=new e;this.raycaster.ray.intersectPlane(this.plane,i)&&this.gameObject.position.copy(i)}};onTouchEnd=e=>{e.touches.length<2&&(this.isScaling=!1)}};function m(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var h=new WeakMap,g=class extends l{isMobile=!1;isDesktop=!1;isXR=!1;dishName=``;dishes=[];webXROrigin;dishBobAmplitude=.05;dishBobSpeed=2.5;usdzExporter;arSessionBobPaused=!1;selectedDishIndex=0;onEnable(){if(this.dishName=new URLSearchParams(window.location.search).get(`dishName`)??``,this.webXROrigin&&(this.usdzExporter=this.webXROrigin.getComponent(u)??void 0),this.dishName){let e=!1;this.dishes.forEach((t,n)=>{t&&t.name===this.dishName&&(this.selectedDishIndex=n,e=!0)}),this.dishes.forEach(t=>{if(!t)return;let n=e&&t.name===this.dishName;n||this.restoreDishBaseY(t),s.setActive(t,n)}),e||this.ensureOnlySelectedDishVisible()}else this.ensureOnlySelectedDishVisible();this.updateUSDZExporterTarget(),this.checkForDeviceType().then(()=>{this.isMobile?console.log(`[MenuController] isMobile`):this.isDesktop?this.setupDesktopControls():this.isXR}),this.setupMobileControls(),this.disableDoubleTapZoom()}onEnterXR(e){e.xr.mode===`immersive-ar`&&(this.arSessionBobPaused=!0,this.snapActiveDishToBaseY())}onLeaveXR(e){this.arSessionBobPaused=!1}update(){if(this.arSessionBobPaused||this.dishBobAmplitude<=0||this.getValidDishIndices().length===0)return;let e=this.dishes[this.selectedDishIndex];if(!e)return;let t=h.get(e);t===void 0&&(t=e.position.y,h.set(e,t));let n=this.context.time.time;e.position.y=t+Math.sin(n*this.dishBobSpeed)*this.dishBobAmplitude}async checkForDeviceType(){await this.isXRDevice()?this.isXR=!0:(console.log(`DeviceUtilities.isMobileDevice()`,c.isMobileDevice()),this.isMobile=c.isMobileDevice(),this.isMobile||(this.isDesktop=c.isDesktop()))}async isXRDevice(){if(navigator.xr)try{return await navigator.xr.isSessionSupported(`immersive-vr`)}catch{return console.log(`XR check error!`),!1}return!1}setupMobileControls(){typeof document<`u`&&document.querySelector(`#asset-picker`)||this.createMenuMobileControls()}setupDesktopControls(){}createMenuMobileControls(){let e=document.createElement(`div`);e.id=`menuControlsZone`,e.style.cssText=`
|
||||
import{Ar as e,Kn as t,_n as n,fn as r,kr as i}from"./three@0.169.19.js";import{$i as a,Xi as o,ct as s,eo as c,ot as l}from"./needle-engine-ui.B3WhUziG.js";import"./needle-engine@5.0.3.js";import{m as u}from"./needle-engine-webxr.XIy9opUR.js";import{m as d,t as f}from"./needle-engine.extras.BWlo-D5V.js";var p=class extends l{raycaster=new t;touchPos=new i;plane=new n(new e(0,1,0),0);initialPinchDistance=0;initialScale=new e;isScaling=!1;onEnable(){let e=this.context.renderer.domElement;e.addEventListener(`touchstart`,this.onTouchStart),e.addEventListener(`touchmove`,this.onTouchMove),e.addEventListener(`touchend`,this.onTouchEnd)}onDisable(){let e=this.context.renderer.domElement;e.removeEventListener(`touchstart`,this.onTouchStart),e.removeEventListener(`touchmove`,this.onTouchMove),e.removeEventListener(`touchend`,this.onTouchEnd)}onTouchStart=e=>{if(e.touches.length===2){this.isScaling=!0;let t=e.touches[0],n=e.touches[1];this.initialPinchDistance=Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY),this.initialScale.copy(this.gameObject.scale)}};onTouchMove=t=>{if(t.preventDefault(),this.isScaling&&t.touches.length===2){let e=t.touches[0],n=t.touches[1],r=Math.hypot(n.clientX-e.clientX,n.clientY-e.clientY)/this.initialPinchDistance,i=this.initialScale.clone().multiplyScalar(r);this.gameObject.scale.copy(i)}else if(t.touches.length===1&&!this.isScaling){let n=t.touches[0],r=this.context.renderer.domElement.getBoundingClientRect();this.touchPos.set((n.clientX-r.left)/r.width*2-1,-((n.clientY-r.top)/r.height)*2+1),this.raycaster.setFromCamera(this.touchPos,this.context.mainCamera);let i=new e;this.raycaster.ray.intersectPlane(this.plane,i)&&this.gameObject.position.copy(i)}};onTouchEnd=e=>{e.touches.length<2&&(this.isScaling=!1)}};function m(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var h=new WeakMap,g=class extends l{isMobile=!1;isDesktop=!1;isXR=!1;dishName=``;dishes=[];webXROrigin;dishBobAmplitude=.05;dishBobSpeed=2.5;usdzExporter;arSessionBobPaused=!1;selectedDishIndex=0;onEnable(){if(this.dishName=new URLSearchParams(window.location.search).get(`dishName`)??``,this.webXROrigin&&(this.usdzExporter=this.webXROrigin.getComponent(u)??void 0),this.dishName){let e=!1;this.dishes.forEach((t,n)=>{t&&t.name===this.dishName&&(this.selectedDishIndex=n,e=!0)}),this.dishes.forEach(t=>{if(!t)return;let n=e&&t.name===this.dishName;n||this.restoreDishBaseY(t),s.setActive(t,n)}),e||this.ensureOnlySelectedDishVisible()}else this.ensureOnlySelectedDishVisible();this.updateUSDZExporterTarget(),this.checkForDeviceType().then(()=>{this.isMobile?console.log(`[MenuController] isMobile`):this.isDesktop?this.setupDesktopControls():this.isXR}),this.setupMobileControls(),this.disableDoubleTapZoom()}onEnterXR(e){e.xr.mode===`immersive-ar`&&(this.arSessionBobPaused=!0,this.snapActiveDishToBaseY())}onLeaveXR(e){this.arSessionBobPaused=!1}update(){if(this.arSessionBobPaused||this.dishBobAmplitude<=0||this.getValidDishIndices().length===0)return;let e=this.dishes[this.selectedDishIndex];if(!e)return;let t=h.get(e);t===void 0&&(t=e.position.y,h.set(e,t));let n=this.context.time.time;e.position.y=t+Math.sin(n*this.dishBobSpeed)*this.dishBobAmplitude}async checkForDeviceType(){await this.isXRDevice()?this.isXR=!0:(console.log(`DeviceUtilities.isMobileDevice()`,c.isMobileDevice()),this.isMobile=c.isMobileDevice(),this.isMobile||(this.isDesktop=c.isDesktop()))}async isXRDevice(){if(navigator.xr)try{return await navigator.xr.isSessionSupported(`immersive-vr`)}catch{return console.log(`XR check error!`),!1}return!1}setupMobileControls(){typeof document<`u`&&document.querySelector(`#asset-picker`)||this.createMenuMobileControls()}setupDesktopControls(){}createMenuMobileControls(){let e=document.createElement(`div`);e.id=`menuControlsZone`,e.style.cssText=`
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
BIN
Needle/SampleScene/dist/assets/register_types.e1J8KIxr.js.gz
vendored
Normal file
BIN
Needle/SampleScene/dist/assets/register_types.e1J8KIxr.js.gz
vendored
Normal file
Binary file not shown.
14
Needle/SampleScene/dist/index.html
vendored
14
Needle/SampleScene/dist/index.html
vendored
@@ -17,7 +17,7 @@
|
||||
<meta name="og:title" content="Sample Scene">
|
||||
<meta name="generator" content="Unity 6000.4.3f1, Needle Engine Integration @5.0.3">
|
||||
<meta name="needle-engine" content="5.0.3">
|
||||
<meta name="needle:buildtime" content="2026-04-19T20:37:52.316Z">
|
||||
<meta name="needle:buildtime" content="2026-04-19T20:57:33.127Z">
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="./assets/favicon.DtN_Fmav.ico">
|
||||
@@ -32,7 +32,7 @@
|
||||
<meta name="robots" content="index,follow">
|
||||
<meta name="url" content="https://localhost:3000">
|
||||
|
||||
<script type="module" crossorigin src="./assets/index-Dng8tdEB.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-CPvnPsNu.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime.CYVBeYYp.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three@0.169.19.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/materialx.CnHmG--Y.js">
|
||||
@@ -40,13 +40,13 @@
|
||||
<link rel="modulepreload" crossorigin href="./assets/gltf-progressive.U_EoiMHF.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-mesh-ui.CgGzZ3ml.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-examples.extras@0.169.19.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-ui.DC9_O2Mo.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-webxr.Cp-vkXLP.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-ui.B3WhUziG.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-webxr.XIy9opUR.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-quarks.DALdLWPD.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-particles.ByRryBGL.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine-particles.W2HGH_-A.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/postprocessing.Wy71DpiM.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.X7Svjxj0.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.ChmId5tE.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.BWlo-D5V.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine.extras.BMGdeUIm.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/three-mesh-bvh.B-oXEGo2.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/needle-engine@5.0.3.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/index.2XwOwFJz.css">
|
||||
|
||||
BIN
Needle/SampleScene/dist/index.html.gz
vendored
BIN
Needle/SampleScene/dist/index.html.gz
vendored
Binary file not shown.
2
Needle/SampleScene/dist/needle-app.js
vendored
2
Needle/SampleScene/dist/needle-app.js
vendored
@@ -53,7 +53,7 @@ if (!customElements.get(componentName)) {
|
||||
while(this.basePath.endsWith('/')) {
|
||||
this.basePath = this.basePath.slice(0, -1);
|
||||
}
|
||||
script.src = this.getAttribute('script-src') || `${this.basePath}/assets/index-Dng8tdEB.js`;
|
||||
script.src = this.getAttribute('script-src') || `${this.basePath}/assets/index-CPvnPsNu.js`;
|
||||
this.shadowRoot.appendChild(script);
|
||||
|
||||
this.needleEngine = document.createElement('needle-engine');
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -11,7 +11,9 @@ export default defineConfig(async ({ command }) => {
|
||||
base: "./",
|
||||
plugins: [
|
||||
basicSsl(),
|
||||
useGzip(needleConfig) ? viteCompression({ ddeleteOriginalAssets: true, algorithms: ['gzip']}) : null,
|
||||
useGzip(needleConfig)
|
||||
? viteCompression({ deleteOriginalAssets: false, algorithms: ["gzip"] })
|
||||
: null,
|
||||
needlePlugins(command, needleConfig),
|
||||
],
|
||||
server: {
|
||||
|
||||
Reference in New Issue
Block a user