deeptwins-engine-3d 0.1.46 → 0.1.48
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/analyze/ViewshedAnalysis.js +3 -2
- package/dist/esm/constant.d.ts +26 -0
- package/dist/esm/constant.js +53 -0
- package/dist/esm/graphicLayer/BaseLayer.js +3 -0
- package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/graphicLayer/PolygonPrimitive.js +6 -4
- package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.d.ts +5 -0
- package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +75 -0
- package/dist/esm/graphicLayer/PolygonPrimitiveInstance.d.ts +1 -1
- package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +8 -23
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -1
- package/dist/esm/lowAltitude/FlightPlanning.d.ts +1 -1
- package/dist/esm/lowAltitude/FlightPlanning.js +6 -6
- package/dist/esm/lowAltitude/FlightRiskEvaluation.d.ts +10 -1
- package/dist/esm/lowAltitude/FlightRiskEvaluation.js +81 -90
- package/dist/esm/lowAltitude/GridDraw.js +1 -1
- package/dist/esm/lowAltitude/PoiLayer.js +1 -1
- package/dist/esm/map/Event.js +27 -1
- package/dist/esm/material/primitive/BaseMaterialAppearance.d.ts +1 -0
- package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -0
- package/dist/esm/material/primitive/ImageMaterialAppearance.d.ts +10 -0
- package/dist/esm/material/primitive/ImageMaterialAppearance.js +77 -0
- package/dist/esm/material/shader/ImageShader.glsl +22 -0
- package/dist/esm/tool/utils.d.ts +10 -1
- package/dist/esm/tool/utils.js +90 -44
- package/dist/esm/videoFusion/VideoProject.d.ts +1 -1
- package/dist/esm/videoFusion/VideoProject.js +4 -4
- package/dist/esm/videoFusion/VideoTexture.d.ts +1 -1
- package/dist/esm/videoFusion/VideoTexture.js +2 -2
- package/dist/esm/visualization/Frustum.d.ts +27 -2
- package/dist/esm/visualization/Frustum.js +158 -42
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +7 -4
- package/dist/esm/visualization/BaseFrustum.d.ts +0 -14
- package/dist/esm/visualization/BaseFrustum.js +0 -96
- package/dist/esm/visualization/FrustumWithCamera.d.ts +0 -5
- package/dist/esm/visualization/FrustumWithCamera.js +0 -133
|
@@ -15,7 +15,7 @@ import * as Cesium from 'deeptwins-cesium';
|
|
|
15
15
|
import { merge } from 'lodash';
|
|
16
16
|
import { DEFAULT_VIEWSHED_ANALYSIS_OPTIONS } from "../constant";
|
|
17
17
|
import * as utils from "../tool/utils";
|
|
18
|
-
import
|
|
18
|
+
import Frustum from "../visualization/Frustum";
|
|
19
19
|
|
|
20
20
|
// 可视域分析。
|
|
21
21
|
var ViewshedAnalysis = /*#__PURE__*/function () {
|
|
@@ -204,10 +204,11 @@ var ViewshedAnalysis = /*#__PURE__*/function () {
|
|
|
204
204
|
key: "_drawFrustumOutline",
|
|
205
205
|
value: function _drawFrustumOutline() {
|
|
206
206
|
if (!this._canOperate) return;
|
|
207
|
-
this.frustumCamera = new
|
|
207
|
+
this.frustumCamera = new Frustum(this.getMap(), {
|
|
208
208
|
position: this.options.position,
|
|
209
209
|
fill: false,
|
|
210
210
|
outlineColor: this.options.outlineColor,
|
|
211
|
+
isWithCamera: true,
|
|
211
212
|
camera: this.lightCamera
|
|
212
213
|
});
|
|
213
214
|
}
|
package/dist/esm/constant.d.ts
CHANGED
|
@@ -168,6 +168,31 @@ export declare const DEFAULT_FLIGHT_PLANNING_OPTIONS: () => {
|
|
|
168
168
|
TASKEND: string;
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
+
export declare const DEFAULT_FLIGHT_RISK_EVALUATION_OPTIONS: () => {
|
|
172
|
+
isDraw: boolean;
|
|
173
|
+
TYPE_LABEL_MAP: {
|
|
174
|
+
START: string;
|
|
175
|
+
END: string;
|
|
176
|
+
};
|
|
177
|
+
TYPE_COLOR_MAP: {
|
|
178
|
+
START: string;
|
|
179
|
+
END: string;
|
|
180
|
+
};
|
|
181
|
+
segmentGradeColor: {
|
|
182
|
+
num: number;
|
|
183
|
+
color: string;
|
|
184
|
+
}[];
|
|
185
|
+
};
|
|
186
|
+
export declare const DEFAULT_FRUSTUM_OPTIONS: () => {
|
|
187
|
+
show: boolean;
|
|
188
|
+
heading: number;
|
|
189
|
+
pitch: number;
|
|
190
|
+
roll: number;
|
|
191
|
+
color: string;
|
|
192
|
+
outline: boolean;
|
|
193
|
+
outlineColor: string;
|
|
194
|
+
isWithCamera: boolean;
|
|
195
|
+
};
|
|
171
196
|
export declare const DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS: () => {
|
|
172
197
|
startHeight: number;
|
|
173
198
|
targetHeight: number;
|
|
@@ -206,6 +231,7 @@ export declare const DEFAULT_MATERIAL_APPEARANCE: any;
|
|
|
206
231
|
export declare const DEFAULT_POLYLINE_TRAIL_LINK_MATERIAL_STYLE: any;
|
|
207
232
|
export declare const DEFAULT_DYNAMIC_WALL_MATERIAL_STYLE: any;
|
|
208
233
|
export declare const DEFAULT_CIRCLE_WAVE_MATERIAL_STYLE: any;
|
|
234
|
+
export declare const DEFAULT_IMAGE_MATERIAL_STYLE: any;
|
|
209
235
|
export declare const DEFAULT_GLOW_MATERIAL_STYLE: any;
|
|
210
236
|
export declare const GRAPHIC_LAYER_TYPE_TO_CLASS: any;
|
|
211
237
|
export declare const DEFAULT_YJ_LAYER: any;
|
package/dist/esm/constant.js
CHANGED
|
@@ -15,6 +15,7 @@ import ModelPrimitiveInstance from "./graphicLayer/ModelPrimitiveInstance";
|
|
|
15
15
|
import PointEntity from "./graphicLayer/PointEntity";
|
|
16
16
|
import PointPrimitive from "./graphicLayer/PointPrimitive";
|
|
17
17
|
import PolygonEntity from "./graphicLayer/PolygonEntity";
|
|
18
|
+
import PolygonPrimitiveImageMaterialInstance from "./graphicLayer/PolygonPrimitiveImageMaterialInstance";
|
|
18
19
|
import PolygonPrimitiveInstance from "./graphicLayer/PolygonPrimitiveInstance";
|
|
19
20
|
import PolylineEntity from "./graphicLayer/PolylineEntity";
|
|
20
21
|
import PolylineGroundPrimitiveInstance from "./graphicLayer/PolylineGroundPrimitiveInstance";
|
|
@@ -281,6 +282,49 @@ export var DEFAULT_FLIGHT_PLANNING_OPTIONS = function DEFAULT_FLIGHT_PLANNING_OP
|
|
|
281
282
|
};
|
|
282
283
|
};
|
|
283
284
|
|
|
285
|
+
// 默认航线风险评估配置选项
|
|
286
|
+
export var DEFAULT_FLIGHT_RISK_EVALUATION_OPTIONS = function DEFAULT_FLIGHT_RISK_EVALUATION_OPTIONS() {
|
|
287
|
+
return {
|
|
288
|
+
isDraw: true,
|
|
289
|
+
// 是否绘制
|
|
290
|
+
// 点位名称
|
|
291
|
+
TYPE_LABEL_MAP: {
|
|
292
|
+
START: '起点',
|
|
293
|
+
END: '终点'
|
|
294
|
+
},
|
|
295
|
+
// 点位颜色
|
|
296
|
+
TYPE_COLOR_MAP: {
|
|
297
|
+
START: '#00ff00',
|
|
298
|
+
END: '#ff0000'
|
|
299
|
+
},
|
|
300
|
+
// 航段颜色等级
|
|
301
|
+
segmentGradeColor: [{
|
|
302
|
+
num: -Number.NEGATIVE_INFINITY,
|
|
303
|
+
color: 'rgba(239,68,68,0.95)'
|
|
304
|
+
}, {
|
|
305
|
+
num: 0,
|
|
306
|
+
color: 'rgba(245,158,11,0.95)'
|
|
307
|
+
}, {
|
|
308
|
+
num: 0.5,
|
|
309
|
+
color: 'rgba(16,185,129,0.95)'
|
|
310
|
+
}]
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// 默认视锥体配置选项
|
|
315
|
+
export var DEFAULT_FRUSTUM_OPTIONS = function DEFAULT_FRUSTUM_OPTIONS() {
|
|
316
|
+
return {
|
|
317
|
+
show: true,
|
|
318
|
+
heading: 0,
|
|
319
|
+
pitch: 0,
|
|
320
|
+
roll: 0,
|
|
321
|
+
color: 'rgba(255,0,0,0.3)',
|
|
322
|
+
outline: true,
|
|
323
|
+
outlineColor: '#ffffff',
|
|
324
|
+
isWithCamera: false
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
|
|
284
328
|
// 默认淹没分析配置选项 SubmergenceAnalysis
|
|
285
329
|
export var DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS = function DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS() {
|
|
286
330
|
return {
|
|
@@ -557,6 +601,14 @@ export var DEFAULT_CIRCLE_WAVE_MATERIAL_STYLE = function DEFAULT_CIRCLE_WAVE_MAT
|
|
|
557
601
|
};
|
|
558
602
|
};
|
|
559
603
|
|
|
604
|
+
// 贴图材质默认的配置
|
|
605
|
+
export var DEFAULT_IMAGE_MATERIAL_STYLE = function DEFAULT_IMAGE_MATERIAL_STYLE() {
|
|
606
|
+
return {
|
|
607
|
+
color: Cesium.Color.WHITE,
|
|
608
|
+
mixRatio: 0.5
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
|
|
560
612
|
// 发光材质默认的配置
|
|
561
613
|
export var DEFAULT_GLOW_MATERIAL_STYLE = function DEFAULT_GLOW_MATERIAL_STYLE() {
|
|
562
614
|
return {
|
|
@@ -585,6 +637,7 @@ export var GRAPHIC_LAYER_TYPE_TO_CLASS = {
|
|
|
585
637
|
polylineP: PolylinePrimitiveInstance,
|
|
586
638
|
polylineGroundP: PolylineGroundPrimitiveInstance,
|
|
587
639
|
polygonP: PolygonPrimitiveInstance,
|
|
640
|
+
polygonImageP: PolygonPrimitiveImageMaterialInstance,
|
|
588
641
|
polygonGroundP: PolygonPrimitiveInstance,
|
|
589
642
|
boxP: BoxPrimitiveInstance,
|
|
590
643
|
modelP: ModelPrimitiveInstance,
|
|
@@ -112,6 +112,9 @@ var BaseLayer = /*#__PURE__*/function () {
|
|
|
112
112
|
polygonP: function polygonP() {
|
|
113
113
|
_this2.primitiveCollection = new PolygonPrimitive(_this2._mapContext);
|
|
114
114
|
},
|
|
115
|
+
polygonImageP: function polygonImageP() {
|
|
116
|
+
_this2.primitiveCollection = new PolygonPrimitive(_this2._mapContext);
|
|
117
|
+
},
|
|
115
118
|
polygonGroundP: function polygonGroundP() {
|
|
116
119
|
_this2.primitiveCollection = new PolygonGroundPrimitive(_this2._mapContext);
|
|
117
120
|
},
|
|
@@ -15,7 +15,7 @@ export default class BaseSource {
|
|
|
15
15
|
remove(): void;
|
|
16
16
|
setData(data: any): this | undefined;
|
|
17
17
|
_toDestroy(): void;
|
|
18
|
-
static analysisSourceType(data: any): "
|
|
18
|
+
static analysisSourceType(data: any): "other" | "wkt" | "sourceId" | "sourceInstance" | "geoJson";
|
|
19
19
|
static wktToGeoJon(wkt: string): any;
|
|
20
20
|
static geoJsonToGeoCartesian3Array(geoJson: any): any[];
|
|
21
21
|
static handleFeaturePoint(feature: any): any;
|
|
@@ -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 = ["
|
|
2
|
+
var _excluded = ["material"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -34,13 +34,15 @@ var PolygonPrimitive = /*#__PURE__*/function (_BasePrimitive) {
|
|
|
34
34
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
35
35
|
var primitiveInstance = arguments.length > 1 ? arguments[1] : undefined;
|
|
36
36
|
var _ref = options.style || {},
|
|
37
|
-
|
|
37
|
+
material = _ref.material,
|
|
38
38
|
otherStyle = _objectWithoutProperties(_ref, _excluded);
|
|
39
39
|
var style = merge(DEFAULT_POLYGON_PRIMITIVE_OPTIONS(), cloneDeep(otherStyle || {}));
|
|
40
40
|
var primitiveOptions = merge(DEFAULT_PRIMITIVE_OPTIONS(), cloneDeep(options.primitive || {}));
|
|
41
41
|
var appearance = {};
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
|
|
43
|
+
// 自定义材质
|
|
44
|
+
if (material !== null && material !== void 0 && material.customMaterial) {
|
|
45
|
+
appearance = material.appearance;
|
|
44
46
|
} else {
|
|
45
47
|
appearance = new Cesium.PerInstanceColorAppearance({
|
|
46
48
|
translucent: !!(style !== null && style !== void 0 && style.translucent)
|
|
@@ -0,0 +1,75 @@
|
|
|
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 = ["color", "stRotation"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
10
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
|
+
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); }
|
|
13
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
15
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
17
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
+
import * as Cesium from 'deeptwins-cesium';
|
|
21
|
+
import * as utils from "../tool/utils";
|
|
22
|
+
import PolygonPrimitiveInstance from "./PolygonPrimitiveInstance";
|
|
23
|
+
|
|
24
|
+
// polygon Primitive 图片材质贴图
|
|
25
|
+
var PolygonPrimitiveImageMaterialInstance = /*#__PURE__*/function (_PolygonPrimitiveInst) {
|
|
26
|
+
_inherits(PolygonPrimitiveImageMaterialInstance, _PolygonPrimitiveInst);
|
|
27
|
+
var _super = _createSuper(PolygonPrimitiveImageMaterialInstance);
|
|
28
|
+
function PolygonPrimitiveImageMaterialInstance(options) {
|
|
29
|
+
_classCallCheck(this, PolygonPrimitiveImageMaterialInstance);
|
|
30
|
+
return _super.call(this, options);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 初始化
|
|
34
|
+
_createClass(PolygonPrimitiveImageMaterialInstance, [{
|
|
35
|
+
key: "_init",
|
|
36
|
+
value: function _init(options) {
|
|
37
|
+
var _options$style = options.style,
|
|
38
|
+
color = _options$style.color,
|
|
39
|
+
stRotation = _options$style.stRotation,
|
|
40
|
+
style = _objectWithoutProperties(_options$style, _excluded),
|
|
41
|
+
positions = options.positions,
|
|
42
|
+
holes = options.holes,
|
|
43
|
+
primitiveInstance = options.primitiveInstance;
|
|
44
|
+
var geometry = null;
|
|
45
|
+
var polygonGeometry = new Cesium.PolygonGeometry(_objectSpread({
|
|
46
|
+
polygonHierarchy: new Cesium.PolygonHierarchy(positions, holes.map(function (t) {
|
|
47
|
+
return new Cesium.PolygonHierarchy(t);
|
|
48
|
+
})),
|
|
49
|
+
vertexFormat: Cesium.VertexFormat.POSITION_AND_ST,
|
|
50
|
+
stRotation: stRotation
|
|
51
|
+
}, style));
|
|
52
|
+
if (!style.extrudedHeight) {
|
|
53
|
+
geometry = Cesium.PolygonGeometry.createGeometry(polygonGeometry);
|
|
54
|
+
geometry.attributes.st = new Cesium.GeometryAttribute({
|
|
55
|
+
componentDatatype: Cesium.ComponentDatatype.FLOAT,
|
|
56
|
+
componentsPerAttribute: 2,
|
|
57
|
+
values: utils.computeSTAlongPlane(positions, stRotation)
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
utils.error('不支持extrudedHeight');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
var instance = new Cesium.GeometryInstance({
|
|
64
|
+
id: this.id,
|
|
65
|
+
geometry: geometry,
|
|
66
|
+
attributes: {
|
|
67
|
+
color: color
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
primitiveInstance.push(instance);
|
|
71
|
+
}
|
|
72
|
+
}]);
|
|
73
|
+
return PolygonPrimitiveImageMaterialInstance;
|
|
74
|
+
}(PolygonPrimitiveInstance);
|
|
75
|
+
export { PolygonPrimitiveImageMaterialInstance as default };
|
|
@@ -2,6 +2,6 @@ import BasePrimitiveInstance from './BasePrimitiveInstance';
|
|
|
2
2
|
export default class PolygonPrimitiveInstance extends BasePrimitiveInstance {
|
|
3
3
|
constructor(options: any);
|
|
4
4
|
static handleOptions(style: any): any;
|
|
5
|
-
|
|
5
|
+
_init(options: any): void;
|
|
6
6
|
updateData(): void;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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
2
|
var _excluded = ["style"],
|
|
3
|
-
_excluded2 = ["color", "stRotation"
|
|
3
|
+
_excluded2 = ["color", "stRotation"],
|
|
4
4
|
_excluded3 = ["color", "height", "stRotation"];
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
@@ -52,34 +52,19 @@ var PolygonPrimitiveInstance = /*#__PURE__*/function (_BasePrimitiveInstanc) {
|
|
|
52
52
|
var _options$style = options.style,
|
|
53
53
|
color = _options$style.color,
|
|
54
54
|
stRotation = _options$style.stRotation,
|
|
55
|
-
materialAppearance = _options$style.materialAppearance,
|
|
56
|
-
vertexFormat = _options$style.vertexFormat,
|
|
57
55
|
style = _objectWithoutProperties(_options$style, _excluded2),
|
|
58
56
|
positions = options.positions,
|
|
59
57
|
holes = options.holes,
|
|
60
58
|
primitiveInstance = options.primitiveInstance;
|
|
61
|
-
var currVertexFormat = vertexFormat || materialAppearance ? Cesium.VertexFormat.POSITION_AND_ST : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT;
|
|
62
|
-
var geometry = null;
|
|
63
|
-
var polygonGeometry = new Cesium.PolygonGeometry(_objectSpread({
|
|
64
|
-
polygonHierarchy: new Cesium.PolygonHierarchy(positions, holes.map(function (t) {
|
|
65
|
-
return new Cesium.PolygonHierarchy(t);
|
|
66
|
-
})),
|
|
67
|
-
vertexFormat: currVertexFormat,
|
|
68
|
-
stRotation: stRotation
|
|
69
|
-
}, style));
|
|
70
|
-
if (materialAppearance && !style.extrudedHeight) {
|
|
71
|
-
geometry = Cesium.PolygonGeometry.createGeometry(polygonGeometry);
|
|
72
|
-
geometry.attributes.st = new Cesium.GeometryAttribute({
|
|
73
|
-
componentDatatype: Cesium.ComponentDatatype.FLOAT,
|
|
74
|
-
componentsPerAttribute: 2,
|
|
75
|
-
values: utils.computeSTAlongPlane(positions, stRotation)
|
|
76
|
-
});
|
|
77
|
-
} else {
|
|
78
|
-
geometry = polygonGeometry;
|
|
79
|
-
}
|
|
80
59
|
var instance = new Cesium.GeometryInstance({
|
|
81
60
|
id: this.id,
|
|
82
|
-
geometry:
|
|
61
|
+
geometry: new Cesium.PolygonGeometry(_objectSpread({
|
|
62
|
+
polygonHierarchy: new Cesium.PolygonHierarchy(positions, holes.map(function (t) {
|
|
63
|
+
return new Cesium.PolygonHierarchy(t);
|
|
64
|
+
})),
|
|
65
|
+
vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,
|
|
66
|
+
stRotation: stRotation
|
|
67
|
+
}, style)),
|
|
83
68
|
attributes: {
|
|
84
69
|
color: color
|
|
85
70
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare class DeepTwinsEngine3D {
|
|
|
24
24
|
static CircleWaveMaterialProperty: any;
|
|
25
25
|
static PolylineTrailLinkMaterialProperty: any;
|
|
26
26
|
static ImageMaterialProperty: any;
|
|
27
|
+
static ImageMaterialAppearance: any;
|
|
27
28
|
static ImageGlowingMaterialAppearance: any;
|
|
28
29
|
static VolumeCloud: any;
|
|
29
30
|
static Heatmap2d: any;
|
|
@@ -31,7 +32,6 @@ export declare class DeepTwinsEngine3D {
|
|
|
31
32
|
static PointCluster: any;
|
|
32
33
|
static PositionProperty: any;
|
|
33
34
|
static Frustum: any;
|
|
34
|
-
static FrustumWithCamera: any;
|
|
35
35
|
static GridDraw: any;
|
|
36
36
|
static VideoTexture: any;
|
|
37
37
|
static VideoProject: any;
|
package/dist/esm/index.js
CHANGED
|
@@ -35,6 +35,7 @@ import ImageGlowingMaterialProperty from "./material/entity/ImageGlowingMaterial
|
|
|
35
35
|
import ImageMaterialProperty from "./material/entity/ImageMaterialProperty";
|
|
36
36
|
import PolylineTrailLinkMaterialProperty from "./material/entity/PolylineTrailLinkMaterialProperty";
|
|
37
37
|
import ImageGlowingMaterialAppearance from "./material/primitive/ImageGlowingMaterialAppearance";
|
|
38
|
+
import ImageMaterialAppearance from "./material/primitive/ImageMaterialAppearance";
|
|
38
39
|
import Measure from "./measure";
|
|
39
40
|
import PositionProperty from "./property/PositionProperty";
|
|
40
41
|
import ArcGisLayer from "./tileLayer/ArcGisLayer";
|
|
@@ -48,7 +49,6 @@ import { loadCss } from "./tool/utils";
|
|
|
48
49
|
import VideoProject from "./videoFusion/VideoProject";
|
|
49
50
|
import VideoTexture from "./videoFusion/VideoTexture";
|
|
50
51
|
import Frustum from "./visualization/Frustum";
|
|
51
|
-
import FrustumWithCamera from "./visualization/FrustumWithCamera";
|
|
52
52
|
import Heatmap2d from "./visualization/Heatmap2d";
|
|
53
53
|
import Heatmap3d from "./visualization/Heatmap3d";
|
|
54
54
|
import PointCluster from "./visualization/PointCluster";
|
|
@@ -58,11 +58,11 @@ DEEP_TWINS_BASE_URL && (window.CESIUM_BASE_URL = DEEP_TWINS_BASE_URL);
|
|
|
58
58
|
// 全局加载css
|
|
59
59
|
loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
|
|
60
60
|
// 打印版本信息
|
|
61
|
-
console.log('DeepTwinsEngine3D Version:', "0.1.
|
|
61
|
+
console.log('DeepTwinsEngine3D Version:', "0.1.48");
|
|
62
62
|
export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
|
|
63
63
|
_classCallCheck(this, DeepTwinsEngine3D);
|
|
64
64
|
});
|
|
65
|
-
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.
|
|
65
|
+
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.48");
|
|
66
66
|
_defineProperty(DeepTwinsEngine3D, "Map", Map);
|
|
67
67
|
_defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
|
|
68
68
|
_defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
|
|
@@ -86,6 +86,7 @@ _defineProperty(DeepTwinsEngine3D, "DynamicWallMaterialProperty", DynamicWallMat
|
|
|
86
86
|
_defineProperty(DeepTwinsEngine3D, "CircleWaveMaterialProperty", CircleWaveMaterialProperty);
|
|
87
87
|
_defineProperty(DeepTwinsEngine3D, "PolylineTrailLinkMaterialProperty", PolylineTrailLinkMaterialProperty);
|
|
88
88
|
_defineProperty(DeepTwinsEngine3D, "ImageMaterialProperty", ImageMaterialProperty);
|
|
89
|
+
_defineProperty(DeepTwinsEngine3D, "ImageMaterialAppearance", ImageMaterialAppearance);
|
|
89
90
|
_defineProperty(DeepTwinsEngine3D, "ImageGlowingMaterialAppearance", ImageGlowingMaterialAppearance);
|
|
90
91
|
_defineProperty(DeepTwinsEngine3D, "VolumeCloud", VolumeCloud);
|
|
91
92
|
_defineProperty(DeepTwinsEngine3D, "Heatmap2d", Heatmap2d);
|
|
@@ -93,7 +94,6 @@ _defineProperty(DeepTwinsEngine3D, "Heatmap3d", Heatmap3d);
|
|
|
93
94
|
_defineProperty(DeepTwinsEngine3D, "PointCluster", PointCluster);
|
|
94
95
|
_defineProperty(DeepTwinsEngine3D, "PositionProperty", PositionProperty);
|
|
95
96
|
_defineProperty(DeepTwinsEngine3D, "Frustum", Frustum);
|
|
96
|
-
_defineProperty(DeepTwinsEngine3D, "FrustumWithCamera", FrustumWithCamera);
|
|
97
97
|
_defineProperty(DeepTwinsEngine3D, "GridDraw", GridDraw);
|
|
98
98
|
_defineProperty(DeepTwinsEngine3D, "VideoTexture", VideoTexture);
|
|
99
99
|
_defineProperty(DeepTwinsEngine3D, "VideoProject", VideoProject);
|
|
@@ -10,7 +10,7 @@ declare class FlightPlanning {
|
|
|
10
10
|
constructor(map: any, options: any);
|
|
11
11
|
private _canOperate;
|
|
12
12
|
getMap(): any;
|
|
13
|
-
|
|
13
|
+
create(value: any): Promise<any>;
|
|
14
14
|
private _buildPayload;
|
|
15
15
|
private _normalizeRouteData;
|
|
16
16
|
private _createRoute;
|
|
@@ -42,7 +42,7 @@ var FlightPlanning = /*#__PURE__*/function () {
|
|
|
42
42
|
key: "_canOperate",
|
|
43
43
|
value: function _canOperate() {
|
|
44
44
|
if (this.isDestroyed) {
|
|
45
|
-
utils.error('
|
|
45
|
+
utils.error('FlightPlanning实例已销毁');
|
|
46
46
|
return false;
|
|
47
47
|
}
|
|
48
48
|
return true;
|
|
@@ -55,9 +55,9 @@ var FlightPlanning = /*#__PURE__*/function () {
|
|
|
55
55
|
|
|
56
56
|
// 生成计划
|
|
57
57
|
}, {
|
|
58
|
-
key: "
|
|
58
|
+
key: "create",
|
|
59
59
|
value: function () {
|
|
60
|
-
var
|
|
60
|
+
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
|
|
61
61
|
var payload, _yield$fetch$post, result, normalized, hasPoints;
|
|
62
62
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
63
63
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -102,10 +102,10 @@ var FlightPlanning = /*#__PURE__*/function () {
|
|
|
102
102
|
}
|
|
103
103
|
}, _callee, this);
|
|
104
104
|
}));
|
|
105
|
-
function
|
|
106
|
-
return
|
|
105
|
+
function create(_x) {
|
|
106
|
+
return _create.apply(this, arguments);
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return create;
|
|
109
109
|
}()
|
|
110
110
|
}, {
|
|
111
111
|
key: "_buildPayload",
|
|
@@ -10,10 +10,18 @@ declare class FlightRiskEvaluation {
|
|
|
10
10
|
riskPointsLayer: any;
|
|
11
11
|
riskPointsLabelLayer: any;
|
|
12
12
|
gridsLayer: any;
|
|
13
|
+
private _onClickSegmentEvent;
|
|
14
|
+
private _onClickRiskPointEvent;
|
|
15
|
+
private _onClickRiskPointLabelEvent;
|
|
13
16
|
constructor(map: any, options?: any);
|
|
14
17
|
private _canOperate;
|
|
15
18
|
getMap(): any;
|
|
16
|
-
start(geoJson
|
|
19
|
+
start(geoJson: any): Promise<{
|
|
20
|
+
pointEvaluationData: any;
|
|
21
|
+
segmentEvaluationData: any;
|
|
22
|
+
routeEvaluationData: any;
|
|
23
|
+
gridData: any;
|
|
24
|
+
} | undefined>;
|
|
17
25
|
private _createRoute;
|
|
18
26
|
private _clearRoute;
|
|
19
27
|
private _getSegmentColorFromEvaluation;
|
|
@@ -21,6 +29,7 @@ declare class FlightRiskEvaluation {
|
|
|
21
29
|
private _createRiskPoints;
|
|
22
30
|
private _clearRiskPoints;
|
|
23
31
|
private _createGrids;
|
|
32
|
+
clear(): void;
|
|
24
33
|
destroy(): void;
|
|
25
34
|
}
|
|
26
35
|
export default FlightRiskEvaluation;
|