@ino-cesium/common 0.0.16-beta.2 → 0.0.16-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -321,14 +321,21 @@ declare abstract class BasePrimitive<T> {
321
321
  protected appearance: Cesium.Appearance | undefined;
322
322
  protected geometryInstance: Cesium.Appearance | undefined;
323
323
  protected drawCommand: any;
324
+ /**
325
+ * 组成primitive的position
326
+ * @protected
327
+ */
328
+ protected shapePositions: Cesium.Cartesian3[];
324
329
  needUpdate: boolean;
325
330
  constructor();
326
331
  update(frameState: any): void;
327
332
  then(onFulfilled?: any): Promise<T>;
328
333
  catch(onRejected?: any): Promise<T>;
329
334
  abstract getPrimitive(): CusPrimitive;
335
+ abstract calcShapePositions(positions: Cesium.Cartesian3[]): void;
330
336
  isDestroyed(): boolean;
331
337
  destroy(): void;
338
+ setShapePositions(positions: Cesium.Cartesian3[]): void;
332
339
  }
333
340
  type CusPrimitive = Cesium.Primitive | Cesium.GroundPrimitive | Cesium.PointPrimitiveCollection | Cesium.GroundPolylinePrimitive | Cesium.LabelCollection | Cesium.PrimitiveCollection | undefined;
