deeptwins-engine-3d 0.1.53 → 0.1.55

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.
@@ -64,7 +64,9 @@ export declare const DEFAULT_VIEW_CONFIG: () => {
64
64
  enableZoom: boolean;
65
65
  enableCollisionDetection: boolean;
66
66
  };
67
+ logo: boolean;
67
68
  };
69
+ export declare const LOGO_CONTAINER_ID = "logoContainer";
68
70
  export declare const HTML_CONTAINER_ID = "deepHtmlContainer";
69
71
  export declare const HEATMAP_CONTAINER_ID = "deepHeatMapContainer";
70
72
  export declare const VIDEO_CONTAINER_ID = "deepVideoContainer";
@@ -97,10 +97,12 @@ export var DEFAULT_VIEW_CONFIG = function DEFAULT_VIEW_CONFIG() {
97
97
  enableTilt: true,
98
98
  enableZoom: true,
99
99
  enableCollisionDetection: true
100
- }
100
+ },
101
+ logo: false
101
102
  };
102
103
  };
103
-
104
+ // 默认logo容器id
105
+ export var LOGO_CONTAINER_ID = 'logoContainer';
104
106
  // 默认html容器id
105
107
  export var HTML_CONTAINER_ID = 'deepHtmlContainer';
106
108
 
@@ -18,7 +18,7 @@ export declare const MULTI_POINT_SHAPE_TYPES: {
18
18
  readonly POLYLINE: "polyline";
19
19
  readonly POLYGON: "polygon";
20
20
  };
21
- export declare const MULTI_POINT_SHAPES: ("polygon" | "polyline")[];
21
+ export declare const MULTI_POINT_SHAPES: ("polyline" | "polygon")[];
22
22
  declare class Drawer implements DrawContext {
23
23
  private readonly _mapContext;
24
24
  private readonly _drawContext;
@@ -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): "other" | "wkt" | "sourceId" | "sourceInstance" | "geoJson" | "clampedPolygonGrid";
18
+ static analysisSourceType(data: any): "clampedPolygonGrid" | "wkt" | "sourceId" | "sourceInstance" | "geoJson" | "other";
19
19
  static wktToGeoJon(wkt: string): any;
20
20
  static geoJsonToGeoCartesian3Array(geoJson: any): any[];
21
21
  static handleFeaturePoint(feature: any): any;
package/dist/esm/index.js CHANGED
@@ -61,11 +61,11 @@ DEEP_TWINS_BASE_URL && (window.CESIUM_BASE_URL = DEEP_TWINS_BASE_URL);
61
61
  // 全局加载css
62
62
  loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
63
63
  // 打印版本信息
64
- console.log('DeepTwinsEngine3D Version:', "0.1.53");
64
+ console.log('DeepTwinsEngine3D Version:', "0.1.55");
65
65
  export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
66
66
  _classCallCheck(this, DeepTwinsEngine3D);
67
67
  });
68
- _defineProperty(DeepTwinsEngine3D, "Version", "0.1.53");
68
+ _defineProperty(DeepTwinsEngine3D, "Version", "0.1.55");
69
69
  _defineProperty(DeepTwinsEngine3D, "Map", Map);
70
70
  _defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
71
71
  _defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
@@ -15,6 +15,7 @@ export default class Map extends Cesium.Viewer implements MapContext {
15
15
  private _eventTrick;
16
16
  constructor(container: any, options: any);
17
17
  getMap(): this;
18
+ private _createLogoContainer;
18
19
  private _createHtmlContainer;
19
20
  private _createHeatMapContainer;
20
21
  private _createVideoContainer;
@@ -30,6 +30,7 @@ import BaseSource from "../graphicLayer/BaseSource";
30
30
  import GraphicLayerCollection from "../graphicLayer/GraphicLayerCollection";
31
31
  import * as common from "../tool/common";
32
32
  import * as utils from "../tool/utils";
33
+ import { getDeepTwinsFile } from "../tool/utils";
33
34
  import Event from "./Event";
34
35
  import GroundSkyBox from "./GroundSkyBox";
35
36
  var Map = /*#__PURE__*/function (_Cesium$Viewer) {
@@ -121,6 +122,10 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
121
122
  _this._createHtmlContainer();
122
123
  // 默认监听事件集合
123
124
  _this._onDefaultEvents();
125
+ // 创建logo容器
126
+ if (_this.configOptions.logo) {
127
+ _this._createLogoContainer();
128
+ }
124
129
  return _this;
125
130
  }
126
131
  _createClass(Map, [{
@@ -128,7 +133,26 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
128
133
  value: function getMap() {
129
134
  return this;
130
135
  }
131
-
136
+ // 创建一个logo容器
137
+ }, {
138
+ key: "_createLogoContainer",
139
+ value: function _createLogoContainer() {
140
+ var el = document.createElement('div');
141
+ el.id = constant.LOGO_CONTAINER_ID;
142
+ el.style.cssText = 'position: absolute; right: 10px; bottom: 10px; pointer-events: none; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.3); padding: 8px; display: flex; align-items: center; gap: 10px;';
143
+ var text = "DeepTwins Engine 3D";
144
+ var imgSrc = getDeepTwinsFile('Image/logo.png');
145
+ var textEl = document.createElement('div');
146
+ textEl.style.cssText = 'font-size: 12px; color: #fff; white-space: nowrap;';
147
+ textEl.textContent = text;
148
+ var imgEl = document.createElement('img');
149
+ imgEl.alt = 'logo';
150
+ imgEl.src = imgSrc;
151
+ imgEl.style.cssText = 'width: 30px; height: 30px; flex-shrink: 0;';
152
+ el.appendChild(imgEl);
153
+ el.appendChild(textEl);
154
+ this.container.appendChild(el);
155
+ }
132
156
  // 创建html的容器
133
157
  }, {
134
158
  key: "_createHtmlContainer",