deeptwins-engine-3d 0.1.76 → 0.2.1

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 (237) hide show
  1. package/dist/assets/Build/DeepTwins/Image/noise.png +0 -0
  2. package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
  3. package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
  4. package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
  5. package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
  6. package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
  7. package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
  8. package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
  9. package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
  10. package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
  11. package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
  12. package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
  13. package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
  14. package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
  15. package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
  16. package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
  17. package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
  18. package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
  19. package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
  20. package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
  21. package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
  22. package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
  23. package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
  24. package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
  25. package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
  26. package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
  27. package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
  28. package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
  29. package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
  30. package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
  31. package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
  32. package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
  33. package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
  34. package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
  35. package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
  36. package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
  37. package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
  38. package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
  39. package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
  40. package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
  41. package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
  42. package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
  43. package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
  44. package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
  45. package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
  46. package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
  47. package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
  48. package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
  49. package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
  50. package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
  51. package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
  52. package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
  53. package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
  54. package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
  55. package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
  56. package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
  57. package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
  58. package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
  59. package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
  60. package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
  61. package/dist/esm/analyze/SunLightAnalysis.js +1 -91
  62. package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
  63. package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
  64. package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
  65. package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
  66. package/dist/esm/cameraControl/Roam.js +1 -418
  67. package/dist/esm/cameraControl/Rotate.js +1 -134
  68. package/dist/esm/cameraControl/RotateInPlace.js +1 -99
  69. package/dist/esm/constant.d.ts +90 -0
  70. package/dist/esm/constant.js +1 -1287
  71. package/dist/esm/deepTwins/index.js +1 -121
  72. package/dist/esm/drawCommand/index.js +1 -3
  73. package/dist/esm/drawCommand/viewShed/Event.js +1 -142
  74. package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
  75. package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
  76. package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
  77. package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
  78. package/dist/esm/drawCommand/viewShed/config.js +1 -21
  79. package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
  80. package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
  81. package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
  82. package/dist/esm/drawer/algorithm.js +1 -314
  83. package/dist/esm/drawer/common.js +1 -965
  84. package/dist/esm/drawer/coordinate.js +1 -184
  85. package/dist/esm/drawer/index.js +1 -688
  86. package/dist/esm/drawer/plotUtil.js +1 -266
  87. package/dist/esm/drawer/shape/Assemble.js +1 -415
  88. package/dist/esm/drawer/shape/AttackArrow.js +1 -442
  89. package/dist/esm/drawer/shape/BaseShape.js +1 -383
  90. package/dist/esm/drawer/shape/Bow.js +1 -375
  91. package/dist/esm/drawer/shape/Circle.js +1 -461
  92. package/dist/esm/drawer/shape/Curve.js +1 -386
  93. package/dist/esm/drawer/shape/DragPoint.js +1 -211
  94. package/dist/esm/drawer/shape/Elliptic.js +1 -491
  95. package/dist/esm/drawer/shape/Formation.js +1 -395
  96. package/dist/esm/drawer/shape/PincerArrow.js +1 -445
  97. package/dist/esm/drawer/shape/Point.js +1 -131
  98. package/dist/esm/drawer/shape/Polygon.js +1 -368
  99. package/dist/esm/drawer/shape/Polyline.js +1 -325
  100. package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
  101. package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
  102. package/dist/esm/drawer/shape/Sector.js +1 -568
  103. package/dist/esm/drawer/shape/StraightArrow.js +1 -422
  104. package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
  105. package/dist/esm/drawer/types.js +1 -11
  106. package/dist/esm/drawer/utils.js +1 -381
  107. package/dist/esm/global.css +22 -1
  108. package/dist/esm/graphicLayer/BaseEntity.js +1 -51
  109. package/dist/esm/graphicLayer/BaseLayer.js +1 -730
  110. package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
  111. package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
  112. package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
  113. package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
  114. package/dist/esm/graphicLayer/BaseSource.js +1 -630
  115. package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
  116. package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
  117. package/dist/esm/graphicLayer/BoxEntity.js +1 -99
  118. package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
  119. package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
  120. package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
  121. package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
  122. package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
  123. package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
  124. package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
  125. package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
  126. package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
  127. package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
  128. package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
  129. package/dist/esm/graphicLayer/LabelEntity.js +1 -110
  130. package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
  131. package/dist/esm/graphicLayer/ModelEntity.js +1 -122
  132. package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
  133. package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
  134. package/dist/esm/graphicLayer/PointEntity.js +1 -94
  135. package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
  136. package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
  137. package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
  138. package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
  139. package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
  140. package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
  141. package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
  142. package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
  143. package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
  144. package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
  145. package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
  146. package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
  147. package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
  148. package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
  149. package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
  150. package/dist/esm/graphicLayer/WallEntity.js +1 -96
  151. package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
  152. package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
  153. package/dist/esm/index.d.ts +4 -0
  154. package/dist/esm/index.js +1 -175
  155. package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
  156. package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
  157. package/dist/esm/lowAltitude/FactorLayer.js +1 -199
  158. package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
  159. package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
  160. package/dist/esm/lowAltitude/GridDraw.js +1 -137
  161. package/dist/esm/lowAltitude/PoiLayer.js +1 -74
  162. package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
  163. package/dist/esm/lowAltitude/VisitLayer.js +1 -180
  164. package/dist/esm/map/Event.js +1 -377
  165. package/dist/esm/map/GroundSkyBox.js +1 -166
  166. package/dist/esm/map/Map.js +1 -881
  167. package/dist/esm/map/Property.js +1 -35
  168. package/dist/esm/material/AtmosphericDispersion.js +1 -569
  169. package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
  170. package/dist/esm/material/VolumeCloud.js +1 -115
  171. package/dist/esm/material/WeatherEffects.js +1 -351
  172. package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
  173. package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
  174. package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
  175. package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
  176. package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
  177. package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
  178. package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
  179. package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
  180. package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
  181. package/dist/esm/measure/Area.js +1 -220
  182. package/dist/esm/measure/BaseDraw.js +1 -105
  183. package/dist/esm/measure/Distance.js +1 -223
  184. package/dist/esm/measure/index.js +1 -266
  185. package/dist/esm/measure/types.js +1 -17
  186. package/dist/esm/measure/utils.js +1 -319
  187. package/dist/esm/particle/BaseParticle.js +1 -196
  188. package/dist/esm/particle/FireParticle.js +1 -65
  189. package/dist/esm/particle/FountainParticle.js +1 -80
  190. package/dist/esm/particle/SmokeParticle.js +1 -65
  191. package/dist/esm/particle/common.js +1 -23
  192. package/dist/esm/particle/index.js +1 -5
  193. package/dist/esm/property/PositionProperty.js +1 -56
  194. package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
  195. package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
  196. package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
  197. package/dist/esm/tileLayer/ImageryLayer.js +1 -44
  198. package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
  199. package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
  200. package/dist/esm/tileLayer/RasterLayer.js +1 -23
  201. package/dist/esm/tileLayer/WmsLayer.js +1 -26
  202. package/dist/esm/tileLayer/WmtsLayer.js +1 -23
  203. package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
  204. package/dist/esm/tool/Compass.js +1 -282
  205. package/dist/esm/tool/PrimitiveCluster.js +1 -706
  206. package/dist/esm/tool/TimerInterval.js +1 -58
  207. package/dist/esm/tool/common.js +1 -405
  208. package/dist/esm/tool/fetch.js +1 -222
  209. package/dist/esm/tool/heatmap.js +1 -631
  210. package/dist/esm/tool/utils.d.ts +1 -0
  211. package/dist/esm/tool/utils.js +1 -501
  212. package/dist/esm/toolTip/index.js +1 -79
  213. package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
  214. package/dist/esm/videoFusion/BaseVideo.js +1 -330
  215. package/dist/esm/videoFusion/VideoProject.js +1 -230
  216. package/dist/esm/videoFusion/VideoTexture.js +1 -163
  217. package/dist/esm/visualization/BaseHeatmap.js +1 -271
  218. package/dist/esm/visualization/BoundaryHighlight.d.ts +135 -0
  219. package/dist/esm/visualization/BoundaryHighlight.js +1 -0
  220. package/dist/esm/visualization/DynamicWater.js +1 -289
  221. package/dist/esm/visualization/Frustum.js +1 -248
  222. package/dist/esm/visualization/Heatmap2d.js +1 -97
  223. package/dist/esm/visualization/Heatmap3d.js +1 -281
  224. package/dist/esm/visualization/MigrationEffect.js +1 -397
  225. package/dist/esm/visualization/PointCluster.js +1 -220
  226. package/dist/esm/visualization/RadarScan.js +1 -333
  227. package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
  228. package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
  229. package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
  230. package/dist/esm/visualization/SampledTerrainWater.js +1 -0
  231. package/dist/esm/visualization/WindField.d.ts +72 -0
  232. package/dist/esm/visualization/WindField.js +1 -0
  233. package/dist/esm/visualization/windCore.d.ts +161 -0
  234. package/dist/esm/visualization/windCore.js +8 -0
  235. package/dist/umd/deeptwins-engine-3d.min.css +1 -1
  236. package/dist/umd/deeptwins-engine-3d.min.js +1 -1
  237. package/package.json +6 -4