334
341
 
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import*as e from"cesium";import{polygon as t,centroid as n}from"@turf/turf";var i=Object.freeze({__proto__:null});let o=1;const r=(t,n)=>{n||(n={token:""}),n.token&&(e.Ion.defaultAccessToken=n.token);const i={...l,...n},o=new e.Viewer(t,i);return o.scene.postProcessStages.fxaa.enabled=!0,o.scene.msaaSamples=8,console.log("%c%s","color: GREEN; font-size: 20px",`Cesium ${e.VERSION}`),o},s=(e,t)=>{t.scene.globe.translucency.enabled=!0,t.scene.globe.translucency.frontFaceAlpha=e,t.scene.globe.translucency.backFaceAlpha=e},a=e=>{o=e},c=()=>o,l={animation:!1,baseLayerPicker:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!0,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,scene3DOnly:!0,navigation:!1,navigationInstructionsInitiallyVisible:!1,showRenderLoopErrors:!0,orderIndependentTranslucency:!1,contextOptions:{webgl:{alpha:!0}}},d=t=>{const{lng:n,lat:i,height:o,viewer:r}=t;r.scene.camera.setView({destination:e.Cartesian3.fromDegrees(n,i,o||1e4)})},p=t=>{const{lng:n,lat:i,height:o,viewer:r}=t;r.scene.camera.flyTo({destination:e.Cartesian3.fromDegrees(n,i,o||1e4)})},h=e=>{const{position:t,viewer:n}=e;n.scene.camera.flyTo({destination:t})};function u(t){const n=t.camera.heading,i=t.camera.pitch,o=t.camera.roll;return{destination:new e.Cartesian3(t.camera.position.x,t.camera.position.y,t.camera.position.z),orientation:{heading:n,pitch:i,roll:o}}}function m(e,t){e&&t.scene.camera.flyTo({...e})}function g(e,t){const n=t.dataSources.getByName(e);n.length>0&&t.flyTo(n[0])}function y(e,t){e&&t.flyTo(e)}function f(e,t){t.flyTo(e)}function v(t,n){const i=new e.Cartesian3(t[0],t[1],t[2]),o=new e.BoundingSphere(i,t[3]);n.camera.flyToBoundingSphere(o,{offset:new e.HeadingPitchRange(3.5,-.5,200),duration:2})}function C(e){e.show=!1,setTimeout(()=>{e.show=!0,setTimeout(()=>{e.show=!1,setTimeout(()=>{e.show=!0},300)},300)},300)}const M=(t,n)=>{const i=t.scene,o=new e.ScreenSpaceEventHandler(i.canvas);o.setInputAction(e=>{if(n.LEFT_POSITION){const o=i.pickPosition(e.position);_(e.position,o,n.LEFT_POSITION,t)}n.PICK_FEATURE&&w(t,e.position,n.PICK_FEATURE),t._element.style.cursor="default"},e.ScreenSpaceEventType.LEFT_CLICK),o.setInputAction(e=>{if(n.MOVE_POSITION){const o=i.pickPosition(e.endPosition);_(e.endPosition,o,n.MOVE_POSITION,t)}n.MOVE_PICK_FEATURE&&w(t,e.endPosition,n.MOVE_PICK_FEATURE)},e.ScreenSpaceEventType.MOUSE_MOVE)},w=(t,n,i)=>{const o=t.scene.pick(n),r={};if(o){if(t._element.style.cursor="pointer",o instanceof e.Cesium3DTileFeature){o.getPropertyIds().forEach(e=>{r[e]=o.getProperty(e)})}else o.id instanceof e.Entity?t._element.style.cursor="pointer":o.primitive&&Object.assign(r,o.primitive.properties);i(o,r)}else i(void 0,r)},_=(t,n,i,o)=>{n||(n=e.Cartesian3.fromDegrees(0,0,0));const r=e.Cartographic.fromCartesian(n);i({windowPosition:t,position:n,lnglat:{lng:e.Math.toDegrees(r.longitude),lat:e.Math.toDegrees(r.latitude),height:r.height},cameraView:u(o)})},b=()=>`${Date.now()}${Math.round(9999999999*Math.random()+1)}`;let T="/ino-cesium";const E=e=>{T=e},x=()=>T;class P{static tooltip;_title;_div;_message;constructor(e){const t=document.createElement("DIV");t.id="tooltip",t.className="twipsy right";const n=document.createElement("DIV");n.className="twipsy-inner",t.appendChild(n),this._div=t,this._title=n,this._message="";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t),t.onmousemove=e=>{this.showAt({x:e.clientX,y:e.clientY},this._message)}}showAt(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=`${e.x+10}px`,this._div.style.top=e.y-this._div.clientHeight/2+"px",this._message=t)}setVisible(e){this._div.style.display=e?"block":"none"}static createToolTip(e){return P.tooltip||(P.tooltip=new P(e)),P.tooltip}destroy(){P.tooltip&&(this._div&&this._div.parentNode.removeChild(this._div),P.tooltip=null)}}class D{static popup;_div;viewer;offset=new e.Cartesian2(140,150);position=e.Cartesian3.ZERO;constructor(e,t,n){this.viewer=e,n&&(this.offset=n),this._div=t,this._div.style.position="absolute",this._div.style.left="0",this._div.style.top="0",this._div.style.display="none";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t),this.renderPosition()}showAt(e){this.position=e,e&&this.setVisible(!0)}setVisible(e){this._div.style.display=e?"block":"none"}renderPosition(){this.viewer.scene.postRender.addEventListener(()=>{if(!this.position.equals(e.Cartesian3.ZERO)){const e=this.viewer.scene.cartesianToCanvasCoordinates(this.position);this._div.style.left=e.x-this.offset.x+"px",this._div.style.top=e.y-this.offset.y+"px"}})}static createPupup(e,t,n){return D.popup||(D.popup=new D(e,t,n)),D.popup}destroy(){D.popup&&(this._div&&this._div.parentNode.removeChild(this._div),D.popup=null)}}const S=(e,t=[-180,180],n=[-90,90])=>{const i=[];for(let o=0;o<e;o++){const e=I(t),o=I(n);i.push({type:"Feature",geometry:{type:"Point",coordinates:[e,o]},properties:{}})}return{type:"FeatureCollection",features:i}};function I(e){const[t,n]=e;return Math.random()*(n-t)+t}function k(){return`rgba(${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.random()})`}const R=(e,t=[-180,180],n=[-90,90])=>{const i=[];for(let o=0;o<e;o++){const e=Math.floor(I([3,10])),o=[];for(let i=0;i<e;i++){const e=I(t),i=I(n);o.push([e,i])}i.push({type:"Feature",geometry:{type:"LineString",coordinates:o},properties:{}})}return{type:"FeatureCollection",features:i}},O=(e,t=[-180,180],n=[-90,90])=>{const i=[];for(let o=0;o<e;o++){const e=A(t,n);i.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e]}})}return{type:"FeatureCollection",features:i}};function A(e,t){const n=Math.floor(I([3,10])),i=I(e),o=I(t),r=I([1,5]),s=[];for(let e=0;e<n;e++){const t=e/n*2*Math.PI,a=I([.8*r,r]),c=i+a*Math.cos(t),l=o+a*Math.sin(t);s.push([c,l])}return s.push(s[0]),s}const F=(t,n)=>{let i=!1;const o=new e.Viewer(t,{...l,scene3DOnly:!1});o.scene.mode=2;const r=o.scene.screenSpaceCameraController;r.enableRotate=!1,r.enableTranslate=!1,r.enableZoom=!1,r.enableTilt=!1,r.enableLook=!1,n.entities.add({position:e.Cartesian3.fromDegrees(0,0),label:{text:new e.CallbackProperty(()=>(s(),""),!0)}});const s=function(){i||o.camera.flyTo({destination:n.camera.position,orientation:{heading:n.camera.heading,pitch:n.camera.pitch,roll:n.camera.roll},duration:0})};return{viewer:o,open:()=>{i=!1},close:()=>{i=!0}}},N=(t,n)=>{const i=e.Cartographic.fromCartesian(t),o=e.Cartographic.fromCartesian(n),r=new e.EllipsoidGeodesic;r.setEndPoints(i,o);let s=r.surfaceDistance;return s=Math.sqrt(s**2+(o.height-i.height)**2),s};function L(e){let t=0;return e.forEach((n,i)=>{if(i===e.length-1)return;const o=N(n,e[i+1]);t+=o}),t}function B(t,n,i){const{EllipsoidGeodesic:o,Ellipsoid:r}=e;return new o((i=i||r.WGS84).cartesianToCartographic(t),i.cartesianToCartographic(n)).surfaceDistance}function V(e){let t=0;return e.forEach((n,i)=>{if(i===e.length-1)return;const o=B(n,e[i+1]);t+=o}),t}const $=i=>{if(i.length<4)return e.BoundingSphere.fromPoints(i).center;const o=t([i.map(e=>[e.x,e.y])]),r=e.BoundingSphere.fromPoints(i).center,s=n(o);return new e.Cartesian3(s.geometry.coordinates[0],s.geometry.coordinates[1],r.z)};function G(t){let n=0;const{CoplanarPolygonGeometry:i,VertexFormat:o,defined:r,Cartesian3:s}=e,a=i.createGeometry(i.fromPositions({positions:t,vertexFormat:o.POSITION_ONLY}));if(r(a)){const e=a.indices,t=a.attributes.position.values;for(let i=0;i<e.length;i+=3){const o=e[i],r=e[i+1],a=e[i+2];n+=H(s.unpack(t,3*o,{}),s.unpack(t,3*r,{}),s.unpack(t,3*a,{}))}}return n}const H=(t,n,i)=>{const{Cartesian3:o}=e,r=o.subtract(t,n,{}),s=o.subtract(i,n,{}),a=o.cross(r,s,r);return.5*o.magnitude(a)},z=async(t,n)=>{const i=n.map(t=>e.Cartographic.fromCartesian(t));return await e.sampleTerrainMostDetailed(t,i)},U=async(e,t)=>await e.scene.clampToHeightMostDetailed(t),X=(t,n,i,o)=>{const r=[],s=e.Cartographic.fromCartesian(t),a=e.Cartographic.fromCartesian(n),c=180*s.longitude/Math.PI,l=180*s.latitude/Math.PI,d=180*a.longitude/Math.PI,p=180*a.latitude/Math.PI,h=Math.sqrt((c-d)*(c-d)+(l-p)*(l-p))*i,u=e.Cartesian3.clone(t),m=e.Cartesian3.clone(n),g=e.Cartesian3.distance(u,e.Cartesian3.ZERO),y=e.Cartesian3.distance(m,e.Cartesian3.ZERO);if(e.Cartesian3.normalize(u,u),e.Cartesian3.normalize(m,m),!e.Cartesian3.distance(u,m))return r;const f=e.Cartesian3.angleBetween(u,m);r.push(t);for(let t=1;t<o-1;t++){const n=1*t/(o-1),i=1-n,s=Math.sin(i*f)/Math.sin(f),a=Math.sin(n*f)/Math.sin(f),c=e.Cartesian3.multiplyByScalar(u,s,new e.Cartesian3),l=e.Cartesian3.multiplyByScalar(m,a,new e.Cartesian3);let d=e.Cartesian3.add(c,l,new e.Cartesian3);const p=n*Math.PI,v=g*i+y*n+Math.sin(p)*h;d=e.Cartesian3.multiplyByScalar(d,v,d),r.push(d)}return r.push(n),r},j=e=>{const t=e.positionCartographic.height,n=-40467.74;return Math.round(n+80955.31/(1+(t/91610.74)**7096758e-11))},q=e=>e,Y=(t,n)=>{const i=[];let o=0,r=0,s=0;const a=[];for(let n=0;n<t.length-1;++n)o+=e.Cartesian3.distance(t[n],t[n+1]);for(let n=0;n<t.length;n++)0===n?r=0:(s+=e.Cartesian3.distance(t[n-1],t[n]),r=s/o),i.push(r);const c=new e.LinearSpline({times:i,points:t});for(let e=0;e<=n;e++){const t=c.evaluate(e/n);a.push(t)}return a};class Z{_primitive;_promise;appearance;geometryInstance;drawCommand;needUpdate=!1;constructor(){this._primitive=void 0,this.appearance=void 0,this.geometryInstance=void 0,this._promise=null,this.drawCommand=null,this.needUpdate=!1}update(e){const t=this.getPrimitive();if(t){this._primitive=t;this._primitive.update(e)}}then(e=null){return this._promise?.then(e)}catch(e=null){return this._promise?.catch(e)}isDestroyed(){return!!this._primitive}destroy(){this._primitive=void 0}}class W{_definitionChanged=new e.Event;get definitionChanged(){return this._definitionChanged}get isConstant(){return!1}}const K=t=>{let n=0;for(let i=0;i<t.length;i++){const o=t[i],r=t[(i+1)%t.length];n+=e.Cartesian3.cross(o,r,new e.Cartesian3).z}return n>0?t.reverse():t},J=t=>{let n=0;for(let i=0;i<t.length;i++){const o=t[i],r=t[(i+1)%t.length];n+=e.Cartesian3.cross(o,r,new e.Cartesian3).z}return n<0?t.reverse():t},Q=e=>e.map(e=>ee(e)),ee=t=>{const n=e.Cartographic.fromCartesian(t);return{longitude:e.Math.toDegrees(n.longitude),latitude:e.Math.toDegrees(n.latitude),height:n.height}},te=t=>t.map(t=>e.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height)),ne=t=>e.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),ie=e=>{const t=e[0],n=e[e.length-1];return t.x===n.x&&t.y===n.y&&t.z===n.z?e:[...e,e[0]]},oe=e=>{const t=[];return e.forEach(e=>{t.push({type:"Feature",geometry:{type:"Point",coordinates:[e.longitude,e.latitude]},properties:{height:e.height}})}),{type:"FeatureCollection",features:t}},re=e=>{const t=[];return e.forEach((n,i)=>{0!==i&&t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[e[i-1].longitude,e[i-1].latitude],[n.longitude,n.latitude]]},properties:{height:n.height}})}),{type:"FeatureCollection",features:t}},se=e=>{const t=[];return t.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e.map(e=>[e.longitude,e.latitude])]},properties:{heights:e.map(e=>e.height)}}),{type:"FeatureCollection",features:t}},ae=t=>({heading:e.Math.toRadians(t.yaw+(t.offsetYaw||0)),pitch:e.Math.toRadians(t.pitch),roll:e.Math.toRadians(t.roll)}),ce=e.BoxGeometry,le=e.Cartesian3,de=e.defaultValue,pe=e.defined,he=e.destroyObject,ue=e.DeveloperError,me=e.GeometryPipeline,ge=e.Matrix3,ye=e.Matrix4,fe=e.Transforms,ve=e.VertexFormat,Ce=e.BufferUsage,Me=e.CubeMap,we=e.DrawCommand,_e=e.loadCubeMap,be=e.RenderState,Te=e.VertexArray,Ee=e.BlendingState,xe=e.SceneMode,Pe=e.ShaderProgram,De=e.ShaderSource,Se=new ge;class Ie{constructor(t){e.defined(e.Matrix4.getRotation)||(e.Matrix4.getRotation=e.Matrix4.getMatrix3),this.sources=t.sources,this._sources=void 0,this.show=de(t.show,!0),this._command=new we({modelMatrix:ye.clone(ye.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}update(e,t){const n=this;if(!this.show)return;if(e.mode!==xe.SCENE3D&&e.mode!==xe.MORPHING)return;if(!e.passes.render)return;const i=e.context;if(this._sources!==this.sources){this._sources=this.sources;const e=this.sources;if(!(pe(e.positiveX)&&pe(e.negativeX)&&pe(e.positiveY)&&pe(e.negativeY)&&pe(e.positiveZ)&&pe(e.negativeZ)))throw new ue("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof e.positiveX!=typeof e.negativeX||typeof e.positiveX!=typeof e.positiveY||typeof e.positiveX!=typeof e.negativeY||typeof e.positiveX!=typeof e.positiveZ||typeof e.positiveX!=typeof e.negativeZ)throw new ue("this.sources properties must all be the same type.");"string"==typeof e.positiveX?_e(i,this._sources).then(e=>{n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=e}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Me({context:i,source:e}))}const o=this._command;if(o.modelMatrix=fe.eastNorthUpToFixedFrame(e.camera._positionWC),!pe(o.vertexArray)){o.uniformMap={u_cubeMap:()=>n._cubeMap,u_rotateMatrix:()=>ye.getRotation(o.modelMatrix,Se)};const e=ce.createGeometry(ce.fromDimensions({dimensions:new le(2,2,2),vertexFormat:ve.POSITION_ONLY})),t=this._attributeLocations=me.createAttributeLocations(e);o.vertexArray=Te.fromGeometry({context:i,geometry:e,attributeLocations:t,bufferUsage:Ce._DRAW}),o.renderState=be.fromCache({blending:Ee.ALPHA_BLEND})}if(!pe(o.shaderProgram)||this._useHdr!==t){const e=new De({defines:[t?"HDR":""],sources:["precision highp float;\n\nuniform samplerCube u_cubeMap;\nin vec3 v_texCoord;\nout vec4 fragColor;\n\nvoid main() {\n vec4 color = texture(u_cubeMap, normalize(v_texCoord));\n fragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}"]});o.shaderProgram=Pe.fromCache({context:i,vertexShaderSource:"#version 300 es\n\nprecision highp float;\n\nin vec3 position;\nout vec3 v_texCoord;\n\nuniform mat3 u_rotateMatrix;\n\nvoid main() {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position;\n}\n",fragmentShaderSource:e,attributeLocations:this._attributeLocations}),this._useHdr=t}return pe(this._cubeMap)?o:void 0}isDestroyed(){return!1}destroy(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),he(this)}}const ke=t=>{const{viewer:n,sources:i}=t;return n.scene.skyBox=new e.SkyBox({sources:i}),n.scene.skyBox},Re=t=>{let{viewer:n,sources:i}=t;const o=t.height?t.height:225705,r=n.scene.skyBox;i||(i={positiveX:`${x()}/assets/ground-skybox/px.jpg`,negativeX:`${x()}/assets/ground-skybox/nx.jpg`,positiveY:`${x()}/assets/ground-skybox/py.jpg`,negativeY:`${x()}/assets/ground-skybox/ny.jpg`,positiveZ:`${x()}/assets/ground-skybox/pz.jpg`,negativeZ:`${x()}/assets/ground-skybox/nz.jpg`});const s=new Ie({sources:i});n.scene.postRender.addEventListener(()=>{const t=n.camera.position;e.Cartographic.fromCartesian(t).height<o?(n.scene.skyBox=s,n.scene.skyAtmosphere.show=!1):(n.scene.skyBox=r,n.scene.skyAtmosphere.show=!0)})},Oe=t=>{const n=[];let i,o;t.clock.shouldAnimate=!0;const r={},s=(e,n)=>{if(a(),e.entity.cylinder){const n=e.entity.cylinder;n.roamId=e.id,e.entity.cylinder=void 0,o=t.entities.add({position:e.property,cylinder:n})}t.trackedEntity=e.entity,n&&(i=e)},a=()=>{if(o){t.entities.remove(o);const e=n.find(e=>e.id===o.cylinder.roamId);e&&(e.entity.cylinder=o.cylinder),o=void 0}},c=()=>{t.trackedEntity=void 0,i=void 0,a()},l=e=>{t.trackedEntity?.id===e.entity.id&&c(),t.entities.remove(e.entity);const i=n.findIndex(t=>t.id===e.id);i>-1&&n.splice(i,1)},d=(e,t)=>{const n=e.property.getValue(t);if(n&&(e.status="ROAMING",m.roaming&&m.roaming(e,{time:t,position:n})),e.stopTime.secondsOfDay<t.secondsOfDay&&"END"!==e.status&&(e.status="END",m.end&&m.end(e),e.loop?p(e):c()),e.flyParams.hpr){const i=r[e.id].find(e=>e.time>t.secondsOfDay);i&&u(e,i,n)}},p=n=>{const{property:i,startTime:o,stopTime:r}=h(n);n.stopTime=r,n.startTime=o,n.property=i,n.flyParams.hpr||(n.entity.orientation=new e.VelocityOrientationProperty(i)),n.entity.position=i,n.status="START",t.clock.currentTime=o,t.clock.multiplier=1,m.reStart&&m.reStart(n)},h=t=>{const n=[],{positions:i,flyParams:o}=t,s=new e.SampledPositionProperty;let a=0;const c=e.JulianDate.now();let l=c.clone();return i.forEach((t,r)=>{let d=e.JulianDate.now();if(r){let n=0;if(o.speed){n=e.Cartesian3.distance(t,i[r-1])/(1e3*o.speed/3600)}o.times&&(n=(o.times[r]-o.times[r-1])/1e3),a+=n,d=e.JulianDate.addSeconds(c,a,new e.JulianDate)}else d=c;l=d,s.addSample(d,t),o.hpr&&n.push({time:d.secondsOfDay,heading:o.hpr[r].heading,pitch:o.hpr[r].pitch,roll:o.hpr[r].roll})}),r[t.id]=n,{property:s,startTime:c,stopTime:l}},u=(t,n,i)=>{if(!i)return;const{heading:o,pitch:r,roll:s}=n,a=new e.HeadingPitchRoll(o,r,s);t.entity.orientation=Transforms.headingPitchRollQuaternion(i,a)};t.scene.preRender.addEventListener((o,r)=>{if(n.forEach(e=>{d(e,r)}),!i)return;const s=i.entity.computeModelMatrix(t.clock.currentTime);s&&t.camera.lookAtTransform(s,new e.Cartesian3(...[-20,0,5]))});const m={};return{set:i=>{const{entity:o}=i;i.id=b(),t.entities.add(o);const{property:r,startTime:s,stopTime:a}=h(i);i.flyParams.hpr||(o.orientation=new e.VelocityOrientationProperty(r)),o.position=r;const c={...i,startTime:s,stopTime:a,property:r,status:"START"};return t.clock.currentTime=s,t.clock.multiplier=1,n.push(c),c.status="START",m.start&&m.start(c),c},tracked:s,stopTracked:c,remove:l,frameRoam:d,trackedByEntityId:(e,t)=>{const i=n.find(t=>t.entity.id===e);i&&s(i,t)},removeAll:()=>{n.forEach(e=>{l(e)}),n.length=0},Event:m,lockCameraView:e=>{i=e},updateRoamAttitude:(t,n)=>{"UP"!==n&&"DOWN"!==n||(t.entity.orientation=void 0),"front"!==n&&"back"!==n||(t.entity.orientation=new e.VelocityOrientationProperty(t.property))}}};var Ae=(e=>(e.UP="UP",e.DOWN="DOWN",e.LEFT="left",e.RIGHT="right",e.FRONT="front",e.BACK="back",e))(Ae||{}),Fe=(e=>(e.END="END",e.START="START",e.ROAMING="ROAMING",e))(Fe||{});let Ne=100,Le="",Be="0";const Ve=t=>{const{viewer:n}=t,i=document.createElement("div");i.className="bottom-status-bar";const o=document.createElement("div");o.className="scale-bar",o.innerHTML="";const r=document.createElement("div");r.className="scale-label",r.innerHTML="",o.appendChild(r),i.appendChild(o);const s=document.createElement("div");s.id="bottom-status-bar-camera",t.clickCopy&&(s.style.pointerEvents="auto",s.style.cursor="pointer"),i.appendChild(s),s.style.display="flex";const a=document.createElement("div"),c=document.createElement("div"),l=n._element.getElementsByClassName("cesium-widget")[0];if(!l)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");l.appendChild(i),M(n,{MOVE_POSITION(e){s.innerHTML=`\n 经度:${e.lnglat.lng.toFixed(6)}&nbsp;&nbsp;\n 纬度:${e.lnglat.lat.toFixed(6)}&nbsp;&nbsp;\n 高程:${e.lnglat.height.toFixed(2)}&nbsp;&nbsp;\n `,t.clickCopy&&u(n),s.appendChild(c),s.appendChild(a)}}),t.clickCopy&&document.addEventListener("click",e=>{e.target.id});let d=Date.now(),p=0;const h=()=>{requestAnimationFrame(()=>{if(p+=1,p>=30){const e=Date.now(),t=e-d,n=Math.round(1e3/(t/p));d=e,p=0,a.innerHTML=`${n} FPS`}t.hpr?c.innerHTML=`\n 方位角:${e.Math.toDegrees(n.camera.heading).toFixed(1)}°&nbsp;&nbsp;\n 俯仰角:${e.Math.toDegrees(n.camera.pitch).toFixed(1)}°&nbsp;&nbsp;\n 翻滚角:${e.Math.toDegrees(n.camera.roll).toFixed(1)}°&nbsp;&nbsp;\n `:c.innerHTML="",c.innerHTML+=`\n 视高:${n.camera.positionCartographic.height.toFixed(0)}m&nbsp;&nbsp;\n `;const i=$e(n);r.innerHTML=`${i.distanceLabel}`,h()})};h()},$e=t=>{const n=t.camera.positionCartographic.height.toFixed(0);if(n===Be)return{barWidth:Ne,distanceLabel:Le};Be=n;const i=new e.EllipsoidGeodesic,o=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7],r=t.scene,s=r.canvas.clientWidth,a=r.canvas.clientHeight,c=r.camera.getPickRay(new e.Cartesian2(s/2|0,a-1)),l=r.camera.getPickRay(new e.Cartesian2(1+s/2|0,a-1)),d=r.globe,p=d.pick(c,r),h=d.pick(l,r);if(!e.defined(p)||!e.defined(h))return{barWidth:Ne,distanceLabel:Le};const u=d.ellipsoid.cartesianToCartographic(p),m=d.ellipsoid.cartesianToCartographic(h);i.setEndPoints(u,m);const g=i.surfaceDistance;let y;for(let t=o.length-1;!e.defined(y)&&t>=0;--t)o[t]/g<100&&(y=o[t]);if(e.defined(y)){const e=y>=1e3?`${(y/1e3).toString()} km`:`${y.toString()} m`;Ne=y/g|0,Le=e}else Ne=0,Le="";return{barWidth:Ne,distanceLabel:Le}},Ge=t=>new Promise(n=>{const{viewer:i,center:o}=t;let r=o.lng,s=1,a=null;const c=t=>{null===a&&(a=t);r-=(t-a)/2e4*2,r<-180&&(r=180,s+=1),2===s&&r>o.lng?i.camera.flyTo({destination:e.Cartesian3.fromDegrees(o.lng,o.lat,3e7),duration:2,orientation:{heading:e.Math.toRadians(360),pitch:e.Math.toRadians(-90),roll:0},easingFunction:e.EasingFunction.LINEAR_NONE,complete:()=>{i.camera.flyTo({destination:e.Cartesian3.fromDegrees(o.lng,o.lat,o.height),duration:3,orientation:{heading:e.Math.toRadians(2.8),pitch:e.Math.toRadians(-90),roll:6.282253919167732},complete:()=>{n(!0)}})}}):(i.camera.setView({destination:e.Cartesian3.fromDegrees(r,o.lat,3e7),orientation:{heading:e.Math.toRadians(360),pitch:e.Math.toRadians(-90),roll:0}}),requestAnimationFrame(c))};requestAnimationFrame(c)}),He=(t,n,i)=>{const o=new Float64Array(24);for(let e=0;e<8;e++)o[3*e]=t[e].x,o[3*e+1]=t[e].y,o[3*e+2]=t[e].z;const r=new Uint16Array([0,1,2,0,2,3,4,6,5,4,7,6,0,4,1,1,4,5,1,5,2,2,5,6,2,6,3,3,6,7,3,7,0,0,7,4]),s={position:new e.GeometryAttribute({componentDatatype:e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},a=new e.Geometry({indices:r,attributes:s,primitiveType:e.PrimitiveType.TRIANGLES,boundingSphere:e.BoundingSphere.fromVertices(o)});return new e.GeometryInstance({geometry:a,attributes:{color:e.ColorGeometryInstanceAttribute.fromColor(n)},id:`${i}`})},ze=(t,n,i)=>{const[o,r,s,a,c,l,d,p]=t,h=[o,r,r,s,s,a,a,o,c,l,l,d,d,p,p,c,o,c,c,l,l,r,r,o,a,p,p,d,d,s,s,a,o,a,a,p,p,c,c,o,r,l,l,d,d,s,s,r];return new e.GeometryInstance({geometry:new e.PolylineGeometry({positions:h,width:2,vertexFormat:e.PolylineColorAppearance.VERTEX_FORMAT}),attributes:{color:e.ColorGeometryInstanceAttribute.fromColor(n)},id:`${i}`})},Ue=(t,n)=>[e.Cartesian3.fromDegrees(t.longitude,t.latitude,n.height),e.Cartesian3.fromDegrees(t.longitude,n.latitude,n.height),e.Cartesian3.fromDegrees(n.longitude,n.latitude,n.height),e.Cartesian3.fromDegrees(n.longitude,t.latitude,n.height),e.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),e.Cartesian3.fromDegrees(t.longitude,n.latitude,t.height),e.Cartesian3.fromDegrees(n.longitude,n.latitude,t.height),e.Cartesian3.fromDegrees(n.longitude,t.latitude,t.height)],Xe=(t,n,i,o,r,s)=>[e.Cartesian3.fromDegrees(t,t,r),e.Cartesian3.fromDegrees(n,n,r),e.Cartesian3.fromDegrees(i,i,r),e.Cartesian3.fromDegrees(o,o,r),e.Cartesian3.fromDegrees(t,t,s),e.Cartesian3.fromDegrees(n,n,s),e.Cartesian3.fromDegrees(i,i,s),e.Cartesian3.fromDegrees(o,o,s)],je=3e3*Math.PI/180,qe=Math.PI,Ye=6378245,Ze=.006693421622965943,We=(e,t)=>!(e>72.004&&e<137.8347&&t>.8293&&t<55.8271),Ke=(e,t)=>{let n=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return n+=2*(20*Math.sin(6*e*qe)+20*Math.sin(2*e*qe))/3,n+=2*(20*Math.sin(t*qe)+40*Math.sin(t/3*qe))/3,n+=2*(160*Math.sin(t/12*qe)+320*Math.sin(t*qe/30))/3,n},Je=(e,t)=>{let n=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return n+=2*(20*Math.sin(6*e*qe)+20*Math.sin(2*e*qe))/3,n+=2*(20*Math.sin(e*qe)+40*Math.sin(e/3*qe))/3,n+=2*(150*Math.sin(e/12*qe)+300*Math.sin(e/30*qe))/3,n},Qe=(e,t)=>{if(We(e,t))return[e,t];let n=Ke(e-105,t-35),i=Je(e-105,t-35);const o=t/180*qe;let r=Math.sin(o);r=1-Ze*r*r;const s=Math.sqrt(r);n=180*n/(Ye*(1-Ze)/(r*s)*qe),i=180*i/(Ye/s*Math.cos(o)*qe);return[e+i,t+n]},et=(e,t)=>{if(We(e,t))return[e,t];let n=Ke(e-105,t-35),i=Je(e-105,t-35);const o=t/180*qe;let r=Math.sin(o);r=1-Ze*r*r;const s=Math.sqrt(r);n=180*n/(Ye*(1-Ze)/(r*s)*qe),i=180*i/(Ye/s*Math.cos(o)*qe);return[2*e-(e+i),2*t-(t+n)]},tt=(e,t)=>{const n=e,i=t,o=Math.sqrt(n*n+i*i)+2e-5*Math.sin(i*je),r=Math.atan2(i,n)+3e-6*Math.cos(n*je);return[o*Math.cos(r)+.0065,o*Math.sin(r)+.006]},nt=(e,t)=>{const n=e-.0065,i=t-.006,o=Math.sqrt(n*n+i*i)-2e-5*Math.sin(i*je),r=Math.atan2(i,n)-3e-6*Math.cos(n*je);return[o*Math.cos(r),o*Math.sin(r)]};class it{static wgs84ToGcj02(e){const[t,n]=Qe(e.lng,e.lat);return{lng:t,lat:n}}static gcj02ToWgs84(e){const[t,n]=et(e.lng,e.lat);return{lng:t,lat:n}}static gcj02ToBd09(e){const[t,n]=tt(e.lng,e.lat);return{lng:t,lat:n}}static bd09ToGcj02(e){const[t,n]=nt(e.lng,e.lat);return{lng:t,lat:n}}static bd09ToWgs84(e){const[t,n]=((e,t)=>{const[n,i]=nt(e,t);return et(n,i)})(e.lng,e.lat);return{lng:t,lat:n}}static wgs84ToBd09(e){const[t,n]=((e,t)=>{const[n,i]=Qe(e,t);return tt(n,i)})(e.lng,e.lat);return{lng:t,lat:n}}}export{W as BaseMaterialProperty,Z as BasePrimitive,i as Common,it as CoordinateTransformer,l as DefaultViewerOptions,Ae as FlyAttitude,D as Popup,Fe as RoamStatus,P as Tooltip,G as calcArea,q as calcCameraHeightFromZoom,B as calcGeodesicDistance,V as calcGeodesicDistances,Y as calcLerpPosition,$ as calcPoistionCenter,U as calcSceneHeightFromPositions,N as calcSpaceDistance,L as calcSpaceDistances,z as calcTerrainHeightFromPositions,H as calcTriangleArea,j as calcZoomFromCameraHeight,X as clacPositionsForParabola,Ve as createBottomStatusBar,F as createEagleEye,Ge as createOpenAnim,Oe as createRoamHandler,ke as createSkyBox,Re as createSkyBoxOnGround,m as flyToCameraView,f as flyToCesium3DTile,g as flyToDataSource,v as flyToFromSphere,y as flyToImagery,p as flyToLnglat,h as flyToPosition,u as getCameraView,c as getCesiumForAutoFitScale,x as getInoCesiumBaseUrl,r as initCesium,M as initCesiumEvent,Ue as makeGridFromElevationExtrema,He as makeGridToInstanceForBox,ze as makeGridToInstanceForLine,ne as makeLnglatToPosition,re as makeLnglatsToLineGeojson,oe as makeLnglatsToPointGeojson,se as makeLnglatsToPolygonGeojson,te as makeLnglatsToPositions,ie as makePositionsClose,J as makePositionsForAntiClockwise,K as makePositionsForClockwise,Q as makePositionsToLnglats,ee as makePositiontoLnglat,ae as makeYawPitchRollToHeadingPitchRoll,Xe as mekeGridPolygonAndHeight,b as numberId,k as randomColor,S as randomPointToGeoJson,O as randomPolygonToGeoJson,R as randomPolylineToGeoJson,a as setCesiumForAutoFitScale,s as setGlobeOpatity,E as setInoCesiumBaseUrl,d as setViewToLnglat,C as twinkleModel};
1
+ import*as e from"cesium";import{polygon as t,centroid as n}from"@turf/turf";var i=Object.freeze({__proto__:null});let o=1;const s=(t,n)=>{n||(n={token:""}),n.token&&(e.Ion.defaultAccessToken=n.token);const i={...l,...n},o=new e.Viewer(t,i);return o.scene.postProcessStages.fxaa.enabled=!0,o.scene.msaaSamples=8,console.log("%c%s","color: GREEN; font-size: 20px",`Cesium ${e.VERSION}`),o},r=(e,t)=>{t.scene.globe.translucency.enabled=!0,t.scene.globe.translucency.frontFaceAlpha=e,t.scene.globe.translucency.backFaceAlpha=e},a=e=>{o=e},c=()=>o,l={animation:!1,baseLayerPicker:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!0,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,scene3DOnly:!0,navigation:!1,navigationInstructionsInitiallyVisible:!1,showRenderLoopErrors:!0,orderIndependentTranslucency:!1,contextOptions:{webgl:{alpha:!0}}},d=t=>{const{lng:n,lat:i,height:o,viewer:s}=t;s.scene.camera.setView({destination:e.Cartesian3.fromDegrees(n,i,o||1e4)})},p=t=>{const{lng:n,lat:i,height:o,viewer:s}=t;s.scene.camera.flyTo({destination:e.Cartesian3.fromDegrees(n,i,o||1e4)})},h=e=>{const{position:t,viewer:n}=e;n.scene.camera.flyTo({destination:t})};function u(t){const n=t.camera.heading,i=t.camera.pitch,o=t.camera.roll;return{destination:new e.Cartesian3(t.camera.position.x,t.camera.position.y,t.camera.position.z),orientation:{heading:n,pitch:i,roll:o}}}function m(e,t){e&&t.scene.camera.flyTo({...e})}function g(e,t){const n=t.dataSources.getByName(e);n.length>0&&t.flyTo(n[0])}function y(e,t){e&&t.flyTo(e)}function f(e,t){t.flyTo(e)}function v(t,n){const i=new e.Cartesian3(t[0],t[1],t[2]),o=new e.BoundingSphere(i,t[3]);n.camera.flyToBoundingSphere(o,{offset:new e.HeadingPitchRange(3.5,-.5,200),duration:2})}function C(e){e.show=!1,setTimeout(()=>{e.show=!0,setTimeout(()=>{e.show=!1,setTimeout(()=>{e.show=!0},300)},300)},300)}const M=(t,n)=>{const i=t.scene,o=new e.ScreenSpaceEventHandler(i.canvas);o.setInputAction(e=>{if(n.LEFT_POSITION){const o=i.pickPosition(e.position);_(e.position,o,n.LEFT_POSITION,t)}n.PICK_FEATURE&&w(t,e.position,n.PICK_FEATURE),t._element.style.cursor="default"},e.ScreenSpaceEventType.LEFT_CLICK),o.setInputAction(e=>{if(n.MOVE_POSITION){const o=i.pickPosition(e.endPosition);_(e.endPosition,o,n.MOVE_POSITION,t)}n.MOVE_PICK_FEATURE&&w(t,e.endPosition,n.MOVE_PICK_FEATURE)},e.ScreenSpaceEventType.MOUSE_MOVE)},w=(t,n,i)=>{const o=t.scene.pickPosition(n),s=t.scene.pick(n),r={};if(s){if(t._element.style.cursor="pointer",s instanceof e.Cesium3DTileFeature){s.getPropertyIds().forEach(e=>{r[e]=s.getProperty(e)})}else s.id instanceof e.Entity?t._element.style.cursor="pointer":s.primitive&&Object.assign(r,s.primitive.properties);i({position:o,...s},r)}else i(void 0,{})},_=(t,n,i,o)=>{n||(n=e.Cartesian3.fromDegrees(0,0,0));const s=e.Cartographic.fromCartesian(n);i({windowPosition:t,position:n,lnglat:{lng:e.Math.toDegrees(s.longitude),lat:e.Math.toDegrees(s.latitude),height:s.height},cameraView:u(o)})},b=()=>`${Date.now()}${Math.round(9999999999*Math.random()+1)}`;let T="/ino-cesium";const E=e=>{T=e},P=()=>T;class x{static tooltip;_title;_div;_message;constructor(e){const t=document.createElement("DIV");t.id="tooltip",t.className="twipsy right";const n=document.createElement("DIV");n.className="twipsy-inner",t.appendChild(n),this._div=t,this._title=n,this._message="";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t),t.onmousemove=e=>{this.showAt({x:e.clientX,y:e.clientY},this._message)}}showAt(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=`${e.x+10}px`,this._div.style.top=e.y-this._div.clientHeight/2+"px",this._message=t)}setVisible(e){this._div.style.display=e?"block":"none"}static createToolTip(e){return x.tooltip||(x.tooltip=new x(e)),x.tooltip}destroy(){x.tooltip&&(this._div&&this._div.parentNode.removeChild(this._div),x.tooltip=null)}}class D{static popup;_div;viewer;offset=new e.Cartesian2(140,150);position=e.Cartesian3.ZERO;constructor(e,t,n){this.viewer=e,n&&(this.offset=n),this._div=t,this._div.style.position="absolute",this._div.style.left="0",this._div.style.top="0",this._div.style.display="none";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t),this.renderPosition()}showAt(e){this.position=e,e&&this.setVisible(!0)}setVisible(e){this._div.style.display=e?"block":"none"}renderPosition(){this.viewer.scene.postRender.addEventListener(()=>{if(!this.position.equals(e.Cartesian3.ZERO)){const e=this.viewer.scene.cartesianToCanvasCoordinates(this.position);this._div.style.left=e.x-this.offset.x+"px",this._div.style.top=e.y-this.offset.y+"px"}})}static createPupup(e,t,n){return D.popup||(D.popup=new D(e,t,n)),D.popup}destroy(){D.popup&&(this._div&&this._div.parentNode.removeChild(this._div),D.popup=null)}}const S=(e,t=[-180,180],n=[-90,90])=>{const i=[];for(let o=0;o<e;o++){const e=k(t),o=k(n);i.push({type:"Feature",geometry:{type:"Point",coordinates:[e,o]},properties:{}})}return{type:"FeatureCollection",features:i}};function k(e){const[t,n]=e;return Math.random()*(n-t)+t}function I(){return`rgba(${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.random()})`}const R=(e,t=[-180,180],n=[-90,90])=>{const i=[];for(let o=0;o<e;o++){const e=Math.floor(k([3,10])),o=[];for(let i=0;i<e;i++){const e=k(t),i=k(n);o.push([e,i])}i.push({type:"Feature",geometry:{type:"LineString",coordinates:o},properties:{}})}return{type:"FeatureCollection",features:i}},O=(e,t=[-180,180],n=[-90,90])=>{const i=[];for(let o=0;o<e;o++){const e=A(t,n);i.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e]}})}return{type:"FeatureCollection",features:i}};function A(e,t){const n=Math.floor(k([3,10])),i=k(e),o=k(t),s=k([1,5]),r=[];for(let e=0;e<n;e++){const t=e/n*2*Math.PI,a=k([.8*s,s]),c=i+a*Math.cos(t),l=o+a*Math.sin(t);r.push([c,l])}return r.push(r[0]),r}const F=(t,n)=>{let i=!1;const o=new e.Viewer(t,{...l,scene3DOnly:!1});o.scene.mode=2;const s=o.scene.screenSpaceCameraController;s.enableRotate=!1,s.enableTranslate=!1,s.enableZoom=!1,s.enableTilt=!1,s.enableLook=!1,n.entities.add({position:e.Cartesian3.fromDegrees(0,0),label:{text:new e.CallbackProperty(()=>(r(),""),!0)}});const r=function(){i||o.camera.flyTo({destination:n.camera.position,orientation:{heading:n.camera.heading,pitch:n.camera.pitch,roll:n.camera.roll},duration:0})};return{viewer:o,open:()=>{i=!1},close:()=>{i=!0}}},N=(t,n)=>{const i=e.Cartographic.fromCartesian(t),o=e.Cartographic.fromCartesian(n),s=new e.EllipsoidGeodesic;s.setEndPoints(i,o);let r=s.surfaceDistance;return r=Math.sqrt(r**2+(o.height-i.height)**2),r};function L(e){let t=0;return e.forEach((n,i)=>{if(i===e.length-1)return;const o=N(n,e[i+1]);t+=o}),t}function B(t,n,i){const{EllipsoidGeodesic:o,Ellipsoid:s}=e;return new o((i=i||s.WGS84).cartesianToCartographic(t),i.cartesianToCartographic(n)).surfaceDistance}function V(e){let t=0;return e.forEach((n,i)=>{if(i===e.length-1)return;const o=B(n,e[i+1]);t+=o}),t}const $=i=>{if(i.length<4)return e.BoundingSphere.fromPoints(i).center;const o=t([i.map(e=>[e.x,e.y])]),s=e.BoundingSphere.fromPoints(i).center,r=n(o);return new e.Cartesian3(r.geometry.coordinates[0],r.geometry.coordinates[1],s.z)};function G(t){let n=0;const{CoplanarPolygonGeometry:i,VertexFormat:o,defined:s,Cartesian3:r}=e,a=i.createGeometry(i.fromPositions({positions:t,vertexFormat:o.POSITION_ONLY}));if(s(a)){const e=a.indices,t=a.attributes.position.values;for(let i=0;i<e.length;i+=3){const o=e[i],s=e[i+1],a=e[i+2];n+=H(r.unpack(t,3*o,{}),r.unpack(t,3*s,{}),r.unpack(t,3*a,{}))}}return n}const H=(t,n,i)=>{const{Cartesian3:o}=e,s=o.subtract(t,n,{}),r=o.subtract(i,n,{}),a=o.cross(s,r,s);return.5*o.magnitude(a)},z=async(t,n)=>{const i=n.map(t=>e.Cartographic.fromCartesian(t));return await e.sampleTerrainMostDetailed(t,i)},U=async(e,t)=>await e.scene.clampToHeightMostDetailed(t),X=(t,n,i,o)=>{const s=[],r=e.Cartographic.fromCartesian(t),a=e.Cartographic.fromCartesian(n),c=180*r.longitude/Math.PI,l=180*r.latitude/Math.PI,d=180*a.longitude/Math.PI,p=180*a.latitude/Math.PI,h=Math.sqrt((c-d)*(c-d)+(l-p)*(l-p))*i,u=e.Cartesian3.clone(t),m=e.Cartesian3.clone(n),g=e.Cartesian3.distance(u,e.Cartesian3.ZERO),y=e.Cartesian3.distance(m,e.Cartesian3.ZERO);if(e.Cartesian3.normalize(u,u),e.Cartesian3.normalize(m,m),!e.Cartesian3.distance(u,m))return s;const f=e.Cartesian3.angleBetween(u,m);s.push(t);for(let t=1;t<o-1;t++){const n=1*t/(o-1),i=1-n,r=Math.sin(i*f)/Math.sin(f),a=Math.sin(n*f)/Math.sin(f),c=e.Cartesian3.multiplyByScalar(u,r,new e.Cartesian3),l=e.Cartesian3.multiplyByScalar(m,a,new e.Cartesian3);let d=e.Cartesian3.add(c,l,new e.Cartesian3);const p=n*Math.PI,v=g*i+y*n+Math.sin(p)*h;d=e.Cartesian3.multiplyByScalar(d,v,d),s.push(d)}return s.push(n),s},j=e=>{const t=e.positionCartographic.height,n=-40467.74;return Math.round(n+80955.31/(1+(t/91610.74)**7096758e-11))},q=e=>e,Y=(t,n)=>{const i=[];let o=0,s=0,r=0;const a=[];for(let n=0;n<t.length-1;++n)o+=e.Cartesian3.distance(t[n],t[n+1]);for(let n=0;n<t.length;n++)0===n?s=0:(r+=e.Cartesian3.distance(t[n-1],t[n]),s=r/o),i.push(s);const c=new e.LinearSpline({times:i,points:t});for(let e=0;e<=n;e++){const t=c.evaluate(e/n);a.push(t)}return a};class Z{_primitive;_promise;appearance;geometryInstance;drawCommand;shapePositions;needUpdate=!1;constructor(){this._primitive=void 0,this.appearance=void 0,this.geometryInstance=void 0,this._promise=null,this.drawCommand=null,this.needUpdate=!1,this.shapePositions=[]}update(e){const t=this.getPrimitive();if(t){this._primitive=t;this._primitive.update(e)}}then(e=null){return this._promise?.then(e)}catch(e=null){return this._promise?.catch(e)}isDestroyed(){return!!this._primitive}destroy(){this._primitive=void 0}setShapePositions(e){this.shapePositions=e}}class W{_definitionChanged=new e.Event;get definitionChanged(){return this._definitionChanged}get isConstant(){return!1}}const K=t=>{let n=0;for(let i=0;i<t.length;i++){const o=t[i],s=t[(i+1)%t.length];n+=e.Cartesian3.cross(o,s,new e.Cartesian3).z}return n>0?t.reverse():t},J=t=>{let n=0;for(let i=0;i<t.length;i++){const o=t[i],s=t[(i+1)%t.length];n+=e.Cartesian3.cross(o,s,new e.Cartesian3).z}return n<0?t.reverse():t},Q=e=>e.map(e=>ee(e)),ee=t=>{const n=e.Cartographic.fromCartesian(t);return{longitude:e.Math.toDegrees(n.longitude),latitude:e.Math.toDegrees(n.latitude),height:n.height}},te=t=>t.map(t=>e.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height)),ne=t=>e.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),ie=e=>{const t=e[0],n=e[e.length-1];return t.x===n.x&&t.y===n.y&&t.z===n.z?e:[...e,e[0]]},oe=e=>{const t=[];return e.forEach(e=>{t.push({type:"Feature",geometry:{type:"Point",coordinates:[e.longitude,e.latitude]},properties:{height:e.height}})}),{type:"FeatureCollection",features:t}},se=e=>{const t=[];return e.forEach((n,i)=>{0!==i&&t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[e[i-1].longitude,e[i-1].latitude],[n.longitude,n.latitude]]},properties:{height:n.height}})}),{type:"FeatureCollection",features:t}},re=e=>{const t=[];return t.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e.map(e=>[e.longitude,e.latitude])]},properties:{heights:e.map(e=>e.height)}}),{type:"FeatureCollection",features:t}},ae=t=>({heading:e.Math.toRadians(t.yaw+(t.offsetYaw||0)),pitch:e.Math.toRadians(t.pitch),roll:e.Math.toRadians(t.roll)}),ce=e.BoxGeometry,le=e.Cartesian3,de=e.defaultValue,pe=e.defined,he=e.destroyObject,ue=e.DeveloperError,me=e.GeometryPipeline,ge=e.Matrix3,ye=e.Matrix4,fe=e.Transforms,ve=e.VertexFormat,Ce=e.BufferUsage,Me=e.CubeMap,we=e.DrawCommand,_e=e.loadCubeMap,be=e.RenderState,Te=e.VertexArray,Ee=e.BlendingState,Pe=e.SceneMode,xe=e.ShaderProgram,De=e.ShaderSource,Se=new ge;class ke{constructor(t){e.defined(e.Matrix4.getRotation)||(e.Matrix4.getRotation=e.Matrix4.getMatrix3),this.sources=t.sources,this._sources=void 0,this.show=de(t.show,!0),this._command=new we({modelMatrix:ye.clone(ye.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}update(e,t){const n=this;if(!this.show)return;if(e.mode!==Pe.SCENE3D&&e.mode!==Pe.MORPHING)return;if(!e.passes.render)return;const i=e.context;if(this._sources!==this.sources){this._sources=this.sources;const e=this.sources;if(!(pe(e.positiveX)&&pe(e.negativeX)&&pe(e.positiveY)&&pe(e.negativeY)&&pe(e.positiveZ)&&pe(e.negativeZ)))throw new ue("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof e.positiveX!=typeof e.negativeX||typeof e.positiveX!=typeof e.positiveY||typeof e.positiveX!=typeof e.negativeY||typeof e.positiveX!=typeof e.positiveZ||typeof e.positiveX!=typeof e.negativeZ)throw new ue("this.sources properties must all be the same type.");"string"==typeof e.positiveX?_e(i,this._sources).then(e=>{n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=e}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Me({context:i,source:e}))}const o=this._command;if(o.modelMatrix=fe.eastNorthUpToFixedFrame(e.camera._positionWC),!pe(o.vertexArray)){o.uniformMap={u_cubeMap:()=>n._cubeMap,u_rotateMatrix:()=>ye.getRotation(o.modelMatrix,Se)};const e=ce.createGeometry(ce.fromDimensions({dimensions:new le(2,2,2),vertexFormat:ve.POSITION_ONLY})),t=this._attributeLocations=me.createAttributeLocations(e);o.vertexArray=Te.fromGeometry({context:i,geometry:e,attributeLocations:t,bufferUsage:Ce._DRAW}),o.renderState=be.fromCache({blending:Ee.ALPHA_BLEND})}if(!pe(o.shaderProgram)||this._useHdr!==t){const e=new De({defines:[t?"HDR":""],sources:["precision highp float;\n\nuniform samplerCube u_cubeMap;\nin vec3 v_texCoord;\nout vec4 fragColor;\n\nvoid main() {\n vec4 color = texture(u_cubeMap, normalize(v_texCoord));\n fragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}"]});o.shaderProgram=xe.fromCache({context:i,vertexShaderSource:"#version 300 es\n\nprecision highp float;\n\nin vec3 position;\nout vec3 v_texCoord;\n\nuniform mat3 u_rotateMatrix;\n\nvoid main() {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position;\n}\n",fragmentShaderSource:e,attributeLocations:this._attributeLocations}),this._useHdr=t}return pe(this._cubeMap)?o:void 0}isDestroyed(){return!1}destroy(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),he(this)}}const Ie=t=>{const{viewer:n,sources:i}=t;return n.scene.skyBox=new e.SkyBox({sources:i}),n.scene.skyBox},Re=t=>{let{viewer:n,sources:i}=t;const o=t.height?t.height:225705,s=n.scene.skyBox;i||(i={positiveX:`${P()}/assets/ground-skybox/px.jpg`,negativeX:`${P()}/assets/ground-skybox/nx.jpg`,positiveY:`${P()}/assets/ground-skybox/py.jpg`,negativeY:`${P()}/assets/ground-skybox/ny.jpg`,positiveZ:`${P()}/assets/ground-skybox/pz.jpg`,negativeZ:`${P()}/assets/ground-skybox/nz.jpg`});const r=new ke({sources:i});n.scene.postRender.addEventListener(()=>{const t=n.camera.position;e.Cartographic.fromCartesian(t).height<o?(n.scene.skyBox=r,n.scene.skyAtmosphere.show=!1):(n.scene.skyBox=s,n.scene.skyAtmosphere.show=!0)})},Oe=t=>{const n=[];let i,o;t.clock.shouldAnimate=!0;const s={},r=(e,n)=>{if(a(),e.entity.cylinder){const n=e.entity.cylinder;n.roamId=e.id,e.entity.cylinder=void 0,o=t.entities.add({position:e.property,cylinder:n})}t.trackedEntity=e.entity,n&&(i=e)},a=()=>{if(o){t.entities.remove(o);const e=n.find(e=>e.id===o.cylinder.roamId);e&&(e.entity.cylinder=o.cylinder),o=void 0}},c=()=>{t.trackedEntity=void 0,i=void 0,a()},l=e=>{t.trackedEntity?.id===e.entity.id&&c(),t.entities.remove(e.entity);const i=n.findIndex(t=>t.id===e.id);i>-1&&n.splice(i,1)},d=(e,t)=>{const n=e.property.getValue(t);if(n&&(e.status="ROAMING",m.roaming&&m.roaming(e,{time:t,position:n})),e.stopTime.secondsOfDay<t.secondsOfDay&&"END"!==e.status&&(e.status="END",m.end&&m.end(e),e.loop?p(e):c()),e.flyParams.hpr){const i=s[e.id].find(e=>e.time>t.secondsOfDay);i&&u(e,i,n)}},p=n=>{const{property:i,startTime:o,stopTime:s}=h(n);n.stopTime=s,n.startTime=o,n.property=i,n.flyParams.hpr||(n.entity.orientation=new e.VelocityOrientationProperty(i)),n.entity.position=i,n.status="START",t.clock.currentTime=o,t.clock.multiplier=1,m.reStart&&m.reStart(n)},h=t=>{const n=[],{positions:i,flyParams:o}=t,r=new e.SampledPositionProperty;let a=0;const c=e.JulianDate.now();let l=c.clone();return i.forEach((t,s)=>{let d=e.JulianDate.now();if(s){let n=0;if(o.speed){n=e.Cartesian3.distance(t,i[s-1])/(1e3*o.speed/3600)}o.times&&(n=(o.times[s]-o.times[s-1])/1e3),a+=n,d=e.JulianDate.addSeconds(c,a,new e.JulianDate)}else d=c;l=d,r.addSample(d,t),o.hpr&&n.push({time:d.secondsOfDay,heading:o.hpr[s].heading,pitch:o.hpr[s].pitch,roll:o.hpr[s].roll})}),s[t.id]=n,{property:r,startTime:c,stopTime:l}},u=(t,n,i)=>{if(!i)return;const{heading:o,pitch:s,roll:r}=n,a=new e.HeadingPitchRoll(o,s,r);t.entity.orientation=Transforms.headingPitchRollQuaternion(i,a)};t.scene.preRender.addEventListener((o,s)=>{if(n.forEach(e=>{d(e,s)}),!i)return;const r=i.entity.computeModelMatrix(t.clock.currentTime);r&&t.camera.lookAtTransform(r,new e.Cartesian3(...[-20,0,5]))});const m={};return{set:i=>{const{entity:o}=i;i.id=b(),t.entities.add(o);const{property:s,startTime:r,stopTime:a}=h(i);i.flyParams.hpr||(o.orientation=new e.VelocityOrientationProperty(s)),o.position=s;const c={...i,startTime:r,stopTime:a,property:s,status:"START"};return t.clock.currentTime=r,t.clock.multiplier=1,n.push(c),c.status="START",m.start&&m.start(c),c},tracked:r,stopTracked:c,remove:l,frameRoam:d,trackedByEntityId:(e,t)=>{const i=n.find(t=>t.entity.id===e);i&&r(i,t)},removeAll:()=>{n.forEach(e=>{l(e)}),n.length=0},Event:m,lockCameraView:e=>{i=e},updateRoamAttitude:(t,n)=>{"UP"!==n&&"DOWN"!==n||(t.entity.orientation=void 0),"front"!==n&&"back"!==n||(t.entity.orientation=new e.VelocityOrientationProperty(t.property))}}};var Ae=(e=>(e.UP="UP",e.DOWN="DOWN",e.LEFT="left",e.RIGHT="right",e.FRONT="front",e.BACK="back",e))(Ae||{}),Fe=(e=>(e.END="END",e.START="START",e.ROAMING="ROAMING",e))(Fe||{});let Ne=100,Le="",Be="0";const Ve=t=>{const{viewer:n}=t,i=document.createElement("div");i.className="bottom-status-bar";const o=document.createElement("div");o.className="scale-bar",o.innerHTML="";const s=document.createElement("div");s.className="scale-label",s.innerHTML="",o.appendChild(s),i.appendChild(o);const r=document.createElement("div");r.id="bottom-status-bar-camera",t.clickCopy&&(r.style.pointerEvents="auto",r.style.cursor="pointer"),i.appendChild(r),r.style.display="flex";const a=document.createElement("div"),c=document.createElement("div"),l=n._element.getElementsByClassName("cesium-widget")[0];if(!l)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");l.appendChild(i),M(n,{MOVE_POSITION(e){r.innerHTML=`\n 经度:${e.lnglat.lng.toFixed(6)}&nbsp;&nbsp;\n 纬度:${e.lnglat.lat.toFixed(6)}&nbsp;&nbsp;\n 高程:${e.lnglat.height.toFixed(2)}&nbsp;&nbsp;\n `,t.clickCopy&&u(n),r.appendChild(c),r.appendChild(a)}}),t.clickCopy&&document.addEventListener("click",e=>{e.target.id});let d=Date.now(),p=0;const h=()=>{requestAnimationFrame(()=>{if(p+=1,p>=30){const e=Date.now(),t=e-d,n=Math.round(1e3/(t/p));d=e,p=0,a.innerHTML=`${n} FPS`}t.hpr?c.innerHTML=`\n 方位角:${e.Math.toDegrees(n.camera.heading).toFixed(1)}°&nbsp;&nbsp;\n 俯仰角:${e.Math.toDegrees(n.camera.pitch).toFixed(1)}°&nbsp;&nbsp;\n 翻滚角:${e.Math.toDegrees(n.camera.roll).toFixed(1)}°&nbsp;&nbsp;\n `:c.innerHTML="",c.innerHTML+=`\n 视高:${n.camera.positionCartographic.height.toFixed(0)}m&nbsp;&nbsp;\n `;const i=$e(n);s.innerHTML=`${i.distanceLabel}`,h()})};h()},$e=t=>{const n=t.camera.positionCartographic.height.toFixed(0);if(n===Be)return{barWidth:Ne,distanceLabel:Le};Be=n;const i=new e.EllipsoidGeodesic,o=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7],s=t.scene,r=s.canvas.clientWidth,a=s.canvas.clientHeight,c=s.camera.getPickRay(new e.Cartesian2(r/2|0,a-1)),l=s.camera.getPickRay(new e.Cartesian2(1+r/2|0,a-1)),d=s.globe,p=d.pick(c,s),h=d.pick(l,s);if(!e.defined(p)||!e.defined(h))return{barWidth:Ne,distanceLabel:Le};const u=d.ellipsoid.cartesianToCartographic(p),m=d.ellipsoid.cartesianToCartographic(h);i.setEndPoints(u,m);const g=i.surfaceDistance;let y;for(let t=o.length-1;!e.defined(y)&&t>=0;--t)o[t]/g<100&&(y=o[t]);if(e.defined(y)){const e=y>=1e3?`${(y/1e3).toString()} km`:`${y.toString()} m`;Ne=y/g|0,Le=e}else Ne=0,Le="";return{barWidth:Ne,distanceLabel:Le}},Ge=t=>new Promise(n=>{const{viewer:i,center:o}=t;let s=o.lng,r=1,a=null;const c=t=>{null===a&&(a=t);s-=(t-a)/2e4*2,s<-180&&(s=180,r+=1),2===r&&s>o.lng?i.camera.flyTo({destination:e.Cartesian3.fromDegrees(o.lng,o.lat,3e7),duration:2,orientation:{heading:e.Math.toRadians(360),pitch:e.Math.toRadians(-90),roll:0},easingFunction:e.EasingFunction.LINEAR_NONE,complete:()=>{i.camera.flyTo({destination:e.Cartesian3.fromDegrees(o.lng,o.lat,o.height),duration:3,orientation:{heading:e.Math.toRadians(2.8),pitch:e.Math.toRadians(-90),roll:6.282253919167732},complete:()=>{n(!0)}})}}):(i.camera.setView({destination:e.Cartesian3.fromDegrees(s,o.lat,3e7),orientation:{heading:e.Math.toRadians(360),pitch:e.Math.toRadians(-90),roll:0}}),requestAnimationFrame(c))};requestAnimationFrame(c)}),He=(t,n,i)=>{const o=new Float64Array(24);for(let e=0;e<8;e++)o[3*e]=t[e].x,o[3*e+1]=t[e].y,o[3*e+2]=t[e].z;const s=new Uint16Array([0,1,2,0,2,3,4,6,5,4,7,6,0,4,1,1,4,5,1,5,2,2,5,6,2,6,3,3,6,7,3,7,0,0,7,4]),r={position:new e.GeometryAttribute({componentDatatype:e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},a=new e.Geometry({indices:s,attributes:r,primitiveType:e.PrimitiveType.TRIANGLES,boundingSphere:e.BoundingSphere.fromVertices(o)});return new e.GeometryInstance({geometry:a,attributes:{color:e.ColorGeometryInstanceAttribute.fromColor(n)},id:`${i}`})},ze=(t,n,i)=>{const[o,s,r,a,c,l,d,p]=t,h=[o,s,s,r,r,a,a,o,c,l,l,d,d,p,p,c,o,c,c,l,l,s,s,o,a,p,p,d,d,r,r,a,o,a,a,p,p,c,c,o,s,l,l,d,d,r,r,s];return new e.GeometryInstance({geometry:new e.PolylineGeometry({positions:h,width:2,vertexFormat:e.PolylineColorAppearance.VERTEX_FORMAT}),attributes:{color:e.ColorGeometryInstanceAttribute.fromColor(n)},id:`${i}`})},Ue=(t,n)=>[e.Cartesian3.fromDegrees(t.longitude,t.latitude,n.height),e.Cartesian3.fromDegrees(t.longitude,n.latitude,n.height),e.Cartesian3.fromDegrees(n.longitude,n.latitude,n.height),e.Cartesian3.fromDegrees(n.longitude,t.latitude,n.height),e.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),e.Cartesian3.fromDegrees(t.longitude,n.latitude,t.height),e.Cartesian3.fromDegrees(n.longitude,n.latitude,t.height),e.Cartesian3.fromDegrees(n.longitude,t.latitude,t.height)],Xe=(t,n,i,o,s,r)=>[e.Cartesian3.fromDegrees(t,t,s),e.Cartesian3.fromDegrees(n,n,s),e.Cartesian3.fromDegrees(i,i,s),e.Cartesian3.fromDegrees(o,o,s),e.Cartesian3.fromDegrees(t,t,r),e.Cartesian3.fromDegrees(n,n,r),e.Cartesian3.fromDegrees(i,i,r),e.Cartesian3.fromDegrees(o,o,r)],je=3e3*Math.PI/180,qe=Math.PI,Ye=6378245,Ze=.006693421622965943,We=(e,t)=>!(e>72.004&&e<137.8347&&t>.8293&&t<55.8271),Ke=(e,t)=>{let n=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return n+=2*(20*Math.sin(6*e*qe)+20*Math.sin(2*e*qe))/3,n+=2*(20*Math.sin(t*qe)+40*Math.sin(t/3*qe))/3,n+=2*(160*Math.sin(t/12*qe)+320*Math.sin(t*qe/30))/3,n},Je=(e,t)=>{let n=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return n+=2*(20*Math.sin(6*e*qe)+20*Math.sin(2*e*qe))/3,n+=2*(20*Math.sin(e*qe)+40*Math.sin(e/3*qe))/3,n+=2*(150*Math.sin(e/12*qe)+300*Math.sin(e/30*qe))/3,n},Qe=(e,t)=>{if(We(e,t))return[e,t];let n=Ke(e-105,t-35),i=Je(e-105,t-35);const o=t/180*qe;let s=Math.sin(o);s=1-Ze*s*s;const r=Math.sqrt(s);n=180*n/(Ye*(1-Ze)/(s*r)*qe),i=180*i/(Ye/r*Math.cos(o)*qe);return[e+i,t+n]},et=(e,t)=>{if(We(e,t))return[e,t];let n=Ke(e-105,t-35),i=Je(e-105,t-35);const o=t/180*qe;let s=Math.sin(o);s=1-Ze*s*s;const r=Math.sqrt(s);n=180*n/(Ye*(1-Ze)/(s*r)*qe),i=180*i/(Ye/r*Math.cos(o)*qe);return[2*e-(e+i),2*t-(t+n)]},tt=(e,t)=>{const n=e,i=t,o=Math.sqrt(n*n+i*i)+2e-5*Math.sin(i*je),s=Math.atan2(i,n)+3e-6*Math.cos(n*je);return[o*Math.cos(s)+.0065,o*Math.sin(s)+.006]},nt=(e,t)=>{const n=e-.0065,i=t-.006,o=Math.sqrt(n*n+i*i)-2e-5*Math.sin(i*je),s=Math.atan2(i,n)-3e-6*Math.cos(n*je);return[o*Math.cos(s),o*Math.sin(s)]};class it{static wgs84ToGcj02(e){const[t,n]=Qe(e.lng,e.lat);return{lng:t,lat:n}}static gcj02ToWgs84(e){const[t,n]=et(e.lng,e.lat);return{lng:t,lat:n}}static gcj02ToBd09(e){const[t,n]=tt(e.lng,e.lat);return{lng:t,lat:n}}static bd09ToGcj02(e){const[t,n]=nt(e.lng,e.lat);return{lng:t,lat:n}}static bd09ToWgs84(e){const[t,n]=((e,t)=>{const[n,i]=nt(e,t);return et(n,i)})(e.lng,e.lat);return{lng:t,lat:n}}static wgs84ToBd09(e){const[t,n]=((e,t)=>{const[n,i]=Qe(e,t);return tt(n,i)})(e.lng,e.lat);return{lng:t,lat:n}}}export{W as BaseMaterialProperty,Z as BasePrimitive,i as Common,it as CoordinateTransformer,l as DefaultViewerOptions,Ae as FlyAttitude,D as Popup,Fe as RoamStatus,x as Tooltip,G as calcArea,q as calcCameraHeightFromZoom,B as calcGeodesicDistance,V as calcGeodesicDistances,Y as calcLerpPosition,$ as calcPoistionCenter,U as calcSceneHeightFromPositions,N as calcSpaceDistance,L as calcSpaceDistances,z as calcTerrainHeightFromPositions,H as calcTriangleArea,j as calcZoomFromCameraHeight,X as clacPositionsForParabola,Ve as createBottomStatusBar,F as createEagleEye,Ge as createOpenAnim,Oe as createRoamHandler,Ie as createSkyBox,Re as createSkyBoxOnGround,m as flyToCameraView,f as flyToCesium3DTile,g as flyToDataSource,v as flyToFromSphere,y as flyToImagery,p as flyToLnglat,h as flyToPosition,u as getCameraView,c as getCesiumForAutoFitScale,P as getInoCesiumBaseUrl,s as initCesium,M as initCesiumEvent,Ue as makeGridFromElevationExtrema,He as makeGridToInstanceForBox,ze as makeGridToInstanceForLine,ne as makeLnglatToPosition,se as makeLnglatsToLineGeojson,oe as makeLnglatsToPointGeojson,re as makeLnglatsToPolygonGeojson,te as makeLnglatsToPositions,ie as makePositionsClose,J as makePositionsForAntiClockwise,K as makePositionsForClockwise,Q as makePositionsToLnglats,ee as makePositiontoLnglat,ae as makeYawPitchRollToHeadingPitchRoll,Xe as mekeGridPolygonAndHeight,b as numberId,I as randomColor,S as randomPointToGeoJson,O as randomPolygonToGeoJson,R as randomPolylineToGeoJson,a as setCesiumForAutoFitScale,r as setGlobeOpatity,E as setInoCesiumBaseUrl,d as setViewToLnglat,C as twinkleModel};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ino-cesium/common",
3
3
  "type": "module",
4
- "version": "0.0.16-beta.2",
4
+ "version": "0.0.16-beta.4",
5
5
  "author": "koino",
6
6
  "keywords": [
7
7
  "cesium",