月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-08-11 5c63e3106bc4b82e06d280bf7fd44785f07ac56a
1
define(["./defaultValue-865ac579","./Matrix3-c381b58e","./ArcType-68098157","./Transforms-ea9ca02d","./Color-04057186","./ComponentDatatype-985dcc38","./GeometryAttribute-d025250e","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolylinePipeline-5d864480","./Matrix2-f88429ba","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidGeodesic-bce49915","./EllipsoidRhumbLine-62d76d47","./IntersectionTests-c82940c4","./Plane-c6962071"],(function(e,o,t,l,r,n,i,a,s,c,p,d,y,u,f,h,C,T,g){"use strict";function m(e,o,t,l,n,i,a){const s=p.PolylinePipeline.numberOfPoints(e,o,n);let c;const d=t.red,y=t.green,u=t.blue,f=t.alpha,h=l.red,C=l.green,T=l.blue,g=l.alpha;if(r.Color.equals(t,l)){for(c=0;c<s;c++)i[a++]=r.Color.floatToByte(d),i[a++]=r.Color.floatToByte(y),i[a++]=r.Color.floatToByte(u),i[a++]=r.Color.floatToByte(f);return a}const m=(h-d)/s,P=(C-y)/s,_=(T-u)/s,B=(g-f)/s;let b=a;for(c=0;c<s;c++)i[b++]=r.Color.floatToByte(d+c*m),i[b++]=r.Color.floatToByte(y+c*P),i[b++]=r.Color.floatToByte(u+c*_),i[b++]=r.Color.floatToByte(f+c*B);return b}function P(l){const n=(l=e.defaultValue(l,e.defaultValue.EMPTY_OBJECT)).positions,i=l.colors,a=e.defaultValue(l.colorsPerVertex,!1);this._positions=n,this._colors=i,this._colorsPerVertex=a,this._arcType=e.defaultValue(l.arcType,t.ArcType.GEODESIC),this._granularity=e.defaultValue(l.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(l.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+n.length*o.Cartesian3.packedLength;s+=e.defined(i)?1+i.length*r.Color.packedLength:1,this.packedLength=s+o.Ellipsoid.packedLength+3}P.pack=function(t,l,n){let i;n=e.defaultValue(n,0);const a=t._positions;let s=a.length;for(l[n++]=s,i=0;i<s;++i,n+=o.Cartesian3.packedLength)o.Cartesian3.pack(a[i],l,n);const c=t._colors;for(s=e.defined(c)?c.length:0,l[n++]=s,i=0;i<s;++i,n+=r.Color.packedLength)r.Color.pack(c[i],l,n);return o.Ellipsoid.pack(t._ellipsoid,l,n),n+=o.Ellipsoid.packedLength,l[n++]=t._colorsPerVertex?1:0,l[n++]=t._arcType,l[n]=t._granularity,l},P.unpack=function(t,l,n){let i;l=e.defaultValue(l,0);let a=t[l++];const s=new Array(a);for(i=0;i<a;++i,l+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(t,l);a=t[l++];const c=a>0?new Array(a):void 0;for(i=0;i<a;++i,l+=r.Color.packedLength)c[i]=r.Color.unpack(t,l);const p=o.Ellipsoid.unpack(t,l);l+=o.Ellipsoid.packedLength;const d=1===t[l++],y=t[l++],u=t[l];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=p,n._colorsPerVertex=d,n._arcType=y,n._granularity=u,n):new P({positions:s,colors:c,ellipsoid:p,colorsPerVertex:d,arcType:y,granularity:u})};const _=new Array(2),B=new Array(2),b={positions:_,height:B,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return P.createGeometry=function(d){const y=d._positions,u=d._colors,f=d._colorsPerVertex,h=d._arcType,C=d._granularity,T=d._ellipsoid,g=c.CesiumMath.chordLength(C,T.maximumRadius),P=e.defined(u)&&!f;let A;const E=y.length;let k,G,D,L,w=0;if(h===t.ArcType.GEODESIC||h===t.ArcType.RHUMB){let o,l,n;h===t.ArcType.GEODESIC?(o=c.CesiumMath.chordLength(C,T.maximumRadius),l=p.PolylinePipeline.numberOfPoints,n=p.PolylinePipeline.generateArc):(o=C,l=p.PolylinePipeline.numberOfPointsRhumbLine,n=p.PolylinePipeline.generateRhumbArc);const i=p.PolylinePipeline.extractHeights(y,T),a=b;if(h===t.ArcType.GEODESIC?a.minDistance=g:a.granularity=C,a.ellipsoid=T,P){let t=0;for(A=0;A<E-1;A++)t+=l(y[A],y[A+1],o)+1;k=new Float64Array(3*t),D=new Uint8Array(4*t),a.positions=_,a.height=B;let s=0;for(A=0;A<E-1;++A){_[0]=y[A],_[1]=y[A+1],B[0]=i[A],B[1]=i[A+1];const o=n(a);if(e.defined(u)){const e=o.length/3;L=u[A];for(let o=0;o<e;++o)D[s++]=r.Color.floatToByte(L.red),D[s++]=r.Color.floatToByte(L.green),D[s++]=r.Color.floatToByte(L.blue),D[s++]=r.Color.floatToByte(L.alpha)}k.set(o,w),w+=o.length}}else if(a.positions=y,a.height=i,k=new Float64Array(n(a)),e.defined(u)){for(D=new Uint8Array(k.length/3*4),A=0;A<E-1;++A){w=m(y[A],y[A+1],u[A],u[A+1],g,D,w)}const e=u[E-1];D[w++]=r.Color.floatToByte(e.red),D[w++]=r.Color.floatToByte(e.green),D[w++]=r.Color.floatToByte(e.blue),D[w++]=r.Color.floatToByte(e.alpha)}}else{G=P?2*E-2:E,k=new Float64Array(3*G),D=e.defined(u)?new Uint8Array(4*G):void 0;let t=0,l=0;for(A=0;A<E;++A){const n=y[A];if(P&&A>0&&(o.Cartesian3.pack(n,k,t),t+=3,L=u[A-1],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha)),P&&A===E-1)break;o.Cartesian3.pack(n,k,t),t+=3,e.defined(u)&&(L=u[A],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha))}}const V=new a.GeometryAttributes;V.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k}),e.defined(u)&&(V.color=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:D,normalize:!0})),G=k.length/3;const x=2*(G-1),S=s.IndexDatatype.createTypedArray(G,x);let I=0;for(A=0;A<G-1;++A)S[I++]=A,S[I++]=A+1;return new i.Geometry({attributes:V,indices:S,primitiveType:i.PrimitiveType.LINES,boundingSphere:l.BoundingSphere.fromPoints(y)})},function(t,l){return e.defined(l)&&(t=P.unpack(t,l)),t._ellipsoid=o.Ellipsoid.clone(t._ellipsoid),P.createGeometry(t)}}));