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,97 +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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
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); }
|
|
7
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
-
import * as Cesium from 'deeptwins-cesium';
|
|
15
|
-
import BaseHeatmap from "./BaseHeatmap";
|
|
16
|
-
var Heatmap2d = /*#__PURE__*/function (_BaseHeatmap) {
|
|
17
|
-
_inherits(Heatmap2d, _BaseHeatmap);
|
|
18
|
-
var _super = _createSuper(Heatmap2d);
|
|
19
|
-
function Heatmap2d() {
|
|
20
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21
|
-
_classCallCheck(this, Heatmap2d);
|
|
22
|
-
return _super.call(this, options);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// 绘制到地图上
|
|
26
|
-
_createClass(Heatmap2d, [{
|
|
27
|
-
key: "addToMap",
|
|
28
|
-
value: function addToMap(map) {
|
|
29
|
-
if (!this._canOperate()) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
this._mapContext = map._mapContext;
|
|
33
|
-
this._init();
|
|
34
|
-
this._syncHeatmapData();
|
|
35
|
-
if (!this.boundBox || !this.heatmapInstance) return;
|
|
36
|
-
this._createPolygonEntity();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// 绘制面entity
|
|
40
|
-
}, {
|
|
41
|
-
key: "_createPolygonEntity",
|
|
42
|
-
value: function _createPolygonEntity() {
|
|
43
|
-
var _this = this;
|
|
44
|
-
var polygonInfo = {
|
|
45
|
-
hierarchy: new Cesium.CallbackProperty(function () {
|
|
46
|
-
return new Cesium.PolygonHierarchy([_this.boundBox.leftTop, _this.boundBox.leftBottom, _this.boundBox.rightBottom, _this.boundBox.rightTop]);
|
|
47
|
-
}, false),
|
|
48
|
-
material: new Cesium.ImageMaterialProperty({
|
|
49
|
-
image: new Cesium.CallbackProperty(function () {
|
|
50
|
-
return _this.heatmapInstance.getDataURL();
|
|
51
|
-
}, false),
|
|
52
|
-
transparent: true
|
|
53
|
-
}),
|
|
54
|
-
heightReference: this.style.heightReference,
|
|
55
|
-
perPositionHeight: false
|
|
56
|
-
};
|
|
57
|
-
if (this.style.heightReference === Cesium.HeightReference.NONE) {
|
|
58
|
-
polygonInfo.height = this.style.height;
|
|
59
|
-
}
|
|
60
|
-
this.heatmapEntity = this.getMap().entities.add({
|
|
61
|
-
id: this.id,
|
|
62
|
-
polygon: polygonInfo
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// 更新数据
|
|
67
|
-
}, {
|
|
68
|
-
key: "setData",
|
|
69
|
-
value: function setData(positions) {
|
|
70
|
-
if (!this._canOperate()) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
this.positions = positions || [];
|
|
74
|
-
this.hierarchy = [];
|
|
75
|
-
this.sources = [];
|
|
76
|
-
this._translatePositions();
|
|
77
|
-
this._syncHeatmapData();
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "_syncHeatmapData",
|
|
81
|
-
value: function _syncHeatmapData() {
|
|
82
|
-
if (!this.boundBox || !this.heatmapInstance) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
var _this$_getHeatValueRa = this._getHeatValueRange(),
|
|
86
|
-
minValue = _this$_getHeatValueRa.minValue,
|
|
87
|
-
maxValue = _this$_getHeatValueRa.maxValue;
|
|
88
|
-
this.heatmapInstance.setData({
|
|
89
|
-
min: minValue,
|
|
90
|
-
max: maxValue,
|
|
91
|
-
data: this.sources
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}]);
|
|
95
|
-
return Heatmap2d;
|
|
96
|
-
}(BaseHeatmap);
|
|
97
|
-
export { Heatmap2d as default };
|
|
1
|
+
(function(_0x597644,_0x150b2e){var _0xb45e7c=_0x3234,_0x208556=_0x597644();while(!![]){try{var _0x55346c=parseInt(_0xb45e7c(0x1ee))/0x1+parseInt(_0xb45e7c(0x1e1))/0x2*(-parseInt(_0xb45e7c(0x1fd))/0x3)+-parseInt(_0xb45e7c(0x1f3))/0x4*(parseInt(_0xb45e7c(0x1d9))/0x5)+parseInt(_0xb45e7c(0x209))/0x6*(-parseInt(_0xb45e7c(0x1fa))/0x7)+parseInt(_0xb45e7c(0x1e8))/0x8+-parseInt(_0xb45e7c(0x200))/0x9+-parseInt(_0xb45e7c(0x1f0))/0xa*(-parseInt(_0xb45e7c(0x1de))/0xb);if(_0x55346c===_0x150b2e)break;else _0x208556['push'](_0x208556['shift']());}catch(_0x16183a){_0x208556['push'](_0x208556['shift']());}}}(_0x539f,0x8fd25));function _typeof(_0x30f6f4){'@babel/helpers - typeof';var _0x566870=_0x3234;return _typeof=_0x566870(0x206)==typeof Symbol&&'symbol'==typeof Symbol[_0x566870(0x1dd)]?function(_0x14fa89){return typeof _0x14fa89;}:function(_0x57a045){return _0x57a045&&'function'==typeof Symbol&&_0x57a045['constructor']===Symbol&&_0x57a045!==Symbol['prototype']?'symbol':typeof _0x57a045;},_typeof(_0x30f6f4);}function _classCallCheck(_0x81e9fb,_0x44bfa1){var _0x311f03=_0x3234;if(!(_0x81e9fb instanceof _0x44bfa1))throw new TypeError(_0x311f03(0x1fc));}function _0x3234(_0x8636d4,_0x1ede19){_0x8636d4=_0x8636d4-0x1d5;var _0x539fea=_0x539f();var _0x323485=_0x539fea[_0x8636d4];if(_0x3234['chKDtP']===undefined){var _0x10f59d=function(_0x4bf0ca){var _0x257e1a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x11181c='',_0x306da7='';for(var _0x30f6f4=0x0,_0x14fa89,_0x57a045,_0x81e9fb=0x0;_0x57a045=_0x4bf0ca['charAt'](_0x81e9fb++);~_0x57a045&&(_0x14fa89=_0x30f6f4%0x4?_0x14fa89*0x40+_0x57a045:_0x57a045,_0x30f6f4++%0x4)?_0x11181c+=String['fromCharCode'](0xff&_0x14fa89>>(-0x2*_0x30f6f4&0x6)):0x0){_0x57a045=_0x257e1a['indexOf'](_0x57a045);}for(var _0x44bfa1=0x0,_0x3b2768=_0x11181c['length'];_0x44bfa1<_0x3b2768;_0x44bfa1++){_0x306da7+='%'+('00'+_0x11181c['charCodeAt'](_0x44bfa1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x306da7);};_0x3234['VPFMbz']=_0x10f59d,_0x3234['aPRtPo']={},_0x3234['chKDtP']=!![];}var _0x3d3d49=_0x539fea[0x0],_0x208393=_0x8636d4+_0x3d3d49,_0x243f40=_0x3234['aPRtPo'][_0x208393];return!_0x243f40?(_0x323485=_0x3234['VPFMbz'](_0x323485),_0x3234['aPRtPo'][_0x208393]=_0x323485):_0x323485=_0x243f40,_0x323485;}function _defineProperties(_0x3b2768,_0x486314){var _0x5b6106=_0x3234;for(var _0x4044ce=0x0;_0x4044ce<_0x486314['length'];_0x4044ce++){var _0x5b76fd=_0x486314[_0x4044ce];_0x5b76fd[_0x5b6106(0x1e7)]=_0x5b76fd['enumerable']||![],_0x5b76fd[_0x5b6106(0x1f1)]=!![];if(_0x5b6106(0x205)in _0x5b76fd)_0x5b76fd['writable']=!![];Object[_0x5b6106(0x1f8)](_0x3b2768,_toPropertyKey(_0x5b76fd['key']),_0x5b76fd);}}function _createClass(_0x125808,_0xd2193f,_0x19d652){var _0x45f8d0=_0x3234;if(_0xd2193f)_defineProperties(_0x125808[_0x45f8d0(0x201)],_0xd2193f);if(_0x19d652)_defineProperties(_0x125808,_0x19d652);return Object[_0x45f8d0(0x1f8)](_0x125808,'prototype',{'writable':![]}),_0x125808;}function _toPropertyKey(_0x4cbf36){var _0x228893=_0x3234,_0x4b56f8=_toPrimitive(_0x4cbf36,_0x228893(0x1e2));return'symbol'==_typeof(_0x4b56f8)?_0x4b56f8:String(_0x4b56f8);}function _toPrimitive(_0x1e3739,_0x7c3e02){var _0x57dcd5=_0x3234;if(_0x57dcd5(0x1d6)!=_typeof(_0x1e3739)||!_0x1e3739)return _0x1e3739;var _0x356cf2=_0x1e3739[Symbol[_0x57dcd5(0x1d8)]];if(void 0x0!==_0x356cf2){var _0x3147d7=_0x356cf2[_0x57dcd5(0x1dc)](_0x1e3739,_0x7c3e02||_0x57dcd5(0x1e3));if('object'!=_typeof(_0x3147d7))return _0x3147d7;throw new TypeError(_0x57dcd5(0x207));}return('string'===_0x7c3e02?String:Number)(_0x1e3739);}function _inherits(_0x455a6f,_0x49a0fd){var _0x48bd0a=_0x3234;if(typeof _0x49a0fd!==_0x48bd0a(0x206)&&_0x49a0fd!==null)throw new TypeError('Super\x20expression\x20must\x20either\x20be\x20null\x20or\x20a\x20function');_0x455a6f[_0x48bd0a(0x201)]=Object['create'](_0x49a0fd&&_0x49a0fd['prototype'],{'constructor':{'value':_0x455a6f,'writable':!![],'configurable':!![]}}),Object['defineProperty'](_0x455a6f,_0x48bd0a(0x201),{'writable':![]});if(_0x49a0fd)_setPrototypeOf(_0x455a6f,_0x49a0fd);}function _setPrototypeOf(_0x843c25,_0x5e553b){var _0x19d8e6=_0x3234;return _setPrototypeOf=Object[_0x19d8e6(0x1db)]?Object['setPrototypeOf'][_0x19d8e6(0x1f5)]():function _0x10cb8e(_0x43821e,_0x205663){var _0x4ab310=_0x19d8e6;return _0x43821e[_0x4ab310(0x203)]=_0x205663,_0x43821e;},_setPrototypeOf(_0x843c25,_0x5e553b);}function _createSuper(_0x5c14d9){var _0x441337=_isNativeReflectConstruct();return function _0x508161(){var _0x23df64=_0x3234,_0x16027b=_getPrototypeOf(_0x5c14d9),_0x2aa6b8;if(_0x441337){var _0x4e3fa5=_getPrototypeOf(this)['constructor'];_0x2aa6b8=Reflect['construct'](_0x16027b,arguments,_0x4e3fa5);}else _0x2aa6b8=_0x16027b[_0x23df64(0x204)](this,arguments);return _possibleConstructorReturn(this,_0x2aa6b8);};}function _possibleConstructorReturn(_0x27d22a,_0x588f31){var _0x220796=_0x3234;if(_0x588f31&&(_typeof(_0x588f31)==='object'||typeof _0x588f31===_0x220796(0x206)))return _0x588f31;else{if(_0x588f31!==void 0x0)throw new TypeError(_0x220796(0x1d5));}return _assertThisInitialized(_0x27d22a);}function _assertThisInitialized(_0x5110d1){if(_0x5110d1===void 0x0)throw new ReferenceError('this\x20hasn\x27t\x20been\x20initialised\x20-\x20super()\x20hasn\x27t\x20been\x20called');return _0x5110d1;}function _0x539f(){var _0x4f5deb=['nJC4ndyWm01jvfzpqG','C2v0rgf0yq','q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U','mtiXntLjwhDWuNa','BgvMDejVDhrVBq','z2v0rgf0yvvsta','otm0nZCZm25wwMTjDa','ChjVDg90ExbL','BgvUz3rO','x19WCM90B19F','yxbWBhK','DMfSDwu','zNvUy3rPB24','qeb0B1bYAw1PDgL2zsbTDxn0ihjLDhvYBIbHihbYAw1PDgL2zsb2ywX1zs4','sgvPz2H0uMvMzxjLBMnL','nML4DejtuW','AgLLCMfYy2H5','rgvYAxzLzcbJB25ZDhj1y3rVCNmGBwf5ig9UBhKGCMv0DxjUig9IAMvJDcbVCIb1BMrLzMLUzwq','B2jQzwn0','C3r5Bgu','Dg9qCMLTAxrPDMu','ndu4mhzfCMjkuG','ug9SEwDVBKHPzxjHCMnOEq','C2v0uhjVDg90ExbLt2y','y2fSBa','AxrLCMf0B3i','mtC2tfbjtu9v','z2v0twfW','AgvPz2H0','mZqYy2j1zeHN','C3rYAw5N','zgvMyxvSDa','tK9orq','BwLUvMfSDwu','x2nYzwf0zvbVBhLNB25fBNrPDhK','zw51BwvYywjSzq','nZq3ntm0ngjHs1D1vq','ywrKvg9nyxa','C291CMnLCW','AgvHDg1HCeLUC3rHBMnL','q2fSBgjHy2TqCM9Wzxj0Eq','yM91BMrcB3G','otCYmJaWv1jLve9i','BgvMDfrVCa','mtiZmtyWme96BKXvrq','y29UzMLNDxjHyMXL','AgvPz2H0uMvMzxjLBMnL','mJu2ngrKrfvcBq','x3n5BMnizwf0BwfWrgf0yq','yMLUza','C2HHBq','sw1Hz2vnyxrLCMLHBfbYB3bLCNr5','zgvMAw5LuhjVCgvYDhK','CMLNAhruB3a'];_0x539f=function(){return _0x4f5deb;};return _0x539f();}function _isNativeReflectConstruct(){var _0xb37cec=_0x3234;if(typeof Reflect==='undefined'||!Reflect['construct'])return![];if(Reflect['construct'][_0xb37cec(0x1f6)])return![];if(typeof Proxy===_0xb37cec(0x206))return!![];try{return Boolean['prototype']['valueOf'][_0xb37cec(0x1dc)](Reflect['construct'](Boolean,[],function(){})),!![];}catch(_0x5d5a1d){return![];}}function _getPrototypeOf(_0xd3dc9a){var _0x143320=_0x3234;return _getPrototypeOf=Object['setPrototypeOf']?Object['getPrototypeOf'][_0x143320(0x1f5)]():function _0x4fae83(_0x18a35f){var _0x111ff2=_0x143320;return _0x18a35f[_0x111ff2(0x203)]||Object['getPrototypeOf'](_0x18a35f);},_getPrototypeOf(_0xd3dc9a);}import*as _0x11181c from'deeptwins-cesium';import _0x306da7 from'./BaseHeatmap';var Heatmap2d=function(_0x2d87b5){var _0xf78671=_0x3234;_inherits(_0x22b7bc,_0x2d87b5);var _0x4ba026=_createSuper(_0x22b7bc);function _0x22b7bc(){var _0x2d5711=_0x3234,_0xeb69a6=arguments[_0x2d5711(0x202)]>0x0&&arguments[0x0]!==undefined?arguments[0x0]:{};return _classCallCheck(this,_0x22b7bc),_0x4ba026[_0x2d5711(0x1dc)](this,_0xeb69a6);}return _createClass(_0x22b7bc,[{'key':_0xf78671(0x1e9),'value':function _0x59173e(_0x584195){var _0x5a44ec=_0xf78671;if(!this['_canOperate']())return;this['_mapContext']=_0x584195['_mapContext'],this['_init'](),this[_0x5a44ec(0x1f4)]();if(!this['boundBox']||!this['heatmapInstance'])return;this[_0x5a44ec(0x1e6)]();}},{'key':_0xf78671(0x1e6),'value':function _0x5ed4f8(){var _0x5a5093=_0xf78671,_0x32e83a=this,_0xd1c71d={'hierarchy':new _0x11181c[(_0x5a5093(0x1ec))](function(){var _0x2afbd5=_0x5a5093;return new _0x11181c[(_0x2afbd5(0x1da))]([_0x32e83a[_0x2afbd5(0x1ed)][_0x2afbd5(0x1ef)],_0x32e83a[_0x2afbd5(0x1ed)][_0x2afbd5(0x1fe)],_0x32e83a[_0x2afbd5(0x1ed)]['rightBottom'],_0x32e83a['boundBox'][_0x2afbd5(0x1f9)]]);},![]),'material':new _0x11181c[(_0x5a5093(0x1f7))]({'image':new _0x11181c[(_0x5a5093(0x1ec))](function(){var _0x49ad92=_0x5a5093;return _0x32e83a[_0x49ad92(0x1eb)][_0x49ad92(0x1ff)]();},![]),'transparent':!![]}),'heightReference':this[_0x5a5093(0x1d7)]['heightReference'],'perPositionHeight':![]};this['style'][_0x5a5093(0x1f2)]===_0x11181c[_0x5a5093(0x208)][_0x5a5093(0x1e4)]&&(_0xd1c71d['height']=this[_0x5a5093(0x1d7)][_0x5a5093(0x1e0)]),this['heatmapEntity']=this[_0x5a5093(0x1df)]()['entities']['add']({'id':this['id'],'polygon':_0xd1c71d});}},{'key':_0xf78671(0x1fb),'value':function _0x2b54c4(_0x127dba){var _0x56d394=_0xf78671;if(!this['_canOperate']())return;this['positions']=_0x127dba||[],this[_0x56d394(0x20a)]=[],this['sources']=[],this['_translatePositions'](),this[_0x56d394(0x1f4)]();}},{'key':'_syncHeatmapData','value':function _0x2d3cdb(){var _0x48ce7d=_0xf78671;if(!this['boundBox']||!this['heatmapInstance'])return;var _0x473a9f=this['_getHeatValueRange'](),_0x423fc3=_0x473a9f[_0x48ce7d(0x1e5)],_0x9c314c=_0x473a9f['maxValue'];this[_0x48ce7d(0x1eb)][_0x48ce7d(0x1fb)]({'min':_0x423fc3,'max':_0x9c314c,'data':this[_0x48ce7d(0x1ea)]});}}]),_0x22b7bc;}(_0x306da7);export{Heatmap2d as default};
|
|
@@ -1,281 +1 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
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); }
|
|
7
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
-
import * as Cesium from 'deeptwins-cesium';
|
|
15
|
-
import GeometryPrimitive from "../drawCommand/volumeCloud/GeometryPrimitive";
|
|
16
|
-
import BaseHeatmap from "./BaseHeatmap";
|
|
17
|
-
var MAX_GRID_SIZE = 300;
|
|
18
|
-
var MIN_SURFACE_ALPHA = 0.18;
|
|
19
|
-
var MIN_SIDE_ALPHA = 0.08;
|
|
20
|
-
var VERTEX_SHADER_SOURCE = /* glsl */"\nin vec3 position3DHigh;\nin vec3 position3DLow;\nin vec4 color;\n\nout vec4 v_color;\n\nvec4 czm_computePosition() {\n return czm_translateRelativeToEye(position3DHigh, position3DLow);\n}\n\nvoid main() {\n vec4 p = czm_computePosition();\n v_color = color;\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";
|
|
21
|
-
var FRAGMENT_SHADER_SOURCE = /* glsl */"\nin vec4 v_color;\n\nvoid main() {\n vec4 color = czm_gammaCorrect(v_color);\n if (color.a <= 0.001) {\n discard;\n }\n out_FragColor = color;\n}\n";
|
|
22
|
-
var Heatmap3d = /*#__PURE__*/function (_BaseHeatmap) {
|
|
23
|
-
_inherits(Heatmap3d, _BaseHeatmap);
|
|
24
|
-
var _super = _createSuper(Heatmap3d);
|
|
25
|
-
function Heatmap3d() {
|
|
26
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27
|
-
_classCallCheck(this, Heatmap3d);
|
|
28
|
-
return _super.call(this, options);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// 绘制到地图上
|
|
32
|
-
_createClass(Heatmap3d, [{
|
|
33
|
-
key: "addToMap",
|
|
34
|
-
value: function addToMap(map) {
|
|
35
|
-
if (!this._canOperate()) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
this._mapContext = map._mapContext;
|
|
39
|
-
this._init();
|
|
40
|
-
this._syncHeatmapData();
|
|
41
|
-
this._rebuildPrimitive();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// 更新数据
|
|
45
|
-
}, {
|
|
46
|
-
key: "setData",
|
|
47
|
-
value: function setData(positions) {
|
|
48
|
-
if (!this._canOperate()) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
this.positions = positions;
|
|
52
|
-
this.hierarchy = [];
|
|
53
|
-
this.sources = [];
|
|
54
|
-
this._translatePositions();
|
|
55
|
-
this._syncHeatmapData();
|
|
56
|
-
this._rebuildPrimitive();
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
|
-
key: "_syncHeatmapData",
|
|
60
|
-
value: function _syncHeatmapData() {
|
|
61
|
-
if (!this.boundBox || !this.heatmapInstance) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
var _this$_getHeatValueRa = this._getHeatValueRange(),
|
|
65
|
-
minValue = _this$_getHeatValueRa.minValue,
|
|
66
|
-
maxValue = _this$_getHeatValueRa.maxValue;
|
|
67
|
-
this.heatmapInstance.setData({
|
|
68
|
-
min: minValue,
|
|
69
|
-
max: maxValue,
|
|
70
|
-
data: this.sources
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}, {
|
|
74
|
-
key: "_rebuildPrimitive",
|
|
75
|
-
value: function _rebuildPrimitive() {
|
|
76
|
-
if (!this.boundBox || !this.getMap()) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (this.heatmapPrimitive) {
|
|
80
|
-
this.getMap().scene.primitives.remove(this.heatmapPrimitive);
|
|
81
|
-
this.heatmapPrimitive = null;
|
|
82
|
-
}
|
|
83
|
-
this._createPolygonPrimitive();
|
|
84
|
-
}
|
|
85
|
-
}, {
|
|
86
|
-
key: "_createPolygonPrimitive",
|
|
87
|
-
value: function _createPolygonPrimitive() {
|
|
88
|
-
var meshData = this._generateMeshData();
|
|
89
|
-
if (!meshData) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
var attributes = new Cesium.GeometryAttributes();
|
|
93
|
-
attributes.position = new Cesium.GeometryAttribute({
|
|
94
|
-
componentDatatype: Cesium.ComponentDatatype.DOUBLE,
|
|
95
|
-
componentsPerAttribute: 3,
|
|
96
|
-
values: new Float64Array(meshData.positions)
|
|
97
|
-
});
|
|
98
|
-
attributes.color = new Cesium.GeometryAttribute({
|
|
99
|
-
componentDatatype: Cesium.ComponentDatatype.UNSIGNED_BYTE,
|
|
100
|
-
componentsPerAttribute: 4,
|
|
101
|
-
normalize: true,
|
|
102
|
-
values: new Uint8Array(meshData.colors)
|
|
103
|
-
});
|
|
104
|
-
var geometry = new Cesium.Geometry({
|
|
105
|
-
attributes: attributes,
|
|
106
|
-
indices: meshData.vertexCount > 65535 ? new Uint32Array(meshData.indices) : new Uint16Array(meshData.indices),
|
|
107
|
-
primitiveType: Cesium.PrimitiveType.TRIANGLES,
|
|
108
|
-
boundingSphere: Cesium.BoundingSphere.fromVertices(meshData.positions)
|
|
109
|
-
});
|
|
110
|
-
var renderState = Cesium.RenderState.fromCache({
|
|
111
|
-
depthMask: false,
|
|
112
|
-
depthTest: {
|
|
113
|
-
enabled: true,
|
|
114
|
-
func: Cesium.DepthFunction.LESS_OR_EQUAL
|
|
115
|
-
},
|
|
116
|
-
blending: Cesium.BlendingState.ALPHA_BLEND,
|
|
117
|
-
cull: {
|
|
118
|
-
enabled: false
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
this.heatmapPrimitive = this.getMap().scene.primitives.add(new GeometryPrimitive(geometry, {
|
|
122
|
-
modelMatrix: Cesium.Matrix4.IDENTITY,
|
|
123
|
-
vertexShaderSource: VERTEX_SHADER_SOURCE,
|
|
124
|
-
fragmentShaderSource: FRAGMENT_SHADER_SOURCE,
|
|
125
|
-
renderState: renderState,
|
|
126
|
-
pass: Cesium.Pass.TRANSLUCENT
|
|
127
|
-
}));
|
|
128
|
-
this.heatmapPrimitive.id = this.id;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// 根据热力图范围生成曲面与侧壁
|
|
132
|
-
}, {
|
|
133
|
-
key: "_generateMeshData",
|
|
134
|
-
value: function _generateMeshData() {
|
|
135
|
-
var _this$heatmapInstance;
|
|
136
|
-
if (!this.boundRect || !((_this$heatmapInstance = this.heatmapInstance) !== null && _this$heatmapInstance !== void 0 && _this$heatmapInstance._renderer)) {
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
var gridWidth = Math.max(2, Math.min(this.canvasW, MAX_GRID_SIZE));
|
|
140
|
-
var gridHeight = Math.max(2, Math.min(this.canvasH, MAX_GRID_SIZE));
|
|
141
|
-
var _this$boundRect = this.boundRect,
|
|
142
|
-
minLat = _this$boundRect.minLat,
|
|
143
|
-
maxLat = _this$boundRect.maxLat,
|
|
144
|
-
minLng = _this$boundRect.minLng,
|
|
145
|
-
maxLng = _this$boundRect.maxLng;
|
|
146
|
-
var maxGridWidthIndex = gridWidth - 1;
|
|
147
|
-
var maxGridHeightIndex = gridHeight - 1;
|
|
148
|
-
var longitudeStep = (maxLng - minLng) / maxGridWidthIndex;
|
|
149
|
-
var latitudeStep = (maxLat - minLat) / maxGridHeightIndex;
|
|
150
|
-
var sampleMaxX = Math.max(0, this.canvasW - 1);
|
|
151
|
-
var sampleMaxY = Math.max(0, this.canvasH - 1);
|
|
152
|
-
var baseHeight = this.style.height;
|
|
153
|
-
var stretchingHeight = this.style.stretchingHeight;
|
|
154
|
-
var colorImageData = this._getRendererImageData(this.heatmapInstance._renderer.canvas);
|
|
155
|
-
var shadowImageData = this._getRendererImageData(this.heatmapInstance._renderer.shadowCanvas);
|
|
156
|
-
if (!colorImageData || !shadowImageData) {
|
|
157
|
-
return null;
|
|
158
|
-
}
|
|
159
|
-
var positions = [];
|
|
160
|
-
var colors = [];
|
|
161
|
-
var indices = [];
|
|
162
|
-
var topVertexInfo = [];
|
|
163
|
-
var getTopVertexIndex = function getTopVertexIndex(x, y) {
|
|
164
|
-
return x * gridHeight + y;
|
|
165
|
-
};
|
|
166
|
-
for (var i = 0; i < gridWidth; i++) {
|
|
167
|
-
var currentLongitude = minLng + longitudeStep * i;
|
|
168
|
-
var sampleX = Math.round(i / maxGridWidthIndex * sampleMaxX);
|
|
169
|
-
for (var j = 0; j < gridHeight; j++) {
|
|
170
|
-
var currentLatitude = minLat + latitudeStep * j;
|
|
171
|
-
var sampleY = Math.round(j / maxGridHeightIndex * sampleMaxY);
|
|
172
|
-
var sample = this._sampleHeatPixel(sampleX, sampleY, colorImageData, shadowImageData);
|
|
173
|
-
var currentHeight = baseHeight + sample.intensity * stretchingHeight;
|
|
174
|
-
var cartesian3 = Cesium.Cartesian3.fromDegrees(currentLongitude, currentLatitude, currentHeight);
|
|
175
|
-
positions.push(cartesian3.x, cartesian3.y, cartesian3.z);
|
|
176
|
-
colors.push(sample.color[0], sample.color[1], sample.color[2], sample.color[3]);
|
|
177
|
-
topVertexInfo.push({
|
|
178
|
-
lng: currentLongitude,
|
|
179
|
-
lat: currentLatitude,
|
|
180
|
-
color: sample.color
|
|
181
|
-
});
|
|
182
|
-
if (i !== maxGridWidthIndex && j !== maxGridHeightIndex) {
|
|
183
|
-
indices.push(getTopVertexIndex(i, j), getTopVertexIndex(i + 1, j), getTopVertexIndex(i, j + 1));
|
|
184
|
-
indices.push(getTopVertexIndex(i + 1, j), getTopVertexIndex(i + 1, j + 1), getTopVertexIndex(i, j + 1));
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
this._appendSideSkirt(positions, colors, indices, topVertexInfo, baseHeight, 0, gridHeight, function (step) {
|
|
189
|
-
return {
|
|
190
|
-
topAIndex: getTopVertexIndex(0, step),
|
|
191
|
-
topBIndex: getTopVertexIndex(0, step + 1)
|
|
192
|
-
};
|
|
193
|
-
});
|
|
194
|
-
this._appendSideSkirt(positions, colors, indices, topVertexInfo, baseHeight, 0, gridHeight, function (step) {
|
|
195
|
-
return {
|
|
196
|
-
topAIndex: getTopVertexIndex(maxGridWidthIndex, step + 1),
|
|
197
|
-
topBIndex: getTopVertexIndex(maxGridWidthIndex, step)
|
|
198
|
-
};
|
|
199
|
-
});
|
|
200
|
-
this._appendSideSkirt(positions, colors, indices, topVertexInfo, baseHeight, 0, gridWidth, function (step) {
|
|
201
|
-
return {
|
|
202
|
-
topAIndex: getTopVertexIndex(step + 1, 0),
|
|
203
|
-
topBIndex: getTopVertexIndex(step, 0)
|
|
204
|
-
};
|
|
205
|
-
});
|
|
206
|
-
this._appendSideSkirt(positions, colors, indices, topVertexInfo, baseHeight, 0, gridWidth, function (step) {
|
|
207
|
-
return {
|
|
208
|
-
topAIndex: getTopVertexIndex(step, maxGridHeightIndex),
|
|
209
|
-
topBIndex: getTopVertexIndex(step + 1, maxGridHeightIndex)
|
|
210
|
-
};
|
|
211
|
-
});
|
|
212
|
-
return {
|
|
213
|
-
positions: positions,
|
|
214
|
-
colors: colors,
|
|
215
|
-
indices: indices,
|
|
216
|
-
vertexCount: positions.length / 3
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
}, {
|
|
220
|
-
key: "_appendSideSkirt",
|
|
221
|
-
value: function _appendSideSkirt(positions, colors, indices, topVertexInfo, baseHeight, start, size, getSegment) {
|
|
222
|
-
if (size < 2) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
for (var _step = start; _step < size - 1; _step++) {
|
|
226
|
-
var _getSegment = getSegment(_step),
|
|
227
|
-
topAIndex = _getSegment.topAIndex,
|
|
228
|
-
topBIndex = _getSegment.topBIndex;
|
|
229
|
-
var topA = topVertexInfo[topAIndex];
|
|
230
|
-
var topB = topVertexInfo[topBIndex];
|
|
231
|
-
var bottomA = Cesium.Cartesian3.fromDegrees(topA.lng, topA.lat, baseHeight);
|
|
232
|
-
var bottomB = Cesium.Cartesian3.fromDegrees(topB.lng, topB.lat, baseHeight);
|
|
233
|
-
var bottomAIndex = positions.length / 3;
|
|
234
|
-
positions.push(bottomA.x, bottomA.y, bottomA.z);
|
|
235
|
-
colors.push(topA.color[0], topA.color[1], topA.color[2], this._getSideAlpha(topA.color[3]));
|
|
236
|
-
var bottomBIndex = positions.length / 3;
|
|
237
|
-
positions.push(bottomB.x, bottomB.y, bottomB.z);
|
|
238
|
-
colors.push(topB.color[0], topB.color[1], topB.color[2], this._getSideAlpha(topB.color[3]));
|
|
239
|
-
indices.push(topAIndex, bottomAIndex, topBIndex);
|
|
240
|
-
indices.push(topBIndex, bottomAIndex, bottomBIndex);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}, {
|
|
244
|
-
key: "_sampleHeatPixel",
|
|
245
|
-
value: function _sampleHeatPixel(x, y, colorImageData, shadowImageData) {
|
|
246
|
-
var index = (y * this.canvasW + x) * 4;
|
|
247
|
-
var red = colorImageData[index] || 0;
|
|
248
|
-
var green = colorImageData[index + 1] || 0;
|
|
249
|
-
var blue = colorImageData[index + 2] || 0;
|
|
250
|
-
var shadowAlpha = (shadowImageData[index + 3] || 0) / 255;
|
|
251
|
-
var alpha = shadowAlpha > 0 ? Math.round(Cesium.Math.lerp(MIN_SURFACE_ALPHA, 1, shadowAlpha) * 255) : 0;
|
|
252
|
-
return {
|
|
253
|
-
intensity: shadowAlpha,
|
|
254
|
-
color: [red, green, blue, alpha]
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
}, {
|
|
258
|
-
key: "_getRendererImageData",
|
|
259
|
-
value: function _getRendererImageData(canvas) {
|
|
260
|
-
if (!canvas) {
|
|
261
|
-
return null;
|
|
262
|
-
}
|
|
263
|
-
var context = canvas.getContext('2d');
|
|
264
|
-
if (!context) {
|
|
265
|
-
return null;
|
|
266
|
-
}
|
|
267
|
-
return context.getImageData(0, 0, this.canvasW, this.canvasH).data;
|
|
268
|
-
}
|
|
269
|
-
}, {
|
|
270
|
-
key: "_getSideAlpha",
|
|
271
|
-
value: function _getSideAlpha(topAlpha) {
|
|
272
|
-
if (topAlpha <= 0) {
|
|
273
|
-
return 0;
|
|
274
|
-
}
|
|
275
|
-
var alphaRatio = topAlpha / 255;
|
|
276
|
-
return Math.round(Cesium.Math.clamp(alphaRatio * 0.5, MIN_SIDE_ALPHA, 0.5) * 255);
|
|
277
|
-
}
|
|
278
|
-
}]);
|
|
279
|
-
return Heatmap3d;
|
|
280
|
-
}(BaseHeatmap);
|
|
281
|
-
export { Heatmap3d as default };
|
|
1
|
+
var _0x30ae1c=_0x26f1;(function(_0x6ff498,_0x5b6f97){var _0x23be44=_0x26f1,_0x5926ae=_0x6ff498();while(!![]){try{var _0x57e9b4=-parseInt(_0x23be44(0x190))/0x1+-parseInt(_0x23be44(0x16e))/0x2*(-parseInt(_0x23be44(0x181))/0x3)+-parseInt(_0x23be44(0x19a))/0x4+parseInt(_0x23be44(0x1a1))/0x5+-parseInt(_0x23be44(0x1a0))/0x6*(-parseInt(_0x23be44(0x191))/0x7)+-parseInt(_0x23be44(0x16a))/0x8+-parseInt(_0x23be44(0x164))/0x9;if(_0x57e9b4===_0x5b6f97)break;else _0x5926ae['push'](_0x5926ae['shift']());}catch(_0xd88e8a){_0x5926ae['push'](_0x5926ae['shift']());}}}(_0x14af,0xc6e13));function _typeof(_0x1e16f3){'@babel/helpers - typeof';var _0x48e2a4=_0x26f1;return _typeof=_0x48e2a4(0x171)==typeof Symbol&&'symbol'==typeof Symbol[_0x48e2a4(0x18d)]?function(_0x79b21e){return typeof _0x79b21e;}:function(_0x1fa286){var _0x4775b6=_0x48e2a4;return _0x1fa286&&_0x4775b6(0x171)==typeof Symbol&&_0x1fa286['constructor']===Symbol&&_0x1fa286!==Symbol['prototype']?_0x4775b6(0x194):typeof _0x1fa286;},_typeof(_0x1e16f3);}function _classCallCheck(_0x18c49f,_0x3dfec6){var _0x27f2d9=_0x26f1;if(!(_0x18c49f instanceof _0x3dfec6))throw new TypeError(_0x27f2d9(0x17e));}function _defineProperties(_0x14a58d,_0x5d37bb){var _0x43e0d7=_0x26f1;for(var _0x4ac804=0x0;_0x4ac804<_0x5d37bb[_0x43e0d7(0x17d)];_0x4ac804++){var _0x5fdeb6=_0x5d37bb[_0x4ac804];_0x5fdeb6['enumerable']=_0x5fdeb6['enumerable']||![],_0x5fdeb6[_0x43e0d7(0x1ac)]=!![];if('value'in _0x5fdeb6)_0x5fdeb6[_0x43e0d7(0x180)]=!![];Object['defineProperty'](_0x14a58d,_toPropertyKey(_0x5fdeb6['key']),_0x5fdeb6);}}function _createClass(_0x14da82,_0x3edf9b,_0x39ad6e){var _0x3536b9=_0x26f1;if(_0x3edf9b)_defineProperties(_0x14da82['prototype'],_0x3edf9b);if(_0x39ad6e)_defineProperties(_0x14da82,_0x39ad6e);return Object['defineProperty'](_0x14da82,_0x3536b9(0x19d),{'writable':![]}),_0x14da82;}function _toPropertyKey(_0x2cfb16){var _0x19407f=_0x26f1,_0x48d5b3=_toPrimitive(_0x2cfb16,_0x19407f(0x167));return _0x19407f(0x194)==_typeof(_0x48d5b3)?_0x48d5b3:String(_0x48d5b3);}function _toPrimitive(_0x1ca294,_0x3d4868){var _0xcb10b0=_0x26f1;if(_0xcb10b0(0x197)!=_typeof(_0x1ca294)||!_0x1ca294)return _0x1ca294;var _0x342d0b=_0x1ca294[Symbol['toPrimitive']];if(void 0x0!==_0x342d0b){var _0x27fbea=_0x342d0b[_0xcb10b0(0x1a3)](_0x1ca294,_0x3d4868||_0xcb10b0(0x178));if(_0xcb10b0(0x197)!=_typeof(_0x27fbea))return _0x27fbea;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x3d4868?String:Number)(_0x1ca294);}function _inherits(_0x2f32a7,_0x120ef3){var _0x359670=_0x26f1;if(typeof _0x120ef3!==_0x359670(0x171)&&_0x120ef3!==null)throw new TypeError(_0x359670(0x175));_0x2f32a7['prototype']=Object['create'](_0x120ef3&&_0x120ef3['prototype'],{'constructor':{'value':_0x2f32a7,'writable':!![],'configurable':!![]}}),Object['defineProperty'](_0x2f32a7,_0x359670(0x19d),{'writable':![]});if(_0x120ef3)_setPrototypeOf(_0x2f32a7,_0x120ef3);}function _0x14af(){var _0x24e6ce=['q29TCg9Uzw50rgf0yxr5Cgu','D3jPDgfIBgu','mJu0mdiWogjgweLAua','AgvHDg1HCeLUC3rHBMnL','Bwf4vMfSDwu','ChvZAa','ywrK','zgf0yq','x2fWCgvUzfnPzgvtA2LYDa','x2DLDfnPzgvbBhbOyq','ChjPBwL0AxzLCW','r2vVBwv0CNLbDhrYAwj1DgvZ','x2nYzwf0zvbVBhLNB25qCMLTAxrPDMu','DMfSDwvpzG','AxrLCMf0B3i','BwLUtg5N','vfjbtLnmvunftLq','nJu2nJuWBej6DKfd','mtG0muXYywnXyq','C291CMnLCW','uhjPBwL0AxzLvhLWzq','C3LTyM9S','x2LUAxq','y29UC3rYDwn0','B2jQzwn0','C3rYzxrJAgLUz0HLAwDODa','C2HHzg93q2fUDMfZ','mZy0mJy1nNrXsNv1rq','BwLU','y2fUDMfZsa','ChjVDg90ExbL','quXqsefFqKXftKq','x2DLDeHLyxrwywX1zvjHBMDL','mZi1mtrisK1nCw4','nJGZnZe0nvPeu2TduG','x3jLBMrLCMvY','y2fSBa','q2fYDgvZAwfUmW','z2v0uhjVDg90ExbLt2y','Aw5KAwnLCW','x19WCM90B19F','yM91BMrcB3G','AgvHDg1HCfbYAw1PDgL2zq','zNjVBunHy2HL','z2v0twfW','y29UzMLNDxjHyMXL','x3n5BMnizwf0BwfWrgf0yq','Bwf4tgf0','Bgf0','odmYnZiWnvLhAvPAtW','C2v0rgf0yq','qMXLBMrPBMDtDgf0zq','C3rYAw5N','DMvYDgv4q291BNq','x3jLyNvPBgrqCMLTAxrPDMu','mJy1nZuZnK92tLLAAG','C2v0uhjVDg90ExbLt2y','ywrKvg9nyxa','y29SB3i','mNnfA3P6qq','AgvPz2H0','CMvTB3zL','zNvUy3rPB24','Bwf4','cMLUihzLyZmGCg9ZAxrPB24ZreHPz2G7cMLUihzLyZmGCg9ZAxrPB24ZreXVDZSkAw4GDMvJncbJB2XVCJSkcM91Dcb2zwm0ihzFy29SB3i7cGP2zwm0ign6Bv9JB21WDxrLug9ZAxrPB24Oksb7cIaGicbYzxr1CM4Gy3PTx3rYyw5ZBgf0zvjLBgf0AxzLvg9fEwuOCg9ZAxrPB24ZreHPz2GSihbVC2L0Aw9Um0rmB3CPoWP9cGP2B2LKig1HAw4Oksb7cIaGicb2zwm0ihaGpsbJEM1Fy29TChv0zvbVC2L0Aw9UkcK7cIaGicb2x2nVBg9Yid0Gy29SB3i7cIaGicbNBf9qB3nPDgLVBIa9ign6Bv9TB2rLBfzPzxDqCM9Qzwn0Aw9UuMvSyxrPDMvuB0v5zsaQiha7cN0k','y2fUDMfZvW','u3vWzxiGzxHWCMvZC2LVBIbTDxn0igvPDgHLCIbIzsbUDwXSig9YigeGzNvUy3rPB24','C2nLBMu','x3nHBxbSzuHLyxrqAxHLBa','zgvMyxvSDa','CM91BMq','x2DLDfjLBMrLCMvYsw1Hz2veyxrH','r2vVBwv0CNK','x2DLBMvYyxrLtwvZAerHDge','BgvUz3rO','q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U'];_0x14af=function(){return _0x24e6ce;};return _0x14af();}function _setPrototypeOf(_0x3c955e,_0x300fe1){return _setPrototypeOf=Object['setPrototypeOf']?Object['setPrototypeOf']['bind']():function _0x5bb44c(_0x28abac,_0x397682){var _0xc00910=_0x26f1;return _0x28abac[_0xc00910(0x1a7)]=_0x397682,_0x28abac;},_setPrototypeOf(_0x3c955e,_0x300fe1);}function _0x26f1(_0x180a93,_0x3fa96a){_0x180a93=_0x180a93-0x163;var _0x14afe7=_0x14af();var _0x26f1e3=_0x14afe7[_0x180a93];if(_0x26f1['XZUVcn']===undefined){var _0x496ea5=function(_0x2afba2){var _0x3d1a07='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5ae81c='',_0x167a82='';for(var _0x5e899a=0x0,_0x1e16f3,_0x79b21e,_0x1fa286=0x0;_0x79b21e=_0x2afba2['charAt'](_0x1fa286++);~_0x79b21e&&(_0x1e16f3=_0x5e899a%0x4?_0x1e16f3*0x40+_0x79b21e:_0x79b21e,_0x5e899a++%0x4)?_0x5ae81c+=String['fromCharCode'](0xff&_0x1e16f3>>(-0x2*_0x5e899a&0x6)):0x0){_0x79b21e=_0x3d1a07['indexOf'](_0x79b21e);}for(var _0x18c49f=0x0,_0x3dfec6=_0x5ae81c['length'];_0x18c49f<_0x3dfec6;_0x18c49f++){_0x167a82+='%'+('00'+_0x5ae81c['charCodeAt'](_0x18c49f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x167a82);};_0x26f1['emvKMy']=_0x496ea5,_0x26f1['lrmuZl']={},_0x26f1['XZUVcn']=!![];}var _0x1b5974=_0x14afe7[0x0],_0x1cbbed=_0x180a93+_0x1b5974,_0x4835e1=_0x26f1['lrmuZl'][_0x1cbbed];return!_0x4835e1?(_0x26f1e3=_0x26f1['emvKMy'](_0x26f1e3),_0x26f1['lrmuZl'][_0x1cbbed]=_0x26f1e3):_0x26f1e3=_0x4835e1,_0x26f1e3;}function _createSuper(_0x473483){var _0x5000f7=_isNativeReflectConstruct();return function _0x4aee8a(){var _0x1a799a=_getPrototypeOf(_0x473483),_0x128bd3;if(_0x5000f7){var _0x53d566=_getPrototypeOf(this)['constructor'];_0x128bd3=Reflect['construct'](_0x1a799a,arguments,_0x53d566);}else _0x128bd3=_0x1a799a['apply'](this,arguments);return _possibleConstructorReturn(this,_0x128bd3);};}function _possibleConstructorReturn(_0x40d55c,_0x5a7c07){var _0x3308a6=_0x26f1;if(_0x5a7c07&&(_typeof(_0x5a7c07)===_0x3308a6(0x197)||typeof _0x5a7c07==='function'))return _0x5a7c07;else{if(_0x5a7c07!==void 0x0)throw new TypeError('Derived\x20constructors\x20may\x20only\x20return\x20object\x20or\x20undefined');}return _assertThisInitialized(_0x40d55c);}function _assertThisInitialized(_0x3162e9){if(_0x3162e9===void 0x0)throw new ReferenceError('this\x20hasn\x27t\x20been\x20initialised\x20-\x20super()\x20hasn\x27t\x20been\x20called');return _0x3162e9;}function _isNativeReflectConstruct(){var _0x1bb421=_0x26f1;if(typeof Reflect==='undefined'||!Reflect[_0x1bb421(0x196)])return![];if(Reflect[_0x1bb421(0x196)]['sham'])return![];if(typeof Proxy===_0x1bb421(0x171))return!![];try{return Boolean['prototype'][_0x1bb421(0x18c)][_0x1bb421(0x1a3)](Reflect[_0x1bb421(0x196)](Boolean,[],function(){})),!![];}catch(_0x5440d4){return![];}}function _getPrototypeOf(_0x8f39a7){var _0x5e8ea4=_0x26f1;return _getPrototypeOf=Object[_0x5e8ea4(0x16b)]?Object[_0x5e8ea4(0x1a5)]['bind']():function _0x4a4861(_0x32b435){var _0x3fe8bc=_0x5e8ea4;return _0x32b435['__proto__']||Object[_0x3fe8bc(0x1a5)](_0x32b435);},_getPrototypeOf(_0x8f39a7);}import*as _0x5ae81c from'deeptwins-cesium';import _0x167a82 from'../drawCommand/volumeCloud/GeometryPrimitive';import _0x5e899a from'./BaseHeatmap';var MAX_GRID_SIZE=0x12c,MIN_SURFACE_ALPHA=0.18,MIN_SIDE_ALPHA=0.08,VERTEX_SHADER_SOURCE=_0x30ae1c(0x173),FRAGMENT_SHADER_SOURCE='\x0ain\x20vec4\x20v_color;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20color\x20=\x20czm_gammaCorrect(v_color);\x0a\x20\x20\x20\x20if\x20(color.a\x20<=\x200.001)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20discard;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20out_FragColor\x20=\x20color;\x0a}\x0a',Heatmap3d=function(_0x9caa05){var _0x12e0af=_0x30ae1c;_inherits(_0x5afa7d,_0x9caa05);var _0x12cbab=_createSuper(_0x5afa7d);function _0x5afa7d(){var _0x3dd87e=_0x26f1,_0x2dff7c=arguments['length']>0x0&&arguments[0x0]!==undefined?arguments[0x0]:{};return _classCallCheck(this,_0x5afa7d),_0x12cbab[_0x3dd87e(0x1a3)](this,_0x2dff7c);}return _createClass(_0x5afa7d,[{'key':_0x12e0af(0x16c),'value':function _0x3ead83(_0x27def3){var _0x351b45=_0x12e0af;if(!this['_canOperate']())return;this['_mapContext']=_0x27def3['_mapContext'],this[_0x351b45(0x195)](),this['_syncHeatmapData'](),this['_rebuildPrimitive']();}},{'key':'setData','value':function _0x5d3e1b(_0x38a15a){var _0x280187=_0x12e0af;if(!this['_canOperate']())return;this['positions']=_0x38a15a,this['hierarchy']=[],this['sources']=[],this['_translatePositions'](),this['_syncHeatmapData'](),this[_0x280187(0x169)]();}},{'key':_0x12e0af(0x1ad),'value':function _0x4c7f43(){var _0x4f0a03=_0x12e0af;if(!this[_0x4f0a03(0x1a8)]||!this[_0x4f0a03(0x182)])return;var _0x32d521=this[_0x4f0a03(0x19f)](),_0x49573c=_0x32d521['minValue'],_0x211646=_0x32d521[_0x4f0a03(0x183)];this['heatmapInstance'][_0x4f0a03(0x165)]({'min':_0x49573c,'max':_0x211646,'data':this[_0x4f0a03(0x192)]});}},{'key':'_rebuildPrimitive','value':function _0x580e4e(){var _0x449e1c=_0x12e0af;if(!this[_0x449e1c(0x1a8)]||!this['getMap']())return;this[_0x449e1c(0x1a9)]&&(this[_0x449e1c(0x1ab)]()['scene'][_0x449e1c(0x189)][_0x449e1c(0x170)](this[_0x449e1c(0x1a9)]),this[_0x449e1c(0x1a9)]=null),this[_0x449e1c(0x18b)]();}},{'key':'_createPolygonPrimitive','value':function _0x4e4ac5(){var _0x2cbdbf=_0x12e0af,_0x33909f=this[_0x2cbdbf(0x17c)]();if(!_0x33909f)return;var _0x2dc7ef=new _0x5ae81c[(_0x2cbdbf(0x18a))]();_0x2dc7ef['position']=new _0x5ae81c['GeometryAttribute']({'componentDatatype':_0x5ae81c[_0x2cbdbf(0x17f)]['DOUBLE'],'componentsPerAttribute':0x3,'values':new Float64Array(_0x33909f['positions'])}),_0x2dc7ef['color']=new _0x5ae81c['GeometryAttribute']({'componentDatatype':_0x5ae81c[_0x2cbdbf(0x17f)]['UNSIGNED_BYTE'],'componentsPerAttribute':0x4,'normalize':!![],'values':new Uint8Array(_0x33909f['colors'])});var _0x3151ab=new _0x5ae81c[(_0x2cbdbf(0x17b))]({'attributes':_0x2dc7ef,'indices':_0x33909f[_0x2cbdbf(0x168)]>0xffff?new Uint32Array(_0x33909f['indices']):new Uint16Array(_0x33909f[_0x2cbdbf(0x1a6)]),'primitiveType':_0x5ae81c[_0x2cbdbf(0x193)]['TRIANGLES'],'boundingSphere':_0x5ae81c['BoundingSphere']['fromVertices'](_0x33909f['positions'])}),_0x4dd6b2=_0x5ae81c['RenderState'][_0x2cbdbf(0x1aa)]({'depthMask':![],'depthTest':{'enabled':!![],'func':_0x5ae81c['DepthFunction']['LESS_OR_EQUAL']},'blending':_0x5ae81c[_0x2cbdbf(0x166)][_0x2cbdbf(0x19e)],'cull':{'enabled':![]}});this['heatmapPrimitive']=this[_0x2cbdbf(0x1ab)]()[_0x2cbdbf(0x176)][_0x2cbdbf(0x189)][_0x2cbdbf(0x185)](new _0x167a82(_0x3151ab,{'modelMatrix':_0x5ae81c['Matrix4']['IDENTITY'],'vertexShaderSource':VERTEX_SHADER_SOURCE,'fragmentShaderSource':FRAGMENT_SHADER_SOURCE,'renderState':_0x4dd6b2,'pass':_0x5ae81c['Pass'][_0x2cbdbf(0x18f)]})),this['heatmapPrimitive']['id']=this['id'];}},{'key':_0x12e0af(0x17c),'value':function _0x2c2810(){var _0x13c0cd=_0x12e0af,_0x39a2ba;if(!this['boundRect']||!((_0x39a2ba=this['heatmapInstance'])!==null&&_0x39a2ba!==void 0x0&&_0x39a2ba[_0x13c0cd(0x1a2)]))return null;var _0x5dcfa8=Math[_0x13c0cd(0x172)](0x2,Math[_0x13c0cd(0x19b)](this[_0x13c0cd(0x174)],MAX_GRID_SIZE)),_0x4e2653=Math['max'](0x2,Math['min'](this['canvasH'],MAX_GRID_SIZE)),_0x5fd3a0=this['boundRect'],_0x2bfc65=_0x5fd3a0['minLat'],_0xf029a=_0x5fd3a0[_0x13c0cd(0x1ae)],_0x2e5cf0=_0x5fd3a0[_0x13c0cd(0x18e)],_0x2450a8=_0x5fd3a0['maxLng'],_0x37fd00=_0x5dcfa8-0x1,_0x505bc0=_0x4e2653-0x1,_0xd3e68=(_0x2450a8-_0x2e5cf0)/_0x37fd00,_0x1ccc4f=(_0xf029a-_0x2bfc65)/_0x505bc0,_0x569f1f=Math['max'](0x0,this[_0x13c0cd(0x174)]-0x1),_0x24eb91=Math[_0x13c0cd(0x172)](0x0,this[_0x13c0cd(0x19c)]-0x1),_0x28ffad=this['style'][_0x13c0cd(0x16f)],_0x5ee70e=this['style'][_0x13c0cd(0x198)],_0x50c1f6=this['_getRendererImageData'](this[_0x13c0cd(0x182)]['_renderer']['canvas']),_0x3bdfd5=this[_0x13c0cd(0x17a)](this['heatmapInstance']['_renderer'][_0x13c0cd(0x199)]);if(!_0x50c1f6||!_0x3bdfd5)return null;var _0x5c0c41=[],_0x1d20ca=[],_0x2f0655=[],_0x314c50=[],_0x1fc4f2=function _0x1a6ea3(_0x3be722,_0xc1610e){return _0x3be722*_0x4e2653+_0xc1610e;};for(var _0x4d0549=0x0;_0x4d0549<_0x5dcfa8;_0x4d0549++){var _0x1b9305=_0x2e5cf0+_0xd3e68*_0x4d0549,_0x55f084=Math[_0x13c0cd(0x179)](_0x4d0549/_0x37fd00*_0x569f1f);for(var _0x4f3382=0x0;_0x4f3382<_0x4e2653;_0x4f3382++){var _0x43fa60=_0x2bfc65+_0x1ccc4f*_0x4f3382,_0x29cbb8=Math['round'](_0x4f3382/_0x505bc0*_0x24eb91),_0x1743da=this['_sampleHeatPixel'](_0x55f084,_0x29cbb8,_0x50c1f6,_0x3bdfd5),_0x4e7351=_0x28ffad+_0x1743da['intensity']*_0x5ee70e,_0x5dbb88=_0x5ae81c['Cartesian3']['fromDegrees'](_0x1b9305,_0x43fa60,_0x4e7351);_0x5c0c41[_0x13c0cd(0x184)](_0x5dbb88['x'],_0x5dbb88['y'],_0x5dbb88['z']),_0x1d20ca['push'](_0x1743da['color'][0x0],_0x1743da['color'][0x1],_0x1743da[_0x13c0cd(0x16d)][0x2],_0x1743da[_0x13c0cd(0x16d)][0x3]),_0x314c50['push']({'lng':_0x1b9305,'lat':_0x43fa60,'color':_0x1743da[_0x13c0cd(0x16d)]}),_0x4d0549!==_0x37fd00&&_0x4f3382!==_0x505bc0&&(_0x2f0655[_0x13c0cd(0x184)](_0x1fc4f2(_0x4d0549,_0x4f3382),_0x1fc4f2(_0x4d0549+0x1,_0x4f3382),_0x1fc4f2(_0x4d0549,_0x4f3382+0x1)),_0x2f0655[_0x13c0cd(0x184)](_0x1fc4f2(_0x4d0549+0x1,_0x4f3382),_0x1fc4f2(_0x4d0549+0x1,_0x4f3382+0x1),_0x1fc4f2(_0x4d0549,_0x4f3382+0x1)));}}return this['_appendSideSkirt'](_0x5c0c41,_0x1d20ca,_0x2f0655,_0x314c50,_0x28ffad,0x0,_0x4e2653,function(_0x468eba){return{'topAIndex':_0x1fc4f2(0x0,_0x468eba),'topBIndex':_0x1fc4f2(0x0,_0x468eba+0x1)};}),this['_appendSideSkirt'](_0x5c0c41,_0x1d20ca,_0x2f0655,_0x314c50,_0x28ffad,0x0,_0x4e2653,function(_0x447a7a){return{'topAIndex':_0x1fc4f2(_0x37fd00,_0x447a7a+0x1),'topBIndex':_0x1fc4f2(_0x37fd00,_0x447a7a)};}),this['_appendSideSkirt'](_0x5c0c41,_0x1d20ca,_0x2f0655,_0x314c50,_0x28ffad,0x0,_0x5dcfa8,function(_0x1031f1){return{'topAIndex':_0x1fc4f2(_0x1031f1+0x1,0x0),'topBIndex':_0x1fc4f2(_0x1031f1,0x0)};}),this['_appendSideSkirt'](_0x5c0c41,_0x1d20ca,_0x2f0655,_0x314c50,_0x28ffad,0x0,_0x5dcfa8,function(_0x37a284){return{'topAIndex':_0x1fc4f2(_0x37a284,_0x505bc0),'topBIndex':_0x1fc4f2(_0x37a284+0x1,_0x505bc0)};}),{'positions':_0x5c0c41,'colors':_0x1d20ca,'indices':_0x2f0655,'vertexCount':_0x5c0c41[_0x13c0cd(0x17d)]/0x3};}},{'key':_0x12e0af(0x187),'value':function _0x751d6e(_0x662563,_0x107dc5,_0x2713fd,_0xb8b963,_0x4fbd23,_0x4a0cfc,_0x44c31c,_0x39e86e){var _0x298e9c=_0x12e0af;if(_0x44c31c<0x2)return;for(var _0x5ccf7c=_0x4a0cfc;_0x5ccf7c<_0x44c31c-0x1;_0x5ccf7c++){var _0xdc16b8=_0x39e86e(_0x5ccf7c),_0x274de6=_0xdc16b8['topAIndex'],_0x219cac=_0xdc16b8['topBIndex'],_0x9d751=_0xb8b963[_0x274de6],_0x7acdad=_0xb8b963[_0x219cac],_0x51afa7=_0x5ae81c[_0x298e9c(0x1a4)]['fromDegrees'](_0x9d751['lng'],_0x9d751[_0x298e9c(0x163)],_0x4fbd23),_0x35c4a3=_0x5ae81c['Cartesian3']['fromDegrees'](_0x7acdad['lng'],_0x7acdad[_0x298e9c(0x163)],_0x4fbd23),_0x3f93b1=_0x662563['length']/0x3;_0x662563['push'](_0x51afa7['x'],_0x51afa7['y'],_0x51afa7['z']),_0x107dc5['push'](_0x9d751[_0x298e9c(0x16d)][0x0],_0x9d751['color'][0x1],_0x9d751['color'][0x2],this[_0x298e9c(0x188)](_0x9d751[_0x298e9c(0x16d)][0x3]));var _0x501f60=_0x662563['length']/0x3;_0x662563['push'](_0x35c4a3['x'],_0x35c4a3['y'],_0x35c4a3['z']),_0x107dc5['push'](_0x7acdad['color'][0x0],_0x7acdad[_0x298e9c(0x16d)][0x1],_0x7acdad[_0x298e9c(0x16d)][0x2],this['_getSideAlpha'](_0x7acdad['color'][0x3])),_0x2713fd['push'](_0x274de6,_0x3f93b1,_0x219cac),_0x2713fd[_0x298e9c(0x184)](_0x219cac,_0x3f93b1,_0x501f60);}}},{'key':_0x12e0af(0x177),'value':function _0x4ef359(_0x16896b,_0x1fc9fb,_0xad3a01,_0x44d792){var _0x73e05=_0x12e0af,_0x4b40e6=(_0x1fc9fb*this[_0x73e05(0x174)]+_0x16896b)*0x4,_0x465b9c=_0xad3a01[_0x4b40e6]||0x0,_0x79093e=_0xad3a01[_0x4b40e6+0x1]||0x0,_0x3780b7=_0xad3a01[_0x4b40e6+0x2]||0x0,_0x492042=(_0x44d792[_0x4b40e6+0x3]||0x0)/0xff,_0x118bd3=_0x492042>0x0?Math['round'](_0x5ae81c['Math']['lerp'](MIN_SURFACE_ALPHA,0x1,_0x492042)*0xff):0x0;return{'intensity':_0x492042,'color':[_0x465b9c,_0x79093e,_0x3780b7,_0x118bd3]};}},{'key':_0x12e0af(0x17a),'value':function _0x10ab3e(_0x48bda3){var _0x214617=_0x12e0af;if(!_0x48bda3)return null;var _0x154b8e=_0x48bda3['getContext']('2d');if(!_0x154b8e)return null;return _0x154b8e['getImageData'](0x0,0x0,this[_0x214617(0x174)],this[_0x214617(0x19c)])[_0x214617(0x186)];}},{'key':_0x12e0af(0x188),'value':function _0x511fce(_0x12f9b9){if(_0x12f9b9<=0x0)return 0x0;var _0x27f324=_0x12f9b9/0xff;return Math['round'](_0x5ae81c['Math']['clamp'](_0x27f324*0.5,MIN_SIDE_ALPHA,0.5)*0xff);}}]),_0x5afa7d;}(_0x5e899a);export{Heatmap3d as default};
|