deeptwins-engine-3d 0.0.52 → 0.1.2

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.
Files changed (208) hide show
  1. package/LICENSE +6 -21
  2. package/README.md +0 -35
  3. package/dist/{cameraControl → esm/cameraControl}/ModelRoamRealTime.d.ts +26 -9
  4. package/dist/{cameraControl → esm/cameraControl}/ModelRoamRealTime.js +197 -102
  5. package/dist/{constant.js → esm/constant.js} +2 -1
  6. package/dist/{graphicLayer → esm/graphicLayer}/BaseSource.d.ts +1 -1
  7. package/dist/{index.d.ts → esm/index.d.ts} +1 -2
  8. package/dist/{index.js → esm/index.js} +6 -3
  9. package/dist/{map → esm/map}/Event.js +1 -1
  10. package/dist/{map → esm/map}/Map.d.ts +1 -0
  11. package/dist/{map → esm/map}/Map.js +10 -4
  12. package/dist/{material → esm/material}/CircleWaveMaterialProperty.js +1 -1
  13. package/dist/{material → esm/material}/DynamicWallMaterialProperty.js +1 -1
  14. package/dist/{material → esm/material}/PolylineTrailLinkMaterialProperty.d.ts +6 -2
  15. package/dist/{material → esm/material}/PolylineTrailLinkMaterialProperty.js +46 -9
  16. package/dist/{material → esm/material}/shader/PolylineTrailLinkShader.glsl +1 -1
  17. package/dist/{tool → esm/tool}/utils.d.ts +16 -0
  18. package/dist/{tool → esm/tool}/utils.js +92 -3
  19. package/dist/esm/typings.d.ts +14 -0
  20. package/dist/umd/deeptwins-engine-3d.min.css +1 -0
  21. package/dist/umd/deeptwins-engine-3d.min.js +1 -0
  22. package/package.json +4 -4
  23. package/dist/typings.d.ts +0 -4
  24. /package/dist/{cameraControl → esm/cameraControl}/ModelRoamHistory.d.ts +0 -0
  25. /package/dist/{cameraControl → esm/cameraControl}/ModelRoamHistory.js +0 -0
  26. /package/dist/{cameraControl → esm/cameraControl}/ModelRoamUpDate.d.ts +0 -0
  27. /package/dist/{cameraControl → esm/cameraControl}/ModelRoamUpDate.js +0 -0
  28. /package/dist/{cameraControl → esm/cameraControl}/Roam.d.ts +0 -0
  29. /package/dist/{cameraControl → esm/cameraControl}/Roam.js +0 -0
  30. /package/dist/{cameraControl → esm/cameraControl}/Rotate.d.ts +0 -0
  31. /package/dist/{cameraControl → esm/cameraControl}/Rotate.js +0 -0
  32. /package/dist/{cameraControl → esm/cameraControl}/RotateInPlace.d.ts +0 -0
  33. /package/dist/{cameraControl → esm/cameraControl}/RotateInPlace.js +0 -0
  34. /package/dist/{constant.d.ts → esm/constant.d.ts} +0 -0
  35. /package/dist/{deepTwins → esm/deepTwins}/index.d.ts +0 -0
  36. /package/dist/{deepTwins → esm/deepTwins}/index.js +0 -0
  37. /package/dist/{drawer → esm/drawer}/base.d.ts +0 -0
  38. /package/dist/{drawer → esm/drawer}/base.js +0 -0
  39. /package/dist/{drawer → esm/drawer}/index.d.ts +0 -0
  40. /package/dist/{drawer → esm/drawer}/index.js +0 -0
  41. /package/dist/{drawer → esm/drawer}/painter.d.ts +0 -0
  42. /package/dist/{drawer → esm/drawer}/painter.js +0 -0
  43. /package/dist/{drawer → esm/drawer}/shape/Ellipse.d.ts +0 -0
  44. /package/dist/{drawer → esm/drawer}/shape/Ellipse.js +0 -0
  45. /package/dist/{drawer → esm/drawer}/shape/Point.d.ts +0 -0
  46. /package/dist/{drawer → esm/drawer}/shape/Point.js +0 -0
  47. /package/dist/{drawer → esm/drawer}/shape/Polygon.d.ts +0 -0
  48. /package/dist/{drawer → esm/drawer}/shape/Polygon.js +0 -0
  49. /package/dist/{drawer → esm/drawer}/shape/Polyline.d.ts +0 -0
  50. /package/dist/{drawer → esm/drawer}/shape/Polyline.js +0 -0
  51. /package/dist/{drawer → esm/drawer}/shape/Rectangle.d.ts +0 -0
  52. /package/dist/{drawer → esm/drawer}/shape/Rectangle.js +0 -0
  53. /package/dist/{drawer → esm/drawer}/typings.d.ts +0 -0
  54. /package/dist/{drawer → esm/drawer}/typings.js +0 -0
  55. /package/dist/{global.css → esm/global.css} +0 -0
  56. /package/dist/{graphicLayer → esm/graphicLayer}/BaseEntity.d.ts +0 -0
  57. /package/dist/{graphicLayer → esm/graphicLayer}/BaseEntity.js +0 -0
  58. /package/dist/{graphicLayer → esm/graphicLayer}/BaseLayer.d.ts +0 -0
  59. /package/dist/{graphicLayer → esm/graphicLayer}/BaseLayer.js +0 -0
  60. /package/dist/{graphicLayer → esm/graphicLayer}/BasePointPrimitive.d.ts +0 -0
  61. /package/dist/{graphicLayer → esm/graphicLayer}/BasePointPrimitive.js +0 -0
  62. /package/dist/{graphicLayer → esm/graphicLayer}/BasePrimitive.d.ts +0 -0
  63. /package/dist/{graphicLayer → esm/graphicLayer}/BasePrimitive.js +0 -0
  64. /package/dist/{graphicLayer → esm/graphicLayer}/BasePrimitiveInstance.d.ts +0 -0
  65. /package/dist/{graphicLayer → esm/graphicLayer}/BasePrimitiveInstance.js +0 -0
  66. /package/dist/{graphicLayer → esm/graphicLayer}/BaseSource.js +0 -0
  67. /package/dist/{graphicLayer → esm/graphicLayer}/BillboardEntity.d.ts +0 -0
  68. /package/dist/{graphicLayer → esm/graphicLayer}/BillboardEntity.js +0 -0
  69. /package/dist/{graphicLayer → esm/graphicLayer}/BillboardPrimitive.d.ts +0 -0
  70. /package/dist/{graphicLayer → esm/graphicLayer}/BillboardPrimitive.js +0 -0
  71. /package/dist/{graphicLayer → esm/graphicLayer}/BoxEntity.d.ts +0 -0
  72. /package/dist/{graphicLayer → esm/graphicLayer}/BoxEntity.js +0 -0
  73. /package/dist/{graphicLayer → esm/graphicLayer}/BoxPrimitive.d.ts +0 -0
  74. /package/dist/{graphicLayer → esm/graphicLayer}/BoxPrimitive.js +0 -0
  75. /package/dist/{graphicLayer → esm/graphicLayer}/BoxPrimitiveInstance.d.ts +0 -0
  76. /package/dist/{graphicLayer → esm/graphicLayer}/BoxPrimitiveInstance.js +0 -0
  77. /package/dist/{graphicLayer → esm/graphicLayer}/EllipseEntity.d.ts +0 -0
  78. /package/dist/{graphicLayer → esm/graphicLayer}/EllipseEntity.js +0 -0
  79. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsePrimitive.d.ts +0 -0
  80. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsePrimitive.js +0 -0
  81. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsePrimitiveInstance.d.ts +0 -0
  82. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsePrimitiveInstance.js +0 -0
  83. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsoidEntity.d.ts +0 -0
  84. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsoidEntity.js +0 -0
  85. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsoidPrimitive.d.ts +0 -0
  86. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsoidPrimitive.js +0 -0
  87. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsoidPrimitiveInstance.d.ts +0 -0
  88. /package/dist/{graphicLayer → esm/graphicLayer}/EllipsoidPrimitiveInstance.js +0 -0
  89. /package/dist/{graphicLayer → esm/graphicLayer}/GraphicLayerCollection.d.ts +0 -0
  90. /package/dist/{graphicLayer → esm/graphicLayer}/GraphicLayerCollection.js +0 -0
  91. /package/dist/{graphicLayer → esm/graphicLayer}/HtmlEntity.d.ts +0 -0
  92. /package/dist/{graphicLayer → esm/graphicLayer}/HtmlEntity.js +0 -0
  93. /package/dist/{graphicLayer → esm/graphicLayer}/LabelEntity.d.ts +0 -0
  94. /package/dist/{graphicLayer → esm/graphicLayer}/LabelEntity.js +0 -0
  95. /package/dist/{graphicLayer → esm/graphicLayer}/LabelPrimitive.d.ts +0 -0
  96. /package/dist/{graphicLayer → esm/graphicLayer}/LabelPrimitive.js +0 -0
  97. /package/dist/{graphicLayer → esm/graphicLayer}/ModelEntity.d.ts +0 -0
  98. /package/dist/{graphicLayer → esm/graphicLayer}/ModelEntity.js +0 -0
  99. /package/dist/{graphicLayer → esm/graphicLayer}/ModelPrimitive.d.ts +0 -0
  100. /package/dist/{graphicLayer → esm/graphicLayer}/ModelPrimitive.js +0 -0
  101. /package/dist/{graphicLayer → esm/graphicLayer}/ModelPrimitiveInstance.d.ts +0 -0
  102. /package/dist/{graphicLayer → esm/graphicLayer}/ModelPrimitiveInstance.js +0 -0
  103. /package/dist/{graphicLayer → esm/graphicLayer}/PointEntity.d.ts +0 -0
  104. /package/dist/{graphicLayer → esm/graphicLayer}/PointEntity.js +0 -0
  105. /package/dist/{graphicLayer → esm/graphicLayer}/PointPrimitive.d.ts +0 -0
  106. /package/dist/{graphicLayer → esm/graphicLayer}/PointPrimitive.js +0 -0
  107. /package/dist/{graphicLayer → esm/graphicLayer}/PolygonEntity.d.ts +0 -0
  108. /package/dist/{graphicLayer → esm/graphicLayer}/PolygonEntity.js +0 -0
  109. /package/dist/{graphicLayer → esm/graphicLayer}/PolygonPrimitive.d.ts +0 -0
  110. /package/dist/{graphicLayer → esm/graphicLayer}/PolygonPrimitive.js +0 -0
  111. /package/dist/{graphicLayer → esm/graphicLayer}/PolygonPrimitiveInstance.d.ts +0 -0
  112. /package/dist/{graphicLayer → esm/graphicLayer}/PolygonPrimitiveInstance.js +0 -0
  113. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineEntity.d.ts +0 -0
  114. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineEntity.js +0 -0
  115. /package/dist/{graphicLayer → esm/graphicLayer}/PolylinePrimitive.d.ts +0 -0
  116. /package/dist/{graphicLayer → esm/graphicLayer}/PolylinePrimitive.js +0 -0
  117. /package/dist/{graphicLayer → esm/graphicLayer}/PolylinePrimitiveInstance.d.ts +0 -0
  118. /package/dist/{graphicLayer → esm/graphicLayer}/PolylinePrimitiveInstance.js +0 -0
  119. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineVolumeEntity.d.ts +0 -0
  120. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineVolumeEntity.js +0 -0
  121. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineVolumePrimitive.d.ts +0 -0
  122. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineVolumePrimitive.js +0 -0
  123. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineVolumePrimitiveInstance.d.ts +0 -0
  124. /package/dist/{graphicLayer → esm/graphicLayer}/PolylineVolumePrimitiveInstance.js +0 -0
  125. /package/dist/{graphicLayer → esm/graphicLayer}/WallEntity.d.ts +0 -0
  126. /package/dist/{graphicLayer → esm/graphicLayer}/WallEntity.js +0 -0
  127. /package/dist/{graphicLayer → esm/graphicLayer}/WallPrimitive.d.ts +0 -0
  128. /package/dist/{graphicLayer → esm/graphicLayer}/WallPrimitive.js +0 -0
  129. /package/dist/{graphicLayer → esm/graphicLayer}/WallPrimitiveInstance.d.ts +0 -0
  130. /package/dist/{graphicLayer → esm/graphicLayer}/WallPrimitiveInstance.js +0 -0
  131. /package/dist/{map → esm/map}/Event.d.ts +0 -0
  132. /package/dist/{map → esm/map}/GroundSkyBox.d.ts +0 -0
  133. /package/dist/{map → esm/map}/GroundSkyBox.js +0 -0
  134. /package/dist/{map → esm/map}/Property.d.ts +0 -0
  135. /package/dist/{map → esm/map}/Property.js +0 -0
  136. /package/dist/{material → esm/material}/BaseMaterialProperty.d.ts +0 -0
  137. /package/dist/{material → esm/material}/BaseMaterialProperty.js +0 -0
  138. /package/dist/{material → esm/material}/CircleWaveMaterialProperty.d.ts +0 -0
  139. /package/dist/{material → esm/material}/DynamicWallMaterialProperty.d.ts +0 -0
  140. /package/dist/{material → esm/material}/ImageMaterialProperty.d.ts +0 -0
  141. /package/dist/{material → esm/material}/ImageMaterialProperty.js +0 -0
  142. /package/dist/{material → esm/material}/WeatherEffects.d.ts +0 -0
  143. /package/dist/{material → esm/material}/WeatherEffects.js +0 -0
  144. /package/dist/{material → esm/material}/shader/CircleWaveShader.glsl +0 -0
  145. /package/dist/{material → esm/material}/shader/DynamicWallShader.glsl +0 -0
  146. /package/dist/{material → esm/material}/shader/FogShader.glsl +0 -0
  147. /package/dist/{material → esm/material}/shader/RainShader.glsl +0 -0
  148. /package/dist/{material → esm/material}/shader/SnowShader.glsl +0 -0
  149. /package/dist/{measure → esm/measure}/AreaMeasure.d.ts +0 -0
  150. /package/dist/{measure → esm/measure}/AreaMeasure.js +0 -0
  151. /package/dist/{measure → esm/measure}/AreaSurfaceMeasure.d.ts +0 -0
  152. /package/dist/{measure → esm/measure}/AreaSurfaceMeasure.js +0 -0
  153. /package/dist/{measure → esm/measure}/DistanceMeasure.d.ts +0 -0
  154. /package/dist/{measure → esm/measure}/DistanceMeasure.js +0 -0
  155. /package/dist/{measure → esm/measure}/DistanceSurfaceMeasure.d.ts +0 -0
  156. /package/dist/{measure → esm/measure}/DistanceSurfaceMeasure.js +0 -0
  157. /package/dist/{measure → esm/measure}/Measure.d.ts +0 -0
  158. /package/dist/{measure → esm/measure}/Measure.js +0 -0
  159. /package/dist/{measure → esm/measure}/index.d.ts +0 -0
  160. /package/dist/{measure → esm/measure}/index.js +0 -0
  161. /package/dist/{measure → esm/measure}/utils.d.ts +0 -0
  162. /package/dist/{measure → esm/measure}/utils.js +0 -0
  163. /package/dist/{property → esm/property}/PositionProperty.d.ts +0 -0
  164. /package/dist/{property → esm/property}/PositionProperty.js +0 -0
  165. /package/dist/{tileLayer → esm/tileLayer}/ArcGisLayer.d.ts +0 -0
  166. /package/dist/{tileLayer → esm/tileLayer}/ArcGisLayer.js +0 -0
  167. /package/dist/{tileLayer → esm/tileLayer}/ImageryLayer.d.ts +0 -0
  168. /package/dist/{tileLayer → esm/tileLayer}/ImageryLayer.js +0 -0
  169. /package/dist/{tileLayer → esm/tileLayer}/RasterLayer.d.ts +0 -0
  170. /package/dist/{tileLayer → esm/tileLayer}/RasterLayer.js +0 -0
  171. /package/dist/{tileLayer → esm/tileLayer}/WmsLayer.d.ts +0 -0
  172. /package/dist/{tileLayer → esm/tileLayer}/WmsLayer.js +0 -0
  173. /package/dist/{tileLayer → esm/tileLayer}/WmtsLayer.d.ts +0 -0
  174. /package/dist/{tileLayer → esm/tileLayer}/WmtsLayer.js +0 -0
  175. /package/dist/{tool → esm/tool}/PrimitiveCluster.d.ts +0 -0
  176. /package/dist/{tool → esm/tool}/PrimitiveCluster.js +0 -0
  177. /package/dist/{tool → esm/tool}/TimerInterval.d.ts +0 -0
  178. /package/dist/{tool → esm/tool}/TimerInterval.js +0 -0
  179. /package/dist/{tool → esm/tool}/cesiumExtends/Subscriber/index.d.ts +0 -0
  180. /package/dist/{tool → esm/tool}/cesiumExtends/Subscriber/index.js +0 -0
  181. /package/dist/{tool → esm/tool}/common.d.ts +0 -0
  182. /package/dist/{tool → esm/tool}/common.js +0 -0
  183. /package/dist/{tool → esm/tool}/heatmap.js +0 -0
  184. /package/dist/{toolTip → esm/toolTip}/index.css +0 -0
  185. /package/dist/{toolTip → esm/toolTip}/index.d.ts +0 -0
  186. /package/dist/{toolTip → esm/toolTip}/index.js +0 -0
  187. /package/dist/{videoFusion → esm/videoFusion}/BaseVideo.d.ts +0 -0
  188. /package/dist/{videoFusion → esm/videoFusion}/BaseVideo.js +0 -0
  189. /package/dist/{videoFusion → esm/videoFusion}/VideoProject.d.ts +0 -0
  190. /package/dist/{videoFusion → esm/videoFusion}/VideoProject.js +0 -0
  191. /package/dist/{videoFusion → esm/videoFusion}/VideoTexture.d.ts +0 -0
  192. /package/dist/{videoFusion → esm/videoFusion}/VideoTexture.js +0 -0
  193. /package/dist/{visualization → esm/visualization}/Airspace.d.ts +0 -0
  194. /package/dist/{visualization → esm/visualization}/Airspace.js +0 -0
  195. /package/dist/{visualization → esm/visualization}/BaseFrustum.d.ts +0 -0
  196. /package/dist/{visualization → esm/visualization}/BaseFrustum.js +0 -0
  197. /package/dist/{visualization → esm/visualization}/BaseHeatmap.d.ts +0 -0
  198. /package/dist/{visualization → esm/visualization}/BaseHeatmap.js +0 -0
  199. /package/dist/{visualization → esm/visualization}/Frustum.d.ts +0 -0
  200. /package/dist/{visualization → esm/visualization}/Frustum.js +0 -0
  201. /package/dist/{visualization → esm/visualization}/FrustumWithCamera.d.ts +0 -0
  202. /package/dist/{visualization → esm/visualization}/FrustumWithCamera.js +0 -0
  203. /package/dist/{visualization → esm/visualization}/Heatmap2d.d.ts +0 -0
  204. /package/dist/{visualization → esm/visualization}/Heatmap2d.js +0 -0
  205. /package/dist/{visualization → esm/visualization}/Heatmap3d.d.ts +0 -0
  206. /package/dist/{visualization → esm/visualization}/Heatmap3d.js +0 -0
  207. /package/dist/{visualization → esm/visualization}/PointCluster.d.ts +0 -0
  208. /package/dist/{visualization → esm/visualization}/PointCluster.js +0 -0
