deeptwins-engine-3d 0.1.30 → 0.1.31
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/graphicLayer/PolygonPrimitiveInstance.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/videoFusion/BaseVideo.d.ts +1 -1
- package/dist/esm/videoFusion/BaseVideo.js +2 -1
- package/dist/esm/videoFusion/VideoProject.d.ts +1 -1
- package/dist/esm/videoFusion/VideoProject.js +2 -3
- package/dist/esm/videoFusion/VideoTexture.d.ts +1 -1
- package/dist/esm/videoFusion/VideoTexture.js +2 -3
- package/dist/esm/visualization/BaseHeatmap.d.ts +1 -0
- package/dist/esm/visualization/BaseHeatmap.js +22 -18
- package/dist/esm/visualization/Heatmap2d.js +1 -0
- package/dist/esm/visualization/Heatmap3d.js +1 -0
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ var PolygonPrimitiveInstance = /*#__PURE__*/function (_BasePrimitiveInstanc) {
|
|
|
67
67
|
vertexFormat: currVertexFormat,
|
|
68
68
|
stRotation: stRotation
|
|
69
69
|
}, style));
|
|
70
|
-
if (materialAppearance) {
|
|
70
|
+
if (materialAppearance && !style.extrudedHeight) {
|
|
71
71
|
geometry = Cesium.PolygonGeometry.createGeometry(polygonGeometry);
|
|
72
72
|
geometry.attributes.st = new Cesium.GeometryAttribute({
|
|
73
73
|
componentDatatype: Cesium.ComponentDatatype.FLOAT,
|
package/dist/esm/index.js
CHANGED
|
@@ -51,7 +51,7 @@ loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
|
|
|
51
51
|
export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
|
|
52
52
|
_classCallCheck(this, DeepTwinsEngine3D);
|
|
53
53
|
});
|
|
54
|
-
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.
|
|
54
|
+
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.31");
|
|
55
55
|
_defineProperty(DeepTwinsEngine3D, "Map", Map);
|
|
56
56
|
_defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
|
|
57
57
|
_defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
|
|
@@ -14,7 +14,7 @@ import * as utils from "../tool/utils";
|
|
|
14
14
|
|
|
15
15
|
// 视频
|
|
16
16
|
var BaseVideo = /*#__PURE__*/function () {
|
|
17
|
-
function BaseVideo(options) {
|
|
17
|
+
function BaseVideo(map, options) {
|
|
18
18
|
_classCallCheck(this, BaseVideo);
|
|
19
19
|
_defineProperty(this, "_mapContext", void 0);
|
|
20
20
|
_defineProperty(this, "options", void 0);
|
|
@@ -28,6 +28,7 @@ var BaseVideo = /*#__PURE__*/function () {
|
|
|
28
28
|
_defineProperty(this, "onErrorFun", void 0);
|
|
29
29
|
_defineProperty(this, "_maskImage", null);
|
|
30
30
|
this.options = options;
|
|
31
|
+
this._mapContext = map._mapContext;
|
|
31
32
|
if (options.video) {
|
|
32
33
|
this.videoType = 'video';
|
|
33
34
|
}
|
|
@@ -3,7 +3,7 @@ export default class VideoProject extends BaseVideo {
|
|
|
3
3
|
type: 'fixed' | 'projection';
|
|
4
4
|
frustum: any;
|
|
5
5
|
frustumLineLayer: any;
|
|
6
|
-
constructor(options: any);
|
|
6
|
+
constructor(map: any, options: any);
|
|
7
7
|
addToMap(map: any): void;
|
|
8
8
|
show(isShow: boolean): void;
|
|
9
9
|
private _drawLine;
|
|
@@ -25,10 +25,10 @@ import BaseVideo from "./BaseVideo";
|
|
|
25
25
|
var VideoProject = /*#__PURE__*/function (_BaseVideo) {
|
|
26
26
|
_inherits(VideoProject, _BaseVideo);
|
|
27
27
|
var _super = _createSuper(VideoProject);
|
|
28
|
-
function VideoProject(options) {
|
|
28
|
+
function VideoProject(map, options) {
|
|
29
29
|
var _this;
|
|
30
30
|
_classCallCheck(this, VideoProject);
|
|
31
|
-
_this = _super.call(this, options);
|
|
31
|
+
_this = _super.call(this, map, options);
|
|
32
32
|
_defineProperty(_assertThisInitialized(_this), "type", 'fixed');
|
|
33
33
|
_defineProperty(_assertThisInitialized(_this), "frustum", void 0);
|
|
34
34
|
_defineProperty(_assertThisInitialized(_this), "frustumLineLayer", void 0);
|
|
@@ -41,7 +41,6 @@ var VideoProject = /*#__PURE__*/function (_BaseVideo) {
|
|
|
41
41
|
if (!this._canOperate()) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
this._mapContext = map._mapContext;
|
|
45
44
|
var videoOptions;
|
|
46
45
|
if (this.videoType === 'video') {
|
|
47
46
|
this.options.video.autoPlay && this.play();
|
|
@@ -26,9 +26,9 @@ import BaseVideo from "./BaseVideo";
|
|
|
26
26
|
var VideoTexture = /*#__PURE__*/function (_BaseVideo) {
|
|
27
27
|
_inherits(VideoTexture, _BaseVideo);
|
|
28
28
|
var _super = _createSuper(VideoTexture);
|
|
29
|
-
function VideoTexture(options) {
|
|
29
|
+
function VideoTexture(map, options) {
|
|
30
30
|
_classCallCheck(this, VideoTexture);
|
|
31
|
-
return _super.call(this, options);
|
|
31
|
+
return _super.call(this, map, options);
|
|
32
32
|
}
|
|
33
33
|
_createClass(VideoTexture, [{
|
|
34
34
|
key: "addToMap",
|
|
@@ -37,7 +37,6 @@ var VideoTexture = /*#__PURE__*/function (_BaseVideo) {
|
|
|
37
37
|
if (!this._canOperate()) {
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
this._mapContext = map._mapContext;
|
|
41
40
|
var videoOptions;
|
|
42
41
|
if (this.videoType === 'video') {
|
|
43
42
|
this.options.video.autoPlay && this.play();
|
|
@@ -19,7 +19,6 @@ import h337 from "../tool/heatmap.js";
|
|
|
19
19
|
import * as utils from "../tool/utils";
|
|
20
20
|
var BaseHeatmap = /*#__PURE__*/function () {
|
|
21
21
|
function BaseHeatmap() {
|
|
22
|
-
var _this$getMap;
|
|
23
22
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
24
23
|
_classCallCheck(this, BaseHeatmap);
|
|
25
24
|
_defineProperty(this, "_mapContext", void 0);
|
|
@@ -40,26 +39,31 @@ var BaseHeatmap = /*#__PURE__*/function () {
|
|
|
40
39
|
_options$style = options.style,
|
|
41
40
|
style = _options$style === void 0 ? {} : _options$style;
|
|
42
41
|
this.id = uuidv4();
|
|
43
|
-
this.style = merge(constant.DEFAULT_HEATMAP_STYLE(), cloneDeep(style));
|
|
44
|
-
var el = document.createElement('div');
|
|
45
|
-
el.id = this.id;
|
|
46
|
-
el.style.cssText = 'width: 100%; height: 100%; pointer-events: none; overflow: hidden; opacity: 0;';
|
|
47
|
-
var heatmapContainer = (_this$getMap = this.getMap()) === null || _this$getMap === void 0 || (_this$getMap = _this$getMap.container) === null || _this$getMap === void 0 ? void 0 : _this$getMap.querySelector('#' + constant.HEATMAP_CONTAINER_ID);
|
|
48
|
-
if (!heatmapContainer) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
heatmapContainer.appendChild(el);
|
|
52
|
-
this.heatmapInstance = h337.create(_objectSpread({
|
|
53
|
-
container: el
|
|
54
|
-
}, this.style));
|
|
55
|
-
this.canvasW = this.heatmapInstance._renderer.canvas.width;
|
|
56
|
-
this.canvasH = this.heatmapInstance._renderer.canvas.height;
|
|
57
42
|
this.positions = positions;
|
|
58
|
-
this.
|
|
43
|
+
this.style = merge(constant.DEFAULT_HEATMAP_STYLE(), cloneDeep(style));
|
|
59
44
|
}
|
|
60
|
-
|
|
61
|
-
// 是否能进行操作
|
|
62
45
|
_createClass(BaseHeatmap, [{
|
|
46
|
+
key: "_init",
|
|
47
|
+
value: function _init() {
|
|
48
|
+
var _this$getMap;
|
|
49
|
+
var el = document.createElement('div');
|
|
50
|
+
el.id = this.id;
|
|
51
|
+
el.style.cssText = 'width: 100%; height: 100%; pointer-events: none; overflow: hidden; opacity: 0;';
|
|
52
|
+
var heatmapContainer = (_this$getMap = this.getMap()) === null || _this$getMap === void 0 || (_this$getMap = _this$getMap.container) === null || _this$getMap === void 0 ? void 0 : _this$getMap.querySelector('#' + constant.HEATMAP_CONTAINER_ID);
|
|
53
|
+
if (!heatmapContainer) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
heatmapContainer.appendChild(el);
|
|
57
|
+
this.heatmapInstance = h337.create(_objectSpread({
|
|
58
|
+
container: el
|
|
59
|
+
}, this.style));
|
|
60
|
+
this.canvasW = this.heatmapInstance._renderer.canvas.width;
|
|
61
|
+
this.canvasH = this.heatmapInstance._renderer.canvas.height;
|
|
62
|
+
this._translatePositions();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 是否能进行操作
|
|
66
|
+
}, {
|
|
63
67
|
key: "_canOperate",
|
|
64
68
|
value: function _canOperate() {
|
|
65
69
|
if (this.isDestroyed) {
|