mars3d-wind 3.6.11 → 3.6.13

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.6.11
5
- * 编译日期:2023-11-03 23:59:30
4
+ * 版本信息:v3.6.13
5
+ * 编译日期:2023-11-21 09:41:48
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 _0x2cd496=_0x238d;(function(_0x5f1b97,_0x42ecfc){const _0xb90ff7=_0x238d,_0x2e99ff=_0x5f1b97();while(!![]){try{const _0x4c4fc1=parseInt(_0xb90ff7(0x234))/0x1+-parseInt(_0xb90ff7(0x1a8))/0x2*(-parseInt(_0xb90ff7(0x20d))/0x3)+-parseInt(_0xb90ff7(0x23e))/0x4*(parseInt(_0xb90ff7(0x20e))/0x5)+parseInt(_0xb90ff7(0x22f))/0x6+parseInt(_0xb90ff7(0x21b))/0x7*(parseInt(_0xb90ff7(0x257))/0x8)+parseInt(_0xb90ff7(0x1ab))/0x9+-parseInt(_0xb90ff7(0x1bf))/0xa;if(_0x4c4fc1===_0x42ecfc)break;else _0x2e99ff['push'](_0x2e99ff['shift']());}catch(_0x2ae19c){_0x2e99ff['push'](_0x2e99ff['shift']());}}}(_0x2402,0x6cce7));function _interopNamespace(_0xb4835e){const _0x491a88=_0x238d;if(_0xb4835e&&_0xb4835e[_0x491a88(0x170)])return _0xb4835e;var _0xc87ee3=Object['create'](null);return _0xb4835e&&Object['keys'](_0xb4835e)['forEach'](function(_0x57a086){const _0x1964a7=_0x491a88;if(_0x57a086!=='default'){var _0x5d2dc8=Object['getOwnPropertyDescriptor'](_0xb4835e,_0x57a086);Object[_0x1964a7(0x19c)](_0xc87ee3,_0x57a086,_0x5d2dc8[_0x1964a7(0x238)]?_0x5d2dc8:{'enumerable':!![],'get':function(){return _0xb4835e[_0x57a086];}});}}),_0xc87ee3['default']=_0xb4835e,_0xc87ee3;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x182fed,_0x56e380){const _0x4363ec=_0x238d,_0x3184ce=_0x182fed*Math[_0x4363ec(0x1b0)](Cesium$7['Math']['toRadians'](_0x56e380));return _0x3184ce;}function getV(_0xd9b260,_0x1f26e5){const _0x1c4307=_0x238d,_0x32627d=_0xd9b260*Math['sin'](Cesium$7['Math'][_0x1c4307(0x17f)](_0x1f26e5));return _0x32627d;}function getSpeed(_0x51121f,_0x2b76a0){const _0x12e1bd=Math['sqrt'](Math['pow'](_0x51121f,0x2)+Math['pow'](_0x2b76a0,0x2));return _0x12e1bd;}function getDirection(_0x3f2995,_0x30ebbe){const _0x2a3ec3=_0x238d;let _0xcce484=Cesium$7[_0x2a3ec3(0x19d)]['toDegrees'](Math['atan2'](_0x30ebbe,_0x3f2995));return _0xcce484+=_0xcce484<0x0?0x168:0x0,_0xcce484;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x1b9489){const _0x280dd9=_0x238d;this['commandType']=_0x1b9489[_0x280dd9(0x251)],this[_0x280dd9(0x1b7)]=_0x1b9489['geometry'],this['attributeLocations']=_0x1b9489['attributeLocations'],this[_0x280dd9(0x1ba)]=_0x1b9489['primitiveType'],this['uniformMap']=_0x1b9489['uniformMap'],this['vertexShaderSource']=_0x1b9489['vertexShaderSource'],this['fragmentShaderSource']=_0x1b9489['fragmentShaderSource'],this['rawRenderState']=_0x1b9489['rawRenderState'],this['framebuffer']=_0x1b9489['framebuffer'],this['outputTexture']=_0x1b9489['outputTexture'],this['autoClear']=_0x1b9489[_0x280dd9(0x206)]??![],this[_0x280dd9(0x169)]=_0x1b9489['preExecute'],this['show']=!![],this[_0x280dd9(0x21e)]=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6[(_0x280dd9(0x187))]({'color':new Cesium$6[(_0x280dd9(0x1f1))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0x280dd9(0x1d9)],'pass':Cesium$6['Pass'][_0x280dd9(0x17a)]}));}[_0x2cd496(0x240)](_0x3c84ed){const _0x1c1c77=_0x2cd496;switch(this['commandType']){case'Draw':{const _0xfa9d7d=Cesium$6['VertexArray']['fromGeometry']({'context':_0x3c84ed,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x554c36=Cesium$6['ShaderProgram']['fromCache']({'context':_0x3c84ed,'attributeLocations':this[_0x1c1c77(0x1ae)],'vertexShaderSource':this[_0x1c1c77(0x226)],'fragmentShaderSource':this[_0x1c1c77(0x1fa)]}),_0x215c1e=Cesium$6['RenderState']['fromCache'](this[_0x1c1c77(0x1bb)]);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x554c36,'vertexArray':_0xfa9d7d,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x215c1e,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0x1c1c77(0x1d9)],'pass':Cesium$6[_0x1c1c77(0x15d)]['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x1c1c77(0x18c):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this[_0x1c1c77(0x1fa)],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x3868ad,_0x37233a){const _0x16aa00=_0x2cd496;this['geometry']=_0x37233a;const _0x360e2e=Cesium$6['VertexArray']['fromGeometry']({'context':_0x3868ad,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x16aa00(0x197)]['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x360e2e;}[_0x2cd496(0x17d)](_0x117314){const _0x91a1e=_0x2cd496;if(!this[_0x91a1e(0x1d1)])return;if(_0x117314[_0x91a1e(0x15f)]!==Cesium$6[_0x91a1e(0x255)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this[_0x91a1e(0x240)](_0x117314['context'])),Cesium$6['defined'](this[_0x91a1e(0x169)])&&this['preExecute'](),Cesium$6[_0x91a1e(0x252)](this[_0x91a1e(0x256)])&&_0x117314[_0x91a1e(0x20a)]['push'](this['clearCommand']),_0x117314['commandList'][_0x91a1e(0x1ca)](this[_0x91a1e(0x21e)]);}['isDestroyed'](){return![];}[_0x2cd496(0x185)](){const _0x55dbef=_0x2cd496;if(this['clearCommand']){var _0x3a15ac,_0x4e9c32;(_0x3a15ac=this[_0x55dbef(0x256)])!==null&&_0x3a15ac!==void 0x0&&_0x3a15ac['vertexArray']&&this['clearCommand'][_0x55dbef(0x183)]['destroy'](),(_0x4e9c32=this['clearCommand'])!==null&&_0x4e9c32!==void 0x0&&_0x4e9c32['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this['commandToExecute']['vertexArray'][_0x55dbef(0x185)](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0x55dbef(0x185)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x4dd92d=function(){const _0x4905c5=_0x238d,_0xb70a14=new Cesium$5[(_0x4905c5(0x1ec))]({'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[(_0x4905c5(0x1e8))]({'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 _0xb70a14;},_0x43ca3a=function(_0x16b4f6,_0x5cbcbb){const _0x20f671=_0x238d;if(Cesium$5['defined'](_0x5cbcbb)){const _0x10ea10={};_0x10ea10['arrayBufferView']=_0x5cbcbb,_0x16b4f6[_0x20f671(0x22d)]=_0x10ea10;}const _0x38e96b=new Cesium$5[(_0x20f671(0x18a))](_0x16b4f6);return _0x38e96b;},_0x451e0c=function(_0x5532de,_0x3a6e48,_0x41af32){const _0x8b554d=new Cesium$5['Framebuffer']({'context':_0x5532de,'colorTextures':[_0x3a6e48],'depthTexture':_0x41af32});return _0x8b554d;},_0x283084=function(_0x2ed8b9){const _0x354b88=_0x238d,_0x23c05f=!![],_0x3c3839=![],_0x20ec16={'viewport':_0x2ed8b9[_0x354b88(0x18d)],'depthTest':_0x2ed8b9['depthTest'],'depthMask':_0x2ed8b9['depthMask'],'blending':_0x2ed8b9['blending']},_0x3787c3=Cesium$5['Appearance']['getDefaultRenderState'](_0x23c05f,_0x3c3839,_0x20ec16);return _0x3787c3;},_0x3b8692=function(_0x1f216d){const _0x193316=_0x238d,_0x468035={},_0x4085cb=Cesium$5['Math']['mod'](_0x1f216d['west'],Cesium$5['Math'][_0x193316(0x193)]),_0x4bfcc0=Cesium$5['Math']['mod'](_0x1f216d['east'],Cesium$5['Math']['TWO_PI']),_0x392669=_0x1f216d['width'];let _0x14888c,_0x1b3c55;_0x392669>Cesium$5[_0x193316(0x19d)]['THREE_PI_OVER_TWO']?(_0x14888c=0x0,_0x1b3c55=Cesium$5['Math']['TWO_PI']):_0x4bfcc0-_0x4085cb<_0x392669?(_0x14888c=_0x4085cb,_0x1b3c55=_0x4085cb+_0x392669):(_0x14888c=_0x4085cb,_0x1b3c55=_0x4bfcc0);_0x468035['lon']={'min':Cesium$5['Math'][_0x193316(0x236)](_0x14888c),'max':Cesium$5['Math']['toDegrees'](_0x1b3c55)};const _0x3a6aed=_0x1f216d['south'],_0xa589cf=_0x1f216d['north'],_0x175d45=_0x1f216d[_0x193316(0x1db)],_0x10a42d=_0x175d45>Cesium$5['Math']['PI']/0xc?_0x175d45/0x2:0x0;let _0x15f646=Cesium$5['Math']['clampToLatitudeRange'](_0x3a6aed-_0x10a42d),_0x2f63e8=Cesium$5[_0x193316(0x19d)]['clampToLatitudeRange'](_0xa589cf+_0x10a42d);return _0x15f646<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x15f646=-Cesium$5[_0x193316(0x19d)][_0x193316(0x1e6)]),_0x2f63e8>Cesium$5['Math'][_0x193316(0x199)]&&(_0x2f63e8=Cesium$5['Math']['PI_OVER_TWO']),_0x468035[_0x193316(0x220)]={'min':Cesium$5[_0x193316(0x19d)]['toDegrees'](_0x15f646),'max':Cesium$5['Math']['toDegrees'](_0x2f63e8)},_0x468035;};return{'getFullscreenQuad':_0x4dd92d,'createTexture':_0x43ca3a,'createFramebuffer':_0x451e0c,'createRawRenderState':_0x283084,'viewRectangleToLonLatRange':_0x3b8692};}());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=_0x2cd496(0x1a4),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=_0x2cd496(0x216),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(_0x522cf5,_0x37712c,_0x567ec2,_0x529d77,_0x34f41a){const _0x378d2b=_0x2cd496;this['createRenderingTextures'](_0x522cf5,_0x37712c,_0x567ec2[_0x378d2b(0x182)]),this['createRenderingFramebuffers'](_0x522cf5),this['createRenderingPrimitives'](_0x522cf5,_0x567ec2,_0x529d77,_0x34f41a);}[_0x2cd496(0x233)](_0x571ff3,_0x15514f,_0x3f17d6){const _0x745d85=_0x2cd496,_0x3de619={'context':_0x571ff3,'width':_0x571ff3['drawingBufferWidth'],'height':_0x571ff3['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x4bf30c={'context':_0x571ff3,'width':_0x571ff3['drawingBufferWidth'],'height':_0x571ff3['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4[_0x745d85(0x24e)][_0x745d85(0x201)]},_0x1b6df9=_0x3f17d6['length'],_0x8dad2d=new Float32Array(_0x1b6df9*0x3);for(let _0x58d454=0x0;_0x58d454<_0x1b6df9;_0x58d454++){const _0xf5eae6=Cesium$4['Color']['fromCssColorString'](_0x3f17d6[_0x58d454]);_0x8dad2d[0x3*_0x58d454]=_0xf5eae6['red'],_0x8dad2d[0x3*_0x58d454+0x1]=_0xf5eae6['green'],_0x8dad2d[0x3*_0x58d454+0x2]=_0xf5eae6['blue'];}const _0x366b56={'context':_0x571ff3,'width':_0x1b6df9,'height':0x1,'pixelFormat':Cesium$4[_0x745d85(0x215)][_0x745d85(0x1c8)],'pixelDatatype':Cesium$4[_0x745d85(0x24e)]['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0x745d85(0x16f)][_0x745d85(0x1a0)],'magnificationFilter':Cesium$4[_0x745d85(0x249)]['LINEAR']})};this['textures']={'segmentsColor':Util[_0x745d85(0x18b)](_0x3de619),'segmentsDepth':Util[_0x745d85(0x18b)](_0x4bf30c),'currentTrailsColor':Util['createTexture'](_0x3de619),'currentTrailsDepth':Util['createTexture'](_0x4bf30c),'nextTrailsColor':Util['createTexture'](_0x3de619),'nextTrailsDepth':Util['createTexture'](_0x4bf30c),'colorTable':Util[_0x745d85(0x18b)](_0x366b56,_0x8dad2d)};}[_0x2cd496(0x1b5)](_0xdea082){const _0x334ca5=_0x2cd496;this[_0x334ca5(0x1ed)]={'segments':Util[_0x334ca5(0x172)](_0xdea082,this[_0x334ca5(0x20c)]['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util[_0x334ca5(0x172)](_0xdea082,this['textures']['currentTrailsColor'],this['textures']['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0xdea082,this[_0x334ca5(0x20c)]['nextTrailsColor'],this['textures'][_0x334ca5(0x1ee)])};}[_0x2cd496(0x1f8)](_0x4f2e04){const _0x5a3f33=_0x2cd496,_0x58c9a6=0x4;let _0x55d987=[];for(let _0x1a6437=0x0;_0x1a6437<_0x4f2e04['particlesTextureSize'];_0x1a6437++){for(let _0x4322e4=0x0;_0x4322e4<_0x4f2e04[_0x5a3f33(0x198)];_0x4322e4++){for(let _0x14a2a7=0x0;_0x14a2a7<_0x58c9a6;_0x14a2a7++){_0x55d987['push'](_0x1a6437/_0x4f2e04[_0x5a3f33(0x198)]),_0x55d987['push'](_0x4322e4/_0x4f2e04[_0x5a3f33(0x198)]);}}}_0x55d987=new Float32Array(_0x55d987);let _0xfee066=[];const _0x23edd5=[-0x1,0x1],_0xdfb791=[-0x1,0x1];for(let _0x430fda=0x0;_0x430fda<_0x4f2e04['maxParticles'];_0x430fda++){for(let _0x11508f=0x0;_0x11508f<_0x58c9a6/0x2;_0x11508f++){for(let _0x49c75e=0x0;_0x49c75e<_0x58c9a6/0x2;_0x49c75e++){_0xfee066['push'](_0x23edd5[_0x11508f]),_0xfee066['push'](_0xdfb791[_0x49c75e]),_0xfee066['push'](0x0);}}}_0xfee066=new Float32Array(_0xfee066);const _0x20d166=0x6*_0x4f2e04['maxParticles'],_0x78845f=new Uint32Array(_0x20d166);for(let _0x431d5e=0x0,_0x47ac94=0x0,_0x5e0533=0x0;_0x431d5e<_0x4f2e04['maxParticles'];_0x431d5e++){_0x78845f[_0x47ac94++]=_0x5e0533+0x0,_0x78845f[_0x47ac94++]=_0x5e0533+0x1,_0x78845f[_0x47ac94++]=_0x5e0533+0x2,_0x78845f[_0x47ac94++]=_0x5e0533+0x2,_0x78845f[_0x47ac94++]=_0x5e0533+0x1,_0x78845f[_0x47ac94++]=_0x5e0533+0x3,_0x5e0533+=0x4;}const _0x5f57cf=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x55d987}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0xfee066})}),'indices':_0x78845f});return _0x5f57cf;}['createRenderingPrimitives'](_0x67c958,_0x332632,_0x3823cc,_0x57d9be){const _0x14c6eb=_0x2cd496,_0xe68d54=this;this[_0x14c6eb(0x22b)]={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0x14c6eb(0x1f8)](_0x332632),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x57d9be['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x57d9be['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x4edcfa=_0x14c6eb;return _0x57d9be[_0x4edcfa(0x24f)]['postProcessingSpeed'];},'colorTable':function(){return _0xe68d54['textures']['colorTable'];},'aspect':function(){const _0x4dce46=_0x14c6eb;return _0x67c958['drawingBufferWidth']/_0x67c958[_0x4dce46(0x1bd)];},'pixelSize':function(){return _0x3823cc['pixelSize'];},'lineWidth':function(){return _0x332632['lineWidth'];},'particleHeight':function(){return _0x332632['particleHeight'];}},'vertexShaderSource':new Cesium$4[(_0x14c6eb(0x1f5))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x14c6eb(0x1ce)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x14c6eb(0x210)]['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0x4f775e=_0x14c6eb;return _0xe68d54['textures'][_0x4f775e(0x250)];},'segmentsDepthTexture':function(){return _0xe68d54['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0x589dc5=_0x14c6eb;return _0xe68d54['framebuffers']['currentTrails'][_0x589dc5(0x1c9)](0x0);},'trailsDepthTexture':function(){const _0x28b69a=_0x14c6eb;return _0xe68d54[_0x28b69a(0x1ed)]['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0x332632['fadeOpacity'];}},'vertexShaderSource':new Cesium$4[(_0x14c6eb(0x1f5))]({'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['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0x14c6eb(0x1d2)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0x14c6eb(0x1ed)]['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x3f3a84=_0x14c6eb,_0x24d643=_0xe68d54[_0x3f3a84(0x1ed)]['currentTrails'];_0xe68d54[_0x3f3a84(0x1ed)][_0x3f3a84(0x194)]=_0xe68d54['framebuffers']['nextTrails'],_0xe68d54[_0x3f3a84(0x1ed)][_0x3f3a84(0x212)]=_0x24d643,_0xe68d54['primitives']['trails']['commandToExecute']['framebuffer']=_0xe68d54['framebuffers']['nextTrails'],_0xe68d54[_0x3f3a84(0x22b)]['trails']['clearCommand']['framebuffer']=_0xe68d54['framebuffers']['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x54d145=_0x14c6eb;return _0xe68d54['framebuffers']['nextTrails'][_0x54d145(0x1c9)](0x0);},'trailsDepthTexture':function(){const _0x1c5862=_0x14c6eb;return _0xe68d54[_0x1c5862(0x1ed)]['nextTrails'][_0x1c5862(0x1cf)];}},'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':[screenDraw_frag]}),'rawRenderState':Util[_0x14c6eb(0x248)]({'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='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',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';function _0x238d(_0x457e92,_0x472394){const _0x2402c5=_0x2402();return _0x238d=function(_0x238df3,_0x980612){_0x238df3=_0x238df3-0x15c;let _0x471890=_0x2402c5[_0x238df3];return _0x471890;},_0x238d(_0x457e92,_0x472394);}const Cesium$3=mars3d__namespace[_0x2cd496(0x235)];class ParticlesComputing{constructor(_0x1935c6,_0x4ab955,_0x33c13c,_0x1fa9b4){const _0x434c70=_0x2cd496;this[_0x434c70(0x1e2)]=_0x4ab955,this[_0x434c70(0x1f2)](_0x1935c6,_0x4ab955),this['createParticlesTextures'](_0x1935c6,_0x33c13c,_0x1fa9b4),this['createComputingPrimitives'](_0x4ab955,_0x33c13c,_0x1fa9b4);}['createWindTextures'](_0x35967f,_0x3ee4f4){const _0x30668e=_0x2cd496,_0x20970b={'context':_0x35967f,'width':_0x3ee4f4[_0x30668e(0x1ea)]['lon'],'height':_0x3ee4f4[_0x30668e(0x1ea)]['lat']*(_0x3ee4f4['dimensions']['lev']||0x1),'pixelFormat':Cesium$3[_0x30668e(0x215)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x30668e(0x1aa)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x20970b,_0x3ee4f4['U']['array']),'V':Util['createTexture'](_0x20970b,_0x3ee4f4['V']['array'])};}[_0x2cd496(0x202)](_0x322488,_0x26675d,_0x71046b){const _0x4838dd=_0x2cd496,_0x179782={'context':_0x322488,'width':_0x26675d[_0x4838dd(0x198)],'height':_0x26675d[_0x4838dd(0x198)],'pixelFormat':Cesium$3['PixelFormat'][_0x4838dd(0x166)],'pixelDatatype':Cesium$3['PixelDatatype'][_0x4838dd(0x1c6)],'flipY':![],'sampler':new Cesium$3[(_0x4838dd(0x1d3))]({'minificationFilter':Cesium$3[_0x4838dd(0x16f)][_0x4838dd(0x1aa)],'magnificationFilter':Cesium$3[_0x4838dd(0x249)]['NEAREST']})},_0x4d4a5f=this['randomizeParticles'](_0x26675d['maxParticles'],_0x71046b),_0x40ea0c=new Float32Array(0x4*_0x26675d[_0x4838dd(0x1a6)])[_0x4838dd(0x230)](0x0);this['particlesTextures']={'particlesWind':Util[_0x4838dd(0x18b)](_0x179782),'currentParticlesPosition':Util['createTexture'](_0x179782,_0x4d4a5f),'nextParticlesPosition':Util['createTexture'](_0x179782,_0x4d4a5f),'currentParticlesSpeed':Util['createTexture'](_0x179782,_0x40ea0c),'nextParticlesSpeed':Util[_0x4838dd(0x18b)](_0x179782,_0x40ea0c),'postProcessingPosition':Util['createTexture'](_0x179782,_0x4d4a5f),'postProcessingSpeed':Util[_0x4838dd(0x18b)](_0x179782,_0x40ea0c)};}['randomizeParticles'](_0x643e80,_0x4b7a23){const _0x23e7ad=_0x2cd496,_0x2cb5ea=new Float32Array(0x4*_0x643e80);for(let _0x5d376b=0x0;_0x5d376b<_0x643e80;_0x5d376b++){_0x2cb5ea[0x4*_0x5d376b]=Cesium$3['Math']['randomBetween'](_0x4b7a23['lonRange']['x'],_0x4b7a23['lonRange']['y']),_0x2cb5ea[0x4*_0x5d376b+0x1]=Cesium$3['Math'][_0x23e7ad(0x167)](_0x4b7a23[_0x23e7ad(0x229)]['x'],_0x4b7a23['latRange']['y']),_0x2cb5ea[0x4*_0x5d376b+0x2]=Cesium$3['Math']['randomBetween'](this['data']['lev']['min'],this[_0x23e7ad(0x1e2)]['lev']['max']),_0x2cb5ea[0x4*_0x5d376b+0x3]=0x0;}return _0x2cb5ea;}['destroyParticlesTextures'](){const _0x3661c2=_0x2cd496;Object[_0x3661c2(0x164)](this['particlesTextures'])['forEach'](_0x1d410e=>{const _0x5e0e69=_0x3661c2;this[_0x5e0e69(0x24f)][_0x1d410e]['destroy']();});}['createComputingPrimitives'](_0x4a1266,_0x281cd1,_0x2288af){const _0x39ebe0=_0x2cd496,_0x12a42d=new Cesium$3['Cartesian3'](_0x4a1266['dimensions'][_0x39ebe0(0x1de)],_0x4a1266[_0x39ebe0(0x1ea)]['lat'],_0x4a1266['dimensions'][_0x39ebe0(0x232)]),_0x397966=new Cesium$3[(_0x39ebe0(0x24a))](_0x4a1266[_0x39ebe0(0x1de)]['min'],_0x4a1266['lat']['min'],_0x4a1266['lev'][_0x39ebe0(0x211)]),_0x316ea1=new Cesium$3['Cartesian3'](_0x4a1266['lon']['max'],_0x4a1266['lat']['max'],_0x4a1266['lev'][_0x39ebe0(0x245)]),_0x4b0a32=new Cesium$3['Cartesian3']((_0x316ea1['x']-_0x397966['x'])/(_0x12a42d['x']-0x1),(_0x316ea1['y']-_0x397966['y'])/(_0x12a42d['y']-0x1),_0x12a42d['z']>0x1?(_0x316ea1['z']-_0x397966['z'])/(_0x12a42d['z']-0x1):0x1),_0x3f5a5c=new Cesium$3['Cartesian2'](_0x4a1266['U']['min'],_0x4a1266['U']['max']),_0x30e965=new Cesium$3['Cartesian2'](_0x4a1266['V']['min'],_0x4a1266['V']['max']),_0x213a42=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':_0x39ebe0(0x18c),'uniformMap':{'U':function(){return _0x213a42['windTextures']['U'];},'V':function(){return _0x213a42['windTextures']['V'];},'currentParticlesPosition':function(){return _0x213a42['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x12a42d;},'minimum':function(){return _0x397966;},'maximum':function(){return _0x316ea1;},'interval':function(){return _0x4b0a32;}},'fragmentShaderSource':new Cesium$3[(_0x39ebe0(0x1f5))]({'sources':[getWind_frag]}),'outputTexture':this[_0x39ebe0(0x24f)]['particlesWind'],'preExecute':function(){const _0x43d184=_0x39ebe0;_0x213a42['primitives'][_0x43d184(0x181)][_0x43d184(0x21e)]['outputTexture']=_0x213a42['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x1e861c=_0x39ebe0;return _0x213a42[_0x1e861c(0x24f)]['currentParticlesSpeed'];},'particlesWind':function(){return _0x213a42['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x3f5a5c;},'vSpeedRange':function(){return _0x30e965;},'pixelSize':function(){return _0x2288af['pixelSize'];},'speedFactor':function(){return _0x281cd1['speedFactor'];}},'fragmentShaderSource':new Cesium$3[(_0x39ebe0(0x1f5))]({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x39ebe0(0x1a7)],'preExecute':function(){const _0x300c81=_0x39ebe0,_0x3d09f1=_0x213a42['particlesTextures']['currentParticlesSpeed'];_0x213a42[_0x300c81(0x24f)]['currentParticlesSpeed']=_0x213a42['particlesTextures']['postProcessingSpeed'],_0x213a42['particlesTextures']['postProcessingSpeed']=_0x3d09f1,_0x213a42['primitives']['updateSpeed'][_0x300c81(0x21e)]['outputTexture']=_0x213a42[_0x300c81(0x24f)]['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':_0x39ebe0(0x18c),'uniformMap':{'currentParticlesPosition':function(){const _0x1cbda8=_0x39ebe0;return _0x213a42['particlesTextures'][_0x1cbda8(0x21a)];},'currentParticlesSpeed':function(){const _0x2bb5b0=_0x39ebe0;return _0x213a42[_0x2bb5b0(0x24f)]['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures'][_0x39ebe0(0x1d8)],'preExecute':function(){const _0x57e222=_0x39ebe0,_0x5b462b=_0x213a42['particlesTextures'][_0x57e222(0x21a)];_0x213a42[_0x57e222(0x24f)]['currentParticlesPosition']=_0x213a42[_0x57e222(0x24f)]['postProcessingPosition'],_0x213a42['particlesTextures']['postProcessingPosition']=_0x5b462b,_0x213a42['primitives'][_0x57e222(0x1dd)]['commandToExecute']['outputTexture']=_0x213a42['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x213a42['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x13e478=_0x39ebe0;return _0x213a42[_0x13e478(0x24f)]['nextParticlesSpeed'];},'lonRange':function(){return _0x2288af['lonRange'];},'latRange':function(){return _0x2288af['latRange'];},'randomCoefficient':function(){const _0x8e7511=_0x39ebe0,_0x21b069=Math[_0x8e7511(0x1c2)]();return _0x21b069;},'dropRate':function(){const _0x8e988d=_0x39ebe0;return _0x281cd1[_0x8e988d(0x223)];},'dropRateBump':function(){return _0x281cd1['dropRateBump'];}},'fragmentShaderSource':new Cesium$3[(_0x39ebe0(0x1f5))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){const _0x47a4b5=_0x39ebe0;_0x213a42['primitives'][_0x47a4b5(0x1cc)][_0x47a4b5(0x21e)]['outputTexture']=_0x213a42['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x39ebe0(0x18c),'uniformMap':{'postProcessingPosition':function(){return _0x213a42['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){const _0x4411fd=_0x39ebe0;return _0x213a42[_0x4411fd(0x24f)]['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this[_0x39ebe0(0x24f)]['postProcessingSpeed'],'preExecute':function(){const _0x583c19=_0x39ebe0;_0x213a42['primitives']['postProcessingSpeed'][_0x583c19(0x21e)][_0x583c19(0x178)]=_0x213a42['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace[_0x2cd496(0x235)];class ParticleSystem{constructor(_0x42d91e,_0xef3ebf,_0x346e4c,_0x24cdff){const _0x5e4bc1=_0x2cd496;this[_0x5e4bc1(0x15c)]=_0x42d91e,_0xef3ebf={..._0xef3ebf},_0xef3ebf['udata']&&_0xef3ebf['vdata']&&(_0xef3ebf[_0x5e4bc1(0x1ea)]={},_0xef3ebf['dimensions']['lon']=_0xef3ebf['cols'],_0xef3ebf['dimensions']['lat']=_0xef3ebf['rows'],_0xef3ebf['dimensions']['lev']=_0xef3ebf['lev']||0x1,_0xef3ebf['lon']={},_0xef3ebf[_0x5e4bc1(0x1de)][_0x5e4bc1(0x211)]=_0xef3ebf[_0x5e4bc1(0x1c3)],_0xef3ebf[_0x5e4bc1(0x1de)][_0x5e4bc1(0x245)]=_0xef3ebf['xmax'],_0xef3ebf['lat']={},_0xef3ebf['lat'][_0x5e4bc1(0x211)]=_0xef3ebf['ymin'],_0xef3ebf[_0x5e4bc1(0x220)]['max']=_0xef3ebf['ymax'],_0xef3ebf[_0x5e4bc1(0x232)]={},_0xef3ebf['lev'][_0x5e4bc1(0x211)]=_0xef3ebf['levmin']??0x1,_0xef3ebf['lev']['max']=_0xef3ebf[_0x5e4bc1(0x1e3)]??0x1,_0xef3ebf['U']={},_0xef3ebf['U'][_0x5e4bc1(0x208)]=new Float32Array(_0xef3ebf[_0x5e4bc1(0x168)]),_0xef3ebf['U']['min']=_0xef3ebf['umin']??Math['min'](..._0xef3ebf['udata']),_0xef3ebf['U']['max']=_0xef3ebf['umax']??Math['max'](..._0xef3ebf['udata']),_0xef3ebf['V']={},_0xef3ebf['V']['array']=new Float32Array(_0xef3ebf['vdata']),_0xef3ebf['V'][_0x5e4bc1(0x211)]=_0xef3ebf[_0x5e4bc1(0x1c1)]??Math[_0x5e4bc1(0x211)](..._0xef3ebf['vdata']),_0xef3ebf['V']['max']=_0xef3ebf['vmax']??Math['max'](..._0xef3ebf[_0x5e4bc1(0x218)])),this[_0x5e4bc1(0x1e2)]=_0xef3ebf,this[_0x5e4bc1(0x196)]=_0x346e4c,this[_0x5e4bc1(0x16e)]=_0x24cdff,this['particlesComputing']=new ParticlesComputing(this[_0x5e4bc1(0x15c)],this[_0x5e4bc1(0x1e2)],this[_0x5e4bc1(0x196)],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0x5e4bc1(0x15c)],this['data'],this['options'],this[_0x5e4bc1(0x16e)],this['particlesComputing']);}['canvasResize'](_0x2ef768){const _0x5a5290=_0x2cd496;this['particlesComputing']['destroyParticlesTextures'](),Object[_0x5a5290(0x164)](this['particlesComputing']['windTextures'])['forEach'](_0x43aae2=>{this['particlesComputing']['windTextures'][_0x43aae2]['destroy']();}),this['particlesRendering']['textures']['colorTable'][_0x5a5290(0x185)](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x4a1f0b=>{const _0x2ba2c2=_0x5a5290;this['particlesRendering'][_0x2ba2c2(0x1ed)][_0x4a1f0b]['destroy']();}),this['context']=_0x2ef768,this['particlesComputing']=new ParticlesComputing(this['context'],this[_0x5a5290(0x1e2)],this[_0x5a5290(0x196)],this['viewerParameters']),this[_0x5a5290(0x239)]=new ParticlesRendering(this['context'],this['data'],this[_0x5a5290(0x196)],this['viewerParameters'],this[_0x5a5290(0x1e0)]);}[_0x2cd496(0x237)](){const _0x425f37=_0x2cd496,_0x845c7=new Cesium$2[(_0x425f37(0x187))]({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this[_0x425f37(0x239)][_0x425f37(0x1ed)])['forEach'](_0x2238fb=>{const _0x45d25a=_0x425f37;_0x845c7['framebuffer']=this['particlesRendering'][_0x45d25a(0x1ed)][_0x2238fb],_0x845c7['execute'](this['context']);});}['refreshParticles'](_0x15c877){const _0x282a69=_0x2cd496;this['clearFramebuffers'](),this['particlesComputing'][_0x282a69(0x1cb)](),this['particlesComputing']['createParticlesTextures'](this['context'],this[_0x282a69(0x196)],this['viewerParameters']);if(_0x15c877){var _0x1fd5b0;const _0x1bed6a=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives']['segments']['geometry']=_0x1bed6a;const _0xe6ef97=Cesium$2['VertexArray']['fromGeometry']({'context':this['context'],'geometry':_0x1bed6a,'attributeLocations':this['particlesRendering']['primitives'][_0x282a69(0x1ce)]['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage'][_0x282a69(0x217)]});(_0x1fd5b0=this['particlesRendering'][_0x282a69(0x22b)])!==null&&_0x1fd5b0!==void 0x0&&(_0x1fd5b0=_0x1fd5b0[_0x282a69(0x1ce)])!==null&&_0x1fd5b0!==void 0x0&&_0x1fd5b0['commandToExecute']&&(this['particlesRendering']['primitives'][_0x282a69(0x1ce)][_0x282a69(0x21e)]['vertexArray']=_0xe6ef97);}}['setOptions'](_0x344657){const _0x52e31a=_0x2cd496;let _0x48d8d0=![];this[_0x52e31a(0x196)]['maxParticles']!==_0x344657['maxParticles']&&(_0x48d8d0=!![]),Object['keys'](_0x344657)['forEach'](_0x3bfe15=>{this['options'][_0x3bfe15]=_0x344657[_0x3bfe15];}),this[_0x52e31a(0x184)](_0x48d8d0);}['applyViewerParameters'](_0x318bc6){Object['keys'](_0x318bc6)['forEach'](_0x45d851=>{const _0x56c43a=_0x238d;this[_0x56c43a(0x16e)][_0x45d851]=_0x318bc6[_0x45d851];}),this['refreshParticles'](![]);}['destroy'](){const _0x1537a0=_0x2cd496;clearTimeout(this['canrefresh']),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x1537a0(0x1e0)]['windTextures'])['forEach'](_0x431ca2=>{this['particlesComputing']['windTextures'][_0x431ca2]['destroy']();}),this['particlesRendering']['textures'][_0x1537a0(0x1af)]['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])[_0x1537a0(0x1be)](_0x472bfe=>{this['particlesRendering']['framebuffers'][_0x472bfe]['destroy']();});for(const _0x4f8268 in this){delete this[_0x4f8268];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer'][_0x2cd496(0x1fe)],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x2cd496(0x1df)]};class WindLayer extends BaseLayer$1{constructor(_0x3bea2f={}){const _0xfed848=_0x2cd496;_0x3bea2f={...DEF_OPTIONS,..._0x3bea2f},super(_0x3bea2f),this[_0xfed848(0x180)](_0x3bea2f);}get[_0x2cd496(0x1fb)](){return this['primitives'];}get['data'](){return this['_data'];}set['data'](_0x1597e9){this['setData'](_0x1597e9);}get[_0x2cd496(0x182)](){const _0x95337b=_0x2cd496;return this[_0x95337b(0x196)]['colors'];}set['colors'](_0x16650a){const _0x44eff8=_0x2cd496;this['options'][_0x44eff8(0x182)]=_0x16650a,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x16650a}),this['resize']();}['_mountedHook'](){}['_addedHook'](){const _0x4e1263=_0x2cd496;this['scene']=this[_0x4e1263(0x179)]['scene'],this['camera']=this[_0x4e1263(0x179)][_0x4e1263(0x161)],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives']['add'](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1[(_0x4e1263(0x1b3))](),'latRange':new Cesium$1[(_0x4e1263(0x1b3))](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x4e1263(0x191)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener'](_0x4e1263(0x1e4),this['resize'][_0x4e1263(0x24b)](this),![]),this[_0x4e1263(0x19b)]=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x4e1263(0x15e)],this),this[_0x4e1263(0x189)]&&this['setData'](this['_data']);}['_removedHook'](){const _0x47187f=_0x2cd496;window[_0x47187f(0x16b)]('resize',this['resize']),this['_map']['off'](mars3d__namespace['EventType'][_0x47187f(0x219)],this[_0x47187f(0x16c)],this),this['_map']['off'](mars3d__namespace['EventType']['wheel'],this[_0x47187f(0x1b8)],this),this[_0x47187f(0x179)]['off'](mars3d__namespace['EventType'][_0x47187f(0x23d)],this[_0x47187f(0x243)],this),this['_map']['off'](mars3d__namespace[_0x47187f(0x1d6)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace[_0x47187f(0x1d6)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x47187f(0x22b)]['removeAll'](),this['_map']['scene'][_0x47187f(0x22b)][_0x47187f(0x1a3)](this['primitives']);}['resize'](){const _0x4411a1=_0x2cd496;if(!this[_0x4411a1(0x1d1)]||!this['particleSystem'])return;this[_0x4411a1(0x22b)]['show']=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType'][_0x4411a1(0x219)],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x24b6c6){const _0x318a0f=_0x2cd496;this[_0x318a0f(0x160)]['canvasResize'](this['scene']['context']),this['addPrimitives'](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x57b0e4){const _0x12f070=_0x2cd496;clearTimeout(this[_0x12f070(0x205)]);if(!this['show']||!this['particleSystem'])return;this[_0x12f070(0x22b)]['show']=![],this[_0x12f070(0x205)]=setTimeout(()=>{const _0x1891c7=_0x12f070;if(!this[_0x1891c7(0x1d1)])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x30ae74){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x4dd897){const _0x27718f=_0x2cd496;if(!this['show']||!this['particleSystem'])return;this[_0x27718f(0x19b)]&&(this['primitives']['show']=![],this['mouse_move']=!![]);}[_0x2cd496(0x213)](_0x5e386c){const _0x5c0815=_0x2cd496;if(!this[_0x5c0815(0x1d1)]||!this['particleSystem'])return;this['mouse_down']&&this['mouse_move']&&this[_0x5c0815(0x19e)](),this[_0x5c0815(0x22b)]['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0xd36956=_0x2cd496;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this[_0xd36956(0x160)]['applyViewerParameters'](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x2f5b62){const _0x2f5c45=_0x2cd496;this['_data']=_0x2f5b62,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this[_0x2f5c45(0x247)]['context'],_0x2f5b62,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}[_0x2cd496(0x180)](_0x38b87b,_0x5f0d70){if(_0x38b87b)for(const _0x16c182 in _0x38b87b){this[_0x16c182]=_0x38b87b[_0x16c182];}this['particleSystem']&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x3b6b6c=_0x2cd496,_0x35e0fb=Math['ceil'](Math[_0x3b6b6c(0x1dc)](this[_0x3b6b6c(0x195)]));return this[_0x3b6b6c(0x195)]=_0x35e0fb*_0x35e0fb,{'particlesTextureSize':_0x35e0fb,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this[_0x3b6b6c(0x223)],'dropRateBump':this[_0x3b6b6c(0x214)],'speedFactor':this['speedFactor'],'lineWidth':this[_0x3b6b6c(0x246)],'colors':this[_0x3b6b6c(0x182)]};}['addPrimitives'](){const _0x9acd2b=_0x2cd496;this[_0x9acd2b(0x22b)]['add'](this[_0x9acd2b(0x160)]['particlesComputing']['primitives']['getWind']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives'][_0x9acd2b(0x1b2)]),this['primitives'][_0x9acd2b(0x1f4)](this[_0x9acd2b(0x160)]['particlesComputing']['primitives']['updatePosition']),this[_0x9acd2b(0x22b)]['add'](this['particleSystem'][_0x9acd2b(0x1e0)]['primitives']['postProcessingPosition']),this['primitives']['add'](this['particleSystem'][_0x9acd2b(0x1e0)]['primitives']['postProcessingSpeed']),this['primitives'][_0x9acd2b(0x1f4)](this['particleSystem']['particlesRendering']['primitives']['segments']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this[_0x9acd2b(0x22b)]['add'](this['particleSystem']['particlesRendering']['primitives']['screen']);}[_0x2cd496(0x224)](){const _0x5ccd58=_0x2cd496;let _0x2297c8=this[_0x5ccd58(0x161)]['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x2297c8){const _0x1471e0=this['_map'][_0x5ccd58(0x1c0)]();_0x2297c8=Cesium$1['Rectangle']['fromDegrees'](_0x1471e0[_0x5ccd58(0x1c3)],_0x1471e0['ymin'],_0x1471e0['xmax'],_0x1471e0['ymax']);}const _0x539811=Util['viewRectangleToLonLatRange'](_0x2297c8);this['viewerParameters'][_0x5ccd58(0x1a9)]['x']=_0x539811['lon']['min'],this['viewerParameters']['lonRange']['y']=_0x539811['lon'][_0x5ccd58(0x245)],this[_0x5ccd58(0x16e)][_0x5ccd58(0x229)]['x']=_0x539811['lat']['min'],this[_0x5ccd58(0x16e)]['latRange']['y']=_0x539811['lat']['max'];const _0x4a90a8=this[_0x5ccd58(0x161)][_0x5ccd58(0x21c)](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this[_0x5ccd58(0x247)]['drawingBufferHeight']);_0x4a90a8>0x0&&(this[_0x5ccd58(0x16e)]['pixelSize']=_0x4a90a8);}}mars3d__namespace['LayerUtil']['register'](_0x2cd496(0x1f6),WindLayer),mars3d__namespace[_0x2cd496(0x1fb)]['WindLayer']=WindLayer;function _0x2402(){const _0x1aa93c=['frameTime','createFramebuffer','clientWidth','position','mouseUp','lighter','getColor','outputTexture','_map','OPAQUE','DomUtil','hidden','update','tlng','toRadians','_setOptionsHook','getWind','colors','vertexArray','refreshParticles','destroy','wgs84ToWindowCoordinates','ClearCommand','initWorker','_data','Texture','createTexture','Compute','viewport','getParticles','addEventListener','stroke','ZERO','canvasContext','TWO_PI','currentTrails','particlesNumber','options','BufferUsage','particlesTextureSize','PI_OVER_THREE','off','mouse_down','defineProperty','Math','redraw','WindUtil','LINEAR','visibility','_pointerEvents','remove','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','mouseHidden','maxParticles','nextParticlesSpeed','64566kGvvol','lonRange','NEAREST','6057756lRFiAI','length','width','attributeLocations','colorTable','cos','_tomap','updateSpeed','Cartesian2','isPointVisible','createRenderingFramebuffers','zIndex','geometry','_onMapWhellEvent','canvas','primitiveType','rawRenderState','_drawLines','drawingBufferHeight','forEach','3240800MsOKsG','getExtent','vmin','random','xmin','beginPath','setData','FLOAT','CanvasWindLayer','RGB','getColorTexture','push','destroyParticlesTextures','postProcessingPosition','clientHeight','segments','depthTexture','_canrefresh','show','DepthFunction','Sampler','isInExtent','animateFrame','EventType','windField','nextParticlesPosition','framebuffer','particles','height','sqrt','updatePosition','lon','rgb(206,255,255)','particlesComputing','_maxAge','data','levmax','resize','mars3d-canvasWind','PI_OVER_TWO','lineTo','GeometryAttribute','age','dimensions','_addedHook','Geometry','framebuffers','nextTrailsDepth','_calc_speedRate','speed','Color','createWindTextures','abs','add','ShaderSource','wind','grid','createSegmentsGeometry','getUVByPoint','fragmentShaderSource','layer','cols','maxAge','BaseLayer','mouseMove','left','UNSIGNED_INT','createParticlesTextures','destination-in','mouse_move','refreshTimer','autoClear','style','array','unbindEvent','commandList','_calcUV','textures','33afrkvi','5VJYDTG','reverse','PrimitiveType','min','nextTrails','_onMouseUpEvent','dropRateBump','PixelFormat','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','STATIC_DRAW','vdata','preRender','currentParticlesPosition','7tPMtSq','getPixelSize','toGridXY','commandToExecute','CanvasWindField','lat','_randomParticle','ymax','dropRate','updateViewerParameters','moveTo','vertexShaderSource','clear','getUVByXY','latRange','getRandomLatLng','primitives','postMessage','source','_updateIng','1118238Ipjhfv','fill','fromDegrees','lev','createRenderingTextures','260599xDTctJ','Cesium','toDegrees','clearFramebuffers','get','particlesRendering','lng','tlat','setOptions','mouseDown','3484228iPHfxx','rows','createCommand','WindLayer','now','_onMouseDownEvent','fixedHeight','max','lineWidth','scene','createRawRenderState','TextureMagnificationFilter','Cartesian3','bind','worker','_speedRate','PixelDatatype','particlesTextures','segmentsColor','commandType','defined','ymin','strokeStyle','SceneMode','clearCommand','1325112FOVGRJ','speedRate','context','Pass','_onMouseMoveEvent','mode','particleSystem','camera','_createCanvas','_updateIng2','keys','_colorRamp','RGBA','randomBetween','udata','preExecute','pointerEvents','removeEventListener','_onMap_preRenderEvent','wheel','viewerParameters','TextureMinificationFilter','__esModule'];_0x2402=function(){return _0x1aa93c;};return _0x2402();}class CanvasParticle{constructor(){const _0xacb9b6=_0x2cd496;this['lng']=null,this[_0xacb9b6(0x220)]=null,this['tlng']=null,this['tlat']=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0x1e8cbd in this){delete this[_0x1e8cbd];}}}class CanvasWindField{constructor(_0x12ccf5){this['setOptions'](_0x12ccf5);}get['speedRate'](){const _0x49f7cd=_0x2cd496;return this[_0x49f7cd(0x24d)];}set[_0x2cd496(0x258)](_0x17d491){const _0x55dfb5=_0x2cd496;this['_speedRate']=(0x64-(_0x17d491>0x63?0x63:_0x17d491))*0x64,this[_0x55dfb5(0x1ef)]=[(this['xmax']-this['xmin'])/this['_speedRate'],(this[_0x55dfb5(0x222)]-this['ymin'])/this['_speedRate']];}get['maxAge'](){const _0x488c4a=_0x2cd496;return this[_0x488c4a(0x1e1)];}set['maxAge'](_0x447ec1){const _0x7f27d5=_0x2cd496;this[_0x7f27d5(0x1e1)]=_0x447ec1;}['setOptions'](_0x225615){const _0x29bc83=_0x2cd496;this['options']=_0x225615,this[_0x29bc83(0x1fd)]=_0x225615[_0x29bc83(0x1fd)]||0x78,this['speedRate']=_0x225615['speedRate']||0x32,this[_0x29bc83(0x1da)]=[];const _0x296f09=_0x225615[_0x29bc83(0x195)]||0x1000;for(let _0x345a7e=0x0;_0x345a7e<_0x296f09;_0x345a7e++){const _0x986353=this[_0x29bc83(0x221)](new CanvasParticle());this['particles']['push'](_0x986353);}}['setDate'](_0x1c1da1){const _0x1510d6=_0x2cd496;this['rows']=_0x1c1da1['rows'],this['cols']=_0x1c1da1['cols'],this['xmin']=_0x1c1da1['xmin'],this['xmax']=_0x1c1da1['xmax'],this['ymin']=_0x1c1da1[_0x1510d6(0x253)],this['ymax']=_0x1c1da1['ymax'],this['grid']=[];const _0x4dbfcf=_0x1c1da1['udata'],_0x472410=_0x1c1da1['vdata'];let _0x4e7758=![];_0x4dbfcf['length']===this[_0x1510d6(0x23f)]&&_0x4dbfcf[0x0][_0x1510d6(0x1ac)]===this['cols']&&(_0x4e7758=!![]);let _0x29461d=0x0,_0x4e826c=null,_0x47e1f0=null;for(let _0x2ef887=0x0;_0x2ef887<this['rows'];_0x2ef887++){_0x4e826c=[];for(let _0xb97816=0x0;_0xb97816<this['cols'];_0xb97816++,_0x29461d++){_0x4e7758?_0x47e1f0=this['_calcUV'](_0x4dbfcf[_0x2ef887][_0xb97816],_0x472410[_0x2ef887][_0xb97816]):_0x47e1f0=this['_calcUV'](_0x4dbfcf[_0x29461d],_0x472410[_0x29461d]),_0x4e826c['push'](_0x47e1f0);}this['grid'][_0x1510d6(0x1ca)](_0x4e826c);}this['options']['reverseY']&&this['grid'][_0x1510d6(0x20f)]();}[_0x2cd496(0x227)](){const _0x49b113=_0x2cd496;delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this[_0x49b113(0x253)],delete this['ymax'],delete this[_0x49b113(0x1f7)],delete this['particles'];}['toGridXY'](_0x3e9164,_0x3b2249){const _0x20a929=_0x2cd496,_0xcb4080=(_0x3e9164-this[_0x20a929(0x1c3)])/(this['xmax']-this['xmin'])*(this[_0x20a929(0x1fc)]-0x1),_0x25d544=(this['ymax']-_0x3b2249)/(this[_0x20a929(0x222)]-this['ymin'])*(this[_0x20a929(0x23f)]-0x1);return[_0xcb4080,_0x25d544];}[_0x2cd496(0x228)](_0x3df53e,_0xeeafe0){if(_0x3df53e<0x0||_0x3df53e>=this['cols']||_0xeeafe0>=this['rows'])return[0x0,0x0,0x0];const _0x24a253=Math['floor'](_0x3df53e),_0x3c802e=Math['floor'](_0xeeafe0);if(_0x24a253===_0x3df53e&&_0x3c802e===_0xeeafe0)return this['grid'][_0xeeafe0][_0x3df53e];const _0x566935=_0x24a253+0x1,_0x403513=_0x3c802e+0x1,_0x19bfc9=this['getUVByXY'](_0x24a253,_0x3c802e),_0x179c50=this['getUVByXY'](_0x566935,_0x3c802e),_0x1d2942=this['getUVByXY'](_0x24a253,_0x403513),_0x3bc2ba=this['getUVByXY'](_0x566935,_0x403513);let _0x358839=null;try{_0x358839=this['_bilinearInterpolation'](_0x3df53e-_0x24a253,_0xeeafe0-_0x3c802e,_0x19bfc9,_0x179c50,_0x1d2942,_0x3bc2ba);}catch(_0x3e48e7){console['log'](_0x3df53e,_0xeeafe0);}return _0x358839;}['_bilinearInterpolation'](_0x565411,_0x562ede,_0x143c6f,_0x7d42e2,_0xdddf4b,_0x4b8c85){const _0x301b1f=_0x2cd496,_0x231420=0x1-_0x565411,_0x4c4f5e=0x1-_0x562ede,_0x36062f=_0x231420*_0x4c4f5e,_0x32b7d7=_0x565411*_0x4c4f5e,_0x4b2d4b=_0x231420*_0x562ede,_0x532359=_0x565411*_0x562ede,_0x61e69a=_0x143c6f[0x0]*_0x36062f+_0x7d42e2[0x0]*_0x32b7d7+_0xdddf4b[0x0]*_0x4b2d4b+_0x4b8c85[0x0]*_0x532359,_0x571f68=_0x143c6f[0x1]*_0x36062f+_0x7d42e2[0x1]*_0x32b7d7+_0xdddf4b[0x1]*_0x4b2d4b+_0x4b8c85[0x1]*_0x532359;return this[_0x301b1f(0x20b)](_0x61e69a,_0x571f68);}['_calcUV'](_0x580778,_0x2c9390){return[+_0x580778,+_0x2c9390,Math['sqrt'](_0x580778*_0x580778+_0x2c9390*_0x2c9390)];}[_0x2cd496(0x1f9)](_0x305921,_0x3da0b4){const _0x3fe28c=_0x2cd496;if(!this['isInExtent'](_0x305921,_0x3da0b4))return null;const _0x4e0c30=this[_0x3fe28c(0x21d)](_0x305921,_0x3da0b4),_0x158ae5=this[_0x3fe28c(0x228)](_0x4e0c30[0x0],_0x4e0c30[0x1]);return _0x158ae5;}[_0x2cd496(0x1d4)](_0x1f78ba,_0x56e7e6){const _0x1fc031=_0x2cd496;return _0x1f78ba>=this[_0x1fc031(0x1c3)]&&_0x1f78ba<=this['xmax']&&_0x56e7e6>=this['ymin']&&_0x56e7e6<=this[_0x1fc031(0x222)]?!![]:![];}['getRandomLatLng'](){const _0x3ec325=_0x2cd496,_0x9fdc90=fRandomByfloat(this[_0x3ec325(0x1c3)],this['xmax']),_0x206acc=fRandomByfloat(this['ymin'],this[_0x3ec325(0x222)]);return{'lat':_0x206acc,'lng':_0x9fdc90};}[_0x2cd496(0x18e)](){const _0x2a459d=_0x2cd496;let _0x296642,_0x2ddb50,_0x3eefac;for(let _0x3f9276=0x0,_0x108813=this['particles'][_0x2a459d(0x1ac)];_0x3f9276<_0x108813;_0x3f9276++){let _0x3a3038=this['particles'][_0x3f9276];_0x3a3038['age']<=0x0&&(_0x3a3038=this[_0x2a459d(0x221)](_0x3a3038));if(_0x3a3038[_0x2a459d(0x1e9)]>0x0){const _0x385636=_0x3a3038['tlng'],_0x277035=_0x3a3038[_0x2a459d(0x23b)];_0x3eefac=this[_0x2a459d(0x1f9)](_0x385636,_0x277035),_0x3eefac?(_0x296642=_0x385636+this['_calc_speedRate'][0x0]*_0x3eefac[0x0],_0x2ddb50=_0x277035+this['_calc_speedRate'][0x1]*_0x3eefac[0x1],_0x3a3038[_0x2a459d(0x23a)]=_0x385636,_0x3a3038['lat']=_0x277035,_0x3a3038['tlng']=_0x296642,_0x3a3038['tlat']=_0x2ddb50,_0x3a3038['speed']=_0x3eefac[0x2],_0x3a3038['age']--):_0x3a3038['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x5b23fa){const _0x43c655=_0x2cd496;let _0x2f4c69,_0x44382a;for(let _0x4ca721=0x0;_0x4ca721<0x1e;_0x4ca721++){_0x2f4c69=this[_0x43c655(0x22a)](),_0x44382a=this[_0x43c655(0x1f9)](_0x2f4c69['lng'],_0x2f4c69[_0x43c655(0x220)]);if(_0x44382a&&_0x44382a[0x2]>0x0)break;}if(!_0x44382a)return _0x5b23fa;const _0x143ae0=_0x2f4c69['lng']+this['_calc_speedRate'][0x0]*_0x44382a[0x0],_0x87a21d=_0x2f4c69['lat']+this['_calc_speedRate'][0x1]*_0x44382a[0x1];return _0x5b23fa['lng']=_0x2f4c69['lng'],_0x5b23fa['lat']=_0x2f4c69[_0x43c655(0x220)],_0x5b23fa[_0x43c655(0x17e)]=_0x143ae0,_0x5b23fa['tlat']=_0x87a21d,_0x5b23fa['age']=Math['round'](Math['random']()*this['maxAge']),_0x5b23fa['speed']=_0x44382a[0x2],_0x5b23fa;}['destroy'](){for(const _0x403fe6 in this){delete this[_0x403fe6];}}}function fRandomByfloat(_0x2f67dd,_0x2ad157){return _0x2f67dd+Math['random']()*(_0x2ad157-_0x2f67dd);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x2cd496(0x1fb)][_0x2cd496(0x1fe)];class CanvasWindLayer extends BaseLayer{constructor(_0x49e441={}){const _0x48ca6a=_0x2cd496;super(_0x49e441),this['_setOptionsHook'](_0x49e441),this['canvas']=null,_0x49e441[_0x48ca6a(0x182)]&&_0x49e441['steps']&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x49e441));}['_setOptionsHook'](_0x74ecc7,_0x249505){const _0x51e60a=_0x2cd496;this[_0x51e60a(0x171)]=0x3e8/(_0x74ecc7['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x74ecc7['color']||'#ffffff',this['lineWidth']=_0x74ecc7[_0x51e60a(0x246)]||0x1,this[_0x51e60a(0x244)]=_0x74ecc7['fixedHeight']??0x0,this['reverseY']=_0x74ecc7['reverseY']??![],this['windField']&&this['windField']['setOptions'](_0x74ecc7);}get['layer'](){return this['canvas'];}get['canvasWidth'](){const _0x2cbe2b=_0x2cd496;return this[_0x2cbe2b(0x179)]['scene']['canvas']['clientWidth'];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){const _0x24a981=_0x2cd496;return this[_0x24a981(0x1a2)];}set['pointerEvents'](_0x2cec20){this['_pointerEvents']=_0x2cec20;if(!this['canvas'])return;_0x2cec20?this['canvas']['style']['pointer-events']='all':this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){const _0x398939=_0x2cd496;return this['options'][_0x398939(0x195)];}set['particlesNumber'](_0x3ccf87){const _0x30e9f6=_0x2cd496;this['options']['particlesNumber']=_0x3ccf87,clearTimeout(this[_0x30e9f6(0x1d0)]),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x350a60=_0x2cd496;return this[_0x350a60(0x196)]['speedRate'];}set['speedRate'](_0x4d27c8){const _0x4a6673=_0x2cd496;this['options']['speedRate']=_0x4d27c8,this['windField']&&(this[_0x4a6673(0x1d7)]['speedRate']=_0x4d27c8);}get['maxAge'](){const _0x554e4b=_0x2cd496;return this['options'][_0x554e4b(0x1fd)];}set['maxAge'](_0x2d0f4e){const _0x18b7a4=_0x2cd496;this['options']['maxAge']=_0x2d0f4e,this['windField']&&(this['windField'][_0x18b7a4(0x1fd)]=_0x2d0f4e);}get[_0x2cd496(0x1e2)](){return this['windData'];}set['data'](_0x5eb40e){this['setData'](_0x5eb40e);}['_showHook'](_0x5bbf5a){const _0x1fd1f3=_0x2cd496;_0x5bbf5a?this[_0x1fd1f3(0x1eb)]():(this['windData']&&(this[_0x1fd1f3(0x196)]['data']=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x56ba25=_0x2cd496;this['options'][_0x56ba25(0x24c)]?this[_0x56ba25(0x188)]():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x3c43fb=_0x2cd496;this['canvas']=this['_createCanvas'](),this[_0x3c43fb(0x192)]=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this[_0x3c43fb(0x196)]['data']&&this[_0x3c43fb(0x1c5)](this['options']['data']);}['_removedHook'](){const _0xd9654d=_0x2cd496;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this[_0xd9654d(0x1b9)]);}[_0x2cd496(0x162)](){const _0x2bcb2e=_0x2cd496,_0x4661cf=mars3d__namespace[_0x2bcb2e(0x17b)]['create']('canvas',_0x2bcb2e(0x1e5),this[_0x2bcb2e(0x179)]['container']);return _0x4661cf['style'][_0x2bcb2e(0x174)]='absolute',_0x4661cf['style']['top']='0px',_0x4661cf['style'][_0x2bcb2e(0x200)]='0px',_0x4661cf['style']['width']=this['_map'][_0x2bcb2e(0x247)][_0x2bcb2e(0x1b9)]['clientWidth']+'px',_0x4661cf['style']['height']=this[_0x2bcb2e(0x179)]['scene']['canvas'][_0x2bcb2e(0x1cd)]+'px',_0x4661cf['style'][_0x2bcb2e(0x16a)]=this['_pointerEvents']?'auto':'none',_0x4661cf['style'][_0x2bcb2e(0x1b6)]=this[_0x2bcb2e(0x196)]['zIndex']??0x9,_0x4661cf['width']=this['_map']['scene'][_0x2bcb2e(0x1b9)][_0x2bcb2e(0x173)],_0x4661cf['height']=this['_map']['scene']['canvas']['clientHeight'],_0x4661cf;}[_0x2cd496(0x1e4)](){const _0x5014cd=_0x2cd496;this[_0x5014cd(0x1b9)]&&(this['canvas'][_0x5014cd(0x207)][_0x5014cd(0x1ad)]=this['_map']['scene']['canvas']['clientWidth']+'px',this[_0x5014cd(0x1b9)][_0x5014cd(0x207)]['height']=this['_map']['scene']['canvas']['clientHeight']+'px',this['canvas'][_0x5014cd(0x1ad)]=this[_0x5014cd(0x179)]['scene']['canvas']['clientWidth'],this['canvas'][_0x5014cd(0x1db)]=this['_map']['scene']['canvas']['clientHeight']);}['bindEvent'](){const _0x103013=_0x2cd496,_0x14d8bb=this;let _0xe1fd1e=Date[_0x103013(0x242)]();(function _0x5426f4(){const _0x1d665e=_0x103013;_0x14d8bb[_0x1d665e(0x1d5)]=window['requestAnimationFrame'](_0x5426f4);if(_0x14d8bb['show']&&_0x14d8bb['windField']){const _0x4fb9a1=Date[_0x1d665e(0x242)](),_0x1a7b11=_0x4fb9a1-_0xe1fd1e;_0x1a7b11>_0x14d8bb['frameTime']&&(_0xe1fd1e=_0x4fb9a1-_0x1a7b11%_0x14d8bb['frameTime'],_0x14d8bb[_0x1d665e(0x17d)]());}}(),window[_0x103013(0x18f)]('resize',this['resize']['bind'](this),![]),this[_0x103013(0x19b)]=![],this[_0x103013(0x204)]=![],this['options'][_0x103013(0x1a5)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x103013(0x1b8)],this),this['_map']['on'](mars3d__namespace[_0x103013(0x1d6)][_0x103013(0x23d)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x103013(0x175)],this['_onMouseUpEvent'],this)));}[_0x2cd496(0x209)](){const _0x43db92=_0x2cd496;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace['EventType'][_0x43db92(0x16d)],this[_0x43db92(0x1b8)],this),this['_map'][_0x43db92(0x19a)](mars3d__namespace['EventType'][_0x43db92(0x23d)],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map'][_0x43db92(0x19a)](mars3d__namespace[_0x43db92(0x1d6)]['mouseMove'],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x4f1462){const _0x1fb1f5=_0x2cd496;clearTimeout(this['refreshTimer']);if(!this[_0x1fb1f5(0x1d1)]||!this['canvas'])return;this['canvas']['style']['visibility']=_0x1fb1f5(0x17c),this['refreshTimer']=setTimeout(()=>{const _0x40d137=_0x1fb1f5;if(!this['show'])return;this['redraw'](),this[_0x40d137(0x1b9)][_0x40d137(0x207)]['visibility']='visible';},0xc8);}[_0x2cd496(0x243)](_0x433666){const _0x3703ef=_0x2cd496;this['mouse_down']=!![],this['_map'][_0x3703ef(0x19a)](mars3d__namespace['EventType']['mouseMove'],this[_0x3703ef(0x15e)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x54d9e7){const _0xbbf409=_0x2cd496;if(!this['show']||!this['canvas'])return;this['mouse_down']&&(this['canvas'][_0xbbf409(0x207)][_0xbbf409(0x1a1)]='hidden',this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x587059){const _0x4e2e9d=_0x2cd496;if(!this['show']||!this['canvas'])return;this[_0x4e2e9d(0x179)]['off'](mars3d__namespace[_0x4e2e9d(0x1d6)][_0x4e2e9d(0x1ff)],this['_onMouseMoveEvent'],this),this[_0x4e2e9d(0x19b)]&&this[_0x4e2e9d(0x204)]&&this['redraw'](),this[_0x4e2e9d(0x1b9)]['style']['visibility']='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x6e9897){this['clear'](),this['windData']=_0x6e9897,this['windField']['setDate'](_0x6e9897),this['redraw']();}['redraw'](){const _0x5843aa=_0x2cd496;if(!this['show'])return;this['windField'][_0x5843aa(0x23c)](this['options']),this[_0x5843aa(0x17d)]();}['update'](){const _0x3efa44=_0x2cd496;if(this['_updateIng'])return;this[_0x3efa44(0x22e)]=!![];if(this['worker'])this[_0x3efa44(0x1d7)]['update']();else{const _0x4520d=this['windField']['getParticles']();this[_0x3efa44(0x1bc)](_0x4520d);}this[_0x3efa44(0x22e)]=![];}['_drawLines'](_0x82349d){const _0x27d8f3=_0x2cd496;this['canvasContext']['globalCompositeOperation']=_0x27d8f3(0x203),this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this[_0x27d8f3(0x192)]['globalCompositeOperation']=_0x27d8f3(0x176),this['canvasContext']['globalAlpha']=0.9;const _0x3dbdba=this[_0x27d8f3(0x179)][_0x27d8f3(0x247)]['mode']!==Cesium[_0x27d8f3(0x255)]['SCENE3D'],_0x3e1681=this['canvasWidth']*0.25;if(this[_0x27d8f3(0x165)])for(let _0x49970a=0x0,_0x3e32ae=_0x82349d['length'];_0x49970a<_0x3e32ae;_0x49970a++){const _0x54792f=_0x82349d[_0x49970a],_0x4d6839=this[_0x27d8f3(0x1b1)](_0x54792f['lng'],_0x54792f['lat'],_0x54792f),_0x4c344a=this['_tomap'](_0x54792f[_0x27d8f3(0x17e)],_0x54792f['tlat'],_0x54792f);if(!_0x4d6839||!_0x4c344a)continue;if(_0x3dbdba&&Math[_0x27d8f3(0x1f3)](_0x4d6839[0x0]-_0x4c344a[0x0])>=_0x3e1681)continue;this[_0x27d8f3(0x192)]['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this['_colorRamp'][_0x27d8f3(0x177)](_0x54792f[_0x27d8f3(0x1f0)]),this[_0x27d8f3(0x192)][_0x27d8f3(0x225)](_0x4d6839[0x0],_0x4d6839[0x1]),this['canvasContext'][_0x27d8f3(0x1e7)](_0x4c344a[0x0],_0x4c344a[0x1]),this['canvasContext'][_0x27d8f3(0x190)]();}else{this['canvasContext'][_0x27d8f3(0x1c4)](),this['canvasContext'][_0x27d8f3(0x246)]=this['lineWidth'],this[_0x27d8f3(0x192)][_0x27d8f3(0x254)]=this['color'];for(let _0x256dbb=0x0,_0x3f6d0b=_0x82349d['length'];_0x256dbb<_0x3f6d0b;_0x256dbb++){const _0x78bbd=_0x82349d[_0x256dbb],_0xf9881e=this['_tomap'](_0x78bbd[_0x27d8f3(0x23a)],_0x78bbd[_0x27d8f3(0x220)],_0x78bbd),_0x494bd2=this[_0x27d8f3(0x1b1)](_0x78bbd[_0x27d8f3(0x17e)],_0x78bbd['tlat'],_0x78bbd);if(!_0xf9881e||!_0x494bd2)continue;if(_0x3dbdba&&Math['abs'](_0xf9881e[0x0]-_0x494bd2[0x0])>=_0x3e1681)continue;this['canvasContext']['moveTo'](_0xf9881e[0x0],_0xf9881e[0x1]),this['canvasContext']['lineTo'](_0x494bd2[0x0],_0x494bd2[0x1]);}this['canvasContext']['stroke']();}}['_tomap'](_0x17ef57,_0x3485fd,_0x111329){const _0x153d5c=_0x2cd496,_0x875bf0=Cesium['Cartesian3'][_0x153d5c(0x231)](_0x17ef57,_0x3485fd,this['fixedHeight']),_0x1e9b32=this['_map']['scene'];if(_0x1e9b32[_0x153d5c(0x15f)]===Cesium['SceneMode']['SCENE3D']){const _0x174259=new Cesium['EllipsoidalOccluder'](_0x1e9b32['globe']['ellipsoid'],_0x1e9b32['camera']['positionWC']),_0x1d4eb9=_0x174259[_0x153d5c(0x1b4)](_0x875bf0);if(!_0x1d4eb9)return _0x111329[_0x153d5c(0x1e9)]=0x0,null;}const _0x4aea3a=Cesium['SceneTransforms'][_0x153d5c(0x186)](this['_map']['scene'],_0x875bf0);return _0x4aea3a?[_0x4aea3a['x'],_0x4aea3a['y']]:null;}['clear'](){const _0x23ff87=_0x2cd496;this[_0x23ff87(0x1d7)][_0x23ff87(0x227)](),delete this['windData'];}['initWorker'](){const _0x2ae7fc=_0x2cd496;this[_0x2ae7fc(0x24c)]=new Worker(this['options']['worker']),this['worker']['onmessage']=_0x5d1c4d=>{const _0x3f3b9b=_0x2ae7fc;this['_drawLines'](_0x5d1c4d['data']['particles']),this[_0x3f3b9b(0x163)]=![];},this['windField']={'init':_0x47a3c3=>{const _0x909657=_0x2ae7fc;this['worker'][_0x909657(0x22c)]({'type':'init','options':_0x47a3c3});},'setOptions':_0x1bd384=>{const _0x58b207=_0x2ae7fc;this['worker'][_0x58b207(0x22c)]({'type':'setOptions','options':_0x1bd384});},'setDate':_0x2d4625=>{const _0x5bc149=_0x2ae7fc;this['worker'][_0x5bc149(0x22c)]({'type':'setDate','data':_0x2d4625});},'update':()=>{const _0x2b3fc7=_0x2ae7fc;if(this['_updateIng2'])return;this[_0x2b3fc7(0x163)]=!![],this[_0x2b3fc7(0x24c)]['postMessage']({'type':'update'});},'clear':()=>{const _0x14a969=_0x2ae7fc;this[_0x14a969(0x24c)]['postMessage']({'type':_0x14a969(0x227)});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace[_0x2cd496(0x1fb)][_0x2cd496(0x1c7)]=CanvasWindLayer,mars3d__namespace[_0x2cd496(0x21f)]=CanvasWindField,mars3d__namespace[_0x2cd496(0x19f)]=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x2cd496(0x241)]=WindLayer,exports[_0x2cd496(0x19f)]=WindUtil,Object['defineProperty'](exports,_0x2cd496(0x170),{'value':!![]});
14
+ 'use strict';const _0x5cbdc4=_0x5291;(function(_0x5d3cd8,_0x1e9cf1){const _0x62d148=_0x5291,_0x2a92af=_0x5d3cd8();while(!![]){try{const _0x2fa469=parseInt(_0x62d148(0x2ac))/0x1*(parseInt(_0x62d148(0x1f8))/0x2)+parseInt(_0x62d148(0x24b))/0x3+-parseInt(_0x62d148(0x24c))/0x4+-parseInt(_0x62d148(0x26a))/0x5*(-parseInt(_0x62d148(0x27e))/0x6)+-parseInt(_0x62d148(0x1f9))/0x7+parseInt(_0x62d148(0x237))/0x8+-parseInt(_0x62d148(0x2ab))/0x9*(parseInt(_0x62d148(0x279))/0xa);if(_0x2fa469===_0x1e9cf1)break;else _0x2a92af['push'](_0x2a92af['shift']());}catch(_0x38a299){_0x2a92af['push'](_0x2a92af['shift']());}}}(_0x5446,0x75101));function _interopNamespace(_0x260495){const _0x42e89f=_0x5291;if(_0x260495&&_0x260495['__esModule'])return _0x260495;var _0x5966bc=Object['create'](null);return _0x260495&&Object['keys'](_0x260495)['forEach'](function(_0x5016ac){if(_0x5016ac!=='default'){var _0x5b3d95=Object['getOwnPropertyDescriptor'](_0x260495,_0x5016ac);Object['defineProperty'](_0x5966bc,_0x5016ac,_0x5b3d95['get']?_0x5b3d95:{'enumerable':!![],'get':function(){return _0x260495[_0x5016ac];}});}}),_0x5966bc[_0x42e89f(0x24f)]=_0x260495,_0x5966bc;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x1bb07b,_0x396bd9){const _0xcf5415=_0x5291,_0x138c66=_0x1bb07b*Math[_0xcf5415(0x227)](Cesium$7['Math']['toRadians'](_0x396bd9));return _0x138c66;}function getV(_0x488628,_0x53601b){const _0x4dc667=_0x5291,_0x2754f4=_0x488628*Math[_0x4dc667(0x2a9)](Cesium$7[_0x4dc667(0x2af)]['toRadians'](_0x53601b));return _0x2754f4;}function getSpeed(_0x3aadec,_0x1113f3){const _0x3e6242=_0x5291,_0x45c7da=Math[_0x3e6242(0x264)](Math['pow'](_0x3aadec,0x2)+Math[_0x3e6242(0x28a)](_0x1113f3,0x2));return _0x45c7da;}function _0x5291(_0x49a172,_0x55ebcb){const _0x5446a3=_0x5446();return _0x5291=function(_0x5291e1,_0xa1453b){_0x5291e1=_0x5291e1-0x1d5;let _0x3fd4e4=_0x5446a3[_0x5291e1];return _0x3fd4e4;},_0x5291(_0x49a172,_0x55ebcb);}function getDirection(_0x49b48a,_0x425d4a){let _0xc4ba8f=Cesium$7['Math']['toDegrees'](Math['atan2'](_0x425d4a,_0x49b48a));return _0xc4ba8f+=_0xc4ba8f<0x0?0x168:0x0,_0xc4ba8f;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x2df169){const _0x2c576f=_0x5291;this['commandType']=_0x2df169['commandType'],this[_0x2c576f(0x25a)]=_0x2df169['geometry'],this['attributeLocations']=_0x2df169['attributeLocations'],this['primitiveType']=_0x2df169['primitiveType'],this['uniformMap']=_0x2df169['uniformMap'],this['vertexShaderSource']=_0x2df169[_0x2c576f(0x252)],this['fragmentShaderSource']=_0x2df169['fragmentShaderSource'],this['rawRenderState']=_0x2df169['rawRenderState'],this['framebuffer']=_0x2df169['framebuffer'],this['outputTexture']=_0x2df169['outputTexture'],this[_0x2c576f(0x24e)]=_0x2df169['autoClear']??![],this[_0x2c576f(0x1f4)]=_0x2df169[_0x2c576f(0x1f4)],this['show']=!![],this[_0x2c576f(0x20e)]=undefined,this['clearCommand']=undefined,this[_0x2c576f(0x24e)]&&(this['clearCommand']=new Cesium$6[(_0x2c576f(0x211))]({'color':new Cesium$6[(_0x2c576f(0x1e0))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x1ac50f){const _0x4e9cef=_0x5291;switch(this['commandType']){case'Draw':{const _0x145ae1=Cesium$6['VertexArray']['fromGeometry']({'context':_0x1ac50f,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x42efb3=Cesium$6['ShaderProgram']['fromCache']({'context':_0x1ac50f,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x53d622=Cesium$6['RenderState']['fromCache'](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x42efb3,'vertexArray':_0x145ae1,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x53d622,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x4e9cef(0x2b2)],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x900764,_0x3f7c58){const _0x4821f0=_0x5291;this[_0x4821f0(0x25a)]=_0x3f7c58;const _0x1310c5=Cesium$6['VertexArray'][_0x4821f0(0x25e)]({'context':_0x900764,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0x4821f0(0x26f)]});this['commandToExecute'][_0x4821f0(0x22a)]=_0x1310c5;}['update'](_0x3006b5){const _0xea63ef=_0x5291;if(!this['show'])return;if(_0x3006b5[_0xea63ef(0x225)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6[_0xea63ef(0x293)](this[_0xea63ef(0x20e)])&&(this['commandToExecute']=this[_0xea63ef(0x29b)](_0x3006b5['context'])),Cesium$6['defined'](this[_0xea63ef(0x1f4)])&&this[_0xea63ef(0x1f4)](),Cesium$6['defined'](this['clearCommand'])&&_0x3006b5['commandList']['push'](this['clearCommand']),_0x3006b5['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x4f0489=_0x5291;if(this['clearCommand']){var _0x230cde,_0x120929;(_0x230cde=this['clearCommand'])!==null&&_0x230cde!==void 0x0&&_0x230cde['vertexArray']&&this['clearCommand']['vertexArray']['destroy'](),(_0x120929=this['clearCommand'])!==null&&_0x120929!==void 0x0&&_0x120929['shaderProgram']&&this[_0x4f0489(0x1fe)][_0x4f0489(0x2a7)]['destroy'](),delete this[_0x4f0489(0x1fe)];}return this['commandToExecute']&&(this[_0x4f0489(0x20e)]['vertexArray']&&this['commandToExecute']['vertexArray'][_0x4f0489(0x243)](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram']['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x33115f=function(){const _0x15212f=_0x5291,_0x4414f3=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x15212f(0x1fb)],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5[(_0x15212f(0x257))]({'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 _0x4414f3;},_0x196c3d=function(_0x49827b,_0x14bbac){if(Cesium$5['defined'](_0x14bbac)){const _0x299d66={};_0x299d66['arrayBufferView']=_0x14bbac,_0x49827b['source']=_0x299d66;}const _0x38fd19=new Cesium$5['Texture'](_0x49827b);return _0x38fd19;},_0x544a9f=function(_0x2360b2,_0x55f3db,_0x430f64){const _0x2efcaa=_0x5291,_0x338557=new Cesium$5[(_0x2efcaa(0x296))]({'context':_0x2360b2,'colorTextures':[_0x55f3db],'depthTexture':_0x430f64});return _0x338557;},_0x36b81b=function(_0x5ef6b5){const _0x41ed4f=_0x5291,_0x3c52b4=!![],_0x1e11ea=![],_0x58e4de={'viewport':_0x5ef6b5[_0x41ed4f(0x217)],'depthTest':_0x5ef6b5['depthTest'],'depthMask':_0x5ef6b5['depthMask'],'blending':_0x5ef6b5[_0x41ed4f(0x20b)]},_0x34f96c=Cesium$5['Appearance'][_0x41ed4f(0x1f1)](_0x3c52b4,_0x1e11ea,_0x58e4de);return _0x34f96c;},_0x4380a7=function(_0x3ad2a9){const _0x784c09=_0x5291,_0x14a57a={},_0xe9fd74=Cesium$5[_0x784c09(0x2af)]['mod'](_0x3ad2a9['west'],Cesium$5['Math'][_0x784c09(0x20f)]),_0x36fd0f=Cesium$5[_0x784c09(0x2af)][_0x784c09(0x294)](_0x3ad2a9['east'],Cesium$5['Math'][_0x784c09(0x20f)]),_0x587863=_0x3ad2a9[_0x784c09(0x20a)];let _0x1f3115,_0xc289eb;_0x587863>Cesium$5[_0x784c09(0x2af)]['THREE_PI_OVER_TWO']?(_0x1f3115=0x0,_0xc289eb=Cesium$5[_0x784c09(0x2af)]['TWO_PI']):_0x36fd0f-_0xe9fd74<_0x587863?(_0x1f3115=_0xe9fd74,_0xc289eb=_0xe9fd74+_0x587863):(_0x1f3115=_0xe9fd74,_0xc289eb=_0x36fd0f);_0x14a57a['lon']={'min':Cesium$5['Math']['toDegrees'](_0x1f3115),'max':Cesium$5['Math']['toDegrees'](_0xc289eb)};const _0xe0c4e0=_0x3ad2a9['south'],_0x21684f=_0x3ad2a9['north'],_0x2b1dfd=_0x3ad2a9['height'],_0x242004=_0x2b1dfd>Cesium$5['Math']['PI']/0xc?_0x2b1dfd/0x2:0x0;let _0xf484af=Cesium$5['Math'][_0x784c09(0x1f7)](_0xe0c4e0-_0x242004),_0x1c7970=Cesium$5['Math']['clampToLatitudeRange'](_0x21684f+_0x242004);return _0xf484af<-Cesium$5[_0x784c09(0x2af)]['PI_OVER_THREE']&&(_0xf484af=-Cesium$5['Math'][_0x784c09(0x1e8)]),_0x1c7970>Cesium$5['Math']['PI_OVER_THREE']&&(_0x1c7970=Cesium$5[_0x784c09(0x2af)]['PI_OVER_TWO']),_0x14a57a[_0x784c09(0x25f)]={'min':Cesium$5[_0x784c09(0x2af)]['toDegrees'](_0xf484af),'max':Cesium$5['Math']['toDegrees'](_0x1c7970)},_0x14a57a;};return{'getFullscreenQuad':_0x33115f,'createTexture':_0x196c3d,'createFramebuffer':_0x544a9f,'createRawRenderState':_0x36b81b,'viewRectangleToLonLatRange':_0x4380a7};}());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['Cesium'];class ParticlesRendering{constructor(_0x215800,_0x3b1e1d,_0x3003e0,_0x3bdf11,_0x4b5102){this['createRenderingTextures'](_0x215800,_0x3b1e1d,_0x3003e0['colors']),this['createRenderingFramebuffers'](_0x215800),this['createRenderingPrimitives'](_0x215800,_0x3003e0,_0x3bdf11,_0x4b5102);}[_0x5cbdc4(0x23a)](_0x3bb845,_0x55e97f,_0x1720ac){const _0x3a12f1=_0x5cbdc4,_0x9ac04a={'context':_0x3bb845,'width':_0x3bb845['drawingBufferWidth'],'height':_0x3bb845['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat'][_0x3a12f1(0x277)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x571fe5={'context':_0x3bb845,'width':_0x3bb845['drawingBufferWidth'],'height':_0x3bb845['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x53804e=_0x1720ac['length'],_0x4cc5a1=new Float32Array(_0x53804e*0x3);for(let _0x355005=0x0;_0x355005<_0x53804e;_0x355005++){const _0x1648b3=Cesium$4['Color']['fromCssColorString'](_0x1720ac[_0x355005]);_0x4cc5a1[0x3*_0x355005]=_0x1648b3['red'],_0x4cc5a1[0x3*_0x355005+0x1]=_0x1648b3['green'],_0x4cc5a1[0x3*_0x355005+0x2]=_0x1648b3[_0x3a12f1(0x21f)];}const _0x2cb7a3={'context':_0x3bb845,'width':_0x53804e,'height':0x1,'pixelFormat':Cesium$4[_0x3a12f1(0x282)][_0x3a12f1(0x226)],'pixelDatatype':Cesium$4['PixelDatatype'][_0x3a12f1(0x1fb)],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4[_0x3a12f1(0x1e3)]['LINEAR']})};this[_0x3a12f1(0x278)]={'segmentsColor':Util['createTexture'](_0x9ac04a),'segmentsDepth':Util['createTexture'](_0x571fe5),'currentTrailsColor':Util['createTexture'](_0x9ac04a),'currentTrailsDepth':Util[_0x3a12f1(0x29a)](_0x571fe5),'nextTrailsColor':Util['createTexture'](_0x9ac04a),'nextTrailsDepth':Util[_0x3a12f1(0x29a)](_0x571fe5),'colorTable':Util['createTexture'](_0x2cb7a3,_0x4cc5a1)};}['createRenderingFramebuffers'](_0xbbbe5){const _0xebe335=_0x5cbdc4;this[_0xebe335(0x2b1)]={'segments':Util['createFramebuffer'](_0xbbbe5,this[_0xebe335(0x278)]['segmentsColor'],this[_0xebe335(0x278)]['segmentsDepth']),'currentTrails':Util[_0xebe335(0x27b)](_0xbbbe5,this[_0xebe335(0x278)]['currentTrailsColor'],this['textures']['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0xbbbe5,this['textures'][_0xebe335(0x284)],this[_0xebe335(0x278)]['nextTrailsDepth'])};}[_0x5cbdc4(0x253)](_0x1e055f){const _0x464a12=_0x5cbdc4,_0x21b7f4=0x4;let _0x291c91=[];for(let _0x29b60d=0x0;_0x29b60d<_0x1e055f['particlesTextureSize'];_0x29b60d++){for(let _0x174095=0x0;_0x174095<_0x1e055f[_0x464a12(0x24a)];_0x174095++){for(let _0x1a7659=0x0;_0x1a7659<_0x21b7f4;_0x1a7659++){_0x291c91[_0x464a12(0x29e)](_0x29b60d/_0x1e055f[_0x464a12(0x24a)]),_0x291c91['push'](_0x174095/_0x1e055f['particlesTextureSize']);}}}_0x291c91=new Float32Array(_0x291c91);let _0x5a2a88=[];const _0x57bb97=[-0x1,0x1],_0x45f8d2=[-0x1,0x1];for(let _0x3a1121=0x0;_0x3a1121<_0x1e055f[_0x464a12(0x201)];_0x3a1121++){for(let _0x4fe198=0x0;_0x4fe198<_0x21b7f4/0x2;_0x4fe198++){for(let _0x2e42df=0x0;_0x2e42df<_0x21b7f4/0x2;_0x2e42df++){_0x5a2a88['push'](_0x57bb97[_0x4fe198]),_0x5a2a88[_0x464a12(0x29e)](_0x45f8d2[_0x2e42df]),_0x5a2a88['push'](0x0);}}}_0x5a2a88=new Float32Array(_0x5a2a88);const _0x367733=0x6*_0x1e055f['maxParticles'],_0x1bec0d=new Uint32Array(_0x367733);for(let _0x284275=0x0,_0x32f303=0x0,_0x15ab30=0x0;_0x284275<_0x1e055f['maxParticles'];_0x284275++){_0x1bec0d[_0x32f303++]=_0x15ab30+0x0,_0x1bec0d[_0x32f303++]=_0x15ab30+0x1,_0x1bec0d[_0x32f303++]=_0x15ab30+0x2,_0x1bec0d[_0x32f303++]=_0x15ab30+0x2,_0x1bec0d[_0x32f303++]=_0x15ab30+0x1,_0x1bec0d[_0x32f303++]=_0x15ab30+0x3,_0x15ab30+=0x4;}const _0xd9aec2=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x291c91}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x5a2a88})}),'indices':_0x1bec0d});return _0xd9aec2;}['createRenderingPrimitives'](_0x530a37,_0x13e4f8,_0x9011fd,_0x3207ee){const _0xa08d6b=_0x5cbdc4,_0x939d42=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0xa08d6b(0x253)](_0x13e4f8),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x3207ee['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x3207ee['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x5e8a24=_0xa08d6b;return _0x3207ee[_0x5e8a24(0x1dc)]['postProcessingSpeed'];},'colorTable':function(){const _0x95c20d=_0xa08d6b;return _0x939d42[_0x95c20d(0x278)][_0x95c20d(0x23b)];},'aspect':function(){return _0x530a37['drawingBufferWidth']/_0x530a37['drawingBufferHeight'];},'pixelSize':function(){return _0x9011fd['pixelSize'];},'lineWidth':function(){return _0x13e4f8['lineWidth'];},'particleHeight':function(){return _0x13e4f8['particleHeight'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util[_0xa08d6b(0x213)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0xa08d6b(0x26c)],'uniformMap':{'segmentsColorTexture':function(){const _0x2311e6=_0xa08d6b;return _0x939d42['textures'][_0x2311e6(0x229)];},'segmentsDepthTexture':function(){const _0x2d7921=_0xa08d6b;return _0x939d42[_0x2d7921(0x278)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x14b894=_0xa08d6b;return _0x939d42[_0x14b894(0x2b1)]['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x7ee31f=_0xa08d6b;return _0x939d42['framebuffers']['currentTrails'][_0x7ee31f(0x259)];},'fadeOpacity':function(){return _0x13e4f8['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0xa08d6b(0x1d8)],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x5f59d1=_0xa08d6b,_0x1fb87a=_0x939d42['framebuffers']['currentTrails'];_0x939d42['framebuffers']['currentTrails']=_0x939d42['framebuffers'][_0x5f59d1(0x256)],_0x939d42[_0x5f59d1(0x2b1)]['nextTrails']=_0x1fb87a,_0x939d42['primitives']['trails']['commandToExecute'][_0x5f59d1(0x1e7)]=_0x939d42['framebuffers'][_0x5f59d1(0x256)],_0x939d42[_0x5f59d1(0x20c)][_0x5f59d1(0x2b7)]['clearCommand']['framebuffer']=_0x939d42['framebuffers']['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0xa08d6b(0x21d)]['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x56df9a=_0xa08d6b;return _0x939d42['framebuffers']['nextTrails'][_0x56df9a(0x27d)](0x0);},'trailsDepthTexture':function(){const _0x42b45d=_0xa08d6b;return _0x939d42['framebuffers'][_0x42b45d(0x256)][_0x42b45d(0x259)];}},'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':[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='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',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=_0x5cbdc4(0x2a2),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';function _0x5446(){const _0x33f147=['add','clientWidth','lev','_addedHook','cols','destroy','_removedHook','now','redraw','Pass','randomizeParticles','outputTexture','particlesTextureSize','2419200RdfAOr','915016dxlFmo','rows','autoClear','default','Cesium','getUVByPoint','vertexShaderSource','createSegmentsGeometry','windField','ShaderSource','nextTrails','GeometryAttribute','ZERO','depthTexture','geometry','getParticles','worker','getWind','fromGeometry','lat','camera','resize','lng','options','sqrt','canvasResize','random','WindLayer','pixelSize','mouse_move','5EVFteR','_onMapWhellEvent','TRIANGLES','getUVByXY','moveTo','STATIC_DRAW','speedFactor','drawingBufferHeight','absolute','clearFramebuffers','max','color','array','RGBA','textures','19930PckbyR','_showHook','createFramebuffer','viewerParameters','getColorTexture','5041314dDscvt','mouseDown','dimensions','_calc_speedRate','PixelFormat','_onMouseDownEvent','nextTrailsColor','ymax','clientHeight','_onMap_preRenderEvent','zIndex','_updateIng','pow','canvasHeight','windTextures','Compute','postProcessingSpeed','refreshTimer','forEach','scene','mouseHidden','defined','mod','_speedRate','Framebuffer','clear','off','latRange','createTexture','createCommand','levmax','preRender','push','update','round','mouse_down','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','beginPath','udata','context','getRandomLatLng','shaderProgram','register','sin','setData','4203wNPgvL','454dvnffF','refreshParticles','particlesComputing','Math','_updateIng2','framebuffers','OPAQUE','lineWidth','WindUtil','auto','style','trails','destroyParticlesTextures','length','layer','floor','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','_data','_map','globe','particlesTextures','setDate','getExtent','canvasContext','Color','rgb(206,255,255)','show','TextureMagnificationFilter','_drawLines','Sampler','pointer-events','framebuffer','PI_OVER_TWO','onmessage','levmin','execute','xmin','fillRect','particles','lineTo','_onMouseUpEvent','getDefaultRenderState','segments','currentParticlesPosition','preExecute','SCENE3D','vdata','clampToLatitudeRange','2092WmXedP','5934887wzcsbK','BufferUsage','FLOAT','fromDegrees','currentParticlesSpeed','clearCommand','particlesWind','windData','maxParticles','Cartesian2','min','TextureMinificationFilter','pointerEvents','remove','postMessage','speed','lonRange','width','blending','primitives','fixedHeight','commandToExecute','TWO_PI','particlesNumber','ClearCommand','_calcUV','createRawRenderState','_onMouseMoveEvent','particlesRendering','height','viewport','hidden','EventType','Cartesian3','ymin','_colorRamp','PrimitiveType','visibility','blue','maxAge','setOptions','drawingBufferWidth','fadeOpacity','applyViewerParameters','mode','RGB','cos','getOptions','segmentsColor','vertexArray','tlng','canvas','keys','mouseMove','_tomap','age','particleSystem','removeAll','canrefresh','unbindEvent','abs','speedRate','2922496qgTYAG','frameTime','tlat','createRenderingTextures','colorTable','xmax','data'];_0x5446=function(){return _0x33f147;};return _0x5446();}const Cesium$3=mars3d__namespace[_0x5cbdc4(0x250)];class ParticlesComputing{constructor(_0x40305c,_0x295407,_0x1a9220,_0x3c043e){this['data']=_0x295407,this['createWindTextures'](_0x40305c,_0x295407),this['createParticlesTextures'](_0x40305c,_0x1a9220,_0x3c043e),this['createComputingPrimitives'](_0x295407,_0x1a9220,_0x3c043e);}['createWindTextures'](_0x49631c,_0x558abf){const _0x2bcd39=_0x5cbdc4,_0x3ac81d={'context':_0x49631c,'width':_0x558abf[_0x2bcd39(0x280)]['lon'],'height':_0x558abf['dimensions']['lat']*(_0x558abf['dimensions'][_0x2bcd39(0x240)]||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3[_0x2bcd39(0x1e3)]['NEAREST']})};this['windTextures']={'U':Util[_0x2bcd39(0x29a)](_0x3ac81d,_0x558abf['U'][_0x2bcd39(0x276)]),'V':Util['createTexture'](_0x3ac81d,_0x558abf['V']['array'])};}['createParticlesTextures'](_0x2793ee,_0x39dfdf,_0xc1f75f){const _0x3501e2=_0x5cbdc4,_0x57fd45={'context':_0x2793ee,'width':_0x39dfdf[_0x3501e2(0x24a)],'height':_0x39dfdf['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat'][_0x3501e2(0x277)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x3501e2(0x1e5))]({'minificationFilter':Cesium$3[_0x3501e2(0x204)]['NEAREST'],'magnificationFilter':Cesium$3[_0x3501e2(0x1e3)]['NEAREST']})},_0x389af0=this['randomizeParticles'](_0x39dfdf['maxParticles'],_0xc1f75f),_0x349eaf=new Float32Array(0x4*_0x39dfdf['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x57fd45),'currentParticlesPosition':Util['createTexture'](_0x57fd45,_0x389af0),'nextParticlesPosition':Util['createTexture'](_0x57fd45,_0x389af0),'currentParticlesSpeed':Util['createTexture'](_0x57fd45,_0x349eaf),'nextParticlesSpeed':Util['createTexture'](_0x57fd45,_0x349eaf),'postProcessingPosition':Util['createTexture'](_0x57fd45,_0x389af0),'postProcessingSpeed':Util['createTexture'](_0x57fd45,_0x349eaf)};}[_0x5cbdc4(0x248)](_0x3c5c39,_0x4fa02e){const _0x4a61c9=_0x5cbdc4,_0x4e0626=new Float32Array(0x4*_0x3c5c39);for(let _0x3551a8=0x0;_0x3551a8<_0x3c5c39;_0x3551a8++){_0x4e0626[0x4*_0x3551a8]=Cesium$3[_0x4a61c9(0x2af)]['randomBetween'](_0x4fa02e['lonRange']['x'],_0x4fa02e['lonRange']['y']),_0x4e0626[0x4*_0x3551a8+0x1]=Cesium$3['Math']['randomBetween'](_0x4fa02e[_0x4a61c9(0x299)]['x'],_0x4fa02e[_0x4a61c9(0x299)]['y']),_0x4e0626[0x4*_0x3551a8+0x2]=Cesium$3['Math']['randomBetween'](this['data'][_0x4a61c9(0x240)]['min'],this[_0x4a61c9(0x23d)]['lev'][_0x4a61c9(0x274)]),_0x4e0626[0x4*_0x3551a8+0x3]=0x0;}return _0x4e0626;}[_0x5cbdc4(0x2b8)](){Object['keys'](this['particlesTextures'])['forEach'](_0x3bfc1e=>{const _0x52a21b=_0x5291;this[_0x52a21b(0x1dc)][_0x3bfc1e][_0x52a21b(0x243)]();});}['createComputingPrimitives'](_0x519694,_0x16178e,_0x38461e){const _0x5145c2=_0x5cbdc4,_0x341c26=new Cesium$3['Cartesian3'](_0x519694['dimensions']['lon'],_0x519694[_0x5145c2(0x280)]['lat'],_0x519694['dimensions'][_0x5145c2(0x240)]),_0x13a6fd=new Cesium$3[(_0x5145c2(0x21a))](_0x519694['lon']['min'],_0x519694['lat']['min'],_0x519694['lev']['min']),_0x10cd49=new Cesium$3['Cartesian3'](_0x519694['lon'][_0x5145c2(0x274)],_0x519694[_0x5145c2(0x25f)][_0x5145c2(0x274)],_0x519694['lev']['max']),_0x562e56=new Cesium$3['Cartesian3']((_0x10cd49['x']-_0x13a6fd['x'])/(_0x341c26['x']-0x1),(_0x10cd49['y']-_0x13a6fd['y'])/(_0x341c26['y']-0x1),_0x341c26['z']>0x1?(_0x10cd49['z']-_0x13a6fd['z'])/(_0x341c26['z']-0x1):0x1),_0x3c60ed=new Cesium$3['Cartesian2'](_0x519694['U']['min'],_0x519694['U'][_0x5145c2(0x274)]),_0x1fbff0=new Cesium$3[(_0x5145c2(0x202))](_0x519694['V']['min'],_0x519694['V'][_0x5145c2(0x274)]),_0x3d4e9c=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){const _0x598f2d=_0x5145c2;return _0x3d4e9c[_0x598f2d(0x28c)]['U'];},'V':function(){return _0x3d4e9c['windTextures']['V'];},'currentParticlesPosition':function(){const _0xc8f565=_0x5145c2;return _0x3d4e9c[_0xc8f565(0x1dc)][_0xc8f565(0x1f3)];},'dimension':function(){return _0x341c26;},'minimum':function(){return _0x13a6fd;},'maximum':function(){return _0x10cd49;},'interval':function(){return _0x562e56;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x5145c2(0x1ff)],'preExecute':function(){const _0x3c08d7=_0x5145c2;_0x3d4e9c['primitives'][_0x3c08d7(0x25d)]['commandToExecute']['outputTexture']=_0x3d4e9c['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':_0x5145c2(0x28d),'uniformMap':{'currentParticlesSpeed':function(){const _0x33a1a1=_0x5145c2;return _0x3d4e9c['particlesTextures'][_0x33a1a1(0x1fd)];},'particlesWind':function(){return _0x3d4e9c['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x3c60ed;},'vSpeedRange':function(){return _0x1fbff0;},'pixelSize':function(){return _0x38461e['pixelSize'];},'speedFactor':function(){return _0x16178e['speedFactor'];}},'fragmentShaderSource':new Cesium$3[(_0x5145c2(0x255))]({'sources':[updateSpeed_frag]}),'outputTexture':this[_0x5145c2(0x1dc)]['nextParticlesSpeed'],'preExecute':function(){const _0x107db6=_0x5145c2,_0x18138a=_0x3d4e9c['particlesTextures']['currentParticlesSpeed'];_0x3d4e9c['particlesTextures'][_0x107db6(0x1fd)]=_0x3d4e9c['particlesTextures']['postProcessingSpeed'],_0x3d4e9c['particlesTextures']['postProcessingSpeed']=_0x18138a,_0x3d4e9c['primitives']['updateSpeed']['commandToExecute'][_0x107db6(0x249)]=_0x3d4e9c['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':_0x5145c2(0x28d),'uniformMap':{'currentParticlesPosition':function(){const _0x4e8bf6=_0x5145c2;return _0x3d4e9c['particlesTextures'][_0x4e8bf6(0x1f3)];},'currentParticlesSpeed':function(){return _0x3d4e9c['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x43fdf2=_0x5145c2,_0xf3321=_0x3d4e9c['particlesTextures']['currentParticlesPosition'];_0x3d4e9c['particlesTextures']['currentParticlesPosition']=_0x3d4e9c['particlesTextures']['postProcessingPosition'],_0x3d4e9c['particlesTextures']['postProcessingPosition']=_0xf3321,_0x3d4e9c[_0x43fdf2(0x20c)]['updatePosition']['commandToExecute']['outputTexture']=_0x3d4e9c[_0x43fdf2(0x1dc)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x5145c2(0x28d),'uniformMap':{'nextParticlesPosition':function(){const _0xf430db=_0x5145c2;return _0x3d4e9c[_0xf430db(0x1dc)]['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x3d4e9c['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x38461e['lonRange'];},'latRange':function(){const _0x3a912a=_0x5145c2;return _0x38461e[_0x3a912a(0x299)];},'randomCoefficient':function(){const _0xc1fb19=_0x5145c2,_0x42eb9b=Math[_0xc1fb19(0x266)]();return _0x42eb9b;},'dropRate':function(){return _0x16178e['dropRate'];},'dropRateBump':function(){return _0x16178e['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x5145c2(0x1dc)]['postProcessingPosition'],'preExecute':function(){_0x3d4e9c['primitives']['postProcessingPosition']['commandToExecute']['outputTexture']=_0x3d4e9c['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x3d4e9c['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){const _0x1ffc86=_0x5145c2;return _0x3d4e9c[_0x1ffc86(0x1dc)]['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this[_0x5145c2(0x1dc)]['postProcessingSpeed'],'preExecute':function(){const _0x46d740=_0x5145c2;_0x3d4e9c[_0x46d740(0x20c)][_0x46d740(0x28e)]['commandToExecute']['outputTexture']=_0x3d4e9c['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x51bf8b,_0x38b85c,_0x19798b,_0x5b4900){const _0x243ba4=_0x5cbdc4;this['context']=_0x51bf8b,_0x38b85c={..._0x38b85c},_0x38b85c['udata']&&_0x38b85c['vdata']&&(_0x38b85c[_0x243ba4(0x280)]={},_0x38b85c['dimensions']['lon']=_0x38b85c['cols'],_0x38b85c[_0x243ba4(0x280)]['lat']=_0x38b85c['rows'],_0x38b85c['dimensions']['lev']=_0x38b85c['lev']||0x1,_0x38b85c['lon']={},_0x38b85c['lon'][_0x243ba4(0x203)]=_0x38b85c['xmin'],_0x38b85c['lon'][_0x243ba4(0x274)]=_0x38b85c['xmax'],_0x38b85c['lat']={},_0x38b85c['lat']['min']=_0x38b85c['ymin'],_0x38b85c['lat']['max']=_0x38b85c[_0x243ba4(0x285)],_0x38b85c['lev']={},_0x38b85c[_0x243ba4(0x240)][_0x243ba4(0x203)]=_0x38b85c[_0x243ba4(0x1ea)]??0x1,_0x38b85c['lev']['max']=_0x38b85c[_0x243ba4(0x29c)]??0x1,_0x38b85c['U']={},_0x38b85c['U']['array']=new Float32Array(_0x38b85c['udata']),_0x38b85c['U']['min']=_0x38b85c['umin']??Math['min'](..._0x38b85c[_0x243ba4(0x2a4)]),_0x38b85c['U']['max']=_0x38b85c['umax']??Math['max'](..._0x38b85c[_0x243ba4(0x2a4)]),_0x38b85c['V']={},_0x38b85c['V']['array']=new Float32Array(_0x38b85c[_0x243ba4(0x1f6)]),_0x38b85c['V']['min']=_0x38b85c['vmin']??Math['min'](..._0x38b85c['vdata']),_0x38b85c['V']['max']=_0x38b85c['vmax']??Math['max'](..._0x38b85c['vdata'])),this[_0x243ba4(0x23d)]=_0x38b85c,this[_0x243ba4(0x263)]=_0x19798b,this[_0x243ba4(0x27c)]=_0x5b4900,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0x243ba4(0x27c)]),this[_0x243ba4(0x215)]=new ParticlesRendering(this[_0x243ba4(0x2a5)],this['data'],this['options'],this['viewerParameters'],this[_0x243ba4(0x2ae)]);}[_0x5cbdc4(0x265)](_0x2bad96){const _0x2d83c9=_0x5cbdc4;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x2cb000=>{const _0x14b328=_0x5291;this[_0x14b328(0x2ae)][_0x14b328(0x28c)][_0x2cb000]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object[_0x2d83c9(0x22d)](this['particlesRendering']['framebuffers'])['forEach'](_0x46c9ce=>{this['particlesRendering']['framebuffers'][_0x46c9ce]['destroy']();}),this['context']=_0x2bad96,this[_0x2d83c9(0x2ae)]=new ParticlesComputing(this[_0x2d83c9(0x2a5)],this['data'],this['options'],this['viewerParameters']),this[_0x2d83c9(0x215)]=new ParticlesRendering(this[_0x2d83c9(0x2a5)],this['data'],this[_0x2d83c9(0x263)],this['viewerParameters'],this['particlesComputing']);}[_0x5cbdc4(0x273)](){const _0x31f339=_0x5cbdc4,_0x1ad7a7=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0x31f339(0x247)][_0x31f339(0x2b2)]});Object['keys'](this[_0x31f339(0x215)]['framebuffers'])[_0x31f339(0x290)](_0x1a6ab2=>{const _0x52e887=_0x31f339;_0x1ad7a7['framebuffer']=this[_0x52e887(0x215)]['framebuffers'][_0x1a6ab2],_0x1ad7a7[_0x52e887(0x1eb)](this['context']);});}['refreshParticles'](_0xfb9fb2){const _0x28bf8a=_0x5cbdc4;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this['context'],this[_0x28bf8a(0x263)],this['viewerParameters']);if(_0xfb9fb2){var _0x2363b8;const _0x284283=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering'][_0x28bf8a(0x20c)]['segments']['geometry']=_0x284283;const _0x246edf=Cesium$2['VertexArray']['fromGeometry']({'context':this[_0x28bf8a(0x2a5)],'geometry':_0x284283,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2[_0x28bf8a(0x1fa)]['STATIC_DRAW']});(_0x2363b8=this['particlesRendering']['primitives'])!==null&&_0x2363b8!==void 0x0&&(_0x2363b8=_0x2363b8['segments'])!==null&&_0x2363b8!==void 0x0&&_0x2363b8['commandToExecute']&&(this['particlesRendering'][_0x28bf8a(0x20c)][_0x28bf8a(0x1f2)][_0x28bf8a(0x20e)][_0x28bf8a(0x22a)]=_0x246edf);}}[_0x5cbdc4(0x221)](_0x8534f5){const _0x4279ae=_0x5cbdc4;let _0x41351b=![];this['options']['maxParticles']!==_0x8534f5['maxParticles']&&(_0x41351b=!![]),Object['keys'](_0x8534f5)['forEach'](_0x9b9532=>{this['options'][_0x9b9532]=_0x8534f5[_0x9b9532];}),this[_0x4279ae(0x2ad)](_0x41351b);}[_0x5cbdc4(0x224)](_0x354828){Object['keys'](_0x354828)['forEach'](_0x4b6263=>{this['viewerParameters'][_0x4b6263]=_0x354828[_0x4b6263];}),this['refreshParticles'](![]);}['destroy'](){const _0x465b89=_0x5cbdc4;clearTimeout(this[_0x465b89(0x233)]),this['particlesComputing']['destroyParticlesTextures'](),Object[_0x465b89(0x22d)](this['particlesComputing']['windTextures'])['forEach'](_0x267cf1=>{this['particlesComputing']['windTextures'][_0x267cf1]['destroy']();}),this['particlesRendering']['textures'][_0x465b89(0x23b)]['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x54a464=>{const _0x2c504b=_0x465b89;this['particlesRendering'][_0x2c504b(0x2b1)][_0x54a464]['destroy']();});for(const _0x57b520 in this){delete this[_0x57b520];}}}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':[_0x5cbdc4(0x1e1)]};class WindLayer extends BaseLayer$1{constructor(_0x38e45e={}){_0x38e45e={...DEF_OPTIONS,..._0x38e45e},super(_0x38e45e),this['_setOptionsHook'](_0x38e45e);}get['layer'](){const _0x2aff08=_0x5cbdc4;return this[_0x2aff08(0x20c)];}get['data'](){return this['_data'];}set['data'](_0xdb1126){const _0xca7e43=_0x5cbdc4;this[_0xca7e43(0x2aa)](_0xdb1126);}get['colors'](){return this['options']['colors'];}set['colors'](_0x2e6cfc){const _0x5223da=_0x5cbdc4;this['options']['colors']=_0x2e6cfc,this[_0x5223da(0x231)]&&this['particleSystem']['setOptions']({'colors':_0x2e6cfc}),this[_0x5223da(0x261)]();}['_mountedHook'](){}['_addedHook'](){const _0x5f2b1c=_0x5cbdc4;this['scene']=this['_map']['scene'],this[_0x5f2b1c(0x260)]=this[_0x5f2b1c(0x1da)]['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this[_0x5f2b1c(0x1da)][_0x5f2b1c(0x291)]['primitives']['add'](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1[(_0x5f2b1c(0x202))](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x5f2b1c(0x258)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this[_0x5f2b1c(0x1da)]['on'](mars3d__namespace[_0x5f2b1c(0x219)]['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0x5f2b1c(0x219)][_0x5f2b1c(0x27f)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x5f2b1c(0x219)]['mouseUp'],this['_onMouseUpEvent'],this),this[_0x5f2b1c(0x1da)]['on'](mars3d__namespace['EventType'][_0x5f2b1c(0x22e)],this['_onMouseMoveEvent'],this),this[_0x5f2b1c(0x1d9)]&&this['setData'](this['_data']);}['_removedHook'](){const _0x214be4=_0x5cbdc4;window['removeEventListener']('resize',this[_0x214be4(0x261)]),this['_map']['off'](mars3d__namespace[_0x214be4(0x219)][_0x214be4(0x29d)],this[_0x214be4(0x287)],this),this['_map']['off'](mars3d__namespace[_0x214be4(0x219)]['wheel'],this['_onMapWhellEvent'],this),this['_map'][_0x214be4(0x298)](mars3d__namespace[_0x214be4(0x219)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map'][_0x214be4(0x298)](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives'][_0x214be4(0x232)](),this['_map']['scene']['primitives'][_0x214be4(0x206)](this['primitives']);}['resize'](){const _0x2b717c=_0x5cbdc4;if(!this[_0x2b717c(0x1e2)]||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}[_0x5cbdc4(0x287)](_0x29b24e){const _0x344fb7=_0x5cbdc4;this['particleSystem']['canvasResize'](this['scene']['context']),this['addPrimitives'](),this['primitives'][_0x344fb7(0x1e2)]=!![];}['_onMapWhellEvent'](_0x155ded){const _0x3430af=_0x5cbdc4;clearTimeout(this[_0x3430af(0x28f)]);if(!this[_0x3430af(0x1e2)]||!this['particleSystem'])return;this[_0x3430af(0x20c)]['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x564c1f){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0xd919da){const _0x17c87b=_0x5cbdc4;if(!this[_0x17c87b(0x1e2)]||!this['particleSystem'])return;this[_0x17c87b(0x2a1)]&&(this[_0x17c87b(0x20c)][_0x17c87b(0x1e2)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5e62b8){const _0x474cbc=_0x5cbdc4;if(!this[_0x474cbc(0x1e2)]||!this[_0x474cbc(0x231)])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this[_0x474cbc(0x20c)]['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}[_0x5cbdc4(0x246)](){const _0xf28f73=_0x5cbdc4;if(!this[_0xf28f73(0x1da)]||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this[_0xf28f73(0x20c)]['show']=!![];}['setData'](_0x328fd6){const _0x88dcbf=_0x5cbdc4;this[_0x88dcbf(0x1d9)]=_0x328fd6,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this[_0x88dcbf(0x291)][_0x88dcbf(0x2a5)],_0x328fd6,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0xbbd67b,_0xac1f2){const _0x2ba066=_0x5cbdc4;if(_0xbbd67b)for(const _0x25e844 in _0xbbd67b){this[_0x25e844]=_0xbbd67b[_0x25e844];}this[_0x2ba066(0x231)]&&this['particleSystem']['setOptions'](this[_0x2ba066(0x228)]());}[_0x5cbdc4(0x228)](){const _0x51c0c6=_0x5cbdc4,_0x35242e=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x35242e*_0x35242e,{'particlesTextureSize':_0x35242e,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x51c0c6(0x20d)],'fadeOpacity':this[_0x51c0c6(0x223)],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this[_0x51c0c6(0x270)],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x304e20=_0x5cbdc4;this['primitives']['add'](this['particleSystem'][_0x304e20(0x2ae)]['primitives']['getWind']),this[_0x304e20(0x20c)][_0x304e20(0x23e)](this['particleSystem'][_0x304e20(0x2ae)]['primitives']['updateSpeed']),this['primitives'][_0x304e20(0x23e)](this['particleSystem'][_0x304e20(0x2ae)]['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingPosition']),this['primitives'][_0x304e20(0x23e)](this[_0x304e20(0x231)]['particlesComputing']['primitives'][_0x304e20(0x28e)]),this['primitives'][_0x304e20(0x23e)](this[_0x304e20(0x231)][_0x304e20(0x215)]['primitives']['segments']),this['primitives'][_0x304e20(0x23e)](this['particleSystem'][_0x304e20(0x215)]['primitives']['trails']),this['primitives']['add'](this[_0x304e20(0x231)]['particlesRendering'][_0x304e20(0x20c)]['screen']);}['updateViewerParameters'](){const _0x40bb1c=_0x5cbdc4;let _0xe78458=this['camera']['computeViewRectangle'](this['scene'][_0x40bb1c(0x1db)]['ellipsoid']);if(!_0xe78458){const _0x53e0ce=this['_map'][_0x40bb1c(0x1de)]();_0xe78458=Cesium$1['Rectangle'][_0x40bb1c(0x1fc)](_0x53e0ce[_0x40bb1c(0x1ec)],_0x53e0ce['ymin'],_0x53e0ce['xmax'],_0x53e0ce[_0x40bb1c(0x285)]);}const _0x1c5ac4=Util['viewRectangleToLonLatRange'](_0xe78458);this[_0x40bb1c(0x27c)]['lonRange']['x']=_0x1c5ac4['lon']['min'],this['viewerParameters'][_0x40bb1c(0x209)]['y']=_0x1c5ac4['lon']['max'],this['viewerParameters'][_0x40bb1c(0x299)]['x']=_0x1c5ac4['lat']['min'],this['viewerParameters'][_0x40bb1c(0x299)]['y']=_0x1c5ac4[_0x40bb1c(0x25f)]['max'];const _0x3d35fc=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene'][_0x40bb1c(0x222)],this[_0x40bb1c(0x291)][_0x40bb1c(0x271)]);_0x3d35fc>0x0&&(this['viewerParameters'][_0x40bb1c(0x268)]=_0x3d35fc);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer'][_0x5cbdc4(0x267)]=WindLayer;class CanvasParticle{constructor(){const _0x2cee11=_0x5cbdc4;this[_0x2cee11(0x262)]=null,this['lat']=null,this[_0x2cee11(0x22b)]=null,this[_0x2cee11(0x239)]=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0x106de7 in this){delete this[_0x106de7];}}}class CanvasWindField{constructor(_0x75a2a){const _0x592bfb=_0x5cbdc4;this[_0x592bfb(0x221)](_0x75a2a);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x1883ea){const _0x3d3020=_0x5cbdc4;this['_speedRate']=(0x64-(_0x1883ea>0x63?0x63:_0x1883ea))*0x64,this['_calc_speedRate']=[(this['xmax']-this['xmin'])/this['_speedRate'],(this['ymax']-this['ymin'])/this[_0x3d3020(0x295)]];}get['maxAge'](){return this['_maxAge'];}set['maxAge'](_0x2195e6){this['_maxAge']=_0x2195e6;}['setOptions'](_0x5c61d5){const _0x558aac=_0x5cbdc4;this[_0x558aac(0x263)]=_0x5c61d5,this['maxAge']=_0x5c61d5['maxAge']||0x78,this[_0x558aac(0x236)]=_0x5c61d5['speedRate']||0x32,this['particles']=[];const _0x4ba9b4=_0x5c61d5[_0x558aac(0x210)]||0x1000;for(let _0x3a08be=0x0;_0x3a08be<_0x4ba9b4;_0x3a08be++){const _0x191f1d=this['_randomParticle'](new CanvasParticle());this['particles'][_0x558aac(0x29e)](_0x191f1d);}}['setDate'](_0x24d99e){const _0x31119c=_0x5cbdc4;this['rows']=_0x24d99e['rows'],this['cols']=_0x24d99e[_0x31119c(0x242)],this[_0x31119c(0x1ec)]=_0x24d99e['xmin'],this['xmax']=_0x24d99e['xmax'],this['ymin']=_0x24d99e['ymin'],this['ymax']=_0x24d99e[_0x31119c(0x285)],this['grid']=[];const _0x3acf4d=_0x24d99e['udata'],_0x4b21e2=_0x24d99e[_0x31119c(0x1f6)];let _0x1e86cb=![];_0x3acf4d['length']===this[_0x31119c(0x24d)]&&_0x3acf4d[0x0]['length']===this['cols']&&(_0x1e86cb=!![]);let _0xd00051=0x0,_0xbab31c=null,_0x3503c3=null;for(let _0x92f855=0x0;_0x92f855<this['rows'];_0x92f855++){_0xbab31c=[];for(let _0x455b1f=0x0;_0x455b1f<this[_0x31119c(0x242)];_0x455b1f++,_0xd00051++){_0x1e86cb?_0x3503c3=this[_0x31119c(0x212)](_0x3acf4d[_0x92f855][_0x455b1f],_0x4b21e2[_0x92f855][_0x455b1f]):_0x3503c3=this[_0x31119c(0x212)](_0x3acf4d[_0xd00051],_0x4b21e2[_0xd00051]),_0xbab31c['push'](_0x3503c3);}this['grid']['push'](_0xbab31c);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){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'](_0x2a48e5,_0x17e0e1){const _0x12abe3=_0x5cbdc4,_0x59ebb0=(_0x2a48e5-this['xmin'])/(this[_0x12abe3(0x23c)]-this[_0x12abe3(0x1ec)])*(this['cols']-0x1),_0x172e3a=(this['ymax']-_0x17e0e1)/(this['ymax']-this[_0x12abe3(0x21b)])*(this['rows']-0x1);return[_0x59ebb0,_0x172e3a];}['getUVByXY'](_0x44ce47,_0x1305fc){const _0x58ddd6=_0x5cbdc4;if(_0x44ce47<0x0||_0x44ce47>=this['cols']||_0x1305fc>=this['rows'])return[0x0,0x0,0x0];const _0x1f191c=Math[_0x58ddd6(0x1d7)](_0x44ce47),_0x226dbc=Math['floor'](_0x1305fc);if(_0x1f191c===_0x44ce47&&_0x226dbc===_0x1305fc)return this['grid'][_0x1305fc][_0x44ce47];const _0x1ef496=_0x1f191c+0x1,_0x23f852=_0x226dbc+0x1,_0x2f8977=this[_0x58ddd6(0x26d)](_0x1f191c,_0x226dbc),_0x225f0d=this['getUVByXY'](_0x1ef496,_0x226dbc),_0x4a6966=this['getUVByXY'](_0x1f191c,_0x23f852),_0xa2c9b3=this['getUVByXY'](_0x1ef496,_0x23f852);let _0x5bd9d3=null;try{_0x5bd9d3=this['_bilinearInterpolation'](_0x44ce47-_0x1f191c,_0x1305fc-_0x226dbc,_0x2f8977,_0x225f0d,_0x4a6966,_0xa2c9b3);}catch(_0xa143af){console['log'](_0x44ce47,_0x1305fc);}return _0x5bd9d3;}['_bilinearInterpolation'](_0x1fac3f,_0x3eeabd,_0x1fc50a,_0x4de1d2,_0x267e9b,_0x30af26){const _0x59cc2f=_0x5cbdc4,_0x37e623=0x1-_0x1fac3f,_0x50429d=0x1-_0x3eeabd,_0x53e2a5=_0x37e623*_0x50429d,_0x528945=_0x1fac3f*_0x50429d,_0x5504dd=_0x37e623*_0x3eeabd,_0x1099ef=_0x1fac3f*_0x3eeabd,_0x33fd71=_0x1fc50a[0x0]*_0x53e2a5+_0x4de1d2[0x0]*_0x528945+_0x267e9b[0x0]*_0x5504dd+_0x30af26[0x0]*_0x1099ef,_0x253d19=_0x1fc50a[0x1]*_0x53e2a5+_0x4de1d2[0x1]*_0x528945+_0x267e9b[0x1]*_0x5504dd+_0x30af26[0x1]*_0x1099ef;return this[_0x59cc2f(0x212)](_0x33fd71,_0x253d19);}['_calcUV'](_0x2e89af,_0x5013ac){return[+_0x2e89af,+_0x5013ac,Math['sqrt'](_0x2e89af*_0x2e89af+_0x5013ac*_0x5013ac)];}['getUVByPoint'](_0x19d5cf,_0x6167b4){if(!this['isInExtent'](_0x19d5cf,_0x6167b4))return null;const _0x20c66b=this['toGridXY'](_0x19d5cf,_0x6167b4),_0x77f0e7=this['getUVByXY'](_0x20c66b[0x0],_0x20c66b[0x1]);return _0x77f0e7;}['isInExtent'](_0x225ce7,_0x3ceace){const _0x400e92=_0x5cbdc4;return _0x225ce7>=this['xmin']&&_0x225ce7<=this['xmax']&&_0x3ceace>=this['ymin']&&_0x3ceace<=this[_0x400e92(0x285)]?!![]:![];}[_0x5cbdc4(0x2a6)](){const _0xa11b76=_0x5cbdc4,_0x49c64a=fRandomByfloat(this[_0xa11b76(0x1ec)],this['xmax']),_0x3007eb=fRandomByfloat(this[_0xa11b76(0x21b)],this[_0xa11b76(0x285)]);return{'lat':_0x3007eb,'lng':_0x49c64a};}[_0x5cbdc4(0x25b)](){const _0x10b609=_0x5cbdc4;let _0x3f4682,_0x2a116a,_0x32b925;for(let _0x52cda4=0x0,_0x22ca94=this['particles']['length'];_0x52cda4<_0x22ca94;_0x52cda4++){let _0x3876cb=this['particles'][_0x52cda4];_0x3876cb[_0x10b609(0x230)]<=0x0&&(_0x3876cb=this['_randomParticle'](_0x3876cb));if(_0x3876cb['age']>0x0){const _0xe07a3c=_0x3876cb[_0x10b609(0x22b)],_0x52ad04=_0x3876cb['tlat'];_0x32b925=this[_0x10b609(0x251)](_0xe07a3c,_0x52ad04),_0x32b925?(_0x3f4682=_0xe07a3c+this[_0x10b609(0x281)][0x0]*_0x32b925[0x0],_0x2a116a=_0x52ad04+this[_0x10b609(0x281)][0x1]*_0x32b925[0x1],_0x3876cb['lng']=_0xe07a3c,_0x3876cb['lat']=_0x52ad04,_0x3876cb['tlng']=_0x3f4682,_0x3876cb['tlat']=_0x2a116a,_0x3876cb[_0x10b609(0x208)]=_0x32b925[0x2],_0x3876cb['age']--):_0x3876cb['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x26a480){const _0x46acde=_0x5cbdc4;let _0x3260b2,_0x219b8a;for(let _0x2ff7dd=0x0;_0x2ff7dd<0x1e;_0x2ff7dd++){_0x3260b2=this[_0x46acde(0x2a6)](),_0x219b8a=this['getUVByPoint'](_0x3260b2['lng'],_0x3260b2[_0x46acde(0x25f)]);if(_0x219b8a&&_0x219b8a[0x2]>0x0)break;}if(!_0x219b8a)return _0x26a480;const _0x3189e9=_0x3260b2[_0x46acde(0x262)]+this['_calc_speedRate'][0x0]*_0x219b8a[0x0],_0x44c01c=_0x3260b2['lat']+this['_calc_speedRate'][0x1]*_0x219b8a[0x1];return _0x26a480['lng']=_0x3260b2['lng'],_0x26a480[_0x46acde(0x25f)]=_0x3260b2['lat'],_0x26a480[_0x46acde(0x22b)]=_0x3189e9,_0x26a480['tlat']=_0x44c01c,_0x26a480['age']=Math[_0x46acde(0x2a0)](Math['random']()*this['maxAge']),_0x26a480['speed']=_0x219b8a[0x2],_0x26a480;}['destroy'](){for(const _0x41a283 in this){delete this[_0x41a283];}}}function fRandomByfloat(_0x4f4c1d,_0x12c49e){return _0x4f4c1d+Math['random']()*(_0x12c49e-_0x4f4c1d);}const Cesium=mars3d__namespace[_0x5cbdc4(0x250)],BaseLayer=mars3d__namespace[_0x5cbdc4(0x1d6)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0xec2b2={}){const _0x4457fc=_0x5cbdc4;super(_0xec2b2),this['_setOptionsHook'](_0xec2b2),this[_0x4457fc(0x22c)]=null,_0xec2b2['colors']&&_0xec2b2['steps']&&(this[_0x4457fc(0x21c)]=new mars3d__namespace['ColorRamp'](_0xec2b2));}['_setOptionsHook'](_0x52e8e1,_0x538bb0){const _0x2144f2=_0x5cbdc4;this[_0x2144f2(0x238)]=0x3e8/(_0x52e8e1['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x52e8e1[_0x2144f2(0x275)]||'#ffffff',this['lineWidth']=_0x52e8e1[_0x2144f2(0x2b3)]||0x1,this[_0x2144f2(0x20d)]=_0x52e8e1['fixedHeight']??0x0,this['reverseY']=_0x52e8e1['reverseY']??![],this[_0x2144f2(0x254)]&&this[_0x2144f2(0x254)]['setOptions'](_0x52e8e1);}get['layer'](){const _0x1ecebe=_0x5cbdc4;return this[_0x1ecebe(0x22c)];}get['canvasWidth'](){return this['_map']['scene']['canvas']['clientWidth'];}get[_0x5cbdc4(0x28b)](){return this['_map']['scene']['canvas']['clientHeight'];}get[_0x5cbdc4(0x205)](){return this['_pointerEvents'];}set['pointerEvents'](_0x5a7f40){const _0x4fb160=_0x5cbdc4;this['_pointerEvents']=_0x5a7f40;if(!this['canvas'])return;_0x5a7f40?this['canvas']['style']['pointer-events']='all':this[_0x4fb160(0x22c)][_0x4fb160(0x2b6)][_0x4fb160(0x1e6)]='none';}get['particlesNumber'](){const _0x488a8b=_0x5cbdc4;return this[_0x488a8b(0x263)]['particlesNumber'];}set[_0x5cbdc4(0x210)](_0x33f2f9){const _0x1cc534=_0x5cbdc4;this[_0x1cc534(0x263)]['particlesNumber']=_0x33f2f9,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{const _0x477442=_0x1cc534;this[_0x477442(0x246)]();},0x1f4);}get[_0x5cbdc4(0x236)](){return this['options']['speedRate'];}set['speedRate'](_0x43069d){const _0x45b30f=_0x5cbdc4;this['options']['speedRate']=_0x43069d,this['windField']&&(this[_0x45b30f(0x254)]['speedRate']=_0x43069d);}get[_0x5cbdc4(0x220)](){const _0x549758=_0x5cbdc4;return this[_0x549758(0x263)]['maxAge'];}set['maxAge'](_0x195832){const _0x33fc9d=_0x5cbdc4;this['options']['maxAge']=_0x195832,this['windField']&&(this[_0x33fc9d(0x254)][_0x33fc9d(0x220)]=_0x195832);}get['data'](){const _0x223ea6=_0x5cbdc4;return this[_0x223ea6(0x200)];}set['data'](_0x1ea036){this['setData'](_0x1ea036);}[_0x5cbdc4(0x27a)](_0x346a30){const _0x19ad65=_0x5cbdc4;_0x346a30?this[_0x19ad65(0x241)]():(this['windData']&&(this[_0x19ad65(0x263)]['data']=this[_0x19ad65(0x200)]),this['_removedHook']());}['_mountedHook'](){const _0x595ff2=_0x5cbdc4;this['options'][_0x595ff2(0x25c)]?this['initWorker']():this['windField']=new CanvasWindField(this[_0x595ff2(0x263)]);}[_0x5cbdc4(0x241)](){const _0x5ad257=_0x5cbdc4;this['canvas']=this['_createCanvas'](),this[_0x5ad257(0x1df)]=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options']['data']&&this['setData'](this['options']['data']);}[_0x5cbdc4(0x244)](){const _0x264edd=_0x5cbdc4;this[_0x264edd(0x297)](),this[_0x264edd(0x234)](),this['canvas']&&(this[_0x264edd(0x1da)]['container']['removeChild'](this[_0x264edd(0x22c)]),delete this['canvas']);}['_createCanvas'](){const _0x214b65=_0x5cbdc4,_0x2144d7=mars3d__namespace['DomUtil']['create']('canvas','mars3d-canvasWind',this['_map']['container']);return _0x2144d7['style']['position']=_0x214b65(0x272),_0x2144d7['style']['top']='0px',_0x2144d7['style']['left']='0px',_0x2144d7[_0x214b65(0x2b6)][_0x214b65(0x20a)]=this['_map']['scene'][_0x214b65(0x22c)]['clientWidth']+'px',_0x2144d7['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',_0x2144d7['style'][_0x214b65(0x205)]=this['_pointerEvents']?_0x214b65(0x2b5):'none',_0x2144d7[_0x214b65(0x2b6)][_0x214b65(0x288)]=this[_0x214b65(0x263)]['zIndex']??0x9,_0x2144d7['width']=this[_0x214b65(0x1da)]['scene']['canvas']['clientWidth'],_0x2144d7['height']=this['_map']['scene'][_0x214b65(0x22c)][_0x214b65(0x286)],_0x2144d7;}['resize'](){const _0xa4b9cf=_0x5cbdc4;this['canvas']&&(this['canvas']['style'][_0xa4b9cf(0x20a)]=this[_0xa4b9cf(0x1da)][_0xa4b9cf(0x291)][_0xa4b9cf(0x22c)][_0xa4b9cf(0x23f)]+'px',this['canvas']['style']['height']=this[_0xa4b9cf(0x1da)]['scene']['canvas']['clientHeight']+'px',this['canvas']['width']=this['_map'][_0xa4b9cf(0x291)]['canvas'][_0xa4b9cf(0x23f)],this['canvas'][_0xa4b9cf(0x216)]=this['_map']['scene'][_0xa4b9cf(0x22c)]['clientHeight']);}['bindEvent'](){const _0x408fc3=_0x5cbdc4,_0x418ead=this;let _0x5b26f6=Date['now']();(function _0x52d42f(){const _0x70cee2=_0x5291;_0x418ead['animateFrame']=window['requestAnimationFrame'](_0x52d42f);if(_0x418ead[_0x70cee2(0x1e2)]&&_0x418ead[_0x70cee2(0x254)]){const _0x50ee6e=Date[_0x70cee2(0x245)](),_0x46e4d3=_0x50ee6e-_0x5b26f6;_0x46e4d3>_0x418ead[_0x70cee2(0x238)]&&(_0x5b26f6=_0x50ee6e-_0x46e4d3%_0x418ead['frameTime'],_0x418ead['update']());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this[_0x408fc3(0x2a1)]=![],this[_0x408fc3(0x269)]=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x408fc3(0x26b)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x408fc3(0x219)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x2ebbb0=_0x5cbdc4;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this['options'][_0x2ebbb0(0x292)]&&(this[_0x2ebbb0(0x1da)][_0x2ebbb0(0x298)](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x2ebbb0(0x1da)]['off'](mars3d__namespace['EventType']['mouseDown'],this[_0x2ebbb0(0x283)],this),this[_0x2ebbb0(0x1da)][_0x2ebbb0(0x298)](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map'][_0x2ebbb0(0x298)](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this));}[_0x5cbdc4(0x26b)](_0x5e5658){const _0x3e8b18=_0x5cbdc4;clearTimeout(this['refreshTimer']);if(!this[_0x3e8b18(0x1e2)]||!this['canvas'])return;this['canvas']['style']['visibility']=_0x3e8b18(0x218),this['refreshTimer']=setTimeout(()=>{const _0x187865=_0x3e8b18;if(!this['show'])return;this['redraw'](),this['canvas']['style'][_0x187865(0x21e)]='visible';},0xc8);}['_onMouseDownEvent'](_0x46c983){const _0x114ff5=_0x5cbdc4;this['mouse_down']=!![],this['_map'][_0x114ff5(0x298)](mars3d__namespace['EventType'][_0x114ff5(0x22e)],this[_0x114ff5(0x214)],this),this[_0x114ff5(0x1da)]['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x114ff5(0x214)],this);}['_onMouseMoveEvent'](_0x26e255){const _0x25f042=_0x5cbdc4;if(!this['show']||!this['canvas'])return;this[_0x25f042(0x2a1)]&&(this['canvas']['style']['visibility']='hidden',this[_0x25f042(0x269)]=!![]);}[_0x5cbdc4(0x1f0)](_0x34e4b9){const _0x22ba49=_0x5cbdc4;if(!this[_0x22ba49(0x1e2)]||!this['canvas'])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['canvas'][_0x22ba49(0x2b6)][_0x22ba49(0x21e)]='visible',this['mouse_down']=![],this[_0x22ba49(0x269)]=![];}[_0x5cbdc4(0x2aa)](_0x50a98c){const _0x4d4e6e=_0x5cbdc4;this['clear'](),this['windData']=_0x50a98c,this[_0x4d4e6e(0x254)]['setDate'](_0x50a98c),this['redraw']();}[_0x5cbdc4(0x246)](){const _0x2c938b=_0x5cbdc4;if(!this['show'])return;this[_0x2c938b(0x254)]['setOptions'](this[_0x2c938b(0x263)]),this['update']();}[_0x5cbdc4(0x29f)](){const _0xd8c0c3=_0x5cbdc4;if(this['_updateIng'])return;this[_0xd8c0c3(0x289)]=!![];if(this['worker'])this['windField'][_0xd8c0c3(0x29f)]();else{const _0x2423ca=this['windField']['getParticles']();this[_0xd8c0c3(0x1e4)](_0x2423ca);}this['_updateIng']=![];}['_drawLines'](_0x45d8a6){const _0x39378f=_0x5cbdc4;this[_0x39378f(0x1df)]['globalCompositeOperation']='destination-in',this['canvasContext'][_0x39378f(0x1ed)](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext']['globalAlpha']=0.9;const _0x3545f2=this['_map']['scene'][_0x39378f(0x225)]!==Cesium['SceneMode'][_0x39378f(0x1f5)],_0x42ca90=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x14d3a6=0x0,_0x533b5a=_0x45d8a6['length'];_0x14d3a6<_0x533b5a;_0x14d3a6++){const _0x5a3366=_0x45d8a6[_0x14d3a6],_0x4f9851=this[_0x39378f(0x22f)](_0x5a3366['lng'],_0x5a3366['lat'],_0x5a3366),_0x11bf6c=this[_0x39378f(0x22f)](_0x5a3366[_0x39378f(0x22b)],_0x5a3366[_0x39378f(0x239)],_0x5a3366);if(!_0x4f9851||!_0x11bf6c)continue;if(_0x3545f2&&Math[_0x39378f(0x235)](_0x4f9851[0x0]-_0x11bf6c[0x0])>=_0x42ca90)continue;this['canvasContext']['beginPath'](),this['canvasContext'][_0x39378f(0x2b3)]=this[_0x39378f(0x2b3)],this['canvasContext']['strokeStyle']=this['_colorRamp']['getColor'](_0x5a3366[_0x39378f(0x208)]),this['canvasContext'][_0x39378f(0x26e)](_0x4f9851[0x0],_0x4f9851[0x1]),this['canvasContext'][_0x39378f(0x1ef)](_0x11bf6c[0x0],_0x11bf6c[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext'][_0x39378f(0x2a3)](),this[_0x39378f(0x1df)]['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this['color'];for(let _0x1a25b1=0x0,_0x445d37=_0x45d8a6[_0x39378f(0x1d5)];_0x1a25b1<_0x445d37;_0x1a25b1++){const _0x5af8c3=_0x45d8a6[_0x1a25b1],_0x477917=this['_tomap'](_0x5af8c3['lng'],_0x5af8c3['lat'],_0x5af8c3),_0x17aca7=this['_tomap'](_0x5af8c3['tlng'],_0x5af8c3['tlat'],_0x5af8c3);if(!_0x477917||!_0x17aca7)continue;if(_0x3545f2&&Math[_0x39378f(0x235)](_0x477917[0x0]-_0x17aca7[0x0])>=_0x42ca90)continue;this['canvasContext'][_0x39378f(0x26e)](_0x477917[0x0],_0x477917[0x1]),this[_0x39378f(0x1df)]['lineTo'](_0x17aca7[0x0],_0x17aca7[0x1]);}this['canvasContext']['stroke']();}}['_tomap'](_0x4df707,_0x275093,_0x40d803){const _0x5b41e0=_0x5cbdc4,_0x409594=Cesium['Cartesian3']['fromDegrees'](_0x4df707,_0x275093,this[_0x5b41e0(0x20d)]),_0x910e64=this['_map'][_0x5b41e0(0x291)];if(_0x910e64['mode']===Cesium['SceneMode'][_0x5b41e0(0x1f5)]){const _0x5d1259=new Cesium['EllipsoidalOccluder'](_0x910e64[_0x5b41e0(0x1db)]['ellipsoid'],_0x910e64['camera']['positionWC']),_0x56d800=_0x5d1259['isPointVisible'](_0x409594);if(!_0x56d800)return _0x40d803[_0x5b41e0(0x230)]=0x0,null;}const _0x213358=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map'][_0x5b41e0(0x291)],_0x409594);return _0x213358?[_0x213358['x'],_0x213358['y']]:null;}['clear'](){const _0x1fbf8b=_0x5cbdc4;this['windField']['clear'](),delete this[_0x1fbf8b(0x200)];}['initWorker'](){const _0x165d55=_0x5cbdc4;this[_0x165d55(0x25c)]=new Worker(this['options']['worker']),this['worker'][_0x165d55(0x1e9)]=_0x37909f=>{const _0xa4476a=_0x165d55;this[_0xa4476a(0x1e4)](_0x37909f['data'][_0xa4476a(0x1ee)]),this[_0xa4476a(0x2b0)]=![];},this[_0x165d55(0x254)]={'init':_0x47d84c=>{const _0x5897da=_0x165d55;this['worker'][_0x5897da(0x207)]({'type':'init','options':_0x47d84c});},'setOptions':_0x9c423b=>{this['worker']['postMessage']({'type':'setOptions','options':_0x9c423b});},'setDate':_0x1b8a23=>{const _0x470585=_0x165d55;this['worker']['postMessage']({'type':_0x470585(0x1dd),'data':_0x1b8a23});},'update':()=>{const _0x22fac1=_0x165d55;if(this[_0x22fac1(0x2b0)])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0x12c3af=_0x165d55;this['worker'][_0x12c3af(0x207)]({'type':_0x12c3af(0x297)});}},this['windField']['init'](this[_0x165d55(0x263)]);}}mars3d__namespace['LayerUtil'][_0x5cbdc4(0x2a8)]('canvasWind',CanvasWindLayer),mars3d__namespace[_0x5cbdc4(0x1d6)]['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports[_0x5cbdc4(0x2b4)]=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-wind",
3
- "version": "3.6.11",
3
+ "version": "3.6.13",
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.6.11"
11
+ "mars3d": "~3.6.13"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "eslint ./src/**/*.{js,ts} --fix"