@@ -14,7 +14,7 @@ export default class BaseSource {
14
14
  remove(): void;
15
15
  setData(data: any): this;
16
16
  _toDestroy(): void;
17
- static analysisSourceType(data: any): "wkt" | "sourceId" | "sourceInstance" | "geoJson" | "other";
17
+ static analysisSourceType(data: any): "other" | "wkt" | "sourceId" | "sourceInstance" | "geoJson";
18
18
  static wktToGeoJon(wkt: string): any;
19
19
  static geoJsonToGeoCartesian3Array(geoJson: any): any[];
20
20
  static handleFeaturePoint(feature: any): any;
@@ -1,6 +1,5 @@
1
- import './assets/Build/Map3d/Widgets/widgets.css';
2
1
  import './global.css';
3
- declare class DeepTwinsEngine3D {
2
+ export declare class DeepTwinsEngine3D {
4
3
  static Version: string;
5
4
  static Map: any;
6
5
  static GroundSkyBox: any;
@@ -7,7 +7,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  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); }
8
8
  //引入cesium基础库
9
9
  import * as Cesium from 'deeptwins-cesium';
10
- import "./assets/Build/Map3d/Widgets/widgets.css";
11
10
  import ModelRoamHistory from "./cameraControl/ModelRoamHistory";
12
11
  import ModelRoamRealTime from "./cameraControl/ModelRoamRealTime";
13
12
  import ModelRoamUpDate from "./cameraControl/ModelRoamUpDate";
@@ -33,6 +32,7 @@ import WmsLayer from "./tileLayer/WmsLayer";
33
32
  import WmtsLayer from "./tileLayer/WmtsLayer";
34
33
  import { ClampToGround, ShapeSection } from "./tool/common";
35
34
  import TimerInterval from "./tool/TimerInterval";
35
+ import { loadCss } from "./tool/utils";
36
36
  import VideoProject from "./videoFusion/VideoProject";
37
37
  import VideoTexture from "./videoFusion/VideoTexture";
38
38
  import Airspace from "./visualization/Airspace";
@@ -42,10 +42,13 @@ import Heatmap2d from "./visualization/Heatmap2d";
42
42
  import Heatmap3d from "./visualization/Heatmap3d";
43
43
  import PointCluster from "./visualization/PointCluster";
44
44
  window.Cesium = Cesium;
45
- var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
45
+ DEEP_TWINS_BASE_URL && (window.CESIUM_BASE_URL = DEEP_TWINS_BASE_URL);
46
+ // 全局加载css
47
+ loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
48
+ export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
46
49
  _classCallCheck(this, DeepTwinsEngine3D);
47
50
  });
