1 |
- define(["./Cartesian3-7e9cc2ff","./combine-3c023bda","./AttributeCompression-e2e3f0dd","./Matrix2-e3fb4559","./Math-5f585871","./IndexDatatype-f1e3f799","./createTaskProcessorWorker","./Check-741c5f3c","./defaultValue-81eec7ed","./ComponentDatatype-aaeec80f","./WebGLConstants-508b9636","./Matrix4-d34187af","./RuntimeError-26acdd3b"],(function(e,a,t,n,r,s,i,o,c,f,u,d,p){"use strict";const l=32767,C=new n.Cartographic,b=new e.Cartesian3;const h=new n.Rectangle,w=new n.Ellipsoid,y=new e.Cartesian3,k={min:void 0,max:void 0};const m=new e.Cartesian3,A=new e.Cartesian3,g=new e.Cartesian3,x=new e.Cartesian3,D=new e.Cartesian3;return i((function(i,o){const c=new Uint16Array(i.positions),f=new Uint16Array(i.widths),u=new Uint32Array(i.counts),d=new Uint16Array(i.batchIds);!function(a){a=new Float64Array(a);let t=0;k.min=a[t++],k.max=a[t++],n.Rectangle.unpack(a,t,h),t+=n.Rectangle.packedLength,n.Ellipsoid.unpack(a,t,w),t+=n.Ellipsoid.packedLength,e.Cartesian3.unpack(a,t,y)}(i.packedBuffer);const p=w,E=y,I=function(a,s,i,o,c){const f=a.length/3,u=a.subarray(0,f),d=a.subarray(f,2*f),p=a.subarray(2*f,3*f);t.AttributeCompression.zigZagDeltaDecode(u,d,p);const h=new Float64Array(a.length);for(let a=0;a<f;++a){const t=u[a],f=d[a],w=p[a],y=r.CesiumMath.lerp(s.west,s.east,t/l),k=r.CesiumMath.lerp(s.south,s.north,f/l),m=r.CesiumMath.lerp(i,o,w/l),A=n.Cartographic.fromRadians(y,k,m,C),g=c.cartographicToCartesian(A,b);e.Cartesian3.pack(g,h,3*a)}return h}(c,h,k.min,k.max,p),P=I.length/3,U=4*P-4,M=new Float32Array(3*U),R=new Float32Array(3*U),T=new Float32Array(3*U),F=new Float32Array(2*U),N=new Uint16Array(U);let L,S=0,_=0,v=0,G=0,W=u.length;for(L=0;L<W;++L){const a=u[L],t=f[L],n=d[L];for(let r=0;r<a;++r){let s;if(0===r){const a=e.Cartesian3.unpack(I,3*G,m),t=e.Cartesian3.unpack(I,3*(G+1),A);s=e.Cartesian3.subtract(a,t,g),e.Cartesian3.add(a,s,s)}else s=e.Cartesian3.unpack(I,3*(G+r-1),g);const i=e.Cartesian3.unpack(I,3*(G+r),x);let o;if(r===a-1){const t=e.Cartesian3.unpack(I,3*(G+a-1),m),n=e.Cartesian3.unpack(I,3*(G+a-2),A);o=e.Cartesian3.subtract(t,n,D),e.Cartesian3.add(t,o,o)}else o=e.Cartesian3.unpack(I,3*(G+r+1),D);e.Cartesian3.subtract(s,E,s),e.Cartesian3.subtract(i,E,i),e.Cartesian3.subtract(o,E,o);const c=r===a-1?2:4;for(let a=0===r?2:0;a<c;++a){e.Cartesian3.pack(i,M,S),e.Cartesian3.pack(s,R,S),e.Cartesian3.pack(o,T,S),S+=3;const r=a-2<0?-1:1;F[_++]=a%2*2-1,F[_++]=r*t,N[v++]=n}}G+=a}const B=s.IndexDatatype.createTypedArray(U,6*P-6);let O=0,z=0;for(W=P-1,L=0;L<W;++L)B[z++]=O,B[z++]=O+2,B[z++]=O+1,B[z++]=O+1,B[z++]=O+2,B[z++]=O+3,O+=4;o.push(M.buffer,R.buffer,T.buffer),o.push(F.buffer,N.buffer,B.buffer);let H={indexDatatype:2===B.BYTES_PER_ELEMENT?s.IndexDatatype.UNSIGNED_SHORT:s.IndexDatatype.UNSIGNED_INT,currentPositions:M.buffer,previousPositions:R.buffer,nextPositions:T.buffer,expandAndWidth:F.buffer,batchIds:N.buffer,indices:B.buffer};if(i.keepDecodedPositions){const e=function(e){const a=e.length,t=new Uint32Array(a+1);let n=0;for(let r=0;r<a;++r)t[r]=n,n+=e[r];return t[a]=n,t}(u);o.push(I.buffer,e.buffer),H=a.combine(H,{decodedPositions:I.buffer,decodedPositionOffsets:e.buffer})}return H}))}));
|