2 lines
7.3 KiB
JavaScript
2 lines
7.3 KiB
JavaScript
|
define(["./arrayFill-4513d7ad","./arrayRemoveDuplicates-d2f048c5","./buildModuleUrl-4e1b81e7","./Cartographic-3309dd0d","./Check-7b2a090c","./ComponentDatatype-c140a87d","./PolylineVolumeGeometryLibrary-9eff1196","./CorridorGeometryLibrary-3fc03967","./when-b60132fc","./Cartesian2-47311507","./GeometryAttribute-3a88ba31","./GeometryAttributes-252e9929","./GeometryOffsetAttribute-fbeb6f1a","./IndexDatatype-8a5eead4","./Math-119be1a3","./PolygonPipeline-660e1625","./PrimitiveType-a54dc62f","./Event-16a2dfbf","./RuntimeError-4a5c8994","./WebGLConstants-4ae0db90","./Cartesian4-3ca25aab","./EllipsoidTangentPlane-edb321d3","./IntersectionTests-7386ffbf","./Plane-7ae8294c","./PolylinePipeline-2fe9092e","./EllipsoidGeodesic-0f19ac62","./EllipsoidRhumbLine-ed1a6bf4","./FeatureDetection-c3b71206","./earcut-2.2.1-20c8012f"],(function(e,t,i,r,o,a,n,s,l,d,u,p,f,h,y,c,g,b,v,m,A,_,E,C,G,P,T,w,L){"use strict";var D=new r.Cartesian3,k=new r.Cartesian3,N=new r.Cartesian3;function O(e,t){var i,o,d,f=[],y=e.positions,c=e.corners,g=e.endPositions,b=new p.GeometryAttributes,v=0,m=0,A=0;for(o=0;o<y.length;o+=2)v+=d=y[o].length-3,A+=d/3*4,m+=y[o+1].length-3;for(v+=3,m+=3,o=0;o<c.length;o++){i=c[o];var _=c[o].leftPositions;l.defined(_)?(v+=d=_.length,A+=d/3*2):(m+=d=c[o].rightPositions.length,A+=d/3*2)}var E,C=l.defined(g);C&&(v+=E=g[0].length-3,m+=E,A+=4*(E/=3));var G,P,T,w,L,O,V=v+m,x=new Float64Array(V),H=0,I=V-1,M=E/2,S=h.IndexDatatype.createTypedArray(V/3,A+4),R=0;if(S[R++]=H/3,S[R++]=(I-2)/3,C){f.push(H/3),O=D,L=k;var F=g[0];for(o=0;o<M;o++)O=r.Cartesian3.fromArray(F,3*(M-1-o),O),L=r.Cartesian3.fromArray(F,3*(M+o),L),s.CorridorGeometryLibrary.addAttribute(x,L,H),s.CorridorGeometryLibrary.addAttribute(x,O,void 0,I),w=(P=H/3)+1,T=(G=(I-2)/3)-1,S[R++]=G,S[R++]=T,S[R++]=P,S[R++]=w,H+=3,I-=3}var U=0,B=y[U++],Y=y[U++];for(x.set(B,H),x.set(Y,I-Y.length+1),d=Y.length-3,f.push(H/3,(I-2)/3),o=0;o<d;o+=3)w=(P=H/3)+1,T=(G=(I-2)/3)-1,S[R++]=G,S[R++]=T,S[R++]=P,S[R++]=w,H+=3,I-=3;for(o=0;o<c.length;o++){var q,W,J=(i=c[o]).leftPositions,j=i.rightPositions,z=N;if(l.defined(J)){for(I-=3,W=T,f.push(w),q=0;q<J.length/3;q++)z=r.Cartesian3.fromArray(J,3*q,z),S[R++]=W-q-1,S[R++]=W-q,s.CorridorGeometryLibrary.addAttribute(x,z,void 0,I),I-=3;f.push(W-Math.floor(J.length/6)),t===n.CornerType.BEVELED&&f.push((I-2)/3+1),H+=3}else{for(H+=3,W=w,f.push(T),q=0;q<j.length/3;q++)z=r.Cartesian3.fromArray(j,3*q,z),S[R++]=W+q,S[R++]=W+q+1,s.CorridorGeometryLibrary.addAttribute(x,z,H),H+=3;f.push(W+Math.floor(j.length/6)),t===n.CornerType.BEVELED&&f.push(H/3-1),I-=3}for(B=y[U++],Y=y[U++],B.splice(0,3),Y.splice(Y.length-3,3),x.set(B,H),x.set(Y,I-Y.length+1),d=Y.length-3,q=0;q<Y.length;q+=3)P=(w=H/3)-1,G=(T=(I-2)/3)+1,S[R++]=G,S[R++]=T,S[R++]=P,S[R++]=w,H+=3,I-=3;H-=3,I+=3,f.push(H/3,(I-2)/3)}if(C){H+=3,I-=3,O=D,L=k;var K=g[1];for(o=0;o<M;o++)O=r.Cartesian3.fromArray(K,3*(E-o-1),O),L=r.Cartesian3.fromArray(K,3*o,L),s.CorridorGeometryLibrary.addAttribute(x,O,void 0,I),s.CorridorGeometryLibrary.addAttribute(x,L,H),P=(w=H/3)-1,G=(T=(I-2)/3)+1,S[R++]=G,S[R++]=T,S[R++]=P,S[R++]=w,H+=3,I-=3;f.push(H/3)}else f.push(H/3,(I-2)/3);return S[R++]=H/3,S[R++]=(I-2)/3,b.position=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:x}),{attributes:b,indices:S,wallIndices:f}}function V(e){var t=(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).positions,i=e.width,o=l.defaultValue(e.height,0),a=l.defaultValue(e.extrudedHeight,o);this._positions=t,this._ellipsoid=d.Ellipsoid.clone(l.defaultValue(e.ellipsoid,d.Ellipsoid.WGS84)),this._width=i,this._height=Math.max(o,a),this._extrudedHeight=Math.min(o,a),this._cornerType=l.defaultValue(e.cornerType,n.CornerType.ROUNDED),this._granularity=l.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*r.Cartesian3.packedLength+d.Ellipsoid.packedLength+6}V.pack=function(e,t,i){i=l.defaultValue(i,0);var o=e._positions,a=o.length;t[i++]=a;for(var n=0;n<a;++n,i+=r.Cartesian3.packedLength)r.C
|