AnonSec Shell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : awebpaca ( 35430)
PHP Version : 8.5.0
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/awebpaca/360/camping-front-de-mer/save/test/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/awebpaca/360/camping-front-de-mer/save/test/lib//tdvgs.js
var Zg=Object.defineProperty,nI=g=>{throw TypeError(g)},lg=(g,A,I)=>A in g?Zg(g,A,{enumerable:!0,configurable:!0,writable:!0,value:I}):g[A]=I,c=(g,A,I)=>lg(g,typeof A!="symbol"?A+"":A,I),yI=(g,A,I)=>A.has(g)||nI("Cannot "+I),B=(g,A,I)=>(yI(g,A,"read from private field"),I?I.call(g):A.get(g)),o=(g,A,I)=>A.has(g)?nI("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(g):A.set(g,I),i=(g,A,I,Q)=>(yI(g,A,"write to private field"),Q?Q.call(g,I):A.set(g,I),I),y=(g,A,I)=>(yI(g,A,"access private method"),I),LA,wA,aA,zA,O,GA,MI,JI,KA,eA,hI,bI,cI,J,QA,SI,P,uA,HA,YI,PI,sI,jI,oA,j,n,CA,NA,vA,qA,FA,dA,_A,LI,L,fI,aI,tA,mI,rI,zI,KI,HI,eI,uI,vI,_I,$I,$A,AI,II,VA,gI,xA,RA,TA,QI,qI,BA,UA,kA,CI,dI,EA,f,z,_,$,yA,MA,DA,tI,Ag,Ig,gg,p,AA,iA,pA,JA,hA,ZA,cA,SA,lA,BI,VI;import*as w from"three";import{UniformsUtils as Xg,UniformsLib as Og,MathUtils as xI}from"three";function Qg(g,A){return new Promise(I=>{g.addEventListener("message",function Q({data:C}){C?.type===A&&(g.removeEventListener("message",Q),I(C))})})}Qg(self,"wasm_bindgen_worker_init").then(async({init:g,receiver:A})=>{const I=await Promise.resolve().then(()=>IQ);await I.default(g),postMessage({type:"wasm_bindgen_worker_ready"}),I.wbg_rayon_start_worker(A)});async function Wg(g,A,I){if(I.numThreads()===0)throw new Error("num_threads must be > 0.");const Q={type:"wasm_bindgen_worker_init",init:{module_or_path:g,memory:A},receiver:I.receiver()};await Promise.all(Array.from({length:I.numThreads()},async()=>{const C=new Worker(new URL(""+new URL("tdvgs/worker0.js",import.meta.url).href,import.meta.url),{type:"module"});return C.postMessage(Q),await Qg(C,"wasm_bindgen_worker_ready"),C})),I.build()}let E;function m(g){return g==null}function e(g){const A=E.__externref_table_alloc();return E.__wbindgen_export_1.set(A,g),A}function H(g,A){try{return g.apply(this,A)}catch(I){const Q=e(I);E.__wbindgen_exn_store(Q)}}let XA=null;function q(){return(XA===null||XA.buffer!==E.memory.buffer)&&(XA=new DataView(E.memory.buffer)),XA}let a=0;function Cg(g,A){const I=A(g.length*4,4)>>>0;for(let Q=0;Q<g.length;Q++){const C=e(g[Q]);q().setUint32(I+4*Q,C,!0)}return a=g.length,I}const Bg=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&Bg.decode();let OA=null;function WA(){return(OA===null||OA.buffer!==E.memory.buffer)&&(OA=new Uint8Array(E.memory.buffer)),OA}function u(g,A){return g=g>>>0,Bg.decode(WA().slice(g,g+A))}const Eg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},ng=function(g,A){const I=Eg.encode(g);return A.set(I),{read:g.length,written:I.length}};function IA(g,A,I){if(I===void 0){const N=Eg.encode(g),R=A(N.length,1)>>>0;return WA().subarray(R,R+N.length).set(N),a=N.length,R}let Q=g.length,C=A(Q,1)>>>0;const D=WA();let G=0;for(;G<Q;G++){const N=g.charCodeAt(G);if(N>127)break;D[C+G]=N}if(G!==Q){G!==0&&(g=g.slice(G)),C=I(C,Q,Q=G+g.length*3,1)>>>0;const N=WA().subarray(C+G,C+Q),R=ng(g,N);G+=R.written,C=I(C,Q,G,1)>>>0}return a=G,C}const Dg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(g=>{E.__wbindgen_export_7.get(g.dtor)(g.a,g.b)});function TI(g,A,I,Q){const C={a:g,b:A,cnt:1,dtor:I},D=(...G)=>{C.cnt++;const N=C.a;C.a=0;try{return Q(N,C.b,...G)}finally{--C.cnt===0?(E.__wbindgen_export_7.get(C.dtor)(N,C.b),Dg.unregister(C)):C.a=N}};return D.original=C,Dg.register(D,C,C),D}function pI(g){const A=typeof g;if(A=="number"||A=="boolean"||g==null)return`${g}`;if(A=="string")return`"${g}"`;if(A=="symbol"){const C=g.description;return C==null?"Symbol":`Symbol(${C})`}if(A=="function"){const C=g.name;return typeof C=="string"&&C.length>0?`Function(${C})`:"Function"}if(Array.isArray(g)){const C=g.length;let D="[";C>0&&(D+=pI(g[0]));for(let G=1;G<C;G++)D+=", "+pI(g[G]);return D+="]",D}const I=/\[object ([^\]]+)\]/.exec(toString.call(g));let Q;if(I&&I.length>1)Q=I[1];else return toString.call(g);if(Q=="Object")try{return"Object("+JSON.stringify(g)+")"}catch{return"Object"}return g instanceof Error?`${g.name}: ${g.message}
${g.stack}`:Q}function bg(g,A){const I=IA(g,E.__wbindgen_malloc,E.__wbindgen_realloc),Q=a;return E.fetch_js(I,Q,A)}function Pg(g,A){const I=IA(g,E.__wbindgen_malloc,E.__wbindgen_realloc),Q=a;return E.fetch_stream_js(I,Q,A)}let nA=null;function jg(){return(nA===null||nA.buffer!==E.memory.buffer)&&(nA=new Float32Array(E.memory.buffer)),nA}function bA(g,A){return g=g>>>0,jg().subarray(g/4,g/4+A)}function fg(g,A){g=g>>>0;const I=q(),Q=[];for(let C=g;C<g+4*A;C+=4)Q.push(E.__wbindgen_export_1.get(I.getUint32(C,!0)));return E.__externref_drop_slice(g,A),Q}function ig(){E.init_console_error()}function wg(){return E.get_bytes_per_covariance()}function Gg(){return E.get_bytes_per_color()}function og(){return E.get_bytes_per_covariance()}function EI(){return E.is_position_f16()!==0}function Ng(g,A,I){const Q=IA(g,E.__wbindgen_malloc,E.__wbindgen_realloc),C=a;return E.load_url(Q,C,A,m(I)?0:e(I))}function mg(g,A){if(!(g instanceof A))throw new Error(`expected instance of ${A.name}`)}function rg(g,A){const I=A(g.length*1,1)>>>0;return WA().set(g,I/1),a=g.length,I}let PA=null;function Fg(){return(PA===null||PA.buffer!==E.memory.buffer)&&(PA=new Uint32Array(E.memory.buffer)),PA}function zg(g,A){const I=A(g.length*4,4)>>>0;return Fg().set(g,I/4),a=g.length,I}function eg(g,A){return g=g>>>0,Fg().subarray(g/4,g/4+A)}function Rg(g){return E.initThreadPool(g)}function ug(g){E.wbg_rayon_start_worker(g)}function vg(g,A,I){E.closure92_externref_shim(g,A,I)}function Ug(g,A,I){E.closure1014_externref_shim(g,A,I)}function _g(g,A,I,Q){E.closure1035_externref_shim(g,A,I,Q)}const kg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(g=>E.__wbg_hit_free(g>>>0,1));class NI{static __wrap(A){A=A>>>0;const I=Object.create(NI.prototype);return I.__wbg_ptr=A,kg.register(I,I.__wbg_ptr,I),I}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,kg.unregister(this),A}free(){const A=this.__destroy_into_raw();E.__wbg_hit_free(A,0)}get point(){const A=E.__wbg_get_hit_point(this.__wbg_ptr);return rA.__wrap(A)}set point(A){mg(A,rA);var I=A.__destroy_into_raw();E.__wbg_set_hit_point(this.__wbg_ptr,I)}get distance(){return E.__wbg_get_hit_distance(this.__wbg_ptr)}set distance(A){E.__wbg_set_hit_distance(this.__wbg_ptr,A)}get index(){return E.__wbg_get_hit_index(this.__wbg_ptr)>>>0}set index(A){E.__wbg_set_hit_index(this.__wbg_ptr,A)}}const yg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(g=>E.__wbg_point_free(g>>>0,1));class rA{static __wrap(A){A=A>>>0;const I=Object.create(rA.prototype);return I.__wbg_ptr=A,yg.register(I,I.__wbg_ptr,I),I}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,yg.unregister(this),A}free(){const A=this.__destroy_into_raw();E.__wbg_point_free(A,0)}get x(){return E.__wbg_get_point_x(this.__wbg_ptr)}set x(A){E.__wbg_set_point_x(this.__wbg_ptr,A)}get y(){return E.__wbg_get_point_y(this.__wbg_ptr)}set y(A){E.__wbg_set_point_y(this.__wbg_ptr,A)}get z(){return E.__wbg_get_point_z(this.__wbg_ptr)}set z(A){E.__wbg_set_point_z(this.__wbg_ptr,A)}}const Mg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(g=>E.__wbg_sortdata_free(g>>>0,1));class Jg{__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,Mg.unregister(this),A}free(){const A=this.__destroy_into_raw();E.__wbg_sortdata_free(A,0)}get splat_count(){return E.__wbg_get_sortdata_splat_count(this.__wbg_ptr)>>>0}set splat_count(A){E.__wbg_set_sortdata_splat_count(this.__wbg_ptr,A)}get use_shared_memory(){return E.__wbg_get_sortdata_use_shared_memory(this.__wbg_ptr)!==0}set use_shared_memory(A){E.__wbg_set_sortdata_use_shared_memory(this.__wbg_ptr,A)}get dynamic_mode(){return E.__wbg_get_sortdata_dynamic_mode(this.__wbg_ptr)!==0}set dynamic_mode(A){E.__wbg_set_sortdata_dynamic_mode(this.__wbg_ptr,A)}constructor(A,I,Q,C){const D=E.sortdata_new(A,I,Q,C);return this.__wbg_ptr=D>>>0,Mg.register(this,this.__wbg_ptr,this),this}setPositions(A,I,Q){const C=rg(A,E.__wbindgen_malloc),D=a;E.sortdata_setPositions(this.__wbg_ptr,C,D,I,Q)}setBounds(A,I){E.sortdata_setBounds(this.__wbg_ptr,A,I)}setTransformIndices(A){const I=zg(A,E.__wbindgen_malloc),Q=a;E.sortdata_setTransformIndices(this.__wbg_ptr,I,Q)}setTransforms(A){const I=Cg(A,E.__wbindgen_malloc),Q=a;E.sortdata_setTransforms(this.__wbg_ptr,I,Q)}setTransform(A,I){E.sortdata_setTransform(this.__wbg_ptr,A,I)}getSortedIndices(){const A=E.sortdata_getSortedIndices(this.__wbg_ptr);var I=eg(A[0],A[1]).slice();return E.__wbindgen_free(A[0],A[1]*4,4),I}getSortedIndicesPtr(){return E.sortdata_getSortedIndicesPtr(this.__wbg_ptr)>>>0}sort(A,I){return E.sortdata_sort(this.__wbg_ptr,A,I)>>>0}}const hg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(g=>E.__wbg_splatbuffer_free(g>>>0,1));class FI{static __wrap(A){A=A>>>0;const I=Object.create(FI.prototype);return I.__wbg_ptr=A,hg.register(I,I.__wbg_ptr,I),I}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,hg.unregister(this),A}free(){const A=this.__destroy_into_raw();E.__wbg_splatbuffer_free(A,0)}setTransform(A){E.splatbuffer_setTransform(this.__wbg_ptr,m(A)?0:e(A))}getMetadata(){let A,I;try{const Q=E.splatbuffer_getMetadata(this.__wbg_ptr);return A=Q[0],I=Q[1],u(Q[0],Q[1])}finally{E.__wbindgen_free(A,I,1)}}getTransform(){const A=E.splatbuffer_getTransform(this.__wbg_ptr);let I;return A[0]!==0&&(I=bA(A[0],A[1]).slice(),E.__wbindgen_free(A[0],A[1]*4,4)),I}getGaussianCount(){return E.splatbuffer_getGaussianCount(this.__wbg_ptr)>>>0}getSHDegree(){return E.splatbuffer_getSHDegree(this.__wbg_ptr)}getSHCBCount(){return E.splatbuffer_getSHCBCount(this.__wbg_ptr)>>>0}getSceneCenter(){const A=E.splatbuffer_getSceneCenter(this.__wbg_ptr);var I=bA(A[0],A[1]).slice();return E.__wbindgen_free(A[0],A[1]*4,4),I}getCenterRadiusList(){const A=E.splatbuffer_getCenterRadiusList(this.__wbg_ptr);var I=bA(A[0],A[1]).slice();return E.__wbindgen_free(A[0],A[1]*4,4),I}getCenterRadiusStep(){return E.splatbuffer_getCenterRadiusStep(this.__wbg_ptr)>>>0}getCurrentRadius(){return E.splatbuffer_getCurrentRadius(this.__wbg_ptr)}getMaximumRadius(){return E.splatbuffer_getMaximumRadius(this.__wbg_ptr)}getBoundsMin(){const A=E.splatbuffer_getBoundsMin(this.__wbg_ptr);var I=bA(A[0],A[1]).slice();return E.__wbindgen_free(A[0],A[1]*4,4),I}getBoundsMax(){const A=E.splatbuffer_getBoundsMax(this.__wbg_ptr);var I=bA(A[0],A[1]).slice();return E.__wbindgen_free(A[0],A[1]*4,4),I}getPositionsBufferPtr(){return E.splatbuffer_getPositionsBufferPtr(this.__wbg_ptr)>>>0}getCovariancesBufferPtr(){return E.splatbuffer_getCovariancesBufferPtr(this.__wbg_ptr)>>>0}getColorsBufferPtr(){return E.splatbuffer_getColorsBufferPtr(this.__wbg_ptr)>>>0}getShCoeffsBufferPtr(){const A=E.splatbuffer_getShCoeffsBufferPtr(this.__wbg_ptr);return A===4294967297?void 0:A}getShCoeffsIndicesBufferPtr(){const A=E.splatbuffer_getShCoeffsIndicesBufferPtr(this.__wbg_ptr);return A===4294967297?void 0:A}getShCoeffsCBBufferPtr(){const A=E.splatbuffer_getShCoeffsCBBufferPtr(this.__wbg_ptr);return A===4294967297?void 0:A}getLoadedPositionsCount(){return E.splatbuffer_getLoadedPositionsCount(this.__wbg_ptr)>>>0}getLoadedColorsCount(){return E.splatbuffer_getLoadedColorsCount(this.__wbg_ptr)>>>0}getLoadedShCoeffsCount(){return E.splatbuffer_getLoadedShCoeffsCount(this.__wbg_ptr)>>>0}getLoadedShCoeffsIndicesCount(){return E.splatbuffer_getLoadedShCoeffsIndicesCount(this.__wbg_ptr)>>>0}getLoadedShCoeffsCBCount(){return E.splatbuffer_getLoadedShCoeffsCBCount(this.__wbg_ptr)>>>0}getLoadedCovariancesCount(){return E.splatbuffer_getLoadedCovariancesCount(this.__wbg_ptr)>>>0}getDistanceLoadedFromSceneCenter(){return E.splatbuffer_getDistanceLoadedFromSceneCenter(this.__wbg_ptr)}computeVisibleIndices(A,I,Q){return E.splatbuffer_computeVisibleIndices(this.__wbg_ptr,A,I,Q)>>>0}getVisibleIndicesBufferPtr(){return E.splatbuffer_getVisibleIndicesBufferPtr(this.__wbg_ptr)>>>0}raycast(A,I,Q,C){const D=E.splatbuffer_raycast(this.__wbg_ptr,A,I,Q,C);var G=fg(D[0],D[1]).slice();return E.__wbindgen_free(D[0],D[1]*4,4),G}getOctree(){return E.splatbuffer_getOctree(this.__wbg_ptr)}}const cg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(g=>E.__wbg_wbg_rayon_poolbuilder_free(g>>>0,1));class RI{static __wrap(A){A=A>>>0;const I=Object.create(RI.prototype);return I.__wbg_ptr=A,cg.register(I,I.__wbg_ptr,I),I}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,cg.unregister(this),A}free(){const A=this.__destroy_into_raw();E.__wbg_wbg_rayon_poolbuilder_free(A,0)}numThreads(){return E.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}receiver(){return E.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}build(){E.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}}async function $g(g,A){if(typeof Response=="function"&&g instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(g,A)}catch(Q){if(g.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",Q);else throw Q}const I=await g.arrayBuffer();return await WebAssembly.instantiate(I,A)}else{const I=await WebAssembly.instantiate(g,A);return I instanceof WebAssembly.Instance?{instance:I,module:g}:I}}function Sg(){const g={};return g.wbg={},g.wbg.__wbg_Window_925630dd9364b9e7=function(A){return A.Window},g.wbg.__wbg_WorkerGlobalScope_f8a15b453de109c0=function(A){return A.WorkerGlobalScope},g.wbg.__wbg_async_9ff6d9e405f13772=function(A){return A.async},g.wbg.__wbg_body_0b8fd1fe671660df=function(A){const I=A.body;return m(I)?0:e(I)},g.wbg.__wbg_buffer_609cc3eee51ed158=function(A){return A.buffer},g.wbg.__wbg_call_672a4d21634d4a24=function(){return H(function(A,I){return A.call(I)},arguments)},g.wbg.__wbg_call_7cccdd69e0791ae2=function(){return H(function(A,I,Q){return A.call(I,Q)},arguments)},g.wbg.__wbg_call_833bed5770ea2041=function(){return H(function(A,I,Q,C){return A.call(I,Q,C)},arguments)},g.wbg.__wbg_call_b8adc8b1d0a0d8eb=function(){return H(function(A,I,Q,C,D){return A.call(I,Q,C,D)},arguments)},g.wbg.__wbg_data_432d9c3df2630942=function(A){return A.data},g.wbg.__wbg_elements_a81bc7dfdce748ad=function(A,I){const Q=I.elements,C=Cg(Q,E.__wbindgen_malloc),D=a;q().setInt32(A+4*1,D,!0),q().setInt32(A+4*0,C,!0)},g.wbg.__wbg_error_7534b8e9a36f1ab4=function(A,I){let Q,C;try{Q=A,C=I,console.error(u(A,I))}finally{E.__wbindgen_free(Q,C,1)}},g.wbg.__wbg_fetch_509096533071c657=function(A,I){return A.fetch(I)},g.wbg.__wbg_fetch_b7bf320f681242d2=function(A,I){return A.fetch(I)},g.wbg.__wbg_getRandomValues_80578b2ff2a093ba=function(){return H(function(A){globalThis.crypto.getRandomValues(A)},arguments)},g.wbg.__wbg_getReader_be0d36e5873a525b=function(A){return A.getReader()},g.wbg.__wbg_get_123509460060ab98=function(){return H(function(A,I,Q,C){const D=I.get(u(Q,C));var G=m(D)?0:IA(D,E.__wbindgen_malloc,E.__wbindgen_realloc),N=a;q().setInt32(A+4*1,N,!0),q().setInt32(A+4*0,G,!0)},arguments)},g.wbg.__wbg_get_67b2ba62fc30de12=function(){return H(function(A,I){return Reflect.get(A,I)},arguments)},g.wbg.__wbg_headers_9cb51cfd2ac780a4=function(A){return A.headers},g.wbg.__wbg_hit_new=function(A){return NI.__wrap(A)},g.wbg.__wbg_instanceof_File_a4e2256bf71955a9=function(A){let I;try{I=A instanceof File}catch{I=!1}return I},g.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4=function(A){let I;try{I=A instanceof Object}catch{I=!1}return I},g.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(A){let I;try{I=A instanceof Response}catch{I=!1}return I},g.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(A){let I;try{I=A instanceof Uint8Array}catch{I=!1}return I},g.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(A){let I;try{I=A instanceof Window}catch{I=!1}return I},g.wbg.__wbg_length_a446193dc22c12f8=function(A){return A.length},g.wbg.__wbg_new_23a2665fac83c611=function(A,I){try{var Q={a:A,b:I},C=(G,N)=>{const R=Q.a;Q.a=0;try{return _g(R,Q.b,G,N)}finally{Q.a=R}};return new Promise(C)}finally{Q.a=Q.b=0}},g.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},g.wbg.__wbg_new_46e8134c3341d05a=function(){return H(function(){return new FileReader},arguments)},g.wbg.__wbg_new_78feb108b6472713=function(){return new Array},g.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},g.wbg.__wbg_new_9ffbe0a71eff35e3=function(){return H(function(A,I){return new URL(u(A,I))},arguments)},g.wbg.__wbg_new_a12002a7f91c75be=function(A){return new Uint8Array(A)},g.wbg.__wbg_new_b1a33e5095abf678=function(){return H(function(A,I){return new Worker(u(A,I))},arguments)},g.wbg.__wbg_new_e25e5aab09ff45db=function(){return H(function(){return new AbortController},arguments)},g.wbg.__wbg_new_e9a4a67dbababe57=function(A){return new Int32Array(A)},g.wbg.__wbg_newnoargs_105ed471475aaf50=function(A,I){return new Function(u(A,I))},g.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(A,I,Q){return new Uint8Array(A,I>>>0,Q>>>0)},g.wbg.__wbg_newwithlength_a381634e90c276d4=function(A){return new Uint8Array(A>>>0)},g.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return H(function(A,I,Q){return new Request(u(A,I),Q)},arguments)},g.wbg.__wbg_of_4a05197bfc89556f=function(A,I,Q){return Array.of(A,I,Q)},g.wbg.__wbg_pathname_9b0b04c4e19316d0=function(A,I){const Q=I.pathname,C=IA(Q,E.__wbindgen_malloc,E.__wbindgen_realloc),D=a;q().setInt32(A+4*1,D,!0),q().setInt32(A+4*0,C,!0)},g.wbg.__wbg_postMessage_6edafa8f7b9c2f52=function(){return H(function(A,I){A.postMessage(I)},arguments)},g.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(A){queueMicrotask(A)},g.wbg.__wbg_queueMicrotask_d3219def82552485=function(A){return A.queueMicrotask},g.wbg.__wbg_readAsArrayBuffer_e51cb3c4fcc962de=function(){return H(function(A,I){A.readAsArrayBuffer(I)},arguments)},g.wbg.__wbg_read_a2434af1186cb56c=function(A){return A.read()},g.wbg.__wbg_resolve_4851785c9c5f573d=function(A){return Promise.resolve(A)},g.wbg.__wbg_result_dadbdcc801180072=function(){return H(function(A){return A.result},arguments)},g.wbg.__wbg_set_37837023f3d740e8=function(A,I,Q){A[I>>>0]=Q},g.wbg.__wbg_set_3f1d0b984ed272ed=function(A,I,Q){A[I]=Q},g.wbg.__wbg_set_65595bdd868b3009=function(A,I,Q){A.set(I,Q>>>0)},g.wbg.__wbg_setonerror_578ff66d3363c119=function(A,I){A.onerror=I},g.wbg.__wbg_setonload_1302417ca59f658b=function(A,I){A.onload=I},g.wbg.__wbg_setonmessage_5a885b16bdc6dca6=function(A,I){A.onmessage=I},g.wbg.__wbg_setsignal_75b21ef3a81de905=function(A,I){A.signal=I},g.wbg.__wbg_signal_aaf9ad74119f20a4=function(A){return A.signal},g.wbg.__wbg_size_3808d41635a9c259=function(A){return A.size},g.wbg.__wbg_slice_bd4c84b64bdfe01f=function(){return H(function(A,I,Q){return A.slice(I,Q)},arguments)},g.wbg.__wbg_splatbuffer_new=function(A){return FI.__wrap(A)},g.wbg.__wbg_stack_0ed75d68575b0f3c=function(A,I){const Q=I.stack,C=IA(Q,E.__wbindgen_malloc,E.__wbindgen_realloc),D=a;q().setInt32(A+4*1,D,!0),q().setInt32(A+4*0,C,!0)},g.wbg.__wbg_startWorkers_2ca11761e08ff5d5=function(A,I,Q){return Wg(A,I,RI.__wrap(Q))},g.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const A=typeof global>"u"?null:global;return m(A)?0:e(A)},g.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const A=typeof globalThis>"u"?null:globalThis;return m(A)?0:e(A)},g.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const A=typeof self>"u"?null:self;return m(A)?0:e(A)},g.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const A=typeof window>"u"?null:window;return m(A)?0:e(A)},g.wbg.__wbg_status_f6360336ca686bf0=function(A){return A.status},g.wbg.__wbg_subarray_aa9065fa9dc5df96=function(A,I,Q){return A.subarray(I>>>0,Q>>>0)},g.wbg.__wbg_then_44b73946d2fb3e7d=function(A,I){return A.then(I)},g.wbg.__wbg_then_48b406749878a531=function(A,I,Q){return A.then(I,Q)},g.wbg.__wbg_value_dab73d3d5d4abaaf=function(A){return A.value},g.wbg.__wbg_waitAsync_61f0a081053dd3c2=function(A,I,Q){return Atomics.waitAsync(A,I>>>0,Q)},g.wbg.__wbg_waitAsync_7ce6c8a047c752c3=function(){return Atomics.waitAsync},g.wbg.__wbg_x_ee17d5da172d082f=function(A){return A.x},g.wbg.__wbg_y_74842f81d209bef6=function(A){return A.y},g.wbg.__wbg_z_a3f29b8ed2d03d80=function(A){return A.z},g.wbg.__wbindgen_boolean_get=function(A){const I=A;return typeof I=="boolean"?I?1:0:2},g.wbg.__wbindgen_cb_drop=function(A){const I=A.original;return I.cnt--==1?(I.a=0,!0):!1},g.wbg.__wbindgen_closure_wrapper267=function(A,I,Q){return TI(A,I,93,vg)},g.wbg.__wbindgen_closure_wrapper2904=function(A,I,Q){return TI(A,I,1015,Ug)},g.wbg.__wbindgen_closure_wrapper2905=function(A,I,Q){return TI(A,I,1015,Ug)},g.wbg.__wbindgen_debug_string=function(A,I){const Q=pI(I),C=IA(Q,E.__wbindgen_malloc,E.__wbindgen_realloc),D=a;q().setInt32(A+4*1,D,!0),q().setInt32(A+4*0,C,!0)},g.wbg.__wbindgen_init_externref_table=function(){const A=E.__wbindgen_export_1,I=A.grow(4);A.set(0,void 0),A.set(I+0,void 0),A.set(I+1,null),A.set(I+2,!0),A.set(I+3,!1)},g.wbg.__wbindgen_is_function=function(A){return typeof A=="function"},g.wbg.__wbindgen_is_undefined=function(A){return A===void 0},g.wbg.__wbindgen_link_9579f016b4522a24=function(A){const I=`onmessage = function (ev) {
            let [ia, index, value] = ev.data;
            ia = new Int32Array(ia.buffer);
            let result = Atomics.wait(ia, index, value);
            postMessage(result);
        };
        `,Q=typeof URL.createObjectURL>"u"?"data:application/javascript,"+encodeURIComponent(I):URL.createObjectURL(new Blob([I],{type:"text/javascript"})),C=IA(Q,E.__wbindgen_malloc,E.__wbindgen_realloc),D=a;q().setInt32(A+4*1,D,!0),q().setInt32(A+4*0,C,!0)},g.wbg.__wbindgen_memory=function(){return E.memory},g.wbg.__wbindgen_module=function(){return DI.__wbindgen_wasm_module},g.wbg.__wbindgen_number_get=function(A,I){const Q=I,C=typeof Q=="number"?Q:void 0;q().setFloat64(A+8*1,m(C)?0:C,!0),q().setInt32(A+4*0,!m(C),!0)},g.wbg.__wbindgen_number_new=function(A){return A},g.wbg.__wbindgen_rethrow=function(A){throw A},g.wbg.__wbindgen_string_new=function(A,I){return u(A,I)},g.wbg.__wbindgen_throw=function(A,I){throw new Error(u(A,I))},g}function Yg(g,A){g.wbg.memory=A||new WebAssembly.Memory({initial:23,maximum:65536,shared:!0})}function sg(g,A,I){if(E=g.exports,DI.__wbindgen_wasm_module=A,XA=null,nA=null,PA=null,OA=null,typeof I<"u"&&(typeof I!="number"||I===0||I%65536!==0))throw"invalid stack size";return E.__wbindgen_start(I),E}function AQ(g,A){if(E!==void 0)return E;let I;typeof g<"u"&&(Object.getPrototypeOf(g)===Object.prototype?{module:g,memory:A,thread_stack_size:I}=g:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const Q=Sg();Yg(Q,A),g instanceof WebAssembly.Module||(g=new WebAssembly.Module(g));const C=new WebAssembly.Instance(g,Q);return sg(C,g,I)}async function DI(g,A){if(E!==void 0)return E;let I;typeof g<"u"&&(Object.getPrototypeOf(g)===Object.prototype?{module_or_path:g,memory:A,thread_stack_size:I}=g:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof g>"u"&&(g=new URL("./tdvgs/gslib_bg.wasm",import.meta.url));const Q=Sg();(typeof g=="string"||typeof Request=="function"&&g instanceof Request||typeof URL=="function"&&g instanceof URL)&&(g=fetch(g)),Yg(Q,A);const{instance:C,module:D}=await $g(await g,Q);return sg(C,D,I)}const IQ=Object.freeze(Object.defineProperty({__proto__:null,Hit:NI,Point:rA,SortData:Jg,SplatBuffer:FI,default:DI,fetch_js:bg,fetch_stream_js:Pg,get_bytes_per_color:Gg,get_bytes_per_covariance:og,get_bytes_per_position:wg,initSync:AQ,initThreadPool:Rg,init_console_error:ig,is_position_f16:EI,load_url:Ng,wbg_rayon_PoolBuilder:RI,wbg_rayon_start_worker:ug},Symbol.toStringTag,{value:"Module"})),gQ=()=>(async g=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(g)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),QQ=function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)},CQ=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},Lg=function(){return/\sVR\s|OculusBrowser|PicoBrowser/i.test(navigator.userAgent)};let iI=!1,ZI;async function ag(g){iI||(iI=!0,ZI=(await DI(void 0,QQ()||Lg()?new WebAssembly.Memory({initial:23,maximum:8192,shared:!0}):void 0)).memory,ig(),g>1&&!CQ()&&!Lg()&&await gQ()&&await Rg(g))}function BQ(){iI&&(ZI=void 0,iI=!1)}function YA(){return ZI}let Z;var v=(g=>(g[g.Init=0]="Init",g[g.Positions=1]="Positions",g[g.Bounds=2]="Bounds",g[g.Sort=3]="Sort",g[g.Dispose=4]="Dispose",g))(v||{});onmessage=async function(g){const A=g.data;if(A&&A.method!==void 0){if(A.method!=0&&!Z)return;switch(A.method){case 0:await ag(1);const I=A.payload;EQ(I),postMessage({method:A.method});break;case 1:const Q=A.payload;postMessage({method:A.method,payload:iQ(Q)});break;case 2:const C=A.payload;postMessage({method:A.method,payload:wQ(C)});break;case 3:const D=A.payload;postMessage({method:A.method,payload:GQ(D)});break;case 4:DQ();break;default:console.error("Unknown method:",A.method);break}}};function EQ(g){Z&&Z.free(),Z=new Jg(g.splatCount,g.dynamicMode,g.useSharedMemory,g.maxScenes)}function DQ(){Z&&(Z.free(),Z=void 0),BQ()}function iQ(g){return Z.setPositions(new Uint8Array(g.positions.buffer),g.offset,g.halfPrecision),{offset:g.offset,length:g.positions.length/3}}function wQ(g){return Z.setBounds(g.min,g.max),{}}function GQ(g){let A=performance.now(),I=Z.sort(g.cameraPos,g.cameraDir);return{sortedIndices:Z.use_shared_memory?new Uint32Array(YA().buffer,Z.getSortedIndicesPtr(),I):new Uint32Array(Z.getSortedIndices().buffer,0,I),renderCount:I,time:performance.now()-A}}function oQ(g){return new Worker(""+new URL("tdvgs/worker1.js",import.meta.url).href,{type:"module",name:g?.name})}class wI{}c(wI,"MaxScenes",32);const Kg={type:"change"},Hg=class oI extends w.EventDispatcher{constructor(){if(B(oI,LA)!==void 0)return B(oI,LA);super(),c(this,"ui"),c(this,"stats"),i(oI,LA,this)}async activate(A){if(!this.isActive()){try{const I=await import("lil-gui");this.ui=new I.GUI({closeFolders:!0}),this.ui.close()}catch{console.error("lil-gui not found");return}try{const I=(await import("stats-gl")).default;this.stats=new I({trackGPU:!0}),document.body.appendChild(this.stats.dom),await this.stats.init(A)}catch{console.error("stats-gl not found");return}this.dispatchEvent(Kg)}}dispose(){this.isActive()&&(this.ui&&(this.ui.destroy(),this.ui=void 0),this.stats&&(this.stats.dom.remove(),this.stats=void 0),this.dispatchEvent(Kg))}isActive(){return this.ui!==void 0}};LA=new WeakMap,o(Hg,LA);let lI=Hg;var XI=(g=>(g.INIT="init",g.READY="ready",g))(XI||{});class NQ extends w.EventDispatcher{constructor(A,I){super(),o(this,hI),c(this,"lastSortTime",0),c(this,"maxSortTime",0),o(this,wA,!1),o(this,aA),o(this,zA),o(this,O),o(this,GA,!1),o(this,MI,0),o(this,JI,new lI),o(this,KA,!1),o(this,eA,1),o(this,cI,Q=>{switch(Q.data.method){case v.Init:i(this,wA,!0),this.dispatchEvent({type:"init"});break;case v.Positions:const C=Q.data.payload;i(this,MI,C.offset+C.length),i(this,KA,!0);break;case v.Sort:const D=Q.data.payload;i(this,GA,!1),this.lastSortTime=D.time,B(this,JI).isActive()&&(this.maxSortTime=Math.max(this.maxSortTime,this.lastSortTime)),this.dispatchEvent({type:"ready",data:{indices:D.sortedIndices,renderCount:D.renderCount}});break}}),c(this,"update",(()=>{const Q=new w.Vector3,C=new w.Vector3,D=new w.Vector3,G=new w.Vector3,N=new w.Vector3;return R=>{if(B(this,GA)||!B(this,wA))return;let k,h,l=!1,d=!1;G.setFromMatrixPosition(R);let K=R.elements;if(D.set(K[8],K[9],K[10]).negate().normalize(),k=D.dot(Q),h=N.copy(G).sub(C).length(),!B(this,KA)&&!B(this,aA)&&(k<=.99&&(l=!0),h>=B(this,eA)&&(d=!0),!l&&!d))return;i(this,GA,!0);const t={cameraPos:G,cameraDir:D};B(this,O).postMessage({method:v.Sort,payload:t}),C.copy(G),Q.copy(D),i(this,KA,!1)}})()),i(this,aA,A),i(this,zA,I)}dispose(){B(this,wA)&&(B(this,O)&&(B(this,O).postMessage({method:v.Dispose}),B(this,O).terminate(),i(this,O,void 0)),i(this,GA,!1),i(this,wA,!1))}init(A){this.dispose(),y(this,hI,bI).call(this);const I={splatCount:A,useSharedMemory:B(this,zA),dynamicMode:B(this,aA),maxScenes:wI.MaxScenes};B(this,O).postMessage({method:v.Init,payload:I})}addPositions(A,I,Q){const C={positions:A,offset:I,halfPrecision:Q};B(this,O).postMessage({method:v.Positions,payload:C})}setBounds(A,I){var Q;i(this,eA,Math.min(1,I.distanceTo(A)*.001));const C={min:A,max:I};(Q=B(this,O))==null||Q.postMessage({method:v.Bounds,payload:C})}}wA=new WeakMap,aA=new WeakMap,zA=new WeakMap,O=new WeakMap,GA=new WeakMap,MI=new WeakMap,JI=new WeakMap,KA=new WeakMap,eA=new WeakMap,hI=new WeakSet,bI=function(){i(this,O,new oQ),B(this,O).onmessage=B(this,cI).bind(this)},cI=new WeakMap;const FQ="cHJlY2lzaW9uIGhpZ2hwIGZsb2F0O3ByZWNpc2lvbiBoaWdocCBpbnQ7cHJlY2lzaW9uIGhpZ2hwIHNhbXBsZXIyRDtwcmVjaXNpb24gaGlnaHAgdXNhbXBsZXIyRDsKI2RlZmluZSB2YXJ5aW5nIG91dAp1bmlmb3JtIG1hdDQgbW9kZWxWaWV3TWF0cml4LHByb2plY3Rpb25NYXRyaXg7aW4gdmVjMiBwb3NpdGlvbjtpbiBpbnQgdjt1bmlmb3JtIGhpZ2hwIHVzYW1wbGVyMkQgUzsKI2lmZGVmIFNUCnVuaWZvcm0gbG93cCB1c2FtcGxlcjJEIHg7Y29uc3QgdmVjNCBoPXZlYzQoMSwuODcsMCwuOSkscj12ZWM0KDAsLjYyMzUsLjg5MDIsLjc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k7CiNpZmRlZiBVU0VfRk9HCnZGb2dEZXB0aD0tVC56OwojZW5kaWYKfQ==",RQ=Object.freeze(Object.defineProperty({__proto__:null,code:FQ},Symbol.toStringTag,{value:"Module"})),UQ="cHJlY2lzaW9uIGhpZ2hwIGZsb2F0OwojZGVmaW5lIHZhcnlpbmcgaW4KdmFyeWluZyB2ZWM0IHZDb2xvcjt2YXJ5aW5nIHZlYzIgdlBvc2l0aW9uO3ZhcnlpbmcgZmxvYXQgdkRlcHRoOwojaW5jbHVkZSA8Zm9nX3BhcnNfZnJhZ21lbnQ+Cm91dCB2ZWM0IG91dENvbG9yO3ZvaWQgbWFpbigpe2Zsb2F0IHY9ZG90KHZQb3NpdGlvbix2UG9zaXRpb24pO2lmKHY+NC4pZGlzY2FyZDtvdXRDb2xvcj12ZWM0KHZDb2xvci54eXosZXhwKC12KSp2Q29sb3Iudyk7CiNkZWZpbmUgZ2xfRnJhZ0NvbG9yIG91dENvbG9yCgojaW5jbHVkZSA8Zm9nX2ZyYWdtZW50PgoKI3VuZGVmIGdsX0ZyYWdDb2xvcgpnbF9GcmFnRGVwdGg9dkRlcHRoO30=",kQ=Object.freeze(Object.defineProperty({__proto__:null,code:UQ},Symbol.toStringTag,{value:"Module"})),qg=class xg extends w.RawShaderMaterial{constructor(){var A;const{uniforms:I,defines:Q}=y(A=xg,sI,jI).call(A);super({uniforms:I,defines:Q,vertexShader:atob(MQ.code),fragmentShader:atob(JQ.code),transparent:!0,alphaTest:1,blending:w.NormalBlending,depthTest:!0,depthWrite:!1,side:w.FrontSide,glslVersion:w.GLSL3}),o(this,J),this.needsUpdate=!1}set basisViewport(A){this.uniforms.w.value.set(2/A.x,2/A.y),this.uniformsNeedUpdate=!0}set cameraNear(A){this.uniforms.z.value=A,this.uniformsNeedUpdate=!0}get cameraNear(){return this.uniforms.z.value}set cameraPosition(A){this.uniforms.f.value.copy(A),this.uniformsNeedUpdate=!0}get cameraPosition(){return this.uniforms.f.value}set dynamicMode(A){if(this.dynamicMode!==A){if(A){const I=[];for(let Q=0;Q<wI.MaxScenes;Q++)I.push(new w.Matrix4);this.uniforms.m={value:I},this.defines.DM=1}else delete this.defines.DM;this.needsUpdate=!0}}get dynamicMode(){return this.defines.DM===1}set focalLength(A){this.uniforms.t.value.copy(A),this.uniformsNeedUpdate=!0}set fog(A){this.fog!==A&&(A?this.defines.USE_FOG=1:delete this.defines.USE_FOG,this.needsUpdate=!0)}get fog(){return this.defines.USE_FOG===1}set fogExp2(A){this.fogExp2!==A&&(A?this.defines.FOG_EXP2=1:delete this.defines.FOG_EXP2,this.needsUpdate=!0)}get fogExp2(){return this.defines.FOG_EXP2===1}set halfPrecisionPositions(A){this.halfPrecisionPositions!==A&&(A?this.defines.PHF=1:delete this.defines.PHF,this.needsUpdate=!0)}get halfPrecisionPositions(){return this.defines.PHF===1}get nativeAntialiasing(){return this.defines.NAA===1}set nativeAntialiasing(A){this.nativeAntialiasing!==A&&(A?this.defines.NAA=1:delete this.defines.NAA,this.needsUpdate=!0)}set useStates(A){this.useStates!==A&&(A?this.defines.ST=1:(B(this,J,P)!==void 0&&(B(this,J,P).dispose(),i(this,J,void 0,uA)),delete this.defines.ST),this.needsUpdate=!0)}get useStates(){return this.defines.ST===1}get stateBuffer(){var A;return(A=B(this,J,P))==null?void 0:A.image.data}setTransform(A,I){this.uniforms.m.value[I].copy(A),this.uniformsNeedUpdate=!0}dispose(){super.dispose(),this.disposeTextures()}disposeTextures(){B(this,J,QA)&&(B(this,J,QA).dispose(),i(this,J,void 0,SI)),B(this,J,P)&&(B(this,J,P).dispose(),i(this,J,void 0,uA)),B(this,J,HA)&&(B(this,J,HA).dispose(),i(this,J,void 0,YI))}buildTextures(A){this.disposeTextures();const I=1,Q=1,C=1,D=3,G=3,N=.5,R=4,k=D+C+G+N;let h=A.getGaussianCount();const l=this.defines.DM===1,d=this.defines.ST===1,K=this.defines.PHF===1,t=new Uint32Array(h*G),T=new(K?Uint16Array:Uint32Array)(h*D),s=new Uint32Array(h*C);y(this,J,PI).call(this,A,t,T,s);const X=this.computeTextureInfo(h,R,k),V=new Uint32Array(X.dataLength),W=K?(M,F)=>{V[M]=T[F]|T[F+1]<<16,V[M+1]=T[F+2]}:(M,F)=>{V[M]=T[F],V[M+1]=T[F+1],V[M+2]=T[F+2]};for(let M=0;M<h;M++){const F=M*8,x=M*3;W(F,x),V[F+4]=t[x],V[F+5]=t[x+1],V[F+6]=t[x+2],V[F+7]=s[M]}const S=new w.DataTexture(V,X.width,X.height,w.RGBAIntegerFormat,w.UnsignedIntType,w.UVMapping,w.ClampToEdgeWrapping,w.ClampToEdgeWrapping,w.NearestFilter,w.NearestFilter,0);if(S.internalFormat="RGBA32UI",S.needsUpdate=!0,i(this,J,S,SI),d){const M=this.computeTextureInfo(h,1,1),F=new Uint8Array(M.dataLength),x=new w.DataTexture(F,M.width,M.height,w.RedIntegerFormat,w.UnsignedByteType,w.UVMapping,w.ClampToEdgeWrapping,w.ClampToEdgeWrapping,w.NearestFilter,w.NearestFilter,0);x.needsUpdate=!0,i(this,J,x,uA);const Y=Math.floor(M.width/M.texelsPerSplat)-1,U=Math.floor(Math.log2(M.width/M.texelsPerSplat));(this.defines.STWOTPS!==Y||this.defines.SETWOTPS!==U)&&(this.defines.STWOTPS=Y,this.defines.SETWOTPS=U,this.needsUpdate=!0)}if(l){const M=this.computeTextureInfo(h,I,Q),F=new Uint32Array(M.width*M.height*I);let x=0,Y=0;for(let UI=0;UI<A.numClouds();++UI){const WI=A.getCloudAt(UI),pg=WI.buffer.getGaussianCount();for(let kI=Y;kI<pg;++kI)F[kI]=x;++x,Y+=WI.globalSplatOffset}const U=new w.DataTexture(F,M.width,M.height,w.RedIntegerFormat,w.UnsignedIntType,w.UVMapping,w.ClampToEdgeWrapping,w.ClampToEdgeWrapping,w.NearestFilter,w.NearestFilter,0);U.internalFormat="R32UI",U.needsUpdate=!0,i(this,J,U,YI)}const gA=Math.floor(X.width/X.texelsPerSplat)-1,r=Math.floor(Math.log2(X.width/X.texelsPerSplat));(this.defines.TWOTPS!==gA||this.defines.ETWOTPS!==r||this.defines.TPS!==X.texelsPerSplat)&&(this.defines.TWOTPS=gA,this.defines.ETWOTPS=r,this.defines.TPS=X.texelsPerSplat,this.needsUpdate=!0)}computeTextureInfo(A,I,Q){const D=Math.ceil(Q/I),G=D*I,N=A*D,R=A*G;let k=1;for(;k*k<N;)k*=2;k>8192&&(k=8192,console.warn("Maximum splats count reached. Limiting to %s splats.",A));const h=Math.max(Math.ceil(R/k/I),1);return{width:k,height:h,dataLength:k*h*I,texelsPerSplat:D,paddedElementsPerSplat:G}}invalidateState(){B(this,J,P)&&(B(this,J,P).needsUpdate=!0,this.needsUpdate=!0)}fillSHIndices(A){const I=new Uint32Array(B(this,J,QA).image.data.buffer),Q=A.length;for(let C=0;C<Q;++C)I[C*8+3]|=A[C]<<16;B(this,J,QA).needsUpdate=!0}};J=new WeakSet,QA=function(){return this.uniforms.S.value},SI=function(g){B(this,J,QA)&&B(this,J,QA).dispose(),this.uniforms.S.value=g,this.uniformsNeedUpdate=!0},P=function(){return this.uniforms.x.value},uA=function(g){B(this,J,P)&&B(this,J,P).dispose(),this.uniforms.x.value=g,this.uniformsNeedUpdate=!0},HA=function(){return this.uniforms.y.value},YI=function(g){B(this,J,HA)&&B(this,J,HA).dispose(),this.uniforms.y.value=g,this.uniformsNeedUpdate=!0},PI=function(g,A,I,Q){for(let C=0;C<g.numClouds();++C){const D=g.getCloudAt(C);A&&D.fillPendingCovariancesData(A),I&&D.fillPendingPositionsData(I),Q&&D.fillPendingColorsData(Q)}},sI=new WeakSet,jI=function(){const g=Xg.merge([{S:{value:null},R:{value:null},x:{value:null},y:{value:null},t:{value:new w.Vector2},w:{value:new w.Vector2},z:{value:.1},f:{value:new w.Vector3}},Og.fog]),A={MAX_SCENES:wI.MaxScenes,TWOTPS:1,ETWOTPS:1,TPS:1};return{uniforms:g,defines:A}},o(qg,sI);let yQ=qg;const MQ=RQ,JQ=kQ,hQ={type:"change"};class jA extends w.EventDispatcher{constructor(){super(),c(this,"_uniforms"),c(this,"_defines"),this._uniforms=[],this._defines=[]}get uniforms(){return this._uniforms}get defines(){return this._defines}dispose(){}init(A){}update(A,I){}dispatchChange(){this.dispatchEvent(hQ)}}var b=(g=>(g.IDLE="idle",g.PLAYING="playing",g.COMPLETED="completed",g))(b||{});class fA extends jA{constructor(){super(...arguments),c(this,"disposeOnComplete",!0),o(this,oA,b.IDLE)}get state(){return B(this,oA)}play(){B(this,oA)==b.IDLE&&this.setState(b.PLAYING)}stop(){B(this,oA)==b.PLAYING&&this.setState(b.IDLE)}setState(A){i(this,oA,A),this.dispatchEvent({type:"stateChanged",state:A})}}oA=new WeakMap;const cQ={type:"refresh"},OI=class Tg extends w.Mesh{constructor(A){var I;super(y(I=Tg,_A,LI).call(I,0),new yQ),o(this,L),c(this,"isGaussianSplattingGroup",!0),c(this,"boundingBox",null),c(this,"gaussianState"),o(this,j),o(this,n,!1),o(this,CA),o(this,NA),o(this,vA),o(this,qA),o(this,FA),o(this,dA),o(this,KI,(()=>{const Q=new w.Vector2,C=new w.Vector2,D=new w.Vector2;return(G,N)=>{G.getSize(C);let R=G.getPixelRatio();if(G.xr.isPresenting&&(R*=window.devicePixelRatio/R),C.multiplyScalar(R),D.set(N.projectionMatrix.elements[0]*C.x*.5,N.projectionMatrix.elements[5]*C.y*.5),!D.equals(Q)||B(this,n)){N instanceof w.PerspectiveCamera&&(N.aspect=C.x/C.y,N.updateProjectionMatrix()),Q.copy(D);const k=this.material;k.basisViewport=C,k.focalLength=D}}})()),o(this,HI,(()=>{let Q=new w.Vector3;return C=>{const D=this.material;B(this,FA).copy(this.matrixWorld).invert().multiply(C.matrixWorld),Q.setFromMatrixPosition(B(this,FA)),(!Q.equals(D.cameraPosition)||B(this,n))&&(D.cameraPosition=Q),C instanceof w.PerspectiveCamera&&(C.near!=D.cameraNear||B(this,n))&&(D.cameraNear=C.near)}})()),this.type="GaussianSplattingGroup",i(this,vA,(A?.useSharedMemory??!0)&&crossOriginIsolated),i(this,NA,A?.dynamicMode??!1),i(this,qA,A?.useStates??!1),i(this,j,new NQ(B(this,NA),B(this,vA))),B(this,j).addEventListener(XI.INIT,y(this,L,_I).bind(this)),B(this,j).addEventListener(XI.READY,y(this,L,$I).bind(this)),this.frustumCulled=!1,i(this,FA,new w.Matrix4),i(this,CA,()=>{y(this,L,tA).call(this)})}set fx(A){A instanceof jA&&(A=[A]),y(this,L,aI).call(this,B(this,dA),A),i(this,dA,A)}get fx(){return B(this,dA)}add(...A){let I=0;if(this.children.length>0){const C=this.children[this.children.length-1];I=C.globalSplatOffset+C.buffer.getGaussianCount()}const Q=this.children.length;for(const C of A)C.isGaussianCloud&&(C.globalSplatOffset=I,I+=C.buffer.getGaussianCount(),super.add(C));return Q!==this.children.length&&i(this,n,!0),this}remove(...A){const I=this.children.length;for(const Q of A)Q.isGaussianCloud&&super.remove(Q);return I!==this.children.length&&i(this,n,!0),this}removeCloudAt(A){if(A<0||A>=this.children.length)throw new Error("SplatMesh::getScene() -> Invalid scene index.");return this.remove(this.getCloudAt(A)),i(this,n,!0),this}getCloudAt(A){if(A<0||A>=this.children.length)throw new Error("SplatMesh::getScene() -> Invalid scene index.");return this.children[A]}numClouds(){return this.children.length}getGaussianCount(){return this.children.reduce((A,I)=>A+I.buffer.getGaussianCount(),0)}computeBoundingBox(){this.boundingBox===null?this.boundingBox=new w.Box3:this.boundingBox.makeEmpty();for(const A of this.children){const I=A;I.boundingBox===null&&I.computeBoundingBox();const Q=I.boundingBox.applyMatrix4(I.matrix);this.boundingBox.union(Q)}}raycast(A,I){}dispose(){y(this,L,mI).call(this),B(this,j).dispose(),i(this,n,!0)}invalidateState(){B(this,qA)&&(this.material.invalidateState(),y(this,L,tA).call(this))}onBeforeRender(A,I,Q){B(this,n)&&(this.dispose(),this.numClouds()>0&&y(this,L,fI).call(this)),this.children.length!==0&&(B(this,HI).call(this,Q),B(this,KI).call(this,A,Q),y(this,L,zI).call(this),y(this,L,eI).call(this,Q),y(this,L,uI).call(this,I),B(this,j).update(B(this,FA)),i(this,n,!1))}};j=new WeakMap,n=new WeakMap,CA=new WeakMap,NA=new WeakMap,vA=new WeakMap,qA=new WeakMap,FA=new WeakMap,dA=new WeakMap,_A=new WeakSet,LI=function(g){const A=new w.InstancedBufferGeometry;A.setIndex([0,1,2,0,2,3]);const I=new w.BufferAttribute(new Float32Array([-2,-2,2,-2,2,2,2,2,-2,2,-2,-2]),3);A.setAttribute("position",I),A.boundingSphere=new w.Sphere(new w.Vector3,1),I.needsUpdate=!0;const Q=new Int32Array(g),C=new w.InstancedBufferAttribute(Q,1,!1);return C.setUsage(w.DynamicDrawUsage),C.gpuType=w.IntType,A.setAttribute("v",C),A.instanceCount=0,A},L=new WeakSet,fI=function(){var g;const A=this.getGaussianCount();this.geometry=y(g=OI,_A,LI).call(g,A),this.material.dynamicMode=B(this,NA),this.material.useStates=B(this,qA),this.material.halfPrecisionPositions=EI(),this.material.buildTextures(this),this.gaussianState=this.material.stateBuffer,this.fx&&y(this,L,aI).call(this,void 0,this.fx),B(this,j).init(A)},aI=function(g,A){g=g??[],A=A??[];const I=g.filter(C=>!A.includes(C)),Q=A.filter(C=>!g.includes(C));if(this.material&&(Q.length>0||I.length>0)){for(const C of I){if(C.uniforms)for(const D of C.uniforms)delete this.material.uniforms[D];if(C.defines)for(const D of C.defines)delete this.material.defines[D];C.removeEventListener("change",B(this,CA)),C instanceof fA&&C.removeEventListener("stateChanged",B(this,CA))}for(const C of Q)C.init(this.material),C.addEventListener("change",B(this,CA)),C instanceof fA&&C.addEventListener("stateChanged",B(this,CA));this.material.needsUpdate=!0}},tA=function(){this.dispatchEvent(cQ)},mI=function(){this.geometry.dispose(),this.material&&this.material.dispose()},rI=function(g,A){const I=this.geometry,Q=I.attributes.v;Q.set(g,0),Q.addUpdateRange(0,g.length),Q.needsUpdate=!0,I.instanceCount=A},zI=function(){const g=this.material;let A=!1;for(let I=0;I<this.children.length;I++){const Q=this.children[I];Q.matrixNeedsUpdate&&(Q.updateMatrix(),B(this,NA)&&g.setTransform(Q.matrix,I),A=!0)}A&&this.boundingBox!==null&&this.computeBoundingBox()},KI=new WeakMap,HI=new WeakMap,eI=function(g){if(this.fx)for(let A=this.fx.length-1;A>=0;--A){const I=this.fx[A];if(I instanceof fA&&I.state===b.COMPLETED&&I.disposeOnComplete){I.dispose();const Q=this.fx.concat();Q.splice(A,1),this.fx=Q}I.update(this,g)}},uI=function(g){const A=this.material;A.fog=g.fog!==null,A.fogExp2=g.fog!==null&&g.fog.isFogExp2},vI=function(){const g=EI()?Uint16Array:Float32Array,A=new g(this.getGaussianCount()*3);let I=0;for(const Q of this.children){const C=Q,D=C.buffer.getGaussianCount()*3,G=new g(YA().buffer,C.buffer.getPositionsBufferPtr(),D);A.set(G,I),I+=D}return A},_I=function(g){B(this,j).addPositions(y(this,L,vI).call(this),0,EI()),this.computeBoundingBox(),B(this,j).setBounds(this.boundingBox.min,this.boundingBox.max),y(this,L,tA).call(this)},$I=function(g){const A=g.data;y(this,L,rI).call(this,A.indices,A.renderCount),y(this,L,tA).call(this)},o(OI,_A);let SQ=OI;const dg=new w.Matrix4,GI=new w.Ray;class tg extends w.Object3D{constructor(A){super(),o(this,VA),c(this,"isGaussianCloud",!0),c(this,"buffer"),c(this,"centerRadiusStep"),c(this,"centerRadiusList"),c(this,"sceneCenter"),c(this,"globalSplatOffset",0),c(this,"matrixNeedsUpdate",!0),c(this,"boundingBox",null),o(this,$A,0),o(this,AI,0),o(this,II,0),this.buffer=A,this.frustumCulled=!1,this.type="GaussianCloud",this.centerRadiusList=A.getCenterRadiusList(),this.centerRadiusStep=A.getCenterRadiusStep();const I=A.getSceneCenter();this.sceneCenter=new w.Vector3(I[0],I[1],I[2])}get gaussianState(){const A=this.parent;if(A&&A.gaussianState)return new Uint8Array(A.gaussianState.buffer,this.globalSplatOffset,this.buffer.getGaussianCount())}get metadata(){return JSON.parse(this.buffer.getMetadata())}dispose(){this.buffer&&this.buffer.free()}computeBoundingBox(){this.boundingBox===null?this.boundingBox=new w.Box3:this.boundingBox.makeEmpty();let A=this.buffer.getBoundsMin(),I=this.buffer.getBoundsMax();return this.boundingBox.set(new w.Vector3(A[0],A[1],A[2]),new w.Vector3(I[0],I[1],I[2])),this.boundingBox}raycast(A,I){if(dg.copy(this.matrixWorld).invert(),GI.copy(A.ray).applyMatrix4(dg),this.boundingBox===null&&this.computeBoundingBox(),!GI.intersectsBox(this.boundingBox))return;const Q=this.buffer.raycast(GI.origin,GI.direction,!1,A.firstHitOnly??!1);for(const C of Q)C.distance>=A.near&&C.distance<=A.far&&I.push({distance:C.distance,point:new w.Vector3().set(C.point.x,C.point.y,C.point.z).applyMatrix4(this.matrixWorld),object:this,instanceId:C.index}),C.point.free(),C.free()}updateMatrix(){this.matrixNeedsUpdate&&(super.updateMatrix(),this.matrixNeedsUpdate=!1)}fillPendingPositionsData(A){const I=this.buffer.getLoadedPositionsCount();y(this,VA,gI).call(this,A,wg()/A.BYTES_PER_ELEMENT,B(this,$A),I,this.buffer.getPositionsBufferPtr()),i(this,$A,I)}fillPendingColorsData(A){const I=this.buffer.getLoadedColorsCount();y(this,VA,gI).call(this,A,Gg()/A.BYTES_PER_ELEMENT,B(this,AI),I,this.buffer.getColorsBufferPtr()),i(this,AI,I)}fillPendingCovariancesData(A){const I=this.buffer.getLoadedCovariancesCount();y(this,VA,gI).call(this,A,og()/A.BYTES_PER_ELEMENT,B(this,II),I,this.buffer.getCovariancesBufferPtr()),i(this,II,I)}invalidateState(){const A=this.parent;A&&A.invalidateState()}}$A=new WeakMap,AI=new WeakMap,II=new WeakMap,VA=new WeakSet,gI=function(g,A,I,Q,C){const D=Q-I;if(D>0){let G=Object.getPrototypeOf(g).constructor,N=new G(YA().buffer,C+I*A,D*A);g.set(N,(this.globalSplatOffset+I)*A)}};var Vg=(g=>(g[g.NONE=0]="NONE",g[g.SELECTED=1]="SELECTED",g[g.DELETED=2]="DELETED",g[g.HIDDEN=4]="HIDDEN",g[g.HOVERED=8]="HOVERED",g))(Vg||{});const mA=class sA extends w.Loader{constructor(A){super(A),o(this,QI),o(this,TA),i(this,TA,Math.min(navigator.hardwareConcurrency,4))}setWorkerLimit(A){return i(this,TA,A),this}async load(A,I,Q,C){if(B(sA,RA)){B(sA,xA).push({url:A,onLoad:I,onProgress:Q,onError:C,loader:this});return}i(sA,RA,!0),await ag(B(this,TA)),Ng(A,(D,G)=>{Q&&Q(new ProgressEvent("progress",{loaded:D,total:G}))}).then(D=>{i(sA,RA,!1);let G=new tg(D);y(this,QI,qI).call(this),I(G)}).catch(D=>{i(sA,RA,!1),y(this,QI,qI).call(this),C&&C(D)})}};xA=new WeakMap,RA=new WeakMap,TA=new WeakMap,QI=new WeakSet,qI=function(){if(B(mA,xA).length>0){let g=B(mA,xA).shift();g.loader.load(g.url,g.onLoad,g.onProgress,g.onError)}},o(mA,xA,[]),o(mA,RA,!1);let YQ=mA;class sQ extends jA{constructor(){super(),o(this,CI),o(this,BA,.3),o(this,UA,!1),o(this,kA,!0),this._uniforms.push("u"),this._defines.push("COVAA","NAA"),y(this,CI,dI).call(this)}get value(){return B(this,BA)}set value(A){A=Math.max(0,Math.min(1,A)),B(this,BA)!=A&&(i(this,BA,A),i(this,kA,!0),this.dispatchChange())}get native(){return B(this,UA)}set native(A){B(this,UA)!=A&&(i(this,UA,A),i(this,kA,!0),this.dispatchChange())}init(A){A.uniforms.u={value:B(this,BA)},A.defines[this._defines[0]]=1}update(A,I){const Q=A.material;B(this,kA)&&(B(this,UA)?(Q.defines.NAA=1,Q.needsUpdate=!0):(Q.defines.NAA&&(delete Q.defines.NAA,Q.needsUpdate=!0),Q.uniforms.u.value=B(this,BA),Q.uniformsNeedUpdate=!0),i(this,kA,!1))}}BA=new WeakMap,UA=new WeakMap,kA=new WeakMap,CI=new WeakSet,dI=function(){var g,A;const I=new lI;I.isActive()?((g=I.ui)==null||g.add(this,"value",0,1,.01).name("Antialias"),(A=I.ui)==null||A.add(this,"native",!1).name("Native Antialias")):I.addEventListener("change",Q=>{y(this,CI,dI).call(this)})};class LQ extends jA{constructor(){super(),o(this,DA),o(this,EA,3),o(this,f),o(this,z),o(this,_),o(this,$),o(this,yA,!0),o(this,MA,!1),this._uniforms.push("R"),this._defines.push("SH","SH1","SH2","SH3","SHCB16","TWOTPS_SH","TPS_SH","ETWOTPS_SH");for(let A=0;A<15;A++)this._defines.push(`SHL${A}`),this._defines.push(`SHH${A}`);y(this,DA,tI).call(this)}get maxDegree(){return B(this,EA)}set maxDegree(A){B(this,EA)!=A&&(i(this,EA,A),i(this,yA,!0),this.dispatchChange())}init(A){A.uniforms.R={value:void 0}}dispose(){B(this,f)&&(B(this,f).dispose(),i(this,f,void 0)),B(this,z)&&(B(this,z).dispose(),i(this,z,void 0)),B(this,_)&&(B(this,_).dispose(),i(this,_,void 0)),B(this,$)&&(B(this,$).dispose(),i(this,$,void 0))}update(A,I){const Q=A.material;if(!B(this,f)&&!B(this,z)&&!B(this,_)&&!B(this,$)&&(i(this,MA,A.children.some(C=>{if(C.isGaussianCloud){const D=C;return D.buffer.getSHCBCount()==0&&D.buffer.getSHDegree()>0}return!1})),B(this,MA)?(y(this,DA,gg).call(this,A),Q.uniforms.H={value:B(this,z)},Q.uniforms.A={value:B(this,_)},Q.uniforms.B={value:B(this,$)},i(this,yA,!0)):(y(this,DA,Ig).call(this,A),y(this,DA,Ag).call(this,A),Q.uniforms.R={value:B(this,f)}),Q.uniformsNeedUpdate=!0),B(this,yA)){for(const C of this._defines)delete Q.defines[C];if(B(this,EA)>0){Q.defines.SH=1,B(this,MA)||(Q.defines.SHCB16=1);for(let C=0;C<B(this,EA);C++)Q.defines[`SH${C+1}`]=1}if(B(this,MA)){const C=B(this,z).image.width,D=C-1,G=Math.floor(Math.log2(C));Q.defines.TWOTPS_SH=D,Q.defines.ETWOTPS_SH=G}Q.needsUpdate=!0,i(this,yA,!1)}}}EA=new WeakMap,f=new WeakMap,z=new WeakMap,_=new WeakMap,$=new WeakMap,yA=new WeakMap,MA=new WeakMap,DA=new WeakSet,tI=function(){var g;const A=new lI;A.isActive()?(g=A.ui)==null||g.add(this,"maxDegree",0,3,1).name("SH degree"):A.addEventListener("change",I=>{y(this,DA,tI).call(this)})},Ag=function(g){const A=g.getGaussianCount();let I=0;const Q=new Uint16Array(A);for(let D=0,G=g.numClouds();D<G;++D){const N=g.getCloudAt(D),R=N.buffer.getGaussianCount(),k=new Uint16Array(YA().buffer,N.buffer.getShCoeffsIndicesBufferPtr(),R);Q.set(k,I),I+=R}g.material.fillSHIndices(Q)},Ig=function(g){let D=0;for(let h=0,l=g.numClouds();h<l;++h){const d=g.getCloudAt(h);D+=d.buffer.getSHCBCount()}const G=1024/4,N=new w.Vector2(1024,Math.max(Math.ceil(D/G)*4,1)),R=new Uint16Array(N.x*N.y*3);let k=0;for(let h=0,l=g.numClouds();h<l;++h){const d=g.getCloudAt(h),K=d.buffer.getSHCBCount(),t=new Uint16Array(YA().buffer,d.buffer.getShCoeffsCBBufferPtr(),K*45);for(let T=0;T<K;++T){const s=T+k,X=s%G,V=Math.floor(s/G);let W=s*45;for(let S=0;S<4;++S){const gA=(V*4+S)*1024*3;for(let r=0;r<4;++r){const M=(X*4+r)*3,F=gA+M;R[F]=t[W++],R[F+1]=t[W++],R[F+2]=t[W++]}}}k+=K}i(this,f,new w.DataTexture(R,N.x,N.y,w.RGBFormat,w.HalfFloatType)),B(this,f).internalFormat="RGB16F",B(this,f).needsUpdate=!0},gg=function(g){let Q=g.getGaussianCount();const D=g.material.computeTextureInfo(Q,4,15),G=D.dataLength*4,N=new Uint8Array(G),R=new Uint8Array(G),k=new Uint8Array(G),h=Math.floor(.5*255);for(let d=0,K=g.numClouds();d<K;++d){const t=g.getCloudAt(d),T=t.buffer.getSHCBCount(),s=t.buffer.getSHDegree(),V=((s+1)*(s+1)-1)*3,W=t.buffer.getGaussianCount();if(s<3&&(k.fill(h,0,W*D.paddedElementsPerSplat),s<2&&(R.fill(h,0,W*D.paddedElementsPerSplat),s<1&&N.fill(h,0,W*D.paddedElementsPerSplat))),T==0){const S=new Uint8Array(YA().buffer,t.buffer.getShCoeffsBufferPtr(),W*V),gA=s>1?15:12,r=s>2?15:12,M=s==3?15:12;let F=0;for(let x=0;x<W;++x)if(s>=1){const Y=x*D.paddedElementsPerSplat;F=x*V;for(let U=0;U<gA;U+=4,F+=4)N[Y+U]=S[F+3],N[Y+U+1]=S[F+2],N[Y+U+2]=S[F+1],N[Y+U+3]=S[F];if(s>=2){F--;for(let U=0;U<r;U+=4,F+=4)R[Y+U]=S[F+3],R[Y+U+1]=S[F+2],R[Y+U+2]=S[F+1],R[Y+U+3]=S[F];if(s==3){F--;for(let U=0;U<M;U+=4,F+=4)k[Y+U]=S[F+3],k[Y+U+1]=S[F+2],k[Y+U+2]=S[F+1],k[Y+U+3]=S[F]}else for(let U=r;U<D.paddedElementsPerSplat;++U)R[Y+U]=h}else for(let U=gA;U<D.paddedElementsPerSplat;++U)N[Y+U]=h}}}const l=[N,R,k].map(d=>{const K=new w.DataTexture(new Uint32Array(d.buffer),D.width,D.height,w.RGBAIntegerFormat,w.UnsignedIntType);return K.internalFormat="RGBA32UI",K.needsUpdate=!0,K});i(this,z,l[0]),i(this,_,l[1]),i(this,$,l[2])};class aQ extends fA{constructor(){super(),o(this,BI),c(this,"sparseFadeFactor",.1),c(this,"denseFadeFactor",.1),c(this,"denseTimeDelay",3),c(this,"speedFactor",.25),c(this,"minimumPointSize",2),o(this,p),o(this,AA,0),o(this,iA,0),o(this,pA,0),o(this,JA,0),o(this,hA,0),o(this,ZA,0),o(this,cA,0),o(this,SA,0),o(this,lA,0),this._uniforms.push("D","i","p","n"),this._defines.push("RFIA","RFIA_SS")}dispose(){super.dispose(),B(this,p)&&(B(this,p).stop(),i(this,p,void 0))}stop(){this.state==b.PLAYING&&(i(this,AA,0),i(this,iA,0),i(this,pA,0),i(this,JA,0),i(this,hA,0),i(this,ZA,0),i(this,cA,0),i(this,SA,0),i(this,lA,0),B(this,p)&&(B(this,p).stop(),i(this,p,void 0))),super.stop()}init(A){A.uniforms.D={value:new w.Vector2},A.uniforms.i={value:new w.Vector2},A.uniforms.p={value:new w.Vector2},A.uniforms.n={value:new w.Vector3},A.defines[this._defines[0]]=1}update(A,I){if(this.state!=b.PLAYING)return;const Q=A.getCloudAt(0),C=Q.buffer,D=A.material;B(this,p)||(i(this,p,new w.Clock),this.speedFactor=xI.clamp(this.speedFactor,.01,1),this.sparseFadeFactor=xI.clamp(this.sparseFadeFactor,0,.99),this.denseFadeFactor=xI.clamp(this.denseFadeFactor,0,.99),D.uniforms.n.value.copy(Q.sceneCenter.clone()),D.defines[this._defines[1]]!=this.minimumPointSize&&(D.defines[this._defines[1]]=this.minimumPointSize,D.needsUpdate=!0));const G=C.getMaximumRadius()*1.05;if(B(this,AA)>=.99&&B(this,iA)>=.99&&B(this,hA)>=G&&B(this,SA)>=G){B(this,p).stop(),i(this,p,void 0),this.setState(b.COMPLETED);return}const N=Math.max(C.getCurrentRadius(),.001),R=B(this,p).getElapsedTime();i(this,AA,B(this,AA)*.9+N*.1),i(this,iA,B(this,iA)*.95+N*.05),i(this,pA,1/(B(this,AA)-B(this,iA)));let k=Math.max(y(this,BI,VI).call(this,R)*G,.001);i(this,JA,k*(1+this.sparseFadeFactor)),i(this,hA,k*(1-this.sparseFadeFactor)),i(this,ZA,1/(B(this,JA)-B(this,hA))),k=Math.max(y(this,BI,VI).call(this,Math.max(R-this.denseTimeDelay,0))*G,.001),i(this,cA,k*(1+this.denseFadeFactor)),i(this,SA,k*(1-this.denseFadeFactor)),i(this,lA,1/(B(this,cA)-B(this,SA))),D.uniforms.i.value.set(B(this,AA),B(this,pA)),D.uniforms.p.value.set(B(this,JA),B(this,ZA)),D.uniforms.D.value.set(B(this,cA),B(this,lA)),D.uniformsNeedUpdate=!0,this.dispatchChange()}}p=new WeakMap,AA=new WeakMap,iA=new WeakMap,pA=new WeakMap,JA=new WeakMap,hA=new WeakMap,ZA=new WeakMap,cA=new WeakMap,SA=new WeakMap,lA=new WeakMap,BI=new WeakSet,VI=function(g){return Math.pow(g*this.speedFactor,2.5)},new w.Matrix4,new w.Euler(0,0,0,"YXZ"),new w.Quaternion,new w.Vector3;const KQ="0.1.39";export{fA as AnimationFx,sQ as AntialiasingFx,jA as Fx,tg as GaussianCloud,YQ as GaussianCloudLoader,SQ as GaussianSplattingGroup,Vg as GaussianState,aQ as RadialFadeInAnimationFx,LQ as SphericalHarmonicsFx,b as StateFx,KQ as version};

Anon7 - 2022
AnonSec Team