UNPKG

cong-gis-viewer

Version:

The minimal recommended setup for an app using Cesium with Webpack 5

2 lines 2.8 kB
/*! For license information please see createFrustumOutlineGeometry.js.LICENSE.txt */ import{a as k,b as _,c as j}from"./chunk-7CHZA2SK.js";import"./chunk-IQ5VZFOA.js";import"./chunk-BNIMZJFI.js";import{a as A}from"./chunk-ZV2BSYVW.js";import{b as N,c as g,d as F}from"./chunk-3WTHA73F.js";import{d as T}from"./chunk-MEAQKBL7.js";import{f as s}from"./chunk-RKBLQ2M4.js";import{a as b}from"./chunk-K3VQHMI6.js";import{a}from"./chunk-UTRPTI5S.js";import"./chunk-TFNGIACM.js";import"./chunk-ISVCOS3X.js";import"./chunk-XUAQFAMT.js";import{a as d}from"./chunk-OW23VKVW.js";import{b as h}from"./chunk-LKAZ42NI.js";import{e as w}from"./chunk-MYHWD27O.js";var L=0,C=1;function l(e){h.typeOf.object("options",e),h.typeOf.object("options.frustum",e.frustum),h.typeOf.object("options.origin",e.origin),h.typeOf.object("options.orientation",e.orientation);let t,n,r=e.frustum,o=e.orientation,i=e.origin,u=d(e._drawNearPlane,!0);r instanceof _?(t=L,n=_.packedLength):r instanceof k&&(t=C,n=k.packedLength),this._frustumType=t,this._frustum=r.clone(),this._origin=a.clone(i),this._orientation=s.clone(o),this._drawNearPlane=u,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+n+a.packedLength+s.packedLength}l.pack=function(e,t,n){h.typeOf.object("value",e),h.defined("array",t),n=d(n,0);let r=e._frustumType,o=e._frustum;return t[n++]=r,r===L?(_.pack(o,t,n),n+=_.packedLength):(k.pack(o,t,n),n+=k.packedLength),a.pack(e._origin,t,n),n+=a.packedLength,s.pack(e._orientation,t,n),t[n+=s.packedLength]=e._drawNearPlane?1:0,t};var E=new _,G=new k,R=new s,S=new a;l.unpack=function(e,t,n){h.defined("array",e),t=d(t,0);let r,o=e[t++];o===L?(r=_.unpack(e,t,E),t+=_.packedLength):(r=k.unpack(e,t,G),t+=k.packedLength);let i=a.unpack(e,t,S);t+=a.packedLength;let u=s.unpack(e,t,R),c=1===e[t+=s.packedLength];if(!w(n))return new l({frustum:r,origin:i,orientation:u,_drawNearPlane:c});let p=o===n._frustumType?n._frustum:void 0;return n._frustum=r.clone(p),n._frustumType=o,n._origin=a.clone(i,n._origin),n._orientation=s.clone(u,n._orientation),n._drawNearPlane=c,n},l.createGeometry=function(e){let t=e._frustumType,n=e._frustum,r=e._origin,a=e._orientation,o=e._drawNearPlane,i=new Float64Array(24);j._computeNearFarPlanes(r,a,t,n,i);let s,u,c=new A({position:new F({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:i})}),p=o?2:1,m=new Uint16Array(8*(p+1)),k=o?0:1;for(;k<2;++k)s=o?8*k:0,u=4*k,m[s]=u,m[s+1]=u+1,m[s+2]=u+1,m[s+3]=u+2,m[s+4]=u+2,m[s+5]=u+3,m[s+6]=u+3,m[s+7]=u;for(k=0;k<2;++k)s=8*(p+k),u=4*k,m[s]=u,m[s+1]=u+4,m[s+2]=u+1,m[s+3]=u+5,m[s+4]=u+2,m[s+5]=u+6,m[s+6]=u+3,m[s+7]=u+7;return new g({attributes:c,indices:m,primitiveType:N.LINES,boundingSphere:T.fromVertices(i)})};var O=l;function D(e,t){return w(t)&&(e=O.unpack(e,t)),O.createGeometry(e)}var I=D;export{I as default};