48
- _defineProperty(DeepTwinsEngine3D, "Version", '0.0.52');
51
+ _defineProperty(DeepTwinsEngine3D, "Version", "0.1.2");
49
52
  _defineProperty(DeepTwinsEngine3D, "Map", Map);
50
53
  _defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
51
54
  _defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
@@ -126,7 +126,7 @@ var Event = /*#__PURE__*/function () {
126
126
  return handler;
127
127
  }
128
128
 
129
- // 监听场景头事件
129
+ // 监听场景事件
130
130
  }, {
131
131
  key: "listenToScene",
132
132
  value: function listenToScene(type, event) {
@@ -61,6 +61,7 @@ export default class Map extends Cesium.Viewer {
61
61
  addEffect(effect: any): void;
62
62
  removeEffect(effect: any): void;
63
63
  on(type: any, event: any): any;
64
+ addModuleLayer: (moduleLayer: any) => any;
64
65
  pickMonomer(data: any): any;
65
66
  destroy(): void;
66
67
  }
@@ -76,6 +76,12 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
76
76
  _defineProperty(_assertThisInitialized(_this), "_event", void 0);
77
77
  // 默认的事件监听
78
78
  _defineProperty(_assertThisInitialized(_this), "_eventTrick", []);
79
+ // 添加yunjing module
80
+ _defineProperty(_assertThisInitialized(_this), "addModuleLayer", function (moduleLayer) {
81
+ _this._yunjing = _this._yunjing || moduleLayer.addToMap(_assertThisInitialized(_this));
82
+ common.removeYjIcon();
83
+ return _this._yunjing;
84
+ });
79
85
  _this.configOptions = merge(constant.DEFAULT_VIEW_CONFIG(), options);
80
86
  _this.setConfig(_this.configOptions);
81
87
  if (deepTwins) {
@@ -431,7 +437,7 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
431
437
  }, {
432
438
  key: "removeDefaultLayer",
433
439
  value: function removeDefaultLayer() {
434
- console.log(this.imageryLayers);
440
+ this.imageryLayers.removeDefault();
435
441
  }
436
442
 
437
443
  // 添加矢量数据
@@ -633,11 +639,11 @@ var Map = /*#__PURE__*/function (_Cesium$Viewer) {
633
639
  return this._event.listenToScene(type, event);
634
640
  }
635
641
  }
636
-
637
- // 拾取单体
638
642
  }, {
639
643
  key: "pickMonomer",
640
- value: function pickMonomer(data) {
644
+ value:
645
+ // 拾取单体
646
+ function pickMonomer(data) {
641
647
  if (!this._yunjing) {
642
648
  throw new Error('请先加载模型');
643
649
  }
@@ -24,7 +24,7 @@ import { DEFAULT_CIRCLE_WAVE_MATERIAL_STYLE } from "../constant";
24
24
  import * as utils from "../tool/utils";
25
25
  import BaseMaterialProperty from "./BaseMaterialProperty";
26
26
  /* babel-plugin-inline-import './shader/CircleWaveShader.glsl' */
27
- var CircleWaveShader = "czm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n vec3 str = materialInput.str;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(time);\n if (abs(str.z) > 0.001) {\n discard;\n }\n if (dis > 0.5) {\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = .0;\n for (int i = 0; i <= 9; i++) {\n if (float(i) <= count) {\n disNum = perDis * float(i) - dis + per / count;\n if (disNum > 0.0) {\n if (disNum < perDis) {\n bl = 1.0 - disNum / perDis;\n } else if (disNum - perDis < perDis) {\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl, gradient);\n }\n }\n }\n }\n return material;\n}\n"; // 水波纹材质
27
+ var CircleWaveShader = "czm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n\n vec2 st = materialInput.st;\n vec3 str = materialInput.str;\n float dis = distance(st, vec2(0.5));\n float per = fract(time);\n float perDis = 0.5 / count;\n\n // discard if str.z != 0\n float discardByStr = step(0.001, abs(str.z));\n // discard if dis > 0.5\n float discardByDis = step(0.5, dis);\n\n if (discardByStr > 0.0 || discardByDis > 0.0) {\n discard;\n }\n\n float bl = 0.0;\n\n for (int i = 0; i <= 9; i++) {\n float idx = float(i);\n float valid = step(idx, count); // 1.0 if i <= count, else 0.0\n\n float disNum = perDis * idx - dis + per / count;\n float inFirst = step(0.0, disNum) * (1.0 - step(perDis, disNum));\n float inSecond = step(perDis, disNum) * (1.0 - step(2.0 * perDis, disNum));\n\n float bl1 = 1.0 - disNum / perDis;\n float bl2 = 1.0 - abs(1.0 - disNum / perDis);\n\n float thisBl = mix(0.0, bl1, inFirst) + mix(0.0, bl2, inSecond);\n thisBl *= valid; // only apply if i <= count\n\n bl = max(bl, thisBl); // \u4FDD\u7559\u6700\u5F3A\u7684\u4E00\u5C42\u6CE2\u7EB9\n }\n\n material.alpha = pow(bl, gradient);\n return material;\n}\n"; // 水波纹材质
28
28
  var CircleWaveMaterialProperty = /*#__PURE__*/function (_BaseMaterialProperty) {
29
29
  _inherits(CircleWaveMaterialProperty, _BaseMaterialProperty);
30
30
  var _super = _createSuper(CircleWaveMaterialProperty);
@@ -24,7 +24,7 @@ import { DEFAULT_DYNAMIC_WALL_MATERIAL_STYLE } from "../constant";
24
24
  import * as utils from "../tool/utils";
25
25
  import BaseMaterialProperty from "./BaseMaterialProperty";
26
26
  /* babel-plugin-inline-import './shader/DynamicWallShader.glsl' */
27
- var DynamicWallShader = "czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float vertical = 1.0;\n float directionAdd = 1.0;\n vec2 uv = vec2(0, 0);\n // \u5224\u65AD\u6392\u5217\u65B9\u5411\n if (freely == vertical) {\n // \u5224\u65AD\u8FD0\u52A8\u65B9\u5411\n if (direction == directionAdd) {\n uv = vec2(fract(st.s), fract(count * st.t + time));\n } else {\n uv = vec2(fract(st.s), fract(count * st.t - time));\n }\n } else {\n // \u5224\u65AD\u8FD0\u52A8\u65B9\u5411\n if (direction == directionAdd) {\n uv = vec2(fract(count * st.s + time), fract(st.t));\n } else {\n uv = vec2(fract(count * st.s - time), fract(st.t));\n }\n }\n vec4 colorImage = texture(image, uv);\n vec3 mixedColor = mix(colorImage.rgb, color.rgb, mixRatio);\n vec4 fragColor;\n fragColor.rgb = mixedColor;\n fragColor = czm_gammaCorrect(fragColor);\n\n material.diffuse = mixedColor;\n material.alpha = colorImage.a * color.a; // \u53EF\u6839\u636E\u9700\u8981\u51B3\u5B9A\u662F\u5426\u76F8\u4E58\n material.emission = fragColor.rgb;\n\n return material;\n}\n"; // 动态墙材质
27
+ var DynamicWallShader = "czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float vertical = 1.0;\n float directionAdd = 1.0;\n // \u4F7F\u7528 abs(a - b) < 0.0001\uFF08\u901A\u8FC7 step\uFF09\u5224\u65AD\u6D6E\u70B9\u76F8\u7B49\uFF0C\u907F\u514D\u7CBE\u5EA6\u8BEF\u5DEE\n // \u5224\u65AD\u6392\u5217\u65B9\u5411\u662F\u5426\u662F\u7EB5\u5411\uFF08freely == vertical\uFF09\n float isVertical = 1.0 - step(0.0001, abs(freely - vertical));\n // \u5224\u65AD\u8FD0\u52A8\u65B9\u5411\u662F\u5426\u662F\u52A0\uFF08direction == directionAdd\uFF09\n float isAdd = 1.0 - step(0.0001, abs(direction - directionAdd));\n\n // \u7EB5\u5411\u6392\u5217\uFF1Auv = (st.s, count * st.t \xB1 time)\n // \u6A2A\u5411\u6392\u5217\uFF1Auv = (count * st.s \xB1 time, st.t)\n vec2 uvVerticalAdd = vec2(fract(st.s), fract(count * st.t + time));\n vec2 uvVerticalSub = vec2(fract(st.s), fract(count * st.t - time));\n vec2 uvHorizontalAdd = vec2(fract(count * st.s + time), fract(st.t));\n vec2 uvHorizontalSub = vec2(fract(count * st.s - time), fract(st.t));\n\n // \u6309\u8FD0\u52A8\u65B9\u5411\u9009\u62E9 mix(a, b, t) \u4F5C\u7528\u7C7B\u4F3C\u4E8E t == 0 ? a : b\n vec2 uvVertical = mix(uvVerticalSub, uvVerticalAdd, isAdd);\n vec2 uvHorizontal = mix(uvHorizontalSub, uvHorizontalAdd, isAdd);\n\n // \u6700\u7EC8\u6839\u636E\u6392\u5217\u65B9\u5411\u9009\u62E9\n vec2 uv = mix(uvHorizontal, uvVertical, isVertical);\n\n vec4 colorImage = texture(image, uv);\n vec3 mixedColor = mix(colorImage.rgb, color.rgb, mixRatio);\n vec4 fragColor;\n fragColor.rgb = mixedColor;\n fragColor = czm_gammaCorrect(fragColor);\n\n material.diffuse = mixedColor;\n material.alpha = colorImage.a * color.a; // \u53EF\u6839\u636E\u9700\u8981\u51B3\u5B9A\u662F\u5426\u76F8\u4E58\n material.emission = fragColor.rgb;\n\n return material;\n}\n"; // 动态墙材质
28
28
  var DynamicWallMaterialProperty = /*#__PURE__*/function (_BaseMaterialProperty) {
29
29
  _inherits(DynamicWallMaterialProperty, _BaseMaterialProperty);
30
30
  var _super = _createSuper(DynamicWallMaterialProperty);
@@ -1,9 +1,13 @@
1
1
  import BaseMaterialProperty from './BaseMaterialProperty';
2
2
  export default class PolylineTrailLinkMaterialProperty extends BaseMaterialProperty {
3
- private readonly currStyle;
3
+ private _currStyle;
4
+ get currStyle(): any;
5
+ set currStyle(value: any);
4
6
  constructor(style: any);
5
- static handleStyle(style: any): any;
6
7
  private _init;
8
+ static handleStyle(style: any): any;
9
+ getType(): string;
7
10
  getValue(time: any, result: any): any;
8
11
  equals(other: any): boolean;
12
+ dynamicsSize(map: any, layer: any): void;
9
13
  }
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["duration"],
2
- _excluded2 = ["color", "count"];
2
+ _excluded2 = ["color", "repeat"];
3
3
  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); }
4
4
  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; }
5
5
  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; }
@@ -20,11 +20,12 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  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); }
21
21
  import * as Cesium from 'deeptwins-cesium';
