earthsdk3-cesium 3.7.0-beta.21 → 3.7.0-beta.23
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.
|
@@ -2319,10 +2319,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
2319
2319
|
`;function W9(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
2320
2320
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
2321
2321
|
gitee地址:${t}
|
|
2322
|
-
`;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const Bt=class Bt extends A.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(A.react(0)));v(this,"_viewer",this.dv(A.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(A.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(A.react(0)));v(this,"_editingSystem",Id);v(this,"_moveObjectsProcess",this.ad(M_()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new UG(this)),this.ad(new RG(this)),this.dv(new A.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new OG(this)})),this._viewerLegend=this.dv(new H9(this)),this._viewerInstance=this.dv(new A.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Tv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=ne([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 aW(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&&st(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=u.Cartographic.fromDegrees(e[0],e[1],e[2],Bt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:hi(e),rotation:ir(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),a=u.Matrix4.multiplyByPoint(r,n.positionWC,new u.Cartesian3),l=u.Cartesian3.magnitude(a);let h=-Math.asin(a.z/l);h=u.Math.toDegrees(h);let d=u.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(d+=a.y<0?-u.Math.PI:u.Math.PI),d=u.Math.toDegrees(d);const p=ir(n),f=p[0]-d,g=p[1]-h;return{distance:l,heading:d,pitch:h,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var l;const r={position:e,rotation:n,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&Wa(a,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:a,flyDuration:l,hDelta:h,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,a,0],duration:l*1e3,hdelta:h,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Wa(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:a,radius:l}=r,h={position:a,viewDistance:n??l,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Wa(d,h)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:hi(e),rotation:ir(e)}}transformFlyParam(e,n){if("position"in n){const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),a=u.Matrix4.multiplyByPoint(r,Pe(n.position),new u.Cartesian3),l=u.Cartesian3.magnitude(a);let h=-Math.asin(a.z/l);h=u.Math.toDegrees(h);let d=u.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(d+=a.y<0?-u.Math.PI:u.Math.PI),d=u.Math.toDegrees(d);const p=n.rotation[0]-d,f=n.rotation[1]-h;return{distance:l,heading:d,pitch:h,flyDuration:n.flyDuration??1,hDelta:p,pDelta:f}}else{const o=Pe(e);let s={heading:u.Math.toRadians(n.heading),pitch:u.Math.toRadians(n.pitch),roll:0};const r=new u.HeadingPitchRoll;if(n.distance){r.heading=s.heading,r.pitch=s.pitch,r.roll=0,r.heading-=u.Math.PI_OVER_TWO;const l=u.Transforms.headingPitchRollToFixedFrame(o,r,void 0,void 0),h=u.Matrix4.multiplyByPointAsVector(l,u.Cartesian3.UNIT_X,new u.Cartesian3);u.Cartesian3.multiplyByScalar(h,n.distance,h),u.Cartesian3.subtract(o,h,o)}n.hDelta&&(s.heading+=u.Math.toRadians(n.hDelta)),n.pDelta&&(s.pitch+=u.Math.toRadians(n.pDelta));const a=he(o);return a?{position:a,rotation:[u.Math.toDegrees(s.heading),u.Math.toDegrees(s.pitch),u.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,a){var l,h;(h=(l=this._viewerInstance)==null?void 0:l.obj)==null||h.navigationManager.changeToLine(e,n,o,s,r,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.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=window.g_XE3CopyRights??{};return e.cesium={version:u.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=u.Cartographic.fromDegrees(e,n,void 0,Bt.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 xy(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Pe(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],a=r.components.main??r;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=Bt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Bt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Bt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Jt(e,n)}localPositionsToPositions(e,n){return so(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof u.Cartesian3?e:Pe(e),o=new u.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=Bt.defaults;return{...e,more:[...e.more,new A.GroupProperty([],"通用","通用"),new A.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",G9,V9,!0),new A.FunctionProperty([],()=>Bt.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.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.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)]}}};v(Bt,"type",Bt.register("ESCesiumViewer",Bt)),v(Bt,"getCesiumIonToken",W9),v(Bt,"currentDefaultAccessToken",u.Ion.defaultAccessToken),v(Bt,"latestDefaultAccessToken"),v(Bt,"ObjectsToExcludeWrapper",HG),v(Bt,"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:u.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:u.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(Bt,"getHeightsScartchCarto",new u.Cartographic);let Qe=Bt;(t=>{t.createDefaultProps=()=>({...A.ESViewer.createDefaultProps(),...N9()})})(Qe||(Qe={})),A.extendClassProps(Qe.prototype,Qe.createDefaultProps),T.copyright=void 0;try{const t="earthsdk3-cesium",i="3.7.0-beta.21",e="2026-01-04T09:27:52.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="162dd7d8154bc94dddb13c89bb4d35a59489b066",a=((Date.now()-1767518872e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${a}个小时)
|
|
2322
|
+
`;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const Bt=class Bt extends A.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(A.react(0)));v(this,"_viewer",this.dv(A.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(A.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(A.react(0)));v(this,"_editingSystem",Id);v(this,"_moveObjectsProcess",this.ad(M_()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new UG(this)),this.ad(new RG(this)),this.dv(new A.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new OG(this)})),this._viewerLegend=this.dv(new H9(this)),this._viewerInstance=this.dv(new A.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Tv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=ne([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 aW(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&&st(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=u.Cartographic.fromDegrees(e[0],e[1],e[2],Bt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:hi(e),rotation:ir(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),a=u.Matrix4.multiplyByPoint(r,n.positionWC,new u.Cartesian3),l=u.Cartesian3.magnitude(a);let h=-Math.asin(a.z/l);h=u.Math.toDegrees(h);let d=u.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(d+=a.y<0?-u.Math.PI:u.Math.PI),d=u.Math.toDegrees(d);const p=ir(n),f=p[0]-d,g=p[1]-h;return{distance:l,heading:d,pitch:h,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var l;const r={position:e,rotation:n,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&Wa(a,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:a,flyDuration:l,hDelta:h,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,a,0],duration:l*1e3,hdelta:h,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Wa(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:a,radius:l}=r,h={position:a,viewDistance:n??l,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Wa(d,h)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:hi(e),rotation:ir(e)}}transformFlyParam(e,n){if("position"in n){const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),a=u.Matrix4.multiplyByPoint(r,Pe(n.position),new u.Cartesian3),l=u.Cartesian3.magnitude(a);let h=-Math.asin(a.z/l);h=u.Math.toDegrees(h);let d=u.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(d+=a.y<0?-u.Math.PI:u.Math.PI),d=u.Math.toDegrees(d);const p=n.rotation[0]-d,f=n.rotation[1]-h;return{distance:l,heading:d,pitch:h,flyDuration:n.flyDuration??1,hDelta:p,pDelta:f}}else{const o=Pe(e);let s={heading:u.Math.toRadians(n.heading),pitch:u.Math.toRadians(n.pitch),roll:0};const r=new u.HeadingPitchRoll;if(n.distance){r.heading=s.heading,r.pitch=s.pitch,r.roll=0,r.heading-=u.Math.PI_OVER_TWO;const l=u.Transforms.headingPitchRollToFixedFrame(o,r,void 0,void 0),h=u.Matrix4.multiplyByPointAsVector(l,u.Cartesian3.UNIT_X,new u.Cartesian3);u.Cartesian3.multiplyByScalar(h,n.distance,h),u.Cartesian3.subtract(o,h,o)}n.hDelta&&(s.heading+=u.Math.toRadians(n.hDelta)),n.pDelta&&(s.pitch+=u.Math.toRadians(n.pDelta));const a=he(o);return a?{position:a,rotation:[u.Math.toDegrees(s.heading),u.Math.toDegrees(s.pitch),u.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,a){var l,h;(h=(l=this._viewerInstance)==null?void 0:l.obj)==null||h.navigationManager.changeToLine(e,n,o,s,r,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.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=window.g_XE3CopyRights??{};return e.cesium={version:u.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=u.Cartographic.fromDegrees(e,n,void 0,Bt.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 xy(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Pe(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],a=r.components.main??r;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=Bt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Bt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Bt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Jt(e,n)}localPositionsToPositions(e,n){return so(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof u.Cartesian3?e:Pe(e),o=new u.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=Bt.defaults;return{...e,more:[...e.more,new A.GroupProperty([],"通用","通用"),new A.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",G9,V9,!0),new A.FunctionProperty([],()=>Bt.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.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.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)]}}};v(Bt,"type",Bt.register("ESCesiumViewer",Bt)),v(Bt,"getCesiumIonToken",W9),v(Bt,"currentDefaultAccessToken",u.Ion.defaultAccessToken),v(Bt,"latestDefaultAccessToken"),v(Bt,"ObjectsToExcludeWrapper",HG),v(Bt,"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:u.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:u.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(Bt,"getHeightsScartchCarto",new u.Cartographic);let Qe=Bt;(t=>{t.createDefaultProps=()=>({...A.ESViewer.createDefaultProps(),...N9()})})(Qe||(Qe={})),A.extendClassProps(Qe.prototype,Qe.createDefaultProps),T.copyright=void 0;try{const t="earthsdk3-cesium",i="3.7.0-beta.23",e="2026-01-05T01:27:21.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="5b67338dfe94e7b0503e2cfc1defcb267f6ce422",a=((Date.now()-1767576441e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${a}个小时)
|
|
2323
2323
|
%c${o?o+`
|
|
2324
2324
|
`:""}当前网站正在使用${t},此软件版权归${n}所有
|
|
2325
|
-
`;T.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
2325
|
+
`;T.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","5b67338dfe94e7b0503e2cfc1defcb267f6ce422")},get info(){return l},get date(){return"2026-01-05T01:27:21.000Z"},get author(){return"suplyang"},get version(){return"3.7.0-beta.23"},get name(){return"earthsdk3-cesium"},get commitId(){return"5b67338dfe94e7b0503e2cfc1defcb267f6ce422"},print(){console.info(this.info,`
|
|
2326
2326
|
font-size: 18px;
|
|
2327
2327
|
font-weight: 1000;
|
|
2328
2328
|
line-height: 1;
|
package/dist/earthsdk3-cesium.js
CHANGED
|
@@ -53562,7 +53562,7 @@ let qe = Pt;
|
|
|
53562
53562
|
ae(qe.prototype, qe.createDefaultProps);
|
|
53563
53563
|
let Pp;
|
|
53564
53564
|
try {
|
|
53565
|
-
const t = "earthsdk3-cesium", i = "3.7.0-beta.
|
|
53565
|
+
const t = "earthsdk3-cesium", i = "3.7.0-beta.23", e = "2026-01-05T01:27:21.000Z", s = "北京西部世界科技有限公司", n = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", o = "5b67338dfe94e7b0503e2cfc1defcb267f6ce422", a = ((Date.now() - 1767576441e3) / 36e5).toFixed(1), h = `%c🌏 ${t}%c ${i}.${o.slice(0, 8)}.${e} (距今${a}个小时)
|
|
53566
53566
|
%c${n ? n + `
|
|
53567
53567
|
` : ""}当前网站正在使用${t},此软件版权归${s}所有
|
|
53568
53568
|
`;
|
|
@@ -53576,7 +53576,7 @@ try {
|
|
|
53576
53576
|
},
|
|
53577
53577
|
// @ts-ignore
|
|
53578
53578
|
get gituri() {
|
|
53579
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
53579
|
+
return GITURI_ && GITURI_.replace("${commitId}", "5b67338dfe94e7b0503e2cfc1defcb267f6ce422");
|
|
53580
53580
|
},
|
|
53581
53581
|
// @ts-ignore
|
|
53582
53582
|
get info() {
|
|
@@ -53584,7 +53584,7 @@ try {
|
|
|
53584
53584
|
},
|
|
53585
53585
|
// @ts-ignore
|
|
53586
53586
|
get date() {
|
|
53587
|
-
return "2026-01-
|
|
53587
|
+
return "2026-01-05T01:27:21.000Z";
|
|
53588
53588
|
},
|
|
53589
53589
|
// @ts-ignore
|
|
53590
53590
|
get author() {
|
|
@@ -53592,7 +53592,7 @@ try {
|
|
|
53592
53592
|
},
|
|
53593
53593
|
// @ts-ignore
|
|
53594
53594
|
get version() {
|
|
53595
|
-
return "3.7.0-beta.
|
|
53595
|
+
return "3.7.0-beta.23";
|
|
53596
53596
|
},
|
|
53597
53597
|
// @ts-ignore
|
|
53598
53598
|
get name() {
|
|
@@ -53600,7 +53600,7 @@ try {
|
|
|
53600
53600
|
},
|
|
53601
53601
|
// @ts-ignore
|
|
53602
53602
|
get commitId() {
|
|
53603
|
-
return "
|
|
53603
|
+
return "5b67338dfe94e7b0503e2cfc1defcb267f6ce422";
|
|
53604
53604
|
},
|
|
53605
53605
|
print() {
|
|
53606
53606
|
console.info(
|
|
@@ -2298,10 +2298,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
2298
2298
|
`;function d5(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
2299
2299
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
2300
2300
|
gitee地址:${t}
|
|
2301
|
-
`;console.log(e);const n=globalThis.prompt(e,t);n&&globalThis.open(n,"_blank")}const ht=class ht extends a.ESViewer{constructor(e){super(e);y(this,"_disabledInputStack",this.disposeVar(a.react(0)));y(this,"_viewer",this.dv(a.react(void 0)));y(this,"_viewerInstance");y(this,"_viewerLegend");y(this,"pickCustomAttachedInfo");y(this,"_fps",this.dv(a.react(0)));y(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));y(this,"_editingSystem",jh);y(this,"_moveObjectsProcess",this.ad(qC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new iB(this)),this.ad(new nB(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new aB(this)})),this._viewerLegend=this.dv(new r5(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Qg(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 D4(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&&Qe(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=u.Cartographic.fromDegrees(e[0],e[1],e[2],ht.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Xt(e),rotation:as(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),l=u.Matrix4.multiplyByPoint(r,n.positionWC,new u.Cartesian3),h=u.Cartesian3.magnitude(l);let d=-Math.asin(l.z/h);d=u.Math.toDegrees(d);let p=u.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(p+=l.y<0?-u.Math.PI:u.Math.PI),p=u.Math.toDegrees(p);const f=as(n),g=f[0]-p,m=f[1]-d;return{distance:h,heading:p,pitch:d,flyDuration:1,hDelta:g,pDelta:m}}flyIn(e,n,o,s="default"){var h;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(h=this.viewer)==null?void 0:h.camera;return l&&Lr(l,r,s)}flyTo(e,n,o="default"){var m;const{distance:s,heading:r,pitch:l,flyDuration:h,hDelta:d,pDelta:p}=e,f={position:n,viewDistance:s,rotation:[r,l,0],duration:h*1e3,hdelta:d,pdelta:p},g=(m=this.viewer)==null?void 0:m.camera;return g&&Lr(g,f,o)}flyToBoundingSphere(e,n,o=1){var f;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:h}=r,d={position:l,viewDistance:n??h,rotation:[0,-90,0],duration:o*1e3},p=(f=this.viewer)==null?void 0:f.camera;return p&&Lr(p,d)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Xt(e),rotation:as(e)}}transformFlyParam(e,n){if("position"in n){const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),l=u.Matrix4.multiplyByPoint(r,be(n.position),new u.Cartesian3),h=u.Cartesian3.magnitude(l);let d=-Math.asin(l.z/h);d=u.Math.toDegrees(d);let p=u.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(p+=l.y<0?-u.Math.PI:u.Math.PI),p=u.Math.toDegrees(p);const f=n.rotation[0]-p,g=n.rotation[1]-d;return{distance:h,heading:p,pitch:d,flyDuration:n.flyDuration??1,hDelta:f,pDelta:g}}else{const o=be(e);let s={heading:u.Math.toRadians(n.heading),pitch:u.Math.toRadians(n.pitch),roll:0};const r=new u.HeadingPitchRoll;if(n.distance){r.heading=s.heading,r.pitch=s.pitch,r.roll=0,r.heading-=u.Math.PI_OVER_TWO;const h=u.Transforms.headingPitchRollToFixedFrame(o,r,void 0,void 0),d=u.Matrix4.multiplyByPointAsVector(h,u.Cartesian3.UNIT_X,new u.Cartesian3);u.Cartesian3.multiplyByScalar(d,n.distance,d),u.Cartesian3.subtract(o,d,o)}n.hDelta&&(s.heading+=u.Math.toRadians(n.hDelta)),n.pDelta&&(s.pitch+=u.Math.toRadians(n.pDelta));const l=re(o);return l?{position:l,rotation:[u.Math.toDegrees(s.heading),u.Math.toDegrees(s.pitch),u.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 h,d;(d=(h=this._viewerInstance)==null?void 0:h.obj)==null||d.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,h;(h=(l=this._viewerInstance)==null?void 0:l.obj)==null||h.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,h;(h=(l=this._viewerInstance)==null?void 0:l.obj)==null||h.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:u.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=u.Cartographic.fromDegrees(e,n,void 0,ht.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 Wm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(be(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=ht.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!ht.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=ht.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Bt(e,n)}localPositionsToPositions(e,n){return Sn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof u.Cartesian3?e:be(e),o=new u.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=ht.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",u5,h5,!0),new a.FunctionProperty([],()=>ht.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.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.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)]}}};y(ht,"type",ht.register("ESCesiumViewer",ht)),y(ht,"getCesiumIonToken",d5),y(ht,"currentDefaultAccessToken",u.Ion.defaultAccessToken),y(ht,"latestDefaultAccessToken"),y(ht,"ObjectsToExcludeWrapper",rB),y(ht,"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:u.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:u.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}),y(ht,"getHeightsScartchCarto",new u.Cartographic);let Me=ht;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...c5()})})(Me||(Me={})),a.extendClassProps(Me.prototype,Me.createDefaultProps),D.copyright=void 0;try{const t="earthsdk3-cesium",i="3.7.0-beta.21",e="2026-01-04T09:27:52.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="162dd7d8154bc94dddb13c89bb4d35a59489b066",l=((Date.now()-1767518872e3)/36e5).toFixed(1),h=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2301
|
+
`;console.log(e);const n=globalThis.prompt(e,t);n&&globalThis.open(n,"_blank")}const ht=class ht extends a.ESViewer{constructor(e){super(e);y(this,"_disabledInputStack",this.disposeVar(a.react(0)));y(this,"_viewer",this.dv(a.react(void 0)));y(this,"_viewerInstance");y(this,"_viewerLegend");y(this,"pickCustomAttachedInfo");y(this,"_fps",this.dv(a.react(0)));y(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));y(this,"_editingSystem",jh);y(this,"_moveObjectsProcess",this.ad(qC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new iB(this)),this.ad(new nB(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new aB(this)})),this._viewerLegend=this.dv(new r5(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Qg(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 D4(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&&Qe(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=u.Cartographic.fromDegrees(e[0],e[1],e[2],ht.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Xt(e),rotation:as(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),l=u.Matrix4.multiplyByPoint(r,n.positionWC,new u.Cartesian3),h=u.Cartesian3.magnitude(l);let d=-Math.asin(l.z/h);d=u.Math.toDegrees(d);let p=u.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(p+=l.y<0?-u.Math.PI:u.Math.PI),p=u.Math.toDegrees(p);const f=as(n),g=f[0]-p,m=f[1]-d;return{distance:h,heading:p,pitch:d,flyDuration:1,hDelta:g,pDelta:m}}flyIn(e,n,o,s="default"){var h;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(h=this.viewer)==null?void 0:h.camera;return l&&Lr(l,r,s)}flyTo(e,n,o="default"){var m;const{distance:s,heading:r,pitch:l,flyDuration:h,hDelta:d,pDelta:p}=e,f={position:n,viewDistance:s,rotation:[r,l,0],duration:h*1e3,hdelta:d,pdelta:p},g=(m=this.viewer)==null?void 0:m.camera;return g&&Lr(g,f,o)}flyToBoundingSphere(e,n,o=1){var f;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:h}=r,d={position:l,viewDistance:n??h,rotation:[0,-90,0],duration:o*1e3},p=(f=this.viewer)==null?void 0:f.camera;return p&&Lr(p,d)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Xt(e),rotation:as(e)}}transformFlyParam(e,n){if("position"in n){const o=u.Cartesian3.fromDegrees(...e),s=u.Transforms.eastNorthUpToFixedFrame(o),r=u.Matrix4.inverse(s,new u.Matrix4),l=u.Matrix4.multiplyByPoint(r,be(n.position),new u.Cartesian3),h=u.Cartesian3.magnitude(l);let d=-Math.asin(l.z/h);d=u.Math.toDegrees(d);let p=u.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(p+=l.y<0?-u.Math.PI:u.Math.PI),p=u.Math.toDegrees(p);const f=n.rotation[0]-p,g=n.rotation[1]-d;return{distance:h,heading:p,pitch:d,flyDuration:n.flyDuration??1,hDelta:f,pDelta:g}}else{const o=be(e);let s={heading:u.Math.toRadians(n.heading),pitch:u.Math.toRadians(n.pitch),roll:0};const r=new u.HeadingPitchRoll;if(n.distance){r.heading=s.heading,r.pitch=s.pitch,r.roll=0,r.heading-=u.Math.PI_OVER_TWO;const h=u.Transforms.headingPitchRollToFixedFrame(o,r,void 0,void 0),d=u.Matrix4.multiplyByPointAsVector(h,u.Cartesian3.UNIT_X,new u.Cartesian3);u.Cartesian3.multiplyByScalar(d,n.distance,d),u.Cartesian3.subtract(o,d,o)}n.hDelta&&(s.heading+=u.Math.toRadians(n.hDelta)),n.pDelta&&(s.pitch+=u.Math.toRadians(n.pDelta));const l=re(o);return l?{position:l,rotation:[u.Math.toDegrees(s.heading),u.Math.toDegrees(s.pitch),u.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 h,d;(d=(h=this._viewerInstance)==null?void 0:h.obj)==null||d.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,h;(h=(l=this._viewerInstance)==null?void 0:l.obj)==null||h.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,h;(h=(l=this._viewerInstance)==null?void 0:l.obj)==null||h.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:u.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=u.Cartographic.fromDegrees(e,n,void 0,ht.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 Wm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(be(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=ht.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!ht.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=ht.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Bt(e,n)}localPositionsToPositions(e,n){return Sn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof u.Cartesian3?e:be(e),o=new u.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=ht.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",u5,h5,!0),new a.FunctionProperty([],()=>ht.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.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.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)]}}};y(ht,"type",ht.register("ESCesiumViewer",ht)),y(ht,"getCesiumIonToken",d5),y(ht,"currentDefaultAccessToken",u.Ion.defaultAccessToken),y(ht,"latestDefaultAccessToken"),y(ht,"ObjectsToExcludeWrapper",rB),y(ht,"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:u.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:u.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:u.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}),y(ht,"getHeightsScartchCarto",new u.Cartographic);let Me=ht;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...c5()})})(Me||(Me={})),a.extendClassProps(Me.prototype,Me.createDefaultProps),D.copyright=void 0;try{const t="earthsdk3-cesium",i="3.7.0-beta.23",e="2026-01-05T01:27:21.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="5b67338dfe94e7b0503e2cfc1defcb267f6ce422",l=((Date.now()-1767576441e3)/36e5).toFixed(1),h=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2302
2302
|
%c${o?o+`
|
|
2303
2303
|
`:""}当前网站正在使用${t},此软件版权归${n}所有
|
|
2304
|
-
`;D.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
2304
|
+
`;D.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","5b67338dfe94e7b0503e2cfc1defcb267f6ce422")},get info(){return h},get date(){return"2026-01-05T01:27:21.000Z"},get author(){return"suplyang"},get version(){return"3.7.0-beta.23"},get name(){return"earthsdk3-cesium"},get commitId(){return"5b67338dfe94e7b0503e2cfc1defcb267f6ce422"},print(){console.info(this.info,`
|
|
2305
2305
|
font-size: 18px;
|
|
2306
2306
|
font-weight: 1000;
|
|
2307
2307
|
line-height: 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "earthsdk3-cesium",
|
|
3
|
-
"version": "3.7.0-beta.
|
|
3
|
+
"version": "3.7.0-beta.23",
|
|
4
4
|
"description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/earthsdk3-cesium.umd.cjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"cesium": "1.134.1",
|
|
42
|
-
"earthsdk3": "3.7.0-beta.
|
|
42
|
+
"earthsdk3": "3.7.0-beta.19"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@types/delaunator": "^5.0.2",
|