earthsdk3-cesium 3.4.0-beta.12 → 3.4.0-beta.13

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.
@@ -4106,10 +4106,10 @@ async function initCesiumViewer(container, czmViewer) {
4106
4106
  `;function mV(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
4107
4107
  github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
4108
4108
  gitee地址:${t}
4109
- `;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const zt=class zt extends V.ESViewer{constructor(e){super(e);L(this,"_disabledInputStack",this.disposeVar(d.react(0)));L(this,"_viewer",this.dv(d.react(void 0)));L(this,"_viewerInstance");L(this,"_viewerLegend");L(this,"pickCustomAttachedInfo");L(this,"_fps",this.dv(d.react(0)));L(this,"_notSupportEditingCount",this.disposeVar(d.react(0)));L(this,"_editingSystem",_f);L(this,"_moveObjectsProcess",this.ad(WS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new $z(this)),this.ad(new Yz(this)),this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new t6(this)})),this._viewerLegend=this.dv(new cV(this)),this._viewerInstance=this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Xv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Ie([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new d.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new jQ(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Dn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=C.Cartographic.fromDegrees(e[0],e[1],e[2],zt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=C.Cartesian3.fromDegrees(...e),a=C.Cartesian3.distance(o.positionWC,s),l=C.Cartesian3.subtract(s,r,new C.Cartesian3);C.Cartesian3.normalize(l,l);const u=C.Transforms.rotationMatrixFromPositionVelocity(r,l,C.Ellipsoid.WGS84),h=C.Matrix4.fromRotationTranslation(u,r);var c=C.Transforms.eastNorthUpToFixedFrame(C.Matrix4.getTranslation(h,new C.Cartesian3),C.Ellipsoid.WGS84,new C.Matrix4),A=C.Matrix4.multiply(C.Matrix4.inverse(c,new C.Matrix4),h,new C.Matrix4),p=C.Matrix4.getMatrix3(A,new C.Matrix3),f=C.Quaternion.fromRotationMatrix(p),g=C.HeadingPitchRoll.fromQuaternion(f);const v=aa(o);return{distance:a,heading:C.Math.toDegrees(g.heading)+90,pitch:C.Math.toDegrees(g.pitch),flyDuration:1,hDelta:-(v[0]-(C.Math.toDegrees(g.heading)+90)),pDelta:v[1]-C.Math.toDegrees(g.pitch)}}flyIn(e,i,o,r="default"){var l;if(!i)return;i[0]=-i[0];const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&Vs(a,s)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:h}=e,c={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:h},A=(p=this.viewer)==null?void 0:p.camera;return A&&Vs(A,c)}flyToBoundingSphere(e,i,o=1){var c;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=V.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},h=(c=this.viewer)==null?void 0:c.camera;return h&&Vs(h,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,s,a){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=C.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=C.Cartographic.fromDegrees(e,i,void 0,zt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await O0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(ft(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${d.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=d.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&i.push(a)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=zt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!zt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=zt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return fn(e,i)}localPositionsToPositions(e,i){return mr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=ft(e),o=new C.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=zt.defaults;return{...e,more:[...e.more,new V.GroupProperty([],"通用","通用"),new V.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",pV,dV,!0),new V.FunctionProperty([],()=>zt.getCesiumIonToken(),[],"获取官方token"),new V.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new V.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new V.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new V.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new V.GroupProperty([],"Viewer","Viewer"),new V.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new V.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new V.BooleanProperty([this,"shadows"]),new V.GroupProperty([],"比例尺","比例尺(Legend)"),new V.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new V.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new V.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new V.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new V.GroupProperty([],"场景","场景(Scene)"),new V.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new V.GroupProperty([],"Globe","Globe"),new V.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",i.depthTestAgainstTerrain,!0),new V.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new V.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new V.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new V.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new V.BooleanProperty([this,"sceneGlobeShowSkirts"]),new V.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new V.ColorProperty([this,"sceneGlobeBaseColor"]),new V.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new V.JsonProperty([this,"sceneGlobeClippingPlanes"]),new V.StringProperty([this,"sceneGlobeClippingPlanesId"]),new V.JsonProperty([this,"sceneGlobeClippingPolygons"]),new V.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new V.GroupProperty([],"underground","underground"),new V.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new V.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new V.GroupProperty([],"Translucency","Translucency"),new V.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",i.sceneGlobeTranslucencyEnabled,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",i.sceneGlobeTranslucencyBackFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",i.sceneGlobeTranslucencyFrontFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new V.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new V.GroupProperty([],"Sun","Sun"),new V.BooleanProperty([this,"sun"],"sun",i.sun,!0),new V.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new V.GroupProperty([],"Moon","Moon"),new V.BooleanProperty([this,"moon"],"moon",i.moon,!0),new V.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new V.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new V.GroupProperty([],"SkyBox","SkyBox"),new V.BooleanProperty([this,"sceneSkyBoxShow"]),new V.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new V.GroupProperty([],"Background","Background"),new V.BooleanProperty([this,"xbsjUseBackground"]),new V.StringProperty([this,"xbsjBackgroundImageUri"]),new V.ColorProperty([this,"xbsjBackgroundColor"]),new V.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new V.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new V.ColorProperty([this,"sceneBackgroundColor"]),new V.GroupProperty([],"Fog","Fog"),new V.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new V.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new V.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new V.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new V.GroupProperty([],"Sscc","Sscc"),new V.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new V.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new V.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new V.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new V.GroupProperty([],"后处理","后处理"),new V.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new V.GroupProperty([],"环境遮蔽","环境遮蔽"),new V.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new V.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new V.GroupProperty([],"Bloom","Bloom"),new V.BooleanProperty([this,"scenePpsBloomEnabled"]),new V.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new V.NumberProperty([this,"scenePpsBloomContrast"]),new V.NumberProperty([this,"scenePpsBloomBrightness"]),new V.NumberProperty([this,"scenePpsBloomDelta"]),new V.NumberProperty([this,"scenePpsBloomSigma"]),new V.NumberProperty([this,"scenePpsBloomStepSize"]),new V.GroupProperty([],"调试","调试"),new V.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new V.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new V.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new V.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new V.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new V.GroupProperty([],"Inspector","Inspector"),new V.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new V.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new V.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};L(zt,"type",zt.register("ESCesiumViewer",zt)),L(zt,"getCesiumIonToken",mV),L(zt,"currentDefaultAccessToken",C.Ion.defaultAccessToken),L(zt,"latestDefaultAccessToken"),L(zt,"ObjectsToExcludeWrapper",e6),L(zt,"defaults",{...V.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:C.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),L(zt,"getHeightsScartchCarto",new C.Cartographic);let tt=zt;(t=>{t.createDefaultProps=()=>({...V.ESViewer.createDefaultProps(),...fV()})})(tt||(tt={})),d.extendClassProps(tt.prototype,tt.createDefaultProps),ae.copyright=void 0;try{const t="earthsdk3-cesium",n="3.4.0-beta.12",e="2025-09-09T07:38:04.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="f67aacb710aadc7ef8013d562825b5470d533599",a=((Date.now()-1757403484e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
4109
+ `;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const zt=class zt extends V.ESViewer{constructor(e){super(e);L(this,"_disabledInputStack",this.disposeVar(d.react(0)));L(this,"_viewer",this.dv(d.react(void 0)));L(this,"_viewerInstance");L(this,"_viewerLegend");L(this,"pickCustomAttachedInfo");L(this,"_fps",this.dv(d.react(0)));L(this,"_notSupportEditingCount",this.disposeVar(d.react(0)));L(this,"_editingSystem",_f);L(this,"_moveObjectsProcess",this.ad(WS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new $z(this)),this.ad(new Yz(this)),this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new t6(this)})),this._viewerLegend=this.dv(new cV(this)),this._viewerInstance=this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Xv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Ie([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new d.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new jQ(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Dn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=C.Cartographic.fromDegrees(e[0],e[1],e[2],zt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=C.Cartesian3.fromDegrees(...e),a=C.Cartesian3.distance(o.positionWC,s),l=C.Cartesian3.subtract(s,r,new C.Cartesian3);C.Cartesian3.normalize(l,l);const u=C.Transforms.rotationMatrixFromPositionVelocity(r,l,C.Ellipsoid.WGS84),h=C.Matrix4.fromRotationTranslation(u,r);var c=C.Transforms.eastNorthUpToFixedFrame(C.Matrix4.getTranslation(h,new C.Cartesian3),C.Ellipsoid.WGS84,new C.Matrix4),A=C.Matrix4.multiply(C.Matrix4.inverse(c,new C.Matrix4),h,new C.Matrix4),p=C.Matrix4.getMatrix3(A,new C.Matrix3),f=C.Quaternion.fromRotationMatrix(p),g=C.HeadingPitchRoll.fromQuaternion(f);const v=aa(o);return{distance:a,heading:C.Math.toDegrees(g.heading)+90,pitch:C.Math.toDegrees(g.pitch),flyDuration:1,hDelta:-(v[0]-(C.Math.toDegrees(g.heading)+90)),pDelta:v[1]-C.Math.toDegrees(g.pitch)}}flyIn(e,i,o,r="default"){var l;if(!i)return;i[0]=-i[0];const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&Vs(a,s)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:h}=e,c={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:h},A=(p=this.viewer)==null?void 0:p.camera;return A&&Vs(A,c)}flyToBoundingSphere(e,i,o=1){var c;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=V.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},h=(c=this.viewer)==null?void 0:c.camera;return h&&Vs(h,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,s,a){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=C.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=C.Cartographic.fromDegrees(e,i,void 0,zt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await O0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(ft(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${d.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=d.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&i.push(a)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=zt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!zt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=zt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return fn(e,i)}localPositionsToPositions(e,i){return mr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=ft(e),o=new C.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=zt.defaults;return{...e,more:[...e.more,new V.GroupProperty([],"通用","通用"),new V.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",pV,dV,!0),new V.FunctionProperty([],()=>zt.getCesiumIonToken(),[],"获取官方token"),new V.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new V.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new V.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new V.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new V.GroupProperty([],"Viewer","Viewer"),new V.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new V.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new V.BooleanProperty([this,"shadows"]),new V.GroupProperty([],"比例尺","比例尺(Legend)"),new V.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new V.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new V.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new V.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new V.GroupProperty([],"场景","场景(Scene)"),new V.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new V.GroupProperty([],"Globe","Globe"),new V.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",i.depthTestAgainstTerrain,!0),new V.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new V.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new V.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new V.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new V.BooleanProperty([this,"sceneGlobeShowSkirts"]),new V.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new V.ColorProperty([this,"sceneGlobeBaseColor"]),new V.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new V.JsonProperty([this,"sceneGlobeClippingPlanes"]),new V.StringProperty([this,"sceneGlobeClippingPlanesId"]),new V.JsonProperty([this,"sceneGlobeClippingPolygons"]),new V.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new V.GroupProperty([],"underground","underground"),new V.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new V.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new V.GroupProperty([],"Translucency","Translucency"),new V.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",i.sceneGlobeTranslucencyEnabled,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",i.sceneGlobeTranslucencyBackFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",i.sceneGlobeTranslucencyFrontFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new V.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new V.GroupProperty([],"Sun","Sun"),new V.BooleanProperty([this,"sun"],"sun",i.sun,!0),new V.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new V.GroupProperty([],"Moon","Moon"),new V.BooleanProperty([this,"moon"],"moon",i.moon,!0),new V.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new V.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new V.GroupProperty([],"SkyBox","SkyBox"),new V.BooleanProperty([this,"sceneSkyBoxShow"]),new V.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new V.GroupProperty([],"Background","Background"),new V.BooleanProperty([this,"xbsjUseBackground"]),new V.StringProperty([this,"xbsjBackgroundImageUri"]),new V.ColorProperty([this,"xbsjBackgroundColor"]),new V.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new V.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new V.ColorProperty([this,"sceneBackgroundColor"]),new V.GroupProperty([],"Fog","Fog"),new V.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new V.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new V.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new V.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new V.GroupProperty([],"Sscc","Sscc"),new V.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new V.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new V.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new V.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new V.GroupProperty([],"后处理","后处理"),new V.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new V.GroupProperty([],"环境遮蔽","环境遮蔽"),new V.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new V.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new V.GroupProperty([],"Bloom","Bloom"),new V.BooleanProperty([this,"scenePpsBloomEnabled"]),new V.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new V.NumberProperty([this,"scenePpsBloomContrast"]),new V.NumberProperty([this,"scenePpsBloomBrightness"]),new V.NumberProperty([this,"scenePpsBloomDelta"]),new V.NumberProperty([this,"scenePpsBloomSigma"]),new V.NumberProperty([this,"scenePpsBloomStepSize"]),new V.GroupProperty([],"调试","调试"),new V.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new V.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new V.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new V.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new V.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new V.GroupProperty([],"Inspector","Inspector"),new V.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new V.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new V.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};L(zt,"type",zt.register("ESCesiumViewer",zt)),L(zt,"getCesiumIonToken",mV),L(zt,"currentDefaultAccessToken",C.Ion.defaultAccessToken),L(zt,"latestDefaultAccessToken"),L(zt,"ObjectsToExcludeWrapper",e6),L(zt,"defaults",{...V.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:C.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),L(zt,"getHeightsScartchCarto",new C.Cartographic);let tt=zt;(t=>{t.createDefaultProps=()=>({...V.ESViewer.createDefaultProps(),...fV()})})(tt||(tt={})),d.extendClassProps(tt.prototype,tt.createDefaultProps),ae.copyright=void 0;try{const t="earthsdk3-cesium",n="3.4.0-beta.13",e="2025-09-12T03:50:09.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="feca93890b3042c1cb64b9d07335c6a13715edb1",a=((Date.now()-1757649009e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
4110
4110
  %c${o?o+`
4111
4111
  `:""}当前网站正在使用${t},此软件版权归${i}所有
4112
- `;ae.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","f67aacb710aadc7ef8013d562825b5470d533599")},get info(){return l},get date(){return"2025-09-09T07:38:04.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.12"},get name(){return"earthsdk3-cesium"},get commitId(){return"f67aacb710aadc7ef8013d562825b5470d533599"},print(){console.info(this.info,`
4112
+ `;ae.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","feca93890b3042c1cb64b9d07335c6a13715edb1")},get info(){return l},get date(){return"2025-09-12T03:50:09.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.13"},get name(){return"earthsdk3-cesium"},get commitId(){return"feca93890b3042c1cb64b9d07335c6a13715edb1"},print(){console.info(this.info,`
4113
4113
  font-size: 18px;
4114
4114
  font-weight: 1000;
4115
4115
  line-height: 1;
@@ -49904,7 +49904,7 @@ let Ge = Pt;
49904
49904
  ae(Ge.prototype, Ge.createDefaultProps);
49905
49905
  let Qp;
49906
49906
  try {
49907
- const t = "earthsdk3-cesium", i = "3.4.0-beta.12", e = "2025-09-09T07:38:04.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "f67aacb710aadc7ef8013d562825b5470d533599", a = ((Date.now() - 1757403484e3) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
49907
+ const t = "earthsdk3-cesium", i = "3.4.0-beta.13", e = "2025-09-12T03:50:09.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "feca93890b3042c1cb64b9d07335c6a13715edb1", a = ((Date.now() - 1757649009e3) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
49908
49908
  %c${o ? o + `
49909
49909
  ` : ""}当前网站正在使用${t},此软件版权归${s}所有
49910
49910
  `;
@@ -49918,7 +49918,7 @@ try {
49918
49918
  },
49919
49919
  // @ts-ignore
49920
49920
  get gituri() {
49921
- return GITURI_ && GITURI_.replace("${commitId}", "f67aacb710aadc7ef8013d562825b5470d533599");
49921
+ return GITURI_ && GITURI_.replace("${commitId}", "feca93890b3042c1cb64b9d07335c6a13715edb1");
49922
49922
  },
49923
49923
  // @ts-ignore
49924
49924
  get info() {
@@ -49926,7 +49926,7 @@ try {
49926
49926
  },
49927
49927
  // @ts-ignore
49928
49928
  get date() {
49929
- return "2025-09-09T07:38:04.000Z";
49929
+ return "2025-09-12T03:50:09.000Z";
49930
49930
  },
49931
49931
  // @ts-ignore
49932
49932
  get author() {
@@ -49934,7 +49934,7 @@ try {
49934
49934
  },
49935
49935
  // @ts-ignore
49936
49936
  get version() {
49937
- return "3.4.0-beta.12";
49937
+ return "3.4.0-beta.13";
49938
49938
  },
49939
49939
  // @ts-ignore
49940
49940
  get name() {
@@ -49942,7 +49942,7 @@ try {
49942
49942
  },
49943
49943
  // @ts-ignore
49944
49944
  get commitId() {
49945
- return "f67aacb710aadc7ef8013d562825b5470d533599";
49945
+ return "feca93890b3042c1cb64b9d07335c6a13715edb1";
49946
49946
  },
49947
49947
  print() {
49948
49948
  console.info(
@@ -2255,10 +2255,10 @@ async function initCesiumViewer(container, czmViewer) {
2255
2255
  `;function Kk(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
2256
2256
  github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
2257
2257
  gitee地址:${t}
2258
- `;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const rt=class rt extends w.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(l.react(0)));v(this,"_viewer",this.dv(l.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(l.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(l.react(0)));v(this,"_editingSystem",Dh);v(this,"_moveObjectsProcess",this.ad(i_()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new b2(this)),this.ad(new R2(this)),this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new z2(this)})),this._viewerLegend=this.dv(new qk(this)),this._viewerInstance=this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new cm(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=ie([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new l.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new FF(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Yt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],rt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=h.Cartesian3.fromDegrees(...e),a=h.Cartesian3.distance(o.positionWC,s),c=h.Cartesian3.subtract(s,r,new h.Cartesian3);h.Cartesian3.normalize(c,c);const d=h.Transforms.rotationMatrixFromPositionVelocity(r,c,h.Ellipsoid.WGS84),u=h.Matrix4.fromRotationTranslation(d,r);var p=h.Transforms.eastNorthUpToFixedFrame(h.Matrix4.getTranslation(u,new h.Cartesian3),h.Ellipsoid.WGS84,new h.Matrix4),f=h.Matrix4.multiply(h.Matrix4.inverse(p,new h.Matrix4),u,new h.Matrix4),g=h.Matrix4.getMatrix3(f,new h.Matrix3),m=h.Quaternion.fromRotationMatrix(g),y=h.HeadingPitchRoll.fromQuaternion(m);const P=$o(o);return{distance:a,heading:h.Math.toDegrees(y.heading)+90,pitch:h.Math.toDegrees(y.pitch),flyDuration:1,hDelta:-(P[0]-(h.Math.toDegrees(y.heading)+90)),pDelta:P[1]-h.Math.toDegrees(y.pitch)}}flyIn(e,n,o,r="default"){var c;if(!n)return;n[0]=-n[0];const s={position:e,rotation:n,duration:(o??1)*1e3},a=(c=this.viewer)==null?void 0:c.camera;return a&&ps(a,s)}flyTo(e,n,o="default"){var g;const{distance:r,heading:s,pitch:a,flyDuration:c,hDelta:d,pDelta:u}=e,p={position:n,viewDistance:r,rotation:[s,a,0],duration:c*1e3,hdelta:d,pdelta:u},f=(g=this.viewer)==null?void 0:g.camera;return f&&ps(f,p)}flyToBoundingSphere(e,n,o=1){var p;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=w.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:c}=s,d={position:a,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},u=(p=this.viewer)==null?void 0:p.camera;return u&&ps(u,d)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,r,s,a){var c,d;(d=(c=this._viewerInstance)==null?void 0:c.obj)==null||d.navigationManager.changeToLine(e,n,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToFollow(e,n,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const r=h.Cartographic.fromDegrees(e,n,void 0,rt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,n){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await jm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Ve(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&n!=null&&(r.editingID=`${o.callSource}_${l.createGuid()}`,this._editingSystem.create(this,r,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=l.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&n.push(a)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=rt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!rt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=rt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Mt(e,n)}localPositionsToPositions(e,n){return gn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Ve(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},n=rt.defaults;return{...e,more:[...e.more,new w.GroupProperty([],"通用","通用"),new w.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",Qk,Zk,!0),new w.FunctionProperty([],()=>rt.getCesiumIonToken(),[],"获取官方token"),new w.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new w.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new w.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new w.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new w.GroupProperty([],"Viewer","Viewer"),new w.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new w.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new w.BooleanProperty([this,"shadows"]),new w.GroupProperty([],"比例尺","比例尺(Legend)"),new w.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new w.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new w.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new w.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new w.GroupProperty([],"场景","场景(Scene)"),new w.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new w.GroupProperty([],"Globe","Globe"),new w.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",n.depthTestAgainstTerrain,!0),new w.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new w.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new w.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new w.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new w.BooleanProperty([this,"sceneGlobeShowSkirts"]),new w.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new w.ColorProperty([this,"sceneGlobeBaseColor"]),new w.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new w.JsonProperty([this,"sceneGlobeClippingPlanes"]),new w.StringProperty([this,"sceneGlobeClippingPlanesId"]),new w.JsonProperty([this,"sceneGlobeClippingPolygons"]),new w.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new w.GroupProperty([],"underground","underground"),new w.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new w.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new w.GroupProperty([],"Translucency","Translucency"),new w.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",n.sceneGlobeTranslucencyEnabled,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",n.sceneGlobeTranslucencyBackFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",n.sceneGlobeTranslucencyFrontFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new w.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new w.GroupProperty([],"Sun","Sun"),new w.BooleanProperty([this,"sun"],"sun",n.sun,!0),new w.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new w.GroupProperty([],"Moon","Moon"),new w.BooleanProperty([this,"moon"],"moon",n.moon,!0),new w.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new w.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new w.GroupProperty([],"SkyBox","SkyBox"),new w.BooleanProperty([this,"sceneSkyBoxShow"]),new w.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new w.GroupProperty([],"Background","Background"),new w.BooleanProperty([this,"xbsjUseBackground"]),new w.StringProperty([this,"xbsjBackgroundImageUri"]),new w.ColorProperty([this,"xbsjBackgroundColor"]),new w.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new w.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new w.ColorProperty([this,"sceneBackgroundColor"]),new w.GroupProperty([],"Fog","Fog"),new w.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new w.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new w.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new w.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new w.GroupProperty([],"Sscc","Sscc"),new w.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new w.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new w.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new w.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new w.GroupProperty([],"后处理","后处理"),new w.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new w.GroupProperty([],"环境遮蔽","环境遮蔽"),new w.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new w.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new w.GroupProperty([],"Bloom","Bloom"),new w.BooleanProperty([this,"scenePpsBloomEnabled"]),new w.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new w.NumberProperty([this,"scenePpsBloomContrast"]),new w.NumberProperty([this,"scenePpsBloomBrightness"]),new w.NumberProperty([this,"scenePpsBloomDelta"]),new w.NumberProperty([this,"scenePpsBloomSigma"]),new w.NumberProperty([this,"scenePpsBloomStepSize"]),new w.GroupProperty([],"调试","调试"),new w.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new w.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new w.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new w.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new w.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new w.GroupProperty([],"Inspector","Inspector"),new w.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new w.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new w.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(rt,"type",rt.register("ESCesiumViewer",rt)),v(rt,"getCesiumIonToken",Kk),v(rt,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(rt,"latestDefaultAccessToken"),v(rt,"ObjectsToExcludeWrapper",k2),v(rt,"defaults",{...w.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),v(rt,"getHeightsScartchCarto",new h.Cartographic);let Re=rt;(t=>{t.createDefaultProps=()=>({...w.ESViewer.createDefaultProps(),...Yk()})})(Re||(Re={})),l.extendClassProps(Re.prototype,Re.createDefaultProps),R.copyright=void 0;try{const t="earthsdk3-cesium",i="3.4.0-beta.12",e="2025-09-09T07:38:04.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="f67aacb710aadc7ef8013d562825b5470d533599",a=((Date.now()-1757403484e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${r.slice(0,8)}.${e} (距今${a}个小时)
2258
+ `;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const rt=class rt extends w.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(l.react(0)));v(this,"_viewer",this.dv(l.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(l.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(l.react(0)));v(this,"_editingSystem",Dh);v(this,"_moveObjectsProcess",this.ad(i_()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new b2(this)),this.ad(new R2(this)),this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new z2(this)})),this._viewerLegend=this.dv(new qk(this)),this._viewerInstance=this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new cm(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=ie([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new l.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new FF(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Yt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],rt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=h.Cartesian3.fromDegrees(...e),a=h.Cartesian3.distance(o.positionWC,s),c=h.Cartesian3.subtract(s,r,new h.Cartesian3);h.Cartesian3.normalize(c,c);const d=h.Transforms.rotationMatrixFromPositionVelocity(r,c,h.Ellipsoid.WGS84),u=h.Matrix4.fromRotationTranslation(d,r);var p=h.Transforms.eastNorthUpToFixedFrame(h.Matrix4.getTranslation(u,new h.Cartesian3),h.Ellipsoid.WGS84,new h.Matrix4),f=h.Matrix4.multiply(h.Matrix4.inverse(p,new h.Matrix4),u,new h.Matrix4),g=h.Matrix4.getMatrix3(f,new h.Matrix3),m=h.Quaternion.fromRotationMatrix(g),y=h.HeadingPitchRoll.fromQuaternion(m);const P=$o(o);return{distance:a,heading:h.Math.toDegrees(y.heading)+90,pitch:h.Math.toDegrees(y.pitch),flyDuration:1,hDelta:-(P[0]-(h.Math.toDegrees(y.heading)+90)),pDelta:P[1]-h.Math.toDegrees(y.pitch)}}flyIn(e,n,o,r="default"){var c;if(!n)return;n[0]=-n[0];const s={position:e,rotation:n,duration:(o??1)*1e3},a=(c=this.viewer)==null?void 0:c.camera;return a&&ps(a,s)}flyTo(e,n,o="default"){var g;const{distance:r,heading:s,pitch:a,flyDuration:c,hDelta:d,pDelta:u}=e,p={position:n,viewDistance:r,rotation:[s,a,0],duration:c*1e3,hdelta:d,pdelta:u},f=(g=this.viewer)==null?void 0:g.camera;return f&&ps(f,p)}flyToBoundingSphere(e,n,o=1){var p;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=w.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:c}=s,d={position:a,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},u=(p=this.viewer)==null?void 0:p.camera;return u&&ps(u,d)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,r,s,a){var c,d;(d=(c=this._viewerInstance)==null?void 0:c.obj)==null||d.navigationManager.changeToLine(e,n,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToFollow(e,n,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const r=h.Cartographic.fromDegrees(e,n,void 0,rt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,n){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await jm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Ve(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&n!=null&&(r.editingID=`${o.callSource}_${l.createGuid()}`,this._editingSystem.create(this,r,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=l.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&n.push(a)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=rt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!rt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=rt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Mt(e,n)}localPositionsToPositions(e,n){return gn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Ve(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},n=rt.defaults;return{...e,more:[...e.more,new w.GroupProperty([],"通用","通用"),new w.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",Qk,Zk,!0),new w.FunctionProperty([],()=>rt.getCesiumIonToken(),[],"获取官方token"),new w.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new w.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new w.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new w.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new w.GroupProperty([],"Viewer","Viewer"),new w.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new w.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new w.BooleanProperty([this,"shadows"]),new w.GroupProperty([],"比例尺","比例尺(Legend)"),new w.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new w.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new w.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new w.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new w.GroupProperty([],"场景","场景(Scene)"),new w.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new w.GroupProperty([],"Globe","Globe"),new w.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",n.depthTestAgainstTerrain,!0),new w.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new w.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new w.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new w.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new w.BooleanProperty([this,"sceneGlobeShowSkirts"]),new w.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new w.ColorProperty([this,"sceneGlobeBaseColor"]),new w.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new w.JsonProperty([this,"sceneGlobeClippingPlanes"]),new w.StringProperty([this,"sceneGlobeClippingPlanesId"]),new w.JsonProperty([this,"sceneGlobeClippingPolygons"]),new w.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new w.GroupProperty([],"underground","underground"),new w.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new w.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new w.GroupProperty([],"Translucency","Translucency"),new w.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",n.sceneGlobeTranslucencyEnabled,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",n.sceneGlobeTranslucencyBackFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",n.sceneGlobeTranslucencyFrontFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new w.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new w.GroupProperty([],"Sun","Sun"),new w.BooleanProperty([this,"sun"],"sun",n.sun,!0),new w.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new w.GroupProperty([],"Moon","Moon"),new w.BooleanProperty([this,"moon"],"moon",n.moon,!0),new w.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new w.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new w.GroupProperty([],"SkyBox","SkyBox"),new w.BooleanProperty([this,"sceneSkyBoxShow"]),new w.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new w.GroupProperty([],"Background","Background"),new w.BooleanProperty([this,"xbsjUseBackground"]),new w.StringProperty([this,"xbsjBackgroundImageUri"]),new w.ColorProperty([this,"xbsjBackgroundColor"]),new w.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new w.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new w.ColorProperty([this,"sceneBackgroundColor"]),new w.GroupProperty([],"Fog","Fog"),new w.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new w.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new w.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new w.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new w.GroupProperty([],"Sscc","Sscc"),new w.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new w.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new w.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new w.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new w.GroupProperty([],"后处理","后处理"),new w.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new w.GroupProperty([],"环境遮蔽","环境遮蔽"),new w.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new w.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new w.GroupProperty([],"Bloom","Bloom"),new w.BooleanProperty([this,"scenePpsBloomEnabled"]),new w.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new w.NumberProperty([this,"scenePpsBloomContrast"]),new w.NumberProperty([this,"scenePpsBloomBrightness"]),new w.NumberProperty([this,"scenePpsBloomDelta"]),new w.NumberProperty([this,"scenePpsBloomSigma"]),new w.NumberProperty([this,"scenePpsBloomStepSize"]),new w.GroupProperty([],"调试","调试"),new w.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new w.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new w.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new w.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new w.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new w.GroupProperty([],"Inspector","Inspector"),new w.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new w.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new w.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(rt,"type",rt.register("ESCesiumViewer",rt)),v(rt,"getCesiumIonToken",Kk),v(rt,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(rt,"latestDefaultAccessToken"),v(rt,"ObjectsToExcludeWrapper",k2),v(rt,"defaults",{...w.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),v(rt,"getHeightsScartchCarto",new h.Cartographic);let Re=rt;(t=>{t.createDefaultProps=()=>({...w.ESViewer.createDefaultProps(),...Yk()})})(Re||(Re={})),l.extendClassProps(Re.prototype,Re.createDefaultProps),R.copyright=void 0;try{const t="earthsdk3-cesium",i="3.4.0-beta.13",e="2025-09-12T03:50:09.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="feca93890b3042c1cb64b9d07335c6a13715edb1",a=((Date.now()-1757649009e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${r.slice(0,8)}.${e} (距今${a}个小时)
2259
2259
  %c${o?o+`
2260
2260
  `:""}当前网站正在使用${t},此软件版权归${n}所有
2261
- `;R.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","f67aacb710aadc7ef8013d562825b5470d533599")},get info(){return c},get date(){return"2025-09-09T07:38:04.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.12"},get name(){return"earthsdk3-cesium"},get commitId(){return"f67aacb710aadc7ef8013d562825b5470d533599"},print(){console.info(this.info,`
2261
+ `;R.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","feca93890b3042c1cb64b9d07335c6a13715edb1")},get info(){return c},get date(){return"2025-09-12T03:50:09.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.13"},get name(){return"earthsdk3-cesium"},get commitId(){return"feca93890b3042c1cb64b9d07335c6a13715edb1"},print(){console.info(this.info,`
2262
2262
  font-size: 18px;
2263
2263
  font-weight: 1000;
2264
2264
  line-height: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "earthsdk3-cesium",
3
- "version": "3.4.0-beta.12",
3
+ "version": "3.4.0-beta.13",
4
4
  "description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
5
5
  "type": "module",
6
6
  "main": "./dist/earthsdk3-cesium.umd.cjs",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "peerDependencies": {
39
39
  "cesium": "1.132",
40
- "earthsdk3": "3.4.0-beta.21",
40
+ "earthsdk3": "3.4.0-beta.23",
41
41
  "xbsj-base": "1.0.6"
42
42
  },
43
43
  "dependencies": {
@@ -1,29 +0,0 @@
1
- import * as Cesium from 'cesium';
2
- import { XbsjRoutePath } from './XbsjRoutePath';
3
- import { SceneObjectKey } from 'xbsj-base';
4
-
5
- export type XbsjPositionCallbackResultType = {
6
- timeRatio: number;
7
- repeat: number;
8
- color: [number, number, number, number];
9
- bgColor: [number, number, number, number];
10
- bidirectional: 0 | 1 | 2 | 3; // 0/1表示单向,2表示双向, 3表示无信号
11
- };
12
-
13
- export type XbsjODLinesPostionCallback = (
14
- instanceIndex: number,
15
- frameState: Cesium.FrameState,
16
- result: XbsjPositionCallbackResultType,
17
- ) => XbsjPositionCallbackResultType;
18
-
19
- export default function xbsjCreateODLinesPrimitive(
20
- routePaths: XbsjRoutePath[],
21
- color: [number, number, number, number],
22
- arcType: Cesium.ArcType,
23
- postionCallback: (instanceIndex: number, frameState: Cesium.FrameState | undefined, result: XbsjPositionCallbackResultType) => XbsjPositionCallbackResultType,
24
- brightening?: boolean,
25
- depthTest?: boolean,
26
- getTextureFunc?: () => Cesium.Texture,
27
- id?: SceneObjectKey
28
- ): Cesium.Primitive;
29
-
@@ -1,18 +0,0 @@
1
- import * as Cesium from 'cesium';
2
-
3
- export declare class XbsjCameraVideo {
4
- constructor(options: {
5
- inverseViewMatrix: Cesium.Matrix4,
6
- frustum: Cesium.PerspectiveFrustum,
7
- // videoElement: HTMLVideoElement | string | undefined,
8
- videoTextureFunc?: (() => Cesium.Texture | undefined) | undefined,
9
- alphaTextureFunc?: (() => Cesium.Texture | undefined) | undefined,
10
- showHelperPrimitive: true,
11
- });
12
- // videoElement: HTMLVideoElement | string | undefined;
13
- // alphaImage: string;
14
- videoTextureFunc: (() => Cesium.Texture | undefined) | undefined;
15
- alphaTextureFunc: (() => Cesium.Texture | undefined) | undefined;
16
- showHelperPrimitive: boolean;
17
- destroy(): void;
18
- }
@@ -1,16 +0,0 @@
1
- import * as Cesium from 'cesium';
2
-
3
- export declare class XbsjViewshed {
4
- constructor(scene: Cesium.Scene, id?: string);
5
- enabled: boolean;
6
- showHelper: boolean;
7
- fovH: number;
8
- fovV: number;
9
- near: number;
10
- far: number;
11
- position: Cesium.Cartesian3;
12
- heading: number;
13
- pitch: number;
14
- roll: number;
15
- destroy(): void;
16
- }
@@ -1,5 +0,0 @@
1
- export declare class BackGroundImage {
2
- show: boolean;
3
- material: Cesium.Material;
4
- destroy(): void;
5
- }
@@ -1,14 +0,0 @@
1
- import * as Cesium from 'cesium';
2
-
3
- declare class SkyAtmosphere {
4
- constructor(ellipsoid: Cesium.Ellipsoid | undefined, sources: {
5
- positiveX: string;
6
- negativeX: string;
7
- positiveY: string;
8
- negativeY: string;
9
- positiveZ: string;
10
- negativeZ: string;
11
- });
12
- }
13
-
14
- export = SkyAtmosphere;
@@ -1,12 +0,0 @@
1
- import * as Cesium from 'cesium';
2
-
3
- declare const GaussianSplatPipelineStage: {
4
- name: string;
5
- process: (
6
- renderResources: any,
7
- primitive: Cesium.Primitive,
8
- frameState: Cesium.FrameState
9
- ) => void;
10
- };
11
-
12
- export default GaussianSplatPipelineStage;
@@ -1,11 +0,0 @@
1
- import * as Cesium from 'cesium';
2
- declare const GaussianSplatTexturePipelineStage: {
3
- name: string;
4
- process: (
5
- renderResources: any,
6
- primitive: Cesium.Primitive,
7
- frameState: Cesium.FrameState
8
- ) => void;
9
- };
10
-
11
- export default GaussianSplatTexturePipelineStage;
@@ -1 +0,0 @@
1
- export declare function cesiumFixGoogleEarth(Cesium: any): void;
@@ -1,405 +0,0 @@
1
- // cesium声明文件补充
2
- // 注意此声明文件不全,用到哪儿写到哪儿
3
- // vtxf 20211215
4
-
5
- declare module 'cesium' {
6
- interface Destroyable {
7
- isDestroyed(): boolean;
8
- destroy(): undefined;
9
- }
10
-
11
- interface Context {
12
- defaultTexture: Texture;
13
- }
14
-
15
- // @ts-ignore
16
- type TextureOptions = {
17
- context: Context;
18
- pixelFormat?: number;
19
- width: number;
20
- height: number;
21
- flipY?: boolean;
22
- }
23
-
24
- const enum MipmapHint {
25
- DONT_CARE = WebGLConstants.DONT_CARE,
26
- FASTEST = WebGLConstants.FASTEST,
27
- NICEST = WebGLConstants.NICEST,
28
- }
29
-
30
- interface Texture extends Destroyable {
31
- copyFrom(options: {
32
- // arrayBufferView: ArrayBufferView,
33
- // width: number;
34
- // height: number;
35
- source: {
36
- width: number;
37
- height: number;
38
- arrayBufferView: ArrayBufferView;
39
- } | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
40
- xOffset?: number;
41
- yOffset?: number;
42
- skipColorSpaceConversion?: boolean; // false
43
- }): void;
44
-
45
- generateMipmap(hint: MipmapHint): void;
46
- }
47
-
48
- var Texture: {
49
- prototype: Texture;
50
- new(options: TextureOptions): Texture;
51
- };
52
-
53
- interface Scene {
54
- context: Context;
55
- }
56
-
57
- interface AttributeLocations {
58
- [k: string]: number;
59
- }
60
-
61
- const enum BufferUsage {
62
- STREAM_DRAW = WebGLConstants.STREAM_DRAW,
63
- STATIC_DRAW = WebGLConstants.STATIC_DRAW,
64
- DYNAMIC_DRAW = WebGLConstants.DYNAMIC_DRAW,
65
- }
66
-
67
- interface VertexArrayOptions {
68
- context: Context;
69
- attributes: {
70
- index: number,
71
- vertexBuffer: Buffer,
72
- componentsPerAttribute: number,
73
- componentDatatype: ComponentDatatype,
74
- normalize?: boolean, // false
75
- }[];
76
- attributeLocations: AttributeLocations;
77
- bufferUsage: BufferUsage;
78
- indexBuffer?: Buffer;
79
- }
80
-
81
- namespace ComponentDatatype {
82
- function createTypedArray(componentDatatype: ComponentDatatype, valuesOrLength: number | number[]): Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
83
- }
84
-
85
- interface VertexArray extends Destroyable {
86
- isDestroyed(): boolean;
87
- destroy(): undefined;
88
- }
89
-
90
- var VertexArray: {
91
- prototype: VertexArray;
92
- new(options: VertexArrayOptions): VertexArray;
93
- }
94
-
95
- // interface ShaderProgramOptions {
96
- // gl: WebGLRenderingContext | WebGL2RenderingContext;
97
- // // debugShaders: boolean;
98
- // vertexShaderText: string;
99
- // fragmentShaderText: string;
100
- // attributeLocations: AttributeLocations;
101
- // }
102
-
103
- interface ShaderProgram extends Destroyable {
104
-
105
- }
106
-
107
- // var ShaderProgram: {
108
- // prototype: ShaderProgram;
109
- // new(options: ShaderProgramOptions): ShaderProgram;
110
- // }
111
-
112
- interface ShaderSource {
113
-
114
- }
115
-
116
- var ShaderSource: {
117
- prototype: ShaderSource;
118
- new(options: {
119
- defines?: string[];
120
- sources: string[];
121
- includeBuiltIns?: boolean;
122
- }): ShaderSource;
123
- };
124
-
125
- namespace ShaderProgram {
126
- function fromCache(options: {
127
- context: Context,
128
- vertexShaderSource: ShaderSource,
129
- fragmentShaderSource: ShaderSource,
130
- attributeLocations: AttributeLocations,
131
- }): ShaderProgram;
132
- }
133
-
134
- interface UniformMap {
135
- [k: string]: () => Texture | number | Cartesian2 | Cartesian3 | Cartesian4;
136
- }
137
-
138
- interface RenderState {
139
-
140
- }
141
-
142
- interface RenderStateOptions {
143
- frontFace?: WindingOrder, // WindingOrder.COUNTER_CLOCKWISE,
144
- cull?: {
145
- enabled?: boolean, // false
146
- face?: CullFace, // CullFace.BACK
147
- },
148
- lineWidth?: number, // 1
149
- polygonOffset?: {
150
- enabled?: boolean, // false
151
- factor?: number, // 0,
152
- units?: number, // 0
153
- },
154
- scissorTest?: {
155
- enabled?: boolean, // false,
156
- rectangle?: {
157
- x?: number, // 0,
158
- y?: number, // 0,
159
- width?: number, // 0,
160
- height?: number, // 0
161
- }
162
- },
163
- depthRange?: {
164
- near?: number, // 0,
165
- far?: number, // 1
166
- },
167
- depthTest?: {
168
- enabled?: boolean; // false,
169
- func?: DepthFunction; //DepthFunction.LESS
170
- },
171
- colorMask?: {
172
- red?: boolean, // true,
173
- green?: boolean, // true,
174
- blue?: boolean, // true,
175
- alpha?: boolean, // true
176
- },
177
- depthMask?: boolean, // true,
178
- stencilMask?: number, // ~0
179
- blending?: {
180
- enabled?: boolean, // false,
181
- color?: {
182
- red?: number, // 0.0,
183
- green?: number, // 0.0,
184
- blue?: number, // 0.0,
185
- alpha?: number, // 0.0
186
- },
187
- equationRgb?: BlendEquation, // BlendEquation.ADD,
188
- equationAlpha?: BlendEquation, // BlendEquation.ADD,
189
- functionSourceRgb?: BlendFunction, // BlendFunction.ONE,
190
- functionSourceAlpha?: BlendFunction, // BlendFunction.ONE,
191
- functionDestinationRgb?: BlendFunction, // BlendFunction.ZERO,
192
- functionDestinationAlpha?: BlendFunction, // BlendFunction.ZERO
193
- },
194
- stencilTest?: {
195
- enabled?: boolean, // false,
196
- frontFunction?: StencilFunction, // StencilFunction.ALWAYS,
197
- backFunction?: StencilFunction, // StencilFunction.ALWAYS,
198
- reference?: number; // 0,
199
- mask?: number; // ~0,
200
- frontOperation?: {
201
- fail?: StencilOperation, // StencilOperation.KEEP,
202
- zFail?: StencilOperation, // StencilOperation.KEEP,
203
- zPass?: StencilOperation, // StencilOperation.KEEP
204
- },
205
- backOperation?: {
206
- fail?: StencilOperation, // StencilOperation.KEEP,
207
- zFail?: StencilOperation, // StencilOperation.KEEP,
208
- zPass?: StencilOperation, // StencilOperation.KEEP
209
- }
210
- },
211
- sampleCoverage?: {
212
- enabled?: boolean, // false,
213
- value?: number, // 1.0,
214
- invert?: boolean, // false
215
- }
216
- }
217
-
218
- namespace RenderState {
219
- function fromCache(options: RenderStateOptions): RenderState;
220
- }
221
-
222
- namespace Appearance {
223
- /**
224
- *
225
- * @param translucent 是否是透明的?透明对象的depthMask设为false,blending设为ALPHA_BLEND
226
- * @param closed 是否为封闭体,如果是封闭体,会开启背面裁剪 cull { enabled: true, face: CullFace.BACK }
227
- * @param existing 是否和一个已存在的RenderState进行合并,已存在的RenderState不做修改
228
- */
229
- function getDefaultRenderState(translucent: boolean, closed: boolean, existing?: RenderStateOptions): RenderStateOptions;
230
- }
231
-
232
-
233
- const enum Pass {
234
- ENVIRONMENT = 0,
235
- COMPUTE = 1,
236
- GLOBE = 2,
237
- TERRAIN_CLASSIFICATION = 3,
238
- CESIUM_3D_TILE = 4,
239
- CESIUM_3D_TILE_CLASSIFICATION = 5,
240
- CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW = 6,
241
- OPAQUE = 7,
242
- TRANSLUCENT = 8,
243
- OVERLAY = 9,
244
- NUMBER_OF_PASSES = 10,
245
- }
246
-
247
- // interface DrawCommandOptions
248
-
249
- interface PickId {
250
- key: number;
251
- color: Cesium.Color;
252
- }
253
-
254
- interface DrawCommand {
255
- boundingVolume: BoundingRectangle | BoundingSphere | OrientedBoundingBox | undefined;
256
- orientedBoundingBox: OrientedBoundingBox | undefined;
257
- cull: boolean; // deafult true
258
- occlude: boolean; // default true
259
- modelMatrix: Cesium.Matrix4 | undefined; // default undefined
260
- primitiveType: PrimitiveType; // default TRIANGLES
261
- vertexArray: VertexArray | undefined; // default undefined
262
- count: number | undefined;
263
- offset: number; // default 0
264
- instanceCount: number; // default 0
265
- shaderProgram: ShaderProgram | undefined; // default undefined
266
- castShadows: boolean; // default false
267
- receiveShadows: boolean; // default false
268
- uniformMap: UniformMap | undefined; // default undefine
269
- renderState: RenderState | undefined; // default undefined
270
- // framebuffer: FrameB
271
- pass: Pass | undefined; // default undefined
272
- executeInClosestFrustum: boolean;
273
- owner: Object | undefined;
274
- debugShowBoundingVolume: boolean;
275
- debugOverlappingFrustums: number;
276
- pickId: string | undefined;
277
- pickOnly: boolean;
278
- depthForTranslucentClassification: boolean;
279
- }
280
-
281
- var DrawCommand: {
282
- prototype: DrawCommand;
283
- new(options: {
284
- // boundingVolume: BoundingVoluem;
285
- cull?: boolean;
286
- occlude?: boolean;
287
- modelMatrix: Matrix4;
288
- primitiveType?: PrimitiveType; // TRIANGLES
289
- vertexArray: VertexArray;
290
- count?: number;
291
- offset?: number;
292
- instanceCount?: number; // 0
293
- shaderProgram: ShaderProgram;
294
- uniformMap?: UniformMap;
295
- renderState: RenderState;
296
- // framebuffer: ;
297
- pass: Pass;
298
- executeInClosestFrustum: boolean;
299
- owner?: any;
300
- debugShowBoundingVolume?: boolean;
301
- castShadows?: boolean; // false;
302
- receiveShadows?: boolean; // false
303
- pickId?: string;
304
- pickOnly?: boolean; // false
305
- depthForTranslucentClassification?: boolean; // false
306
- boundingVolume?: BoundingRectangle | BoundingSphere | OrientedBoundingBox;
307
- orientedBoundingBox?: OrientedBoundingBox;
308
- }): DrawCommand;
309
- };
310
-
311
- interface ShadowMap {
312
-
313
- }
314
-
315
- interface FrameState {
316
- context: Context;
317
- commandList: DrawCommand[];
318
- shadowMaps: ShadowMap[];
319
- // brdfLutGenerator
320
- // environmentMap
321
- // sphericalHarmonicCoefficients
322
- // specularEnvironmentMaps
323
- mode: SceneMode;
324
- morphTime: number;
325
- frameNumber: number; // 0
326
- newFrame: boolean;
327
- time: JulianDate;
328
- // jobScheduler
329
- // mapProjection
330
- camera: Camera;
331
- cameraUnderground: boolean;
332
- // globeTranslucencyState
333
- // cullingVolume
334
- // occluder
335
- maximumScreenSpaceError: number; // 2
336
- pixelRatio: number; // 1.0
337
- passes: {
338
- render: boolean;
339
- pick: boolean;
340
- depth: boolean;
341
- postProcess: boolean;
342
- offscreen: boolean;
343
- };
344
- // creditDisplay
345
- afterRender: (() => void)[];
346
- scene3DOnly: boolean;
347
- // fog: FrameState.Fog
348
- terrainExaggeration: number; // 1.0
349
- imagerySplitPosition: number;
350
- // frustumSplits
351
- // light
352
- // minimumDisableDepthTestDistance
353
- // invertClassification
354
- useLogDepth: boolean;
355
- // tilesetPassState
356
- minimumTerrainHeight: number; // 0.0
357
- }
358
-
359
- interface Buffer {
360
- copyFromArrayView(arrayView: ArrayBufferView, offsetInBytes?: number): void;
361
- readonly sizeInBytes: number;
362
- readonly usage: BufferUsage;
363
- isDestroyed(): boolean;
364
- destroy(): undefined;
365
- }
366
-
367
- // const enum IndexDatatype {
368
- // /**
369
- // * 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
370
- // * of an element in <code>Uint8Array</code>.
371
- // */
372
- // UNSIGNED_BYTE = WebGLConstants.UNSIGNED_BYTE,
373
- // /**
374
- // * 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
375
- // * of an element in <code>Uint16Array</code>.
376
- // */
377
- // UNSIGNED_SHORT = WebGLConstants.UNSIGNED_SHORT,
378
- // /**
379
- // * 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
380
- // * of an element in <code>Uint32Array</code>.
381
- // */
382
- // UNSIGNED_INT = WebGLConstants.UNSIGNED_INT
383
- // }
384
-
385
- interface IndexBuffer extends Buffer {
386
- indexDatatype: IndexDatatype;
387
- bytesPerIndex: number;
388
- numberOfIndices: number;
389
- }
390
-
391
- namespace Buffer {
392
- function createVertexBuffer(options: {
393
- context: Context;
394
- typedArray: ArrayBufferView;
395
- usage: BufferUsage;
396
- }): Buffer;
397
-
398
- function createIndexBuffer(options: {
399
- context: Context;
400
- typedArray: Uint8Array | Uint16Array | Uint32Array;
401
- usage: BufferUsage;
402
- indexDatatype: IndexDatatype;
403
- }): IndexBuffer;
404
- }
405
- }
@@ -1,8 +0,0 @@
1
- import * as Cesium from 'cesium';
2
-
3
- export function generateCartesianArc(options: {
4
- positions: Cesium.Cartesian3[],
5
- arcType: Cesium.ArcType;
6
- granularity: number;
7
- ellipsoid: Cesium.Ellipsoid;
8
- }): Cesium.Cartesian3[] | undefined;
@@ -1,37 +0,0 @@
1
- import { Feature, LineString, Properties } from "@turf/helpers";
2
- /**
3
- * Takes a {@link LineString|line} and returns a curved version
4
- * by applying a [Bezier spline](http://en.wikipedia.org/wiki/B%C3%A9zier_spline)
5
- * algorithm.
6
- *
7
- * The bezier spline implementation is by [Leszek Rybicki](http://leszek.rybicki.cc/).
8
- *
9
- * @name bezierSpline
10
- * @param {Feature<LineString>} line input LineString
11
- * @param {Object} [options={}] Optional parameters
12
- * @param {Object} [options.properties={}] Translate properties to output
13
- * @param {number} [options.resolution=10000] time in milliseconds between points
14
- * @param {number} [options.sharpness=0.85] a measure of how curvy the path should be between splines
15
- * @returns {Feature<LineString>} curved line
16
- * @example
17
- * var line = turf.lineString([
18
- * [-76.091308, 18.427501],
19
- * [-76.695556, 18.729501],
20
- * [-76.552734, 19.40443],
21
- * [-74.61914, 19.134789],
22
- * [-73.652343, 20.07657],
23
- * [-73.157958, 20.210656]
24
- * ]);
25
- *
26
- * var curved = turf.bezierSpline(line);
27
- *
28
- * //addToMap
29
- * var addToMap = [line, curved]
30
- * curved.properties = { stroke: '#0F0' };
31
- */
32
- declare function bezier<P = Properties>(line: Feature<LineString> | LineString, options?: {
33
- properties?: P;
34
- resolution?: number;
35
- sharpness?: number;
36
- }): Feature<LineString, P>;
37
- export default bezier;
@@ -1,62 +0,0 @@
1
- export interface Point {
2
- x: number;
3
- y: number;
4
- z: number;
5
- }
6
- /**
7
- * BezierSpline
8
- * https://github.com/leszekr/bezier-spline-js
9
- *
10
- * @private
11
- * @copyright
12
- * Copyright (c) 2013 Leszek Rybicki
13
- *
14
- * Permission is hereby granted, free of charge, to any person obtaining a copy
15
- * of this software and associated documentation files (the "Software"), to deal
16
- * in the Software without restriction, including without limitation the rights
17
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
- * copies of the Software, and to permit persons to whom the Software is
19
- * furnished to do so, subject to the following conditions:
20
- *
21
- * The above copyright notice and this permission notice shall be included in all
22
- * copies or substantial portions of the Software.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- * SOFTWARE.
31
- */
32
- export default class Spline {
33
- duration: number;
34
- points: Point[];
35
- sharpness: number;
36
- centers: Point[];
37
- controls: Array<[Point, Point]>;
38
- stepLength: number;
39
- length: number;
40
- delay: number;
41
- steps: number[];
42
- constructor(options?: any);
43
- /**
44
- * Caches an array of equidistant (more or less) points on the curve.
45
- */
46
- cacheSteps(mindist: number): number[];
47
- /**
48
- * returns angle and speed in the given point in the curve
49
- */
50
- vector(t: number): {
51
- angle: number;
52
- speed: number;
53
- };
54
- /**
55
- * Gets the position of the point, given time.
56
- *
57
- * WARNING: The speed is not constant. The time it takes between control points is constant.
58
- *
59
- * For constant speed, use Spline.steps[i];
60
- */
61
- pos(time: number): Point;
62
- }