createVectorTilePoints.js 1.1 KB

1
  1. define(["./AttributeCompression-e2e3f0dd","./Cartesian3-7e9cc2ff","./Matrix2-e3fb4559","./Math-5f585871","./createTaskProcessorWorker","./ComponentDatatype-aaeec80f","./defaultValue-81eec7ed","./Check-741c5f3c","./WebGLConstants-508b9636","./Matrix4-d34187af","./RuntimeError-26acdd3b"],(function(e,a,t,r,n,i,o,s,c,u,f){"use strict";const p=32767,l=new t.Cartographic,d=new a.Cartesian3,h=new t.Rectangle,m=new t.Ellipsoid,C={min:void 0,max:void 0};return n((function(n,i){const o=new Uint16Array(n.positions);!function(e){e=new Float64Array(e);let a=0;C.min=e[a++],C.max=e[a++],t.Rectangle.unpack(e,a,h),a+=t.Rectangle.packedLength,t.Ellipsoid.unpack(e,a,m)}(n.packedBuffer);const s=h,c=m,u=C.min,f=C.max,b=o.length/3,g=o.subarray(0,b),k=o.subarray(b,2*b),w=o.subarray(2*b,3*b);e.AttributeCompression.zigZagDeltaDecode(g,k,w);const y=new Float64Array(o.length);for(let e=0;e<b;++e){const n=g[e],i=k[e],o=w[e],h=r.CesiumMath.lerp(s.west,s.east,n/p),m=r.CesiumMath.lerp(s.south,s.north,i/p),C=r.CesiumMath.lerp(u,f,o/p),b=t.Cartographic.fromRadians(h,m,C,l),M=c.cartographicToCartesian(b,d);a.Cartesian3.pack(M,y,3*e)}return i.push(y.buffer),{positions:y.buffer}}))}));