@soonspacejs/plugin-tiles 2.15.15 → 2.15.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1106 -514
- package/dist/plot/PlotPrimitiveBridge.d.ts +12 -1
- package/dist/plot/emergency-resource-icons.d.ts +2 -21
- package/package.json +3 -3
|
@@ -5,6 +5,8 @@ import { GisPlotBase } from './plugins/base';
|
|
|
5
5
|
export interface PlotPrimitiveBridgeOptions {
|
|
6
6
|
/** 标绘图元挂载的目标场景 */
|
|
7
7
|
scene: Scene;
|
|
8
|
+
/** 图片资源异步就绪后请求宿主刷新 */
|
|
9
|
+
requestRender?: () => void;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* 标绘图元桥接器:把 Map<id, GisPlot*> 同步为一组 CesiumGround*Primitive。
|
|
@@ -18,6 +20,9 @@ export declare class PlotPrimitiveBridge {
|
|
|
18
20
|
private _opacity;
|
|
19
21
|
/** 挂载场景 */
|
|
20
22
|
private readonly _scene;
|
|
23
|
+
/** 图片资源异步就绪后请求宿主刷新;按 URL 去重监听 */
|
|
24
|
+
private readonly _requestRender?;
|
|
25
|
+
private readonly _watchedImageUrls;
|
|
21
26
|
/** 已释放标记 */
|
|
22
27
|
private _disposed;
|
|
23
28
|
constructor(options: PlotPrimitiveBridgeOptions);
|
|
@@ -41,7 +46,7 @@ export declare class PlotPrimitiveBridge {
|
|
|
41
46
|
dispose(): void;
|
|
42
47
|
/**
|
|
43
48
|
* 当前图元是否支持样式热更新(颜色 / 描边等)。
|
|
44
|
-
* 折线(setColor / setWidth
|
|
49
|
+
* 折线(setColor / setWidth)、文字(setText)和图片点透明度支持;面类不支持,需重建。
|
|
45
50
|
*/
|
|
46
51
|
private _supportsStyleHotUpdate;
|
|
47
52
|
/**
|
|
@@ -58,4 +63,10 @@ export declare class PlotPrimitiveBridge {
|
|
|
58
63
|
* @returns 渲染图元;未知类型 / 退化情况返回 null。
|
|
59
64
|
*/
|
|
60
65
|
private _buildPrimitive;
|
|
66
|
+
/**
|
|
67
|
+
* 贴地图元依赖异步 TextureLoader,而 SoonSpace 默认按需渲染;
|
|
68
|
+
* 图片解码完成后若没有新的渲染请求,纹理会等到相机交互才首次显示。
|
|
69
|
+
* 用原生 Image 监听资源就绪并通知宿主,按 URL 去重避免重复监听。
|
|
70
|
+
*/
|
|
71
|
+
private _watchImageTexture;
|
|
61
72
|
}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
readonly OutdoorFireHydrant: "outdoor-hydrant.svg";
|
|
4
|
-
readonly UndergroundHydrant: "outdoor-hydrant-underground.svg";
|
|
5
|
-
readonly AboveGroundHydrant: "outdoor-hydrant-above-ground.svg";
|
|
6
|
-
readonly MunicipalFireHydrants: "municipal-hydrant.svg";
|
|
7
|
-
readonly FireWaterReservoir: "fire-water-pool.svg";
|
|
8
|
-
readonly NaturalWater: "natural-water-source.svg";
|
|
9
|
-
readonly HospitalResourcePoint: "hospital-resource.svg";
|
|
10
|
-
readonly PublicSecurityResourcePoint: "police-resource.svg";
|
|
11
|
-
readonly SupportMaterialPoint: "emergency-supplies.svg";
|
|
12
|
-
readonly FireStation: "fire-station.svg";
|
|
13
|
-
readonly LinkageUnit: "coordination-unit.svg";
|
|
14
|
-
};
|
|
15
|
-
export type EmergencyResourceOntologyId = keyof typeof EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID;
|
|
16
|
-
export declare const EMERGENCY_RESOURCE_ONTOLOGY_IDS: readonly ("OutdoorFireHydrant" | "UndergroundHydrant" | "AboveGroundHydrant" | "MunicipalFireHydrants" | "FireWaterReservoir" | "NaturalWater" | "HospitalResourcePoint" | "PublicSecurityResourcePoint" | "SupportMaterialPoint" | "FireStation" | "LinkageUnit")[];
|
|
17
|
-
export declare function resolveEmergencyResourceIcon(ontologyId: string | null | undefined): string | null;
|
|
18
|
-
export declare function resolvePlotPointImageUrl(source: {
|
|
19
|
-
imageUrl?: string;
|
|
20
|
-
ontologyId?: string;
|
|
21
|
-
}): string | null;
|
|
1
|
+
export { EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID, EMERGENCY_RESOURCE_ONTOLOGY_IDS, resolveEmergencyResourceIcon, resolvePlotPointImageUrl, } from 'cesium-to-three/plot';
|
|
2
|
+
export type { EmergencyResourceOntologyId, } from 'cesium-to-three/plot';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soonspacejs/plugin-tiles",
|
|
3
3
|
"pluginName": "TilesPlugin",
|
|
4
|
-
"version": "2.15.
|
|
4
|
+
"version": "2.15.16",
|
|
5
5
|
"description": "3D Tiles plugin for SoonSpace.js",
|
|
6
6
|
"main": "dist/index.esm.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"um-3d-tiles-renderer": "^0.4.48",
|
|
22
22
|
"three": "^0.183.0",
|
|
23
23
|
"@mapbox/geojson-merge": "^1.1.1",
|
|
24
|
-
"cesium-to-three": "^0.2.
|
|
25
|
-
"soonspacejs": "2.15.
|
|
24
|
+
"cesium-to-three": "^0.2.4",
|
|
25
|
+
"soonspacejs": "2.15.16"
|
|
26
26
|
}
|
|
27
27
|
}
|