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.
- 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.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 +135 -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,292 +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_VIEWSHED_ANALYSIS_OPTIONS } from "../constant";
|
|
17
|
-
import * as utils from "../tool/utils";
|
|
18
|
-
import Frustum from "../visualization/Frustum";
|
|
19
|
-
|
|
20
|
-
// 可视域分析。
|
|
21
|
-
var ViewshedAnalysis = /*#__PURE__*/function () {
|
|
22
|
-
function ViewshedAnalysis(map, options) {
|
|
23
|
-
_classCallCheck(this, ViewshedAnalysis);
|
|
24
|
-
_defineProperty(this, "_mapContext", void 0);
|
|
25
|
-
_defineProperty(this, "options", void 0);
|
|
26
|
-
_defineProperty(this, "isDestroyed", false);
|
|
27
|
-
_defineProperty(this, "_viewPositionC3", void 0);
|
|
28
|
-
_defineProperty(this, "_viewPositionEndC3", void 0);
|
|
29
|
-
_defineProperty(this, "_viewDistance", void 0);
|
|
30
|
-
_defineProperty(this, "_viewHeading", void 0);
|
|
31
|
-
_defineProperty(this, "_viewPitch", void 0);
|
|
32
|
-
_defineProperty(this, "lightCamera", void 0);
|
|
33
|
-
_defineProperty(this, "shadowMap", void 0);
|
|
34
|
-
_defineProperty(this, "postStage", void 0);
|
|
35
|
-
_defineProperty(this, "frustumCamera", void 0);
|
|
36
|
-
_defineProperty(this, "sketchLayer", void 0);
|
|
37
|
-
this._mapContext = map._mapContext;
|
|
38
|
-
this.options = merge(DEFAULT_VIEWSHED_ANALYSIS_OPTIONS(), options);
|
|
39
|
-
if (!this.options.position) return;
|
|
40
|
-
var _this$options$positio = _slicedToArray(this.options.position, 3),
|
|
41
|
-
lng = _this$options$positio[0],
|
|
42
|
-
lat = _this$options$positio[1],
|
|
43
|
-
alt = _this$options$positio[2];
|
|
44
|
-
this._viewPositionC3 = utils.lngLatAltToCartesian3(lng, lat, alt || 0);
|
|
45
|
-
this._viewDistance = this.options.distance;
|
|
46
|
-
this._viewHeading = this.options.heading;
|
|
47
|
-
this._viewPitch = this.options.pitch;
|
|
48
|
-
if (this.options.positionEnd) {
|
|
49
|
-
var _this$options$positio2 = _slicedToArray(this.options.positionEnd, 3),
|
|
50
|
-
_lng = _this$options$positio2[0],
|
|
51
|
-
_lat = _this$options$positio2[1],
|
|
52
|
-
_alt = _this$options$positio2[2];
|
|
53
|
-
this._viewPositionEndC3 = utils.lngLatAltToCartesian3(_lng, _lat, _alt || 0);
|
|
54
|
-
this._viewDistance = Cesium.Cartesian3.distance(this._viewPositionC3, this._viewPositionEndC3);
|
|
55
|
-
this._viewHeading = getHeading(this._viewPositionC3, this._viewPositionEndC3);
|
|
56
|
-
this._viewPitch = getPitch(this._viewPositionC3, this._viewPositionEndC3);
|
|
57
|
-
}
|
|
58
|
-
this.create();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// 是否能进行操作
|
|
62
|
-
_createClass(ViewshedAnalysis, [{
|
|
63
|
-
key: "_canOperate",
|
|
64
|
-
value: function _canOperate() {
|
|
65
|
-
if (this.isDestroyed) {
|
|
66
|
-
utils.error('SunLightAnalysis实例已销毁');
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
|
-
key: "getMap",
|
|
73
|
-
value: function getMap() {
|
|
74
|
-
return this._mapContext && this._mapContext.getMap();
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
key: "create",
|
|
78
|
-
value: function create() {
|
|
79
|
-
this._createLightCamera();
|
|
80
|
-
this._createShadowMap();
|
|
81
|
-
this._createPostStage();
|
|
82
|
-
this._drawFrustumOutline();
|
|
83
|
-
this._drawSketch();
|
|
84
|
-
}
|
|
85
|
-
}, {
|
|
86
|
-
key: "update",
|
|
87
|
-
value: function update() {
|
|
88
|
-
if (!this._canOperate) return;
|
|
89
|
-
this.clear();
|
|
90
|
-
this.create();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
//创建相机
|
|
94
|
-
}, {
|
|
95
|
-
key: "_createLightCamera",
|
|
96
|
-
value: function _createLightCamera() {
|
|
97
|
-
if (!this._canOperate) return;
|
|
98
|
-
this.lightCamera = new Cesium.Camera(this.getMap().scene);
|
|
99
|
-
this.lightCamera.position = this._viewPositionC3;
|
|
100
|
-
// if (this._viewPositionEndC3) {
|
|
101
|
-
// this.lightCamera.direction = Cesium.Cartesian3.normalize(
|
|
102
|
-
// Cesium.Cartesian3.subtract(
|
|
103
|
-
// this._viewPositionEndC3,
|
|
104
|
-
// this._viewPositionC3,
|
|
105
|
-
// new Cesium.Cartesian3(),
|
|
106
|
-
// ),
|
|
107
|
-
// new Cesium.Cartesian3(),
|
|
108
|
-
// ); // direction是相机面向的方向
|
|
109
|
-
// }
|
|
110
|
-
this.lightCamera.frustum.near = this._viewDistance * 0.001;
|
|
111
|
-
this.lightCamera.frustum.far = this._viewDistance;
|
|
112
|
-
var hr = Cesium.Math.toRadians(this.options.horizontalViewAngle);
|
|
113
|
-
var vr = Cesium.Math.toRadians(this.options.verticalViewAngle);
|
|
114
|
-
this.lightCamera.frustum.aspectRatio = this._viewDistance * Math.tan(hr / 2) * 2 / (this._viewDistance * Math.tan(vr / 2) * 2);
|
|
115
|
-
if (hr > vr) {
|
|
116
|
-
this.lightCamera.frustum.fov = hr;
|
|
117
|
-
} else {
|
|
118
|
-
this.lightCamera.frustum.fov = vr;
|
|
119
|
-
}
|
|
120
|
-
this.lightCamera.setView({
|
|
121
|
-
destination: this._viewPositionC3,
|
|
122
|
-
orientation: {
|
|
123
|
-
heading: Cesium.Math.toRadians(this._viewHeading || 0),
|
|
124
|
-
pitch: Cesium.Math.toRadians(this._viewPitch || 0),
|
|
125
|
-
roll: 0
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
//创建阴影贴图
|
|
131
|
-
}, {
|
|
132
|
-
key: "_createShadowMap",
|
|
133
|
-
value: function _createShadowMap() {
|
|
134
|
-
if (!this._canOperate) return;
|
|
135
|
-
// 启用地形阴影
|
|
136
|
-
this.getMap().scene.globe.shadows = Cesium.ShadowMode.ENABLED;
|
|
137
|
-
this.shadowMap = new Cesium.ViewshedShadowMap({
|
|
138
|
-
context: this.getMap().scene.context,
|
|
139
|
-
lightCamera: this.lightCamera,
|
|
140
|
-
enabled: this.options.enabled,
|
|
141
|
-
isPointLight: true,
|
|
142
|
-
pointLightRadius: this._viewDistance,
|
|
143
|
-
cascadesEnabled: false,
|
|
144
|
-
size: this.options.size,
|
|
145
|
-
softShadows: this.options.softShadows,
|
|
146
|
-
normalOffset: false,
|
|
147
|
-
// @ts-ignore
|
|
148
|
-
fromLightSource: false,
|
|
149
|
-
fadingEnabled: false
|
|
150
|
-
});
|
|
151
|
-
this.getMap().scene.shadowMap = this.shadowMap;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
//创建PostStage
|
|
155
|
-
}, {
|
|
156
|
-
key: "_createPostStage",
|
|
157
|
-
value: function _createPostStage() {
|
|
158
|
-
var _this = this;
|
|
159
|
-
if (!this._canOperate()) return;
|
|
160
|
-
var fs = "\n #ifdef GL_ES\n precision highp float;\n #endif\n\n #define USE_CUBE_MAP_SHADOW true\n\n uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n in vec2 v_textureCoordinates;\n\n uniform mat4 camera_projection_matrix;\n uniform mat4 camera_view_matrix;\n uniform samplerCube shadowMap_textureCube;\n uniform mat4 shadowMap_matrix;\n uniform vec4 shadowMap_lightPositionEC;\n uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\n uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\n uniform float helsing_viewDistance;\n uniform vec4 helsing_visibleAreaColor;\n uniform vec4 helsing_invisibleAreaColor;\n\n out vec4 fragColor;\n\n struct zx_shadowParameters {\n vec3 texCoords;\n float depthBias;\n float depth;\n float nDotL;\n vec2 texelStepSize;\n float normalShadingSmooth;\n float darkness;\n };\n\n float czm_shadowVisibility(samplerCube shadowMap, zx_shadowParameters shadowParameters) {\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n }\n\n vec4 getPositionEC(){\n return czm_windowToEyeCoordinates(gl_FragCoord);\n }\n\n vec3 getNormalEC(){\n return vec3(1.0);\n }\n\n vec4 toEye( vec2 uv, float depth){\n vec2 xy = vec2((uv.x * 2.0 - 1.0), (uv.y * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera = posInCamera / posInCamera.w;\n return posInCamera;\n }\n\n vec3 pointProjectOnPlane( vec3 planeNormal, vec3 planeOrigin, vec3 point ){\n vec3 v01 = point - planeOrigin;\n float d = dot(planeNormal, v01);\n return (point - planeNormal * d);\n }\n\n float getDepth( vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n }\n\n float shadow( vec4 positionEC ){\n vec3 normalEC = getNormalEC();\n zx_shadowParameters shadowParameters;\n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;\n float distance = length(directionEC);\n directionEC = normalize(directionEC);\n float radius = shadowMap_lightPositionEC.w;\n if (distance > radius) {\n return 2.0;\n }\n vec3 directionWC = czm_inverseViewRotation * directionEC;\n shadowParameters.depth = distance / radius - 0.0003;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n shadowParameters.texCoords = directionWC;\n float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters);\n return visibility;\n }\n\n bool visible( vec4 result ) {\n vec4 r = result / result.w;\n return r.x >= -1.0 && r.x <= 1.0 &&\n r.y >= -1.0 && r.y <= 1.0 &&\n r.z >= -1.0 && r.z <= 1.0;\n }\n\n void main() {\n // base color from the color texture\n vec4 baseColor = texture(colorTexture, v_textureCoordinates);\n\n // fetch depth and convert\n float depth = getDepth(texture(depthTexture, v_textureCoordinates));\n vec4 viewPos = toEye(v_textureCoordinates, depth);\n vec4 worldPos = czm_inverseView * viewPos;\n vec4 vcPos = camera_view_matrix * worldPos;\n\n float near = 0.001 * helsing_viewDistance;\n float dis = length(vcPos.xyz);\n\n fragColor = baseColor;\n\n if (dis > near && dis < helsing_viewDistance) {\n vec4 posInEye = camera_projection_matrix * vcPos;\n if (visible(posInEye)) {\n float vis = shadow(viewPos);\n if (vis > 0.3) {\n fragColor = mix(fragColor, helsing_visibleAreaColor, 0.5);\n } else {\n fragColor = mix(fragColor, helsing_invisibleAreaColor, 0.5);\n }\n }\n }\n }\n ";
|
|
161
|
-
var scene = this.getMap().scene;
|
|
162
|
-
var postStage = new Cesium.PostProcessStage({
|
|
163
|
-
fragmentShader: fs,
|
|
164
|
-
uniforms: {
|
|
165
|
-
shadowMap_textureCube: function shadowMap_textureCube() {
|
|
166
|
-
_this.shadowMap.update(Reflect.get(scene, '_frameState'));
|
|
167
|
-
return Reflect.get(_this.shadowMap, '_shadowMapTexture');
|
|
168
|
-
},
|
|
169
|
-
shadowMap_matrix: function shadowMap_matrix() {
|
|
170
|
-
_this.shadowMap.update(Reflect.get(scene, '_frameState'));
|
|
171
|
-
return Reflect.get(_this.shadowMap, '_shadowMapMatrix');
|
|
172
|
-
},
|
|
173
|
-
shadowMap_lightPositionEC: function shadowMap_lightPositionEC() {
|
|
174
|
-
_this.shadowMap.update(Reflect.get(scene, '_frameState'));
|
|
175
|
-
return Reflect.get(_this.shadowMap, '_lightPositionEC');
|
|
176
|
-
},
|
|
177
|
-
shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness: function shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness() {
|
|
178
|
-
_this.shadowMap.update(Reflect.get(scene, '_frameState'));
|
|
179
|
-
var bias = _this.shadowMap._pointBias;
|
|
180
|
-
// Return a Cartesian4 (normalOffsetScale, distance, maximumDistance, darkness)
|
|
181
|
-
return Cesium.Cartesian4.fromElements(bias.normalOffsetScale, _this.shadowMap._distance, _this.shadowMap.maximumDistance, 0.0);
|
|
182
|
-
},
|
|
183
|
-
shadowMap_texelSizeDepthBiasAndNormalShadingSmooth: function shadowMap_texelSizeDepthBiasAndNormalShadingSmooth() {
|
|
184
|
-
_this.shadowMap.update(Reflect.get(scene, '_frameState'));
|
|
185
|
-
var bias = _this.shadowMap._pointBias;
|
|
186
|
-
var texelStepSizeX = 1.0 / _this.shadowMap._textureSize.x;
|
|
187
|
-
var texelStepSizeY = 1.0 / _this.shadowMap._textureSize.y;
|
|
188
|
-
return Cesium.Cartesian4.fromElements(texelStepSizeX, texelStepSizeY, bias.depthBias, bias.normalShadingSmooth);
|
|
189
|
-
},
|
|
190
|
-
camera_projection_matrix: this.lightCamera.frustum.projectionMatrix,
|
|
191
|
-
camera_view_matrix: this.lightCamera.viewMatrix,
|
|
192
|
-
helsing_viewDistance: function helsing_viewDistance() {
|
|
193
|
-
return _this._viewDistance;
|
|
194
|
-
},
|
|
195
|
-
helsing_visibleAreaColor: this.options.visibleAreaColor,
|
|
196
|
-
helsing_invisibleAreaColor: this.options.invisibleAreaColor
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
this.postStage = scene.postProcessStages.add(postStage);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
//创建视锥线
|
|
203
|
-
}, {
|
|
204
|
-
key: "_drawFrustumOutline",
|
|
205
|
-
value: function _drawFrustumOutline() {
|
|
206
|
-
if (!this._canOperate) return;
|
|
207
|
-
this.frustumCamera = new Frustum(this.getMap(), {
|
|
208
|
-
position: this.options.position,
|
|
209
|
-
fill: false,
|
|
210
|
-
outlineColor: this.options.outlineColor,
|
|
211
|
-
isWithCamera: true,
|
|
212
|
-
camera: this.lightCamera
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
//创建视网
|
|
217
|
-
}, {
|
|
218
|
-
key: "_drawSketch",
|
|
219
|
-
value: function _drawSketch() {
|
|
220
|
-
if (!this._canOperate) return;
|
|
221
|
-
this.sketchLayer = this.getMap().addGraphicLayer({
|
|
222
|
-
type: 'Feature',
|
|
223
|
-
geometry: {
|
|
224
|
-
type: 'Point',
|
|
225
|
-
coordinates: this.options.position
|
|
226
|
-
}
|
|
227
|
-
}, {
|
|
228
|
-
type: 'ellipsoid',
|
|
229
|
-
style: {
|
|
230
|
-
radii: [this._viewDistance, this._viewDistance, this._viewDistance],
|
|
231
|
-
minimumClock: -this.options.horizontalViewAngle / 2,
|
|
232
|
-
maximumClock: this.options.horizontalViewAngle / 2,
|
|
233
|
-
minimumCone: this.options.verticalViewAngle + 7.75,
|
|
234
|
-
maximumCone: 180 - this.options.verticalViewAngle - 7.75,
|
|
235
|
-
fill: false,
|
|
236
|
-
outline: true,
|
|
237
|
-
subdivisions: 256,
|
|
238
|
-
stackPartitions: 64,
|
|
239
|
-
slicePartitions: 64,
|
|
240
|
-
outlineColor: this.options.outlineColor
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
this.sketchLayer.layers[0].entity.orientation = Cesium.Transforms.headingPitchRollQuaternion(this._viewPositionC3, Cesium.HeadingPitchRoll.fromDegrees(this._viewHeading - this.options.horizontalViewAngle, this._viewPitch, 0.0));
|
|
244
|
-
}
|
|
245
|
-
}, {
|
|
246
|
-
key: "clear",
|
|
247
|
-
value: function clear() {
|
|
248
|
-
if (!this._canOperate) return;
|
|
249
|
-
if (this.frustumCamera) {
|
|
250
|
-
this.frustumCamera.destroy();
|
|
251
|
-
this.frustumCamera = null;
|
|
252
|
-
}
|
|
253
|
-
if (this.postStage) {
|
|
254
|
-
this.getMap().scene.postProcessStages.remove(this.postStage);
|
|
255
|
-
this.postStage = null;
|
|
256
|
-
}
|
|
257
|
-
if (this.sketchLayer) {
|
|
258
|
-
this.sketchLayer.remove();
|
|
259
|
-
this.sketchLayer = null;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}, {
|
|
263
|
-
key: "destroy",
|
|
264
|
-
value: function destroy() {
|
|
265
|
-
if (!this._canOperate) return;
|
|
266
|
-
this.isDestroyed = true;
|
|
267
|
-
this.clear();
|
|
268
|
-
}
|
|
269
|
-
}]);
|
|
270
|
-
return ViewshedAnalysis;
|
|
271
|
-
}();
|
|
272
|
-
export default ViewshedAnalysis;
|
|
273
|
-
|
|
274
|
-
//获取偏航角
|
|
275
|
-
function getHeading(fromPosition, toPosition) {
|
|
276
|
-
var finalPosition = new Cesium.Cartesian3();
|
|
277
|
-
var matrix4 = Cesium.Transforms.eastNorthUpToFixedFrame(fromPosition);
|
|
278
|
-
Cesium.Matrix4.inverse(matrix4, matrix4);
|
|
279
|
-
Cesium.Matrix4.multiplyByPoint(matrix4, toPosition, finalPosition);
|
|
280
|
-
Cesium.Cartesian3.normalize(finalPosition, finalPosition);
|
|
281
|
-
return Cesium.Math.toDegrees(Math.atan2(finalPosition.x, finalPosition.y));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
//获取俯仰角
|
|
285
|
-
function getPitch(fromPosition, toPosition) {
|
|
286
|
-
var finalPosition = new Cesium.Cartesian3();
|
|
287
|
-
var matrix4 = Cesium.Transforms.eastNorthUpToFixedFrame(fromPosition);
|
|
288
|
-
Cesium.Matrix4.inverse(matrix4, matrix4);
|
|
289
|
-
Cesium.Matrix4.multiplyByPoint(matrix4, toPosition, finalPosition);
|
|
290
|
-
Cesium.Cartesian3.normalize(finalPosition, finalPosition);
|
|
291
|
-
return Cesium.Math.toDegrees(Math.asin(finalPosition.z));
|
|
292
|
-
}
|
|
1
|
+
(function(_0x1c8398,_0x4928b5){var _0xb70e6a=_0x5e57,_0x3faa79=_0x1c8398();while(!![]){try{var _0x2d35e0=-parseInt(_0xb70e6a(0xa6))/0x1+-parseInt(_0xb70e6a(0x9c))/0x2+-parseInt(_0xb70e6a(0x8a))/0x3+-parseInt(_0xb70e6a(0x9b))/0x4+-parseInt(_0xb70e6a(0xc2))/0x5*(parseInt(_0xb70e6a(0x87))/0x6)+parseInt(_0xb70e6a(0x97))/0x7*(parseInt(_0xb70e6a(0xa4))/0x8)+parseInt(_0xb70e6a(0xc7))/0x9;if(_0x2d35e0===_0x4928b5)break;else _0x3faa79['push'](_0x3faa79['shift']());}catch(_0x6192da){_0x3faa79['push'](_0x3faa79['shift']());}}}(_0xbc99,0x89dcb));function _typeof(_0x4fcd5c){'@babel/helpers - typeof';return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol['iterator']?function(_0x89318a){return typeof _0x89318a;}:function(_0x54127f){var _0xe08142=_0x5e57;return _0x54127f&&'function'==typeof Symbol&&_0x54127f['constructor']===Symbol&&_0x54127f!==Symbol[_0xe08142(0xd4)]?_0xe08142(0xcc):typeof _0x54127f;},_typeof(_0x4fcd5c);}function _slicedToArray(_0x3f7dd1,_0xe71b78){return _arrayWithHoles(_0x3f7dd1)||_iterableToArrayLimit(_0x3f7dd1,_0xe71b78)||_unsupportedIterableToArray(_0x3f7dd1,_0xe71b78)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError('Invalid\x20attempt\x20to\x20destructure\x20non-iterable\x20instance.\x0aIn\x20order\x20to\x20be\x20iterable,\x20non-array\x20objects\x20must\x20have\x20a\x20[Symbol.iterator]()\x20method.');}function _unsupportedIterableToArray(_0x339350,_0x1bd974){var _0x3cf411=_0x5e57;if(!_0x339350)return;if(typeof _0x339350==='string')return _arrayLikeToArray(_0x339350,_0x1bd974);var _0xb2996d=Object[_0x3cf411(0xd4)][_0x3cf411(0xbf)]['call'](_0x339350)['slice'](0x8,-0x1);if(_0xb2996d===_0x3cf411(0xbb)&&_0x339350['constructor'])_0xb2996d=_0x339350['constructor']['name'];if(_0xb2996d===_0x3cf411(0x9f)||_0xb2996d==='Set')return Array['from'](_0x339350);if(_0xb2996d==='Arguments'||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[_0x3cf411(0x8d)](_0xb2996d))return _arrayLikeToArray(_0x339350,_0x1bd974);}function _arrayLikeToArray(_0x3b878f,_0x33418b){var _0x40bd20=_0x5e57;if(_0x33418b==null||_0x33418b>_0x3b878f[_0x40bd20(0xa7)])_0x33418b=_0x3b878f[_0x40bd20(0xa7)];for(var _0x53076a=0x0,_0x43b233=new Array(_0x33418b);_0x53076a<_0x33418b;_0x53076a++)_0x43b233[_0x53076a]=_0x3b878f[_0x53076a];return _0x43b233;}function _iterableToArrayLimit(_0x26482d,_0x3c83ab){var _0x34129d=_0x5e57,_0x4cc7f5=null==_0x26482d?null:_0x34129d(0x8b)!=typeof Symbol&&_0x26482d[Symbol[_0x34129d(0xad)]]||_0x26482d['@@iterator'];if(null!=_0x4cc7f5){var _0x379d48,_0x50e493,_0x188fb5,_0x5a1f06,_0x3d7a29=[],_0x282871=!0x0,_0x38eec9=!0x1;try{if(_0x188fb5=(_0x4cc7f5=_0x4cc7f5['call'](_0x26482d))['next'],0x0===_0x3c83ab){if(Object(_0x4cc7f5)!==_0x4cc7f5)return;_0x282871=!0x1;}else{for(;!(_0x282871=(_0x379d48=_0x188fb5['call'](_0x4cc7f5))[_0x34129d(0x8f)])&&(_0x3d7a29['push'](_0x379d48['value']),_0x3d7a29[_0x34129d(0xa7)]!==_0x3c83ab);_0x282871=!0x0);}}catch(_0x556c73){_0x38eec9=!0x0,_0x50e493=_0x556c73;}finally{try{if(!_0x282871&&null!=_0x4cc7f5[_0x34129d(0xcd)]&&(_0x5a1f06=_0x4cc7f5['return'](),Object(_0x5a1f06)!==_0x5a1f06))return;}finally{if(_0x38eec9)throw _0x50e493;}}return _0x3d7a29;}}function _arrayWithHoles(_0x48f10e){if(Array['isArray'](_0x48f10e))return _0x48f10e;}function _classCallCheck(_0x353e9a,_0x2deda9){var _0xdb1ee5=_0x5e57;if(!(_0x353e9a instanceof _0x2deda9))throw new TypeError(_0xdb1ee5(0xcb));}function _defineProperties(_0x434447,_0x291195){var _0x5c82ef=_0x5e57;for(var _0x5c8080=0x0;_0x5c8080<_0x291195[_0x5c82ef(0xa7)];_0x5c8080++){var _0x26d0a1=_0x291195[_0x5c8080];_0x26d0a1['enumerable']=_0x26d0a1[_0x5c82ef(0x92)]||![],_0x26d0a1['configurable']=!![];if('value'in _0x26d0a1)_0x26d0a1[_0x5c82ef(0xd8)]=!![];Object['defineProperty'](_0x434447,_toPropertyKey(_0x26d0a1['key']),_0x26d0a1);}}function _createClass(_0x33cc0e,_0x4ba63f,_0x275a29){var _0x2b9607=_0x5e57;if(_0x4ba63f)_defineProperties(_0x33cc0e[_0x2b9607(0xd4)],_0x4ba63f);if(_0x275a29)_defineProperties(_0x33cc0e,_0x275a29);return Object[_0x2b9607(0xa3)](_0x33cc0e,'prototype',{'writable':![]}),_0x33cc0e;}function _defineProperty(_0x274aea,_0x4205c0,_0x1c1122){return _0x4205c0=_toPropertyKey(_0x4205c0),_0x4205c0 in _0x274aea?Object['defineProperty'](_0x274aea,_0x4205c0,{'value':_0x1c1122,'enumerable':!![],'configurable':!![],'writable':!![]}):_0x274aea[_0x4205c0]=_0x1c1122,_0x274aea;}function _toPropertyKey(_0x2653a6){var _0x491c16=_0x5e57,_0x73af04=_toPrimitive(_0x2653a6,'string');return _0x491c16(0xcc)==_typeof(_0x73af04)?_0x73af04:String(_0x73af04);}function _toPrimitive(_0xefc2f3,_0x5558e7){var _0x23da91=_0x5e57;if('object'!=_typeof(_0xefc2f3)||!_0xefc2f3)return _0xefc2f3;var _0x59dee7=_0xefc2f3[Symbol[_0x23da91(0xc0)]];if(void 0x0!==_0x59dee7){var _0x580297=_0x59dee7[_0x23da91(0x83)](_0xefc2f3,_0x5558e7||_0x23da91(0x90));if('object'!=_typeof(_0x580297))return _0x580297;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x23da91(0x8e)===_0x5558e7?String:Number)(_0xefc2f3);}import*as _0x23d1aa from'deeptwins-cesium';import{merge}from'lodash';import{DEFAULT_VIEWSHED_ANALYSIS_OPTIONS}from'../constant';function _0x5e57(_0x44dc68,_0x498ed6){_0x44dc68=_0x44dc68-0x82;var _0xbc9993=_0xbc99();var _0x5e5759=_0xbc9993[_0x44dc68];if(_0x5e57['DvczwD']===undefined){var _0xd0567=function(_0x456b7d){var _0x39f979='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x23d1aa='',_0x394396='';for(var _0x5120c8=0x0,_0x4fcd5c,_0x89318a,_0x54127f=0x0;_0x89318a=_0x456b7d['charAt'](_0x54127f++);~_0x89318a&&(_0x4fcd5c=_0x5120c8%0x4?_0x4fcd5c*0x40+_0x89318a:_0x89318a,_0x5120c8++%0x4)?_0x23d1aa+=String['fromCharCode'](0xff&_0x4fcd5c>>(-0x2*_0x5120c8&0x6)):0x0){_0x89318a=_0x39f979['indexOf'](_0x89318a);}for(var _0x3f7dd1=0x0,_0xe71b78=_0x23d1aa['length'];_0x3f7dd1<_0xe71b78;_0x3f7dd1++){_0x394396+='%'+('00'+_0x23d1aa['charCodeAt'](_0x3f7dd1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x394396);};_0x5e57['JzVEDp']=_0xd0567,_0x5e57['JHiwYo']={},_0x5e57['DvczwD']=!![];}var _0x489ba1=_0xbc9993[0x0],_0x29f535=_0x44dc68+_0x489ba1,_0x53ec72=_0x5e57['JHiwYo'][_0x29f535];return!_0x53ec72?(_0x5e5759=_0x5e57['JzVEDp'](_0x5e5759),_0x5e57['JHiwYo'][_0x29f535]=_0x5e5759):_0x5e5759=_0x53ec72,_0x5e5759;}import*as _0x394396 from'../tool/utils';import _0x5120c8 from'../visualization/Frustum';var ViewshedAnalysis=(function(){var _0x144375=_0x5e57;function _0x369e3a(_0x4b397d,_0x272da7){var _0x1c0294=_0x5e57;_classCallCheck(this,_0x369e3a),_defineProperty(this,_0x1c0294(0x9a),void 0x0),_defineProperty(this,_0x1c0294(0xb7),void 0x0),_defineProperty(this,'isDestroyed',![]),_defineProperty(this,_0x1c0294(0x9e),void 0x0),_defineProperty(this,_0x1c0294(0xae),void 0x0),_defineProperty(this,_0x1c0294(0xb2),void 0x0),_defineProperty(this,'_viewHeading',void 0x0),_defineProperty(this,_0x1c0294(0x9d),void 0x0),_defineProperty(this,'lightCamera',void 0x0),_defineProperty(this,_0x1c0294(0xd3),void 0x0),_defineProperty(this,'postStage',void 0x0),_defineProperty(this,_0x1c0294(0xa1),void 0x0),_defineProperty(this,'sketchLayer',void 0x0),this['_mapContext']=_0x4b397d['_mapContext'],this[_0x1c0294(0xb7)]=merge(DEFAULT_VIEWSHED_ANALYSIS_OPTIONS(),_0x272da7);if(!this['options']['position'])return;var _0x2a3884=_slicedToArray(this[_0x1c0294(0xb7)][_0x1c0294(0xac)],0x3),_0x53ead3=_0x2a3884[0x0],_0x8aec6e=_0x2a3884[0x1],_0xbdb22e=_0x2a3884[0x2];this[_0x1c0294(0x9e)]=_0x394396[_0x1c0294(0x84)](_0x53ead3,_0x8aec6e,_0xbdb22e||0x0),this['_viewDistance']=this[_0x1c0294(0xb7)]['distance'],this['_viewHeading']=this['options']['heading'],this['_viewPitch']=this['options']['pitch'];if(this['options'][_0x1c0294(0xb5)]){var _0x291438=_slicedToArray(this[_0x1c0294(0xb7)]['positionEnd'],0x3),_0x4218a0=_0x291438[0x0],_0xf561ac=_0x291438[0x1],_0x4e011a=_0x291438[0x2];this['_viewPositionEndC3']=_0x394396['lngLatAltToCartesian3'](_0x4218a0,_0xf561ac,_0x4e011a||0x0),this[_0x1c0294(0xb2)]=_0x23d1aa['Cartesian3']['distance'](this[_0x1c0294(0x9e)],this[_0x1c0294(0xae)]),this['_viewHeading']=getHeading(this['_viewPositionC3'],this['_viewPositionEndC3']),this['_viewPitch']=getPitch(this[_0x1c0294(0x9e)],this['_viewPositionEndC3']);}this['create']();}return _createClass(_0x369e3a,[{'key':_0x144375(0xbd),'value':function _0x4c1d9c(){if(this['isDestroyed'])return _0x394396['error']('SunLightAnalysis实例已销毁'),![];return!![];}},{'key':'getMap','value':function _0x3670f1(){var _0x570ec9=_0x144375;return this[_0x570ec9(0x9a)]&&this[_0x570ec9(0x9a)]['getMap']();}},{'key':_0x144375(0xa9),'value':function _0x4d5eae(){this['_createLightCamera'](),this['_createShadowMap'](),this['_createPostStage'](),this['_drawFrustumOutline'](),this['_drawSketch']();}},{'key':'update','value':function _0x50732e(){var _0x3e317d=_0x144375;if(!this['_canOperate'])return;this['clear'](),this[_0x3e317d(0xa9)]();}},{'key':_0x144375(0xb4),'value':function _0x54431c(){var _0x18b9ec=_0x144375;if(!this[_0x18b9ec(0xbd)])return;this[_0x18b9ec(0xd1)]=new _0x23d1aa['Camera'](this[_0x18b9ec(0xaf)]()['scene']),this[_0x18b9ec(0xd1)]['position']=this[_0x18b9ec(0x9e)],this[_0x18b9ec(0xd1)]['frustum']['near']=this[_0x18b9ec(0xb2)]*0.001,this['lightCamera'][_0x18b9ec(0xc9)]['far']=this['_viewDistance'];var _0x3172bc=_0x23d1aa['Math'][_0x18b9ec(0xd5)](this[_0x18b9ec(0xb7)][_0x18b9ec(0xba)]),_0x197d31=_0x23d1aa['Math'][_0x18b9ec(0xd5)](this[_0x18b9ec(0xb7)]['verticalViewAngle']);this['lightCamera']['frustum']['aspectRatio']=this[_0x18b9ec(0xb2)]*Math[_0x18b9ec(0xbc)](_0x3172bc/0x2)*0x2/(this['_viewDistance']*Math['tan'](_0x197d31/0x2)*0x2),_0x3172bc>_0x197d31?this['lightCamera']['frustum'][_0x18b9ec(0xc1)]=_0x3172bc:this['lightCamera']['frustum']['fov']=_0x197d31,this['lightCamera']['setView']({'destination':this['_viewPositionC3'],'orientation':{'heading':_0x23d1aa[_0x18b9ec(0x95)][_0x18b9ec(0xd5)](this['_viewHeading']||0x0),'pitch':_0x23d1aa['Math'][_0x18b9ec(0xd5)](this['_viewPitch']||0x0),'roll':0x0}});}},{'key':'_createShadowMap','value':function _0x3066db(){var _0xb0e338=_0x144375;if(!this['_canOperate'])return;this[_0xb0e338(0xaf)]()['scene']['globe']['shadows']=_0x23d1aa['ShadowMode']['ENABLED'],this['shadowMap']=new _0x23d1aa[(_0xb0e338(0x88))]({'context':this['getMap']()['scene']['context'],'lightCamera':this['lightCamera'],'enabled':this[_0xb0e338(0xb7)]['enabled'],'isPointLight':!![],'pointLightRadius':this[_0xb0e338(0xb2)],'cascadesEnabled':![],'size':this[_0xb0e338(0xb7)][_0xb0e338(0xd6)],'softShadows':this[_0xb0e338(0xb7)][_0xb0e338(0xb9)],'normalOffset':![],'fromLightSource':![],'fadingEnabled':![]}),this['getMap']()[_0xb0e338(0x94)][_0xb0e338(0xd3)]=this['shadowMap'];}},{'key':_0x144375(0xaa),'value':function _0x49659c(){var _0x1537e1=_0x144375,_0x18e512=this;if(!this['_canOperate']())return;var _0x1a7f79='\x0a\x20\x20\x20\x20#ifdef\x20GL_ES\x0a\x20\x20\x20\x20precision\x20highp\x20float;\x0a\x20\x20\x20\x20#endif\x0a\x0a\x20\x20\x20\x20#define\x20USE_CUBE_MAP_SHADOW\x20true\x0a\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20colorTexture;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20depthTexture;\x0a\x20\x20\x20\x20in\x20vec2\x20v_textureCoordinates;\x0a\x0a\x20\x20\x20\x20uniform\x20mat4\x20camera_projection_matrix;\x0a\x20\x20\x20\x20uniform\x20mat4\x20camera_view_matrix;\x0a\x20\x20\x20\x20uniform\x20samplerCube\x20shadowMap_textureCube;\x0a\x20\x20\x20\x20uniform\x20mat4\x20shadowMap_matrix;\x0a\x20\x20\x20\x20uniform\x20vec4\x20shadowMap_lightPositionEC;\x0a\x20\x20\x20\x20uniform\x20vec4\x20shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\x0a\x20\x20\x20\x20uniform\x20vec4\x20shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\x0a\x20\x20\x20\x20uniform\x20float\x20helsing_viewDistance;\x0a\x20\x20\x20\x20uniform\x20vec4\x20helsing_visibleAreaColor;\x0a\x20\x20\x20\x20uniform\x20vec4\x20helsing_invisibleAreaColor;\x0a\x0a\x20\x20\x20\x20out\x20vec4\x20fragColor;\x0a\x0a\x20\x20\x20\x20struct\x20zx_shadowParameters\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20texCoords;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20depthBias;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20depth;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20nDotL;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec2\x20texelStepSize;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20normalShadingSmooth;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20darkness;\x0a\x20\x20\x20\x20};\x0a\x0a\x20\x20\x20\x20float\x20czm_shadowVisibility(samplerCube\x20shadowMap,\x20zx_shadowParameters\x20shadowParameters)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20depthBias\x20=\x20shadowParameters.depthBias;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20depth\x20=\x20shadowParameters.depth;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20nDotL\x20=\x20shadowParameters.nDotL;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20normalShadingSmooth\x20=\x20shadowParameters.normalShadingSmooth;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20darkness\x20=\x20shadowParameters.darkness;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20uvw\x20=\x20shadowParameters.texCoords;\x0a\x20\x20\x20\x20\x20\x20\x20\x20depth\x20-=\x20depthBias;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20visibility\x20=\x20czm_shadowDepthCompare(shadowMap,\x20uvw,\x20depth);\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20czm_private_shadowVisibility(visibility,\x20nDotL,\x20normalShadingSmooth,\x20darkness);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20vec4\x20getPositionEC(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20czm_windowToEyeCoordinates(gl_FragCoord);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20vec3\x20getNormalEC(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20vec3(1.0);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20vec4\x20toEye(\x20vec2\x20uv,\x20float\x20depth){\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec2\x20xy\x20=\x20vec2((uv.x\x20*\x202.0\x20-\x201.0),\x20(uv.y\x20*\x202.0\x20-\x201.0));\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20posInCamera\x20=\x20czm_inverseProjection\x20*\x20vec4(xy,\x20depth,\x201.0);\x0a\x20\x20\x20\x20\x20\x20\x20\x20posInCamera\x20=\x20posInCamera\x20/\x20posInCamera.w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20posInCamera;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20vec3\x20pointProjectOnPlane(\x20vec3\x20planeNormal,\x20vec3\x20planeOrigin,\x20vec3\x20point\x20){\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20v01\x20=\x20point\x20-\x20planeOrigin;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20d\x20=\x20dot(planeNormal,\x20v01);\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20(point\x20-\x20planeNormal\x20*\x20d);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20getDepth(\x20vec4\x20depth){\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20z_window\x20=\x20czm_unpackDepth(depth);\x0a\x20\x20\x20\x20\x20\x20\x20\x20z_window\x20=\x20czm_reverseLogDepth(z_window);\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20n_range\x20=\x20czm_depthRange.near;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20f_range\x20=\x20czm_depthRange.far;\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20(2.0\x20*\x20z_window\x20-\x20n_range\x20-\x20f_range)\x20/\x20(f_range\x20-\x20n_range);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20shadow(\x20vec4\x20positionEC\x20){\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20normalEC\x20=\x20getNormalEC();\x0a\x20\x20\x20\x20\x20\x20\x20\x20zx_shadowParameters\x20shadowParameters;\x0a\x20\x20\x20\x20\x20\x20\x20\x20shadowParameters.texelStepSize\x20=\x20shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\x0a\x20\x20\x20\x20\x20\x20\x20\x20shadowParameters.depthBias\x20=\x20shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\x0a\x20\x20\x20\x20\x20\x20\x20\x20shadowParameters.normalShadingSmooth\x20=\x20shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20shadowParameters.darkness\x20=\x20shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20directionEC\x20=\x20positionEC.xyz\x20-\x20shadowMap_lightPositionEC.xyz;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20distance\x20=\x20length(directionEC);\x0a\x20\x20\x20\x20\x20\x20\x20\x20directionEC\x20=\x20normalize(directionEC);\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20radius\x20=\x20shadowMap_lightPositionEC.w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(distance\x20>\x20radius)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x202.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20directionWC\x20=\x20czm_inverseViewRotation\x20*\x20directionEC;\x0a\x20\x20\x20\x20\x20\x20\x20\x20shadowParameters.depth\x20=\x20distance\x20/\x20radius\x20-\x200.0003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20shadowParameters.nDotL\x20=\x20clamp(dot(normalEC,\x20-directionEC),\x200.0,\x201.0);\x0a\x20\x20\x20\x20\x20\x20\x20\x20shadowParameters.texCoords\x20=\x20directionWC;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20visibility\x20=\x20czm_shadowVisibility(shadowMap_textureCube,\x20shadowParameters);\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20visibility;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20bool\x20visible(\x20vec4\x20result\x20)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20r\x20=\x20result\x20/\x20result.w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20r.x\x20>=\x20-1.0\x20&&\x20r.x\x20<=\x201.0\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20r.y\x20>=\x20-1.0\x20&&\x20r.y\x20<=\x201.0\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20r.z\x20>=\x20-1.0\x20&&\x20r.z\x20<=\x201.0;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20void\x20main()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20base\x20color\x20from\x20the\x20color\x20texture\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20baseColor\x20=\x20texture(colorTexture,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20fetch\x20depth\x20and\x20convert\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20depth\x20=\x20getDepth(texture(depthTexture,\x20v_textureCoordinates));\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20viewPos\x20=\x20toEye(v_textureCoordinates,\x20depth);\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20worldPos\x20=\x20czm_inverseView\x20*\x20viewPos;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20vcPos\x20=\x20camera_view_matrix\x20*\x20worldPos;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20near\x20=\x200.001\x20*\x20helsing_viewDistance;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20dis\x20=\x20length(vcPos.xyz);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragColor\x20=\x20baseColor;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(dis\x20>\x20near\x20&&\x20dis\x20<\x20helsing_viewDistance)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20posInEye\x20=\x20camera_projection_matrix\x20*\x20vcPos;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(visible(posInEye))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20vis\x20=\x20shadow(viewPos);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(vis\x20>\x200.3)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fragColor\x20=\x20mix(fragColor,\x20helsing_visibleAreaColor,\x200.5);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fragColor\x20=\x20mix(fragColor,\x20helsing_invisibleAreaColor,\x200.5);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20',_0x5ec035=this[_0x1537e1(0xaf)]()['scene'],_0x7412b9=new _0x23d1aa[(_0x1537e1(0xb6))]({'fragmentShader':_0x1a7f79,'uniforms':{'shadowMap_textureCube':function _0x29b83f(){var _0x4c9842=_0x1537e1;return _0x18e512['shadowMap'][_0x4c9842(0xa0)](Reflect['get'](_0x5ec035,'_frameState')),Reflect[_0x4c9842(0xc4)](_0x18e512['shadowMap'],'_shadowMapTexture');},'shadowMap_matrix':function _0x5916e2(){var _0x3e072e=_0x1537e1;return _0x18e512[_0x3e072e(0xd3)][_0x3e072e(0xa0)](Reflect[_0x3e072e(0xc4)](_0x5ec035,'_frameState')),Reflect[_0x3e072e(0xc4)](_0x18e512['shadowMap'],_0x3e072e(0x93));},'shadowMap_lightPositionEC':function _0x55b634(){var _0x38eb40=_0x1537e1;return _0x18e512[_0x38eb40(0xd3)][_0x38eb40(0xa0)](Reflect[_0x38eb40(0xc4)](_0x5ec035,'_frameState')),Reflect[_0x38eb40(0xc4)](_0x18e512[_0x38eb40(0xd3)],'_lightPositionEC');},'shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness':function _0x1d634d(){var _0x5af997=_0x1537e1;_0x18e512['shadowMap'][_0x5af997(0xa0)](Reflect['get'](_0x5ec035,_0x5af997(0x8c)));var _0x3a91b5=_0x18e512[_0x5af997(0xd3)][_0x5af997(0xce)];return _0x23d1aa['Cartesian4']['fromElements'](_0x3a91b5['normalOffsetScale'],_0x18e512[_0x5af997(0xd3)]['_distance'],_0x18e512['shadowMap'][_0x5af997(0x91)],0x0);},'shadowMap_texelSizeDepthBiasAndNormalShadingSmooth':function _0x4c53b7(){var _0x239d07=_0x1537e1;_0x18e512[_0x239d07(0xd3)][_0x239d07(0xa0)](Reflect[_0x239d07(0xc4)](_0x5ec035,'_frameState'));var _0x566e5a=_0x18e512[_0x239d07(0xd3)]['_pointBias'],_0x11d10b=0x1/_0x18e512['shadowMap'][_0x239d07(0xa2)]['x'],_0x254559=0x1/_0x18e512[_0x239d07(0xd3)]['_textureSize']['y'];return _0x23d1aa['Cartesian4']['fromElements'](_0x11d10b,_0x254559,_0x566e5a['depthBias'],_0x566e5a['normalShadingSmooth']);},'camera_projection_matrix':this[_0x1537e1(0xd1)][_0x1537e1(0xc9)][_0x1537e1(0xc5)],'camera_view_matrix':this[_0x1537e1(0xd1)][_0x1537e1(0x86)],'helsing_viewDistance':function _0x394bc1(){return _0x18e512['_viewDistance'];},'helsing_visibleAreaColor':this['options'][_0x1537e1(0xd0)],'helsing_invisibleAreaColor':this[_0x1537e1(0xb7)]['invisibleAreaColor']}});this[_0x1537e1(0xc3)]=_0x5ec035[_0x1537e1(0x99)]['add'](_0x7412b9);}},{'key':'_drawFrustumOutline','value':function _0x5b03c1(){var _0x4f3f86=_0x144375;if(!this['_canOperate'])return;this[_0x4f3f86(0xa1)]=new _0x5120c8(this[_0x4f3f86(0xaf)](),{'position':this[_0x4f3f86(0xb7)][_0x4f3f86(0xac)],'fill':![],'outlineColor':this['options']['outlineColor'],'isWithCamera':!![],'camera':this['lightCamera']});}},{'key':_0x144375(0xb1),'value':function _0xffc34f(){var _0x3282ac=_0x144375;if(!this[_0x3282ac(0xbd)])return;this[_0x3282ac(0xa5)]=this[_0x3282ac(0xaf)]()['addGraphicLayer']({'type':'Feature','geometry':{'type':_0x3282ac(0xbe),'coordinates':this[_0x3282ac(0xb7)]['position']}},{'type':'ellipsoid','style':{'radii':[this[_0x3282ac(0xb2)],this[_0x3282ac(0xb2)],this['_viewDistance']],'minimumClock':-this[_0x3282ac(0xb7)][_0x3282ac(0xba)]/0x2,'maximumClock':this['options']['horizontalViewAngle']/0x2,'minimumCone':this[_0x3282ac(0xb7)]['verticalViewAngle']+7.75,'maximumCone':0xb4-this['options'][_0x3282ac(0x89)]-7.75,'fill':![],'outline':!![],'subdivisions':0x100,'stackPartitions':0x40,'slicePartitions':0x40,'outlineColor':this['options'][_0x3282ac(0xab)]}}),this[_0x3282ac(0xa5)][_0x3282ac(0x96)][0x0]['entity'][_0x3282ac(0x82)]=_0x23d1aa['Transforms'][_0x3282ac(0xcf)](this[_0x3282ac(0x9e)],_0x23d1aa[_0x3282ac(0xd2)]['fromDegrees'](this[_0x3282ac(0xa8)]-this['options']['horizontalViewAngle'],this[_0x3282ac(0x9d)],0x0));}},{'key':_0x144375(0xd7),'value':function _0x4316b5(){var _0x281dc5=_0x144375;if(!this['_canOperate'])return;this['frustumCamera']&&(this[_0x281dc5(0xa1)][_0x281dc5(0xc8)](),this['frustumCamera']=null),this['postStage']&&(this['getMap']()['scene']['postProcessStages'][_0x281dc5(0xb0)](this[_0x281dc5(0xc3)]),this['postStage']=null),this['sketchLayer']&&(this['sketchLayer'][_0x281dc5(0xb0)](),this['sketchLayer']=null);}},{'key':_0x144375(0xc8),'value':function _0x37d62d(){var _0x34032c=_0x144375;if(!this[_0x34032c(0xbd)])return;this[_0x34032c(0xc6)]=!![],this[_0x34032c(0xd7)]();}}]),_0x369e3a;}());function _0xbc99(){var _0x2eec87=['DxbKyxrL','zNj1C3r1BunHBwvYyq','x3rLEhr1CMvtAxPL','zgvMAw5LuhjVCgvYDhK','mtm2rxrqq1ne','C2TLDgnOtgf5zxi','mtu4mZrvyw1RAKq','BgvUz3rO','x3zPzxDizwfKAw5N','y3jLyxrL','x2nYzwf0zvbVC3rtDgfNzq','B3v0BgLUzunVBg9Y','Cg9ZAxrPB24','AxrLCMf0B3i','x3zPzxDqB3nPDgLVBKvUzemZ','z2v0twfW','CMvTB3zL','x2rYyxDtA2v0y2G','x3zPzxDeAxn0yw5Jzq','Dg9ezwDYzwvZ','x2nYzwf0zuXPz2H0q2fTzxjH','Cg9ZAxrPB25fBMq','ug9ZDfbYB2nLC3ntDgfNzq','B3b0Aw9UCW','Aw52zxjZzq','C29MDfnOywrVD3m','Ag9YAxPVBNrHBfzPzxDbBMDSzq','t2jQzwn0','DgfU','x2nHBK9WzxjHDgu','ug9PBNq','Dg9tDhjPBMC','Dg9qCMLTAxrPDMu','zM92','mtK1mZvcDMTqEgm','Cg9ZDfn0ywDL','z2v0','ChjVAMvJDgLVBK1HDhjPEa','Axnezxn0CM95zwq','mJu0mtC5ndrltMHMD3C','zgvZDhjVEq','zNj1C3r1Bq','BxvSDgLWBhLcEvbVAw50','q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U','C3LTyM9S','CMv0DxjU','x3bVAw50qMLHCW','AgvHzgLUz1bPDgnOuM9SBff1yxrLCM5PB24','DMLZAwjSzufYzwfdB2XVCG','BgLNAhrdyw1LCMe','sgvHzgLUz1bPDgnOuM9SBa','C2HHzg93twfW','ChjVDg90ExbL','Dg9sywrPyw5Z','C2L6zq','y2XLyxi','D3jPDgfIBgu','q2fYDgvZAwfUmW','B3jPzw50yxrPB24','y2fSBa','Bg5Ntgf0qwX0vg9dyxj0zxnPyw4Z','twf0CML4na','DMLLD01HDhjPEa','mte5nfnVEMTtqG','vMLLD3nOzwrtAgfKB3Dnyxa','DMvYDgLJywXwAwv3qw5NBgu','mtm2nJe2n3jyyM5hDW','Dw5KzwzPBMvK','x2zYyw1Lu3rHDgu','DgvZDa','C3rYAw5N','zg9Uzq','zgvMyxvSDa','Bwf4Aw11BurPC3rHBMnL','zw51BwvYywjSzq','x3nOywrVD01HCe1HDhjPEa','C2nLBMu','twf0Aa','Bgf5zxjZ','mJGWotG3AK5twKDv','zwfZDe5VCNrOvxbuB0zPEgvKrNjHBwu','Cg9ZDfbYB2nLC3ntDgfNzxm','x21HCenVBNrLEhq','mZu0nZK4ng9ku1DeBW','mtyXmJqZnKjRquLXtG','x3zPzxDqAxrJAa','x3zPzxDqB3nPDgLVBKmZ','twfW'];_0xbc99=function(){return _0x2eec87;};return _0xbc99();}export default ViewshedAnalysis;function getHeading(_0x329f83,_0x30286c){var _0x19857f=_0x5e57,_0x448eab=new _0x23d1aa['Cartesian3'](),_0x2cb45c=_0x23d1aa['Transforms'][_0x19857f(0x98)](_0x329f83);return _0x23d1aa[_0x19857f(0x85)][_0x19857f(0xb8)](_0x2cb45c,_0x2cb45c),_0x23d1aa['Matrix4'][_0x19857f(0xca)](_0x2cb45c,_0x30286c,_0x448eab),_0x23d1aa['Cartesian3']['normalize'](_0x448eab,_0x448eab),_0x23d1aa['Math']['toDegrees'](Math['atan2'](_0x448eab['x'],_0x448eab['y']));}function getPitch(_0x3ba15f,_0x14361b){var _0x1743df=_0x5e57,_0xc32ac6=new _0x23d1aa[(_0x1743df(0xd9))](),_0xff99b8=_0x23d1aa['Transforms']['eastNorthUpToFixedFrame'](_0x3ba15f);return _0x23d1aa[_0x1743df(0x85)][_0x1743df(0xb8)](_0xff99b8,_0xff99b8),_0x23d1aa['Matrix4']['multiplyByPoint'](_0xff99b8,_0x14361b,_0xc32ac6),_0x23d1aa['Cartesian3']['normalize'](_0xc32ac6,_0xc32ac6),_0x23d1aa['Math'][_0x1743df(0xb3)](Math['asin'](_0xc32ac6['z']));}
|