22
22
  import { cloneDeep, isEqual, merge } from 'lodash';
23
- import { DEFAULT_POLYLINE_TRAIL_LINK_MATERIAL_STYLE } from "../constant";
23
+ import { CAMERA_EVENT_TYPE, DEFAULT_POLYLINE_TRAIL_LINK_MATERIAL_STYLE } from "../constant";
24
+ import BaseLayer from "../graphicLayer/BaseLayer";
24
25
  import * as utils from "../tool/utils";
25
26
  import BaseMaterialProperty from "./BaseMaterialProperty";
26
27
  /* babel-plugin-inline-import './shader/PolylineTrailLinkShader.glsl' */
27
- var PolylineTrailLinkShader = "czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = vec2(fract(materialInput.st.s * count - time), materialInput.st.t * 1.0);\n vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\n material.alpha = colorImage.a * color.a;\n material.diffuse = mix(colorImage.rgb, color.rgb, mixRatio);\n return material;\n}\n"; // 流动线材质
28
+ var PolylineTrailLinkShader = "czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = vec2(fract(materialInput.st.s * repeat.x - time), fract(materialInput.st.t * repeat.y));\n vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\n material.alpha = colorImage.a * color.a;\n material.diffuse = mix(colorImage.rgb, color.rgb, mixRatio);\n return material;\n}\n";
28
29
  var PolylineTrailLinkMaterialProperty = /*#__PURE__*/function (_BaseMaterialProperty) {
29
30
  _inherits(PolylineTrailLinkMaterialProperty, _BaseMaterialProperty);
30
31
  var _super = _createSuper(PolylineTrailLinkMaterialProperty);
@@ -33,14 +34,20 @@ var PolylineTrailLinkMaterialProperty = /*#__PURE__*/function (_BaseMaterialProp
33
34
  _classCallCheck(this, PolylineTrailLinkMaterialProperty);
34
35
  var mergeStyle = merge(DEFAULT_POLYLINE_TRAIL_LINK_MATERIAL_STYLE(), cloneDeep(style || {}));
35
36
  _this = _super.call(this, 'PolylineTrailLink', mergeStyle);
36
- _defineProperty(_assertThisInitialized(_this), "currStyle", void 0);
37
+ _defineProperty(_assertThisInitialized(_this), "_currStyle", void 0);
37
38
  _this.currStyle = PolylineTrailLinkMaterialProperty.handleStyle(mergeStyle);
38
39
  _this._init();
39
40
  return _this;
40
41
  }
41
-
42
- // 处理参数
43
42
  _createClass(PolylineTrailLinkMaterialProperty, [{
43
+ key: "currStyle",
44
+ get: function get() {
45
+ return this._currStyle;
46
+ },
47
+ set: function set(value) {
48
+ this._currStyle = value;
49
+ }
50
+ }, {
44
51
  key: "_init",
45
52
  value: function _init() {
46
53
  // @ts-ignore
@@ -57,6 +64,13 @@ var PolylineTrailLinkMaterialProperty = /*#__PURE__*/function (_BaseMaterialProp
57
64
  }
58
65
  });
59
66
  }
67
+
68
+ // 处理参数
69
+ }, {
70
+ key: "getType",
71
+ value: function getType() {
72
+ return this.type;
73
+ }
60
74
  }, {
61
75
  key: "getValue",
62
76
  value: function getValue(time, result) {
@@ -76,17 +90,40 @@ var PolylineTrailLinkMaterialProperty = /*#__PURE__*/function (_BaseMaterialProp
76
90
  }, {
77
91
  key: "equals",
78
92
  value: function equals(other) {
79
- return other instanceof PolylineTrailLinkMaterialProperty && isEqual(this.style, other.style);
93
+ return this === other || other instanceof PolylineTrailLinkMaterialProperty && isEqual(this.style, other.style);
94
+ }
95
+
96
+ // 动态尺寸
97
+ }, {
98
+ key: "dynamicsSize",
99
+ value: function dynamicsSize(map, layer) {
100
+ var _this2 = this;
101
+ var event = map.on(CAMERA_EVENT_TYPE.CHANGED, function () {
102
+ if (layer instanceof BaseLayer) {
103
+ if (layer.isDestroyed) {
104
+ event.off();
105
+ return;
106
+ }
107
+ layer.layers.forEach(function (t) {
108
+ var _utils$cartesian3ToLn = utils.cartesian3ToLngLatAlt(t.source.positions[0]),
109
+ alt = _utils$cartesian3ToLn.alt;
110
+ var scale = utils.getHeightCompensatedScale(map, alt || 0);
111
+ scale = scale < 0.1 ? 0.1 : scale;
112
+ var r = utils.calculateLength(t.source.positions) / scale / _this2.currStyle.repeatPixel;
113
+ t.entity.polyline.material.currStyle.repeat.x = Math.round(_this2.currStyle.repeat.x * r) || 1;
114
+ });
115
+ }
116
+ });
80
117
  }
81
118
  }], [{
82
119
  key: "handleStyle",
83
120
  value: function handleStyle(style) {
84
121
  var color = style.color,
85
- count = style.count,
122
+ repeat = style.repeat,
86
123
  options = _objectWithoutProperties(style, _excluded2);
87
124
  var backStyle = _objectSpread({}, options);
88
125
  backStyle.color = utils.colorString(color);
89
- backStyle.count = count <= 0 ? 1 : count;
126
+ backStyle.repeat = utils.arrCartesian2(repeat);
90
127
  return backStyle;
91
128
  }
92
129
  }]);
@@ -1,7 +1,7 @@
1
1
  czm_material czm_getMaterial(czm_materialInput materialInput)
2
2
  {
3
3
  czm_material material = czm_getDefaultMaterial(materialInput);
4
- vec2 st = vec2(fract(materialInput.st.s * count - time), materialInput.st.t * 1.0);
4
+ vec2 st = vec2(fract(materialInput.st.s * repeat.x - time), fract(materialInput.st.t * repeat.y));
5
5
  vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));
