mars3d-heatmap 3.5.14 → 3.5.16

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.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
3
3
  *
4
- * 版本信息:v3.5.14
5
- * 编译日期:2023-07-03 18:37:16
4
+ * 版本信息:v3.5.16
5
+ * 编译日期:2023-07-17 18:16:42
6
6
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
7
7
  * 使用单位:免费公开版 ,2023-03-17
8
8
  */
@@ -11,5 +11,5 @@
11
11
  typeof define === 'function' && define.amd ? define(['exports', 'mars3d', '@mars3d/heatmap.js'], factory) :
12
12
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-heatmap"] = {}, global.mars3d, global.h337));
13
13
  })(this, (function (exports, mars3d, h337) {
14
- 'use strict';const _0x3b3454=_0x3a29;(function(_0x4b99f9,_0x5b238d){const _0x1aadd2={_0xd9e444:0xb8,_0x36d8c1:0x84,_0x3c317a:0xb3,_0xe78ff2:0x9b,_0x5bb03c:0x82,_0x9249c5:0x86,_0x3fa03e:0xb4},_0x5d66c8=_0x3a29,_0x3c4bf2=_0x4b99f9();while(!![]){try{const _0x22ab68=-parseInt(_0x5d66c8(_0x1aadd2._0xd9e444))/0x1+-parseInt(_0x5d66c8(_0x1aadd2._0x36d8c1))/0x2+-parseInt(_0x5d66c8(_0x1aadd2._0x3c317a))/0x3+parseInt(_0x5d66c8(_0x1aadd2._0xe78ff2))/0x4+parseInt(_0x5d66c8(_0x1aadd2._0x5bb03c))/0x5+-parseInt(_0x5d66c8(_0x1aadd2._0x9249c5))/0x6+parseInt(_0x5d66c8(0xaa))/0x7*(parseInt(_0x5d66c8(_0x1aadd2._0x3fa03e))/0x8);if(_0x22ab68===_0x5b238d)break;else _0x3c4bf2['push'](_0x3c4bf2['shift']());}catch(_0x58d372){_0x3c4bf2['push'](_0x3c4bf2['shift']());}}}(_0x6d61,0x8b1f4));function _interopNamespace(_0x36a520){const _0x213985={_0x162d86:0x8b},_0x51782a=_0x3a29;if(_0x36a520&&_0x36a520[_0x51782a(_0x213985._0x162d86)])return _0x36a520;var _0x2cd207=Object['create'](null);return _0x36a520&&Object['keys'](_0x36a520)['forEach'](function(_0x1c2dd7){const _0x5d6886=_0x51782a;if(_0x1c2dd7!=='default'){var _0x1adf8a=Object[_0x5d6886(0xc0)](_0x36a520,_0x1c2dd7);Object[_0x5d6886(0x79)](_0x2cd207,_0x1c2dd7,_0x1adf8a['get']?_0x1adf8a:{'enumerable':!![],'get':function(){return _0x36a520[_0x1c2dd7];}});}}),_0x2cd207[_0x51782a(0xa7)]=_0x36a520,_0x2cd207;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial='uniform\x20sampler2D\x20image;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x20{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20st);\x0a\x20\x20if(colorImage.rgb\x20==\x20vec3(1.0)\x20||\x20colorImage.rgb\x20==\x20vec3(0.0))\x20{\x0a\x20\x20\x20\x20discard;\x0a\x20\x20}\x0a\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20return\x20material;\x0a}\x0a';if(!h337__namespace[_0x3b3454(0x9f)])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0x3b3454(0xb2)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x3b3454(0x72),0.6:'green',0.8:_0x3b3454(0xb6),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x3b3454(0x88)]['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x136243={}){const _0xe8e477={_0x56de3d:0x76},_0x2a8dc4=_0x3b3454;super(_0x136243),this['options']['maxCanvasSize']=this[_0x2a8dc4(0x76)]['maxCanvasSize']??document['body'][_0x2a8dc4(0xad)],this['options']['maxCanvasSize']=Math['min'](this['options'][_0x2a8dc4(0x8c)],0x1388),this[_0x2a8dc4(0x76)][_0x2a8dc4(0xbb)]=this[_0x2a8dc4(0x76)]['minCanvasSize']??document['body'][_0x2a8dc4(0x94)],this[_0x2a8dc4(_0xe8e477._0x56de3d)]['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this[_0x2a8dc4(0x76)]['style']={...DEF_STYLE,...this[_0x2a8dc4(_0xe8e477._0x56de3d)][_0x2a8dc4(0xc4)]};}get[_0x3b3454(0x77)](){return this['_layer'];}get[_0x3b3454(0x91)](){return this['options']['heatStyle'];}set[_0x3b3454(0x91)](_0xbfa739){const _0x4c9cab=_0x3b3454;this['options']['heatStyle']=mars3d__namespace['Util'][_0x4c9cab(0xab)](this['options']['heatStyle'],_0xbfa739),this['_heat']&&(this['_heat']['configure'](this['options'][_0x4c9cab(0x91)]),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set[_0x3b3454(0xc4)](_0x47f8b0){const _0x2010d7=_0x3b3454;this['options'][_0x2010d7(0xc4)]=mars3d__namespace['Util']['merge'](this['options']['style'],_0x47f8b0);}get[_0x3b3454(0x7b)](){return this['_positions'];}set[_0x3b3454(0x7b)](_0x5f0884){const _0x2a87c9=_0x3b3454;this[_0x2a87c9(0xbc)](_0x5f0884);}get[_0x3b3454(0xba)](){const _0x348806={_0x5964f1:0x8e},_0x5ece89=[];return this['points']['forEach'](_0x425ed0=>{const _0x1ce65b=_0x3a29;_0x5ece89[_0x1ce65b(_0x348806._0x5964f1)](_0x425ed0['toArray']());}),_0x5ece89;}get['rectangle'](){const _0x288431={_0x1ad444:0x97},_0x333996=_0x3b3454;return this[_0x333996(_0x288431._0x1ad444)];}['_setOptionsHook'](_0x53b9a3,_0x1bddc9){_0x53b9a3['positions']&&(this['positions']=_0x53b9a3['positions']);}['_mountedHook'](){const _0xa0ce21={_0x36ba08:0x99,_0x44b234:0x80},_0x3cd5bd=_0x3b3454;this['style']['type']==='image'?this['_layer']=new mars3d__namespace['layer'][(_0x3cd5bd(_0xa0ce21._0x36ba08))]({'crs':_0x3cd5bd(_0xa0ce21._0x44b234),'private':!![]}):this[_0x3cd5bd(0xa9)]=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x4ed2e1={_0x49801b:0x7c,_0x3acdd1:0x95},_0x4e3e3d=_0x3b3454;this['_map']['addLayer'](this['_layer']),this[_0x4e3e3d(_0x4ed2e1._0x49801b)]=mars3d__namespace['DomUtil']['create']('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x4e3e3d(_0x4ed2e1._0x3acdd1)]),this['options']['positions']&&(this[_0x4e3e3d(0x7b)]=this[_0x4e3e3d(0x76)]['positions']),this['options']['flyTo']&&this['flyToByAnimationEnd']();}[_0x3b3454(0x9a)](){const _0x59313c={_0x30f1b7:0x87,_0x2724cf:0xc3},_0x40d44d=_0x3b3454;this[_0x40d44d(0x7c)]&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this['_container']),this[_0x40d44d(_0x59313c._0x30f1b7)](),this['_map'][_0x40d44d(_0x59313c._0x2724cf)](this['_layer']);}['addPosition'](_0x139fee,_0x41ac87){const _0x4304d5=_0x3b3454;this['_positions']=this[_0x4304d5(0xc6)]||[],this['_positions']['push'](_0x139fee),this['_updatePositionsHook'](_0x41ac87);}['setPositions'](_0x4bb958,_0x132f52){const _0x25c6f6={_0x2b1203:0xc6,_0xad950e:0xa4},_0x1f8578=_0x3b3454;this[_0x1f8578(_0x25c6f6._0x2b1203)]=_0x4bb958,this[_0x1f8578(_0x25c6f6._0xad950e)](_0x132f52);}['clear'](){const _0x4fae12={_0x4a714a:0x9d,_0x354936:0x8f},_0x46c6de=_0x3b3454;this[_0x46c6de(_0x4fae12._0x4a714a)]&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this[_0x46c6de(0x9d)]),this[_0x46c6de(_0x4fae12._0x354936)]&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this[_0x46c6de(0x8f)]);}['_updatePositionsHook'](_0x3fa630){const _0x31a5b1={_0x334297:0x98,_0x562e08:0xbe},_0x13cdee=_0x3b3454;if(!this[_0x13cdee(0x81)]||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0xc37f38=this[_0x13cdee(0xbd)]();if(this['style']['type']===_0x13cdee(_0x31a5b1._0x334297))this['_layer']['setOptions']({'url':_0xc37f38['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this[_0x13cdee(0xc4)][_0x13cdee(_0x31a5b1._0x562e08)]?this['_graphic']&&_0x3fa630?(this['_graphic']['uniforms']['image']=_0xc37f38,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0xc37f38,this['_graphic2']['uniforms'][_0x13cdee(0xb5)]=this[_0x13cdee(0x9d)]['uniforms'][_0x13cdee(0xb5)])):this['_createArcGraphic'](_0xc37f38):this['_graphic']&&_0x3fa630?this['_graphic'][_0x13cdee(0x89)][_0x13cdee(0x98)]=_0xc37f38:this['_createGraphic'](_0xc37f38);return this;}[_0x3b3454(0x7f)](_0x4a7f99){const _0x2d3f9c={_0x2a036a:0x7a},_0x31d59f=_0x3b3454;this['clear'](),this['_graphic']=new mars3d__namespace[(_0x31d59f(_0x2d3f9c._0x2a036a))]['RectanglePrimitive']({...this[_0x31d59f(0x76)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x4a7f99},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x31d59f(0xa9)]['addGraphic'](this['_graphic']);}[_0x3b3454(0xae)](_0xe022e0){const _0x28869c={_0xa16f88:0xaf,_0x423844:0x85,_0x39fce7:0x8a,_0x249fbb:0xb0,_0x5d8584:0xc1,_0x55ece3:0xb0,_0x16fb70:0x83,_0x4e94cf:0x97,_0xdf3b3a:0xb1,_0x163074:0xa9,_0x489019:0x93},_0x45f6c9=_0x3b3454;this['clear']();const _0x47cdb5=Cesium['RenderState'][_0x45f6c9(_0x28869c._0xa16f88)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x45f6c9(_0x28869c._0x423844)][_0x45f6c9(_0x28869c._0x39fce7)],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x45f6c9(_0x28869c._0x249fbb)],'zPass':Cesium['StencilOperation'][_0x45f6c9(_0x28869c._0x5d8584)]},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation'][_0x45f6c9(_0x28869c._0x55ece3)],'zFail':Cesium[_0x45f6c9(0x9c)]['KEEP'],'zPass':Cesium[_0x45f6c9(0x9c)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x329245=Math[_0x45f6c9(_0x28869c._0x16fb70)](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x2cb063=(this['style']['splitNum'],0x64);let _0x3bb6b6=Math['max'](this['_rectangle']['height'],this[_0x45f6c9(_0x28869c._0x4e94cf)]['width']);this[_0x45f6c9(0xc4)]['granularity']=_0x3bb6b6/=_0x2cb063;const _0x5e53fc=new Cesium['Material']({'fabric':{'uniforms':{'image':_0xe022e0,'repeat':new Cesium[(_0x45f6c9(_0x28869c._0xdf3b3a))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x3c5494=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace[(_0x45f6c9(0x7a))][(_0x45f6c9(0x93))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x47cdb5,'material':_0x5e53fc,'vertexShaderSource':getVertexShaderSource(_0x329245*_0x3c5494)})}),this[_0x45f6c9(_0x28869c._0x163074)]['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic'][(_0x45f6c9(_0x28869c._0x489019))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x47cdb5,'material':_0x5e53fc,'vertexShaderSource':getVertexShaderSource(-_0x329245)})}),this[_0x45f6c9(0xa9)]['addGraphic'](this[_0x45f6c9(0x8f)]));}['getRectangle'](_0x2fbee6){const _0x2bf57e=_0x3b3454;return _0x2fbee6!==null&&_0x2fbee6!==void 0x0&&_0x2fbee6['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this[_0x2bf57e(0x97)];}['_getHeatCanvas'](){const _0x10c6d7={_0x1b3fdd:0xc6,_0x28d1ba:0xc9,_0x5d7726:0x8d,_0x6a67e:0x76,_0x5b38:0xbb,_0x34f510:0x91,_0x27afd8:0xc9,_0x320766:0xca,_0xb4a8d3:0x92,_0x137f4f:0xb7,_0x3a486e:0xc8,_0x27b6dd:0x92,_0x1ff1dd:0x78,_0x5ee4be:0xbf},_0x31534d={_0x4db3c8:0xa2,_0x41661c:0xb9},_0x198d5c={_0x52a544:0xc2,_0x32a889:0xa8},_0x381445=_0x3b3454,_0x46e2ef=this[_0x381445(_0x10c6d7._0x1b3fdd)],_0x1881de=[];let _0x52d1b4,_0xf3ba42,_0x2fa048,_0x899d26;_0x46e2ef['forEach'](_0x55fba5=>{const _0x30469d=_0x381445,_0x2a0810=mars3d__namespace['LngLatPoint'][_0x30469d(0x90)](_0x55fba5);if(!_0x2a0810)return;_0x2a0810['value']=_0x55fba5[_0x30469d(0xb9)]||0x1,!this['options']['rectangle']&&(_0x52d1b4===undefined?(_0x52d1b4=_0x2a0810['lng'],_0xf3ba42=_0x2a0810['lng'],_0x2fa048=_0x2a0810[_0x30469d(_0x198d5c._0x52a544)],_0x899d26=_0x2a0810['lat']):(_0x52d1b4=Math['min'](_0x52d1b4,_0x2a0810['lng']),_0xf3ba42=Math['max'](_0xf3ba42,_0x2a0810[_0x30469d(_0x198d5c._0x32a889)]),_0x2fa048=Math['min'](_0x2fa048,_0x2a0810[_0x30469d(0xc2)]),_0x899d26=Math[_0x30469d(0xb7)](_0x899d26,_0x2a0810['lat']))),_0x1881de['push'](_0x2a0810);});_0x52d1b4===_0xf3ba42&&(_0x52d1b4-=0.000001,_0xf3ba42+=0.000001);_0x2fa048===_0x899d26&&(_0x2fa048-=0.000001,_0x899d26+=0.000001);let _0x43c964=this[_0x381445(0x76)]['rectangle']||{'xmin':_0x52d1b4,'xmax':_0xf3ba42,'ymin':_0x2fa048,'ymax':_0x899d26};const _0x84986=getMercatorBounds(_0x43c964),_0x1fea45=Math['abs'](_0x84986[_0x381445(_0x10c6d7._0x28d1ba)]-_0x84986['xmin']),_0xf8363b=Math['abs'](_0x84986[_0x381445(_0x10c6d7._0x5d7726)]-_0x84986['ymin']),_0x5f46a6=Math['max'](_0x1fea45,_0xf8363b),_0x1ab60f=Math['min'](_0x1fea45,_0xf8363b);this['_mBoundsMax']=_0x5f46a6;let _0x5eb0f=0x1;if(_0x5f46a6>this[_0x381445(0x76)]['maxCanvasSize'])_0x5eb0f=_0x5f46a6/this['options']['maxCanvasSize'],_0x1ab60f/_0x5eb0f<this['options']['minCanvasSize']&&(_0x5eb0f=_0x1ab60f/this[_0x381445(_0x10c6d7._0x6a67e)]['minCanvasSize']);else _0x1ab60f<this['options'][_0x381445(_0x10c6d7._0x5b38)]&&(_0x5eb0f=_0x1ab60f/this['options']['minCanvasSize'],_0x5f46a6/_0x5eb0f>this['options']['maxCanvasSize']&&(_0x5eb0f=_0x5f46a6/this['options']['maxCanvasSize']));const _0x404632=this[_0x381445(_0x10c6d7._0x34f510)][_0x381445(0xc7)]*1.5,_0x121f4a=_0x1fea45/_0x5eb0f+_0x404632*0x2,_0x1479e4=_0xf8363b/_0x5eb0f+_0x404632*0x2,_0x1fe7ae=_0x404632*_0x5eb0f;_0x84986[_0x381445(0xca)]-=_0x1fe7ae,_0x84986[_0x381445(0x92)]-=_0x1fe7ae,_0x84986[_0x381445(_0x10c6d7._0x27afd8)]+=_0x1fe7ae,_0x84986['ymax']+=_0x1fe7ae,this['_scale']=_0x5eb0f,_0x43c964=geLatLngBounds(_0x84986),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x43c964[_0x381445(_0x10c6d7._0x320766)],_0x43c964[_0x381445(_0x10c6d7._0xb4a8d3)],_0x43c964['xmax'],_0x43c964['ymax']);let _0x1de720=_0x1881de[0x0]['value']??0x1,_0x58d671=_0x1881de[0x0]['value']??0x0;const _0xd88ceb=[];_0x1881de['forEach'](_0x10ebfa=>{const _0x4be473=_0x381445,_0x3a36fe=mars3d__namespace[_0x4be473(_0x31534d._0x4db3c8)][_0x4be473(0x96)]([_0x10ebfa[_0x4be473(0xa8)],_0x10ebfa[_0x4be473(0xc2)]]),_0x357114=_0x10ebfa[_0x4be473(_0x31534d._0x41661c)]||0x1,_0x5ae9db=Math['round']((_0x3a36fe[0x0]-_0x84986['xmin'])/_0x5eb0f),_0x157f18=Math['round']((_0x84986['ymax']-_0x3a36fe[0x1])/_0x5eb0f);_0x1de720=Math['max'](_0x1de720,_0x357114),_0x58d671=Math['min'](_0x58d671,_0x357114),_0xd88ceb['push']({'x':_0x5ae9db,'y':_0x157f18,'value':_0x357114});});const _0x1a6aa4={'min':this[_0x381445(0x76)][_0x381445(0xa3)]??_0x58d671,'max':this['options'][_0x381445(_0x10c6d7._0x137f4f)]??_0x1de720,'data':_0xd88ceb};this['_last_heatData']=_0x1a6aa4;if(!this[_0x381445(_0x10c6d7._0x3a486e)]||_0x84986['xmin']!==this['_last_mBounds'][_0x381445(0xca)]||_0x84986['ymin']!==this['_last_mBounds'][_0x381445(_0x10c6d7._0x27b6dd)]||_0x84986[_0x381445(0xc9)]!==this['_last_mBounds']['xmax']||_0x84986['ymax']!==this['_last_mBounds']['ymax']){this[_0x381445(0xc8)]=_0x84986,this['_container']['style']['cssText']='width:'+_0x121f4a+_0x381445(_0x10c6d7._0x1ff1dd)+_0x1479e4+'px;';const _0x1b5006={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x1b5006):this[_0x381445(_0x10c6d7._0x5ee4be)]['configure'](_0x1b5006);}this['_heat']['setData'](_0x1a6aa4);const _0x19f794=mars3d__namespace[_0x381445(0x7d)]['copyCanvas'](this[_0x381445(_0x10c6d7._0x5ee4be)]['_renderer'][_0x381445(0x9e)]);return _0x19f794;}[_0x3b3454(0xc5)](){const _0x15e0fc={_0x3cfc1a:0xbf,_0x4c32bd:0xc4,_0x93e81d:0xac},_0x3dc204=_0x3b3454;this[_0x3dc204(_0x15e0fc._0x3cfc1a)]['configure']({'radius':this['heatStyle']['radius']*this[_0x3dc204(_0x15e0fc._0x4c32bd)]['arcRadiusScale'],'blur':this['heatStyle'][_0x3dc204(0x73)]*this[_0x3dc204(_0x15e0fc._0x4c32bd)][_0x3dc204(0x75)],'gradient':this['heatStyle'][_0x3dc204(_0x15e0fc._0x93e81d)]||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x4832c0=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this[_0x3dc204(_0x15e0fc._0x3cfc1a)]['configure'](this['options']['heatStyle']),_0x4832c0;}[_0x3b3454(0xa0)](_0x19dcc1){const _0x2a8ec5={_0x1bd95c:0x96,_0x291e0a:0xc8,_0x238b91:0xbf,_0x1907e4:0xa1},_0x49cde8=_0x3b3454,_0x5d62f5=mars3d__namespace['LngLatPoint'][_0x49cde8(0x90)](_0x19dcc1);if(!_0x5d62f5)return{};const _0x59bc17=mars3d__namespace['PointTrans'][_0x49cde8(_0x2a8ec5._0x1bd95c)]([_0x5d62f5['lng'],_0x5d62f5['lat']]),_0x6967d9=this[_0x49cde8(_0x2a8ec5._0x291e0a)],_0x4905a6=Math['round']((_0x59bc17[0x0]-_0x6967d9[_0x49cde8(0xca)])/this['_scale']),_0x128c25=Math['round']((_0x6967d9['ymax']-_0x59bc17[0x1])/this['_scale']),_0x1cc7da=this[_0x49cde8(_0x2a8ec5._0x238b91)]['getValueAt']({'x':_0x4905a6,'y':_0x128c25}),_0x187f18=this['_heat'][_0x49cde8(0x74)]['ctx'][_0x49cde8(0xa5)](_0x4905a6-0x1,_0x128c25-0x1,0x1,0x1)['data'];return{'x':_0x4905a6,'y':_0x128c25,'value':_0x1cc7da,'color':_0x49cde8(_0x2a8ec5._0x1907e4)+_0x187f18[0x0]+','+_0x187f18[0x1]+','+_0x187f18[0x2]+','+_0x187f18[0x3]+')'};}}mars3d__namespace['LayerUtil'][_0x3b3454(0xa6)]('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function _0x3a29(_0x96ed54,_0x3aea55){const _0x6d618=_0x6d61();return _0x3a29=function(_0x3a29b9,_0x2402c9){_0x3a29b9=_0x3a29b9-0x72;let _0x51a7d1=_0x6d618[_0x3a29b9];return _0x51a7d1;},_0x3a29(_0x96ed54,_0x3aea55);}function getMercatorBounds(_0x2e613e){const _0x153c2d={_0x5e7591:0xca,_0x1d02cf:0xc9},_0x410575=_0x3b3454,_0x110bc5=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x2e613e[_0x410575(_0x153c2d._0x5e7591)],_0x2e613e[_0x410575(0x92)]]),_0x13c88b=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x2e613e[_0x410575(_0x153c2d._0x1d02cf)],_0x2e613e['ymax']]);return{'xmin':_0x110bc5[0x0],'ymin':_0x110bc5[0x1],'xmax':_0x13c88b[0x0],'ymax':_0x13c88b[0x1]};}function geLatLngBounds(_0x5df521){const _0x3f852e={_0x334ef6:0xca,_0x2ecefb:0xa2,_0x37a64a:0xc9,_0x4c520e:0x8d},_0x2ddcf0=_0x3b3454,_0x97c1c9=mars3d__namespace[_0x2ddcf0(0xa2)][_0x2ddcf0(0x7e)]([_0x5df521[_0x2ddcf0(_0x3f852e._0x334ef6)],_0x5df521['ymin']]),_0xbccb4d=mars3d__namespace[_0x2ddcf0(_0x3f852e._0x2ecefb)]['mercator2lonlat']([_0x5df521[_0x2ddcf0(_0x3f852e._0x37a64a)],_0x5df521[_0x2ddcf0(_0x3f852e._0x4c520e)]]);return{'xmin':_0x97c1c9[0x0],'ymin':_0x97c1c9[0x1],'xmax':_0xbccb4d[0x0],'ymax':_0xbccb4d[0x1]};}function getVertexShaderSource(_0x1f0438){return'in\x20vec3\x20position3DHigh;\x0a\x20\x20in\x20vec3\x20position3DLow;\x0a\x20\x20in\x20vec2\x20st;\x0a\x20\x20in\x20float\x20batchId;\x0a\x20\x20uniform\x20sampler2D\x20bumpMap_3;\x0a\x20\x20out\x20vec3\x20v_positionMC;\x0a\x20\x20out\x20vec3\x20v_positionEC;\x0a\x20\x20out\x20vec2\x20v_st;\x0a\x0a\x20\x20void\x20main()\x0a\x20\x20{\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20czm_computePosition();\x0a\x20\x20\x20\x20v_positionMC\x20=\x20position3DHigh\x20+\x20position3DLow;\x0a\x20\x20\x20\x20v_positionEC\x20=\x20(czm_modelViewRelativeToEye\x20*\x20p).xyz;\x0a\x20\x20\x20\x20v_st\x20=\x20st;\x0a\x20\x20\x20\x20vec4\x20color\x20=\x20texture(bumpMap_3,\x20v_st);\x0a\x20\x20\x20\x20float\x20centerBump\x20=\x20distance(vec3(0.0),color.rgb);\x0a\x20\x20\x20\x20vec3\x20upDir\x20=\x20normalize(v_positionMC.xyz);\x0a\x20\x20\x20\x20vec3\x20disPos\x20=\x20upDir\x20*\x20centerBump\x20*\x20'+_0x1f0438+';\x0a\x20\x20\x20\x20p\x20+=vec4(disPos,0.0);\x0a\x20\x20\x20\x20gl_Position\x20=\x20czm_modelViewProjectionRelativeToEye\x20*\x20p;\x0a\x20\x20}\x0a';}exports['HeatLayer']=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0x6d61(){const _0x3500e5=['px;height:','defineProperty','graphic','positions','_container','DomUtil','mercator2lonlat','_createGraphic','EPSG:3857','show','5144080MnAUXd','floor','1440754ZDOwdR','StencilFunction','6508464YippGE','clear','EllipsoidSurfaceAppearance','uniforms','ALWAYS','__esModule','maxCanvasSize','ymax','push','_graphic2','parse','heatStyle','ymin','RectanglePrimitive','clientHeight','container','lonlat2mercator','_rectangle','image','ImageLayer','_removedHook','3931544riFdQs','StencilOperation','_graphic','canvas','create','getPointData','rgba(','PointTrans','min','_updatePositionsHook','getImageData','register','default','lng','_layer','7mmtwwY','merge','gradientArc','clientWidth','_createArcGraphic','fromCache','KEEP','Cartesian2','BaseLayer','1076388lMUvVJ','8374464DNsEHA','bumpMap','yellow','max','324749kfMpEY','value','coordinates','minCanvasSize','setPositions','_getHeatCanvas','arc','_heat','getOwnPropertyDescriptor','REPLACE','lat','removeLayer','style','_getArcHeatCanvas','_positions','radius','_last_mBounds','xmax','xmin','blue','blur','_renderer','arcBlurScale','options','layer'];_0x6d61=function(){return _0x3500e5;};return _0x6d61();}
14
+ 'use strict';function _0x260c(){const _0x4f5f48=['StencilOperation','container','maxCanvasSize','merge','forEach','PointTrans','2672148oCoTDH','mercator2lonlat','addPosition','_last_mBounds','toDataURL','positions','lonlat2mercator','configure','3gUrrul','_renderer','layer','push','setPositions','3586667WoqweA','rgb(140,140,140)','width','_layer','__esModule','6010WeZTke','1161738eJlJqx','body','HeatLayer','image','EllipsoidSurfaceAppearance','lat','_updatePositionsHook','xmax','opacity','16EbEnNz','round','Util','getImageData','bumpMap','heat','arc','lng','diffHeight','flyToByAnimationEnd','removeGraphic','_positions','yellow','_container','_scale','21207210JJPlmV','_createArcGraphic','graphic','xmin','parse','toArray','uniforms','min','options','fromDegrees','addGraphic','11497068DoTYVE','heatStyle','create','blue','minCanvasSize','ymin','arcDirection','_getHeatCanvas','Cartesian2','_rectangle','style','removeLayer',';\x0a\x20\x20\x20\x20p\x20+=vec4(disPos,0.0);\x0a\x20\x20\x20\x20gl_Position\x20=\x20czm_modelViewProjectionRelativeToEye\x20*\x20p;\x0a\x20\x20}\x0a','_graphic','rectangle','_getArcHeatCanvas','clientWidth','GraphicLayer','ymax','setOptions','_map','1393221sZyYOG','points','KEEP','_heat','value','type','_graphic2','3044palGyd','rgba(','ALWAYS','_mBoundsMax'];_0x260c=function(){return _0x4f5f48;};return _0x260c();}const _0x4c3c37=_0x803e;(function(_0x598326,_0x14cb74){const _0x3a49bf={_0x531a3d:0x12c,_0x183956:0x145,_0x1e4e46:0x133,_0x497bed:0x150,_0x21d594:0x159,_0x5d104e:0x168},_0x4c4051=_0x803e,_0xb24ded=_0x598326();while(!![]){try{const _0x152c14=parseInt(_0x4c4051(_0x3a49bf._0x531a3d))/0x1+-parseInt(_0x4c4051(0x13d))/0x2*(parseInt(_0x4c4051(_0x3a49bf._0x183956))/0x3)+-parseInt(_0x4c4051(_0x3a49bf._0x1e4e46))/0x4*(-parseInt(_0x4c4051(0x14f))/0x5)+-parseInt(_0x4c4051(_0x3a49bf._0x497bed))/0x6+-parseInt(_0x4c4051(0x14a))/0x7*(-parseInt(_0x4c4051(_0x3a49bf._0x21d594))/0x8)+parseInt(_0x4c4051(0x117))/0x9+-parseInt(_0x4c4051(_0x3a49bf._0x5d104e))/0xa;if(_0x152c14===_0x14cb74)break;else _0xb24ded['push'](_0xb24ded['shift']());}catch(_0x7bfb09){_0xb24ded['push'](_0xb24ded['shift']());}}}(_0x260c,0xea4fb));function _interopNamespace(_0x571d14){const _0x113650={_0x54be76:0x13b},_0xa3d9aa=_0x803e;if(_0x571d14&&_0x571d14[_0xa3d9aa(0x14e)])return _0x571d14;var _0x20a3de=Object['create'](null);return _0x571d14&&Object['keys'](_0x571d14)[_0xa3d9aa(_0x113650._0x54be76)](function(_0xa662f1){if(_0xa662f1!=='default'){var _0x14e6a2=Object['getOwnPropertyDescriptor'](_0x571d14,_0xa662f1);Object['defineProperty'](_0x20a3de,_0xa662f1,_0x14e6a2['get']?_0x14e6a2:{'enumerable':!![],'get':function(){return _0x571d14[_0xa662f1];}});}}),_0x20a3de['default']=_0x571d14,_0x20a3de;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial='uniform\x20sampler2D\x20image;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x20{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20st);\x0a\x20\x20if(colorImage.rgb\x20==\x20vec3(1.0)\x20||\x20colorImage.rgb\x20==\x20vec3(0.0))\x20{\x0a\x20\x20\x20\x20discard;\x0a\x20\x20}\x0a\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20return\x20material;\x0a}\x0a';if(!h337__namespace['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x4c3c37(0x11a),0.6:'green',0.8:_0x4c3c37(0x165),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x4c3c37(0x154)]['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x25d952={}){const _0x10f8d6={_0xc26c22:0x114,_0x3336b6:0x139,_0x402c5d:0x114,_0xc3c833:0x113,_0x3b163f:0x121,_0x557b6d:0x114},_0x25effe=_0x4c3c37;super(_0x25d952),this[_0x25effe(_0x10f8d6._0xc26c22)][_0x25effe(_0x10f8d6._0x3336b6)]=this[_0x25effe(_0x10f8d6._0x402c5d)][_0x25effe(0x139)]??document[_0x25effe(0x151)][_0x25effe(0x127)],this[_0x25effe(_0x10f8d6._0xc26c22)][_0x25effe(_0x10f8d6._0x3336b6)]=Math[_0x25effe(_0x10f8d6._0xc3c833)](this['options'][_0x25effe(0x139)],0x1388),this['options']['minCanvasSize']=this[_0x25effe(_0x10f8d6._0xc26c22)][_0x25effe(0x11b)]??document['body']['clientHeight'],this[_0x25effe(_0x10f8d6._0x402c5d)][_0x25effe(0x11b)]=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this[_0x25effe(0x114)]['heatStyle']},this['options'][_0x25effe(_0x10f8d6._0x3b163f)]={...DEF_STYLE,...this[_0x25effe(_0x10f8d6._0x557b6d)]['style']};}get[_0x4c3c37(0x147)](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set['heatStyle'](_0x578f6b){const _0x5453e0={_0x3c127e:0x114,_0x1ef6d5:0x15b},_0x254238=_0x4c3c37;this[_0x254238(_0x5453e0._0x3c127e)]['heatStyle']=mars3d__namespace[_0x254238(_0x5453e0._0x1ef6d5)]['merge'](this['options']['heatStyle'],_0x578f6b),this['_heat']&&(this[_0x254238(0x12f)]['configure'](this[_0x254238(_0x5453e0._0x3c127e)][_0x254238(0x118)]),this['_updatePositionsHook'](!![]));}get['style'](){const _0x5922a0=_0x4c3c37;return this['options'][_0x5922a0(0x121)];}set[_0x4c3c37(0x121)](_0x255237){const _0x2051eb=_0x4c3c37;this['options'][_0x2051eb(0x121)]=mars3d__namespace['Util'][_0x2051eb(0x13a)](this[_0x2051eb(0x114)]['style'],_0x255237);}get['positions'](){return this['_positions'];}set['positions'](_0x59d2cf){this['setPositions'](_0x59d2cf);}get['coordinates'](){const _0x26e815={_0x453e57:0x111},_0x104a93=_0x4c3c37,_0xa0cee7=[];return this[_0x104a93(0x12d)][_0x104a93(0x13b)](_0x46600c=>{const _0xe3cd15=_0x104a93;_0xa0cee7[_0xe3cd15(0x148)](_0x46600c[_0xe3cd15(_0x26e815._0x453e57)]());}),_0xa0cee7;}get[_0x4c3c37(0x125)](){return this['_rectangle'];}['_setOptionsHook'](_0x5c75bd,_0x33b0bc){const _0x5b94d6={_0x1f64f0:0x142},_0x335b10=_0x4c3c37;_0x5c75bd['positions']&&(this[_0x335b10(_0x5b94d6._0x1f64f0)]=_0x5c75bd['positions']);}['_mountedHook'](){const _0x195ddf={_0x46079c:0x153,_0x31f7f6:0x128},_0x1c3384=_0x4c3c37;this['style']['type']===_0x1c3384(_0x195ddf._0x46079c)?this['_layer']=new mars3d__namespace[(_0x1c3384(0x147))]['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this[_0x1c3384(0x14d)]=new mars3d__namespace[(_0x1c3384(0x147))][(_0x1c3384(_0x195ddf._0x31f7f6))]({'private':!![]});}['_addedHook'](){const _0x1f5e5f={_0x5a33ec:0x119,_0x4ffcc7:0x142,_0xbb76c:0x114,_0x594b42:0x162},_0x312897=_0x4c3c37;this['_map']['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil'][_0x312897(_0x1f5e5f._0x5a33ec)]('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x312897(0x138)]),this[_0x312897(0x114)][_0x312897(0x142)]&&(this[_0x312897(_0x1f5e5f._0x4ffcc7)]=this['options'][_0x312897(_0x1f5e5f._0x4ffcc7)]),this[_0x312897(_0x1f5e5f._0xbb76c)]['flyTo']&&this[_0x312897(_0x1f5e5f._0x594b42)]();}['_removedHook'](){const _0x5147b6={_0x20fd81:0x166,_0x3aae2a:0x12b,_0x1a4907:0x122},_0x1926b4=_0x4c3c37;this[_0x1926b4(_0x5147b6._0x20fd81)]&&(mars3d__namespace['DomUtil']['remove'](this[_0x1926b4(0x166)]),delete this[_0x1926b4(0x166)]),this['clear'](),this[_0x1926b4(_0x5147b6._0x3aae2a)][_0x1926b4(_0x5147b6._0x1a4907)](this['_layer']);}[_0x4c3c37(0x13f)](_0x1a7885,_0x28adb4){const _0x1c2380=_0x4c3c37;this[_0x1c2380(0x164)]=this['_positions']||[],this['_positions'][_0x1c2380(0x148)](_0x1a7885),this['_updatePositionsHook'](_0x28adb4);}[_0x4c3c37(0x149)](_0x4e07d6,_0x3ba0fd){const _0x477def=_0x4c3c37;this['_positions']=_0x4e07d6,this[_0x477def(0x156)](_0x3ba0fd);}['clear'](){const _0x53b3b0={_0x5cabe1:0x163,_0x14a744:0x132},_0x224169=_0x4c3c37;this['_graphic']&&(this['_layer'][_0x224169(_0x53b3b0._0x5cabe1)](this['_graphic'],!![]),delete this[_0x224169(0x124)]),this[_0x224169(_0x53b3b0._0x14a744)]&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0xed3b80){const _0x1ff105={_0x1de35f:0x121,_0xd8c00f:0x153,_0xc90af8:0x120,_0x25c2d8:0x158,_0x535806:0x112},_0x57e1b5=_0x4c3c37;if(!this['show']||!this[_0x57e1b5(0x12b)]||!this['positions']||this['positions']['length']===0x0)return this;const _0x179e4a=this['_getHeatCanvas']();if(this[_0x57e1b5(_0x1ff105._0x1de35f)][_0x57e1b5(0x131)]===_0x57e1b5(_0x1ff105._0xd8c00f))this['_layer'][_0x57e1b5(0x12a)]({'url':_0x179e4a[_0x57e1b5(0x141)]('image/png'),'rectangle':this[_0x57e1b5(_0x1ff105._0xc90af8)],'opacity':this[_0x57e1b5(0x121)][_0x57e1b5(_0x1ff105._0x25c2d8)]});else this['style'][_0x57e1b5(0x15f)]?this['_graphic']&&_0xed3b80?(this['_graphic']['uniforms']['image']=_0x179e4a,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x179e4a,this['_graphic2'][_0x57e1b5(_0x1ff105._0x535806)][_0x57e1b5(0x15d)]=this['_graphic']['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x179e4a):this['_graphic']&&_0xed3b80?this['_graphic']['uniforms']['image']=_0x179e4a:this['_createGraphic'](_0x179e4a);return this;}['_createGraphic'](_0x37cbb9){this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x37cbb9},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this['_graphic']);}[_0x4c3c37(0x169)](_0x43b840){const _0x4fc602={_0x3ed7ce:0x137,_0x374854:0x12e,_0x4ee118:0x121,_0x36ebdd:0x161,_0xa11bbc:0x14c,_0x39c82a:0x11f,_0x4d8e3e:0x124,_0x28bbd0:0x16a,_0x12da41:0x154,_0x2d5379:0x116,_0x3cc8e1:0x11d,_0x399cdf:0x114,_0x128f89:0x116},_0x43112f=_0x4c3c37;this['clear']();const _0x5c2957=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction'][_0x43112f(0x135)],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x43112f(_0x4fc602._0x3ed7ce)][_0x43112f(_0x4fc602._0x374854)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x4cf536=Math['floor'](this[_0x43112f(_0x4fc602._0x4ee118)]['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this[_0x43112f(0x121)][_0x43112f(_0x4fc602._0x36ebdd)]&&delete this['style']['diffHeight'];const _0x10f57c=(this['style']['splitNum'],0x64);let _0x5914b1=Math['max'](this['_rectangle']['height'],this['_rectangle'][_0x43112f(_0x4fc602._0xa11bbc)]);this['style']['granularity']=_0x5914b1/=_0x10f57c;const _0x1393dd=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x43b840,'repeat':new Cesium[(_0x43112f(_0x4fc602._0x39c82a))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x43112f(0x126)]()},'source':HeatMaterial},'translucent':!![]}),_0x23a748=this['style']['arcDirection']||0x1;this[_0x43112f(_0x4fc602._0x4d8e3e)]=new mars3d__namespace[(_0x43112f(_0x4fc602._0x28bbd0))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x43112f(_0x4fc602._0x12da41))]({'flat':!![],'aboveGround':!![],'renderState':_0x5c2957,'material':_0x1393dd,'vertexShaderSource':getVertexShaderSource(_0x4cf536*_0x23a748)})}),this['_layer'][_0x43112f(_0x4fc602._0x2d5379)](this['_graphic']),this['style'][_0x43112f(_0x4fc602._0x3cc8e1)]===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x43112f(_0x4fc602._0x399cdf)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x5c2957,'material':_0x1393dd,'vertexShaderSource':getVertexShaderSource(-_0x4cf536)})}),this[_0x43112f(0x14d)][_0x43112f(_0x4fc602._0x128f89)](this[_0x43112f(0x132)]));}['getRectangle'](_0xcffe99){return _0xcffe99!==null&&_0xcffe99!==void 0x0&&_0xcffe99['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}[_0x4c3c37(0x11e)](){const _0x3d8d39={_0x1b6ef0:0x136,_0x4a091a:0x114,_0x55f893:0x114,_0x4dddf7:0x11b,_0xdeab96:0x16b,_0x2989af:0x11c,_0x3606f4:0x167,_0x37b99d:0x115,_0x45d6a0:0x130,_0x126aa8:0x130,_0x28205b:0x16b,_0x3bd0d0:0x11c,_0x3d80a8:0x140,_0x14a2ec:0x157,_0x4f9788:0x140,_0x1d6a43:0x166,_0x4b9490:0x12f},_0x2897e4={_0x44aff0:0x160,_0x48a55a:0x155},_0x585009=_0x4c3c37,_0x54c3a8=this['_positions'],_0x379193=[];let _0x5ec163,_0x26a075,_0xc47056,_0x538872;_0x54c3a8[_0x585009(0x13b)](_0x1622dd=>{const _0x5a9163=_0x585009,_0x413ef1=mars3d__namespace['LngLatPoint']['parse'](_0x1622dd);if(!_0x413ef1)return;_0x413ef1['value']=_0x1622dd['value']||0x1,!this['options']['rectangle']&&(_0x5ec163===undefined?(_0x5ec163=_0x413ef1['lng'],_0x26a075=_0x413ef1['lng'],_0xc47056=_0x413ef1['lat'],_0x538872=_0x413ef1[_0x5a9163(0x155)]):(_0x5ec163=Math[_0x5a9163(0x113)](_0x5ec163,_0x413ef1['lng']),_0x26a075=Math['max'](_0x26a075,_0x413ef1[_0x5a9163(_0x2897e4._0x44aff0)]),_0xc47056=Math['min'](_0xc47056,_0x413ef1['lat']),_0x538872=Math['max'](_0x538872,_0x413ef1[_0x5a9163(_0x2897e4._0x48a55a)]))),_0x379193['push'](_0x413ef1);});_0x5ec163===_0x26a075&&(_0x5ec163-=0.000001,_0x26a075+=0.000001);_0xc47056===_0x538872&&(_0xc47056-=0.000001,_0x538872+=0.000001);let _0x246126=this['options']['rectangle']||{'xmin':_0x5ec163,'xmax':_0x26a075,'ymin':_0xc47056,'ymax':_0x538872};const _0x1e057a=getMercatorBounds(_0x246126),_0x183812=Math['abs'](_0x1e057a['xmax']-_0x1e057a[_0x585009(0x16b)]),_0x10e01c=Math['abs'](_0x1e057a['ymax']-_0x1e057a['ymin']),_0x2d97ce=Math['max'](_0x183812,_0x10e01c),_0x50d652=Math['min'](_0x183812,_0x10e01c);this[_0x585009(_0x3d8d39._0x1b6ef0)]=_0x2d97ce;let _0x5896b0=0x1;if(_0x2d97ce>this[_0x585009(_0x3d8d39._0x4a091a)][_0x585009(0x139)])_0x5896b0=_0x2d97ce/this[_0x585009(_0x3d8d39._0x55f893)][_0x585009(0x139)],_0x50d652/_0x5896b0<this['options']['minCanvasSize']&&(_0x5896b0=_0x50d652/this[_0x585009(0x114)][_0x585009(_0x3d8d39._0x4dddf7)]);else _0x50d652<this['options']['minCanvasSize']&&(_0x5896b0=_0x50d652/this['options']['minCanvasSize'],_0x2d97ce/_0x5896b0>this['options'][_0x585009(0x139)]&&(_0x5896b0=_0x2d97ce/this[_0x585009(0x114)]['maxCanvasSize']));const _0x44584b=this['heatStyle']['radius']*1.5,_0x1fb668=_0x183812/_0x5896b0+_0x44584b*0x2,_0x467b27=_0x10e01c/_0x5896b0+_0x44584b*0x2,_0x3780e5=_0x44584b*_0x5896b0;_0x1e057a[_0x585009(_0x3d8d39._0xdeab96)]-=_0x3780e5,_0x1e057a[_0x585009(_0x3d8d39._0x2989af)]-=_0x3780e5,_0x1e057a['xmax']+=_0x3780e5,_0x1e057a[_0x585009(0x129)]+=_0x3780e5,this[_0x585009(_0x3d8d39._0x3606f4)]=_0x5896b0,_0x246126=geLatLngBounds(_0x1e057a),this['_rectangle']=Cesium['Rectangle'][_0x585009(_0x3d8d39._0x37b99d)](_0x246126['xmin'],_0x246126['ymin'],_0x246126['xmax'],_0x246126['ymax']);let _0x58e22c=_0x379193[0x0][_0x585009(_0x3d8d39._0x45d6a0)]??0x1,_0x49156b=_0x379193[0x0][_0x585009(_0x3d8d39._0x126aa8)]??0x0;const _0x2284ac=[];_0x379193['forEach'](_0x74f3c2=>{const _0x10a9f9=_0x585009,_0x5ad67c=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x74f3c2['lng'],_0x74f3c2[_0x10a9f9(0x155)]]),_0x13ae9f=_0x74f3c2['value']||0x1,_0x4d6e6=Math[_0x10a9f9(0x15a)]((_0x5ad67c[0x0]-_0x1e057a['xmin'])/_0x5896b0),_0x108ccc=Math['round']((_0x1e057a['ymax']-_0x5ad67c[0x1])/_0x5896b0);_0x58e22c=Math['max'](_0x58e22c,_0x13ae9f),_0x49156b=Math['min'](_0x49156b,_0x13ae9f),_0x2284ac['push']({'x':_0x4d6e6,'y':_0x108ccc,'value':_0x13ae9f});});const _0x262c19={'min':this['options']['min']??_0x49156b,'max':this[_0x585009(0x114)]['max']??_0x58e22c,'data':_0x2284ac};this['_last_heatData']=_0x262c19;if(!this['_last_mBounds']||_0x1e057a['xmin']!==this[_0x585009(0x140)][_0x585009(_0x3d8d39._0x28205b)]||_0x1e057a[_0x585009(_0x3d8d39._0x3bd0d0)]!==this[_0x585009(0x140)]['ymin']||_0x1e057a['xmax']!==this[_0x585009(_0x3d8d39._0x3d80a8)][_0x585009(_0x3d8d39._0x14a2ec)]||_0x1e057a['ymax']!==this[_0x585009(0x140)]['ymax']){this[_0x585009(_0x3d8d39._0x4f9788)]=_0x1e057a,this[_0x585009(_0x3d8d39._0x1d6a43)]['style']['cssText']='width:'+_0x1fb668+'px;height:'+_0x467b27+'px;';const _0x3df988={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x3df988):this['_heat']['configure'](_0x3df988);}this['_heat']['setData'](_0x262c19);const _0x14df03=mars3d__namespace['DomUtil']['copyCanvas'](this[_0x585009(_0x3d8d39._0x4b9490)][_0x585009(0x146)]['canvas']);return _0x14df03;}['_getArcHeatCanvas'](){const _0x2d86cb={_0x177ee0:0x144,_0x482a78:0x14b,_0x24de5b:0x114},_0xaa76ca=_0x4c3c37;this['_heat'][_0xaa76ca(_0x2d86cb._0x177ee0)]({'radius':this[_0xaa76ca(0x118)]['radius']*this['style']['arcRadiusScale'],'blur':this[_0xaa76ca(0x118)]['blur']*this['style']['arcBlurScale'],'gradient':this[_0xaa76ca(0x118)]['gradientArc']||{0.25:'rgb(0,0,0)',0.55:_0xaa76ca(_0x2d86cb._0x482a78),0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x3606cc=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this[_0xaa76ca(0x12f)][_0xaa76ca(0x144)](this[_0xaa76ca(_0x2d86cb._0x24de5b)]['heatStyle']),_0x3606cc;}['getPointData'](_0x194cff){const _0x586a8e={_0x5edced:0x13c,_0x224da6:0x155,_0x380fb7:0x15c},_0x4a7b1c=_0x4c3c37,_0x25a3b2=mars3d__namespace['LngLatPoint'][_0x4a7b1c(0x16c)](_0x194cff);if(!_0x25a3b2)return{};const _0x41f7fc=mars3d__namespace[_0x4a7b1c(_0x586a8e._0x5edced)]['lonlat2mercator']([_0x25a3b2['lng'],_0x25a3b2[_0x4a7b1c(_0x586a8e._0x224da6)]]),_0x1f79d9=this['_last_mBounds'],_0x1ef769=Math['round']((_0x41f7fc[0x0]-_0x1f79d9['xmin'])/this['_scale']),_0x4929c4=Math['round']((_0x1f79d9[_0x4a7b1c(0x129)]-_0x41f7fc[0x1])/this['_scale']),_0x27f301=this['_heat']['getValueAt']({'x':_0x1ef769,'y':_0x4929c4}),_0x2a218b=this['_heat']['_renderer']['ctx'][_0x4a7b1c(_0x586a8e._0x380fb7)](_0x1ef769-0x1,_0x4929c4-0x1,0x1,0x1)['data'];return{'x':_0x1ef769,'y':_0x4929c4,'value':_0x27f301,'color':_0x4a7b1c(0x134)+_0x2a218b[0x0]+','+_0x2a218b[0x1]+','+_0x2a218b[0x2]+','+_0x2a218b[0x3]+')'};}}mars3d__namespace['LayerUtil']['register'](_0x4c3c37(0x15e),HeatLayer),mars3d__namespace[_0x4c3c37(0x147)][_0x4c3c37(0x152)]=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x35d7c7){const _0x57d717={_0x1dcdd8:0x143,_0x2963f9:0x16b,_0x2c9264:0x143,_0x44d8ba:0x129},_0x5d9201=_0x4c3c37,_0x379d5e=mars3d__namespace['PointTrans'][_0x5d9201(_0x57d717._0x1dcdd8)]([_0x35d7c7[_0x5d9201(_0x57d717._0x2963f9)],_0x35d7c7['ymin']]),_0x496bcc=mars3d__namespace['PointTrans'][_0x5d9201(_0x57d717._0x2c9264)]([_0x35d7c7['xmax'],_0x35d7c7[_0x5d9201(_0x57d717._0x44d8ba)]]);return{'xmin':_0x379d5e[0x0],'ymin':_0x379d5e[0x1],'xmax':_0x496bcc[0x0],'ymax':_0x496bcc[0x1]};}function _0x803e(_0x1b560e,_0x10dbfe){const _0x260c7e=_0x260c();return _0x803e=function(_0x803e49,_0x4c8e17){_0x803e49=_0x803e49-0x111;let _0x42de72=_0x260c7e[_0x803e49];return _0x42de72;},_0x803e(_0x1b560e,_0x10dbfe);}function geLatLngBounds(_0x4ad6f9){const _0x4a66f7={_0x363cbb:0x13e},_0x3bd34e=_0x4c3c37,_0x25bfe6=mars3d__namespace['PointTrans'][_0x3bd34e(_0x4a66f7._0x363cbb)]([_0x4ad6f9['xmin'],_0x4ad6f9['ymin']]),_0x19c583=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x4ad6f9['xmax'],_0x4ad6f9[_0x3bd34e(0x129)]]);return{'xmin':_0x25bfe6[0x0],'ymin':_0x25bfe6[0x1],'xmax':_0x19c583[0x0],'ymax':_0x19c583[0x1]};}function getVertexShaderSource(_0x5e4eb8){const _0x14f6c1=_0x4c3c37;return'in\x20vec3\x20position3DHigh;\x0a\x20\x20in\x20vec3\x20position3DLow;\x0a\x20\x20in\x20vec2\x20st;\x0a\x20\x20in\x20float\x20batchId;\x0a\x20\x20uniform\x20sampler2D\x20bumpMap_3;\x0a\x20\x20out\x20vec3\x20v_positionMC;\x0a\x20\x20out\x20vec3\x20v_positionEC;\x0a\x20\x20out\x20vec2\x20v_st;\x0a\x0a\x20\x20void\x20main()\x0a\x20\x20{\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20czm_computePosition();\x0a\x20\x20\x20\x20v_positionMC\x20=\x20position3DHigh\x20+\x20position3DLow;\x0a\x20\x20\x20\x20v_positionEC\x20=\x20(czm_modelViewRelativeToEye\x20*\x20p).xyz;\x0a\x20\x20\x20\x20v_st\x20=\x20st;\x0a\x20\x20\x20\x20vec4\x20color\x20=\x20texture(bumpMap_3,\x20v_st);\x0a\x20\x20\x20\x20float\x20centerBump\x20=\x20distance(vec3(0.0),color.rgb);\x0a\x20\x20\x20\x20vec3\x20upDir\x20=\x20normalize(v_positionMC.xyz);\x0a\x20\x20\x20\x20vec3\x20disPos\x20=\x20upDir\x20*\x20centerBump\x20*\x20'+_0x5e4eb8+_0x14f6c1(0x123);}exports['HeatLayer']=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-heatmap",
3
- "version": "3.5.14",
3
+ "version": "3.5.16",
4
4
  "description": "Mars3D平台插件,结合heatmap可视化功能插件",
5
5
  "main": "dist/mars3d-heatmap.js",
6
6
  "files": [
@@ -10,7 +10,7 @@
10
10
  "@mars3d/heatmap.js": "^2.0.6"
11
11
  },
12
12
  "devDependencies": {
13
- "mars3d": "~3.5.14"
13
+ "mars3d": "~3.5.16"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"