deeptwins-engine-3d 0.1.24 → 0.1.25
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/esm/index.js
CHANGED
|
@@ -50,7 +50,7 @@ loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
|
|
|
50
50
|
export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
|
|
51
51
|
_classCallCheck(this, DeepTwinsEngine3D);
|
|
52
52
|
});
|
|
53
|
-
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.
|
|
53
|
+
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.25");
|
|
54
54
|
_defineProperty(DeepTwinsEngine3D, "Map", Map);
|
|
55
55
|
_defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
|
|
56
56
|
_defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
|
|
@@ -5,12 +5,14 @@ export default class Airspace {
|
|
|
5
5
|
primitives: any[];
|
|
6
6
|
isDestroyed: boolean;
|
|
7
7
|
private _events;
|
|
8
|
+
private _isShow;
|
|
8
9
|
constructor(map: any, geoJson: any, options?: any);
|
|
9
10
|
getMap(): any;
|
|
10
11
|
startDraw(geoJson: any): void;
|
|
11
12
|
private _canOperate;
|
|
12
13
|
sliceArrayAsync(data: any[], chunkSize?: number): void;
|
|
13
|
-
on(eventType: string, event: any): void;
|
|
14
14
|
create(source: any[]): void;
|
|
15
|
+
show(isShow: boolean): void;
|
|
16
|
+
on(eventType: string, event: any): void;
|
|
15
17
|
destroy(): void;
|
|
16
18
|
}
|
|
@@ -22,6 +22,7 @@ var Airspace = /*#__PURE__*/function () {
|
|
|
22
22
|
_defineProperty(this, "primitives", []);
|
|
23
23
|
_defineProperty(this, "isDestroyed", false);
|
|
24
24
|
_defineProperty(this, "_events", {});
|
|
25
|
+
_defineProperty(this, "_isShow", true);
|
|
25
26
|
this._mapContext = map._mapContext;
|
|
26
27
|
this.options = merge(DEFAULT_AIRSPACE_STYLE(), options);
|
|
27
28
|
this.startDraw(geoJson);
|
|
@@ -66,13 +67,6 @@ var Airspace = /*#__PURE__*/function () {
|
|
|
66
67
|
};
|
|
67
68
|
processChunk();
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
-
// 事件
|
|
71
|
-
}, {
|
|
72
|
-
key: "on",
|
|
73
|
-
value: function on(eventType, event) {
|
|
74
|
-
this._events[eventType] = event;
|
|
75
|
-
}
|
|
76
70
|
}, {
|
|
77
71
|
key: "create",
|
|
78
72
|
value: function create(source) {
|
|
@@ -86,6 +80,7 @@ var Airspace = /*#__PURE__*/function () {
|
|
|
86
80
|
new BoxPrimitiveInstance({
|
|
87
81
|
positions: source[i].positions,
|
|
88
82
|
style: {
|
|
83
|
+
show: this._isShow,
|
|
89
84
|
color: source[i].properties.color,
|
|
90
85
|
dimensions: this.options.dimensions,
|
|
91
86
|
scale: this.options.scale
|
|
@@ -98,6 +93,23 @@ var Airspace = /*#__PURE__*/function () {
|
|
|
98
93
|
}, primitiveInstance);
|
|
99
94
|
this.getMap().scene.primitives.add(boxPrimitive.primitive);
|
|
100
95
|
}
|
|
96
|
+
|
|
97
|
+
// 显示隐藏
|
|
98
|
+
}, {
|
|
99
|
+
key: "show",
|
|
100
|
+
value: function show(isShow) {
|
|
101
|
+
this._isShow = isShow;
|
|
102
|
+
this.primitives.forEach(function (t) {
|
|
103
|
+
t.show = isShow;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 事件
|
|
108
|
+
}, {
|
|
109
|
+
key: "on",
|
|
110
|
+
value: function on(eventType, event) {
|
|
111
|
+
this._events[eventType] = event;
|
|
112
|
+
}
|
|
101
113
|
}, {
|
|
102
114
|
key: "destroy",
|
|
103
115
|
value: function destroy() {
|