@uptimizr/dashboard 0.1.0
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/LICENSE +201 -0
- package/README.md +76 -0
- package/out/404.html +1 -0
- package/out/__next.__PAGE__.txt +9 -0
- package/out/__next._full.txt +20 -0
- package/out/__next._head.txt +6 -0
- package/out/__next._index.txt +5 -0
- package/out/__next._tree.txt +4 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_buildManifest.js +11 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_clientMiddlewareManifest.js +1 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_ssgManifest.js +1 -0
- package/out/_next/static/chunks/0-2y-_oomza2l.js +87 -0
- package/out/_next/static/chunks/00k_j_r7bv_eb.js +266 -0
- package/out/_next/static/chunks/00zdau6mcqeae.js +1 -0
- package/out/_next/static/chunks/023axeoslq39i.js +1 -0
- package/out/_next/static/chunks/068j6934u8j16.js +1 -0
- package/out/_next/static/chunks/0_rf76jneiwal.js +176 -0
- package/out/_next/static/chunks/0aznt7717miff.js +1 -0
- package/out/_next/static/chunks/0cu-q5q3a7uf3.js +1 -0
- package/out/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/out/_next/static/chunks/0dm32-jq30tg8.js +1 -0
- package/out/_next/static/chunks/0dn0yx0rn6mpf.js +1 -0
- package/out/_next/static/chunks/0flc7nppbmsl1.js +3 -0
- package/out/_next/static/chunks/0fskcfh9vbhtv.js +1 -0
- package/out/_next/static/chunks/0gv7mblzv3dl3.js +87 -0
- package/out/_next/static/chunks/0impkpmxx3ttp.js +1 -0
- package/out/_next/static/chunks/0jmn7u31w95ly.js +91 -0
- package/out/_next/static/chunks/0n8n481szj90g.js +1 -0
- package/out/_next/static/chunks/0o6ayai0s01js.js +1 -0
- package/out/_next/static/chunks/0rys92_73hdb0.js +22 -0
- package/out/_next/static/chunks/0tl_moiyi2txt.js +1 -0
- package/out/_next/static/chunks/0tx1j_ghpz7rc.css +3 -0
- package/out/_next/static/chunks/0ufbyo1x3qkmo.js +1 -0
- package/out/_next/static/chunks/0v82oqyoy9zol.js +1 -0
- package/out/_next/static/chunks/0wrm9jr-9bw0e.js +1893 -0
- package/out/_next/static/chunks/0wwcfw8i3j_zx.js +1 -0
- package/out/_next/static/chunks/0ys9-ozuluawt.js +1 -0
- package/out/_next/static/chunks/1-61zh4waha61.js +1 -0
- package/out/_next/static/chunks/10r_824wzt8hj.js +1 -0
- package/out/_next/static/chunks/112hws17nz665.js +7 -0
- package/out/_next/static/chunks/123xxske5c9na.js +1 -0
- package/out/_next/static/chunks/13isnf0--pmx1.js +1 -0
- package/out/_next/static/chunks/157d9euci08yu.js +1 -0
- package/out/_next/static/chunks/15s7425ffrec9.js +3 -0
- package/out/_next/static/chunks/163fa70v4mgxj.js +1 -0
- package/out/_next/static/chunks/17q0c2h5ui10r.js +4 -0
- package/out/_next/static/chunks/18u58lorfahxi.js +4 -0
- package/out/_next/static/chunks/1_aahautsz2v_.js +1 -0
- package/out/_next/static/chunks/1a9l89j7e6mqu.js +23 -0
- package/out/_next/static/chunks/1dsy2ngmfflis.js +123 -0
- package/out/_next/static/chunks/1flb8adpj6_2o.js +62 -0
- package/out/_next/static/chunks/1lsg-22yob8dx.js +1 -0
- package/out/_next/static/chunks/1nj82er7msdto.js +2 -0
- package/out/_next/static/chunks/1o1d0p-v1z8ty.js +1 -0
- package/out/_next/static/chunks/1pdep2_c530sg.js +1 -0
- package/out/_next/static/chunks/1thjncpj7u6pq.js +1 -0
- package/out/_next/static/chunks/1vdjn0pkoyypn.js +1 -0
- package/out/_next/static/chunks/1yehxf-fmeicg.js +1 -0
- package/out/_next/static/chunks/1zvc1tv--w8nn.js +1 -0
- package/out/_next/static/chunks/1zx2q-r32thv1.js +4 -0
- package/out/_next/static/chunks/2-sjjedfr0kfq.js +1 -0
- package/out/_next/static/chunks/21o42k82w4llc.js +1 -0
- package/out/_next/static/chunks/25b9x-li-tvk2.js +1 -0
- package/out/_next/static/chunks/2712627rfsmwn.js +1 -0
- package/out/_next/static/chunks/296w2ke-v5tbm.js +9 -0
- package/out/_next/static/chunks/29tfeb6amdkjb.js +23 -0
- package/out/_next/static/chunks/2a3spdq-m8drh.js +3 -0
- package/out/_next/static/chunks/2aelw3far6rii.js +1 -0
- package/out/_next/static/chunks/2aor7m-wbis85.js +1 -0
- package/out/_next/static/chunks/2cbmf9m7lqv6k.js +4 -0
- package/out/_next/static/chunks/2d09v5u7dfq0q.js +1 -0
- package/out/_next/static/chunks/2feca0xcipcyt.js +850 -0
- package/out/_next/static/chunks/2fh-_9b6tqhvb.js +1 -0
- package/out/_next/static/chunks/2g5gecypj0rqe.js +1 -0
- package/out/_next/static/chunks/2kazjq29jeamx.js +1109 -0
- package/out/_next/static/chunks/2p2vv6cc9i-3q.js +255 -0
- package/out/_next/static/chunks/2szdcpl41-kzv.js +1 -0
- package/out/_next/static/chunks/2tws5udjdcmh3.js +1 -0
- package/out/_next/static/chunks/2u6shh3oeycm-.js +1 -0
- package/out/_next/static/chunks/2unhhuv0arlcv.js +1 -0
- package/out/_next/static/chunks/2xwy0-qfho1iz.js +91 -0
- package/out/_next/static/chunks/2ycvtdd68gub7.js +1 -0
- package/out/_next/static/chunks/2yiy_l8bwiw2_.js +3 -0
- package/out/_next/static/chunks/2yph6f7khgqii.js +1 -0
- package/out/_next/static/chunks/3-shckrcpvbxu.js +1681 -0
- package/out/_next/static/chunks/30fq_t9e2_fv-.js +1 -0
- package/out/_next/static/chunks/30yzu213bqtq0.js +5 -0
- package/out/_next/static/chunks/310uz81hnnzsu.js +1 -0
- package/out/_next/static/chunks/3218lp8l0a5g_.js +1 -0
- package/out/_next/static/chunks/35h5n42wxwgzk.js +123 -0
- package/out/_next/static/chunks/37vzwr3ciejf1.js +1 -0
- package/out/_next/static/chunks/38fhw7fatsyvd.js +3 -0
- package/out/_next/static/chunks/3be6s4_kn9q-o.js +1 -0
- package/out/_next/static/chunks/3i3gbhccmhu7j.js +210 -0
- package/out/_next/static/chunks/3l1dr_qm_x5kp.js +1 -0
- package/out/_next/static/chunks/3mqy-84_ul3t2.js +1 -0
- package/out/_next/static/chunks/3nz-dh9d7cehk.js +1 -0
- package/out/_next/static/chunks/3pufs8g4ui943.js +1 -0
- package/out/_next/static/chunks/3sjq_xoi4rbyg.js +31 -0
- package/out/_next/static/chunks/3t06schbtqonl.js +1 -0
- package/out/_next/static/chunks/3v3-7fio3nw_t.js +1 -0
- package/out/_next/static/chunks/3v5ha25nxo43j.js +1 -0
- package/out/_next/static/chunks/3yfrsm8lfi6ls.js +22 -0
- package/out/_next/static/chunks/3zskk1hxu3-_o.js +1 -0
- package/out/_next/static/chunks/turbopack-2ropzf0axp1x9.js +1 -0
- package/out/_next/static/media/0c89a48fa5027cee-s.p.2cyn07wtgehh0.woff2 +0 -0
- package/out/_next/static/media/13bf9871fe164e7f-s.2f7nqdagzwx2-.woff2 +0 -0
- package/out/_next/static/media/28868e710e86be81-s.2eksvhm1z0jwa.woff2 +0 -0
- package/out/_next/static/media/32687112bd2dd8db-s.1gepa_7fcx9fm.woff2 +0 -0
- package/out/_next/static/media/3fe682a82f50d426-s.0vfdmo25voy_0.woff2 +0 -0
- package/out/_next/static/media/70bc3e132a0a741e-s.p.3t6q91iet4nsy.woff2 +0 -0
- package/out/_next/static/media/71b036adf157cdcf-s.0bp8oijd_gu96.woff2 +0 -0
- package/out/_next/static/media/89b21bb081cb7469-s.1fby2rem9ngyr.woff2 +0 -0
- package/out/_next/static/media/cc545e633e20c56d-s.176arc174-8zp.woff2 +0 -0
- package/out/_next/static/media/icon.08h29dad3pcxg.svg +4 -0
- package/out/_not-found/__next._full.txt +16 -0
- package/out/_not-found/__next._head.txt +6 -0
- package/out/_not-found/__next._index.txt +5 -0
- package/out/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/out/_not-found/__next._not-found.txt +5 -0
- package/out/_not-found/__next._tree.txt +2 -0
- package/out/_not-found.html +1 -0
- package/out/_not-found.txt +16 -0
- package/out/api/projects +1 -0
- package/out/icon.svg +4 -0
- package/out/index.html +1 -0
- package/out/index.txt +20 -0
- package/out/logo.svg +46 -0
- package/package.json +67 -0
- package/server/standalone.mjs +182 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13379,e=>{"use strict";class t{static _CheckLimit(e,r){let s=t._LogLimitOutputs[e];return s?s.current++:(s={limit:r,current:1},t._LogLimitOutputs[e]=s),s.current<=s.limit}static _GenerateLimitMessage(e,r=1){let s=t._LogLimitOutputs[e];if(!s||!t.MessageLimitReached)return;let i=this._Levels[r];s.current===s.limit&&t[i.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+s.limit).replace(/%TYPE%/g,i.name??""))}static _AddLogEntry(e){t._LogCache=e+t._LogCache,t.OnNewCacheEntry&&t.OnNewCacheEntry(e)}static _FormatMessage(e){let t=e=>e<10?"0"+e:""+e,r=new Date;return"["+t(r.getHours())+":"+t(r.getMinutes())+":"+t(r.getSeconds())+"]: "+e}static _LogDisabled(e,t){}static _LogEnabled(e=1,r,s){let i=Array.isArray(r)?r[0]:r;if(void 0!==s&&!t._CheckLimit(i,s))return;let a=t._FormatMessage(i),n=this._Levels[e],o=Array.isArray(r)?r.slice(1):[];n.logFunc&&n.logFunc("BJS - "+a,...o);let l=`<div style='color:${n.color}'>${a}</div><br>`;t._AddLogEntry(l),t._GenerateLimitMessage(i,e)}static get LogCache(){return t._LogCache}static ClearLogCache(){t._LogCache="",t._LogLimitOutputs={},t.errorsCount=0}static set LogLevels(e){for(let r of(t.Log=t._LogDisabled,t.Warn=t._LogDisabled,t.Error=t._LogDisabled,[t.MessageLogLevel,t.WarningLogLevel,t.ErrorLogLevel]))(e&r)===r&&(t[this._Levels[r].name]=t._LogEnabled.bind(t,r))}}t.NoneLogLevel=0,t.MessageLogLevel=1,t.WarningLogLevel=2,t.ErrorLogLevel=4,t.AllLogLevel=7,t.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",t._LogCache="",t._LogLimitOutputs={},t._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],t.errorsCount=0,t.Log=t._LogEnabled.bind(t,t.MessageLogLevel),t.Warn=t._LogEnabled.bind(t,t.WarningLogLevel),t.Error=t._LogEnabled.bind(t,t.ErrorLogLevel),e.s(["Logger",0,t])},96704,e=>{"use strict";let t=null;function r(){if(t)return t;let e=new ArrayBuffer(4),r=new Float32Array(e),s=new Uint32Array(e),i=new Uint32Array(512),a=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-24?(i[e]=0,i[256|e]=32768,a[e]=24,a[256|e]=24):t<-14?(i[e]=1024>>-t-14,i[256|e]=1024>>-t-14|32768,a[e]=-t-1,a[256|e]=-t-1):t<=15?(i[e]=t+15<<10,i[256|e]=t+15<<10|32768,a[e]=13,a[256|e]=13):t<128?(i[e]=31744,i[256|e]=64512,a[e]=24,a[256|e]=24):(i[e]=31744,i[256|e]=64512,a[e]=13,a[256|e]=13)}let n=new Uint32Array(2048),o=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,r=0;for(;(8388608&t)==0;)t<<=1,r-=8388608;t&=-8388609,r+=0x38800000,n[e]=t|r}for(let e=1024;e<2048;++e)n[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=0x47800000,o[32]=0x80000000;for(let e=33;e<63;++e)o[e]=0x80000000+(e-32<<23);o[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return t={floatView:r,uint32View:s,baseTable:i,shiftTable:a,mantissaTable:n,exponentTable:o,offsetTable:l}}e.s(["FromHalfFloat",0,function(e){let t=r();return t.uint32View[0]=t.mantissaTable[t.offsetTable[e>>10]+(1023&e)]+t.exponentTable[e>>10],t.floatView[0]},"MaxHalfFloat",0,65504,"ToHalfFloat",0,function(e){let t=r();t.floatView[0]=e;let s=t.uint32View[0],i=s>>23&511;return t.baseTable[i]+((8388607&s)>>t.shiftTable[i])}])},64545,e=>{"use strict";e.s(["GetDOMTextContent",0,function(e){let t="",r=e.firstChild;for(;r;)3===r.nodeType&&(t+=r.textContent),r=r.nextSibling;return t},"IsDocumentAvailable",0,function(){return"u">typeof document},"IsNavigatorAvailable",0,function(){return"u">typeof navigator},"IsWindowObjectExist",0,function(){return"u">typeof window}])},65295,e=>{"use strict";class t{constructor(){this._xhr="u">typeof _native&&_native.XMLHttpRequest?new _native.XMLHttpRequest:new XMLHttpRequest,this._requestURL=""}static get IsCustomRequestAvailable(){return Object.keys(t.CustomRequestHeaders).length>0||t.CustomRequestModifiers.length>0}static _CleanUrl(e){return e=(e=e.replace("file:http:","http:")).replace("file:https:","https:")}static _ShouldSkipRequestModifications(e){return t.SkipRequestModificationForBabylonCDN&&(e.includes("preview.babylonjs.com")||e.includes("cdn.babylonjs.com"))}static _CollectCustomizations(e,r={}){let s={...r};if(t._ShouldSkipRequestModifications(e))return{url:e,headers:s};for(let e in t.CustomRequestHeaders){let r=t.CustomRequestHeaders[e];r&&(s[e]=r)}let i={setRequestHeader:(e,t)=>{s[e]=t}};for(let r of t.CustomRequestModifiers){if(t._ShouldSkipRequestModifications(e))break;let s=r(i,e);"string"==typeof s&&(e=s)}return{url:e,headers:s}}static async FetchAsync(e,r={}){let s=r.method??"GET";if("u">typeof fetch){let{url:i,headers:a}=t._CollectCustomizations(t._CleanUrl(e),r.headers??{});return await fetch(i,{method:s,headers:a,body:r.body??void 0})}return await new Promise((i,a)=>{let n=new t;n.responseType="arraybuffer",n.addEventListener("readystatechange",()=>{if(4===n.readyState)if(n.status>=200&&n.status<300){let e="u">typeof Headers?new Headers:void 0,t=n.getResponseHeader("Content-Type");t&&e&&e.set("Content-Type",t),"u">typeof Response?i(new Response(n.response,{status:n.status,statusText:n.statusText,headers:e})):i({ok:!0,status:n.status,statusText:n.statusText,headers:{get:e=>n.getResponseHeader(e)},arrayBuffer:async()=>await Promise.resolve(n.response)})}else a(Error(`HTTP ${n.status} loading '${n.requestURL}': ${n.statusText}`))}),n.open(s,e,r.headers),n.send(r.body??null)})}get requestURL(){return this._requestURL}get onprogress(){return this._xhr.onprogress}set onprogress(e){this._xhr.onprogress=e}get readyState(){return this._xhr.readyState}get status(){return this._xhr.status}get statusText(){return this._xhr.statusText}get response(){return this._xhr.response}get responseURL(){return this._xhr.responseURL}get responseText(){return this._xhr.responseText}get responseType(){return this._xhr.responseType}set responseType(e){this._xhr.responseType=e}get timeout(){return this._xhr.timeout}set timeout(e){this._xhr.timeout=e}addEventListener(e,t,r){this._xhr.addEventListener(e,t,r)}removeEventListener(e,t,r){this._xhr.removeEventListener(e,t,r)}abort(){this._xhr.abort()}send(e){this._xhr.send(e)}open(e,r,s){let{url:i,headers:a}=t._CollectCustomizations(r,s);for(let r in this._requestURL=t._CleanUrl(i),this._xhr.open(e,this._requestURL,!0),a)this._xhr.setRequestHeader(r,a[r])}setRequestHeader(e,t){this._xhr.setRequestHeader(e,t)}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}t.CustomRequestHeaders={},t.CustomRequestModifiers=[],t.SkipRequestModificationForBabylonCDN=!0,e.s(["WebRequest",0,t])},29822,6805,92605,49311,23240,e=>{"use strict";class t{}t.FilesToLoad={},e.s(["FilesInputStore",0,t],29822),e.s(["RetryStrategy",0,class{static ExponentialBackoff(e=3,t=500){return(r,s,i)=>0!==s.status||i>=e||-1!==r.indexOf("file:")?-1:Math.pow(2,i)*t}}],6805);class r extends Error{}r._setPrototypeOf=Object.setPrototypeOf||((e,t)=>(e.__proto__=t,e));class s extends r{constructor(e,t,i){super(e),this.errorCode=t,this.innerError=i,this.name="RuntimeError",r._setPrototypeOf(this,s.prototype)}}e.s(["BaseError",0,r,"ErrorCodes",0,{MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},"RuntimeError",0,s],92605);let i=e=>atob(e);e.s(["DecodeBase64ToBinary",0,e=>"function"==typeof Uint8Array.fromBase64?Uint8Array.fromBase64(e).buffer:function(e){let t=i(e),r=t.length,s=new Uint8Array(new ArrayBuffer(r));for(let e=0;e<r;e++)s[e]=t.charCodeAt(e);return s.buffer}(e),"DecodeBase64ToString",0,i,"EncodeArrayBufferToBase64",0,e=>{let t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);return"function"==typeof t.toBase64?t.toBase64():function(e){let t,r,s,i,a,n,o,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(;c<e.length;)t=e[c++],r=c<e.length?e[c++]:NaN,s=c<e.length?e[c++]:NaN,i=t>>2,a=(3&t)<<4|r>>4,n=(15&r)<<2|s>>6,o=63&s,isNaN(r)?n=o=64:isNaN(s)&&(o=64),u+=l.charAt(i)+l.charAt(a)+l.charAt(n)+l.charAt(o);return u}(t)}],49311);let a=[];function n(e,t,r){try{if(e())return t(),!0}catch(e){return r?.(e),!0}return!1}e.s(["TimingTools",0,class{static SetImmediate(e){0===a.length&&setTimeout(()=>{let e=a;for(let t of(a=[],e))t()},1),a.push(e)}},"_RetryWithInterval",0,(e,t,r,s=16,i=3e4,a=!0,o)=>{if(a&&n(e,t,r))return null;let l=setInterval(()=>{n(e,t,r)?clearInterval(l):(i-=s)<0&&(clearInterval(l),r?.(Error("Operation timed out after maximum retries. "+(o||"")),!0))},s);return()=>clearInterval(l)}],23240)},38118,e=>{"use strict";var t=e.i(13379),r=e.i(96704);function s(e){switch(e){case 5120:case 5121:return 1;case 5122:case 5123:case 5131:return 2;case 5124:case 5125:case 5126:return 4;default:throw Error(`Invalid type '${e}'`)}}function i(e,t,i,a,n,o,l,u){let c=Array(a),h=Array(a);if(e instanceof Array){let r=t/4,s=i/4;for(let t=0;t<o;t+=a){for(let t=0;t<a;t++)c[t]=h[t]=e[r+t];u(h,t);for(let t=0;t<a;t++)c[t]!==h[t]&&(e[r+t]=h[t]);r+=s}}else{let d=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),f=s(n);for(let e=0;e<o;e+=a){for(let e=0,s=t;e<a;e++,s+=f)c[e]=h[e]=function(e,t,s,i){switch(t){case 5120:{let t=e.getInt8(s);return i&&(t=Math.max(t/127,-1)),t}case 5121:{let t=e.getUint8(s);return i&&(t/=255),t}case 5122:{let t=e.getInt16(s,!0);return i&&(t=Math.max(t/32767,-1)),t}case 5123:{let t=e.getUint16(s,!0);return i&&(t/=65535),t}case 5131:return(0,r.FromHalfFloat)(e.getUint16(s,!0));case 5124:return e.getInt32(s,!0);case 5125:return e.getUint32(s,!0);case 5126:return e.getFloat32(s,!0);default:throw Error(`Invalid component type ${t}`)}}(d,n,s,l);u(h,e);for(let e=0,s=t;e<a;e++,s+=f)c[e]!==h[e]&&function(e,t,s,i,a){switch(t){case 5120:i&&(a=Math.round(127*a)),e.setInt8(s,a);break;case 5121:i&&(a=Math.round(255*a)),e.setUint8(s,a);break;case 5122:i&&(a=Math.round(32767*a)),e.setInt16(s,a,!0);break;case 5123:i&&(a=Math.round(65535*a)),e.setUint16(s,a,!0);break;case 5131:e.setUint16(s,(0,r.ToHalfFloat)(a),!0);break;case 5124:e.setInt32(s,a,!0);break;case 5125:e.setUint32(s,a,!0);break;case 5126:e.setFloat32(s,a,!0);break;default:throw Error(`Invalid component type ${t}`)}}(d,n,s,l,h[e]);t+=i}}}e.s(["CopyFloatData",0,function(e,r,a,n,o,l,u,c){let h=r*s(a),d=u*r;if(c.length!==d)throw Error("Output length is not valid");if(5126!==a||o!==h)return void i(e,n,o,r,a,d,l,(e,t)=>{for(let s=0;s<r;s++)c[t+s]=e[s]});if(e instanceof Array){let t=n/4;c.set(e,t)}else if(ArrayBuffer.isView(e)){let r=e.byteOffset+n;if((3&r)!=0){t.Logger.Warn("Float array must be aligned to 4-bytes border"),c.set(new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)));return}let s=new Float32Array(e.buffer,r,d);c.set(s)}else{let t=new Float32Array(e,n,d);c.set(t)}},"EnumerateFloatValues",0,i,"GetBlobBufferSource",0,function(e){let t=e.buffer;if(t instanceof ArrayBuffer)return e;let r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(t,e.byteOffset,e.byteLength)),r},"GetFloatData",0,function(e,r,a,n,o,l,u,c){let h=r*s(a),d=u*r;if(5126!==a||o!==h){let t=new Float32Array(d);return i(e,n,o,r,a,d,l,(e,s)=>{for(let i=0;i<r;i++)t[s+i]=e[i]}),t}if(!(e instanceof Array||e instanceof Float32Array)||0!==n||e.length!==d)if(e instanceof Array){let t=n/4;return e.slice(t,t+d)}else{if(!ArrayBuffer.isView(e))return new Float32Array(e,n,d);let r=e.byteOffset+n;return((3&r)!=0&&(t.Logger.Warn("Float array must be aligned to 4-bytes border"),c=!0),c)?new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)):new Float32Array(e.buffer,r,d)}return c?e.slice():e},"GetTypeByteLength",0,s,"GetTypedArrayData",0,function(e,r,a,n,o,l,u){let c,h=s(a),d=function(e){switch(e){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:case 5131:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw Error(`Invalid component type '${e}'`)}}(a),f=l*r;if(Array.isArray(e)){if((3&n)!=0||(3&o)!=0)throw Error("byteOffset and byteStride must be a multiple of 4 for number[] data.");let t=n/4,s=o/4;if(t+(l-1)*s+r>e.length)throw Error("Last accessed index is out of bounds.");if(s<r)throw Error("Data stride cannot be smaller than the component size.");if(s!==r){let t=new d(f);return i(e,n,o,r,a,f,!1,(e,s)=>{for(let i=0;i<r;i++)t[s+i]=e[i]}),t}return new d(e.slice(t,t+f))}let p=n;if(ArrayBuffer.isView(e)?(c=e.buffer,p+=e.byteOffset):c=e,p+(l-1)*o+r*h>c.byteLength)throw Error("Last accessed byte is out of bounds.");let g=r*h;if(o<g)throw Error("Byte stride cannot be smaller than the component's byte size.");if(o!==g){let e=new d(f),t=new Uint8Array(c,p),s=new Uint8Array(e.buffer),i=r*h;for(let e=0,r=0,a=0;e<l;e++,r+=o,a+=i)s.set(t.subarray(r,r+i),a);return e}return(1!==h&&(p&h-1)!=0&&(t.Logger.Warn("Array must be aligned to border of element size. Data will be copied."),u=!0),u)?new d(c.slice(p,p+f*h)):new d(c,p,f)}])},46712,e=>{"use strict";var t=e.i(65295),r=e.i(64545),s=e.i(99267),i=e.i(29822),a=e.i(6805),n=e.i(92605),o=e.i(49311),l=e.i(81623),u=e.i(13379),c=e.i(23240),h=e.i(38118);let d=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i);class f extends n.RuntimeError{constructor(e,r){super(e,n.ErrorCodes.LoadFileError),this.name="LoadFileError",n.BaseError._setPrototypeOf(this,f.prototype),r instanceof t.WebRequest?this.request=r:this.file=r}}class p extends n.RuntimeError{constructor(e,t){super(e,n.ErrorCodes.RequestFileError),this.request=t,this.name="RequestFileError",n.BaseError._setPrototypeOf(this,p.prototype)}}class g extends n.RuntimeError{constructor(e,t){super(e,n.ErrorCodes.ReadFileError),this.file=t,this.name="ReadFileError",n.BaseError._setPrototypeOf(this,g.prototype)}}let m={DefaultRetryStrategy:a.RetryStrategy.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:e=>e,ScriptBaseUrl:"",ScriptPreprocessUrl:e=>e,CleanUrl:e=>e=e.replace(/#/gm,"%23")},y=(e,t)=>{if((!e||0!==e.indexOf("data:"))&&m.CorsBehavior)if("string"==typeof m.CorsBehavior||m.CorsBehavior instanceof String)t.crossOrigin=m.CorsBehavior;else{let r=m.CorsBehavior(e);r&&(t.crossOrigin=r)}},_=(e,t,r,i,a)=>{let n=new FileReader,o={onCompleteObservable:new s.Observable,abort:()=>n.abort()};return n.onloadend=()=>o.onCompleteObservable.notifyObservers(o),a&&(n.onerror=()=>{a(new g(`Unable to read ${e.name}`,e))}),n.onload=e=>{t(e.target.result)},r&&(n.onprogress=r),i?n.readAsArrayBuffer(e):n.readAsText(e),o},b=(e,t,r,a,n,o,l)=>{if(e.name)return _(e,t,r,n,o?e=>{o(void 0,e)}:void 0);if(-1!==e.indexOf("file:")){let s=decodeURIComponent(e.substring(5).toLowerCase());0===s.indexOf("./")&&(s=s.substring(2));let a=i.FilesInputStore.FilesToLoad[s];if(a)return _(a,t,r,n,o?e=>o(void 0,new f(e.message,e.file)):void 0)}let{match:h,type:d}=v(e);if(h){let r={onCompleteObservable:new s.Observable,abort:()=>()=>{}};try{let r=n?L(e):T(e);t(r,void 0,d)}catch(e){o?o(void 0,e):u.Logger.Error(e.message||"Failed to parse the Data URL")}return c.TimingTools.SetImmediate(()=>{r.onCompleteObservable.notifyObservers(r)}),r}return w(e,(e,r)=>{t(e,r?.responseURL,r?.getResponseHeader("content-type"))},r,a,n,o?e=>{o(e.request,new f(e.message,e.request))}:void 0,l)},w=(e,i,a,n,o,c,h)=>{null!==n&&(n??(n=l.EngineStore.LastCreatedScene?.offlineProvider)),e=m.CleanUrl(e),e=m.PreprocessUrl(e);let d=m.BaseUrl+e,f=!1,g={onCompleteObservable:new s.Observable,abort:()=>f=!0},y=()=>{let e,s=new t.WebRequest,n=null,l=()=>{s&&(a&&s.removeEventListener("progress",a),e&&s.removeEventListener("readystatechange",e),s.removeEventListener("loadend",y))},y=()=>{l(),g.onCompleteObservable.notifyObservers(g),g.onCompleteObservable.clear(),a=void 0,e=null,y=null,c=void 0,h=void 0,i=void 0};g.abort=()=>{f=!0,y&&y(),s&&s.readyState!==(XMLHttpRequest.DONE||4)&&s.abort(),null!==n&&(clearTimeout(n),n=null),s=null};let _=e=>{let t=e.message||"Unknown error";c&&s?c(new p(t,s)):u.Logger.Error(t)},b=u=>{if(s){if(s.open("GET",d),h)try{h(s)}catch(e){_(e);return}o&&(s.responseType="arraybuffer"),a&&s.addEventListener("progress",a),y&&s.addEventListener("loadend",y),e=()=>{if(!f&&s&&s.readyState===(XMLHttpRequest.DONE||4)){if(e&&s.removeEventListener("readystatechange",e),s.status>=200&&s.status<300||0===s.status&&(!(0,r.IsWindowObjectExist)()||x())){let e=o?s.response:s.responseText;if(null!==e){try{i&&i(e,s)}catch(e){_(e)}return}}let a=m.DefaultRetryStrategy;if(a){let e=a(d,s,u);if(-1!==e){l(),s=new t.WebRequest,n=setTimeout(()=>b(u+1),e);return}}let h=new p("Error status: "+s.status+" "+s.statusText+" - Unable to load "+d,s);c&&c(h)}},s.addEventListener("readystatechange",e),s.send()}};b(0)};if(n&&n.enableSceneOffline&&!e.startsWith("blob:")){let t=e=>{e&&e.status>400?c&&c(e):y()};n.open(()=>{n&&n.loadFile(m.BaseUrl+e,e=>{!f&&i&&i(e),g.onCompleteObservable.notifyObservers(g)},a?e=>{!f&&a&&a(e)}:void 0,t,o)},t)}else y();return g},x=()=>"u">typeof location&&"file:"===location.protocol,v=e=>{let t=d.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace(";base64,","")}};function L(e){return(0,o.DecodeBase64ToBinary)(e.split(",")[1])}let T=e=>(0,o.DecodeBase64ToString)(e.split(",")[1]);e.s(["DecodeBase64UrlToBinary",0,L,"FileToolsOptions",0,m,"IsBase64DataUrl",0,e=>d.test(e),"LoadFile",0,b,"LoadImage",0,(e,r,s,a,n="",u,c=l.EngineStore.LastCreatedEngine)=>{let d;if("u"<typeof HTMLImageElement&&!c?._features.forceBitmapOverHTMLImageElement)return s("LoadImage is only supported in web or BabylonNative environments."),null;let f=!1;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))if("u">typeof Blob&&"u">typeof URL){let t;t=e instanceof ArrayBuffer?e:(0,h.GetBlobBufferSource)(e),d=URL.createObjectURL(new Blob([t],{type:n})),f=!0}else d=`data:${n};base64,`+(0,o.EncodeArrayBufferToBase64)(e);else e instanceof Blob?(d=URL.createObjectURL(e),f=!0):(d=m.CleanUrl(e),d=m.PreprocessUrl(d));let p=t=>{if(s){let r=d||e.toString();s(`Error while trying to load image: ${0===r.indexOf("http")||r.length<=128?r:r.slice(0,128)+"..."}`,t)}};if(c?._features.forceBitmapOverHTMLImageElement)return b(d,t=>{c.createImageBitmap(new Blob([t],{type:n}),{premultiplyAlpha:"none",colorSpaceConversion:"none",...u}).then(e=>{r(e),f&&URL.revokeObjectURL(d)}).catch(t=>{s&&s("Error while trying to load image: "+e,t)})},void 0,a||void 0,!0,(e,t)=>{p(t)}),null;let g=new Image;!1;y(d,g);let _=[],w=()=>{for(let e of _)e.target.removeEventListener(e.name,e.handler);_.length=0};for(let e of(_.push({target:g,name:"load",handler:()=>{w(),r(g),f&&g.src&&URL.revokeObjectURL(g.src)}}),_.push({target:g,name:"error",handler:e=>{w(),p(e),f&&g.src&&URL.revokeObjectURL(g.src)}}),_.push({target:document,name:"securitypolicyviolation",handler:e=>{if(e.blockedURI!==g.src||"report"===e.disposition)return;w();let t=Error(`CSP violation of policy ${e.effectiveDirective} ${e.blockedURI}. Current policy is ${e.originalPolicy}`);l.EngineStore.UseFallbackTexture=!1,p(t),f&&g.src&&URL.revokeObjectURL(g.src),g.src=""}}),_))e.target.addEventListener(e.name,e.handler);let x="blob:"===d.substring(0,5),v="data:"===d.substring(0,5),L=()=>{x||v||!t.WebRequest.IsCustomRequestAvailable?g.src=d:b(d,(e,t,r)=>{let s=new Blob([e],{type:!n&&r?r:n}),i=URL.createObjectURL(s);f=!0,g.src=i},void 0,a||void 0,!0,(e,t)=>{p(t)})};if(!x&&!v&&a&&a.enableTexturesOffline)a.open(()=>{a&&a.loadImage(d,g)},L);else{if(-1!==d.indexOf("file:")){let e=decodeURIComponent(d.substring(5).toLowerCase());if(i.FilesInputStore.FilesToLoad[e]&&"u">typeof URL){try{let t;try{t=URL.createObjectURL(i.FilesInputStore.FilesToLoad[e])}catch(r){t=URL.createObjectURL(i.FilesInputStore.FilesToLoad[e])}g.src=t,f=!0}catch(e){g.src=""}return g}}L()}return g},"ReadFile",0,_,"RequestFile",0,w,"SetCorsBehavior",0,y])},36395,e=>{"use strict";var t=e.i(64545);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},84768,e=>{"use strict";e.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}])},98105,e=>{"use strict";var t=e.i(13379),r=e.i(77052);class s{static Instantiate(e){if(this.RegisteredExternalClasses&&this.RegisteredExternalClasses[e])return this.RegisteredExternalClasses[e];let s=(0,r.GetClass)(e);if(s)return s;t.Logger.Warn(e+" not found, you may have missed an import.");let i=e.split("."),a="u">typeof window?window:"u">typeof globalThis?globalThis:this;for(let e=0,t=i.length;e<t;e++)a=a[i[e]];return"function"!=typeof a?null:a}}s.RegisteredExternalClasses={},e.s(["InstantiationTools",0,s])},65002,e=>{"use strict";var t=e.i(96265);class r{constructor(e,r,s,i){this.normal=new t.Vector3(e,r,s),this.d=i}asArray(){return[this.normal.x,this.normal.y,this.normal.z,this.d]}clone(){return new r(this.normal.x,this.normal.y,this.normal.z,this.d)}getClassName(){return"Plane"}getHashCode(){let e=this.normal.getHashCode();return 397*e^this.d}normalize(){let e=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),t=0;return 0!==e&&(t=1/e),this.normal.x*=t,this.normal.y*=t,this.normal.z*=t,this.d*=t,this}transform(e){let t=r._TmpMatrix;e.invertToRef(t);let s=t.m,i=this.normal.x,a=this.normal.y,n=this.normal.z,o=this.d;return new r(i*s[0]+a*s[1]+n*s[2]+o*s[3],i*s[4]+a*s[5]+n*s[6]+o*s[7],i*s[8]+a*s[9]+n*s[10]+o*s[11],i*s[12]+a*s[13]+n*s[14]+o*s[15])}dotCoordinate(e){return this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z+this.d}copyFromPoints(e,t,r){let s,i=t.x-e.x,a=t.y-e.y,n=t.z-e.z,o=r.x-e.x,l=r.y-e.y,u=r.z-e.z,c=a*u-n*l,h=n*o-i*u,d=i*l-a*o,f=Math.sqrt(c*c+h*h+d*d);return s=0!==f?1/f:0,this.normal.x=c*s,this.normal.y=h*s,this.normal.z=d*s,this.d=-(this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z),this}isFrontFacingTo(e,r){return t.Vector3.Dot(this.normal,e)<=r}signedDistanceTo(e){return t.Vector3.Dot(e,this.normal)+this.d}static FromArray(e){return new r(e[0],e[1],e[2],e[3])}static FromPoints(e,t,s){let i=new r(0,0,0,0);return i.copyFromPoints(e,t,s),i}static FromPositionAndNormal(e,t){let s=new r(0,0,0,0);return this.FromPositionAndNormalToRef(e,t,s)}static FromPositionAndNormalToRef(e,t,r){return r.normal.copyFrom(t),r.normal.normalize(),r.d=-e.dot(r.normal),r}static SignedDistanceToPlaneFromPositionAndNormal(e,r,s){let i=-(r.x*e.x+r.y*e.y+r.z*e.z);return t.Vector3.Dot(s,r)+i}}r._TmpMatrix=t.Matrix.Identity(),e.s(["Plane",0,r])},84201,e=>{"use strict";var t,r,s=e.i(99267);class i{get wrapU(){return this._cachedWrapU}set wrapU(e){this._cachedWrapU=e}get wrapV(){return this._cachedWrapV}set wrapV(e){this._cachedWrapV=e}get wrapR(){return this._cachedWrapR}set wrapR(e){this._cachedWrapR=e}get anisotropicFilteringLevel(){return this._cachedAnisotropicFilteringLevel}set anisotropicFilteringLevel(e){this._cachedAnisotropicFilteringLevel=e}get comparisonFunction(){return this._comparisonFunction}set comparisonFunction(e){this._comparisonFunction=e}get useMipMaps(){return this._useMipMaps}set useMipMaps(e){this._useMipMaps=e}constructor(){this.samplingMode=-1,this._useMipMaps=!0,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._comparisonFunction=0}setParameters(e=1,t=1,r=1,s=1,i=2,a=0){return this._cachedWrapU=e,this._cachedWrapV=t,this._cachedWrapR=r,this._cachedAnisotropicFilteringLevel=s,this.samplingMode=i,this._comparisonFunction=a,this}compareSampler(e){return this._cachedWrapU===e._cachedWrapU&&this._cachedWrapV===e._cachedWrapV&&this._cachedWrapR===e._cachedWrapR&&this._cachedAnisotropicFilteringLevel===e._cachedAnisotropicFilteringLevel&&this.samplingMode===e.samplingMode&&this._comparisonFunction===e._comparisonFunction&&this._useMipMaps===e._useMipMaps}}(t=r||(r={}))[t.Unknown=0]="Unknown",t[t.Url=1]="Url",t[t.Temp=2]="Temp",t[t.Raw=3]="Raw",t[t.Dynamic=4]="Dynamic",t[t.RenderTarget=5]="RenderTarget",t[t.MultiRenderTarget=6]="MultiRenderTarget",t[t.Cube=7]="Cube",t[t.CubeRaw=8]="CubeRaw",t[t.CubePrefiltered=9]="CubePrefiltered",t[t.Raw3D=10]="Raw3D",t[t.Raw2DArray=11]="Raw2DArray",t[t.DepthStencil=12]="DepthStencil",t[t.CubeRawRGBD=13]="CubeRawRGBD",t[t.Depth=14]="Depth",t[t.External=15]="External";class a extends i{get useMipMaps(){return null===this._useMipMaps?this.generateMipMaps:this._useMipMaps}set useMipMaps(e){this._useMipMaps=e}get uniqueId(){return this._uniqueId}_setUniqueId(e){this._uniqueId=e}getEngine(){return this._engine}get source(){return this._source}constructor(e,t,r=!1){super(),this.isReady=!1,this.isCube=!1,this.is3D=!1,this.is2DArray=!1,this.isMultiview=!1,this.url="",this.generateMipMaps=!1,this._useMipMaps=null,this.mipLevelCount=1,this.samples=0,this.type=-1,this.format=-1,this.onLoadedObservable=new s.Observable,this.onErrorObservable=new s.Observable,this.onRebuildCallback=null,this.width=0,this.height=0,this.depth=0,this.baseWidth=0,this.baseHeight=0,this.baseDepth=0,this.invertY=!1,this._invertVScale=!1,this._associatedChannel=-1,this._source=0,this._buffer=null,this._bufferView=null,this._bufferViewArray=null,this._bufferViewArrayArray=null,this._size=0,this._extension="",this._files=null,this._workingCanvas=null,this._workingContext=null,this._cachedCoordinatesMode=null,this._isDisabled=!1,this._compression=null,this._sphericalPolynomial=null,this._sphericalPolynomialPromise=null,this._sphericalPolynomialComputed=!1,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._useSRGBBuffer=!1,this._creationFlags=0,this._lodTextureHigh=null,this._lodTextureMid=null,this._lodTextureLow=null,this._isRGBD=!1,this._linearSpecularLOD=!1,this._irradianceTexture=null,this._hardwareTexture=null,this._maxLodLevel=null,this._references=1,this._gammaSpace=null,this._premulAlpha=!1,this._dynamicTextureSource=null,this._autoMSAAManagement=!1,this._engine=e,this._source=t,this._uniqueId=a._Counter++,r||(this._hardwareTexture=e._createHardwareTexture())}incrementReferences(){this._references++}updateSize(e,t,r=1){this._engine.updateTextureDimensions(this,e,t,r),this.width=e,this.height=t,this.depth=r,this.baseWidth=e,this.baseHeight=t,this.baseDepth=r,this._size=e*t*r}_rebuild(){let e;if(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this.onRebuildCallback){let e=this.onRebuildCallback(this),t=t=>{t._swapAndDie(this,!1),this.isReady=e.isReady};e.isAsync?e.proxy.then(t):t(e.proxy);return}switch(this.source){case 2:case 12:case 14:break;case 1:e=this._engine.createTexture(this._originalUrl??this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,e=>{e._swapAndDie(this,!1),this.isReady=!0},null,this._buffer,void 0,this.format,this._extension,void 0,void 0,void 0,this._useSRGBBuffer);return;case 3:if((e=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,this._creationFlags,this._useSRGBBuffer,this.mipLevelCount))._swapAndDie(this,!1),this._bufferViewArray)for(let e=0;e<this._bufferViewArray.length;e++){let t=this._bufferViewArray[e];t&&this._engine.updateRawTexture(this,t,this.format,this.invertY,this._compression,this.type,this._useSRGBBuffer,e)}this.isReady=!0;break;case 10:(e=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case 11:if((e=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,this._creationFlags,this.mipLevelCount))._swapAndDie(this,!1),this._bufferViewArray)for(let e=0;e<this._bufferViewArray.length;e++){let t=this._bufferViewArray[e];t&&this._engine.updateRawTexture2DArray(this,t,this.format,this.invertY,this._compression,this.type,e)}this.isReady=!0;break;case 4:(e=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this,!1),this._dynamicTextureSource&&this._engine.updateDynamicTexture(this,this._dynamicTextureSource,this.invertY,this._premulAlpha,this.format,!0);break;case 7:e=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,()=>{e._swapAndDie(this,!1),this.isReady=!0},null,this.format,this._extension,!1,0,0,null,void 0,this._useSRGBBuffer,ArrayBuffer.isView(this._buffer)?this._buffer:null);return;case 8:(e=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this._originalFormat??this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this,!1),this.isReady=!0;break;case 13:return;case 9:(e=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,e=>{e&&e._swapAndDie(this,!1),this.isReady=!0},null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial;return}}_swapAndDie(e,t=!0){this._hardwareTexture?.setUsage(e._source,this.generateMipMaps,this.is2DArray,this.isCube,this.is3D,this.width,this.height,this.depth),e._hardwareTexture=this._hardwareTexture,e._setUniqueId(a._Counter++),t&&(e._isRGBD=this._isRGBD),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(e._irradianceTexture&&e._irradianceTexture.dispose(),e._irradianceTexture=this._irradianceTexture);let r=this._engine.getLoadedTexturesCache(),s=r.indexOf(this);-1!==s&&r.splice(s,1),-1===(s=r.indexOf(e))&&r.push(e)}dispose(){this._references--,0===this._references&&(this.onLoadedObservable.clear(),this.onErrorObservable.clear(),this._engine._releaseTexture(this),this._hardwareTexture=null,this._dynamicTextureSource=null)}}a._Counter=0,e.s(["InternalTexture",0,a],84201)},10272,94047,37143,e=>{"use strict";e.s(["__decorate",0,function(e,t,r,s){var i,a=arguments.length,n=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,s);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n}],10272);let t={},r={};function s(e){let t=e.getClassName();return r[t]||(r[t]={}),r[t]}function i(e,t){return(r,i)=>{let a=s(r);a[i]||(a[i]={type:e,sourceName:t})}}function a(e,t,r,s){let i=r.value;r.value=(...r)=>{let a=i;if("u">typeof _native&&_native[t]){let e=_native[t];a=s?(...t)=>s(...t)?e(...t):i(...t):e}return e[t]=a,a(...r)}}e.s(["GetDirectStore",0,s,"GetMergedStore",0,function(e){let s=e.getClassName();if(t[s])return t[s];t[s]={};let i=t[s],a=e,n=s;for(;n;){let e,t=r[n];for(let e in t)i[e]=t[e];let s=!1;do{if(!(e=Object.getPrototypeOf(a)).getClassName){s=!0;break}if(e.getClassName()!==n)break;a=e}while(e)if(s)break;n=e.getClassName(),a=e}return i}],94047),a.filter=function(e){return(t,r,s)=>a(t,r,s,e)},e.s(["expandToProperty",0,function(e,t=null){return function(e,t=null){return(r,s)=>{let i=t||"_"+s;Object.defineProperty(r,s,{get:function(){return this[i]},set:function(t){"function"==typeof this[i]?.equals&&this[i].equals(t)||this[i]!==t&&(this[i]=t,r[e].apply(this))},enumerable:!0,configurable:!0})}}(e,t)},"nativeOverride",0,a,"serialize",0,function(e){return i(0,e)},"serializeAsColor3",0,function(e){return i(2,e)},"serializeAsColor4",0,function(e){return i(8,e)},"serializeAsColorCurves",0,function(e){return i(7,e)},"serializeAsFresnelParameters",0,function(e){return i(3,e)},"serializeAsImageProcessingConfiguration",0,function(e){return i(9,e)},"serializeAsMeshReference",0,function(e){return i(6,e)},"serializeAsQuaternion",0,function(e){return i(10,e)},"serializeAsTexture",0,function(e){return i(1,e)},"serializeAsVector2",0,function(e){return i(4,e)},"serializeAsVector3",0,function(e){return i(5,e)}],37143)},80871,76312,e=>{"use strict";var t=e.i(75405);class r{static Eval(e,t){return"true"===(e=e.match(/\([^()]*\)/g)?e.replace(/\([^()]*\)/g,e=>(e=e.slice(1,e.length-1),r._HandleParenthesisContent(e,t))):r._HandleParenthesisContent(e,t))||"false"!==e&&r.Eval(e,t)}static _HandleParenthesisContent(e,t){let s;t=t||(e=>"true"===e);let i=e.split("||");for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let a=r._SimplifyNegation(i[e].trim()),n=a.split("&&");if(n.length>1)for(let e=0;e<n.length;++e){let i=r._SimplifyNegation(n[e].trim());if(!(s="true"!==i&&"false"!==i?"!"===i[0]?!t(i.substring(1)):t(i):"true"===i)){a="false";break}}if(s||"true"===a){s=!0;break}s="true"!==a&&"false"!==a?"!"===a[0]?!t(a.substring(1)):t(a):"true"===a}return s?"true":"false"}static _SimplifyNegation(e){return"!true"===(e=(e=e.replace(/^[\s!]+/,e=>(e=e.replace(/[\s]/g,()=>"")).length%2?"!":"")).trim())?e="false":"!false"===e&&(e="true"),e}}class s{static EnableFor(e){e._tags=e._tags||{},e.hasTags=()=>s.HasTags(e),e.addTags=t=>s.AddTagsTo(e,t),e.removeTags=t=>s.RemoveTagsFrom(e,t),e.matchesTagsQuery=t=>s.MatchesQuery(e,t)}static DisableFor(e){delete e._tags,delete e.hasTags,delete e.addTags,delete e.removeTags,delete e.matchesTagsQuery}static HasTags(e){if(!e._tags)return!1;let t=e._tags;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!0;return!1}static GetTags(e,t=!0){if(!e._tags)return null;if(!t)return e._tags;{let t=[];for(let r in e._tags)Object.prototype.hasOwnProperty.call(e._tags,r)&&!0===e._tags[r]&&t.push(r);return t.join(" ")}}static AddTagsTo(e,t){if(t&&"string"==typeof t)for(let r of t.split(" "))s._AddTagTo(e,r)}static _AddTagTo(e,t){""===(t=t.trim())||"true"===t||"false"===t||t.match(/[\s]/)||t.match(/^([!]|([|]|[&]){2})/)||(s.EnableFor(e),e._tags[t]=!0)}static RemoveTagsFrom(e,t){if(!s.HasTags(e))return;let r=t.split(" ");for(let t in r)s._RemoveTagFrom(e,r[t])}static _RemoveTagFrom(e,t){delete e._tags[t]}static MatchesQuery(e,t){return void 0===t||(""===t?s.HasTags(e):r.Eval(t,t=>s.HasTags(e)&&e._tags[t]))}}e.s(["Tags",0,s],76312);var i=e.i(70653),a=e.i(96265),n=e.i(94047);let o=function(e,t,r,i={}){let a=e();s&&s.HasTags(t)&&s.AddTagsTo(a,s.GetTags(t,!0));let o=(0,n.GetMergedStore)(a),u={};for(let e in o){let s=o[e],n=t[e],c=s.type;if(null!=n&&("uniqueId"!==e||l.AllowLoadingUniqueId))switch(c){case 0:case 6:case 9:case 11:"function"==typeof n.slice?a[e]=n.slice():a[e]=n;break;case 1:i.cloneTexturesOnlyOnce&&u[n.uniqueId]?a[e]=u[n.uniqueId]:(a[e]=r||n.isRenderTarget?n:n.clone(),u[n.uniqueId]=a[e]);break;case 2:case 3:case 4:case 5:case 7:case 8:case 10:case 12:a[e]=r?n:n.clone()}}return a};class l{static AppendSerializedAnimations(e,t){if(e.animations){t.animations=[];for(let r=0;r<e.animations.length;r++){let s=e.animations[r];t.animations.push(s.serialize())}}}static Serialize(e,t){t||(t={}),s&&(t.tags=s.GetTags(e));let r=(0,n.GetMergedStore)(e);for(let s in r){let i=r[s],a=i.sourceName||s,n=i.type,o=e[s];if(null!=o&&("uniqueId"!==s||l.AllowLoadingUniqueId))switch(n){case 0:Array.isArray(o)?t[a]=o.slice():t[a]=o;break;case 1:case 3:case 7:case 9:t[a]=o.serialize();break;case 2:case 4:case 5:case 8:case 10:case 12:t[a]=o.asArray();break;case 6:case 11:t[a]=o.id}}return t}static ParseProperties(e,t,r,s){s||(s="");let o=(0,n.GetMergedStore)(t);for(let n in o){let u=o[n],c=e[u.sourceName||n],h=u.type;if(null!=c&&("uniqueId"!==n||l.AllowLoadingUniqueId))switch(h){case 0:t[n]=c;break;case 1:r&&(t[n]=l._TextureParser(c,r,s));break;case 2:t[n]=i.Color3.FromArray(c);break;case 3:t[n]=l._FresnelParametersParser(c);break;case 4:t[n]=a.Vector2.FromArray(c);break;case 5:t[n]=a.Vector3.FromArray(c);break;case 6:r&&(t[n]=r.getLastMeshById(c));break;case 7:t[n]=l._ColorCurvesParser(c);break;case 8:t[n]=i.Color4.FromArray(c);break;case 9:t[n]=l._ImageProcessingConfigurationParser(c);break;case 10:t[n]=a.Quaternion.FromArray(c);break;case 11:r&&(t[n]=r.getCameraById(c));break;case 12:t[n]=a.Matrix.FromArray(c)}}}static Parse(e,t,r,i=null){let a=e();return s&&s.AddTagsTo(a,t.tags),l.ParseProperties(t,a,r,i),a}static Clone(e,t,r={}){return o(e,t,!1,r)}static Instanciate(e,t){return o(e,t,!0)}}l.AllowLoadingUniqueId=!1,l._ImageProcessingConfigurationParser=e=>{throw(0,t._WarnImport)("ImageProcessingConfiguration")},l._FresnelParametersParser=e=>{throw(0,t._WarnImport)("FresnelParameters")},l._ColorCurvesParser=e=>{throw(0,t._WarnImport)("ColorCurves")},l._TextureParser=(e,r,s)=>{throw(0,t._WarnImport)("Texture")},e.s(["SerializationHelper",0,l],80871)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13379,e=>{"use strict";class t{static _CheckLimit(e,r){let s=t._LogLimitOutputs[e];return s?s.current++:(s={limit:r,current:1},t._LogLimitOutputs[e]=s),s.current<=s.limit}static _GenerateLimitMessage(e,r=1){let s=t._LogLimitOutputs[e];if(!s||!t.MessageLimitReached)return;let n=this._Levels[r];s.current===s.limit&&t[n.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+s.limit).replace(/%TYPE%/g,n.name??""))}static _AddLogEntry(e){t._LogCache=e+t._LogCache,t.OnNewCacheEntry&&t.OnNewCacheEntry(e)}static _FormatMessage(e){let t=e=>e<10?"0"+e:""+e,r=new Date;return"["+t(r.getHours())+":"+t(r.getMinutes())+":"+t(r.getSeconds())+"]: "+e}static _LogDisabled(e,t){}static _LogEnabled(e=1,r,s){let n=Array.isArray(r)?r[0]:r;if(void 0!==s&&!t._CheckLimit(n,s))return;let o=t._FormatMessage(n),a=this._Levels[e],i=Array.isArray(r)?r.slice(1):[];a.logFunc&&a.logFunc("BJS - "+o,...i);let l=`<div style='color:${a.color}'>${o}</div><br>`;t._AddLogEntry(l),t._GenerateLimitMessage(n,e)}static get LogCache(){return t._LogCache}static ClearLogCache(){t._LogCache="",t._LogLimitOutputs={},t.errorsCount=0}static set LogLevels(e){for(let r of(t.Log=t._LogDisabled,t.Warn=t._LogDisabled,t.Error=t._LogDisabled,[t.MessageLogLevel,t.WarningLogLevel,t.ErrorLogLevel]))(e&r)===r&&(t[this._Levels[r].name]=t._LogEnabled.bind(t,r))}}t.NoneLogLevel=0,t.MessageLogLevel=1,t.WarningLogLevel=2,t.ErrorLogLevel=4,t.AllLogLevel=7,t.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",t._LogCache="",t._LogLimitOutputs={},t._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],t.errorsCount=0,t.Log=t._LogEnabled.bind(t,t.MessageLogLevel),t.Warn=t._LogEnabled.bind(t,t.WarningLogLevel),t.Error=t._LogEnabled.bind(t,t.ErrorLogLevel),e.s(["Logger",0,t])},96704,e=>{"use strict";let t=null;function r(){if(t)return t;let e=new ArrayBuffer(4),r=new Float32Array(e),s=new Uint32Array(e),n=new Uint32Array(512),o=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-24?(n[e]=0,n[256|e]=32768,o[e]=24,o[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,o[e]=-t-1,o[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,o[e]=13,o[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,o[e]=24,o[256|e]=24):(n[e]=31744,n[256|e]=64512,o[e]=13,o[256|e]=13)}let a=new Uint32Array(2048),i=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,r=0;for(;(8388608&t)==0;)t<<=1,r-=8388608;t&=-8388609,r+=0x38800000,a[e]=t|r}for(let e=1024;e<2048;++e)a[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)i[e]=e<<23;i[31]=0x47800000,i[32]=0x80000000;for(let e=33;e<63;++e)i[e]=0x80000000+(e-32<<23);i[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return t={floatView:r,uint32View:s,baseTable:n,shiftTable:o,mantissaTable:a,exponentTable:i,offsetTable:l}}e.s(["FromHalfFloat",0,function(e){let t=r();return t.uint32View[0]=t.mantissaTable[t.offsetTable[e>>10]+(1023&e)]+t.exponentTable[e>>10],t.floatView[0]},"MaxHalfFloat",0,65504,"ToHalfFloat",0,function(e){let t=r();t.floatView[0]=e;let s=t.uint32View[0],n=s>>23&511;return t.baseTable[n]+((8388607&s)>>t.shiftTable[n])}])},64545,e=>{"use strict";e.s(["GetDOMTextContent",0,function(e){let t="",r=e.firstChild;for(;r;)3===r.nodeType&&(t+=r.textContent),r=r.nextSibling;return t},"IsDocumentAvailable",0,function(){return"u">typeof document},"IsNavigatorAvailable",0,function(){return"u">typeof navigator},"IsWindowObjectExist",0,function(){return"u">typeof window}])},65295,e=>{"use strict";class t{constructor(){this._xhr="u">typeof _native&&_native.XMLHttpRequest?new _native.XMLHttpRequest:new XMLHttpRequest,this._requestURL=""}static get IsCustomRequestAvailable(){return Object.keys(t.CustomRequestHeaders).length>0||t.CustomRequestModifiers.length>0}static _CleanUrl(e){return e=(e=e.replace("file:http:","http:")).replace("file:https:","https:")}static _ShouldSkipRequestModifications(e){return t.SkipRequestModificationForBabylonCDN&&(e.includes("preview.babylonjs.com")||e.includes("cdn.babylonjs.com"))}static _CollectCustomizations(e,r={}){let s={...r};if(t._ShouldSkipRequestModifications(e))return{url:e,headers:s};for(let e in t.CustomRequestHeaders){let r=t.CustomRequestHeaders[e];r&&(s[e]=r)}let n={setRequestHeader:(e,t)=>{s[e]=t}};for(let r of t.CustomRequestModifiers){if(t._ShouldSkipRequestModifications(e))break;let s=r(n,e);"string"==typeof s&&(e=s)}return{url:e,headers:s}}static async FetchAsync(e,r={}){let s=r.method??"GET";if("u">typeof fetch){let{url:n,headers:o}=t._CollectCustomizations(t._CleanUrl(e),r.headers??{});return await fetch(n,{method:s,headers:o,body:r.body??void 0})}return await new Promise((n,o)=>{let a=new t;a.responseType="arraybuffer",a.addEventListener("readystatechange",()=>{if(4===a.readyState)if(a.status>=200&&a.status<300){let e="u">typeof Headers?new Headers:void 0,t=a.getResponseHeader("Content-Type");t&&e&&e.set("Content-Type",t),"u">typeof Response?n(new Response(a.response,{status:a.status,statusText:a.statusText,headers:e})):n({ok:!0,status:a.status,statusText:a.statusText,headers:{get:e=>a.getResponseHeader(e)},arrayBuffer:async()=>await Promise.resolve(a.response)})}else o(Error(`HTTP ${a.status} loading '${a.requestURL}': ${a.statusText}`))}),a.open(s,e,r.headers),a.send(r.body??null)})}get requestURL(){return this._requestURL}get onprogress(){return this._xhr.onprogress}set onprogress(e){this._xhr.onprogress=e}get readyState(){return this._xhr.readyState}get status(){return this._xhr.status}get statusText(){return this._xhr.statusText}get response(){return this._xhr.response}get responseURL(){return this._xhr.responseURL}get responseText(){return this._xhr.responseText}get responseType(){return this._xhr.responseType}set responseType(e){this._xhr.responseType=e}get timeout(){return this._xhr.timeout}set timeout(e){this._xhr.timeout=e}addEventListener(e,t,r){this._xhr.addEventListener(e,t,r)}removeEventListener(e,t,r){this._xhr.removeEventListener(e,t,r)}abort(){this._xhr.abort()}send(e){this._xhr.send(e)}open(e,r,s){let{url:n,headers:o}=t._CollectCustomizations(r,s);for(let r in this._requestURL=t._CleanUrl(n),this._xhr.open(e,this._requestURL,!0),o)this._xhr.setRequestHeader(r,o[r])}setRequestHeader(e,t){this._xhr.setRequestHeader(e,t)}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}t.CustomRequestHeaders={},t.CustomRequestModifiers=[],t.SkipRequestModificationForBabylonCDN=!0,e.s(["WebRequest",0,t])},29822,6805,92605,49311,23240,e=>{"use strict";class t{}t.FilesToLoad={},e.s(["FilesInputStore",0,t],29822),e.s(["RetryStrategy",0,class{static ExponentialBackoff(e=3,t=500){return(r,s,n)=>0!==s.status||n>=e||-1!==r.indexOf("file:")?-1:Math.pow(2,n)*t}}],6805);class r extends Error{}r._setPrototypeOf=Object.setPrototypeOf||((e,t)=>(e.__proto__=t,e));class s extends r{constructor(e,t,n){super(e),this.errorCode=t,this.innerError=n,this.name="RuntimeError",r._setPrototypeOf(this,s.prototype)}}e.s(["BaseError",0,r,"ErrorCodes",0,{MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},"RuntimeError",0,s],92605);let n=e=>atob(e);e.s(["DecodeBase64ToBinary",0,e=>"function"==typeof Uint8Array.fromBase64?Uint8Array.fromBase64(e).buffer:function(e){let t=n(e),r=t.length,s=new Uint8Array(new ArrayBuffer(r));for(let e=0;e<r;e++)s[e]=t.charCodeAt(e);return s.buffer}(e),"DecodeBase64ToString",0,n,"EncodeArrayBufferToBase64",0,e=>{let t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);return"function"==typeof t.toBase64?t.toBase64():function(e){let t,r,s,n,o,a,i,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(;c<e.length;)t=e[c++],r=c<e.length?e[c++]:NaN,s=c<e.length?e[c++]:NaN,n=t>>2,o=(3&t)<<4|r>>4,a=(15&r)<<2|s>>6,i=63&s,isNaN(r)?a=i=64:isNaN(s)&&(i=64),u+=l.charAt(n)+l.charAt(o)+l.charAt(a)+l.charAt(i);return u}(t)}],49311);let o=[];function a(e,t,r){try{if(e())return t(),!0}catch(e){return r?.(e),!0}return!1}e.s(["TimingTools",0,class{static SetImmediate(e){0===o.length&&setTimeout(()=>{let e=o;for(let t of(o=[],e))t()},1),o.push(e)}},"_RetryWithInterval",0,(e,t,r,s=16,n=3e4,o=!0,i)=>{if(o&&a(e,t,r))return null;let l=setInterval(()=>{a(e,t,r)?clearInterval(l):(n-=s)<0&&(clearInterval(l),r?.(Error("Operation timed out after maximum retries. "+(i||"")),!0))},s);return()=>clearInterval(l)}],23240)},38118,e=>{"use strict";var t=e.i(13379),r=e.i(96704);function s(e){switch(e){case 5120:case 5121:return 1;case 5122:case 5123:case 5131:return 2;case 5124:case 5125:case 5126:return 4;default:throw Error(`Invalid type '${e}'`)}}function n(e,t,n,o,a,i,l,u){let c=Array(o),f=Array(o);if(e instanceof Array){let r=t/4,s=n/4;for(let t=0;t<i;t+=o){for(let t=0;t<o;t++)c[t]=f[t]=e[r+t];u(f,t);for(let t=0;t<o;t++)c[t]!==f[t]&&(e[r+t]=f[t]);r+=s}}else{let d=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),g=s(a);for(let e=0;e<i;e+=o){for(let e=0,s=t;e<o;e++,s+=g)c[e]=f[e]=function(e,t,s,n){switch(t){case 5120:{let t=e.getInt8(s);return n&&(t=Math.max(t/127,-1)),t}case 5121:{let t=e.getUint8(s);return n&&(t/=255),t}case 5122:{let t=e.getInt16(s,!0);return n&&(t=Math.max(t/32767,-1)),t}case 5123:{let t=e.getUint16(s,!0);return n&&(t/=65535),t}case 5131:return(0,r.FromHalfFloat)(e.getUint16(s,!0));case 5124:return e.getInt32(s,!0);case 5125:return e.getUint32(s,!0);case 5126:return e.getFloat32(s,!0);default:throw Error(`Invalid component type ${t}`)}}(d,a,s,l);u(f,e);for(let e=0,s=t;e<o;e++,s+=g)c[e]!==f[e]&&function(e,t,s,n,o){switch(t){case 5120:n&&(o=Math.round(127*o)),e.setInt8(s,o);break;case 5121:n&&(o=Math.round(255*o)),e.setUint8(s,o);break;case 5122:n&&(o=Math.round(32767*o)),e.setInt16(s,o,!0);break;case 5123:n&&(o=Math.round(65535*o)),e.setUint16(s,o,!0);break;case 5131:e.setUint16(s,(0,r.ToHalfFloat)(o),!0);break;case 5124:e.setInt32(s,o,!0);break;case 5125:e.setUint32(s,o,!0);break;case 5126:e.setFloat32(s,o,!0);break;default:throw Error(`Invalid component type ${t}`)}}(d,a,s,l,f[e]);t+=n}}}e.s(["CopyFloatData",0,function(e,r,o,a,i,l,u,c){let f=r*s(o),d=u*r;if(c.length!==d)throw Error("Output length is not valid");if(5126!==o||i!==f)return void n(e,a,i,r,o,d,l,(e,t)=>{for(let s=0;s<r;s++)c[t+s]=e[s]});if(e instanceof Array){let t=a/4;c.set(e,t)}else if(ArrayBuffer.isView(e)){let r=e.byteOffset+a;if((3&r)!=0){t.Logger.Warn("Float array must be aligned to 4-bytes border"),c.set(new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)));return}let s=new Float32Array(e.buffer,r,d);c.set(s)}else{let t=new Float32Array(e,a,d);c.set(t)}},"EnumerateFloatValues",0,n,"GetBlobBufferSource",0,function(e){let t=e.buffer;if(t instanceof ArrayBuffer)return e;let r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(t,e.byteOffset,e.byteLength)),r},"GetFloatData",0,function(e,r,o,a,i,l,u,c){let f=r*s(o),d=u*r;if(5126!==o||i!==f){let t=new Float32Array(d);return n(e,a,i,r,o,d,l,(e,s)=>{for(let n=0;n<r;n++)t[s+n]=e[n]}),t}if(!(e instanceof Array||e instanceof Float32Array)||0!==a||e.length!==d)if(e instanceof Array){let t=a/4;return e.slice(t,t+d)}else{if(!ArrayBuffer.isView(e))return new Float32Array(e,a,d);let r=e.byteOffset+a;return((3&r)!=0&&(t.Logger.Warn("Float array must be aligned to 4-bytes border"),c=!0),c)?new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)):new Float32Array(e.buffer,r,d)}return c?e.slice():e},"GetTypeByteLength",0,s,"GetTypedArrayData",0,function(e,r,o,a,i,l,u){let c,f=s(o),d=function(e){switch(e){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:case 5131:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw Error(`Invalid component type '${e}'`)}}(o),g=l*r;if(Array.isArray(e)){if((3&a)!=0||(3&i)!=0)throw Error("byteOffset and byteStride must be a multiple of 4 for number[] data.");let t=a/4,s=i/4;if(t+(l-1)*s+r>e.length)throw Error("Last accessed index is out of bounds.");if(s<r)throw Error("Data stride cannot be smaller than the component size.");if(s!==r){let t=new d(g);return n(e,a,i,r,o,g,!1,(e,s)=>{for(let n=0;n<r;n++)t[s+n]=e[n]}),t}return new d(e.slice(t,t+g))}let y=a;if(ArrayBuffer.isView(e)?(c=e.buffer,y+=e.byteOffset):c=e,y+(l-1)*i+r*f>c.byteLength)throw Error("Last accessed byte is out of bounds.");let p=r*f;if(i<p)throw Error("Byte stride cannot be smaller than the component's byte size.");if(i!==p){let e=new d(g),t=new Uint8Array(c,y),s=new Uint8Array(e.buffer),n=r*f;for(let e=0,r=0,o=0;e<l;e++,r+=i,o+=n)s.set(t.subarray(r,r+n),o);return e}return(1!==f&&(y&f-1)!=0&&(t.Logger.Warn("Array must be aligned to border of element size. Data will be copied."),u=!0),u)?new d(c.slice(y,y+g*f)):new d(c,y,g)}])},46712,e=>{"use strict";var t=e.i(65295),r=e.i(64545),s=e.i(99267),n=e.i(29822),o=e.i(6805),a=e.i(92605),i=e.i(49311),l=e.i(81623),u=e.i(13379),c=e.i(23240),f=e.i(38118);let d=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i);class g extends a.RuntimeError{constructor(e,r){super(e,a.ErrorCodes.LoadFileError),this.name="LoadFileError",a.BaseError._setPrototypeOf(this,g.prototype),r instanceof t.WebRequest?this.request=r:this.file=r}}class y extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.RequestFileError),this.request=t,this.name="RequestFileError",a.BaseError._setPrototypeOf(this,y.prototype)}}class p extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.ReadFileError),this.file=t,this.name="ReadFileError",a.BaseError._setPrototypeOf(this,p.prototype)}}let h={DefaultRetryStrategy:o.RetryStrategy.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:e=>e,ScriptBaseUrl:"",ScriptPreprocessUrl:e=>e,CleanUrl:e=>e=e.replace(/#/gm,"%23")},b=(e,t)=>{if((!e||0!==e.indexOf("data:"))&&h.CorsBehavior)if("string"==typeof h.CorsBehavior||h.CorsBehavior instanceof String)t.crossOrigin=h.CorsBehavior;else{let r=h.CorsBehavior(e);r&&(t.crossOrigin=r)}},m=(e,t,r,n,o)=>{let a=new FileReader,i={onCompleteObservable:new s.Observable,abort:()=>a.abort()};return a.onloadend=()=>i.onCompleteObservable.notifyObservers(i),o&&(a.onerror=()=>{o(new p(`Unable to read ${e.name}`,e))}),a.onload=e=>{t(e.target.result)},r&&(a.onprogress=r),n?a.readAsArrayBuffer(e):a.readAsText(e),i},L=(e,t,r,o,a,i,l)=>{if(e.name)return m(e,t,r,a,i?e=>{i(void 0,e)}:void 0);if(-1!==e.indexOf("file:")){let s=decodeURIComponent(e.substring(5).toLowerCase());0===s.indexOf("./")&&(s=s.substring(2));let o=n.FilesInputStore.FilesToLoad[s];if(o)return m(o,t,r,a,i?e=>i(void 0,new g(e.message,e.file)):void 0)}let{match:f,type:d}=E(e);if(f){let r={onCompleteObservable:new s.Observable,abort:()=>()=>{}};try{let r=a?x(e):R(e);t(r,void 0,d)}catch(e){i?i(void 0,e):u.Logger.Error(e.message||"Failed to parse the Data URL")}return c.TimingTools.SetImmediate(()=>{r.onCompleteObservable.notifyObservers(r)}),r}return v(e,(e,r)=>{t(e,r?.responseURL,r?.getResponseHeader("content-type"))},r,o,a,i?e=>{i(e.request,new g(e.message,e.request))}:void 0,l)},v=(e,n,o,a,i,c,f)=>{null!==a&&(a??(a=l.EngineStore.LastCreatedScene?.offlineProvider)),e=h.CleanUrl(e),e=h.PreprocessUrl(e);let d=h.BaseUrl+e,g=!1,p={onCompleteObservable:new s.Observable,abort:()=>g=!0},b=()=>{let e,s=new t.WebRequest,a=null,l=()=>{s&&(o&&s.removeEventListener("progress",o),e&&s.removeEventListener("readystatechange",e),s.removeEventListener("loadend",b))},b=()=>{l(),p.onCompleteObservable.notifyObservers(p),p.onCompleteObservable.clear(),o=void 0,e=null,b=null,c=void 0,f=void 0,n=void 0};p.abort=()=>{g=!0,b&&b(),s&&s.readyState!==(XMLHttpRequest.DONE||4)&&s.abort(),null!==a&&(clearTimeout(a),a=null),s=null};let m=e=>{let t=e.message||"Unknown error";c&&s?c(new y(t,s)):u.Logger.Error(t)},L=u=>{if(s){if(s.open("GET",d),f)try{f(s)}catch(e){m(e);return}i&&(s.responseType="arraybuffer"),o&&s.addEventListener("progress",o),b&&s.addEventListener("loadend",b),e=()=>{if(!g&&s&&s.readyState===(XMLHttpRequest.DONE||4)){if(e&&s.removeEventListener("readystatechange",e),s.status>=200&&s.status<300||0===s.status&&(!(0,r.IsWindowObjectExist)()||w())){let e=i?s.response:s.responseText;if(null!==e){try{n&&n(e,s)}catch(e){m(e)}return}}let o=h.DefaultRetryStrategy;if(o){let e=o(d,s,u);if(-1!==e){l(),s=new t.WebRequest,a=setTimeout(()=>L(u+1),e);return}}let f=new y("Error status: "+s.status+" "+s.statusText+" - Unable to load "+d,s);c&&c(f)}},s.addEventListener("readystatechange",e),s.send()}};L(0)};if(a&&a.enableSceneOffline&&!e.startsWith("blob:")){let t=e=>{e&&e.status>400?c&&c(e):b()};a.open(()=>{a&&a.loadFile(h.BaseUrl+e,e=>{!g&&n&&n(e),p.onCompleteObservable.notifyObservers(p)},o?e=>{!g&&o&&o(e)}:void 0,t,i)},t)}else b();return p},w=()=>"u">typeof location&&"file:"===location.protocol,E=e=>{let t=d.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace(";base64,","")}};function x(e){return(0,i.DecodeBase64ToBinary)(e.split(",")[1])}let R=e=>(0,i.DecodeBase64ToString)(e.split(",")[1]);e.s(["DecodeBase64UrlToBinary",0,x,"FileToolsOptions",0,h,"IsBase64DataUrl",0,e=>d.test(e),"LoadFile",0,L,"LoadImage",0,(e,r,s,o,a="",u,c=l.EngineStore.LastCreatedEngine)=>{let d;if("u"<typeof HTMLImageElement&&!c?._features.forceBitmapOverHTMLImageElement)return s("LoadImage is only supported in web or BabylonNative environments."),null;let g=!1;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))if("u">typeof Blob&&"u">typeof URL){let t;t=e instanceof ArrayBuffer?e:(0,f.GetBlobBufferSource)(e),d=URL.createObjectURL(new Blob([t],{type:a})),g=!0}else d=`data:${a};base64,`+(0,i.EncodeArrayBufferToBase64)(e);else e instanceof Blob?(d=URL.createObjectURL(e),g=!0):(d=h.CleanUrl(e),d=h.PreprocessUrl(d));let y=t=>{if(s){let r=d||e.toString();s(`Error while trying to load image: ${0===r.indexOf("http")||r.length<=128?r:r.slice(0,128)+"..."}`,t)}};if(c?._features.forceBitmapOverHTMLImageElement)return L(d,t=>{c.createImageBitmap(new Blob([t],{type:a}),{premultiplyAlpha:"none",colorSpaceConversion:"none",...u}).then(e=>{r(e),g&&URL.revokeObjectURL(d)}).catch(t=>{s&&s("Error while trying to load image: "+e,t)})},void 0,o||void 0,!0,(e,t)=>{y(t)}),null;let p=new Image;!1;b(d,p);let m=[],v=()=>{for(let e of m)e.target.removeEventListener(e.name,e.handler);m.length=0};for(let e of(m.push({target:p,name:"load",handler:()=>{v(),r(p),g&&p.src&&URL.revokeObjectURL(p.src)}}),m.push({target:p,name:"error",handler:e=>{v(),y(e),g&&p.src&&URL.revokeObjectURL(p.src)}}),m.push({target:document,name:"securitypolicyviolation",handler:e=>{if(e.blockedURI!==p.src||"report"===e.disposition)return;v();let t=Error(`CSP violation of policy ${e.effectiveDirective} ${e.blockedURI}. Current policy is ${e.originalPolicy}`);l.EngineStore.UseFallbackTexture=!1,y(t),g&&p.src&&URL.revokeObjectURL(p.src),p.src=""}}),m))e.target.addEventListener(e.name,e.handler);let w="blob:"===d.substring(0,5),E="data:"===d.substring(0,5),x=()=>{w||E||!t.WebRequest.IsCustomRequestAvailable?p.src=d:L(d,(e,t,r)=>{let s=new Blob([e],{type:!a&&r?r:a}),n=URL.createObjectURL(s);g=!0,p.src=n},void 0,o||void 0,!0,(e,t)=>{y(t)})};if(!w&&!E&&o&&o.enableTexturesOffline)o.open(()=>{o&&o.loadImage(d,p)},x);else{if(-1!==d.indexOf("file:")){let e=decodeURIComponent(d.substring(5).toLowerCase());if(n.FilesInputStore.FilesToLoad[e]&&"u">typeof URL){try{let t;try{t=URL.createObjectURL(n.FilesInputStore.FilesToLoad[e])}catch(r){t=URL.createObjectURL(n.FilesInputStore.FilesToLoad[e])}p.src=t,g=!0}catch(e){p.src=""}return p}}x()}return p},"ReadFile",0,m,"RequestFile",0,v,"SetCorsBehavior",0,b])},36395,e=>{"use strict";var t=e.i(64545);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},84768,e=>{"use strict";e.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}])},10272,94047,37143,e=>{"use strict";e.s(["__decorate",0,function(e,t,r,s){var n,o=arguments.length,a=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,s);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}],10272);let t={},r={};function s(e){let t=e.getClassName();return r[t]||(r[t]={}),r[t]}function n(e,t){return(r,n)=>{let o=s(r);o[n]||(o[n]={type:e,sourceName:t})}}function o(e,t,r,s){let n=r.value;r.value=(...r)=>{let o=n;if("u">typeof _native&&_native[t]){let e=_native[t];o=s?(...t)=>s(...t)?e(...t):n(...t):e}return e[t]=o,o(...r)}}e.s(["GetDirectStore",0,s,"GetMergedStore",0,function(e){let s=e.getClassName();if(t[s])return t[s];t[s]={};let n=t[s],o=e,a=s;for(;a;){let e,t=r[a];for(let e in t)n[e]=t[e];let s=!1;do{if(!(e=Object.getPrototypeOf(o)).getClassName){s=!0;break}if(e.getClassName()!==a)break;o=e}while(e)if(s)break;a=e.getClassName(),o=e}return n}],94047),o.filter=function(e){return(t,r,s)=>o(t,r,s,e)},e.s(["expandToProperty",0,function(e,t=null){return function(e,t=null){return(r,s)=>{let n=t||"_"+s;Object.defineProperty(r,s,{get:function(){return this[n]},set:function(t){"function"==typeof this[n]?.equals&&this[n].equals(t)||this[n]!==t&&(this[n]=t,r[e].apply(this))},enumerable:!0,configurable:!0})}}(e,t)},"nativeOverride",0,o,"serialize",0,function(e){return n(0,e)},"serializeAsColor3",0,function(e){return n(2,e)},"serializeAsColor4",0,function(e){return n(8,e)},"serializeAsColorCurves",0,function(e){return n(7,e)},"serializeAsFresnelParameters",0,function(e){return n(3,e)},"serializeAsImageProcessingConfiguration",0,function(e){return n(9,e)},"serializeAsMeshReference",0,function(e){return n(6,e)},"serializeAsQuaternion",0,function(e){return n(10,e)},"serializeAsTexture",0,function(e){return n(1,e)},"serializeAsVector2",0,function(e){return n(4,e)},"serializeAsVector3",0,function(e){return n(5,e)}],37143)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12423,e=>{"use strict";class t{static GetShadersRepository(e=0){return 0===e?t.ShadersRepository:t.ShadersRepositoryWGSL}static GetShadersStore(e=0){return 0===e?t.ShadersStore:t.ShadersStoreWGSL}static GetIncludesShadersStore(e=0){return 0===e?t.IncludesShadersStore:t.IncludesShadersStoreWGSL}}t.ShadersRepository="src/Shaders/",t.ShadersStore={},t.IncludesShadersStore={},t.ShadersRepositoryWGSL="src/ShadersWGSL/",t.ShadersStoreWGSL={},t.IncludesShadersStoreWGSL={},e.s(["ShaderStore",0,t])},44939,e=>{"use strict";var t=e.i(23240);e.s(["DrawWrapper",0,class{static GetEffect(e){return void 0===e.getPipelineContext?e.effect:e}constructor(e,t=!0){this._wasPreviouslyReady=!1,this._forceRebindOnNextCall=!0,this._wasPreviouslyUsingInstances=null,this.effect=null,this.defines=null,this.drawContext=e.createDrawContext(),t&&(this.materialContext=e.createMaterialContext())}setEffect(e,t,s=!0){this.effect=e,void 0!==t&&(this.defines=t),s&&this.drawContext?.reset()}dispose(e=!1){if(this.effect){let s=this.effect;e?s.dispose():t.TimingTools.SetImmediate(()=>{s.getEngine().onEndFrameObservable.addOnce(()=>{s.dispose()})}),this.effect=null}this.drawContext?.dispose()}}])},49007,e=>{"use strict";e.s(["IntersectionInfo",0,class{constructor(e,t,s){this.bu=e,this.bv=t,this.distance=s,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},21222,e=>{"use strict";var t=e.i(96265);class s{}s.POINTERDOWN=1,s.POINTERUP=2,s.POINTERMOVE=4,s.POINTERWHEEL=8,s.POINTERPICK=16,s.POINTERTAP=32,s.POINTERDOUBLETAP=64;class i{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,s,"PointerInfo",0,class extends i{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,s,i=null){super(e,t),this._pickInfo=s,this._inputManager=i}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends i{constructor(e,s,i,r){super(e,s),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(i,r)}}])},36365,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class s{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,s,"KeyboardInfoPre",0,class extends s{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(e){this.skipOnKeyboardObservable=e}constructor(e,t){super(e,t),this.type=e,this.event=t,this.skipOnKeyboardObservable=!1}}])},76696,e=>{"use strict";var t,s;(s=t||(t={}))[s.PointerMove=0]="PointerMove",s[s.PointerDown=1]="PointerDown",s[s.PointerUp=2]="PointerUp";class i{}i.DOM_DELTA_PIXEL=0,i.DOM_DELTA_LINE=1,i.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,i])},67359,e=>{"use strict";var t=e.i(36395);class s{get min(){return this._min}get max(){return this._max}get average(){return this._average}get lastSecAverage(){return this._lastSecAverage}get current(){return this._current}get total(){return this._totalAccumulated}get count(){return this._totalValueCount}constructor(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}fetchNewFrame(){this._totalValueCount++,this._current=0,this._lastSecValueCount++}addCount(e,t){s.Enabled&&(this._current+=e,t&&this._fetchResult())}beginMonitoring(){s.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!s.Enabled)return;e&&this.fetchNewFrame();let i=t.PrecisionDate.Now;this._current=i-this._startMonitoringTime,e&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;let e=t.PrecisionDate.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}s.Enabled=!0,e.s(["PerfCounter",0,s])},22369,e=>{"use strict";var t=e.i(96265),s=e.i(23507);class i extends s.Material{constructor(e,s,i=!0,r=!1){super(e,s,void 0,r),this._normalMatrix=new t.Matrix,this._storeEffectOnSubMeshes=i}getEffect(){return this._storeEffectOnSubMeshes?this._activeEffect:super.getEffect()}isReady(e,t){return!!e&&(!this._storeEffectOnSubMeshes||!e.subMeshes||0===e.subMeshes.length||this.isReadyForSubMesh(e,e.subMeshes[0],t))}_isReadyForSubMesh(e){let t=e.materialDefines;return!this.checkReadyOnEveryCall&&!!e.effect&&!!t&&t._renderId===this.getScene().getRenderId()}bindOnlyWorldMatrix(e){this._activeEffect.setMatrix("world",e)}bindOnlyNormalMatrix(e){this._activeEffect.setMatrix("normalMatrix",e)}bind(e,t){t&&this.bindForSubMesh(e,t,t.subMeshes[0])}_afterBind(e,t=null,s){super._afterBind(e,t,s),this.getScene()._cachedEffect=t,s?s._drawWrapper._forceRebindOnNextCall=!1:this._drawWrapper._forceRebindOnNextCall=!1}_mustRebind(e,t,s,i=1){return s._drawWrapper._forceRebindOnNextCall||e.isCachedMaterialInvalid(this,t,i)}dispose(e,t,s){this._activeEffect=void 0,super.dispose(e,t,s)}}e.s(["PushMaterial",0,i])},31278,e=>{"use strict";e.s(["EffectFallbacks",0,class{constructor(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}unBindMesh(){this._mesh=null}addFallback(e,t){this._defines[e]||(e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e),this._defines[e]=[]),this._defines[e].push(t)}addCPUSkinningFallback(e,t){this._mesh=t,e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e)}get hasMoreFallbacks(){return this._currentRank<=this._maxRank}reduce(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,e=e.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),t._bonesComputationForcedToCPU=!0;let s=this._mesh.getScene();for(let e=0;e<s.meshes.length;e++){let i=s.meshes[e];if(!i.material){!this._mesh.material&&i.computeBonesUsingShaders&&i.numBoneInfluencers>0&&(i.computeBonesUsingShaders=!1);continue}if(i.computeBonesUsingShaders&&0!==i.numBoneInfluencers){if(i.material.getEffect()===t)i.computeBonesUsingShaders=!1;else if(i.subMeshes){for(let e of i.subMeshes)if(e.effect===t){i.computeBonesUsingShaders=!1;break}}}}}else{let t=this._defines[this._currentRank];if(t)for(let s=0;s<t.length;s++)e=e.replace("#define "+t[s],"");this._currentRank++}return e}}])},12033,e=>{"use strict";let t=new WeakMap;e.s(["BindVertexPullingUniforms",0,function(e,t){t.forEach((t,s)=>{let i=`vp_${s}_info`;e.setFloat4(i,t.offset,t.stride,t.type,+!!t.normalized)})},"PrepareVertexPullingUniforms",0,function(e){let s=e.getVertexBuffers();if(!s)return null;let i=t.get(e);if(i){let e=!1;for(let t in s)if(!i.has(t)){e=!0;break}if(!e)return i}else i=new Map,t.set(e,i);for(let e in s){let t=s[e];if(t){let s=t.byteOffset,r=t.byteStride,n=t.type,a=t.normalized;i.set(e,{offset:s,stride:r,type:n,normalized:a})}}return i}])},60020,e=>{e.v(t=>Promise.all(["static/chunks/2feca0xcipcyt.js"].map(t=>e.l(t))).then(()=>t(44237)))},66183,e=>{e.v(t=>Promise.all(["static/chunks/3i3gbhccmhu7j.js","static/chunks/0wrm9jr-9bw0e.js"].map(t=>e.l(t))).then(()=>t(40042)))},22649,e=>{e.v(t=>Promise.all(["static/chunks/2kazjq29jeamx.js"].map(t=>e.l(t))).then(()=>t(14610)))},39487,e=>{e.v(t=>Promise.all(["static/chunks/0_rf76jneiwal.js","static/chunks/3-shckrcpvbxu.js"].map(t=>e.l(t))).then(()=>t(26022)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,34548,e=>{"use strict";var t=e.i(10272),i=e.i(96265),s=e.i(37143),r=e.i(99267),o=e.i(81623),a=e.i(75405),n=e.i(80871);class h{constructor(){this._doNotSerialize=!1,this._isDisposed=!1,this._sceneRootNodesIndex=-1,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._onEnabledStateChangedObservable=new r.Observable,this._onClonedObservable=new r.Observable,this._inheritVisibility=!1,this._isVisible=!0}}class _{static AddNodeConstructor(e,t){this._NodeConstructors[e]=t}static Construct(e,t,i,s){let r=this._NodeConstructors[e];return r?r(t,i,s):null}set accessibilityTag(e){this._accessibilityTag=e,this.onAccessibilityTagChangedObservable.notifyObservers(e)}get accessibilityTag(){return this._accessibilityTag}get doNotSerialize(){return!!this._nodeDataStorage._doNotSerialize||!!this._parentNode&&this._parentNode.doNotSerialize}set doNotSerialize(e){this._nodeDataStorage._doNotSerialize=e}isDisposed(){return this._nodeDataStorage._isDisposed}set parent(e){if(this._parentNode===e)return;let t=this._parentNode;if(this._parentNode&&void 0!==this._parentNode._children&&null!==this._parentNode._children){let t=this._parentNode._children.indexOf(this);-1!==t&&this._parentNode._children.splice(t,1),e||this._nodeDataStorage._isDisposed||this._addToSceneRootNodes()}this._parentNode=e,this._isDirty=!0,this._parentNode&&((void 0===this._parentNode._children||null===this._parentNode._children)&&(this._parentNode._children=[]),this._parentNode._children.push(this),t||this._removeFromSceneRootNodes()),this._syncParentEnabledState()}get parent(){return this._parentNode}get inheritVisibility(){return this._nodeDataStorage._inheritVisibility}set inheritVisibility(e){this._nodeDataStorage._inheritVisibility=e}get isVisible(){return(!this.inheritVisibility||!this._parentNode||!!this._parentNode.isVisible)&&this._nodeDataStorage._isVisible}set isVisible(e){this._nodeDataStorage._isVisible=e}_serializeAsParent(e){e.parentId=this.uniqueId}_addToSceneRootNodes(){-1===this._nodeDataStorage._sceneRootNodesIndex&&(this._nodeDataStorage._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))}_removeFromSceneRootNodes(){if(-1!==this._nodeDataStorage._sceneRootNodesIndex){let e=this._scene.rootNodes,t=e.length-1;e[this._nodeDataStorage._sceneRootNodesIndex]=e[t],e[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex=this._nodeDataStorage._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._nodeDataStorage._sceneRootNodesIndex=-1}}get animationPropertiesOverride(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride}set animationPropertiesOverride(e){this._animationPropertiesOverride=e}getClassName(){return"Node"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get onEnabledStateChangedObservable(){return this._nodeDataStorage._onEnabledStateChangedObservable}get onClonedObservable(){return this._nodeDataStorage._onClonedObservable}constructor(e,t=null,s=!0){this._isDirty=!1,this._nodeDataStorage=new h,this.state="",this.metadata=null,this.reservedDataStore=null,this._accessibilityTag=null,this.onAccessibilityTagChangedObservable=new r.Observable,this._parentContainer=null,this.animations=[],this._ranges={},this.onReady=null,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._waitingParentInstanceIndex=null,this._waitingParsedUniqueId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=i.Matrix.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new r.Observable,this._onDisposeObserver=null,this._behaviors=[],this.name=e,this.id=e,this._scene=t||o.EngineStore.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache(),s&&this._addToSceneRootNodes()}getScene(){return this._scene}getEngine(){return this._scene.getEngine()}addBehavior(e,t=!1){return -1!==this._behaviors.indexOf(e)||(e.init(),this._scene.isLoading&&!t?this._scene.onDataLoadedObservable.addOnce(()=>{this._behaviors.includes(e)&&e.attach(this)}):e.attach(this),this._behaviors.push(e)),this}removeBehavior(e){let t=this._behaviors.indexOf(e);return -1===t||(this._behaviors.splice(t,1),e.detach()),this}get behaviors(){return this._behaviors}getBehaviorByName(e){for(let t of this._behaviors)if(t.name===e)return t;return null}getWorldMatrix(){return this._currentRenderId!==this._scene.getRenderId()&&this.computeWorldMatrix(),this._worldMatrix}_getWorldMatrixDeterminant(){return this._worldMatrixDeterminantIsDirty&&(this._worldMatrixDeterminantIsDirty=!1,this._worldMatrixDeterminant=this._worldMatrix.determinant()),this._worldMatrixDeterminant}get worldMatrixFromCache(){return this._worldMatrix}_initCache(){this._cache={}}updateCache(e){!e&&this.isSynchronized()||this._updateCache()}_getActionManagerForTrigger(e,t=!0){return this.parent?this.parent._getActionManagerForTrigger(e,!1):null}_updateCache(e){}_isSynchronized(){return!0}_markSyncedWithParent(){this._parentNode&&(this._parentUpdateId=this._parentNode._childUpdateId)}isSynchronizedWithParent(){return!this._parentNode||!this._parentNode._isDirty&&this._parentUpdateId===this._parentNode._childUpdateId&&this._parentNode.isSynchronized()}isSynchronized(){return(!this._parentNode||!!this.isSynchronizedWithParent())&&this._isSynchronized()}isReady(e=!1){return this._nodeDataStorage._isReady}markAsDirty(e){return this._currentRenderId=Number.MAX_VALUE,this._isDirty=!0,this}isEnabled(e=!0){return!1===e?this._nodeDataStorage._isEnabled:!!this._nodeDataStorage._isEnabled&&this._nodeDataStorage._isParentEnabled}_syncParentEnabledState(){if(this._nodeDataStorage._isParentEnabled=!this._parentNode||this._parentNode.isEnabled(),this._children)for(let e of this._children)e._syncParentEnabledState()}setEnabled(e){this._nodeDataStorage._isEnabled!==e&&(this._nodeDataStorage._isEnabled=e,this._syncParentEnabledState(),this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(e))}isDescendantOf(e){return!!this.parent&&(this.parent===e||this.parent.isDescendantOf(e))}_getDescendants(e,t=!1,i){if(this._children)for(let s=0;s<this._children.length;s++){let r=this._children[s];(!i||i(r))&&e.push(r),t||r._getDescendants(e,!1,i)}}getDescendants(e,t){let i=[];return this._getDescendants(i,e,t),i}getChildMeshes(e,t){let i=[];return this._getDescendants(i,e,e=>(!t||t(e))&&void 0!==e.cullingStrategy),i}getChildren(e,t=!0){return this.getDescendants(t,e)}_setReady(e){if(e!==this._nodeDataStorage._isReady){if(!e){this._nodeDataStorage._isReady=!1;return}this.onReady&&this.onReady(this),this._nodeDataStorage._isReady=!0}}getAnimationByName(e){for(let t=0;t<this.animations.length;t++){let i=this.animations[t];if(i.name===e)return i}return null}createAnimationRange(e,t,i){if(!this._ranges[e]){this._ranges[e]=_._AnimationRangeFactory(e,t,i);for(let s=0,r=this.animations.length;s<r;s++)this.animations[s]&&this.animations[s].createRange(e,t,i)}}deleteAnimationRange(e,t=!0){for(let i=0,s=this.animations.length;i<s;i++)this.animations[i]&&this.animations[i].deleteRange(e,t);this._ranges[e]=null}getAnimationRange(e){return this._ranges[e]||null}clone(e,t,i){let s=n.SerializationHelper.Clone(()=>new _(e,this.getScene()),this);if(t&&(s.parent=t),!i){let t=this.getDescendants(!0);for(let i=0;i<t.length;i++){let r=t[i];r.clone(e+"."+r.name,s)}}return s}getAnimationRanges(){let e,t=[];for(e in this._ranges)t.push(this._ranges[e]);return t}beginAnimation(e,t,i,s){let r=this.getAnimationRange(e);return r?this._scene.beginAnimation(this,r.from,r.to,t,i,s):null}serializeAnimationRanges(){let e=[];for(let t in this._ranges){let i=this._ranges[t];if(!i)continue;let s={};s.name=t,s.from=i.from,s.to=i.to,e.push(s)}return e}computeWorldMatrix(e){return this._worldMatrix||(this._worldMatrix=i.Matrix.Identity()),this._worldMatrix}dispose(e,t=!1){if(this._nodeDataStorage._isDisposed=!0,!e)for(let i of this.getDescendants(!0))i.dispose(e,t);for(let e of(this.parent?this.parent=null:this._removeFromSceneRootNodes(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onEnabledStateChangedObservable.clear(),this.onClonedObservable.clear(),this._behaviors))e.detach();this._behaviors.length=0,this.metadata=null}static ParseAnimationRanges(e,t,i){if(t.ranges)for(let i=0;i<t.ranges.length;i++){let s=t.ranges[i];e.createAnimationRange(s.name,s.from,s.to)}}getHierarchyBoundingVectors(e=!0,t=null){let s,r;if(this.getScene().incrementRenderId(),this.computeWorldMatrix(!0),this.getBoundingInfo&&this.subMeshes){let e=this.getBoundingInfo();s=e.boundingBox.minimumWorld.clone(),r=e.boundingBox.maximumWorld.clone()}else s=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(e)for(let e of this.getDescendants(!1)){if(e.computeWorldMatrix(!0),t&&!t(e)||!e.getBoundingInfo||0===e.getTotalVertices())continue;let o=e.getBoundingInfo().boundingBox,a=o.minimumWorld,n=o.maximumWorld;i.Vector3.CheckExtends(a,s,r),i.Vector3.CheckExtends(n,s,r)}return{min:s,max:r}}}_._AnimationRangeFactory=(e,t,i)=>{throw(0,a._WarnImport)("AnimationRange")},_._NodeConstructors={},(0,t.__decorate)([(0,s.serialize)()],_.prototype,"name",void 0),(0,t.__decorate)([(0,s.serialize)()],_.prototype,"id",void 0),(0,t.__decorate)([(0,s.serialize)()],_.prototype,"uniqueId",void 0),(0,t.__decorate)([(0,s.serialize)()],_.prototype,"state",void 0),(0,t.__decorate)([(0,s.serialize)()],_.prototype,"metadata",void 0),e.s(["Node",0,_])},69938,e=>{"use strict";var t=e.i(76535);let i=!1;e.s(["RegisterAbstractEngineRenderPass",0,function(){i||(i=!0,t.AbstractEngine.prototype.getRenderPassNames=function(){return this._renderPassNames},t.AbstractEngine.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},t.AbstractEngine.prototype.createRenderPassId=function(e){let i=++t.AbstractEngine._RenderPassIdCounter;return this._renderPassNames[i]=e??"NONAME",i},t.AbstractEngine.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(let t=0;t<this.scenes.length;++t){let i=this.scenes[t];for(let t=0;t<i.meshes.length;++t){let s=i.meshes[t];if(s._releaseRenderPassId(e),s.subMeshes)for(let t=0;t<s.subMeshes.length;++t)s.subMeshes[t]._removeDrawWrapper(e)}}})}])},59576,e=>{"use strict";var t=e.i(10272),i=e.i(37143),s=e.i(45707),r=e.i(99267),o=e.i(96265),a=e.i(34548),n=e.i(13379),h=e.i(75405),_=e.i(25348),l=e.i(85531),d=e.i(69938),c=e.i(80871);class g extends a.Node{get position(){return this._position}set position(e){this._position=e}set upVector(e){this._upVector=e}get upVector(){return this._upVector}get screenArea(){let e,t;if(this.mode===g.PERSPECTIVE_CAMERA)this.fovMode===g.FOVMODE_VERTICAL_FIXED?(t=2*this.minZ*Math.tan(this.fov/2),e=this.getEngine().getAspectRatio(this)*t):t=(e=2*this.minZ*Math.tan(this.fov/2))/this.getEngine().getAspectRatio(this);else{let i=this.getEngine().getRenderWidth()/2,s=this.getEngine().getRenderHeight()/2;e=(this.orthoRight??i)-(this.orthoLeft??-i),t=(this.orthoTop??s)-(this.orthoBottom??-s)}return e*t}set orthoLeft(e){for(let t of(this._orthoLeft=e,this._rigCameras))t.orthoLeft=e}get orthoLeft(){return this._orthoLeft}set orthoRight(e){for(let t of(this._orthoRight=e,this._rigCameras))t.orthoRight=e}get orthoRight(){return this._orthoRight}set orthoBottom(e){for(let t of(this._orthoBottom=e,this._rigCameras))t.orthoBottom=e}get orthoBottom(){return this._orthoBottom}set orthoTop(e){for(let t of(this._orthoTop=e,this._rigCameras))t.orthoTop=e}get orthoTop(){return this._orthoTop}setFocalLength(e,t=36){this.fov=2*Math.atan(t/(2*e))}get inertia(){return this._baseInertia}set inertia(e){this._baseInertia=e}set mode(e){for(let t of(this._mode=e,this._rigCameras))t.mode=e}get mode(){return this._mode}get hasMoved(){return this._hasMoved}constructor(e,t,i,a=!0){(0,d.RegisterAbstractEngineRenderPass)(),super(e,i,!1),this._position=o.Vector3.Zero(),this._upVector=o.Vector3.Up(),this.oblique=null,this._orthoLeft=null,this._orthoRight=null,this._orthoBottom=null,this._orthoTop=null,this.fov=.8,this.projectionPlaneTilt=0,this.minZ=1,this.maxZ=1e4,this._baseInertia=.9,this._mode=g.PERSPECTIVE_CAMERA,this.isIntermediate=!1,this.viewport=new _.Viewport(0,0,1,1),this.layerMask=0xfffffff,this.fovMode=g.FOVMODE_VERTICAL_FIXED,this.cameraRigMode=g.RIG_MODE_NONE,this.ignoreCameraMaxZ=!1,this.customRenderTargets=[],this.outputRenderTarget=null,this.onViewMatrixChangedObservable=new r.Observable,this.onProjectionMatrixChangedObservable=new r.Observable,this.onAfterCheckInputsObservable=new r.Observable,this.onRestoreStateObservable=new r.Observable,this.isRigCamera=!1,this._hasMoved=!1,this._rigCameras=[],this._skipRendering=!1,this._projectionMatrix=new o.Matrix,this._postProcesses=[],this._activeMeshes=new s.SmartArray(256),this._globalPosition=o.Vector3.Zero(),this._computedViewMatrix=o.Matrix.Identity(),this._doNotComputeProjectionMatrix=!1,this._transformMatrix=o.Matrix.Zero(),this._refreshFrustumPlanes=!0,this._absoluteRotation=o.Quaternion.Identity(),this._isCamera=!0,this._isLeftCamera=!1,this._isRightCamera=!1,this.layerMask=this.getScene().defaultCameraLayerMask,this.getScene().addCamera(this),a&&!this.getScene().activeCamera&&(this.getScene().activeCamera=this),this.position=t,this.renderPassId=this.getScene().getEngine().createRenderPassId(`Camera ${e}`)}storeState(){return this._stateStored=!0,this._storedFov=this.fov,this}hasStateStored(){return!!this._stateStored}_restoreStateValues(){return!!this._stateStored&&(this.fov=this._storedFov,!0)}restoreState(){return!!this._restoreStateValues()&&(this.onRestoreStateObservable.notifyObservers(this),!0)}getClassName(){return"Camera"}toString(e){let t="Name: "+this.name;if(t+=", type: "+this.getClassName(),this.animations)for(let i=0;i<this.animations.length;i++)t+=", animation[0]: "+this.animations[i].toString(e);return t}applyVerticalCorrection(){let e=this.absoluteRotation.toEulerAngles();this.projectionPlaneTilt=this._scene.useRightHandedSystem?-e.x:e.x}get globalPosition(){return this._globalPosition}getActiveMeshes(){return this._activeMeshes}isActiveMesh(e){return -1!==this._activeMeshes.indexOf(e)}isReady(e=!1){if(e){for(let e of this._postProcesses)if(e&&!e.isReady())return!1}return super.isReady(e)}_initCache(){super._initCache(),this._cache.position=new o.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.upVector=new o.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.mode=void 0,this._cache.minZ=void 0,this._cache.maxZ=void 0,this._cache.fov=void 0,this._cache.fovMode=void 0,this._cache.aspectRatio=void 0,this._cache.orthoLeft=void 0,this._cache.orthoRight=void 0,this._cache.orthoBottom=void 0,this._cache.orthoTop=void 0,this._cache.obliqueAngle=void 0,this._cache.obliqueLength=void 0,this._cache.obliqueOffset=void 0,this._cache.renderWidth=void 0,this._cache.renderHeight=void 0}_updateCache(e){e||super._updateCache(),this._cache.position.copyFrom(this.position),this._cache.upVector.copyFrom(this.upVector)}_isSynchronized(){return this._isSynchronizedViewMatrix()&&this._isSynchronizedProjectionMatrix()}_isSynchronizedViewMatrix(){return!!super._isSynchronized()&&this._cache.position.equals(this.position)&&this._cache.upVector.equals(this.upVector)&&this.isSynchronizedWithParent()}_isSynchronizedProjectionMatrix(){let e=this.ignoreCameraMaxZ?0:this.maxZ,t=this._cache.mode===this.mode&&this._cache.minZ===this.minZ&&this._cache.maxZ===e;if(!t)return!1;let i=this.getEngine();return this.mode===g.PERSPECTIVE_CAMERA?t=this._cache.fov===this.fov&&this._cache.fovMode===this.fovMode&&this._cache.aspectRatio===i.getAspectRatio(this)&&this._cache.projectionPlaneTilt===this.projectionPlaneTilt:(t=this._cache.orthoLeft===this.orthoLeft&&this._cache.orthoRight===this.orthoRight&&this._cache.orthoBottom===this.orthoBottom&&this._cache.orthoTop===this.orthoTop&&this._cache.renderWidth===i.getRenderWidth()&&this._cache.renderHeight===i.getRenderHeight(),this.oblique&&(t=t&&this._cache.obliqueAngle===this.oblique.angle&&this._cache.obliqueLength===this.oblique.length&&this._cache.obliqueOffset===this.oblique.offset)),t}attachControl(e,t){}detachControl(e){}update(){this._hasMoved=!1,this._checkInputs(),this.cameraRigMode!==g.RIG_MODE_NONE&&this._updateRigCameras(),this.getViewMatrix(),this.getProjectionMatrix()}_checkInputs(){this.onAfterCheckInputsObservable.notifyObservers(this)}get rigCameras(){return this._rigCameras}get rigPostProcess(){return this._rigPostProcess}_getFirstPostProcess(){for(let e=0;e<this._postProcesses.length;e++)if(null!==this._postProcesses[e])return this._postProcesses[e];return null}_cascadePostProcessesToRigCams(){let e=this._getFirstPostProcess();e&&e.markTextureDirty();for(let e=0,t=this._rigCameras.length;e<t;e++){let t=this._rigCameras[e],i=t._rigPostProcess;i?("pass"===i.getEffectName()&&(t.isIntermediate=0===this._postProcesses.length),t._postProcesses=this._postProcesses.slice(0).concat(i),i.markTextureDirty()):t._postProcesses=this._postProcesses.slice(0)}}attachPostProcess(e,t=null){return!e.isReusable()&&this._postProcesses.indexOf(e)>-1?(n.Logger.Error("You're trying to reuse a post process not defined as reusable."),0):(null==t||t<0?this._postProcesses.push(e):null===this._postProcesses[t]?this._postProcesses[t]=e:this._postProcesses.splice(t,0,e),this._cascadePostProcessesToRigCams(),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._postProcesses.indexOf(e))}detachPostProcess(e){let t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses[t]=null),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._cascadePostProcessesToRigCams()}getWorldMatrix(){return this._isSynchronizedViewMatrix()||this.getViewMatrix(),this._worldMatrix}_getViewMatrix(){return o.Matrix.Identity()}getViewMatrix(e){return!e&&this._isSynchronizedViewMatrix()||(this._hasMoved=!0,this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childUpdateId++,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.parent&&this.parent.onViewMatrixChangedObservable&&this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix),this._worldMatrix.getTranslationToRef(this._globalPosition)),this._computedViewMatrix}freezeProjectionMatrix(e){this._doNotComputeProjectionMatrix=!0,void 0!==e&&(this._projectionMatrix=e)}unfreezeProjectionMatrix(){this._doNotComputeProjectionMatrix=!1}getProjectionMatrix(e){if(this._doNotComputeProjectionMatrix||!e&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;let t=this.ignoreCameraMaxZ?0:this.maxZ;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=t,this._refreshFrustumPlanes=!0;let i=this.getEngine(),s=this.getScene(),r=i.useReverseDepthBuffer;if(this.mode===g.PERSPECTIVE_CAMERA)this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=i.getAspectRatio(this),this._cache.projectionPlaneTilt=this.projectionPlaneTilt,this.minZ<=0&&(this.minZ=.1),(s.useRightHandedSystem?o.Matrix.PerspectiveFovRHToRef:o.Matrix.PerspectiveFovLHToRef)(this.fov,i.getAspectRatio(this),r?t:this.minZ,r?this.minZ:t,this._projectionMatrix,this.fovMode===g.FOVMODE_VERTICAL_FIXED,i.isNDCHalfZRange,this.projectionPlaneTilt,r);else{let e=i.getRenderWidth()/2,a=i.getRenderHeight()/2;s.useRightHandedSystem?this.oblique?o.Matrix.ObliqueOffCenterRHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-a,this.orthoTop??a,r?t:this.minZ,r?this.minZ:t,this.oblique.length,this.oblique.angle,this._computeObliqueDistance(this.oblique.offset),this._projectionMatrix,i.isNDCHalfZRange):o.Matrix.OrthoOffCenterRHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-a,this.orthoTop??a,r?t:this.minZ,r?this.minZ:t,this._projectionMatrix,i.isNDCHalfZRange):this.oblique?o.Matrix.ObliqueOffCenterLHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-a,this.orthoTop??a,r?t:this.minZ,r?this.minZ:t,this.oblique.length,this.oblique.angle,this._computeObliqueDistance(this.oblique.offset),this._projectionMatrix,i.isNDCHalfZRange):o.Matrix.OrthoOffCenterLHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-a,this.orthoTop??a,r?t:this.minZ,r?this.minZ:t,this._projectionMatrix,i.isNDCHalfZRange),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.obliqueAngle=this.oblique?.angle,this._cache.obliqueLength=this.oblique?.length,this._cache.obliqueOffset=this.oblique?.offset,this._cache.renderWidth=i.getRenderWidth(),this._cache.renderHeight=i.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix}getTransformationMatrix(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix}_computeObliqueDistance(e){return(this.radius||(this.target?o.Vector3.Distance(this.position,this.target):this.position.length()))+e}_updateFrustumPlanes(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?l.Frustum.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=l.Frustum.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)}isInFrustum(e,t=!1){if(this._updateFrustumPlanes(),!t||!(this.rigCameras.length>0))return e.isInFrustum(this._frustumPlanes);{let t=!1;for(let i of this.rigCameras)i._updateFrustumPlanes(),t=t||e.isInFrustum(i._frustumPlanes);return t}}isCompletelyInFrustum(e){return this._updateFrustumPlanes(),e.isCompletelyInFrustum(this._frustumPlanes)}getForwardRay(e=100,t,i){throw(0,h._WarnImport)("Ray")}getForwardRayToRef(e,t=100,i,s){throw(0,h._WarnImport)("Ray")}dispose(e,t=!1){for(this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);this._rigCameras.length>0;){let e=this._rigCameras.pop();e&&e.dispose()}if(this._parentContainer){let e=this._parentContainer.cameras.indexOf(this);e>-1&&this._parentContainer.cameras.splice(e,1),this._parentContainer=null}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses.length=0;else if(this.cameraRigMode!==g.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses.length=0;else{let e=this._postProcesses.length;for(;--e>=0;){let t=this._postProcesses[e];t&&t.dispose(this)}}let i=this.customRenderTargets.length;for(;--i>=0;)this.customRenderTargets[i].dispose();this.customRenderTargets.length=0,this._activeMeshes.dispose(),this.getScene().getEngine().releaseRenderPassId(this.renderPassId),super.dispose(e,t)}get isLeftCamera(){return this._isLeftCamera}get isRightCamera(){return this._isRightCamera}get leftCamera(){return this._rigCameras.length<1?null:this._rigCameras[0]}get rightCamera(){return this._rigCameras.length<2?null:this._rigCameras[1]}getLeftTarget(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()}getRightTarget(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()}setCameraRigMode(e,t){if(this.cameraRigMode!==e){for(;this._rigCameras.length>0;){let e=this._rigCameras.pop();e&&e.dispose()}if(this.cameraRigMode=e,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=t.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=this._cameraRigParams.interaxialDistance/.0637*(Math.PI/180),this.cameraRigMode!==g.RIG_MODE_NONE){let e=this.createRigCamera(this.name+"_L",0);e&&(e._isLeftCamera=!0);let t=this.createRigCamera(this.name+"_R",1);t&&(t._isRightCamera=!0),e&&t&&(this._rigCameras.push(e),this._rigCameras.push(t))}this._setRigMode(t),this._cascadePostProcessesToRigCams(),this.update()}}_setRigMode(e){}_getVRProjectionMatrix(){return o.Matrix.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.ignoreCameraMaxZ?0:this.maxZ,this._cameraRigParams.vrWorkMatrix,!0,this.getEngine().isNDCHalfZRange),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix}setCameraRigParameter(e,t){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[e]=t,"interaxialDistance"===e&&(this._cameraRigParams.stereoHalfAngle=t/.0637*(Math.PI/180))}createRigCamera(e,t){return null}_updateRigCameras(){for(let e=0;e<this._rigCameras.length;e++)this._rigCameras[e].minZ=this.minZ,this._rigCameras[e].maxZ=this.ignoreCameraMaxZ?0:this.maxZ,this._rigCameras[e].fov=this.fov,this._rigCameras[e].upVector.copyFrom(this.upVector);this.cameraRigMode===g.RIG_MODE_STEREOSCOPIC_ANAGLYPH&&(this._rigCameras[0].viewport=this._rigCameras[1].viewport=this.viewport)}_setupInputs(){}serialize(){let e=c.SerializationHelper.Serialize(this);return e.uniqueId=this.uniqueId,e.type=this.getClassName(),this.parent&&this.parent._serializeAsParent(e),this.inputs&&this.inputs.serialize(e),c.SerializationHelper.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.isEnabled=this.isEnabled(),e}clone(e,t=null){let i=c.SerializationHelper.Clone(g.GetConstructorFromName(this.getClassName(),e,this.getScene(),this.interaxialDistance,this.isStereoscopicSideBySide),this);return i.name=e,i.parent=t,this.onClonedObservable.notifyObservers(i),i}getDirection(e){let t=o.Vector3.Zero();return this.getDirectionToRef(e,t),t}get absoluteRotation(){return this.getWorldMatrix().decompose(void 0,this._absoluteRotation),this._absoluteRotation}getDirectionToRef(e,t){o.Vector3.TransformNormalToRef(e,this.getWorldMatrix(),t)}static GetConstructorFromName(e,t,i,s=0,r=!0){let o=a.Node.Construct(e,t,i,{interaxial_distance:s,isStereoscopicSideBySide:r});return o||(()=>g._CreateDefaultParsedCamera(t,i))}computeWorldMatrix(){return this.getWorldMatrix()}_calculateHandednessMultiplier(){let e=this.getScene().useRightHandedSystem?-1:1;return this.parent&&0>this.parent._getWorldMatrixDeterminant()&&(e*=-1),e}}g._CreateDefaultParsedCamera=(e,t)=>{throw(0,h._WarnImport)("UniversalCamera")},g.PERSPECTIVE_CAMERA=0,g.ORTHOGRAPHIC_CAMERA=1,g.FOVMODE_VERTICAL_FIXED=0,g.FOVMODE_HORIZONTAL_FIXED=1,g.RIG_MODE_NONE=0,g.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,g.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,g.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,g.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,g.RIG_MODE_STEREOSCOPIC_INTERLACED=14,g.RIG_MODE_VR=20,g.RIG_MODE_CUSTOM=22,g.ForceAttachControlToAlwaysPreventDefault=!1,(0,t.__decorate)([(0,i.serializeAsVector3)("position")],g.prototype,"_position",void 0),(0,t.__decorate)([(0,i.serializeAsVector3)("upVector")],g.prototype,"_upVector",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"orthoLeft",null),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"orthoRight",null),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"orthoBottom",null),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"orthoTop",null),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"fov",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"projectionPlaneTilt",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"minZ",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"maxZ",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"inertia",null),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"mode",null),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"layerMask",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"fovMode",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"cameraRigMode",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"interaxialDistance",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"isStereoscopicSideBySide",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"ignoreCameraMaxZ",void 0),e.s(["Camera",0,g])}]);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37717,e=>{"use strict";var o=e.i(12423);let t="postprocessVertexShader",i=`attribute vec2 position;uniform vec2 scale;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);
|
|
2
|
+
#define CUSTOM_VERTEX_DEFINITIONS
|
|
3
|
+
void main(void) {
|
|
4
|
+
#define CUSTOM_VERTEX_MAIN_BEGIN
|
|
5
|
+
vUV=(position*madd+madd)*scale;gl_Position=vec4(position,0.0,1.0);
|
|
6
|
+
#define CUSTOM_VERTEX_MAIN_END
|
|
7
|
+
}`;o.ShaderStore.ShadersStore[t]||(o.ShaderStore.ShadersStore[t]=i),e.s(["postprocessVertexShader",0,{name:t,shader:i}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41342,e=>{"use strict";var t=e.i(68179),r=e.i(96265),s=e.i(46703),i=e.i(14953),n=e.i(84201),a=e.i(52153),o=(e.i(66749),e.i(10272)),h=e.i(45707),d=e.i(99267),l=e.i(37143),c=e.i(80871),u=e.i(77052),_=e.i(518);class p{static get ForceGLSL(){return _.EffectWrapper.ForceGLSL}static set ForceGLSL(e){_.EffectWrapper.ForceGLSL=e}static RegisterShaderCodeProcessing(e,t){_.EffectWrapper.RegisterShaderCodeProcessing(e,t)}get name(){return this._effectWrapper.name}set name(e){this._effectWrapper.name=e}get alphaMode(){return this._effectWrapper.alphaMode}set alphaMode(e){this._effectWrapper.alphaMode=e}get samples(){return this._samples}set samples(e){this._samples=Math.min(e,this._engine.getCaps().maxMSAASamples),this._textures.forEach(e=>{e.setSamples(this._samples)})}get shaderLanguage(){return this._shaderLanguage}getEffectName(){return this._fragmentUrl}set onActivate(e){this._onActivateObserver&&this.onActivateObservable.remove(this._onActivateObserver),e&&(this._onActivateObserver=this.onActivateObservable.add(e))}set onSizeChanged(e){this._onSizeChangedObserver&&this.onSizeChangedObservable.remove(this._onSizeChangedObserver),this._onSizeChangedObserver=this.onSizeChangedObservable.add(e)}set onApply(e){this._onApplyObserver&&this.onApplyObservable.remove(this._onApplyObserver),this._onApplyObserver=this.onApplyObservable.add(e)}set onBeforeRender(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)}set onAfterRender(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)}get inputTexture(){return this._textures.data[this._currentRenderTextureInd]}set inputTexture(e){this._forcedOutputTexture=e}restoreDefaultInputTexture(){this._forcedOutputTexture&&(this._forcedOutputTexture=null,this.markTextureDirty())}getCamera(){return this._camera}get texelSize(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.texelSize:(this._forcedOutputTexture&&this._texelSize.copyFromFloats(1/this._forcedOutputTexture.width,1/this._forcedOutputTexture.height),this._texelSize)}constructor(e,t,s,i,n,a,o=1,l,c,u=null,g=0,f="postprocess",b,R=!1,m=5,O,v){let P;this._parentContainer=null,this.width=-1,this.height=-1,this.nodeMaterialSource=null,this._outputTexture=null,this.autoClear=!0,this.forceAutoClearInAlphaMode=!1,this.animations=[],this.enablePixelPerfectMode=!1,this.forceFullscreenViewport=!0,this.scaleMode=1,this.alwaysForcePOT=!1,this._samples=1,this.adaptScaleToCurrentViewport=!1,this.doNotSerialize=!1,this._webGPUReady=!1,this._reusable=!1,this._renderId=0,this.externalTextureSamplerBinding=!1,this._textures=new h.SmartArray(2),this._textureCache=[],this._currentRenderTextureInd=0,this._scaleRatio=new r.Vector2(1,1),this._texelSize=r.Vector2.Zero(),this.onActivateObservable=new d.Observable,this.onSizeChangedObservable=new d.Observable,this.onApplyObservable=new d.Observable,this.onBeforeRenderObservable=new d.Observable,this.onAfterRenderObservable=new d.Observable,this.onDisposeObservable=new d.Observable;let x=1,T=null;if(s&&!Array.isArray(s)){const e=s;s=e.uniforms??null,i=e.samplers??null,x=e.size??1,a=e.camera??null,o=e.samplingMode??1,l=e.engine,c=e.reusable,u=Array.isArray(e.defines)?e.defines.join("\n"):e.defines??null,g=e.textureType??0,f=e.vertexUrl??"postprocess",b=e.indexParameters,R=e.blockCompilation??!1,m=e.textureFormat??5,O=e.shaderLanguage??0,T=e.uniformBuffers??null,v=e.extraInitializations,P=e.effectWrapper}else n&&(x="number"==typeof n?n:{width:n.width,height:n.height});if(this._useExistingThinPostProcess=!!P,this._effectWrapper=P??new _.EffectWrapper({name:e,useShaderStore:!0,useAsPostProcess:!0,fragmentShader:t,engine:l||a?.getScene().getEngine(),uniforms:s,samplers:i,uniformBuffers:T,defines:u,vertexUrl:f,indexParameters:b,blockCompilation:!0,shaderLanguage:O,extraInitializations:void 0}),this.name=e,this.onEffectCreatedObservable=this._effectWrapper.onEffectCreatedObservable,null!=a?(this._camera=a,this._scene=a.getScene(),a.attachPostProcess(this),this._engine=this._scene.getEngine(),this._scene.addPostProcess(this),this.uniqueId=this._scene.getUniqueId()):l&&(this._engine=l,this._engine.postProcesses.push(this)),this._options=x,this.renderTargetSamplingMode=o||1,this._reusable=c||!1,this._textureType=g,this._textureFormat=m,this._shaderLanguage=O||0,this._samplers=i||[],-1===this._samplers.indexOf("textureSampler")&&this._samplers.push("textureSampler"),this._fragmentUrl=t,this._vertexUrl=f,this._parameters=s||[],-1===this._parameters.indexOf("scale")&&this._parameters.push("scale"),this._uniformBuffers=T||[],this._indexParameters=b,!this._useExistingThinPostProcess){this._webGPUReady=1===this._shaderLanguage;const e=[];this._gatherImports(this._engine.isWebGPU&&!p.ForceGLSL,e),this._effectWrapper._webGPUReady=this._webGPUReady,this._effectWrapper._postConstructor(R,u,v,e)}}_gatherImports(t=!1,r){t&&this._webGPUReady?r.push(Promise.all([e.A(37828)])):r.push(Promise.all([e.A(35413)]))}getClassName(){return"PostProcess"}getEngine(){return this._engine}getEffect(){return this._effectWrapper.drawWrapper.effect}shareOutputWith(e){return this._disposeTextures(),this._shareOutputWithPostProcess=e,this}useOwnOutput(){0==this._textures.length&&(this._textures=new h.SmartArray(2)),this._shareOutputWithPostProcess=null}updateEffect(e=null,t=null,r=null,s,i,n,a,o){this._effectWrapper.updateEffect(e,t,r,s,i,n,a,o),this._postProcessDefines=Array.isArray(this._effectWrapper.options.defines)?this._effectWrapper.options.defines.join("\n"):this._effectWrapper.options.defines}isReusable(){return this._reusable}markTextureDirty(){this.width=-1}_createRenderTargetTexture(e,t,r=0){for(let s=0;s<this._textureCache.length;s++)if(this._textureCache[s].texture.width===e.width&&this._textureCache[s].texture.height===e.height&&this._textureCache[s].postProcessChannel===r&&this._textureCache[s].texture._generateDepthBuffer===t.generateDepthBuffer&&this._textureCache[s].texture.samples===t.samples)return this._textureCache[s].texture;let s=this._engine.createRenderTargetTexture(e,t);return this._textureCache.push({texture:s,postProcessChannel:r,lastUsedRenderId:-1}),s}_flushTextureCache(){let e=this._renderId;for(let t=this._textureCache.length-1;t>=0;t--)if(e-this._textureCache[t].lastUsedRenderId>100){let e=!1;for(let r=0;r<this._textures.length;r++)if(this._textures.data[r]===this._textureCache[t].texture){e=!0;break}e||(this._textureCache[t].texture.dispose(),this._textureCache.splice(t,1))}}resize(e,t,r=null,s=!1,i=!1){this._textures.length>0&&this._textures.reset(),this.width=e,this.height=t;let n=null;if(r){for(let e=0;e<r._postProcesses.length;e++)if(null!==r._postProcesses[e]){n=r._postProcesses[e];break}}let a={width:this.width,height:this.height},o={generateMipMaps:s,generateDepthBuffer:i||n===this,generateStencilBuffer:(i||n===this)&&this._engine.isStencilEnable,samplingMode:this.renderTargetSamplingMode,type:this._textureType,format:this._textureFormat,samples:this._samples,label:"PostProcessRTT-"+this.name};this._textures.push(this._createRenderTargetTexture(a,o,0)),this._reusable&&this._textures.push(this._createRenderTargetTexture(a,o,1)),this._texelSize.copyFromFloats(1/this.width,1/this.height),this.onSizeChangedObservable.notifyObservers(this)}_getTarget(){let e;if(this._shareOutputWithPostProcess)e=this._shareOutputWithPostProcess.inputTexture;else if(this._forcedOutputTexture)e=this._forcedOutputTexture,this.width=this._forcedOutputTexture.width,this.height=this._forcedOutputTexture.height;else{let t;e=this.inputTexture;for(let r=0;r<this._textureCache.length;r++)if(this._textureCache[r].texture===e){t=this._textureCache[r];break}t&&(t.lastUsedRenderId=this._renderId)}return e}activate(e,r=null,s){let i=null===e||void 0!==e.cameraRigMode?e||this._camera:null,n=i?.getScene()??e,a=n.getEngine(),o=a.getCaps().maxTextureSize,h=(r?r.width:this._engine.getRenderWidth(!0))*this._options|0,d=(r?r.height:this._engine.getRenderHeight(!0))*this._options|0,l=this._options.width||h,c=this._options.height||d,u=7!==this.renderTargetSamplingMode&&1!==this.renderTargetSamplingMode&&2!==this.renderTargetSamplingMode,_=null;if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(this.adaptScaleToCurrentViewport){let e=a.currentViewport;e&&(l*=e.width,c*=e.height)}(u||this.alwaysForcePOT)&&(this._options.width||(l=a.needPOTTextures?(0,t.GetExponentOfTwo)(l,o,this.scaleMode):l),this._options.height||(c=a.needPOTTextures?(0,t.GetExponentOfTwo)(c,o,this.scaleMode):c)),this.width===l&&this.height===c&&(_=this._getTarget())||this.resize(l,c,i,u,s),this._textures.forEach(e=>{e.samples!==this.samples&&this._engine.updateRenderTargetTextureSampleCount(e,this.samples)}),this._flushTextureCache(),this._renderId++}return _||(_=this._getTarget()),this.enablePixelPerfectMode?(this._scaleRatio.copyFromFloats(h/l,d/c),this._engine.bindFramebuffer(_,0,h,d,this.forceFullscreenViewport)):(this._scaleRatio.copyFromFloats(1,1),this._engine.bindFramebuffer(_,0,void 0,void 0,this.forceFullscreenViewport)),this._engine._debugInsertMarker?.(`post process ${this.name} input`),this.onActivateObservable.notifyObservers(i),this.autoClear&&(0===this.alphaMode||this.forceAutoClearInAlphaMode)&&this._engine.clear(this.clearColor?this.clearColor:n.clearColor,n._allowPostProcessClearColor,!0,!0),this._reusable&&(this._currentRenderTextureInd=(this._currentRenderTextureInd+1)%2),_}get isSupported(){return this._effectWrapper.drawWrapper.effect.isSupported}get aspectRatio(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.aspectRatio:this._forcedOutputTexture?this._forcedOutputTexture.width/this._forcedOutputTexture.height:this.width/this.height}isReady(){return this._effectWrapper.isReady()}apply(){let e;return this._effectWrapper.isReady()?(this._engine.enableEffect(this._effectWrapper.drawWrapper),this._engine.setState(!1),this._engine.setDepthBuffer(!1),this._engine.setDepthWrite(!1),this.alphaConstants&&this.getEngine().setAlphaConstants(this.alphaConstants.r,this.alphaConstants.g,this.alphaConstants.b,this.alphaConstants.a),this._engine.setAlphaMode(this.alphaMode),e=this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.inputTexture:this._forcedOutputTexture?this._forcedOutputTexture:this.inputTexture,this.externalTextureSamplerBinding||this._effectWrapper.drawWrapper.effect._bindTexture("textureSampler",e?.texture),this._effectWrapper.drawWrapper.effect.setVector2("scale",this._scaleRatio),this.onApplyObservable.notifyObservers(this._effectWrapper.drawWrapper.effect),this._effectWrapper.bind(!0),this._effectWrapper.drawWrapper.effect):null}_disposeTextures(){this._shareOutputWithPostProcess||this._forcedOutputTexture?this._disposeTextureCache():(this._disposeTextureCache(),this._textures.dispose())}_disposeTextureCache(){for(let e=this._textureCache.length-1;e>=0;e--)this._textureCache[e].texture.dispose();this._textureCache.length=0}setPrePassRenderer(e){return!!this._prePassEffectConfiguration&&(this._prePassEffectConfiguration=e.addEffectConfiguration(this._prePassEffectConfiguration),this._prePassEffectConfiguration.enabled=!0,!0)}dispose(e){let t;if(e=e||this._camera,this._useExistingThinPostProcess||this._effectWrapper.dispose(),this._disposeTextures(),this._scene&&this._scene.removePostProcess(this),this._parentContainer&&((t=this._parentContainer.postProcesses.indexOf(this))>-1&&this._parentContainer.postProcesses.splice(t,1),this._parentContainer=null),-1!==(t=this._engine.postProcesses.indexOf(this))&&this._engine.postProcesses.splice(t,1),this.onDisposeObservable.notifyObservers(),e){if(e.detachPostProcess(this),0===(t=e._postProcesses.indexOf(this))&&e._postProcesses.length>0){let e=this._camera._getFirstPostProcess();e&&e.markTextureDirty()}this.onActivateObservable.clear(),this.onAfterRenderObservable.clear(),this.onApplyObservable.clear(),this.onBeforeRenderObservable.clear(),this.onSizeChangedObservable.clear(),this.onEffectCreatedObservable.clear()}}serialize(){let e=c.SerializationHelper.Serialize(this),t=this.getCamera()||this._scene&&this._scene.activeCamera;return e.customType="BABYLON."+this.getClassName(),e.cameraId=t?t.id:null,e.reusable=this._reusable,e.textureType=this._textureType,e.fragmentUrl=this._fragmentUrl,e.parameters=this._parameters,e.samplers=this._samplers,e.uniformBuffers=this._uniformBuffers,e.options=this._options,e.defines=this._postProcessDefines,e.textureFormat=this._textureFormat,e.vertexUrl=this._vertexUrl,e.indexParameters=this._indexParameters,e}clone(){let e=this.serialize();e._engine=this._engine,e.cameraId=null;let t=p.Parse(e,this._scene,"");return t?(t.onActivateObservable=this.onActivateObservable.clone(),t.onSizeChangedObservable=this.onSizeChangedObservable.clone(),t.onApplyObservable=this.onApplyObservable.clone(),t.onBeforeRenderObservable=this.onBeforeRenderObservable.clone(),t.onAfterRenderObservable=this.onAfterRenderObservable.clone(),t._prePassEffectConfiguration=this._prePassEffectConfiguration,t):null}static Parse(e,t,r){let s=(0,u.GetClass)(e.customType);if(!s||!s._Parse)return null;let i=t?t.getCameraById(e.cameraId):null;return s._Parse(e,i,t,r)}static _Parse(e,t,r,s){return c.SerializationHelper.Parse(()=>new p(e.name,e.fragmentUrl,e.parameters,e.samplers,e.options,t,e.renderTargetSamplingMode,e._engine,e.reusable,e.defines,e.textureType,e.vertexUrl,e.indexParameters,!1,e.textureFormat),e,r,s)}}(0,o.__decorate)([(0,l.serialize)()],p.prototype,"uniqueId",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"name",null),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"width",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"height",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"renderTargetSamplingMode",void 0),(0,o.__decorate)([(0,l.serializeAsColor4)()],p.prototype,"clearColor",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"autoClear",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"forceAutoClearInAlphaMode",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"alphaMode",null),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"alphaConstants",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"enablePixelPerfectMode",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"forceFullscreenViewport",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"scaleMode",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"alwaysForcePOT",void 0),(0,o.__decorate)([(0,l.serialize)("samples")],p.prototype,"_samples",void 0),(0,o.__decorate)([(0,l.serialize)()],p.prototype,"adaptScaleToCurrentViewport",void 0);var g=e.i(13379),f=e.i(58720),b=f,R=e.i(63132),m=e.i(33855),O=e.i(72161),v=e.i(48657),P=e.i(23240),x=e.i(21823);class T{get renderList(){return this._renderList}set renderList(e){this._renderList!==e&&(this._unObserveRenderList&&(this._unObserveRenderList(),this._unObserveRenderList=null),e&&(this._unObserveRenderList=(0,v._ObserveArray)(e,this._renderListHasChanged)),this._renderList=e)}get disableImageProcessing(){return this._disableImageProcessing}set disableImageProcessing(e){e!==this._disableImageProcessing&&(this._disableImageProcessing=e,this._scene.markAllMaterialsAsDirty(64))}get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){this._disableDepthPrePass=e,this._renderingManager.disableDepthPrePass=e}get name(){return this._name}set name(e){if(this._name!==e){if(this._name=e,this._sceneUBOs)for(let e=0;e<this._sceneUBOs.length;++e)this._sceneUBOs[e].name=`Scene ubo #${e} for ${this.name}`;if(this._scene)for(let e=0;e<this._renderPassIds.length;++e){let t=this._renderPassIds[e];this._engine._renderPassNames[t]=`${this._name}#${e}`}}}get renderPassIds(){return this._renderPassIds}get currentRefreshId(){return this._currentRefreshId}getActiveMeshes(){return this._activeMeshes}setMaterialForRendering(e,t){let r;r=Array.isArray(e)?e:[e];for(let e=0;e<r.length;++e)for(let s=0;s<this.options.numPasses;++s){let i=r[e];r[e].isAnInstance&&(i=r[e].sourceMesh),i.setMaterialForRenderPass(this._renderPassIds[s],void 0!==t?Array.isArray(t)?t[s]:t:void 0)}}_freezeActiveMeshes(e){this._freezeActiveMeshesCancel=(0,P._RetryWithInterval)(()=>this._checkReadiness(),()=>{if(this._freezeActiveMeshesCancel=null,e)for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._freeze();this._prepareRenderingManager(0,!0),this._isFrozen=!0},(e,t)=>{this._freezeActiveMeshesCancel=null,t?(g.Logger.Error("ObjectRenderer: Timeout while waiting for the renderer to be ready."),e&&g.Logger.Error(e)):(g.Logger.Error("ObjectRenderer: An unexpected error occurred while waiting for the renderer to be ready."),e&&(g.Logger.Error(e),e.stack&&g.Logger.Error(e.stack)))})}_unfreezeActiveMeshes(){this._freezeActiveMeshesCancel?.(),this._freezeActiveMeshesCancel=null;for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._unFreeze();this._isFrozen=!1}constructor(e,t,r){this._unObserveRenderList=null,this._renderListHasChanged=(e,t)=>{let r=this._renderList?this._renderList.length:0;if(0===t&&r>0||0===r)for(let e of this._scene.meshes)e._markSubMeshesAsLightDirty()},this.particleSystemList=null,this.getCustomRenderList=null,this.renderMeshes=!0,this.renderDepthOnlyMeshes=!0,this.renderOpaqueMeshes=!0,this.renderAlphaTestMeshes=!0,this.renderTransparentMeshes=!0,this.renderParticles=!0,this.renderSprites=!1,this.forceLayerMaskCheck=!1,this.enableBoundingBoxRendering=!1,this.enableOutlineRendering=!0,this._disableImageProcessing=!1,this.dontSetTransformationMatrix=!1,this._disableDepthPrePass=!1,this.onBeforeRenderObservable=new d.Observable,this.onAfterRenderObservable=new d.Observable,this.onBeforeRenderingManagerRenderObservable=new d.Observable,this.onAfterRenderingManagerRenderObservable=new d.Observable,this.onInitRenderingObservable=new d.Observable,this.onFinishRenderingObservable=new d.Observable,this.onFastPathRenderObservable=new d.Observable,this._currentRefreshId=-1,this._refreshRate=1,this._currentApplyByPostProcessSetting=!1,this._activeMeshes=new h.SmartArray(256),this._activeBoundingBoxes=new h.SmartArray(32),this._currentFrameId=-1,this._currentSceneUBOIndex=0,this._isFrozen=!1,this._freezeActiveMeshesCancel=null,this._currentSceneCamera=null,this.name=e,this._scene=t,this._engine=this._scene.getEngine(),this._useUBO=this._engine.supportsUniformBuffers,this.renderList=[],this._renderPassIds=[],this.options={numPasses:1,doNotChangeAspectRatio:!0,enableClusteredLights:!1,...r},this._createRenderPassId(),this.renderPassId=this._renderPassIds[0],this._renderingManager=new O.RenderingManager(t),this._renderingManager._useSceneAutoClearSetup=!0,this.options.enableClusteredLights&&this.onInitRenderingObservable.add(()=>{for(let e of this._scene.lights)e.getTypeID()===x.LightConstants.LIGHTTYPEID_CLUSTERED_CONTAINER&&e.isSupported&&e._updateBatches(this.activeCamera).render()}),this._scene.addObjectRenderer(this)}_releaseRenderPassId(){for(let e=0;e<this.options.numPasses;++e)this._engine.releaseRenderPassId(this._renderPassIds[e]);this._renderPassIds.length=0}_createRenderPassId(){this._releaseRenderPassId();for(let e=0;e<this.options.numPasses;++e)this._renderPassIds[e]=this._engine.createRenderPassId(`${this.name}#${e}`)}_createSceneUBO(e,t){let r=this._scene.getEngine(),s=new m.UniformBuffer(r,void 0,t,e,void 0,!1);return s.addUniform("viewProjection",16),t&&s.addUniform("viewProjectionR",16),s.addUniform("view",16),s.addUniform("projection",16),s.addUniform("vEyePosition",4),s.addUniform("inverseProjection",16),s}_getSceneUBO(){this._currentFrameId!==this._engine.frameId&&(this._currentSceneUBOIndex=0,this._currentFrameId=this._engine.frameId),this._sceneUBOs||(this._sceneUBOs=[],this._sceneUBOIsMultiview=[]);let e=this._engine._currentRenderTarget,t=!!(e&&e.texture?.isMultiview)||!!this._scene._multiviewSceneUboIsActive;if(this._currentSceneUBOIndex>=this._sceneUBOs.length){let e=this._sceneUBOs.length;this._sceneUBOs.push(this._createSceneUBO(`Scene ubo #${e} for ${this.name}`,t)),this._sceneUBOIsMultiview.push(t)}else this._sceneUBOIsMultiview[this._currentSceneUBOIndex]!==t&&(this._sceneUBOs[this._currentSceneUBOIndex].dispose(),this._sceneUBOs[this._currentSceneUBOIndex]=this._createSceneUBO(`Scene ubo #${this._currentSceneUBOIndex} for ${this.name}`,t),this._sceneUBOIsMultiview[this._currentSceneUBOIndex]=t);let r=this._sceneUBOs[this._currentSceneUBOIndex++];return r.unbindEffect(),r}resetRefreshCounter(){this._currentRefreshId=-1}get refreshRate(){return this._refreshRate}set refreshRate(e){this._refreshRate=e,this.resetRefreshCounter()}shouldRender(){return!!this._engine.snapshotRendering||(-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1))}isReadyForRendering(e,t){this.prepareRenderList(),this.initRender(e,t);let r=this._checkReadiness();return this.finishRender(),r}prepareRenderList(){let e=this._scene;if(this._waitingRenderList){if(!this.renderListPredicate){this.renderList=[];for(let t=0;t<this._waitingRenderList.length;t++){let r=this._waitingRenderList[t],s=e.getMeshById(r);s&&this.renderList.push(s)}}this._waitingRenderList=void 0}if(this.renderListPredicate){this.renderList?this.renderList.length=0:this.renderList=[];let e=this._scene.meshes;for(let t=0;t<e.length;t++){let r=e[t];this.renderListPredicate(r)&&this.renderList.push(r)}}this._currentApplyByPostProcessSetting=this._scene.imageProcessingConfiguration.applyByPostProcess,this._disableImageProcessing&&(this._scene.imageProcessingConfiguration._applyByPostProcess=this._disableImageProcessing)}initRender(e,t){let r=this.activeCamera??this._scene.activeCamera;this._currentSceneCamera=this._scene.activeCamera,this._useUBO&&(this._currentSceneUBO=this._scene.getSceneUniformBuffer(),this._currentSceneUBO.unbindEffect(),this._scene.setSceneUniformBuffer(this._getSceneUBO())),this.onInitRenderingObservable.notifyObservers(this),r&&(this.dontSetTransformationMatrix||this._scene.setTransformMatrix(r.getViewMatrix(),r.getProjectionMatrix(!0)),this._scene._activeCamera=r,this._engine.setViewport(r.rigParent?r.rigParent.viewport:r.viewport,e,t)),this._useUBO&&this._scene.finalizeSceneUbo(),this._defaultRenderListPrepared=!1}finishRender(){let e=this._scene;this._useUBO&&this._scene.setSceneUniformBuffer(this._currentSceneUBO),this._disableImageProcessing&&(e.imageProcessingConfiguration._applyByPostProcess=this._currentApplyByPostProcessSetting),e._activeCamera=this._currentSceneCamera,this._currentSceneCamera&&(this.activeCamera&&this.activeCamera!==e.activeCamera&&e.setTransformMatrix(this._currentSceneCamera.getViewMatrix(),this._currentSceneCamera.getProjectionMatrix(!0)),this._engine.setViewport(this._currentSceneCamera.viewport)),e.resetCachedMaterial(),this.onFinishRenderingObservable.notifyObservers(this)}render(e=0,t=!1){let r=this._engine.currentRenderPassId;if(this._engine.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e),this._engine.snapshotRendering&&1===this._engine.snapshotRenderingMode)this.onFastPathRenderObservable.notifyObservers(e);else{let t=this._prepareRenderingManager(e),r=this._scene.getOutlineRenderer?.(),s=r?.enabled;r&&(r.enabled=this.enableOutlineRendering),this.onBeforeRenderingManagerRenderObservable.notifyObservers(e),this._renderingManager.render(this.customRenderFunction,t,this.renderParticles,this.renderSprites,this.renderDepthOnlyMeshes,this.renderOpaqueMeshes,this.renderAlphaTestMeshes,this.renderTransparentMeshes,this.customRenderTransparentSubMeshes),this.onAfterRenderingManagerRenderObservable.notifyObservers(e),r&&(r.enabled=s)}t||this.onAfterRenderObservable.notifyObservers(e),this._engine.currentRenderPassId=r}_checkReadiness(){let e=this._scene,t=this._engine.currentRenderPassId,r=!0;e.getViewMatrix()||e.updateTransformMatrix();let s=this.options.numPasses;for(let t=0;t<s&&r;t++){let i=this.renderList?this.renderList:e.frameGraph?e.meshes:e.getActiveMeshes().data,n=this.renderList||e.frameGraph?i.length:e.getActiveMeshes().length;this._engine.currentRenderPassId=this._renderPassIds[t],this.onBeforeRenderObservable.notifyObservers(t);let a=null,o=n;this.getCustomRenderList&&(a=this.getCustomRenderList(t,i,n))&&(o=a.length),a||(a=i),this.options.doNotChangeAspectRatio||e.updateTransformMatrix(!0);for(let e=0;e<o&&r;++e){let t=a[e];if(t.isEnabled()&&!t.isBlocked&&t.isVisible&&t.subMeshes){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(t,this.refreshRate,!0)){r=!1;continue}}else if(!t.isReady(!0)){r=!1;continue}}}this.onAfterRenderObservable.notifyObservers(t),s>1&&(e.incrementRenderId(),e.resetCachedMaterial())}for(let t of this.particleSystemList||e.particleSystems)t.isReady()||(r=!1);return this._engine.currentRenderPassId=t,r}_prepareRenderingManager(e=0,t=!1){let r,s,i=this._scene,n=null,a=this.renderList?this.renderList:i.frameGraph?i.meshes:i.getActiveMeshes().data,o=this.renderList||i.frameGraph?a.length:i.getActiveMeshes().length;if(this.getCustomRenderList&&(n=this.getCustomRenderList(e,a,o)),n)r=n.length,s=this.forceLayerMaskCheck;else{if(this._defaultRenderListPrepared&&!t&&!this._engine.isWebGPU)return a;this._defaultRenderListPrepared=!0,n=a,r=o,s=!this.renderList||this.forceLayerMaskCheck}let h=i.activeCamera,d=this.cameraForLOD??h,l=i.getBoundingBoxRenderer?.();if(i._activeMeshesFrozen&&this._isFrozen){if(this._renderingManager.resetSprites(),this.enableBoundingBoxRendering&&l){l.reset();for(let e=0;e<this._activeBoundingBoxes.length;e++){let t=this._activeBoundingBoxes.data[e];l.renderList.push(t)}}return n}if(this._renderingManager.reset(),this._activeMeshes.reset(),this._activeBoundingBoxes.reset(),l&&l.reset(),this.renderMeshes){let e=i.getRenderId(),t=i.getFrameId();for(let a=0;a<r;a++){let r=n[a];if(r&&!r.isBlocked){let n,a;if(this.customIsReadyFunction){if(!this.customIsReadyFunction(r,this.refreshRate,!1)){this.resetRefreshCounter();continue}}else if(!r.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}if(d){let e=r._internalAbstractMeshDataInfo._currentLOD.get(d);e&&e[1]===t?n=e[0]:(n=i.customLODSelector?i.customLODSelector(r,d):r.getLOD(d),e?(e[0]=n,e[1]=t):r._internalAbstractMeshDataInfo._currentLOD.set(d,[n,t]))}else n=r;if(!n)continue;if(n!==r&&0!==n.billboardMode&&n.computeWorldMatrix(),n._preActivateForIntermediateRendering(e),a=!!s&&!!h&&(r.layerMask&h.layerMask)==0,r.isEnabled()&&r.isVisible&&r.subMeshes&&!a){if(this._activeMeshes.push(r),n._internalAbstractMeshDataInfo._wasActiveLastFrame=!0,n!==r&&n._activate(e,!0),this.enableBoundingBoxRendering&&l&&l._preActiveMesh(r),r._activate(e,!0)&&r.subMeshes.length){r.isAnInstance?r._internalAbstractMeshDataInfo._actAsRegularMesh&&(n=r):n._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,n._internalAbstractMeshDataInfo._isActiveIntermediate=!0,i._prepareSkeleton(n);for(let e=0;e<n.subMeshes.length;e++){let t=n.subMeshes[e];this.enableBoundingBoxRendering&&l&&l._evaluateSubMesh(r,t),this._renderingManager.dispatch(t,n)}}r._postActivate()}}}}if(this.enableBoundingBoxRendering&&l&&t)for(let e=0;e<l.renderList.length;e++){let t=l.renderList.data[e];this._activeBoundingBoxes.push(t)}if(this._scene.particlesEnabled&&this.renderParticles){this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);let e=this.particleSystemList||i.particleSystems;for(let t=0;t<e.length;t++){let r=e[t],s=r.emitter;r.isStarted()&&s&&(!s.position||s.isEnabled())&&this._renderingManager.dispatchParticles(r)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}return n}get renderingManager(){return this._renderingManager}setRenderingOrder(e,t=null,r=null,s=null){this._renderingManager.setRenderingOrder(e,t,r,s)}setRenderingAutoClearDepthStencil(e,t,r=!0,s=!0){this._renderingManager.setRenderingAutoClearDepthStencil(e,t,r,s),this._renderingManager._useSceneAutoClearSetup=!1}clone(){let e=new T(this.name,this._scene,this.options);return this.renderList&&(e.renderList=this.renderList.slice(0)),e}dispose(){let e=this.renderList?this.renderList:this._scene.getActiveMeshes().data,t=this.renderList?this.renderList.length:this._scene.getActiveMeshes().length;for(let r=0;r<t;r++){let t=e[r];t&&void 0!==t.getMaterialForRenderPass(this.renderPassId)&&t.setMaterialForRenderPass(this.renderPassId,void 0)}if(this.onInitRenderingObservable.clear(),this.onFinishRenderingObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderingManagerRenderObservable.clear(),this.onAfterRenderingManagerRenderObservable.clear(),this.onFastPathRenderObservable.clear(),this._releaseRenderPassId(),this.renderList=null,this._sceneUBOs)for(let e of this._sceneUBOs)e.dispose();this._sceneUBOs=void 0,this._scene.removeObjectRenderer(this)}_rebuild(){this.refreshRate===T.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=T.REFRESHRATE_RENDER_ONCE)}freeRenderingGroups(){this._renderingManager&&this._renderingManager.freeRenderingGroups()}}T.REFRESHRATE_RENDER_ONCE=0,T.REFRESHRATE_RENDER_ONEVERYFRAME=1,T.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2;var y=e.i(75405);class M extends b.Texture{get renderListPredicate(){return this._objectRenderer.renderListPredicate}set renderListPredicate(e){this._objectRenderer.renderListPredicate=e}get renderList(){return this._objectRenderer.renderList}set renderList(e){this._objectRenderer.renderList=e}get particleSystemList(){return this._objectRenderer.particleSystemList}set particleSystemList(e){this._objectRenderer.particleSystemList=e}get getCustomRenderList(){return this._objectRenderer.getCustomRenderList}set getCustomRenderList(e){this._objectRenderer.getCustomRenderList=e}get renderParticles(){return this._objectRenderer.renderParticles}set renderParticles(e){this._objectRenderer.renderParticles=e}get renderSprites(){return this._objectRenderer.renderSprites}set renderSprites(e){this._objectRenderer.renderSprites=e}get enableBoundingBoxRendering(){return this._objectRenderer.enableBoundingBoxRendering}set enableBoundingBoxRendering(e){this._objectRenderer.enableBoundingBoxRendering=e}get enableOutlineRendering(){return this._objectRenderer.enableOutlineRendering}set enableOutlineRendering(e){this._objectRenderer.enableOutlineRendering=e}get forceLayerMaskCheck(){return this._objectRenderer.forceLayerMaskCheck}set forceLayerMaskCheck(e){this._objectRenderer.forceLayerMaskCheck=e}get activeCamera(){return this._objectRenderer.activeCamera}set activeCamera(e){this._objectRenderer.activeCamera=e}get cameraForLOD(){return this._objectRenderer.cameraForLOD}set cameraForLOD(e){this._objectRenderer.cameraForLOD=e}get disableImageProcessing(){return this._objectRenderer.disableImageProcessing}set disableImageProcessing(e){this._objectRenderer.disableImageProcessing=e}get customIsReadyFunction(){return this._objectRenderer.customIsReadyFunction}set customIsReadyFunction(e){this._objectRenderer.customIsReadyFunction=e}get customRenderFunction(){return this._objectRenderer.customRenderFunction}set customRenderFunction(e){this._objectRenderer.customRenderFunction=e}get postProcesses(){return this._postProcesses}get _prePassEnabled(){return!!this._prePassRenderTarget&&this._prePassRenderTarget.enabled}set onAfterUnbind(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)}get onBeforeRenderObservable(){return this._objectRenderer.onBeforeRenderObservable}set onBeforeRender(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)}get onAfterRenderObservable(){return this._objectRenderer.onAfterRenderObservable}set onAfterRender(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)}set onClear(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)}get _waitingRenderList(){return this._objectRenderer._waitingRenderList}set _waitingRenderList(e){this._objectRenderer._waitingRenderList=e}get renderPassId(){return this._objectRenderer.renderPassId}get renderPassIds(){return this._objectRenderer.renderPassIds}get currentRefreshId(){return this._objectRenderer.currentRefreshId}setMaterialForRendering(e,t){this._objectRenderer.setMaterialForRendering(e,t)}get isMulti(){return this._renderTarget?.isMulti??!1}get renderTargetOptions(){return this._renderTargetOptions}get renderTarget(){return this._renderTarget}_onRatioRescale(){this._sizeRatio&&this.resize(this._initialSizeParameter)}set boundingBoxSize(e){if(this._boundingBoxSize&&this._boundingBoxSize.equals(e))return;this._boundingBoxSize=e;let t=this.getScene();t&&t.markAllMaterialsAsDirty(1)}get boundingBoxSize(){return this._boundingBoxSize}get depthStencilTexture(){return this._renderTarget?._depthStencilTexture??null}constructor(e,t,s,i=!1,n=!0,a=0,o=!1,h=b.Texture.TRILINEAR_SAMPLINGMODE,l=!0,c=!1,u=!1,_=5,p=!1,f,R,m=!1,O=!1){let v,P,x=!0,y=!1;if("object"==typeof i){const e=i;i=!!e.generateMipMaps,n=e.doNotChangeAspectRatio??!0,a=e.type??0,o=!!e.isCube,h=e.samplingMode??b.Texture.TRILINEAR_SAMPLINGMODE,l=e.generateDepthBuffer??!0,c=!!e.generateStencilBuffer,u=!!e.isMulti,_=e.format??5,p=!!e.delayAllocation,f=e.samples,R=e.creationFlags,m=!!e.noColorAttachment,O=!!e.useSRGBBuffer,v=e.colorAttachment,x=e.gammaSpace??x,P=e.existingObjectRenderer,y=!!e.enableClusteredLights}if(super(null,s,!i,void 0,h,void 0,void 0,void 0,void 0,_),this.ignoreCameraViewport=!1,this.onBeforeBindObservable=new d.Observable,this.onAfterUnbindObservable=new d.Observable,this.onClearObservable=new d.Observable,this.onResizeObservable=new d.Observable,this._cleared=!1,this.skipInitialClear=!1,this._samples=1,this._canRescale=!0,this._renderTarget=null,this._dontDisposeObjectRenderer=!1,this.boundingBoxPosition=r.Vector3.Zero(),this._disableEngineStages=!1,this._dumpToolsLoading=!1,!(s=this.getScene()))return;const M=this.getScene().getEngine();if(this._gammaSpace=x,this._coordinatesMode=b.Texture.PROJECTION_MODE,this.name=e,this.isRenderTarget=!0,this._initialSizeParameter=t,this._dontDisposeObjectRenderer=!!P,this._processSizeParameter(t),this._objectRenderer=P??new T(e,s,{numPasses:o?6:this.getRenderLayers()||1,doNotChangeAspectRatio:n,enableClusteredLights:y}),this._onBeforeRenderingManagerRenderObserver=this._objectRenderer.onBeforeRenderingManagerRenderObservable.add(()=>{let e=this._scene;if(!this._disableEngineStages)for(let t of e._beforeRenderTargetClearStage)t.action(this,this._currentFaceIndex,this._currentLayer);if(this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(M):this.skipInitialClear||M.clear(this.clearColor??e.clearColor,!0,!0,!0),this._doNotChangeAspectRatio||e.updateTransformMatrix(!0),!this._disableEngineStages)for(let t of e._beforeRenderTargetDrawStage)t.action(this,this._currentFaceIndex,this._currentLayer);M._debugPushGroup&&M._debugPushGroup(`Render to ${this.name} (face #${this._currentFaceIndex} layer #${this._currentLayer})`)}),this._onAfterRenderingManagerRenderObserver=this._objectRenderer.onAfterRenderingManagerRenderObservable.add(()=>{if(M._debugPopGroup&&M._debugPopGroup(),!this._disableEngineStages)for(let e of this._scene._afterRenderTargetDrawStage)e.action(this,this._currentFaceIndex,this._currentLayer);let e=this._texture?.generateMipMaps??!1;if(this._texture&&(this._texture.generateMipMaps=!1),this._postProcessManager?this._postProcessManager._finalizeFrame(!1,this._renderTarget??void 0,this._currentFaceIndex,this._postProcesses,this.ignoreCameraViewport):this._currentUseCameraPostProcess&&this._scene.postProcessManager._finalizeFrame(!1,this._renderTarget??void 0,this._currentFaceIndex),!this._disableEngineStages)for(let e of this._scene._afterRenderTargetPostProcessStage)e.action(this,this._currentFaceIndex,this._currentLayer);this._texture&&(this._texture.generateMipMaps=e),this._doNotChangeAspectRatio||this._scene.updateTransformMatrix(!0),this._currentDumpForDebug&&(this._dumpTools?this._dumpTools.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),M):g.Logger.Error("dumpTools module is still being loaded. To speed up the process import dump tools directly in your project"))}),this._onFastPathRenderObserver=this._objectRenderer.onFastPathRenderObservable.add(()=>{this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(M):this.skipInitialClear||M.clear(this.clearColor||this._scene.clearColor,!0,!0,!0)}),this._resizeObserver=M.onResizeObservable.add(()=>{}),this._generateMipMaps=!!i,this._doNotChangeAspectRatio=n,u)return;this._renderTargetOptions={generateMipMaps:i,type:a,format:this._format??void 0,samplingMode:this.samplingMode,generateDepthBuffer:l,generateStencilBuffer:c,samples:f,creationFlags:R,noColorAttachment:m,useSRGBBuffer:O,colorAttachment:v,label:this.name},this.samplingMode===b.Texture.NEAREST_SAMPLINGMODE&&(this.wrapU=b.Texture.CLAMP_ADDRESSMODE,this.wrapV=b.Texture.CLAMP_ADDRESSMODE),p||(o?(this._renderTarget=s.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions),this.coordinatesMode=b.Texture.INVCUBIC_MODE,this._textureMatrix=r.Matrix.Identity()):this._renderTarget=s.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==f&&(this.samples=f))}createDepthStencilTexture(e=0,t=!0,r=!1,s=1,i=14,n){this._renderTarget?.createDepthStencilTexture(e,t,r,s,i,n)}_processSizeParameter(e){if(e.ratio){this._sizeRatio=e.ratio;let t=this._getEngine();this._size={width:this._bestReflectionRenderTargetDimension(t.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(t.getRenderHeight(),this._sizeRatio)}}else this._size=e}get samples(){return this._renderTarget?.samples??this._samples}set samples(e){this._renderTarget&&(this._samples=this._renderTarget.setSamples(e))}addPostProcess(e){if(!this._postProcessManager){let e=this.getScene();if(!e)return;this._postProcessManager=new R.PostProcessManager(e),this._postProcesses=[]}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1}clearPostProcesses(e=!1){if(this._postProcesses){if(e)for(let e of this._postProcesses)e.dispose();this._postProcesses=[]}}removePostProcess(e){if(!this._postProcesses)return;let t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),this._postProcesses.length>0&&(this._postProcesses[0].autoClear=!1))}resetRefreshCounter(){this._objectRenderer.resetRefreshCounter()}get refreshRate(){return this._objectRenderer.refreshRate}set refreshRate(e){this._objectRenderer.refreshRate=e}_shouldRender(){return this._objectRenderer.shouldRender()}getRenderSize(){return this.getRenderWidth()}getRenderWidth(){return this._size.width?this._size.width:this._size}getRenderHeight(){return this._size.width?this._size.height:this._size}getRenderLayers(){let e=this._size.layers;if(e)return e;let t=this._size.depth;return t||0}disableRescaling(){this._canRescale=!1}get canRescale(){return this._canRescale}scale(e){let t=Math.max(1,this.getRenderSize()*e);this.resize(t)}getReflectionTextureMatrix(){return this.isCube?this._textureMatrix:super.getReflectionTextureMatrix()}resize(e){let t=this.isCube;this._renderTarget?.dispose(),this._renderTarget=null;let r=this.getScene();r&&(this._processSizeParameter(e),t?this._renderTarget=r.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):this._renderTarget=r.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))}render(e=!1,t=!1){this._render(e,t)}isReadyForRendering(){this._dumpToolsLoading||(this._dumpToolsLoading=!0,e.A(49950).then(e=>this._dumpTools=e)),this._objectRenderer.prepareRenderList(),this.onBeforeBindObservable.notifyObservers(this),this._objectRenderer.initRender(this.getRenderWidth(),this.getRenderHeight());let t=this._objectRenderer._checkReadiness();return this.onAfterUnbindObservable.notifyObservers(this),this._objectRenderer.finishRender(),t}_render(e=!1,t=!1){let r=this.getScene();if(!r)return;void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses);let s=r.getEngine();if(s._debugPushGroup&&s._debugPushGroup(`Render to ${this.name}`),this._objectRenderer.prepareRenderList(),this.onBeforeBindObservable.notifyObservers(this),this._objectRenderer.initRender(this.getRenderWidth(),this.getRenderHeight()),(this.is2DArray||this.is3D)&&!this.isMulti)for(let s=0;s<this.getRenderLayers();s++)this._renderToTarget(0,e,t,s),r.incrementRenderId(),r.resetCachedMaterial();else if(this.isCube&&!this.isMulti)for(let s=0;s<6;s++)this._renderToTarget(s,e,t),r.incrementRenderId(),r.resetCachedMaterial();else this._renderToTarget(0,e,t);this.onAfterUnbindObservable.notifyObservers(this),this._objectRenderer.finishRender(),s._debugPopGroup&&s._debugPopGroup()}_bestReflectionRenderTargetDimension(e,r){let s=e*r,i=(0,t.NearestPOT)(s+16384/(128+s));return Math.min((0,t.FloorPOT)(e),i)}_bindFrameBuffer(e=0,t=0){let r=this.getScene();if(!r)return;let s=r.getEngine();this._renderTarget&&s.bindFramebuffer(this._renderTarget,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,t)}_unbindFrameBuffer(e,t){this._renderTarget&&e.unBindFramebuffer(this._renderTarget,this.isCube,()=>{this.onAfterRenderObservable.notifyObservers(t)})}_prepareFrame(e,t,r,s){this._postProcessManager?this._prePassEnabled||this._postProcessManager._prepareFrame(this._texture,this._postProcesses)||this._bindFrameBuffer(t,r):s&&e.postProcessManager._prepareFrame(this._texture)||this._bindFrameBuffer(t,r)}_renderToTarget(e,t,r,s=0){let i=this.getScene();if(!i)return;let n=i.getEngine();this._currentFaceIndex=e,this._currentLayer=s,this._currentUseCameraPostProcess=t,this._currentDumpForDebug=r,this._prepareFrame(i,e,s,t),this._objectRenderer.render(e+s,!0),this._unbindFrameBuffer(n,e),this._texture&&this.isCube&&5===e&&n.generateMipMapsForCubemap(this._texture,!0)}setRenderingOrder(e,t=null,r=null,s=null){this._objectRenderer.setRenderingOrder(e,t,r,s)}setRenderingAutoClearDepthStencil(e,t){this._objectRenderer.setRenderingAutoClearDepthStencil(e,t)}clone(){let e=this.getSize(),t=new M(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer,void 0,this._renderTargetOptions.format,void 0,this._renderTargetOptions.samples);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,this.renderList&&(t.renderList=this.renderList.slice(0)),t}serialize(){if(!this.name)return null;let e=super.serialize();if(e.renderTargetSize=this.getRenderSize(),e.renderList=[],this.renderList)for(let t=0;t<this.renderList.length;t++)e.renderList.push(this.renderList[t].id);return e}disposeFramebufferObjects(){this._renderTarget?.dispose(!0)}releaseInternalTexture(){this._renderTarget?.releaseTextures(),this._texture=null}dispose(){this.onResizeObservable.clear(),this.onClearObservable.clear(),this.onAfterUnbindObservable.clear(),this.onBeforeBindObservable.clear(),this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this._prePassRenderTarget&&this._prePassRenderTarget.dispose(),this._objectRenderer.onBeforeRenderingManagerRenderObservable.remove(this._onBeforeRenderingManagerRenderObserver),this._objectRenderer.onAfterRenderingManagerRenderObservable.remove(this._onAfterRenderingManagerRenderObserver),this._objectRenderer.onFastPathRenderObservable.remove(this._onFastPathRenderObserver),this._dontDisposeObjectRenderer||this._objectRenderer.dispose(),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null);let e=this.getScene();if(!e)return;let t=e.customRenderTargets.indexOf(this);for(let r of(t>=0&&e.customRenderTargets.splice(t,1),e.cameras))(t=r.customRenderTargets.indexOf(this))>=0&&r.customRenderTargets.splice(t,1);this._renderTarget?.dispose(),this._renderTarget=null,this._texture=null,super.dispose()}_rebuild(){this._objectRenderer._rebuild(),this._postProcessManager&&this._postProcessManager._rebuild()}freeRenderingGroups(){this._objectRenderer.freeRenderingGroups()}getViewCount(){return 1}}M.REFRESHRATE_RENDER_ONCE=T.REFRESHRATE_RENDER_ONCE,M.REFRESHRATE_RENDER_ONEVERYFRAME=T.REFRESHRATE_RENDER_ONEVERYFRAME,M.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=T.REFRESHRATE_RENDER_ONEVERYTWOFRAMES,Object.getOwnPropertyDescriptor(M.prototype,"noPrePassRenderer")||Object.defineProperty(M.prototype,"noPrePassRenderer",(0,y._MissingSideEffectProperty)("RenderTargetTexture","noPrePassRenderer"));var C=_,S=e.i(81623);class A extends C.EffectWrapper{_gatherImports(t,r){t?(this._webGPUReady=!0,r.push(Promise.all([e.A(78398)]))):r.push(Promise.all([e.A(21236)])),super._gatherImports(t,r)}constructor(e,t=null,r){const s={name:e,engine:t||S.EngineStore.LastCreatedEngine,useShaderStore:!0,useAsPostProcess:!0,fragmentShader:A.FragmentUrl,...r};s.engine||(s.engine=S.EngineStore.LastCreatedEngine),super(s)}}A.FragmentUrl="pass";class E extends C.EffectWrapper{_gatherImports(t,r){t?(this._webGPUReady=!0,r.push(Promise.all([e.A(7133)]))):r.push(Promise.all([e.A(26167)])),super._gatherImports(t,r)}constructor(e,t=null,r){super({...r,name:e,engine:t||S.EngineStore.LastCreatedEngine,useShaderStore:!0,useAsPostProcess:!0,fragmentShader:E.FragmentUrl,defines:"#define POSITIVEX"}),this._face=0}get face(){return this._face}set face(e){if(!(e<0)&&!(e>5))switch(this._face=e,this._face){case 0:this.updateEffect("#define POSITIVEX");break;case 1:this.updateEffect("#define NEGATIVEX");break;case 2:this.updateEffect("#define POSITIVEY");break;case 3:this.updateEffect("#define NEGATIVEY");break;case 4:this.updateEffect("#define POSITIVEZ");break;case 5:this.updateEffect("#define NEGATIVEZ")}}}E.FragmentUrl="passCube";class I extends p{get face(){return this._effectWrapper.face}set face(e){this._effectWrapper.face=e}getClassName(){return"PassCubePostProcess"}constructor(e,t,r=null,s,i,n,a=0,o=!1){const h={size:"number"==typeof t?t:void 0,camera:r,samplingMode:s,engine:i,reusable:n,textureType:a,blockCompilation:o,...t};super(e,A.FragmentUrl,{effectWrapper:"number"!=typeof t&&t.effectWrapper?void 0:new E(e,i,h),...h})}static _Parse(e,t,r,s){return c.SerializationHelper.Parse(()=>new I(e.name,e.options,t,e.renderTargetSamplingMode,e._engine,e.reusable),e,r,s)}}(0,o.__decorate)([(0,l.serialize)()],I.prototype,"face",null);var L=e.i(96704);L.ToHalfFloat,L.FromHalfFloat;var B=e.i(37348),w=e.i(38118);let F="image/png",z=[134,22,135,150,246,214,150,54];function U(e){if(e.version>2)throw Error(`Unsupported babylon environment map version "${e.version}". Latest supported version is "2".`);return 2===e.version?e:e={...e,version:2,imageType:F}}async function D(e,t,r,s,i,n,a,o,h,d,l){return await new Promise((c,u)=>{if(r){let r=t.createTexture(null,!0,!0,null,1,null,e=>{u(e)},e);s?.onEffectCreatedObservable.addOnce(o=>{o.executeWhenCompiled(()=>{s.externalTextureSamplerBinding=!0,s.onApply=s=>{s._bindTexture("textureSampler",r),s.setFloat2("scale",1,t._features.needsInvertingBitmap&&e instanceof ImageBitmap?-1:1)},t.scenes.length&&(t.scenes[0].postProcessManager.directRender([s],d,!0,n,a),t.restoreDefaultFramebuffer(),r.dispose(),URL.revokeObjectURL(i),c())})})}else{if(t._uploadImageToTexture(l,e,n,a),o){let r=h[a];r&&t._uploadImageToTexture(r._texture,e,n,0)}c()}})}async function j(e,t,r=F){let s=e.getEngine();e.format=5,e.type=0,e.generateMipMaps=!0,e._cachedAnisotropicFilteringLevel=null,s.updateTextureSamplingMode(3,e),await N(e,t,!0,r),e.isReady=!0}async function W(e,t,r,s=F,i=null){let o=e.getEngine(),h=new n.InternalTexture(o,5),d=new a.BaseTexture(o,h);e._irradianceTexture=d,d._dominantDirection=i,h.isCube=!0,h.format=5,h.type=0,h.generateMipMaps=!0,h._cachedAnisotropicFilteringLevel=null,h.generateMipMaps=!0,h.width=r,h.height=r,o.updateTextureSamplingMode(3,h),await N(h,[t],!1,s),o.generateMipMapsForCubemap(h),h.isReady=!0}async function N(r,i,o,h=F){if(!(0,t.IsExponentOfTwo)(r.width))throw Error("Texture size must be a power of two");let d=(0,s.ILog2)(r.width)+1,l=r.getEngine(),c=!1,u=!1,_=null,g=null,f=null,b=l.getCaps();b.textureLOD?l._features.supportRenderAndCopyToLodForFloatTextures?b.textureHalfFloatRender&&b.textureHalfFloatLinearFiltering?(c=!0,r.type=2):b.textureFloatRender&&b.textureFloatLinearFiltering&&(c=!0,r.type=1):c=!1:(c=!1,u=o);let R=0;if(c)l.isWebGPU?(R=1,await e.A(35527)):await e.A(19392),_=new p("rgbdDecode","rgbdDecode",null,null,1,null,3,l,!1,void 0,r.type,void 0,null,!1,void 0,R),r._isRGBD=!1,r.invertY=!1,g=l.createRenderTargetCubeTexture(r.width,{generateDepthBuffer:!1,generateMipMaps:!0,generateStencilBuffer:!1,samplingMode:3,type:r.type,format:5});else if(r._isRGBD=!0,r.invertY=!0,u){f={};let e=r._lodGenerationScale,t=r._lodGenerationOffset;for(let s=0;s<3;s++){let i=(d-1)*e+t,o=Math.round(Math.min(Math.max(t+(i-t)*(1-s/2),0),i)),h=new n.InternalTexture(l,2);h.isCube=!0,h.invertY=!0,h.generateMipMaps=!1,l.updateTextureSamplingMode(2,h);let c=new a.BaseTexture(null);switch(c._isCube=!0,c._texture=h,f[o]=c,s){case 0:r._lodTextureLow=c;break;case 1:r._lodTextureMid=c;break;case 2:r._lodTextureHigh=c}}}let m=[];for(let e=0;e<i.length;e++)for(let t=0;t<6;t++){let s,n=i[e][t],a=new Blob([(0,w.GetBlobBufferSource)(n)],{type:h}),o=URL.createObjectURL(a);if(l._features.forceBitmapOverHTMLImageElement)s=l.createImageBitmap(a,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(async s=>await D(s,l,c,_,o,t,e,u,f,g,r));else{let i=new Image;i.src=o,s=new Promise((s,n)=>{i.onload=()=>{D(i,l,c,_,o,t,e,u,f,g,r).then(()=>s()).catch(e=>{n(e)})},i.onerror=e=>{n(e)}})}m.push(s)}if(await Promise.all(m),i.length<d){let e,t=Math.pow(2,d-1-i.length),s=t*t*4;switch(r.type){case 0:e=new Uint8Array(s);break;case 2:e=new Uint16Array(s);break;case 1:e=new Float32Array(s)}for(let t=i.length;t<d;t++)for(let s=0;s<6;s++)l._uploadArrayBufferViewToTexture(g?.texture||r,e,s,t)}if(g){let e=r._irradianceTexture;r._irradianceTexture=null,l._releaseTexture(r),g._swapAndDie(r),r._irradianceTexture=e}_&&_.dispose(),u&&(r._lodTextureHigh&&r._lodTextureHigh._texture&&(r._lodTextureHigh._texture.isReady=!0),r._lodTextureMid&&r._lodTextureMid._texture&&(r._lodTextureMid._texture.isReady=!0),r._lodTextureLow&&r._lodTextureLow._texture&&(r._lodTextureLow._texture.isReady=!0))}var G=e.i(20461);let V=!1;e.s(["_ENVTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,t,s,n,o){if(Array.isArray(e))return;let h=function(e){let t,r=new DataView(e.buffer,e.byteOffset,e.byteLength),s=0;for(let e=0;e<z.length;e++)if(r.getUint8(s++)!==z[e])return g.Logger.Error("Not a babylon environment map"),null;let i="";for(;t=r.getUint8(s++);)i+=String.fromCharCode(t);let n=JSON.parse(i);return(n=U(n)).binaryDataPosition=s,n.specular&&(n.specular.lodGenerationScale=n.specular.lodGenerationScale||.8),n}(e);if(h){t.width=h.width,t.height=h.width;try{V||(V=!0,a.BaseTexture.prototype._sphericalPolynomialTargetSize=0,a.BaseTexture.prototype.forceSphericalPolynomialsRecompute=function(){this._texture&&(this._texture._sphericalPolynomial=null,this._texture._sphericalPolynomialPromise=null,this._texture._sphericalPolynomialComputed=!1)},Object.defineProperty(a.BaseTexture.prototype,"sphericalPolynomial",{get:function(){if(this._texture){if(this._texture._sphericalPolynomial||this._texture._sphericalPolynomialComputed)return this._texture._sphericalPolynomial;this._texture.isReady&&(this._texture._sphericalPolynomialPromise||(this._texture._sphericalPolynomialPromise=G.CubeMapToSphericalPolynomialTools.ConvertCubeMapTextureToSphericalPolynomial(this),null===this._texture._sphericalPolynomialPromise?this._texture._sphericalPolynomialComputed=!0:this._texture._sphericalPolynomialPromise.then(e=>{this._texture._sphericalPolynomial=e,this._texture._sphericalPolynomialComputed=!0})))}return null},set:function(e){this._texture&&(this._texture._sphericalPolynomial=e)},enumerable:!0,configurable:!0})),function(e,t){let s=(t=U(t)).irradiance;if(!s)return;let n=new i.SphericalPolynomial;r.Vector3.FromArrayToRef(s.x,0,n.x),r.Vector3.FromArrayToRef(s.y,0,n.y),r.Vector3.FromArrayToRef(s.z,0,n.z),r.Vector3.FromArrayToRef(s.xx,0,n.xx),r.Vector3.FromArrayToRef(s.yy,0,n.yy),r.Vector3.FromArrayToRef(s.zz,0,n.zz),r.Vector3.FromArrayToRef(s.yz,0,n.yz),r.Vector3.FromArrayToRef(s.zx,0,n.zx),r.Vector3.FromArrayToRef(s.xy,0,n.xy),e._sphericalPolynomial=n}(t,h),(function(e,t,s){let i=(s=U(s)).specular;if(!i)return Promise.resolve([]);e._lodGenerationScale=i.lodGenerationScale;let n=[],a=function(e,t){let r=(t=U(t)).specular,s=Math.log2(t.width);if(s=Math.round(s)+1,r.mipmaps.length!==6*s)throw Error(`Unsupported specular mipmaps number "${r.mipmaps.length}"`);let i=Array(s);for(let n=0;n<s;n++){i[n]=Array(6);for(let s=0;s<6;s++){let a=r.mipmaps[6*n+s];i[n][s]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+a.position,a.length)}}return i}(t,s);n.push(j(e,a,s.imageType));let o=s.irradiance?.irradianceTexture;if(o){let i=function(e,t){t=U(t);let r=Array(6),s=t.irradiance?.irradianceTexture;if(s){if(6!==s.faces.length)throw Error(`Incorrect irradiance texture faces number "${s.faces.length}"`);for(let i=0;i<6;i++){let n=s.faces[i];r[i]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+n.position,n.length)}}return r}(t,s),a=null;s.irradiance?.irradianceTexture?.dominantDirection&&(a=r.Vector3.FromArray(s.irradiance.irradianceTexture.dominantDirection)),n.push(W(e,i,o.size,s.imageType,a))}return Promise.all(n)})(t,e,h).then(()=>{t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),n&&n()},e=>{o?.("Can not upload environment levels",e)})}catch(e){o?.("Can not upload environment file",e)}}else o&&o("Can not parse the environment file",null)}loadData(){throw".env not supported in 2d."}}],41342)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12423,t=>{"use strict";class e{static GetShadersRepository(t=0){return 0===t?e.ShadersRepository:e.ShadersRepositoryWGSL}static GetShadersStore(t=0){return 0===t?e.ShadersStore:e.ShadersStoreWGSL}static GetIncludesShadersStore(t=0){return 0===t?e.IncludesShadersStore:e.IncludesShadersStoreWGSL}}e.ShadersRepository="src/Shaders/",e.ShadersStore={},e.IncludesShadersStore={},e.ShadersRepositoryWGSL="src/ShadersWGSL/",e.ShadersStoreWGSL={},e.IncludesShadersStoreWGSL={},t.s(["ShaderStore",0,e])},85531,t=>{"use strict";var e=t.i(65002);class i{static GetPlanes(t){let o=[];for(let t=0;t<6;t++)o.push(new e.Plane(0,0,0,0));return i.GetPlanesToRef(t,o),o}static GetNearPlaneToRef(t,e){let i=t.m;e.normal.x=i[3]+i[2],e.normal.y=i[7]+i[6],e.normal.z=i[11]+i[10],e.d=i[15]+i[14],e.normalize()}static GetFarPlaneToRef(t,e){let i=t.m;e.normal.x=i[3]-i[2],e.normal.y=i[7]-i[6],e.normal.z=i[11]-i[10],e.d=i[15]-i[14],e.normalize()}static GetLeftPlaneToRef(t,e){let i=t.m;e.normal.x=i[3]+i[0],e.normal.y=i[7]+i[4],e.normal.z=i[11]+i[8],e.d=i[15]+i[12],e.normalize()}static GetRightPlaneToRef(t,e){let i=t.m;e.normal.x=i[3]-i[0],e.normal.y=i[7]-i[4],e.normal.z=i[11]-i[8],e.d=i[15]-i[12],e.normalize()}static GetTopPlaneToRef(t,e){let i=t.m;e.normal.x=i[3]-i[1],e.normal.y=i[7]-i[5],e.normal.z=i[11]-i[9],e.d=i[15]-i[13],e.normalize()}static GetBottomPlaneToRef(t,e){let i=t.m;e.normal.x=i[3]+i[1],e.normal.y=i[7]+i[5],e.normal.z=i[11]+i[9],e.d=i[15]+i[13],e.normalize()}static GetPlanesToRef(t,e){i.GetNearPlaneToRef(t,e[0]),i.GetFarPlaneToRef(t,e[1]),i.GetLeftPlaneToRef(t,e[2]),i.GetRightPlaneToRef(t,e[3]),i.GetTopPlaneToRef(t,e[4]),i.GetBottomPlaneToRef(t,e[5])}static IsPointInFrustum(t,e){for(let i=0;i<6;i++)if(0>e[i].dotCoordinate(t))return!1;return!0}}t.s(["Frustum",0,i])},45707,t=>{"use strict";class e{constructor(t){this.length=0,this.data=Array(t),this._id=e._GlobalId++}push(t){this.data[this.length++]=t,this.length>this.data.length&&(this.data.length*=2)}forEach(t){for(let e=0;e<this.length;e++)t(this.data[e])}sort(t){this.data.sort(t)}reset(){this.length=0}dispose(){this.reset(),this.data&&(this.data.length=0)}concat(t){if(0!==t.length){this.length+t.length>this.data.length&&(this.data.length=(this.length+t.length)*2);for(let e=0;e<t.length;e++)this.data[this.length++]=(t.data||t)[e]}}indexOf(t){let e=this.data.indexOf(t);return e>=this.length?-1:e}contains(t){return -1!==this.indexOf(t)}}e._GlobalId=0,t.s(["SmartArray",0,e,"SmartArrayNoDuplicate",0,class extends e{constructor(){super(...arguments),this._duplicateId=0}push(t){super.push(t),t.__smartArrayFlags||(t.__smartArrayFlags={}),t.__smartArrayFlags[this._id]=this._duplicateId}pushNoDuplicate(t){return(!t.__smartArrayFlags||t.__smartArrayFlags[this._id]!==this._duplicateId)&&(this.push(t),!0)}reset(){super.reset(),this._duplicateId++}concatWithNoDuplicate(t){if(0!==t.length){this.length+t.length>this.data.length&&(this.data.length=(this.length+t.length)*2);for(let e=0;e<t.length;e++){let i=(t.data||t)[e];this.pushNoDuplicate(i)}}}}])},36365,t=>{"use strict";class e{}e.KEYDOWN=1,e.KEYUP=2;class i{constructor(t,e){this.type=t,this.event=e}}t.s(["KeyboardEventTypes",0,e,"KeyboardInfo",0,i,"KeyboardInfoPre",0,class extends i{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(t){this.skipOnKeyboardObservable=t}constructor(t,e){super(t,e),this.type=t,this.event=e,this.skipOnKeyboardObservable=!1}}])},21222,t=>{"use strict";var e=t.i(96265);class i{}i.POINTERDOWN=1,i.POINTERUP=2,i.POINTERMOVE=4,i.POINTERWHEEL=8,i.POINTERPICK=16,i.POINTERTAP=32,i.POINTERDOUBLETAP=64;class o{constructor(t,e){this.type=t,this.event=e}}t.s(["PointerEventTypes",0,i,"PointerInfo",0,class extends o{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(t,e,i,o=null){super(t,e),this._pickInfo=i,this._inputManager=o}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends o{constructor(t,i,o,a){super(t,i),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new e.Vector2(o,a)}}])},76696,t=>{"use strict";var e,i;(i=e||(e={}))[i.PointerMove=0]="PointerMove",i[i.PointerDown=1]="PointerDown",i[i.PointerUp=2]="PointerUp";class o{}o.DOM_DELTA_PIXEL=0,o.DOM_DELTA_LINE=1,o.DOM_DELTA_PAGE=2,t.s(["EventConstants",0,o])},25348,t=>{"use strict";class e{constructor(t,e,i,o){this.x=t,this.y=e,this.width=i,this.height=o}toGlobal(t,i){return new e(this.x*t,this.y*i,this.width*t,this.height*i)}toGlobalToRef(t,e,i){return i.x=this.x*t,i.y=this.y*e,i.width=this.width*t,i.height=this.height*e,this}clone(){return new e(this.x,this.y,this.width,this.height)}}t.s(["Viewport",0,e])},70247,t=>{"use strict";var e,i,o,a,s=t.i(96265);(e=o||(o={}))[e.LOCAL=0]="LOCAL",e[e.WORLD=1]="WORLD",e[e.BONE=2]="BONE";class r{}r.X=new s.Vector3(1,0,0),r.Y=new s.Vector3(0,1,0),r.Z=new s.Vector3(0,0,1),(i=a||(a={}))[i.X=0]="X",i[i.Y=1]="Y",i[i.Z=2]="Z",t.s(["Axis",0,r,"Coordinate",0,a,"Space",0,o])},58302,16074,63764,95190,t=>{"use strict";var e=t.i(10272),i=t.i(37143),o=t.i(59576),a=t.i(96265),s=t.i(89030),r=t.i(70247);class n{constructor(t,e,i){this._cameraPosition=e,this._behavior=i,this.activeInput=!1,this.speed=1,this.zoomSpeed=1,this.panSpeed=1,this.rotationXSpeed=1,this.rotationYSpeed=1,this._zoomSpeedMultiplier=1,this._panSpeedMultiplier=1,this.zoomInertia=.9,this.panInertia=.9,this.rotationInertia=.9,this.zoomAccumulatedPixels=0,this.panAccumulatedPixels=new a.Vector3,this.rotationAccumulatedPixels=new a.Vector3,this.zoomDeltaCurrentFrame=0,this.panDeltaCurrentFrame=a.Vector3.Zero(),this.rotationDeltaCurrentFrame=a.Vector3.Zero(),this._zoomVelocity=0,this._panVelocity=new a.Vector3,this.referenceFrameRate=60,this._rotationVelocity=new a.Vector3,this._prevFrameTimeMs=0,this._scene=t}computeCurrentFrameDeltas(){let t=this._scene.getEngine().getDeltaTime(),e=this._getEffectiveDeltaMs(t);if(0===this._zoomVelocity&&0===this.zoomAccumulatedPixels&&0===this._panVelocity.x&&0===this._panVelocity.y&&0===this._panVelocity.z&&0===this.panAccumulatedPixels.x&&0===this.panAccumulatedPixels.y&&0===this.panAccumulatedPixels.z&&0===this._rotationVelocity.x&&0===this._rotationVelocity.y&&0===this._rotationVelocity.z&&0===this.rotationAccumulatedPixels.x&&0===this.rotationAccumulatedPixels.y&&0===this.rotationAccumulatedPixels.z&&!this.activeInput){this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,t>0&&(this._prevFrameTimeMs=t);return}this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,(this.panAccumulatedPixels.lengthSquared()>0||this.rotationAccumulatedPixels.lengthSquared()>0||0!==this.zoomAccumulatedPixels)&&this._behavior?.isInterpolating&&this._behavior.stopAllAnimations(),this._panVelocity.copyFromFloats(this._calculateCurrentVelocity(this._panVelocity.x,this.panAccumulatedPixels.x,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.y,this.panAccumulatedPixels.y,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.z,this.panAccumulatedPixels.z,this.panInertia)),this._panVelocity.scaleToRef(this.speed*this.panSpeed*this._panSpeedMultiplier*e,this.panDeltaCurrentFrame),this._rotationVelocity.copyFromFloats(this._calculateCurrentVelocity(this._rotationVelocity.x,this.rotationAccumulatedPixels.x,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.y,this.rotationAccumulatedPixels.y,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.z,this.rotationAccumulatedPixels.z,this.rotationInertia)),this.rotationDeltaCurrentFrame.copyFromFloats(this._rotationVelocity.x*this.speed*this.rotationXSpeed*e,this._rotationVelocity.y*this.speed*this.rotationYSpeed*e,0),this._zoomVelocity=this._calculateCurrentVelocity(this._zoomVelocity,this.zoomAccumulatedPixels,this.zoomInertia),this.zoomDeltaCurrentFrame=this._zoomVelocity*(this.speed*this.zoomSpeed*this._zoomSpeedMultiplier)*e,t>0&&(this._prevFrameTimeMs=t),this.zoomAccumulatedPixels=0,this.panAccumulatedPixels.setAll(0),this.rotationAccumulatedPixels.setAll(0),this.activeInput=!1}resetRotationVelocity(){this._rotationVelocity.setAll(0),this.rotationAccumulatedPixels.setAll(0)}resetPanVelocity(){this._panVelocity.setAll(0),this.panAccumulatedPixels.setAll(0)}resetZoomVelocity(){this._zoomVelocity=0,this.zoomAccumulatedPixels=0}get isInterpolating(){return!!this._behavior?.isInterpolating}getFrameIndependentDecay(t){let e=this._scene.getEngine().getDeltaTime();return Math.pow(t,this._getEffectiveDeltaMs(e)/(1e3/this.referenceFrameRate))}getFrameIndependentInputScale(t){let e=1-t;return e<=0?1:(1-this.getFrameIndependentDecay(t))/e}_getEffectiveDeltaMs(t){return t>0?t:this._prevFrameTimeMs>0?this._prevFrameTimeMs:1e3/this.referenceFrameRate}_calculateCurrentVelocity(t,e,i){let o=t,a=this._scene.getEngine().getDeltaTime(),s=this._getEffectiveDeltaMs(a);if(0===s)return o;let r=this.getFrameIndependentDecay(i);if(o*=r,0!==e||this.activeInput){let t=1-i;o+=e/s*(t>0?(1-r)/t:1)}else 1e-6>Math.abs(o)&&(o=0);return o}}t.s(["CameraMovement",0,n],16074);class h{constructor(t,e){this.inputMap=[],this.handlers=t,this._createDefaultEntries=e,this.resetInputMap()}resolveInteraction(t,e){for(let i of this.inputMap)if(i.source===t&&this._entryMatches(i,e))return i;return null}resetInputMap(){this.inputMap=this._createDefaultEntries?.()??[]}getEntry(t,e,i){let o=this.inputMap;for(let a=0;a<o.length;a++){let s=o[a];if(s.source===t&&s.interaction===e&&this._entryConditionsMatch(s,i))return s}}getEntries(t,e,i){let o=[],a=this.inputMap;for(let s=0;s<a.length;s++){let r=a[s];r.source===t&&r.interaction===e&&this._entryConditionsMatch(r,i)&&o.push(r)}return o}addEntry(t){let e=this._entrySpecificity(t),i=this.inputMap.length;for(let t=0;t<this.inputMap.length;t++)if(this._entrySpecificity(this.inputMap[t])<e){i=t;break}this.inputMap.splice(i,0,t)}setInteraction(t,e,i){let o=this.resolveInteraction(t,e);return o&&this._entryCoversAllConditionsOf(o,e)?o.interaction=i:this.addEntry({source:t,...e??{},interaction:i}),!0}_entryCoversAllConditionsOf(t,e){if(!e)return!0;for(let i of Object.keys(e)){let o=e[i];if(void 0!==o){if("modifiers"===i){let e=t.modifiers??{};for(let t of Object.keys(o))if(void 0!==o[t]&&void 0===e[t])return!1}else if(void 0===t[i])return!1}}return!0}setInteractions(t,e,i){let o=0,a=this.inputMap;for(let s=0;s<a.length;s++){let r=a[s];r.source===t&&this._entryMatches(r,e)&&(r.interaction=i,o++)}return o}_entryMatches(t,e){switch(t.source){case"pointer":if(void 0!==t.button&&t.button!==e?.button)return!1;return this._matchModifiers(t.modifiers,e?.modifiers);case"wheel":return this._matchModifiers(t.modifiers,e?.modifiers);case"touch":if(void 0!==t.touchCount&&t.touchCount!==e?.touchCount)return!1;return!0;case"keyboard":if(void 0!==t.key&&(Array.isArray(t.key)?-1===t.key.indexOf(e?.key??-1):t.key!==e?.key))return!1;return this._matchModifiers(t.modifiers,e?.modifiers)}}_entryConditionsMatch(t,e){if(!e)return!0;switch(t.source){case"pointer":if("button"in e&&t.button!==e.button)return!1;return!("modifiers"in e)||this._entryModifiersMatch(t.modifiers,e.modifiers);case"wheel":return!("modifiers"in e)||this._entryModifiersMatch(t.modifiers,e.modifiers);case"touch":return!("touchCount"in e)||t.touchCount===e.touchCount;case"keyboard":if("key"in e){if(void 0===t.key)return void 0===e.key;if(void 0===e.key||(Array.isArray(t.key)?-1===t.key.indexOf(e.key):t.key!==e.key))return!1}return!("modifiers"in e)||this._entryModifiersMatch(t.modifiers,e.modifiers)}}_entrySpecificity(t){let e=0;return"button"in t&&void 0!==t.button&&e++,"key"in t&&void 0!==t.key&&e++,"touchCount"in t&&void 0!==t.touchCount&&e++,"modifiers"in t&&t.modifiers&&e++,e}_matchModifiers(t,e){return!t||(void 0===t.ctrl||t.ctrl===(e?.ctrl??!1))&&(void 0===t.shift||t.shift===(e?.shift??!1))&&(void 0===t.alt||t.alt===(e?.alt??!1))}_entryModifiersMatch(t,e){return e?void 0===e.ctrl&&void 0===e.shift&&void 0===e.alt?!t||void 0===t.ctrl&&void 0===t.shift&&void 0===t.alt:(void 0===e.ctrl||t?.ctrl===e.ctrl)&&(void 0===e.shift||t?.shift===e.shift)&&(void 0===e.alt||t?.alt===e.alt):!t}}t.s(["InputMapper",0,h],63764);class l extends n{constructor(t,e,i){super(t,e,i),this.input=new h({translate:(t,e,i)=>{this.panAccumulatedPixels.x+=t,this.panAccumulatedPixels.y+=e,this.panAccumulatedPixels.z+=i},rotate:(t,e)=>{this.rotationAccumulatedPixels.x+=t,this.rotationAccumulatedPixels.y+=e}},()=>this._createDefaultInputMap())}_createDefaultInputMap(){return[{source:"pointer",interaction:"rotate"},{source:"keyboard",interaction:"translate"},{source:"keyboard",interaction:"rotate"},{source:"touch",interaction:"rotate"},{source:"touch",interaction:"translate"}]}}let c=a.Matrix.Zero(),d=a.Quaternion.Identity();class u extends o.Camera{get inertia(){return this._targetInertia}set inertia(t){this._targetInertia=t,this.movement&&(this.movement.panInertia=t,this.movement.rotationInertia=t)}constructor(t,e,i,o=!0){super(t,e,i,o),this.cameraDirection=new a.Vector3(0,0,0),this.cameraRotation=new a.Vector2(0,0),this._targetInertia=.9,this.updateUpVectorFromRotation=!1,this.speed=2,this.noRotationConstraint=!1,this.invertRotation=!1,this.inverseRotationSpeed=.2,this._panningEpsilon=s.Epsilon,this._rotationEpsilon=s.Epsilon,this.lockedTarget=null,this._currentTarget=a.Vector3.Zero(),this._initialFocalDistance=1,this._viewMatrix=a.Matrix.Zero(),this._cameraTransformMatrix=a.Matrix.Zero(),this._cameraRotationMatrix=a.Matrix.Zero(),this._transformedReferencePoint=a.Vector3.Zero(),this._deferredPositionUpdate=new a.Vector3,this._deferredRotationQuaternionUpdate=new a.Quaternion,this._deferredRotationUpdate=new a.Vector3,this._deferredUpdated=!1,this._deferOnly=!1,this._cachedRotationZ=0,this._cachedQuaternionRotationZ=0,this._referencePoint=a.Vector3.Forward(this.getScene().useRightHandedSystem),this.rotation=new a.Vector3(0,this.getScene().useRightHandedSystem?Math.PI:0,0),this.movement=new l(this.getScene(),this.position),this.movement.panInertia=this.inertia,this.movement.rotationInertia=this.inertia}getFrontPosition(t){this.getWorldMatrix();let e=a.TmpVectors.Vector3[0],i=a.TmpVectors.Vector3[1];return i.set(0,0,this._scene.useRightHandedSystem?-1:1),this.getDirectionToRef(i,e),e.scaleInPlace(t),this.globalPosition.add(e)}_getLockedTargetPosition(){if(!this.lockedTarget)return null;if(this.lockedTarget.absolutePosition){let t=this.lockedTarget;t.computeWorldMatrix().getTranslationToRef(t.absolutePosition)}return this.lockedTarget.absolutePosition||this.lockedTarget}storeState(){return this._storedPosition=this.position.clone(),this._storedRotation=this.rotation.clone(),this.rotationQuaternion&&(this._storedRotationQuaternion=this.rotationQuaternion.clone()),super.storeState()}_restoreStateValues(){return!!super._restoreStateValues()&&(this.position=this._storedPosition.clone(),this.rotation=this._storedRotation.clone(),this.rotationQuaternion&&this._storedRotationQuaternion&&(this.rotationQuaternion=this._storedRotationQuaternion.clone()),this.cameraDirection.copyFromFloats(0,0,0),this.cameraRotation.copyFromFloats(0,0),!0)}_initCache(){super._initCache(),this._cache.lockedTarget=new a.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotation=new a.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotationQuaternion=new a.Quaternion(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE)}_updateCache(t){t||super._updateCache();let e=this._getLockedTargetPosition();e?this._cache.lockedTarget?this._cache.lockedTarget.copyFrom(e):this._cache.lockedTarget=e.clone():this._cache.lockedTarget=null,this._cache.rotation.copyFrom(this.rotation),this.rotationQuaternion&&this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion)}_isSynchronizedViewMatrix(){if(!super._isSynchronizedViewMatrix())return!1;let t=this._getLockedTargetPosition();return(this._cache.lockedTarget?this._cache.lockedTarget.equals(t):!t)&&(this.rotationQuaternion?this.rotationQuaternion.equals(this._cache.rotationQuaternion):this._cache.rotation.equals(this.rotation))}_computeLocalCameraSpeed(){let t=this.getEngine();return this.speed*Math.sqrt(t.getDeltaTime()/(100*t.getFps()))}setTarget(t){this.upVector.normalize(),this._initialFocalDistance=t.subtract(this.position).length(),this.position.z===t.z&&(this.position.z+=s.Epsilon),this._referencePoint.normalize().scaleInPlace(this._initialFocalDistance),this.getScene().useRightHandedSystem?a.Matrix.LookAtRHToRef(this.position,t,a.Vector3.UpReadOnly,c):a.Matrix.LookAtLHToRef(this.position,t,a.Vector3.UpReadOnly,c),c.invert();let e=this.rotationQuaternion||d;a.Quaternion.FromRotationMatrixToRef(c,e),e.toEulerAnglesToRef(this.rotation),this.rotation.z=0}get target(){return this.getTarget()}set target(t){this.setTarget(t)}getTarget(){return this._currentTarget}_decideIfNeedsToMove(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0}_updatePosition(){if(this.parent){this.parent.getWorldMatrix().invertToRef(a.TmpVectors.Matrix[0]),a.Vector3.TransformNormalToRef(this.cameraDirection,a.TmpVectors.Matrix[0],a.TmpVectors.Vector3[0]),this._deferredPositionUpdate.addInPlace(a.TmpVectors.Vector3[0]),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate);return}this._deferredPositionUpdate.addInPlace(this.cameraDirection),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate)}_checkInputs(){let t=this.movement,e=0!==this.cameraDirection.x||0!==this.cameraDirection.y||0!==this.cameraDirection.z,i=0!==this.cameraRotation.x||0!==this.cameraRotation.y;t.panAccumulatedPixels.addInPlace(this.cameraDirection),t.rotationAccumulatedPixels.x+=this.cameraRotation.x,t.rotationAccumulatedPixels.y+=this.cameraRotation.y,t.computeCurrentFrameDeltas(),this.cameraDirection.copyFrom(t.panDeltaCurrentFrame),this.cameraRotation.set(t.rotationDeltaCurrentFrame.x,t.rotationDeltaCurrentFrame.y);let o=this.speed*this._panningEpsilon;!e&&Math.abs(this.cameraDirection.x)<o&&Math.abs(this.cameraDirection.y)<o&&Math.abs(this.cameraDirection.z)<o&&(this.cameraDirection.setAll(0),t.resetPanVelocity());let s=this.speed*this._rotationEpsilon;!i&&Math.abs(this.cameraRotation.x)<s&&Math.abs(this.cameraRotation.y)<s&&(this.cameraRotation.set(0,0),t.resetRotationVelocity());let r=this.invertRotation?-this.inverseRotationSpeed:1,n=this._decideIfNeedsToMove(),h=!!(this.cameraRotation.x||this.cameraRotation.y);this._deferredUpdated=!1,this._deferredRotationUpdate.copyFrom(this.rotation),this._deferredPositionUpdate.copyFrom(this.position),this.rotationQuaternion&&this._deferredRotationQuaternionUpdate.copyFrom(this.rotationQuaternion),n&&this._updatePosition(),h&&(this.rotationQuaternion&&this.rotationQuaternion.toEulerAnglesToRef(this._deferredRotationUpdate),this._deferredRotationUpdate.x+=this.cameraRotation.x*r,this._deferredRotationUpdate.y+=this.cameraRotation.y*r,!this.noRotationConstraint&&(this._deferredRotationUpdate.x>1.570796&&(this._deferredRotationUpdate.x=1.570796),this._deferredRotationUpdate.x<-1.570796&&(this._deferredRotationUpdate.x=-1.570796)),this._deferOnly?this._deferredUpdated=!0:this.rotation.copyFrom(this._deferredRotationUpdate),this.rotationQuaternion&&this._deferredRotationUpdate.lengthSquared()&&(a.Quaternion.RotationYawPitchRollToRef(this._deferredRotationUpdate.y,this._deferredRotationUpdate.x,this._deferredRotationUpdate.z,this._deferredRotationQuaternionUpdate),this._deferOnly?this._deferredUpdated=!0:this.rotationQuaternion.copyFrom(this._deferredRotationQuaternionUpdate))),this.cameraDirection.setAll(0),this.cameraRotation.set(0,0),super._checkInputs()}_updateCameraRotationMatrix(){this.rotationQuaternion?this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix):a.Matrix.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this._cameraRotationMatrix)}_rotateUpVectorWithCameraRotationMatrix(){return a.Vector3.TransformNormalToRef(a.Vector3.UpReadOnly,this._cameraRotationMatrix,this.upVector),this}_getViewMatrix(){return this.lockedTarget&&this.setTarget(this._getLockedTargetPosition()),this._updateCameraRotationMatrix(),this.rotationQuaternion&&this._cachedQuaternionRotationZ!=this.rotationQuaternion.z?(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedQuaternionRotationZ=this.rotationQuaternion.z):this._cachedRotationZ!==this.rotation.z&&(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedRotationZ=this.rotation.z),a.Vector3.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),this.updateUpVectorFromRotation&&(this.rotationQuaternion?r.Axis.Y.rotateByQuaternionToRef(this.rotationQuaternion,this.upVector):(a.Quaternion.FromEulerVectorToRef(this.rotation,d),r.Axis.Y.rotateByQuaternionToRef(d,this.upVector))),this._computeViewMatrix(this.position,this._currentTarget,this.upVector),this._viewMatrix}_computeViewMatrix(t,e,i){if(this.getScene().useRightHandedSystem?a.Matrix.LookAtRHToRef(t,e,i,this._viewMatrix):a.Matrix.LookAtLHToRef(t,e,i,this._viewMatrix),this.parent){let t=this.parent.getWorldMatrix();this._viewMatrix.invert(),this._viewMatrix.multiplyToRef(t,this._viewMatrix),this._viewMatrix.invert(),this._markSyncedWithParent()}}createRigCamera(t,e){if(this.cameraRigMode!==o.Camera.RIG_MODE_NONE){let e=new u(t,this.position.clone(),this.getScene());return e.isRigCamera=!0,e.rigParent=this,this.cameraRigMode===o.Camera.RIG_MODE_VR&&(this.rotationQuaternion||(this.rotationQuaternion=new a.Quaternion),e._cameraRigParams={},e.rotationQuaternion=new a.Quaternion),e.mode=this.mode,e.orthoLeft=this.orthoLeft,e.orthoRight=this.orthoRight,e.orthoTop=this.orthoTop,e.orthoBottom=this.orthoBottom,e}return null}_updateRigCameras(){let t=this._rigCameras[0],e=this._rigCameras[1];switch(this.computeWorldMatrix(),this.cameraRigMode){case o.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case o.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case o.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case o.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case o.Camera.RIG_MODE_STEREOSCOPIC_INTERLACED:{let i=this.cameraRigMode===o.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?1:-1,a=this.cameraRigMode===o.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?-1:1;this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*i,t),this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*a,e);break}case o.Camera.RIG_MODE_VR:t.rotationQuaternion&&e.rotationQuaternion&&this.rotationQuaternion?(t.rotationQuaternion.copyFrom(this.rotationQuaternion),e.rotationQuaternion.copyFrom(this.rotationQuaternion)):(t.rotation.copyFrom(this.rotation),e.rotation.copyFrom(this.rotation)),t.position.copyFrom(this.position),e.position.copyFrom(this.position)}super._updateRigCameras()}_getRigCamPositionAndTarget(t,e){this.getTarget().subtractToRef(this.position,u._TargetFocalPoint),u._TargetFocalPoint.normalize().scaleInPlace(this._initialFocalDistance);let i=u._TargetFocalPoint.addInPlace(this.position);a.Matrix.TranslationToRef(-i.x,-i.y,-i.z,u._TargetTransformMatrix),u._TargetTransformMatrix.multiplyToRef(a.Matrix.RotationAxis(e.upVector,t),u._RigCamTransformMatrix),a.Matrix.TranslationToRef(i.x,i.y,i.z,u._TargetTransformMatrix),u._RigCamTransformMatrix.multiplyToRef(u._TargetTransformMatrix,u._RigCamTransformMatrix),a.Vector3.TransformCoordinatesToRef(this.position,u._RigCamTransformMatrix,e.position),e.setTarget(i)}getClassName(){return"TargetCamera"}}u._RigCamTransformMatrix=new a.Matrix,u._TargetTransformMatrix=new a.Matrix,u._TargetFocalPoint=new a.Vector3,(0,e.__decorate)([(0,i.serialize)()],u.prototype,"updateUpVectorFromRotation",void 0),(0,e.__decorate)([(0,i.serializeAsVector3)()],u.prototype,"rotation",void 0),(0,e.__decorate)([(0,i.serialize)()],u.prototype,"speed",void 0),(0,e.__decorate)([(0,i.serializeAsMeshReference)("lockedTargetId")],u.prototype,"lockedTarget",void 0),t.s(["TargetCamera",0,u],58302);var p=t.i(13379),_=t.i(80871),m={};t.s(["CameraInputTypes",0,m,"CameraInputsManager",0,class{constructor(t){this.attachedToElement=!1,this.attached={},this.camera=t,this.checkInputs=()=>{}}add(t){let e=t.getSimpleName();this.attached[e]?p.Logger.Warn("camera input of type "+e+" already exists on camera"):(this.attached[e]=t,t.camera=this.camera,t.checkInputs&&(this.checkInputs=this._addCheckInputs(t.checkInputs.bind(t))),this.attachedToElement&&t.attachControl(this.noPreventDefault))}remove(t){for(let e in this.attached){let i=this.attached[e];if(i===t){i.detachControl(),i.camera=null,delete this.attached[e],this.rebuildInputCheck();return}}}removeByType(t){for(let e in this.attached){let i=this.attached[e];i.getClassName()===t&&(i.detachControl(),i.camera=null,delete this.attached[e],this.rebuildInputCheck())}}_addCheckInputs(t){let e=this.checkInputs;return()=>{e(),t()}}attachInput(t){this.attachedToElement&&t.attachControl(this.noPreventDefault)}attachElement(t=!1){if(!this.attachedToElement)for(let e in t=!o.Camera.ForceAttachControlToAlwaysPreventDefault&&t,this.attachedToElement=!0,this.noPreventDefault=t,this.attached)this.attached[e].attachControl(t)}detachElement(t=!1){for(let e in this.attached)this.attached[e].detachControl(),t&&(this.attached[e].camera=null);this.attachedToElement=!1}rebuildInputCheck(){for(let t in this.checkInputs=()=>{},this.attached){let e=this.attached[t];e.checkInputs&&(this.checkInputs=this._addCheckInputs(e.checkInputs.bind(e)))}}clear(){this.attachedToElement&&this.detachElement(!0),this.attached={},this.attachedToElement=!1,this.checkInputs=()=>{}}serialize(t){let e={};for(let t in this.attached){let i=this.attached[t],o=_.SerializationHelper.Serialize(i);e[i.getClassName()]=o}t.inputsmgr=e}parse(t){let e=t.inputsmgr;if(e)for(let t in this.clear(),e){let i=m[t];if(i){let o=e[t],a=_.SerializationHelper.Parse(()=>new i,o,null);this.add(a)}}else for(let e in this.attached){let i=m[this.attached[e].getClassName()];if(i){let o=_.SerializationHelper.Parse(()=>new i,t,null);this.remove(this.attached[e]),this.add(o)}}}}],95190)},30118,t=>{"use strict";var e,i,o,a,s,r=t.i(10272),n=t.i(37143),h=t.i(96265),l=t.i(58302),c=t.i(95190),d=t.i(36365),u=t.i(65740);class p{constructor(){this.keysUp=[38],this.keysUpward=[33],this.keysDown=[40],this.keysDownward=[34],this.keysLeft=[37],this.keysRight=[39],this.rotationSpeed=.5,this.keysRotateLeft=[],this.keysRotateRight=[],this.keysRotateUp=[],this.keysRotateDown=[],this._keys=[]}attachControl(t){t=u.Tools.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(()=>{this._keys.length=0}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(e=>{let i=e.event;if(!i.metaKey){if(e.type===d.KeyboardEventTypes.KEYDOWN)(-1!==this.keysUp.indexOf(i.keyCode)||-1!==this.keysDown.indexOf(i.keyCode)||-1!==this.keysLeft.indexOf(i.keyCode)||-1!==this.keysRight.indexOf(i.keyCode)||-1!==this.keysUpward.indexOf(i.keyCode)||-1!==this.keysDownward.indexOf(i.keyCode)||-1!==this.keysRotateLeft.indexOf(i.keyCode)||-1!==this.keysRotateRight.indexOf(i.keyCode)||-1!==this.keysRotateUp.indexOf(i.keyCode)||-1!==this.keysRotateDown.indexOf(i.keyCode))&&(-1===this._keys.indexOf(i.keyCode)&&this._keys.push(i.keyCode),t||i.preventDefault());else if(-1!==this.keysUp.indexOf(i.keyCode)||-1!==this.keysDown.indexOf(i.keyCode)||-1!==this.keysLeft.indexOf(i.keyCode)||-1!==this.keysRight.indexOf(i.keyCode)||-1!==this.keysUpward.indexOf(i.keyCode)||-1!==this.keysDownward.indexOf(i.keyCode)||-1!==this.keysRotateLeft.indexOf(i.keyCode)||-1!==this.keysRotateRight.indexOf(i.keyCode)||-1!==this.keysRotateUp.indexOf(i.keyCode)||-1!==this.keysRotateDown.indexOf(i.keyCode)){let e=this._keys.indexOf(i.keyCode);e>=0&&this._keys.splice(e,1),t||i.preventDefault()}}}))}detachControl(){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys.length=0}checkInputs(){if(this._onKeyboardObserver){let t=this.camera,e=t.movement.input,i=e.getEntry("keyboard","translate"),o=e.getEntry("keyboard","rotate"),a=o?.sensitivity??1;for(let e=0;e<this._keys.length;e++){let s=this._keys[e],r=t._computeLocalCameraSpeed()*(i?.sensitivity??1);-1!==this.keysLeft.indexOf(s)?t._localDirection.copyFromFloats(-r,0,0):-1!==this.keysUp.indexOf(s)?t._localDirection.copyFromFloats(0,0,r):-1!==this.keysRight.indexOf(s)?t._localDirection.copyFromFloats(r,0,0):-1!==this.keysDown.indexOf(s)?t._localDirection.copyFromFloats(0,0,-r):-1!==this.keysUpward.indexOf(s)?t._localDirection.copyFromFloats(0,r,0):-1!==this.keysDownward.indexOf(s)?t._localDirection.copyFromFloats(0,-r,0):-1!==this.keysRotateLeft.indexOf(s)?(t._localDirection.copyFromFloats(0,0,0),o&&(t.cameraRotation.y-=this._getLocalRotation()*a)):-1!==this.keysRotateRight.indexOf(s)?(t._localDirection.copyFromFloats(0,0,0),o&&(t.cameraRotation.y+=this._getLocalRotation()*a)):-1!==this.keysRotateUp.indexOf(s)?(t._localDirection.copyFromFloats(0,0,0),o&&(t.cameraRotation.x-=this._getLocalRotation()*a)):-1!==this.keysRotateDown.indexOf(s)&&(t._localDirection.copyFromFloats(0,0,0),o&&(t.cameraRotation.x+=this._getLocalRotation()*a)),i||t._localDirection.copyFromFloats(0,0,0),t.getScene().useRightHandedSystem&&(t._localDirection.z*=-1),t.getViewMatrix().invertToRef(t._cameraTransformMatrix),h.Vector3.TransformNormalToRef(t._localDirection,t._cameraTransformMatrix,t._transformedDirection),t.cameraDirection.addInPlace(t._transformedDirection)}}}getClassName(){return"FreeCameraKeyboardMoveInput"}_onLostFocus(){this._keys.length=0}getSimpleName(){return"keyboard"}_getLocalRotation(){let t=this.camera._calculateHandednessMultiplier();return this.rotationSpeed*this._engine.getDeltaTime()/1e3*t}}(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysUp",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysUpward",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysDown",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysDownward",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysLeft",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysRight",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"rotationSpeed",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysRotateLeft",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysRotateRight",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysRotateUp",void 0),(0,r.__decorate)([(0,n.serialize)()],p.prototype,"keysRotateDown",void 0),c.CameraInputTypes.FreeCameraKeyboardMoveInput=p;var _=t.i(99267),m=t.i(21222);class y{_applyPointerRotation(t,e){this._pointerConditions.button=this._currentActiveButton;let i=this.camera.movement.input.resolveInteraction("pointer",this._pointerConditions);if(!i||"rotate"!==i.interaction)return;let o=i.sensitivityX??i.sensitivity??1/this.angularSensibility,a=i.sensitivityY??i.sensitivity??1/this.angularSensibility;this.camera.cameraRotation.y+=t*o,this.camera.cameraRotation.x+=e*a}constructor(t=!0){this.touchEnabled=t,this.buttons=[0,1,2],this.angularSensibility=2e3,this._previousPosition=null,this.onPointerMovedObservable=new _.Observable,this._allowCameraRotation=!0,this._currentActiveButton=-1,this._activePointerId=-1,this._pointerConditions={}}attachControl(t){t=u.Tools.BackCompatCameraNoPreventDefault(arguments);let e=this.camera.getEngine(),i=e.getInputElement();this._pointerInput||(this._pointerInput=o=>{let a=o.event,s="touch"===a.pointerType;if(!this.touchEnabled&&s||o.type!==m.PointerEventTypes.POINTERMOVE&&-1===this.buttons.indexOf(a.button))return;let r=a.target;if(o.type===m.PointerEventTypes.POINTERDOWN){if(s&&-1!==this._activePointerId||!s&&-1!==this._currentActiveButton)return;this._activePointerId=a.pointerId;try{r?.setPointerCapture(a.pointerId)}catch(t){}-1===this._currentActiveButton&&(this._currentActiveButton=a.button),this._previousPosition={x:a.clientX,y:a.clientY},!t&&(a.preventDefault(),i&&i.focus()),e.isPointerLock&&this._onMouseMove&&this._onMouseMove(o.event)}else if(o.type===m.PointerEventTypes.POINTERUP){if(s&&this._activePointerId!==a.pointerId||!s&&this._currentActiveButton!==a.button)return;try{r?.releasePointerCapture(a.pointerId)}catch(t){}this._currentActiveButton=-1,this._previousPosition=null,t||a.preventDefault(),this._activePointerId=-1}else if(o.type===m.PointerEventTypes.POINTERMOVE&&(this._activePointerId===a.pointerId||!s)){if(e.isPointerLock&&this._onMouseMove)this._onMouseMove(o.event);else if(this._previousPosition){let e=this.camera._calculateHandednessMultiplier(),i=(a.clientX-this._previousPosition.x)*e,o=(a.clientY-this._previousPosition.y)*e;this._allowCameraRotation&&this._applyPointerRotation(i,o),this.onPointerMovedObservable.notifyObservers({offsetX:i,offsetY:o}),this._previousPosition={x:a.clientX,y:a.clientY},t||a.preventDefault()}}}),this._onMouseMove=i=>{if(!e.isPointerLock)return;let o=this.camera._calculateHandednessMultiplier();this._applyPointerRotation(i.movementX*o,i.movementY*o),this._previousPosition=null,t||i.preventDefault()},this._observer=this.camera.getScene()._inputManager._addCameraPointerObserver(this._pointerInput,m.PointerEventTypes.POINTERDOWN|m.PointerEventTypes.POINTERUP|m.PointerEventTypes.POINTERMOVE),i&&(this._contextMenuBind=t=>this.onContextMenu(t),i.addEventListener("contextmenu",this._contextMenuBind,!1))}onContextMenu(t){t.preventDefault()}detachControl(){if(this._observer){if(this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer),this._contextMenuBind){let t=this.camera.getEngine().getInputElement();t&&t.removeEventListener("contextmenu",this._contextMenuBind)}this.onPointerMovedObservable&&this.onPointerMovedObservable.clear(),this._observer=null,this._onMouseMove=null,this._previousPosition=null}this._activePointerId=-1,this._currentActiveButton=-1}getClassName(){return"FreeCameraMouseInput"}getSimpleName(){return"mouse"}}(0,r.__decorate)([(0,n.serialize)()],y.prototype,"buttons",void 0),(0,r.__decorate)([(0,n.serialize)()],y.prototype,"angularSensibility",void 0),c.CameraInputTypes.FreeCameraMouseInput=y;var f=t.i(76696);class v{constructor(){this.wheelPrecisionX=3,this.wheelPrecisionY=3,this.wheelPrecisionZ=3,this.onChangedObservable=new _.Observable,this._wheelDeltaX=0,this._wheelDeltaY=0,this._wheelDeltaZ=0,this._ffMultiplier=12,this._normalize=120}attachControl(t){t=u.Tools.BackCompatCameraNoPreventDefault(arguments),this._wheel=e=>{if(e.type!==m.PointerEventTypes.POINTERWHEEL)return;let i=e.event,o=i.deltaMode===f.EventConstants.DOM_DELTA_LINE?this._ffMultiplier:1;this._wheelDeltaX+=this.wheelPrecisionX*o*i.deltaX/this._normalize,this._wheelDeltaY-=this.wheelPrecisionY*o*i.deltaY/this._normalize,this._wheelDeltaZ+=this.wheelPrecisionZ*o*i.deltaZ/this._normalize,i.preventDefault&&!t&&i.preventDefault()},this._observer=this.camera.getScene()._inputManager._addCameraPointerObserver(this._wheel,m.PointerEventTypes.POINTERWHEEL)}detachControl(){this._observer&&(this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer),this._observer=null,this._wheel=null),this.onChangedObservable&&this.onChangedObservable.clear()}checkInputs(){this.onChangedObservable.notifyObservers({wheelDeltaX:this._wheelDeltaX,wheelDeltaY:this._wheelDeltaY,wheelDeltaZ:this._wheelDeltaZ}),this._wheelDeltaX=0,this._wheelDeltaY=0,this._wheelDeltaZ=0}getClassName(){return"BaseCameraMouseWheelInput"}getSimpleName(){return"mousewheel"}}(0,r.__decorate)([(0,n.serialize)()],v.prototype,"wheelPrecisionX",void 0),(0,r.__decorate)([(0,n.serialize)()],v.prototype,"wheelPrecisionY",void 0),(0,r.__decorate)([(0,n.serialize)()],v.prototype,"wheelPrecisionZ",void 0),(e=i||(i={}))[e.MoveRelative=0]="MoveRelative",e[e.RotateRelative=1]="RotateRelative",e[e.MoveScene=2]="MoveScene";class R extends v{constructor(){super(...arguments),this._moveRelative=h.Vector3.Zero(),this._rotateRelative=h.Vector3.Zero(),this._moveScene=h.Vector3.Zero(),this._wheelXAction=i.MoveRelative,this._wheelXActionCoordinate=0,this._wheelYAction=i.MoveRelative,this._wheelYActionCoordinate=2,this._wheelZAction=null,this._wheelZActionCoordinate=null}getClassName(){return"FreeCameraMouseWheelInput"}set wheelXMoveRelative(t){(null!==t||this._wheelXAction===i.MoveRelative)&&(this._wheelXAction=i.MoveRelative,this._wheelXActionCoordinate=t)}get wheelXMoveRelative(){return this._wheelXAction!==i.MoveRelative?null:this._wheelXActionCoordinate}set wheelYMoveRelative(t){(null!==t||this._wheelYAction===i.MoveRelative)&&(this._wheelYAction=i.MoveRelative,this._wheelYActionCoordinate=t)}get wheelYMoveRelative(){return this._wheelYAction!==i.MoveRelative?null:this._wheelYActionCoordinate}set wheelZMoveRelative(t){(null!==t||this._wheelZAction===i.MoveRelative)&&(this._wheelZAction=i.MoveRelative,this._wheelZActionCoordinate=t)}get wheelZMoveRelative(){return this._wheelZAction!==i.MoveRelative?null:this._wheelZActionCoordinate}set wheelXRotateRelative(t){(null!==t||this._wheelXAction===i.RotateRelative)&&(this._wheelXAction=i.RotateRelative,this._wheelXActionCoordinate=t)}get wheelXRotateRelative(){return this._wheelXAction!==i.RotateRelative?null:this._wheelXActionCoordinate}set wheelYRotateRelative(t){(null!==t||this._wheelYAction===i.RotateRelative)&&(this._wheelYAction=i.RotateRelative,this._wheelYActionCoordinate=t)}get wheelYRotateRelative(){return this._wheelYAction!==i.RotateRelative?null:this._wheelYActionCoordinate}set wheelZRotateRelative(t){(null!==t||this._wheelZAction===i.RotateRelative)&&(this._wheelZAction=i.RotateRelative,this._wheelZActionCoordinate=t)}get wheelZRotateRelative(){return this._wheelZAction!==i.RotateRelative?null:this._wheelZActionCoordinate}set wheelXMoveScene(t){(null!==t||this._wheelXAction===i.MoveScene)&&(this._wheelXAction=i.MoveScene,this._wheelXActionCoordinate=t)}get wheelXMoveScene(){return this._wheelXAction!==i.MoveScene?null:this._wheelXActionCoordinate}set wheelYMoveScene(t){(null!==t||this._wheelYAction===i.MoveScene)&&(this._wheelYAction=i.MoveScene,this._wheelYActionCoordinate=t)}get wheelYMoveScene(){return this._wheelYAction!==i.MoveScene?null:this._wheelYActionCoordinate}set wheelZMoveScene(t){(null!==t||this._wheelZAction===i.MoveScene)&&(this._wheelZAction=i.MoveScene,this._wheelZActionCoordinate=t)}get wheelZMoveScene(){return this._wheelZAction!==i.MoveScene?null:this._wheelZActionCoordinate}checkInputs(){if(0===this._wheelDeltaX&&0===this._wheelDeltaY&&0==this._wheelDeltaZ)return;this._moveRelative.setAll(0),this._rotateRelative.setAll(0),this._moveScene.setAll(0),this._updateCamera(),this.camera.getScene().useRightHandedSystem&&(this._moveRelative.z*=-1);let t=h.Matrix.Zero();this.camera.getViewMatrix().invertToRef(t);let e=h.Vector3.Zero();h.Vector3.TransformNormalToRef(this._moveRelative,t,e),this.camera.cameraRotation.x+=this._rotateRelative.x/200,this.camera.cameraRotation.y+=this._rotateRelative.y/200,this.camera.cameraDirection.addInPlace(e),this.camera.cameraDirection.addInPlace(this._moveScene),super.checkInputs()}_updateCamera(){this._updateCameraProperty(this._wheelDeltaX,this._wheelXAction,this._wheelXActionCoordinate),this._updateCameraProperty(this._wheelDeltaY,this._wheelYAction,this._wheelYActionCoordinate),this._updateCameraProperty(this._wheelDeltaZ,this._wheelZAction,this._wheelZActionCoordinate)}_updateCameraProperty(t,e,o){if(0===t||null===e||null===o)return;let a=null;switch(e){case i.MoveRelative:a=this._moveRelative;break;case i.RotateRelative:a=this._rotateRelative;break;case i.MoveScene:a=this._moveScene}switch(o){case 0:a.set(t,0,0);break;case 1:a.set(0,t,0);break;case 2:a.set(0,0,t)}}}(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelXMoveRelative",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelYMoveRelative",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelZMoveRelative",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelXRotateRelative",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelYRotateRelative",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelZRotateRelative",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelXMoveScene",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelYMoveScene",null),(0,r.__decorate)([(0,n.serialize)()],R.prototype,"wheelZMoveScene",null),c.CameraInputTypes.FreeCameraMouseWheelInput=R;class g{constructor(t=!1){this.allowMouse=t,this.touchAngularSensibility=2e5,this.touchMoveSensibility=250,this.singleFingerRotate=!1,this._offsetX=null,this._offsetY=null,this._pointerPressed=[],this._isSafari=u.Tools.IsSafari()}attachControl(t){t=u.Tools.BackCompatCameraNoPreventDefault(arguments);let e=null;if(void 0===this._pointerInput&&(this._onLostFocus=()=>{this._offsetX=null,this._offsetY=null},this._pointerInput=i=>{let o=i.event,a="mouse"===o.pointerType||this._isSafari&&void 0===o.pointerType;if(this.allowMouse||!a){if(i.type===m.PointerEventTypes.POINTERDOWN){if(t||o.preventDefault(),this._pointerPressed.push(o.pointerId),1!==this._pointerPressed.length)return;e={x:o.clientX,y:o.clientY}}else if(i.type===m.PointerEventTypes.POINTERUP){t||o.preventDefault();let i=this._pointerPressed.indexOf(o.pointerId);if(-1===i||(this._pointerPressed.splice(i,1),0!=i))return;e=null,this._offsetX=null,this._offsetY=null}else if(i.type===m.PointerEventTypes.POINTERMOVE){if(t||o.preventDefault(),!e||0!=this._pointerPressed.indexOf(o.pointerId))return;this._offsetX=o.clientX-e.x,this._offsetY=-(o.clientY-e.y)}}}),this._observer=this.camera.getScene()._inputManager._addCameraPointerObserver(this._pointerInput,m.PointerEventTypes.POINTERDOWN|m.PointerEventTypes.POINTERUP|m.PointerEventTypes.POINTERMOVE),this._onLostFocus){let t=this.camera.getEngine().getInputElement();t&&t.addEventListener("blur",this._onLostFocus)}}detachControl(){if(this._pointerInput){if(this._observer&&(this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer),this._observer=null),this._onLostFocus){let t=this.camera.getEngine().getInputElement();t&&t.removeEventListener("blur",this._onLostFocus),this._onLostFocus=null}this._pointerPressed.length=0,this._offsetX=null,this._offsetY=null}}checkInputs(){if(null===this._offsetX||null===this._offsetY||0===this._offsetX&&0===this._offsetY)return;let t=this.camera,e=t.movement.input,i=e.getEntry("touch","rotate"),o=e.getEntry("touch","translate"),a=t._calculateHandednessMultiplier(),s=this.singleFingerRotate&&1===this._pointerPressed.length||!this.singleFingerRotate&&this._pointerPressed.length>1;if(i){let e=i.sensitivity??1/this.touchAngularSensibility;t.cameraRotation.y=this._offsetX*a*e,s&&(t.cameraRotation.x=-(this._offsetY*a)*e)}if(!s&&o){let e=t._computeLocalCameraSpeed(),i=o.sensitivity??(0!==this.touchMoveSensibility?1/this.touchMoveSensibility:0),a=h.TmpVectors.Vector3[0];a.copyFromFloats(0,0,e*this._offsetY*i),h.Matrix.RotationYawPitchRollToRef(t.rotation.y,t.rotation.x,0,t._cameraRotationMatrix),h.Vector3.TransformCoordinatesToRef(a,t._cameraRotationMatrix,a),t.cameraDirection.addInPlace(a)}}getClassName(){return"FreeCameraTouchInput"}getSimpleName(){return"touch"}}(0,r.__decorate)([(0,n.serialize)()],g.prototype,"touchAngularSensibility",void 0),(0,r.__decorate)([(0,n.serialize)()],g.prototype,"touchMoveSensibility",void 0),c.CameraInputTypes.FreeCameraTouchInput=g;var M=t.i(75405);class C extends c.CameraInputsManager{constructor(t){super(t),this._mouseInput=null,this._mouseWheelInput=null}addKeyboard(){return this.add(new p),this}addMouse(t=!0){return this._mouseInput||(this._mouseInput=new y(t),this.add(this._mouseInput)),this}removeMouse(){return this._mouseInput&&this.remove(this._mouseInput),this}addMouseWheel(){return this._mouseWheelInput||(this._mouseWheelInput=new R,this.add(this._mouseWheelInput)),this}removeMouseWheel(){return this._mouseWheelInput&&this.remove(this._mouseWheelInput),this}addTouch(){return this.add(new g),this}clear(){super.clear(),this._mouseInput=null}}(o=C.prototype).addDeviceOrientation??(o.addDeviceOrientation=(0,M._MissingSideEffect)("FreeCameraInputsManager","addDeviceOrientation")),(a=C.prototype).addVirtualJoystick??(a.addVirtualJoystick=(0,M._MissingSideEffect)("FreeCameraInputsManager","addVirtualJoystick")),(s=C.prototype).addGamepad??(s.addGamepad=(0,M._MissingSideEffect)("FreeCameraInputsManager","addGamepad"));var P=t.i(76535);class k extends l.TargetCamera{get angularSensibility(){let t=this.inputs.attached.mouse;return t?t.angularSensibility:0}set angularSensibility(t){let e=this.inputs.attached.mouse;e&&(e.angularSensibility=t)}get keysUp(){let t=this.inputs.attached.keyboard;return t?t.keysUp:[]}set keysUp(t){let e=this.inputs.attached.keyboard;e&&(e.keysUp=t)}get keysUpward(){let t=this.inputs.attached.keyboard;return t?t.keysUpward:[]}set keysUpward(t){let e=this.inputs.attached.keyboard;e&&(e.keysUpward=t)}get keysDown(){let t=this.inputs.attached.keyboard;return t?t.keysDown:[]}set keysDown(t){let e=this.inputs.attached.keyboard;e&&(e.keysDown=t)}get keysDownward(){let t=this.inputs.attached.keyboard;return t?t.keysDownward:[]}set keysDownward(t){let e=this.inputs.attached.keyboard;e&&(e.keysDownward=t)}get keysLeft(){let t=this.inputs.attached.keyboard;return t?t.keysLeft:[]}set keysLeft(t){let e=this.inputs.attached.keyboard;e&&(e.keysLeft=t)}get keysRight(){let t=this.inputs.attached.keyboard;return t?t.keysRight:[]}set keysRight(t){let e=this.inputs.attached.keyboard;e&&(e.keysRight=t)}get keysRotateLeft(){let t=this.inputs.attached.keyboard;return t?t.keysRotateLeft:[]}set keysRotateLeft(t){let e=this.inputs.attached.keyboard;e&&(e.keysRotateLeft=t)}get keysRotateRight(){let t=this.inputs.attached.keyboard;return t?t.keysRotateRight:[]}set keysRotateRight(t){let e=this.inputs.attached.keyboard;e&&(e.keysRotateRight=t)}get keysRotateUp(){let t=this.inputs.attached.keyboard;return t?t.keysRotateUp:[]}set keysRotateUp(t){let e=this.inputs.attached.keyboard;e&&(e.keysRotateUp=t)}get keysRotateDown(){let t=this.inputs.attached.keyboard;return t?t.keysRotateDown:[]}set keysRotateDown(t){let e=this.inputs.attached.keyboard;e&&(e.keysRotateDown=t)}constructor(t,e,i,o=!0){super(t,e,i,o),this.ellipsoid=new h.Vector3(.5,1,.5),this.ellipsoidOffset=new h.Vector3(0,0,0),this.checkCollisions=!1,this.applyGravity=!1,this._needMoveForGravity=!1,this._oldPosition=h.Vector3.Zero(),this._diffPosition=h.Vector3.Zero(),this._newPosition=h.Vector3.Zero(),this._collisionMask=-1,this._onCollisionPositionChange=(t,e,i=null)=>{this._newPosition.copyFrom(e),this._newPosition.subtractToRef(this._oldPosition,this._diffPosition),this._diffPosition.length()>P.AbstractEngine.CollisionsEpsilon&&(this.position.addToRef(this._diffPosition,this._deferredPositionUpdate),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate),this.onCollide&&i&&this.onCollide(i))},this.inputs=new C(this),this.inputs.addKeyboard().addMouse()}attachControl(t,e){e=u.Tools.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(e)}detachControl(){this.inputs.detachElement(),this.cameraDirection=new h.Vector3(0,0,0),this.cameraRotation=new h.Vector2(0,0)}get collisionMask(){return this._collisionMask}set collisionMask(t){this._collisionMask=isNaN(t)?-1:t}_collideWithWorld(t){(this.parent?h.Vector3.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);let e=this.getScene().collisionCoordinator;this._collider||(this._collider=e.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;let i=t;this.applyGravity&&(i=t.add(this.getScene().gravity)),e.getNewPosition(this._oldPosition,i,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)}_checkInputs(){this._localDirection||(this._localDirection=h.Vector3.Zero(),this._transformedDirection=h.Vector3.Zero()),this.inputs.checkInputs(),super._checkInputs()}set needMoveForGravity(t){this._needMoveForGravity=t}get needMoveForGravity(){return this._needMoveForGravity}_decideIfNeedsToMove(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0}_updatePosition(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):super._updatePosition()}dispose(){this.inputs.clear(),super.dispose()}getClassName(){return"FreeCamera"}}(0,r.__decorate)([(0,n.serializeAsVector3)()],k.prototype,"ellipsoid",void 0),(0,r.__decorate)([(0,n.serializeAsVector3)()],k.prototype,"ellipsoidOffset",void 0),(0,r.__decorate)([(0,n.serialize)()],k.prototype,"checkCollisions",void 0),(0,r.__decorate)([(0,n.serialize)()],k.prototype,"applyGravity",void 0);class w extends k{get touchAngularSensibility(){let t=this.inputs.attached.touch;return t?t.touchAngularSensibility:0}set touchAngularSensibility(t){let e=this.inputs.attached.touch;e&&(e.touchAngularSensibility=t)}get touchMoveSensibility(){let t=this.inputs.attached.touch;return t?t.touchMoveSensibility:0}set touchMoveSensibility(t){let e=this.inputs.attached.touch;e&&(e.touchMoveSensibility=t)}constructor(t,e,i){super(t,e,i),this.inputs.addTouch(),this._setupInputs()}getClassName(){return"TouchCamera"}_setupInputs(){let t=this.inputs.attached.touch,e=this.inputs.attached.mouse;e?e.touchEnabled=!t:t&&(t.allowMouse=!e)}}var T=t.i(34548),I=t.i(59576);class b extends w{get gamepadAngularSensibility(){let t=this.inputs.attached.gamepad;return t?t.gamepadAngularSensibility:0}set gamepadAngularSensibility(t){let e=this.inputs.attached.gamepad;e&&(e.gamepadAngularSensibility=t)}get gamepadMoveSensibility(){let t=this.inputs.attached.gamepad;return t?t.gamepadMoveSensibility:0}set gamepadMoveSensibility(t){let e=this.inputs.attached.gamepad;e&&(e.gamepadMoveSensibility=t)}constructor(t,e,i){super(t,e,i),this.inputs.addGamepad()}getClassName(){return"UniversalCamera"}}let x=!1;function D(){x||(x=!0,T.Node.AddNodeConstructor("FreeCamera",(t,e)=>()=>new b(t,h.Vector3.Zero(),e)),I.Camera._CreateDefaultParsedCamera=(t,e)=>new b(t,h.Vector3.Zero(),e))}t.s(["RegisterUniversalCamera",0,D,"UniversalCamera",0,b],36186),D(),t.s([],61208),t.i(61208),t.i(36186),t.s(["RegisterUniversalCamera",0,D,"UniversalCamera",0,b],30118)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10272,94047,37143,e=>{"use strict";e.s(["__decorate",0,function(e,t,r,i){var f,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(f=e[n])&&(s=(a<3?f(s):a>3?f(t,r,s):f(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}],10272);let t={},r={};function i(e){let t=e.getClassName();return r[t]||(r[t]={}),r[t]}function f(e,t){return(r,f)=>{let a=i(r);a[f]||(a[f]={type:e,sourceName:t})}}function a(e,t,r,i){let f=r.value;r.value=(...r)=>{let a=f;if("u">typeof _native&&_native[t]){let e=_native[t];a=i?(...t)=>i(...t)?e(...t):f(...t):e}return e[t]=a,a(...r)}}e.s(["GetDirectStore",0,i,"GetMergedStore",0,function(e){let i=e.getClassName();if(t[i])return t[i];t[i]={};let f=t[i],a=e,s=i;for(;s;){let e,t=r[s];for(let e in t)f[e]=t[e];let i=!1;do{if(!(e=Object.getPrototypeOf(a)).getClassName){i=!0;break}if(e.getClassName()!==s)break;a=e}while(e)if(i)break;s=e.getClassName(),a=e}return f}],94047),a.filter=function(e){return(t,r,i)=>a(t,r,i,e)},e.s(["expandToProperty",0,function(e,t=null){return function(e,t=null){return(r,i)=>{let f=t||"_"+i;Object.defineProperty(r,i,{get:function(){return this[f]},set:function(t){"function"==typeof this[f]?.equals&&this[f].equals(t)||this[f]!==t&&(this[f]=t,r[e].apply(this))},enumerable:!0,configurable:!0})}}(e,t)},"nativeOverride",0,a,"serialize",0,function(e){return f(0,e)},"serializeAsColor3",0,function(e){return f(2,e)},"serializeAsColor4",0,function(e){return f(8,e)},"serializeAsColorCurves",0,function(e){return f(7,e)},"serializeAsFresnelParameters",0,function(e){return f(3,e)},"serializeAsImageProcessingConfiguration",0,function(e){return f(9,e)},"serializeAsMeshReference",0,function(e){return f(6,e)},"serializeAsQuaternion",0,function(e){return f(10,e)},"serializeAsTexture",0,function(e){return f(1,e)},"serializeAsVector2",0,function(e){return f(4,e)},"serializeAsVector3",0,function(e){return f(5,e)}],37143)},80871,76312,e=>{"use strict";var t=e.i(75405);class r{static Eval(e,t){return"true"===(e=e.match(/\([^()]*\)/g)?e.replace(/\([^()]*\)/g,e=>(e=e.slice(1,e.length-1),r._HandleParenthesisContent(e,t))):r._HandleParenthesisContent(e,t))||"false"!==e&&r.Eval(e,t)}static _HandleParenthesisContent(e,t){let i;t=t||(e=>"true"===e);let f=e.split("||");for(let e in f)if(Object.prototype.hasOwnProperty.call(f,e)){let a=r._SimplifyNegation(f[e].trim()),s=a.split("&&");if(s.length>1)for(let e=0;e<s.length;++e){let f=r._SimplifyNegation(s[e].trim());if(!(i="true"!==f&&"false"!==f?"!"===f[0]?!t(f.substring(1)):t(f):"true"===f)){a="false";break}}if(i||"true"===a){i=!0;break}i="true"!==a&&"false"!==a?"!"===a[0]?!t(a.substring(1)):t(a):"true"===a}return i?"true":"false"}static _SimplifyNegation(e){return"!true"===(e=(e=e.replace(/^[\s!]+/,e=>(e=e.replace(/[\s]/g,()=>"")).length%2?"!":"")).trim())?e="false":"!false"===e&&(e="true"),e}}class i{static EnableFor(e){e._tags=e._tags||{},e.hasTags=()=>i.HasTags(e),e.addTags=t=>i.AddTagsTo(e,t),e.removeTags=t=>i.RemoveTagsFrom(e,t),e.matchesTagsQuery=t=>i.MatchesQuery(e,t)}static DisableFor(e){delete e._tags,delete e.hasTags,delete e.addTags,delete e.removeTags,delete e.matchesTagsQuery}static HasTags(e){if(!e._tags)return!1;let t=e._tags;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!0;return!1}static GetTags(e,t=!0){if(!e._tags)return null;if(!t)return e._tags;{let t=[];for(let r in e._tags)Object.prototype.hasOwnProperty.call(e._tags,r)&&!0===e._tags[r]&&t.push(r);return t.join(" ")}}static AddTagsTo(e,t){if(t&&"string"==typeof t)for(let r of t.split(" "))i._AddTagTo(e,r)}static _AddTagTo(e,t){""===(t=t.trim())||"true"===t||"false"===t||t.match(/[\s]/)||t.match(/^([!]|([|]|[&]){2})/)||(i.EnableFor(e),e._tags[t]=!0)}static RemoveTagsFrom(e,t){if(!i.HasTags(e))return;let r=t.split(" ");for(let t in r)i._RemoveTagFrom(e,r[t])}static _RemoveTagFrom(e,t){delete e._tags[t]}static MatchesQuery(e,t){return void 0===t||(""===t?i.HasTags(e):r.Eval(t,t=>i.HasTags(e)&&e._tags[t]))}}e.s(["Tags",0,i],76312);var f=e.i(70653),a=e.i(96265),s=e.i(94047);let n=function(e,t,r,f={}){let a=e();i&&i.HasTags(t)&&i.AddTagsTo(a,i.GetTags(t,!0));let n=(0,s.GetMergedStore)(a),o={};for(let e in n){let i=n[e],s=t[e],_=i.type;if(null!=s&&("uniqueId"!==e||u.AllowLoadingUniqueId))switch(_){case 0:case 6:case 9:case 11:"function"==typeof s.slice?a[e]=s.slice():a[e]=s;break;case 1:f.cloneTexturesOnlyOnce&&o[s.uniqueId]?a[e]=o[s.uniqueId]:(a[e]=r||s.isRenderTarget?s:s.clone(),o[s.uniqueId]=a[e]);break;case 2:case 3:case 4:case 5:case 7:case 8:case 10:case 12:a[e]=r?s:s.clone()}}return a};class u{static AppendSerializedAnimations(e,t){if(e.animations){t.animations=[];for(let r=0;r<e.animations.length;r++){let i=e.animations[r];t.animations.push(i.serialize())}}}static Serialize(e,t){t||(t={}),i&&(t.tags=i.GetTags(e));let r=(0,s.GetMergedStore)(e);for(let i in r){let f=r[i],a=f.sourceName||i,s=f.type,n=e[i];if(null!=n&&("uniqueId"!==i||u.AllowLoadingUniqueId))switch(s){case 0:Array.isArray(n)?t[a]=n.slice():t[a]=n;break;case 1:case 3:case 7:case 9:t[a]=n.serialize();break;case 2:case 4:case 5:case 8:case 10:case 12:t[a]=n.asArray();break;case 6:case 11:t[a]=n.id}}return t}static ParseProperties(e,t,r,i){i||(i="");let n=(0,s.GetMergedStore)(t);for(let s in n){let o=n[s],_=e[o.sourceName||s],h=o.type;if(null!=_&&("uniqueId"!==s||u.AllowLoadingUniqueId))switch(h){case 0:t[s]=_;break;case 1:r&&(t[s]=u._TextureParser(_,r,i));break;case 2:t[s]=f.Color3.FromArray(_);break;case 3:t[s]=u._FresnelParametersParser(_);break;case 4:t[s]=a.Vector2.FromArray(_);break;case 5:t[s]=a.Vector3.FromArray(_);break;case 6:r&&(t[s]=r.getLastMeshById(_));break;case 7:t[s]=u._ColorCurvesParser(_);break;case 8:t[s]=f.Color4.FromArray(_);break;case 9:t[s]=u._ImageProcessingConfigurationParser(_);break;case 10:t[s]=a.Quaternion.FromArray(_);break;case 11:r&&(t[s]=r.getCameraById(_));break;case 12:t[s]=a.Matrix.FromArray(_)}}}static Parse(e,t,r,f=null){let a=e();return i&&i.AddTagsTo(a,t.tags),u.ParseProperties(t,a,r,f),a}static Clone(e,t,r={}){return n(e,t,!1,r)}static Instanciate(e,t){return n(e,t,!0)}}u.AllowLoadingUniqueId=!1,u._ImageProcessingConfigurationParser=e=>{throw(0,t._WarnImport)("ImageProcessingConfiguration")},u._FresnelParametersParser=e=>{throw(0,t._WarnImport)("FresnelParameters")},u._ColorCurvesParser=e=>{throw(0,t._WarnImport)("ColorCurves")},u._TextureParser=(e,r,i)=>{throw(0,t._WarnImport)("Texture")},e.s(["SerializationHelper",0,u],80871)},33855,21823,e=>{"use strict";var t=e.i(13379),r=e.i(65740);class i{constructor(e,t,r=!1,i,f=!1,a){this._uniformNames=[],this._valueCache={},this._engine=e,this._noUBO=!e.supportsUniformBuffers||f,this._dynamic=r,this._name=i??"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUBOsInFrame=!1,(void 0===a&&this._engine._features.trackUbosInFrame||!0===a)&&(this._buffers=[],this._bufferIndex=-1,this._bufferUpdatedLastFrame=!1,this._createBufferOnWrite=!1,this._currentFrameId=0,this._trackUBOsInFrame=!0),this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateUIntArray=this._updateUIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect,this.updateUInt=this._updateUIntForEffect,this.updateUInt2=this._updateUInt2ForEffect,this.updateUInt3=this._updateUInt3ForEffect,this.updateUInt4=this._updateUInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateUIntArray=this._updateUIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform,this.updateUInt=this._updateUIntForUniform,this.updateUInt2=this._updateUInt2ForUniform,this.updateUInt3=this._updateUInt3ForUniform,this.updateUInt4=this._updateUInt4ForUniform)}get useUbo(){return!this._noUBO}get isSync(){return!this._needSync}isDynamic(){return this._dynamic}getData(){return this._bufferData}getBuffer(){return this._buffer}getUniformNames(){return this._uniformNames}_fillAlignment(e){let t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){let e=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;let r=this._uniformLocationPointer-e;for(let e=0;e<r;e++)this._data.push(0)}}addUniform(e,t,r=0){let i;if((r>0&&"number"==typeof t&&(this._uniformArraySizes[e]={strideSize:t,arraySize:r}),void 0===this._uniformLocations[e])&&(this._uniformNames.push(e),!this._noUBO)){if(r>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),16==t)t*=r;else{let e=4-t;t=t*r+e*r}i=[];for(let e=0;e<t;e++)i.push(0)}else{if(t instanceof Array)t=(i=t).length;else{i=[];for(let e=0;e<t;e++)i.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(let e=0;e<t;e++)this._data.push(i[e]);this._needSync=!0}}addMatrix(e,t){this.addUniform(e,Array.prototype.slice.call(t.asArray()))}addFloat2(e,t,r){this.addUniform(e,[t,r])}addFloat3(e,t,r,i){this.addUniform(e,[t,r,i])}addColor3(e,t){let r=[t.r,t.g,t.b];this.addUniform(e,r)}addColor4(e,t,r){let i=[t.r,t.g,t.b,r];this.addUniform(e,i)}addVector3(e,t){let r=[t.x,t.y,t.z];this.addUniform(e,r)}addMatrix3x3(e){this.addUniform(e,12)}addMatrix2x2(e){this.addUniform(e,8)}create(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)}_getNamesDebug(){let e=[],t=0;for(let r in this._uniformLocations)if(e.push(r),10==++t)break;return e.join(",")}_rebuild(){!this._noUBO&&this._bufferData&&(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData,this._name+"_UniformList:"+this._getNamesDebug()):this._buffer=this._engine.createUniformBuffer(this._bufferData,this._name+"_UniformList:"+this._getNamesDebug()),this._trackUBOsInFrame&&(this._buffers.push([this._buffer,this._engine._features.checkUbosContentBeforeUpload?this._bufferData.slice():void 0]),this._bufferIndex=this._buffers.length-1,this._createBufferOnWrite=!1))}_rebuildAfterContextLost(){this._trackUBOsInFrame&&(this._buffers=[],this._currentFrameId=0),this._rebuild()}get _numBuffers(){return this._buffers.length}get _indexBuffer(){return this._bufferIndex}get name(){return this._name}set name(e){this._name=e}get currentEffect(){return this._currentEffect}_buffersEqual(e,t){for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}_copyBuffer(e,t){for(let r=0;r<e.length;++r)t[r]=e[r]}update(){if(!this._noUBO){if(this.bindUniformBuffer(),!this._buffer)return void this.create();if(!this._dynamic&&!this._needSync){this._createBufferOnWrite=this._trackUBOsInFrame;return}if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1])if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1])){this._needSync=!1,this._createBufferOnWrite=this._trackUBOsInFrame;return}else this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1]);this._bufferUpdatedLastFrame=!0,this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1,this._createBufferOnWrite=this._trackUBOsInFrame}}_createNewBuffer(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()}_checkNewFrame(){this._trackUBOsInFrame&&this._currentFrameId!==this._engine.frameId&&(this._currentFrameId=this._engine.frameId,this._createBufferOnWrite=!1,this._buffers&&this._buffers.length>0?(1===this._buffers.length?this._needSync=!this._bufferUpdatedLastFrame:this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)}updateUniform(e,r,i){this._checkNewFrame();let f=this._uniformLocations[e];if(void 0===f){if(this._buffer)return void t.Logger.Error("Cannot add an uniform after UBO has been created. uniformName="+e);this.addUniform(e,i),f=this._uniformLocations[e]}if(this._buffer||this.create(),this._dynamic)for(let e=0;e<i;e++)this._bufferData[f+e]=r[e];else{let e=!1;for(let t=0;t<i;t++)(16!==i||this._engine._features.uniformBufferHardCheckMatrix)&&this._bufferData[f+t]===Math.fround(r[t])||(e=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[f+t]=r[t]);this._needSync=this._needSync||e}}updateUniformArray(e,i,f){this._checkNewFrame();let a=this._uniformLocations[e];if(void 0===a)return void t.Logger.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform and make sure that uniform buffers are supported by the current engine.");this._buffer||this.create();let s=this._uniformArraySizes[e];if(this._dynamic)for(let e=0;e<f;e++)this._bufferData[a+e]=i[e];else{let e=!1,t=0,n=0;for(let u=0;u<f;u++)if(this._bufferData[a+4*n+t]!==r.Tools.FloatRound(i[u])&&(e=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[a+4*n+t]=i[u]),++t===s.strideSize){for(;t<4;t++)this._bufferData[a+4*n+t]=0;t=0,n++}this._needSync=this._needSync||e}}_cacheMatrix(e,t){this._checkNewFrame();let r=this._valueCache[e],i=t.updateFlag;return(void 0===r||r!==i)&&(this._valueCache[e]=i,!0)}_updateMatrix3x3ForUniform(e,t){for(let e=0;e<3;e++)i._TempBuffer[4*e]=t[3*e],i._TempBuffer[4*e+1]=t[3*e+1],i._TempBuffer[4*e+2]=t[3*e+2],i._TempBuffer[4*e+3]=0;this.updateUniform(e,i._TempBuffer,12)}_updateMatrix3x3ForEffect(e,t){this._currentEffect.setMatrix3x3(e,t)}_updateMatrix2x2ForEffect(e,t){this._currentEffect.setMatrix2x2(e,t)}_updateMatrix2x2ForUniform(e,t){for(let e=0;e<2;e++)i._TempBuffer[4*e]=t[2*e],i._TempBuffer[4*e+1]=t[2*e+1],i._TempBuffer[4*e+2]=0,i._TempBuffer[4*e+3]=0;this.updateUniform(e,i._TempBuffer,8)}_updateFloatForEffect(e,t,r=""){this._currentEffect.setFloat(e+r,t)}_updateFloatForUniform(e,t){i._TempBuffer[0]=t,this.updateUniform(e,i._TempBuffer,1)}_updateFloat2ForEffect(e,t,r,i=""){this._currentEffect.setFloat2(e+i,t,r)}_updateFloat2ForUniform(e,t,r){i._TempBuffer[0]=t,i._TempBuffer[1]=r,this.updateUniform(e,i._TempBuffer,2)}_updateFloat3ForEffect(e,t,r,i,f=""){this._currentEffect.setFloat3(e+f,t,r,i)}_updateFloat3ForUniform(e,t,r,f){i._TempBuffer[0]=t,i._TempBuffer[1]=r,i._TempBuffer[2]=f,this.updateUniform(e,i._TempBuffer,3)}_updateFloat4ForEffect(e,t,r,i,f,a=""){this._currentEffect.setFloat4(e+a,t,r,i,f)}_updateFloat4ForUniform(e,t,r,f,a){i._TempBuffer[0]=t,i._TempBuffer[1]=r,i._TempBuffer[2]=f,i._TempBuffer[3]=a,this.updateUniform(e,i._TempBuffer,4)}_updateFloatArrayForEffect(e,t,r=""){switch(this._uniformArraySizes[e]?.strideSize){case 2:this._currentEffect.setFloatArray2(e+r,t);break;case 3:this._currentEffect.setFloatArray3(e+r,t);break;case 4:this._currentEffect.setFloatArray4(e+r,t);break;default:this._currentEffect.setFloatArray(e+r,t)}}_updateFloatArrayForUniform(e,t){this.updateUniformArray(e,t,t.length)}_updateArrayForEffect(e,t){this._currentEffect.setArray(e,t)}_updateArrayForUniform(e,t){this.updateUniformArray(e,t,t.length)}_updateIntArrayForEffect(e,t){this._currentEffect.setIntArray(e,t)}_updateIntArrayForUniform(e,t){i._TempBufferInt32View.set(t),this.updateUniformArray(e,i._TempBuffer,t.length)}_updateUIntArrayForEffect(e,t){this._currentEffect.setUIntArray(e,t)}_updateUIntArrayForUniform(e,t){i._TempBufferUInt32View.set(t),this.updateUniformArray(e,i._TempBuffer,t.length)}_updateMatrixForEffect(e,t){this._currentEffect.setMatrix(e,t)}_updateMatrixForUniform(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.asArray(),16)}_updateMatricesForEffect(e,t){this._currentEffect.setMatrices(e,t)}_updateMatricesForUniform(e,t){this.updateUniform(e,t,t.length)}_updateVector3ForEffect(e,t){this._currentEffect.setVector3(e,t)}_updateVector3ForUniform(e,t){i._TempBuffer[0]=t.x,i._TempBuffer[1]=t.y,i._TempBuffer[2]=t.z,this.updateUniform(e,i._TempBuffer,3)}_updateVector4ForEffect(e,t){this._currentEffect.setVector4(e,t)}_updateVector4ForUniform(e,t){i._TempBuffer[0]=t.x,i._TempBuffer[1]=t.y,i._TempBuffer[2]=t.z,i._TempBuffer[3]=t.w,this.updateUniform(e,i._TempBuffer,4)}_updateColor3ForEffect(e,t,r=""){this._currentEffect.setColor3(e+r,t)}_updateColor3ForUniform(e,t){i._TempBuffer[0]=t.r,i._TempBuffer[1]=t.g,i._TempBuffer[2]=t.b,this.updateUniform(e,i._TempBuffer,3)}_updateColor4ForEffect(e,t,r,i=""){this._currentEffect.setColor4(e+i,t,r)}_updateDirectColor4ForEffect(e,t,r=""){this._currentEffect.setDirectColor4(e+r,t)}_updateColor4ForUniform(e,t,r){i._TempBuffer[0]=t.r,i._TempBuffer[1]=t.g,i._TempBuffer[2]=t.b,i._TempBuffer[3]=r,this.updateUniform(e,i._TempBuffer,4)}_updateDirectColor4ForUniform(e,t){i._TempBuffer[0]=t.r,i._TempBuffer[1]=t.g,i._TempBuffer[2]=t.b,i._TempBuffer[3]=t.a,this.updateUniform(e,i._TempBuffer,4)}_updateIntForEffect(e,t,r=""){this._currentEffect.setInt(e+r,t)}_updateIntForUniform(e,t){i._TempBufferInt32View[0]=t,this.updateUniform(e,i._TempBuffer,1)}_updateInt2ForEffect(e,t,r,i=""){this._currentEffect.setInt2(e+i,t,r)}_updateInt2ForUniform(e,t,r){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,this.updateUniform(e,i._TempBuffer,2)}_updateInt3ForEffect(e,t,r,i,f=""){this._currentEffect.setInt3(e+f,t,r,i)}_updateInt3ForUniform(e,t,r,f){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=f,this.updateUniform(e,i._TempBuffer,3)}_updateInt4ForEffect(e,t,r,i,f,a=""){this._currentEffect.setInt4(e+a,t,r,i,f)}_updateInt4ForUniform(e,t,r,f,a){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=f,i._TempBufferInt32View[3]=a,this.updateUniform(e,i._TempBuffer,4)}_updateUIntForEffect(e,t,r=""){this._currentEffect.setUInt(e+r,t)}_updateUIntForUniform(e,t){i._TempBufferUInt32View[0]=t,this.updateUniform(e,i._TempBuffer,1)}_updateUInt2ForEffect(e,t,r,i=""){this._currentEffect.setUInt2(e+i,t,r)}_updateUInt2ForUniform(e,t,r){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,this.updateUniform(e,i._TempBuffer,2)}_updateUInt3ForEffect(e,t,r,i,f=""){this._currentEffect.setUInt3(e+f,t,r,i)}_updateUInt3ForUniform(e,t,r,f){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=f,this.updateUniform(e,i._TempBuffer,3)}_updateUInt4ForEffect(e,t,r,i,f,a=""){this._currentEffect.setUInt4(e+a,t,r,i,f)}_updateUInt4ForUniform(e,t,r,f,a){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=f,i._TempBufferUInt32View[3]=a,this.updateUniform(e,i._TempBuffer,4)}setTexture(e,t){this._currentEffect.setTexture(e,t)}setTextureArray(e,t){this._currentEffect.setTextureArray(e,t)}bindTexture(e,t){this._currentEffect._bindTexture(e,t)}updateUniformDirectly(e,t){this.updateUniform(e,t,t.length),this.update()}bindToEffect(e,t){this._currentEffect=e,this._currentEffectName=t}bindUniformBuffer(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)}unbindEffect(){this._currentEffect=void 0,this._currentEffectName=void 0}setDataBuffer(e){if(!this._buffers)return this._buffer===e;for(let t=0;t<this._buffers.length;++t)if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,this._buffers.length>1&&this._buffers[t][1]&&this._bufferData.set(this._buffers[t][1]),this._valueCache={},this._currentFrameId=this._engine.frameId,!0;return!1}has(e){return void 0!==this._uniformLocations[e]}dispose(){if(this._noUBO)return;let e=this._engine._uniformBuffers,t=e.indexOf(this);if(-1!==t&&(e[t]=e[e.length-1],e.pop()),this._trackUBOsInFrame&&this._buffers)for(let e=0;e<this._buffers.length;++e){let t=this._buffers[e][0];this._engine._releaseBuffer(t)}else this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}}i._MAX_UNIFORM_SIZE=256,i._TempBuffer=new Float32Array(i._MAX_UNIFORM_SIZE),i._TempBufferInt32View=new Int32Array(i._TempBuffer.buffer),i._TempBufferUInt32View=new Uint32Array(i._TempBuffer.buffer),e.s(["UniformBuffer",0,i],33855);class f{static CompareLightsPriority(e,t){return e.shadowEnabled!==t.shadowEnabled?!!t.shadowEnabled-!!e.shadowEnabled:t.renderPriority-e.renderPriority}}f.FALLOFF_DEFAULT=0,f.FALLOFF_PHYSICAL=1,f.FALLOFF_GLTF=2,f.FALLOFF_STANDARD=3,f.LIGHTMAP_DEFAULT=0,f.LIGHTMAP_SPECULAR=1,f.LIGHTMAP_SHADOWSONLY=2,f.INTENSITYMODE_AUTOMATIC=0,f.INTENSITYMODE_LUMINOUSPOWER=1,f.INTENSITYMODE_LUMINOUSINTENSITY=2,f.INTENSITYMODE_ILLUMINANCE=3,f.INTENSITYMODE_LUMINANCE=4,f.LIGHTTYPEID_POINTLIGHT=0,f.LIGHTTYPEID_DIRECTIONALLIGHT=1,f.LIGHTTYPEID_SPOTLIGHT=2,f.LIGHTTYPEID_HEMISPHERICLIGHT=3,f.LIGHTTYPEID_RECT_AREALIGHT=4,f.LIGHTTYPEID_CLUSTERED_CONTAINER=5,e.s(["LightConstants",0,f],21823)}]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71773,e=>{"use strict";var r=e.i(12423);let o="lod3DPixelShader",t=`precision highp float;precision highp sampler3D;const float GammaEncodePowerApprox=1.0/2.2;varying vec2 vUV;uniform sampler3D textureSampler;uniform float lod;uniform float slice;uniform int gamma;void main(void)
|
|
2
|
+
{ivec3 textureCoordinates=ivec3(vUV*vec2(textureSize(textureSampler,0).xy),int(slice));gl_FragColor=texelFetch(textureSampler,textureCoordinates,int(lod));if (gamma==0) {gl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(GammaEncodePowerApprox));}}
|
|
3
|
+
`;r.ShaderStore.ShadersStore[o]||(r.ShaderStore.ShadersStore[o]=t),e.s(["lod3DPixelShader",0,{name:o,shader:t}])}]);
|