deeptwins-engine-3d 0.1.32 → 0.1.33
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/assets/Build/DeepTwins/Image/f_point.png +0 -0
- package/dist/esm/constant.d.ts +21 -0
- package/dist/esm/constant.js +30 -0
- package/dist/esm/drawer/index.d.ts +56 -59
- package/dist/esm/drawer/index.js +380 -292
- package/dist/esm/drawer/shape/BaseShape.d.ts +33 -0
- package/dist/esm/drawer/shape/BaseShape.js +228 -0
- package/dist/esm/drawer/shape/Point.d.ts +44 -11
- package/dist/esm/drawer/shape/Point.js +299 -35
- package/dist/esm/drawer/shape/Polygon.d.ts +43 -9
- package/dist/esm/drawer/shape/Polygon.js +408 -56
- package/dist/esm/drawer/shape/Polyline.d.ts +41 -10
- package/dist/esm/drawer/shape/Polyline.js +373 -31
- package/dist/esm/drawer/utils.d.ts +1 -0
- package/dist/esm/drawer/utils.js +63 -0
- package/dist/esm/graphicLayer/BaseLayer.d.ts +1 -0
- package/dist/esm/graphicLayer/BaseLayer.js +8 -3
- package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/graphicLayer/BaseSource.js +13 -3
- package/dist/esm/graphicLayer/GraphicLayerCollection.d.ts +2 -0
- package/dist/esm/graphicLayer/GraphicLayerCollection.js +46 -4
- package/dist/esm/graphicLayer/HtmlEntity.js +1 -2
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +5 -4
- package/dist/esm/map/Map.d.ts +1 -0
- package/dist/esm/map/Map.js +10 -0
- package/dist/esm/measure/Area.d.ts +29 -0
- package/dist/esm/measure/{AreaMeasure.js → Area.js} +156 -65
- package/dist/esm/measure/BaseDraw.d.ts +13 -0
- package/dist/esm/measure/BaseDraw.js +70 -0
- package/dist/esm/measure/Distance.d.ts +23 -0
- package/dist/esm/measure/Distance.js +239 -0
- package/dist/esm/measure/index.d.ts +44 -5
- package/dist/esm/measure/index.js +278 -5
- package/dist/esm/measure/utils.d.ts +108 -14
- package/dist/esm/measure/utils.js +262 -20
- package/dist/esm/plot/create/CreateAssemble.d.ts +2 -0
- package/dist/esm/plot/create/CreateAssemble.js +63 -0
- package/dist/esm/plot/create/CreateAttackArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateAttackArrow.js +75 -0
- package/dist/esm/plot/create/CreateBillboard.d.ts +2 -0
- package/dist/esm/plot/create/CreateBillboard.js +47 -0
- package/dist/esm/plot/create/CreateBow.d.ts +2 -0
- package/dist/esm/plot/create/CreateBow.js +63 -0
- package/dist/esm/plot/create/CreateCircle.d.ts +2 -0
- package/dist/esm/plot/create/CreateCircle.js +68 -0
- package/dist/esm/plot/create/CreateCurve.d.ts +2 -0
- package/dist/esm/plot/create/CreateCurve.js +76 -0
- package/dist/esm/plot/create/CreateElliptic.d.ts +2 -0
- package/dist/esm/plot/create/CreateElliptic.js +69 -0
- package/dist/esm/plot/create/CreateFlag.d.ts +2 -0
- package/dist/esm/plot/create/CreateFlag.js +80 -0
- package/dist/esm/plot/create/CreateFormation.d.ts +2 -0
- package/dist/esm/plot/create/CreateFormation.js +65 -0
- package/dist/esm/plot/create/CreateFreeLine.d.ts +2 -0
- package/dist/esm/plot/create/CreateFreeLine.js +69 -0
- package/dist/esm/plot/create/CreateFreePolygon.d.ts +2 -0
- package/dist/esm/plot/create/CreateFreePolygon.js +65 -0
- package/dist/esm/plot/create/CreateLabel.d.ts +2 -0
- package/dist/esm/plot/create/CreateLabel.js +55 -0
- package/dist/esm/plot/create/CreateLineArrow.d.ts +2 -0
- package/dist/esm/plot/create/CreateLineArrow.js +79 -0
- package/dist/esm/plot/create/CreatePincerArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreatePincerArrow.js +73 -0
- package/dist/esm/plot/create/CreatePoint.d.ts +2 -0
- package/dist/esm/plot/create/CreatePoint.js +47 -0
- package/dist/esm/plot/create/CreatePolygon.d.ts +2 -0
- package/dist/esm/plot/create/CreatePolygon.js +80 -0
- package/dist/esm/plot/create/CreatePolyline.d.ts +2 -0
- package/dist/esm/plot/create/CreatePolyline.js +70 -0
- package/dist/esm/plot/create/CreateRectangle.d.ts +2 -0
- package/dist/esm/plot/create/CreateRectangle.js +60 -0
- package/dist/esm/plot/create/CreateRegularPolygon.d.ts +2 -0
- package/dist/esm/plot/create/CreateRegularPolygon.js +75 -0
- package/dist/esm/plot/create/CreateRightAngleArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateRightAngleArrow.js +73 -0
- package/dist/esm/plot/create/CreateRoundRectangle.d.ts +2 -0
- package/dist/esm/plot/create/CreateRoundRectangle.js +63 -0
- package/dist/esm/plot/create/CreateSector.d.ts +2 -0
- package/dist/esm/plot/create/CreateSector.js +65 -0
- package/dist/esm/plot/create/CreateStraightArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateStraightArrow.js +65 -0
- package/dist/esm/plot/create/CreateSwallowtailArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateSwallowtailArrow.js +67 -0
- package/dist/esm/plot/create/index.d.ts +25 -0
- package/dist/esm/plot/create/index.js +25 -0
- package/dist/esm/plot/edit/EditAssemble.d.ts +8 -0
- package/dist/esm/plot/edit/EditAssemble.js +120 -0
- package/dist/esm/plot/edit/EditAttackArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditAttackArrow.js +182 -0
- package/dist/esm/plot/edit/EditBillboard.d.ts +7 -0
- package/dist/esm/plot/edit/EditBillboard.js +70 -0
- package/dist/esm/plot/edit/EditBow.d.ts +8 -0
- package/dist/esm/plot/edit/EditBow.js +119 -0
- package/dist/esm/plot/edit/EditCircle.d.ts +8 -0
- package/dist/esm/plot/edit/EditCircle.js +133 -0
- package/dist/esm/plot/edit/EditCurve.d.ts +8 -0
- package/dist/esm/plot/edit/EditCurve.js +180 -0
- package/dist/esm/plot/edit/EditElliptic.d.ts +8 -0
- package/dist/esm/plot/edit/EditElliptic.js +144 -0
- package/dist/esm/plot/edit/EditFlag.d.ts +8 -0
- package/dist/esm/plot/edit/EditFlag.js +121 -0
- package/dist/esm/plot/edit/EditFormation.d.ts +8 -0
- package/dist/esm/plot/edit/EditFormation.js +120 -0
- package/dist/esm/plot/edit/EditLabel.d.ts +7 -0
- package/dist/esm/plot/edit/EditLabel.js +100 -0
- package/dist/esm/plot/edit/EditLineArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditLineArrow.js +180 -0
- package/dist/esm/plot/edit/EditPincerArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditPincerArrow.js +121 -0
- package/dist/esm/plot/edit/EditPoint.d.ts +7 -0
- package/dist/esm/plot/edit/EditPoint.js +70 -0
- package/dist/esm/plot/edit/EditPolygon.d.ts +8 -0
- package/dist/esm/plot/edit/EditPolygon.js +181 -0
- package/dist/esm/plot/edit/EditPolyline.d.ts +8 -0
- package/dist/esm/plot/edit/EditPolyline.js +179 -0
- package/dist/esm/plot/edit/EditRectangle.d.ts +8 -0
- package/dist/esm/plot/edit/EditRectangle.js +119 -0
- package/dist/esm/plot/edit/EditRegularPolygon.d.ts +8 -0
- package/dist/esm/plot/edit/EditRegularPolygon.js +170 -0
- package/dist/esm/plot/edit/EditRightAngleArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditRightAngleArrow.js +143 -0
- package/dist/esm/plot/edit/EditRoundRectangle.d.ts +8 -0
- package/dist/esm/plot/edit/EditRoundRectangle.js +119 -0
- package/dist/esm/plot/edit/EditSector.d.ts +8 -0
- package/dist/esm/plot/edit/EditSector.js +120 -0
- package/dist/esm/plot/edit/EditStraightArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditStraightArrow.js +120 -0
- package/dist/esm/plot/edit/EditSwallowtailArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditSwallowtailArrow.js +121 -0
- package/dist/esm/plot/edit/index.d.ts +23 -0
- package/dist/esm/plot/edit/index.js +23 -0
- package/dist/esm/plot/utils/Algorithm.d.ts +2 -0
- package/dist/esm/plot/utils/Algorithm.js +316 -0
- package/dist/esm/plot/utils/Coordinate.d.ts +98 -0
- package/dist/esm/plot/utils/Coordinate.js +184 -0
- package/dist/esm/plot/utils/DomUtil.d.ts +34 -0
- package/dist/esm/plot/utils/DomUtil.js +100 -0
- package/dist/esm/plot/utils/PlotCommon.d.ts +101 -0
- package/dist/esm/plot/utils/PlotCommon.js +1412 -0
- package/dist/esm/plot/utils/ReminderTip.d.ts +10 -0
- package/dist/esm/plot/utils/ReminderTip.js +67 -0
- package/dist/esm/plot/utils/Tooltip.d.ts +3 -0
- package/dist/esm/plot/utils/Tooltip.js +97 -0
- package/dist/esm/plot/utils/plotUtil.d.ts +5 -0
- package/dist/esm/plot/utils/plotUtil.js +268 -0
- package/dist/esm/tool/utils.d.ts +8 -7
- package/dist/esm/tool/utils.js +20 -16
- package/dist/esm/toolTip/index.d.ts +2 -1
- package/dist/esm/toolTip/index.js +12 -6
- package/dist/esm/typings.d.ts +1 -0
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +1 -1
- package/dist/esm/drawer/base.d.ts +0 -51
- package/dist/esm/drawer/base.js +0 -179
- package/dist/esm/drawer/painter.d.ts +0 -41
- package/dist/esm/drawer/painter.js +0 -115
- package/dist/esm/drawer/shape/Ellipse.d.ts +0 -10
- package/dist/esm/drawer/shape/Ellipse.js +0 -62
- package/dist/esm/drawer/shape/Rectangle.d.ts +0 -10
- package/dist/esm/drawer/shape/Rectangle.js +0 -85
- package/dist/esm/drawer/typings.d.ts +0 -106
- package/dist/esm/drawer/typings.js +0 -1
- package/dist/esm/measure/AreaMeasure.d.ts +0 -19
- package/dist/esm/measure/AreaSurfaceMeasure.d.ts +0 -30
- package/dist/esm/measure/AreaSurfaceMeasure.js +0 -151
- package/dist/esm/measure/DistanceMeasure.d.ts +0 -19
- package/dist/esm/measure/DistanceMeasure.js +0 -91
- package/dist/esm/measure/DistanceSurfaceMeasure.d.ts +0 -37
- package/dist/esm/measure/DistanceSurfaceMeasure.js +0 -122
- package/dist/esm/measure/Measure.d.ts +0 -111
- package/dist/esm/measure/Measure.js +0 -177
- package/dist/esm/tool/cesiumExtends/Subscriber/index.d.ts +0 -66
- package/dist/esm/tool/cesiumExtends/Subscriber/index.js +0 -246
- package/dist/esm/tool/kriging.d.ts +0 -10
- package/dist/esm/tool/kriging.js +0 -436
|
Binary file
|
package/dist/esm/constant.d.ts
CHANGED
|
@@ -69,6 +69,27 @@ export declare const HTML_CONTAINER_ID = "deepHtmlContainer";
|
|
|
69
69
|
export declare const HEATMAP_CONTAINER_ID = "deepHeatMapContainer";
|
|
70
70
|
export declare const VIDEO_CONTAINER_ID = "deepVideoContainer";
|
|
71
71
|
export declare const PROPERTY_TYPE_TO_CLASS: any;
|
|
72
|
+
export declare const DEFAULT_DRAWER_OPTIONS: () => {
|
|
73
|
+
pointStyle: {
|
|
74
|
+
color: string;
|
|
75
|
+
pixelSize: number;
|
|
76
|
+
outlineColor: string;
|
|
77
|
+
outlineWidth: number;
|
|
78
|
+
};
|
|
79
|
+
polylineStyle: {
|
|
80
|
+
width: number;
|
|
81
|
+
material: string;
|
|
82
|
+
};
|
|
83
|
+
polygonStyle: {
|
|
84
|
+
fill: boolean;
|
|
85
|
+
material: string;
|
|
86
|
+
};
|
|
87
|
+
clampToGround: boolean;
|
|
88
|
+
};
|
|
89
|
+
export declare const DEFAULT_MEASURE_STYLE: () => {
|
|
90
|
+
clampToGround: boolean;
|
|
91
|
+
splitNum: number;
|
|
92
|
+
};
|
|
72
93
|
export declare const DEFAULT_HEATMAP_STYLE: () => {
|
|
73
94
|
radius: number;
|
|
74
95
|
opacity: number;
|
package/dist/esm/constant.js
CHANGED
|
@@ -113,6 +113,35 @@ export var PROPERTY_TYPE_TO_CLASS = {
|
|
|
113
113
|
callbackProperty: Cesium.CallbackProperty
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
+
// 默认绘制工具样式
|
|
117
|
+
export var DEFAULT_DRAWER_OPTIONS = function DEFAULT_DRAWER_OPTIONS() {
|
|
118
|
+
return {
|
|
119
|
+
pointStyle: {
|
|
120
|
+
color: '#1890FF',
|
|
121
|
+
pixelSize: 10,
|
|
122
|
+
outlineColor: '#ffffff',
|
|
123
|
+
outlineWidth: 2
|
|
124
|
+
},
|
|
125
|
+
polylineStyle: {
|
|
126
|
+
width: 2,
|
|
127
|
+
material: '#1890FF'
|
|
128
|
+
},
|
|
129
|
+
polygonStyle: {
|
|
130
|
+
fill: true,
|
|
131
|
+
material: 'rgba(24,144,255,0.5)'
|
|
132
|
+
},
|
|
133
|
+
clampToGround: false
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// 默认测量样式
|
|
138
|
+
export var DEFAULT_MEASURE_STYLE = function DEFAULT_MEASURE_STYLE() {
|
|
139
|
+
return {
|
|
140
|
+
clampToGround: false,
|
|
141
|
+
splitNum: 20
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
|
|
116
145
|
// 默认热力样式
|
|
117
146
|
export var DEFAULT_HEATMAP_STYLE = function DEFAULT_HEATMAP_STYLE() {
|
|
118
147
|
return {
|
|
@@ -370,6 +399,7 @@ export var DEFAULT_POLYLINE_TRAIL_LINK_MATERIAL_STYLE = function DEFAULT_POLYLIN
|
|
|
370
399
|
image: utils.getDeepTwinsFile('Image/line.png')
|
|
371
400
|
};
|
|
372
401
|
};
|
|
402
|
+
|
|
373
403
|
// 动态墙材质默认的配置
|
|
374
404
|
export var DEFAULT_DYNAMIC_WALL_MATERIAL_STYLE = function DEFAULT_DYNAMIC_WALL_MATERIAL_STYLE() {
|
|
375
405
|
return {
|
|
@@ -1,62 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export interface DrawContext {
|
|
2
|
+
options: any;
|
|
3
|
+
getMap: any;
|
|
4
|
+
setDrawerLayer: any;
|
|
5
|
+
_changeStatus: any;
|
|
6
|
+
_updateTooltip: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const STATUS: {
|
|
9
|
+
readonly INIT: "INIT";
|
|
10
|
+
readonly START_DRAW: "START_DRAW";
|
|
11
|
+
readonly DRAWING: "DRAWING";
|
|
12
|
+
readonly END_DRAW: "END_DRAW";
|
|
13
|
+
readonly EDITING: "EDITING";
|
|
14
|
+
readonly END_EDIT: "END_EDIT";
|
|
15
|
+
};
|
|
16
|
+
export type Status = (typeof STATUS)[keyof typeof STATUS];
|
|
17
|
+
export declare const MULTI_POINT_SHAPE_TYPES: {
|
|
18
|
+
readonly POLYLINE: "polyline";
|
|
19
|
+
readonly POLYGON: "polygon";
|
|
20
|
+
};
|
|
21
|
+
export declare const MULTI_POINT_SHAPES: ("polygon" | "polyline")[];
|
|
22
|
+
declare class Drawer implements DrawContext {
|
|
23
|
+
private readonly _mapContext;
|
|
24
|
+
private readonly _drawContext;
|
|
25
|
+
options: any;
|
|
26
|
+
tooltip: any;
|
|
27
|
+
isDestroyed: boolean;
|
|
11
28
|
private _status;
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
private
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
END: any;
|
|
41
|
-
};
|
|
42
|
-
get isDestroyed(): boolean;
|
|
43
|
-
constructor(viewer: Viewer, options?: Partial<DrawOption>);
|
|
44
|
-
/**
|
|
45
|
-
* @param finalOptions
|
|
46
|
-
* @param dynamicOptions
|
|
47
|
-
*/
|
|
48
|
-
private _initPainter;
|
|
49
|
-
private _updateTips;
|
|
50
|
-
/**
|
|
51
|
-
* @desc 绘制函数,
|
|
52
|
-
* @param config 绘制配置,可以通过定义options直接改写结果而不再填第二个参数
|
|
53
|
-
* @param overrideFunc Entity 重写函数,用于重写绘制结果,如果 overrideFunc返回一个Entity,则将该Entity添加到Viewer中,否则结束函数无操作
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
start(config: StartOption, overrideFunc?: OverrideEntityFunc): void;
|
|
57
|
-
private _complete;
|
|
58
|
-
private _isSupport;
|
|
59
|
-
reset(): void;
|
|
60
|
-
pause(): void;
|
|
29
|
+
private _dragging;
|
|
30
|
+
private _eventLeftDown;
|
|
31
|
+
private _eventLeftUp;
|
|
32
|
+
private _eventClick;
|
|
33
|
+
private _eventMove;
|
|
34
|
+
private _eventDoubleClick;
|
|
35
|
+
private _eventRightClick;
|
|
36
|
+
private _instance;
|
|
37
|
+
private _drawLayers;
|
|
38
|
+
constructor(map: any, options?: any);
|
|
39
|
+
private _canOperate;
|
|
40
|
+
getMap(): any;
|
|
41
|
+
_isDragPoint(e: any): any;
|
|
42
|
+
private _createListeners;
|
|
43
|
+
private _destroyListeners;
|
|
44
|
+
_updateTooltip(): void;
|
|
45
|
+
_changeStatus(status: any): void;
|
|
46
|
+
dataTransformDraw(data: any): any[] | undefined;
|
|
47
|
+
startDraw(type: any, config?: any): any;
|
|
48
|
+
private _stopDraw;
|
|
49
|
+
startEdit(id: any): void;
|
|
50
|
+
endEdit(): void;
|
|
51
|
+
getDrawerLayer(id: any): any;
|
|
52
|
+
setDrawerLayer(id: any, value: any): void;
|
|
53
|
+
removeDrawerLayer(id: any): void;
|
|
54
|
+
getAllDrawerLayers(): unknown[] | undefined;
|
|
55
|
+
clearAllDrawerLayers(): void;
|
|
56
|
+
clear(): void;
|
|
61
57
|
destroy(): void;
|
|
62
58
|
}
|
|
59
|
+
export default Drawer;
|