@jdultra/threedtiles 13.0.3 → 13.0.4

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.
@@ -181,7 +181,7 @@ void main() {
181
181
 
182
182
  gl_FragColor = vec4(pow(color.xyz,vec3(1.0/2.2)), color.w * pow(alpha, 1.8));
183
183
 
184
- }`,transparent:!0,side:d.FrontSide,depthTest:!1,depthWrite:!1,depthFunc:d.AlwaysDepth}),b=new d.InstancedBufferGeometry,l=new Float32Array([-.5,.5,0,.5,.5,0,-.5,-.5,0,.5,-.5,0]);b.setIndex([0,2,1,2,3,1]),b.setAttribute("position",new d.BufferAttribute(l,3));const h=new Uint32Array(A),f=new d.InstancedBufferAttribute(h,1,!1);f.needsUpdate=!0,f.setUsage(d.DynamicDrawUsage),b.setAttribute("order",f),b.instanceCount=0,super(b,n),this.orderAttribute=f,this.textureSize=512,this.numTextures=1,this.batchSize=t,this.maxSplats=A,this.colorRenderTarget=i,this.positionRenderTarget=s,this.cov1RenderTarget=o,this.cov2RenderTarget=c,this.renderer=e,this.sortID=0,this.freeAddresses=new Qe;for(let I=0;I<this.maxSplats;I+=t)this.freeAddresses.add(I);this.worker=new Worker(new URL("/assets/PointsManager.worker-5fpGpVvf.js",typeof document>"u"?require("url").pathToFileURL(__filename).href:Te&&Te.tagName.toUpperCase()==="SCRIPT"&&Te.src||new URL("threedtiles.cjs.js",document.baseURI).href),{type:"module"}),this.sortListeners=[],this.worker.onmessage=I=>{const p=new Uint32Array(I.data.order);if(p.length>this.orderAttribute.count){const B=new d.InstancedBufferGeometry,m=new Float32Array([-.5,.5,0,.5,.5,0,-.5,-.5,0,.5,-.5,0]),C=[0,2,1,2,3,1];B.setIndex(C),B.setAttribute("position",new d.BufferAttribute(m,3));const w=new Uint32Array(this.maxSplats),k=new d.InstancedBufferAttribute(w,1,!1);k.needsUpdate=!0,k.setUsage(d.DynamicDrawUsage),B.setAttribute("order",k),B.instanceCount=0,this.geometry.dispose(),this.geometry=B,this.orderAttribute=k}this.orderAttribute.clearUpdateRanges(),this.orderAttribute.set(p),this.orderAttribute.addUpdateRange(0,p.length),this.orderAttribute.needsUpdate=!0,this.geometry.instanceCount=I.data.count,this.geometry.needsUpdate=!0;for(let B=this.sortListeners.length-1;B>=0;B--)this.sortListeners[B](I.data.id)&&this.sortListeners.splice(B,1)},this.cameraPosition=new d.Vector3(0,0,0),this.rotateOnAxis(new d.Vector3(1,0,0),.5*Math.PI),this.frustumCulled=!1,this.copyMaterial2D=new d.ShaderMaterial({uniforms:{sourceTexture:{}},vertexShader:xa(),fragmentShader:`
184
+ }`,transparent:!0,side:d.FrontSide,depthTest:!1,depthWrite:!1,depthFunc:d.AlwaysDepth}),b=new d.InstancedBufferGeometry,l=new Float32Array([-.5,.5,0,.5,.5,0,-.5,-.5,0,.5,-.5,0]);b.setIndex([0,2,1,2,3,1]),b.setAttribute("position",new d.BufferAttribute(l,3));const h=new Uint32Array(A),f=new d.InstancedBufferAttribute(h,1,!1);f.needsUpdate=!0,f.setUsage(d.DynamicDrawUsage),b.setAttribute("order",f),b.instanceCount=0,super(b,n),this.orderAttribute=f,this.textureSize=512,this.numTextures=1,this.batchSize=t,this.maxSplats=A,this.colorRenderTarget=i,this.positionRenderTarget=s,this.cov1RenderTarget=o,this.cov2RenderTarget=c,this.renderer=e,this.sortID=0,this.freeAddresses=new Qe;for(let I=0;I<this.maxSplats;I+=t)this.freeAddresses.add(I);this.worker=new Worker(new URL(""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/assets/PointsManager.worker-5fpGpVvf.js").href:new URL("assets/PointsManager.worker-5fpGpVvf.js",document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),typeof document>"u"?require("url").pathToFileURL(__filename).href:Te&&Te.tagName.toUpperCase()==="SCRIPT"&&Te.src||new URL("threedtiles.cjs.js",document.baseURI).href),{type:"module"}),this.sortListeners=[],this.worker.onmessage=I=>{const p=new Uint32Array(I.data.order);if(p.length>this.orderAttribute.count){const B=new d.InstancedBufferGeometry,m=new Float32Array([-.5,.5,0,.5,.5,0,-.5,-.5,0,.5,-.5,0]),C=[0,2,1,2,3,1];B.setIndex(C),B.setAttribute("position",new d.BufferAttribute(m,3));const w=new Uint32Array(this.maxSplats),k=new d.InstancedBufferAttribute(w,1,!1);k.needsUpdate=!0,k.setUsage(d.DynamicDrawUsage),B.setAttribute("order",k),B.instanceCount=0,this.geometry.dispose(),this.geometry=B,this.orderAttribute=k}this.orderAttribute.clearUpdateRanges(),this.orderAttribute.set(p),this.orderAttribute.addUpdateRange(0,p.length),this.orderAttribute.needsUpdate=!0,this.geometry.instanceCount=I.data.count,this.geometry.needsUpdate=!0;for(let B=this.sortListeners.length-1;B>=0;B--)this.sortListeners[B](I.data.id)&&this.sortListeners.splice(B,1)},this.cameraPosition=new d.Vector3(0,0,0),this.rotateOnAxis(new d.Vector3(1,0,0),.5*Math.PI),this.frustumCulled=!1,this.copyMaterial2D=new d.ShaderMaterial({uniforms:{sourceTexture:{}},vertexShader:xa(),fragmentShader:`
185
185
  precision highp float;
186
186
 
187
187
  uniform sampler2D sourceTexture;