@soonspacejs/plugin-tiles 2.15.14 → 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.
|
@@ -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
|
}
|
package/dist/plot/index.d.ts
CHANGED
|
@@ -6,4 +6,6 @@ export type { NormalizedRGBA, StyleOpacityInput, } from './plugins/utils/colorUt
|
|
|
6
6
|
export * from './plugins/utils/ArrowUtils';
|
|
7
7
|
export { PlotPrimitiveBridge, } from './PlotPrimitiveBridge';
|
|
8
8
|
export type { PlotPrimitiveBridgeOptions, } from './PlotPrimitiveBridge';
|
|
9
|
+
export { EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID, EMERGENCY_RESOURCE_ONTOLOGY_IDS, resolveEmergencyResourceIcon, resolvePlotPointImageUrl, } from './emergency-resource-icons';
|
|
10
|
+
export type { EmergencyResourceOntologyId, } from './emergency-resource-icons';
|
|
9
11
|
export { plotOrderToRenderOrder, sanitizePlotOrder, } from './plot-order';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EmergencyResourceOntologyId } from '../emergency-resource-icons';
|
|
1
2
|
/** 经纬度顶点:[经度°, 纬度°],单位度。 */
|
|
2
3
|
export type LonLatPoint = [number, number];
|
|
3
4
|
/** 标绘类别枚举,与 8 个 GisPlot* 子类一一对应;也是桥接器 switch(category) 的分支依据。 */
|
|
@@ -41,18 +42,31 @@ export type GisPlotSnapshot<T extends GisPlotBaseOptions = GisPlotBaseOptions> =
|
|
|
41
42
|
export type GisPlotArrowSnapshot = GisPlotSnapshot<PlotArrowOptions> & {
|
|
42
43
|
generatedCoords: LonLatPoint[];
|
|
43
44
|
};
|
|
44
|
-
/**
|
|
45
|
-
export type PlotPointStyle = 'circle' | 'square';
|
|
45
|
+
/** 点标绘形状:圆点、方点或使用米制宽高贴地的图片。 */
|
|
46
|
+
export type PlotPointStyle = 'circle' | 'square' | 'image';
|
|
46
47
|
/**
|
|
47
48
|
* 点标绘选项。points[0] 为点中心;size 在 cesium-to-three 侧:
|
|
48
49
|
* circle 解释为直径、square 解释为边长。
|
|
49
50
|
*/
|
|
50
|
-
export type PlotPointOptions = GisPlotBaseOptions & {
|
|
51
|
-
/**
|
|
52
|
-
pointStyle:
|
|
53
|
-
/** 尺寸(米):circle 为直径、square
|
|
51
|
+
export type PlotPointOptions = GisPlotBaseOptions & ({
|
|
52
|
+
/** 普通点形状。 */
|
|
53
|
+
pointStyle: 'circle' | 'square';
|
|
54
|
+
/** 尺寸(米):circle 为直径、square 为边长。 */
|
|
54
55
|
size: number;
|
|
55
|
-
}
|
|
56
|
+
} | {
|
|
57
|
+
/** 图片点。 */
|
|
58
|
+
pointStyle: 'image';
|
|
59
|
+
/** 图片贴地足迹宽度(米)。 */
|
|
60
|
+
imageWidth: number;
|
|
61
|
+
/** 图片贴地足迹高度(米)。 */
|
|
62
|
+
imageHeight: number;
|
|
63
|
+
/** 俯视顺时针旋转角度;0 表示图片顶部朝北。 */
|
|
64
|
+
rotation?: number;
|
|
65
|
+
/** 本体 ID;显式图片 URL 同时存在时优先使用 URL。 */
|
|
66
|
+
ontologyId?: EmergencyResourceOntologyId | (string & {});
|
|
67
|
+
/** 显式图片资源地址。 */
|
|
68
|
+
imageUrl?: string;
|
|
69
|
+
});
|
|
56
70
|
/**
|
|
57
71
|
* 折线描边样式:实线 / 虚线。cesium-to-three 贴地折线着色器只支持 solid / dash 两态。
|
|
58
72
|
*/
|
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.
|
|
25
|
-
"soonspacejs": "2.15.
|
|
24
|
+
"cesium-to-three": "^0.2.4",
|
|
25
|
+
"soonspacejs": "2.15.16"
|
|
26
26
|
}
|
|
27
27
|
}
|