earthsdk3-cesium 3.6.1 → 3.6.2
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.
|
@@ -4143,10 +4143,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
4143
4143
|
`;function c9(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
4144
4144
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
4145
4145
|
gitee地址:${t}
|
|
4146
|
-
`;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const Wt=class Wt extends c.ESViewer{constructor(e){super(e);O(this,"_disabledInputStack",this.disposeVar(c.react(0)));O(this,"_viewer",this.dv(c.react(void 0)));O(this,"_viewerInstance");O(this,"_viewerLegend");O(this,"pickCustomAttachedInfo");O(this,"_fps",this.dv(c.react(0)));O(this,"_notSupportEditingCount",this.disposeVar(c.react(0)));O(this,"_editingSystem",qf);O(this,"_moveObjectsProcess",this.ad(LS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new BV(this)),this.ad(new TV(this)),this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new DV(this)})),this._viewerLegend=this.dv(new r9(this)),this._viewerInstance=this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Qv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Be([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new c.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new MH(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&&Mt(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=w.Cartographic.fromDegrees(e[0],e[1],e[2],Wt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ys(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:i}=this.viewer;if(!i||!e)return;const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,i.positionWC,new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=ys(i),f=h[0]-A,p=h[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:1,hDelta:f,pDelta:p}}flyIn(e,i,o,r="default"){var l;const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&sl(a,s,r)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:A}=e,h={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:A},f=(p=this.viewer)==null?void 0:p.camera;return f&&sl(f,h,o)}flyToBoundingSphere(e,i,o=1){var h;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=c.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(h=this.viewer)==null?void 0:h.camera;return A&&sl(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ys(e)}}transformFlyParam(e,i){if("position"in i){const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,Ye(i.position),new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=i.rotation[0]-A,f=i.rotation[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:i.flyDuration??1,hDelta:h,pDelta:f}}else{const o=Ye(e);let r={heading:w.Math.toRadians(i.heading),pitch:w.Math.toRadians(i.pitch),roll:0};const s=new w.HeadingPitchRoll;if(i.distance){s.heading=r.heading,s.pitch=r.pitch,s.roll=0,s.heading-=w.Math.PI_OVER_TWO;const l=w.Transforms.headingPitchRollToFixedFrame(o,s,void 0,void 0),u=w.Matrix4.multiplyByPointAsVector(l,w.Cartesian3.UNIT_X,new w.Cartesian3);w.Cartesian3.multiplyByScalar(u,i.distance,u),w.Cartesian3.subtract(o,u,o)}i.hDelta&&(r.heading+=w.Math.toRadians(i.hDelta)),i.pDelta&&(r.pitch+=w.Math.toRadians(i.pDelta));const a=De(o);return a?{position:a,rotation:[w.Math.toDegrees(r.heading),w.Math.toDegrees(r.pitch),w.Math.toDegrees(r.roll)],flyDuration:i.flyDuration??1}:void 0}}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={version:w.VERSION},e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=w.Cartographic.fromDegrees(e,i,void 0,Wt.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 T0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(Ye(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}_${c.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=c.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=Wt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Wt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Wt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return wn(e,i)}localPositionsToPositions(e,i){return Sr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=e instanceof w.Cartesian3?e:Ye(e),o=new w.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=Wt.defaults;return{...e,more:[...e.more,new c.GroupProperty([],"通用","通用"),new c.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",u9,l9,!0),new c.FunctionProperty([],()=>Wt.getCesiumIonToken(),[],"获取官方token"),new c.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new c.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new c.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new c.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new c.GroupProperty([],"Viewer","Viewer"),new c.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new c.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new c.BooleanProperty([this,"shadows"]),new c.GroupProperty([],"比例尺","比例尺(Legend)"),new c.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new c.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new c.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new c.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new c.GroupProperty([],"场景","场景(Scene)"),new c.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new c.GroupProperty([],"Globe","Globe"),new c.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new c.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new c.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new c.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new c.BooleanProperty([this,"sceneGlobeShowSkirts"]),new c.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new c.ColorProperty([this,"sceneGlobeBaseColor"]),new c.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new c.JsonProperty([this,"sceneGlobeClippingPlanes"]),new c.StringProperty([this,"sceneGlobeClippingPlanesId"]),new c.JsonProperty([this,"sceneGlobeClippingPolygons"]),new c.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new c.GroupProperty([],"underground","underground"),new c.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new c.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new c.GroupProperty([],"Translucency","Translucency"),new c.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new c.GroupProperty([],"Sun","Sun"),new c.BooleanProperty([this,"sun"],"sun",i.sun,!0),new c.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new c.GroupProperty([],"Moon","Moon"),new c.BooleanProperty([this,"moon"],"moon",i.moon,!0),new c.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new c.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new c.GroupProperty([],"SkyBox","SkyBox"),new c.BooleanProperty([this,"sceneSkyBoxShow"]),new c.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new c.GroupProperty([],"Background","Background"),new c.BooleanProperty([this,"xbsjUseBackground"]),new c.StringProperty([this,"xbsjBackgroundImageUri"]),new c.ColorProperty([this,"xbsjBackgroundColor"]),new c.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new c.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new c.ColorProperty([this,"sceneBackgroundColor"]),new c.GroupProperty([],"Fog","Fog"),new c.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new c.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new c.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new c.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new c.GroupProperty([],"Sscc","Sscc"),new c.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new c.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new c.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new c.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new c.GroupProperty([],"后处理","后处理"),new c.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new c.GroupProperty([],"环境遮蔽","环境遮蔽"),new c.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new c.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new c.GroupProperty([],"Bloom","Bloom"),new c.BooleanProperty([this,"scenePpsBloomEnabled"]),new c.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new c.NumberProperty([this,"scenePpsBloomContrast"]),new c.NumberProperty([this,"scenePpsBloomBrightness"]),new c.NumberProperty([this,"scenePpsBloomDelta"]),new c.NumberProperty([this,"scenePpsBloomSigma"]),new c.NumberProperty([this,"scenePpsBloomStepSize"]),new c.GroupProperty([],"调试","调试"),new c.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new c.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new c.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new c.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new c.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new c.GroupProperty([],"Inspector","Inspector"),new c.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new c.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new c.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};O(Wt,"type",Wt.register("ESCesiumViewer",Wt)),O(Wt,"getCesiumIonToken",c9),O(Wt,"currentDefaultAccessToken",w.Ion.defaultAccessToken),O(Wt,"latestDefaultAccessToken"),O(Wt,"ObjectsToExcludeWrapper",MV),O(Wt,"defaults",{...c.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,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:w.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:w.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}),O(Wt,"getHeightsScartchCarto",new w.Cartographic);let at=Wt;(t=>{t.createDefaultProps=()=>({...c.ESViewer.createDefaultProps(),...a9()})})(at||(at={})),c.extendClassProps(at.prototype,at.createDefaultProps),ne.copyright=void 0;try{const t="earthsdk3-cesium",n="3.6.1",e="2025-12-04T02:08:23.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="b951704c9cc2a53b6d53468e08f41aec0794d4c0",a=((Date.now()-1764814103e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
|
|
4146
|
+
`;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const Wt=class Wt extends c.ESViewer{constructor(e){super(e);O(this,"_disabledInputStack",this.disposeVar(c.react(0)));O(this,"_viewer",this.dv(c.react(void 0)));O(this,"_viewerInstance");O(this,"_viewerLegend");O(this,"pickCustomAttachedInfo");O(this,"_fps",this.dv(c.react(0)));O(this,"_notSupportEditingCount",this.disposeVar(c.react(0)));O(this,"_editingSystem",qf);O(this,"_moveObjectsProcess",this.ad(LS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new BV(this)),this.ad(new TV(this)),this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new DV(this)})),this._viewerLegend=this.dv(new r9(this)),this._viewerInstance=this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Qv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Be([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new c.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new MH(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&&Mt(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=w.Cartographic.fromDegrees(e[0],e[1],e[2],Wt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ys(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:i}=this.viewer;if(!i||!e)return;const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,i.positionWC,new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=ys(i),f=h[0]-A,p=h[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:1,hDelta:f,pDelta:p}}flyIn(e,i,o,r="default"){var l;const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&sl(a,s,r)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:A}=e,h={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:A},f=(p=this.viewer)==null?void 0:p.camera;return f&&sl(f,h,o)}flyToBoundingSphere(e,i,o=1){var h;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=c.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(h=this.viewer)==null?void 0:h.camera;return A&&sl(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ys(e)}}transformFlyParam(e,i){if("position"in i){const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,Ye(i.position),new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=i.rotation[0]-A,f=i.rotation[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:i.flyDuration??1,hDelta:h,pDelta:f}}else{const o=Ye(e);let r={heading:w.Math.toRadians(i.heading),pitch:w.Math.toRadians(i.pitch),roll:0};const s=new w.HeadingPitchRoll;if(i.distance){s.heading=r.heading,s.pitch=r.pitch,s.roll=0,s.heading-=w.Math.PI_OVER_TWO;const l=w.Transforms.headingPitchRollToFixedFrame(o,s,void 0,void 0),u=w.Matrix4.multiplyByPointAsVector(l,w.Cartesian3.UNIT_X,new w.Cartesian3);w.Cartesian3.multiplyByScalar(u,i.distance,u),w.Cartesian3.subtract(o,u,o)}i.hDelta&&(r.heading+=w.Math.toRadians(i.hDelta)),i.pDelta&&(r.pitch+=w.Math.toRadians(i.pDelta));const a=De(o);return a?{position:a,rotation:[w.Math.toDegrees(r.heading),w.Math.toDegrees(r.pitch),w.Math.toDegrees(r.roll)],flyDuration:i.flyDuration??1}:void 0}}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={version:w.VERSION},e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=w.Cartographic.fromDegrees(e,i,void 0,Wt.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 T0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(Ye(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}_${c.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=c.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=Wt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Wt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Wt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return wn(e,i)}localPositionsToPositions(e,i){return Sr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=e instanceof w.Cartesian3?e:Ye(e),o=new w.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=Wt.defaults;return{...e,more:[...e.more,new c.GroupProperty([],"通用","通用"),new c.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",u9,l9,!0),new c.FunctionProperty([],()=>Wt.getCesiumIonToken(),[],"获取官方token"),new c.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new c.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new c.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new c.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new c.GroupProperty([],"Viewer","Viewer"),new c.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new c.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new c.BooleanProperty([this,"shadows"]),new c.GroupProperty([],"比例尺","比例尺(Legend)"),new c.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new c.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new c.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new c.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new c.GroupProperty([],"场景","场景(Scene)"),new c.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new c.GroupProperty([],"Globe","Globe"),new c.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new c.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new c.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new c.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new c.BooleanProperty([this,"sceneGlobeShowSkirts"]),new c.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new c.ColorProperty([this,"sceneGlobeBaseColor"]),new c.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new c.JsonProperty([this,"sceneGlobeClippingPlanes"]),new c.StringProperty([this,"sceneGlobeClippingPlanesId"]),new c.JsonProperty([this,"sceneGlobeClippingPolygons"]),new c.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new c.GroupProperty([],"underground","underground"),new c.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new c.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new c.GroupProperty([],"Translucency","Translucency"),new c.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new c.GroupProperty([],"Sun","Sun"),new c.BooleanProperty([this,"sun"],"sun",i.sun,!0),new c.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new c.GroupProperty([],"Moon","Moon"),new c.BooleanProperty([this,"moon"],"moon",i.moon,!0),new c.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new c.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new c.GroupProperty([],"SkyBox","SkyBox"),new c.BooleanProperty([this,"sceneSkyBoxShow"]),new c.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new c.GroupProperty([],"Background","Background"),new c.BooleanProperty([this,"xbsjUseBackground"]),new c.StringProperty([this,"xbsjBackgroundImageUri"]),new c.ColorProperty([this,"xbsjBackgroundColor"]),new c.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new c.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new c.ColorProperty([this,"sceneBackgroundColor"]),new c.GroupProperty([],"Fog","Fog"),new c.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new c.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new c.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new c.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new c.GroupProperty([],"Sscc","Sscc"),new c.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new c.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new c.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new c.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new c.GroupProperty([],"后处理","后处理"),new c.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new c.GroupProperty([],"环境遮蔽","环境遮蔽"),new c.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new c.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new c.GroupProperty([],"Bloom","Bloom"),new c.BooleanProperty([this,"scenePpsBloomEnabled"]),new c.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new c.NumberProperty([this,"scenePpsBloomContrast"]),new c.NumberProperty([this,"scenePpsBloomBrightness"]),new c.NumberProperty([this,"scenePpsBloomDelta"]),new c.NumberProperty([this,"scenePpsBloomSigma"]),new c.NumberProperty([this,"scenePpsBloomStepSize"]),new c.GroupProperty([],"调试","调试"),new c.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new c.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new c.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new c.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new c.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new c.GroupProperty([],"Inspector","Inspector"),new c.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new c.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new c.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};O(Wt,"type",Wt.register("ESCesiumViewer",Wt)),O(Wt,"getCesiumIonToken",c9),O(Wt,"currentDefaultAccessToken",w.Ion.defaultAccessToken),O(Wt,"latestDefaultAccessToken"),O(Wt,"ObjectsToExcludeWrapper",MV),O(Wt,"defaults",{...c.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,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:w.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:w.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}),O(Wt,"getHeightsScartchCarto",new w.Cartographic);let at=Wt;(t=>{t.createDefaultProps=()=>({...c.ESViewer.createDefaultProps(),...a9()})})(at||(at={})),c.extendClassProps(at.prototype,at.createDefaultProps),ne.copyright=void 0;try{const t="earthsdk3-cesium",n="3.6.2",e="2025-12-04T02:08:23.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="b951704c9cc2a53b6d53468e08f41aec0794d4c0",a=((Date.now()-1764814103e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
|
|
4147
4147
|
%c${o?o+`
|
|
4148
4148
|
`:""}当前网站正在使用${t},此软件版权归${i}所有
|
|
4149
|
-
`;ne.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","b951704c9cc2a53b6d53468e08f41aec0794d4c0")},get info(){return l},get date(){return"2025-12-04T02:08:23.000Z"},get author(){return"suplyang"},get version(){return"3.6.
|
|
4149
|
+
`;ne.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","b951704c9cc2a53b6d53468e08f41aec0794d4c0")},get info(){return l},get date(){return"2025-12-04T02:08:23.000Z"},get author(){return"suplyang"},get version(){return"3.6.2"},get name(){return"earthsdk3-cesium"},get commitId(){return"b951704c9cc2a53b6d53468e08f41aec0794d4c0"},print(){console.info(this.info,`
|
|
4150
4150
|
font-size: 18px;
|
|
4151
4151
|
font-weight: 1000;
|
|
4152
4152
|
line-height: 1;
|
package/dist/earthsdk3-cesium.js
CHANGED
|
@@ -51389,7 +51389,7 @@ let qe = Pt;
|
|
|
51389
51389
|
ae(qe.prototype, qe.createDefaultProps);
|
|
51390
51390
|
let hp;
|
|
51391
51391
|
try {
|
|
51392
|
-
const t = "earthsdk3-cesium", i = "3.6.
|
|
51392
|
+
const t = "earthsdk3-cesium", i = "3.6.2", e = "2025-12-04T02:08:23.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "b951704c9cc2a53b6d53468e08f41aec0794d4c0", a = ((Date.now() - 1764814103e3) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
|
|
51393
51393
|
%c${o ? o + `
|
|
51394
51394
|
` : ""}当前网站正在使用${t},此软件版权归${s}所有
|
|
51395
51395
|
`;
|
|
@@ -51419,7 +51419,7 @@ try {
|
|
|
51419
51419
|
},
|
|
51420
51420
|
// @ts-ignore
|
|
51421
51421
|
get version() {
|
|
51422
|
-
return "3.6.
|
|
51422
|
+
return "3.6.2";
|
|
51423
51423
|
},
|
|
51424
51424
|
// @ts-ignore
|
|
51425
51425
|
get name() {
|
|
@@ -2292,10 +2292,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
2292
2292
|
`;function lO(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
2293
2293
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
2294
2294
|
gitee地址:${t}
|
|
2295
|
-
`;console.log(e);const n=globalThis.prompt(e,t);n&&globalThis.open(n,"_blank")}const lt=class lt extends a.ESViewer{constructor(e){super(e);m(this,"_disabledInputStack",this.disposeVar(a.react(0)));m(this,"_viewer",this.dv(a.react(void 0)));m(this,"_viewerInstance");m(this,"_viewerLegend");m(this,"pickCustomAttachedInfo");m(this,"_fps",this.dv(a.react(0)));m(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));m(this,"_editingSystem",$h);m(this,"_moveObjectsProcess",this.ad(xC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new AF(this)),this.ad(new EF(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new DF(this)})),this._viewerLegend=this.dv(new iO(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new zg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new ML(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&&Ke(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.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],lt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:jo(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=jo(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:jo(e)}}transformFlyParam(e,n){if("position"in n){const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,Se(n.position),new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=n.rotation[0]-d,f=n.rotation[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:n.flyDuration??1,hDelta:p,pDelta:f}}else{const o=Se(e);let s={heading:h.Math.toRadians(n.heading),pitch:h.Math.toRadians(n.pitch),roll:0};const r=new h.HeadingPitchRoll;if(n.distance){r.heading=s.heading,r.pitch=s.pitch,r.roll=0,r.heading-=h.Math.PI_OVER_TWO;const c=h.Transforms.headingPitchRollToFixedFrame(o,r,void 0,void 0),u=h.Matrix4.multiplyByPointAsVector(c,h.Cartesian3.UNIT_X,new h.Cartesian3);h.Cartesian3.multiplyByScalar(u,n.distance,u),h.Cartesian3.subtract(o,u,o)}n.hDelta&&(s.heading+=h.Math.toRadians(n.hDelta)),n.pDelta&&(s.pitch+=h.Math.toRadians(n.pDelta));const l=se(o);return l?{position:l,rotation:[h.Math.toDegrees(s.heading),h.Math.toDegrees(s.pitch),h.Math.toDegrees(s.roll)],flyDuration:n.flyDuration??1}:void 0}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.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 s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=globalThis.g_XE3CopyRights??{};return e.cesium={version:h.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,lt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await xm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Se(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 s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=lt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!lt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=lt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Dt(e,n)}localPositionsToPositions(e,n){return Cn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof h.Cartesian3?e:Se(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 s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=lt.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",aO,rO,!0),new a.FunctionProperty([],()=>lt.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};m(lt,"type",lt.register("ESCesiumViewer",lt)),m(lt,"getCesiumIonToken",lO),m(lt,"currentDefaultAccessToken",h.Ion.defaultAccessToken),m(lt,"latestDefaultAccessToken"),m(lt,"ObjectsToExcludeWrapper",MF),m(lt,"defaults",{...a.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,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}),m(lt,"getHeightsScartchCarto",new h.Cartographic);let Me=lt;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...sO()})})(Me||(Me={})),a.extendClassProps(Me.prototype,Me.createDefaultProps),I.copyright=void 0;try{const t="earthsdk3-cesium",i="3.6.1",e="2025-12-04T02:08:23.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="b951704c9cc2a53b6d53468e08f41aec0794d4c0",l=((Date.now()-1764814103e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2295
|
+
`;console.log(e);const n=globalThis.prompt(e,t);n&&globalThis.open(n,"_blank")}const lt=class lt extends a.ESViewer{constructor(e){super(e);m(this,"_disabledInputStack",this.disposeVar(a.react(0)));m(this,"_viewer",this.dv(a.react(void 0)));m(this,"_viewerInstance");m(this,"_viewerLegend");m(this,"pickCustomAttachedInfo");m(this,"_fps",this.dv(a.react(0)));m(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));m(this,"_editingSystem",$h);m(this,"_moveObjectsProcess",this.ad(xC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new AF(this)),this.ad(new EF(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new DF(this)})),this._viewerLegend=this.dv(new iO(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new zg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new ML(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&&Ke(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.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],lt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:jo(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=jo(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:jo(e)}}transformFlyParam(e,n){if("position"in n){const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,Se(n.position),new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=n.rotation[0]-d,f=n.rotation[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:n.flyDuration??1,hDelta:p,pDelta:f}}else{const o=Se(e);let s={heading:h.Math.toRadians(n.heading),pitch:h.Math.toRadians(n.pitch),roll:0};const r=new h.HeadingPitchRoll;if(n.distance){r.heading=s.heading,r.pitch=s.pitch,r.roll=0,r.heading-=h.Math.PI_OVER_TWO;const c=h.Transforms.headingPitchRollToFixedFrame(o,r,void 0,void 0),u=h.Matrix4.multiplyByPointAsVector(c,h.Cartesian3.UNIT_X,new h.Cartesian3);h.Cartesian3.multiplyByScalar(u,n.distance,u),h.Cartesian3.subtract(o,u,o)}n.hDelta&&(s.heading+=h.Math.toRadians(n.hDelta)),n.pDelta&&(s.pitch+=h.Math.toRadians(n.pDelta));const l=se(o);return l?{position:l,rotation:[h.Math.toDegrees(s.heading),h.Math.toDegrees(s.pitch),h.Math.toDegrees(s.roll)],flyDuration:n.flyDuration??1}:void 0}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.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 s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=globalThis.g_XE3CopyRights??{};return e.cesium={version:h.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,lt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await xm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Se(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 s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=lt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!lt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=lt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Dt(e,n)}localPositionsToPositions(e,n){return Cn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof h.Cartesian3?e:Se(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 s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=lt.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",aO,rO,!0),new a.FunctionProperty([],()=>lt.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};m(lt,"type",lt.register("ESCesiumViewer",lt)),m(lt,"getCesiumIonToken",lO),m(lt,"currentDefaultAccessToken",h.Ion.defaultAccessToken),m(lt,"latestDefaultAccessToken"),m(lt,"ObjectsToExcludeWrapper",MF),m(lt,"defaults",{...a.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,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}),m(lt,"getHeightsScartchCarto",new h.Cartographic);let Me=lt;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...sO()})})(Me||(Me={})),a.extendClassProps(Me.prototype,Me.createDefaultProps),I.copyright=void 0;try{const t="earthsdk3-cesium",i="3.6.2",e="2025-12-04T02:08:23.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="b951704c9cc2a53b6d53468e08f41aec0794d4c0",l=((Date.now()-1764814103e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2296
2296
|
%c${o?o+`
|
|
2297
2297
|
`:""}当前网站正在使用${t},此软件版权归${n}所有
|
|
2298
|
-
`;I.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","b951704c9cc2a53b6d53468e08f41aec0794d4c0")},get info(){return c},get date(){return"2025-12-04T02:08:23.000Z"},get author(){return"suplyang"},get version(){return"3.6.
|
|
2298
|
+
`;I.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","b951704c9cc2a53b6d53468e08f41aec0794d4c0")},get info(){return c},get date(){return"2025-12-04T02:08:23.000Z"},get author(){return"suplyang"},get version(){return"3.6.2"},get name(){return"earthsdk3-cesium"},get commitId(){return"b951704c9cc2a53b6d53468e08f41aec0794d4c0"},print(){console.info(this.info,`
|
|
2299
2299
|
font-size: 18px;
|
|
2300
2300
|
font-weight: 1000;
|
|
2301
2301
|
line-height: 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "earthsdk3-cesium",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/earthsdk3-cesium.umd.cjs",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"cesium": "1.134.1",
|
|
41
|
-
"earthsdk3": "3.6.
|
|
41
|
+
"earthsdk3": "3.6.2"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@types/delaunator": "^5.0.2",
|