deeptwins-engine-3d 0.0.43 → 0.0.44
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/cameraControl/ModelRoamHistory.d.ts +11 -3
- package/dist/cameraControl/ModelRoamHistory.js +101 -27
- package/dist/cameraControl/ModelRoamRealTime.d.ts +23 -47
- package/dist/cameraControl/ModelRoamRealTime.js +210 -374
- package/dist/constant.d.ts +3 -1
- package/dist/constant.js +4 -20
- package/dist/deepTwins/index.d.ts +0 -3
- package/dist/deepTwins/index.js +2 -18
- package/dist/drawer/base.js +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/graphicLayer/BaseLayer.d.ts +1 -1
- package/dist/graphicLayer/BaseLayer.js +1 -1
- package/dist/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/graphicLayer/BaseSource.js +4 -6
- package/dist/graphicLayer/GraphicLayerCollection.d.ts +3 -2
- package/dist/graphicLayer/GraphicLayerCollection.js +33 -40
- package/dist/graphicLayer/PolylinePrimitiveInstance.js +2 -6
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/map/Map.d.ts +1 -1
- package/dist/map/Map.js +12 -6
- package/package.json +1 -1
- package/dist/cameraControl/ModelRoamRunTime.d.ts +0 -32
- package/dist/cameraControl/ModelRoamRunTime.js +0 -244
package/dist/constant.d.ts
CHANGED
|
@@ -36,6 +36,9 @@ export declare const DEFAULT_VIEW_CONFIG: () => {
|
|
|
36
36
|
fog: boolean;
|
|
37
37
|
skyAtmosphere: boolean;
|
|
38
38
|
requestRenderMode: boolean;
|
|
39
|
+
postProcessStages: {
|
|
40
|
+
fxaa: boolean;
|
|
41
|
+
};
|
|
39
42
|
};
|
|
40
43
|
globe: {
|
|
41
44
|
show: boolean;
|
|
@@ -116,7 +119,6 @@ export declare const DEFAULT_DYNAMIC_WALL_MATERIAL_STYLE: any;
|
|
|
116
119
|
export declare const DEFAULT_CIRCLE_WAVE_MATERIAL_STYLE: any;
|
|
117
120
|
export declare const GRAPHIC_LAYER_TYPE_TO_CLASS: any;
|
|
118
121
|
export declare const DEFAULT_YJ_LAYER: any;
|
|
119
|
-
export declare const DEFAULT_YJ_PICK: any;
|
|
120
122
|
export declare const DEFAULT_SNOW: () => {
|
|
121
123
|
size: number;
|
|
122
124
|
speed: number;
|
package/dist/constant.js
CHANGED
|
@@ -66,7 +66,10 @@ export var DEFAULT_VIEW_CONFIG = function DEFAULT_VIEW_CONFIG() {
|
|
|
66
66
|
showSkyBox: true,
|
|
67
67
|
fog: true,
|
|
68
68
|
skyAtmosphere: true,
|
|
69
|
-
requestRenderMode: false
|
|
69
|
+
requestRenderMode: false,
|
|
70
|
+
postProcessStages: {
|
|
71
|
+
fxaa: false
|
|
72
|
+
}
|
|
70
73
|
},
|
|
71
74
|
globe: {
|
|
72
75
|
show: true,
|
|
@@ -409,7 +412,6 @@ export var DEFAULT_YJ_LAYER = function DEFAULT_YJ_LAYER() {
|
|
|
409
412
|
return {
|
|
410
413
|
url: 'https://deepinnet-public-qz.oss-cn-hangzhou.aliyuncs.com/quzhou/tileset02.json',
|
|
411
414
|
depthTest: true,
|
|
412
|
-
// needSegment: true,
|
|
413
415
|
filter: {
|
|
414
416
|
saturate: 1,
|
|
415
417
|
brightness: 1
|
|
@@ -417,24 +419,6 @@ export var DEFAULT_YJ_LAYER = function DEFAULT_YJ_LAYER() {
|
|
|
417
419
|
};
|
|
418
420
|
};
|
|
419
421
|
|
|
420
|
-
// 默认的yunjing图层配置
|
|
421
|
-
export var DEFAULT_YJ_PICK = function DEFAULT_YJ_PICK() {
|
|
422
|
-
return {
|
|
423
|
-
inPointStyle: {
|
|
424
|
-
borderWidth: 4
|
|
425
|
-
},
|
|
426
|
-
polygonStyle: {
|
|
427
|
-
color: 'rgba(255, 0, 0, 0.4)'
|
|
428
|
-
},
|
|
429
|
-
model: {
|
|
430
|
-
wasmPaths: 'https://amappc.oss-cn-zhangjiakou.aliyuncs.com/gis/static/yunjing/static/onnx/',
|
|
431
|
-
encoderUrl: 'https://amappc.oss-cn-zhangjiakou.aliyuncs.com/gis/static/yunjing/static/onnx/sam_vit_b_01ec64.encoder-fp16.onnx',
|
|
432
|
-
decoderUrl: 'https://amappc.oss-cn-zhangjiakou.aliyuncs.com/gis/static/yunjing/static/onnx/sam_vit_b_01ec64.decoder.onnx',
|
|
433
|
-
name: 'test'
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
};
|
|
437
|
-
|
|
438
422
|
// 默认雪天配置
|
|
439
423
|
export var DEFAULT_SNOW = function DEFAULT_SNOW() {
|
|
440
424
|
return {
|
package/dist/deepTwins/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
11
|
import { merge } from 'lodash';
|
|
12
|
-
import { DEFAULT_YJ_LAYER
|
|
12
|
+
import { DEFAULT_YJ_LAYER } from "../constant";
|
|
13
13
|
import * as utils from "../tool/utils";
|
|
14
14
|
var DeepTwins = /*#__PURE__*/function () {
|
|
15
15
|
function DeepTwins() {
|
|
@@ -39,8 +39,7 @@ var DeepTwins = /*#__PURE__*/function () {
|
|
|
39
39
|
terrain: this._getTerrain.bind(this),
|
|
40
40
|
moduleLayer: this._getModuleLayer.bind(this),
|
|
41
41
|
trafficHistoryLayer: this._YunJing.TrafficHistoryLayer,
|
|
42
|
-
trafficLayer: this._YunJing.TrafficLayer
|
|
43
|
-
singlePick: this._getSinglePick.bind(this)
|
|
42
|
+
trafficLayer: this._YunJing.TrafficLayer
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
45
|
case 5:
|
|
@@ -97,21 +96,6 @@ var DeepTwins = /*#__PURE__*/function () {
|
|
|
97
96
|
}
|
|
98
97
|
};
|
|
99
98
|
}
|
|
100
|
-
|
|
101
|
-
// 单体拾取
|
|
102
|
-
}, {
|
|
103
|
-
key: "_getSinglePick",
|
|
104
|
-
value: function _getSinglePick(options) {
|
|
105
|
-
var _this2 = this;
|
|
106
|
-
var mergeOptions = merge(DEFAULT_YJ_PICK(), options);
|
|
107
|
-
return {
|
|
108
|
-
addToMap: function addToMap(map, layer) {
|
|
109
|
-
mergeOptions.viewer = map;
|
|
110
|
-
mergeOptions.layer = layer;
|
|
111
|
-
return new _this2._YunJing.SinglePick(mergeOptions);
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
99
|
}]);
|
|
116
100
|
return DeepTwins;
|
|
117
101
|
}();
|
package/dist/drawer/base.js
CHANGED
|
@@ -105,7 +105,7 @@ var BasicGraphics = /*#__PURE__*/function () {
|
|
|
105
105
|
data = this.result.position;
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
|
-
this.result = this.painter._viewer.
|
|
108
|
+
this.result = this.painter._viewer.addCustomSourceToGraphicLayer(data, {
|
|
109
109
|
type: this.painter._type,
|
|
110
110
|
id: this.result.id,
|
|
111
111
|
entity: this.result
|
package/dist/drawer/index.js
CHANGED
|
@@ -244,7 +244,7 @@ var Drawer = /*#__PURE__*/function () {
|
|
|
244
244
|
// 如果是点,则此时执行点的结束绘制操作
|
|
245
245
|
if (_this._type === 'point') {
|
|
246
246
|
var _this$$Instance;
|
|
247
|
-
_this._typeClass.result = _this._viewer.
|
|
247
|
+
_this._typeClass.result = _this._viewer.addCustomSourceToGraphicLayer(_this._typeClass.result.position, {
|
|
248
248
|
type: _this._type,
|
|
249
249
|
id: _this._typeClass.result.id,
|
|
250
250
|
entity: _this._typeClass.result
|
|
@@ -9,7 +9,7 @@ export default class BaseLayer {
|
|
|
9
9
|
isEntity: boolean;
|
|
10
10
|
isPrimitive: boolean;
|
|
11
11
|
private _isCompleteInfo;
|
|
12
|
-
private _renderClass;
|
|
12
|
+
private readonly _renderClass;
|
|
13
13
|
private _graphicLayerCollection;
|
|
14
14
|
constructor({ id, source, options, entity, graphicLayerCollection }: any);
|
|
15
15
|
private _createPrimitiveCollection;
|
|
@@ -13,6 +13,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
13
13
|
import * as constant from "../constant";
|
|
14
14
|
import BaseSource from "../graphicLayer/BaseSource";
|
|
15
15
|
import * as utils from "../tool/utils";
|
|
16
|
+
import { cameraFlyToPositions } from "../tool/utils";
|
|
16
17
|
import BoxPrimitive from "./BoxPrimitive";
|
|
17
18
|
import EllipsePrimitive from "./EllipsePrimitive";
|
|
18
19
|
import EllipsoidPrimitive from "./EllipsoidPrimitive";
|
|
@@ -21,7 +22,6 @@ import PolygonPrimitive from "./PolygonPrimitive";
|
|
|
21
22
|
import PolylinePrimitive from "./PolylinePrimitive";
|
|
22
23
|
import PolylineVolumePrimitive from "./PolylineVolumePrimitive";
|
|
23
24
|
import WallPrimitive from "./WallPrimitive";
|
|
24
|
-
import { cameraFlyToPositions } from "../tool/utils";
|
|
25
25
|
var BaseLayer = /*#__PURE__*/function () {
|
|
26
26
|
function BaseLayer(_ref) {
|
|
27
27
|
var _this = this;
|
|
@@ -7,7 +7,7 @@ export default class BaseSource {
|
|
|
7
7
|
private _graphicLayerCollection;
|
|
8
8
|
static HANDLE_FEATURE_TYPE_FUN: any;
|
|
9
9
|
static HANDLE_FEATURE_CLAMP_TYPE_FUN: any;
|
|
10
|
-
constructor({ id, source,
|
|
10
|
+
constructor({ id, source, customSource, graphicLayerCollection }: any);
|
|
11
11
|
private _canOperate;
|
|
12
12
|
private _handleGeoJson;
|
|
13
13
|
translateSource(source: any): void;
|
|
@@ -30,7 +30,7 @@ var BaseSource = /*#__PURE__*/function () {
|
|
|
30
30
|
function BaseSource(_ref) {
|
|
31
31
|
var id = _ref.id,
|
|
32
32
|
source = _ref.source,
|
|
33
|
-
|
|
33
|
+
customSource = _ref.customSource,
|
|
34
34
|
graphicLayerCollection = _ref.graphicLayerCollection;
|
|
35
35
|
_classCallCheck(this, BaseSource);
|
|
36
36
|
_defineProperty(this, "id", void 0);
|
|
@@ -43,11 +43,9 @@ var BaseSource = /*#__PURE__*/function () {
|
|
|
43
43
|
this.id = id;
|
|
44
44
|
this._graphicLayerCollection = graphicLayerCollection;
|
|
45
45
|
// 直接添加实体数据
|
|
46
|
-
if (
|
|
46
|
+
if (customSource) {
|
|
47
47
|
this._isCompleteInfo = false;
|
|
48
|
-
this.source.push(
|
|
49
|
-
positions: entitySource
|
|
50
|
-
});
|
|
48
|
+
this.source.push(customSource);
|
|
51
49
|
} else {
|
|
52
50
|
this.translateSource(source);
|
|
53
51
|
}
|
|
@@ -236,7 +234,7 @@ var BaseSource = /*#__PURE__*/function () {
|
|
|
236
234
|
return features;
|
|
237
235
|
}
|
|
238
236
|
|
|
239
|
-
// 对geoJson
|
|
237
|
+
// 对geoJson数据进行贴地处理 返回带Cartesian3坐标数据的数组
|
|
240
238
|
}, {
|
|
241
239
|
key: "geoJsonToClampCartesian3Array",
|
|
242
240
|
value: function () {
|
|
@@ -8,9 +8,10 @@ export default class GraphicLayerCollection {
|
|
|
8
8
|
constructor(map: any);
|
|
9
9
|
private _canOperate;
|
|
10
10
|
addSource(id: string, geoJson: any): BaseSource;
|
|
11
|
-
|
|
11
|
+
addCustomSource(id: string, positions: any): BaseSource;
|
|
12
12
|
addLayer(data: any, options: any): BaseLayer;
|
|
13
|
-
|
|
13
|
+
addCustomSourceToLayer(positions: any, options: any): BaseLayer;
|
|
14
|
+
private _addLayerToMap;
|
|
14
15
|
private _removeGraphicMapLayer;
|
|
15
16
|
private _removeGraphicMapSource;
|
|
16
17
|
private _clearGraphicMapLayer;
|
|
@@ -11,7 +11,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
11
11
|
import { flattenDeep } from 'lodash';
|
|
12
12
|
import { v4 as uuidv4 } from 'uuid';
|
|
13
13
|
import * as utils from "../tool/utils";
|
|
14
|
-
import {
|
|
14
|
+
import { cameraFlyToPositions, isArray } from "../tool/utils";
|
|
15
15
|
import BaseLayer from "./BaseLayer";
|
|
16
16
|
import BaseSource from "./BaseSource";
|
|
17
17
|
var GraphicLayerCollection = /*#__PURE__*/function () {
|
|
@@ -54,10 +54,10 @@ var GraphicLayerCollection = /*#__PURE__*/function () {
|
|
|
54
54
|
return source;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//
|
|
57
|
+
// 直接添加自定义数据
|
|
58
58
|
}, {
|
|
59
|
-
key: "
|
|
60
|
-
value: function
|
|
59
|
+
key: "addCustomSource",
|
|
60
|
+
value: function addCustomSource(id, positions) {
|
|
61
61
|
this._canOperate();
|
|
62
62
|
var uuid = id;
|
|
63
63
|
if (this.graphicSources.get(uuid)) {
|
|
@@ -66,7 +66,7 @@ var GraphicLayerCollection = /*#__PURE__*/function () {
|
|
|
66
66
|
}
|
|
67
67
|
var source = new BaseSource({
|
|
68
68
|
id: uuid,
|
|
69
|
-
|
|
69
|
+
customSource: positions,
|
|
70
70
|
graphicLayerCollection: this
|
|
71
71
|
});
|
|
72
72
|
this.graphicSources.set(source.id, source);
|
|
@@ -77,7 +77,6 @@ var GraphicLayerCollection = /*#__PURE__*/function () {
|
|
|
77
77
|
}, {
|
|
78
78
|
key: "addLayer",
|
|
79
79
|
value: function addLayer(data, options) {
|
|
80
|
-
var _this = this;
|
|
81
80
|
this._canOperate();
|
|
82
81
|
var _ref = options || {},
|
|
83
82
|
id = _ref.id;
|
|
@@ -103,39 +102,17 @@ var GraphicLayerCollection = /*#__PURE__*/function () {
|
|
|
103
102
|
graphicLayerCollection: this
|
|
104
103
|
});
|
|
105
104
|
// 添加到地图上
|
|
106
|
-
|
|
107
|
-
layer.layers.forEach(function (t) {
|
|
108
|
-
if (t.entity) {
|
|
109
|
-
_this._map.entities.add(t.entity);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
} else {
|
|
113
|
-
if (['pointP', 'billboardP', 'labelP'].includes(options.type)) {
|
|
114
|
-
this._map.scene.primitives.add(layer.primitiveCollection);
|
|
115
|
-
} else {
|
|
116
|
-
this._map.scene.primitives.add(layer.primitiveCollection.primitive);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
this.graphicLayers.set(layer.id, layer);
|
|
105
|
+
this._addLayerToMap(layer, options);
|
|
120
106
|
return layer;
|
|
121
107
|
}
|
|
122
108
|
|
|
123
|
-
//
|
|
109
|
+
// 添加图层自定义数据
|
|
124
110
|
}, {
|
|
125
|
-
key: "
|
|
126
|
-
value: function
|
|
127
|
-
var _this2 = this;
|
|
111
|
+
key: "addCustomSourceToLayer",
|
|
112
|
+
value: function addCustomSourceToLayer(positions, options) {
|
|
128
113
|
this._canOperate();
|
|
129
114
|
var uuid = uuidv4();
|
|
130
|
-
var source =
|
|
131
|
-
var sourceType = BaseSource.analysisSourceType(positions);
|
|
132
|
-
if (sourceType === 'sourceInstance') {
|
|
133
|
-
source = positions;
|
|
134
|
-
} else if (sourceType === 'sourceId') {
|
|
135
|
-
source = this.graphicSources.get(positions);
|
|
136
|
-
} else {
|
|
137
|
-
source = this.addEntitySource(uuid, positions);
|
|
138
|
-
}
|
|
115
|
+
var source = this.addCustomSource(uuid, positions);
|
|
139
116
|
// 生成graphicLayer
|
|
140
117
|
var layer = new BaseLayer({
|
|
141
118
|
id: uuid,
|
|
@@ -144,13 +121,29 @@ var GraphicLayerCollection = /*#__PURE__*/function () {
|
|
|
144
121
|
graphicLayerCollection: this
|
|
145
122
|
});
|
|
146
123
|
// 添加到地图上
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
124
|
+
this._addLayerToMap(layer, options);
|
|
125
|
+
return layer;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// 将layer添加到地图上
|
|
129
|
+
}, {
|
|
130
|
+
key: "_addLayerToMap",
|
|
131
|
+
value: function _addLayerToMap(layer, options) {
|
|
132
|
+
var _this = this;
|
|
133
|
+
if (layer.isEntity) {
|
|
134
|
+
layer.layers.forEach(function (t) {
|
|
135
|
+
if (t.entity) {
|
|
136
|
+
_this._map.entities.add(t.entity);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
} else {
|
|
140
|
+
if (['pointP', 'billboardP', 'labelP'].includes(options.type)) {
|
|
141
|
+
this._map.scene.primitives.add(layer.primitiveCollection);
|
|
142
|
+
} else {
|
|
143
|
+
this._map.scene.primitives.add(layer.primitiveCollection.primitive);
|
|
150
144
|
}
|
|
151
|
-
}
|
|
145
|
+
}
|
|
152
146
|
this.graphicLayers.set(layer.id, layer);
|
|
153
|
-
return layer;
|
|
154
147
|
}
|
|
155
148
|
|
|
156
149
|
// 删除graphicLayers上的数据
|
|
@@ -359,11 +352,11 @@ var GraphicLayerCollection = /*#__PURE__*/function () {
|
|
|
359
352
|
}, {
|
|
360
353
|
key: "flyToLayers",
|
|
361
354
|
value: function flyToLayers(layers, options) {
|
|
362
|
-
var
|
|
355
|
+
var _this2 = this;
|
|
363
356
|
this._canOperate();
|
|
364
357
|
if (isArray(layers)) {
|
|
365
358
|
var graphicLayers = layers.map(function (layer) {
|
|
366
|
-
return
|
|
359
|
+
return _this2.getLayer(layer);
|
|
367
360
|
});
|
|
368
361
|
var positions = flattenDeep(graphicLayers.map(function (t) {
|
|
369
362
|
return t.layers.map(function (p) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["style"
|
|
2
|
+
var _excluded = ["style"],
|
|
3
3
|
_excluded2 = ["color"];
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -32,10 +32,7 @@ var PolylinePrimitiveInstance = /*#__PURE__*/function (_BasePrimitiveInstanc) {
|
|
|
32
32
|
var _this;
|
|
33
33
|
_classCallCheck(this, PolylinePrimitiveInstance);
|
|
34
34
|
_this = _super.call(this, options);
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
35
|
var style = options.style,
|
|
37
|
-
source = options.source,
|
|
38
|
-
entity = options.entity,
|
|
39
36
|
currOptions = _objectWithoutProperties(options, _excluded);
|
|
40
37
|
var mergeStyle = merge(DEFAULT_POLYLINE_PRIMITIVE_OPTIONS(), cloneDeep(style || {}));
|
|
41
38
|
var currStyle = PolylinePrimitiveInstance.handleOptions(mergeStyle);
|
|
@@ -54,12 +51,11 @@ var PolylinePrimitiveInstance = /*#__PURE__*/function (_BasePrimitiveInstanc) {
|
|
|
54
51
|
var _options$style = options.style,
|
|
55
52
|
color = _options$style.color,
|
|
56
53
|
width = _options$style.width,
|
|
57
|
-
positions = options.positions,
|
|
58
54
|
primitiveCollection = options.primitiveCollection;
|
|
59
55
|
this.instance = new Cesium.GeometryInstance({
|
|
60
56
|
id: this.id,
|
|
61
57
|
geometry: new Cesium.PolylineGeometry({
|
|
62
|
-
positions: positions,
|
|
58
|
+
positions: this.source.positions,
|
|
63
59
|
width: width,
|
|
64
60
|
vertexFormat: Cesium.PolylineMaterialAppearance.VERTEX_FORMAT
|
|
65
61
|
}),
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -10,7 +10,6 @@ import * as Cesium from 'deeptwins-cesium';
|
|
|
10
10
|
import "./assets/Build/Map3d/Widgets/widgets.css";
|
|
11
11
|
import ModelRoamHistory from "./cameraControl/ModelRoamHistory";
|
|
12
12
|
import ModelRoamRealTime from "./cameraControl/ModelRoamRealTime";
|
|
13
|
-
import ModelRoamRunTime from "./cameraControl/ModelRoamRunTime";
|
|
14
13
|
import Roam from "./cameraControl/Roam";
|
|
15
14
|
import Rotate from "./cameraControl/Rotate";
|
|
16
15
|
import RotateInPlace from "./cameraControl/RotateInPlace";
|
|
@@ -45,7 +44,7 @@ window.Cesium = Cesium;
|
|
|
45
44
|
var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
|
|
46
45
|
_classCallCheck(this, DeepTwinsEngine3D);
|
|
47
46
|
});
|
|
48
|
-
_defineProperty(DeepTwinsEngine3D, "Version", '0.0.
|
|
47
|
+
_defineProperty(DeepTwinsEngine3D, "Version", '0.0.44');
|
|
49
48
|
_defineProperty(DeepTwinsEngine3D, "Map", Map);
|
|
50
49
|
_defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
|
|
51
50
|
_defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
|
|
@@ -60,7 +59,6 @@ _defineProperty(DeepTwinsEngine3D, "Rotate", Rotate);
|
|
|
60
59
|
_defineProperty(DeepTwinsEngine3D, "Roam", Roam);
|
|
61
60
|
_defineProperty(DeepTwinsEngine3D, "RotateInPlace", RotateInPlace);
|
|
62
61
|
_defineProperty(DeepTwinsEngine3D, "ModelRoamHistory", ModelRoamHistory);
|
|
63
|
-
_defineProperty(DeepTwinsEngine3D, "ModelRoamRunTime", ModelRoamRunTime);
|
|
64
62
|
_defineProperty(DeepTwinsEngine3D, "ModelRoamRealTime", ModelRoamRealTime);
|
|
65
63
|
_defineProperty(DeepTwinsEngine3D, "TimerInterval", TimerInterval);
|
|
66
64
|
_defineProperty(DeepTwinsEngine3D, "ShapeSection", ShapeSection);
|
package/dist/map/Map.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export default class Map extends Cesium.Viewer {
|
|
|
40
40
|
addGraphicSource(id: string, data: any): any;
|
|
41
41
|
addGraphicEntityToSource(id: string, data: any): any;
|
|
42
42
|
addGraphicLayer(data: any, options: any): any;
|
|
43
|
-
|
|
43
|
+
addCustomSourceToGraphicLayer(data: any, options: any): any;
|
|
44
44
|
getGraphicSource(id: any): any;
|
|
45
45
|
getGraphicLayer(id: any): any;
|
|
46
46
|
showGraphicLayer(layer: any, isShow: boolean): void;
|
package/dist/map/Map.js
CHANGED
|
@@ -201,6 +201,7 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
|
|
|
201
201
|
fog = _options$scene2.fog,
|
|
202
202
|
skyAtmosphere = _options$scene2.skyAtmosphere,
|
|
203
203
|
requestRenderMode = _options$scene2.requestRenderMode,
|
|
204
|
+
postProcessStages = _options$scene2.postProcessStages,
|
|
204
205
|
_options$clock = options.clock,
|
|
205
206
|
_options$clock2 = _options$clock === void 0 ? {} : _options$clock,
|
|
206
207
|
currentTime = _options$clock2.currentTime,
|
|
@@ -231,6 +232,11 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
|
|
|
231
232
|
!isNil(fog) && (this.scene.fog.enabled = fog);
|
|
232
233
|
!isNil(skyAtmosphere) && (this.scene.skyAtmosphere.show = skyAtmosphere);
|
|
233
234
|
!isNil(requestRenderMode) && (this.scene.requestRenderMode = requestRenderMode);
|
|
235
|
+
if (!isNil(postProcessStages)) {
|
|
236
|
+
for (var key in postProcessStages) {
|
|
237
|
+
this.scene.postProcessStages[key].enabled = postProcessStages[key];
|
|
238
|
+
}
|
|
239
|
+
}
|
|
234
240
|
|
|
235
241
|
// clock
|
|
236
242
|
!isNil(currentTime) && (this.clock.currentTime = utils.dateToJulianDate(currentTime));
|
|
@@ -238,8 +244,8 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
|
|
|
238
244
|
!isNil(shouldAnimate) && (this.clock.shouldAnimate = shouldAnimate);
|
|
239
245
|
|
|
240
246
|
// cameraController
|
|
241
|
-
for (var
|
|
242
|
-
this.scene.screenSpaceCameraController[
|
|
247
|
+
for (var _key in cameraController) {
|
|
248
|
+
this.scene.screenSpaceCameraController[_key] = cameraController[_key];
|
|
243
249
|
}
|
|
244
250
|
|
|
245
251
|
// globe
|
|
@@ -458,14 +464,14 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
|
|
|
458
464
|
return this.graphicLayerCollection.addLayer(data, options);
|
|
459
465
|
}
|
|
460
466
|
|
|
461
|
-
//
|
|
467
|
+
// 直接自定义数据到图层
|
|
462
468
|
}, {
|
|
463
|
-
key: "
|
|
464
|
-
value: function
|
|
469
|
+
key: "addCustomSourceToGraphicLayer",
|
|
470
|
+
value: function addCustomSourceToGraphicLayer(data, options) {
|
|
465
471
|
if (!this.graphicLayerCollection) {
|
|
466
472
|
this.graphicLayerCollection = new GraphicLayerCollection(this);
|
|
467
473
|
}
|
|
468
|
-
return this.graphicLayerCollection.
|
|
474
|
+
return this.graphicLayerCollection.addCustomSourceToLayer(data, options);
|
|
469
475
|
}
|
|
470
476
|
|
|
471
477
|
// 获取矢量数据
|
package/package.json
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export default class ModelRoamRunTime {
|
|
2
|
-
polylineLayer: any;
|
|
3
|
-
polylineEntity: any;
|
|
4
|
-
polylineOptions: any;
|
|
5
|
-
modelLayer: any;
|
|
6
|
-
modelEntity: any;
|
|
7
|
-
modelOptions: any;
|
|
8
|
-
startPosition: any;
|
|
9
|
-
positionProperty: any;
|
|
10
|
-
isFlyTo: any;
|
|
11
|
-
clampToGround: boolean;
|
|
12
|
-
timeDiff: number;
|
|
13
|
-
status: string;
|
|
14
|
-
private _map;
|
|
15
|
-
private readonly _eventRunning;
|
|
16
|
-
private _startTime;
|
|
17
|
-
private _positions;
|
|
18
|
-
private _positionsCartesian3;
|
|
19
|
-
private _path;
|
|
20
|
-
private _listenScene;
|
|
21
|
-
private _listenRunning;
|
|
22
|
-
constructor(map: any, options?: any);
|
|
23
|
-
private _init;
|
|
24
|
-
updatePosition(position: any): void;
|
|
25
|
-
setFollowFirst(distance?: number): void;
|
|
26
|
-
setFollowThird(): void;
|
|
27
|
-
cancelFollow(): void;
|
|
28
|
-
on(type: any, event: any): any;
|
|
29
|
-
updatePolyline(style: any): void;
|
|
30
|
-
updateModel(style: any): void;
|
|
31
|
-
destroy(): void;
|
|
32
|
-
}
|