UNPKG

bcgis-sdk

Version:

The SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications.

2 lines 1.2 kB
/*! For license information please see createVectorTilePoints.js.LICENSE.txt */ define(["./AttributeCompression-5b18be52","./Matrix3-edb29a7e","./Math-a304e2d6","./Matrix2-7a2bab7e","./createTaskProcessorWorker","./ComponentDatatype-e86a9f87","./defaultValue-135942ca","./WebGLConstants-fcb70ee3","./RuntimeError-f0dada00"],(function(e,a,t,r,n,o,i,s,c){"use strict";const u=32767,p=new a.Cartographic,l=new a.Cartesian3,f=new r.Rectangle,b=new a.Ellipsoid,d={min:void 0,max:void 0};return n((function(n,o){const i=new Uint16Array(n.positions);!function(e){e=new Float64Array(e);let t=0;d.min=e[t++],d.max=e[t++],r.Rectangle.unpack(e,t,f),t+=r.Rectangle.packedLength,a.Ellipsoid.unpack(e,t,b)}(n.packedBuffer);const s=f,c=b,m=d.min,h=d.max,C=i.length/3,g=i.subarray(0,C),w=i.subarray(C,2*C),k=i.subarray(2*C,3*C);e.AttributeCompression.zigZagDeltaDecode(g,w,k);const y=new Float64Array(i.length);for(let e=0;e<C;++e){const r=g[e],n=w[e],o=k[e],i=t.CesiumMath.lerp(s.west,s.east,r/u),f=t.CesiumMath.lerp(s.south,s.north,n/u),b=t.CesiumMath.lerp(m,h,o/u),d=a.Cartographic.fromRadians(i,f,b,p),C=c.cartographicToCartesian(d,l);a.Cartesian3.pack(C,y,3*e)}return o.push(y.buffer),{positions:y.buffer}}))}));