6
6
  material.alpha = colorImage.a * color.a;
7
7
  material.diffuse = mix(colorImage.rgb, color.rgb, mixRatio);
@@ -28,3 +28,19 @@ export declare const dateToJulianDate: (date: Date) => Cesium.JulianDate;
28
28
  export declare const julianDateToDate: (julianDate: any) => Date;
29
29
  export declare const getElCss: (el: any, css: string) => string;
30
30
  export declare const cameraFlyToPositions: (camera: any, positions: any, options: any) => void;
31
+ export declare function loadCss(url: string): Promise<void>;
32
+ /**
33
+ * 计算比例尺 1像素比多少米
34
+ * @param map Cesium.Viewer实例
35
+ * @param entityHeight 物体的椭球高度(单位:米)
36
+ * @param options 可调参数: {
37
+ * baseIntensity?: number, // 基础补偿强度(默认0.4)
38
+ * transitionHeight?: number // 高度差过渡阈值(默认5km)
39
+ * }
40
+ */
41
+ export declare const getHeightCompensatedScale: (map: Cesium.Viewer, entityHeight: number, options?: {
42
+ mode?: 'auto' | 'linear' | 'log' | 'hyperbolic';
43
+ baseIntensity?: number;
44
+ transitionHeight?: number;
45
+ }) => number;
46
+ export declare function calculateLength(positions: any[]): number;
@@ -71,8 +71,14 @@ export function sleep(ms) {
71
71
 
72
72
  // 获取代理后的地址 存放在assets/Build/DeepTwins下的文件用这个方式获取
73
73
  export var getDeepTwinsFile = function getDeepTwinsFile(url) {
74
- var cUrl = url.startsWith('/') ? url : "/".concat(url);
75
- return Cesium.buildModuleUrl("DeepTwins".concat(cUrl));
74
+ var isFullUrl = DEEP_TWINS_BASE_URL.startsWith('http');
75
+ var base = isFullUrl ? DEEP_TWINS_BASE_URL : "".concat(location.origin).concat(DEEP_TWINS_BASE_URL);
76
+ var baseUrl = new URL(base);
77
+ var normalizedBasePath = baseUrl.pathname.replace(/\/+$/, ''); // 移除尾部斜杠
78
+ var normalizedUrl = url.replace(/^\/+/, ''); // 移除开头斜杠
79
+ // 拼接路径(确保各部分之间只有一个 "/")
80
+ baseUrl.pathname = "".concat(normalizedBasePath, "/DeepTwins/").concat(normalizedUrl);
81
+ return baseUrl.toString();
76
82
  };
77
83
 
78
84
  // 处理颜色
@@ -232,4 +238,87 @@ export var cameraFlyToPositions = function cameraFlyToPositions(camera, position
232
238
  backOptions.offset = new Cesium.HeadingPitchRange(toRadians(heading), toRadians(pitch), 0);
233
239
  }
234
240
  camera.flyToBoundingSphere(boundingSphere, backOptions);
235
- };
241
+ };
242
+
243
+ // 加载外部css
244
+ export function loadCss(_x3) {
245
+ return _loadCss.apply(this, arguments);
246
+ }
247
+
248
+ /**
249
+ * 计算比例尺 1像素比多少米
250
+ * @param map Cesium.Viewer实例
251
+ * @param entityHeight 物体的椭球高度(单位:米)
252
+ * @param options 可调参数: {
253
+ * baseIntensity?: number, // 基础补偿强度(默认0.4)
254
+ * transitionHeight?: number // 高度差过渡阈值(默认5km)
255
+ * }
256
+ */
257
+ function _loadCss() {
258
+ _loadCss = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(url) {
259
+ var response, cssText, style;
260
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
261
+ while (1) switch (_context2.prev = _context2.next) {
262
+ case 0:
263
+ _context2.prev = 0;
264
+ _context2.next = 3;
265
+ return fetch(url);
266
+ case 3:
267
+ response = _context2.sent;
268
+ _context2.next = 6;
269
+ return response.text();
270
+ case 6:
271
+ cssText = _context2.sent;
272
+ style = document.createElement('style');
273
+ style.textContent = cssText;
274
+ document.head.appendChild(style);
275
+ _context2.next = 15;
276
+ break;
277
+ case 12:
278
+ _context2.prev = 12;
279
+ _context2.t0 = _context2["catch"](0);
280
+ console.error(_context2.t0);
281
+ case 15:
282
+ case "end":
283
+ return _context2.stop();
284
+ }
285
+ }, _callee2, null, [[0, 12]]);
286
+ }));
287
+ return _loadCss.apply(this, arguments);
288
+ }
289
+ export var getHeightCompensatedScale = function getHeightCompensatedScale(map, entityHeight, options) {
290
+ var _options$baseIntensit, _options$transitionHe;
291
+ // 参数默认值
292
+ var config = {
293
+ baseIntensity: (_options$baseIntensit = options === null || options === void 0 ? void 0 : options.baseIntensity) !== null && _options$baseIntensit !== void 0 ? _options$baseIntensit : 0.4,
294
+ transitionHeight: (_options$transitionHe = options === null || options === void 0 ? void 0 : options.transitionHeight) !== null && _options$transitionHe !== void 0 ? _options$transitionHe : 5000 // 5km过渡阈值
295
+ };
296
+ var camera = map.camera;
297
+ var cameraHeight = camera.positionCartographic.height;
298
+ var fovy = camera.frustum.fovy;
299
+ var viewport = map.scene.canvas.clientHeight;
300
+
301
+ // 校验无效输入
302
+ if (viewport <= 0 || !fovy || cameraHeight <= 0) return 1;
303
+
304
+ // 计算物体与相机的高度差(绝对值)
305
+ var deltaHeight = Math.abs(entityHeight - cameraHeight);
306
+ var compensationFactor;
307
+ if (deltaHeight < config.transitionHeight) {
308
+ compensationFactor = 1 + config.baseIntensity * (deltaHeight / 1000);
309
+ } else {
310
+ compensationFactor = 1 + config.baseIntensity * Math.log1p(deltaHeight / 1000);
311
+ }
312
+ var groundPerPixel = 2 * cameraHeight * Math.tan(fovy / 2) / viewport;
313
+ return groundPerPixel * compensationFactor;
314
+ };
315
+
316
+ // 计算长度(米)
317
+ export function calculateLength(positions) {
318
+ if (!positions || positions.length < 2) return 0;
319
+ var length = 0;
320
+ for (var i = 1; i < positions.length; i++) {
321
+ length += Cesium.Cartesian3.distance(positions[i - 1], positions[i]);
322
+ }
323
+ return length;
324
+ }
@@ -0,0 +1,14 @@
1
+ declare module '*.glsl' {
2
+ const value: string;
3
+ export default value;
4
+ }
5
+ interface Window {
6
+ Cesium: any;
7
+ CESIUM_BASE_URL: string;
8
+ }
9
+ // 版本
10
+ declare const VERSION: string;
11
+ // 静态文件的路径地址
12
+ // 在esm中会赋值给window.CESIUM_BASE_URL 使用本地代理
13
+ // 在umd中会使用https://unpkg.com上相应版本的地址
14
+ declare const DEEP_TWINS_BASE_URL: string;
@@ -0,0 +1 @@
1
+ .deepTwins-toolTip{background:rgba(42,42,42,.9);border-radius:4px;color:#fff;display:none;font-size:12px;padding:4px 8px;pointer-events:none;position:absolute;transform:translate3d(10px,-50%,0);white-space:nowrap}.deepTwins-toolTip:before{border-bottom:5px solid transparent;border-right:5px solid rgba(0,0,0,.6);border-top:5px solid transparent;content:"";display:block;left:-5px;pointer-events:none;position:absolute;top:calc(50% - 5px)}#yunjinglogo{display:none}