qa-prevention-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/createVectorTilePoints.js

2 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-01-02 14:12:39 +08:00
define(["./AttributeCompression-8f752c03","./Cartesian3-e0307675","./Cartesian2-bd414876","./Math-e73894ab","./Rectangle-cf3e0e3e","./createTaskProcessorWorker","./ComponentDatatype-aaeec80f","./defaultValue-81eec7ed","./Check-741c5f3c","./WebGLConstants-508b9636","./Matrix4-4c545f70","./RuntimeError-26acdd3b","./Matrix2-dc0c61cc","./when-422ea0ae"],(function(e,a,t,n,r,i,c,o,s,u,l,p,f,d){"use strict";const h=32767,C=new t.Cartographic,m=new a.Cartesian3,b=new r.Rectangle,g=new t.Ellipsoid,w={min:void 0,max:void 0};return i((function(i,c){const o=new Uint16Array(i.positions);!function(e){e=new Float64Array(e);let a=0;w.min=e[a++],w.max=e[a++],r.Rectangle.unpack(e,a,b),a+=r.Rectangle.packedLength,t.Ellipsoid.unpack(e,a,g)}(i.packedBuffer);const s=b,u=g,l=w.min,p=w.max,f=o.length/3,d=o.subarray(0,f),k=o.subarray(f,2*f),y=o.subarray(2*f,3*f);e.AttributeCompression.zigZagDeltaDecode(d,k,y);const M=new Float64Array(o.length);for(let e=0;e<f;++e){const r=d[e],i=k[e],c=y[e],o=n.CesiumMath.lerp(s.west,s.east,r/h),f=n.CesiumMath.lerp(s.south,s.north,i/h),b=n.CesiumMath.lerp(l,p,c/h),g=t.Cartographic.fromRadians(o,f,b,C),w=u.cartographicToCartesian(g,m);a.Cartesian3.pack(w,M,3*e)}return c.push(M.buffer),{positions:M.buffer}}))}));