earthsdk3 3.11.0-alpha.3 → 3.11.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/earthsdk3.iife.js +44 -44
  2. package/dist/earthsdk3.js +4722 -4636
  3. package/dist/earthsdk3.umd.cjs +38 -38
  4. package/dist/types/ESMCPTools/ESMCPClient.d.ts +10 -16
  5. package/dist/types/ESMCPTools/tools/{getCameraTools.d.ts → camera.d.ts} +3 -4
  6. package/dist/types/ESMCPTools/tools/index.d.ts +4 -2
  7. package/dist/types/ESMCPTools/tools/{getSceneObjectTools.d.ts → sceneObject.d.ts} +3 -4
  8. package/dist/types/ESMCPTools/types/MCPToolType.d.ts +61 -0
  9. package/dist/types/ESMCPTools/types/index.d.ts +2 -35
  10. package/dist/types/ESObjectManager/index.d.ts +5 -0
  11. package/dist/types/ESObjects/base/ESSceneObject/index.d.ts +5 -0
  12. package/dist/types/ESObjects/general/ESAlarm.d.ts +1 -11
  13. package/dist/types/ESObjects/general/ESCylinder.d.ts +1 -1
  14. package/dist/types/ESObjects/general/ESGltfModel.d.ts +5 -4
  15. package/dist/types/ESObjects/general/ESGltfModelEditing/index.d.ts +2 -10
  16. package/dist/types/ESObjects/general/ESHuman.d.ts +3 -13
  17. package/dist/types/ESObjects/general/ESHumanFountain.d.ts +1 -1
  18. package/dist/types/ESObjects/general/ESHumanPoi.d.ts +1 -1
  19. package/dist/types/ESObjects/general/ESHumans.d.ts +1 -1
  20. package/dist/types/ESObjects/general/ESMVTLayer.d.ts +2 -0
  21. package/dist/types/ESObjects/general/ESMediaLayer/index.d.ts +1 -1
  22. package/dist/types/ESObjects/general/ESMsTileset/index.d.ts +56 -84
  23. package/dist/types/ESObjects/general/ESMsTileset/msPath.d.ts +5 -0
  24. package/dist/types/ESObjects/general/ESMsTileset/types.d.ts +2 -5
  25. package/dist/types/ESObjects/general/ESPolygonsFlattenedPlane.d.ts +93 -0
  26. package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts +12 -0
  27. package/dist/types/ESObjects/general/ESRtsTileset/rtsPath.d.ts +57 -0
  28. package/dist/types/ESObjects/general/ESRtsTileset/types.d.ts +5 -3
  29. package/dist/types/ESObjects/general/ESSignalInterference.d.ts +1 -0
  30. package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts +1 -5
  31. package/dist/types/ESObjects/general/index.d.ts +1 -0
  32. package/dist/types/ESViewer/ESViewer.d.ts +3 -3
  33. package/package.json +1 -3
@@ -2,6 +2,7 @@ import { Event, JsonValue, SceneObjectKey, UniteChanged } from "../../../xbsj-ba
2
2
  import { ES3DTileset } from "../ES3DTileset";
3
3
  import { FeatureVisableJsonType } from "../ES3DTileset/type";
4
4
  import { ESRtsFeatureEditing } from "../ESRtsFeatureEditing";
5
+ import { type ESRtsPlatform } from "./rtsPath";
5
6
  /**
6
7
  * ESRtsTileset 类用于表示和操作实时3D Tileset图层。它继承自 ES3DTileset 类,并扩展了实时数据和高亮功能。
7
8
  *
@@ -105,6 +106,13 @@ export declare class ESRtsTileset extends ES3DTileset {
105
106
  * @param value - 要设置的要素 ID 数组。
106
107
  */
107
108
  set ids(value: string[]);
109
+ /**
110
+ * RTS 服务所属平台,CesiumlabDesktop 时 API 与 tileset 路径带 /cim 前缀。
111
+ */
112
+ private _platform;
113
+ get platform(): ESRtsPlatform;
114
+ get platformChanged(): import("../../../xbsj-base").Listener<[ESRtsPlatform, ESRtsPlatform]>;
115
+ set platform(value: ESRtsPlatform);
108
116
  private _visJson;
