mars3d-wind 3.5.7 → 3.5.9

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平台插件,支持气象 风向图 功能插件 mars3d-wind
3
3
  *
4
- * 版本信息:v3.5.7
5
- * 编译日期:2023-05-16 21:07:09
4
+ * 版本信息:v3.5.9
5
+ * 编译日期:2023-05-29 18:00:38
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'], factory) :
12
12
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-wind"] = {}, global.mars3d));
13
13
  })(this, (function (exports, mars3d) {
14
- 'use strict';const _0x897c11=_0xea55;(function(_0x5f0bdb,_0x4c1c2f){const _0xda5477=_0xea55,_0x43557a=_0x5f0bdb();while(!![]){try{const _0x14deb8=parseInt(_0xda5477(0x116))/0x1*(parseInt(_0xda5477(0xfb))/0x2)+-parseInt(_0xda5477(0x150))/0x3*(parseInt(_0xda5477(0x1aa))/0x4)+-parseInt(_0xda5477(0xea))/0x5*(parseInt(_0xda5477(0x128))/0x6)+parseInt(_0xda5477(0x16e))/0x7*(parseInt(_0xda5477(0x168))/0x8)+parseInt(_0xda5477(0x199))/0x9+-parseInt(_0xda5477(0x1a9))/0xa*(-parseInt(_0xda5477(0x12e))/0xb)+parseInt(_0xda5477(0xd6))/0xc*(-parseInt(_0xda5477(0xcb))/0xd);if(_0x14deb8===_0x4c1c2f)break;else _0x43557a['push'](_0x43557a['shift']());}catch(_0x3def60){_0x43557a['push'](_0x43557a['shift']());}}}(_0x293b,0x63e0a));function _interopNamespace(_0x4ef44b){const _0x3a9702=_0xea55;if(_0x4ef44b&&_0x4ef44b[_0x3a9702(0x1a1)])return _0x4ef44b;var _0x2e63b8=Object['create'](null);return _0x4ef44b&&Object['keys'](_0x4ef44b)['forEach'](function(_0x1f3e14){if(_0x1f3e14!=='default'){var _0x179385=Object['getOwnPropertyDescriptor'](_0x4ef44b,_0x1f3e14);Object['defineProperty'](_0x2e63b8,_0x1f3e14,_0x179385['get']?_0x179385:{'enumerable':!![],'get':function(){return _0x4ef44b[_0x1f3e14];}});}}),_0x2e63b8[_0x3a9702(0x189)]=_0x4ef44b,_0x2e63b8;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x3bdada,_0x1e475a){const _0x65f623=_0xea55,_0x2c3861=_0x3bdada*Math['cos'](Cesium$7[_0x65f623(0x15d)]['toRadians'](_0x1e475a));return _0x2c3861;}function getV(_0x42305a,_0x4e00b8){const _0x19f9a6=_0xea55,_0x510c67=_0x42305a*Math['sin'](Cesium$7['Math'][_0x19f9a6(0x183)](_0x4e00b8));return _0x510c67;}function getSpeed(_0x25c131,_0x5ce6ac){const _0x452919=_0xea55,_0x1c62cc=Math['sqrt'](Math[_0x452919(0x17a)](_0x25c131,0x2)+Math['pow'](_0x5ce6ac,0x2));return _0x1c62cc;}function getDirection(_0x222ad4,_0x2a9fd9){const _0x187a82=_0xea55;let _0x2dc5b9=Cesium$7['Math']['toDegrees'](Math[_0x187a82(0x12c)](_0x2a9fd9,_0x222ad4));return _0x2dc5b9+=_0x2dc5b9<0x0?0x168:0x0,_0x2dc5b9;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x5591f4){const _0x1b82cb=_0xea55;this['commandType']=_0x5591f4['commandType'],this[_0x1b82cb(0x159)]=_0x5591f4['geometry'],this['attributeLocations']=_0x5591f4['attributeLocations'],this[_0x1b82cb(0x155)]=_0x5591f4['primitiveType'],this['uniformMap']=_0x5591f4['uniformMap'],this[_0x1b82cb(0xfc)]=_0x5591f4['vertexShaderSource'],this[_0x1b82cb(0x185)]=_0x5591f4['fragmentShaderSource'],this['rawRenderState']=_0x5591f4['rawRenderState'],this['framebuffer']=_0x5591f4['framebuffer'],this['outputTexture']=_0x5591f4[_0x1b82cb(0x1ac)],this['autoClear']=_0x5591f4[_0x1b82cb(0x114)]??![],this[_0x1b82cb(0xc0)]=_0x5591f4[_0x1b82cb(0xc0)],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6[(_0x1b82cb(0x14f))]({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x228bdb){const _0x47c71f=_0xea55;switch(this['commandType']){case _0x47c71f(0xe3):{const _0xc75dc3=Cesium$6['VertexArray'][_0x47c71f(0x158)]({'context':_0x228bdb,'geometry':this['geometry'],'attributeLocations':this[_0x47c71f(0x193)],'bufferUsage':Cesium$6['BufferUsage'][_0x47c71f(0xf7)]}),_0x301027=Cesium$6[_0x47c71f(0xc4)]['fromCache']({'context':_0x228bdb,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x177f0a=Cesium$6['RenderState']['fromCache'](this[_0x47c71f(0xd9)]);return new Cesium$6[(_0x47c71f(0x197))]({'primitiveType':this[_0x47c71f(0x155)],'shaderProgram':_0x301027,'vertexArray':_0xc75dc3,'modelMatrix':Cesium$6['Matrix4'][_0x47c71f(0xdf)],'renderState':_0x177f0a,'uniformMap':this[_0x47c71f(0xc5)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x47c71f(0x180):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this[_0x47c71f(0x185)],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}[_0x897c11(0x11c)](_0x258eaf,_0x4933cf){const _0x10407b=_0x897c11;this[_0x10407b(0x159)]=_0x4933cf;const _0x45184d=Cesium$6[_0x10407b(0x133)]['fromGeometry']({'context':_0x258eaf,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x45184d;}['update'](_0x49262f){const _0x31efa0=_0x897c11;if(!this['show'])return;if(_0x49262f[_0x31efa0(0xed)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6[_0x31efa0(0x175)](this[_0x31efa0(0x174)])&&(this['commandToExecute']=this[_0x31efa0(0x184)](_0x49262f['context'])),Cesium$6['defined'](this[_0x31efa0(0xc0)])&&this['preExecute'](),Cesium$6[_0x31efa0(0x175)](this['clearCommand'])&&_0x49262f['commandList'][_0x31efa0(0xd8)](this['clearCommand']),_0x49262f['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}[_0x897c11(0x165)](){const _0x474b3d=_0x897c11;if(this['clearCommand']){var _0x36721d,_0x1a60fe;(_0x36721d=this['clearCommand'])!==null&&_0x36721d!==void 0x0&&_0x36721d[_0x474b3d(0xc8)]&&this['clearCommand']['vertexArray']['destroy'](),(_0x1a60fe=this[_0x474b3d(0x164)])!==null&&_0x1a60fe!==void 0x0&&_0x1a60fe['shaderProgram']&&this[_0x474b3d(0x164)][_0x474b3d(0x14b)][_0x474b3d(0x165)](),delete this[_0x474b3d(0x164)];}return this[_0x474b3d(0x174)]&&(this['commandToExecute'][_0x474b3d(0xc8)]&&this['commandToExecute']['vertexArray'][_0x474b3d(0x165)](),this[_0x474b3d(0x174)]['shaderProgram']&&this[_0x474b3d(0x174)][_0x474b3d(0x14b)]['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0xb63a66=function(){const _0x3607e7=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x3607e7;},_0x35755b=function(_0x5a4197,_0x147dfd){if(Cesium$5['defined'](_0x147dfd)){const _0x1041dc={};_0x1041dc['arrayBufferView']=_0x147dfd,_0x5a4197['source']=_0x1041dc;}const _0x56ef5f=new Cesium$5['Texture'](_0x5a4197);return _0x56ef5f;},_0x11e10c=function(_0x4a0aa9,_0x2aaef3,_0x55f875){const _0x5729d0=_0xea55,_0x1b7f7d=new Cesium$5[(_0x5729d0(0x1a8))]({'context':_0x4a0aa9,'colorTextures':[_0x2aaef3],'depthTexture':_0x55f875});return _0x1b7f7d;},_0x48c368=function(_0x54cecc){const _0x891d4b=_0xea55,_0x3c1ca8=!![],_0x477027=![],_0x4e11e0={'viewport':_0x54cecc[_0x891d4b(0x181)],'depthTest':_0x54cecc['depthTest'],'depthMask':_0x54cecc['depthMask'],'blending':_0x54cecc['blending']},_0x154000=Cesium$5['Appearance']['getDefaultRenderState'](_0x3c1ca8,_0x477027,_0x4e11e0);return _0x154000;},_0x377778=function(_0x33babb){const _0x2650d5=_0xea55,_0x3c2168={},_0x40f447=Cesium$5[_0x2650d5(0x15d)]['mod'](_0x33babb[_0x2650d5(0x18c)],Cesium$5['Math']['TWO_PI']),_0x1d3538=Cesium$5[_0x2650d5(0x15d)][_0x2650d5(0xf0)](_0x33babb['east'],Cesium$5['Math']['TWO_PI']),_0x155c41=_0x33babb['width'];let _0x5aee51,_0x3b21ca;_0x155c41>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x5aee51=0x0,_0x3b21ca=Cesium$5['Math']['TWO_PI']):_0x1d3538-_0x40f447<_0x155c41?(_0x5aee51=_0x40f447,_0x3b21ca=_0x40f447+_0x155c41):(_0x5aee51=_0x40f447,_0x3b21ca=_0x1d3538);_0x3c2168[_0x2650d5(0xe1)]={'min':Cesium$5['Math']['toDegrees'](_0x5aee51),'max':Cesium$5['Math']['toDegrees'](_0x3b21ca)};const _0x1d5e6d=_0x33babb[_0x2650d5(0xf1)],_0x539a5a=_0x33babb['north'],_0x1af72d=_0x33babb['height'],_0x32290c=_0x1af72d>Cesium$5[_0x2650d5(0x15d)]['PI']/0xc?_0x1af72d/0x2:0x0;let _0x3ca38b=Cesium$5['Math'][_0x2650d5(0x15f)](_0x1d5e6d-_0x32290c),_0x31f6b1=Cesium$5['Math'][_0x2650d5(0x15f)](_0x539a5a+_0x32290c);return _0x3ca38b<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x3ca38b=-Cesium$5['Math']['PI_OVER_TWO']),_0x31f6b1>Cesium$5['Math'][_0x2650d5(0x107)]&&(_0x31f6b1=Cesium$5['Math']['PI_OVER_TWO']),_0x3c2168['lat']={'min':Cesium$5['Math']['toDegrees'](_0x3ca38b),'max':Cesium$5[_0x2650d5(0x15d)]['toDegrees'](_0x31f6b1)},_0x3c2168;};return{'getFullscreenQuad':_0xb63a66,'createTexture':_0x35755b,'createFramebuffer':_0x11e10c,'createRawRenderState':_0x48c368,'viewRectangleToLonLatRange':_0x377778};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag=_0x897c11(0x156),screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x5224b8,_0x336d80,_0x31532a,_0x3fa9c0,_0x264756){this['createRenderingTextures'](_0x5224b8,_0x336d80,_0x31532a['colors']),this['createRenderingFramebuffers'](_0x5224b8),this['createRenderingPrimitives'](_0x5224b8,_0x31532a,_0x3fa9c0,_0x264756);}[_0x897c11(0x101)](_0xbae50a,_0x4ad751,_0x3213ed){const _0x4279f8=_0x897c11,_0xc49a84={'context':_0xbae50a,'width':_0xbae50a[_0x4279f8(0xe7)],'height':_0xbae50a['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x4279f8(0xdc)][_0x4279f8(0xf5)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x47acaa={'context':_0xbae50a,'width':_0xbae50a['drawingBufferWidth'],'height':_0xbae50a['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x144e22=_0x3213ed[_0x4279f8(0x13f)],_0x183f20=new Float32Array(_0x144e22*0x3);for(let _0x43dedd=0x0;_0x43dedd<_0x144e22;_0x43dedd++){const _0x3707b4=Cesium$4['Color']['fromCssColorString'](_0x3213ed[_0x43dedd]);_0x183f20[0x3*_0x43dedd]=_0x3707b4['red'],_0x183f20[0x3*_0x43dedd+0x1]=_0x3707b4['green'],_0x183f20[0x3*_0x43dedd+0x2]=_0x3707b4['blue'];}const _0x9041f={'context':_0xbae50a,'width':_0x144e22,'height':0x1,'pixelFormat':Cesium$4['PixelFormat'][_0x4279f8(0x16a)],'pixelDatatype':Cesium$4['PixelDatatype'][_0x4279f8(0x187)],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0x4279f8(0x18e)]['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this[_0x4279f8(0xe2)]={'segmentsColor':Util[_0x4279f8(0xd1)](_0xc49a84),'segmentsDepth':Util['createTexture'](_0x47acaa),'currentTrailsColor':Util['createTexture'](_0xc49a84),'currentTrailsDepth':Util['createTexture'](_0x47acaa),'nextTrailsColor':Util['createTexture'](_0xc49a84),'nextTrailsDepth':Util['createTexture'](_0x47acaa),'colorTable':Util['createTexture'](_0x9041f,_0x183f20)};}[_0x897c11(0x19e)](_0x2e404e){const _0x229233=_0x897c11;this['framebuffers']={'segments':Util['createFramebuffer'](_0x2e404e,this[_0x229233(0xe2)]['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util[_0x229233(0x102)](_0x2e404e,this[_0x229233(0xe2)][_0x229233(0x14e)],this['textures'][_0x229233(0x10e)]),'nextTrails':Util[_0x229233(0x102)](_0x2e404e,this[_0x229233(0xe2)]['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x425ef9){const _0x23231b=_0x897c11,_0x5bc9f3=0x4;let _0x16e48c=[];for(let _0xa1e55e=0x0;_0xa1e55e<_0x425ef9[_0x23231b(0x14c)];_0xa1e55e++){for(let _0xc9a9c7=0x0;_0xc9a9c7<_0x425ef9['particlesTextureSize'];_0xc9a9c7++){for(let _0x5846d0=0x0;_0x5846d0<_0x5bc9f3;_0x5846d0++){_0x16e48c['push'](_0xa1e55e/_0x425ef9['particlesTextureSize']),_0x16e48c['push'](_0xc9a9c7/_0x425ef9['particlesTextureSize']);}}}_0x16e48c=new Float32Array(_0x16e48c);let _0x490295=[];const _0x20d578=[-0x1,0x1],_0x41f2ee=[-0x1,0x1];for(let _0x48b751=0x0;_0x48b751<_0x425ef9['maxParticles'];_0x48b751++){for(let _0x4e4a4a=0x0;_0x4e4a4a<_0x5bc9f3/0x2;_0x4e4a4a++){for(let _0x29d57b=0x0;_0x29d57b<_0x5bc9f3/0x2;_0x29d57b++){_0x490295[_0x23231b(0xd8)](_0x20d578[_0x4e4a4a]),_0x490295['push'](_0x41f2ee[_0x29d57b]),_0x490295['push'](0x0);}}}_0x490295=new Float32Array(_0x490295);const _0x4f85d1=0x6*_0x425ef9['maxParticles'],_0x39145e=new Uint32Array(_0x4f85d1);for(let _0x3dd7b5=0x0,_0x4a05fb=0x0,_0x1921ad=0x0;_0x3dd7b5<_0x425ef9[_0x23231b(0x144)];_0x3dd7b5++){_0x39145e[_0x4a05fb++]=_0x1921ad+0x0,_0x39145e[_0x4a05fb++]=_0x1921ad+0x1,_0x39145e[_0x4a05fb++]=_0x1921ad+0x2,_0x39145e[_0x4a05fb++]=_0x1921ad+0x2,_0x39145e[_0x4a05fb++]=_0x1921ad+0x1,_0x39145e[_0x4a05fb++]=_0x1921ad+0x3,_0x1921ad+=0x4;}const _0x1fd536=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x23231b(0x15e)][_0x23231b(0x187)],'componentsPerAttribute':0x2,'values':_0x16e48c}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x490295})}),'indices':_0x39145e});return _0x1fd536;}['createRenderingPrimitives'](_0x26d133,_0xa14898,_0x4508b8,_0x59d5b6){const _0x471ddd=_0x897c11,_0x46443f=this;this[_0x471ddd(0x15a)]={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0xa14898),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x59d5b6['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x28f9ae=_0x471ddd;return _0x59d5b6['particlesTextures'][_0x28f9ae(0x121)];},'postProcessingSpeed':function(){const _0x4bc718=_0x471ddd;return _0x59d5b6[_0x4bc718(0x11b)]['postProcessingSpeed'];},'colorTable':function(){return _0x46443f['textures']['colorTable'];},'aspect':function(){const _0x28ec72=_0x471ddd;return _0x26d133[_0x28ec72(0xe7)]/_0x26d133[_0x28ec72(0xff)];},'pixelSize':function(){return _0x4508b8['pixelSize'];},'lineWidth':function(){const _0x2c0d8b=_0x471ddd;return _0xa14898[_0x2c0d8b(0x131)];},'particleHeight':function(){return _0xa14898['particleHeight'];}},'vertexShaderSource':new Cesium$4[(_0x471ddd(0x118))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':_0x471ddd(0xe3),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x471ddd(0x103)](),'primitiveType':Cesium$4[_0x471ddd(0xef)]['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0x411923=_0x471ddd;return _0x46443f['textures'][_0x411923(0x124)];},'segmentsDepthTexture':function(){const _0xc6b7dc=_0x471ddd;return _0x46443f[_0xc6b7dc(0xe2)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x10f086=_0x471ddd;return _0x46443f['framebuffers'][_0x10f086(0x152)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x4e4ec1=_0x471ddd;return _0x46443f['framebuffers'][_0x4e4ec1(0x152)]['depthTexture'];},'fadeOpacity':function(){return _0xa14898['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x471ddd(0x115)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x44cb8f=_0x471ddd,_0x39463f=_0x46443f[_0x44cb8f(0xfe)]['currentTrails'];_0x46443f[_0x44cb8f(0xfe)]['currentTrails']=_0x46443f[_0x44cb8f(0xfe)]['nextTrails'],_0x46443f[_0x44cb8f(0xfe)]['nextTrails']=_0x39463f,_0x46443f['primitives']['trails']['commandToExecute'][_0x44cb8f(0x16d)]=_0x46443f['framebuffers']['nextTrails'],_0x46443f[_0x44cb8f(0x15a)][_0x44cb8f(0xe6)]['clearCommand']['framebuffer']=_0x46443f[_0x44cb8f(0xfe)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x471ddd(0x103)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x1547c1=_0x471ddd;return _0x46443f[_0x1547c1(0xfe)][_0x1547c1(0x149)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x46443f['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x471ddd(0x146)],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag=_0x897c11(0xc7),updatePosition_frag=_0x897c11(0x182),postProcessingPosition_frag=_0x897c11(0x172),postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$3=mars3d__namespace[_0x897c11(0x122)];class ParticlesComputing{constructor(_0x9e2ffb,_0x76d6d4,_0x3d6f16,_0x3a23a7){const _0x597c1b=_0x897c11;this['data']=_0x76d6d4,this['createWindTextures'](_0x9e2ffb,_0x76d6d4),this[_0x597c1b(0x15c)](_0x9e2ffb,_0x3d6f16,_0x3a23a7),this['createComputingPrimitives'](_0x76d6d4,_0x3d6f16,_0x3a23a7);}['createWindTextures'](_0xf3ebcd,_0x597f3a){const _0x1a81ae=_0x897c11,_0x511d73={'context':_0xf3ebcd,'width':_0x597f3a['dimensions']['lon'],'height':_0x597f3a['dimensions']['lat']*(_0x597f3a['dimensions'][_0x1a81ae(0x11e)]||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0x1a81ae(0x19f)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x1a81ae(0x1a2))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x511d73,_0x597f3a['U']['array']),'V':Util['createTexture'](_0x511d73,_0x597f3a['V']['array'])};}['createParticlesTextures'](_0x24192e,_0x2eb8fd,_0x2bf7e0){const _0x4b6204=_0x897c11,_0x834802={'context':_0x24192e,'width':_0x2eb8fd['particlesTextureSize'],'height':_0x2eb8fd['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat'][_0x4b6204(0xf5)],'pixelDatatype':Cesium$3[_0x4b6204(0x19f)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x4b6204(0x1a2))]({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x4b6204(0x129)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x3b73ed=this['randomizeParticles'](_0x2eb8fd[_0x4b6204(0x144)],_0x2bf7e0),_0x48f6f2=new Float32Array(0x4*_0x2eb8fd['maxParticles'])[_0x4b6204(0x19d)](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x834802),'currentParticlesPosition':Util[_0x4b6204(0xd1)](_0x834802,_0x3b73ed),'nextParticlesPosition':Util['createTexture'](_0x834802,_0x3b73ed),'currentParticlesSpeed':Util[_0x4b6204(0xd1)](_0x834802,_0x48f6f2),'nextParticlesSpeed':Util['createTexture'](_0x834802,_0x48f6f2),'postProcessingPosition':Util['createTexture'](_0x834802,_0x3b73ed),'postProcessingSpeed':Util['createTexture'](_0x834802,_0x48f6f2)};}[_0x897c11(0x11f)](_0x1192b2,_0x5a17c5){const _0x5e8e44=_0x897c11,_0x1451e3=new Float32Array(0x4*_0x1192b2);for(let _0x517918=0x0;_0x517918<_0x1192b2;_0x517918++){_0x1451e3[0x4*_0x517918]=Cesium$3['Math'][_0x5e8e44(0x17e)](_0x5a17c5[_0x5e8e44(0xbd)]['x'],_0x5a17c5['lonRange']['y']),_0x1451e3[0x4*_0x517918+0x1]=Cesium$3[_0x5e8e44(0x15d)]['randomBetween'](_0x5a17c5['latRange']['x'],_0x5a17c5['latRange']['y']),_0x1451e3[0x4*_0x517918+0x2]=Cesium$3[_0x5e8e44(0x15d)]['randomBetween'](this['data'][_0x5e8e44(0x11e)]['min'],this[_0x5e8e44(0x142)]['lev']['max']),_0x1451e3[0x4*_0x517918+0x3]=0x0;}return _0x1451e3;}['destroyParticlesTextures'](){const _0xbe4b9a=_0x897c11;Object['keys'](this[_0xbe4b9a(0x11b)])[_0xbe4b9a(0xd2)](_0x993282=>{const _0x1c0e01=_0xbe4b9a;this['particlesTextures'][_0x993282][_0x1c0e01(0x165)]();});}['createComputingPrimitives'](_0x4c1366,_0x2599bc,_0x46f3aa){const _0x5b35ef=_0x897c11,_0x351962=new Cesium$3['Cartesian3'](_0x4c1366['dimensions']['lon'],_0x4c1366[_0x5b35ef(0x12a)][_0x5b35ef(0x127)],_0x4c1366['dimensions']['lev']),_0x26da2e=new Cesium$3[(_0x5b35ef(0x11a))](_0x4c1366['lon'][_0x5b35ef(0x18d)],_0x4c1366['lat']['min'],_0x4c1366['lev'][_0x5b35ef(0x18d)]),_0x21753e=new Cesium$3['Cartesian3'](_0x4c1366['lon']['max'],_0x4c1366['lat']['max'],_0x4c1366['lev']['max']),_0x29d9b6=new Cesium$3['Cartesian3']((_0x21753e['x']-_0x26da2e['x'])/(_0x351962['x']-0x1),(_0x21753e['y']-_0x26da2e['y'])/(_0x351962['y']-0x1),_0x351962['z']>0x1?(_0x21753e['z']-_0x26da2e['z'])/(_0x351962['z']-0x1):0x1),_0x416255=new Cesium$3['Cartesian2'](_0x4c1366['U']['min'],_0x4c1366['U']['max']),_0xc30d32=new Cesium$3['Cartesian2'](_0x4c1366['V'][_0x5b35ef(0x18d)],_0x4c1366['V']['max']),_0x378563=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){const _0x1f26f9=_0x5b35ef;return _0x378563[_0x1f26f9(0x104)]['U'];},'V':function(){return _0x378563['windTextures']['V'];},'currentParticlesPosition':function(){const _0x407f66=_0x5b35ef;return _0x378563['particlesTextures'][_0x407f66(0xca)];},'dimension':function(){return _0x351962;},'minimum':function(){return _0x26da2e;},'maximum':function(){return _0x21753e;},'interval':function(){return _0x29d9b6;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x5e3bd6=_0x5b35ef;_0x378563[_0x5e3bd6(0x15a)]['getWind']['commandToExecute']['outputTexture']=_0x378563['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0xf57877=_0x5b35ef;return _0x378563['particlesTextures'][_0xf57877(0x188)];},'particlesWind':function(){const _0x52d535=_0x5b35ef;return _0x378563[_0x52d535(0x11b)]['particlesWind'];},'uSpeedRange':function(){return _0x416255;},'vSpeedRange':function(){return _0xc30d32;},'pixelSize':function(){const _0x2f67c4=_0x5b35ef;return _0x46f3aa[_0x2f67c4(0x19a)];},'speedFactor':function(){const _0x286340=_0x5b35ef;return _0x2599bc[_0x286340(0x1b1)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x6e293c=_0x5b35ef,_0x314328=_0x378563['particlesTextures'][_0x6e293c(0x188)];_0x378563[_0x6e293c(0x11b)]['currentParticlesSpeed']=_0x378563['particlesTextures']['postProcessingSpeed'],_0x378563['particlesTextures'][_0x6e293c(0x169)]=_0x314328,_0x378563['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x378563['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x5c778d=_0x5b35ef;return _0x378563[_0x5c778d(0x11b)][_0x5c778d(0xca)];},'currentParticlesSpeed':function(){return _0x378563['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x5b35ef(0x118))]({'sources':[updatePosition_frag]}),'outputTexture':this[_0x5b35ef(0x11b)][_0x5b35ef(0x196)],'preExecute':function(){const _0x25c928=_0x5b35ef,_0x3afe3e=_0x378563['particlesTextures']['currentParticlesPosition'];_0x378563['particlesTextures'][_0x25c928(0xca)]=_0x378563['particlesTextures']['postProcessingPosition'],_0x378563['particlesTextures'][_0x25c928(0x121)]=_0x3afe3e,_0x378563['primitives'][_0x25c928(0x167)][_0x25c928(0x174)]['outputTexture']=_0x378563[_0x25c928(0x11b)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){const _0x265dc1=_0x5b35ef;return _0x378563[_0x265dc1(0x11b)]['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x378563['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x46f3aa['lonRange'];},'latRange':function(){return _0x46f3aa['latRange'];},'randomCoefficient':function(){const _0x39fb5c=Math['random']();return _0x39fb5c;},'dropRate':function(){return _0x2599bc['dropRate'];},'dropRateBump':function(){return _0x2599bc['dropRateBump'];}},'fragmentShaderSource':new Cesium$3[(_0x5b35ef(0x118))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x5b35ef(0x11b)]['postProcessingPosition'],'preExecute':function(){const _0x514681=_0x5b35ef;_0x378563[_0x514681(0x15a)]['postProcessingPosition'][_0x514681(0x174)]['outputTexture']=_0x378563[_0x514681(0x11b)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x378563['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x378563['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x5b35ef(0x169)],'preExecute':function(){const _0x6332c=_0x5b35ef;_0x378563['primitives']['postProcessingSpeed']['commandToExecute'][_0x6332c(0x1ac)]=_0x378563['particlesTextures'][_0x6332c(0x169)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x3012b5,_0x562bc6,_0x921c79,_0xb375df){const _0x24f4d6=_0x897c11;this[_0x24f4d6(0xde)]=_0x3012b5,_0x562bc6={..._0x562bc6},_0x562bc6[_0x24f4d6(0x1a4)]&&_0x562bc6['vdata']&&(_0x562bc6['dimensions']={},_0x562bc6['dimensions']['lon']=_0x562bc6['cols'],_0x562bc6[_0x24f4d6(0x12a)]['lat']=_0x562bc6['rows'],_0x562bc6['dimensions']['lev']=_0x562bc6[_0x24f4d6(0x11e)]||0x1,_0x562bc6['lon']={},_0x562bc6['lon']['min']=_0x562bc6[_0x24f4d6(0xf3)],_0x562bc6['lon'][_0x24f4d6(0x18b)]=_0x562bc6['xmax'],_0x562bc6['lat']={},_0x562bc6['lat'][_0x24f4d6(0x18d)]=_0x562bc6['ymin'],_0x562bc6['lat']['max']=_0x562bc6['ymax'],_0x562bc6['lev']={},_0x562bc6['lev']['min']=_0x562bc6['levmin']??0x1,_0x562bc6['lev'][_0x24f4d6(0x18b)]=_0x562bc6['levmax']??0x1,_0x562bc6['U']={},_0x562bc6['U']['array']=new Float32Array(_0x562bc6['udata']),_0x562bc6['U']['min']=_0x562bc6['umin']??Math['min'](..._0x562bc6['udata']),_0x562bc6['U'][_0x24f4d6(0x18b)]=_0x562bc6['umax']??Math['max'](..._0x562bc6['udata']),_0x562bc6['V']={},_0x562bc6['V'][_0x24f4d6(0x132)]=new Float32Array(_0x562bc6['vdata']),_0x562bc6['V']['min']=_0x562bc6['vmin']??Math[_0x24f4d6(0x18d)](..._0x562bc6['vdata']),_0x562bc6['V'][_0x24f4d6(0x18b)]=_0x562bc6[_0x24f4d6(0x1ad)]??Math['max'](..._0x562bc6['vdata'])),this[_0x24f4d6(0x142)]=_0x562bc6,this['options']=_0x921c79,this['viewerParameters']=_0xb375df,this['particlesComputing']=new ParticlesComputing(this[_0x24f4d6(0xde)],this[_0x24f4d6(0x142)],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0x24f4d6(0xde)],this['data'],this[_0x24f4d6(0x162)],this[_0x24f4d6(0x138)],this['particlesComputing']);}[_0x897c11(0xe4)](_0x411d57){const _0xeb2903=_0x897c11;this['particlesComputing']['destroyParticlesTextures'](),Object[_0xeb2903(0xe9)](this['particlesComputing'][_0xeb2903(0x104)])[_0xeb2903(0xd2)](_0x33d81d=>{this['particlesComputing']['windTextures'][_0x33d81d]['destroy']();}),this['particlesRendering']['textures']['colorTable'][_0xeb2903(0x165)](),Object['keys'](this['particlesRendering'][_0xeb2903(0xfe)])['forEach'](_0xc79bcf=>{this['particlesRendering']['framebuffers'][_0xc79bcf]['destroy']();}),this['context']=_0x411d57,this['particlesComputing']=new ParticlesComputing(this[_0xeb2903(0xde)],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0xeb2903(0xde)],this['data'],this['options'],this[_0xeb2903(0x138)],this[_0xeb2903(0x1b0)]);}['clearFramebuffers'](){const _0x899b74=_0x897c11,_0x5a1868=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x899b74(0x190))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0x899b74(0x176)]['OPAQUE']});Object[_0x899b74(0xe9)](this['particlesRendering']['framebuffers'])['forEach'](_0x221417=>{const _0x5e61ba=_0x899b74;_0x5a1868[_0x5e61ba(0x16d)]=this['particlesRendering']['framebuffers'][_0x221417],_0x5a1868['execute'](this['context']);});}['refreshParticles'](_0x4112bc){const _0x148999=_0x897c11;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this[_0x148999(0x1b0)][_0x148999(0x15c)](this['context'],this[_0x148999(0x162)],this[_0x148999(0x138)]);if(_0x4112bc){const _0xf77f14=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering'][_0x148999(0x15a)][_0x148999(0x141)]['geometry']=_0xf77f14;const _0x19bfb3=Cesium$2['VertexArray'][_0x148999(0x158)]({'context':this['context'],'geometry':_0xf77f14,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2[_0x148999(0xe0)]['STATIC_DRAW']});this['particlesRendering']['primitives']['segments']['commandToExecute']['vertexArray']=_0x19bfb3;}}['setOptions'](_0x1326bc){const _0x3f8a29=_0x897c11;let _0x25a81a=![];this['options']['maxParticles']!==_0x1326bc[_0x3f8a29(0x144)]&&(_0x25a81a=!![]),Object[_0x3f8a29(0xe9)](_0x1326bc)[_0x3f8a29(0xd2)](_0x2337c9=>{const _0x52f477=_0x3f8a29;this[_0x52f477(0x162)][_0x2337c9]=_0x1326bc[_0x2337c9];}),this['refreshParticles'](_0x25a81a);}['applyViewerParameters'](_0x14d832){const _0x49aef6=_0x897c11;Object[_0x49aef6(0xe9)](_0x14d832)[_0x49aef6(0xd2)](_0x1bb174=>{this['viewerParameters'][_0x1bb174]=_0x14d832[_0x1bb174];}),this[_0x49aef6(0x194)](![]);}['destroy'](){const _0x2b4fd2=_0x897c11;clearTimeout(this['canrefresh']),this['particlesComputing'][_0x2b4fd2(0x123)](),Object[_0x2b4fd2(0xe9)](this['particlesComputing']['windTextures'])['forEach'](_0x3fc370=>{this['particlesComputing']['windTextures'][_0x3fc370]['destroy']();}),this['particlesRendering'][_0x2b4fd2(0xe2)]['colorTable']['destroy'](),Object['keys'](this[_0x2b4fd2(0x10f)]['framebuffers'])['forEach'](_0x10fe09=>{this['particlesRendering']['framebuffers'][_0x10fe09]['destroy']();});for(const _0x2bfd6e in this){delete this[_0x2bfd6e];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer'][_0x897c11(0x139)],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x897c11(0x160)]};class WindLayer extends BaseLayer$1{constructor(_0x2552fc={}){_0x2552fc={...DEF_OPTIONS,..._0x2552fc},super(_0x2552fc),this['_setOptionsHook'](_0x2552fc);}get['layer'](){return this['primitives'];}get[_0x897c11(0x142)](){const _0x62cd42=_0x897c11;return this[_0x62cd42(0x153)];}set['data'](_0x1ba0a0){this['setData'](_0x1ba0a0);}get['colors'](){const _0xe00cff=_0x897c11;return this[_0xe00cff(0x162)][_0xe00cff(0xbb)];}set['colors'](_0x24ba06){const _0x4d8dd7=_0x897c11;this['options']['colors']=_0x24ba06,this[_0x4d8dd7(0x13a)]&&this[_0x4d8dd7(0x13a)][_0x4d8dd7(0x145)]({'colors':_0x24ba06}),this['resize']();}[_0x897c11(0x14d)](){}[_0x897c11(0x17c)](){const _0x146c67=_0x897c11;this['scene']=this['_map']['scene'],this['camera']=this[_0x146c67(0x10d)]['camera'],this['primitives']=new Cesium$1[(_0x146c67(0x148))](),this[_0x146c67(0x10d)][_0x146c67(0xd4)]['primitives']['add'](this['primitives']),this[_0x146c67(0x138)]={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1[(_0x146c67(0x192))](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this['resize']['bind'](this),![]),this[_0x146c67(0x113)]=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace[_0x146c67(0x17b)]['wheel'],this[_0x146c67(0x154)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x146c67(0x140)],this),this[_0x146c67(0x10d)]['on'](mars3d__namespace[_0x146c67(0x17b)][_0x146c67(0x10a)],this['_onMouseUpEvent'],this),this[_0x146c67(0x10d)]['on'](mars3d__namespace[_0x146c67(0x17b)][_0x146c67(0xe5)],this['_onMouseMoveEvent'],this),this[_0x146c67(0x153)]&&this['setData'](this['_data']);}['_removedHook'](){const _0x10c4cc=_0x897c11;window['removeEventListener'](_0x10c4cc(0x186),this['resize']),this['_map']['off'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this),this[_0x10c4cc(0x10d)][_0x10c4cc(0x16f)](mars3d__namespace['EventType'][_0x10c4cc(0x19b)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace[_0x10c4cc(0x17b)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map'][_0x10c4cc(0x16f)](mars3d__namespace['EventType'][_0x10c4cc(0x10a)],this['_onMouseUpEvent'],this),this[_0x10c4cc(0x10d)]['off'](mars3d__namespace[_0x10c4cc(0x17b)]['mouseMove'],this[_0x10c4cc(0x125)],this),this[_0x10c4cc(0x15a)][_0x10c4cc(0x179)](),this['_map']['scene']['primitives']['remove'](this['primitives']);}[_0x897c11(0x186)](){const _0x414028=_0x897c11;if(!this['show']||!this[_0x414028(0x13a)])return;this[_0x414028(0x15a)][_0x414028(0x163)]=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType'][_0x414028(0x1a0)],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x121958){const _0x57174c=_0x897c11;this['particleSystem']['canvasResize'](this['scene'][_0x57174c(0xde)]),this['addPrimitives'](),this['primitives'][_0x57174c(0x163)]=!![];}['_onMapWhellEvent'](_0x3b9423){const _0x4e01cb=_0x897c11;clearTimeout(this['refreshTimer']);if(!this[_0x4e01cb(0x163)]||!this['particleSystem'])return;this['primitives']['show']=![],this[_0x4e01cb(0x130)]=setTimeout(()=>{const _0x621c73=_0x4e01cb;if(!this['show'])return;this[_0x621c73(0xda)]();},0xc8);}[_0x897c11(0x140)](_0x76e7fb){const _0x58d2c7=_0x897c11;this[_0x58d2c7(0x113)]=!![];}['_onMouseMoveEvent'](_0x40c415){const _0x421ba4=_0x897c11;if(!this[_0x421ba4(0x163)]||!this[_0x421ba4(0x13a)])return;this[_0x421ba4(0x113)]&&(this['primitives'][_0x421ba4(0x163)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x1a43c1){const _0x3b3d66=_0x897c11;if(!this[_0x3b3d66(0x163)]||!this['particleSystem'])return;this['mouse_down']&&this[_0x3b3d66(0x120)]&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}[_0x897c11(0xda)](){const _0x4ff72f=_0x897c11;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this[_0x4ff72f(0x138)]),this['primitives'][_0x4ff72f(0x163)]=!![];}['setData'](_0x4c0e92){const _0x594a59=_0x897c11;this[_0x594a59(0x153)]=_0x4c0e92,this['particleSystem']&&this['particleSystem']['destroy'](),this[_0x594a59(0x13a)]=new ParticleSystem(this['scene']['context'],_0x4c0e92,this['getOptions'](),this[_0x594a59(0x138)]),this[_0x594a59(0x137)]();}['_setOptionsHook'](_0x580788,_0x37f6c9){const _0x5f46f2=_0x897c11;if(_0x580788)for(const _0x193010 in _0x580788){this[_0x193010]=_0x580788[_0x193010];}this['particleSystem']&&this['particleSystem'][_0x5f46f2(0x145)](this['getOptions']());}[_0x897c11(0x147)](){const _0x4daaa0=_0x897c11,_0x27a6e1=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this[_0x4daaa0(0xeb)]=_0x27a6e1*_0x27a6e1,{'particlesTextureSize':_0x27a6e1,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x4daaa0(0xf8)],'fadeOpacity':this['fadeOpacity'],'dropRate':this[_0x4daaa0(0x18a)],'dropRateBump':this['dropRateBump'],'speedFactor':this[_0x4daaa0(0x1b1)],'lineWidth':this[_0x4daaa0(0x131)],'colors':this['colors']};}[_0x897c11(0x137)](){const _0x327919=_0x897c11;this['primitives']['add'](this[_0x327919(0x13a)]['particlesComputing']['primitives']['getWind']),this['primitives']['add'](this['particleSystem'][_0x327919(0x1b0)]['primitives']['updateSpeed']),this[_0x327919(0x15a)]['add'](this['particleSystem'][_0x327919(0x1b0)]['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem'][_0x327919(0x1b0)][_0x327919(0x15a)][_0x327919(0x121)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this['primitives'][_0x327919(0xec)](this[_0x327919(0x13a)]['particlesRendering']['primitives']['segments']),this['primitives']['add'](this[_0x327919(0x13a)][_0x327919(0x10f)]['primitives'][_0x327919(0xe6)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0x251e8f=_0x897c11;let _0x6b8f12=this[_0x251e8f(0xd7)]['computeViewRectangle'](this[_0x251e8f(0xd4)][_0x251e8f(0x135)]['ellipsoid']);if(!_0x6b8f12){const _0x314b3e=this['_map'][_0x251e8f(0x17d)]();_0x6b8f12=Cesium$1['Rectangle']['fromDegrees'](_0x314b3e['xmin'],_0x314b3e['ymin'],_0x314b3e[_0x251e8f(0xcc)],_0x314b3e['ymax']);}const _0x434e53=Util['viewRectangleToLonLatRange'](_0x6b8f12);this[_0x251e8f(0x138)]['lonRange']['x']=_0x434e53['lon'][_0x251e8f(0x18d)],this[_0x251e8f(0x138)]['lonRange']['y']=_0x434e53['lon'][_0x251e8f(0x18b)],this[_0x251e8f(0x138)]['latRange']['x']=_0x434e53['lat']['min'],this['viewerParameters']['latRange']['y']=_0x434e53['lat']['max'];const _0x3c8b04=this[_0x251e8f(0xd7)][_0x251e8f(0x13e)](this[_0x251e8f(0x18f)],this['scene']['drawingBufferWidth'],this['scene'][_0x251e8f(0xff)]);_0x3c8b04>0x0&&(this['viewerParameters']['pixelSize']=_0x3c8b04);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x45bcef=_0x897c11;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x45bcef(0x198)]=null,this['age']=null;}['destroy'](){for(const _0x44de91 in this){delete this[_0x44de91];}}}class CanvasWindField{constructor(_0x2774be){const _0x550cb8=_0x897c11;this[_0x550cb8(0x145)](_0x2774be);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x3ae3b0){const _0x1a0437=_0x897c11;this[_0x1a0437(0x12f)]=(0x64-(_0x3ae3b0>0x63?0x63:_0x3ae3b0))*0x64,this[_0x1a0437(0xce)]=[(this['xmax']-this[_0x1a0437(0xf3)])/this['_speedRate'],(this[_0x1a0437(0xbf)]-this['ymin'])/this[_0x1a0437(0x12f)]];}get[_0x897c11(0xd3)](){return this['_maxAge'];}set['maxAge'](_0x48dc0b){this['_maxAge']=_0x48dc0b;}['setOptions'](_0x53dd1d){const _0x1fad89=_0x897c11;this['options']=_0x53dd1d,this['maxAge']=_0x53dd1d['maxAge']||0x78,this['speedRate']=_0x53dd1d['speedRate']||0x32,this['particles']=[];const _0x3e6958=_0x53dd1d['particlesNumber']||0x1000;for(let _0x400030=0x0;_0x400030<_0x3e6958;_0x400030++){const _0x2b1d0c=this['_randomParticle'](new CanvasParticle());this['particles'][_0x1fad89(0xd8)](_0x2b1d0c);}}['setDate'](_0x2ed066){const _0x4b9757=_0x897c11;this['rows']=_0x2ed066[_0x4b9757(0x1a6)],this['cols']=_0x2ed066['cols'],this[_0x4b9757(0xf3)]=_0x2ed066['xmin'],this['xmax']=_0x2ed066[_0x4b9757(0xcc)],this['ymin']=_0x2ed066['ymin'],this['ymax']=_0x2ed066[_0x4b9757(0xbf)],this[_0x4b9757(0x119)]=[];const _0x42655f=_0x2ed066[_0x4b9757(0x1a4)],_0x393c9d=_0x2ed066[_0x4b9757(0x151)];let _0x3842df=![];_0x42655f[_0x4b9757(0x13f)]===this['rows']&&_0x42655f[0x0]['length']===this[_0x4b9757(0x191)]&&(_0x3842df=!![]);let _0x1b2b47=0x0,_0x453f09=null,_0x513138=null;for(let _0x2215d3=0x0;_0x2215d3<this[_0x4b9757(0x1a6)];_0x2215d3++){_0x453f09=[];for(let _0x4b3cb9=0x0;_0x4b3cb9<this['cols'];_0x4b3cb9++,_0x1b2b47++){_0x3842df?_0x513138=this['_calcUV'](_0x42655f[_0x2215d3][_0x4b3cb9],_0x393c9d[_0x2215d3][_0x4b3cb9]):_0x513138=this['_calcUV'](_0x42655f[_0x1b2b47],_0x393c9d[_0x1b2b47]),_0x453f09['push'](_0x513138);}this['grid']['push'](_0x453f09);}this['options']['reverseY']&&this['grid'][_0x4b9757(0x1ae)]();}[_0x897c11(0xf2)](){delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x2bb39b,_0x305004){const _0x2a5ed5=_0x897c11,_0x5ea168=(_0x2bb39b-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x59ffe5=(this[_0x2a5ed5(0xbf)]-_0x305004)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0x5ea168,_0x59ffe5];}['getUVByXY'](_0x2f3887,_0x3c0b70){const _0x37fe37=_0x897c11;if(_0x2f3887<0x0||_0x2f3887>=this['cols']||_0x3c0b70>=this['rows'])return[0x0,0x0,0x0];const _0x302b63=Math['floor'](_0x2f3887),_0x58dd18=Math['floor'](_0x3c0b70);if(_0x302b63===_0x2f3887&&_0x58dd18===_0x3c0b70)return this[_0x37fe37(0x119)][_0x3c0b70][_0x2f3887];const _0x5b8913=_0x302b63+0x1,_0x5b7d80=_0x58dd18+0x1,_0x253274=this[_0x37fe37(0x143)](_0x302b63,_0x58dd18),_0x209b23=this['getUVByXY'](_0x5b8913,_0x58dd18),_0x51e506=this['getUVByXY'](_0x302b63,_0x5b7d80),_0x3570cf=this['getUVByXY'](_0x5b8913,_0x5b7d80);let _0x277406=null;try{_0x277406=this['_bilinearInterpolation'](_0x2f3887-_0x302b63,_0x3c0b70-_0x58dd18,_0x253274,_0x209b23,_0x51e506,_0x3570cf);}catch(_0x38a313){console['log'](_0x2f3887,_0x3c0b70);}return _0x277406;}['_bilinearInterpolation'](_0x55d0a2,_0x4d8981,_0x250d2a,_0x624e8c,_0x46a5a7,_0x399cc1){const _0x117883=0x1-_0x55d0a2,_0x38fbfa=0x1-_0x4d8981,_0x5720fa=_0x117883*_0x38fbfa,_0x1f0632=_0x55d0a2*_0x38fbfa,_0x51c5ba=_0x117883*_0x4d8981,_0x4d85b3=_0x55d0a2*_0x4d8981,_0x39be14=_0x250d2a[0x0]*_0x5720fa+_0x624e8c[0x0]*_0x1f0632+_0x46a5a7[0x0]*_0x51c5ba+_0x399cc1[0x0]*_0x4d85b3,_0x216c8f=_0x250d2a[0x1]*_0x5720fa+_0x624e8c[0x1]*_0x1f0632+_0x46a5a7[0x1]*_0x51c5ba+_0x399cc1[0x1]*_0x4d85b3;return this['_calcUV'](_0x39be14,_0x216c8f);}[_0x897c11(0x1a7)](_0x1186ba,_0x28c1e1){return[+_0x1186ba,+_0x28c1e1,Math['sqrt'](_0x1186ba*_0x1186ba+_0x28c1e1*_0x28c1e1)];}['getUVByPoint'](_0x26f0b7,_0x1ceaa0){const _0x1af30a=_0x897c11;if(!this['isInExtent'](_0x26f0b7,_0x1ceaa0))return null;const _0x33d5f0=this[_0x1af30a(0x1af)](_0x26f0b7,_0x1ceaa0),_0x191679=this[_0x1af30a(0x143)](_0x33d5f0[0x0],_0x33d5f0[0x1]);return _0x191679;}['isInExtent'](_0xb9bc11,_0x18f49e){return _0xb9bc11>=this['xmin']&&_0xb9bc11<=this['xmax']&&_0x18f49e>=this['ymin']&&_0x18f49e<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0xeadb79=fRandomByfloat(this['xmin'],this['xmax']),_0x428c50=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x428c50,'lng':_0xeadb79};}['getParticles'](){const _0x2d925d=_0x897c11;let _0x57ada3,_0x468bbe,_0x2952d5;for(let _0x2893bc=0x0,_0x3af830=this['particles']['length'];_0x2893bc<_0x3af830;_0x2893bc++){let _0x42b63f=this['particles'][_0x2893bc];_0x42b63f['age']<=0x0&&(_0x42b63f=this[_0x2d925d(0x126)](_0x42b63f));if(_0x42b63f[_0x2d925d(0x1ab)]>0x0){const _0x3d42e8=_0x42b63f['tlng'],_0x1e8fb8=_0x42b63f['tlat'];_0x2952d5=this['getUVByPoint'](_0x3d42e8,_0x1e8fb8),_0x2952d5?(_0x57ada3=_0x3d42e8+this['_calc_speedRate'][0x0]*_0x2952d5[0x0],_0x468bbe=_0x1e8fb8+this['_calc_speedRate'][0x1]*_0x2952d5[0x1],_0x42b63f['lng']=_0x3d42e8,_0x42b63f['lat']=_0x1e8fb8,_0x42b63f['tlng']=_0x57ada3,_0x42b63f[_0x2d925d(0x198)]=_0x468bbe,_0x42b63f[_0x2d925d(0x1ab)]--):_0x42b63f[_0x2d925d(0x1ab)]=0x0;}}return this['particles'];}[_0x897c11(0x126)](_0x16980a){const _0x5c2ab0=_0x897c11;let _0x3625cd,_0xcf02b4;for(let _0x51ede6=0x0;_0x51ede6<0x1e;_0x51ede6++){_0x3625cd=this[_0x5c2ab0(0x10c)](),_0xcf02b4=this['getUVByPoint'](_0x3625cd[_0x5c2ab0(0xd0)],_0x3625cd[_0x5c2ab0(0x127)]);if(_0xcf02b4&&_0xcf02b4[0x2]>0x0)break;}if(!_0xcf02b4)return _0x16980a;const _0x3150b1=_0x3625cd['lng']+this['_calc_speedRate'][0x0]*_0xcf02b4[0x0],_0x4cf6c4=_0x3625cd[_0x5c2ab0(0x127)]+this['_calc_speedRate'][0x1]*_0xcf02b4[0x1];return _0x16980a['lng']=_0x3625cd['lng'],_0x16980a['lat']=_0x3625cd['lat'],_0x16980a['tlng']=_0x3150b1,_0x16980a['tlat']=_0x4cf6c4,_0x16980a['age']=Math['round'](Math['random']()*this['maxAge']),_0x16980a;}['destroy'](){for(const _0x35ac37 in this){delete this[_0x35ac37];}}}function fRandomByfloat(_0x58d5d3,_0xe40968){return _0x58d5d3+Math['random']()*(_0xe40968-_0x58d5d3);}function _0x293b(){const _0xb8cf1c=['setGeometry','lineTo','lev','randomizeParticles','mouse_move','postProcessingPosition','Cesium','destroyParticlesTextures','segmentsColor','_onMouseMoveEvent','_randomParticle','lat','51264OvDeZj','NEAREST','dimensions','tlng','atan2','create','5275853PtJeke','_speedRate','refreshTimer','lineWidth','array','VertexArray','worker','globe','speedRate','addPrimitives','viewerParameters','BaseLayer','particleSystem','_removedHook','positionWC','setData','getPixelSize','length','_onMouseDownEvent','segments','data','getUVByXY','maxParticles','setOptions','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','getOptions','PrimitiveCollection','nextTrails','now','shaderProgram','particlesTextureSize','_mountedHook','currentTrailsColor','ClearCommand','30036oQcQTX','vdata','currentTrails','_data','_onMapWhellEvent','primitiveType','uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a','layer','fromGeometry','geometry','primitives','pointer-events','createParticlesTextures','Math','ComponentDatatype','clampToLatitudeRange','rgb(206,255,255)','clientWidth','options','show','clearCommand','destroy','frameTime','updatePosition','81232pjYjkL','postProcessingSpeed','RGB','requestAnimationFrame','mars3d-canvasWind','framebuffer','427BUUicm','off','canvas','canvasWidth','uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a','animateFrame','commandToExecute','defined','Pass','position','color','removeAll','pow','EventType','_addedHook','getExtent','randomBetween','0px','Compute','viewport','uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a','toRadians','createCommand','fragmentShaderSource','resize','FLOAT','currentParticlesSpeed','default','dropRate','max','west','min','TextureMinificationFilter','globeBoundingSphere','Color','cols','Cartesian2','attributeLocations','refreshParticles','_drawLines','nextParticlesPosition','DrawCommand','tlat','4210785rQKawO','pixelSize','wheel','none','fill','createRenderingFramebuffers','PixelDatatype','preRender','__esModule','Sampler','_pointerEvents','udata','canvasContext','rows','_calcUV','Framebuffer','10NviBDD','172TXWgQH','age','outputTexture','vmax','reverse','toGridXY','particlesComputing','speedFactor','_onMouseUpEvent','colors','height','lonRange','all','ymax','preExecute','_setOptionsHook','style','init','ShaderProgram','uniformMap','abs','uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a','vertexArray','CanvasWindField','currentParticlesPosition','13lqDfWY','xmax','particles','_calc_speedRate','visibility','lng','createTexture','forEach','maxAge','scene','update','13165644yBCGas','camera','push','rawRenderState','redraw','globalAlpha','PixelFormat','zIndex','context','IDENTITY','BufferUsage','lon','textures','Draw','canvasResize','mouseMove','trails','drawingBufferWidth','WindLayer','keys','65JhwaMT','particlesNumber','add','mode','bindEvent','PrimitiveType','mod','south','clear','xmin','postMessage','RGBA','clientHeight','STATIC_DRAW','fixedHeight','addEventListener','SceneMode','961882LQjCKp','vertexShaderSource','width','framebuffers','drawingBufferHeight','_tomap','createRenderingTextures','createFramebuffer','getFullscreenQuad','windTextures','_updateIng','windField','PI_OVER_THREE','hidden','cancelAnimationFrame','mouseUp','SCENE3D','getRandomLatLng','_map','currentTrailsDepth','particlesRendering','reverseY','onmessage','mouseHidden','mouse_down','autoClear','DISABLE_GL_POSITION_LOG_DEPTH','1PqgbWm','pointerEvents','ShaderSource','grid','Cartesian3','particlesTextures'];_0x293b=function(){return _0xb8cf1c;};return _0x293b();}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x1587cf={}){const _0x507b02=_0x897c11;super(_0x1587cf),this['_setOptionsHook'](_0x1587cf),this[_0x507b02(0x170)]=null;}[_0x897c11(0xc1)](_0xf2def7,_0x221ef9){const _0x30f86e=_0x897c11;this[_0x30f86e(0x166)]=0x3e8/(_0xf2def7['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0xf2def7[_0x30f86e(0x178)]||'#ffffff',this[_0x30f86e(0x131)]=_0xf2def7['lineWidth']||0x1,this['fixedHeight']=_0xf2def7['fixedHeight']??0x0,this[_0x30f86e(0x110)]=_0xf2def7['reverseY']??![],this[_0x30f86e(0x106)]&&this['windField']['setOptions'](_0xf2def7);}get['layer'](){const _0x30db1c=_0x897c11;return this[_0x30db1c(0x170)];}get[_0x897c11(0x171)](){const _0x1bbb94=_0x897c11;return this[_0x1bbb94(0x10d)][_0x1bbb94(0xd4)]['canvas']['clientWidth'];}get['canvasHeight'](){const _0x29bb46=_0x897c11;return this[_0x29bb46(0x10d)]['scene']['canvas']['clientHeight'];}get[_0x897c11(0x117)](){const _0x143686=_0x897c11;return this[_0x143686(0x1a3)];}set['pointerEvents'](_0x428e1c){const _0x16c4f6=_0x897c11;this[_0x16c4f6(0x1a3)]=_0x428e1c;if(!this['canvas'])return;_0x428e1c?this['canvas']['style'][_0x16c4f6(0x15b)]=_0x16c4f6(0xbe):this['canvas']['style']['pointer-events']=_0x16c4f6(0x19c);}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x23ee12){this['options']['particlesNumber']=_0x23ee12,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x2c6903=_0x897c11;return this['options'][_0x2c6903(0x136)];}set['speedRate'](_0x19470b){const _0x19cf59=_0x897c11;this[_0x19cf59(0x162)]['speedRate']=_0x19470b,this[_0x19cf59(0x106)]&&(this['windField']['speedRate']=_0x19470b);}get[_0x897c11(0xd3)](){const _0x41f9ce=_0x897c11;return this[_0x41f9ce(0x162)]['maxAge'];}set['maxAge'](_0x2069d0){const _0x52743b=_0x897c11;this['options'][_0x52743b(0xd3)]=_0x2069d0,this[_0x52743b(0x106)]&&(this[_0x52743b(0x106)]['maxAge']=_0x2069d0);}get['data'](){return this['windData'];}set['data'](_0x5a8a6e){this['setData'](_0x5a8a6e);}['_showHook'](_0x27394d){const _0x218c21=_0x897c11;_0x27394d?this['_addedHook']():(this['windData']&&(this[_0x218c21(0x162)]['data']=this['windData']),this[_0x218c21(0x13b)]());}['_mountedHook'](){const _0x1d6e02=_0x897c11;this[_0x1d6e02(0x162)]['worker']?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x26343e=_0x897c11;this['canvas']=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x26343e(0xee)](),this['options'][_0x26343e(0x142)]&&this['setData'](this['options']['data']);}[_0x897c11(0x13b)](){const _0x4b0cff=_0x897c11;this['clear'](),this['unbindEvent'](),this['canvas']&&(this[_0x4b0cff(0x10d)]['container']['removeChild'](this['canvas']),delete this[_0x4b0cff(0x170)]);}['_createCanvas'](){const _0x1f2174=_0x897c11,_0x3b9281=mars3d__namespace['DomUtil'][_0x1f2174(0x12d)]('canvas',_0x1f2174(0x16c),this['_map']['container']);return _0x3b9281['style'][_0x1f2174(0x177)]='absolute',_0x3b9281['style']['top']=_0x1f2174(0x17f),_0x3b9281['style']['left']='0px',_0x3b9281['style'][_0x1f2174(0xfd)]=this['_map'][_0x1f2174(0xd4)]['canvas']['clientWidth']+'px',_0x3b9281[_0x1f2174(0xc2)][_0x1f2174(0xbc)]=this[_0x1f2174(0x10d)]['scene']['canvas']['clientHeight']+'px',_0x3b9281[_0x1f2174(0xc2)]['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x3b9281['style']['zIndex']=this[_0x1f2174(0x162)][_0x1f2174(0xdd)]??0x9,_0x3b9281['width']=this['_map'][_0x1f2174(0xd4)]['canvas']['clientWidth'],_0x3b9281[_0x1f2174(0xbc)]=this['_map']['scene']['canvas'][_0x1f2174(0xf6)],_0x3b9281;}['resize'](){const _0x187313=_0x897c11;this[_0x187313(0x170)]&&(this['canvas'][_0x187313(0xc2)][_0x187313(0xfd)]=this['_map']['scene']['canvas']['clientWidth']+'px',this[_0x187313(0x170)]['style']['height']=this[_0x187313(0x10d)]['scene']['canvas'][_0x187313(0xf6)]+'px',this['canvas'][_0x187313(0xfd)]=this['_map']['scene']['canvas'][_0x187313(0x161)],this[_0x187313(0x170)]['height']=this['_map']['scene'][_0x187313(0x170)]['clientHeight']);}['bindEvent'](){const _0x42f16b=_0x897c11,_0xb0cb86=this;let _0xe5dd33=Date['now']();(function _0x505f7d(){const _0x86e354=_0xea55;_0xb0cb86[_0x86e354(0x173)]=window[_0x86e354(0x16b)](_0x505f7d);if(_0xb0cb86[_0x86e354(0x163)]&&_0xb0cb86['windField']){const _0x201c6a=Date[_0x86e354(0x14a)](),_0x19108f=_0x201c6a-_0xe5dd33;_0x19108f>_0xb0cb86['frameTime']&&(_0xe5dd33=_0x201c6a-_0x19108f%_0xb0cb86['frameTime'],_0xb0cb86[_0x86e354(0xd5)]());}}(),window[_0x42f16b(0xf9)](_0x42f16b(0x186),this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this[_0x42f16b(0x162)][_0x42f16b(0x112)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x42f16b(0x140)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this[_0x42f16b(0xba)],this)));}['unbindEvent'](){const _0x41af08=_0x897c11;window[_0x41af08(0x109)](this['animateFrame']),delete this['animateFrame'],window['removeEventListener'](_0x41af08(0x186),this[_0x41af08(0x186)]),this[_0x41af08(0x162)][_0x41af08(0x112)]&&(this['_map'][_0x41af08(0x16f)](mars3d__namespace[_0x41af08(0x17b)]['wheel'],this['_onMapWhellEvent'],this),this['_map'][_0x41af08(0x16f)](mars3d__namespace['EventType']['mouseDown'],this[_0x41af08(0x140)],this),this['_map']['off'](mars3d__namespace[_0x41af08(0x17b)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x41af08(0x125)],this));}['_onMapWhellEvent'](_0x4d6a46){const _0x14a1a1=_0x897c11;clearTimeout(this['refreshTimer']);if(!this[_0x14a1a1(0x163)]||!this['canvas'])return;this['canvas']['style'][_0x14a1a1(0xcf)]=_0x14a1a1(0x108),this[_0x14a1a1(0x130)]=setTimeout(()=>{const _0x1d9f9d=_0x14a1a1;if(!this['show'])return;this[_0x1d9f9d(0xda)](),this['canvas']['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x27e2d6){const _0x4ac232=_0x897c11;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x4ac232(0x125)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x4ac232(0xe5)],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x4f637a){const _0x349205=_0x897c11;if(!this[_0x349205(0x163)]||!this['canvas'])return;this['mouse_down']&&(this['canvas']['style']['visibility']='hidden',this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5d720c){const _0x156e89=_0x897c11;if(!this['show']||!this[_0x156e89(0x170)])return;this['_map'][_0x156e89(0x16f)](mars3d__namespace[_0x156e89(0x17b)][_0x156e89(0xe5)],this[_0x156e89(0x125)],this),this[_0x156e89(0x113)]&&this['mouse_move']&&this[_0x156e89(0xda)](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this['mouse_move']=![];}[_0x897c11(0x13d)](_0x2f3628){const _0x2a6907=_0x897c11;this['clear'](),this['windData']=_0x2f3628,this[_0x2a6907(0x106)]['setDate'](_0x2f3628),this['redraw']();}['redraw'](){const _0x1960bb=_0x897c11;if(!this['show'])return;this['windField'][_0x1960bb(0x145)](this['options']),this[_0x1960bb(0xd5)]();}['update'](){const _0x4fcd6d=_0x897c11;if(this[_0x4fcd6d(0x105)])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x394b39=this['windField']['getParticles']();this['_drawLines'](_0x394b39);}this['_updateIng']=![];}['_drawLines'](_0xfd8416){const _0x4c6b84=_0x897c11;this['canvasContext']['globalCompositeOperation']='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this[_0x4c6b84(0x171)],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this[_0x4c6b84(0x1a5)][_0x4c6b84(0xdb)]=0.9,this['canvasContext']['beginPath'](),this[_0x4c6b84(0x1a5)][_0x4c6b84(0x131)]=this['lineWidth'],this['canvasContext']['strokeStyle']=this['color'];const _0x33de76=this[_0x4c6b84(0x10d)]['scene']['mode']!==Cesium[_0x4c6b84(0xfa)]['SCENE3D'],_0x33cae7=this['canvasWidth']*0.25;for(let _0x28ab6b=0x0,_0x1b44f5=_0xfd8416[_0x4c6b84(0x13f)];_0x28ab6b<_0x1b44f5;_0x28ab6b++){const _0x3645e1=_0xfd8416[_0x28ab6b],_0x427904=this['_tomap'](_0x3645e1['lng'],_0x3645e1[_0x4c6b84(0x127)],_0x3645e1),_0x45201d=this['_tomap'](_0x3645e1[_0x4c6b84(0x12b)],_0x3645e1[_0x4c6b84(0x198)],_0x3645e1);if(!_0x427904||!_0x45201d)continue;if(_0x33de76&&Math[_0x4c6b84(0xc6)](_0x427904[0x0]-_0x45201d[0x0])>=_0x33cae7)continue;this['canvasContext']['moveTo'](_0x427904[0x0],_0x427904[0x1]),this['canvasContext'][_0x4c6b84(0x11d)](_0x45201d[0x0],_0x45201d[0x1]);}this[_0x4c6b84(0x1a5)]['stroke']();}[_0x897c11(0x100)](_0x29812d,_0x2dfb07,_0x5ca114){const _0x3b0fb5=_0x897c11,_0x4ab87c=Cesium['Cartesian3']['fromDegrees'](_0x29812d,_0x2dfb07,this[_0x3b0fb5(0xf8)]),_0x5b6955=this['_map']['scene'];if(_0x5b6955['mode']===Cesium['SceneMode'][_0x3b0fb5(0x10b)]){const _0x3fa0b8=new Cesium['EllipsoidalOccluder'](_0x5b6955[_0x3b0fb5(0x135)]['ellipsoid'],_0x5b6955[_0x3b0fb5(0xd7)][_0x3b0fb5(0x13c)]),_0x4c7b83=_0x3fa0b8['isPointVisible'](_0x4ab87c);if(!_0x4c7b83)return _0x5ca114['age']=0x0,null;}const _0x1400f3=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map'][_0x3b0fb5(0xd4)],_0x4ab87c);return _0x1400f3?[_0x1400f3['x'],_0x1400f3['y']]:null;}['clear'](){const _0x32ae4e=_0x897c11;this['windField'][_0x32ae4e(0xf2)](),delete this['windData'];}['initWorker'](){const _0x47955b=_0x897c11;this[_0x47955b(0x134)]=new Worker(this['options']['worker']),this['worker'][_0x47955b(0x111)]=_0x46b37b=>{const _0x4c2c1c=_0x47955b;this[_0x4c2c1c(0x195)](_0x46b37b['data'][_0x4c2c1c(0xcd)]),this['_updateIng2']=![];},this['windField']={'init':_0xba43dd=>{const _0x2aec9d=_0x47955b;this[_0x2aec9d(0x134)][_0x2aec9d(0xf4)]({'type':_0x2aec9d(0xc3),'options':_0xba43dd});},'setOptions':_0x312952=>{const _0x40dfd3=_0x47955b;this['worker'][_0x40dfd3(0xf4)]({'type':'setOptions','options':_0x312952});},'setDate':_0x355f9c=>{const _0x1c478a=_0x47955b;this[_0x1c478a(0x134)][_0x1c478a(0xf4)]({'type':'setDate','data':_0x355f9c});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0x2f55a7=_0x47955b;this[_0x2f55a7(0x134)][_0x2f55a7(0xf4)]({'type':'clear'});}},this['windField']['init'](this[_0x47955b(0x162)]);}}function _0xea55(_0x9b0383,_0x14c20e){const _0x293b70=_0x293b();return _0xea55=function(_0xea5543,_0x3402ce){_0xea5543=_0xea5543-0xba;let _0x274374=_0x293b70[_0xea5543];return _0x274374;},_0xea55(_0x9b0383,_0x14c20e);}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace[_0x897c11(0x157)]['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace[_0x897c11(0xc9)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x897c11(0xc9)]=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x897c11(0xe8)]=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x55787c=_0x540d;(function(_0x25d3ba,_0x58b667){const _0x10d12b=_0x540d,_0x4a65cf=_0x25d3ba();while(!![]){try{const _0x4e317a=parseInt(_0x10d12b(0x14b))/0x1+parseInt(_0x10d12b(0x167))/0x2*(parseInt(_0x10d12b(0xd1))/0x3)+parseInt(_0x10d12b(0x171))/0x4+parseInt(_0x10d12b(0x164))/0x5+parseInt(_0x10d12b(0xc6))/0x6+parseInt(_0x10d12b(0xfe))/0x7+-parseInt(_0x10d12b(0xd0))/0x8*(parseInt(_0x10d12b(0x150))/0x9);if(_0x4e317a===_0x58b667)break;else _0x4a65cf['push'](_0x4a65cf['shift']());}catch(_0x77a1f4){_0x4a65cf['push'](_0x4a65cf['shift']());}}}(_0x5cad,0x6abef));function _interopNamespace(_0x124104){const _0x390f04=_0x540d;if(_0x124104&&_0x124104['__esModule'])return _0x124104;var _0x4c6fdf=Object['create'](null);return _0x124104&&Object[_0x390f04(0x10a)](_0x124104)['forEach'](function(_0x29ca1e){const _0x21ada0=_0x390f04;if(_0x29ca1e!=='default'){var _0x3f25b9=Object['getOwnPropertyDescriptor'](_0x124104,_0x29ca1e);Object['defineProperty'](_0x4c6fdf,_0x29ca1e,_0x3f25b9[_0x21ada0(0x137)]?_0x3f25b9:{'enumerable':!![],'get':function(){return _0x124104[_0x29ca1e];}});}}),_0x4c6fdf[_0x390f04(0x106)]=_0x124104,_0x4c6fdf;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x2a0f95,_0x2f5289){const _0x2bb7ab=_0x540d,_0x1b574f=_0x2a0f95*Math[_0x2bb7ab(0xc3)](Cesium$7[_0x2bb7ab(0xf4)]['toRadians'](_0x2f5289));return _0x1b574f;}function getV(_0x56440a,_0x11a43f){const _0x5a2c0d=_0x540d,_0x1f24c2=_0x56440a*Math['sin'](Cesium$7[_0x5a2c0d(0xf4)]['toRadians'](_0x11a43f));return _0x1f24c2;}function _0x5cad(){const _0x2b108f=['mars3d-canvasWind','once','camera','ZERO','forEach','default','particlesWind','dropRateBump','wheel','keys','createParticlesTextures','array','mode','blue','lev','positionWC','lonRange','windTextures','particlesTextureSize','_mountedHook','currentParticlesPosition','sqrt','PI_OVER_THREE','PixelFormat','particlesNumber','container','reverseY','animateFrame','setOptions','pointerEvents','fromCssColorString','TWO_PI','cols','updateViewerParameters','context','canvasContext','fragmentShaderSource','lineWidth','Cesium','SceneMode','mouse_down','currentTrailsDepth','wind','particleSystem','particlesComputing','_addedHook','nextParticlesPosition','Cartesian2','xmin','__esModule','clientWidth','CanvasWindLayer','createSegmentsGeometry','outputTexture','get','cancelAnimationFrame','TRIANGLES','createFramebuffer','_onMap_preRenderEvent','resize','commandToExecute','preExecute','drawingBufferHeight','height','RenderState','_drawLines','_canrefresh','ymin','destroyParticlesTextures','options','commandType','defined','clientHeight','textures','112572zpEtUB','windData','GeometryAttributes','LINEAR','lat','348021VFvrfW','_calc_speedRate','ShaderSource','clear','addPrimitives','applyViewerParameters','currentTrails','_onMouseMoveEvent','OPAQUE','round','north','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','uniformMap','colorTable','clearCommand','worker','_updateIng2','particlesRendering','onmessage','viewerParameters','1922220JDLJNK','east','rgb(206,255,255)','142gYwUfW','getRandomLatLng','setData','postMessage','_bilinearInterpolation','windField','_onMapWhellEvent','primitives','setDate','fromCache','1287232bHCjeI','TextureMagnificationFilter','toGridXY','udata','tlng','globalAlpha','latRange','postProcessingSpeed','STATIC_DRAW','createRenderingPrimitives','addEventListener','pow','createRawRenderState','NEAREST','add','vertexArray','mouse_move','_data','fixedHeight','getOptions','createTexture','scene','age','maxParticles','autoClear','visible','WindLayer','GeometryAttribute','_pointerEvents','lon','mouseUp','nextTrails','destroy','_speedRate','vdata','UNSIGNED_BYTE','framebuffer','mouseMove','ymax','layer','Sampler','pointer-events','Framebuffer','off','createWindTextures','mouseDown','show','EventType','max','cos','rows','PixelDatatype','464094vZJyfd','removeEventListener','canvas','data','uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a','dimensions','frameTime','nextParticlesSpeed','RGBA','particlesTextures','256YJsRVs','9237nGPZbH','toDegrees','maxAge','speedRate','redraw','hidden','tlat','fromGeometry','particleHeight','BaseLayer','mod','viewRectangleToLonLatRange','length','none','ellipsoid','primitiveType','requestAnimationFrame','FLOAT','dropRate','Cartesian3','attributeLocations','getUVByXY','CanvasWindField','_map','now','refreshTimer','segments','min','frameRate','_calcUV','push','rawRenderState','bindEvent','framebuffers','postProcessingPosition','Math','getParticles','bind','geometry','style','commandList','drawingBufferWidth','xmax','DrawCommand','_onMouseDownEvent','3918999bwhExj','colors','depthTexture'];_0x5cad=function(){return _0x2b108f;};return _0x5cad();}function _0x540d(_0x4e530a,_0x377ff1){const _0x5cad08=_0x5cad();return _0x540d=function(_0x540d44,_0x576ed3){_0x540d44=_0x540d44-0x93;let _0x2865a7=_0x5cad08[_0x540d44];return _0x2865a7;},_0x540d(_0x4e530a,_0x377ff1);}function getSpeed(_0x545e9b,_0x31dbc2){const _0x1241c2=_0x540d,_0x12e9d9=Math[_0x1241c2(0x116)](Math[_0x1241c2(0x9d)](_0x545e9b,0x2)+Math[_0x1241c2(0x9d)](_0x31dbc2,0x2));return _0x12e9d9;}function getDirection(_0x3ee57e,_0x3605d2){const _0x18383e=_0x540d;let _0x4045be=Cesium$7[_0x18383e(0xf4)][_0x18383e(0xd2)](Math['atan2'](_0x3605d2,_0x3ee57e));return _0x4045be+=_0x4045be<0x0?0x168:0x0,_0x4045be;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace[_0x55787c(0x127)];class CustomPrimitive{constructor(_0x4d4ece){const _0x5984a8=_0x55787c;this['commandType']=_0x4d4ece[_0x5984a8(0x147)],this[_0x5984a8(0xf7)]=_0x4d4ece['geometry'],this[_0x5984a8(0xe5)]=_0x4d4ece['attributeLocations'],this[_0x5984a8(0xe0)]=_0x4d4ece['primitiveType'],this[_0x5984a8(0x15c)]=_0x4d4ece[_0x5984a8(0x15c)],this['vertexShaderSource']=_0x4d4ece['vertexShaderSource'],this[_0x5984a8(0x125)]=_0x4d4ece['fragmentShaderSource'],this['rawRenderState']=_0x4d4ece[_0x5984a8(0xf0)],this[_0x5984a8(0xb6)]=_0x4d4ece['framebuffer'],this[_0x5984a8(0x136)]=_0x4d4ece['outputTexture'],this['autoClear']=_0x4d4ece['autoClear']??![],this['preExecute']=_0x4d4ece[_0x5984a8(0x13e)],this['show']=!![],this['commandToExecute']=undefined,this[_0x5984a8(0x15e)]=undefined,this[_0x5984a8(0xaa)]&&(this[_0x5984a8(0x15e)]=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x5984a8(0x158)]}));}['createCommand'](_0x344488){const _0x13afc0=_0x55787c;switch(this['commandType']){case'Draw':{const _0x34abc4=Cesium$6['VertexArray']['fromGeometry']({'context':_0x344488,'geometry':this[_0x13afc0(0xf7)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x59b86b=Cesium$6['ShaderProgram']['fromCache']({'context':_0x344488,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x232a23=Cesium$6[_0x13afc0(0x141)][_0x13afc0(0x170)](this['rawRenderState']);return new Cesium$6[(_0x13afc0(0xfc))]({'primitiveType':this[_0x13afc0(0xe0)],'shaderProgram':_0x59b86b,'vertexArray':_0x34abc4,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x232a23,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x579f64,_0x54cb49){this['geometry']=_0x54cb49;const _0x51272a=Cesium$6['VertexArray']['fromGeometry']({'context':_0x579f64,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x51272a;}['update'](_0x443ec3){const _0x5eb02f=_0x55787c;if(!this[_0x5eb02f(0xc0)])return;if(_0x443ec3[_0x5eb02f(0x10d)]!==Cesium$6[_0x5eb02f(0x128)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x443ec3['context'])),Cesium$6[_0x5eb02f(0x148)](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x443ec3['commandList']['push'](this['clearCommand']),_0x443ec3[_0x5eb02f(0xf9)]['push'](this['commandToExecute']);}['isDestroyed'](){return![];}[_0x55787c(0xb2)](){const _0x373eed=_0x55787c;if(this['clearCommand']){var _0x27ae80,_0x59434e;(_0x27ae80=this['clearCommand'])!==null&&_0x27ae80!==void 0x0&&_0x27ae80[_0x373eed(0xa1)]&&this['clearCommand'][_0x373eed(0xa1)][_0x373eed(0xb2)](),(_0x59434e=this['clearCommand'])!==null&&_0x59434e!==void 0x0&&_0x59434e['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this[_0x373eed(0x13d)]['vertexArray']&&this['commandToExecute']['vertexArray']['destroy'](),this[_0x373eed(0x13d)]['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0x373eed(0xb2)](),delete this[_0x373eed(0x13d)]),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace[_0x55787c(0x127)],Util=(function(){const _0x3e24d8=function(){const _0x496d4e=_0x540d,_0x3879b8=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x496d4e(0x14d))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x496d4e(0xe2)],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x3879b8;},_0x2ce4f2=function(_0xa028ee,_0x2c4dd2){const _0x5b4f2c=_0x540d;if(Cesium$5[_0x5b4f2c(0x148)](_0x2c4dd2)){const _0x3a186a={};_0x3a186a['arrayBufferView']=_0x2c4dd2,_0xa028ee['source']=_0x3a186a;}const _0x19a65e=new Cesium$5['Texture'](_0xa028ee);return _0x19a65e;},_0x53eab8=function(_0x230f63,_0x387dd1,_0x56132c){const _0x4a73dc=_0x540d,_0x205b8b=new Cesium$5[(_0x4a73dc(0xbc))]({'context':_0x230f63,'colorTextures':[_0x387dd1],'depthTexture':_0x56132c});return _0x205b8b;},_0x44036=function(_0x91b12f){const _0x4da589=!![],_0x4e3e4a=![],_0xd1e23d={'viewport':_0x91b12f['viewport'],'depthTest':_0x91b12f['depthTest'],'depthMask':_0x91b12f['depthMask'],'blending':_0x91b12f['blending']},_0xc07e80=Cesium$5['Appearance']['getDefaultRenderState'](_0x4da589,_0x4e3e4a,_0xd1e23d);return _0xc07e80;},_0x142cd0=function(_0xb25b25){const _0x1b0403=_0x540d,_0x10773a={},_0x1ef96f=Cesium$5['Math']['mod'](_0xb25b25['west'],Cesium$5['Math']['TWO_PI']),_0xded9b1=Cesium$5['Math'][_0x1b0403(0xdb)](_0xb25b25[_0x1b0403(0x165)],Cesium$5[_0x1b0403(0xf4)]['TWO_PI']),_0x17a535=_0xb25b25['width'];let _0x305cc4,_0x354bc9;_0x17a535>Cesium$5[_0x1b0403(0xf4)]['THREE_PI_OVER_TWO']?(_0x305cc4=0x0,_0x354bc9=Cesium$5['Math'][_0x1b0403(0x120)]):_0xded9b1-_0x1ef96f<_0x17a535?(_0x305cc4=_0x1ef96f,_0x354bc9=_0x1ef96f+_0x17a535):(_0x305cc4=_0x1ef96f,_0x354bc9=_0xded9b1);_0x10773a['lon']={'min':Cesium$5['Math']['toDegrees'](_0x305cc4),'max':Cesium$5['Math'][_0x1b0403(0xd2)](_0x354bc9)};const _0x3d58ff=_0xb25b25['south'],_0x4cfe2a=_0xb25b25[_0x1b0403(0x15a)],_0x5beb91=_0xb25b25['height'],_0x553f46=_0x5beb91>Cesium$5[_0x1b0403(0xf4)]['PI']/0xc?_0x5beb91/0x2:0x0;let _0x316440=Cesium$5['Math']['clampToLatitudeRange'](_0x3d58ff-_0x553f46),_0x5060fe=Cesium$5['Math']['clampToLatitudeRange'](_0x4cfe2a+_0x553f46);return _0x316440<-Cesium$5['Math'][_0x1b0403(0x117)]&&(_0x316440=-Cesium$5['Math']['PI_OVER_TWO']),_0x5060fe>Cesium$5[_0x1b0403(0xf4)]['PI_OVER_THREE']&&(_0x5060fe=Cesium$5['Math']['PI_OVER_TWO']),_0x10773a['lat']={'min':Cesium$5[_0x1b0403(0xf4)]['toDegrees'](_0x316440),'max':Cesium$5[_0x1b0403(0xf4)]['toDegrees'](_0x5060fe)},_0x10773a;};return{'getFullscreenQuad':_0x3e24d8,'createTexture':_0x2ce4f2,'createFramebuffer':_0x53eab8,'createRawRenderState':_0x44036,'viewRectangleToLonLatRange':_0x142cd0};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace[_0x55787c(0x127)];class ParticlesRendering{constructor(_0x4620c1,_0x1aef1f,_0x459f2c,_0xa41167,_0x20898a){const _0x57f522=_0x55787c;this['createRenderingTextures'](_0x4620c1,_0x1aef1f,_0x459f2c[_0x57f522(0xff)]),this['createRenderingFramebuffers'](_0x4620c1),this['createRenderingPrimitives'](_0x4620c1,_0x459f2c,_0xa41167,_0x20898a);}['createRenderingTextures'](_0x2a19b2,_0x148a5c,_0x184d72){const _0x2c8f3a=_0x55787c,_0x3ca480={'context':_0x2a19b2,'width':_0x2a19b2['drawingBufferWidth'],'height':_0x2a19b2['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat'][_0x2c8f3a(0xce)],'pixelDatatype':Cesium$4['PixelDatatype'][_0x2c8f3a(0xb5)]},_0x29c568={'context':_0x2a19b2,'width':_0x2a19b2[_0x2c8f3a(0xfa)],'height':_0x2a19b2[_0x2c8f3a(0x13f)],'pixelFormat':Cesium$4[_0x2c8f3a(0x118)]['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4[_0x2c8f3a(0xc5)]['UNSIGNED_INT']},_0x1a4aa1=_0x184d72[_0x2c8f3a(0xdd)],_0xbf2176=new Float32Array(_0x1a4aa1*0x3);for(let _0xbbdeb9=0x0;_0xbbdeb9<_0x1a4aa1;_0xbbdeb9++){const _0xc5c2b8=Cesium$4['Color'][_0x2c8f3a(0x11f)](_0x184d72[_0xbbdeb9]);_0xbf2176[0x3*_0xbbdeb9]=_0xc5c2b8['red'],_0xbf2176[0x3*_0xbbdeb9+0x1]=_0xc5c2b8['green'],_0xbf2176[0x3*_0xbbdeb9+0x2]=_0xc5c2b8[_0x2c8f3a(0x10e)];}const _0x3a62fe={'context':_0x2a19b2,'width':_0x1a4aa1,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4[(_0x2c8f3a(0xba))]({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter'][_0x2c8f3a(0x14e)]})};this['textures']={'segmentsColor':Util[_0x2c8f3a(0xa6)](_0x3ca480),'segmentsDepth':Util[_0x2c8f3a(0xa6)](_0x29c568),'currentTrailsColor':Util['createTexture'](_0x3ca480),'currentTrailsDepth':Util['createTexture'](_0x29c568),'nextTrailsColor':Util[_0x2c8f3a(0xa6)](_0x3ca480),'nextTrailsDepth':Util['createTexture'](_0x29c568),'colorTable':Util['createTexture'](_0x3a62fe,_0xbf2176)};}['createRenderingFramebuffers'](_0x2732c3){const _0x529c77=_0x55787c;this['framebuffers']={'segments':Util['createFramebuffer'](_0x2732c3,this[_0x529c77(0x14a)]['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x2732c3,this['textures']['currentTrailsColor'],this[_0x529c77(0x14a)][_0x529c77(0x12a)]),'nextTrails':Util[_0x529c77(0x13a)](_0x2732c3,this['textures']['nextTrailsColor'],this[_0x529c77(0x14a)]['nextTrailsDepth'])};}[_0x55787c(0x135)](_0x38242c){const _0x208c32=_0x55787c,_0x5d0688=0x4;let _0x1aff6a=[];for(let _0x2d7e87=0x0;_0x2d7e87<_0x38242c[_0x208c32(0x113)];_0x2d7e87++){for(let _0x313351=0x0;_0x313351<_0x38242c['particlesTextureSize'];_0x313351++){for(let _0x408e11=0x0;_0x408e11<_0x5d0688;_0x408e11++){_0x1aff6a['push'](_0x2d7e87/_0x38242c[_0x208c32(0x113)]),_0x1aff6a[_0x208c32(0xef)](_0x313351/_0x38242c['particlesTextureSize']);}}}_0x1aff6a=new Float32Array(_0x1aff6a);let _0x5d1462=[];const _0x375ef0=[-0x1,0x1],_0x4b1d5c=[-0x1,0x1];for(let _0x578a24=0x0;_0x578a24<_0x38242c[_0x208c32(0xa9)];_0x578a24++){for(let _0x242ccf=0x0;_0x242ccf<_0x5d0688/0x2;_0x242ccf++){for(let _0x6426c9=0x0;_0x6426c9<_0x5d0688/0x2;_0x6426c9++){_0x5d1462['push'](_0x375ef0[_0x242ccf]),_0x5d1462['push'](_0x4b1d5c[_0x6426c9]),_0x5d1462[_0x208c32(0xef)](0x0);}}}_0x5d1462=new Float32Array(_0x5d1462);const _0x4d20bf=0x6*_0x38242c['maxParticles'],_0x5e4761=new Uint32Array(_0x4d20bf);for(let _0x2f828b=0x0,_0x5e5cc1=0x0,_0x521470=0x0;_0x2f828b<_0x38242c['maxParticles'];_0x2f828b++){_0x5e4761[_0x5e5cc1++]=_0x521470+0x0,_0x5e4761[_0x5e5cc1++]=_0x521470+0x1,_0x5e4761[_0x5e5cc1++]=_0x521470+0x2,_0x5e4761[_0x5e5cc1++]=_0x521470+0x2,_0x5e4761[_0x5e5cc1++]=_0x521470+0x1,_0x5e4761[_0x5e5cc1++]=_0x521470+0x3,_0x521470+=0x4;}const _0x56a4e2=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x208c32(0xe2)],'componentsPerAttribute':0x2,'values':_0x1aff6a}),'normal':new Cesium$4[(_0x208c32(0xad))]({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x5d1462})}),'indices':_0x5e4761});return _0x56a4e2;}[_0x55787c(0x9b)](_0x101b64,_0x183f0d,_0x24d77a,_0x42c84c){const _0x34c441=_0x55787c,_0x51d4f1=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x183f0d),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0x4e6a2d=_0x540d;return _0x42c84c['particlesTextures'][_0x4e6a2d(0x115)];},'postProcessingPosition':function(){return _0x42c84c['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x42c84c['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x11ef22=_0x540d;return _0x51d4f1[_0x11ef22(0x14a)][_0x11ef22(0x15d)];},'aspect':function(){return _0x101b64['drawingBufferWidth']/_0x101b64['drawingBufferHeight'];},'pixelSize':function(){return _0x24d77a['pixelSize'];},'lineWidth':function(){return _0x183f0d['lineWidth'];},'particleHeight':function(){const _0x1bd923=_0x540d;return _0x183f0d[_0x1bd923(0xd9)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this[_0x34c441(0xf2)]['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0x34c441(0x139)],'uniformMap':{'segmentsColorTexture':function(){const _0x356a81=_0x34c441;return _0x51d4f1[_0x356a81(0x14a)]['segmentsColor'];},'segmentsDepthTexture':function(){return _0x51d4f1['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0x554c4a=_0x34c441;return _0x51d4f1[_0x554c4a(0xf2)]['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x3ed461=_0x34c441;return _0x51d4f1[_0x3ed461(0xf2)]['currentTrails'][_0x3ed461(0x100)];},'fadeOpacity':function(){return _0x183f0d['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util[_0x34c441(0x9e)]({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0x34c441(0xf2)][_0x34c441(0xb1)],'autoClear':!![],'preExecute':function(){const _0x1c19f0=_0x34c441,_0x4f47d1=_0x51d4f1[_0x1c19f0(0xf2)][_0x1c19f0(0x156)];_0x51d4f1['framebuffers']['currentTrails']=_0x51d4f1['framebuffers'][_0x1c19f0(0xb1)],_0x51d4f1['framebuffers']['nextTrails']=_0x4f47d1,_0x51d4f1['primitives']['trails'][_0x1c19f0(0x13d)][_0x1c19f0(0xb6)]=_0x51d4f1['framebuffers']['nextTrails'],_0x51d4f1['primitives']['trails'][_0x1c19f0(0x15e)]['framebuffer']=_0x51d4f1[_0x1c19f0(0xf2)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0x34c441(0x139)],'uniformMap':{'trailsColorTexture':function(){const _0x32d9a3=_0x34c441;return _0x51d4f1[_0x32d9a3(0xf2)]['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x51e89b=_0x34c441;return _0x51d4f1[_0x51e89b(0xf2)]['nextTrails'][_0x51e89b(0x100)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x34c441(0x152))]({'defines':[_0x34c441(0x15b)],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag=_0x55787c(0xca),updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$3=mars3d__namespace[_0x55787c(0x127)];class ParticlesComputing{constructor(_0x94356a,_0x4aa6f3,_0x5a047a,_0x289bf4){const _0x60b717=_0x55787c;this['data']=_0x4aa6f3,this[_0x60b717(0xbe)](_0x94356a,_0x4aa6f3),this['createParticlesTextures'](_0x94356a,_0x5a047a,_0x289bf4),this['createComputingPrimitives'](_0x4aa6f3,_0x5a047a,_0x289bf4);}[_0x55787c(0xbe)](_0x149309,_0x594b87){const _0x1df4cc=_0x55787c,_0x106405={'context':_0x149309,'width':_0x594b87['dimensions'][_0x1df4cc(0xaf)],'height':_0x594b87[_0x1df4cc(0xcb)]['lat']*(_0x594b87[_0x1df4cc(0xcb)][_0x1df4cc(0x10f)]||0x1),'pixelFormat':Cesium$3[_0x1df4cc(0x118)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x1df4cc(0x9f)],'magnificationFilter':Cesium$3[_0x1df4cc(0x93)]['NEAREST']})};this[_0x1df4cc(0x112)]={'U':Util['createTexture'](_0x106405,_0x594b87['U'][_0x1df4cc(0x10c)]),'V':Util['createTexture'](_0x106405,_0x594b87['V'][_0x1df4cc(0x10c)])};}[_0x55787c(0x10b)](_0x22f495,_0x3bdf3a,_0x820719){const _0x74a70a=_0x55787c,_0x3b2d9a={'context':_0x22f495,'width':_0x3bdf3a[_0x74a70a(0x113)],'height':_0x3bdf3a['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat'][_0x74a70a(0xce)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x74a70a(0xba))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x74a70a(0x9f)]})},_0x20336a=this['randomizeParticles'](_0x3bdf3a['maxParticles'],_0x820719),_0x1b9a40=new Float32Array(0x4*_0x3bdf3a['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x3b2d9a),'currentParticlesPosition':Util['createTexture'](_0x3b2d9a,_0x20336a),'nextParticlesPosition':Util[_0x74a70a(0xa6)](_0x3b2d9a,_0x20336a),'currentParticlesSpeed':Util[_0x74a70a(0xa6)](_0x3b2d9a,_0x1b9a40),'nextParticlesSpeed':Util['createTexture'](_0x3b2d9a,_0x1b9a40),'postProcessingPosition':Util['createTexture'](_0x3b2d9a,_0x20336a),'postProcessingSpeed':Util['createTexture'](_0x3b2d9a,_0x1b9a40)};}['randomizeParticles'](_0xea19e4,_0x43d7ed){const _0x6b031e=_0x55787c,_0x12f9a3=new Float32Array(0x4*_0xea19e4);for(let _0x21cd82=0x0;_0x21cd82<_0xea19e4;_0x21cd82++){_0x12f9a3[0x4*_0x21cd82]=Cesium$3['Math']['randomBetween'](_0x43d7ed['lonRange']['x'],_0x43d7ed['lonRange']['y']),_0x12f9a3[0x4*_0x21cd82+0x1]=Cesium$3['Math']['randomBetween'](_0x43d7ed['latRange']['x'],_0x43d7ed['latRange']['y']),_0x12f9a3[0x4*_0x21cd82+0x2]=Cesium$3['Math']['randomBetween'](this['data'][_0x6b031e(0x10f)]['min'],this['data']['lev'][_0x6b031e(0xc2)]),_0x12f9a3[0x4*_0x21cd82+0x3]=0x0;}return _0x12f9a3;}['destroyParticlesTextures'](){const _0x2ebdf0=_0x55787c;Object[_0x2ebdf0(0x10a)](this['particlesTextures'])['forEach'](_0x29fa74=>{const _0x46b563=_0x2ebdf0;this['particlesTextures'][_0x29fa74][_0x46b563(0xb2)]();});}['createComputingPrimitives'](_0x4a0933,_0x3b90a3,_0x55dbd7){const _0x4bb531=_0x55787c,_0x99d4ce=new Cesium$3['Cartesian3'](_0x4a0933[_0x4bb531(0xcb)]['lon'],_0x4a0933['dimensions']['lat'],_0x4a0933[_0x4bb531(0xcb)]['lev']),_0x4aab01=new Cesium$3['Cartesian3'](_0x4a0933['lon']['min'],_0x4a0933[_0x4bb531(0x14f)]['min'],_0x4a0933[_0x4bb531(0x10f)]['min']),_0x378015=new Cesium$3['Cartesian3'](_0x4a0933['lon']['max'],_0x4a0933['lat']['max'],_0x4a0933['lev']['max']),_0x88ab2d=new Cesium$3[(_0x4bb531(0xe4))]((_0x378015['x']-_0x4aab01['x'])/(_0x99d4ce['x']-0x1),(_0x378015['y']-_0x4aab01['y'])/(_0x99d4ce['y']-0x1),_0x99d4ce['z']>0x1?(_0x378015['z']-_0x4aab01['z'])/(_0x99d4ce['z']-0x1):0x1),_0xeb4f15=new Cesium$3['Cartesian2'](_0x4a0933['U'][_0x4bb531(0xec)],_0x4a0933['U']['max']),_0x371b7e=new Cesium$3[(_0x4bb531(0x130))](_0x4a0933['V']['min'],_0x4a0933['V']['max']),_0x507001=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x507001['windTextures']['U'];},'V':function(){return _0x507001['windTextures']['V'];},'currentParticlesPosition':function(){const _0x8c8fb6=_0x4bb531;return _0x507001[_0x8c8fb6(0xcf)]['currentParticlesPosition'];},'dimension':function(){return _0x99d4ce;},'minimum':function(){return _0x4aab01;},'maximum':function(){return _0x378015;},'interval':function(){return _0x88ab2d;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x4bb531(0x107)],'preExecute':function(){const _0x17101e=_0x4bb531;_0x507001['primitives']['getWind']['commandToExecute']['outputTexture']=_0x507001[_0x17101e(0xcf)]['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x52234f=_0x4bb531;return _0x507001[_0x52234f(0xcf)]['currentParticlesSpeed'];},'particlesWind':function(){const _0x14dc3a=_0x4bb531;return _0x507001['particlesTextures'][_0x14dc3a(0x107)];},'uSpeedRange':function(){return _0xeb4f15;},'vSpeedRange':function(){return _0x371b7e;},'pixelSize':function(){return _0x55dbd7['pixelSize'];},'speedFactor':function(){return _0x3b90a3['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this[_0x4bb531(0xcf)]['nextParticlesSpeed'],'preExecute':function(){const _0x5ac039=_0x4bb531,_0x5bcf7d=_0x507001['particlesTextures']['currentParticlesSpeed'];_0x507001[_0x5ac039(0xcf)]['currentParticlesSpeed']=_0x507001['particlesTextures']['postProcessingSpeed'],_0x507001['particlesTextures']['postProcessingSpeed']=_0x5bcf7d,_0x507001['primitives']['updateSpeed']['commandToExecute'][_0x5ac039(0x136)]=_0x507001['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x507001['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){return _0x507001['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures'][_0x4bb531(0x12f)],'preExecute':function(){const _0xbb5c5c=_0x4bb531,_0xd86c6d=_0x507001['particlesTextures']['currentParticlesPosition'];_0x507001['particlesTextures'][_0xbb5c5c(0x115)]=_0x507001['particlesTextures']['postProcessingPosition'],_0x507001[_0xbb5c5c(0xcf)]['postProcessingPosition']=_0xd86c6d,_0x507001['primitives']['updatePosition']['commandToExecute']['outputTexture']=_0x507001['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){const _0x5dc147=_0x4bb531;return _0x507001[_0x5dc147(0xcf)]['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x5a115d=_0x4bb531;return _0x507001['particlesTextures'][_0x5a115d(0xcd)];},'lonRange':function(){const _0x153a3d=_0x4bb531;return _0x55dbd7[_0x153a3d(0x111)];},'latRange':function(){const _0x1f3843=_0x4bb531;return _0x55dbd7[_0x1f3843(0x98)];},'randomCoefficient':function(){const _0x3b4c20=Math['random']();return _0x3b4c20;},'dropRate':function(){return _0x3b90a3['dropRate'];},'dropRateBump':function(){return _0x3b90a3['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x4bb531(0xcf)]['postProcessingPosition'],'preExecute':function(){const _0x59260d=_0x4bb531;_0x507001['primitives']['postProcessingPosition'][_0x59260d(0x13d)]['outputTexture']=_0x507001['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x23b757=_0x4bb531;return _0x507001[_0x23b757(0xcf)]['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x507001['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){_0x507001['primitives']['postProcessingSpeed']['commandToExecute']['outputTexture']=_0x507001['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x42b7f9,_0x56e07e,_0x26e7f4,_0x4f2369){const _0x10b8c9=_0x55787c;this['context']=_0x42b7f9,_0x56e07e={..._0x56e07e},_0x56e07e['udata']&&_0x56e07e['vdata']&&(_0x56e07e['dimensions']={},_0x56e07e['dimensions'][_0x10b8c9(0xaf)]=_0x56e07e[_0x10b8c9(0x121)],_0x56e07e['dimensions']['lat']=_0x56e07e[_0x10b8c9(0xc4)],_0x56e07e['dimensions'][_0x10b8c9(0x10f)]=_0x56e07e['lev']||0x1,_0x56e07e['lon']={},_0x56e07e['lon']['min']=_0x56e07e['xmin'],_0x56e07e['lon']['max']=_0x56e07e[_0x10b8c9(0xfb)],_0x56e07e[_0x10b8c9(0x14f)]={},_0x56e07e['lat']['min']=_0x56e07e[_0x10b8c9(0x144)],_0x56e07e['lat']['max']=_0x56e07e['ymax'],_0x56e07e['lev']={},_0x56e07e[_0x10b8c9(0x10f)]['min']=_0x56e07e['levmin']??0x1,_0x56e07e['lev']['max']=_0x56e07e['levmax']??0x1,_0x56e07e['U']={},_0x56e07e['U'][_0x10b8c9(0x10c)]=new Float32Array(_0x56e07e[_0x10b8c9(0x95)]),_0x56e07e['U']['min']=_0x56e07e['umin']??Math['min'](..._0x56e07e['udata']),_0x56e07e['U']['max']=_0x56e07e['umax']??Math['max'](..._0x56e07e['udata']),_0x56e07e['V']={},_0x56e07e['V'][_0x10b8c9(0x10c)]=new Float32Array(_0x56e07e['vdata']),_0x56e07e['V'][_0x10b8c9(0xec)]=_0x56e07e['vmin']??Math[_0x10b8c9(0xec)](..._0x56e07e['vdata']),_0x56e07e['V']['max']=_0x56e07e['vmax']??Math['max'](..._0x56e07e[_0x10b8c9(0xb4)])),this['data']=_0x56e07e,this['options']=_0x26e7f4,this[_0x10b8c9(0x163)]=_0x4f2369,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this[_0x10b8c9(0xc9)],this[_0x10b8c9(0x146)],this['viewerParameters'],this[_0x10b8c9(0x12d)]);}['canvasResize'](_0x316430){const _0x17e151=_0x55787c;this['particlesComputing']['destroyParticlesTextures'](),Object[_0x17e151(0x10a)](this['particlesComputing'][_0x17e151(0x112)])['forEach'](_0x54c5ec=>{this['particlesComputing']['windTextures'][_0x54c5ec]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x17e151(0xf2)])[_0x17e151(0x105)](_0x2a2ca8=>{this['particlesRendering']['framebuffers'][_0x2a2ca8]['destroy']();}),this['context']=_0x316430,this[_0x17e151(0x12d)]=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x17e151(0x12d)]);}['clearFramebuffers'](){const _0x5174c0=_0x55787c,_0x4deb7b=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object[_0x5174c0(0x10a)](this['particlesRendering'][_0x5174c0(0xf2)])[_0x5174c0(0x105)](_0xd8633c=>{const _0x49000a=_0x5174c0;_0x4deb7b[_0x49000a(0xb6)]=this['particlesRendering'][_0x49000a(0xf2)][_0xd8633c],_0x4deb7b['execute'](this['context']);});}['refreshParticles'](_0x4d9d90){const _0x381f1c=_0x55787c;this['clearFramebuffers'](),this[_0x381f1c(0x12d)]['destroyParticlesTextures'](),this[_0x381f1c(0x12d)]['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x4d9d90){const _0x4ee365=this[_0x381f1c(0x161)]['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives']['segments']['geometry']=_0x4ee365;const _0x595978=Cesium$2['VertexArray'][_0x381f1c(0xd8)]({'context':this['context'],'geometry':_0x4ee365,'attributeLocations':this['particlesRendering']['primitives'][_0x381f1c(0xeb)]['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage'][_0x381f1c(0x9a)]});this[_0x381f1c(0x161)]['primitives']['segments']['commandToExecute']['vertexArray']=_0x595978;}}['setOptions'](_0x4ba9e9){const _0x55033a=_0x55787c;let _0x24b4ba=![];this['options'][_0x55033a(0xa9)]!==_0x4ba9e9['maxParticles']&&(_0x24b4ba=!![]),Object[_0x55033a(0x10a)](_0x4ba9e9)['forEach'](_0x5abb97=>{this['options'][_0x5abb97]=_0x4ba9e9[_0x5abb97];}),this['refreshParticles'](_0x24b4ba);}['applyViewerParameters'](_0x3d553){const _0x494890=_0x55787c;Object['keys'](_0x3d553)[_0x494890(0x105)](_0x89a21c=>{this['viewerParameters'][_0x89a21c]=_0x3d553[_0x89a21c];}),this['refreshParticles'](![]);}['destroy'](){const _0x3f8c9d=_0x55787c;clearTimeout(this['canrefresh']),this[_0x3f8c9d(0x12d)][_0x3f8c9d(0x145)](),Object['keys'](this[_0x3f8c9d(0x12d)][_0x3f8c9d(0x112)])['forEach'](_0x4f47cf=>{this['particlesComputing']['windTextures'][_0x4f47cf]['destroy']();}),this[_0x3f8c9d(0x161)]['textures'][_0x3f8c9d(0x15d)]['destroy'](),Object['keys'](this['particlesRendering'][_0x3f8c9d(0xf2)])[_0x3f8c9d(0x105)](_0x31cec0=>{const _0x129b6f=_0x3f8c9d;this[_0x129b6f(0x161)]['framebuffers'][_0x31cec0][_0x129b6f(0xb2)]();});for(const _0x93786f in this){delete this[_0x93786f];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x55787c(0x166)]};class WindLayer extends BaseLayer$1{constructor(_0x56f488={}){_0x56f488={...DEF_OPTIONS,..._0x56f488},super(_0x56f488),this['_setOptionsHook'](_0x56f488);}get['layer'](){return this['primitives'];}get['data'](){return this['_data'];}set['data'](_0x52764d){const _0x20fc19=_0x55787c;this[_0x20fc19(0x169)](_0x52764d);}get['colors'](){return this['options']['colors'];}set['colors'](_0x247ae1){const _0x4977e5=_0x55787c;this['options']['colors']=_0x247ae1,this['particleSystem']&&this['particleSystem'][_0x4977e5(0x11d)]({'colors':_0x247ae1}),this[_0x4977e5(0x13c)]();}[_0x55787c(0x114)](){}['_addedHook'](){const _0x37a14b=_0x55787c;this['scene']=this['_map']['scene'],this[_0x37a14b(0x103)]=this['_map']['camera'],this[_0x37a14b(0x16e)]=new Cesium$1['PrimitiveCollection'](),this[_0x37a14b(0xe8)]['scene']['primitives']['add'](this['primitives']),this[_0x37a14b(0x163)]={'lonRange':new Cesium$1[(_0x37a14b(0x130))](),'latRange':new Cesium$1[(_0x37a14b(0x130))](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1[_0x37a14b(0xe4)][_0x37a14b(0x104)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this[_0x37a14b(0x13c)][_0x37a14b(0xf6)](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType'][_0x37a14b(0x109)],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x37a14b(0xfd)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x37a14b(0xb0)],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_data']&&this['setData'](this['_data']);}['_removedHook'](){const _0x594a36=_0x55787c;window['removeEventListener']('resize',this['resize']),this['_map']['off'](mars3d__namespace[_0x594a36(0xc1)]['preRender'],this['_onMap_preRenderEvent'],this),this[_0x594a36(0xe8)]['off'](mars3d__namespace['EventType']['wheel'],this[_0x594a36(0x16d)],this),this['_map'][_0x594a36(0xbd)](mars3d__namespace['EventType'][_0x594a36(0xbf)],this[_0x594a36(0xfd)],this),this[_0x594a36(0xe8)]['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x594a36(0xb7)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this[_0x594a36(0xe8)]['scene']['primitives']['remove'](this['primitives']);}['resize'](){const _0x180ca2=_0x55787c;if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this['_map'][_0x180ca2(0x102)](mars3d__namespace['EventType']['preRender'],this[_0x180ca2(0x13b)],this);}['_onMap_preRenderEvent'](_0x50de2b){const _0x20a600=_0x55787c;this['particleSystem']['canvasResize'](this[_0x20a600(0xa7)]['context']),this[_0x20a600(0x154)](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x2d4d8b){const _0x993214=_0x55787c;clearTimeout(this[_0x993214(0xea)]);if(!this['show']||!this[_0x993214(0x12c)])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}[_0x55787c(0xfd)](_0x4ac89a){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x5c7e84){const _0x2fb1b4=_0x55787c;if(!this[_0x2fb1b4(0xc0)]||!this[_0x2fb1b4(0x12c)])return;this['mouse_down']&&(this['primitives'][_0x2fb1b4(0xc0)]=![],this[_0x2fb1b4(0xa2)]=!![]);}['_onMouseUpEvent'](_0x320479){const _0x2e9afb=_0x55787c;if(!this[_0x2e9afb(0xc0)]||!this[_0x2e9afb(0x12c)])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0x5ea8f9=_0x55787c;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this[_0x5ea8f9(0x12c)][_0x5ea8f9(0x155)](this['viewerParameters']),this[_0x5ea8f9(0x16e)]['show']=!![];}['setData'](_0x5dd0a6){const _0x14088d=_0x55787c;this[_0x14088d(0xa3)]=_0x5dd0a6,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x14088d(0x123)],_0x5dd0a6,this[_0x14088d(0xa5)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x15efc3,_0x534aff){const _0x1ea354=_0x55787c;if(_0x15efc3)for(const _0x64df07 in _0x15efc3){this[_0x64df07]=_0x15efc3[_0x64df07];}this['particleSystem']&&this[_0x1ea354(0x12c)]['setOptions'](this['getOptions']());}['getOptions'](){const _0x415cd4=_0x55787c,_0x43fb7e=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this[_0x415cd4(0x119)]=_0x43fb7e*_0x43fb7e,{'particlesTextureSize':_0x43fb7e,'maxParticles':this[_0x415cd4(0x119)],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this[_0x415cd4(0xe3)],'dropRateBump':this[_0x415cd4(0x108)],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x25a9ea=_0x55787c;this['primitives']['add'](this[_0x25a9ea(0x12c)][_0x25a9ea(0x12d)]['primitives']['getWind']),this['primitives']['add'](this[_0x25a9ea(0x12c)]['particlesComputing']['primitives']['updateSpeed']),this['primitives']['add'](this['particleSystem'][_0x25a9ea(0x12d)][_0x25a9ea(0x16e)]['updatePosition']),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x25a9ea(0x16e)][_0x25a9ea(0xf3)]),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x25a9ea(0x16e)][_0x25a9ea(0x99)]),this[_0x25a9ea(0x16e)][_0x25a9ea(0xa0)](this['particleSystem']['particlesRendering'][_0x25a9ea(0x16e)]['segments']),this[_0x25a9ea(0x16e)]['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this['primitives'][_0x25a9ea(0xa0)](this['particleSystem']['particlesRendering']['primitives']['screen']);}[_0x55787c(0x122)](){const _0xe3fa1e=_0x55787c;let _0x457af1=this[_0xe3fa1e(0x103)]['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x457af1){const _0x2c503b=this[_0xe3fa1e(0xe8)]['getExtent']();_0x457af1=Cesium$1['Rectangle']['fromDegrees'](_0x2c503b['xmin'],_0x2c503b[_0xe3fa1e(0x144)],_0x2c503b['xmax'],_0x2c503b[_0xe3fa1e(0xb8)]);}const _0x37fbad=Util[_0xe3fa1e(0xdc)](_0x457af1);this['viewerParameters']['lonRange']['x']=_0x37fbad['lon']['min'],this['viewerParameters']['lonRange']['y']=_0x37fbad[_0xe3fa1e(0xaf)][_0xe3fa1e(0xc2)],this['viewerParameters'][_0xe3fa1e(0x98)]['x']=_0x37fbad['lat']['min'],this['viewerParameters']['latRange']['y']=_0x37fbad['lat']['max'];const _0x4da1bb=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene'][_0xe3fa1e(0x13f)]);_0x4da1bb>0x0&&(this[_0xe3fa1e(0x163)]['pixelSize']=_0x4da1bb);}}mars3d__namespace['LayerUtil']['register'](_0x55787c(0x12b),WindLayer),mars3d__namespace['layer'][_0x55787c(0xac)]=WindLayer;class CanvasParticle{constructor(){const _0x545d4b=_0x55787c;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x545d4b(0xd7)]=null,this[_0x545d4b(0xa8)]=null;}['destroy'](){for(const _0x328155 in this){delete this[_0x328155];}}}class CanvasWindField{constructor(_0x56db1b){this['setOptions'](_0x56db1b);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x4fd78d){const _0x178aa9=_0x55787c;this[_0x178aa9(0xb3)]=(0x64-(_0x4fd78d>0x63?0x63:_0x4fd78d))*0x64,this[_0x178aa9(0x151)]=[(this['xmax']-this[_0x178aa9(0x131)])/this['_speedRate'],(this['ymax']-this['ymin'])/this[_0x178aa9(0xb3)]];}get['maxAge'](){return this['_maxAge'];}set['maxAge'](_0x4033bd){this['_maxAge']=_0x4033bd;}[_0x55787c(0x11d)](_0x5e2956){const _0x4edba4=_0x55787c;this['options']=_0x5e2956,this['maxAge']=_0x5e2956['maxAge']||0x78,this['speedRate']=_0x5e2956[_0x4edba4(0xd4)]||0x32,this['particles']=[];const _0x14dead=_0x5e2956['particlesNumber']||0x1000;for(let _0x1308b3=0x0;_0x1308b3<_0x14dead;_0x1308b3++){const _0x171c50=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x171c50);}}[_0x55787c(0x16f)](_0x1835e1){const _0x5eebf7=_0x55787c;this[_0x5eebf7(0xc4)]=_0x1835e1['rows'],this['cols']=_0x1835e1['cols'],this['xmin']=_0x1835e1['xmin'],this['xmax']=_0x1835e1['xmax'],this['ymin']=_0x1835e1[_0x5eebf7(0x144)],this['ymax']=_0x1835e1['ymax'],this['grid']=[];const _0x5897b6=_0x1835e1['udata'],_0x45ec33=_0x1835e1['vdata'];let _0x1c72ef=![];_0x5897b6[_0x5eebf7(0xdd)]===this['rows']&&_0x5897b6[0x0]['length']===this['cols']&&(_0x1c72ef=!![]);let _0x2fd230=0x0,_0x3d6a7e=null,_0x2e5888=null;for(let _0x25d19e=0x0;_0x25d19e<this['rows'];_0x25d19e++){_0x3d6a7e=[];for(let _0x5e5490=0x0;_0x5e5490<this['cols'];_0x5e5490++,_0x2fd230++){_0x1c72ef?_0x2e5888=this['_calcUV'](_0x5897b6[_0x25d19e][_0x5e5490],_0x45ec33[_0x25d19e][_0x5e5490]):_0x2e5888=this['_calcUV'](_0x5897b6[_0x2fd230],_0x45ec33[_0x2fd230]),_0x3d6a7e[_0x5eebf7(0xef)](_0x2e5888);}this['grid']['push'](_0x3d6a7e);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x4b3437=_0x55787c;delete this[_0x4b3437(0xc4)],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}[_0x55787c(0x94)](_0x37497a,_0x1a2997){const _0x108adc=_0x55787c,_0x45ea97=(_0x37497a-this[_0x108adc(0x131)])/(this['xmax']-this[_0x108adc(0x131)])*(this['cols']-0x1),_0x5e954f=(this[_0x108adc(0xb8)]-_0x1a2997)/(this['ymax']-this[_0x108adc(0x144)])*(this['rows']-0x1);return[_0x45ea97,_0x5e954f];}['getUVByXY'](_0x266193,_0x58dd8f){const _0x47af92=_0x55787c;if(_0x266193<0x0||_0x266193>=this[_0x47af92(0x121)]||_0x58dd8f>=this['rows'])return[0x0,0x0,0x0];const _0x416d2d=Math['floor'](_0x266193),_0x4ee3a6=Math['floor'](_0x58dd8f);if(_0x416d2d===_0x266193&&_0x4ee3a6===_0x58dd8f)return this['grid'][_0x58dd8f][_0x266193];const _0x3794c4=_0x416d2d+0x1,_0x3ce5c1=_0x4ee3a6+0x1,_0x101f22=this[_0x47af92(0xe6)](_0x416d2d,_0x4ee3a6),_0x87be59=this[_0x47af92(0xe6)](_0x3794c4,_0x4ee3a6),_0x142b31=this['getUVByXY'](_0x416d2d,_0x3ce5c1),_0x4cbba9=this['getUVByXY'](_0x3794c4,_0x3ce5c1);let _0x18996e=null;try{_0x18996e=this[_0x47af92(0x16b)](_0x266193-_0x416d2d,_0x58dd8f-_0x4ee3a6,_0x101f22,_0x87be59,_0x142b31,_0x4cbba9);}catch(_0x369fee){console['log'](_0x266193,_0x58dd8f);}return _0x18996e;}['_bilinearInterpolation'](_0x326a5b,_0x4b9735,_0x38e19f,_0x25406e,_0x2f813d,_0x2b49e2){const _0x3c0f33=0x1-_0x326a5b,_0x39e4cf=0x1-_0x4b9735,_0x7c292d=_0x3c0f33*_0x39e4cf,_0x31b05f=_0x326a5b*_0x39e4cf,_0x3703d8=_0x3c0f33*_0x4b9735,_0x8f9d0d=_0x326a5b*_0x4b9735,_0x3fa790=_0x38e19f[0x0]*_0x7c292d+_0x25406e[0x0]*_0x31b05f+_0x2f813d[0x0]*_0x3703d8+_0x2b49e2[0x0]*_0x8f9d0d,_0x4f88a9=_0x38e19f[0x1]*_0x7c292d+_0x25406e[0x1]*_0x31b05f+_0x2f813d[0x1]*_0x3703d8+_0x2b49e2[0x1]*_0x8f9d0d;return this['_calcUV'](_0x3fa790,_0x4f88a9);}[_0x55787c(0xee)](_0x2840d7,_0x450d37){return[+_0x2840d7,+_0x450d37,Math['sqrt'](_0x2840d7*_0x2840d7+_0x450d37*_0x450d37)];}['getUVByPoint'](_0x4975c4,_0x29e8b1){if(!this['isInExtent'](_0x4975c4,_0x29e8b1))return null;const _0x3782bf=this['toGridXY'](_0x4975c4,_0x29e8b1),_0x1f8992=this['getUVByXY'](_0x3782bf[0x0],_0x3782bf[0x1]);return _0x1f8992;}['isInExtent'](_0x396a4e,_0x98ff64){const _0x541493=_0x55787c;return _0x396a4e>=this[_0x541493(0x131)]&&_0x396a4e<=this[_0x541493(0xfb)]&&_0x98ff64>=this[_0x541493(0x144)]&&_0x98ff64<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x2fb677=_0x55787c,_0x8c017=fRandomByfloat(this['xmin'],this[_0x2fb677(0xfb)]),_0x6d4e4e=fRandomByfloat(this[_0x2fb677(0x144)],this['ymax']);return{'lat':_0x6d4e4e,'lng':_0x8c017};}['getParticles'](){const _0x5ed161=_0x55787c;let _0xb2b215,_0x41f1e9,_0x3d8543;for(let _0x392263=0x0,_0x1348b7=this['particles']['length'];_0x392263<_0x1348b7;_0x392263++){let _0x11a69b=this['particles'][_0x392263];_0x11a69b['age']<=0x0&&(_0x11a69b=this['_randomParticle'](_0x11a69b));if(_0x11a69b['age']>0x0){const _0x10c3d0=_0x11a69b[_0x5ed161(0x96)],_0x9ac72a=_0x11a69b['tlat'];_0x3d8543=this['getUVByPoint'](_0x10c3d0,_0x9ac72a),_0x3d8543?(_0xb2b215=_0x10c3d0+this['_calc_speedRate'][0x0]*_0x3d8543[0x0],_0x41f1e9=_0x9ac72a+this['_calc_speedRate'][0x1]*_0x3d8543[0x1],_0x11a69b['lng']=_0x10c3d0,_0x11a69b[_0x5ed161(0x14f)]=_0x9ac72a,_0x11a69b['tlng']=_0xb2b215,_0x11a69b['tlat']=_0x41f1e9,_0x11a69b[_0x5ed161(0xa8)]--):_0x11a69b['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x34a162){const _0x48af14=_0x55787c;let _0x2c9685,_0x507573;for(let _0x17926c=0x0;_0x17926c<0x1e;_0x17926c++){_0x2c9685=this[_0x48af14(0x168)](),_0x507573=this['getUVByPoint'](_0x2c9685['lng'],_0x2c9685['lat']);if(_0x507573&&_0x507573[0x2]>0x0)break;}if(!_0x507573)return _0x34a162;const _0x1523a1=_0x2c9685['lng']+this['_calc_speedRate'][0x0]*_0x507573[0x0],_0x4e8756=_0x2c9685['lat']+this['_calc_speedRate'][0x1]*_0x507573[0x1];return _0x34a162['lng']=_0x2c9685['lng'],_0x34a162['lat']=_0x2c9685['lat'],_0x34a162['tlng']=_0x1523a1,_0x34a162['tlat']=_0x4e8756,_0x34a162['age']=Math[_0x48af14(0x159)](Math['random']()*this['maxAge']),_0x34a162;}[_0x55787c(0xb2)](){for(const _0x456e95 in this){delete this[_0x456e95];}}}function fRandomByfloat(_0xa8322b,_0x165b7f){return _0xa8322b+Math['random']()*(_0x165b7f-_0xa8322b);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x55787c(0xb9)][_0x55787c(0xda)];class CanvasWindLayer extends BaseLayer{constructor(_0x3cb11d={}){super(_0x3cb11d),this['_setOptionsHook'](_0x3cb11d),this['canvas']=null;}['_setOptionsHook'](_0x1fd621,_0x18fd9f){const _0x492f46=_0x55787c;this['frameTime']=0x3e8/(_0x1fd621[_0x492f46(0xed)]||0xa),this[_0x492f46(0xae)]=this['options']['pointerEvents']??![],this['color']=_0x1fd621['color']||'#ffffff',this['lineWidth']=_0x1fd621['lineWidth']||0x1,this[_0x492f46(0xa4)]=_0x1fd621[_0x492f46(0xa4)]??0x0,this['reverseY']=_0x1fd621[_0x492f46(0x11b)]??![],this['windField']&&this['windField'][_0x492f46(0x11d)](_0x1fd621);}get[_0x55787c(0xb9)](){const _0x22bbc3=_0x55787c;return this[_0x22bbc3(0xc8)];}get['canvasWidth'](){const _0x3d27fe=_0x55787c;return this[_0x3d27fe(0xe8)][_0x3d27fe(0xa7)]['canvas']['clientWidth'];}get['canvasHeight'](){const _0x1fa35d=_0x55787c;return this['_map']['scene']['canvas'][_0x1fa35d(0x149)];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0x55787c(0x11e)](_0x2b20ef){const _0x3efa01=_0x55787c;this['_pointerEvents']=_0x2b20ef;if(!this[_0x3efa01(0xc8)])return;_0x2b20ef?this[_0x3efa01(0xc8)]['style']['pointer-events']='all':this['canvas']['style'][_0x3efa01(0xbb)]=_0x3efa01(0xde);}get['particlesNumber'](){const _0x43a72e=_0x55787c;return this[_0x43a72e(0x146)][_0x43a72e(0x119)];}set['particlesNumber'](_0x29639b){const _0x32f608=_0x55787c;this['options']['particlesNumber']=_0x29639b,clearTimeout(this['_canrefresh']),this[_0x32f608(0x143)]=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x37a586){const _0x25587b=_0x55787c;this[_0x25587b(0x146)]['speedRate']=_0x37a586,this['windField']&&(this['windField']['speedRate']=_0x37a586);}get[_0x55787c(0xd3)](){const _0x528824=_0x55787c;return this['options'][_0x528824(0xd3)];}set['maxAge'](_0x55982b){const _0x559eed=_0x55787c;this['options']['maxAge']=_0x55982b,this['windField']&&(this[_0x559eed(0x16c)]['maxAge']=_0x55982b);}get['data'](){const _0x4ca0fa=_0x55787c;return this[_0x4ca0fa(0x14c)];}set['data'](_0x35d141){this['setData'](_0x35d141);}['_showHook'](_0x4f46e4){const _0x4fc179=_0x55787c;_0x4f46e4?this[_0x4fc179(0x12e)]():(this[_0x4fc179(0x14c)]&&(this[_0x4fc179(0x146)]['data']=this[_0x4fc179(0x14c)]),this['_removedHook']());}['_mountedHook'](){const _0x708acc=_0x55787c;this['options'][_0x708acc(0x15f)]?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x393c79=_0x55787c;this[_0x393c79(0xc8)]=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x393c79(0xf1)](),this[_0x393c79(0x146)]['data']&&this[_0x393c79(0x169)](this['options'][_0x393c79(0xc9)]);}['_removedHook'](){const _0x2d378f=_0x55787c;this['clear'](),this['unbindEvent'](),this[_0x2d378f(0xc8)]&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x3ef515=_0x55787c,_0x4e8747=mars3d__namespace['DomUtil']['create'](_0x3ef515(0xc8),_0x3ef515(0x101),this['_map'][_0x3ef515(0x11a)]);return _0x4e8747[_0x3ef515(0xf8)]['position']='absolute',_0x4e8747[_0x3ef515(0xf8)]['top']='0px',_0x4e8747['style']['left']='0px',_0x4e8747['style']['width']=this['_map']['scene'][_0x3ef515(0xc8)][_0x3ef515(0x133)]+'px',_0x4e8747[_0x3ef515(0xf8)]['height']=this['_map'][_0x3ef515(0xa7)]['canvas']['clientHeight']+'px',_0x4e8747['style'][_0x3ef515(0x11e)]=this['_pointerEvents']?'auto':'none',_0x4e8747[_0x3ef515(0xf8)]['zIndex']=this[_0x3ef515(0x146)]['zIndex']??0x9,_0x4e8747['width']=this[_0x3ef515(0xe8)]['scene']['canvas']['clientWidth'],_0x4e8747[_0x3ef515(0x140)]=this[_0x3ef515(0xe8)]['scene']['canvas'][_0x3ef515(0x149)],_0x4e8747;}['resize'](){const _0x5bc353=_0x55787c;this['canvas']&&(this['canvas'][_0x5bc353(0xf8)]['width']=this['_map']['scene'][_0x5bc353(0xc8)]['clientWidth']+'px',this['canvas']['style']['height']=this[_0x5bc353(0xe8)][_0x5bc353(0xa7)]['canvas']['clientHeight']+'px',this['canvas']['width']=this[_0x5bc353(0xe8)]['scene'][_0x5bc353(0xc8)]['clientWidth'],this['canvas']['height']=this[_0x5bc353(0xe8)]['scene']['canvas'][_0x5bc353(0x149)]);}['bindEvent'](){const _0x2eaaa8=_0x55787c,_0x5efaae=this;let _0x3180a5=Date[_0x2eaaa8(0xe9)]();(function _0x19b84b(){const _0x29c9d0=_0x2eaaa8;_0x5efaae['animateFrame']=window[_0x29c9d0(0xe1)](_0x19b84b);if(_0x5efaae[_0x29c9d0(0xc0)]&&_0x5efaae['windField']){const _0x29c8e0=Date[_0x29c9d0(0xe9)](),_0x28729a=_0x29c8e0-_0x3180a5;_0x28729a>_0x5efaae['frameTime']&&(_0x3180a5=_0x29c8e0-_0x28729a%_0x5efaae[_0x29c9d0(0xcc)],_0x5efaae['update']());}}(),window[_0x2eaaa8(0x9c)]('resize',this[_0x2eaaa8(0x13c)]['bind'](this),![]),this['mouse_down']=![],this[_0x2eaaa8(0xa2)]=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x2eaaa8(0x16d)],this),this[_0x2eaaa8(0xe8)]['on'](mars3d__namespace[_0x2eaaa8(0xc1)][_0x2eaaa8(0xbf)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x2eaaa8(0xc1)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x6a01a8=_0x55787c;window[_0x6a01a8(0x138)](this[_0x6a01a8(0x11c)]),delete this['animateFrame'],window[_0x6a01a8(0xc7)]('resize',this[_0x6a01a8(0x13c)]),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace[_0x6a01a8(0xc1)]['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace[_0x6a01a8(0xc1)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x6a01a8(0x157)],this));}['_onMapWhellEvent'](_0x5b64cf){clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas']['style']['visibility']='hidden',this['refreshTimer']=setTimeout(()=>{const _0x267215=_0x540d;if(!this[_0x267215(0xc0)])return;this['redraw'](),this['canvas']['style']['visibility']=_0x267215(0xab);},0xc8);}[_0x55787c(0xfd)](_0x549ad4){const _0x165baa=_0x55787c;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace[_0x165baa(0xc1)]['mouseMove'],this[_0x165baa(0x157)],this);}[_0x55787c(0x157)](_0x2db880){const _0x4ca7ea=_0x55787c;if(!this[_0x4ca7ea(0xc0)]||!this[_0x4ca7ea(0xc8)])return;this['mouse_down']&&(this['canvas']['style']['visibility']=_0x4ca7ea(0xd6),this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x8a1f72){const _0x4abdd2=_0x55787c;if(!this['show']||!this[_0x4abdd2(0xc8)])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['canvas']['style']['visibility']='visible',this[_0x4abdd2(0x129)]=![],this['mouse_move']=![];}[_0x55787c(0x169)](_0x24563f){const _0x1d3dd1=_0x55787c;this[_0x1d3dd1(0x153)](),this[_0x1d3dd1(0x14c)]=_0x24563f,this['windField']['setDate'](_0x24563f),this['redraw']();}[_0x55787c(0xd5)](){const _0xc9336c=_0x55787c;if(!this[_0xc9336c(0xc0)])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){const _0x1d20ad=_0x55787c;if(this['_updateIng'])return;this['_updateIng']=!![];if(this[_0x1d20ad(0x15f)])this['windField']['update']();else{const _0x39135f=this['windField'][_0x1d20ad(0xf5)]();this[_0x1d20ad(0x142)](_0x39135f);}this['_updateIng']=![];}[_0x55787c(0x142)](_0x313ce0){const _0x5660c7=_0x55787c;this['canvasContext']['globalCompositeOperation']='destination-in',this[_0x5660c7(0x124)]['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext'][_0x5660c7(0x97)]=0.9,this['canvasContext']['beginPath'](),this['canvasContext'][_0x5660c7(0x126)]=this['lineWidth'],this['canvasContext']['strokeStyle']=this['color'];const _0x9fabf3=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x2e3c0f=this['canvasWidth']*0.25;for(let _0x2ba329=0x0,_0x3e4d3d=_0x313ce0['length'];_0x2ba329<_0x3e4d3d;_0x2ba329++){const _0x133472=_0x313ce0[_0x2ba329],_0x464fa0=this['_tomap'](_0x133472['lng'],_0x133472['lat'],_0x133472),_0x240988=this['_tomap'](_0x133472['tlng'],_0x133472['tlat'],_0x133472);if(!_0x464fa0||!_0x240988)continue;if(_0x9fabf3&&Math['abs'](_0x464fa0[0x0]-_0x240988[0x0])>=_0x2e3c0f)continue;this[_0x5660c7(0x124)]['moveTo'](_0x464fa0[0x0],_0x464fa0[0x1]),this['canvasContext']['lineTo'](_0x240988[0x0],_0x240988[0x1]);}this[_0x5660c7(0x124)]['stroke']();}['_tomap'](_0x5dc5d8,_0x29dd47,_0x28f872){const _0x44c8c8=_0x55787c,_0x3f3093=Cesium['Cartesian3']['fromDegrees'](_0x5dc5d8,_0x29dd47,this['fixedHeight']),_0x2c62bf=this['_map']['scene'];if(_0x2c62bf['mode']===Cesium[_0x44c8c8(0x128)]['SCENE3D']){const _0x70bcb0=new Cesium['EllipsoidalOccluder'](_0x2c62bf['globe'][_0x44c8c8(0xdf)],_0x2c62bf['camera'][_0x44c8c8(0x110)]),_0xe9f21d=_0x70bcb0['isPointVisible'](_0x3f3093);if(!_0xe9f21d)return _0x28f872['age']=0x0,null;}const _0x3b5184=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x44c8c8(0xe8)][_0x44c8c8(0xa7)],_0x3f3093);return _0x3b5184?[_0x3b5184['x'],_0x3b5184['y']]:null;}[_0x55787c(0x153)](){const _0x57572a=_0x55787c;this['windField']['clear'](),delete this[_0x57572a(0x14c)];}['initWorker'](){const _0xee72c0=_0x55787c;this['worker']=new Worker(this[_0xee72c0(0x146)]['worker']),this[_0xee72c0(0x15f)][_0xee72c0(0x162)]=_0x8bc59f=>{this['_drawLines'](_0x8bc59f['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x16649b=>{const _0x3d66c8=_0xee72c0;this[_0x3d66c8(0x15f)]['postMessage']({'type':'init','options':_0x16649b});},'setOptions':_0x1abeeb=>{const _0x50b77b=_0xee72c0;this['worker'][_0x50b77b(0x16a)]({'type':_0x50b77b(0x11d),'options':_0x1abeeb});},'setDate':_0x2db6f4=>{this['worker']['postMessage']({'type':'setDate','data':_0x2db6f4});},'update':()=>{const _0x1a4f47=_0xee72c0;if(this[_0x1a4f47(0x160)])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField']['init'](this[_0xee72c0(0x146)]);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x55787c(0x134)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x55787c(0xe7)]=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,_0x55787c(0x132),{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-wind",
3
- "version": "3.5.7",
3
+ "version": "3.5.9",
4
4
  "description": "Mars3D平台插件,支持气象 风向图 功能插件",
5
5
  "main": "dist/mars3d-wind.js",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "peerDependencies": {},
10
10
  "devDependencies": {
11
- "mars3d": "~3.5.7"
11
+ "mars3d": "~3.5.9"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "eslint ./src/**/*.{js,ts} --fix"