@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,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])},21222,t=>{"use strict";var e=t.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(t,e){this.type=t,this.event=e}}t.s(["PointerEventTypes",0,s,"PointerInfo",0,class extends i{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(t,e,s,i=null){super(t,e),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(t,s,i,n){super(t,s),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new e.Vector2(i,n)}}])},36365,t=>{"use strict";class e{}e.KEYDOWN=1,e.KEYUP=2;class s{constructor(t,e){this.type=t,this.event=e}}t.s(["KeyboardEventTypes",0,e,"KeyboardInfo",0,s,"KeyboardInfoPre",0,class extends s{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}}])},76696,t=>{"use strict";var e,s;(s=e||(e={}))[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,t.s(["EventConstants",0,i])},67359,t=>{"use strict";var e=t.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(t,e){s.Enabled&&(this._current+=t,e&&this._fetchResult())}beginMonitoring(){s.Enabled&&(this._startMonitoringTime=e.PrecisionDate.Now)}endMonitoring(t=!0){if(!s.Enabled)return;t&&this.fetchNewFrame();let i=e.PrecisionDate.Now;this._current=i-this._startMonitoringTime,t&&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 t=e.PrecisionDate.Now;t-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=t,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}s.Enabled=!0,t.s(["PerfCounter",0,s])},1773,t=>{"use strict";t.s(["useOpenGLOrientationForUV",()=>!1])},25348,t=>{"use strict";class e{constructor(t,e,s,i){this.x=t,this.y=e,this.width=s,this.height=i}toGlobal(t,s){return new e(this.x*t,this.y*s,this.width*t,this.height*s)}toGlobalToRef(t,e,s){return s.x=this.x*t,s.y=this.y*e,s.width=this.width*t,s.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,s,i,n,r=t.i(96265);(e=i||(i={}))[e.LOCAL=0]="LOCAL",e[e.WORLD=1]="WORLD",e[e.BONE=2]="BONE";class a{}a.X=new r.Vector3(1,0,0),a.Y=new r.Vector3(0,1,0),a.Z=new r.Vector3(0,0,1),(s=n||(n={}))[s.X=0]="X",s[s.Y=1]="Y",s[s.Z=2]="Z",t.s(["Axis",0,a,"Coordinate",0,n,"Space",0,i])},44939,t=>{"use strict";var e=t.i(23240);t.s(["DrawWrapper",0,class{static GetEffect(t){return void 0===t.getPipelineContext?t.effect:t}constructor(t,e=!0){this._wasPreviouslyReady=!1,this._forceRebindOnNextCall=!0,this._wasPreviouslyUsingInstances=null,this.effect=null,this.defines=null,this.drawContext=t.createDrawContext(),e&&(this.materialContext=t.createMaterialContext())}setEffect(t,e,s=!0){this.effect=t,void 0!==e&&(this.defines=e),s&&this.drawContext?.reset()}dispose(t=!1){if(this.effect){let s=this.effect;t?s.dispose():e.TimingTools.SetImmediate(()=>{s.getEngine().onEndFrameObservable.addOnce(()=>{s.dispose()})}),this.effect=null}this.drawContext?.dispose()}}])},49007,t=>{"use strict";t.s(["IntersectionInfo",0,class{constructor(t,e,s){this.bu=t,this.bv=e,this.distance=s,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},75991,t=>{"use strict";var e,s,i=t.i(46703),n=t.i(96265),r=t.i(89030);(e=s||(s={}))[e.CW=0]="CW",e[e.CCW=1]="CCW";class a{constructor(t){this._radians=t,this._radians<0&&(this._radians+=2*Math.PI)}degrees(){return 180*this._radians/Math.PI}radians(){return this._radians}static BetweenTwoPoints(t,e){let s=e.subtract(t);return new a(Math.atan2(s.y,s.x))}static BetweenTwoVectors(t,e){let s=t.lengthSquared()*e.lengthSquared();if(0===s)return new a(Math.PI/2);s=Math.sqrt(s);let n=t.dot(e)/s;return new a(Math.acos(n=(0,i.Clamp)(n,-1,1)))}static FromRadians(t){return new a(t)}static FromDegrees(t){return new a(t*Math.PI/180)}}class o{constructor(t,e,s){this.startPoint=t,this.midPoint=e,this.endPoint=s;const i=Math.pow(e.x,2)+Math.pow(e.y,2),r=(Math.pow(t.x,2)+Math.pow(t.y,2)-i)/2,o=(i-Math.pow(s.x,2)-Math.pow(s.y,2))/2,h=(t.x-e.x)*(e.y-s.y)-(e.x-s.x)*(t.y-e.y);this.centerPoint=new n.Vector2((r*(e.y-s.y)-o*(t.y-e.y))/h,((t.x-e.x)*o-(e.x-s.x)*r)/h),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=a.BetweenTwoPoints(this.centerPoint,this.startPoint);const l=this.startAngle.degrees();let c=a.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),u=a.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();c-l>180&&(c-=360),c-l<-180&&(c+=360),u-c>180&&(u-=360),u-c<-180&&(u+=360),this.orientation=c-l<0?0:1,this.angle=a.FromDegrees(0===this.orientation?l-u:u-l)}}class h{constructor(t,e){this._points=[],this._length=0,this.closed=!1,this._points.push(new n.Vector2(t,e))}addLineTo(t,e){if(this.closed)return this;let s=new n.Vector2(t,e),i=this._points[this._points.length-1];return this._points.push(s),this._length+=s.subtract(i).length(),this}addArcTo(t,e,s,i,r=36){if(this.closed)return this;let a=new o(this._points[this._points.length-1],new n.Vector2(t,e),new n.Vector2(s,i)),h=a.angle.radians()/r;0===a.orientation&&(h*=-1);let l=a.startAngle.radians()+h;for(let t=0;t<r;t++){let t=Math.cos(l)*a.radius+a.centerPoint.x,e=Math.sin(l)*a.radius+a.centerPoint.y;this.addLineTo(t,e),l+=h}return this}addQuadraticCurveTo(t,e,s,i,n=36){if(this.closed)return this;let r=(t,e,s,i)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*i,a=this._points[this._points.length-1];for(let o=0;o<=n;o++){let h=o/n,l=r(h,a.x,t,s),c=r(h,a.y,e,i);this.addLineTo(l,c)}return this}addBezierCurveTo(t,e,s,i,n,r,a=36){if(this.closed)return this;let o=(t,e,s,i,n)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*i+t*t*t*n,h=this._points[this._points.length-1];for(let l=0;l<=a;l++){let c=l/a,u=o(c,h.x,t,s,n),_=o(c,h.y,e,i,r);this.addLineTo(u,_)}return this}isPointInside(t){let e=!1,s=this._points.length;for(let i=s-1,n=0;n<s;i=n++){let s=this._points[i],r=this._points[n],a=r.x-s.x,o=r.y-s.y;if(Math.abs(o)>Number.EPSILON){if(o<0&&(s=this._points[n],a=-a,r=this._points[i],o=-o),t.y<s.y||t.y>r.y)continue;if(t.y===s.y&&t.x===s.x)return!0;{let i=o*(t.x-s.x)-a*(t.y-s.y);if(0===i)return!0;if(i<0)continue;e=!e}}else{if(t.y!==s.y)continue;if(r.x<=t.x&&t.x<=s.x||s.x<=t.x&&t.x<=r.x)return!0}}return e}close(){return this.closed=!0,this}length(){let t=this._length;if(this.closed){let e=this._points[this._points.length-1];t+=this._points[0].subtract(e).length()}return t}area(){let t=this._points.length,e=0;for(let s=t-1,i=0;i<t;s=i++)e+=this._points[s].x*this._points[i].y-this._points[i].x*this._points[s].y;return .5*e}getPoints(){return this._points}getPointAtLengthPosition(t){if(t<0||t>1)return n.Vector2.Zero();let e=t*this.length(),s=0;for(let t=0;t<this._points.length;t++){let i=(t+1)%this._points.length,r=this._points[t],a=this._points[i].subtract(r),o=a.length()+s;if(e>=s&&e<=o){let t=a.normalize(),i=e-s;return new n.Vector2(r.x+t.x*i,r.y+t.y*i)}s=o}return n.Vector2.Zero()}static StartingAt(t,e){return new h(t,e)}}class l{constructor(t,e=null,s,i=!1){this.path=t,this._curve=[],this._distances=[],this._tangents=[],this._normals=[],this._binormals=[],this._pointAtData={id:0,point:n.Vector3.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:n.Matrix.Identity()};for(let e=0;e<t.length;e++)this._curve[e]=t[e].clone();this._raw=s||!1,this._alignTangentsWithPath=i,this._compute(e,i)}getCurve(){return this._curve}getPoints(){return this._curve}length(){return this._distances[this._distances.length-1]}getTangents(){return this._tangents}getNormals(){return this._normals}getBinormals(){return this._binormals}getDistances(){return this._distances}getPointAt(t){return this._updatePointAtData(t).point}getTangentAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.Forward(),this._pointAtData.interpolationMatrix):this._tangents[this._pointAtData.previousPointArrayIndex]}getNormalAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.Right(),this._pointAtData.interpolationMatrix):this._normals[this._pointAtData.previousPointArrayIndex]}getBinormalAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.UpReadOnly,this._pointAtData.interpolationMatrix):this._binormals[this._pointAtData.previousPointArrayIndex]}getDistanceAt(t){return this.length()*t}getPreviousPointIndexAt(t){return this._updatePointAtData(t),this._pointAtData.previousPointArrayIndex}getSubPositionAt(t){return this._updatePointAtData(t),this._pointAtData.subPosition}getClosestPositionTo(t){let e=Number.MAX_VALUE,s=0;for(let i=0;i<this._curve.length-1;i++){let r=this._curve[i+0],a=this._curve[i+1].subtract(r).normalize(),o=this._distances[i+1]-this._distances[i+0],h=Math.min(Math.max(n.Vector3.Dot(a,t.subtract(r).normalize()),0)*n.Vector3.Distance(r,t)/o,1),l=n.Vector3.Distance(r.add(a.scale(h*o)),t);l<e&&(e=l,s=(this._distances[i+0]+o*h)/this.length())}return s}slice(t=0,e=1){if(t<0&&(t=1- -1*t%1),e<0&&(e=1- -1*e%1),t>e){let s=t;t=e,e=s}let s=this.getCurve(),i=this.getPointAt(t),n=this.getPreviousPointIndexAt(t),r=this.getPointAt(e),a=this.getPreviousPointIndexAt(e)+1,o=[];return 0!==t&&(n++,o.push(i)),o.push(...s.slice(n,a)),(1!==e||1===t)&&o.push(r),new l(o,this.getNormalAt(t),this._raw,this._alignTangentsWithPath)}update(t,e=null,s=!1){for(let e=0;e<t.length;e++)this._curve[e].x=t[e].x,this._curve[e].y=t[e].y,this._curve[e].z=t[e].z;return this._compute(e,s),this}_compute(t,e=!1){let s,i,r,a,o,h=this._curve.length;if(h<2)return;this._tangents[0]=this._getFirstNonNullVector(0),this._raw||this._tangents[0].normalize(),this._tangents[h-1]=this._curve[h-1].subtract(this._curve[h-2]),this._raw||this._tangents[h-1].normalize();let l=this._tangents[0],c=this._normalVector(l,t);this._normals[0]=c,this._raw||this._normals[0].normalize(),this._binormals[0]=n.Vector3.Cross(l,this._normals[0]),this._raw||this._binormals[0].normalize(),this._distances[0]=0;for(let t=1;t<h;t++)s=this._getLastNonNullVector(t),t<h-1&&(i=this._getFirstNonNullVector(t),this._tangents[t]=e?i:s.add(i),this._tangents[t].normalize()),this._distances[t]=this._distances[t-1]+this._curve[t].subtract(this._curve[t-1]).length(),r=this._tangents[t],o=this._binormals[t-1],this._normals[t]=n.Vector3.Cross(o,r),this._raw||(0===this._normals[t].length()?(a=this._normals[t-1],this._normals[t]=a.clone()):this._normals[t].normalize()),this._binormals[t]=n.Vector3.Cross(r,this._normals[t]),this._raw||this._binormals[t].normalize();this._pointAtData.id=NaN}_getFirstNonNullVector(t){let e=1,s=this._curve[t+e].subtract(this._curve[t]);for(;0===s.length()&&t+e+1<this._curve.length;)e++,s=this._curve[t+e].subtract(this._curve[t]);return s}_getLastNonNullVector(t){let e=1,s=this._curve[t].subtract(this._curve[t-e]);for(;0===s.length()&&t>e+1;)e++,s=this._curve[t].subtract(this._curve[t-e]);return s}_normalVector(t,e){let s,a=t.length();if(0===a&&(a=1),null==e){let e;e=(0,i.WithinEpsilon)(Math.abs(t.y)/a,1,r.Epsilon)?(0,i.WithinEpsilon)(Math.abs(t.x)/a,1,r.Epsilon)?(0,i.WithinEpsilon)(Math.abs(t.z)/a,1,r.Epsilon)?n.Vector3.Zero():new n.Vector3(0,0,1):new n.Vector3(1,0,0):new n.Vector3(0,-1,0),s=n.Vector3.Cross(t,e)}else s=n.Vector3.Cross(t,e),n.Vector3.CrossToRef(s,t,s);return s.normalize(),s}_updatePointAtData(t,e=!1){let s;if(this._pointAtData.id===t)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=t;let i=this.getPoints();if(t<=0)return this._setPointAtData(0,0,i[0],0,e);if(t>=1)return this._setPointAtData(1,1,i[i.length-1],i.length-1,e);let r=i[0],a=0,o=t*this.length();for(let h=1;h<i.length;h++){s=i[h];let l=n.Vector3.Distance(r,s);if((a+=l)===o)return this._setPointAtData(t,1,s,h,e);if(a>o){let i=(a-o)/l,n=r.subtract(s),c=s.add(n.scaleInPlace(i));return this._setPointAtData(t,1-i,c,h-1,e)}r=s}return this._pointAtData}_setPointAtData(t,e,s,i,n){return this._pointAtData.point=s,this._pointAtData.position=t,this._pointAtData.subPosition=e,this._pointAtData.previousPointArrayIndex=i,this._pointAtData.interpolateReady=n,n&&this._updateInterpolationMatrix(),this._pointAtData}_updateInterpolationMatrix(){this._pointAtData.interpolationMatrix=n.Matrix.Identity();let t=this._pointAtData.previousPointArrayIndex;if(t!==this._tangents.length-1){let e=t+1,s=this._tangents[t].clone(),i=this._normals[t].clone(),r=this._binormals[t].clone(),a=this._tangents[e].clone(),o=this._normals[e].clone(),h=this._binormals[e].clone(),l=n.Quaternion.RotationQuaternionFromAxis(i,r,s),c=n.Quaternion.RotationQuaternionFromAxis(o,h,a);n.Quaternion.Slerp(l,c,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}}}class c{static CreateQuadraticBezier(t,e,s,i){i=i>2?i:3;let r=[],a=(t,e,s,i)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*i;for(let o=0;o<=i;o++)r.push(new n.Vector3(a(o/i,t.x,e.x,s.x),a(o/i,t.y,e.y,s.y),a(o/i,t.z,e.z,s.z)));return new c(r)}static CreateCubicBezier(t,e,s,i,r){r=r>3?r:4;let a=[],o=(t,e,s,i,n)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*i+t*t*t*n;for(let h=0;h<=r;h++)a.push(new n.Vector3(o(h/r,t.x,e.x,s.x,i.x),o(h/r,t.y,e.y,s.y,i.y),o(h/r,t.z,e.z,s.z,i.z)));return new c(a)}static CreateHermiteSpline(t,e,s,i,r){let a=[],o=1/r;for(let h=0;h<=r;h++)a.push(n.Vector3.Hermite(t,e,s,i,h*o));return new c(a)}static CreateCatmullRomSpline(t,e,s){let i=[],r=1/e,a=0;if(s){let s=t.length;for(let o=0;o<s;o++){a=0;for(let h=0;h<e;h++)i.push(n.Vector3.CatmullRom(t[o%s],t[(o+1)%s],t[(o+2)%s],t[(o+3)%s],a)),a+=r}i.push(i[0])}else{let s=[];s.push(t[0].clone()),s.push(...t),s.push(t[t.length-1].clone());let o=0;for(;o<s.length-3;o++){a=0;for(let t=0;t<e;t++)i.push(n.Vector3.CatmullRom(s[o],s[o+1],s[o+2],s[o+3],a)),a+=r}o--,i.push(n.Vector3.CatmullRom(s[o],s[o+1],s[o+2],s[o+3],a))}return new c(i)}static ArcThru3Points(t,e,s,i=32,r=!1,a=!1){let o=[],h=e.subtract(t),l=s.subtract(e),u=t.subtract(s),_=n.Vector3.Cross(h,l),d=_.length();if(d<1e-8)return new c(o);let p=h.lengthSquared(),g=l.lengthSquared(),f=u.lengthSquared(),m=_.lengthSquared(),P=.5*h.length()*l.length()*u.length()/d,x=n.Vector3.Dot(h,u),b=n.Vector3.Dot(h,l),v=n.Vector3.Dot(l,u),M=t.scale(-.5*g*x/m).add(e.scale(-.5*f*b/m)).add(s.scale(-.5*p*v/m)),y=t.subtract(M).normalize(),A=n.Vector3.Cross(_,y).normalize();if(a){let e=2*Math.PI/i;for(let t=0;t<=2*Math.PI;t+=e)o.push(M.add(y.scale(P*Math.cos(t)).add(A.scale(P*Math.sin(t)))));o.push(t)}else{let e,n=1/i,a=0;do e=M.add(y.scale(P*Math.cos(a)).add(A.scale(P*Math.sin(a)))),o.push(e),a+=n;while(!e.equalsWithEpsilon(s,P*n*1.1))o.push(s),r&&o.push(t)}return new c(o)}constructor(t){this._length=0,this._points=t,this._length=this._computeLength(t)}getPoints(){return this._points}length(){return this._length}continue(t){let e=this._points[this._points.length-1],s=this._points.slice(),i=t.getPoints();for(let t=1;t<i.length;t++)s.push(i[t].subtract(i[0]).add(e));return new c(s)}_computeLength(t){let e=0;for(let s=1;s<t.length;s++)e+=t[s].subtract(t[s-1]).length();return e}}t.s(["Angle",0,a,"Arc2",0,o,"BezierCurve",0,class{static Interpolate(t,e,s,i,n){if(0===t)return 0;let r=1-3*i+3*e,a=3*i-6*e,o=3*e,h=t;for(let e=0;e<5;e++){let e=h*h,s=e*h*r+a*e+o*h,i=1/(3*r*e+2*a*h+o);h-=(s-t)*i,h=Math.min(1,Math.max(0,h))}return 3*Math.pow(1-h,2)*h*s+3*(1-h)*Math.pow(h,2)*n+Math.pow(h,3)}},"Curve3",0,c,"Orientation",0,s,"Path2",0,h,"Path3D",0,l])},31278,t=>{"use strict";t.s(["EffectFallbacks",0,class{constructor(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}unBindMesh(){this._mesh=null}addFallback(t,e){this._defines[t]||(t<this._currentRank&&(this._currentRank=t),t>this._maxRank&&(this._maxRank=t),this._defines[t]=[]),this._defines[t].push(e)}addCPUSkinningFallback(t,e){this._mesh=e,t<this._currentRank&&(this._currentRank=t),t>this._maxRank&&(this._maxRank=t)}get hasMoreFallbacks(){return this._currentRank<=this._maxRank}reduce(t,e){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,t=t.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),e._bonesComputationForcedToCPU=!0;let s=this._mesh.getScene();for(let t=0;t<s.meshes.length;t++){let i=s.meshes[t];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()===e)i.computeBonesUsingShaders=!1;else if(i.subMeshes){for(let t of i.subMeshes)if(t.effect===e){i.computeBonesUsingShaders=!1;break}}}}}else{let e=this._defines[this._currentRank];if(e)for(let s=0;s<e.length;s++)t=t.replace("#define "+e[s],"");this._currentRank++}return t}}])},22369,t=>{"use strict";var e=t.i(96265),s=t.i(23507);class i extends s.Material{constructor(t,s,i=!0,n=!1){super(t,s,void 0,n),this._normalMatrix=new e.Matrix,this._storeEffectOnSubMeshes=i}getEffect(){return this._storeEffectOnSubMeshes?this._activeEffect:super.getEffect()}isReady(t,e){return!!t&&(!this._storeEffectOnSubMeshes||!t.subMeshes||0===t.subMeshes.length||this.isReadyForSubMesh(t,t.subMeshes[0],e))}_isReadyForSubMesh(t){let e=t.materialDefines;return!this.checkReadyOnEveryCall&&!!t.effect&&!!e&&e._renderId===this.getScene().getRenderId()}bindOnlyWorldMatrix(t){this._activeEffect.setMatrix("world",t)}bindOnlyNormalMatrix(t){this._activeEffect.setMatrix("normalMatrix",t)}bind(t,e){e&&this.bindForSubMesh(t,e,e.subMeshes[0])}_afterBind(t,e=null,s){super._afterBind(t,e,s),this.getScene()._cachedEffect=e,s?s._drawWrapper._forceRebindOnNextCall=!1:this._drawWrapper._forceRebindOnNextCall=!1}_mustRebind(t,e,s,i=1){return s._drawWrapper._forceRebindOnNextCall||t.isCachedMaterialInvalid(this,e,i)}dispose(t,e,s){this._activeEffect=void 0,super.dispose(t,e,s)}}t.s(["PushMaterial",0,i])},12033,t=>{"use strict";let e=new WeakMap;t.s(["BindVertexPullingUniforms",0,function(t,e){e.forEach((e,s)=>{let i=`vp_${s}_info`;t.setFloat4(i,e.offset,e.stride,e.type,+!!e.normalized)})},"PrepareVertexPullingUniforms",0,function(t){let s=t.getVertexBuffers();if(!s)return null;let i=e.get(t);if(i){let t=!1;for(let e in s)if(!i.has(e)){t=!0;break}if(!t)return i}else i=new Map,e.set(t,i);for(let t in s){let e=s[t];if(e){let s=e.byteOffset,n=e.byteStride,r=e.type,a=e.normalized;i.set(t,{offset:s,stride:n,type:r,normalized:a})}}return i}])},42829,t=>{t.v(e=>Promise.all(["static/chunks/3l1dr_qm_x5kp.js"].map(e=>t.l(e))).then(()=>e(47786)))},76121,t=>{t.v(e=>Promise.all(["static/chunks/00k_j_r7bv_eb.js"].map(e=>t.l(e))).then(()=>e(24572)))},83228,t=>{t.v(e=>Promise.all(["static/chunks/0gv7mblzv3dl3.js"].map(e=>t.l(e))).then(()=>e(24445)))},20169,t=>{t.v(e=>Promise.all(["static/chunks/2p2vv6cc9i-3q.js"].map(e=>t.l(e))).then(()=>e(65644)))},57284,t=>{t.v(e=>Promise.all(["static/chunks/0-2y-_oomza2l.js"].map(e=>t.l(e))).then(()=>e(51075)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66749,46862,63132,72161,5785,e=>{"use strict";var t,i,s,r,n,a,o,h,l,d,c,u,p,_,g,v,f,m,b,y,P,C,M,S,O,T,R,E,I,D,k,A,w,x,B,N,F,L,G,U,W,X,q,z,V,j,Y,H,K,Z,$,Q,J,ee,et,ei,es,er,en,ea,eo,eh,el,ed,ec,eu,ep,e_,eg,ev=e.i(65740),ef=e.i(23240),em=e.i(36395),eb=e.i(99267),ey=e.i(45707);class eP{constructor(){this._count=0,this._data={}}copyFrom(e){this.clear(),e.forEach((e,t)=>this.add(e,t))}get(e){let t=this._data[e];if(void 0!==t)return t}getOrAddWithFactory(e,t){let i=this.get(e);return void 0!==i||(i=t(e))&&this.add(e,i),i}getOrAdd(e,t){let i=this.get(e);return void 0!==i?i:(this.add(e,t),t)}contains(e){return void 0!==this._data[e]}add(e,t){return void 0===this._data[e]&&(this._data[e]=t,++this._count,!0)}set(e,t){return void 0!==this._data[e]&&(this._data[e]=t,!0)}getAndRemove(e){let t=this.get(e);return void 0!==t?(delete this._data[e],--this._count,t):null}remove(e){return!!this.contains(e)&&(delete this._data[e],--this._count,!0)}clear(){this._data={},this._count=0}get count(){return this._count}forEach(e){for(let t in this._data){let i=this._data[t];e(t,i)}}first(e){for(let t in this._data){let i=this._data[t],s=e(t,i);if(s)return s}return null}}var eC=e.i(76312),eM=e.i(96265),eS=e.i(10272),eO=e.i(37143),eT=e.i(70653),eR=e.i(80871);function eE(e){e.push("vCameraColorCurveNeutral","vCameraColorCurvePositive","vCameraColorCurveNegative")}class eI{constructor(){this._dirty=!0,this._tempColor=new eT.Color4(0,0,0,0),this._globalCurve=new eT.Color4(0,0,0,0),this._highlightsCurve=new eT.Color4(0,0,0,0),this._midtonesCurve=new eT.Color4(0,0,0,0),this._shadowsCurve=new eT.Color4(0,0,0,0),this._positiveCurve=new eT.Color4(0,0,0,0),this._negativeCurve=new eT.Color4(0,0,0,0),this._globalHue=30,this._globalDensity=0,this._globalSaturation=0,this._globalExposure=0,this._highlightsHue=30,this._highlightsDensity=0,this._highlightsSaturation=0,this._highlightsExposure=0,this._midtonesHue=30,this._midtonesDensity=0,this._midtonesSaturation=0,this._midtonesExposure=0,this._shadowsHue=30,this._shadowsDensity=0,this._shadowsSaturation=0,this._shadowsExposure=0}get globalHue(){return this._globalHue}set globalHue(e){this._globalHue=e,this._dirty=!0}get globalDensity(){return this._globalDensity}set globalDensity(e){this._globalDensity=e,this._dirty=!0}get globalSaturation(){return this._globalSaturation}set globalSaturation(e){this._globalSaturation=e,this._dirty=!0}get globalExposure(){return this._globalExposure}set globalExposure(e){this._globalExposure=e,this._dirty=!0}get highlightsHue(){return this._highlightsHue}set highlightsHue(e){this._highlightsHue=e,this._dirty=!0}get highlightsDensity(){return this._highlightsDensity}set highlightsDensity(e){this._highlightsDensity=e,this._dirty=!0}get highlightsSaturation(){return this._highlightsSaturation}set highlightsSaturation(e){this._highlightsSaturation=e,this._dirty=!0}get highlightsExposure(){return this._highlightsExposure}set highlightsExposure(e){this._highlightsExposure=e,this._dirty=!0}get midtonesHue(){return this._midtonesHue}set midtonesHue(e){this._midtonesHue=e,this._dirty=!0}get midtonesDensity(){return this._midtonesDensity}set midtonesDensity(e){this._midtonesDensity=e,this._dirty=!0}get midtonesSaturation(){return this._midtonesSaturation}set midtonesSaturation(e){this._midtonesSaturation=e,this._dirty=!0}get midtonesExposure(){return this._midtonesExposure}set midtonesExposure(e){this._midtonesExposure=e,this._dirty=!0}get shadowsHue(){return this._shadowsHue}set shadowsHue(e){this._shadowsHue=e,this._dirty=!0}get shadowsDensity(){return this._shadowsDensity}set shadowsDensity(e){this._shadowsDensity=e,this._dirty=!0}get shadowsSaturation(){return this._shadowsSaturation}set shadowsSaturation(e){this._shadowsSaturation=e,this._dirty=!0}get shadowsExposure(){return this._shadowsExposure}set shadowsExposure(e){this._shadowsExposure=e,this._dirty=!0}getClassName(){return"ColorCurves"}_getColorGradingDataToRef(e,t,i,s,r){null!=e&&(e=eI._Clamp(e,0,360),t=eI._Clamp(t,-100,100),i=eI._Clamp(i,-100,100),s=eI._Clamp(s,-100,100),t=.5*eI._ApplyColorGradingSliderNonlinear(t),s=eI._ApplyColorGradingSliderNonlinear(s),t<0&&(t*=-1,e=(e+180)%360),eI._FromHSBToRef(e,t,50+.25*s,r),r.scaleToRef(2,r),r.a=1+.01*i)}static _ApplyColorGradingSliderNonlinear(e){let t=Math.abs(e/=100);return t=Math.pow(t,2),e<0&&(t*=-1),t*=100}static _FromHSBToRef(e,t,i,s){let r=eI._Clamp(e,0,360),n=eI._Clamp(t/100,0,1),a=eI._Clamp(i/100,0,1);if(0===n)s.r=a,s.g=a,s.b=a;else{let e=Math.floor(r/=60),t=r-e,i=a*(1-n),o=a*(1-n*t),h=a*(1-n*(1-t));switch(e){case 0:s.r=a,s.g=h,s.b=i;break;case 1:s.r=o,s.g=a,s.b=i;break;case 2:s.r=i,s.g=a,s.b=h;break;case 3:s.r=i,s.g=o,s.b=a;break;case 4:s.r=h,s.g=i,s.b=a;break;default:s.r=a,s.g=i,s.b=o}}s.a=1}static _Clamp(e,t,i){return Math.min(Math.max(e,t),i)}clone(){return eR.SerializationHelper.Clone(()=>new eI,this)}serialize(){return eR.SerializationHelper.Serialize(this)}_bind(e,t="vCameraColorCurvePositive",i="vCameraColorCurveNeutral",s="vCameraColorCurveNegative"){this._dirty&&(this._dirty=!1,this._getColorGradingDataToRef(this._globalHue,this._globalDensity,this._globalSaturation,this._globalExposure,this._globalCurve),this._getColorGradingDataToRef(this._highlightsHue,this._highlightsDensity,this._highlightsSaturation,this._highlightsExposure,this._tempColor),this._tempColor.multiplyToRef(this._globalCurve,this._highlightsCurve),this._getColorGradingDataToRef(this._midtonesHue,this._midtonesDensity,this._midtonesSaturation,this._midtonesExposure,this._tempColor),this._tempColor.multiplyToRef(this._globalCurve,this._midtonesCurve),this._getColorGradingDataToRef(this._shadowsHue,this._shadowsDensity,this._shadowsSaturation,this._shadowsExposure,this._tempColor),this._tempColor.multiplyToRef(this._globalCurve,this._shadowsCurve),this._highlightsCurve.subtractToRef(this._midtonesCurve,this._positiveCurve),this._midtonesCurve.subtractToRef(this._shadowsCurve,this._negativeCurve)),e&&(e.setFloat4(t,this._positiveCurve.r,this._positiveCurve.g,this._positiveCurve.b,this._positiveCurve.a),e.setFloat4(i,this._midtonesCurve.r,this._midtonesCurve.g,this._midtonesCurve.b,this._midtonesCurve.a),e.setFloat4(s,this._negativeCurve.r,this._negativeCurve.g,this._negativeCurve.b,this._negativeCurve.a))}}eI.PrepareUniforms=eE,(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_globalHue",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_globalDensity",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_globalSaturation",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_globalExposure",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_highlightsHue",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_highlightsDensity",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_highlightsSaturation",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_highlightsExposure",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_midtonesHue",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_midtonesDensity",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_midtonesSaturation",void 0),(0,eS.__decorate)([(0,eO.serialize)()],eI.prototype,"_midtonesExposure",void 0);var eD=e.i(68179);class ek{constructor(){this.colorCurves=new eI,this._colorCurvesEnabled=!1,this._colorGradingEnabled=!1,this._colorGradingWithGreenDepth=!0,this._colorGradingBGR=!0,this._exposure=1,this._toneMappingEnabled=!1,this._toneMappingType=ek.TONEMAPPING_STANDARD,this._contrast=1,this.vignetteStretch=0,this.vignetteCenterX=0,this.vignetteCenterY=0,this.vignetteWeight=1.5,this.vignetteColor=new eT.Color4(0,0,0,0),this.vignetteCameraFov=.5,this._vignetteBlendMode=ek.VIGNETTEMODE_MULTIPLY,this._vignetteEnabled=!1,this._ditheringEnabled=!1,this._ditheringIntensity=1/255,this._skipFinalColorClamp=!1,this._applyByPostProcess=!1,this._isEnabled=!0,this.outputTextureWidth=0,this.outputTextureHeight=0,this.onUpdateParameters=new eb.Observable}get colorCurvesEnabled(){return this._colorCurvesEnabled}set colorCurvesEnabled(e){this._colorCurvesEnabled!==e&&(this._colorCurvesEnabled=e,this._updateParameters())}get colorGradingTexture(){return this._colorGradingTexture}set colorGradingTexture(e){this._colorGradingTexture!==e&&(this._colorGradingTexture=e,this._updateParameters())}get colorGradingEnabled(){return this._colorGradingEnabled}set colorGradingEnabled(e){this._colorGradingEnabled!==e&&(this._colorGradingEnabled=e,this._updateParameters())}get colorGradingWithGreenDepth(){return this._colorGradingWithGreenDepth}set colorGradingWithGreenDepth(e){this._colorGradingWithGreenDepth!==e&&(this._colorGradingWithGreenDepth=e,this._updateParameters())}get colorGradingBGR(){return this._colorGradingBGR}set colorGradingBGR(e){this._colorGradingBGR!==e&&(this._colorGradingBGR=e,this._updateParameters())}get exposure(){return this._exposure}set exposure(e){this._exposure!==e&&(this._exposure=e,this._updateParameters())}get toneMappingEnabled(){return this._toneMappingEnabled}set toneMappingEnabled(e){this._toneMappingEnabled!==e&&(this._toneMappingEnabled=e,this._updateParameters())}get toneMappingType(){return this._toneMappingType}set toneMappingType(e){this._toneMappingType!==e&&(this._toneMappingType=e,this._updateParameters())}get contrast(){return this._contrast}set contrast(e){this._contrast!==e&&(this._contrast=e,this._updateParameters())}get vignetteCentreY(){return this.vignetteCenterY}set vignetteCentreY(e){this.vignetteCenterY=e}get vignetteCentreX(){return this.vignetteCenterX}set vignetteCentreX(e){this.vignetteCenterX=e}get vignetteBlendMode(){return this._vignetteBlendMode}set vignetteBlendMode(e){this._vignetteBlendMode!==e&&(this._vignetteBlendMode=e,this._updateParameters())}get vignetteEnabled(){return this._vignetteEnabled}set vignetteEnabled(e){this._vignetteEnabled!==e&&(this._vignetteEnabled=e,this._updateParameters())}get ditheringEnabled(){return this._ditheringEnabled}set ditheringEnabled(e){this._ditheringEnabled!==e&&(this._ditheringEnabled=e,this._updateParameters())}get ditheringIntensity(){return this._ditheringIntensity}set ditheringIntensity(e){this._ditheringIntensity!==e&&(this._ditheringIntensity=e,this._updateParameters())}get skipFinalColorClamp(){return this._skipFinalColorClamp}set skipFinalColorClamp(e){this._skipFinalColorClamp!==e&&(this._skipFinalColorClamp=e,this._updateParameters())}get applyByPostProcess(){return this._applyByPostProcess}set applyByPostProcess(e){this._applyByPostProcess!==e&&(this._applyByPostProcess=e,this._updateParameters())}get isEnabled(){return this._isEnabled}set isEnabled(e){this._isEnabled!==e&&(this._isEnabled=e,this._updateParameters())}_updateParameters(){this.onUpdateParameters.notifyObservers(this)}getClassName(){return"ImageProcessingConfiguration"}prepareDefines(e,t=!1){if(t!==this.applyByPostProcess||!this._isEnabled){e.VIGNETTE=!1,e.TONEMAPPING=0,e.CONTRAST=!1,e.EXPOSURE=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.DITHER=!1,e.IMAGEPROCESSING=!1,e.SKIPFINALCOLORCLAMP=this.skipFinalColorClamp,e.IMAGEPROCESSINGPOSTPROCESS=this.applyByPostProcess&&this._isEnabled;return}if(e.VIGNETTE=this.vignetteEnabled,e.VIGNETTEBLENDMODEMULTIPLY=this.vignetteBlendMode===ek._VIGNETTEMODE_MULTIPLY,e.VIGNETTEBLENDMODEOPAQUE=!e.VIGNETTEBLENDMODEMULTIPLY,this._toneMappingEnabled)switch(this._toneMappingType){case ek.TONEMAPPING_KHR_PBR_NEUTRAL:e.TONEMAPPING=3;break;case ek.TONEMAPPING_ACES:e.TONEMAPPING=2;break;default:e.TONEMAPPING=1}else e.TONEMAPPING=0;e.CONTRAST=1!==this.contrast,e.EXPOSURE=1!==this.exposure,e.COLORCURVES=this.colorCurvesEnabled&&!!this.colorCurves,e.COLORGRADING=this.colorGradingEnabled&&!!this.colorGradingTexture,e.COLORGRADING?e.COLORGRADING3D=this.colorGradingTexture.is3D:e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=this.colorGradingWithGreenDepth,e.SAMPLER3DBGRMAP=this.colorGradingBGR,e.DITHER=this._ditheringEnabled,e.IMAGEPROCESSINGPOSTPROCESS=this.applyByPostProcess,e.SKIPFINALCOLORCLAMP=this.skipFinalColorClamp,e.IMAGEPROCESSING=e.VIGNETTE||!!e.TONEMAPPING||e.CONTRAST||e.EXPOSURE||e.COLORCURVES||e.COLORGRADING||e.DITHER}isReady(){return!this.colorGradingEnabled||!this.colorGradingTexture||this.colorGradingTexture.isReady()}bind(e,t){if(this._colorCurvesEnabled&&this.colorCurves&&function(e,t,i="vCameraColorCurvePositive",s="vCameraColorCurveNeutral",r="vCameraColorCurveNegative"){e._bind(t,i,s,r)}(this.colorCurves,e),this._vignetteEnabled||this._ditheringEnabled){let i=1/(this.outputTextureWidth||e.getEngine().getRenderWidth()),s=1/(this.outputTextureHeight||e.getEngine().getRenderHeight());if(e.setFloat2("vInverseScreenSize",i,s),this._ditheringEnabled&&e.setFloat("ditherIntensity",.5*this._ditheringIntensity),this._vignetteEnabled){let r=null!=t?t:s/i,n=Math.tan(.5*this.vignetteCameraFov),a=n*r,o=Math.sqrt(a*n);a=(0,eD.Mix)(a,o,this.vignetteStretch),n=(0,eD.Mix)(n,o,this.vignetteStretch),e.setFloat4("vignetteSettings1",a,n,-a*this.vignetteCenterX,-n*this.vignetteCenterY);let h=-2*this.vignetteWeight;e.setFloat4("vignetteSettings2",this.vignetteColor.r,this.vignetteColor.g,this.vignetteColor.b,h)}}if(e.setFloat("exposureLinear",this.exposure),e.setFloat("contrast",this.contrast),this.colorGradingTexture){e.setTexture("txColorTransform",this.colorGradingTexture);let t=this.colorGradingTexture.getSize().height;e.setFloat4("colorTransformSettings",(t-1)/t,.5/t,t,this.colorGradingTexture.level)}}clone(){return eR.SerializationHelper.Clone(()=>new ek,this)}serialize(){return eR.SerializationHelper.Serialize(this)}static get VIGNETTEMODE_MULTIPLY(){return this._VIGNETTEMODE_MULTIPLY}static get VIGNETTEMODE_OPAQUE(){return this._VIGNETTEMODE_OPAQUE}}ek.TONEMAPPING_STANDARD=0,ek.TONEMAPPING_ACES=1,ek.TONEMAPPING_KHR_PBR_NEUTRAL=2,ek.PrepareUniforms=function(e,t){t.EXPOSURE&&e.push("exposureLinear"),t.CONTRAST&&e.push("contrast"),t.COLORGRADING&&e.push("colorTransformSettings"),(t.VIGNETTE||t.DITHER)&&e.push("vInverseScreenSize"),t.VIGNETTE&&(e.push("vignetteSettings1"),e.push("vignetteSettings2")),t.COLORCURVES&&eE(e),t.DITHER&&e.push("ditherIntensity")},ek.PrepareSamplers=function(e,t){t.COLORGRADING&&e.push("txColorTransform")},ek._VIGNETTEMODE_MULTIPLY=0,ek._VIGNETTEMODE_OPAQUE=1,(0,eS.__decorate)([(0,eO.serializeAsColorCurves)()],ek.prototype,"colorCurves",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_colorCurvesEnabled",void 0),(0,eS.__decorate)([(0,eO.serializeAsTexture)("colorGradingTexture")],ek.prototype,"_colorGradingTexture",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_colorGradingEnabled",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_colorGradingWithGreenDepth",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_colorGradingBGR",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_exposure",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_toneMappingEnabled",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_toneMappingType",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_contrast",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"vignetteStretch",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"vignetteCenterX",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"vignetteCenterY",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"vignetteWeight",void 0),(0,eS.__decorate)([(0,eO.serializeAsColor4)()],ek.prototype,"vignetteColor",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"vignetteCameraFov",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_vignetteBlendMode",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_vignetteEnabled",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_ditheringEnabled",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_ditheringIntensity",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_skipFinalColorClamp",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_applyByPostProcess",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"_isEnabled",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"outputTextureWidth",void 0),(0,eS.__decorate)([(0,eO.serialize)()],ek.prototype,"outputTextureHeight",void 0),e.s(["ImageProcessingConfiguration",0,ek],46862);var eA=e.i(33855),ew=e.i(50107);class ex{constructor(e,t,i,s,r,n){this.source=e,this.pointerX=t,this.pointerY=i,this.meshUnderPointer=s,this.sourceEvent=r,this.additionalData=n}static CreateNew(e,t,i){let s=e.getScene();return new ex(e,s.pointerX,s.pointerY,s.meshUnderPointer||e,t,i)}static CreateNewFromSprite(e,t,i,s){return new ex(e,t.pointerX,t.pointerY,t.meshUnderPointer,i,s)}static CreateNewFromScene(e,t){return new ex(null,e.pointerX,e.pointerY,e.meshUnderPointer,t)}static CreateNewFromPrimitive(e,t,i,s){return new ex(e,t.x,t.y,null,i,s)}}var eB=e.i(35407);class eN{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new eb.Observable,this._scene=e}_prepareBuffers(){if(this._vertexBuffers[eB.VertexBuffer.PositionKind])return;let e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[eB.VertexBuffer.PositionKind]=new eB.VertexBuffer(this._scene.getEngine(),e,eB.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}_buildIndexBuffer(){let e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(e){let t=this._activePostProcesses;t.length=0;for(let i=0;i<e.length;i++){let s=e[i];s&&t.push(s)}return t}_rebuild(){let e=this._vertexBuffers[eB.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let i=this._scene.activeCamera;return!!i&&!!(t=t||this._getActivePostProcesses(i._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(i,e,null!=t),!0)}directRender(e,t=null,i=!1,s=0,r=0,n=!1,a=e.length){let o=this._scene.getEngine();for(let h=0;h<a;h++){h<e.length-1?e[h+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?o.bindFramebuffer(t,s,void 0,void 0,i,r):n||o.restoreDefaultFramebuffer(),o._debugInsertMarker?.(`post process ${e[h].name} output`));let a=e[h],l=a.apply();l&&(a.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),o.bindBuffers(this._vertexBuffers,this._indexBuffer,l),o.drawElementsType(0,0,6),a.onAfterRenderObservable.notifyObservers(l))}o.setDepthBuffer(!0),o.setDepthWrite(!0)}_finalizeFrame(e,t,i,s,r=!1){let n=this._scene.activeCamera;if(!n||(this.onBeforeRenderObservable.notifyObservers(this),0===(s=s||this._getActivePostProcesses(n._postProcesses)).length||!this._scene.postProcessesEnabled))return;let a=this._scene.getEngine();for(let o=0,h=s.length;o<h;o++){let l=s[o];if(o<h-1?l._outputTexture=s[o+1].activate(n,t?.texture):(t?(a.bindFramebuffer(t,i,void 0,void 0,r),l._outputTexture=t):(a.restoreDefaultFramebuffer(),l._outputTexture=null),a._debugInsertMarker?.(`post process ${s[o].name} output`)),e)break;let d=l.apply();d&&(l.onBeforeRenderObservable.notifyObservers(d),this._prepareBuffers(),a.bindBuffers(this._vertexBuffers,this._indexBuffer,d),a.drawElementsType(0,0,6),l.onAfterRenderObservable.notifyObservers(d))}a.setDepthBuffer(!0),a.setDepthWrite(!0),a.setAlphaMode(0)}dispose(){let e=this._vertexBuffers[eB.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[eB.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}e.s(["PostProcessManager",0,eN],63132);var eF=e.i(94160);class eL{set opaqueSortCompareFn(e){e?this._opaqueSortCompareFn=e:this._opaqueSortCompareFn=eL.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){e?this._alphaTestSortCompareFn=e:this._alphaTestSortCompareFn=eL.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){e?this._transparentSortCompareFn=e:this._transparentSortCompareFn=eL.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t,i=null,s=null,r=null){this.index=e,this._opaqueSubMeshes=new ey.SmartArray(256),this._transparentSubMeshes=new ey.SmartArray(256),this._alphaTestSubMeshes=new ey.SmartArray(256),this._depthOnlySubMeshes=new ey.SmartArray(256),this._particleSystems=new ey.SmartArray(256),this._spriteManagers=new ey.SmartArray(256),this._empty=!0,this._edgesRenderers=new ey.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=i,this.alphaTestSortCompareFn=s,this.transparentSortCompareFn=r}render(e,t,i,s,r=!0,n=!0,a=!0,o=!0,h){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let l=this._scene.getEngine();r&&0!==this._depthOnlySubMeshes.length&&(l.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),l.setColorWrite(!0)),n&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),a&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let d=l.getStencilBuffer();if(l.setStencilBuffer(!1),t&&this._renderSprites(),i&&this._renderParticles(s),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),o&&(h||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(l.setStencilBuffer(d),h)h(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){let e=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);e.length&&this._renderTransparent(e)}else this._renderTransparent(this._transparentSubMeshes);l.setAlphaMode(0)}if(l.setStencilBuffer(!1),n&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();l.setAlphaMode(0)}l.setStencilBuffer(d)}_renderOpaqueSorted(e){eL._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){eL._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){eL._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,i,s,r){let n,a=0,o=i?i.globalPosition:eL._ZeroVector;if(s)for(;a<e.length;a++)(n=e.data[a])._alphaIndex=n.getMesh().alphaIndex,n._distanceToCamera=eM.Vector3.Distance(n.getBoundingInfo().boundingSphere.centerWorld,o);let h=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&h.sort(t);let l=h[0].getMesh().getScene();for(a=0;a<h.length;a++)if(n=h[a],!l._activeMeshesFrozenButKeepClipping||n.isInFrustum(l._frustumPlanes)){if(s){let e=n.getMaterial();if(e&&e.needDepthPrePass&&!r){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),n.render(!1),t.setColorWrite(!0)}}n.render(s)}}static defaultTransparentSortCompare(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:eL.backToFrontSortCompare(e,t)}static backToFrontSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}static frontToBackSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?-1:+(e._distanceToCamera>t._distanceToCamera)}static PainterSortCompare(e,t){let i=e.getMesh(),s=t.getMesh();return i.material&&s.material?i.material.uniqueId-s.material.uniqueId:i.uniqueId-s.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,i){void 0===t&&(t=e.getMesh()),void 0===i&&(i=e.getMaterial()),null!=i&&(i.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):i.needAlphaTestingForMesh(t)?(i.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(i.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0===this._particleSystems.length)return;let t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(let i=0;i<this._particleSystems.length;i++){let s=this._particleSystems.data[i];if(0===(t&&t.layerMask&s.layerMask))continue;let r=s.emitter;r.position&&e&&-1===e.indexOf(r)||this._scene._activeParticles.addCount(s.render(),!1)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}_renderSprites(){if(!this._scene.spritesEnabled||0===this._spriteManagers.length)return;let e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(let t=0;t<this._spriteManagers.length;t++){let i=this._spriteManagers.data[t];0!==(e&&e.layerMask&i.layerMask)&&i.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}eL._ZeroVector=eM.Vector3.Zero();class eG{}class eU{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(let t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(let e of this._scene.meshes)if(e.subMeshes)for(let t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(let e of this._scene.spriteManagers)e._wasDispatched=!1;for(let e of this._scene.particleSystems)e._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=[],this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new eG,this._maintainStateBetweenFrames=!1,this._scene=e;for(let e=eU.MIN_RENDERINGGROUPS;e<eU.MAX_RENDERINGGROUPS;e++)this._autoClearDepthStencil[e]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){let t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(e=!0,t=!0){this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,i,s,r=!0,n=!0,a=!0,o=!0,h){let l=this._renderingGroupInfo;if(l.scene=this._scene,l.camera=this._scene.activeCamera,l.renderingManager=this,this._scene.spriteManagers&&s)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let d=eU.MIN_RENDERINGGROUPS;d<eU.MAX_RENDERINGGROUPS;d++){this._depthStencilBufferAlreadyCleaned=d===eU.MIN_RENDERINGGROUPS;let c=this._renderingGroups[d];if(!c||c._empty)continue;let u=1<<d;if(l.renderingGroupId=d,this._scene.onBeforeRenderingGroupObservable.notifyObservers(l,u),eU.AUTOCLEAR){let e=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(d):this._autoClearDepthStencil[d];e&&e.autoClear&&this._clearDepthStencilBuffer(e.depth,e.stencil)}for(let e of this._scene._beforeRenderingGroupDrawStage)e.action(d);for(let l of(c.render(e,s,i,t,r,n,a,o,h),this._scene._afterRenderingGroupDrawStage))l.action(d);this._scene.onAfterRenderingGroupObservable.notifyObservers(l,u)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=eU.MIN_RENDERINGGROUPS;e<eU.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=eU.MIN_RENDERINGGROUPS;e<eU.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(let e=eU.MIN_RENDERINGGROUPS;e<eU.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new eL(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,i){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,i))}setRenderingOrder(e,t=null,i=null,s=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=i,this._customTransparentSortCompareFn[e]=s,this._renderingGroups[e]){let t=this._renderingGroups[e];t.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],t.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],t.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t,i=!0,s=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:i,stencil:s}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}eU.MAX_RENDERINGGROUPS=4,eU.MIN_RENDERINGGROUPS=0,eU.AUTOCLEAR=!0,e.s(["RenderingManager",0,eU],72161);var eW=e.i(19905),eX=e.i(64545),eq=e.i(81623),ez=e.i(75405),eV=e.i(21222);class ej{constructor(){this.hoverCursor="",this.actions=[],this.isRecursive=!1,this.disposeWhenUnowned=!0}static get HasTriggers(){for(let e in ej.Triggers)if(Object.prototype.hasOwnProperty.call(ej.Triggers,e))return!0;return!1}static get HasPickTriggers(){for(let e in ej.Triggers)if(Object.prototype.hasOwnProperty.call(ej.Triggers,e)){let t=parseInt(e);if(t>=1&&t<=7)return!0}return!1}static HasSpecificTrigger(e){for(let t in ej.Triggers)if(Object.prototype.hasOwnProperty.call(ej.Triggers,t)&&parseInt(t)===e)return!0;return!1}}ej.Triggers={};var eY=e.i(36365);(t=l||(l={}))[t.Generic=0]="Generic",t[t.Keyboard=1]="Keyboard",t[t.Mouse=2]="Mouse",t[t.Touch=3]="Touch",t[t.DualShock=4]="DualShock",t[t.Xbox=5]="Xbox",t[t.Switch=6]="Switch",t[t.DualSense=7]="DualSense",(i=d||(d={}))[i.Horizontal=0]="Horizontal",i[i.Vertical=1]="Vertical",i[i.LeftClick=2]="LeftClick",i[i.MiddleClick=3]="MiddleClick",i[i.RightClick=4]="RightClick",i[i.BrowserBack=5]="BrowserBack",i[i.BrowserForward=6]="BrowserForward",i[i.MouseWheelX=7]="MouseWheelX",i[i.MouseWheelY=8]="MouseWheelY",i[i.MouseWheelZ=9]="MouseWheelZ",i[i.Move=12]="Move",(s=c||(c={}))[s.Horizontal=0]="Horizontal",s[s.Vertical=1]="Vertical",s[s.LeftClick=2]="LeftClick",s[s.MiddleClick=3]="MiddleClick",s[s.RightClick=4]="RightClick",s[s.BrowserBack=5]="BrowserBack",s[s.BrowserForward=6]="BrowserForward",s[s.MouseWheelX=7]="MouseWheelX",s[s.MouseWheelY=8]="MouseWheelY",s[s.MouseWheelZ=9]="MouseWheelZ",s[s.DeltaHorizontal=10]="DeltaHorizontal",s[s.DeltaVertical=11]="DeltaVertical",(r=u||(u={}))[r.Cross=0]="Cross",r[r.Circle=1]="Circle",r[r.Square=2]="Square",r[r.Triangle=3]="Triangle",r[r.L1=4]="L1",r[r.R1=5]="R1",r[r.L2=6]="L2",r[r.R2=7]="R2",r[r.Share=8]="Share",r[r.Options=9]="Options",r[r.L3=10]="L3",r[r.R3=11]="R3",r[r.DPadUp=12]="DPadUp",r[r.DPadDown=13]="DPadDown",r[r.DPadLeft=14]="DPadLeft",r[r.DPadRight=15]="DPadRight",r[r.Home=16]="Home",r[r.TouchPad=17]="TouchPad",r[r.LStickXAxis=18]="LStickXAxis",r[r.LStickYAxis=19]="LStickYAxis",r[r.RStickXAxis=20]="RStickXAxis",r[r.RStickYAxis=21]="RStickYAxis",(n=p||(p={}))[n.Cross=0]="Cross",n[n.Circle=1]="Circle",n[n.Square=2]="Square",n[n.Triangle=3]="Triangle",n[n.L1=4]="L1",n[n.R1=5]="R1",n[n.L2=6]="L2",n[n.R2=7]="R2",n[n.Create=8]="Create",n[n.Options=9]="Options",n[n.L3=10]="L3",n[n.R3=11]="R3",n[n.DPadUp=12]="DPadUp",n[n.DPadDown=13]="DPadDown",n[n.DPadLeft=14]="DPadLeft",n[n.DPadRight=15]="DPadRight",n[n.Home=16]="Home",n[n.TouchPad=17]="TouchPad",n[n.LStickXAxis=18]="LStickXAxis",n[n.LStickYAxis=19]="LStickYAxis",n[n.RStickXAxis=20]="RStickXAxis",n[n.RStickYAxis=21]="RStickYAxis",(a=_||(_={}))[a.A=0]="A",a[a.B=1]="B",a[a.X=2]="X",a[a.Y=3]="Y",a[a.LB=4]="LB",a[a.RB=5]="RB",a[a.LT=6]="LT",a[a.RT=7]="RT",a[a.Back=8]="Back",a[a.Start=9]="Start",a[a.LS=10]="LS",a[a.RS=11]="RS",a[a.DPadUp=12]="DPadUp",a[a.DPadDown=13]="DPadDown",a[a.DPadLeft=14]="DPadLeft",a[a.DPadRight=15]="DPadRight",a[a.Home=16]="Home",a[a.LStickXAxis=17]="LStickXAxis",a[a.LStickYAxis=18]="LStickYAxis",a[a.RStickXAxis=19]="RStickXAxis",a[a.RStickYAxis=20]="RStickYAxis",(o=g||(g={}))[o.B=0]="B",o[o.A=1]="A",o[o.Y=2]="Y",o[o.X=3]="X",o[o.L=4]="L",o[o.R=5]="R",o[o.ZL=6]="ZL",o[o.ZR=7]="ZR",o[o.Minus=8]="Minus",o[o.Plus=9]="Plus",o[o.LS=10]="LS",o[o.RS=11]="RS",o[o.DPadUp=12]="DPadUp",o[o.DPadDown=13]="DPadDown",o[o.DPadLeft=14]="DPadLeft",o[o.DPadRight=15]="DPadRight",o[o.Home=16]="Home",o[o.Capture=17]="Capture",o[o.LStickXAxis=18]="LStickXAxis",o[o.LStickYAxis=19]="LStickYAxis",o[o.RStickXAxis=20]="RStickXAxis",o[o.RStickYAxis=21]="RStickYAxis";var eH=e.i(76696);class eK{static CreateDeviceEvent(e,t,i,s,r,n,a){switch(e){case l.Keyboard:return this._CreateKeyboardEvent(i,s,r,n);case l.Mouse:if(i===d.MouseWheelX||i===d.MouseWheelY||i===d.MouseWheelZ)return this._CreateWheelEvent(e,t,i,s,r,n);case l.Touch:return this._CreatePointerEvent(e,t,i,s,r,n,a);default:throw`Unable to generate event for device ${l[e]}`}}static _CreatePointerEvent(e,t,i,s,r,n,a){let o=this._CreateMouseEvent(e,t,i,s,r,n);return e===l.Mouse?(o.deviceType=l.Mouse,o.pointerId=1,o.pointerType="mouse"):(o.deviceType=l.Touch,o.pointerId=a??t,o.pointerType="touch"),o.buttons=0+r.pollInput(e,t,d.LeftClick)+2*r.pollInput(e,t,d.RightClick)+4*r.pollInput(e,t,d.MiddleClick),i===d.Move?o.type="pointermove":i>=d.LeftClick&&i<=d.RightClick&&(o.type=1===s?"pointerdown":"pointerup",o.button=i-2),o}static _CreateWheelEvent(e,t,i,s,r,n){let a=this._CreateMouseEvent(e,t,i,s,r,n);switch(a.pointerId=1,a.type="wheel",a.deltaMode=eH.EventConstants.DOM_DELTA_PIXEL,a.deltaX=0,a.deltaY=0,a.deltaZ=0,i){case d.MouseWheelX:a.deltaX=s;break;case d.MouseWheelY:a.deltaY=s;break;case d.MouseWheelZ:a.deltaZ=s}return a}static _CreateMouseEvent(e,t,i,s,r,n){let a=this._CreateEvent(n),o=r.pollInput(e,t,d.Horizontal),h=r.pollInput(e,t,d.Vertical);return n?(a.movementX=0,a.movementY=0,a.offsetX=a.movementX-n.getBoundingClientRect().x,a.offsetY=a.movementY-n.getBoundingClientRect().y):(a.movementX=r.pollInput(e,t,10),a.movementY=r.pollInput(e,t,11),a.offsetX=0,a.offsetY=0),this._CheckNonCharacterKeys(a,r),a.clientX=o,a.clientY=h,a.x=o,a.y=h,a.deviceType=e,a.deviceSlot=t,a.inputIndex=i,a}static _CreateKeyboardEvent(e,t,i,s){let r=this._CreateEvent(s);return this._CheckNonCharacterKeys(r,i),r.deviceType=l.Keyboard,r.deviceSlot=0,r.inputIndex=e,r.type=1===t?"keydown":"keyup",r.key=String.fromCharCode(e),r.keyCode=e,r}static _CheckNonCharacterKeys(e,t){let i=t.isDeviceAvailable(l.Keyboard),s=i&&1===t.pollInput(l.Keyboard,0,18),r=i&&1===t.pollInput(l.Keyboard,0,17),n=i&&(1===t.pollInput(l.Keyboard,0,91)||1===t.pollInput(l.Keyboard,0,92)||1===t.pollInput(l.Keyboard,0,93)),a=i&&1===t.pollInput(l.Keyboard,0,16);e.altKey=s,e.ctrlKey=r,e.metaKey=n,e.shiftKey=a}static _CreateEvent(e){let t={};return t.preventDefault=()=>{},t.target=e,t}}class eZ{constructor(e,t,i){this._nativeInput=_native.DeviceInputSystem?new _native.DeviceInputSystem(e,t,(e,t,s,r)=>{let n=eK.CreateDeviceEvent(e,t,s,r,this);i(e,t,n)}):this._createDummyNativeInput()}pollInput(e,t,i){return this._nativeInput.pollInput(e,t,i)}isDeviceAvailable(e){return e===l.Mouse||e===l.Touch}dispose(){this._nativeInput.dispose()}_createDummyNativeInput(){return{pollInput:()=>0,isDeviceAvailable:()=>!1,dispose:()=>{}}}}let e$=Object.keys(d).length/2;class eQ{constructor(e,t,i,s){this._inputs=[],this._keyboardActive=!1,this._pointerActive=!1,this._usingSafari=ev.Tools.IsSafari(),this._usingMacOs=(0,eX.IsNavigatorAvailable)()&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),this._keyboardDownEvent=e=>{},this._keyboardUpEvent=e=>{},this._keyboardBlurEvent=e=>{},this._pointerMoveEvent=e=>{},this._pointerDownEvent=e=>{},this._pointerUpEvent=e=>{},this._pointerCancelEvent=e=>{},this._pointerCancelTouch=e=>{},this._pointerLeaveEvent=e=>{},this._pointerWheelEvent=e=>{},this._pointerBlurEvent=e=>{},this._pointerMacOsChromeOutEvent=e=>{},this._eventsAttached=!1,this._mouseId=-1,this._isUsingFirefox=(0,eX.IsNavigatorAvailable)()&&navigator.userAgent&&-1!==navigator.userAgent.indexOf("Firefox"),this._isUsingChromium=(0,eX.IsNavigatorAvailable)()&&navigator.userAgent&&-1!==navigator.userAgent.indexOf("Chrome"),this._maxTouchPoints=0,this._pointerInputClearObserver=null,this._gamepadConnectedEvent=e=>{},this._gamepadDisconnectedEvent=e=>{},this._eventPrefix=ev.Tools.GetPointerPrefix(e),this._engine=e,this._onDeviceConnected=t,this._onDeviceDisconnected=i,this._onInputChanged=s,this._mouseId=+!this._isUsingFirefox,this._enableEvents(),this._usingMacOs&&(this._metaKeys=[]),this._engine._onEngineViewChanged||(this._engine._onEngineViewChanged=()=>{this._enableEvents()})}pollInput(e,t,i){let s=this._inputs[e][t];if(!s)throw`Unable to find device ${l[e]}`;e>=l.DualShock&&e<=l.DualSense&&this._updateDevice(e,t,i);let r=s[i];if(void 0===r)throw`Unable to find input ${i} for device ${l[e]} in slot ${t}`;return i===d.Move&&ev.Tools.Warn("Unable to provide information for PointerInput.Move. Try using PointerInput.Horizontal or PointerInput.Vertical for move data."),r}isDeviceAvailable(e){return void 0!==this._inputs[e]}dispose(){this._onDeviceConnected=()=>{},this._onDeviceDisconnected=()=>{},this._onInputChanged=()=>{},delete this._engine._onEngineViewChanged,this._elementToAttachTo&&this._disableEvents()}_enableEvents(){let e=this?._engine.getInputElement();if(e&&(!this._eventsAttached||this._elementToAttachTo!==e)){if(this._disableEvents(),this._inputs){for(let e of this._inputs)if(e)for(let t in e){let i=e[+t];if(i)for(let e=0;e<i.length;e++)i[e]=0}}this._elementToAttachTo=e,this._elementToAttachTo.tabIndex=-1!==this._elementToAttachTo.tabIndex?this._elementToAttachTo.tabIndex:this._engine.canvasTabIndex,this._handleKeyActions(),this._handlePointerActions(),this._handleGamepadActions(),this._eventsAttached=!0,this._checkForConnectedDevices()}}_disableEvents(){this._elementToAttachTo&&(this._elementToAttachTo.removeEventListener("blur",this._keyboardBlurEvent),this._elementToAttachTo.removeEventListener("blur",this._pointerBlurEvent),this._elementToAttachTo.removeEventListener("keydown",this._keyboardDownEvent),this._elementToAttachTo.removeEventListener("keyup",this._keyboardUpEvent),this._elementToAttachTo.removeEventListener(this._eventPrefix+"move",this._pointerMoveEvent),this._elementToAttachTo.removeEventListener(this._eventPrefix+"down",this._pointerDownEvent),this._elementToAttachTo.removeEventListener(this._eventPrefix+"up",this._pointerUpEvent),this._elementToAttachTo.removeEventListener(this._eventPrefix+"cancel",this._pointerCancelEvent),this._elementToAttachTo.removeEventListener(this._eventPrefix+"leave",this._pointerLeaveEvent),this._elementToAttachTo.removeEventListener(this._wheelEventName,this._pointerWheelEvent),this._usingMacOs&&this._isUsingChromium&&this._elementToAttachTo.removeEventListener("lostpointercapture",this._pointerMacOsChromeOutEvent),window.removeEventListener("gamepadconnected",this._gamepadConnectedEvent),window.removeEventListener("gamepaddisconnected",this._gamepadDisconnectedEvent)),this._pointerInputClearObserver&&this._engine.onEndFrameObservable.remove(this._pointerInputClearObserver),this._eventsAttached=!1}_checkForConnectedDevices(){if(navigator.getGamepads)for(let e of navigator.getGamepads())e&&this._addGamePad(e);"function"==typeof matchMedia&&matchMedia("(pointer:fine)").matches&&this._addPointerDevice(l.Mouse,0,0,0)}_addGamePad(e){let t=this._getGamepadDeviceType(e.id),i=e.index;this._gamepads=this._gamepads||Array(e.index+1),this._registerDevice(t,i,e.buttons.length+e.axes.length),this._gamepads[i]=t}_addPointerDevice(e,t,i,s){this._pointerActive||(this._pointerActive=!0),this._registerDevice(e,t,e$);let r=this._inputs[e][t];r[0]=i,r[1]=s}_registerDevice(e,t,i){if(void 0===t)throw`Unable to register device ${l[e]} to undefined slot.`;if(this._inputs[e]||(this._inputs[e]={}),!this._inputs[e][t]){let s=Array(i);s.fill(0),this._inputs[e][t]=s,this._onDeviceConnected(e,t)}}_unregisterDevice(e,t){this._inputs[e][t]&&(delete this._inputs[e][t],this._onDeviceDisconnected(e,t))}_handleKeyActions(){this._keyboardDownEvent=e=>{this._keyboardActive||(this._keyboardActive=!0,this._registerDevice(l.Keyboard,0,255));let t=this._inputs[l.Keyboard][0];t&&(t[e.keyCode]=1,e.inputIndex=e.keyCode,this._usingMacOs&&e.metaKey&&"Meta"!==e.key&&!this._metaKeys.includes(e.keyCode)&&this._metaKeys.push(e.keyCode),this._onInputChanged(l.Keyboard,0,e))},this._keyboardUpEvent=e=>{this._keyboardActive||(this._keyboardActive=!0,this._registerDevice(l.Keyboard,0,255));let t=this._inputs[l.Keyboard][0];if(t){if(t[e.keyCode]=0,e.inputIndex=e.keyCode,this._usingMacOs&&"Meta"===e.key&&this._metaKeys.length>0){for(let e of this._metaKeys){let i=eK.CreateDeviceEvent(l.Keyboard,0,e,0,this,this._elementToAttachTo);t[e]=0,this._onInputChanged(l.Keyboard,0,i)}this._metaKeys.splice(0,this._metaKeys.length)}this._onInputChanged(l.Keyboard,0,e)}},this._keyboardBlurEvent=()=>{if(this._keyboardActive){let e=this._inputs[l.Keyboard][0];for(let t=0;t<e.length;t++)if(0!==e[t]){e[t]=0;let i=eK.CreateDeviceEvent(l.Keyboard,0,t,0,this,this._elementToAttachTo);this._onInputChanged(l.Keyboard,0,i)}this._usingMacOs&&this._metaKeys.splice(0,this._metaKeys.length)}},this._elementToAttachTo.addEventListener("keydown",this._keyboardDownEvent),this._elementToAttachTo.addEventListener("keyup",this._keyboardUpEvent),this._elementToAttachTo.addEventListener("blur",this._keyboardBlurEvent)}_handlePointerActions(){this._maxTouchPoints=(0,eX.IsNavigatorAvailable)()&&navigator.maxTouchPoints||2,this._activeTouchIds||(this._activeTouchIds=Array(this._maxTouchPoints));for(let e=0;e<this._maxTouchPoints;e++)this._activeTouchIds[e]=-1;this._pointerMoveEvent=e=>{let t=this._getPointerType(e),i=t===l.Mouse?0:this._activeTouchIds.indexOf(e.pointerId);if(t===l.Touch&&-1===i){let s=this._activeTouchIds.indexOf(-1);if(!(s>=0))return void ev.Tools.Warn(`Max number of touches exceeded. Ignoring touches in excess of ${this._maxTouchPoints}`);i=s,this._activeTouchIds[s]=e.pointerId,this._onDeviceConnected(t,i)}this._inputs[t]||(this._inputs[t]={}),this._inputs[t][i]||this._addPointerDevice(t,i,e.clientX,e.clientY);let s=this._inputs[t][i];s&&(e.inputIndex=d.Move,s[d.Horizontal]=e.clientX,s[d.Vertical]=e.clientY,t===l.Touch&&0===s[d.LeftClick]&&(s[d.LeftClick]=1),void 0===e.pointerId&&(e.pointerId=this._mouseId),this._onInputChanged(t,i,e),this._usingSafari||-1===e.button||(e.inputIndex=e.button+2,s[e.button+2]=+!s[e.button+2],this._onInputChanged(t,i,e)))},this._pointerDownEvent=e=>{let t=this._getPointerType(e),i=t===l.Mouse?0:e.pointerId;if(t===l.Touch){let t=this._activeTouchIds.indexOf(e.pointerId);if(-1===t&&(t=this._activeTouchIds.indexOf(-1)),!(t>=0))return void ev.Tools.Warn(`Max number of touches exceeded. Ignoring touches in excess of ${this._maxTouchPoints}`);i=t,this._activeTouchIds[t]=e.pointerId}this._inputs[t]||(this._inputs[t]={}),this._inputs[t][i]?t===l.Touch&&this._onDeviceConnected(t,i):this._addPointerDevice(t,i,e.clientX,e.clientY);let s=this._inputs[t][i];if(s){let r=s[d.Horizontal],n=s[d.Vertical];if(t===l.Mouse){if(void 0===e.pointerId&&(e.pointerId=this._mouseId),!document.pointerLockElement)try{this._elementToAttachTo.setPointerCapture(this._mouseId)}catch(e){}}else if(e.pointerId&&!document.pointerLockElement)try{this._elementToAttachTo.setPointerCapture(e.pointerId)}catch(e){}s[d.Horizontal]=e.clientX,s[d.Vertical]=e.clientY,s[e.button+2]=1,e.inputIndex=e.button+2,this._onInputChanged(t,i,e),(r!==e.clientX||n!==e.clientY)&&(e.inputIndex=d.Move,this._onInputChanged(t,i,e))}},this._pointerUpEvent=e=>{let t=this._getPointerType(e),i=t===l.Mouse?0:this._activeTouchIds.indexOf(e.pointerId);if(t===l.Touch)if(-1===i)return;else this._activeTouchIds[i]=-1;let s=this._inputs[t]?.[i],r=e.button,n=s&&0!==s[r+2];if(!n&&this._isUsingFirefox&&this._usingMacOs&&s&&(n=0!==s[(r=2*(2!==r))+2]),n){let n=s[d.Horizontal],a=s[d.Vertical];s[d.Horizontal]=e.clientX,s[d.Vertical]=e.clientY,s[r+2]=0,void 0===e.pointerId&&(e.pointerId=this._mouseId),(n!==e.clientX||a!==e.clientY)&&(e.inputIndex=d.Move,this._onInputChanged(t,i,e)),e.inputIndex=r+2,t===l.Mouse&&this._mouseId>=0&&this._elementToAttachTo.hasPointerCapture?.(this._mouseId)?this._elementToAttachTo.releasePointerCapture(this._mouseId):e.pointerId&&this._elementToAttachTo.hasPointerCapture?.(e.pointerId)&&this._elementToAttachTo.releasePointerCapture(e.pointerId),this._onInputChanged(t,i,e),t===l.Touch&&this._onDeviceDisconnected(t,i)}},this._pointerCancelTouch=e=>{let t=this._activeTouchIds.indexOf(e);if(-1===t)return;this._elementToAttachTo.hasPointerCapture?.(e)&&this._elementToAttachTo.releasePointerCapture(e),this._inputs[l.Touch][t][d.LeftClick]=0;let i=eK.CreateDeviceEvent(l.Touch,t,d.LeftClick,0,this,this._elementToAttachTo,e);this._onInputChanged(l.Touch,t,i),this._activeTouchIds[t]=-1,this._onDeviceDisconnected(l.Touch,t)},this._pointerCancelEvent=e=>{if("mouse"===e.pointerType){let e=this._inputs[l.Mouse][0];this._mouseId>=0&&this._elementToAttachTo.hasPointerCapture?.(this._mouseId)&&this._elementToAttachTo.releasePointerCapture(this._mouseId);for(let t=d.LeftClick;t<=d.BrowserForward;t++)if(1===e[t]){e[t]=0;let i=eK.CreateDeviceEvent(l.Mouse,0,t,0,this,this._elementToAttachTo);this._onInputChanged(l.Mouse,0,i)}}else this._pointerCancelTouch(e.pointerId)},this._pointerLeaveEvent=e=>{"pen"===e.pointerType&&this._pointerCancelTouch(e.pointerId)},this._wheelEventName="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";let e=!1,t=function(){};try{let i=Object.defineProperty({},"passive",{get:function(){e=!0}});this._elementToAttachTo.addEventListener("test",t,i),this._elementToAttachTo.removeEventListener("test",t,i)}catch(e){}this._pointerBlurEvent=()=>{if(this.isDeviceAvailable(l.Mouse)){let e=this._inputs[l.Mouse][0];this._mouseId>=0&&this._elementToAttachTo.hasPointerCapture?.(this._mouseId)&&this._elementToAttachTo.releasePointerCapture(this._mouseId);for(let t=d.LeftClick;t<=d.BrowserForward;t++)if(1===e[t]){e[t]=0;let i=eK.CreateDeviceEvent(l.Mouse,0,t,0,this,this._elementToAttachTo);this._onInputChanged(l.Mouse,0,i)}}if(this.isDeviceAvailable(l.Touch)){let e=this._inputs[l.Touch];for(let t=0;t<this._activeTouchIds.length;t++){let i=this._activeTouchIds[t];if(this._elementToAttachTo.hasPointerCapture?.(i)&&this._elementToAttachTo.releasePointerCapture(i),-1!==i&&e[t]?.[d.LeftClick]===1){e[t][d.LeftClick]=0;let s=eK.CreateDeviceEvent(l.Touch,t,d.LeftClick,0,this,this._elementToAttachTo,i);this._onInputChanged(l.Touch,t,s),this._activeTouchIds[t]=-1,this._onDeviceDisconnected(l.Touch,t)}}}},this._pointerWheelEvent=e=>{let t=l.Mouse;this._inputs[t]||(this._inputs[t]=[]),this._inputs[t][0]||(this._pointerActive=!0,this._registerDevice(t,0,e$));let i=this._inputs[t][0];i&&(i[d.MouseWheelX]=e.deltaX||0,i[d.MouseWheelY]=e.deltaY||e.wheelDelta||0,i[d.MouseWheelZ]=e.deltaZ||0,void 0===e.pointerId&&(e.pointerId=this._mouseId),0!==i[d.MouseWheelX]&&(e.inputIndex=d.MouseWheelX,this._onInputChanged(t,0,e)),0!==i[d.MouseWheelY]&&(e.inputIndex=d.MouseWheelY,this._onInputChanged(t,0,e)),0!==i[d.MouseWheelZ]&&(e.inputIndex=d.MouseWheelZ,this._onInputChanged(t,0,e)))},this._usingMacOs&&this._isUsingChromium&&(this._pointerMacOsChromeOutEvent=e=>{e.buttons>1&&this._pointerCancelEvent(e)},this._elementToAttachTo.addEventListener("lostpointercapture",this._pointerMacOsChromeOutEvent)),this._elementToAttachTo.addEventListener(this._eventPrefix+"move",this._pointerMoveEvent),this._elementToAttachTo.addEventListener(this._eventPrefix+"down",this._pointerDownEvent),this._elementToAttachTo.addEventListener(this._eventPrefix+"up",this._pointerUpEvent),this._elementToAttachTo.addEventListener(this._eventPrefix+"cancel",this._pointerCancelEvent),this._elementToAttachTo.addEventListener(this._eventPrefix+"leave",this._pointerLeaveEvent),this._elementToAttachTo.addEventListener("blur",this._pointerBlurEvent),this._elementToAttachTo.addEventListener(this._wheelEventName,this._pointerWheelEvent,!!e&&{passive:!1}),this._pointerInputClearObserver=this._engine.onEndFrameObservable.add(()=>{if(this.isDeviceAvailable(l.Mouse)){let e=this._inputs[l.Mouse][0];e[d.MouseWheelX]=0,e[d.MouseWheelY]=0,e[d.MouseWheelZ]=0}})}_handleGamepadActions(){this._gamepadConnectedEvent=e=>{this._addGamePad(e.gamepad)},this._gamepadDisconnectedEvent=e=>{if(this._gamepads){let t=this._getGamepadDeviceType(e.gamepad.id),i=e.gamepad.index;this._unregisterDevice(t,i),delete this._gamepads[i]}},window.addEventListener("gamepadconnected",this._gamepadConnectedEvent),window.addEventListener("gamepaddisconnected",this._gamepadDisconnectedEvent)}_updateDevice(e,t,i){let s=navigator.getGamepads()[t];if(s&&e===this._gamepads[t]){let r=this._inputs[e][t];i>=s.buttons.length?r[i]=s.axes[i-s.buttons.length].valueOf():r[i]=s.buttons[i].value}}_getGamepadDeviceType(e){return -1!==e.indexOf("054c")?-1!==e.indexOf("0ce6")?l.DualSense:l.DualShock:-1!==e.indexOf("Xbox One")||-1!==e.search("Xbox 360")||-1!==e.search("xinput")||-1!==e.indexOf("045e")&&-1===e.indexOf("Surface Dock")?l.Xbox:-1!==e.indexOf("057e")?l.Switch:l.Generic}_getPointerType(e){let t=l.Mouse;return("touch"===e.pointerType||"pen"===e.pointerType||e.touches)&&(t=l.Touch),t}}class eJ{constructor(e,t,i=0){this.deviceType=t,this.deviceSlot=i,this.onInputChangedObservable=new eb.Observable,this._deviceInputSystem=e}getInput(e){return this._deviceInputSystem.pollInput(this.deviceType,this.deviceSlot,e)}}class e0{constructor(e){this._registeredManagers=[],this._refCount=0,this.registerManager=e=>{for(let t=0;t<this._devices.length;t++){let i=this._devices[t];for(let s in i){let i=+s;e._addDevice(new eJ(this._deviceInputSystem,t,i))}}this._registeredManagers.push(e)},this.unregisterManager=e=>{let t=this._registeredManagers.indexOf(e);t>-1&&this._registeredManagers.splice(t,1)};const t=Object.keys(l).length/2;this._devices=Array(t);const i=(e,t)=>{for(let i of(this._devices[e]||(this._devices[e]=[]),this._devices[e][t]||(this._devices[e][t]=t),this._registeredManagers)){let s=new eJ(this._deviceInputSystem,e,t);i._addDevice(s)}},s=(e,t)=>{for(let i of(this._devices[e]?.[t]&&delete this._devices[e][t],this._registeredManagers))i._removeDevice(e,t)},r=(e,t,i)=>{if(i)for(let s of this._registeredManagers)s._onInputChanged(e,t,i)};"u">typeof _native?this._deviceInputSystem=new eZ(i,s,r):this._deviceInputSystem=new eQ(e,i,s,r)}dispose(){this._deviceInputSystem.dispose()}}class e1{getDeviceSource(e,t){if(void 0===t){if(void 0===this._firstDevice[e])return null;t=this._firstDevice[e]}return this._devices[e]&&void 0!==this._devices[e][t]?this._devices[e][t]:null}getDeviceSources(e){return this._devices[e]?this._devices[e].filter(e=>!!e):[]}constructor(e){const t=Object.keys(l).length/2;this._devices=Array(t),this._firstDevice=Array(t),this._engine=e,this._engine._deviceSourceManager||(this._engine._deviceSourceManager=new e0(e)),this._engine._deviceSourceManager._refCount++,this.onDeviceConnectedObservable=new eb.Observable(e=>{for(let t of this._devices)if(t)for(let i of t)i&&this.onDeviceConnectedObservable.notifyObserver(e,i)}),this.onDeviceDisconnectedObservable=new eb.Observable,this._engine._deviceSourceManager.registerManager(this),this._onDisposeObserver=e.onDisposeObservable.add(()=>{this.dispose()})}dispose(){this.onDeviceConnectedObservable.clear(),this.onDeviceDisconnectedObservable.clear(),this._engine._deviceSourceManager&&(this._engine._deviceSourceManager.unregisterManager(this),--this._engine._deviceSourceManager._refCount<1&&(this._engine._deviceSourceManager.dispose(),delete this._engine._deviceSourceManager)),this._engine.onDisposeObservable.remove(this._onDisposeObserver)}_addDevice(e){this._devices[e.deviceType]||(this._devices[e.deviceType]=[]),this._devices[e.deviceType][e.deviceSlot]||(this._devices[e.deviceType][e.deviceSlot]=e,this._updateFirstDevices(e.deviceType)),this.onDeviceConnectedObservable.notifyObservers(e)}_removeDevice(e,t){let i=this._devices[e]?.[t];this.onDeviceDisconnectedObservable.notifyObservers(i),this._devices[e]?.[t]&&delete this._devices[e][t],this._updateFirstDevices(e)}_onInputChanged(e,t,i){this._devices[e]?.[t]?.onInputChangedObservable.notifyObservers(i)}_updateFirstDevices(e){switch(e){case l.Keyboard:case l.Mouse:this._firstDevice[e]=0;break;case l.Touch:case l.DualSense:case l.DualShock:case l.Xbox:case l.Switch:case l.Generic:{delete this._firstDevice[e];let t=this._devices[e];if(t){for(let i=0;i<t.length;i++)if(t[i]){this._firstDevice[e]=i;break}}}}}}class e2{}e2._IsPickingAvailable=!1,e.s(["_ImportHelper",0,e2],5785);class e3{constructor(){this._singleClick=!1,this._doubleClick=!1,this._hasSwiped=!1,this._ignore=!1}get singleClick(){return this._singleClick}get doubleClick(){return this._doubleClick}get hasSwiped(){return this._hasSwiped}get ignore(){return this._ignore}set singleClick(e){this._singleClick=e}set doubleClick(e){this._doubleClick=e}set hasSwiped(e){this._hasSwiped=e}set ignore(e){this._ignore=e}}class e6{constructor(e){if(this._alreadyAttached=!1,this._meshPickProceed=!1,this._currentPickResult=null,this._previousPickResult=null,this._activePointerIds=[],this._activePointerIdsCount=0,this._doubleClickOccured=!1,this._isSwiping=!1,this._swipeButtonPressed=-1,this._skipPointerTap=!1,this._isMultiTouchGesture=!1,this._pointerX=0,this._pointerY=0,this._startingPointerPosition=new eM.Vector2(0,0),this._previousStartingPointerPosition=new eM.Vector2(0,0),this._startingPointerTime=0,this._previousStartingPointerTime=0,this._pointerCaptures={},this._meshUnderPointerId={},this._movePointerInfo=null,this._cameraObserverCount=0,this._delayedClicks=[null,null,null,null,null],this._deviceSourceManager=null,this._scene=e||eq.EngineStore.LastCreatedScene,!this._scene)return}get meshUnderPointer(){return this._movePointerInfo&&(this._movePointerInfo._generatePickInfo(),this._movePointerInfo=null),this._pointerOverMesh}getMeshUnderPointerByPointerId(e){return this._meshUnderPointerId[e]||null}get unTranslatedPointer(){return new eM.Vector2(this._unTranslatedPointerX,this._unTranslatedPointerY)}get pointerX(){return this._pointerX}set pointerX(e){this._pointerX=e}get pointerY(){return this._pointerY}set pointerY(e){this._pointerY=e}_updatePointerPosition(e){let t=this._scene.getEngine().getInputElementClientRect();t&&(this._pointerX=e.clientX-t.left,this._pointerY=e.clientY-t.top,this._unTranslatedPointerX=this._pointerX,this._unTranslatedPointerY=this._pointerY)}_processPointerMove(e,t){let i,s=this._scene,r=s.getEngine(),n=r.getInputElement();for(let i of(n&&(n.tabIndex=r.canvasTabIndex,s.doNotHandleCursors||(n.style.cursor=s.defaultCursor)),this._setCursorAndPointerOverMesh(e,t,s),s._pointerMoveStage)){e=e||this._pickMove(t);let s=!!e?.pickedMesh;e=i.action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,s,n)}let a=t.inputIndex>=d.MouseWheelX&&t.inputIndex<=d.MouseWheelZ?eV.PointerEventTypes.POINTERWHEEL:eV.PointerEventTypes.POINTERMOVE;s.onPointerMove&&(e=e||this._pickMove(t),s.onPointerMove(t,e,a)),e?(i=new eV.PointerInfo(a,t,e),this._setRayOnPointerInfo(e,t)):(i=new eV.PointerInfo(a,t,null,this),this._movePointerInfo=i),s.onPointerObservable.hasObservers()&&s.onPointerObservable.notifyObservers(i,a)}_setRayOnPointerInfo(e,t){let i=this._scene;e&&e2._IsPickingAvailable&&!e.ray&&(e.ray=i.createPickingRay(t.offsetX,t.offsetY,eM.Matrix.Identity(),i.activeCamera))}_addCameraPointerObserver(e,t){return this._cameraObserverCount++,this._scene.onPointerObservable.add(e,t)}_removeCameraPointerObserver(e){return this._cameraObserverCount--,this._scene.onPointerObservable.remove(e)}_checkForPicking(){return!!(this._scene.onPointerObservable.observers.length>this._cameraObserverCount||this._scene.onPointerPick)}_checkPrePointerObservable(e,t,i){let s=this._scene,r=new eV.PointerInfoPre(i,t,this._unTranslatedPointerX,this._unTranslatedPointerY);return e&&(r.originalPickingInfo=e,r.ray=e.ray,"xr-near"===t.pointerType&&e.originMesh&&(r.nearInteractionPickingInfo=e)),s.onPrePointerObservable.notifyObservers(r,i),!!r.skipOnPointerObservable}_pickMove(e){let t=this._scene,i=t.pick(this._unTranslatedPointerX,this._unTranslatedPointerY,t.pointerMovePredicate,t.pointerMoveFastCheck,t.cameraToUseForPointers,t.pointerMoveTrianglePredicate);return this._setCursorAndPointerOverMesh(i,e,t),i}_setCursorAndPointerOverMesh(e,t,i){let s=i.getEngine().getInputElement();if(e?.pickedMesh){if(this.setPointerOverMesh(e.pickedMesh,t.pointerId,e,t),!i.doNotHandleCursors&&s&&this._pointerOverMesh){let e=this._pointerOverMesh._getActionManagerForTrigger();e&&e.hasPointerTriggers&&(s.style.cursor=e.hoverCursor||i.hoverCursor)}}else this.setPointerOverMesh(null,t.pointerId,e,t)}simulatePointerMove(e,t){let i=new PointerEvent("pointermove",t);i.inputIndex=d.Move,this._checkPrePointerObservable(e,i,eV.PointerEventTypes.POINTERMOVE)||this._processPointerMove(e,i)}simulatePointerDown(e,t){let i=new PointerEvent("pointerdown",t);i.inputIndex=i.button+2,this._checkPrePointerObservable(e,i,eV.PointerEventTypes.POINTERDOWN)||this._processPointerDown(e,i)}_processPointerDown(e,t){let i,s=this._scene;if(e?.pickedMesh){this._pickedDownMesh=e.pickedMesh;let i=e.pickedMesh._getActionManagerForTrigger();if(i){if(i.hasPickTriggers)switch(i.processTrigger(5,new ex(e.pickedMesh,s.pointerX,s.pointerY,e.pickedMesh,t,e)),t.button){case 0:i.processTrigger(2,new ex(e.pickedMesh,s.pointerX,s.pointerY,e.pickedMesh,t,e));break;case 1:i.processTrigger(4,new ex(e.pickedMesh,s.pointerX,s.pointerY,e.pickedMesh,t,e));break;case 2:i.processTrigger(3,new ex(e.pickedMesh,s.pointerX,s.pointerY,e.pickedMesh,t,e))}i.hasSpecificTrigger(8)&&window.setTimeout(()=>{let e=s.pick(this._unTranslatedPointerX,this._unTranslatedPointerY,e=>e.isPickable&&e.isVisible&&e.isReady()&&e.actionManager&&e.actionManager.hasSpecificTrigger(8)&&e===this._pickedDownMesh,!1,s.cameraToUseForPointers);e?.pickedMesh&&i&&0!==this._activePointerIdsCount&&Date.now()-this._startingPointerTime>e6.LongPressDelay&&!this._isPointerSwiping()&&(this._startingPointerTime=0,i.processTrigger(8,ex.CreateNew(e.pickedMesh,t)))},e6.LongPressDelay)}}else for(let i of s._pointerDownStage)e=i.action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,t,!1);let r=eV.PointerEventTypes.POINTERDOWN;e?(s.onPointerDown&&s.onPointerDown(t,e,r),i=new eV.PointerInfo(r,t,e),this._setRayOnPointerInfo(e,t)):i=new eV.PointerInfo(r,t,null,this),s.onPointerObservable.hasObservers()&&s.onPointerObservable.notifyObservers(i,r)}_isPointerSwiping(){return this._isSwiping}simulatePointerUp(e,t,i){let s=new PointerEvent("pointerup",t);s.inputIndex=d.Move;let r=new e3;i?r.doubleClick=!0:r.singleClick=!0,this._checkPrePointerObservable(e,s,eV.PointerEventTypes.POINTERUP)||this._processPointerUp(e,s,r)}_processPointerUp(e,t,i){let s=this._scene;if(e?.pickedMesh){if(this._pickedUpMesh=e.pickedMesh,this._pickedDownMesh===this._pickedUpMesh&&(s.onPointerPick&&s.onPointerPick(t,e),i.singleClick&&!i.ignore&&s.onPointerObservable.observers.length>this._cameraObserverCount)){let i=eV.PointerEventTypes.POINTERPICK,r=new eV.PointerInfo(i,t,e);this._setRayOnPointerInfo(e,t),s.onPointerObservable.notifyObservers(r,i)}let r=e.pickedMesh._getActionManagerForTrigger();if(r&&!i.ignore){r.processTrigger(7,ex.CreateNew(e.pickedMesh,t,e)),!i.hasSwiped&&i.singleClick&&r.processTrigger(1,ex.CreateNew(e.pickedMesh,t,e));let s=e.pickedMesh._getActionManagerForTrigger(6);i.doubleClick&&s&&s.processTrigger(6,ex.CreateNew(e.pickedMesh,t,e))}}else if(!i.ignore)for(let r of s._pointerUpStage)e=r.action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,t,i.doubleClick);if(this._pickedDownMesh&&this._pickedDownMesh!==this._pickedUpMesh){let e=this._pickedDownMesh._getActionManagerForTrigger(16);e&&e.processTrigger(16,ex.CreateNew(this._pickedDownMesh,t))}if(!i.ignore){let r=new eV.PointerInfo(eV.PointerEventTypes.POINTERUP,t,e);if(this._setRayOnPointerInfo(e,t),s.onPointerObservable.notifyObservers(r,eV.PointerEventTypes.POINTERUP),s.onPointerUp&&s.onPointerUp(t,e,eV.PointerEventTypes.POINTERUP),!i.hasSwiped&&!this._skipPointerTap&&!this._isMultiTouchGesture){let r=0;if(i.singleClick?r=eV.PointerEventTypes.POINTERTAP:i.doubleClick&&(r=eV.PointerEventTypes.POINTERDOUBLETAP),r){let i=new eV.PointerInfo(r,t,e);s.onPointerObservable.hasObservers()&&s.onPointerObservable.hasSpecificMask(r)&&s.onPointerObservable.notifyObservers(i,r)}}}}isPointerCaptured(e=0){return this._pointerCaptures[e]}attachControl(e=!0,t=!0,i=!0,s=null){let r=this._scene,n=r.getEngine();s||(s=n.getInputElement()),this._alreadyAttached&&this.detachControl(),s&&(this._alreadyAttachedTo=s),this._deviceSourceManager=new e1(n),this._initActionManager=e=>{if(!this._meshPickProceed){let t=!r.skipPointerUpPicking&&(0!==r._registeredActions||this._checkForPicking()||r.onPointerUp)?r.pick(this._unTranslatedPointerX,this._unTranslatedPointerY,r.pointerUpPredicate,r.pointerUpFastCheck,r.cameraToUseForPointers,r.pointerUpTrianglePredicate):null;this._currentPickResult=t,t&&(e=t.hit&&t.pickedMesh?t.pickedMesh._getActionManagerForTrigger():null),this._meshPickProceed=!0}return e},this._delayedSimpleClick=(e,t,i)=>{if((Date.now()-this._previousStartingPointerTime>e6.DoubleClickDelay&&!this._doubleClickOccured||e!==this._previousButtonPressed)&&(this._doubleClickOccured=!1,t.singleClick=!0,t.ignore=!1,this._delayedClicks[e])){let t=this._delayedClicks[e].evt,i=eV.PointerEventTypes.POINTERTAP,s=new eV.PointerInfo(i,t,this._currentPickResult);r.onPointerObservable.hasObservers()&&r.onPointerObservable.hasSpecificMask(i)&&r.onPointerObservable.notifyObservers(s,i),this._delayedClicks[e]=null}},this._initClickEvent=(e,t,i,s)=>{let r=new e3;this._currentPickResult=null;let n=null,a=e.hasSpecificMask(eV.PointerEventTypes.POINTERPICK)||t.hasSpecificMask(eV.PointerEventTypes.POINTERPICK)||e.hasSpecificMask(eV.PointerEventTypes.POINTERTAP)||t.hasSpecificMask(eV.PointerEventTypes.POINTERTAP)||e.hasSpecificMask(eV.PointerEventTypes.POINTERDOUBLETAP)||t.hasSpecificMask(eV.PointerEventTypes.POINTERDOUBLETAP);!a&&ej&&(n=this._initActionManager(n,r))&&(a=n.hasPickTriggers);let o=!1;if(a=a&&!this._isMultiTouchGesture){let a=i.button;if(r.hasSwiped=this._isPointerSwiping(),!r.hasSwiped){let h=!e6.ExclusiveDoubleClickMode;if(!h&&(h=!e.hasSpecificMask(eV.PointerEventTypes.POINTERDOUBLETAP)&&!t.hasSpecificMask(eV.PointerEventTypes.POINTERDOUBLETAP))&&!ej.HasSpecificTrigger(6)&&(n=this._initActionManager(n,r))&&(h=!n.hasSpecificTrigger(6)),h)(Date.now()-this._previousStartingPointerTime>e6.DoubleClickDelay||a!==this._previousButtonPressed)&&(r.singleClick=!0,s(r,this._currentPickResult),o=!0);else{let e={evt:i,clickInfo:r,timeoutId:window.setTimeout(this._delayedSimpleClick.bind(this,a,r,s),e6.DoubleClickDelay)};this._delayedClicks[a]=e}let l=e.hasSpecificMask(eV.PointerEventTypes.POINTERDOUBLETAP)||t.hasSpecificMask(eV.PointerEventTypes.POINTERDOUBLETAP);!l&&ej.HasSpecificTrigger(6)&&(n=this._initActionManager(n,r))&&(l=n.hasSpecificTrigger(6)),l&&(a===this._previousButtonPressed&&Date.now()-this._previousStartingPointerTime<e6.DoubleClickDelay&&!this._doubleClickOccured?(r.hasSwiped||this._isPointerSwiping()?(this._doubleClickOccured=!1,this._previousStartingPointerTime=this._startingPointerTime,this._previousStartingPointerPosition.x=this._startingPointerPosition.x,this._previousStartingPointerPosition.y=this._startingPointerPosition.y,this._previousButtonPressed=a,e6.ExclusiveDoubleClickMode?(this._delayedClicks[a]&&(clearTimeout(this._delayedClicks[a]?.timeoutId),this._delayedClicks[a]=null),s(r,this._previousPickResult)):s(r,this._currentPickResult)):(this._previousStartingPointerTime=0,this._doubleClickOccured=!0,r.doubleClick=!0,r.ignore=!1,e6.ExclusiveDoubleClickMode&&this._delayedClicks[a]&&(clearTimeout(this._delayedClicks[a]?.timeoutId),this._delayedClicks[a]=null),s(r,this._currentPickResult)),o=!0):(this._doubleClickOccured=!1,this._previousStartingPointerTime=this._startingPointerTime,this._previousStartingPointerPosition.x=this._startingPointerPosition.x,this._previousStartingPointerPosition.y=this._startingPointerPosition.y,this._previousButtonPressed=a))}}o||s(r,this._currentPickResult)},this._onPointerMove=e=>{if(this._updatePointerPosition(e),this._isSwiping||-1===this._swipeButtonPressed||(this._isSwiping=Math.abs(this._startingPointerPosition.x-this._pointerX)>e6.DragMovementThreshold||Math.abs(this._startingPointerPosition.y-this._pointerY)>e6.DragMovementThreshold),n.isPointerLock&&n._verifyPointerLock(),this._checkPrePointerObservable(null,e,e.inputIndex>=d.MouseWheelX&&e.inputIndex<=d.MouseWheelZ?eV.PointerEventTypes.POINTERWHEEL:eV.PointerEventTypes.POINTERMOVE)||!r.cameraToUseForPointers&&!r.activeCamera)return;if(r.skipPointerMovePicking)return void this._processPointerMove(new ew.PickingInfo,e);r.pointerMovePredicate||(r.pointerMovePredicate=e=>e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(e.enablePointerMoveEvents||r.constantlyUpdateMeshUnderPointer||null!==e._getActionManagerForTrigger())&&(!r.cameraToUseForPointers||(r.cameraToUseForPointers.layerMask&e.layerMask)!=0));let t=r._registeredActions>0||r.constantlyUpdateMeshUnderPointer?this._pickMove(e):null;this._processPointerMove(t,e)},this._onPointerDown=e=>{let t,i=this._activePointerIds.indexOf(-1);if(-1===i?this._activePointerIds.push(e.pointerId):this._activePointerIds[i]=e.pointerId,this._activePointerIdsCount++,this._pickedDownMesh=null,this._meshPickProceed=!1,e6.ExclusiveDoubleClickMode){for(let t=0;t<this._delayedClicks.length;t++)if(this._delayedClicks[t])if(e.button===t)clearTimeout(this._delayedClicks[t]?.timeoutId);else{let e=this._delayedClicks[t].clickInfo;this._doubleClickOccured=!1,e.singleClick=!0,e.ignore=!1;let i=this._delayedClicks[t].evt,s=eV.PointerEventTypes.POINTERTAP,n=new eV.PointerInfo(s,i,this._currentPickResult);r.onPointerObservable.hasObservers()&&r.onPointerObservable.hasSpecificMask(s)&&r.onPointerObservable.notifyObservers(n,s),this._delayedClicks[t]=null}}this._updatePointerPosition(e),-1===this._swipeButtonPressed&&(this._swipeButtonPressed=e.button),r.preventDefaultOnPointerDown&&s&&(e.preventDefault(),s.focus()),this._startingPointerPosition.x=this._pointerX,this._startingPointerPosition.y=this._pointerY,this._startingPointerTime=Date.now(),this._checkPrePointerObservable(null,e,eV.PointerEventTypes.POINTERDOWN)||(r.cameraToUseForPointers||r.activeCamera)&&(this._pointerCaptures[e.pointerId]=!0,r.pointerDownPredicate||(r.pointerDownPredicate=e=>e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(!r.cameraToUseForPointers||(r.cameraToUseForPointers.layerMask&e.layerMask)!=0)),this._pickedDownMesh=null,t=!r.skipPointerDownPicking&&(0!==r._registeredActions||this._checkForPicking()||r.onPointerDown)?r.pick(this._unTranslatedPointerX,this._unTranslatedPointerY,r.pointerDownPredicate,r.pointerDownFastCheck,r.cameraToUseForPointers,r.pointerDownTrianglePredicate):new ew.PickingInfo,this._processPointerDown(t,e))},this._onPointerUp=e=>{let t=this._activePointerIds.indexOf(e.pointerId);-1!==t&&(this._activePointerIds[t]=-1,this._activePointerIdsCount--,this._pickedUpMesh=null,this._meshPickProceed=!1,this._updatePointerPosition(e),r.preventDefaultOnPointerUp&&s&&(e.preventDefault(),s.focus()),this._initClickEvent(r.onPrePointerObservable,r.onPointerObservable,e,(t,i)=>{if(r.onPrePointerObservable.hasObservers()&&(this._skipPointerTap=!1,!t.ignore)){if(this._checkPrePointerObservable(null,e,eV.PointerEventTypes.POINTERUP)){this._swipeButtonPressed===e.button&&(this._isSwiping=!1,this._swipeButtonPressed=-1),0===e.buttons&&(this._pointerCaptures[e.pointerId]=!1);return}!t.hasSwiped&&(t.singleClick&&r.onPrePointerObservable.hasSpecificMask(eV.PointerEventTypes.POINTERTAP)&&this._checkPrePointerObservable(null,e,eV.PointerEventTypes.POINTERTAP)&&(this._skipPointerTap=!0),t.doubleClick&&r.onPrePointerObservable.hasSpecificMask(eV.PointerEventTypes.POINTERDOUBLETAP)&&this._checkPrePointerObservable(null,e,eV.PointerEventTypes.POINTERDOUBLETAP)&&(this._skipPointerTap=!0))}if(!this._pointerCaptures[e.pointerId]){this._swipeButtonPressed===e.button&&(this._isSwiping=!1,this._swipeButtonPressed=-1);return}0===e.buttons&&(this._pointerCaptures[e.pointerId]=!1),(r.cameraToUseForPointers||r.activeCamera)&&(r.pointerUpPredicate||(r.pointerUpPredicate=e=>e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(!r.cameraToUseForPointers||(r.cameraToUseForPointers.layerMask&e.layerMask)!=0)),!this._meshPickProceed&&(ej&&ej.HasTriggers||this._checkForPicking()||r.onPointerUp)&&this._initActionManager(null,t),i||(i=this._currentPickResult),this._processPointerUp(i,e,t),this._previousPickResult=this._currentPickResult,this._swipeButtonPressed===e.button&&(this._isSwiping=!1,this._swipeButtonPressed=-1))}))},this._onKeyDown=e=>{let t=eY.KeyboardEventTypes.KEYDOWN;if(r.onPreKeyboardObservable.hasObservers()){let i=new eY.KeyboardInfoPre(t,e);if(r.onPreKeyboardObservable.notifyObservers(i,t),i.skipOnKeyboardObservable)return}if(r.onKeyboardObservable.hasObservers()){let i=new eY.KeyboardInfo(t,e);r.onKeyboardObservable.notifyObservers(i,t)}r.actionManager&&r.actionManager.processTrigger(14,ex.CreateNewFromScene(r,e))},this._onKeyUp=e=>{let t=eY.KeyboardEventTypes.KEYUP;if(r.onPreKeyboardObservable.hasObservers()){let i=new eY.KeyboardInfoPre(t,e);if(r.onPreKeyboardObservable.notifyObservers(i,t),i.skipOnKeyboardObservable)return}if(r.onKeyboardObservable.hasObservers()){let i=new eY.KeyboardInfo(t,e);r.onKeyboardObservable.notifyObservers(i,t)}r.actionManager&&r.actionManager.processTrigger(15,ex.CreateNewFromScene(r,e))},this._deviceSourceManager.onDeviceConnectedObservable.add(s=>{s.deviceType===l.Mouse?s.onInputChangedObservable.add(r=>{this._originMouseEvent=r,r.inputIndex===d.LeftClick||r.inputIndex===d.MiddleClick||r.inputIndex===d.RightClick||r.inputIndex===d.BrowserBack||r.inputIndex===d.BrowserForward?t&&1===s.getInput(r.inputIndex)?this._onPointerDown(r):e&&0===s.getInput(r.inputIndex)&&this._onPointerUp(r):i&&(r.inputIndex===d.Move?this._onPointerMove(r):(r.inputIndex===d.MouseWheelX||r.inputIndex===d.MouseWheelY||r.inputIndex===d.MouseWheelZ)&&this._onPointerMove(r))}):s.deviceType===l.Touch?s.onInputChangedObservable.add(r=>{r.inputIndex===d.LeftClick&&(t&&1===s.getInput(r.inputIndex)?(this._onPointerDown(r),this._activePointerIdsCount>1&&(this._isMultiTouchGesture=!0)):e&&0===s.getInput(r.inputIndex)&&(this._onPointerUp(r),0===this._activePointerIdsCount&&(this._isMultiTouchGesture=!1))),i&&r.inputIndex===d.Move&&this._onPointerMove(r)}):s.deviceType===l.Keyboard&&s.onInputChangedObservable.add(e=>{"keydown"===e.type?this._onKeyDown(e):"keyup"===e.type&&this._onKeyUp(e)})}),this._alreadyAttached=!0}detachControl(){this._alreadyAttached&&(this._deviceSourceManager.dispose(),this._deviceSourceManager=null,this._alreadyAttachedTo&&!this._scene.doNotHandleCursors&&(this._alreadyAttachedTo.style.cursor=this._scene.defaultCursor),this._alreadyAttached=!1,this._alreadyAttachedTo=null)}setPointerOverMesh(e,t=0,i,s){let r;if(this._meshUnderPointerId[t]===e&&(!e||!e._internalAbstractMeshDataInfo._pointerOverDisableMeshTesting))return;let n=this._meshUnderPointerId[t];n&&(r=n._getActionManagerForTrigger(10))&&r.processTrigger(10,new ex(n,this._pointerX,this._pointerY,e,s,{pointerId:t})),e?(this._meshUnderPointerId[t]=e,this._pointerOverMesh=e,(r=e._getActionManagerForTrigger(9))&&r.processTrigger(9,new ex(e,this._pointerX,this._pointerY,e,s,{pointerId:t,pickResult:i}))):(delete this._meshUnderPointerId[t],this._pointerOverMesh=null),this._scene.onMeshUnderPointerUpdatedObservable.hasObservers()&&this._scene.onMeshUnderPointerUpdatedObservable.notifyObservers({mesh:e,pointerId:t})}getPointerOverMesh(){return this.meshUnderPointer}_invalidateMesh(e){for(let t in this._pointerOverMesh===e&&(this._pointerOverMesh=null),this._pickedDownMesh===e&&(this._pickedDownMesh=null),this._pickedUpMesh===e&&(this._pickedUpMesh=null),this._meshUnderPointerId)this._meshUnderPointerId[t]===e&&delete this._meshUnderPointerId[t]}}e6.DragMovementThreshold=10,e6.LongPressDelay=500,e6.DoubleClickDelay=300,e6.ExclusiveDoubleClickMode=!1;var e5=e.i(67359),e4=e.i(85531);class e7{static get UniqueId(){let e=this._UniqueIdCounter;return this._UniqueIdCounter++,e}}e7._UniqueIdCounter=1;var e8=e.i(46712),e9=e.i(21823),te=e.i(48657);class tt{constructor(){this.pointerDownFastCheck=!1,this.pointerUpFastCheck=!1,this.pointerMoveFastCheck=!1,this.skipPointerMovePicking=!1,this.skipPointerDownPicking=!1,this.skipPointerUpPicking=!1}}var ti=e.i(13379),ts=e.i(77052);let tr=new eM.Vector4,tn=new eM.Vector4;(h=eg||(eg={}))[h.BackwardCompatible=0]="BackwardCompatible",h[h.Intermediate=1]="Intermediate",h[h.Aggressive=2]="Aggressive";class ta{static DefaultMaterialFactory(e){throw(0,ez._WarnImport)("StandardMaterial")}static CollisionCoordinatorFactory(){throw(0,ez._WarnImport)("DefaultCollisionCoordinator")}get clearColor(){return this._clearColor}set clearColor(e){e!==this._clearColor&&(this._clearColor=e,this.onClearColorChangedObservable.notifyObservers(this._clearColor))}get imageProcessingConfiguration(){return this._imageProcessingConfiguration}get performancePriority(){return this._performancePriority}set performancePriority(e){if(e!==this._performancePriority){switch(this._performancePriority=e,e){case 0:this.skipFrustumClipping=!1,this._renderingManager.maintainStateBetweenFrames=!1,this.skipPointerMovePicking=!1,this.autoClear=!0;break;case 1:this.skipFrustumClipping=!1,this._renderingManager.maintainStateBetweenFrames=!1,this.skipPointerMovePicking=!0,this.autoClear=!1;break;case 2:this.skipFrustumClipping=!0,this._renderingManager.maintainStateBetweenFrames=!0,this.skipPointerMovePicking=!0,this.autoClear=!1}this.onScenePerformancePriorityChangedObservable.notifyObservers(e)}}set forceWireframe(e){this._forceWireframe!==e&&(this._forceWireframe=e,this.markAllMaterialsAsDirty(16))}get forceWireframe(){return this._forceWireframe}set skipFrustumClipping(e){this._skipFrustumClipping!==e&&(this._skipFrustumClipping=e)}get skipFrustumClipping(){return this._skipFrustumClipping}set forcePointsCloud(e){this._forcePointsCloud!==e&&(this._forcePointsCloud=e,this.markAllMaterialsAsDirty(16))}get forcePointsCloud(){return this._forcePointsCloud}get environmentTexture(){return this._environmentTexture}set environmentTexture(e){this._environmentTexture!==e&&(this._environmentTexture=e,this.onEnvironmentTextureChangedObservable.notifyObservers(e),this.markAllMaterialsAsDirty(1))}getNodes(){let e=[];for(let t of(e=(e=(e=(e=e.concat(this.meshes)).concat(this.lights)).concat(this.cameras)).concat(this.transformNodes),this.skeletons))e=e.concat(t.bones);return e}get animationPropertiesOverride(){return this._animationPropertiesOverride}set animationPropertiesOverride(e){this._animationPropertiesOverride=e}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}set beforeRender(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),e&&(this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e))}set afterRender(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),e&&(this._onAfterRenderObserver=this.onAfterRenderObservable.add(e))}set beforeCameraRender(e){this._onBeforeCameraRenderObserver&&this.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=this.onBeforeCameraRenderObservable.add(e)}set afterCameraRender(e){this._onAfterCameraRenderObserver&&this.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=this.onAfterCameraRenderObservable.add(e)}get pointerDownPredicate(){return this._pointerPickingConfiguration.pointerDownPredicate}set pointerDownPredicate(e){this._pointerPickingConfiguration.pointerDownPredicate=e}get pointerUpPredicate(){return this._pointerPickingConfiguration.pointerUpPredicate}set pointerUpPredicate(e){this._pointerPickingConfiguration.pointerUpPredicate=e}get pointerMovePredicate(){return this._pointerPickingConfiguration.pointerMovePredicate}set pointerMovePredicate(e){this._pointerPickingConfiguration.pointerMovePredicate=e}get pointerDownFastCheck(){return this._pointerPickingConfiguration.pointerDownFastCheck}set pointerDownFastCheck(e){this._pointerPickingConfiguration.pointerDownFastCheck=e}get pointerUpFastCheck(){return this._pointerPickingConfiguration.pointerUpFastCheck}set pointerUpFastCheck(e){this._pointerPickingConfiguration.pointerUpFastCheck=e}get pointerMoveFastCheck(){return this._pointerPickingConfiguration.pointerMoveFastCheck}set pointerMoveFastCheck(e){this._pointerPickingConfiguration.pointerMoveFastCheck=e}get skipPointerMovePicking(){return this._pointerPickingConfiguration.skipPointerMovePicking}set skipPointerMovePicking(e){this._pointerPickingConfiguration.skipPointerMovePicking=e}get skipPointerDownPicking(){return this._pointerPickingConfiguration.skipPointerDownPicking}set skipPointerDownPicking(e){this._pointerPickingConfiguration.skipPointerDownPicking=e}get skipPointerUpPicking(){return this._pointerPickingConfiguration.skipPointerUpPicking}set skipPointerUpPicking(e){this._pointerPickingConfiguration.skipPointerUpPicking=e}get unTranslatedPointer(){return this._inputManager.unTranslatedPointer}static get DragMovementThreshold(){return e6.DragMovementThreshold}static set DragMovementThreshold(e){e6.DragMovementThreshold=e}static get LongPressDelay(){return e6.LongPressDelay}static set LongPressDelay(e){e6.LongPressDelay=e}static get DoubleClickDelay(){return e6.DoubleClickDelay}static set DoubleClickDelay(e){e6.DoubleClickDelay=e}static get ExclusiveDoubleClickMode(){return e6.ExclusiveDoubleClickMode}static set ExclusiveDoubleClickMode(e){e6.ExclusiveDoubleClickMode=e}get _eyePosition(){return this._forcedViewPosition??this.activeCamera?.globalPosition??eM.Vector3.ZeroReadOnly}bindEyePosition(e,t="vEyePosition",i=!1){let s=this._eyePosition,r=this.useRightHandedSystem===(null!=this._mirroredCameraPosition),n=this.floatingOriginOffset,a=tr.set(s.x,s.y,s.z,r?-1:1),o=a.subtractFromFloatsToRef(n.x,n.y,n.z,0,tn);return e&&(i?e.setFloat3(t,o.x,o.y,o.z):e.setVector4(t,o)),a}finalizeSceneUbo(){let e=this.getSceneUniformBuffer(),t=this.bindEyePosition(null),i=this.floatingOriginOffset;return e.updateFloat4("vEyePosition",t.x-i.x,t.y-i.y,t.z-i.z,t.w),e.update(),e}set useRightHandedSystem(e){this._useRightHandedSystem!==e&&(this._useRightHandedSystem=e,this.markAllMaterialsAsDirty(16))}get useRightHandedSystem(){return this._useRightHandedSystem}setStepId(e){this._currentStepId=e}getStepId(){return this._currentStepId}getInternalStep(){return this._currentInternalStep}set fogEnabled(e){this._fogEnabled!==e&&(this._fogEnabled=e,this.markAllMaterialsAsDirty(16))}get fogEnabled(){return this._fogEnabled}set fogMode(e){this._fogMode!==e&&(this._fogMode=e,this.markAllMaterialsAsDirty(16))}get fogMode(){return this._fogMode}get prePass(){return!!this.prePassRenderer&&this.prePassRenderer.defaultRT.enabled}set shadowsEnabled(e){this._shadowsEnabled!==e&&(this._shadowsEnabled=e,this.markAllMaterialsAsDirty(2))}get shadowsEnabled(){return this._shadowsEnabled}set lightsEnabled(e){this._lightsEnabled!==e&&(this._lightsEnabled=e,this.markAllMaterialsAsDirty(2))}get lightsEnabled(){return this._lightsEnabled}get activeCameras(){return this._activeCameras}set activeCameras(e){this._unObserveActiveCameras&&(this._unObserveActiveCameras(),this._unObserveActiveCameras=null),e&&(this._unObserveActiveCameras=(0,te._ObserveArray)(e,()=>{this.onActiveCamerasChanged.notifyObservers(this)})),this._activeCameras=e}get activeCamera(){return this._activeCamera}set activeCamera(e){e!==this._activeCamera&&(this._activeCamera=e,this.onActiveCameraChanged.notifyObservers(this))}get _hasDefaultMaterial(){return ta.DefaultMaterialFactory!==ta._OriginalDefaultMaterialFactory}get defaultMaterial(){return this._defaultMaterial||(this._defaultMaterial=ta.DefaultMaterialFactory(this)),this._defaultMaterial}set defaultMaterial(e){this._defaultMaterial=e}set texturesEnabled(e){this._texturesEnabled!==e&&(this._texturesEnabled=e,this.markAllMaterialsAsDirty(1))}get texturesEnabled(){return this._texturesEnabled}get frameGraph(){return this._frameGraph}set frameGraph(e){if(this._frameGraph){this._frameGraph=e,e||(this.customRenderFunction=this._currentCustomRenderFunction);return}this._frameGraph=e,e&&(this._currentCustomRenderFunction=this.customRenderFunction,this.customRenderFunction=this._renderWithFrameGraph,this.activeCamera=null)}set skeletonsEnabled(e){this._skeletonsEnabled!==e&&(this._skeletonsEnabled=e,this.markAllMaterialsAsDirty(8))}get skeletonsEnabled(){return this._skeletonsEnabled}get collisionCoordinator(){return this._collisionCoordinator||(this._collisionCoordinator=ta.CollisionCoordinatorFactory(),this._collisionCoordinator.init(this)),this._collisionCoordinator}get renderingManager(){return this._renderingManager}get frustumPlanes(){return this._frustumPlanes}_registerTransientComponents(){if(this._transientComponents.length>0){for(let e of this._transientComponents)e.register();this._transientComponents.length=0}}_addComponent(e){this._components.push(e),this._transientComponents.push(e),e.addFromContainer&&e.serialize&&this._serializableComponents.push(e)}_getComponent(e){for(let t of this._components)if(t.name===e)return t;return null}get uniqueId(){return this._uniqueId}constructor(e,t){this._inputManager=new e6(this),this.cameraToUseForPointers=null,this._isScene=!0,this._blockEntityCollection=!1,this.autoClear=!0,this.autoClearDepthAndStencil=!0,this._clearColor=new eT.Color4(.2,.2,.3,1),this.onClearColorChangedObservable=new eb.Observable,this.ambientColor=new eT.Color3(0,0,0),this.environmentIntensity=1,this.iblIntensity=1,this._performancePriority=0,this.onScenePerformancePriorityChangedObservable=new eb.Observable,this._forceWireframe=!1,this._skipFrustumClipping=!1,this._forcePointsCloud=!1,this.rootNodes=[],this.cameras=[],this.lights=[],this.meshes=[],this.skeletons=[],this.particleSystems=[],this.animations=[],this.animationGroups=[],this.multiMaterials=[],this.materials=[],this.morphTargetManagers=[],this.geometries=[],this.transformNodes=[],this.actionManagers=[],this.objectRenderers=[],this.textures=[],this._environmentTexture=null,this.postProcesses=[],this.effectLayers=[],this.sounds=null,this.layers=[],this.lensFlareSystems=[],this.proceduralTextures=[],this.animationsEnabled=!0,this._animationPropertiesOverride=null,this.useConstantAnimationDeltaTime=!1,this.constantlyUpdateMeshUnderPointer=!1,this.hoverCursor="pointer",this.defaultCursor="",this.doNotHandleCursors=!1,this.preventDefaultOnPointerDown=!0,this.preventDefaultOnPointerUp=!0,this.metadata=null,this.reservedDataStore=null,this.disableOfflineSupportExceptionRules=[],this.onDisposeObservable=new eb.Observable,this._onDisposeObserver=null,this.onBeforeRenderObservable=new eb.Observable,this._onBeforeRenderObserver=null,this.onAfterRenderObservable=new eb.Observable,this.onAfterRenderCameraObservable=new eb.Observable,this._onAfterRenderObserver=null,this.onBeforeAnimationsObservable=new eb.Observable,this.onAfterAnimationsObservable=new eb.Observable,this.onBeforeDrawPhaseObservable=new eb.Observable,this.onAfterDrawPhaseObservable=new eb.Observable,this.onReadyObservable=new eb.Observable,this.onBeforeCameraRenderObservable=new eb.Observable,this._onBeforeCameraRenderObserver=null,this.onAfterCameraRenderObservable=new eb.Observable,this._onAfterCameraRenderObserver=null,this.onBeforeActiveMeshesEvaluationObservable=new eb.Observable,this.onAfterActiveMeshesEvaluationObservable=new eb.Observable,this.onBeforeParticlesRenderingObservable=new eb.Observable,this.onAfterParticlesRenderingObservable=new eb.Observable,this.onDataLoadedObservable=new eb.Observable,this.onNewCameraAddedObservable=new eb.Observable,this.onCameraRemovedObservable=new eb.Observable,this.onNewLightAddedObservable=new eb.Observable,this.onLightRemovedObservable=new eb.Observable,this.onNewGeometryAddedObservable=new eb.Observable,this.onGeometryRemovedObservable=new eb.Observable,this.onNewTransformNodeAddedObservable=new eb.Observable,this.onTransformNodeRemovedObservable=new eb.Observable,this.onNewMeshAddedObservable=new eb.Observable,this.onMeshRemovedObservable=new eb.Observable,this.onNewSkeletonAddedObservable=new eb.Observable,this.onSkeletonRemovedObservable=new eb.Observable,this.onNewParticleSystemAddedObservable=new eb.Observable,this.onParticleSystemRemovedObservable=new eb.Observable,this.onNewAnimationGroupAddedObservable=new eb.Observable,this.onAnimationGroupRemovedObservable=new eb.Observable,this.onNewMaterialAddedObservable=new eb.Observable,this.onNewMultiMaterialAddedObservable=new eb.Observable,this.onMaterialRemovedObservable=new eb.Observable,this.onMultiMaterialRemovedObservable=new eb.Observable,this.onNewTextureAddedObservable=new eb.Observable,this.onTextureRemovedObservable=new eb.Observable,this.onNewFrameGraphAddedObservable=new eb.Observable,this.onFrameGraphRemovedObservable=new eb.Observable,this.onNewObjectRendererAddedObservable=new eb.Observable,this.onObjectRendererRemovedObservable=new eb.Observable,this.onNewPostProcessAddedObservable=new eb.Observable,this.onPostProcessRemovedObservable=new eb.Observable,this.onNewEffectLayerAddedObservable=new eb.Observable,this.onEffectLayerRemovedObservable=new eb.Observable,this.onBeforeRenderTargetsRenderObservable=new eb.Observable,this.onAfterRenderTargetsRenderObservable=new eb.Observable,this.onBeforeStepObservable=new eb.Observable,this.onAfterStepObservable=new eb.Observable,this.onActiveCameraChanged=new eb.Observable,this.onActiveCamerasChanged=new eb.Observable,this.onBeforeRenderingGroupObservable=new eb.Observable,this.onAfterRenderingGroupObservable=new eb.Observable,this.onMeshImportedObservable=new eb.Observable,this.onAnimationFileImportedObservable=new eb.Observable,this.onEnvironmentTextureChangedObservable=new eb.Observable,this.onMeshUnderPointerUpdatedObservable=new eb.Observable,this._registeredForLateAnimationBindings=new ey.SmartArrayNoDuplicate(256),this._pointerPickingConfiguration=new tt,this.onPrePointerObservable=new eb.Observable,this.onPointerObservable=new eb.Observable,this.onPreKeyboardObservable=new eb.Observable,this.onKeyboardObservable=new eb.Observable,this._useRightHandedSystem=!1,this._timeAccumulator=0,this._currentStepId=0,this._currentInternalStep=0,this._fogEnabled=!0,this._fogMode=ta.FOGMODE_NONE,this.fogColor=new eT.Color3(.2,.2,.3),this.fogDensity=.1,this.fogStart=0,this.fogEnd=1e3,this.needsPreviousWorldMatrices=!1,this._shadowsEnabled=!0,this._lightsEnabled=!0,this._unObserveActiveCameras=null,this._texturesEnabled=!0,this._frameGraph=null,this.frameGraphs=[],this.physicsEnabled=!0,this.particlesEnabled=!0,this.spritesEnabled=!0,this._skeletonsEnabled=!0,this.lensFlaresEnabled=!0,this.collisionsEnabled=!0,this.gravity=new eM.Vector3(0,-9.807,0),this.postProcessesEnabled=!0,this.renderTargetsEnabled=!0,this.dumpNextRenderTargets=!1,this.customRenderTargets=[],this.importedMeshesFiles=[],this.probesEnabled=!0,this._meshesForIntersections=new ey.SmartArrayNoDuplicate(256),this.proceduralTexturesEnabled=!0,this._totalVertices=new e5.PerfCounter,this._activeIndices=new e5.PerfCounter,this._activeParticles=new e5.PerfCounter,this._activeBones=new e5.PerfCounter,this._animationTime=0,this.animationTimeScale=1,this._renderId=0,this._frameId=0,this._executeWhenReadyTimeoutId=null,this._intermediateRendering=!1,this._defaultFrameBufferCleared=!1,this._viewUpdateFlag=-1,this._projectionUpdateFlag=-1,this._toBeDisposed=Array(256),this._activeRequests=[],this._delayedFileRequests=null,this._pendingData=[],this._isDisposed=!1,this._isReadyChecks=[],this.dispatchAllSubMeshesOfActiveMeshes=!1,this._activeMeshes=new ey.SmartArray(256),this._processedMaterials=new ey.SmartArray(256),this._renderTargets=new ey.SmartArrayNoDuplicate(256),this._materialsRenderTargets=new ey.SmartArrayNoDuplicate(256),this._activeParticleSystems=new ey.SmartArray(256),this._activeSkeletons=new ey.SmartArrayNoDuplicate(32),this._softwareSkinnedMeshes=new ey.SmartArrayNoDuplicate(32),this._activeAnimatables=[],this._transformMatrix=eM.Matrix.Zero(),this.requireLightSorting=!1,this._components=[],this._serializableComponents=[],this._transientComponents=[],this._beforeCameraUpdateStage=eW.Stage.Create(),this._beforeClearStage=eW.Stage.Create(),this._beforeRenderTargetClearStage=eW.Stage.Create(),this._gatherRenderTargetsStage=eW.Stage.Create(),this._gatherActiveCameraRenderTargetsStage=eW.Stage.Create(),this._isReadyForMeshStage=eW.Stage.Create(),this._beforeEvaluateActiveMeshStage=eW.Stage.Create(),this._evaluateSubMeshStage=eW.Stage.Create(),this._preActiveMeshStage=eW.Stage.Create(),this._cameraDrawRenderTargetStage=eW.Stage.Create(),this._beforeCameraDrawStage=eW.Stage.Create(),this._beforeRenderTargetDrawStage=eW.Stage.Create(),this._beforeRenderingGroupDrawStage=eW.Stage.Create(),this._beforeRenderingMeshStage=eW.Stage.Create(),this._afterRenderingMeshStage=eW.Stage.Create(),this._afterRenderingGroupDrawStage=eW.Stage.Create(),this._afterCameraDrawStage=eW.Stage.Create(),this._afterCameraPostProcessStage=eW.Stage.Create(),this._afterRenderTargetDrawStage=eW.Stage.Create(),this._afterRenderTargetPostProcessStage=eW.Stage.Create(),this._afterRenderStage=eW.Stage.Create(),this._pointerMoveStage=eW.Stage.Create(),this._pointerDownStage=eW.Stage.Create(),this._pointerUpStage=eW.Stage.Create(),this._geometriesByUniqueId=null,this._uniqueId=0,this._defaultMeshCandidates={data:[],length:0},this._defaultSubMeshCandidates={data:[],length:0},this.onReadyTimeoutObservable=new eb.Observable,this.onReadyTimeoutDuration=12e4,this._timeoutChecksStartTime=0,this._floatingOriginScene=void 0,this._preventFreeActiveMeshesAndRenderingGroups=!1,this._activeMeshesFrozen=!1,this._activeMeshesFrozenButKeepClipping=!1,this._skipEvaluateActiveMeshesCompletely=!1,this._freezeActiveMeshesCancel=null,this._useCurrentFrameBuffer=!1,this._allowPostProcessClearColor=!0,this.getDeterministicFrameTime=()=>this._engine.getTimeStep(),this._getFloatingOriginScene=()=>this._floatingOriginScene,this._registeredActions=0,this._blockMaterialDirtyMechanism=!1,this._perfCollector=null,this.activeCameras=[],this._uniqueId=this.getUniqueId();const i={useGeometryUniqueIdsMap:!0,useMaterialMeshMap:!0,useClonedMeshMap:!0,virtual:!1,defaultCameraLayerMask:0xfffffff,defaultRenderableLayerMask:0xfffffff,...t};this.defaultCameraLayerMask=i.defaultCameraLayerMask,this.defaultRenderableLayerMask=i.defaultRenderableLayerMask,e=this._engine=e||eq.EngineStore.LastCreatedEngine,i.virtual?e._virtualScenes.push(this):(eq.EngineStore._LastCreatedScene=this,e.scenes.push(this)),(e.getCreationOptions().useLargeWorldRendering||t?.useFloatingOrigin)&&((0,eF.OverrideMatrixFunctions)(),this._floatingOriginScene=this,eF.FloatingOriginCurrentScene.getScene=this._getFloatingOriginScene),this._uid=null,this._renderingManager=new eU(this),eN&&(this.postProcessManager=new eN(this)),(0,eX.IsWindowObjectExist)()&&this.attachControl(),this._createUbo(),ek&&(this._imageProcessingConfiguration=new ek),this.setDefaultCandidateProviders(),i.useGeometryUniqueIdsMap&&(this._geometriesByUniqueId={}),this.useMaterialMeshMap=i.useMaterialMeshMap,this.useClonedMeshMap=i.useClonedMeshMap,t&&t.virtual||e.onNewSceneAddedObservable.notifyObservers(this)}getClassName(){return"Scene"}_getDefaultMeshCandidates(){return this._defaultMeshCandidates.data=this.meshes,this._defaultMeshCandidates.length=this.meshes.length,this._defaultMeshCandidates}_getDefaultSubMeshCandidates(e){return this._defaultSubMeshCandidates.data=e.subMeshes,this._defaultSubMeshCandidates.length=e.subMeshes.length,this._defaultSubMeshCandidates}setDefaultCandidateProviders(){this.getActiveMeshCandidates=()=>this._getDefaultMeshCandidates(),this.getActiveSubMeshCandidates=e=>this._getDefaultSubMeshCandidates(e),this.getIntersectingSubMeshCandidates=(e,t)=>this._getDefaultSubMeshCandidates(e),this.getCollidingSubMeshCandidates=(e,t)=>this._getDefaultSubMeshCandidates(e)}get meshUnderPointer(){return this._inputManager.meshUnderPointer}get pointerX(){return this._inputManager.pointerX}set pointerX(e){this._inputManager.pointerX=e}get pointerY(){return this._inputManager.pointerY}set pointerY(e){this._inputManager.pointerY=e}getCachedMaterial(){return this._cachedMaterial}getCachedEffect(){return this._cachedEffect}getCachedVisibility(){return this._cachedVisibility}isCachedMaterialInvalid(e,t,i=1){return this._cachedEffect!==t||this._cachedMaterial!==e||this._cachedVisibility!==i}getEngine(){return this._engine}getTotalVertices(){return this._totalVertices.current}get totalVerticesPerfCounter(){return this._totalVertices}getActiveIndices(){return this._activeIndices.current}get totalActiveIndicesPerfCounter(){return this._activeIndices}getActiveParticles(){return this._activeParticles.current}get activeParticlesPerfCounter(){return this._activeParticles}getActiveBones(){return this._activeBones.current}get activeBonesPerfCounter(){return this._activeBones}getActiveMeshes(){return this._activeMeshes}getAnimationRatio(){return void 0!==this._animationRatio?this._animationRatio:1}getRenderId(){return this._renderId}getFrameId(){return this._frameId}incrementRenderId(){this._renderId++}_createUbo(){this.setSceneUniformBuffer(this.createSceneUniformBuffer())}simulatePointerMove(e,t){return this._inputManager.simulatePointerMove(e,t),this}simulatePointerDown(e,t){return this._inputManager.simulatePointerDown(e,t),this}simulatePointerUp(e,t,i){return this._inputManager.simulatePointerUp(e,t,i),this}isPointerCaptured(e=0){return this._inputManager.isPointerCaptured(e)}attachControl(e=!0,t=!0,i=!0){this._inputManager.attachControl(e,t,i)}detachControl(){this._inputManager.detachControl()}isReady(e=!0){let t;if(this._isDisposed)return!1;let i=this.getEngine(),s=i.currentRenderPassId;i.currentRenderPassId=this.activeCamera?.renderPassId??s;let r=!0;for(this._pendingData.length>0&&(r=!1),this.prePassRenderer?.update(),this.useOrderIndependentTransparency&&this.depthPeelingRenderer&&r&&(r=this.depthPeelingRenderer.isReady()),e&&(this._processedMaterials.reset(),this._materialsRenderTargets.reset()),t=0;t<this.meshes.length;t++){let s=this.meshes[t];if(!s.subMeshes||0===s.subMeshes.length)continue;if(!s.isReady(!0)){r=!1;continue}let n=s.hasThinInstances||"InstancedMesh"===s.getClassName()||"InstancedLinesMesh"===s.getClassName()||i.getCaps().instancedArrays&&s.instances.length>0;for(let e of this._isReadyForMeshStage)e.action(s,n)||(r=!1);if(!e)continue;let a=s.material||this.defaultMaterial;if(a)if(a._storeEffectOnSubMeshes)for(let e of s.subMeshes){let t=e.getMaterial();t&&t.hasRenderTargetTextures&&null!=t.getRenderTargetTextures&&-1===this._processedMaterials.indexOf(t)&&(this._processedMaterials.push(t),this._materialsRenderTargets.concatWithNoDuplicate(t.getRenderTargetTextures()))}else a.hasRenderTargetTextures&&null!=a.getRenderTargetTextures&&-1===this._processedMaterials.indexOf(a)&&(this._processedMaterials.push(a),this._materialsRenderTargets.concatWithNoDuplicate(a.getRenderTargetTextures()))}if(e){for(t=0;t<this._materialsRenderTargets.length;++t)this._materialsRenderTargets.data[t].isReadyForRendering()||(r=!1);for(t=0;t<this.customRenderTargets.length;++t)this.customRenderTargets[t].isReadyForRendering()||(r=!1)}for(t=0;t<this.geometries.length;t++)2===this.geometries[t].delayLoadState&&(r=!1);if(this.activeCameras&&this.activeCameras.length>0)for(let e of this.activeCameras)e.isReady(!0)||(r=!1);else this.activeCamera&&!this.activeCamera.isReady(!0)&&(r=!1);for(let e of this.particleSystems)e.isReady()||(r=!1);if(this.proceduralTexturesEnabled)for(let e of this.proceduralTextures)e.isReady()||(r=!1);if(this.layers)for(let e of this.layers)e.isReady()||(r=!1);if(this.effectLayers)for(let e of this.effectLayers)e.isLayerReady()||(r=!1);for(let e of this._isReadyChecks)e.isReady()||(r=!1);return i.areAllEffectsReady()||(r=!1),i.currentRenderPassId=s,r}resetCachedMaterial(){this._cachedMaterial=null,this._cachedEffect=null,this._cachedVisibility=null}registerBeforeRender(e){this.onBeforeRenderObservable.add(e)}unregisterBeforeRender(e){this.onBeforeRenderObservable.removeCallback(e)}registerAfterRender(e){this.onAfterRenderObservable.add(e)}unregisterAfterRender(e){this.onAfterRenderObservable.removeCallback(e)}_executeOnceBeforeRender(e){let t=()=>{e(),setTimeout(()=>{this.unregisterBeforeRender(t)})};this.registerBeforeRender(t)}executeOnceBeforeRender(e,t){void 0!==t?setTimeout(()=>{this._executeOnceBeforeRender(e)},t):this._executeOnceBeforeRender(e)}addPendingData(e){this._pendingData.push(e)}removePendingData(e){let t=this.isLoading,i=this._pendingData.indexOf(e);-1!==i&&this._pendingData.splice(i,1),t&&!this.isLoading&&this.onDataLoadedObservable.notifyObservers(this)}getWaitingItemsCount(){return this._pendingData.length}get isLoading(){return this._pendingData.length>0}addIsReadyCheck(e){-1===this._isReadyChecks.indexOf(e)&&this._isReadyChecks.push(e)}removeIsReadyCheck(e){let t=this._isReadyChecks.indexOf(e);-1!==t&&this._isReadyChecks.splice(t,1)}executeWhenReady(e,t=!1){this.onReadyObservable.addOnce(e),null===this._executeWhenReadyTimeoutId&&this._checkIsReady(t)}async whenReadyAsync(e=!1){return await new Promise(t=>{this.executeWhenReady(()=>{t()},e)})}_clearReadynessChecksData(){this._timeoutChecksStartTime=0,this.onReadyTimeoutObservable.clear(),this.onReadyObservable.clear(),this._executeWhenReadyTimeoutId=null}_checkIsReady(e=!1){if(this._registerTransientComponents(),0===this._timeoutChecksStartTime)this._timeoutChecksStartTime=em.PrecisionDate.Now;else if(this.onReadyTimeoutDuration>0&&em.PrecisionDate.Now-this._timeoutChecksStartTime>this.onReadyTimeoutDuration){this.onReadyTimeoutObservable.notifyObservers(this),this._clearReadynessChecksData();return}if(this.isReady(e)){this.onReadyObservable.notifyObservers(this),this._clearReadynessChecksData();return}this._isDisposed?this._clearReadynessChecksData():this._executeWhenReadyTimeoutId=setTimeout(()=>{this.incrementRenderId(),this._checkIsReady(e)},100)}get animatables(){return this._activeAnimatables}resetLastAnimationTimeFrame(){this._animationTimeLast=em.PrecisionDate.Now}getViewMatrix(){return this._viewMatrix}getProjectionMatrix(){return this._projectionMatrix}getInverseProjectionMatrix(){return this._inverseProjectionMatrix}getTransformMatrix(){return this._transformMatrix}setTransformMatrix(e,t,i,s){this._multiviewSceneUboIsActive=!!(i&&s&&this._multiviewSceneUbo),(this._viewUpdateFlag!==e.updateFlag||this._projectionUpdateFlag!==t.updateFlag)&&(this._viewUpdateFlag=e.updateFlag,this._projectionUpdateFlag=t.updateFlag,this._viewMatrix=e,this._projectionMatrix=t,this._inverseProjectionMatrix||(this._inverseProjectionMatrix=new eM.Matrix),this._projectionMatrix.invertToRef(this._inverseProjectionMatrix),this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._frustumPlanes?e4.Frustum.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=e4.Frustum.GetPlanes(this._transformMatrix),this._multiviewSceneUboIsActive&&this._multiviewSceneUbo.useUbo?this._updateMultiviewUbo(i,s):this._sceneUbo.useUbo&&(this._sceneUbo.updateMatrix("viewProjection",this._transformMatrix),this._sceneUbo.updateMatrix("view",this._viewMatrix),this._sceneUbo.updateMatrix("projection",this._projectionMatrix),this._sceneUbo.updateMatrix("inverseProjection",this._inverseProjectionMatrix)))}getSceneUniformBuffer(){return this._multiviewSceneUboIsActive&&this._multiviewSceneUbo?this._multiviewSceneUbo:this._sceneUbo}createSceneUniformBuffer(e,t){let i="boolean"==typeof t?t:t?.trackUBOsInFrame,s=new eA.UniformBuffer(this._engine,void 0,!1,e??"scene",void 0,i);return s.addUniform("viewProjection",16),s.addUniform("view",16),s.addUniform("projection",16),s.addUniform("vEyePosition",4),s.addUniform("inverseProjection",16),s}setSceneUniformBuffer(e){this._sceneUbo=e,this._viewUpdateFlag=-1,this._projectionUpdateFlag=-1}get floatingOriginMode(){return void 0!==this._floatingOriginScene}get floatingOriginOffset(){return this.floatingOriginMode?this._eyePosition:eM.Vector3.ZeroReadOnly}getUniqueId(){return e7.UniqueId}addMesh(e,t=!1){if(!this._blockEntityCollection&&(this.meshes.push(e),e._resyncLightSources(),e.parent||e._addToSceneRootNodes(),ef.TimingTools.SetImmediate(()=>{this.onNewMeshAddedObservable.notifyObservers(e)}),t))for(let t of e.getChildMeshes())this.addMesh(t)}removeMesh(e,t=!1){let i=this.meshes.indexOf(e);if(-1!==i&&(this.meshes.splice(i,1),e.parent||e._removeFromSceneRootNodes()),this._inputManager._invalidateMesh(e),this.onMeshRemovedObservable.notifyObservers(e),t)for(let t of e.getChildMeshes())this.removeMesh(t);return i}addTransformNode(e){this._blockEntityCollection||(e.getScene()!==this||-1===e._indexInSceneTransformNodesArray)&&(e._indexInSceneTransformNodesArray=this.transformNodes.length,this.transformNodes.push(e),e.parent||e._addToSceneRootNodes(),this.onNewTransformNodeAddedObservable.notifyObservers(e))}removeTransformNode(e){let t=e._indexInSceneTransformNodesArray;if(-1!==t){if(t!==this.transformNodes.length-1){let e=this.transformNodes[this.transformNodes.length-1];this.transformNodes[t]=e,e._indexInSceneTransformNodesArray=t}e._indexInSceneTransformNodesArray=-1,this.transformNodes.pop(),e.parent||e._removeFromSceneRootNodes()}return this.onTransformNodeRemovedObservable.notifyObservers(e),t}removeSkeleton(e){let t=this.skeletons.indexOf(e);return -1!==t&&(this.skeletons.splice(t,1),this.onSkeletonRemovedObservable.notifyObservers(e),this._executeActiveContainerCleanup(this._activeSkeletons)),t}removeMorphTargetManager(e){let t=this.morphTargetManagers.indexOf(e);return -1!==t&&this.morphTargetManagers.splice(t,1),t}removeLight(e){let t=this.lights.indexOf(e);if(-1!==t){for(let t of this.meshes)t._removeLightSource(e,!1);this.lights.splice(t,1),this.sortLightsByPriority(),e.parent||e._removeFromSceneRootNodes(),this.onLightRemovedObservable.notifyObservers(e)}return t}removeCamera(e){let t=this.cameras.indexOf(e);if(-1!==t&&(this.cameras.splice(t,1),e.parent||e._removeFromSceneRootNodes()),this.activeCameras){let t=this.activeCameras.indexOf(e);-1!==t&&this.activeCameras.splice(t,1)}return this.activeCamera===e&&(this.cameras.length>0?this.activeCamera=this.cameras[0]:this.activeCamera=null),this.onCameraRemovedObservable.notifyObservers(e),t}removeParticleSystem(e){let t=this.particleSystems.indexOf(e);return -1!==t&&(this.particleSystems.splice(t,1),this._executeActiveContainerCleanup(this._activeParticleSystems)),this.onParticleSystemRemovedObservable.notifyObservers(e),t}removeAnimation(e){let t=this.animations.indexOf(e);return -1!==t&&this.animations.splice(t,1),t}stopAnimation(e,t,i){}removeAnimationGroup(e){let t=this.animationGroups.indexOf(e);return -1!==t&&this.animationGroups.splice(t,1),this.onAnimationGroupRemovedObservable.notifyObservers(e),t}removeMultiMaterial(e){let t=this.multiMaterials.indexOf(e);return -1!==t&&this.multiMaterials.splice(t,1),this.onMultiMaterialRemovedObservable.notifyObservers(e),t}removeMaterial(e){let t=e._indexInSceneMaterialArray;if(-1!==t&&t<this.materials.length){if(t!==this.materials.length-1){let e=this.materials[this.materials.length-1];this.materials[t]=e,e._indexInSceneMaterialArray=t}e._indexInSceneMaterialArray=-1,this.materials.pop()}return this.onMaterialRemovedObservable.notifyObservers(e),t}removeActionManager(e){let t=this.actionManagers.indexOf(e);return -1!==t&&this.actionManagers.splice(t,1),t}removeTexture(e){let t=this.textures.indexOf(e);return -1!==t&&this.textures.splice(t,1),this.onTextureRemovedObservable.notifyObservers(e),t}removeFrameGraph(e){let t=this.frameGraphs.indexOf(e);return -1!==t&&this.frameGraphs.splice(t,1),this.onFrameGraphRemovedObservable.notifyObservers(e),t}removeObjectRenderer(e){let t=this.objectRenderers.indexOf(e);return -1!==t&&this.objectRenderers.splice(t,1),this.onObjectRendererRemovedObservable.notifyObservers(e),t}removePostProcess(e){let t=this.postProcesses.indexOf(e);return -1!==t&&this.postProcesses.splice(t,1),this.onPostProcessRemovedObservable.notifyObservers(e),t}removeEffectLayer(e){let t=this.effectLayers.indexOf(e);return -1!==t&&this.effectLayers.splice(t,1),this.onEffectLayerRemovedObservable.notifyObservers(e),t}addLight(e){if(!this._blockEntityCollection){for(let t of(this.lights.push(e),this.sortLightsByPriority(),e.parent||e._addToSceneRootNodes(),this.meshes))-1===t.lightSources.indexOf(e)&&(t.lightSources.push(e),t._resyncLightSources());ef.TimingTools.SetImmediate(()=>{this.onNewLightAddedObservable.notifyObservers(e)})}}sortLightsByPriority(){this.requireLightSorting&&this.lights.sort(e9.LightConstants.CompareLightsPriority)}addCamera(e){!this._blockEntityCollection&&(this.cameras.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewCameraAddedObservable.notifyObservers(e)}),e.parent||e._addToSceneRootNodes())}addSkeleton(e){this._blockEntityCollection||(this.skeletons.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewSkeletonAddedObservable.notifyObservers(e)}))}addParticleSystem(e){this._blockEntityCollection||(this.particleSystems.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewParticleSystemAddedObservable.notifyObservers(e)}))}addAnimation(e){this._blockEntityCollection||this.animations.push(e)}addAnimationGroup(e){this._blockEntityCollection||(this.animationGroups.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewAnimationGroupAddedObservable.notifyObservers(e)}))}addMultiMaterial(e){this._blockEntityCollection||(this.multiMaterials.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewMultiMaterialAddedObservable.notifyObservers(e)}))}addMaterial(e){this._blockEntityCollection||(e.getScene()!==this||-1===e._indexInSceneMaterialArray)&&(e._indexInSceneMaterialArray=this.materials.length,this.materials.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewMaterialAddedObservable.notifyObservers(e)}))}addMorphTargetManager(e){this._blockEntityCollection||this.morphTargetManagers.push(e)}addGeometry(e){this._blockEntityCollection||(this._geometriesByUniqueId&&(this._geometriesByUniqueId[e.uniqueId]=this.geometries.length),this.geometries.push(e))}addActionManager(e){this.actionManagers.push(e)}addTexture(e){this._blockEntityCollection||(this.textures.push(e),this.onNewTextureAddedObservable.notifyObservers(e))}addFrameGraph(e){this.frameGraphs.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewFrameGraphAddedObservable.notifyObservers(e)})}addObjectRenderer(e){this.objectRenderers.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewObjectRendererAddedObservable.notifyObservers(e)})}addPostProcess(e){this._blockEntityCollection||(this.postProcesses.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewPostProcessAddedObservable.notifyObservers(e)}))}addEffectLayer(e){this._blockEntityCollection||(this.effectLayers.push(e),ef.TimingTools.SetImmediate(()=>{this.onNewEffectLayerAddedObservable.notifyObservers(e)}))}switchActiveCamera(e,t=!0){this._engine.getInputElement()&&(this.activeCamera&&this.activeCamera.detachControl(),this.activeCamera=e,t&&e.attachControl())}setActiveCameraById(e){let t=this.getCameraById(e);return t?(this.activeCamera=t,t):null}setActiveCameraByName(e){let t=this.getCameraByName(e);return t?(this.activeCamera=t,t):null}getAnimationGroupByName(e){for(let t=0;t<this.animationGroups.length;t++)if(this.animationGroups[t].name===e)return this.animationGroups[t];return null}_getMaterial(e,t){for(let e=0;e<this.materials.length;e++){let i=this.materials[e];if(t(i))return i}if(e)for(let e=0;e<this.multiMaterials.length;e++){let i=this.multiMaterials[e];if(t(i))return i}return null}getMaterialByUniqueID(e,t=!1){return this.getMaterialByUniqueId(e,t)}getMaterialByUniqueId(e,t=!1){return this._getMaterial(t,t=>t.uniqueId===e)}getMaterialById(e,t=!1){return this._getMaterial(t,t=>t.id===e)}getMaterialByName(e,t=!1){return this._getMaterial(t,t=>t.name===e)}getLastMaterialById(e,t=!1){for(let t=this.materials.length-1;t>=0;t--)if(this.materials[t].id===e)return this.materials[t];if(t){for(let t=this.multiMaterials.length-1;t>=0;t--)if(this.multiMaterials[t].id===e)return this.multiMaterials[t]}return null}getTextureByUniqueId(e){for(let t=0;t<this.textures.length;t++)if(this.textures[t].uniqueId===e)return this.textures[t];return null}getTextureByName(e){for(let t=0;t<this.textures.length;t++)if(this.textures[t].name===e)return this.textures[t];return null}getCameraById(e){for(let t=0;t<this.cameras.length;t++)if(this.cameras[t].id===e)return this.cameras[t];return null}getCameraByUniqueId(e){for(let t=0;t<this.cameras.length;t++)if(this.cameras[t].uniqueId===e)return this.cameras[t];return null}getCameraByName(e){for(let t=0;t<this.cameras.length;t++)if(this.cameras[t].name===e)return this.cameras[t];return null}getBoneById(e){for(let t=0;t<this.skeletons.length;t++){let i=this.skeletons[t];for(let t=0;t<i.bones.length;t++)if(i.bones[t].id===e)return i.bones[t]}return null}getBoneByName(e){for(let t=0;t<this.skeletons.length;t++){let i=this.skeletons[t];for(let t=0;t<i.bones.length;t++)if(i.bones[t].name===e)return i.bones[t]}return null}getLightByName(e){for(let t=0;t<this.lights.length;t++)if(this.lights[t].name===e)return this.lights[t];return null}getLightById(e){for(let t=0;t<this.lights.length;t++)if(this.lights[t].id===e)return this.lights[t];return null}getLightByUniqueId(e){for(let t=0;t<this.lights.length;t++)if(this.lights[t].uniqueId===e)return this.lights[t];return null}getParticleSystemById(e){for(let t=0;t<this.particleSystems.length;t++)if(this.particleSystems[t].id===e)return this.particleSystems[t];return null}getGeometryById(e){for(let t=0;t<this.geometries.length;t++)if(this.geometries[t].id===e)return this.geometries[t];return null}_getGeometryByUniqueId(e){if(this._geometriesByUniqueId){let t=this._geometriesByUniqueId[e];if(void 0!==t)return this.geometries[t]}else for(let t=0;t<this.geometries.length;t++)if(this.geometries[t].uniqueId===e)return this.geometries[t];return null}getFrameGraphByName(e){for(let t=0;t<this.frameGraphs.length;t++)if(this.frameGraphs[t].name===e)return this.frameGraphs[t];return null}pushGeometry(e,t){return!(!t&&this._getGeometryByUniqueId(e.uniqueId))&&(this.addGeometry(e),ef.TimingTools.SetImmediate(()=>{this.onNewGeometryAddedObservable.notifyObservers(e)}),!0)}removeGeometry(e){let t;if(this._geometriesByUniqueId){if(void 0===(t=this._geometriesByUniqueId[e.uniqueId]))return!1}else if((t=this.geometries.indexOf(e))<0)return!1;if(t!==this.geometries.length-1){let e=this.geometries[this.geometries.length-1];e&&(this.geometries[t]=e,this._geometriesByUniqueId&&(this._geometriesByUniqueId[e.uniqueId]=t))}return this._geometriesByUniqueId&&(this._geometriesByUniqueId[e.uniqueId]=void 0),this.geometries.pop(),this.onGeometryRemovedObservable.notifyObservers(e),!0}getGeometries(){return this.geometries}getMeshById(e){for(let t=0;t<this.meshes.length;t++)if(this.meshes[t].id===e)return this.meshes[t];return null}getMeshesById(e){return this.meshes.filter(function(t){return t.id===e})}getTransformNodeById(e){for(let t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].id===e)return this.transformNodes[t];return null}getTransformNodeByUniqueId(e){for(let t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].uniqueId===e)return this.transformNodes[t];return null}getTransformNodesById(e){return this.transformNodes.filter(function(t){return t.id===e})}getMeshByUniqueId(e){for(let t=0;t<this.meshes.length;t++)if(this.meshes[t].uniqueId===e)return this.meshes[t];return null}getLastMeshById(e){for(let t=this.meshes.length-1;t>=0;t--)if(this.meshes[t].id===e)return this.meshes[t];return null}getLastTransformNodeById(e){for(let t=this.transformNodes.length-1;t>=0;t--)if(this.transformNodes[t].id===e)return this.transformNodes[t];return null}getLastEntryById(e){let t;for(t=this.meshes.length-1;t>=0;t--)if(this.meshes[t].id===e)return this.meshes[t];for(t=this.transformNodes.length-1;t>=0;t--)if(this.transformNodes[t].id===e)return this.transformNodes[t];for(t=this.cameras.length-1;t>=0;t--)if(this.cameras[t].id===e)return this.cameras[t];for(t=this.lights.length-1;t>=0;t--)if(this.lights[t].id===e)return this.lights[t];for(t=this.skeletons.length-1;t>=0;t--){let i=this.skeletons[t];for(let t=i.bones.length-1;t>=0;t--)if(i.bones[t].id===e)return i.bones[t]}return null}getNodeById(e){let t=this.getMeshById(e);if(t)return t;let i=this.getTransformNodeById(e);if(i)return i;let s=this.getLightById(e);if(s)return s;let r=this.getCameraById(e);if(r)return r;let n=this.getBoneById(e);return n||null}getNodeByName(e){let t=this.getMeshByName(e);if(t)return t;let i=this.getTransformNodeByName(e);if(i)return i;let s=this.getLightByName(e);if(s)return s;let r=this.getCameraByName(e);if(r)return r;let n=this.getBoneByName(e);return n||null}getMeshByName(e){for(let t=0;t<this.meshes.length;t++)if(this.meshes[t].name===e)return this.meshes[t];return null}getTransformNodeByName(e){for(let t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].name===e)return this.transformNodes[t];return null}getLastSkeletonById(e){for(let t=this.skeletons.length-1;t>=0;t--)if(this.skeletons[t].id===e)return this.skeletons[t];return null}getSkeletonByUniqueId(e){for(let t=0;t<this.skeletons.length;t++)if(this.skeletons[t].uniqueId===e)return this.skeletons[t];return null}getSkeletonById(e){for(let t=0;t<this.skeletons.length;t++)if(this.skeletons[t].id===e)return this.skeletons[t];return null}getSkeletonByName(e){for(let t=0;t<this.skeletons.length;t++)if(this.skeletons[t].name===e)return this.skeletons[t];return null}getMorphTargetManagerById(e){for(let t=0;t<this.morphTargetManagers.length;t++)if(this.morphTargetManagers[t].uniqueId===e)return this.morphTargetManagers[t];return null}getMorphTargetById(e){for(let t=0;t<this.morphTargetManagers.length;++t){let i=this.morphTargetManagers[t];for(let t=0;t<i.numTargets;++t){let s=i.getTarget(t);if(s.id===e)return s}}return null}getMorphTargetByName(e){for(let t=0;t<this.morphTargetManagers.length;++t){let i=this.morphTargetManagers[t];for(let t=0;t<i.numTargets;++t){let s=i.getTarget(t);if(s.name===e)return s}}return null}getPostProcessByName(e){for(let t=0;t<this.postProcesses.length;++t){let i=this.postProcesses[t];if(i.name===e)return i}return null}isActiveMesh(e){return -1!==this._activeMeshes.indexOf(e)}get uid(){return this._uid||(this._uid=ev.Tools.RandomId()),this._uid}addExternalData(e,t){return this._externalData||(this._externalData=new eP),this._externalData.add(e,t)}getExternalData(e){return this._externalData?this._externalData.get(e):null}getOrAddExternalDataWithFactory(e,t){return this._externalData||(this._externalData=new eP),this._externalData.getOrAddWithFactory(e,t)}removeExternalData(e){return this._externalData.remove(e)}_evaluateSubMesh(e,t,i,s){if(s||e.isInFrustum(this._frustumPlanes)){for(let i of this._evaluateSubMeshStage)i.action(t,e);let i=e.getMaterial();null!=i&&(i.hasRenderTargetTextures&&null!=i.getRenderTargetTextures&&-1===this._processedMaterials.indexOf(i)&&(this._processedMaterials.push(i),this._materialsRenderTargets.concatWithNoDuplicate(i.getRenderTargetTextures())),this._renderingManager.dispatch(e,t,i))}}freeProcessedMaterials(){this._processedMaterials.dispose()}get blockfreeActiveMeshesAndRenderingGroups(){return this._preventFreeActiveMeshesAndRenderingGroups}set blockfreeActiveMeshesAndRenderingGroups(e){this._preventFreeActiveMeshesAndRenderingGroups!==e&&(e&&(this.freeActiveMeshes(),this.freeRenderingGroups()),this._preventFreeActiveMeshesAndRenderingGroups=e)}freeActiveMeshes(){if(!this.blockfreeActiveMeshesAndRenderingGroups&&(this._activeMeshes.dispose(),this.activeCamera&&this.activeCamera._activeMeshes&&this.activeCamera._activeMeshes.dispose(),this.activeCameras))for(let e=0;e<this.activeCameras.length;e++){let t=this.activeCameras[e];t&&t._activeMeshes&&t._activeMeshes.dispose()}}freeRenderingGroups(){if(!this.blockfreeActiveMeshesAndRenderingGroups&&(this._renderingManager&&this._renderingManager.freeRenderingGroups(),this.textures))for(let e=0;e<this.textures.length;e++){let t=this.textures[e];t&&t.renderList&&t.freeRenderingGroups()}}_isInIntermediateRendering(){return this._intermediateRendering}freezeActiveMeshes(e=!1,t,i,s=!0,r=!1){if(this.frameGraph){this._renderWithFrameGraph(!0,!1,!0);let n=this.frameGraph.getTasksByClassName(["FrameGraphObjectRendererTask","FrameGraphGeometryRendererTask"]);for(let e of n)e.objectRenderer._freezeActiveMeshes(s);return this._freezeActiveMeshesCancel=(0,ef._RetryWithInterval)(()=>{let e=!0,t=!0;for(let i of n)e&&(e=i.objectRenderer._isFrozen),t&&(t=null!==i.objectRenderer._freezeActiveMeshesCancel);if(e)return!0;if(!t)throw Error("Freezing active meshes was cancelled");return!1},()=>{this._freezeActiveMeshesCancel=null,this._activeMeshesFrozen=!0,this._activeMeshesFrozenButKeepClipping=r,this._skipEvaluateActiveMeshesCompletely=e,t?.()},(e,t)=>{if(this._freezeActiveMeshesCancel=null,this.unfreezeActiveMeshes(),t){let t="Scene: Timeout while waiting for meshes to be frozen.";i?i(t):(ti.Logger.Error(t),e&&ti.Logger.Error(e))}else{let t="Scene: An unexpected error occurred while trying to freeze active meshes.";i?i(t):(ti.Logger.Error(t),e&&(ti.Logger.Error(e),e.stack&&ti.Logger.Error(e.stack)))}}),this}return this.executeWhenReady(()=>{if(!this.activeCamera){i&&i("No active camera found");return}if(this._frustumPlanes||this.updateTransformMatrix(),this._evaluateActiveMeshes(),this._activeMeshesFrozen=!0,this._activeMeshesFrozenButKeepClipping=r,this._skipEvaluateActiveMeshesCompletely=e,s)for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._freeze();t&&t()}),this}unfreezeActiveMeshes(){for(let e=0;e<this.meshes.length;e++){let t=this.meshes[e];t._internalAbstractMeshDataInfo&&(t._internalAbstractMeshDataInfo._isActive=!1)}if(this._freezeActiveMeshesCancel?.(),this._freezeActiveMeshesCancel=null,this.frameGraph)for(let e of this.frameGraph.getTasksByClassName(["FrameGraphObjectRendererTask","FrameGraphGeometryRendererTask"]))e.objectRenderer._unfreezeActiveMeshes();else for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._unFreeze();return this._activeMeshesFrozen=!1,this}_executeActiveContainerCleanup(e){(!this._engine.snapshotRendering||1!==this._engine.snapshotRenderingMode)&&this._activeMeshesFrozen&&this._activeMeshes.length||this.onBeforeRenderObservable.addOnce(()=>e.dispose())}_evaluateActiveMeshes(){if(this._engine.snapshotRendering&&1===this._engine.snapshotRenderingMode){this._activeMeshes.length>0&&(this.activeCamera?._activeMeshes.reset(),this._activeMeshes.reset(),this._renderingManager.reset(),this._processedMaterials.reset(),this._activeParticleSystems.reset(),this._activeSkeletons.reset(),this._softwareSkinnedMeshes.reset());return}if(this._activeMeshesFrozen&&this._activeMeshes.length){if(!this._skipEvaluateActiveMeshesCompletely){let e=this._activeMeshes.length;for(let t=0;t<e;t++)this._activeMeshes.data[t].computeWorldMatrix()}if(this._activeParticleSystems){let e=this._activeParticleSystems.length;for(let t=0;t<e;t++)this._activeParticleSystems.data[t].animate()}this._renderingManager.resetSprites();return}if(!this.activeCamera)return;for(let e of(this.onBeforeActiveMeshesEvaluationObservable.notifyObservers(this),this.activeCamera._activeMeshes.reset(),this._activeMeshes.reset(),this._renderingManager.reset(),this._processedMaterials.reset(),this._activeParticleSystems.reset(),this._activeSkeletons.reset(),this._softwareSkinnedMeshes.reset(),this._materialsRenderTargets.reset(),this._beforeEvaluateActiveMeshStage))e.action();let e=this.getActiveMeshCandidates(),t=e.length;for(let i=0;i<t;i++){let t=e.data[i],s=t._internalAbstractMeshDataInfo._currentLOD.get(this.activeCamera);if(s?s[1]=-1:(s=[t,-1],t._internalAbstractMeshDataInfo._currentLOD.set(this.activeCamera,s)),t.isBlocked||(this._totalVertices.addCount(t.getTotalVertices(),!1),!t.isReady()||!t.isEnabled()||t.scaling.hasAZeroComponent))continue;t.computeWorldMatrix(),t.actionManager&&t.actionManager.hasSpecificTriggers2(12,13)&&this._meshesForIntersections.pushNoDuplicate(t);let r=this.customLODSelector?this.customLODSelector(t,this.activeCamera):t.getLOD(this.activeCamera);if(s[0]=r,s[1]=this._frameId,null!=r&&(r!==t&&0!==r.billboardMode&&r.computeWorldMatrix(),t._preActivate(),t.isVisible&&t.visibility>0&&(t.layerMask&this.activeCamera.layerMask)!=0&&(this._skipFrustumClipping||t.alwaysSelectAsActiveMesh||t.isInFrustum(this._frustumPlanes)))){for(let e of(this._activeMeshes.push(t),this.activeCamera._activeMeshes.push(t),r!==t&&r._activate(this._renderId,!1),this._preActiveMeshStage))e.action(t);t._activate(this._renderId,!1)&&(t.isAnInstance?t._internalAbstractMeshDataInfo._actAsRegularMesh&&(r=t):r._internalAbstractMeshDataInfo._onlyForInstances=!1,r._internalAbstractMeshDataInfo._isActive=!0,this._activeMesh(t,r)),t._postActivate()}}if(this.onAfterActiveMeshesEvaluationObservable.notifyObservers(this),this.particlesEnabled){this.onBeforeParticlesRenderingObservable.notifyObservers(this);for(let e=0;e<this.particleSystems.length;e++){let t=this.particleSystems[e];if(!t.isStarted()||!t.emitter)continue;let i=t.emitter;(!i.position||i.isEnabled())&&(this._activeParticleSystems.push(t),t.animate(),this._renderingManager.dispatchParticles(t))}this.onAfterParticlesRenderingObservable.notifyObservers(this)}}_prepareSkeleton(e){this._skeletonsEnabled&&e.skeleton&&(this._activeSkeletons.pushNoDuplicate(e.skeleton)&&(e.skeleton.prepare(),this._activeBones.addCount(e.skeleton.bones.length,!1)),!e.computeBonesUsingShaders&&this._softwareSkinnedMeshes.pushNoDuplicate(e)&&this.frameGraph&&e.applySkeleton(e.skeleton))}_activeMesh(e,t){this._prepareSkeleton(t);let i=e.hasInstances||e.isAnInstance||this.dispatchAllSubMeshesOfActiveMeshes||this._skipFrustumClipping||t.alwaysSelectAsActiveMesh;if(t&&t.subMeshes&&t.subMeshes.length>0){let s=this.getActiveSubMeshCandidates(t),r=s.length;i=i||1===r;for(let n=0;n<r;n++){let r=s.data[n];this._evaluateSubMesh(r,t,e,i)}}}updateTransformMatrix(e){let t=this.activeCamera;if(t)if(t._renderingMultiview){let i=t._rigCameras[0],s=t._rigCameras[1];this.setTransformMatrix(i.getViewMatrix(),i.getProjectionMatrix(e),s.getViewMatrix(),s.getProjectionMatrix(e))}else this.setTransformMatrix(t.getViewMatrix(),t.getProjectionMatrix(e))}_bindFrameBuffer(e,t=!0){!this._useCurrentFrameBuffer&&(e&&e._multiviewTexture?e._multiviewTexture._bindFrameBuffer():e&&e.outputRenderTarget?e.outputRenderTarget._bindFrameBuffer():this._engine._currentFrameBufferIsDefaultFrameBuffer()||this._engine.restoreDefaultFramebuffer()),t&&this._clearFrameBuffer(e)}_clearFrameBuffer(e){if(e&&e._multiviewTexture);else if(e&&e.outputRenderTarget&&!e._renderingMultiview){let t=e.outputRenderTarget;t.onClearObservable.hasObservers()?t.onClearObservable.notifyObservers(this._engine):t.skipInitialClear||e.isRightCamera||(this.autoClear&&this._engine.clear(t.clearColor||this._clearColor,!t._cleared,!0,!0),t._cleared=!0)}else this._defaultFrameBufferCleared?this._engine.clear(null,!1,!0,!0):(this._defaultFrameBufferCleared=!0,this._clear())}_renderForCamera(e,t,i=!0){if(e&&e._skipRendering)return;let s=this._engine;if(this._activeCamera=e,!this.activeCamera)throw Error("Active camera not set");if(s.setViewport(this.activeCamera.viewport),this.resetCachedMaterial(),this._renderId++,!this.prePass&&i){let t=!0;e._renderingMultiview&&e.outputRenderTarget&&(t=e.outputRenderTarget.skipInitialClear,this.autoClear&&(this._defaultFrameBufferCleared=!1,e.outputRenderTarget.skipInitialClear=!1)),this._bindFrameBuffer(this._activeCamera),e._renderingMultiview&&e.outputRenderTarget&&(e.outputRenderTarget.skipInitialClear=t)}this.updateTransformMatrix(),this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera),this._engine.currentRenderPassId=e.outputRenderTarget?.renderPassId??e.renderPassId??0,this._evaluateActiveMeshes();for(let e=0;e<this._softwareSkinnedMeshes.length;e++){let t=this._softwareSkinnedMeshes.data[e];t.applySkeleton(t.skeleton)}for(let i of(this.onBeforeRenderTargetsRenderObservable.notifyObservers(this),this._renderTargets.concatWithNoDuplicate(this._materialsRenderTargets),e.customRenderTargets&&e.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(e.customRenderTargets),t&&t.customRenderTargets&&t.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(t.customRenderTargets),this.environmentTexture&&this.environmentTexture.isRenderTarget&&this._renderTargets.pushNoDuplicate(this.environmentTexture),this._gatherActiveCameraRenderTargetsStage))i.action(this._renderTargets);let r=!1;if(this.renderTargetsEnabled){let e;if(this._intermediateRendering=!0,this._renderTargets.length>0){ev.Tools.StartPerformanceCounter("Render targets",this._renderTargets.length>0);let t=this.getBoundingBoxRenderer?.();for(let i=0;i<this._renderTargets.length;i++){let s=this._renderTargets.data[i];if(s._shouldRender()){this._renderId++;let i=s.activeCamera&&s.activeCamera!==this.activeCamera;t&&!e&&((e=t.renderList.length>0?t.renderList.data.slice():[]).length=t.renderList.length),s.render(i,this.dumpNextRenderTargets),r=!0}}t&&e&&(t.renderList.data=e,t.renderList.length=e.length),ev.Tools.EndPerformanceCounter("Render targets",this._renderTargets.length>0),this._renderId++}if(this._cameraDrawRenderTargetStage.length>0){let t=this.getBoundingBoxRenderer?.();for(let i of(t&&!e&&((e=t.renderList.length>0?t.renderList.data.slice():[]).length=t.renderList.length),this._cameraDrawRenderTargetStage))r=i.action(this.activeCamera)||r;t&&e&&(t.renderList.data=e,t.renderList.length=e.length)}this._intermediateRendering=!1}for(let t of(r&&!this.prePass&&(this._bindFrameBuffer(this._activeCamera,!1),this.updateTransformMatrix()),this.onAfterRenderTargetsRenderObservable.notifyObservers(this),!this.postProcessManager||e._multiviewTexture||this.prePass||this.postProcessManager._prepareFrame(),this._beforeCameraDrawStage))t.action(this.activeCamera);this.onBeforeDrawPhaseObservable.notifyObservers(this);let n=s.snapshotRendering&&1===s.snapshotRenderingMode;for(let e of(n&&this.finalizeSceneUbo(),this._renderingManager.render(null,null,!0,!n),this.onAfterDrawPhaseObservable.notifyObservers(this),this._afterCameraDrawStage))e.action(this.activeCamera);if(this.postProcessManager&&!e._multiviewTexture){let t=e.outputRenderTarget?e.outputRenderTarget.renderTarget:void 0;this.postProcessManager._finalizeFrame(e.isIntermediate,t)}for(let e of this._afterCameraPostProcessStage)e.action(this.activeCamera);this._renderTargets.reset(),this.onAfterCameraRenderObservable.notifyObservers(this.activeCamera)}_processSubCameras(e,t=!0){if(0===e.cameraRigMode||e._renderingMultiview){e._renderingMultiview&&!this._multiviewSceneUbo&&this._createMultiviewUbo(),this._renderForCamera(e,void 0,t),this.onAfterRenderCameraObservable.notifyObservers(e);return}if(e._useMultiviewToSingleView)this._renderMultiviewToSingleView(e);else{this.onBeforeCameraRenderObservable.notifyObservers(e);for(let t=0;t<e._rigCameras.length;t++)this._renderForCamera(e._rigCameras[t],e)}this._activeCamera=e,this.updateTransformMatrix(),this.onAfterRenderCameraObservable.notifyObservers(e)}_checkIntersections(){for(let e=0;e<this._meshesForIntersections.length;e++){let t=this._meshesForIntersections.data[e];if(t.actionManager)for(let e=0;t.actionManager&&e<t.actionManager.actions.length;e++){let i=t.actionManager.actions[e];if(12===i.trigger||13===i.trigger){let e=i.getTriggerParameter(),s=e.mesh?e.mesh:e,r=s.intersectsMesh(t,e.usePreciseIntersection),n=t._intersectionsInProgress.indexOf(s);r&&-1===n?12===i.trigger?(i._executeCurrent(ex.CreateNew(t,void 0,s)),t._intersectionsInProgress.push(s)):13===i.trigger&&t._intersectionsInProgress.push(s):!r&&n>-1&&(13===i.trigger&&i._executeCurrent(ex.CreateNew(t,void 0,s)),t.actionManager.hasSpecificTrigger(13,e=>s===(e.mesh?e.mesh:e))&&13!==i.trigger||t._intersectionsInProgress.splice(n,1))}}}}_advancePhysicsEngineStep(e){}_animate(e){}animate(){if(this._engine.isDeterministicLockStep()){let e=Math.max(ta.MinDeltaTime,Math.min(this._engine.getDeltaTime(),ta.MaxDeltaTime))+this._timeAccumulator,t=this._engine.getTimeStep(),i=1e3/t/1e3,s=0,r=this._engine.getLockstepMaxSteps(),n=Math.floor(e/t);for(n=Math.min(n,r);e>0&&s<n;)this.onBeforeStepObservable.notifyObservers(this),this._animationRatio=t*i,this._animate(t),this.onAfterAnimationsObservable.notifyObservers(this),this.physicsEnabled&&this._advancePhysicsEngineStep(t),this.onAfterStepObservable.notifyObservers(this),this._currentStepId++,s++,e-=t;this._timeAccumulator=e<0?0:e}else{let e=this.useConstantAnimationDeltaTime?16:Math.max(ta.MinDeltaTime,Math.min(this._engine.getDeltaTime(),ta.MaxDeltaTime));this._animationRatio=.06*e,this._animate(),this.onAfterAnimationsObservable.notifyObservers(this),this.physicsEnabled&&this._advancePhysicsEngineStep(e)}}_clear(){(this.autoClearDepthAndStencil||this.autoClear)&&this._engine.clear(this._clearColor,this.autoClear||this.forceWireframe||this.forcePointsCloud,this.autoClearDepthAndStencil,this.autoClearDepthAndStencil)}_checkCameraRenderTarget(e){if(e?.outputRenderTarget&&!e?.isRigCamera&&(e.outputRenderTarget._cleared=!1),e?.rigCameras?.length)for(let t=0;t<e.rigCameras.length;++t){let i=e.rigCameras[t].outputRenderTarget;i&&(i._cleared=!1)}}resetDrawCache(e){if(this.meshes)for(let t of this.meshes)t.resetDrawCache(e)}_renderWithFrameGraph(e=!0,t=!1,i=!1){if(this.activeCamera=null,this.activeCameras=null,e){for(let e of this.cameras)if(e.update(),0!==e.cameraRigMode)for(let t=0;t<e._rigCameras.length;t++)e._rigCameras[t].update()}this.onBeforeRenderObservable.notifyObservers(this),this.onBeforeRenderTargetsRenderObservable.notifyObservers(this),this._renderTargets.reset();let s=this._frameGraph?.findMainCamera()??null;if(this.renderTargetsEnabled){this.environmentTexture&&this.environmentTexture.isRenderTarget&&this._renderTargets.pushNoDuplicate(this.environmentTexture),this._renderTargets.concatWithNoDuplicate(this.customRenderTargets),ev.Tools.StartPerformanceCounter("Custom render targets",this._renderTargets.length>0);for(let e=0;e<this._renderTargets.length;e++){let t=this._renderTargets.data[e],i=t.activeCamera||s;this._renderRenderTarget(t,i,!0,this.dumpNextRenderTargets)}ev.Tools.EndPerformanceCounter("Custom render targets",this._renderTargets.length>0),this._renderId++}for(let e of(this.onAfterRenderTargetsRenderObservable.notifyObservers(this),this._beforeClearStage))e.action();if(this._engine.snapshotRendering&&1===this._engine.snapshotRenderingMode)this._activeParticleSystems.reset(),this._activeSkeletons.reset(),this._softwareSkinnedMeshes.reset();else{let e=this.getActiveMeshCandidates(),t=e.length;if(this._activeMeshesFrozen){if(!this._skipEvaluateActiveMeshesCompletely)for(let i=0;i<t;i++){let t=e.data[i];t._internalAbstractMeshDataInfo._wasActiveLastFrame&&t.computeWorldMatrix()}if(this.particlesEnabled){let e=this._activeParticleSystems.length;for(let t=0;t<e;t++)this._activeParticleSystems.data[t].animate()}}else{this._activeParticleSystems.reset(),this._activeSkeletons.reset(),this._softwareSkinnedMeshes.reset();for(let s=0;s<t;s++){let t=e.data[s];t._internalAbstractMeshDataInfo._wasActiveLastFrame=!1,!t.isBlocked&&(this._totalVertices.addCount(t.getTotalVertices(),!1),t.isReady()&&t.isEnabled()&&!t.scaling.hasAZeroComponent&&(t.computeWorldMatrix(i),t.actionManager&&t.actionManager.hasSpecificTriggers2(12,13)&&this._meshesForIntersections.pushNoDuplicate(t)))}if(this.particlesEnabled)for(let e=0;e<this.particleSystems.length;e++){let t=this.particleSystems[e];if(!t.isStarted()||!t.emitter)continue;let i=t.emitter;(!i.position||i.isEnabled())&&(this._activeParticleSystems.push(t),t.animate())}}}this.frameGraph?.execute()}_renderRenderTarget(e,t,i=!1,s=!1){if(this._intermediateRendering=!0,e._shouldRender()){if(this._renderId++,this.activeCamera=t,!this.activeCamera)throw Error("Active camera not set");this._engine.setViewport(this.activeCamera.viewport),this.updateTransformMatrix(),e.render(i,s)}this._intermediateRendering=!1}render(e=!0,t=!1){if(!this.isDisposed){if(this.onReadyObservable.hasObservers()&&null===this._executeWhenReadyTimeoutId&&this._checkIsReady(),eF.FloatingOriginCurrentScene.getScene=this._getFloatingOriginScene,this._frameId++,this._defaultFrameBufferCleared=!1,this._checkCameraRenderTarget(this.activeCamera),this.activeCameras?.length)for(let e of this.activeCameras)this._checkCameraRenderTarget(e);for(let e of(this._registerTransientComponents(),this._activeParticles.fetchNewFrame(),this._totalVertices.fetchNewFrame(),this._activeIndices.fetchNewFrame(),this._activeBones.fetchNewFrame(),this._meshesForIntersections.reset(),this.resetCachedMaterial(),this.onBeforeAnimationsObservable.notifyObservers(this),this.actionManager&&this.actionManager.processTrigger(11),t||this.animate(),this._beforeCameraUpdateStage))e.action();if(e){if(this.activeCameras&&this.activeCameras.length>0)for(let e=0;e<this.activeCameras.length;e++){let t=this.activeCameras[e];if(t.update(),0!==t.cameraRigMode)for(let e=0;e<t._rigCameras.length;e++)t._rigCameras[e].update()}else if(this.activeCamera&&(this.activeCamera.update(),0!==this.activeCamera.cameraRigMode))for(let e=0;e<this.activeCamera._rigCameras.length;e++)this.activeCamera._rigCameras[e].update()}if(this.customRenderFunction)this._renderId++,this._engine.currentRenderPassId=0,this.customRenderFunction(e,t);else{this.onBeforeRenderObservable.notifyObservers(this),this.onBeforeRenderTargetsRenderObservable.notifyObservers(this);let e=this.activeCameras?.length?this.activeCameras[0]:this.activeCamera;if(this.renderTargetsEnabled){ev.Tools.StartPerformanceCounter("Custom render targets",this.customRenderTargets.length>0);for(let t=0;t<this.customRenderTargets.length;t++){let i=this.customRenderTargets[t],s=i.activeCamera||this.activeCamera;this._renderRenderTarget(i,s,e!==s,this.dumpNextRenderTargets)}ev.Tools.EndPerformanceCounter("Custom render targets",this.customRenderTargets.length>0),this._renderId++}for(let t of(this._engine.currentRenderPassId=e?.renderPassId??0,this.activeCamera=e,this._activeCamera&&22!==this._activeCamera.cameraRigMode&&!this.prePass&&this._bindFrameBuffer(this._activeCamera,!1),this.onAfterRenderTargetsRenderObservable.notifyObservers(this),this._beforeClearStage))t.action();for(let e of(this._clearFrameBuffer(this.activeCamera),this._gatherRenderTargetsStage))e.action(this._renderTargets);if(this.activeCameras&&this.activeCameras.length>0)for(let e=0;e<this.activeCameras.length;e++)this._processSubCameras(this.activeCameras[e],e>0);else{if(!this.activeCamera)throw Error("No camera defined");this._processSubCameras(this.activeCamera,!!this.activeCamera.outputRenderTarget)}}for(let e of(this._checkIntersections(),this._afterRenderStage))e.action();if(this.afterRender&&this.afterRender(),this.onAfterRenderObservable.notifyObservers(this),this._toBeDisposed.length){for(let e=0;e<this._toBeDisposed.length;e++){let t=this._toBeDisposed[e];t&&t.dispose()}this._toBeDisposed.length=0}this.dumpNextRenderTargets&&(this.dumpNextRenderTargets=!1),this._activeBones.addCount(0,!0),this._activeIndices.addCount(0,!0),this._activeParticles.addCount(0,!0),this._engine.restoreDefaultFramebuffer()}}freezeMaterials(){for(let e=0;e<this.materials.length;e++)this.materials[e].freeze()}unfreezeMaterials(){for(let e=0;e<this.materials.length;e++)this.materials[e].unfreeze()}dispose(){if(this.isDisposed)return;if(this.beforeRender=null,this.afterRender=null,this.metadata=null,this.skeletons.length=0,this.morphTargetManagers.length=0,this._transientComponents.length=0,this._isReadyForMeshStage.clear(),this._beforeEvaluateActiveMeshStage.clear(),this._evaluateSubMeshStage.clear(),this._preActiveMeshStage.clear(),this._cameraDrawRenderTargetStage.clear(),this._beforeCameraDrawStage.clear(),this._beforeRenderTargetDrawStage.clear(),this._beforeRenderingGroupDrawStage.clear(),this._beforeRenderingMeshStage.clear(),this._afterRenderingMeshStage.clear(),this._afterRenderingGroupDrawStage.clear(),this._afterCameraDrawStage.clear(),this._afterRenderTargetDrawStage.clear(),this._afterRenderStage.clear(),this._beforeCameraUpdateStage.clear(),this._beforeClearStage.clear(),this._gatherRenderTargetsStage.clear(),this._gatherActiveCameraRenderTargetsStage.clear(),this._pointerMoveStage.clear(),this._pointerDownStage.clear(),this._pointerUpStage.clear(),this._isReadyChecks.length=0,this.importedMeshesFiles=[],this._activeAnimatables&&(0,ez._IsSideEffectImplemented)(this.stopAllAnimations)){for(let e of this._activeAnimatables)e.onAnimationEndObservable.clear(),e.onAnimationEnd=null;this.stopAllAnimations()}for(let e of(this.resetCachedMaterial(),this.activeCamera&&(this.activeCamera._activeMeshes.dispose(),this.activeCamera=null),this.activeCameras=null,this._activeMeshes.dispose(),this._renderingManager.dispose(),this._processedMaterials.dispose(),this._activeParticleSystems.dispose(),this._activeSkeletons.dispose(),this._softwareSkinnedMeshes.dispose(),this._renderTargets.dispose(),this._materialsRenderTargets.dispose(),this._registeredForLateAnimationBindings.dispose(),this._meshesForIntersections.dispose(),this._toBeDisposed.length=0,this._activeRequests.slice()))e.abort();this._activeRequests.length=0;try{this.onDisposeObservable.notifyObservers(this)}catch(e){ti.Logger.Error("An error occurred while calling onDisposeObservable!",e)}if(this.detachControl(),this._engine.getInputElement?.())for(let e=0;e<this.cameras.length;e++)this.cameras[e].detachControl();this._disposeList(this.animationGroups),this._disposeList(this.lights),this._defaultMaterial&&this._defaultMaterial.dispose(),this._disposeList(this.multiMaterials),this._disposeList(this.materials),this._disposeList(this.meshes,e=>e.dispose(!0)),this._disposeList(this.transformNodes,e=>e.dispose(!0));let e=this.cameras;this._disposeList(e),this._disposeList(this.particleSystems),this._disposeList(this.postProcesses),this._disposeList(this.textures),this._disposeList(this.morphTargetManagers),this._disposeList(this.frameGraphs),this._sceneUbo.dispose(),this._multiviewSceneUbo&&this._multiviewSceneUbo.dispose(),this.postProcessManager.dispose(),this._disposeList(this._components);let t=this._engine.scenes.indexOf(this);if(t>-1&&this._engine.scenes.splice(t,1),this._floatingOriginScene=void 0,0===this._engine.scenes.length&&(0,eF.ResetMatrixFunctions)(),eq.EngineStore._LastCreatedScene===this){eq.EngineStore._LastCreatedScene=null;let e=eq.EngineStore.Instances.length-1;for(;e>=0;){let t=eq.EngineStore.Instances[e];if(t.scenes.length>0){eq.EngineStore._LastCreatedScene=t.scenes[this._engine.scenes.length-1];break}e--}}(t=this._engine._virtualScenes.indexOf(this))>-1&&this._engine._virtualScenes.splice(t,1),this._engine.wipeCaches(!0),this.onDisposeObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderTargetsRenderObservable.clear(),this.onAfterRenderTargetsRenderObservable.clear(),this.onAfterStepObservable.clear(),this.onBeforeStepObservable.clear(),this.onBeforeActiveMeshesEvaluationObservable.clear(),this.onAfterActiveMeshesEvaluationObservable.clear(),this.onBeforeParticlesRenderingObservable.clear(),this.onAfterParticlesRenderingObservable.clear(),this.onBeforeDrawPhaseObservable.clear(),this.onAfterDrawPhaseObservable.clear(),this.onBeforeAnimationsObservable.clear(),this.onAfterAnimationsObservable.clear(),this.onDataLoadedObservable.clear(),this.onBeforeRenderingGroupObservable.clear(),this.onAfterRenderingGroupObservable.clear(),this.onMeshImportedObservable.clear(),this.onBeforeCameraRenderObservable.clear(),this.onAfterCameraRenderObservable.clear(),this.onAfterRenderCameraObservable.clear(),this.onReadyObservable.clear(),this.onNewCameraAddedObservable.clear(),this.onCameraRemovedObservable.clear(),this.onNewLightAddedObservable.clear(),this.onLightRemovedObservable.clear(),this.onNewGeometryAddedObservable.clear(),this.onGeometryRemovedObservable.clear(),this.onNewTransformNodeAddedObservable.clear(),this.onTransformNodeRemovedObservable.clear(),this.onNewMeshAddedObservable.clear(),this.onMeshRemovedObservable.clear(),this.onNewSkeletonAddedObservable.clear(),this.onSkeletonRemovedObservable.clear(),this.onNewMaterialAddedObservable.clear(),this.onNewMultiMaterialAddedObservable.clear(),this.onMaterialRemovedObservable.clear(),this.onMultiMaterialRemovedObservable.clear(),this.onNewTextureAddedObservable.clear(),this.onTextureRemovedObservable.clear(),this.onNewFrameGraphAddedObservable.clear(),this.onFrameGraphRemovedObservable.clear(),this.onNewObjectRendererAddedObservable.clear(),this.onObjectRendererRemovedObservable.clear(),this.onPrePointerObservable.clear(),this.onPointerObservable.clear(),this.onPreKeyboardObservable.clear(),this.onKeyboardObservable.clear(),this.onActiveCameraChanged.clear(),this.onScenePerformancePriorityChangedObservable.clear(),this.onClearColorChangedObservable.clear(),this.onEnvironmentTextureChangedObservable.clear(),this.onMeshUnderPointerUpdatedObservable.clear(),this._isDisposed=!0}_disposeList(e,t){let i=e.slice(0);for(let e of(t=t??(e=>e.dispose()),i))t(e);e.length=0}get isDisposed(){return this._isDisposed}clearCachedVertexData(){for(let e=0;e<this.meshes.length;e++){let t=this.meshes[e].geometry;t&&t.clearCachedData()}}cleanCachedTextureBuffer(){for(let e of this.textures)e._buffer&&(e._buffer=null)}getWorldExtends(e){let t=new eM.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),i=new eM.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let s of(e=e||(()=>!0),this.meshes.filter(e))){if(s.computeWorldMatrix(!0),!s.subMeshes||0===s.subMeshes.length||s.infiniteDistance)continue;let e=s.getBoundingInfo(),r=e.boundingBox.minimumWorld,n=e.boundingBox.maximumWorld;eM.Vector3.CheckExtends(r,t,i),eM.Vector3.CheckExtends(n,t,i)}return t.x===Number.MAX_VALUE?{min:eM.Vector3.Zero(),max:eM.Vector3.Zero()}:{min:t,max:i}}createPickingRay(e,t,i,s,r=!1){throw(0,ez._WarnImport)("Ray")}createPickingRayToRef(e,t,i,s,r,n=!1,a=!1){throw(0,ez._WarnImport)("Ray")}createPickingRayInCameraSpace(e,t,i){throw(0,ez._WarnImport)("Ray")}createPickingRayInCameraSpaceToRef(e,t,i,s){throw(0,ez._WarnImport)("Ray")}pick(e,t,i,s,r,n){let a=(0,ez._WarnImport)("Ray",!0);return a&&ti.Logger.Warn(a),new ew.PickingInfo}pickWithBoundingInfo(e,t,i,s,r){let n=(0,ez._WarnImport)("Ray",!0);return n&&ti.Logger.Warn(n),new ew.PickingInfo}pickWithRay(e,t,i,s){throw(0,ez._WarnImport)("Ray")}multiPick(e,t,i,s,r){throw(0,ez._WarnImport)("Ray")}multiPickWithRay(e,t,i){throw(0,ez._WarnImport)("Ray")}setPointerOverMesh(e,t,i){this._inputManager.setPointerOverMesh(e,t,i)}getPointerOverMesh(){return this._inputManager.getPointerOverMesh()}_rebuildGeometries(){for(let e of this.geometries)e._rebuild();for(let e of this.meshes)e._rebuild();for(let e of(this.postProcessManager&&this.postProcessManager._rebuild(),this._components))e.rebuild();for(let e of this.particleSystems)e.rebuild();if(this.spriteManagers)for(let e of this.spriteManagers)e.rebuild()}_rebuildTextures(){for(let e of this.textures)e._rebuild(!0);this.markAllMaterialsAsDirty(1)}_getByTags(e,t,i){if(void 0===t)return e;let s=[];for(let r in e){let n=e[r];eC.Tags&&eC.Tags.MatchesQuery(n,t)&&(!i||i(n))&&s.push(n)}return s}getMeshesByTags(e,t){return this._getByTags(this.meshes,e,t)}getCamerasByTags(e,t){return this._getByTags(this.cameras,e,t)}getLightsByTags(e,t){return this._getByTags(this.lights,e,t)}getMaterialByTags(e,t){return this._getByTags(this.materials,e,t).concat(this._getByTags(this.multiMaterials,e,t))}getTransformNodesByTags(e,t){return this._getByTags(this.transformNodes,e,t)}setRenderingOrder(e,t=null,i=null,s=null){this._renderingManager.setRenderingOrder(e,t,i,s)}setRenderingAutoClearDepthStencil(e,t,i=!0,s=!0){this._renderingManager.setRenderingAutoClearDepthStencil(e,t,i,s)}getAutoClearDepthStencilSetup(e){return this._renderingManager.getAutoClearDepthStencilSetup(e)}_forceBlockMaterialDirtyMechanism(e){this._blockMaterialDirtyMechanism=e}get blockMaterialDirtyMechanism(){return this._blockMaterialDirtyMechanism}set blockMaterialDirtyMechanism(e){this._blockMaterialDirtyMechanism!==e&&(this._blockMaterialDirtyMechanism=e,e||this.markAllMaterialsAsDirty(127))}markAllMaterialsAsDirty(e,t){if(!this._blockMaterialDirtyMechanism)for(let i of this.materials)(!t||t(i))&&i.markAsDirty(e)}_loadFile(e,t,i,s,r,n,a){let o=(0,e8.LoadFile)(e,t,i,s?this.offlineProvider:void 0,r,n,a);return this._activeRequests.push(o),o.onCompleteObservable.add(e=>{this._activeRequests.splice(this._activeRequests.indexOf(e),1)}),o}async _loadFileAsync(e,t,i,s,r){return await new Promise((n,a)=>{this._loadFile(e,e=>{n(e)},t,i,s,(e,t)=>{a(t)},r)})}async _loadDelayedFileAsync(e,t,i){this._delayedFileRequests||(this._delayedFileRequests=new Map);let s=`${e}|${t?"binary":"string"}`,r=this._delayedFileRequests.get(s);if(!r){let n=r=t?this._loadFileAsync(e,void 0,i,!0):this._loadFileAsync(e,void 0,i,!1);(async()=>{try{await n}catch{}this._delayedFileRequests?.delete(s)})(),this._delayedFileRequests.set(s,r)}return await r}_requestFile(e,t,i,s,r,n,a){let o=(0,e8.RequestFile)(e,t,i,s?this.offlineProvider:void 0,r,n,a);return this._activeRequests.push(o),o.onCompleteObservable.add(e=>{this._activeRequests.splice(this._activeRequests.indexOf(e),1)}),o}async _requestFileAsync(e,t,i,s,r){return await new Promise((n,a)=>{this._requestFile(e,e=>{n(e)},t,i,s,e=>{a(e)},r)})}_readFile(e,t,i,s,r){let n=(0,e8.ReadFile)(e,t,i,s,r);return this._activeRequests.push(n),n.onCompleteObservable.add(e=>{this._activeRequests.splice(this._activeRequests.indexOf(e),1)}),n}async _readFileAsync(e,t,i){return await new Promise((s,r)=>{this._readFile(e,e=>{s(e)},t,i,e=>{r(e)})})}getPerfCollector(){throw(0,ez._WarnImport)("performanceViewerSceneExtension")}setActiveCameraByID(e){return this.setActiveCameraById(e)}getMaterialByID(e){return this.getMaterialById(e)}getLastMaterialByID(e){return this.getLastMaterialById(e)}getTextureByUniqueID(e){return this.getTextureByUniqueId(e)}getCameraByID(e){return this.getCameraById(e)}getCameraByUniqueID(e){return this.getCameraByUniqueId(e)}getBoneByID(e){return this.getBoneById(e)}getLightByID(e){return this.getLightById(e)}getLightByUniqueID(e){return this.getLightByUniqueId(e)}getParticleSystemByID(e){return this.getParticleSystemById(e)}getGeometryByID(e){return this.getGeometryById(e)}getMeshByID(e){return this.getMeshById(e)}getMeshByUniqueID(e){return this.getMeshByUniqueId(e)}getLastMeshByID(e){return this.getLastMeshById(e)}getMeshesByID(e){return this.getMeshesById(e)}getTransformNodeByID(e){return this.getTransformNodeById(e)}getTransformNodeByUniqueID(e){return this.getTransformNodeByUniqueId(e)}getTransformNodesByID(e){return this.getTransformNodesById(e)}getNodeByID(e){return this.getNodeById(e)}getLastEntryByID(e){return this.getLastEntryById(e)}getLastSkeletonByID(e){return this.getLastSkeletonById(e)}}ta.FOGMODE_NONE=0,ta.FOGMODE_EXP=1,ta.FOGMODE_EXP2=2,ta.FOGMODE_LINEAR=3,ta.MinDeltaTime=1,ta.MaxDeltaTime=1e3,ta._OriginalDefaultMaterialFactory=ta.DefaultMaterialFactory;let to=!1;(v=ta.prototype).sortActiveAnimatables??(v.sortActiveAnimatables=(0,ez._MissingSideEffect)("Scene","sortActiveAnimatables")),(f=ta.prototype).beginWeightedAnimation??(f.beginWeightedAnimation=(0,ez._MissingSideEffect)("Scene","beginWeightedAnimation")),(m=ta.prototype).beginAnimation??(m.beginAnimation=(0,ez._MissingSideEffect)("Scene","beginAnimation")),(b=ta.prototype).beginHierarchyAnimation??(b.beginHierarchyAnimation=(0,ez._MissingSideEffect)("Scene","beginHierarchyAnimation")),(y=ta.prototype).beginDirectAnimation??(y.beginDirectAnimation=(0,ez._MissingSideEffect)("Scene","beginDirectAnimation")),(P=ta.prototype).beginDirectHierarchyAnimation??(P.beginDirectHierarchyAnimation=(0,ez._MissingSideEffect)("Scene","beginDirectHierarchyAnimation")),(C=ta.prototype).getAnimatableByTarget??(C.getAnimatableByTarget=(0,ez._MissingSideEffect)("Scene","getAnimatableByTarget")),(M=ta.prototype).getAllAnimatablesByTarget??(M.getAllAnimatablesByTarget=(0,ez._MissingSideEffect)("Scene","getAllAnimatablesByTarget")),(S=ta.prototype).stopAllAnimations??(S.stopAllAnimations=(0,ez._MissingSideEffect)("Scene","stopAllAnimations")),(O=ta.prototype).getSoundByName??(O.getSoundByName=(0,ez._MissingSideEffect)("Scene","getSoundByName")),(T=ta.prototype).createOrUpdateSelectionOctree??(T.createOrUpdateSelectionOctree=(0,ez._MissingSideEffect)("Scene","createOrUpdateSelectionOctree")),(R=ta.prototype).createDefaultLight??(R.createDefaultLight=(0,ez._MissingSideEffect)("Scene","createDefaultLight")),(E=ta.prototype).createDefaultCamera??(E.createDefaultCamera=(0,ez._MissingSideEffect)("Scene","createDefaultCamera")),(I=ta.prototype).createDefaultCameraOrLight??(I.createDefaultCameraOrLight=(0,ez._MissingSideEffect)("Scene","createDefaultCameraOrLight")),(D=ta.prototype).createDefaultSkybox??(D.createDefaultSkybox=(0,ez._MissingSideEffect)("Scene","createDefaultSkybox")),(k=ta.prototype).createDefaultEnvironment??(k.createDefaultEnvironment=(0,ez._MissingSideEffect)("Scene","createDefaultEnvironment")),(A=ta.prototype).createDefaultVRExperience??(A.createDefaultVRExperience=(0,ez._MissingSideEffect)("Scene","createDefaultVRExperience")),(w=ta.prototype).createDefaultXRExperienceAsync??(w.createDefaultXRExperienceAsync=(0,ez._MissingSideEffect)("Scene","createDefaultXRExperienceAsync")),(x=ta.prototype).getGlowLayerByName??(x.getGlowLayerByName=(0,ez._MissingSideEffect)("Scene","getGlowLayerByName")),(B=ta.prototype).getHighlightLayerByName??(B.getHighlightLayerByName=(0,ez._MissingSideEffect)("Scene","getHighlightLayerByName")),(N=ta.prototype).getSelectionOutlineLayerByName??(N.getSelectionOutlineLayerByName=(0,ez._MissingSideEffect)("Scene","getSelectionOutlineLayerByName")),(F=ta.prototype).removeLensFlareSystem??(F.removeLensFlareSystem=(0,ez._MissingSideEffect)("Scene","removeLensFlareSystem")),(L=ta.prototype).addLensFlareSystem??(L.addLensFlareSystem=(0,ez._MissingSideEffect)("Scene","addLensFlareSystem")),(G=ta.prototype).getLensFlareSystemByName??(G.getLensFlareSystemByName=(0,ez._MissingSideEffect)("Scene","getLensFlareSystemByName")),(U=ta.prototype).getLensFlareSystemByID??(U.getLensFlareSystemByID=(0,ez._MissingSideEffect)("Scene","getLensFlareSystemByID")),(W=ta.prototype).getLensFlareSystemById??(W.getLensFlareSystemById=(0,ez._MissingSideEffect)("Scene","getLensFlareSystemById")),(X=ta.prototype).getPhysicsEngine??(X.getPhysicsEngine=(0,ez._MissingSideEffect)("Scene","getPhysicsEngine")),(q=ta.prototype).enablePhysics??(q.enablePhysics=(0,ez._MissingSideEffect)("Scene","enablePhysics")),(z=ta.prototype).disablePhysicsEngine??(z.disablePhysicsEngine=(0,ez._MissingSideEffect)("Scene","disablePhysicsEngine")),(V=ta.prototype).isPhysicsEnabled??(V.isPhysicsEnabled=(0,ez._MissingSideEffect)("Scene","isPhysicsEnabled")),(j=ta.prototype).deleteCompoundImpostor??(j.deleteCompoundImpostor=(0,ez._MissingSideEffect)("Scene","deleteCompoundImpostor")),(Y=ta.prototype).removeReflectionProbe??(Y.removeReflectionProbe=(0,ez._MissingSideEffect)("Scene","removeReflectionProbe")),(H=ta.prototype).addReflectionProbe??(H.addReflectionProbe=(0,ez._MissingSideEffect)("Scene","addReflectionProbe")),(K=ta.prototype).getBoundingBoxRenderer??(K.getBoundingBoxRenderer=(0,ez._MissingSideEffect)("Scene","getBoundingBoxRenderer")),(Z=ta.prototype).enableDepthRenderer??(Z.enableDepthRenderer=(0,ez._MissingSideEffect)("Scene","enableDepthRenderer")),($=ta.prototype).disableDepthRenderer??($.disableDepthRenderer=(0,ez._MissingSideEffect)("Scene","disableDepthRenderer")),(Q=ta.prototype).enableFluidRenderer??(Q.enableFluidRenderer=(0,ez._MissingSideEffect)("Scene","enableFluidRenderer")),(J=ta.prototype).disableFluidRenderer??(J.disableFluidRenderer=(0,ez._MissingSideEffect)("Scene","disableFluidRenderer")),(ee=ta.prototype).enableGeometryBufferRenderer??(ee.enableGeometryBufferRenderer=(0,ez._MissingSideEffect)("Scene","enableGeometryBufferRenderer")),(et=ta.prototype).disableGeometryBufferRenderer??(et.disableGeometryBufferRenderer=(0,ez._MissingSideEffect)("Scene","disableGeometryBufferRenderer")),(ei=ta.prototype).enableIblCdfGenerator??(ei.enableIblCdfGenerator=(0,ez._MissingSideEffect)("Scene","enableIblCdfGenerator")),(es=ta.prototype).disableIblCdfGenerator??(es.disableIblCdfGenerator=(0,ez._MissingSideEffect)("Scene","disableIblCdfGenerator")),(er=ta.prototype).getOutlineRenderer??(er.getOutlineRenderer=(0,ez._MissingSideEffect)("Scene","getOutlineRenderer")),(en=ta.prototype).enablePrePassRenderer??(en.enablePrePassRenderer=(0,ez._MissingSideEffect)("Scene","enablePrePassRenderer")),(ea=ta.prototype).disablePrePassRenderer??(ea.disablePrePassRenderer=(0,ez._MissingSideEffect)("Scene","disablePrePassRenderer")),(eo=ta.prototype).enableSubSurfaceForPrePass??(eo.enableSubSurfaceForPrePass=(0,ez._MissingSideEffect)("Scene","enableSubSurfaceForPrePass")),(eh=ta.prototype).disableSubSurfaceForPrePass??(eh.disableSubSurfaceForPrePass=(0,ez._MissingSideEffect)("Scene","disableSubSurfaceForPrePass")),(el=ta.prototype).pickSprite??(el.pickSprite=(0,ez._MissingSideEffect)("Scene","pickSprite")),(ed=ta.prototype).pickSpriteWithRay??(ed.pickSpriteWithRay=(0,ez._MissingSideEffect)("Scene","pickSpriteWithRay")),(ec=ta.prototype).multiPickSprite??(ec.multiPickSprite=(0,ez._MissingSideEffect)("Scene","multiPickSprite")),(eu=ta.prototype).multiPickSpriteWithRay??(eu.multiPickSpriteWithRay=(0,ez._MissingSideEffect)("Scene","multiPickSpriteWithRay")),(ep=ta.prototype).setPointerOverSprite??(ep.setPointerOverSprite=(0,ez._MissingSideEffect)("Scene","setPointerOverSprite")),(e_=ta.prototype).getPointerOverSprite??(e_.getPointerOverSprite=(0,ez._MissingSideEffect)("Scene","getPointerOverSprite")),Object.getOwnPropertyDescriptor(ta.prototype,"mainSoundTrack")||Object.defineProperty(ta.prototype,"mainSoundTrack",(0,ez._MissingSideEffectProperty)("Scene","mainSoundTrack")),Object.getOwnPropertyDescriptor(ta.prototype,"soundTracks")||Object.defineProperty(ta.prototype,"soundTracks",(0,ez._MissingSideEffectProperty)("Scene","soundTracks")),Object.getOwnPropertyDescriptor(ta.prototype,"audioEnabled")||Object.defineProperty(ta.prototype,"audioEnabled",(0,ez._MissingSideEffectProperty)("Scene","audioEnabled")),Object.getOwnPropertyDescriptor(ta.prototype,"headphone")||Object.defineProperty(ta.prototype,"headphone",(0,ez._MissingSideEffectProperty)("Scene","headphone")),Object.getOwnPropertyDescriptor(ta.prototype,"audioListenerPositionProvider")||Object.defineProperty(ta.prototype,"audioListenerPositionProvider",(0,ez._MissingSideEffectProperty)("Scene","audioListenerPositionProvider")),Object.getOwnPropertyDescriptor(ta.prototype,"audioListenerRotationProvider")||Object.defineProperty(ta.prototype,"audioListenerRotationProvider",(0,ez._MissingSideEffectProperty)("Scene","audioListenerRotationProvider")),Object.getOwnPropertyDescriptor(ta.prototype,"audioPositioningRefreshRate")||Object.defineProperty(ta.prototype,"audioPositioningRefreshRate",(0,ez._MissingSideEffectProperty)("Scene","audioPositioningRefreshRate")),Object.getOwnPropertyDescriptor(ta.prototype,"selectionOctree")||Object.defineProperty(ta.prototype,"selectionOctree",(0,ez._MissingSideEffectProperty)("Scene","selectionOctree")),Object.getOwnPropertyDescriptor(ta.prototype,"debugLayer")||Object.defineProperty(ta.prototype,"debugLayer",(0,ez._MissingSideEffectProperty)("Scene","debugLayer")),Object.getOwnPropertyDescriptor(ta.prototype,"gamepadManager")||Object.defineProperty(ta.prototype,"gamepadManager",(0,ez._MissingSideEffectProperty)("Scene","gamepadManager")),Object.getOwnPropertyDescriptor(ta.prototype,"simplificationQueue")||Object.defineProperty(ta.prototype,"simplificationQueue",(0,ez._MissingSideEffectProperty)("Scene","simplificationQueue")),Object.getOwnPropertyDescriptor(ta.prototype,"onBeforePhysicsObservable")||Object.defineProperty(ta.prototype,"onBeforePhysicsObservable",(0,ez._MissingSideEffectProperty)("Scene","onBeforePhysicsObservable")),Object.getOwnPropertyDescriptor(ta.prototype,"onAfterPhysicsObservable")||Object.defineProperty(ta.prototype,"onAfterPhysicsObservable",(0,ez._MissingSideEffectProperty)("Scene","onAfterPhysicsObservable")),Object.getOwnPropertyDescriptor(ta.prototype,"reflectionProbes")||Object.defineProperty(ta.prototype,"reflectionProbes",(0,ez._MissingSideEffectProperty)("Scene","reflectionProbes")),Object.getOwnPropertyDescriptor(ta.prototype,"forceShowBoundingBoxes")||Object.defineProperty(ta.prototype,"forceShowBoundingBoxes",(0,ez._MissingSideEffectProperty)("Scene","forceShowBoundingBoxes")),Object.getOwnPropertyDescriptor(ta.prototype,"depthPeelingRenderer")||Object.defineProperty(ta.prototype,"depthPeelingRenderer",(0,ez._MissingSideEffectProperty)("Scene","depthPeelingRenderer")),Object.getOwnPropertyDescriptor(ta.prototype,"useOrderIndependentTransparency")||Object.defineProperty(ta.prototype,"useOrderIndependentTransparency",(0,ez._MissingSideEffectProperty)("Scene","useOrderIndependentTransparency")),Object.getOwnPropertyDescriptor(ta.prototype,"fluidRenderer")||Object.defineProperty(ta.prototype,"fluidRenderer",(0,ez._MissingSideEffectProperty)("Scene","fluidRenderer")),Object.getOwnPropertyDescriptor(ta.prototype,"geometryBufferRenderer")||Object.defineProperty(ta.prototype,"geometryBufferRenderer",(0,ez._MissingSideEffectProperty)("Scene","geometryBufferRenderer")),Object.getOwnPropertyDescriptor(ta.prototype,"iblCdfGenerator")||Object.defineProperty(ta.prototype,"iblCdfGenerator",(0,ez._MissingSideEffectProperty)("Scene","iblCdfGenerator")),Object.getOwnPropertyDescriptor(ta.prototype,"prePassRenderer")||Object.defineProperty(ta.prototype,"prePassRenderer",(0,ez._MissingSideEffectProperty)("Scene","prePassRenderer")),Object.getOwnPropertyDescriptor(ta.prototype,"subSurfaceConfiguration")||Object.defineProperty(ta.prototype,"subSurfaceConfiguration",(0,ez._MissingSideEffectProperty)("Scene","subSurfaceConfiguration")),Object.getOwnPropertyDescriptor(ta.prototype,"spriteManagers")||Object.defineProperty(ta.prototype,"spriteManagers",(0,ez._MissingSideEffectProperty)("Scene","spriteManagers")),Object.getOwnPropertyDescriptor(ta.prototype,"onBeforeSpritesRenderingObservable")||Object.defineProperty(ta.prototype,"onBeforeSpritesRenderingObservable",(0,ez._MissingSideEffectProperty)("Scene","onBeforeSpritesRenderingObservable")),Object.getOwnPropertyDescriptor(ta.prototype,"onAfterSpritesRenderingObservable")||Object.defineProperty(ta.prototype,"onAfterSpritesRenderingObservable",(0,ez._MissingSideEffectProperty)("Scene","onAfterSpritesRenderingObservable")),e.s(["RegisterScene",0,function(){to||(to=!0,(0,ts.RegisterClass)("BABYLON.Scene",ta))},"Scene",0,ta,"ScenePerformancePriority",0,eg],66749)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,25348,e=>{"use strict";class t{constructor(e,t,i,s){this.x=e,this.y=t,this.width=i,this.height=s}toGlobal(e,i){return new t(this.x*e,this.y*i,this.width*e,this.height*i)}toGlobalToRef(e,t,i){return i.x=this.x*e,i.y=this.y*t,i.width=this.width*e,i.height=this.height*t,this}clone(){return new t(this.x,this.y,this.width,this.height)}}e.s(["Viewport",0,t])},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])}]);
|