109
117
  get visJson(): any;
110
118
  set visJson(value: any);
@@ -204,6 +212,8 @@ export declare class ESRtsTileset extends ES3DTileset {
204
212
  * 刷新图层。
205
213
  */
206
214
  refresh(): Promise<void>;
215
+ /** 从 info 地址推断 platform,避免 JSON 反序列化时 url 先于 platform 赋值 */
216
+ private syncPlatformFromUrl;
207
217
  /**
208
218
  * 获取当前服务的基础 URL。
209
219
  * @returns 当前服务的基础 URL。
@@ -244,3 +254,5 @@ export declare class ESRtsTileset extends ES3DTileset {
244
254
  */
245
255
  export interface ESRtsTileset extends UniteChanged<ReturnType<typeof ESRtsTileset.createDefaultProps>> {
246
256
  }
257
+ export * from './types';
258
+ export * from './rtsPath';
@@ -0,0 +1,57 @@
1
+ export type ESRtsPlatform = 'CIMRTS' | 'CesiumlabDesktop';
2
+ /** 是否为 RTS info 相对路径,如 /ts/info/ts01 */
3
+ export declare function isRelativeRtsInfoUrl(url: string): boolean;
4
+ /**
5
+ * 将 RTS info 服务地址解析为可用于 fetch 的完整 URL。
6
+ *
7
+ * 支持两种写法:
8
+ * - 绝对地址:`http://localhost:9009/ts/info/ts01` → 原样返回
9
+ * - 相对路径:`/ts/info/ts01` → 拼接当前页面 origin,如 `http://localhost:29009/ts/info/ts01`
10
+ *
11
+ * 相对路径适用于服务与页面同域(或经代理转发)的场景,端口变更后无需修改场景 JSON。
12
+ *
13
+ * @param url - RTS info 地址,绝对或相对均可
14
+ * @returns 完整 URL;空字符串原样返回;无法解析时返回入参
15
+ *
16
+ * @example
17
+ * resolveRtsInfoUrl('http://localhost:9009/ts/info/ts01')
18
+ * // => 'http://localhost:9009/ts/info/ts01'
19
+ *
20
+ * @example
21
+ * // 页面为 http://localhost:29009 时
22
+ * resolveRtsInfoUrl('/ts/info/ts01')
23
+ * // => 'http://localhost:29009/ts/info/ts01'
24
+ */
25
+ export declare function resolveRtsInfoUrl(url: string): string;
26
+ /**
27
+ * 从 info 地址解析 origin(协议 + 主机 + 端口)。
28
+ *
29
+ * 会先调用 {@link resolveRtsInfoUrl} 将相对路径转为完整 URL,再提取 origin 部分。
30
+ *
31
+ * @param url - RTS info 地址
32
+ * @returns origin 字符串;解析失败返回 undefined
33
+ *
34
+ * @example
35
+ * parseRtsOrigin('http://localhost:9009/ts/info/ts01') // => 'http://localhost:9009'
36
+ * parseRtsOrigin('/ts/info/ts01') // => 'http://localhost:29009'(取决于当前页面)
37
+ */
38
+ export declare function parseRtsOrigin(url: string): string | undefined;
39
+ /**
40
+ * 从 info 地址解析 host(协议 + 主机名,不含端口)。
41
+ *
42
+ * 会先调用 {@link resolveRtsInfoUrl} 将相对路径转为完整 URL,再提取 host 部分。
43
+ *
44
+ * @param url - RTS info 地址
45
+ * @returns host 字符串;解析失败返回 undefined
46
+ *
47
+ * @example
48
+ * parseRtsHost('http://localhost:9009/ts/info/ts01') // => 'http://localhost'
49
+ * parseRtsHost('/ts/info/ts01') // => 'http://localhost'(取决于当前页面)
50
+ */
51
+ export declare function parseRtsHost(url: string): string | undefined;
52
+ export declare function getRtsServicePrefix(platform: ESRtsPlatform): string;
53
+ export declare function parsePlatformFromUrl(url: string): ESRtsPlatform | undefined;
54
+ export declare function parseTileServiceName(url: string): string | undefined;
55
+ export declare function buildInfoUrl(ipPort: string, platform: ESRtsPlatform, tileServiceName: string): string;
56
+ export declare function buildTilesetUrl(ipPort: string, platform: ESRtsPlatform, tileServiceName: string, time?: number): string;
57
+ export declare function buildFeatureTilesetUrl(ipPort: string, platform: ESRtsPlatform, tileServiceName: string, featureId: string): string;
@@ -31,6 +31,8 @@ export interface LayerType {
31
31
  * "MIX" - 混合模式
32
32
  */
33
33
  export type ColorModeType = "HIGHLIGHT" | "REPLACE" | "MIX";
34
+ import type { ESRtsPlatform } from './rtsPath';
35
+ export type { ESRtsPlatform };
34
36
  /**
35
37
  * API 接口地址集合
36
38
  */
@@ -62,7 +64,7 @@ export declare const apis: {
62
64
  * @param tileServiceName - 切片服务名称
63
65
  * @returns {Promise<LayerType[]>} - 返回一个 Promise,解析为图层配置数组
64
66
  */
65
- export declare const _getLayerConfig: (baseUrl: string, tileServiceName: string, useEarthDSToken: boolean, earthdstoken: string) => Promise<LayerType[] | undefined>;
67
+ export declare const _getLayerConfig: (baseUrl: string, tileServiceName: string, useEarthDSToken: boolean, earthdstoken: string, platform?: ESRtsPlatform) => Promise<LayerType[] | undefined>;
66
68
  /**
67
69
  * 保存图层配置
68
70
  * @param baseUrl - 基础 URL
@@ -70,7 +72,7 @@ export declare const _getLayerConfig: (baseUrl: string, tileServiceName: string,
70
72
  * @param layerConfig - 可选的图层配置对象,默认为空对象
71
73
  * @returns {Promise<any>} - 返回一个 Promise,解析为保存结果
72
74
  */
73
- export declare const _saveLayerConfig: (baseUrl: string, tileServiceName: string, useEarthDSToken: boolean, earthdstoken: string, layerConfig?: LayerType[]) => Promise<any>;
75
+ export declare const _saveLayerConfig: (baseUrl: string, tileServiceName: string, useEarthDSToken: boolean, earthdstoken: string, layerConfig?: LayerType[], platform?: ESRtsPlatform) => Promise<any>;
74
76
  /**
75
77
  * 获取切片服务的端口
76
78
  * @param url - 请求的 URL
@@ -84,6 +86,6 @@ export declare const _getport: (url: string, useEarthDSToken: boolean, earthdsto
84
86
  * @param featureId - 要素 ID
85
87
  * @returns {Promise<{ [k: string]: any } | undefined>} - 返回一个 Promise,解析为要素属性对象,如果请求失败则返回 undefined
86
88
  */
87
- export declare const _getFeatureProperty: (baseUrl: string, tileServiceName: string, featureId: string, useEarthDSToken: boolean, earthdstoken: string) => Promise<{
89
+ export declare const _getFeatureProperty: (baseUrl: string, tileServiceName: string, featureId: string, useEarthDSToken: boolean, earthdstoken: string, platform?: ESRtsPlatform) => Promise<{
88
90
  [k: string]: any;
89
91
  } | undefined>;
@@ -12,6 +12,7 @@ export declare class ESSignalInterference extends ESGltfModel {
12
12
  esCylinderHeight: number;
13
13
  /** 材质参数配置 */
14
14
  esCylinderMaterialParams: import("../../xbsj-base").ReactiveVariable<ESJCylinderMaterialParamsType>;
15
+ czmAnimationsIndex: number | undefined;
15
16
  czmMaximumScale: number | undefined;
16
17
  czmMinimumPixelSize: number;
17
18
  czmNativeScale: number;
@@ -1,5 +1,5 @@
1
1
  import { ESJColor } from "../../../ESJTypes";
2
- import { Event, SceneObjectKey, UniteChanged } from "../../../xbsj-base";
2
+ import { SceneObjectKey, UniteChanged } from "../../../xbsj-base";
3
3
  import { ESObjectWithLocation } from "../../base";
4
4
  /**
5
5
  * 淹没分析类,用于处理淹没分析相关的数据和属性。
@@ -119,10 +119,6 @@ export declare class ESSubmergingAnalysis extends ESObjectWithLocation {
119
119
  * @returns 时间戳数组。
120
120
  */
121
121
  getAllMoments(): number[];
122
- /**
123
- * 就绪事件,当数据加载完成时触发。
124
- */
125
- readyEvent: Event<[]>;
126
122
  /**
127
123
  * 构造函数,初始化该对象并解析 URL 获取数据。
128
124
  * @param id 场景对象的唯一标识,可选参数。
@@ -35,6 +35,7 @@ export * from './ESParticleSystemPrimitive';
35
35
  export * from './ESPoi2D';
36
36
  export * from './ESPoi3D';
37
37
  export * from './ESPolygonFlattenedPlane';
38
+ export * from './ESPolygonsFlattenedPlane';
38
39
  export * from './ESSeparateFoliage';
39
40
  export * from './ESSubmergingAnalysis';
40
41
  export * from './ESSunshineAnalysis';
@@ -320,7 +320,7 @@ export declare abstract class ESViewer extends Destroyable {
320
320
  */
321
321
  textAvoidance: boolean;
322
322
  /**
323
- * 默认飞行定位时对象包围球所占的屏幕像素大小,默认值为 256
323
+ * 默认飞行定位时对象包围球所占的屏幕像素大小,默认值为 1024
324
324
  */
325
325
  flyToBoundingSize: number | undefined;
326
326
  /**
@@ -1257,7 +1257,7 @@ export declare namespace ESViewer {
1257
1257
  */
1258
1258
  textAvoidance: boolean;
1259
1259
  /**
1260
- * 默认飞行定位时对象包围球所占的屏幕像素大小,默认值为 256
1260
+ * 默认飞行定位时对象包围球所占的屏幕像素大小,默认值为 1024
1261
1261
  */
1262
1262
  flyToBoundingSize: number | undefined;
1263
1263
  /**
@@ -1417,7 +1417,7 @@ export declare namespace ESViewer {
1417
1417
  */
1418
1418
  textAvoidance: boolean;
1419
1419
  /**
1420
- * 默认飞行定位时对象包围球所占的屏幕像素大小,默认值为 256
1420
+ * 默认飞行定位时对象包围球所占的屏幕像素大小,默认值为 1024
1421
1421
  */
1422
1422
  flyToBoundingSize: number | undefined;
1423
1423
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "earthsdk3",
3
- "version": "3.11.0-alpha.3",
3
+ "version": "3.11.0-beta.13",
4
4
  "description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
5
5
  "private": false,
6
6
  "type": "module",
@@ -25,13 +25,11 @@
25
25
  "typecheck": "tsc --noEmit",
26
26
  "build": "npm run typecheck && vite build && tsc-alias",
27
27
  "push:beta": "npm publish --registry https://registry.npmjs.org --tag beta",
28
- "push:alpha": "npm publish --registry https://registry.npmjs.org --tag alpha",
29
28
  "login": "npm login --registry https://registry.npmjs.org",
30
29
  "push": "npm publish --registry https://registry.npmjs.org",
31
30
  "prepublishOnly": "node ./tools/sdkPublish.js build",
32
31
  "register:npm-xbsj-local": "npm adduser --registry http://192.168.0.20:4873/",
33
32
  "login:npm-xbsj-local": "npm login --registry http://192.168.0.20:4873/",
34
- "publish:npm-xbsj-local": "npm publish --registry http://192.168.0.20:4873/ --tag beta",
35
33
  "publish:npm-xbsj-local-alpha": "npm publish --registry http://192.168.0.20:4873/ --tag alpha"
36
34
  },
37
35
  "devDependencies": {