deeptwins-engine-3d 0.1.76 → 0.2.0
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/assets/Build/DeepTwins/Image/noise.png +0 -0
- package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
- package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
- package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
- package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
- package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
- package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
- package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
- package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
- package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
- package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
- package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
- package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
- package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
- package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
- package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
- package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
- package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
- package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
- package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
- package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
- package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
- package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
- package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
- package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
- package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
- package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
- package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
- package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
- package/dist/esm/analyze/SunLightAnalysis.js +1 -91
- package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
- package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
- package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
- package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
- package/dist/esm/cameraControl/Roam.js +1 -418
- package/dist/esm/cameraControl/Rotate.js +1 -134
- package/dist/esm/cameraControl/RotateInPlace.js +1 -99
- package/dist/esm/constant.d.ts +90 -0
- package/dist/esm/constant.js +1 -1287
- package/dist/esm/deepTwins/index.js +1 -121
- package/dist/esm/drawCommand/index.js +1 -3
- package/dist/esm/drawCommand/viewShed/Event.js +1 -142
- package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
- package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
- package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
- package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
- package/dist/esm/drawCommand/viewShed/config.js +1 -21
- package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
- package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
- package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
- package/dist/esm/drawer/algorithm.js +1 -314
- package/dist/esm/drawer/common.js +1 -965
- package/dist/esm/drawer/coordinate.js +1 -184
- package/dist/esm/drawer/index.d.ts +1 -1
- package/dist/esm/drawer/index.js +1 -688
- package/dist/esm/drawer/plotUtil.js +1 -266
- package/dist/esm/drawer/shape/Assemble.js +1 -415
- package/dist/esm/drawer/shape/AttackArrow.js +1 -442
- package/dist/esm/drawer/shape/BaseShape.js +1 -383
- package/dist/esm/drawer/shape/Bow.js +1 -375
- package/dist/esm/drawer/shape/Circle.js +1 -461
- package/dist/esm/drawer/shape/Curve.js +1 -386
- package/dist/esm/drawer/shape/DragPoint.js +1 -211
- package/dist/esm/drawer/shape/Elliptic.js +1 -491
- package/dist/esm/drawer/shape/Formation.js +1 -395
- package/dist/esm/drawer/shape/PincerArrow.js +1 -445
- package/dist/esm/drawer/shape/Point.js +1 -131
- package/dist/esm/drawer/shape/Polygon.js +1 -368
- package/dist/esm/drawer/shape/Polyline.js +1 -325
- package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
- package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
- package/dist/esm/drawer/shape/Sector.js +1 -568
- package/dist/esm/drawer/shape/StraightArrow.js +1 -422
- package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
- package/dist/esm/drawer/types.js +1 -11
- package/dist/esm/drawer/utils.js +1 -381
- package/dist/esm/global.css +22 -1
- package/dist/esm/graphicLayer/BaseEntity.js +1 -51
- package/dist/esm/graphicLayer/BaseLayer.js +1 -730
- package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
- package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
- package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
- package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/graphicLayer/BaseSource.js +1 -630
- package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
- package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
- package/dist/esm/graphicLayer/BoxEntity.js +1 -99
- package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
- package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
- package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
- package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
- package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
- package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
- package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
- package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
- package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
- package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
- package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
- package/dist/esm/graphicLayer/LabelEntity.js +1 -110
- package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
- package/dist/esm/graphicLayer/ModelEntity.js +1 -122
- package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
- package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
- package/dist/esm/graphicLayer/PointEntity.js +1 -94
- package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
- package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
- package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
- package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
- package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
- package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
- package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
- package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
- package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
- package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
- package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
- package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
- package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
- package/dist/esm/graphicLayer/WallEntity.js +1 -96
- package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
- package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +1 -175
- package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
- package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
- package/dist/esm/lowAltitude/FactorLayer.js +1 -199
- package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
- package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
- package/dist/esm/lowAltitude/GridDraw.js +1 -137
- package/dist/esm/lowAltitude/PoiLayer.js +1 -74
- package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
- package/dist/esm/lowAltitude/VisitLayer.js +1 -180
- package/dist/esm/map/Event.js +1 -377
- package/dist/esm/map/GroundSkyBox.js +1 -166
- package/dist/esm/map/Map.js +1 -881
- package/dist/esm/map/Property.js +1 -35
- package/dist/esm/material/AtmosphericDispersion.js +1 -569
- package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
- package/dist/esm/material/VolumeCloud.js +1 -115
- package/dist/esm/material/WeatherEffects.js +1 -351
- package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
- package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
- package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
- package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
- package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
- package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
- package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
- package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
- package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
- package/dist/esm/measure/Area.js +1 -220
- package/dist/esm/measure/BaseDraw.js +1 -105
- package/dist/esm/measure/Distance.js +1 -223
- package/dist/esm/measure/index.js +1 -266
- package/dist/esm/measure/types.js +1 -17
- package/dist/esm/measure/utils.js +1 -319
- package/dist/esm/particle/BaseParticle.js +1 -196
- package/dist/esm/particle/FireParticle.js +1 -65
- package/dist/esm/particle/FountainParticle.js +1 -80
- package/dist/esm/particle/SmokeParticle.js +1 -65
- package/dist/esm/particle/common.js +1 -23
- package/dist/esm/particle/index.js +1 -5
- package/dist/esm/property/PositionProperty.js +1 -56
- package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
- package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
- package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
- package/dist/esm/tileLayer/ImageryLayer.js +1 -44
- package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
- package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
- package/dist/esm/tileLayer/RasterLayer.js +1 -23
- package/dist/esm/tileLayer/WmsLayer.js +1 -26
- package/dist/esm/tileLayer/WmtsLayer.js +1 -23
- package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
- package/dist/esm/tool/Compass.js +1 -282
- package/dist/esm/tool/PrimitiveCluster.js +1 -706
- package/dist/esm/tool/TimerInterval.js +1 -58
- package/dist/esm/tool/common.js +1 -405
- package/dist/esm/tool/fetch.js +1 -222
- package/dist/esm/tool/heatmap.js +1 -631
- package/dist/esm/tool/utils.d.ts +1 -0
- package/dist/esm/tool/utils.js +1 -501
- package/dist/esm/toolTip/index.js +1 -79
- package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
- package/dist/esm/videoFusion/BaseVideo.js +1 -330
- package/dist/esm/videoFusion/VideoProject.js +1 -230
- package/dist/esm/videoFusion/VideoTexture.js +1 -163
- package/dist/esm/visualization/BaseHeatmap.js +1 -271
- package/dist/esm/visualization/BoundaryHighlight.d.ts +136 -0
- package/dist/esm/visualization/BoundaryHighlight.js +1 -0
- package/dist/esm/visualization/DynamicWater.js +1 -289
- package/dist/esm/visualization/Frustum.js +1 -248
- package/dist/esm/visualization/Heatmap2d.js +1 -97
- package/dist/esm/visualization/Heatmap3d.js +1 -281
- package/dist/esm/visualization/MigrationEffect.js +1 -397
- package/dist/esm/visualization/PointCluster.js +1 -220
- package/dist/esm/visualization/RadarScan.js +1 -333
- package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
- package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
- package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
- package/dist/esm/visualization/SampledTerrainWater.js +1 -0
- package/dist/esm/visualization/WindField.d.ts +72 -0
- package/dist/esm/visualization/WindField.js +1 -0
- package/dist/esm/visualization/windCore.d.ts +161 -0
- package/dist/esm/visualization/windCore.js +8 -0
- package/dist/umd/deeptwins-engine-3d.min.css +1 -1
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +6 -4
|
@@ -1,326 +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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
10
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
|
-
function _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; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
-
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); }
|
|
14
|
-
import * as Cesium from 'deeptwins-cesium';
|
|
15
|
-
import { merge } from 'lodash';
|
|
16
|
-
import { DEFAULT_LINE_OF_SIGHT_ANALYSIS_OPTIONS } from "../constant";
|
|
17
|
-
import * as utils from "../tool/utils";
|
|
18
|
-
// 通视分析。
|
|
19
|
-
var LineOfSightAnalysis = /*#__PURE__*/function () {
|
|
20
|
-
function LineOfSightAnalysis(map) {
|
|
21
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
22
|
-
_classCallCheck(this, LineOfSightAnalysis);
|
|
23
|
-
_defineProperty(this, "_mapContext", void 0);
|
|
24
|
-
_defineProperty(this, "options", void 0);
|
|
25
|
-
_defineProperty(this, "isDestroyed", false);
|
|
26
|
-
_defineProperty(this, "_lineLayer", null);
|
|
27
|
-
_defineProperty(this, "_pointLayer", null);
|
|
28
|
-
_defineProperty(this, "_result", null);
|
|
29
|
-
this._mapContext = map._mapContext;
|
|
30
|
-
this.options = merge(DEFAULT_LINE_OF_SIGHT_ANALYSIS_OPTIONS(), options);
|
|
31
|
-
this._replaceArrayOptions(options);
|
|
32
|
-
if (this.options.position && this.options.positionEnd) {
|
|
33
|
-
this.create();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// 是否能进行操作
|
|
38
|
-
_createClass(LineOfSightAnalysis, [{
|
|
39
|
-
key: "_canOperate",
|
|
40
|
-
value: function _canOperate() {
|
|
41
|
-
if (this.isDestroyed) {
|
|
42
|
-
utils.error('LineOfSightAnalysis实例已销毁');
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
|
-
key: "_replaceArrayOptions",
|
|
49
|
-
value: function _replaceArrayOptions() {
|
|
50
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(options, 'position')) {
|
|
52
|
-
this.options.position = options.position;
|
|
53
|
-
}
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(options, 'positionEnd')) {
|
|
55
|
-
this.options.positionEnd = options.positionEnd;
|
|
56
|
-
}
|
|
57
|
-
if (Object.prototype.hasOwnProperty.call(options, 'objectsToExclude')) {
|
|
58
|
-
this.options.objectsToExclude = options.objectsToExclude;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
key: "_normalizePosition",
|
|
63
|
-
value: function _normalizePosition(position) {
|
|
64
|
-
if (!Array.isArray(position) || position.length < 2) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
var _position = _slicedToArray(position, 3),
|
|
68
|
-
lng = _position[0],
|
|
69
|
-
lat = _position[1],
|
|
70
|
-
_position$ = _position[2],
|
|
71
|
-
alt = _position$ === void 0 ? 0 : _position$;
|
|
72
|
-
if (!Number.isFinite(lng) || !Number.isFinite(lat) || !Number.isFinite(alt)) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
return [lng, lat, alt];
|
|
76
|
-
}
|
|
77
|
-
}, {
|
|
78
|
-
key: "_toCartesian",
|
|
79
|
-
value: function _toCartesian(position) {
|
|
80
|
-
var _position2 = _slicedToArray(position, 3),
|
|
81
|
-
lng = _position2[0],
|
|
82
|
-
lat = _position2[1],
|
|
83
|
-
alt = _position2[2];
|
|
84
|
-
return utils.lngLatAltToCartesian3(lng, lat, alt);
|
|
85
|
-
}
|
|
86
|
-
}, {
|
|
87
|
-
key: "_getPositionPair",
|
|
88
|
-
value: function _getPositionPair() {
|
|
89
|
-
var position = this._normalizePosition(this.options.position);
|
|
90
|
-
var positionEnd = this._normalizePosition(this.options.positionEnd);
|
|
91
|
-
if (!position || !positionEnd) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
position: position,
|
|
96
|
-
positionEnd: positionEnd
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}, {
|
|
100
|
-
key: "getMap",
|
|
101
|
-
value: function getMap() {
|
|
102
|
-
return this._mapContext && this._mapContext.getMap();
|
|
103
|
-
}
|
|
104
|
-
}, {
|
|
105
|
-
key: "create",
|
|
106
|
-
value: function create() {
|
|
107
|
-
if (!this._canOperate()) return null;
|
|
108
|
-
this._clearLayers();
|
|
109
|
-
var result = this._analyze();
|
|
110
|
-
this._result = result;
|
|
111
|
-
if (result) {
|
|
112
|
-
this._draw(result);
|
|
113
|
-
this.options.onComplete && this.options.onComplete(result);
|
|
114
|
-
}
|
|
115
|
-
return result;
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
key: "update",
|
|
119
|
-
value: function update() {
|
|
120
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
121
|
-
if (!this._canOperate()) return null;
|
|
122
|
-
this.options = merge({}, this.options, options);
|
|
123
|
-
this._replaceArrayOptions(options);
|
|
124
|
-
return this.create();
|
|
125
|
-
}
|
|
126
|
-
}, {
|
|
127
|
-
key: "setPositions",
|
|
128
|
-
value: function setPositions(position, positionEnd) {
|
|
129
|
-
if (!this._canOperate()) return null;
|
|
130
|
-
this.options.position = position;
|
|
131
|
-
this.options.positionEnd = positionEnd;
|
|
132
|
-
return this.create();
|
|
133
|
-
}
|
|
134
|
-
}, {
|
|
135
|
-
key: "getResult",
|
|
136
|
-
value: function getResult() {
|
|
137
|
-
return this._result;
|
|
138
|
-
}
|
|
139
|
-
}, {
|
|
140
|
-
key: "_analyze",
|
|
141
|
-
value: function _analyze() {
|
|
142
|
-
var _this$getMap;
|
|
143
|
-
var positionPair = this._getPositionPair();
|
|
144
|
-
if (!positionPair) {
|
|
145
|
-
return null;
|
|
146
|
-
}
|
|
147
|
-
var position = positionPair.position,
|
|
148
|
-
positionEnd = positionPair.positionEnd;
|
|
149
|
-
var start = this._toCartesian(position);
|
|
150
|
-
var end = this._toCartesian(positionEnd);
|
|
151
|
-
var direction = Cesium.Cartesian3.subtract(end, start, new Cesium.Cartesian3());
|
|
152
|
-
var distance = Cesium.Cartesian3.magnitude(direction);
|
|
153
|
-
if (distance <= 0) {
|
|
154
|
-
return {
|
|
155
|
-
visible: true,
|
|
156
|
-
distance: 0,
|
|
157
|
-
position: position,
|
|
158
|
-
positionEnd: positionEnd
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
Cesium.Cartesian3.normalize(direction, direction);
|
|
162
|
-
var scene = (_this$getMap = this.getMap()) === null || _this$getMap === void 0 ? void 0 : _this$getMap.scene;
|
|
163
|
-
if (!scene || typeof scene.pickFromRay !== 'function') {
|
|
164
|
-
utils.error('当前场景不支持pickFromRay,无法进行通视分析');
|
|
165
|
-
return null;
|
|
166
|
-
}
|
|
167
|
-
var ray = new Cesium.Ray(start, direction);
|
|
168
|
-
var pickResult = scene.pickFromRay(ray, this.options.objectsToExclude, this.options.pickWidth);
|
|
169
|
-
var obstructionCartesian = pickResult === null || pickResult === void 0 ? void 0 : pickResult.position;
|
|
170
|
-
if (!obstructionCartesian) {
|
|
171
|
-
return {
|
|
172
|
-
visible: true,
|
|
173
|
-
distance: distance,
|
|
174
|
-
position: position,
|
|
175
|
-
positionEnd: positionEnd
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
var obstructionDistance = Cesium.Cartesian3.distance(start, obstructionCartesian);
|
|
179
|
-
var tolerance = Math.max(Number(this.options.tolerance) || 0, 0);
|
|
180
|
-
var visible = obstructionDistance >= distance - tolerance;
|
|
181
|
-
var obstructionPosition = utils.cartesian3ToLngLatAlt(obstructionCartesian);
|
|
182
|
-
return {
|
|
183
|
-
visible: visible,
|
|
184
|
-
distance: distance,
|
|
185
|
-
position: position,
|
|
186
|
-
positionEnd: positionEnd,
|
|
187
|
-
obstructionDistance: obstructionDistance,
|
|
188
|
-
obstructionPosition: obstructionPosition,
|
|
189
|
-
pickedObject: pickResult.object
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
}, {
|
|
193
|
-
key: "_buildLineGeoJson",
|
|
194
|
-
value: function _buildLineGeoJson(result) {
|
|
195
|
-
var features = [];
|
|
196
|
-
var position = result.position,
|
|
197
|
-
positionEnd = result.positionEnd,
|
|
198
|
-
obstructionPosition = result.obstructionPosition;
|
|
199
|
-
var obstruction = obstructionPosition ? [obstructionPosition.lng, obstructionPosition.lat, obstructionPosition.alt] : null;
|
|
200
|
-
if (result.visible || !obstruction) {
|
|
201
|
-
features.push(this._lineFeature(position, positionEnd, true));
|
|
202
|
-
} else {
|
|
203
|
-
features.push(this._lineFeature(position, obstruction, true));
|
|
204
|
-
features.push(this._lineFeature(obstruction, positionEnd, false));
|
|
205
|
-
}
|
|
206
|
-
return {
|
|
207
|
-
type: 'FeatureCollection',
|
|
208
|
-
features: features
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}, {
|
|
212
|
-
key: "_buildPointGeoJson",
|
|
213
|
-
value: function _buildPointGeoJson(result) {
|
|
214
|
-
var features = [this._pointFeature(result.position, 'start'), this._pointFeature(result.positionEnd, 'end')];
|
|
215
|
-
if (this.options.showObstructionPoint && !result.visible && result.obstructionPosition) {
|
|
216
|
-
features.push(this._pointFeature([result.obstructionPosition.lng, result.obstructionPosition.lat, result.obstructionPosition.alt], 'obstruction'));
|
|
217
|
-
}
|
|
218
|
-
return {
|
|
219
|
-
type: 'FeatureCollection',
|
|
220
|
-
features: features
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
}, {
|
|
224
|
-
key: "_lineFeature",
|
|
225
|
-
value: function _lineFeature(start, end, visible) {
|
|
226
|
-
return {
|
|
227
|
-
type: 'Feature',
|
|
228
|
-
properties: {
|
|
229
|
-
visible: visible
|
|
230
|
-
},
|
|
231
|
-
geometry: {
|
|
232
|
-
type: 'LineString',
|
|
233
|
-
coordinates: [start, end]
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
}, {
|
|
238
|
-
key: "_pointFeature",
|
|
239
|
-
value: function _pointFeature(position, type) {
|
|
240
|
-
return {
|
|
241
|
-
type: 'Feature',
|
|
242
|
-
properties: {
|
|
243
|
-
type: type
|
|
244
|
-
},
|
|
245
|
-
geometry: {
|
|
246
|
-
type: 'Point',
|
|
247
|
-
coordinates: position
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
}, {
|
|
252
|
-
key: "_draw",
|
|
253
|
-
value: function _draw(result) {
|
|
254
|
-
var _this = this;
|
|
255
|
-
if (this.options.showLine) {
|
|
256
|
-
this._lineLayer = this.getMap().addGraphicLayer(this._buildLineGeoJson(result), {
|
|
257
|
-
type: 'polyline',
|
|
258
|
-
style: {
|
|
259
|
-
width: this.options.lineWidth,
|
|
260
|
-
material: function material(properties) {
|
|
261
|
-
return properties.visible ? _this.options.visibleColor : _this.options.invisibleColor;
|
|
262
|
-
},
|
|
263
|
-
depthFailMaterial: function depthFailMaterial(properties) {
|
|
264
|
-
return properties.visible ? _this.options.visibleColor : _this.options.invisibleColor;
|
|
265
|
-
},
|
|
266
|
-
clampToGround: false
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
if (this.options.showPoint) {
|
|
271
|
-
this._pointLayer = this.getMap().addGraphicLayer(this._buildPointGeoJson(result), {
|
|
272
|
-
type: 'point',
|
|
273
|
-
style: {
|
|
274
|
-
pixelSize: this.options.pointPixelSize,
|
|
275
|
-
color: function color(properties) {
|
|
276
|
-
return properties.type === 'obstruction' ? _this.options.obstructionPointColor : _this.options.pointColor;
|
|
277
|
-
},
|
|
278
|
-
outlineColor: '#ffffff',
|
|
279
|
-
outlineWidth: 2
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}, {
|
|
285
|
-
key: "_clearLayers",
|
|
286
|
-
value: function _clearLayers() {
|
|
287
|
-
if (this._lineLayer) {
|
|
288
|
-
this._lineLayer.remove();
|
|
289
|
-
this._lineLayer = null;
|
|
290
|
-
}
|
|
291
|
-
if (this._pointLayer) {
|
|
292
|
-
this._pointLayer.remove();
|
|
293
|
-
this._pointLayer = null;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}, {
|
|
297
|
-
key: "flyTo",
|
|
298
|
-
value: function flyTo() {
|
|
299
|
-
if (!this._canOperate()) return;
|
|
300
|
-
if (this._lineLayer) {
|
|
301
|
-
this._lineLayer.flyTo();
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
if (this._pointLayer) {
|
|
305
|
-
this._pointLayer.flyTo();
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}, {
|
|
309
|
-
key: "clear",
|
|
310
|
-
value: function clear() {
|
|
311
|
-
if (!this._canOperate()) return;
|
|
312
|
-
this._clearLayers();
|
|
313
|
-
this._result = null;
|
|
314
|
-
}
|
|
315
|
-
}, {
|
|
316
|
-
key: "destroy",
|
|
317
|
-
value: function destroy() {
|
|
318
|
-
if (!this._canOperate()) return;
|
|
319
|
-
this._clearLayers();
|
|
320
|
-
this._result = null;
|
|
321
|
-
this.isDestroyed = true;
|
|
322
|
-
}
|
|
323
|
-
}]);
|
|
324
|
-
return LineOfSightAnalysis;
|
|
325
|
-
}();
|
|
326
|
-
export default LineOfSightAnalysis;
|
|
1
|
+
(function(_0x202f26,_0x49cf84){var _0x4db10f=_0x3b0e,_0x2cbe58=_0x202f26();while(!![]){try{var _0x51ca8d=-parseInt(_0x4db10f(0x1d8))/0x1*(-parseInt(_0x4db10f(0x1c3))/0x2)+parseInt(_0x4db10f(0x1ce))/0x3*(-parseInt(_0x4db10f(0x19e))/0x4)+parseInt(_0x4db10f(0x1ad))/0x5*(parseInt(_0x4db10f(0x1d0))/0x6)+-parseInt(_0x4db10f(0x1a6))/0x7+parseInt(_0x4db10f(0x1a7))/0x8+-parseInt(_0x4db10f(0x1a5))/0x9+parseInt(_0x4db10f(0x190))/0xa*(parseInt(_0x4db10f(0x185))/0xb);if(_0x51ca8d===_0x49cf84)break;else _0x2cbe58['push'](_0x2cbe58['shift']());}catch(_0x547f6f){_0x2cbe58['push'](_0x2cbe58['shift']());}}}(_0x1435,0x9ab8a));function _typeof(_0x5d8a70){'@babel/helpers - typeof';var _0xddb4a9=_0x3b0e;return _typeof='function'==typeof Symbol&&_0xddb4a9(0x186)==typeof Symbol['iterator']?function(_0x51a5f7){return typeof _0x51a5f7;}:function(_0x2f201a){var _0x383e09=_0xddb4a9;return _0x2f201a&&'function'==typeof Symbol&&_0x2f201a[_0x383e09(0x1cc)]===Symbol&&_0x2f201a!==Symbol['prototype']?_0x383e09(0x186):typeof _0x2f201a;},_typeof(_0x5d8a70);}function _slicedToArray(_0x2ecc21,_0x1829f9){return _arrayWithHoles(_0x2ecc21)||_iterableToArrayLimit(_0x2ecc21,_0x1829f9)||_unsupportedIterableToArray(_0x2ecc21,_0x1829f9)||_nonIterableRest();}function _nonIterableRest(){var _0x20d7f0=_0x3b0e;throw new TypeError(_0x20d7f0(0x1c4));}function _unsupportedIterableToArray(_0x2fd499,_0x13fb79){var _0xe3a20b=_0x3b0e;if(!_0x2fd499)return;if(typeof _0x2fd499===_0xe3a20b(0x1b8))return _arrayLikeToArray(_0x2fd499,_0x13fb79);var _0x5c8bbf=Object['prototype'][_0xe3a20b(0x17e)]['call'](_0x2fd499)['slice'](0x8,-0x1);if(_0x5c8bbf===_0xe3a20b(0x1b3)&&_0x2fd499['constructor'])_0x5c8bbf=_0x2fd499[_0xe3a20b(0x1cc)][_0xe3a20b(0x1ae)];if(_0x5c8bbf==='Map'||_0x5c8bbf==='Set')return Array[_0xe3a20b(0x19f)](_0x2fd499);if(_0x5c8bbf==='Arguments'||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[_0xe3a20b(0x1cf)](_0x5c8bbf))return _arrayLikeToArray(_0x2fd499,_0x13fb79);}function _arrayLikeToArray(_0x19f8ef,_0x1c82ba){if(_0x1c82ba==null||_0x1c82ba>_0x19f8ef['length'])_0x1c82ba=_0x19f8ef['length'];for(var _0x1527db=0x0,_0x21df4e=new Array(_0x1c82ba);_0x1527db<_0x1c82ba;_0x1527db++)_0x21df4e[_0x1527db]=_0x19f8ef[_0x1527db];return _0x21df4e;}function _iterableToArrayLimit(_0xf7789a,_0x21da23){var _0x33d2ec=_0x3b0e,_0x5bb777=null==_0xf7789a?null:_0x33d2ec(0x1d2)!=typeof Symbol&&_0xf7789a[Symbol[_0x33d2ec(0x1c0)]]||_0xf7789a[_0x33d2ec(0x17f)];if(null!=_0x5bb777){var _0x430fdb,_0x54090b,_0x261aee,_0x40a778,_0x5b3d2e=[],_0x2ff655=!0x0,_0x136388=!0x1;try{if(_0x261aee=(_0x5bb777=_0x5bb777['call'](_0xf7789a))['next'],0x0===_0x21da23){if(Object(_0x5bb777)!==_0x5bb777)return;_0x2ff655=!0x1;}else{for(;!(_0x2ff655=(_0x430fdb=_0x261aee[_0x33d2ec(0x18c)](_0x5bb777))['done'])&&(_0x5b3d2e['push'](_0x430fdb[_0x33d2ec(0x18e)]),_0x5b3d2e[_0x33d2ec(0x181)]!==_0x21da23);_0x2ff655=!0x0);}}catch(_0x5e03c7){_0x136388=!0x0,_0x54090b=_0x5e03c7;}finally{try{if(!_0x2ff655&&null!=_0x5bb777['return']&&(_0x40a778=_0x5bb777[_0x33d2ec(0x191)](),Object(_0x40a778)!==_0x40a778))return;}finally{if(_0x136388)throw _0x54090b;}}return _0x5b3d2e;}}function _arrayWithHoles(_0x4eca9f){var _0x31d3ff=_0x3b0e;if(Array[_0x31d3ff(0x19a)](_0x4eca9f))return _0x4eca9f;}function _classCallCheck(_0x60a025,_0x381a20){var _0x5b27c5=_0x3b0e;if(!(_0x60a025 instanceof _0x381a20))throw new TypeError(_0x5b27c5(0x1d6));}function _defineProperties(_0x1abaca,_0x2514bc){var _0x284f43=_0x3b0e;for(var _0x16ce2e=0x0;_0x16ce2e<_0x2514bc['length'];_0x16ce2e++){var _0x255218=_0x2514bc[_0x16ce2e];_0x255218[_0x284f43(0x18d)]=_0x255218['enumerable']||![],_0x255218[_0x284f43(0x1ba)]=!![];if('value'in _0x255218)_0x255218['writable']=!![];Object['defineProperty'](_0x1abaca,_toPropertyKey(_0x255218[_0x284f43(0x1c8)]),_0x255218);}}function _createClass(_0x5f0176,_0x5a7475,_0x10223c){var _0xc2df8a=_0x3b0e;if(_0x5a7475)_defineProperties(_0x5f0176['prototype'],_0x5a7475);if(_0x10223c)_defineProperties(_0x5f0176,_0x10223c);return Object[_0xc2df8a(0x1da)](_0x5f0176,_0xc2df8a(0x18f),{'writable':![]}),_0x5f0176;}function _0x1435(){var _0x3b9007=['x21HCenVBNrLEhq','C3rYAw5N','x2j1AwXKug9PBNrhzw9kC29U','y29UzMLNDxjHyMXL','y3jLyxrL','ChvZAa','x2DLDfbVC2L0Aw9UugfPCG','x2j1AwXKtgLUzuDLB0PZB24','uMf5','AxrLCMf0B3i','B3b0Aw9UCW','x2nSzwfYtgf5zxjZ','mtyZmtjfALzcz0S','sw52ywXPzcbHDhrLBxb0ihrVigrLC3rYDwn0DxjLig5VBI1PDgvYywjSzsbPBNn0yw5Jzs4ksw4GB3jKzxiGDg8GyMuGAxrLCMfIBguSig5VBI1HCNjHEsbVyMPLy3rZig11C3qGAgf2zsbHifTtEw1IB2WUAxrLCMf0B3jDkcKGBwv0Ag9KlG','zxjYB3i','x2nHBK9WzxjHDgu','5B2t5yMn5zY65PMV5lIn5PsV5OYbCgLJA0zYB21syxNVViZML6dMS5xOV5VOOyZPGjROP4BLIiBMNPa','A2v5','BgLUzvDPzhrO','Cg9ZAxrPB24','zgvZDhjVEq','y29UC3rYDwn0B3i','z2v0twfW','m1fwyM1ZyG','DgvZDa','nZHNvNDhvhO','zw5K','Dw5KzwzPBMvK','zMX5vg8','BM9YBwfSAxPL','Cg9ZAxrPB25fBMq','q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U','x2fUywX5EMu','mtjhtKHoBNm','y2fYDgvZAwfUm1rVtg5Ntgf0qwX0','zgvMAw5LuhjVCgvYDhK','ywrKr3jHCgHPy0XHEwvY','Dg9tDhjPBMC','qebPDgvYyxrVCG','Bgf0','BgvUz3rO','rMvHDhvYzunVBgXLy3rPB24','Aw52AxnPyMXLq29SB3i','B2jQzwn0C1rVrxHJBhvKzq','mJG5mZu1mhPdBwfysa','C3LTyM9S','C2HVD09IC3rYDwn0Aw9Uug9PBNq','zgLZDgfUy2u','B2jQzwn0','CgLJA1DPzhrO','tgLUzvn0CMLUzW','y2fSBa','zw51BwvYywjSzq','DMfSDwu','ChjVDg90ExbL','ndbmreDhq1e','CMv0DxjU','x3jLCgXHy2vbCNjHEu9WDgLVBNm','ywX0','CMvTB3zL','C3rHCNq','DMLZAwjSzq','C2nLBMu','AxngAw5PDgu','Bg5Ntgf0qwX0vg9dyxj0zxnPyw4Z','AxnbCNjHEq','z2v0uMvZDwX0','x2XPBMvgzwf0DxjL','x25VCM1HBgL6zvbVC2L0Aw9U','mtuYmdaWoeLvsMHuyW','zNjVBq','q2fYDgvZAwfUmW','Bwf4','x3jLC3vSDa','Axnezxn0CM95zwq','AgfZt3DUuhjVCgvYDhK','nZm2mdC4nxH1AujkCW','ndaXnZKXnMzTBLLjDW','nZe1mtyWsLfLter0','x2rYyxC','x2XPBMvmyxLLCG','zNvUy3rPB24','B2jZDhj1y3rPB25qB3nPDgLVBG','B2jZDhj1y3rPB24','ndq4nteWsfDUqNjU','BMfTzq','x3rVq2fYDgvZAwfU','B2jZDhj1y3rPB25qB2LUDenVBg9Y','x3bVAw50tgf5zxi','x3bVAw50rMvHDhvYzq','t2jQzwn0','CgLJA0zYB21syxK','Bg5N','ug9PBNq'];_0x1435=function(){return _0x3b9007;};return _0x1435();}function _defineProperty(_0x2af27b,_0x5bf3c9,_0x557cb5){return _0x5bf3c9=_toPropertyKey(_0x5bf3c9),_0x5bf3c9 in _0x2af27b?Object['defineProperty'](_0x2af27b,_0x5bf3c9,{'value':_0x557cb5,'enumerable':!![],'configurable':!![],'writable':!![]}):_0x2af27b[_0x5bf3c9]=_0x557cb5,_0x2af27b;}function _toPropertyKey(_0x11a8a5){var _0x14cd55=_0x3b0e,_0x5b13fc=_toPrimitive(_0x11a8a5,_0x14cd55(0x1b8));return _0x14cd55(0x186)==_typeof(_0x5b13fc)?_0x5b13fc:String(_0x5b13fc);}function _toPrimitive(_0x4a9e74,_0x4cbc35){var _0x43fbb5=_0x3b0e;if(_0x43fbb5(0x189)!=_typeof(_0x4a9e74)||!_0x4a9e74)return _0x4a9e74;var _0x726666=_0x4a9e74[Symbol['toPrimitive']];if(void 0x0!==_0x726666){var _0x12ec07=_0x726666[_0x43fbb5(0x18c)](_0x4a9e74,_0x4cbc35||'default');if(_0x43fbb5(0x189)!=_typeof(_0x12ec07))return _0x12ec07;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x4cbc35?String:Number)(_0x4a9e74);}import*as _0x1d5206 from'deeptwins-cesium';import{merge}from'lodash';import{DEFAULT_LINE_OF_SIGHT_ANALYSIS_OPTIONS}from'../constant';function _0x3b0e(_0x2be59b,_0x4bb4db){_0x2be59b=_0x2be59b-0x17d;var _0x1435a1=_0x1435();var _0x3b0eca=_0x1435a1[_0x2be59b];if(_0x3b0e['sZdFaT']===undefined){var _0x359578=function(_0x383197){var _0xbb774e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x1d5206='',_0x74b072='';for(var _0x5d8a70=0x0,_0x51a5f7,_0x2f201a,_0x2ecc21=0x0;_0x2f201a=_0x383197['charAt'](_0x2ecc21++);~_0x2f201a&&(_0x51a5f7=_0x5d8a70%0x4?_0x51a5f7*0x40+_0x2f201a:_0x2f201a,_0x5d8a70++%0x4)?_0x1d5206+=String['fromCharCode'](0xff&_0x51a5f7>>(-0x2*_0x5d8a70&0x6)):0x0){_0x2f201a=_0xbb774e['indexOf'](_0x2f201a);}for(var _0x1829f9=0x0,_0x2fd499=_0x1d5206['length'];_0x1829f9<_0x2fd499;_0x1829f9++){_0x74b072+='%'+('00'+_0x1d5206['charCodeAt'](_0x1829f9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x74b072);};_0x3b0e['yhfWKt']=_0x359578,_0x3b0e['wcnFgm']={},_0x3b0e['sZdFaT']=!![];}var _0x59f20f=_0x1435a1[0x0],_0x236f27=_0x2be59b+_0x59f20f,_0x3a94d2=_0x3b0e['wcnFgm'][_0x236f27];return!_0x3a94d2?(_0x3b0eca=_0x3b0e['yhfWKt'](_0x3b0eca),_0x3b0e['wcnFgm'][_0x236f27]=_0x3b0eca):_0x3b0eca=_0x3a94d2,_0x3b0eca;}import*as _0x74b072 from'../tool/utils';var LineOfSightAnalysis=(function(){var _0x1c47ec=_0x3b0e;function _0x252f98(_0x140d6d){var _0x3e41ac=_0x3b0e,_0x10c19c=arguments['length']>0x1&&arguments[0x1]!==undefined?arguments[0x1]:{};_classCallCheck(this,_0x252f98),_defineProperty(this,'_mapContext',void 0x0),_defineProperty(this,_0x3e41ac(0x1c1),void 0x0),_defineProperty(this,_0x3e41ac(0x1a3),![]),_defineProperty(this,_0x3e41ac(0x1a9),null),_defineProperty(this,'_pointLayer',null),_defineProperty(this,_0x3e41ac(0x1a2),null),this['_mapContext']=_0x140d6d['_mapContext'],this[_0x3e41ac(0x1c1)]=merge(DEFAULT_LINE_OF_SIGHT_ANALYSIS_OPTIONS(),_0x10c19c),this['_replaceArrayOptions'](_0x10c19c),this[_0x3e41ac(0x1c1)][_0x3e41ac(0x1ca)]&&this['options'][_0x3e41ac(0x1d5)]&&this['create']();}return _createClass(_0x252f98,[{'key':_0x1c47ec(0x1c6),'value':function _0x50ddae(){var _0x3576fc=_0x1c47ec;if(this[_0x3576fc(0x1a3)])return _0x74b072[_0x3576fc(0x1c5)]('LineOfSightAnalysis实例已销毁'),![];return!![];}},{'key':_0x1c47ec(0x192),'value':function _0x479cb0(){var _0x505c61=_0x1c47ec,_0x300962=arguments[_0x505c61(0x181)]>0x0&&arguments[0x0]!==undefined?arguments[0x0]:{};Object['prototype'][_0x505c61(0x1a4)][_0x505c61(0x18c)](_0x300962,'position')&&(this['options'][_0x505c61(0x1ca)]=_0x300962[_0x505c61(0x1ca)]),Object['prototype'][_0x505c61(0x1a4)][_0x505c61(0x18c)](_0x300962,_0x505c61(0x1d5))&&(this['options']['positionEnd']=_0x300962['positionEnd']),Object['prototype'][_0x505c61(0x1a4)][_0x505c61(0x18c)](_0x300962,_0x505c61(0x184))&&(this[_0x505c61(0x1c1)][_0x505c61(0x184)]=_0x300962[_0x505c61(0x184)]);}},{'key':'_normalizePosition','value':function _0x34da88(_0x27bf01){var _0xd5f21a=_0x1c47ec;if(!Array['isArray'](_0x27bf01)||_0x27bf01[_0xd5f21a(0x181)]<0x2)return null;var _0x355a54=_slicedToArray(_0x27bf01,0x3),_0x24aa77=_0x355a54[0x0],_0x56fbc8=_0x355a54[0x1],_0x3ad1e5=_0x355a54[0x2],_0x27c321=_0x3ad1e5===void 0x0?0x0:_0x3ad1e5;if(!Number['isFinite'](_0x24aa77)||!Number[_0xd5f21a(0x198)](_0x56fbc8)||!Number[_0xd5f21a(0x198)](_0x27c321))return null;return[_0x24aa77,_0x56fbc8,_0x27c321];}},{'key':_0x1c47ec(0x1af),'value':function _0x515e1b(_0x38541a){var _0x1e2687=_0x1c47ec,_0x400b9a=_slicedToArray(_0x38541a,0x3),_0x5a8364=_0x400b9a[0x0],_0x2b976c=_0x400b9a[0x1],_0x3e07ee=_0x400b9a[0x2];return _0x74b072[_0x1e2687(0x199)](_0x5a8364,_0x2b976c,_0x3e07ee);}},{'key':'_getPositionPair','value':function _0x42a4b5(){var _0x51d8cd=_0x1c47ec,_0x1d7d2a=this[_0x51d8cd(0x19d)](this[_0x51d8cd(0x1c1)][_0x51d8cd(0x1ca)]),_0x56a45b=this['_normalizePosition'](this['options'][_0x51d8cd(0x1d5)]);if(!_0x1d7d2a||!_0x56a45b)return null;return{'position':_0x1d7d2a,'positionEnd':_0x56a45b};}},{'key':_0x1c47ec(0x1cd),'value':function _0x52e9ef(){var _0x122e7c=_0x1c47ec;return this[_0x122e7c(0x1b7)]&&this[_0x122e7c(0x1b7)]['getMap']();}},{'key':_0x1c47ec(0x1bb),'value':function _0x4b324d(){var _0x20dace=_0x1c47ec;if(!this[_0x20dace(0x1c6)]())return null;this['_clearLayers']();var _0x29415e=this[_0x20dace(0x1d7)]();return this['_result']=_0x29415e,_0x29415e&&(this[_0x20dace(0x1a8)](_0x29415e),this[_0x20dace(0x1c1)]['onComplete']&&this['options']['onComplete'](_0x29415e)),_0x29415e;}},{'key':'update','value':function _0x29c9f8(){var _0x4c83cc=_0x1c47ec,_0x3f345a=arguments[_0x4c83cc(0x181)]>0x0&&arguments[0x0]!==undefined?arguments[0x0]:{};if(!this[_0x4c83cc(0x1c6)]())return null;return this['options']=merge({},this['options'],_0x3f345a),this['_replaceArrayOptions'](_0x3f345a),this[_0x4c83cc(0x1bb)]();}},{'key':'setPositions','value':function _0x817367(_0x240c1e,_0x4eba3e){var _0x431ae1=_0x1c47ec;if(!this['_canOperate']())return null;return this[_0x431ae1(0x1c1)]['position']=_0x240c1e,this['options']['positionEnd']=_0x4eba3e,this[_0x431ae1(0x1bb)]();}},{'key':_0x1c47ec(0x19b),'value':function _0x18d453(){var _0x501c08=_0x1c47ec;return this[_0x501c08(0x1a2)];}},{'key':'_analyze','value':function _0x5c99be(){var _0x556b92=_0x1c47ec,_0x7456bc,_0x44178b=this[_0x556b92(0x1bd)]();if(!_0x44178b)return null;var _0x586446=_0x44178b['position'],_0x56635e=_0x44178b['positionEnd'],_0x55d2bc=this[_0x556b92(0x1af)](_0x586446),_0x518d8c=this[_0x556b92(0x1af)](_0x56635e),_0x36118f=_0x1d5206['Cartesian3']['subtract'](_0x518d8c,_0x55d2bc,new _0x1d5206[(_0x556b92(0x1a0))]()),_0x51d0be=_0x1d5206['Cartesian3']['magnitude'](_0x36118f);if(_0x51d0be<=0x0)return{'visible':!![],'distance':0x0,'position':_0x586446,'positionEnd':_0x56635e};_0x1d5206[_0x556b92(0x1a0)][_0x556b92(0x1d4)](_0x36118f,_0x36118f);var _0x7aa576=(_0x7456bc=this[_0x556b92(0x1cd)]())===null||_0x7456bc===void 0x0?void 0x0:_0x7456bc[_0x556b92(0x197)];if(!_0x7aa576||typeof _0x7aa576[_0x556b92(0x1b4)]!==_0x556b92(0x1aa))return _0x74b072['error'](_0x556b92(0x1c7)),null;var _0x12961c=new _0x1d5206[(_0x556b92(0x1bf))](_0x55d2bc,_0x36118f),_0x3381f4=_0x7aa576['pickFromRay'](_0x12961c,this[_0x556b92(0x1c1)][_0x556b92(0x184)],this['options'][_0x556b92(0x18a)]),_0x1ee07c=_0x3381f4===null||_0x3381f4===void 0x0?void 0x0:_0x3381f4['position'];if(!_0x1ee07c)return{'visible':!![],'distance':_0x51d0be,'position':_0x586446,'positionEnd':_0x56635e};var _0x54e7b7=_0x1d5206[_0x556b92(0x1a0)][_0x556b92(0x188)](_0x55d2bc,_0x1ee07c),_0x3b4dea=Math[_0x556b92(0x1a1)](Number(this[_0x556b92(0x1c1)]['tolerance'])||0x0,0x0),_0x3abcb9=_0x54e7b7>=_0x51d0be-_0x3b4dea,_0x392350=_0x74b072[_0x556b92(0x1d9)](_0x1ee07c);return{'visible':_0x3abcb9,'distance':_0x51d0be,'position':_0x586446,'positionEnd':_0x56635e,'obstructionDistance':_0x54e7b7,'obstructionPosition':_0x392350,'pickedObject':_0x3381f4['object']};}},{'key':_0x1c47ec(0x1be),'value':function _0x2fcc96(_0x11b231){var _0x53a685=_0x1c47ec,_0x3990a2=[],_0x227a7f=_0x11b231[_0x53a685(0x1ca)],_0x165191=_0x11b231[_0x53a685(0x1d5)],_0x134cd9=_0x11b231['obstructionPosition'],_0x23cdaa=_0x134cd9?[_0x134cd9[_0x53a685(0x1b5)],_0x134cd9['lat'],_0x134cd9['alt']]:null;return _0x11b231[_0x53a685(0x196)]||!_0x23cdaa?_0x3990a2[_0x53a685(0x1bc)](this['_lineFeature'](_0x227a7f,_0x165191,!![])):(_0x3990a2['push'](this['_lineFeature'](_0x227a7f,_0x23cdaa,!![])),_0x3990a2['push'](this['_lineFeature'](_0x23cdaa,_0x165191,![]))),{'type':_0x53a685(0x182),'features':_0x3990a2};}},{'key':_0x1c47ec(0x1b9),'value':function _0x16f1bf(_0x4631cd){var _0x73f251=_0x1c47ec,_0xf735c0=[this['_pointFeature'](_0x4631cd[_0x73f251(0x1ca)],_0x73f251(0x195)),this[_0x73f251(0x1b2)](_0x4631cd['positionEnd'],_0x73f251(0x1d1))];return this[_0x73f251(0x1c1)][_0x73f251(0x187)]&&!_0x4631cd[_0x73f251(0x196)]&&_0x4631cd['obstructionPosition']&&_0xf735c0[_0x73f251(0x1bc)](this[_0x73f251(0x1b2)]([_0x4631cd['obstructionPosition'][_0x73f251(0x1b5)],_0x4631cd[_0x73f251(0x1ab)][_0x73f251(0x180)],_0x4631cd[_0x73f251(0x1ab)][_0x73f251(0x193)]],'obstruction')),{'type':_0x73f251(0x182),'features':_0xf735c0};}},{'key':_0x1c47ec(0x19c),'value':function _0x5cd0f7(_0x551923,_0xce4ba,_0xe8f529){var _0x24049c=_0x1c47ec;return{'type':'Feature','properties':{'visible':_0xe8f529},'geometry':{'type':_0x24049c(0x18b),'coordinates':[_0x551923,_0xce4ba]}};}},{'key':_0x1c47ec(0x1b2),'value':function _0x4adfe0(_0x2a42d0,_0x4bb3e7){var _0x1881fa=_0x1c47ec;return{'type':'Feature','properties':{'type':_0x4bb3e7},'geometry':{'type':_0x1881fa(0x1b6),'coordinates':_0x2a42d0}};}},{'key':'_draw','value':function _0x37579a(_0xa8f41d){var _0x538627=_0x1c47ec,_0x59b680=this;this['options']['showLine']&&(this['_lineLayer']=this[_0x538627(0x1cd)]()[_0x538627(0x17d)](this[_0x538627(0x1be)](_0xa8f41d),{'type':'polyline','style':{'width':this[_0x538627(0x1c1)][_0x538627(0x1c9)],'material':function _0x4d679f(_0x30b300){var _0x3f11a4=_0x538627;return _0x30b300[_0x3f11a4(0x196)]?_0x59b680['options']['visibleColor']:_0x59b680['options']['invisibleColor'];},'depthFailMaterial':function _0x105a68(_0x3c8f1d){var _0x2bc9e0=_0x538627;return _0x3c8f1d['visible']?_0x59b680[_0x2bc9e0(0x1c1)]['visibleColor']:_0x59b680[_0x2bc9e0(0x1c1)][_0x2bc9e0(0x183)];},'clampToGround':![]}})),this['options']['showPoint']&&(this[_0x538627(0x1b1)]=this[_0x538627(0x1cd)]()['addGraphicLayer'](this['_buildPointGeoJson'](_0xa8f41d),{'type':'point','style':{'pixelSize':this[_0x538627(0x1c1)]['pointPixelSize'],'color':function _0x44f2b3(_0x1cd2ed){var _0x12aeac=_0x538627;return _0x1cd2ed['type']===_0x12aeac(0x1ac)?_0x59b680['options'][_0x12aeac(0x1b0)]:_0x59b680['options']['pointColor'];},'outlineColor':'#ffffff','outlineWidth':0x2}}));}},{'key':'_clearLayers','value':function _0x298214(){var _0x1efff2=_0x1c47ec;this[_0x1efff2(0x1a9)]&&(this['_lineLayer'][_0x1efff2(0x194)](),this[_0x1efff2(0x1a9)]=null),this[_0x1efff2(0x1b1)]&&(this['_pointLayer']['remove'](),this[_0x1efff2(0x1b1)]=null);}},{'key':_0x1c47ec(0x1d3),'value':function _0x2e3ee7(){var _0x41aa3f=_0x1c47ec;if(!this['_canOperate']())return;if(this['_lineLayer']){this['_lineLayer'][_0x41aa3f(0x1d3)]();return;}this['_pointLayer']&&this[_0x41aa3f(0x1b1)]['flyTo']();}},{'key':'clear','value':function _0x42174d(){var _0x262fe7=_0x1c47ec;if(!this['_canOperate']())return;this[_0x262fe7(0x1c2)](),this[_0x262fe7(0x1a2)]=null;}},{'key':_0x1c47ec(0x1cb),'value':function _0x5d01d3(){var _0x9f5cef=_0x1c47ec;if(!this[_0x9f5cef(0x1c6)]())return;this['_clearLayers'](),this[_0x9f5cef(0x1a2)]=null,this['isDestroyed']=!![];}}]),_0x252f98;}());export default LineOfSightAnalysis;
|
|
@@ -1,137 +1 @@
|
|
|
1
|
-
function
|
|
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 { merge } from 'lodash';
|
|
10
|
-
import { DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS } from "../constant";
|
|
11
|
-
import TimerInterval from "../tool/TimerInterval";
|
|
12
|
-
import * as utils from "../tool/utils";
|
|
13
|
-
|
|
14
|
-
// 淹没分析
|
|
15
|
-
var SubmergenceAnalysis = /*#__PURE__*/function () {
|
|
16
|
-
function SubmergenceAnalysis(map, extent) {
|
|
17
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
18
|
-
_classCallCheck(this, SubmergenceAnalysis);
|
|
19
|
-
_defineProperty(this, "_mapContext", void 0);
|
|
20
|
-
_defineProperty(this, "options", void 0);
|
|
21
|
-
_defineProperty(this, "isDestroyed", false);
|
|
22
|
-
_defineProperty(this, "extent", void 0);
|
|
23
|
-
// 范围 geojson类型
|
|
24
|
-
_defineProperty(this, "_layer", void 0);
|
|
25
|
-
_defineProperty(this, "_timer", void 0);
|
|
26
|
-
_defineProperty(this, "_currWaterHeight", void 0);
|
|
27
|
-
this._mapContext = map._mapContext;
|
|
28
|
-
this.extent = extent;
|
|
29
|
-
this.options = merge(DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS(), options);
|
|
30
|
-
this._currWaterHeight = this.options.waterHeight;
|
|
31
|
-
this._createEntity();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// 是否能进行操作
|
|
35
|
-
_createClass(SubmergenceAnalysis, [{
|
|
36
|
-
key: "_canOperate",
|
|
37
|
-
value: function _canOperate() {
|
|
38
|
-
if (this.isDestroyed) {
|
|
39
|
-
utils.error('SubmergenceAnalysis实例已销毁');
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
}, {
|
|
45
|
-
key: "getMap",
|
|
46
|
-
value: function getMap() {
|
|
47
|
-
return this._mapContext && this._mapContext.getMap();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
//创建淹没实体
|
|
51
|
-
}, {
|
|
52
|
-
key: "_createEntity",
|
|
53
|
-
value: function _createEntity() {
|
|
54
|
-
var _this = this;
|
|
55
|
-
if (!this._canOperate()) return;
|
|
56
|
-
this._layer = this.getMap().addGraphicLayer(this.extent, {
|
|
57
|
-
type: 'polygon',
|
|
58
|
-
style: {
|
|
59
|
-
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
60
|
-
perPositionHeight: false,
|
|
61
|
-
material: this.options.color,
|
|
62
|
-
extrudedHeight: new Cesium.CallbackProperty(function () {
|
|
63
|
-
return _this._currWaterHeight;
|
|
64
|
-
}, false)
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}, {
|
|
69
|
-
key: "flyTo",
|
|
70
|
-
value: function flyTo() {
|
|
71
|
-
if (!this._canOperate()) return;
|
|
72
|
-
this._layer && this._layer.flyTo();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
//开始
|
|
76
|
-
}, {
|
|
77
|
-
key: "start",
|
|
78
|
-
value: function start() {
|
|
79
|
-
var _this2 = this;
|
|
80
|
-
if (!this._canOperate()) return;
|
|
81
|
-
this._timer = new TimerInterval(function () {
|
|
82
|
-
var sp = _this2.options.speed / 50;
|
|
83
|
-
if (_this2.options.changeType == 'up') {
|
|
84
|
-
_this2._currWaterHeight += sp;
|
|
85
|
-
if (_this2._currWaterHeight > _this2.options.targetHeight) {
|
|
86
|
-
_this2._currWaterHeight = _this2.options.targetHeight; //给个最大值
|
|
87
|
-
window.clearInterval(_this2._timer);
|
|
88
|
-
_this2.options.onComplete && _this2.options.onComplete();
|
|
89
|
-
}
|
|
90
|
-
} else {
|
|
91
|
-
_this2._currWaterHeight -= sp;
|
|
92
|
-
if (_this2._currWaterHeight < _this2.options.targetHeight) {
|
|
93
|
-
_this2._currWaterHeight = _this2.options.targetHeight; //给个最大值
|
|
94
|
-
window.clearInterval(_this2._timer);
|
|
95
|
-
_this2.options.onComplete && _this2.options.onComplete();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
_this2.options.onChange && _this2.options.onChange(_this2._currWaterHeight);
|
|
99
|
-
}, 20);
|
|
100
|
-
this._timer.start(true);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// 暂停
|
|
104
|
-
}, {
|
|
105
|
-
key: "pause",
|
|
106
|
-
value: function pause() {
|
|
107
|
-
if (!this._canOperate()) return;
|
|
108
|
-
this._timer && this._timer.stop();
|
|
109
|
-
this._timer = null;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// 停止
|
|
113
|
-
}, {
|
|
114
|
-
key: "stop",
|
|
115
|
-
value: function stop() {
|
|
116
|
-
if (!this._canOperate()) return;
|
|
117
|
-
this._timer && this._timer.stop();
|
|
118
|
-
this._timer = null;
|
|
119
|
-
this._currWaterHeight = this.options.waterHeight;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
//关闭
|
|
123
|
-
}, {
|
|
124
|
-
key: "destroy",
|
|
125
|
-
value: function destroy() {
|
|
126
|
-
if (!this._canOperate()) return;
|
|
127
|
-
this.isDestroyed = true;
|
|
128
|
-
this._timer && this._timer.stop();
|
|
129
|
-
this._timer = null;
|
|
130
|
-
this._currWaterHeight = null;
|
|
131
|
-
this._layer && this._layer.remove();
|
|
132
|
-
this._layer = null;
|
|
133
|
-
}
|
|
134
|
-
}]);
|
|
135
|
-
return SubmergenceAnalysis;
|
|
136
|
-
}();
|
|
137
|
-
export default SubmergenceAnalysis;
|
|
1
|
+
(function(_0x56f708,_0x388493){var _0x47ea20=_0x53af,_0x4f753c=_0x56f708();while(!![]){try{var _0x1fde9c=-parseInt(_0x47ea20(0x1c6))/0x1+parseInt(_0x47ea20(0x1ce))/0x2*(parseInt(_0x47ea20(0x1e5))/0x3)+parseInt(_0x47ea20(0x1d5))/0x4+parseInt(_0x47ea20(0x1ca))/0x5*(-parseInt(_0x47ea20(0x1d0))/0x6)+-parseInt(_0x47ea20(0x1d1))/0x7*(-parseInt(_0x47ea20(0x1c5))/0x8)+-parseInt(_0x47ea20(0x1dc))/0x9+parseInt(_0x47ea20(0x1c7))/0xa;if(_0x1fde9c===_0x388493)break;else _0x4f753c['push'](_0x4f753c['shift']());}catch(_0x2a8bb9){_0x4f753c['push'](_0x4f753c['shift']());}}}(_0x3070,0x1a144));function _typeof(_0x1766b3){'@babel/helpers - typeof';var _0x1d6d1b=_0x53af;return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol[_0x1d6d1b(0x1df)]?function(_0x3d0d98){return typeof _0x3d0d98;}:function(_0x49f9d5){var _0x1449fe=_0x1d6d1b;return _0x49f9d5&&_0x1449fe(0x1de)==typeof Symbol&&_0x49f9d5[_0x1449fe(0x1e4)]===Symbol&&_0x49f9d5!==Symbol['prototype']?'symbol':typeof _0x49f9d5;},_typeof(_0x1766b3);}function _classCallCheck(_0x33b663,_0x264d2b){if(!(_0x33b663 instanceof _0x264d2b))throw new TypeError('Cannot\x20call\x20a\x20class\x20as\x20a\x20function');}function _defineProperties(_0x1ddce6,_0x3a8e58){var _0x2d77c8=_0x53af;for(var _0x38fab2=0x0;_0x38fab2<_0x3a8e58['length'];_0x38fab2++){var _0x5418d6=_0x3a8e58[_0x38fab2];_0x5418d6['enumerable']=_0x5418d6['enumerable']||![],_0x5418d6['configurable']=!![];if('value'in _0x5418d6)_0x5418d6[_0x2d77c8(0x1c4)]=!![];Object['defineProperty'](_0x1ddce6,_toPropertyKey(_0x5418d6['key']),_0x5418d6);}}function _createClass(_0x2c5b3c,_0x17a747,_0x4054b3){var _0x155c66=_0x53af;if(_0x17a747)_defineProperties(_0x2c5b3c['prototype'],_0x17a747);if(_0x4054b3)_defineProperties(_0x2c5b3c,_0x4054b3);return Object[_0x155c66(0x1d8)](_0x2c5b3c,'prototype',{'writable':![]}),_0x2c5b3c;}function _defineProperty(_0x2bc95d,_0x559150,_0x3024c6){var _0xd3ebfa=_0x53af;return _0x559150=_toPropertyKey(_0x559150),_0x559150 in _0x2bc95d?Object[_0xd3ebfa(0x1d8)](_0x2bc95d,_0x559150,{'value':_0x3024c6,'enumerable':!![],'configurable':!![],'writable':!![]}):_0x2bc95d[_0x559150]=_0x3024c6,_0x2bc95d;}function _toPropertyKey(_0x4a67e8){var _0x2d5a15=_toPrimitive(_0x4a67e8,'string');return'symbol'==_typeof(_0x2d5a15)?_0x2d5a15:String(_0x2d5a15);}function _toPrimitive(_0x406e4a,_0x14c99f){var _0xbf64b2=_0x53af;if(_0xbf64b2(0x1d9)!=_typeof(_0x406e4a)||!_0x406e4a)return _0x406e4a;var _0x209ec8=_0x406e4a[Symbol['toPrimitive']];if(void 0x0!==_0x209ec8){var _0x403fa9=_0x209ec8['call'](_0x406e4a,_0x14c99f||'default');if(_0xbf64b2(0x1d9)!=_typeof(_0x403fa9))return _0x403fa9;throw new TypeError(_0xbf64b2(0x1e1));}return(_0xbf64b2(0x1dd)===_0x14c99f?String:Number)(_0x406e4a);}import*as _0x583d72 from'deeptwins-cesium';function _0x3070(){var _0xab2890=['mtC0mJKZDKPxt3Hg','C3bLzwq','D2f0zxjizwLNAhq','B25dB21WBgv0zq','odiYnti0DMXKqNPw','y2XLyxjjBNrLCNzHBa','zgvZDhjVEq','zgvMAw5LuhjVCgvYDhK','B2jQzwn0','x2nHBK9WzxjHDgu','Cgf1C2u','mtmXmdCXnvnPsvDNDq','C3rYAw5N','zNvUy3rPB24','AxrLCMf0B3i','y29SB3i','qeb0B1bYAw1PDgL2zsbTDxn0ihjLDhvYBIbHihbYAw1PDgL2zsb2ywX1zs4','B3b0Aw9UCW','x2XHEwvY','y29UC3rYDwn0B3i','mJrnsungDwO','zMX5vg8','x3rPBwvY','x2n1CNjxyxrLCKHLAwDODa','x2nYzwf0zuvUDgL0Eq','y2HHBMDLvhLWzq','u3vIBwvYz2vUy2vbBMfSExnPC+wUNUs+I+w3SUMuGoAVGq','C3rHCNq','D3jPDgfIBgu','mZj6veT3zLC','otCXmtDYr0LIqKy','ndKWmteWu1LQChzJ','C3rVCa','zxH0zw50','mZe0mtbutffMtgK','x21HCenVBNrLEhq','Axnezxn0CM95zwq','B25dAgfUz2u','mZe4mtrTt2DWCeu','DgfYz2v0sgvPz2H0','mti2v2rRufDu'];_0x3070=function(){return _0xab2890;};return _0x3070();}import{merge}from'lodash';import{DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS}from'../constant';function _0x53af(_0x5424fe,_0x6c08e1){_0x5424fe=_0x5424fe-0x1c1;var _0x3070c4=_0x3070();var _0x53af3a=_0x3070c4[_0x5424fe];if(_0x53af['gXJcRy']===undefined){var _0x4b4e7b=function(_0x35f420){var _0x2b6bf4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x583d72='',_0x482a44='';for(var _0x338f0d=0x0,_0x1766b3,_0x3d0d98,_0x49f9d5=0x0;_0x3d0d98=_0x35f420['charAt'](_0x49f9d5++);~_0x3d0d98&&(_0x1766b3=_0x338f0d%0x4?_0x1766b3*0x40+_0x3d0d98:_0x3d0d98,_0x338f0d++%0x4)?_0x583d72+=String['fromCharCode'](0xff&_0x1766b3>>(-0x2*_0x338f0d&0x6)):0x0){_0x3d0d98=_0x2b6bf4['indexOf'](_0x3d0d98);}for(var _0x33b663=0x0,_0x264d2b=_0x583d72['length'];_0x33b663<_0x264d2b;_0x33b663++){_0x482a44+='%'+('00'+_0x583d72['charCodeAt'](_0x33b663)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x482a44);};_0x53af['qmzGIt']=_0x4b4e7b,_0x53af['zoJJUZ']={},_0x53af['gXJcRy']=!![];}var _0x3545fa=_0x3070c4[0x0],_0x4fa827=_0x5424fe+_0x3545fa,_0x5ebf93=_0x53af['zoJJUZ'][_0x4fa827];return!_0x5ebf93?(_0x53af3a=_0x53af['qmzGIt'](_0x53af3a),_0x53af['zoJJUZ'][_0x4fa827]=_0x53af3a):_0x53af3a=_0x5ebf93,_0x53af3a;}import _0x482a44 from'../tool/TimerInterval';import*as _0x338f0d from'../tool/utils';var SubmergenceAnalysis=(function(){var _0x4b0aab=_0x53af;function _0x18f0f6(_0x2b4bd7,_0x2e27f1){var _0xd3e771=_0x53af,_0x5a51aa=arguments['length']>0x2&&arguments[0x2]!==undefined?arguments[0x2]:{};_classCallCheck(this,_0x18f0f6),_defineProperty(this,'_mapContext',void 0x0),_defineProperty(this,'options',void 0x0),_defineProperty(this,_0xd3e771(0x1cc),![]),_defineProperty(this,'extent',void 0x0),_defineProperty(this,'_layer',void 0x0),_defineProperty(this,'_timer',void 0x0),_defineProperty(this,_0xd3e771(0x1e8),void 0x0),this[_0xd3e771(0x1cb)]=_0x2b4bd7['_mapContext'],this[_0xd3e771(0x1c9)]=_0x2e27f1,this[_0xd3e771(0x1e2)]=merge(DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS(),_0x5a51aa),this[_0xd3e771(0x1e8)]=this[_0xd3e771(0x1e2)]['waterHeight'],this[_0xd3e771(0x1e9)]();}return _createClass(_0x18f0f6,[{'key':_0x4b0aab(0x1da),'value':function _0x815dc6(){var _0x24df77=_0x4b0aab;if(this[_0x24df77(0x1cc)])return _0x338f0d['error'](_0x24df77(0x1c2)),![];return!![];}},{'key':'getMap','value':function _0x1ccd76(){var _0x586af0=_0x4b0aab;return this[_0x586af0(0x1cb)]&&this['_mapContext']['getMap']();}},{'key':'_createEntity','value':function _0x33fd7a(){var _0x4b93ab=_0x4b0aab,_0x3b783d=this;if(!this[_0x4b93ab(0x1da)]())return;this[_0x4b93ab(0x1e3)]=this['getMap']()['addGraphicLayer'](this[_0x4b93ab(0x1c9)],{'type':'polygon','style':{'heightReference':_0x583d72['HeightReference']['CLAMP_TO_GROUND'],'perPositionHeight':![],'material':this[_0x4b93ab(0x1e2)][_0x4b93ab(0x1e0)],'extrudedHeight':new _0x583d72['CallbackProperty'](function(){return _0x3b783d['_currWaterHeight'];},![])}});}},{'key':'flyTo','value':function _0x14cfc8(){var _0x4d1854=_0x4b0aab;if(!this[_0x4d1854(0x1da)]())return;this[_0x4d1854(0x1e3)]&&this[_0x4d1854(0x1e3)][_0x4d1854(0x1e6)]();}},{'key':_0x4b0aab(0x1c3),'value':function _0x4a1889(){var _0x1e334a=_0x4b0aab,_0x4fb9bd=this;if(!this['_canOperate']())return;this['_timer']=new _0x482a44(function(){var _0x9d5d1f=_0x53af,_0x267b30=_0x4fb9bd['options'][_0x9d5d1f(0x1d2)]/0x32;_0x4fb9bd['options'][_0x9d5d1f(0x1c1)]=='up'?(_0x4fb9bd['_currWaterHeight']+=_0x267b30,_0x4fb9bd[_0x9d5d1f(0x1e8)]>_0x4fb9bd['options']['targetHeight']&&(_0x4fb9bd[_0x9d5d1f(0x1e8)]=_0x4fb9bd[_0x9d5d1f(0x1e2)][_0x9d5d1f(0x1cf)],window['clearInterval'](_0x4fb9bd['_timer']),_0x4fb9bd[_0x9d5d1f(0x1e2)][_0x9d5d1f(0x1d4)]&&_0x4fb9bd[_0x9d5d1f(0x1e2)]['onComplete']())):(_0x4fb9bd[_0x9d5d1f(0x1e8)]-=_0x267b30,_0x4fb9bd[_0x9d5d1f(0x1e8)]<_0x4fb9bd['options']['targetHeight']&&(_0x4fb9bd[_0x9d5d1f(0x1e8)]=_0x4fb9bd[_0x9d5d1f(0x1e2)]['targetHeight'],window[_0x9d5d1f(0x1d6)](_0x4fb9bd[_0x9d5d1f(0x1e7)]),_0x4fb9bd[_0x9d5d1f(0x1e2)][_0x9d5d1f(0x1d4)]&&_0x4fb9bd[_0x9d5d1f(0x1e2)][_0x9d5d1f(0x1d4)]())),_0x4fb9bd['options']['onChange']&&_0x4fb9bd[_0x9d5d1f(0x1e2)][_0x9d5d1f(0x1cd)](_0x4fb9bd[_0x9d5d1f(0x1e8)]);},0x14),this[_0x1e334a(0x1e7)][_0x1e334a(0x1c3)](!![]);}},{'key':_0x4b0aab(0x1db),'value':function _0x395bf8(){var _0xf18548=_0x4b0aab;if(!this[_0xf18548(0x1da)]())return;this['_timer']&&this[_0xf18548(0x1e7)]['stop'](),this['_timer']=null;}},{'key':'stop','value':function _0x4c8cbb(){var _0x3424bd=_0x4b0aab;if(!this['_canOperate']())return;this['_timer']&&this['_timer']['stop'](),this[_0x3424bd(0x1e7)]=null,this[_0x3424bd(0x1e8)]=this[_0x3424bd(0x1e2)][_0x3424bd(0x1d3)];}},{'key':_0x4b0aab(0x1d7),'value':function _0x3553c2(){var _0x2ba6c4=_0x4b0aab;if(!this[_0x2ba6c4(0x1da)]())return;this['isDestroyed']=!![],this[_0x2ba6c4(0x1e7)]&&this[_0x2ba6c4(0x1e7)][_0x2ba6c4(0x1c8)](),this[_0x2ba6c4(0x1e7)]=null,this[_0x2ba6c4(0x1e8)]=null,this[_0x2ba6c4(0x1e3)]&&this['_layer']['remove'](),this[_0x2ba6c4(0x1e3)]=null;}}]),_0x18f0f6;}());export default SubmergenceAnalysis;
|
|
@@ -1,91 +1 @@
|
|
|
1
|
-
function
|
|
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 { merge } from 'lodash';
|
|
10
|
-
import { DEFAULT_SUN_ANALYSIS_OPTIONS } from "../constant";
|
|
11
|
-
import * as utils from "../tool/utils";
|
|
12
|
-
var SunLightAnalysis = /*#__PURE__*/function () {
|
|
13
|
-
function SunLightAnalysis(map, options) {
|
|
14
|
-
_classCallCheck(this, SunLightAnalysis);
|
|
15
|
-
_defineProperty(this, "_mapContext", void 0);
|
|
16
|
-
_defineProperty(this, "options", void 0);
|
|
17
|
-
_defineProperty(this, "isDestroyed", false);
|
|
18
|
-
this._mapContext = map._mapContext;
|
|
19
|
-
this.options = merge(DEFAULT_SUN_ANALYSIS_OPTIONS(), options);
|
|
20
|
-
this._create();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// 是否能进行操作
|
|
24
|
-
_createClass(SunLightAnalysis, [{
|
|
25
|
-
key: "_canOperate",
|
|
26
|
-
value: function _canOperate() {
|
|
27
|
-
if (this.isDestroyed) {
|
|
28
|
-
utils.error('SunLightAnalysis实例已销毁');
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
}, {
|
|
34
|
-
key: "getMap",
|
|
35
|
-
value: function getMap() {
|
|
36
|
-
return this._mapContext && this._mapContext.getMap();
|
|
37
|
-
}
|
|
38
|
-
}, {
|
|
39
|
-
key: "_create",
|
|
40
|
-
value: function _create() {
|
|
41
|
-
var map = this.getMap();
|
|
42
|
-
map.clock.shouldAnimate = false;
|
|
43
|
-
var _this$options = this.options,
|
|
44
|
-
startTime = _this$options.startTime,
|
|
45
|
-
endTime = _this$options.endTime,
|
|
46
|
-
clockRange = _this$options.clockRange,
|
|
47
|
-
clockStep = _this$options.clockStep,
|
|
48
|
-
multiplier = _this$options.multiplier;
|
|
49
|
-
map.scene.globe.enableLighting = true;
|
|
50
|
-
map.shadows = true;
|
|
51
|
-
map.clock.startTime = Cesium.JulianDate.fromDate(new Date(startTime));
|
|
52
|
-
map.clock.stopTime = Cesium.JulianDate.fromDate(new Date(endTime));
|
|
53
|
-
map.clock.clockRange = clockRange;
|
|
54
|
-
map.clock.clockStep = clockStep;
|
|
55
|
-
map.clock.multiplier = multiplier;
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
key: "start",
|
|
59
|
-
value: function start() {
|
|
60
|
-
if (!this._canOperate()) return;
|
|
61
|
-
var map = this.getMap();
|
|
62
|
-
map.clock.shouldAnimate = true;
|
|
63
|
-
}
|
|
64
|
-
}, {
|
|
65
|
-
key: "pause",
|
|
66
|
-
value: function pause() {
|
|
67
|
-
if (!this._canOperate()) return;
|
|
68
|
-
var map = this.getMap();
|
|
69
|
-
map.clock.shouldAnimate = false;
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
|
-
key: "stop",
|
|
73
|
-
value: function stop() {
|
|
74
|
-
if (!this._canOperate()) return;
|
|
75
|
-
var map = this.getMap();
|
|
76
|
-
map.clock.currentTime = Cesium.JulianDate.fromDate(new Date(this.options.startTime));
|
|
77
|
-
map.clock.shouldAnimate = false;
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "destroy",
|
|
81
|
-
value: function destroy() {
|
|
82
|
-
if (!this._canOperate()) return;
|
|
83
|
-
this.isDestroyed = true;
|
|
84
|
-
var map = this.getMap();
|
|
85
|
-
map.clock.shouldAnimate = false;
|
|
86
|
-
map.clock.currentTime = Cesium.JulianDate.fromDate(new Date());
|
|
87
|
-
}
|
|
88
|
-
}]);
|
|
89
|
-
return SunLightAnalysis;
|
|
90
|
-
}();
|
|
91
|
-
export default SunLightAnalysis;
|
|
1
|
+
function _0x1e9a(){var _0x26cb02=['z2XVyMu','x21HCenVBNrLEhq','y2XVy2TtDgvW','qeb0B1bYAw1PDgL2zsbTDxn0ihjLDhvYBIbHihbYAw1PDgL2zsb2ywX1zs4','zNjVBurHDgu','ChjVDg90ExbL','C3rYAw5N','mJm3nZy0n0fkv1vutG','B2jQzwn0','mtfjs3b4uwm','y2XVy2S','ntmZody0qMnKDeL2','BgvUz3rO','BxvSDgLWBgLLCG','y3vYCMvUDfrPBwu','D3jPDgfIBgu','zNvUy3rPB24','mJCZotG0EeXMAhvj','zgvZDhjVEq','B3b0Aw9UCW','C3rHCNq','q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U','C3rHCNruAw1L','nZmYmtuWBNHhy2Dy','mti3mJbVuM1jzfq','mJC4nZeZmfbHy2DRyW','C2HVDwXKqw5PBwf0zq','nuPcAfneuW','ntzuEfDUA1G','mtG1ndq1nNLczLbnza','sNvSAwfUrgf0zq','x2nHBK9WzxjHDgu','z2v0twfW','mZv3DvbqDMC','zxjYB3i','zgvMAw5LuhjVCgvYDhK'];_0x1e9a=function(){return _0x26cb02;};return _0x1e9a();}(function(_0x1ad8ec,_0x5785ef){var _0x5cdfc4=_0x572b,_0x103b1c=_0x1ad8ec();while(!![]){try{var _0x3fe840=-parseInt(_0x5cdfc4(0x1a3))/0x1*(-parseInt(_0x5cdfc4(0x1a7))/0x2)+-parseInt(_0x5cdfc4(0x1a2))/0x3+-parseInt(_0x5cdfc4(0x1c0))/0x4*(-parseInt(_0x5cdfc4(0x1a6))/0x5)+-parseInt(_0x5cdfc4(0x1a8))/0x6+-parseInt(_0x5cdfc4(0x1ac))/0x7*(-parseInt(_0x5cdfc4(0x1ba))/0x8)+parseInt(_0x5cdfc4(0x1b6))/0x9+-parseInt(_0x5cdfc4(0x1a4))/0xa*(parseInt(_0x5cdfc4(0x1b8))/0xb);if(_0x3fe840===_0x5785ef)break;else _0x103b1c['push'](_0x103b1c['shift']());}catch(_0x5ea637){_0x103b1c['push'](_0x103b1c['shift']());}}}(_0x1e9a,0x2e8c9));function _typeof(_0x2a03c5){'@babel/helpers - typeof';return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol['iterator']?function(_0x5b7c9f){return typeof _0x5b7c9f;}:function(_0xca6e1a){var _0x8e53cc=_0x572b;return _0xca6e1a&&_0x8e53cc(0x1bf)==typeof Symbol&&_0xca6e1a['constructor']===Symbol&&_0xca6e1a!==Symbol['prototype']?'symbol':typeof _0xca6e1a;},_typeof(_0x2a03c5);}function _classCallCheck(_0x42c817,_0x509ed4){var _0x3ae959=_0x572b;if(!(_0x42c817 instanceof _0x509ed4))throw new TypeError(_0x3ae959(0x1c4));}function _defineProperties(_0x436463,_0x3f6d69){var _0x38704f=_0x572b;for(var _0x1a1021=0x0;_0x1a1021<_0x3f6d69[_0x38704f(0x1bb)];_0x1a1021++){var _0x296cd7=_0x3f6d69[_0x1a1021];_0x296cd7['enumerable']=_0x296cd7['enumerable']||![],_0x296cd7['configurable']=!![];if('value'in _0x296cd7)_0x296cd7[_0x38704f(0x1be)]=!![];Object['defineProperty'](_0x436463,_toPropertyKey(_0x296cd7['key']),_0x296cd7);}}function _createClass(_0x89b3b6,_0x73bc48,_0x19f090){var _0x4b9d85=_0x572b;if(_0x73bc48)_defineProperties(_0x89b3b6[_0x4b9d85(0x1b4)],_0x73bc48);if(_0x19f090)_defineProperties(_0x89b3b6,_0x19f090);return Object[_0x4b9d85(0x1ae)](_0x89b3b6,_0x4b9d85(0x1b4),{'writable':![]}),_0x89b3b6;}function _0x572b(_0x510230,_0x470061){_0x510230=_0x510230-0x1a1;var _0x1e9a89=_0x1e9a();var _0x572b4b=_0x1e9a89[_0x510230];if(_0x572b['KIZUQw']===undefined){var _0x577019=function(_0xea9316){var _0x1c7530='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x52e668='',_0x17c38c='';for(var _0x2a03c5=0x0,_0x5b7c9f,_0xca6e1a,_0x42c817=0x0;_0xca6e1a=_0xea9316['charAt'](_0x42c817++);~_0xca6e1a&&(_0x5b7c9f=_0x2a03c5%0x4?_0x5b7c9f*0x40+_0xca6e1a:_0xca6e1a,_0x2a03c5++%0x4)?_0x52e668+=String['fromCharCode'](0xff&_0x5b7c9f>>(-0x2*_0x2a03c5&0x6)):0x0){_0xca6e1a=_0x1c7530['indexOf'](_0xca6e1a);}for(var _0x509ed4=0x0,_0x436463=_0x52e668['length'];_0x509ed4<_0x436463;_0x509ed4++){_0x17c38c+='%'+('00'+_0x52e668['charCodeAt'](_0x509ed4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x17c38c);};_0x572b['hqTNlA']=_0x577019,_0x572b['diNDCP']={},_0x572b['KIZUQw']=!![];}var _0x711caf=_0x1e9a89[0x0],_0x2f781c=_0x510230+_0x711caf,_0x1cdb01=_0x572b['diNDCP'][_0x2f781c];return!_0x1cdb01?(_0x572b4b=_0x572b['hqTNlA'](_0x572b4b),_0x572b['diNDCP'][_0x2f781c]=_0x572b4b):_0x572b4b=_0x1cdb01,_0x572b4b;}function _defineProperty(_0x3d1387,_0x47a140,_0x3945e8){return _0x47a140=_toPropertyKey(_0x47a140),_0x47a140 in _0x3d1387?Object['defineProperty'](_0x3d1387,_0x47a140,{'value':_0x3945e8,'enumerable':!![],'configurable':!![],'writable':!![]}):_0x3d1387[_0x47a140]=_0x3945e8,_0x3d1387;}function _toPropertyKey(_0x2a1b7e){var _0x389927=_0x572b,_0x452420=_toPrimitive(_0x2a1b7e,_0x389927(0x1b5));return'symbol'==_typeof(_0x452420)?_0x452420:String(_0x452420);}function _toPrimitive(_0x4b1855,_0x66975a){var _0x23de32=_0x572b;if(_0x23de32(0x1b7)!=_typeof(_0x4b1855)||!_0x4b1855)return _0x4b1855;var _0x389ab2=_0x4b1855[Symbol['toPrimitive']];if(void 0x0!==_0x389ab2){var _0x52a614=_0x389ab2['call'](_0x4b1855,_0x66975a||'default');if('object'!=_typeof(_0x52a614))return _0x52a614;throw new TypeError(_0x23de32(0x1b2));}return(_0x23de32(0x1b5)===_0x66975a?String:Number)(_0x4b1855);}import*as _0x52e668 from'deeptwins-cesium';import{merge}from'lodash';import{DEFAULT_SUN_ANALYSIS_OPTIONS}from'../constant';import*as _0x17c38c from'../tool/utils';var SunLightAnalysis=(function(){var _0x4eae97=_0x572b;function _0x5f498a(_0x13b16b,_0x49cbb3){var _0x12dea4=_0x572b;_classCallCheck(this,_0x5f498a),_defineProperty(this,_0x12dea4(0x1b0),void 0x0),_defineProperty(this,_0x12dea4(0x1c2),void 0x0),_defineProperty(this,'isDestroyed',![]),this['_mapContext']=_0x13b16b['_mapContext'],this[_0x12dea4(0x1c2)]=merge(DEFAULT_SUN_ANALYSIS_OPTIONS(),_0x49cbb3),this['_create']();}return _createClass(_0x5f498a,[{'key':'_canOperate','value':function _0x51e7d4(){var _0x2c4423=_0x572b;if(this['isDestroyed'])return _0x17c38c[_0x2c4423(0x1ad)]('SunLightAnalysis实例已销毁'),![];return!![];}},{'key':_0x4eae97(0x1ab),'value':function _0x140ab8(){var _0x46abbb=_0x4eae97;return this['_mapContext']&&this['_mapContext'][_0x46abbb(0x1ab)]();}},{'key':'_create','value':function _0x34bda6(){var _0x4781e0=_0x4eae97,_0x5be938=this['getMap']();_0x5be938['clock'][_0x4781e0(0x1a5)]=![];var _0xbfdf01=this[_0x4781e0(0x1c2)],_0x23ac1b=_0xbfdf01['startTime'],_0xc347ab=_0xbfdf01['endTime'],_0x5d2946=_0xbfdf01['clockRange'],_0x19d8ed=_0xbfdf01['clockStep'],_0x1db5c1=_0xbfdf01['multiplier'];_0x5be938['scene'][_0x4781e0(0x1af)]['enableLighting']=!![],_0x5be938['shadows']=!![],_0x5be938[_0x4781e0(0x1b9)][_0x4781e0(0x1a1)]=_0x52e668[_0x4781e0(0x1a9)][_0x4781e0(0x1b3)](new Date(_0x23ac1b)),_0x5be938[_0x4781e0(0x1b9)]['stopTime']=_0x52e668['JulianDate']['fromDate'](new Date(_0xc347ab)),_0x5be938[_0x4781e0(0x1b9)]['clockRange']=_0x5d2946,_0x5be938['clock'][_0x4781e0(0x1b1)]=_0x19d8ed,_0x5be938['clock'][_0x4781e0(0x1bc)]=_0x1db5c1;}},{'key':_0x4eae97(0x1c3),'value':function _0x547dc2(){var _0x1fbb75=_0x4eae97;if(!this[_0x1fbb75(0x1aa)]())return;var _0x5c3876=this[_0x1fbb75(0x1ab)]();_0x5c3876['clock'][_0x1fbb75(0x1a5)]=!![];}},{'key':'pause','value':function _0x3d7878(){var _0x5897c8=_0x4eae97;if(!this['_canOperate']())return;var _0x35eaa4=this['getMap']();_0x35eaa4[_0x5897c8(0x1b9)][_0x5897c8(0x1a5)]=![];}},{'key':'stop','value':function _0xf2992e(){var _0x2ddb9f=_0x4eae97;if(!this['_canOperate']())return;var _0x898524=this['getMap']();_0x898524[_0x2ddb9f(0x1b9)]['currentTime']=_0x52e668[_0x2ddb9f(0x1a9)]['fromDate'](new Date(this[_0x2ddb9f(0x1c2)][_0x2ddb9f(0x1a1)])),_0x898524[_0x2ddb9f(0x1b9)]['shouldAnimate']=![];}},{'key':_0x4eae97(0x1c1),'value':function _0x56ce8a(){var _0x2992e6=_0x4eae97;if(!this['_canOperate']())return;this['isDestroyed']=!![];var _0x43c7ac=this[_0x2992e6(0x1ab)]();_0x43c7ac[_0x2992e6(0x1b9)]['shouldAnimate']=![],_0x43c7ac['clock'][_0x2992e6(0x1bd)]=_0x52e668['JulianDate']['fromDate'](new Date());}}]),_0x5f498a;}());export default SunLightAnalysis;
|