基于廊坊系统为基础,国防科技大学系统演示Demo
surprise
2024-04-28 c310c155e3e91e6b285b3fb3519a3ef7c6690d66
1
define(["./Matrix2-52f9f880","./combine-0259f56f","./AttributeCompression-5e4af6de","./ComponentDatatype-a9820060","./IndexDatatype-1cbc8622","./createTaskProcessorWorker","./RuntimeError-ac440aa5","./defaultValue-69ee94f4","./PixelFormat-9ceadbf3","./WebGLConstants-f63312fc"],(function(e,a,t,n,r,s,i,o,c,f){"use strict";const u=32767,p=new e.Cartographic,l=new e.Cartesian3;const d=new e.Rectangle,C=new e.Ellipsoid,b=new e.Cartesian3,w={min:void 0,max:void 0};const y=new e.Cartesian3,h=new e.Cartesian3,k=new e.Cartesian3,m=new e.Cartesian3,A=new e.Cartesian3;return s((function(s,i){const o=new Uint16Array(s.positions),c=new Uint16Array(s.widths),f=new Uint32Array(s.counts),g=new Uint16Array(s.batchIds);!function(a){a=new Float64Array(a);let t=0;w.min=a[t++],w.max=a[t++],e.Rectangle.unpack(a,t,d),t+=e.Rectangle.packedLength,e.Ellipsoid.unpack(a,t,C),t+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(a,t,b)}(s.packedBuffer);const x=C,D=b,E=function(a,r,s,i,o){const c=a.length/3,f=a.subarray(0,c),d=a.subarray(c,2*c),C=a.subarray(2*c,3*c);t.AttributeCompression.zigZagDeltaDecode(f,d,C);const b=new Float64Array(a.length);for(let a=0;a<c;++a){const t=f[a],c=d[a],w=C[a],y=n.CesiumMath.lerp(r.west,r.east,t/u),h=n.CesiumMath.lerp(r.south,r.north,c/u),k=n.CesiumMath.lerp(s,i,w/u),m=e.Cartographic.fromRadians(y,h,k,p),A=o.cartographicToCartesian(m,l);e.Cartesian3.pack(A,b,3*a)}return b}(o,d,w.min,w.max,x),I=E.length/3,P=4*I-4,U=new Float32Array(3*P),F=new Float32Array(3*P),R=new Float32Array(3*P),T=new Float32Array(2*P),N=new Uint16Array(P);let M,L=0,S=0,_=0,v=0,G=f.length;for(M=0;M<G;++M){const a=f[M],t=c[M],n=g[M];for(let r=0;r<a;++r){let s;if(0===r){const a=e.Cartesian3.unpack(E,3*v,y),t=e.Cartesian3.unpack(E,3*(v+1),h);s=e.Cartesian3.subtract(a,t,k),e.Cartesian3.add(a,s,s)}else s=e.Cartesian3.unpack(E,3*(v+r-1),k);const i=e.Cartesian3.unpack(E,3*(v+r),m);let o;if(r===a-1){const t=e.Cartesian3.unpack(E,3*(v+a-1),y),n=e.Cartesian3.unpack(E,3*(v+a-2),h);o=e.Cartesian3.subtract(t,n,A),e.Cartesian3.add(t,o,o)}else o=e.Cartesian3.unpack(E,3*(v+r+1),A);e.Cartesian3.subtract(s,D,s),e.Cartesian3.subtract(i,D,i),e.Cartesian3.subtract(o,D,o);const c=r===a-1?2:4;for(let a=0===r?2:0;a<c;++a){e.Cartesian3.pack(i,U,L),e.Cartesian3.pack(s,F,L),e.Cartesian3.pack(o,R,L),L+=3;const r=a-2<0?-1:1;T[S++]=a%2*2-1,T[S++]=r*t,N[_++]=n}}v+=a}const W=r.IndexDatatype.createTypedArray(P,6*I-6);let B=0,O=0;for(G=I-1,M=0;M<G;++M)W[O++]=B,W[O++]=B+2,W[O++]=B+1,W[O++]=B+1,W[O++]=B+2,W[O++]=B+3,B+=4;i.push(U.buffer,F.buffer,R.buffer),i.push(T.buffer,N.buffer,W.buffer);let z={indexDatatype:2===W.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,currentPositions:U.buffer,previousPositions:F.buffer,nextPositions:R.buffer,expandAndWidth:T.buffer,batchIds:N.buffer,indices:W.buffer};if(s.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}(f);i.push(E.buffer,e.buffer),z=a.combine(z,{decodedPositions:E.buffer,decodedPositionOffsets:e.buffer})}return z}))}));