@@ -1,282 +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
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- 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); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
- import * as Cesium from 'deeptwins-cesium';
9
- import { isString } from 'lodash';
10
- import Rotate from "../cameraControl/Rotate";
11
- import { CAMERA_EVENT_TYPE } from "../constant";
12
- import { error, getDeepTwinsFile, lngLatAltToCartesian3, toDegrees, toRadians } from "../tool/utils";
13
-
14
- // 罗盘
15
- var Compass = /*#__PURE__*/function () {
16
- function Compass(map, container) {
17
- var _this = this;
18
- _classCallCheck(this, Compass);
19
- _defineProperty(this, "_mapContext", void 0);
20
- _defineProperty(this, "isDestroyed", false);
21
- _defineProperty(this, "container", void 0);
22
- _defineProperty(this, "_cameraChangeEvent", void 0);
23
- _defineProperty(this, "_rotate", void 0);
24
- _defineProperty(this, "compassEl", {});
25
- _defineProperty(this, "_rotateTimer", null);
26
- _defineProperty(this, "_isRotating", false);
27
- _defineProperty(this, "_pitchTimer", null);
28
- _defineProperty(this, "_isPitching", false);
29
- this._mapContext = map._mapContext;
30
- this.container = isString(container) ? document.getElementById(container) : container;
31
- this._rotate = new Rotate(map);
32
- this._cameraChangeEvent = this.getMap().on(CAMERA_EVENT_TYPE.CHANGED, function (e) {
33
- _this._updateDirection(e === null || e === void 0 ? void 0 : e.position);
34
- });
35
- this._create();
36
- }
37
-
38
- // 是否能进行操作
39
- _createClass(Compass, [{
40
- key: "_canOperate",
41
- value: function _canOperate() {
42
- if (this.isDestroyed) {
43
- error('Compass实例已销毁');
44
- return false;
45
- }
46
- return true;
47
- }
48
- }, {
49
- key: "getMap",
50
- value: function getMap() {
51
- return this._mapContext && this._mapContext.getMap();
52
- }
53
- }, {
54
- key: "_create",
55
- value: function _create() {
56
- var _this2 = this;
57
- if (!this._canOperate()) {
58
- return;
59
- }
60
- var el = document.createElement('div');
61
- el.className = 'deeptwins-compass';
62
- var bg = document.createElement('img');
63
- bg.className = 'deeptwins-compass-bg';
64
- bg.src = getDeepTwinsFile('Image/compass/compass-bg.png');
65
- el.appendChild(bg);
66
- var leftDirection = document.createElement('img');
67
- leftDirection.className = 'deeptwins-compass-left-direction';
68
- var leftDirectionImg = getDeepTwinsFile('Image/compass/compass-direction-left.png');
69
- var leftDirectionActiveImg = getDeepTwinsFile('Image/compass/compass-direction-left-active.png');
70
- leftDirection.src = leftDirectionImg;
71
- el.appendChild(leftDirection);
72
-
73
- // 左箭头持续旋转
74
- leftDirection.onmouseenter = function () {
75
- leftDirection.src = leftDirectionActiveImg;
76
- };
77
- leftDirection.onmousedown = function () {
78
- leftDirection.src = leftDirectionActiveImg;
79
- _this2._startContinuousRotation(1);
80
- };
81
- leftDirection.onmouseup = function () {
82
- leftDirection.src = leftDirectionImg;
83
- _this2._stopContinuousRotation();
84
- };
85
- leftDirection.onmouseleave = function () {
86
- leftDirection.src = leftDirectionImg;
87
- _this2._stopContinuousRotation();
88
- };
89
- this.compassEl.leftDirection = leftDirection;
90
- var pointer = document.createElement('img');
91
- pointer.className = 'deeptwins-compass-pointer';
92
- pointer.src = getDeepTwinsFile('Image/compass/compass-pointer.png');
93
- el.appendChild(pointer);
94
- this.compassEl.pointer = pointer;
95
- var rightDirection = document.createElement('img');
96
- rightDirection.className = 'deeptwins-compass-right-direction';
97
- var rightDirectionImg = getDeepTwinsFile('Image/compass/compass-direction-right.png');
98
- var rightDirectionActiveImg = getDeepTwinsFile('Image/compass/compass-direction-right-active.png');
99
- rightDirection.src = rightDirectionImg;
100
- el.appendChild(rightDirection);
101
- // 右箭头持续旋转
102
- rightDirection.onmouseenter = function () {
103
- rightDirection.src = rightDirectionActiveImg;
104
- };
105
- rightDirection.onmousedown = function () {
106
- rightDirection.src = rightDirectionActiveImg;
107
- _this2._startContinuousRotation(-1);
108
- };
109
- rightDirection.onmouseup = function () {
110
- rightDirection.src = rightDirectionImg;
111
- _this2._stopContinuousRotation();
112
- };
113
- rightDirection.onmouseleave = function () {
114
- rightDirection.src = rightDirectionImg;
115
- _this2._stopContinuousRotation();
116
- };
117
- this.compassEl.rightDirection = rightDirection;
118
- var pitchUp = document.createElement('img');
119
- pitchUp.className = 'deeptwins-compass-pitch-up';
120
- var pitchUpImg = getDeepTwinsFile('Image/compass/compass-pitch-up.png');
121
- var pitchUpActiveImg = getDeepTwinsFile('Image/compass/compass-pitch-up-active.png');
122
- pitchUp.src = pitchUpImg;
123
- el.appendChild(pitchUp);
124
- pitchUp.onmouseenter = function () {
125
- pitchUp.src = pitchUpActiveImg;
126
- };
127
- pitchUp.onmousedown = function () {
128
- pitchUp.src = pitchUpActiveImg;
129
- _this2._startContinuousPitch(1);
130
- };
131
- pitchUp.onmouseup = function () {
132
- pitchUp.src = pitchUpImg;
133
- _this2._stopContinuousPitch();
134
- };
135
- pitchUp.onmouseleave = function () {
136
- pitchUp.src = pitchUpImg;
137
- _this2._stopContinuousPitch();
138
- };
139
- this.compassEl.pitchUp = pitchUp;
140
- var pitchDown = document.createElement('img');
141
- pitchDown.className = 'deeptwins-compass-pitch-down';
142
- var pitchDownImg = getDeepTwinsFile('Image/compass/compass-pitch-down.png');
143
- var pitchDownActiveImg = getDeepTwinsFile('Image/compass/compass-pitch-down-active.png');
144
- pitchDown.src = pitchDownImg;
145
- el.appendChild(pitchDown);
146
- pitchDown.onmouseenter = function () {
147
- pitchDown.src = pitchDownActiveImg;
148
- };
149
- pitchDown.onmousedown = function () {
150
- pitchDown.src = pitchDownActiveImg;
151
- _this2._startContinuousPitch(-1);
152
- };
153
- pitchDown.onmouseup = function () {
154
- pitchDown.src = pitchDownImg;
155
- _this2._stopContinuousPitch();
156
- };
157
- pitchDown.onmouseleave = function () {
158
- pitchDown.src = pitchDownImg;
159
- _this2._stopContinuousPitch();
160
- };
161
- this.compassEl.pitchDown = pitchDown;
162
- this.container.appendChild(el);
163
- this._updateDirection(this.getMap().getCameraView());
164
- }
165
- }, {
166
- key: "_updateDirection",
167
- value: function _updateDirection(cameraView) {
168
- if (!this._canOperate()) {
169
- return;
170
- }
171
- var _ref = cameraView || {},
172
- pitch = _ref.pitch,
173
- heading = _ref.heading;
174
- this.compassEl.pointer.style.transform = "rotateX(".concat(Math.min(90 + pitch, 80), "deg) rotateZ(").concat(360 - heading, "deg)");
175
- }
176
-
177
- // 开始持续旋转
178
- }, {
179
- key: "_startContinuousRotation",
180
- value: function _startContinuousRotation(direction) {
181
- var _this3 = this;
182
- if (!this._canOperate()) return;
183
- if (this._isRotating) return;
184
- this._isRotating = true;
185
- var rotate = function rotate() {
186
- if (!_this3._isRotating) return;
187
- // 立即旋转一个小角度
188
- _this3._rotate.start({
189
- duration: 0,
190
- angle: direction * 2 // 每次旋转2度
191
- });
192
- _this3._updateDirection(_this3.getMap().getCameraView());
193
- // 设置下次旋转
194
- _this3._rotateTimer = setTimeout(rotate, 16); // 约60fps
195
- };
196
- rotate();
197
- }
198
-
199
- // 停止持续旋转
200
- }, {
201
- key: "_stopContinuousRotation",
202
- value: function _stopContinuousRotation() {
203
- if (!this._canOperate()) return;
204
- this._isRotating = false;
205
- if (this._rotateTimer) {
206
- clearTimeout(this._rotateTimer);
207
- this._rotateTimer = null;
208
- }
209
- }
210
-
211
- // 开始持续pitch
212
- }, {
213
- key: "_startContinuousPitch",
214
- value: function _startContinuousPitch(direction) {
215
- var _this4 = this;
216
- if (!this._canOperate()) return;
217
- if (this._isPitching) return;
218
- this._isPitching = true;
219
- var setPitch = function setPitch() {
220
- if (!_this4._isPitching) return;
221
- if (direction === 1 && toDegrees(_this4.getMap().camera.pitch) >= -10) {
222
- return;
223
- }
224
- var _this4$getMap$getMapC = _this4.getMap().getMapCenter(),
225
- lng = _this4$getMap$getMapC.lng,
226
- lat = _this4$getMap$getMapC.lat,
227
- alt = _this4$getMap$getMapC.alt;
228
- var position = lngLatAltToCartesian3(lng, lat, alt);
229
- var cameraPosition = _this4.getMap().camera.position;
230
- // 根据屏幕中心像素的坐标获取中心点笛卡尔坐标
231
- var centerCartesian = _this4.getMap().camera.pickEllipsoid(new Cesium.Cartesian2(_this4.getMap().canvas.clientWidth / 2, _this4.getMap().canvas.clientHeight / 2), _this4.getMap().scene.globe.ellipsoid);
232
- // 相机距离中心点的位置
233
- var distance = Cesium.Cartesian3.distance(cameraPosition, centerCartesian);
234
- // 倾斜角
235
- var finalPitch = Math.min(toRadians(-9), Math.max(toRadians(-89), _this4.getMap().camera.pitch + toRadians(direction)));
236
- _this4.getMap().scene.camera.setView({
237
- destination: position,
238
- orientation: {
239
- heading: _this4.getMap().camera.heading,
240
- pitch: finalPitch
241
- }
242
- });
243
- _this4.getMap().scene.camera.moveBackward(distance);
244
- // 设置下次调整
245
- _this4._pitchTimer = setTimeout(setPitch, 16); // 约60fps
246
- };
247
- setPitch();
248
- }
249
-
250
- // 停止持续pitch
251
- }, {
252
- key: "_stopContinuousPitch",
253
- value: function _stopContinuousPitch() {
254
- if (!this._canOperate()) return;
255
- this._isPitching = false;
256
- if (this._pitchTimer) {
257
- clearTimeout(this._pitchTimer);
258
- this._pitchTimer = null;
259
- }
260
- }
261
-
262
- // 销毁
263
- }, {
264
- key: "destroy",
265
- value: function destroy() {
266
- if (!this._canOperate()) {
267
- return;
268
- }
269
- this.isDestroyed = true;
270
- this.container.removeChild(this.container.querySelector('.deeptwins-compass'));
271
- this._cameraChangeEvent && this._cameraChangeEvent.off();
272
- this._cameraChangeEvent = null;
273
-
274
- // 清理旋转和倾斜定时器
275
- this._stopContinuousRotation();
276
- this._stopContinuousPitch();
277
- this.compassEl = {};
278
- }
279
- }]);
280
- return Compass;
281
- }();
282
- export default Compass;
1
+ (function(_0x1c80fb,_0x112405){var _0x175692=_0x1db8,_0x3627e0=_0x1c80fb();while(!![]){try{var _0x34953c=parseInt(_0x175692(0x18d))/0x1+-parseInt(_0x175692(0x1c8))/0x2+parseInt(_0x175692(0x1a1))/0x3+-parseInt(_0x175692(0x1b3))/0x4*(parseInt(_0x175692(0x1be))/0x5)+-parseInt(_0x175692(0x1c6))/0x6+parseInt(_0x175692(0x1ca))/0x7+parseInt(_0x175692(0x192))/0x8;if(_0x34953c===_0x112405)break;else _0x3627e0['push'](_0x3627e0['shift']());}catch(_0x31ad65){_0x3627e0['push'](_0x3627e0['shift']());}}}(_0x32ca,0xf3c76));function _typeof(_0x503dc1){'@babel/helpers - typeof';var _0x37e3be=_0x1db8;return _typeof=_0x37e3be(0x1c1)==typeof Symbol&&'symbol'==typeof Symbol[_0x37e3be(0x1b1)]?function(_0x3df699){return typeof _0x3df699;}:function(_0x185fc3){var _0x44c8a4=_0x37e3be;return _0x185fc3&&_0x44c8a4(0x1c1)==typeof Symbol&&_0x185fc3[_0x44c8a4(0x1d7)]===Symbol&&_0x185fc3!==Symbol[_0x44c8a4(0x1cc)]?_0x44c8a4(0x1a3):typeof _0x185fc3;},_typeof(_0x503dc1);}function _classCallCheck(_0x54a38c,_0x59d75e){var _0x237cf1=_0x1db8;if(!(_0x54a38c instanceof _0x59d75e))throw new TypeError(_0x237cf1(0x1a2));}function _0x1db8(_0x1a1a0e,_0x492095){_0x1a1a0e=_0x1a1a0e-0x18c;var _0x32ca97=_0x32ca();var _0x1db8ae=_0x32ca97[_0x1a1a0e];if(_0x1db8['zmiRUe']===undefined){var _0x1c8568=function(_0x4f9aee){var _0x2be835='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xca253d='',_0x3ae9f6='';for(var _0x503dc1=0x0,_0x3df699,_0x185fc3,_0x54a38c=0x0;_0x185fc3=_0x4f9aee['charAt'](_0x54a38c++);~_0x185fc3&&(_0x3df699=_0x503dc1%0x4?_0x3df699*0x40+_0x185fc3:_0x185fc3,_0x503dc1++%0x4)?_0xca253d+=String['fromCharCode'](0xff&_0x3df699>>(-0x2*_0x503dc1&0x6)):0x0){_0x185fc3=_0x2be835['indexOf'](_0x185fc3);}for(var _0x59d75e=0x0,_0x2d542d=_0xca253d['length'];_0x59d75e<_0x2d542d;_0x59d75e++){_0x3ae9f6+='%'+('00'+_0xca253d['charCodeAt'](_0x59d75e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3ae9f6);};_0x1db8['hCTzGt']=_0x1c8568,_0x1db8['QZJTlz']={},_0x1db8['zmiRUe']=!![];}var _0x5a1f84=_0x32ca97[0x0],_0x16249b=_0x1a1a0e+_0x5a1f84,_0x23c206=_0x1db8['QZJTlz'][_0x16249b];return!_0x23c206?(_0x1db8ae=_0x1db8['hCTzGt'](_0x1db8ae),_0x1db8['QZJTlz'][_0x16249b]=_0x1db8ae):_0x1db8ae=_0x23c206,_0x1db8ae;}function _defineProperties(_0x2d542d,_0x58f295){var _0x103ff8=_0x1db8;for(var _0x143a5a=0x0;_0x143a5a<_0x58f295['length'];_0x143a5a++){var _0x2b0f33=_0x58f295[_0x143a5a];_0x2b0f33['enumerable']=_0x2b0f33['enumerable']||![],_0x2b0f33[_0x103ff8(0x1d6)]=!![];if('value'in _0x2b0f33)_0x2b0f33['writable']=!![];Object[_0x103ff8(0x1b2)](_0x2d542d,_toPropertyKey(_0x2b0f33[_0x103ff8(0x1d0)]),_0x2b0f33);}}function _createClass(_0x1b0877,_0xce70d4,_0x4a7883){var _0x5de075=_0x1db8;if(_0xce70d4)_defineProperties(_0x1b0877[_0x5de075(0x1cc)],_0xce70d4);if(_0x4a7883)_defineProperties(_0x1b0877,_0x4a7883);return Object[_0x5de075(0x1b2)](_0x1b0877,_0x5de075(0x1cc),{'writable':![]}),_0x1b0877;}function _defineProperty(_0xb97bc2,_0x4d8f21,_0x2e9a51){return _0x4d8f21=_toPropertyKey(_0x4d8f21),_0x4d8f21 in _0xb97bc2?Object['defineProperty'](_0xb97bc2,_0x4d8f21,{'value':_0x2e9a51,'enumerable':!![],'configurable':!![],'writable':!![]}):_0xb97bc2[_0x4d8f21]=_0x2e9a51,_0xb97bc2;}function _toPropertyKey(_0x5534f3){var _0x4011d3=_toPrimitive(_0x5534f3,'string');return'symbol'==_typeof(_0x4011d3)?_0x4011d3:String(_0x4011d3);}function _toPrimitive(_0x3d5d49,_0x225f63){var _0x79c21f=_0x1db8;if('object'!=_typeof(_0x3d5d49)||!_0x3d5d49)return _0x3d5d49;var _0x36f656=_0x3d5d49[Symbol[_0x79c21f(0x1c5)]];if(void 0x0!==_0x36f656){var _0x49009c=_0x36f656[_0x79c21f(0x1bc)](_0x3d5d49,_0x225f63||_0x79c21f(0x19a));if(_0x79c21f(0x1b5)!=_typeof(_0x49009c))return _0x49009c;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x225f63?String:Number)(_0x3d5d49);}import*as _0xca253d from'deeptwins-cesium';import{isString}from'lodash';import _0x3ae9f6 from'../cameraControl/Rotate';import{CAMERA_EVENT_TYPE}from'../constant';function _0x32ca(){var _0x3d02bf=['yxbWzw5Kq2HPBgq','q2fYDgvZAwfUmG','x2nHBwvYyunOyw5Nzuv2zw50','x3vWzgf0zurPCMvJDgLVBG','mJu1nde0nLzIs0TUtq','q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U','C3LTyM9S','x3bPDgnOvgLTzxi','z2v0twfW','x3jVDgf0zq','z2XVyMu','CxvLCNLtzwXLy3rVCG','y29Uy2f0','sw1Hz2uVy29TCgfZCY9JB21WyxnZlwrPCMvJDgLVBI1YAwDODc1Hy3rPDMuUCg5N','zgvNksbYB3rHDgvAka','Bg5N','Axnezxn0CM95zwq','x3n0B3bdB250Aw51B3vZuM90yxrPB24','B25TB3vZzxvW','BwLU','AxrLCMf0B3i','zgvMAw5LuhjVCgvYDhK','mtzMANjYtee','Bw92zujHy2T3yxjK','B2jQzwn0','x3n0yxj0q29UDgLUDw91C1bPDgnO','B25TB3vZzwrVD24','y3jLyxrLrwXLBwvUDa','sw1Hz2uVy29TCgfZCY9JB21WyxnZlxbVAw50zxiUCg5N','x21HCenVBNrLEhq','zgvZDhjVEq','y2fSBa','y29UDgfPBMvY','mtCWndi5nxDItLjVCG','q0HbtKDfra','C3jJ','zNvUy3rPB24','C2v0vMLLDW','B25TB3vZzwXLyxzL','CMLNAhreAxjLy3rPB24','Dg9qCMLTAxrPDMu','ntu0nZGWne5Itw51Ca','CgLJA0vSBgLWC29Pza','mJy0nZm4mLzysvjeuW','zgvLChr3Aw5ZlwnVBxbHC3mTBgvMDc1KAxjLy3rPB24','ntiXnZG3vgDIDhbt','sw1Hz2uVy29TCgfZCY9JB21WyxnZlxbPDgnOlwrVD24Tywn0AxzLlNbUzW','ChjVDg90ExbL','x2LZuM90yxrPBMC','DhjHBNnMB3jT','x3n0B3bdB250Aw51B3vZugL0y2G','A2v5','y2fUDMfZ','x2LZugL0y2HPBMC','x3jVDgf0zvrPBwvY','zgvLChr3Aw5ZlwnVBxbHC3mTCMLNAhqTzgLYzwn0Aw9U','B25TB3vZzwvUDgvY','y29UzMLNDxjHyMXL','y29UC3rYDwn0B3i','CgL0y2G','Bgf0','mte0mJu3mwPLzKz1vq','z2v0rwXLBwvUDej5swq','sw1Hz2uVy29TCgfZCY9JB21WyxnZlwrPCMvJDgLVBI1YAwDODc5WBMC','sw1Hz2uVy29TCgfZCY9JB21WyxnZlxbPDgnOlxvWlNbUzW','x3n0yxj0q29UDgLUDw91C1jVDgf0Aw9U','mJaZmZqYodbyCfvbBg8','CMvTB3zLq2HPBgq','x2nHBK9WzxjHDgu','y29TCgfZC0vS','sw1Hz2uVy29TCgfZCY9JB21WyxnZlxbPDgnOlxvWlwfJDgL2zs5WBMC','Aw1N','y2XHC3noyw1L','x2nYzwf0zq','zgvMyxvSDa','C3r5Bgu','BgvMDerPCMvJDgLVBG'];_0x32ca=function(){return _0x3d02bf;};return _0x32ca();}import{error,getDeepTwinsFile,lngLatAltToCartesian3,toDegrees,toRadians}from'../tool/utils';var Compass=(function(){var _0xcb249e=_0x1db8;function _0x283ea9(_0x539d86,_0xb0db6e){var _0x5091df=_0x1db8,_0xda3dbf=this;_classCallCheck(this,_0x283ea9),_defineProperty(this,'_mapContext',void 0x0),_defineProperty(this,_0x5091df(0x1ad),![]),_defineProperty(this,_0x5091df(0x1bd),void 0x0),_defineProperty(this,_0x5091df(0x19f),void 0x0),_defineProperty(this,'_rotate',void 0x0),_defineProperty(this,_0x5091df(0x195),{}),_defineProperty(this,_0x5091df(0x1d3),null),_defineProperty(this,'_isRotating',![]),_defineProperty(this,_0x5091df(0x1a4),null),_defineProperty(this,_0x5091df(0x1d2),![]),this[_0x5091df(0x1ba)]=_0x539d86['_mapContext'],this['container']=isString(_0xb0db6e)?document[_0x5091df(0x18e)](_0xb0db6e):_0xb0db6e,this[_0x5091df(0x1a6)]=new _0x3ae9f6(_0x539d86),this['_cameraChangeEvent']=this[_0x5091df(0x1a5)]()['on'](CAMERA_EVENT_TYPE[_0x5091df(0x1bf)],function(_0xc9992e){_0xda3dbf['_updateDirection'](_0xc9992e===null||_0xc9992e===void 0x0?void 0x0:_0xc9992e['position']);}),this[_0x5091df(0x199)]();}return _createClass(_0x283ea9,[{'key':_0xcb249e(0x194),'value':function _0x596c9d(){if(this['isDestroyed'])return error('Compass实例已销毁'),![];return!![];}},{'key':'getMap','value':function _0xe65189(){var _0x400c73=_0xcb249e;return this[_0x400c73(0x1ba)]&&this['_mapContext']['getMap']();}},{'key':'_create','value':function _0x39fbe2(){var _0x4edc08=_0xcb249e,_0xe5b996=this;if(!this['_canOperate']())return;var _0x58088f=document['createElement']('div');_0x58088f[_0x4edc08(0x198)]='deeptwins-compass';var _0x55629b=document[_0x4edc08(0x1b8)]('img');_0x55629b[_0x4edc08(0x198)]='deeptwins-compass-bg',_0x55629b['src']=getDeepTwinsFile('Image/compass/compass-bg.png'),_0x58088f[_0x4edc08(0x19d)](_0x55629b);var _0x2ea06f=document['createElement'](_0x4edc08(0x197));_0x2ea06f[_0x4edc08(0x198)]=_0x4edc08(0x1c9);var _0x1da114=getDeepTwinsFile('Image/compass/compass-direction-left.png'),_0xd054d5=getDeepTwinsFile('Image/compass/compass-direction-left-active.png');_0x2ea06f[_0x4edc08(0x1c0)]=_0x1da114,_0x58088f['appendChild'](_0x2ea06f),_0x2ea06f['onmouseenter']=function(){_0x2ea06f['src']=_0xd054d5;},_0x2ea06f['onmousedown']=function(){_0x2ea06f['src']=_0xd054d5,_0xe5b996['_startContinuousRotation'](0x1);},_0x2ea06f[_0x4edc08(0x1af)]=function(){var _0xb7b86b=_0x4edc08;_0x2ea06f[_0xb7b86b(0x1c0)]=_0x1da114,_0xe5b996[_0xb7b86b(0x1ae)]();},_0x2ea06f['onmouseleave']=function(){_0x2ea06f['src']=_0x1da114,_0xe5b996['_stopContinuousRotation']();},this[_0x4edc08(0x195)][_0x4edc08(0x19c)]=_0x2ea06f;var _0x39f405=document['createElement']('img');_0x39f405['className']='deeptwins-compass-pointer',_0x39f405[_0x4edc08(0x1c0)]=getDeepTwinsFile(_0x4edc08(0x1b9)),_0x58088f[_0x4edc08(0x19d)](_0x39f405),this['compassEl']['pointer']=_0x39f405;var _0x40d2d6=document[_0x4edc08(0x1b8)](_0x4edc08(0x197));_0x40d2d6[_0x4edc08(0x198)]=_0x4edc08(0x1d4);var _0x57ddc4=getDeepTwinsFile(_0x4edc08(0x18f)),_0x4a2826=getDeepTwinsFile(_0x4edc08(0x1aa));_0x40d2d6['src']=_0x57ddc4,_0x58088f['appendChild'](_0x40d2d6),_0x40d2d6[_0x4edc08(0x1d5)]=function(){var _0x2c246d=_0x4edc08;_0x40d2d6[_0x2c246d(0x1c0)]=_0x4a2826;},_0x40d2d6['onmousedown']=function(){_0x40d2d6['src']=_0x4a2826,_0xe5b996['_startContinuousRotation'](-0x1);},_0x40d2d6['onmouseup']=function(){var _0x5b11eb=_0x4edc08;_0x40d2d6['src']=_0x57ddc4,_0xe5b996[_0x5b11eb(0x1ae)]();},_0x40d2d6['onmouseleave']=function(){var _0xda1fb9=_0x4edc08;_0x40d2d6['src']=_0x57ddc4,_0xe5b996[_0xda1fb9(0x1ae)]();},this[_0x4edc08(0x195)][_0x4edc08(0x1c4)]=_0x40d2d6;var _0x55921d=document['createElement']('img');_0x55921d[_0x4edc08(0x198)]='deeptwins-compass-pitch-up';var _0x10946d=getDeepTwinsFile(_0x4edc08(0x190)),_0xc452ca=getDeepTwinsFile(_0x4edc08(0x196));_0x55921d[_0x4edc08(0x1c0)]=_0x10946d,_0x58088f[_0x4edc08(0x19d)](_0x55921d),_0x55921d['onmouseenter']=function(){_0x55921d['src']=_0xc452ca;},_0x55921d['onmousedown']=function(){var _0x4b6465=_0x4edc08;_0x55921d[_0x4b6465(0x1c0)]=_0xc452ca,_0xe5b996[_0x4b6465(0x1b6)](0x1);},_0x55921d[_0x4edc08(0x1af)]=function(){_0x55921d['src']=_0x10946d,_0xe5b996['_stopContinuousPitch']();},_0x55921d[_0x4edc08(0x1c3)]=function(){_0x55921d['src']=_0x10946d,_0xe5b996['_stopContinuousPitch']();},this[_0x4edc08(0x195)]['pitchUp']=_0x55921d;var _0x2c3687=document['createElement'](_0x4edc08(0x197));_0x2c3687[_0x4edc08(0x198)]='deeptwins-compass-pitch-down';var _0x4f6c7a=getDeepTwinsFile('Image/compass/compass-pitch-down.png'),_0x452cec=getDeepTwinsFile(_0x4edc08(0x1cb));_0x2c3687[_0x4edc08(0x1c0)]=_0x4f6c7a,_0x58088f['appendChild'](_0x2c3687),_0x2c3687[_0x4edc08(0x1d5)]=function(){var _0x2544f4=_0x4edc08;_0x2c3687[_0x2544f4(0x1c0)]=_0x452cec;},_0x2c3687[_0x4edc08(0x1b7)]=function(){var _0x411bb5=_0x4edc08;_0x2c3687[_0x411bb5(0x1c0)]=_0x452cec,_0xe5b996['_startContinuousPitch'](-0x1);},_0x2c3687[_0x4edc08(0x1af)]=function(){var _0x3d7509=_0x4edc08;_0x2c3687[_0x3d7509(0x1c0)]=_0x4f6c7a,_0xe5b996[_0x3d7509(0x1cf)]();},_0x2c3687['onmouseleave']=function(){_0x2c3687['src']=_0x4f6c7a,_0xe5b996['_stopContinuousPitch']();},this[_0x4edc08(0x195)]['pitchDown']=_0x2c3687,this['container'][_0x4edc08(0x19d)](_0x58088f),this[_0x4edc08(0x1a0)](this['getMap']()['getCameraView']());}},{'key':'_updateDirection','value':function _0x197431(_0x264c42){var _0x16485a=_0xcb249e;if(!this['_canOperate']())return;var _0x377e71=_0x264c42||{},_0x4a3277=_0x377e71[_0x16485a(0x1d8)],_0x370960=_0x377e71['heading'];this[_0x16485a(0x195)]['pointer'][_0x16485a(0x19b)][_0x16485a(0x1ce)]='rotateX('[_0x16485a(0x1a9)](Math[_0x16485a(0x1b0)](0x5a+_0x4a3277,0x50),_0x16485a(0x1ab))['concat'](0x168-_0x370960,'deg)');}},{'key':_0xcb249e(0x191),'value':function _0xee85e8(_0x92b5a){var _0x5422a7=_0xcb249e,_0xd1bb06=this;if(!this[_0x5422a7(0x194)]())return;if(this['_isRotating'])return;this['_isRotating']=!![];var _0x52ea9c=function _0x2f24e7(){var _0x426895=_0x5422a7;if(!_0xd1bb06[_0x426895(0x1cd)])return;_0xd1bb06['_rotate']['start']({'duration':0x0,'angle':_0x92b5a*0x2}),_0xd1bb06['_updateDirection'](_0xd1bb06[_0x426895(0x1a5)]()['getCameraView']()),_0xd1bb06[_0x426895(0x1d3)]=setTimeout(_0x2f24e7,0x10);};_0x52ea9c();}},{'key':'_stopContinuousRotation','value':function _0xdbe732(){var _0x57d4f9=_0xcb249e;if(!this[_0x57d4f9(0x194)]())return;this[_0x57d4f9(0x1cd)]=![],this[_0x57d4f9(0x1d3)]&&(clearTimeout(this[_0x57d4f9(0x1d3)]),this[_0x57d4f9(0x1d3)]=null);}},{'key':'_startContinuousPitch','value':function _0x67f23a(_0x58aee0){var _0x50518b=_0xcb249e,_0x50c6f2=this;if(!this['_canOperate']())return;if(this['_isPitching'])return;this[_0x50518b(0x1d2)]=!![];var _0x3b898f=function _0x17e6fb(){var _0x9eb4fd=_0x50518b;if(!_0x50c6f2[_0x9eb4fd(0x1d2)])return;if(_0x58aee0===0x1&&toDegrees(_0x50c6f2[_0x9eb4fd(0x1a5)]()['camera']['pitch'])>=-0xa)return;var _0x3ab2bf=_0x50c6f2[_0x9eb4fd(0x1a5)]()['getMapCenter'](),_0xcdd83f=_0x3ab2bf[_0x9eb4fd(0x1ac)],_0x2050c3=_0x3ab2bf[_0x9eb4fd(0x18c)],_0x1a0bc8=_0x3ab2bf['alt'],_0x510e17=lngLatAltToCartesian3(_0xcdd83f,_0x2050c3,_0x1a0bc8),_0x545d31=_0x50c6f2[_0x9eb4fd(0x1a5)]()['camera']['position'],_0x1831a5=_0x50c6f2['getMap']()['camera'][_0x9eb4fd(0x1c7)](new _0xca253d[(_0x9eb4fd(0x19e))](_0x50c6f2['getMap']()[_0x9eb4fd(0x1d1)]['clientWidth']/0x2,_0x50c6f2['getMap']()['canvas']['clientHeight']/0x2),_0x50c6f2['getMap']()['scene'][_0x9eb4fd(0x1a7)]['ellipsoid']),_0x3d2a54=_0xca253d['Cartesian3']['distance'](_0x545d31,_0x1831a5),_0x35d189=Math['min'](toRadians(-0x9),Math['max'](toRadians(-0x59),_0x50c6f2[_0x9eb4fd(0x1a5)]()['camera']['pitch']+toRadians(_0x58aee0)));_0x50c6f2['getMap']()['scene']['camera'][_0x9eb4fd(0x1c2)]({'destination':_0x510e17,'orientation':{'heading':_0x50c6f2[_0x9eb4fd(0x1a5)]()['camera']['heading'],'pitch':_0x35d189}}),_0x50c6f2[_0x9eb4fd(0x1a5)]()['scene']['camera'][_0x9eb4fd(0x1b4)](_0x3d2a54),_0x50c6f2['_pitchTimer']=setTimeout(_0x17e6fb,0x10);};_0x3b898f();}},{'key':'_stopContinuousPitch','value':function _0x465443(){var _0x2299f9=_0xcb249e;if(!this['_canOperate']())return;this[_0x2299f9(0x1d2)]=![],this[_0x2299f9(0x1a4)]&&(clearTimeout(this['_pitchTimer']),this[_0x2299f9(0x1a4)]=null);}},{'key':_0xcb249e(0x1bb),'value':function _0x5b4451(){var _0x4b32e6=_0xcb249e;if(!this[_0x4b32e6(0x194)]())return;this[_0x4b32e6(0x1ad)]=!![],this[_0x4b32e6(0x1bd)][_0x4b32e6(0x193)](this[_0x4b32e6(0x1bd)][_0x4b32e6(0x1a8)]('.deeptwins-compass')),this['_cameraChangeEvent']&&this[_0x4b32e6(0x19f)]['off'](),this['_cameraChangeEvent']=null,this[_0x4b32e6(0x1ae)](),this['_stopContinuousPitch'](),this['compassEl']={};}}]),_0x283ea9;}());export default Compass;