PageSourceSearch

https://tleideiaspaceview.vercel.app/cesium/Workers/createPolygonOutlineGeometry.js

js tleideiaspaceview.vercel.app collected 2026-10-03 07:53:47 UTC 6,983 bytes, 2 lines download raw bytes

1/*! For license information please see createPolygonOutlineGeometry.js.LICENSE.txt */
2import{a}from"./chunk-4FSR22QQ.js";import{a as P}from"./chunk-PRVWLZSS.js";import{a as F}from"./chunk-7H3BQ3FX.js";import{a as V}from"./chunk-VPTIX6XL.js";import"./chunk-KCM7BPUF.js";import"./chunk-PCPQUQVR.js";import{a as C}from"./chunk-H7AFCEEW.js";import{a as M}from"./chunk-4U4JDPPY.js";import"./chunk-D5QCMU6T.js";import{a as W,b as D}from"./chunk-X4HNF2DH.js";import"./chunk-ORULHQGP.js";import"./chunk-A4PR3MVA.js";import"./chunk-JKEOJFWC.js";import"./chunk-FWQONNTL.js";import{a as G}from"./chunk-Z7UZ2XGJ.js";import{a as B}from"./chunk-UA3N5FHD.js";import{b as U,c as S,d as w}from"./chunk-LN5LAAB6.js";import{c as x}from"./chunk-OXROQHTA.js";import"./chunk-GQG3G4OP.js";import"./chunk-4JSGO3Z7.js";import"./chunk-V62DYOIH.js";import{a as T}from"./chunk-54IT5KT4.js";import"./chunk-E6GK7MVP.js";import"./chunk-YQTAAITT.js";import{c as y}from"./chunk-WV2SHQ7E.js";import{a as v,c as j}from"./chunk-TODZU3UG.js";import{a as L}from"./chunk-3XRQCEHV.js";import{a as N,b as O}from"./chunk-VIWNLE3Z.js";import{e as E}from"./chunk-4TAASUQ2.js";var Y=[],k=[];function K(e,t,i,r,o){let n=M.fromPoints(t,e).projectPointsOntoPlane(t,Y);D.computeWindingOrder2D(n)===W.CLOCKWISE&&(n.reverse(),t=t.slice().reverse());let s,p,u=t.length,h=0;if(r)for(s=new Float64Array(2*u*3),p=0;p<u;p++){let e=t[p],i=t[(p+1)%u];s[h++]=e.x,s[h++]=e.y,s[h++]=e.z,s[h++]=i.x,s[h++]=i.y,s[h++]=i.z}else{let r=0;if(o===P.GEODESIC)for(p=0;p<u;p++)r+=a.subdivideLineCount(t[p],t[(p+1)%u],i);else if(o===P.RHUMB)for(p=0;p<u;p++)r+=a.subdivideRhumbLineCount(e,t[p],t[(p+1)%u],i);for(s=new Float64Array(3*r),p=0;p<u;p++){let r;o===P.GEODESIC?r=a.subdivideLine(t[p],t[(p+1)%u],i,k):o===P.RHUMB&&(r=a.subdivideRhumbLine(e,t[p],t[(p+1)%u],i,k));let n=r.length;for(let e=0;e<n;++e)s[h++]=r[e]}}u=s.length/3;let l=2*u,c=G.createTypedArray(u,l);for(h=0,p=0;p<u-1;p++)c[h++]=p,c[h++]=p+1;return c[h++]=u-1,c[h++]=0,new F({geometry:new S({attributes:new B({position:new w({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:s})}),indices:c,primitiveType:U.LINES})})}function q(e,t,i,r,o){let n=M.fromPoints(t,e).projectPointsOntoPlane(t,Y);D.computeWindingOrder2D(n)===W.CLOCKWISE&&(n.reverse(),t=t.slice().reverse());let s,p,u=t.length,h=new Array(u),l=0;if(r)for(s=new Float64Array(2*u*3*2),p=0;p<u;++p){h[p]=l/3;let e=t[p],i=t[(p+1)%u];s[l++]=e.x,s[l++]=e.y,s[l++]=e.z,s[l++]=i.x,s[l++]=i.y,s[l++]=i.z}else{let r=0;if(o===P.GEODESIC)for(p=0;p<u;p++)r+=a.subdivideLineCount(t[p],t[(p+1)%u],i);else if(o===P.RHUMB)for(p=0;p<u;p++)r+=a.subdivideRhumbLineCount(e,t[p],t[(p+1)%u],i);for(s=new Float64Array(3*r*2),p=0;p<u;++p){let r;h[p]=l/3,o===P.GEODESIC?r=a.subdivideLine(t[p],t[(p+1)%u],i,k):o===P.RHUMB&&(r=a.subdivideRhumbLine(e,t[p],t[(p+1)%u],i,k));let n=r.length;for(let e=0;e<n;++e)s[l++]=r[e]}}u=s.length/6;let c=h.length,y=2*(2*u+c),f=G.createTypedArray(u+c,y);for(l=0,p=0;p<u;++p)f[l++]=p,f[l++]=(p+1)%u,f[l++]=p+u,f[l++]=(p+1)%u+u;for(p=0;p<c;p++){let e=h[p];f[l++]=e,f[l++]=e+u}return new F({geometry:new S({attributes:new B({position:new w({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:s})}),indices:f,primitiveType:U.LINES})})}function A(e){if(O.typeOf.object("options",e),O.typeOf.object("options.polygonHierarchy",e.polygon
2Hierarchy),e.perPositionHeight&&E(e.height))throw new N("Cannot use both options.perPositionHeight and options.height");if(E(e.arcType)&&e.arcType!==P.GEODESIC&&e.arcType!==P.RHUMB)throw new N("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,i=e.ellipsoid??y.default,r=e.granularity??L.RADIANS_PER_DEGREE,o=e.perPositionHeight??!1,n=o&&E(e.extrudedHeight),s=e.arcType??P.GEODESIC,p=e.height??0,u=e.extrudedHeight??p;if(!n){let e=Math.max(p,u);u=Math.min(p,u),p=e}this._ellipsoid=y.clone(i),this._granularity=r,this._height=p,this._extrudedHeight=u,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,v)+y.packedLength+8}A.pack=function(e,t,i){return O.typeOf.object("value",e),O.defined("array",t),i=i??0,i=a.packPolygonHierarchy(e._polygonHierarchy,t,i,v),y.pack(e._ellipsoid,t,i),i+=y.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=e._offsetAttribute??-1,t[i]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};A.unpack=function(e,t,i){O.defined("array",e),t=t??0;let r=a.unpackPolygonHierarchy(e,t,v);t=r.startingIndex,delete r.startingIndex;let o=y.unpack(e,t,J);t+=y.packedLength;let n=e[t++],s=e[t++],p=e[t++],u=1===e[t++],h=1===e[t++],l=e[t++],c=e[t++],f=e[t];return E(i)||(i=new A(Q)),i._polygonHierarchy=r,i._ellipsoid=y.clone(o,i._ellipsoid),i._height=n,i._extrudedHeight=s,i._granularity=p,i._perPositionHeight=h,i._perPositionHeightExtrude=u,i._arcType=l,i._offsetAttribute=-1===c?void 0:c,i.packedLength=f,i},A.fromPositions=function(e){return e=e??j.EMPTY_OBJECT,O.defined("options.positions",e.positions),new A({polygon
2Hierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},A.createGeometry=function(e){let t=e._ellipsoid,i=e._granularity,r=e._polygonHierarchy,o=e._perPositionHeight,n=e._arcType,s=a.polygonOutlinesFromHierarchy(r,!o,t);if(0===s.length)return;let p,u,h,l=[],c=L.chordLength(i,t.maximumRadius),y=e._height,f=e._extrudedHeight;if(e._perPositionHeightExtrude||!L.equalsEpsilon(y,f,0,L.EPSILON2))for(h=0;h<s.length;h++){if(p=q(t,s[h],c,o,n),p.geometry=a.scaleToGeodeticHeightExtruded(p.geometry,y,f,t,o),E(e._offsetAttribute)){let t=p.geometry.attributes.position.values.length/3,i=new Uint8Array(t);e._offsetAttribute===C.TOP?i=i.fill(1,0,t/2):(u=e._offsetAttribute===C.NONE?0:1,i=i.fill(u)),p.geometry.attributes.applyOffset=new w({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}l.push(p)}else for(h=0;h<s.length;h++){if(p=K(t,s[h],c,o,n),p.geometry.attributes.position.values=D.scaleToGeodeticHeight(p.geometry.attributes.position.values,y,t,!o),E(e._offsetAttribute)){let t=p.geometry.attributes.position.values.length;u=e._offsetAttribute===C.NONE?0:1;let i=new Uint8Array(t/3).fill(u);p.geometry.attributes.applyOffset=new w({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}l.push(p)}let m=V.combineInstances(l)[0],d=x.fromVertices(m.attributes.position.values);return new S({attributes:m.attributes,indices:m.indices,primitiveType:m.primitiveType,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var z=A;function X(e,t){return E(t)&&(e=z.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),z.createGeometry(e)}var Oe=X;export{Oe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.