mars3d-wind 3.5.15 → 3.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
3
3
  *
4
- * 版本信息:v3.5.15
5
- * 编译日期:2023-07-10 19:14:29
4
+ * 版本信息:v3.5.17
5
+ * 编译日期:2023-07-24 22:20:49
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 _0xb93ce=_0x57a3;(function(_0x230989,_0x2a4aee){const _0x18252d=_0x57a3,_0x2966c8=_0x230989();while(!![]){try{const _0x38ca56=parseInt(_0x18252d(0x279))/0x1*(-parseInt(_0x18252d(0x26a))/0x2)+-parseInt(_0x18252d(0x209))/0x3*(-parseInt(_0x18252d(0x240))/0x4)+-parseInt(_0x18252d(0x23f))/0x5*(-parseInt(_0x18252d(0x29f))/0x6)+-parseInt(_0x18252d(0x23b))/0x7+-parseInt(_0x18252d(0x24a))/0x8*(-parseInt(_0x18252d(0x260))/0x9)+parseInt(_0x18252d(0x24e))/0xa+-parseInt(_0x18252d(0x256))/0xb;if(_0x38ca56===_0x2a4aee)break;else _0x2966c8['push'](_0x2966c8['shift']());}catch(_0x33c748){_0x2966c8['push'](_0x2966c8['shift']());}}}(_0x354a,0xee219));function _interopNamespace(_0x495e03){if(_0x495e03&&_0x495e03['__esModule'])return _0x495e03;var _0x37674a=Object['create'](null);return _0x495e03&&Object['keys'](_0x495e03)['forEach'](function(_0x25edd3){const _0x3a16b8=_0x57a3;if(_0x25edd3!=='default'){var _0x5fa0f9=Object['getOwnPropertyDescriptor'](_0x495e03,_0x25edd3);Object[_0x3a16b8(0x274)](_0x37674a,_0x25edd3,_0x5fa0f9[_0x3a16b8(0x269)]?_0x5fa0f9:{'enumerable':!![],'get':function(){return _0x495e03[_0x25edd3];}});}}),_0x37674a['default']=_0x495e03,_0x37674a;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x5785a5,_0x3afc38){const _0xb9d714=_0x5785a5*Math['cos'](Cesium$7['Math']['toRadians'](_0x3afc38));return _0xb9d714;}function getV(_0x25e216,_0x45a990){const _0xd47c82=_0x57a3,_0x188dd3=_0x25e216*Math[_0xd47c82(0x25d)](Cesium$7['Math']['toRadians'](_0x45a990));return _0x188dd3;}function getSpeed(_0x1b6f8f,_0xee1429){const _0x5aaad3=_0x57a3,_0x352b11=Math['sqrt'](Math[_0x5aaad3(0x253)](_0x1b6f8f,0x2)+Math['pow'](_0xee1429,0x2));return _0x352b11;}function getDirection(_0x55fcff,_0x49dccb){const _0x43098f=_0x57a3;let _0x5b5a64=Cesium$7['Math'][_0x43098f(0x20d)](Math[_0x43098f(0x2bb)](_0x49dccb,_0x55fcff));return _0x5b5a64+=_0x5b5a64<0x0?0x168:0x0,_0x5b5a64;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x32880e){const _0x529e3b=_0x57a3;this['commandType']=_0x32880e['commandType'],this['geometry']=_0x32880e['geometry'],this['attributeLocations']=_0x32880e['attributeLocations'],this['primitiveType']=_0x32880e['primitiveType'],this['uniformMap']=_0x32880e['uniformMap'],this[_0x529e3b(0x288)]=_0x32880e['vertexShaderSource'],this['fragmentShaderSource']=_0x32880e['fragmentShaderSource'],this[_0x529e3b(0x27f)]=_0x32880e[_0x529e3b(0x27f)],this['framebuffer']=_0x32880e['framebuffer'],this['outputTexture']=_0x32880e['outputTexture'],this['autoClear']=_0x32880e['autoClear']??![],this[_0x529e3b(0x1e4)]=_0x32880e['preExecute'],this['show']=!![],this[_0x529e3b(0x2a9)]=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6[(_0x529e3b(0x2bc))]({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}[_0xb93ce(0x233)](_0x34a2ee){const _0xf0db18=_0xb93ce;switch(this[_0xf0db18(0x2ae)]){case _0xf0db18(0x212):{const _0x44cfad=Cesium$6['VertexArray']['fromGeometry']({'context':_0x34a2ee,'geometry':this[_0xf0db18(0x298)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0xf0db18(0x228)]}),_0x3cddad=Cesium$6['ShaderProgram']['fromCache']({'context':_0x34a2ee,'attributeLocations':this[_0xf0db18(0x24d)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this[_0xf0db18(0x234)]}),_0x38058d=Cesium$6['RenderState']['fromCache'](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x3cddad,'vertexArray':_0x44cfad,'modelMatrix':Cesium$6['Matrix4'][_0xf0db18(0x2a8)],'renderState':_0x38058d,'uniformMap':this[_0xf0db18(0x299)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0xf0db18(0x29d)],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this[_0xf0db18(0x299)],'outputTexture':this[_0xf0db18(0x28d)],'persists':!![]});}}}['setGeometry'](_0x270d3a,_0xc25580){const _0x386cc4=_0xb93ce;this['geometry']=_0xc25580;const _0x38bc0e=Cesium$6['VertexArray'][_0x386cc4(0x2a5)]({'context':_0x270d3a,'geometry':this[_0x386cc4(0x298)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute'][_0x386cc4(0x1f2)]=_0x38bc0e;}['update'](_0x3cccf2){const _0x300436=_0xb93ce;if(!this[_0x300436(0x2a1)])return;if(_0x3cccf2['mode']!==Cesium$6[_0x300436(0x20f)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x3cccf2['context'])),Cesium$6['defined'](this[_0x300436(0x1e4)])&&this['preExecute'](),Cesium$6['defined'](this[_0x300436(0x1ff)])&&_0x3cccf2[_0x300436(0x1df)]['push'](this['clearCommand']),_0x3cccf2['commandList']['push'](this[_0x300436(0x2a9)]);}[_0xb93ce(0x1e3)](){return![];}[_0xb93ce(0x244)](){const _0x4fa85c=_0xb93ce;if(this['clearCommand']){var _0x3e6984,_0x20cdc7;(_0x3e6984=this['clearCommand'])!==null&&_0x3e6984!==void 0x0&&_0x3e6984['vertexArray']&&this['clearCommand']['vertexArray']['destroy'](),(_0x20cdc7=this[_0x4fa85c(0x1ff)])!==null&&_0x20cdc7!==void 0x0&&_0x20cdc7['shaderProgram']&&this[_0x4fa85c(0x1ff)][_0x4fa85c(0x237)]['destroy'](),delete this[_0x4fa85c(0x1ff)];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram']['destroy'](),delete this[_0x4fa85c(0x2a9)]),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x267f3a=function(){const _0x386e5a=_0x57a3,_0x58994b=new Cesium$5[(_0x386e5a(0x271))]({'attributes':new Cesium$5[(_0x386e5a(0x20b))]({'position':new Cesium$5[(_0x386e5a(0x280))]({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x386e5a(0x2c3)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x58994b;},_0xead11c=function(_0x2507de,_0x326740){if(Cesium$5['defined'](_0x326740)){const _0x484152={};_0x484152['arrayBufferView']=_0x326740,_0x2507de['source']=_0x484152;}const _0x10d9a9=new Cesium$5['Texture'](_0x2507de);return _0x10d9a9;},_0x567b9f=function(_0x3ee427,_0x41949b,_0x4b4610){const _0x234450=new Cesium$5['Framebuffer']({'context':_0x3ee427,'colorTextures':[_0x41949b],'depthTexture':_0x4b4610});return _0x234450;},_0x41068a=function(_0x530cdb){const _0x2bb169=!![],_0x1faeaf=![],_0x5561fe={'viewport':_0x530cdb['viewport'],'depthTest':_0x530cdb['depthTest'],'depthMask':_0x530cdb['depthMask'],'blending':_0x530cdb['blending']},_0x252fc8=Cesium$5['Appearance']['getDefaultRenderState'](_0x2bb169,_0x1faeaf,_0x5561fe);return _0x252fc8;},_0x1bdb4a=function(_0x14f92f){const _0x522832=_0x57a3,_0x30a6cf={},_0x5cd147=Cesium$5['Math']['mod'](_0x14f92f[_0x522832(0x2c4)],Cesium$5['Math']['TWO_PI']),_0x5db3d9=Cesium$5['Math'][_0x522832(0x201)](_0x14f92f['east'],Cesium$5['Math']['TWO_PI']),_0x2d1c1a=_0x14f92f['width'];let _0x4c23f2,_0x35bfa6;_0x2d1c1a>Cesium$5['Math'][_0x522832(0x1ee)]?(_0x4c23f2=0x0,_0x35bfa6=Cesium$5[_0x522832(0x26c)][_0x522832(0x21c)]):_0x5db3d9-_0x5cd147<_0x2d1c1a?(_0x4c23f2=_0x5cd147,_0x35bfa6=_0x5cd147+_0x2d1c1a):(_0x4c23f2=_0x5cd147,_0x35bfa6=_0x5db3d9);_0x30a6cf['lon']={'min':Cesium$5[_0x522832(0x26c)]['toDegrees'](_0x4c23f2),'max':Cesium$5[_0x522832(0x26c)][_0x522832(0x20d)](_0x35bfa6)};const _0x460363=_0x14f92f['south'],_0x182fc1=_0x14f92f['north'],_0x5c9f21=_0x14f92f['height'],_0x4b605c=_0x5c9f21>Cesium$5['Math']['PI']/0xc?_0x5c9f21/0x2:0x0;let _0x43264f=Cesium$5['Math'][_0x522832(0x27e)](_0x460363-_0x4b605c),_0x332af4=Cesium$5[_0x522832(0x26c)][_0x522832(0x27e)](_0x182fc1+_0x4b605c);return _0x43264f<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x43264f=-Cesium$5[_0x522832(0x26c)]['PI_OVER_TWO']),_0x332af4>Cesium$5[_0x522832(0x26c)][_0x522832(0x2ad)]&&(_0x332af4=Cesium$5['Math'][_0x522832(0x248)]),_0x30a6cf['lat']={'min':Cesium$5[_0x522832(0x26c)][_0x522832(0x20d)](_0x43264f),'max':Cesium$5['Math']['toDegrees'](_0x332af4)},_0x30a6cf;};return{'getFullscreenQuad':_0x267f3a,'createTexture':_0xead11c,'createFramebuffer':_0x567b9f,'createRawRenderState':_0x41068a,'viewRectangleToLonLatRange':_0x1bdb4a};}());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(_0x37964b,_0x39ada1,_0x1437af,_0x4b5c0a,_0x112e45){const _0x427831=_0xb93ce;this['createRenderingTextures'](_0x37964b,_0x39ada1,_0x1437af['colors']),this[_0x427831(0x225)](_0x37964b),this['createRenderingPrimitives'](_0x37964b,_0x1437af,_0x4b5c0a,_0x112e45);}['createRenderingTextures'](_0x180e98,_0xa19e85,_0x52c759){const _0x1e2aa9=_0xb93ce,_0x272c43={'context':_0x180e98,'width':_0x180e98['drawingBufferWidth'],'height':_0x180e98['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4[_0x1e2aa9(0x220)]['UNSIGNED_BYTE']},_0x56f6f2={'context':_0x180e98,'width':_0x180e98['drawingBufferWidth'],'height':_0x180e98['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x1e2aa9(0x232)][_0x1e2aa9(0x287)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x4fe99d=_0x52c759['length'],_0x347391=new Float32Array(_0x4fe99d*0x3);for(let _0x2f351e=0x0;_0x2f351e<_0x4fe99d;_0x2f351e++){const _0x3960c4=Cesium$4['Color']['fromCssColorString'](_0x52c759[_0x2f351e]);_0x347391[0x3*_0x2f351e]=_0x3960c4['red'],_0x347391[0x3*_0x2f351e+0x1]=_0x3960c4['green'],_0x347391[0x3*_0x2f351e+0x2]=_0x3960c4['blue'];}const _0x120c2b={'context':_0x180e98,'width':_0x4fe99d,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4[_0x1e2aa9(0x220)]['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter'][_0x1e2aa9(0x23e)]})};this['textures']={'segmentsColor':Util[_0x1e2aa9(0x259)](_0x272c43),'segmentsDepth':Util[_0x1e2aa9(0x259)](_0x56f6f2),'currentTrailsColor':Util['createTexture'](_0x272c43),'currentTrailsDepth':Util['createTexture'](_0x56f6f2),'nextTrailsColor':Util[_0x1e2aa9(0x259)](_0x272c43),'nextTrailsDepth':Util[_0x1e2aa9(0x259)](_0x56f6f2),'colorTable':Util['createTexture'](_0x120c2b,_0x347391)};}['createRenderingFramebuffers'](_0x35c995){const _0x5d2143=_0xb93ce;this['framebuffers']={'segments':Util['createFramebuffer'](_0x35c995,this['textures']['segmentsColor'],this[_0x5d2143(0x24b)]['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x35c995,this[_0x5d2143(0x24b)]['currentTrailsColor'],this[_0x5d2143(0x24b)]['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x35c995,this['textures'][_0x5d2143(0x2aa)],this['textures'][_0x5d2143(0x1f9)])};}['createSegmentsGeometry'](_0x965c12){const _0x1c01d7=_0xb93ce,_0x1b6179=0x4;let _0x2cad91=[];for(let _0x4d18b3=0x0;_0x4d18b3<_0x965c12[_0x1c01d7(0x245)];_0x4d18b3++){for(let _0x3e2332=0x0;_0x3e2332<_0x965c12['particlesTextureSize'];_0x3e2332++){for(let _0x1d6b0b=0x0;_0x1d6b0b<_0x1b6179;_0x1d6b0b++){_0x2cad91['push'](_0x4d18b3/_0x965c12['particlesTextureSize']),_0x2cad91['push'](_0x3e2332/_0x965c12['particlesTextureSize']);}}}_0x2cad91=new Float32Array(_0x2cad91);let _0x1da22c=[];const _0x3e5fca=[-0x1,0x1],_0x503f80=[-0x1,0x1];for(let _0x38767a=0x0;_0x38767a<_0x965c12['maxParticles'];_0x38767a++){for(let _0xbc1bce=0x0;_0xbc1bce<_0x1b6179/0x2;_0xbc1bce++){for(let _0x2779fb=0x0;_0x2779fb<_0x1b6179/0x2;_0x2779fb++){_0x1da22c['push'](_0x3e5fca[_0xbc1bce]),_0x1da22c['push'](_0x503f80[_0x2779fb]),_0x1da22c['push'](0x0);}}}_0x1da22c=new Float32Array(_0x1da22c);const _0x3cb2a1=0x6*_0x965c12['maxParticles'],_0x14a1f6=new Uint32Array(_0x3cb2a1);for(let _0x42adb8=0x0,_0x58be02=0x0,_0x3c5b96=0x0;_0x42adb8<_0x965c12['maxParticles'];_0x42adb8++){_0x14a1f6[_0x58be02++]=_0x3c5b96+0x0,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x1,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x2,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x2,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x1,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x3,_0x3c5b96+=0x4;}const _0x205b76=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4[(_0x1c01d7(0x280))]({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x2cad91}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x1c01d7(0x2c3)],'componentsPerAttribute':0x3,'values':_0x1da22c})}),'indices':_0x14a1f6});return _0x205b76;}['createRenderingPrimitives'](_0x107851,_0x3e2e80,_0x4f3ec6,_0x45d00d){const _0x3972e8=_0xb93ce,_0x3662d9=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x3e2e80),'primitiveType':Cesium$4['PrimitiveType'][_0x3972e8(0x1f8)],'uniformMap':{'currentParticlesPosition':function(){const _0x14438b=_0x3972e8;return _0x45d00d[_0x14438b(0x1e9)][_0x14438b(0x2a2)];},'postProcessingPosition':function(){const _0x5289fb=_0x3972e8;return _0x45d00d['particlesTextures'][_0x5289fb(0x252)];},'postProcessingSpeed':function(){const _0x295047=_0x3972e8;return _0x45d00d['particlesTextures'][_0x295047(0x1f0)];},'colorTable':function(){const _0x484a37=_0x3972e8;return _0x3662d9[_0x484a37(0x24b)][_0x484a37(0x210)];},'aspect':function(){return _0x107851['drawingBufferWidth']/_0x107851['drawingBufferHeight'];},'pixelSize':function(){const _0xab0431=_0x3972e8;return _0x4f3ec6[_0xab0431(0x250)];},'lineWidth':function(){return _0x3e2e80['lineWidth'];},'particleHeight':function(){return _0x3e2e80['particleHeight'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x3972e8(0x224)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':_0x3972e8(0x212),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x3972e8(0x26d)]['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0x48b892=_0x3972e8;return _0x3662d9['textures'][_0x48b892(0x1fb)];},'segmentsDepthTexture':function(){const _0x2a9e71=_0x3972e8;return _0x3662d9[_0x2a9e71(0x24b)]['segmentsDepth'];},'currentTrailsColor':function(){const _0xf5a10f=_0x3972e8;return _0x3662d9['framebuffers']['currentTrails'][_0xf5a10f(0x204)](0x0);},'trailsDepthTexture':function(){return _0x3662d9['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){const _0x2c188b=_0x3972e8;return _0x3e2e80[_0x2c188b(0x264)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction'][_0x3972e8(0x1fe)]},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x3d25f7=_0x3972e8,_0x4f3eb0=_0x3662d9[_0x3d25f7(0x211)]['currentTrails'];_0x3662d9['framebuffers']['currentTrails']=_0x3662d9['framebuffers']['nextTrails'],_0x3662d9['framebuffers']['nextTrails']=_0x4f3eb0,_0x3662d9['primitives']['trails']['commandToExecute']['framebuffer']=_0x3662d9['framebuffers']['nextTrails'],_0x3662d9['primitives']['trails']['clearCommand']['framebuffer']=_0x3662d9['framebuffers'][_0x3d25f7(0x20e)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x38de90=_0x3972e8;return _0x3662d9[_0x38de90(0x211)][_0x38de90(0x20e)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x9d2f4c=_0x3972e8;return _0x3662d9['framebuffers']['nextTrails'][_0x9d2f4c(0x246)];}},'vertexShaderSource':new Cesium$4[(_0x3972e8(0x206))]({'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=_0xb93ce(0x273),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';const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x28fc1b,_0x55b609,_0xa6b07f,_0x20acba){this['data']=_0x55b609,this['createWindTextures'](_0x28fc1b,_0x55b609),this['createParticlesTextures'](_0x28fc1b,_0xa6b07f,_0x20acba),this['createComputingPrimitives'](_0x55b609,_0xa6b07f,_0x20acba);}['createWindTextures'](_0x26278e,_0x16ac8e){const _0x1bd364=_0xb93ce,_0x1426db={'context':_0x26278e,'width':_0x16ac8e[_0x1bd364(0x282)]['lon'],'height':_0x16ac8e['dimensions']['lat']*(_0x16ac8e[_0x1bd364(0x282)]['lev']||0x1),'pixelFormat':Cesium$3[_0x1bd364(0x232)][_0x1bd364(0x28a)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util[_0x1bd364(0x259)](_0x1426db,_0x16ac8e['U'][_0x1bd364(0x2bd)]),'V':Util['createTexture'](_0x1426db,_0x16ac8e['V']['array'])};}[_0xb93ce(0x2b8)](_0x5ef2eb,_0xf0b3c,_0x29e2bc){const _0x18ffdc=_0xb93ce,_0x1152e7={'context':_0x5ef2eb,'width':_0xf0b3c['particlesTextureSize'],'height':_0xf0b3c[_0x18ffdc(0x245)],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3[_0x18ffdc(0x220)]['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x18ffdc(0x1dd)]})},_0x58ee28=this['randomizeParticles'](_0xf0b3c['maxParticles'],_0x29e2bc),_0x5ad4ce=new Float32Array(0x4*_0xf0b3c['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x1152e7),'currentParticlesPosition':Util['createTexture'](_0x1152e7,_0x58ee28),'nextParticlesPosition':Util['createTexture'](_0x1152e7,_0x58ee28),'currentParticlesSpeed':Util[_0x18ffdc(0x259)](_0x1152e7,_0x5ad4ce),'nextParticlesSpeed':Util['createTexture'](_0x1152e7,_0x5ad4ce),'postProcessingPosition':Util['createTexture'](_0x1152e7,_0x58ee28),'postProcessingSpeed':Util['createTexture'](_0x1152e7,_0x5ad4ce)};}['randomizeParticles'](_0x1e6c33,_0x5d90eb){const _0x1a86c7=_0xb93ce,_0x5ca397=new Float32Array(0x4*_0x1e6c33);for(let _0x3188a7=0x0;_0x3188a7<_0x1e6c33;_0x3188a7++){_0x5ca397[0x4*_0x3188a7]=Cesium$3['Math']['randomBetween'](_0x5d90eb['lonRange']['x'],_0x5d90eb['lonRange']['y']),_0x5ca397[0x4*_0x3188a7+0x1]=Cesium$3[_0x1a86c7(0x26c)][_0x1a86c7(0x295)](_0x5d90eb[_0x1a86c7(0x1f6)]['x'],_0x5d90eb['latRange']['y']),_0x5ca397[0x4*_0x3188a7+0x2]=Cesium$3['Math'][_0x1a86c7(0x295)](this['data'][_0x1a86c7(0x22f)]['min'],this['data']['lev']['max']),_0x5ca397[0x4*_0x3188a7+0x3]=0x0;}return _0x5ca397;}['destroyParticlesTextures'](){Object['keys'](this['particlesTextures'])['forEach'](_0x5722d3=>{this['particlesTextures'][_0x5722d3]['destroy']();});}['createComputingPrimitives'](_0x360a06,_0x308ba6,_0x4ceb39){const _0x210767=_0xb93ce,_0x1cf59d=new Cesium$3['Cartesian3'](_0x360a06[_0x210767(0x282)]['lon'],_0x360a06['dimensions']['lat'],_0x360a06['dimensions']['lev']),_0x32a69b=new Cesium$3['Cartesian3'](_0x360a06['lon']['min'],_0x360a06['lat'][_0x210767(0x29b)],_0x360a06['lev']['min']),_0x32b286=new Cesium$3['Cartesian3'](_0x360a06['lon']['max'],_0x360a06['lat']['max'],_0x360a06['lev'][_0x210767(0x272)]),_0x5bf9e8=new Cesium$3[(_0x210767(0x27c))]((_0x32b286['x']-_0x32a69b['x'])/(_0x1cf59d['x']-0x1),(_0x32b286['y']-_0x32a69b['y'])/(_0x1cf59d['y']-0x1),_0x1cf59d['z']>0x1?(_0x32b286['z']-_0x32a69b['z'])/(_0x1cf59d['z']-0x1):0x1),_0xb5caf4=new Cesium$3['Cartesian2'](_0x360a06['U'][_0x210767(0x29b)],_0x360a06['U']['max']),_0x17e253=new Cesium$3['Cartesian2'](_0x360a06['V']['min'],_0x360a06['V'][_0x210767(0x272)]),_0x150a9f=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x150a9f['windTextures']['U'];},'V':function(){const _0x424dcb=_0x210767;return _0x150a9f[_0x424dcb(0x1fa)]['V'];},'currentParticlesPosition':function(){return _0x150a9f['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x1cf59d;},'minimum':function(){return _0x32a69b;},'maximum':function(){return _0x32b286;},'interval':function(){return _0x5bf9e8;}},'fragmentShaderSource':new Cesium$3[(_0x210767(0x206))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x199b45=_0x210767;_0x150a9f['primitives']['getWind']['commandToExecute']['outputTexture']=_0x150a9f['particlesTextures'][_0x199b45(0x1ec)];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x150a9f['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){const _0x5c3d79=_0x210767;return _0x150a9f['particlesTextures'][_0x5c3d79(0x1ec)];},'uSpeedRange':function(){return _0xb5caf4;},'vSpeedRange':function(){return _0x17e253;},'pixelSize':function(){return _0x4ceb39['pixelSize'];},'speedFactor':function(){return _0x308ba6['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x210767(0x2b7)],'preExecute':function(){const _0x27b124=_0x210767,_0x1e6144=_0x150a9f['particlesTextures']['currentParticlesSpeed'];_0x150a9f['particlesTextures']['currentParticlesSpeed']=_0x150a9f['particlesTextures']['postProcessingSpeed'],_0x150a9f['particlesTextures']['postProcessingSpeed']=_0x1e6144,_0x150a9f['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x150a9f['particlesTextures'][_0x27b124(0x2b7)];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x32aae5=_0x210767;return _0x150a9f['particlesTextures'][_0x32aae5(0x2a2)];},'currentParticlesSpeed':function(){return _0x150a9f['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x210767(0x1e9)]['nextParticlesPosition'],'preExecute':function(){const _0x3766b9=_0x210767,_0x5416ea=_0x150a9f['particlesTextures']['currentParticlesPosition'];_0x150a9f['particlesTextures']['currentParticlesPosition']=_0x150a9f['particlesTextures']['postProcessingPosition'],_0x150a9f['particlesTextures']['postProcessingPosition']=_0x5416ea,_0x150a9f['primitives']['updatePosition'][_0x3766b9(0x2a9)]['outputTexture']=_0x150a9f['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x150a9f['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x39e679=_0x210767;return _0x150a9f[_0x39e679(0x1e9)][_0x39e679(0x2b7)];},'lonRange':function(){return _0x4ceb39['lonRange'];},'latRange':function(){return _0x4ceb39['latRange'];},'randomCoefficient':function(){const _0x4a3cd1=Math['random']();return _0x4a3cd1;},'dropRate':function(){const _0x5ee65b=_0x210767;return _0x308ba6[_0x5ee65b(0x263)];},'dropRateBump':function(){return _0x308ba6['dropRateBump'];}},'fragmentShaderSource':new Cesium$3[(_0x210767(0x206))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){_0x150a9f['primitives']['postProcessingPosition']['commandToExecute']['outputTexture']=_0x150a9f['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x562ae2=_0x210767;return _0x150a9f['particlesTextures'][_0x562ae2(0x252)];},'nextParticlesSpeed':function(){const _0x3f7f27=_0x210767;return _0x150a9f[_0x3f7f27(0x1e9)]['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x210767(0x1f0)],'preExecute':function(){const _0xa97331=_0x210767;_0x150a9f['primitives'][_0xa97331(0x1f0)]['commandToExecute'][_0xa97331(0x28d)]=_0x150a9f['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace[_0xb93ce(0x219)];function _0x57a3(_0x123f71,_0x30ba99){const _0x354a0f=_0x354a();return _0x57a3=function(_0x57a318,_0x3bb826){_0x57a318=_0x57a318-0x1dc;let _0x2b52f2=_0x354a0f[_0x57a318];return _0x2b52f2;},_0x57a3(_0x123f71,_0x30ba99);}class ParticleSystem{constructor(_0xffb8ad,_0x21c7f5,_0x24306e,_0x3160f4){const _0x376d0b=_0xb93ce;this[_0x376d0b(0x257)]=_0xffb8ad,_0x21c7f5={..._0x21c7f5},_0x21c7f5['udata']&&_0x21c7f5['vdata']&&(_0x21c7f5['dimensions']={},_0x21c7f5[_0x376d0b(0x282)]['lon']=_0x21c7f5['cols'],_0x21c7f5['dimensions']['lat']=_0x21c7f5['rows'],_0x21c7f5['dimensions']['lev']=_0x21c7f5['lev']||0x1,_0x21c7f5[_0x376d0b(0x2b9)]={},_0x21c7f5['lon']['min']=_0x21c7f5['xmin'],_0x21c7f5['lon'][_0x376d0b(0x272)]=_0x21c7f5[_0x376d0b(0x22d)],_0x21c7f5['lat']={},_0x21c7f5['lat']['min']=_0x21c7f5['ymin'],_0x21c7f5['lat']['max']=_0x21c7f5['ymax'],_0x21c7f5['lev']={},_0x21c7f5['lev']['min']=_0x21c7f5['levmin']??0x1,_0x21c7f5[_0x376d0b(0x22f)]['max']=_0x21c7f5['levmax']??0x1,_0x21c7f5['U']={},_0x21c7f5['U'][_0x376d0b(0x2bd)]=new Float32Array(_0x21c7f5['udata']),_0x21c7f5['U'][_0x376d0b(0x29b)]=_0x21c7f5[_0x376d0b(0x21f)]??Math[_0x376d0b(0x29b)](..._0x21c7f5['udata']),_0x21c7f5['U'][_0x376d0b(0x272)]=_0x21c7f5[_0x376d0b(0x296)]??Math[_0x376d0b(0x272)](..._0x21c7f5['udata']),_0x21c7f5['V']={},_0x21c7f5['V']['array']=new Float32Array(_0x21c7f5['vdata']),_0x21c7f5['V'][_0x376d0b(0x29b)]=_0x21c7f5['vmin']??Math['min'](..._0x21c7f5['vdata']),_0x21c7f5['V']['max']=_0x21c7f5['vmax']??Math['max'](..._0x21c7f5[_0x376d0b(0x2b0)])),this[_0x376d0b(0x26e)]=_0x21c7f5,this['options']=_0x24306e,this[_0x376d0b(0x29a)]=_0x3160f4,this[_0x376d0b(0x2c1)]=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0x376d0b(0x29a)]),this['particlesRendering']=new ParticlesRendering(this[_0x376d0b(0x257)],this[_0x376d0b(0x26e)],this['options'],this['viewerParameters'],this['particlesComputing']);}['canvasResize'](_0x46d1e2){const _0x4a3a01=_0xb93ce;this['particlesComputing'][_0x4a3a01(0x208)](),Object[_0x4a3a01(0x24c)](this['particlesComputing'][_0x4a3a01(0x1fa)])[_0x4a3a01(0x2a0)](_0x5260ee=>{const _0xf8df5a=_0x4a3a01;this['particlesComputing']['windTextures'][_0x5260ee][_0xf8df5a(0x244)]();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x4a3a01(0x211)])[_0x4a3a01(0x2a0)](_0x5f47b4=>{this['particlesRendering']['framebuffers'][_0x5f47b4]['destroy']();}),this[_0x4a3a01(0x257)]=_0x46d1e2,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this[_0x4a3a01(0x2b3)],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x4a3a01(0x2c1)]);}['clearFramebuffers'](){const _0x32b3ce=_0xb93ce,_0xbaeae7=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x32b3ce(0x1ed))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this['particlesRendering'][_0x32b3ce(0x211)])['forEach'](_0x722fb2=>{const _0x1340e2=_0x32b3ce;_0xbaeae7['framebuffer']=this['particlesRendering']['framebuffers'][_0x722fb2],_0xbaeae7['execute'](this[_0x1340e2(0x257)]);});}['refreshParticles'](_0x44d2f5){const _0x4d3700=_0xb93ce;this[_0x4d3700(0x25e)](),this[_0x4d3700(0x2c1)]['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this[_0x4d3700(0x257)],this['options'],this['viewerParameters']);if(_0x44d2f5){const _0x3314a7=this['particlesRendering']['createSegmentsGeometry'](this[_0x4d3700(0x2b3)]);this['particlesRendering'][_0x4d3700(0x21e)][_0x4d3700(0x224)]['geometry']=_0x3314a7;const _0x4a8484=Cesium$2[_0x4d3700(0x1fd)]['fromGeometry']({'context':this['context'],'geometry':_0x3314a7,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2[_0x4d3700(0x213)]['STATIC_DRAW']});this['particlesRendering']['primitives']['segments']['commandToExecute'][_0x4d3700(0x1f2)]=_0x4a8484;}}[_0xb93ce(0x2be)](_0x7f34b5){const _0x384911=_0xb93ce;let _0x3fc820=![];this['options']['maxParticles']!==_0x7f34b5['maxParticles']&&(_0x3fc820=!![]),Object[_0x384911(0x24c)](_0x7f34b5)['forEach'](_0x1d9890=>{const _0x43fe43=_0x384911;this[_0x43fe43(0x2b3)][_0x1d9890]=_0x7f34b5[_0x1d9890];}),this[_0x384911(0x22e)](_0x3fc820);}[_0xb93ce(0x267)](_0x25dfd2){const _0x5d33a5=_0xb93ce;Object[_0x5d33a5(0x24c)](_0x25dfd2)['forEach'](_0x56e274=>{this['viewerParameters'][_0x56e274]=_0x25dfd2[_0x56e274];}),this[_0x5d33a5(0x22e)](![]);}[_0xb93ce(0x244)](){const _0xcb331e=_0xb93ce;clearTimeout(this['canrefresh']),this['particlesComputing'][_0xcb331e(0x208)](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0xeb7cc5=>{this['particlesComputing']['windTextures'][_0xeb7cc5]['destroy']();}),this['particlesRendering'][_0xcb331e(0x24b)][_0xcb331e(0x210)]['destroy'](),Object[_0xcb331e(0x24c)](this['particlesRendering'][_0xcb331e(0x211)])['forEach'](_0x5b9db5=>{const _0x5e251c=_0xcb331e;this[_0x5e251c(0x26f)]['framebuffers'][_0x5b9db5]['destroy']();});for(const _0x16a771 in this){delete this[_0x16a771];}}}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':['rgb(206,255,255)']};class WindLayer extends BaseLayer$1{constructor(_0x537968={}){_0x537968={...DEF_OPTIONS,..._0x537968},super(_0x537968),this['_setOptionsHook'](_0x537968);}get['layer'](){return this['primitives'];}get['data'](){const _0x21a7f2=_0xb93ce;return this[_0x21a7f2(0x1f1)];}set['data'](_0x45316d){this['setData'](_0x45316d);}get[_0xb93ce(0x227)](){return this['options']['colors'];}set['colors'](_0x56dea6){this['options']['colors']=_0x56dea6,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x56dea6}),this['resize']();}[_0xb93ce(0x1de)](){}['_addedHook'](){const _0x37c47d=_0xb93ce;this[_0x37c47d(0x1e1)]=this[_0x37c47d(0x222)]['scene'],this['camera']=this['_map'][_0x37c47d(0x2af)],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene'][_0x37c47d(0x21e)][_0x37c47d(0x22b)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x37c47d(0x25b)],0.99*0x615299),this['updateViewerParameters'](),window[_0x37c47d(0x22c)]('resize',this['resize']['bind'](this),![]),this[_0x37c47d(0x1fc)]=![],this['mouse_move']=![],this[_0x37c47d(0x222)]['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x37c47d(0x231)][_0x37c47d(0x290)],this['_onMouseUpEvent'],this),this[_0x37c47d(0x222)]['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_data']&&this['setData'](this['_data']);}['_removedHook'](){const _0x293618=_0xb93ce;window['removeEventListener']('resize',this[_0x293618(0x2c2)]),this[_0x293618(0x222)]['off'](mars3d__namespace['EventType'][_0x293618(0x214)],this['_onMap_preRenderEvent'],this),this[_0x293618(0x222)][_0x293618(0x230)](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x293618(0x222)]['off'](mars3d__namespace['EventType']['mouseDown'],this[_0x293618(0x29e)],this),this[_0x293618(0x222)][_0x293618(0x230)](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this[_0x293618(0x222)]['scene']['primitives'][_0x293618(0x2b6)](this[_0x293618(0x21e)]);}['resize'](){const _0x5ecff7=_0xb93ce;if(!this['show']||!this['particleSystem'])return;this[_0x5ecff7(0x21e)][_0x5ecff7(0x2a1)]=![],this[_0x5ecff7(0x21e)][_0x5ecff7(0x284)](),this['_map'][_0x5ecff7(0x268)](mars3d__namespace['EventType']['preRender'],this[_0x5ecff7(0x2c0)],this);}['_onMap_preRenderEvent'](_0x307ef4){const _0x12aaae=_0xb93ce;this['particleSystem'][_0x12aaae(0x28c)](this['scene']['context']),this['addPrimitives'](),this['primitives']['show']=!![];}[_0xb93ce(0x200)](_0xc92d8d){const _0xcc8781=_0xb93ce;clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this[_0xcc8781(0x21e)]['show']=![],this[_0xcc8781(0x281)]=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}[_0xb93ce(0x29e)](_0x5b70a6){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x1e5912){const _0x44a60a=_0xb93ce;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&(this[_0x44a60a(0x21e)]['show']=![],this[_0x44a60a(0x247)]=!![]);}['_onMouseUpEvent'](_0x444c65){const _0x27c753=_0xb93ce;if(!this['show']||!this[_0x27c753(0x2a3)])return;this['mouse_down']&&this[_0x27c753(0x247)]&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}[_0xb93ce(0x20a)](){const _0x4a57b7=_0xb93ce;if(!this['_map']||!this['show'])return;this[_0x4a57b7(0x1ea)](),this['particleSystem'][_0x4a57b7(0x267)](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x59a22c){const _0xe1f11b=_0xb93ce;this['_data']=_0x59a22c,this['particleSystem']&&this['particleSystem'][_0xe1f11b(0x244)](),this[_0xe1f11b(0x2a3)]=new ParticleSystem(this['scene']['context'],_0x59a22c,this['getOptions'](),this[_0xe1f11b(0x29a)]),this['addPrimitives']();}[_0xb93ce(0x25f)](_0x5b847a,_0x5bf910){const _0x38e147=_0xb93ce;if(_0x5b847a)for(const _0x2a230b in _0x5b847a){this[_0x2a230b]=_0x5b847a[_0x2a230b];}this['particleSystem']&&this['particleSystem']['setOptions'](this[_0x38e147(0x216)]());}['getOptions'](){const _0x10281a=_0xb93ce,_0x4da112=Math['ceil'](Math[_0x10281a(0x255)](this['particlesNumber']));return this['particlesNumber']=_0x4da112*_0x4da112,{'particlesTextureSize':_0x4da112,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x10281a(0x264)],'dropRate':this['dropRate'],'dropRateBump':this[_0x10281a(0x276)],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this[_0x10281a(0x227)]};}['addPrimitives'](){const _0x18cf76=_0xb93ce;this['primitives']['add'](this[_0x18cf76(0x2a3)][_0x18cf76(0x2c1)]['primitives']['getWind']),this[_0x18cf76(0x21e)]['add'](this['particleSystem']['particlesComputing'][_0x18cf76(0x21e)][_0x18cf76(0x1ef)]),this['primitives'][_0x18cf76(0x22b)](this['particleSystem']['particlesComputing']['primitives'][_0x18cf76(0x1e5)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingPosition']),this['primitives'][_0x18cf76(0x22b)](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['segments']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives'][_0x18cf76(0x2b2)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives'][_0x18cf76(0x261)]);}['updateViewerParameters'](){const _0x3f09a4=_0xb93ce;let _0x2333ee=this[_0x3f09a4(0x2af)][_0x3f09a4(0x202)](this['scene']['globe']['ellipsoid']);if(!_0x2333ee){const _0x4c8ee8=this['_map']['getExtent']();_0x2333ee=Cesium$1['Rectangle']['fromDegrees'](_0x4c8ee8[_0x3f09a4(0x23c)],_0x4c8ee8[_0x3f09a4(0x21a)],_0x4c8ee8['xmax'],_0x4c8ee8[_0x3f09a4(0x223)]);}const _0x2843c7=Util['viewRectangleToLonLatRange'](_0x2333ee);this[_0x3f09a4(0x29a)]['lonRange']['x']=_0x2843c7['lon']['min'],this[_0x3f09a4(0x29a)]['lonRange']['y']=_0x2843c7[_0x3f09a4(0x2b9)]['max'],this['viewerParameters']['latRange']['x']=_0x2843c7['lat'][_0x3f09a4(0x29b)],this['viewerParameters']['latRange']['y']=_0x2843c7['lat'][_0x3f09a4(0x272)];const _0x1e6344=this[_0x3f09a4(0x2af)]['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x1e6344>0x0&&(this['viewerParameters']['pixelSize']=_0x1e6344);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace[_0xb93ce(0x27d)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){this['lng']=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null;}[_0xb93ce(0x244)](){for(const _0x4df18e in this){delete this[_0x4df18e];}}}class CanvasWindField{constructor(_0x5b0837){this['setOptions'](_0x5b0837);}get[_0xb93ce(0x286)](){const _0x247c39=_0xb93ce;return this[_0x247c39(0x1eb)];}set['speedRate'](_0x39ad03){const _0x359939=_0xb93ce;this['_speedRate']=(0x64-(_0x39ad03>0x63?0x63:_0x39ad03))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x359939(0x23c)])/this['_speedRate'],(this['ymax']-this[_0x359939(0x21a)])/this['_speedRate']];}get[_0xb93ce(0x265)](){return this['_maxAge'];}set['maxAge'](_0x3fc2b5){const _0x57413e=_0xb93ce;this[_0x57413e(0x2a6)]=_0x3fc2b5;}['setOptions'](_0x4ea6da){const _0x17e9b8=_0xb93ce;this[_0x17e9b8(0x2b3)]=_0x4ea6da,this[_0x17e9b8(0x265)]=_0x4ea6da['maxAge']||0x78,this['speedRate']=_0x4ea6da['speedRate']||0x32,this[_0x17e9b8(0x23a)]=[];const _0x2021d0=_0x4ea6da[_0x17e9b8(0x285)]||0x1000;for(let _0x3a3180=0x0;_0x3a3180<_0x2021d0;_0x3a3180++){const _0x4e9342=this[_0x17e9b8(0x1e0)](new CanvasParticle());this[_0x17e9b8(0x23a)]['push'](_0x4e9342);}}[_0xb93ce(0x1f3)](_0x96537a){const _0xbc9d69=_0xb93ce;this['rows']=_0x96537a['rows'],this['cols']=_0x96537a[_0xbc9d69(0x28b)],this['xmin']=_0x96537a['xmin'],this[_0xbc9d69(0x22d)]=_0x96537a['xmax'],this['ymin']=_0x96537a['ymin'],this[_0xbc9d69(0x223)]=_0x96537a['ymax'],this['grid']=[];const _0x530d5d=_0x96537a['udata'],_0x184a15=_0x96537a['vdata'];let _0x1d3a36=![];_0x530d5d['length']===this[_0xbc9d69(0x217)]&&_0x530d5d[0x0]['length']===this[_0xbc9d69(0x28b)]&&(_0x1d3a36=!![]);let _0x593a2e=0x0,_0x1cd2c1=null,_0x4e08e3=null;for(let _0x928688=0x0;_0x928688<this['rows'];_0x928688++){_0x1cd2c1=[];for(let _0x124f18=0x0;_0x124f18<this[_0xbc9d69(0x28b)];_0x124f18++,_0x593a2e++){_0x1d3a36?_0x4e08e3=this['_calcUV'](_0x530d5d[_0x928688][_0x124f18],_0x184a15[_0x928688][_0x124f18]):_0x4e08e3=this['_calcUV'](_0x530d5d[_0x593a2e],_0x184a15[_0x593a2e]),_0x1cd2c1[_0xbc9d69(0x251)](_0x4e08e3);}this['grid']['push'](_0x1cd2c1);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x59b0b3=_0xb93ce;delete this[_0x59b0b3(0x217)],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this[_0x59b0b3(0x23a)];}[_0xb93ce(0x241)](_0x15c966,_0x4abada){const _0x82298a=_0xb93ce,_0x233f64=(_0x15c966-this[_0x82298a(0x23c)])/(this['xmax']-this[_0x82298a(0x23c)])*(this['cols']-0x1),_0x3b0854=(this['ymax']-_0x4abada)/(this[_0x82298a(0x223)]-this['ymin'])*(this['rows']-0x1);return[_0x233f64,_0x3b0854];}[_0xb93ce(0x258)](_0x359d2b,_0x481f61){const _0x50e62f=_0xb93ce;if(_0x359d2b<0x0||_0x359d2b>=this['cols']||_0x481f61>=this[_0x50e62f(0x217)])return[0x0,0x0,0x0];const _0x546f1c=Math['floor'](_0x359d2b),_0x16076d=Math['floor'](_0x481f61);if(_0x546f1c===_0x359d2b&&_0x16076d===_0x481f61)return this[_0x50e62f(0x27b)][_0x481f61][_0x359d2b];const _0x32191d=_0x546f1c+0x1,_0x5c401c=_0x16076d+0x1,_0x31158c=this['getUVByXY'](_0x546f1c,_0x16076d),_0x7e5999=this[_0x50e62f(0x258)](_0x32191d,_0x16076d),_0x49541a=this[_0x50e62f(0x258)](_0x546f1c,_0x5c401c),_0x207312=this[_0x50e62f(0x258)](_0x32191d,_0x5c401c);let _0x4aafd8=null;try{_0x4aafd8=this['_bilinearInterpolation'](_0x359d2b-_0x546f1c,_0x481f61-_0x16076d,_0x31158c,_0x7e5999,_0x49541a,_0x207312);}catch(_0x23fc52){console[_0x50e62f(0x278)](_0x359d2b,_0x481f61);}return _0x4aafd8;}['_bilinearInterpolation'](_0x2d8829,_0x5616d2,_0x4a36b2,_0x4eac8e,_0x4eb3aa,_0x76b2ef){const _0x2dde72=0x1-_0x2d8829,_0x3e499c=0x1-_0x5616d2,_0x52778e=_0x2dde72*_0x3e499c,_0x183fa9=_0x2d8829*_0x3e499c,_0x37dc80=_0x2dde72*_0x5616d2,_0x762942=_0x2d8829*_0x5616d2,_0x29a7b8=_0x4a36b2[0x0]*_0x52778e+_0x4eac8e[0x0]*_0x183fa9+_0x4eb3aa[0x0]*_0x37dc80+_0x76b2ef[0x0]*_0x762942,_0x11eb92=_0x4a36b2[0x1]*_0x52778e+_0x4eac8e[0x1]*_0x183fa9+_0x4eb3aa[0x1]*_0x37dc80+_0x76b2ef[0x1]*_0x762942;return this['_calcUV'](_0x29a7b8,_0x11eb92);}['_calcUV'](_0x5c3aa3,_0x106ec8){const _0x1cc28e=_0xb93ce;return[+_0x5c3aa3,+_0x106ec8,Math[_0x1cc28e(0x255)](_0x5c3aa3*_0x5c3aa3+_0x106ec8*_0x106ec8)];}['getUVByPoint'](_0x1fdfc0,_0x2c9e11){const _0x1ca0b2=_0xb93ce;if(!this['isInExtent'](_0x1fdfc0,_0x2c9e11))return null;const _0x3d4ac1=this[_0x1ca0b2(0x241)](_0x1fdfc0,_0x2c9e11),_0xe5ce56=this['getUVByXY'](_0x3d4ac1[0x0],_0x3d4ac1[0x1]);return _0xe5ce56;}[_0xb93ce(0x28f)](_0xea4576,_0x281733){const _0x2c945a=_0xb93ce;return _0xea4576>=this[_0x2c945a(0x23c)]&&_0xea4576<=this[_0x2c945a(0x22d)]&&_0x281733>=this['ymin']&&_0x281733<=this['ymax']?!![]:![];}[_0xb93ce(0x283)](){const _0x235846=fRandomByfloat(this['xmin'],this['xmax']),_0x2620a9=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x2620a9,'lng':_0x235846};}['getParticles'](){const _0x23c024=_0xb93ce;let _0x54c524,_0x402b94,_0x46fd34;for(let _0xcf80a6=0x0,_0xf6a07f=this[_0x23c024(0x23a)][_0x23c024(0x254)];_0xcf80a6<_0xf6a07f;_0xcf80a6++){let _0x5af26f=this['particles'][_0xcf80a6];_0x5af26f['age']<=0x0&&(_0x5af26f=this['_randomParticle'](_0x5af26f));if(_0x5af26f['age']>0x0){const _0xc3dc09=_0x5af26f['tlng'],_0x402685=_0x5af26f['tlat'];_0x46fd34=this['getUVByPoint'](_0xc3dc09,_0x402685),_0x46fd34?(_0x54c524=_0xc3dc09+this['_calc_speedRate'][0x0]*_0x46fd34[0x0],_0x402b94=_0x402685+this[_0x23c024(0x1dc)][0x1]*_0x46fd34[0x1],_0x5af26f[_0x23c024(0x275)]=_0xc3dc09,_0x5af26f['lat']=_0x402685,_0x5af26f['tlng']=_0x54c524,_0x5af26f['tlat']=_0x402b94,_0x5af26f[_0x23c024(0x243)]--):_0x5af26f['age']=0x0;}}return this['particles'];}[_0xb93ce(0x1e0)](_0x52716d){const _0x221292=_0xb93ce;let _0x3ea6ce,_0x3668f9;for(let _0x17041b=0x0;_0x17041b<0x1e;_0x17041b++){_0x3ea6ce=this[_0x221292(0x283)](),_0x3668f9=this[_0x221292(0x229)](_0x3ea6ce['lng'],_0x3ea6ce[_0x221292(0x270)]);if(_0x3668f9&&_0x3668f9[0x2]>0x0)break;}if(!_0x3668f9)return _0x52716d;const _0xce19c5=_0x3ea6ce[_0x221292(0x275)]+this['_calc_speedRate'][0x0]*_0x3668f9[0x0],_0x4c2adf=_0x3ea6ce['lat']+this['_calc_speedRate'][0x1]*_0x3668f9[0x1];return _0x52716d['lng']=_0x3ea6ce['lng'],_0x52716d[_0x221292(0x270)]=_0x3ea6ce['lat'],_0x52716d['tlng']=_0xce19c5,_0x52716d['tlat']=_0x4c2adf,_0x52716d['age']=Math[_0x221292(0x21b)](Math['random']()*this['maxAge']),_0x52716d;}['destroy'](){for(const _0x2cf761 in this){delete this[_0x2cf761];}}}function _0x354a(){const _0x1b9c23=['globalAlpha','pixelSize','push','postProcessingPosition','pow','length','sqrt','30563951gCSTQt','context','getUVByXY','createTexture','container','ZERO','abs','sin','clearFramebuffers','_setOptionsHook','17403669DceTaP','screen','bindEvent','dropRate','fadeOpacity','maxAge','pointerEvents','applyViewerParameters','once','get','15506sVvzYh','mouseHidden','Math','PrimitiveType','data','particlesRendering','lat','Geometry','max','//\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','defineProperty','lng','dropRateBump','clear','log','134hzwqfL','position','grid','Cartesian3','layer','clampToLatitudeRange','rawRenderState','GeometryAttribute','refreshTimer','dimensions','getRandomLatLng','removeAll','particlesNumber','speedRate','DEPTH_COMPONENT','vertexShaderSource','CanvasWindLayer','LUMINANCE','cols','canvasResize','outputTexture','#ffffff','isInExtent','mouseUp','_createCanvas','unbindEvent','mode','worker','randomBetween','umax','CanvasWindField','geometry','uniformMap','viewerParameters','min','canvasContext','OPAQUE','_onMouseDownEvent','6uJmigj','forEach','show','currentParticlesPosition','particleSystem','BaseLayer','fromGeometry','_maxAge','canvasWidth','IDENTITY','commandToExecute','nextTrailsColor','_onMouseUpEvent','height','PI_OVER_THREE','commandType','camera','vdata','init','trails','options','none','_showHook','remove','nextParticlesSpeed','createParticlesTextures','lon','style','atan2','ClearCommand','array','setOptions','now','_onMap_preRenderEvent','particlesComputing','resize','FLOAT','west','_calc_speedRate','NEAREST','_mountedHook','commandList','_randomParticle','scene','windField','isDestroyed','preExecute','updatePosition','_drawLines','destination-in','frameTime','particlesTextures','updateViewerParameters','_speedRate','particlesWind','Color','THREE_PI_OVER_TWO','updateSpeed','postProcessingSpeed','_data','vertexArray','setDate','all','animateFrame','latRange','visibility','TRIANGLES','nextTrailsDepth','windTextures','segmentsColor','mouse_down','VertexArray','ALWAYS','clearCommand','_onMapWhellEvent','mod','computeViewRectangle','visible','getColorTexture','width','ShaderSource','reverseY','destroyParticlesTextures','1239mSRaQe','redraw','GeometryAttributes','pointer-events','toDegrees','nextTrails','SceneMode','colorTable','framebuffers','Draw','BufferUsage','preRender','color','getOptions','rows','_onMouseMoveEvent','Cesium','ymin','round','TWO_PI','clientWidth','primitives','umin','PixelDatatype','EllipsoidalOccluder','_map','ymax','segments','createRenderingFramebuffers','bind','colors','STATIC_DRAW','getUVByPoint','wheel','add','addEventListener','xmax','refreshParticles','lev','off','EventType','PixelFormat','createCommand','fragmentShaderSource','clientHeight','SCENE3D','shaderProgram','initWorker','create','particles','3489941dBUiYS','xmin','mouseMove','LINEAR','3108145Ecktao','8452WyNvlx','toGridXY','windData','age','destroy','particlesTextureSize','depthTexture','mouse_move','PI_OVER_TWO','canvas','8QalAjF','textures','keys','attributeLocations','18633520sDVzcQ'];_0x354a=function(){return _0x1b9c23;};return _0x354a();}function fRandomByfloat(_0x4a902c,_0x5a79ce){return _0x4a902c+Math['random']()*(_0x5a79ce-_0x4a902c);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0xb93ce(0x2a4)];class CanvasWindLayer extends BaseLayer{constructor(_0x4f996b={}){const _0x2ab08c=_0xb93ce;super(_0x4f996b),this[_0x2ab08c(0x25f)](_0x4f996b),this['canvas']=null;}['_setOptionsHook'](_0x493ee9,_0x24fc69){const _0x4726f0=_0xb93ce;this['frameTime']=0x3e8/(_0x493ee9['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x493ee9[_0x4726f0(0x215)]||_0x4726f0(0x28e),this['lineWidth']=_0x493ee9['lineWidth']||0x1,this['fixedHeight']=_0x493ee9['fixedHeight']??0x0,this[_0x4726f0(0x207)]=_0x493ee9[_0x4726f0(0x207)]??![],this['windField']&&this['windField']['setOptions'](_0x493ee9);}get['layer'](){return this['canvas'];}get['canvasWidth'](){const _0x175082=_0xb93ce;return this['_map']['scene'][_0x175082(0x249)]['clientWidth'];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0xb93ce(0x266)](_0x2223ec){const _0x3fd622=_0xb93ce;this['_pointerEvents']=_0x2223ec;if(!this['canvas'])return;_0x2223ec?this['canvas']['style'][_0x3fd622(0x20c)]=_0x3fd622(0x1f4):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set[_0xb93ce(0x285)](_0x251018){const _0x518fcd=_0xb93ce;this[_0x518fcd(0x2b3)]['particlesNumber']=_0x251018,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x32ab52=_0xb93ce;return this[_0x32ab52(0x2b3)]['speedRate'];}set['speedRate'](_0x3fb2f9){const _0x55e907=_0xb93ce;this[_0x55e907(0x2b3)][_0x55e907(0x286)]=_0x3fb2f9,this['windField']&&(this['windField']['speedRate']=_0x3fb2f9);}get[_0xb93ce(0x265)](){const _0x578a67=_0xb93ce;return this['options'][_0x578a67(0x265)];}set['maxAge'](_0x91d3d0){const _0x1f3126=_0xb93ce;this['options'][_0x1f3126(0x265)]=_0x91d3d0,this['windField']&&(this['windField'][_0x1f3126(0x265)]=_0x91d3d0);}get['data'](){return this['windData'];}set['data'](_0x398f54){this['setData'](_0x398f54);}[_0xb93ce(0x2b5)](_0x3ca4d2){const _0x372c71=_0xb93ce;_0x3ca4d2?this['_addedHook']():(this[_0x372c71(0x242)]&&(this['options']['data']=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x24a44c=_0xb93ce;this[_0x24a44c(0x2b3)]['worker']?this['initWorker']():this['windField']=new CanvasWindField(this[_0x24a44c(0x2b3)]);}['_addedHook'](){const _0x64b37c=_0xb93ce;this['canvas']=this[_0x64b37c(0x291)](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x64b37c(0x262)](),this['options'][_0x64b37c(0x26e)]&&this['setData'](this['options'][_0x64b37c(0x26e)]);}['_removedHook'](){const _0x57f488=_0xb93ce;this['clear'](),this[_0x57f488(0x292)](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x4b3b04=_0xb93ce,_0x5bc367=mars3d__namespace['DomUtil'][_0x4b3b04(0x239)]('canvas','mars3d-canvasWind',this['_map'][_0x4b3b04(0x25a)]);return _0x5bc367[_0x4b3b04(0x2ba)][_0x4b3b04(0x27a)]='absolute',_0x5bc367[_0x4b3b04(0x2ba)]['top']='0px',_0x5bc367['style']['left']='0px',_0x5bc367['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x5bc367[_0x4b3b04(0x2ba)]['height']=this['_map'][_0x4b3b04(0x1e1)]['canvas'][_0x4b3b04(0x235)]+'px',_0x5bc367[_0x4b3b04(0x2ba)]['pointerEvents']=this['_pointerEvents']?'auto':_0x4b3b04(0x2b4),_0x5bc367[_0x4b3b04(0x2ba)]['zIndex']=this[_0x4b3b04(0x2b3)]['zIndex']??0x9,_0x5bc367['width']=this['_map'][_0x4b3b04(0x1e1)][_0x4b3b04(0x249)]['clientWidth'],_0x5bc367['height']=this['_map']['scene'][_0x4b3b04(0x249)]['clientHeight'],_0x5bc367;}['resize'](){const _0x43c0f4=_0xb93ce;this['canvas']&&(this['canvas']['style']['width']=this['_map'][_0x43c0f4(0x1e1)]['canvas'][_0x43c0f4(0x21d)]+'px',this['canvas']['style'][_0x43c0f4(0x2ac)]=this['_map']['scene']['canvas'][_0x43c0f4(0x235)]+'px',this[_0x43c0f4(0x249)][_0x43c0f4(0x205)]=this['_map']['scene']['canvas'][_0x43c0f4(0x21d)],this[_0x43c0f4(0x249)]['height']=this['_map'][_0x43c0f4(0x1e1)][_0x43c0f4(0x249)][_0x43c0f4(0x235)]);}['bindEvent'](){const _0x31be5f=_0xb93ce,_0x160d81=this;let _0x2b5a6c=Date[_0x31be5f(0x2bf)]();(function _0x2c1353(){const _0x506122=_0x31be5f;_0x160d81[_0x506122(0x1f5)]=window['requestAnimationFrame'](_0x2c1353);if(_0x160d81['show']&&_0x160d81['windField']){const _0x583298=Date['now'](),_0x4fee85=_0x583298-_0x2b5a6c;_0x4fee85>_0x160d81[_0x506122(0x1e8)]&&(_0x2b5a6c=_0x583298-_0x4fee85%_0x160d81['frameTime'],_0x160d81['update']());}}(),window['addEventListener'](_0x31be5f(0x2c2),this['resize'][_0x31be5f(0x226)](this),![]),this['mouse_down']=![],this[_0x31be5f(0x247)]=![],this[_0x31be5f(0x2b3)]['mouseHidden']&&(this['_map']['on'](mars3d__namespace[_0x31be5f(0x231)]['wheel'],this[_0x31be5f(0x200)],this),this['_map']['on'](mars3d__namespace[_0x31be5f(0x231)]['mouseDown'],this['_onMouseDownEvent'],this),this[_0x31be5f(0x222)]['on'](mars3d__namespace[_0x31be5f(0x231)]['mouseUp'],this[_0x31be5f(0x2ab)],this)));}['unbindEvent'](){const _0x1a018d=_0xb93ce;window['cancelAnimationFrame'](this['animateFrame']),delete this[_0x1a018d(0x1f5)],window['removeEventListener'](_0x1a018d(0x2c2),this[_0x1a018d(0x2c2)]),this['options'][_0x1a018d(0x26b)]&&(this['_map']['off'](mars3d__namespace['EventType'][_0x1a018d(0x22a)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this[_0x1a018d(0x29e)],this),this['_map']['off'](mars3d__namespace['EventType'][_0x1a018d(0x290)],this['_onMouseUpEvent'],this),this['_map'][_0x1a018d(0x230)](mars3d__namespace['EventType'][_0x1a018d(0x23d)],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x346fc3){const _0x58f8c2=_0xb93ce;clearTimeout(this[_0x58f8c2(0x281)]);if(!this[_0x58f8c2(0x2a1)]||!this['canvas'])return;this['canvas']['style'][_0x58f8c2(0x1f7)]='hidden',this['refreshTimer']=setTimeout(()=>{const _0x3f092c=_0x58f8c2;if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']=_0x3f092c(0x203);},0xc8);}['_onMouseDownEvent'](_0xe3ffbc){const _0x47ec3a=_0xb93ce;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace[_0x47ec3a(0x231)]['mouseMove'],this[_0x47ec3a(0x218)],this),this['_map']['on'](mars3d__namespace[_0x47ec3a(0x231)]['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x4d9955){const _0x1acf13=_0xb93ce;if(!this['show']||!this[_0x1acf13(0x249)])return;this['mouse_down']&&(this['canvas'][_0x1acf13(0x2ba)]['visibility']='hidden',this['mouse_move']=!![]);}[_0xb93ce(0x2ab)](_0x5230b2){const _0x4fd1f0=_0xb93ce;if(!this['show']||!this['canvas'])return;this['_map'][_0x4fd1f0(0x230)](mars3d__namespace['EventType'][_0x4fd1f0(0x23d)],this[_0x4fd1f0(0x218)],this),this['mouse_down']&&this[_0x4fd1f0(0x247)]&&this['redraw'](),this['canvas']['style']['visibility']='visible',this[_0x4fd1f0(0x1fc)]=![],this['mouse_move']=![];}['setData'](_0x5c9462){const _0x3faf4a=_0xb93ce;this[_0x3faf4a(0x277)](),this['windData']=_0x5c9462,this['windField']['setDate'](_0x5c9462),this['redraw']();}['redraw'](){const _0x415c48=_0xb93ce;if(!this['show'])return;this[_0x415c48(0x1e2)]['setOptions'](this[_0x415c48(0x2b3)]),this['update']();}['update'](){const _0x3b66eb=_0xb93ce;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x1986f1=this['windField']['getParticles']();this[_0x3b66eb(0x1e6)](_0x1986f1);}this['_updateIng']=![];}['_drawLines'](_0x429a70){const _0x1c9fbf=_0xb93ce;this['canvasContext']['globalCompositeOperation']=_0x1c9fbf(0x1e7),this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext'][_0x1c9fbf(0x24f)]=0.9,this[_0x1c9fbf(0x29c)]['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this[_0x1c9fbf(0x215)];const _0x535336=this[_0x1c9fbf(0x222)]['scene'][_0x1c9fbf(0x293)]!==Cesium[_0x1c9fbf(0x20f)][_0x1c9fbf(0x236)],_0x47e018=this[_0x1c9fbf(0x2a7)]*0.25;for(let _0x26635b=0x0,_0x3b38d3=_0x429a70['length'];_0x26635b<_0x3b38d3;_0x26635b++){const _0x33974b=_0x429a70[_0x26635b],_0x1b41d8=this['_tomap'](_0x33974b['lng'],_0x33974b[_0x1c9fbf(0x270)],_0x33974b),_0x41e19=this['_tomap'](_0x33974b['tlng'],_0x33974b['tlat'],_0x33974b);if(!_0x1b41d8||!_0x41e19)continue;if(_0x535336&&Math[_0x1c9fbf(0x25c)](_0x1b41d8[0x0]-_0x41e19[0x0])>=_0x47e018)continue;this['canvasContext']['moveTo'](_0x1b41d8[0x0],_0x1b41d8[0x1]),this[_0x1c9fbf(0x29c)]['lineTo'](_0x41e19[0x0],_0x41e19[0x1]);}this['canvasContext']['stroke']();}['_tomap'](_0x2b949c,_0x2ce290,_0x40709d){const _0x352538=_0xb93ce,_0x105226=Cesium['Cartesian3']['fromDegrees'](_0x2b949c,_0x2ce290,this['fixedHeight']),_0x19690c=this[_0x352538(0x222)][_0x352538(0x1e1)];if(_0x19690c[_0x352538(0x293)]===Cesium['SceneMode'][_0x352538(0x236)]){const _0x31e7f8=new Cesium[(_0x352538(0x221))](_0x19690c['globe']['ellipsoid'],_0x19690c['camera']['positionWC']),_0x4014b6=_0x31e7f8['isPointVisible'](_0x105226);if(!_0x4014b6)return _0x40709d[_0x352538(0x243)]=0x0,null;}const _0xef1fb4=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x352538(0x222)][_0x352538(0x1e1)],_0x105226);return _0xef1fb4?[_0xef1fb4['x'],_0xef1fb4['y']]:null;}['clear'](){this['windField']['clear'](),delete this['windData'];}[_0xb93ce(0x238)](){const _0x77804e=_0xb93ce;this['worker']=new Worker(this[_0x77804e(0x2b3)]['worker']),this['worker']['onmessage']=_0x5e5e7c=>{const _0x37857e=_0x77804e;this[_0x37857e(0x1e6)](_0x5e5e7c['data'][_0x37857e(0x23a)]),this['_updateIng2']=![];},this['windField']={'init':_0x491aa6=>{const _0x3a46bb=_0x77804e;this[_0x3a46bb(0x294)]['postMessage']({'type':_0x3a46bb(0x2b1),'options':_0x491aa6});},'setOptions':_0x57f422=>{this['worker']['postMessage']({'type':'setOptions','options':_0x57f422});},'setDate':_0x398864=>{this['worker']['postMessage']({'type':'setDate','data':_0x398864});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0x21b371=_0x77804e;this[_0x21b371(0x294)]['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace[_0xb93ce(0x27d)][_0xb93ce(0x289)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0xb93ce(0x297)]=CanvasWindField,exports[_0xb93ce(0x289)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x3a9b9d=_0x45fc;(function(_0x6d9316,_0x280b30){const _0x39a9ba=_0x45fc,_0x4d4a02=_0x6d9316();while(!![]){try{const _0x12c288=-parseInt(_0x39a9ba(0x1e2))/0x1+-parseInt(_0x39a9ba(0x1f2))/0x2*(-parseInt(_0x39a9ba(0x27f))/0x3)+parseInt(_0x39a9ba(0x236))/0x4*(parseInt(_0x39a9ba(0x232))/0x5)+-parseInt(_0x39a9ba(0x29e))/0x6+-parseInt(_0x39a9ba(0x269))/0x7+parseInt(_0x39a9ba(0x1ff))/0x8+-parseInt(_0x39a9ba(0x28d))/0x9;if(_0x12c288===_0x280b30)break;else _0x4d4a02['push'](_0x4d4a02['shift']());}catch(_0x384866){_0x4d4a02['push'](_0x4d4a02['shift']());}}}(_0x1b8c,0x40bef));function _interopNamespace(_0x5bc815){const _0x5244c4=_0x45fc;if(_0x5bc815&&_0x5bc815[_0x5244c4(0x2aa)])return _0x5bc815;var _0x327fbd=Object['create'](null);return _0x5bc815&&Object[_0x5244c4(0x26f)](_0x5bc815)['forEach'](function(_0x935254){const _0x31d491=_0x5244c4;if(_0x935254!==_0x31d491(0x23e)){var _0x26942e=Object['getOwnPropertyDescriptor'](_0x5bc815,_0x935254);Object['defineProperty'](_0x327fbd,_0x935254,_0x26942e['get']?_0x26942e:{'enumerable':!![],'get':function(){return _0x5bc815[_0x935254];}});}}),_0x327fbd['default']=_0x5bc815,_0x327fbd;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x4d6b5e,_0x1b9254){const _0xd1b130=_0x45fc,_0x3d2376=_0x4d6b5e*Math[_0xd1b130(0x1e6)](Cesium$7['Math'][_0xd1b130(0x243)](_0x1b9254));return _0x3d2376;}function getV(_0x121930,_0x1e965c){const _0x5001b2=_0x45fc,_0x414ae4=_0x121930*Math[_0x5001b2(0x250)](Cesium$7['Math']['toRadians'](_0x1e965c));return _0x414ae4;}function getSpeed(_0x3529a6,_0x5397a3){const _0x575cff=_0x45fc,_0x510134=Math['sqrt'](Math[_0x575cff(0x27d)](_0x3529a6,0x2)+Math['pow'](_0x5397a3,0x2));return _0x510134;}function _0x45fc(_0x3b249a,_0x222aea){const _0x1b8c37=_0x1b8c();return _0x45fc=function(_0x45fc36,_0x1fc749){_0x45fc36=_0x45fc36-0x1df;let _0x5d4886=_0x1b8c37[_0x45fc36];return _0x5d4886;},_0x45fc(_0x3b249a,_0x222aea);}function getDirection(_0x268e54,_0xf38bff){const _0x27cc9f=_0x45fc;let _0x7a8eb9=Cesium$7['Math']['toDegrees'](Math[_0x27cc9f(0x1e8)](_0xf38bff,_0x268e54));return _0x7a8eb9+=_0x7a8eb9<0x0?0x168:0x0,_0x7a8eb9;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x241f61){const _0x2f0089=_0x45fc;this[_0x2f0089(0x2bf)]=_0x241f61['commandType'],this['geometry']=_0x241f61['geometry'],this[_0x2f0089(0x1f6)]=_0x241f61[_0x2f0089(0x1f6)],this[_0x2f0089(0x23f)]=_0x241f61['primitiveType'],this[_0x2f0089(0x2a5)]=_0x241f61['uniformMap'],this['vertexShaderSource']=_0x241f61[_0x2f0089(0x28e)],this[_0x2f0089(0x213)]=_0x241f61[_0x2f0089(0x213)],this['rawRenderState']=_0x241f61[_0x2f0089(0x257)],this['framebuffer']=_0x241f61['framebuffer'],this[_0x2f0089(0x1f1)]=_0x241f61['outputTexture'],this['autoClear']=_0x241f61['autoClear']??![],this['preExecute']=_0x241f61['preExecute'],this['show']=!![],this[_0x2f0089(0x271)]=undefined,this[_0x2f0089(0x2a9)]=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6[(_0x2f0089(0x29a))]({'color':new Cesium$6[(_0x2f0089(0x2a4))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x2f0089(0x1fb)]['OPAQUE']}));}[_0x3a9b9d(0x23d)](_0x39c1af){const _0x161de3=_0x3a9b9d;switch(this['commandType']){case _0x161de3(0x274):{const _0x240d26=Cesium$6['VertexArray'][_0x161de3(0x201)]({'context':_0x39c1af,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x37c3a0=Cesium$6['ShaderProgram']['fromCache']({'context':_0x39c1af,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x406072=Cesium$6['RenderState']['fromCache'](this[_0x161de3(0x257)]);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x37c3a0,'vertexArray':_0x240d26,'modelMatrix':Cesium$6[_0x161de3(0x29f)]['IDENTITY'],'renderState':_0x406072,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x161de3(0x1fb)][_0x161de3(0x298)],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6[(_0x161de3(0x279))]({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x554175,_0x40c265){const _0x56c973=_0x3a9b9d;this[_0x56c973(0x21c)]=_0x40c265;const _0x70b510=Cesium$6['VertexArray']['fromGeometry']({'context':_0x554175,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x70b510;}['update'](_0x4fc6fd){const _0x12cb6c=_0x3a9b9d;if(!this['show'])return;if(_0x4fc6fd[_0x12cb6c(0x24f)]!==Cesium$6['SceneMode'][_0x12cb6c(0x229)])return;!Cesium$6['defined'](this[_0x12cb6c(0x271)])&&(this[_0x12cb6c(0x271)]=this['createCommand'](_0x4fc6fd['context'])),Cesium$6[_0x12cb6c(0x231)](this[_0x12cb6c(0x2b4)])&&this[_0x12cb6c(0x2b4)](),Cesium$6[_0x12cb6c(0x231)](this['clearCommand'])&&_0x4fc6fd[_0x12cb6c(0x28b)]['push'](this[_0x12cb6c(0x2a9)]),_0x4fc6fd['commandList']['push'](this['commandToExecute']);}[_0x3a9b9d(0x1e1)](){return![];}['destroy'](){const _0xb52009=_0x3a9b9d;if(this['clearCommand']){var _0x1477d0,_0x4aba2e;(_0x1477d0=this['clearCommand'])!==null&&_0x1477d0!==void 0x0&&_0x1477d0['vertexArray']&&this['clearCommand']['vertexArray'][_0xb52009(0x247)](),(_0x4aba2e=this['clearCommand'])!==null&&_0x4aba2e!==void 0x0&&_0x4aba2e[_0xb52009(0x290)]&&this[_0xb52009(0x2a9)][_0xb52009(0x290)]['destroy'](),delete this[_0xb52009(0x2a9)];}return this[_0xb52009(0x271)]&&(this[_0xb52009(0x271)]['vertexArray']&&this[_0xb52009(0x271)]['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0xb52009(0x247)](),delete this['commandToExecute']),Cesium$6[_0xb52009(0x2ad)](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x317635=function(){const _0x472b76=_0x45fc,_0x584d8f=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5[(_0x472b76(0x2b1))]({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5[_0x472b76(0x26e)]['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x584d8f;},_0x4674f1=function(_0x4e3290,_0xd96411){if(Cesium$5['defined'](_0xd96411)){const _0x1a211a={};_0x1a211a['arrayBufferView']=_0xd96411,_0x4e3290['source']=_0x1a211a;}const _0x1495f0=new Cesium$5['Texture'](_0x4e3290);return _0x1495f0;},_0x3772aa=function(_0x3f3c97,_0x45253a,_0x2f4557){const _0x195bf2=_0x45fc,_0x391bef=new Cesium$5[(_0x195bf2(0x287))]({'context':_0x3f3c97,'colorTextures':[_0x45253a],'depthTexture':_0x2f4557});return _0x391bef;},_0x5cde68=function(_0x58dc4a){const _0x5b42f5=_0x45fc,_0x5e74c2=!![],_0x23af0b=![],_0x291c72={'viewport':_0x58dc4a[_0x5b42f5(0x28a)],'depthTest':_0x58dc4a['depthTest'],'depthMask':_0x58dc4a[_0x5b42f5(0x221)],'blending':_0x58dc4a['blending']},_0x6dcc5=Cesium$5['Appearance']['getDefaultRenderState'](_0x5e74c2,_0x23af0b,_0x291c72);return _0x6dcc5;},_0x2cda77=function(_0x241a20){const _0x51f47d=_0x45fc,_0x7bc59c={},_0x4539ca=Cesium$5['Math']['mod'](_0x241a20[_0x51f47d(0x220)],Cesium$5['Math'][_0x51f47d(0x2ce)]),_0x2e0b8c=Cesium$5['Math']['mod'](_0x241a20['east'],Cesium$5['Math']['TWO_PI']),_0x330f15=_0x241a20['width'];let _0x373b42,_0x13e7a4;_0x330f15>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x373b42=0x0,_0x13e7a4=Cesium$5[_0x51f47d(0x24d)]['TWO_PI']):_0x2e0b8c-_0x4539ca<_0x330f15?(_0x373b42=_0x4539ca,_0x13e7a4=_0x4539ca+_0x330f15):(_0x373b42=_0x4539ca,_0x13e7a4=_0x2e0b8c);_0x7bc59c['lon']={'min':Cesium$5['Math']['toDegrees'](_0x373b42),'max':Cesium$5['Math'][_0x51f47d(0x2c2)](_0x13e7a4)};const _0x58448e=_0x241a20['south'],_0x3e3486=_0x241a20['north'],_0xea09a=_0x241a20['height'],_0x37949a=_0xea09a>Cesium$5['Math']['PI']/0xc?_0xea09a/0x2:0x0;let _0x1e9a12=Cesium$5[_0x51f47d(0x24d)][_0x51f47d(0x234)](_0x58448e-_0x37949a),_0x5aa7cd=Cesium$5[_0x51f47d(0x24d)]['clampToLatitudeRange'](_0x3e3486+_0x37949a);return _0x1e9a12<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x1e9a12=-Cesium$5[_0x51f47d(0x24d)][_0x51f47d(0x26b)]),_0x5aa7cd>Cesium$5['Math']['PI_OVER_THREE']&&(_0x5aa7cd=Cesium$5[_0x51f47d(0x24d)][_0x51f47d(0x26b)]),_0x7bc59c['lat']={'min':Cesium$5['Math'][_0x51f47d(0x2c2)](_0x1e9a12),'max':Cesium$5['Math']['toDegrees'](_0x5aa7cd)},_0x7bc59c;};return{'getFullscreenQuad':_0x317635,'createTexture':_0x4674f1,'createFramebuffer':_0x3772aa,'createRawRenderState':_0x5cde68,'viewRectangleToLonLatRange':_0x2cda77};}());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=_0x3a9b9d(0x1f9);const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x2c82c8,_0x3bdd1d,_0xbb259c,_0x4e9254,_0x3a36d1){const _0x595ce3=_0x3a9b9d;this['createRenderingTextures'](_0x2c82c8,_0x3bdd1d,_0xbb259c[_0x595ce3(0x245)]),this['createRenderingFramebuffers'](_0x2c82c8),this[_0x595ce3(0x24c)](_0x2c82c8,_0xbb259c,_0x4e9254,_0x3a36d1);}['createRenderingTextures'](_0x283943,_0x41e7cc,_0x411162){const _0x306c1c=_0x3a9b9d,_0x5cfb86={'context':_0x283943,'width':_0x283943['drawingBufferWidth'],'height':_0x283943['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x306c1c(0x255)]['RGBA'],'pixelDatatype':Cesium$4[_0x306c1c(0x224)][_0x306c1c(0x2c8)]},_0x2c5ba7={'context':_0x283943,'width':_0x283943['drawingBufferWidth'],'height':_0x283943['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x44748f=_0x411162['length'],_0x862686=new Float32Array(_0x44748f*0x3);for(let _0x50ecd3=0x0;_0x50ecd3<_0x44748f;_0x50ecd3++){const _0x2be906=Cesium$4['Color'][_0x306c1c(0x217)](_0x411162[_0x50ecd3]);_0x862686[0x3*_0x50ecd3]=_0x2be906['red'],_0x862686[0x3*_0x50ecd3+0x1]=_0x2be906['green'],_0x862686[0x3*_0x50ecd3+0x2]=_0x2be906[_0x306c1c(0x2bd)];}const _0x4120df={'context':_0x283943,'width':_0x44748f,'height':0x1,'pixelFormat':Cesium$4[_0x306c1c(0x255)]['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4[(_0x306c1c(0x270))]({'minificationFilter':Cesium$4['TextureMinificationFilter'][_0x306c1c(0x1eb)],'magnificationFilter':Cesium$4[_0x306c1c(0x2c6)]['LINEAR']})};this['textures']={'segmentsColor':Util[_0x306c1c(0x20f)](_0x5cfb86),'segmentsDepth':Util['createTexture'](_0x2c5ba7),'currentTrailsColor':Util[_0x306c1c(0x20f)](_0x5cfb86),'currentTrailsDepth':Util[_0x306c1c(0x20f)](_0x2c5ba7),'nextTrailsColor':Util[_0x306c1c(0x20f)](_0x5cfb86),'nextTrailsDepth':Util['createTexture'](_0x2c5ba7),'colorTable':Util[_0x306c1c(0x20f)](_0x4120df,_0x862686)};}['createRenderingFramebuffers'](_0x581bf5){const _0x592ac4=_0x3a9b9d;this['framebuffers']={'segments':Util['createFramebuffer'](_0x581bf5,this['textures']['segmentsColor'],this['textures'][_0x592ac4(0x266)]),'currentTrails':Util['createFramebuffer'](_0x581bf5,this['textures'][_0x592ac4(0x25b)],this['textures']['currentTrailsDepth']),'nextTrails':Util[_0x592ac4(0x1fc)](_0x581bf5,this['textures']['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x15447e){const _0x20342d=_0x3a9b9d,_0x5ae88e=0x4;let _0x515f02=[];for(let _0x2fc10b=0x0;_0x2fc10b<_0x15447e[_0x20342d(0x286)];_0x2fc10b++){for(let _0x5a2142=0x0;_0x5a2142<_0x15447e[_0x20342d(0x286)];_0x5a2142++){for(let _0x59d31f=0x0;_0x59d31f<_0x5ae88e;_0x59d31f++){_0x515f02[_0x20342d(0x1ea)](_0x2fc10b/_0x15447e['particlesTextureSize']),_0x515f02['push'](_0x5a2142/_0x15447e['particlesTextureSize']);}}}_0x515f02=new Float32Array(_0x515f02);let _0xb6512a=[];const _0xdfdb0c=[-0x1,0x1],_0x3ca635=[-0x1,0x1];for(let _0x25e3c5=0x0;_0x25e3c5<_0x15447e['maxParticles'];_0x25e3c5++){for(let _0x3459ea=0x0;_0x3459ea<_0x5ae88e/0x2;_0x3459ea++){for(let _0x463b80=0x0;_0x463b80<_0x5ae88e/0x2;_0x463b80++){_0xb6512a['push'](_0xdfdb0c[_0x3459ea]),_0xb6512a['push'](_0x3ca635[_0x463b80]),_0xb6512a['push'](0x0);}}}_0xb6512a=new Float32Array(_0xb6512a);const _0x288937=0x6*_0x15447e[_0x20342d(0x251)],_0x393578=new Uint32Array(_0x288937);for(let _0x4175d1=0x0,_0x8256f5=0x0,_0x466098=0x0;_0x4175d1<_0x15447e['maxParticles'];_0x4175d1++){_0x393578[_0x8256f5++]=_0x466098+0x0,_0x393578[_0x8256f5++]=_0x466098+0x1,_0x393578[_0x8256f5++]=_0x466098+0x2,_0x393578[_0x8256f5++]=_0x466098+0x2,_0x393578[_0x8256f5++]=_0x466098+0x1,_0x393578[_0x8256f5++]=_0x466098+0x3,_0x466098+=0x4;}const _0x2b672f=new Cesium$4['Geometry']({'attributes':new Cesium$4[(_0x20342d(0x272))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x20342d(0x282)],'componentsPerAttribute':0x2,'values':_0x515f02}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x20342d(0x282)],'componentsPerAttribute':0x3,'values':_0xb6512a})}),'indices':_0x393578});return _0x2b672f;}[_0x3a9b9d(0x24c)](_0x2e0b01,_0xa45a70,_0x32e614,_0x45878e){const _0x514842=_0x3a9b9d,_0x2a97a4=this;this[_0x514842(0x27a)]={'segments':new CustomPrimitive({'commandType':_0x514842(0x274),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0x514842(0x233)](_0xa45a70),'primitiveType':Cesium$4['PrimitiveType'][_0x514842(0x276)],'uniformMap':{'currentParticlesPosition':function(){const _0x5c414d=_0x514842;return _0x45878e[_0x5c414d(0x203)]['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x130f9f=_0x514842;return _0x45878e['particlesTextures'][_0x130f9f(0x2a2)];},'postProcessingSpeed':function(){const _0xf7b50f=_0x514842;return _0x45878e[_0xf7b50f(0x203)][_0xf7b50f(0x210)];},'colorTable':function(){const _0x37ce28=_0x514842;return _0x2a97a4['textures'][_0x37ce28(0x1fa)];},'aspect':function(){return _0x2e0b01['drawingBufferWidth']/_0x2e0b01['drawingBufferHeight'];},'pixelSize':function(){return _0x32e614['pixelSize'];},'lineWidth':function(){const _0x497c71=_0x514842;return _0xa45a70[_0x497c71(0x2a0)];},'particleHeight':function(){return _0xa45a70['particleHeight'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4[(_0x514842(0x1ed))]({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x514842(0x248)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x514842(0x219)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0xd44d64=_0x514842;return _0x2a97a4[_0xd44d64(0x2bc)]['segmentsColor'];},'segmentsDepthTexture':function(){const _0x1dad68=_0x514842;return _0x2a97a4['textures'][_0x1dad68(0x266)];},'currentTrailsColor':function(){const _0x497714=_0x514842;return _0x2a97a4['framebuffers'][_0x497714(0x230)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x2a97a4['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0xa45a70['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x1eba6e=_0x514842,_0x40a924=_0x2a97a4[_0x1eba6e(0x296)]['currentTrails'];_0x2a97a4['framebuffers']['currentTrails']=_0x2a97a4[_0x1eba6e(0x296)][_0x1eba6e(0x223)],_0x2a97a4['framebuffers']['nextTrails']=_0x40a924,_0x2a97a4[_0x1eba6e(0x27a)]['trails']['commandToExecute']['framebuffer']=_0x2a97a4['framebuffers'][_0x1eba6e(0x223)],_0x2a97a4['primitives']['trails'][_0x1eba6e(0x2a9)]['framebuffer']=_0x2a97a4['framebuffers']['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){return _0x2a97a4['framebuffers']['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x2a97a4['framebuffers']['nextTrails']['depthTexture'];}},'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=_0x3a9b9d(0x263),updateSpeed_frag=_0x3a9b9d(0x295),updatePosition_frag=_0x3a9b9d(0x2c1),postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x54dec9,_0x27c976,_0x3343de,_0x142399){const _0x49bbc0=_0x3a9b9d;this['data']=_0x27c976,this[_0x49bbc0(0x218)](_0x54dec9,_0x27c976),this['createParticlesTextures'](_0x54dec9,_0x3343de,_0x142399),this[_0x49bbc0(0x297)](_0x27c976,_0x3343de,_0x142399);}['createWindTextures'](_0x5568ed,_0x379170){const _0x16f9a9=_0x3a9b9d,_0x4e597b={'context':_0x5568ed,'width':_0x379170['dimensions']['lon'],'height':_0x379170['dimensions'][_0x16f9a9(0x22b)]*(_0x379170['dimensions'][_0x16f9a9(0x285)]||0x1),'pixelFormat':Cesium$3['PixelFormat'][_0x16f9a9(0x22f)],'pixelDatatype':Cesium$3['PixelDatatype'][_0x16f9a9(0x282)],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x16f9a9(0x281)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this[_0x16f9a9(0x21f)]={'U':Util[_0x16f9a9(0x20f)](_0x4e597b,_0x379170['U'][_0x16f9a9(0x1e4)]),'V':Util['createTexture'](_0x4e597b,_0x379170['V'][_0x16f9a9(0x1e4)])};}[_0x3a9b9d(0x2bb)](_0x212d73,_0x2a703c,_0x21d780){const _0x19a55a=_0x3a9b9d,_0x204d54={'context':_0x212d73,'width':_0x2a703c['particlesTextureSize'],'height':_0x2a703c[_0x19a55a(0x286)],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x19a55a(0x270))]({'minificationFilter':Cesium$3[_0x19a55a(0x278)]['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x549c53=this[_0x19a55a(0x246)](_0x2a703c[_0x19a55a(0x251)],_0x21d780),_0x19e293=new Float32Array(0x4*_0x2a703c['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util[_0x19a55a(0x20f)](_0x204d54),'currentParticlesPosition':Util['createTexture'](_0x204d54,_0x549c53),'nextParticlesPosition':Util['createTexture'](_0x204d54,_0x549c53),'currentParticlesSpeed':Util['createTexture'](_0x204d54,_0x19e293),'nextParticlesSpeed':Util['createTexture'](_0x204d54,_0x19e293),'postProcessingPosition':Util['createTexture'](_0x204d54,_0x549c53),'postProcessingSpeed':Util[_0x19a55a(0x20f)](_0x204d54,_0x19e293)};}['randomizeParticles'](_0x1a5e2e,_0x2207cb){const _0x2b0a25=_0x3a9b9d,_0x11cf8c=new Float32Array(0x4*_0x1a5e2e);for(let _0x1bb471=0x0;_0x1bb471<_0x1a5e2e;_0x1bb471++){_0x11cf8c[0x4*_0x1bb471]=Cesium$3['Math']['randomBetween'](_0x2207cb['lonRange']['x'],_0x2207cb['lonRange']['y']),_0x11cf8c[0x4*_0x1bb471+0x1]=Cesium$3['Math']['randomBetween'](_0x2207cb['latRange']['x'],_0x2207cb['latRange']['y']),_0x11cf8c[0x4*_0x1bb471+0x2]=Cesium$3['Math']['randomBetween'](this[_0x2b0a25(0x262)]['lev'][_0x2b0a25(0x2b7)],this['data']['lev']['max']),_0x11cf8c[0x4*_0x1bb471+0x3]=0x0;}return _0x11cf8c;}[_0x3a9b9d(0x26c)](){const _0x10e2d7=_0x3a9b9d;Object['keys'](this['particlesTextures'])[_0x10e2d7(0x2cd)](_0xf5afd3=>{const _0x11d30f=_0x10e2d7;this[_0x11d30f(0x203)][_0xf5afd3]['destroy']();});}[_0x3a9b9d(0x297)](_0x237e39,_0x2d2740,_0x4fa77d){const _0x17dcf6=_0x3a9b9d,_0x37ea2a=new Cesium$3['Cartesian3'](_0x237e39['dimensions'][_0x17dcf6(0x253)],_0x237e39['dimensions']['lat'],_0x237e39['dimensions']['lev']),_0x27961a=new Cesium$3[(_0x17dcf6(0x235))](_0x237e39['lon'][_0x17dcf6(0x2b7)],_0x237e39['lat'][_0x17dcf6(0x2b7)],_0x237e39['lev']['min']),_0x195832=new Cesium$3['Cartesian3'](_0x237e39[_0x17dcf6(0x253)]['max'],_0x237e39[_0x17dcf6(0x22b)]['max'],_0x237e39['lev']['max']),_0x1f3552=new Cesium$3[(_0x17dcf6(0x235))]((_0x195832['x']-_0x27961a['x'])/(_0x37ea2a['x']-0x1),(_0x195832['y']-_0x27961a['y'])/(_0x37ea2a['y']-0x1),_0x37ea2a['z']>0x1?(_0x195832['z']-_0x27961a['z'])/(_0x37ea2a['z']-0x1):0x1),_0x54cc99=new Cesium$3['Cartesian2'](_0x237e39['U'][_0x17dcf6(0x2b7)],_0x237e39['U'][_0x17dcf6(0x207)]),_0x15b1d4=new Cesium$3['Cartesian2'](_0x237e39['V'][_0x17dcf6(0x2b7)],_0x237e39['V']['max']),_0x4adaed=this;this[_0x17dcf6(0x27a)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x4adaed['windTextures']['U'];},'V':function(){return _0x4adaed['windTextures']['V'];},'currentParticlesPosition':function(){return _0x4adaed['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x37ea2a;},'minimum':function(){return _0x27961a;},'maximum':function(){return _0x195832;},'interval':function(){return _0x1f3552;}},'fragmentShaderSource':new Cesium$3[(_0x17dcf6(0x1ed))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x55c244=_0x17dcf6;_0x4adaed['primitives']['getWind'][_0x55c244(0x271)]['outputTexture']=_0x4adaed[_0x55c244(0x203)]['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x43ed4a=_0x17dcf6;return _0x4adaed['particlesTextures'][_0x43ed4a(0x29c)];},'particlesWind':function(){return _0x4adaed['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x54cc99;},'vSpeedRange':function(){return _0x15b1d4;},'pixelSize':function(){const _0x520ff1=_0x17dcf6;return _0x4fa77d[_0x520ff1(0x20a)];},'speedFactor':function(){return _0x2d2740['speedFactor'];}},'fragmentShaderSource':new Cesium$3[(_0x17dcf6(0x1ed))]({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x4d68c9=_0x17dcf6,_0x13c9ff=_0x4adaed[_0x4d68c9(0x203)][_0x4d68c9(0x29c)];_0x4adaed['particlesTextures']['currentParticlesSpeed']=_0x4adaed['particlesTextures']['postProcessingSpeed'],_0x4adaed[_0x4d68c9(0x203)]['postProcessingSpeed']=_0x13c9ff,_0x4adaed['primitives']['updateSpeed']['commandToExecute'][_0x4d68c9(0x1f1)]=_0x4adaed[_0x4d68c9(0x203)][_0x4d68c9(0x23a)];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x4adaed['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x464231=_0x17dcf6;return _0x4adaed[_0x464231(0x203)][_0x464231(0x29c)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x3ccca9=_0x17dcf6,_0x3c1ee6=_0x4adaed[_0x3ccca9(0x203)][_0x3ccca9(0x2c9)];_0x4adaed['particlesTextures']['currentParticlesPosition']=_0x4adaed['particlesTextures']['postProcessingPosition'],_0x4adaed['particlesTextures']['postProcessingPosition']=_0x3c1ee6,_0x4adaed['primitives']['updatePosition']['commandToExecute']['outputTexture']=_0x4adaed['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){const _0x5d3106=_0x17dcf6;return _0x4adaed[_0x5d3106(0x203)]['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x4adaed['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x4fa77d['lonRange'];},'latRange':function(){return _0x4fa77d['latRange'];},'randomCoefficient':function(){const _0x230277=_0x17dcf6,_0x29ef81=Math[_0x230277(0x277)]();return _0x29ef81;},'dropRate':function(){const _0x1e4685=_0x17dcf6;return _0x2d2740[_0x1e4685(0x1e5)];},'dropRateBump':function(){return _0x2d2740['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures'][_0x17dcf6(0x2a2)],'preExecute':function(){const _0x345c51=_0x17dcf6;_0x4adaed['primitives']['postProcessingPosition'][_0x345c51(0x271)]['outputTexture']=_0x4adaed[_0x345c51(0x203)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x3592e0=_0x17dcf6;return _0x4adaed['particlesTextures'][_0x3592e0(0x2a2)];},'nextParticlesSpeed':function(){return _0x4adaed['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x4a9482=_0x17dcf6;_0x4adaed[_0x4a9482(0x27a)][_0x4a9482(0x210)][_0x4a9482(0x271)]['outputTexture']=_0x4adaed['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace[_0x3a9b9d(0x2b0)];class ParticleSystem{constructor(_0x220b8c,_0xff2c8a,_0x387244,_0xd22eb1){const _0x12e7ed=_0x3a9b9d;this['context']=_0x220b8c,_0xff2c8a={..._0xff2c8a},_0xff2c8a[_0x12e7ed(0x20b)]&&_0xff2c8a['vdata']&&(_0xff2c8a['dimensions']={},_0xff2c8a['dimensions']['lon']=_0xff2c8a['cols'],_0xff2c8a['dimensions'][_0x12e7ed(0x22b)]=_0xff2c8a[_0x12e7ed(0x27c)],_0xff2c8a['dimensions']['lev']=_0xff2c8a['lev']||0x1,_0xff2c8a[_0x12e7ed(0x253)]={},_0xff2c8a['lon'][_0x12e7ed(0x2b7)]=_0xff2c8a['xmin'],_0xff2c8a['lon']['max']=_0xff2c8a['xmax'],_0xff2c8a['lat']={},_0xff2c8a['lat'][_0x12e7ed(0x2b7)]=_0xff2c8a['ymin'],_0xff2c8a['lat']['max']=_0xff2c8a[_0x12e7ed(0x227)],_0xff2c8a[_0x12e7ed(0x285)]={},_0xff2c8a['lev']['min']=_0xff2c8a['levmin']??0x1,_0xff2c8a['lev'][_0x12e7ed(0x207)]=_0xff2c8a['levmax']??0x1,_0xff2c8a['U']={},_0xff2c8a['U']['array']=new Float32Array(_0xff2c8a['udata']),_0xff2c8a['U'][_0x12e7ed(0x2b7)]=_0xff2c8a[_0x12e7ed(0x294)]??Math['min'](..._0xff2c8a[_0x12e7ed(0x20b)]),_0xff2c8a['U']['max']=_0xff2c8a['umax']??Math['max'](..._0xff2c8a['udata']),_0xff2c8a['V']={},_0xff2c8a['V'][_0x12e7ed(0x1e4)]=new Float32Array(_0xff2c8a[_0x12e7ed(0x283)]),_0xff2c8a['V'][_0x12e7ed(0x2b7)]=_0xff2c8a['vmin']??Math[_0x12e7ed(0x2b7)](..._0xff2c8a['vdata']),_0xff2c8a['V']['max']=_0xff2c8a[_0x12e7ed(0x280)]??Math[_0x12e7ed(0x207)](..._0xff2c8a['vdata'])),this['data']=_0xff2c8a,this['options']=_0x387244,this['viewerParameters']=_0xd22eb1,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0x12e7ed(0x225)],this['data'],this['options'],this[_0x12e7ed(0x25f)],this['particlesComputing']);}['canvasResize'](_0x346b4a){const _0x3fa414=_0x3a9b9d;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])[_0x3fa414(0x2cd)](_0x8c57a9=>{this['particlesComputing']['windTextures'][_0x8c57a9]['destroy']();}),this[_0x3fa414(0x2b6)]['textures']['colorTable']['destroy'](),Object['keys'](this[_0x3fa414(0x2b6)]['framebuffers'])['forEach'](_0x224e8d=>{const _0xf0902=_0x3fa414;this[_0xf0902(0x2b6)][_0xf0902(0x296)][_0x224e8d]['destroy']();}),this['context']=_0x346b4a,this['particlesComputing']=new ParticlesComputing(this[_0x3fa414(0x225)],this[_0x3fa414(0x262)],this['options'],this[_0x3fa414(0x25f)]),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x5c957d=_0x3a9b9d,_0x59a812=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass'][_0x5c957d(0x298)]});Object['keys'](this['particlesRendering']['framebuffers'])[_0x5c957d(0x2cd)](_0x244f02=>{const _0x369766=_0x5c957d;_0x59a812['framebuffer']=this['particlesRendering']['framebuffers'][_0x244f02],_0x59a812[_0x369766(0x25d)](this['context']);});}['refreshParticles'](_0x3f87ee){const _0x244465=_0x3a9b9d;this['clearFramebuffers'](),this[_0x244465(0x289)][_0x244465(0x26c)](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this[_0x244465(0x25f)]);if(_0x3f87ee){const _0x877c2c=this[_0x244465(0x2b6)][_0x244465(0x233)](this[_0x244465(0x1f7)]);this['particlesRendering'][_0x244465(0x27a)]['segments']['geometry']=_0x877c2c;const _0x29f59f=Cesium$2['VertexArray']['fromGeometry']({'context':this['context'],'geometry':_0x877c2c,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2[_0x244465(0x27e)]['STATIC_DRAW']});this[_0x244465(0x2b6)][_0x244465(0x27a)]['segments']['commandToExecute']['vertexArray']=_0x29f59f;}}[_0x3a9b9d(0x2b5)](_0xc94127){let _0x2feacf=![];this['options']['maxParticles']!==_0xc94127['maxParticles']&&(_0x2feacf=!![]),Object['keys'](_0xc94127)['forEach'](_0xaef8ab=>{this['options'][_0xaef8ab]=_0xc94127[_0xaef8ab];}),this['refreshParticles'](_0x2feacf);}['applyViewerParameters'](_0x4dee56){const _0xe9e7e7=_0x3a9b9d;Object['keys'](_0x4dee56)[_0xe9e7e7(0x2cd)](_0x10bd3e=>{const _0xcafdb5=_0xe9e7e7;this[_0xcafdb5(0x25f)][_0x10bd3e]=_0x4dee56[_0x10bd3e];}),this['refreshParticles'](![]);}['destroy'](){const _0x2e01cf=_0x3a9b9d;clearTimeout(this['canrefresh']),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x25ac13=>{this['particlesComputing']['windTextures'][_0x25ac13]['destroy']();}),this['particlesRendering']['textures'][_0x2e01cf(0x1fa)]['destroy'](),Object['keys'](this[_0x2e01cf(0x2b6)][_0x2e01cf(0x296)])[_0x2e01cf(0x2cd)](_0xdb1d50=>{const _0x1fb496=_0x2e01cf;this[_0x1fb496(0x2b6)][_0x1fb496(0x296)][_0xdb1d50][_0x1fb496(0x247)]();});for(const _0x4ac35f in this){delete this[_0x4ac35f];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer'][_0x3a9b9d(0x293)],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x3a9b9d(0x21d)]};class WindLayer extends BaseLayer$1{constructor(_0x1aba12={}){const _0x9f5e5d=_0x3a9b9d;_0x1aba12={...DEF_OPTIONS,..._0x1aba12},super(_0x1aba12),this[_0x9f5e5d(0x25c)](_0x1aba12);}get[_0x3a9b9d(0x24b)](){return this['primitives'];}get['data'](){const _0xe5c112=_0x3a9b9d;return this[_0xe5c112(0x25a)];}set['data'](_0x4e7a09){this['setData'](_0x4e7a09);}get['colors'](){const _0x45aa2c=_0x3a9b9d;return this['options'][_0x45aa2c(0x245)];}set['colors'](_0x22545d){const _0x597e04=_0x3a9b9d;this['options'][_0x597e04(0x245)]=_0x22545d,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x22545d}),this[_0x597e04(0x256)]();}['_mountedHook'](){}[_0x3a9b9d(0x24a)](){const _0x3c6f59=_0x3a9b9d;this['scene']=this['_map'][_0x3c6f59(0x216)],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1[(_0x3c6f59(0x21a))](),this['_map'][_0x3c6f59(0x216)]['primitives']['add'](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x3c6f59(0x22d)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this[_0x3c6f59(0x2c4)](),window['addEventListener']('resize',this[_0x3c6f59(0x256)]['bind'](this),![]),this['mouse_down']=![],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[_0x3c6f59(0x239)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x3c6f59(0x2cc)],this['_onMouseMoveEvent'],this),this['_data']&&this[_0x3c6f59(0x2b2)](this[_0x3c6f59(0x25a)]);}[_0x3a9b9d(0x27b)](){const _0x139415=_0x3a9b9d;window[_0x139415(0x1e0)]('resize',this[_0x139415(0x256)]),this['_map'][_0x139415(0x1ee)](mars3d__namespace[_0x139415(0x239)]['preRender'],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x139415(0x28f)]['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this[_0x139415(0x2ae)],this),this[_0x139415(0x28f)]['off'](mars3d__namespace['EventType'][_0x139415(0x2cc)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this['_map']['scene']['primitives']['remove'](this[_0x139415(0x27a)]);}['resize'](){const _0x27fc50=_0x3a9b9d;if(!this['show']||!this[_0x27fc50(0x284)])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this[_0x27fc50(0x28f)][_0x27fc50(0x228)](mars3d__namespace['EventType']['preRender'],this[_0x27fc50(0x200)],this);}[_0x3a9b9d(0x200)](_0x18602f){const _0x512d3a=_0x3a9b9d;this['particleSystem'][_0x512d3a(0x268)](this[_0x512d3a(0x216)][_0x512d3a(0x225)]),this[_0x512d3a(0x1f5)](),this[_0x512d3a(0x27a)]['show']=!![];}['_onMapWhellEvent'](_0xb70e7b){const _0x4c46c0=_0x3a9b9d;clearTimeout(this[_0x4c46c0(0x240)]);if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{const _0x4bc3c4=_0x4c46c0;if(!this['show'])return;this[_0x4bc3c4(0x209)]();},0xc8);}['_onMouseDownEvent'](_0xf7c481){this['mouse_down']=!![];}[_0x3a9b9d(0x205)](_0x18894c){const _0x4f63d5=_0x3a9b9d;if(!this['show']||!this['particleSystem'])return;this[_0x4f63d5(0x1fd)]&&(this[_0x4f63d5(0x27a)]['show']=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x1be239){const _0x4e55a5=_0x3a9b9d;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this[_0x4e55a5(0x27a)][_0x4e55a5(0x267)]=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0x48d265=_0x3a9b9d;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this[_0x48d265(0x25f)]),this[_0x48d265(0x27a)]['show']=!![];}['setData'](_0x30ba14){const _0x4969b1=_0x3a9b9d;this['_data']=_0x30ba14,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x4969b1(0x225)],_0x30ba14,this[_0x4969b1(0x2a1)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x2b9dc8,_0x13ea67){const _0x181741=_0x3a9b9d;if(_0x2b9dc8)for(const _0x22be04 in _0x2b9dc8){this[_0x22be04]=_0x2b9dc8[_0x22be04];}this['particleSystem']&&this[_0x181741(0x284)]['setOptions'](this['getOptions']());}['getOptions'](){const _0x5610be=_0x3a9b9d,_0x334f0a=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x334f0a*_0x334f0a,{'particlesTextureSize':_0x334f0a,'maxParticles':this[_0x5610be(0x22a)],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x453011=_0x3a9b9d;this[_0x453011(0x27a)][_0x453011(0x22e)](this[_0x453011(0x284)]['particlesComputing']['primitives']['getWind']),this['primitives']['add'](this['particleSystem'][_0x453011(0x289)]['primitives']['updateSpeed']),this[_0x453011(0x27a)][_0x453011(0x22e)](this['particleSystem']['particlesComputing'][_0x453011(0x27a)]['updatePosition']),this['primitives']['add'](this[_0x453011(0x284)]['particlesComputing'][_0x453011(0x27a)][_0x453011(0x2a2)]),this['primitives'][_0x453011(0x22e)](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this['primitives'][_0x453011(0x22e)](this['particleSystem']['particlesRendering']['primitives']['segments']),this['primitives']['add'](this[_0x453011(0x284)][_0x453011(0x2b6)]['primitives'][_0x453011(0x204)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0x15fddc=_0x3a9b9d;let _0x718080=this['camera']['computeViewRectangle'](this['scene'][_0x15fddc(0x241)]['ellipsoid']);if(!_0x718080){const _0x40b925=this['_map']['getExtent']();_0x718080=Cesium$1['Rectangle'][_0x15fddc(0x265)](_0x40b925['xmin'],_0x40b925['ymin'],_0x40b925['xmax'],_0x40b925['ymax']);}const _0xf0e638=Util[_0x15fddc(0x23c)](_0x718080);this[_0x15fddc(0x25f)]['lonRange']['x']=_0xf0e638['lon'][_0x15fddc(0x2b7)],this[_0x15fddc(0x25f)]['lonRange']['y']=_0xf0e638[_0x15fddc(0x253)][_0x15fddc(0x207)],this['viewerParameters']['latRange']['x']=_0xf0e638['lat'][_0x15fddc(0x2b7)],this[_0x15fddc(0x25f)]['latRange']['y']=_0xf0e638['lat']['max'];const _0x34b4a2=this[_0x15fddc(0x2b9)]['getPixelSize'](this[_0x15fddc(0x22d)],this[_0x15fddc(0x216)][_0x15fddc(0x292)],this['scene'][_0x15fddc(0x1f3)]);_0x34b4a2>0x0&&(this['viewerParameters']['pixelSize']=_0x34b4a2);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace[_0x3a9b9d(0x24b)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x387a9a=_0x3a9b9d;this[_0x387a9a(0x2a8)]=null,this['lat']=null,this[_0x387a9a(0x2a7)]=null,this['tlat']=null,this['age']=null;}['destroy'](){for(const _0x20674b in this){delete this[_0x20674b];}}}class CanvasWindField{constructor(_0x52d5ac){const _0x18c46a=_0x3a9b9d;this[_0x18c46a(0x2b5)](_0x52d5ac);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x2b074c){const _0x535c86=_0x3a9b9d;this[_0x535c86(0x261)]=(0x64-(_0x2b074c>0x63?0x63:_0x2b074c))*0x64,this[_0x535c86(0x212)]=[(this[_0x535c86(0x20e)]-this['xmin'])/this['_speedRate'],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){return this['_maxAge'];}set[_0x3a9b9d(0x299)](_0x38a715){this['_maxAge']=_0x38a715;}['setOptions'](_0xa1e02d){const _0x362edb=_0x3a9b9d;this[_0x362edb(0x1f7)]=_0xa1e02d,this['maxAge']=_0xa1e02d['maxAge']||0x78,this['speedRate']=_0xa1e02d['speedRate']||0x32,this['particles']=[];const _0x826eb5=_0xa1e02d['particlesNumber']||0x1000;for(let _0x416629=0x0;_0x416629<_0x826eb5;_0x416629++){const _0x49808d=this[_0x362edb(0x208)](new CanvasParticle());this['particles']['push'](_0x49808d);}}[_0x3a9b9d(0x215)](_0xd31091){const _0x5b48d3=_0x3a9b9d;this['rows']=_0xd31091['rows'],this['cols']=_0xd31091['cols'],this[_0x5b48d3(0x1f0)]=_0xd31091['xmin'],this['xmax']=_0xd31091['xmax'],this['ymin']=_0xd31091['ymin'],this['ymax']=_0xd31091['ymax'],this[_0x5b48d3(0x1f8)]=[];const _0x597d9e=_0xd31091['udata'],_0x47182f=_0xd31091[_0x5b48d3(0x283)];let _0x5cc729=![];_0x597d9e['length']===this['rows']&&_0x597d9e[0x0]['length']===this['cols']&&(_0x5cc729=!![]);let _0x1b37f3=0x0,_0x463268=null,_0x1f1d3e=null;for(let _0x303192=0x0;_0x303192<this['rows'];_0x303192++){_0x463268=[];for(let _0x143efa=0x0;_0x143efa<this['cols'];_0x143efa++,_0x1b37f3++){_0x5cc729?_0x1f1d3e=this[_0x5b48d3(0x1e3)](_0x597d9e[_0x303192][_0x143efa],_0x47182f[_0x303192][_0x143efa]):_0x1f1d3e=this['_calcUV'](_0x597d9e[_0x1b37f3],_0x47182f[_0x1b37f3]),_0x463268[_0x5b48d3(0x1ea)](_0x1f1d3e);}this['grid']['push'](_0x463268);}this[_0x5b48d3(0x1f7)][_0x5b48d3(0x2c0)]&&this['grid']['reverse']();}['clear'](){const _0x137215=_0x3a9b9d;delete this['rows'],delete this[_0x137215(0x26d)],delete this[_0x137215(0x1f0)],delete this[_0x137215(0x20e)],delete this['ymin'],delete this[_0x137215(0x227)],delete this['grid'],delete this['particles'];}['toGridXY'](_0x27729f,_0xb6deac){const _0x351233=_0x3a9b9d,_0x4ce3a8=(_0x27729f-this[_0x351233(0x1f0)])/(this['xmax']-this[_0x351233(0x1f0)])*(this[_0x351233(0x26d)]-0x1),_0x2e1de3=(this['ymax']-_0xb6deac)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0x4ce3a8,_0x2e1de3];}['getUVByXY'](_0xa9f9ab,_0xb94f8b){const _0x3590e=_0x3a9b9d;if(_0xa9f9ab<0x0||_0xa9f9ab>=this['cols']||_0xb94f8b>=this[_0x3590e(0x27c)])return[0x0,0x0,0x0];const _0x4fe699=Math['floor'](_0xa9f9ab),_0x5b2b6b=Math[_0x3590e(0x237)](_0xb94f8b);if(_0x4fe699===_0xa9f9ab&&_0x5b2b6b===_0xb94f8b)return this[_0x3590e(0x1f8)][_0xb94f8b][_0xa9f9ab];const _0x41ed99=_0x4fe699+0x1,_0xd9a63f=_0x5b2b6b+0x1,_0x1f8878=this['getUVByXY'](_0x4fe699,_0x5b2b6b),_0xfa05ae=this['getUVByXY'](_0x41ed99,_0x5b2b6b),_0x40cf51=this[_0x3590e(0x21b)](_0x4fe699,_0xd9a63f),_0xcb3135=this['getUVByXY'](_0x41ed99,_0xd9a63f);let _0x21c45e=null;try{_0x21c45e=this[_0x3590e(0x20c)](_0xa9f9ab-_0x4fe699,_0xb94f8b-_0x5b2b6b,_0x1f8878,_0xfa05ae,_0x40cf51,_0xcb3135);}catch(_0x565ade){console['log'](_0xa9f9ab,_0xb94f8b);}return _0x21c45e;}[_0x3a9b9d(0x20c)](_0x199aa1,_0x562c9a,_0x176d0b,_0x569d09,_0x7fe0d2,_0x47cc05){const _0x32ccb2=0x1-_0x199aa1,_0x50596b=0x1-_0x562c9a,_0xca6ece=_0x32ccb2*_0x50596b,_0x67e9a9=_0x199aa1*_0x50596b,_0x1e2a44=_0x32ccb2*_0x562c9a,_0x52aec8=_0x199aa1*_0x562c9a,_0x4cbe9f=_0x176d0b[0x0]*_0xca6ece+_0x569d09[0x0]*_0x67e9a9+_0x7fe0d2[0x0]*_0x1e2a44+_0x47cc05[0x0]*_0x52aec8,_0x58f2f8=_0x176d0b[0x1]*_0xca6ece+_0x569d09[0x1]*_0x67e9a9+_0x7fe0d2[0x1]*_0x1e2a44+_0x47cc05[0x1]*_0x52aec8;return this['_calcUV'](_0x4cbe9f,_0x58f2f8);}['_calcUV'](_0x36a17c,_0x3dceae){return[+_0x36a17c,+_0x3dceae,Math['sqrt'](_0x36a17c*_0x36a17c+_0x3dceae*_0x3dceae)];}['getUVByPoint'](_0x2a0526,_0x11a28c){const _0x5dea86=_0x3a9b9d;if(!this['isInExtent'](_0x2a0526,_0x11a28c))return null;const _0x5befa7=this[_0x5dea86(0x244)](_0x2a0526,_0x11a28c),_0x4f0b1b=this['getUVByXY'](_0x5befa7[0x0],_0x5befa7[0x1]);return _0x4f0b1b;}['isInExtent'](_0x2c5126,_0x2f15dd){const _0x51ce9c=_0x3a9b9d;return _0x2c5126>=this[_0x51ce9c(0x1f0)]&&_0x2c5126<=this['xmax']&&_0x2f15dd>=this['ymin']&&_0x2f15dd<=this[_0x51ce9c(0x227)]?!![]:![];}['getRandomLatLng'](){const _0x5cfc8e=_0x3a9b9d,_0x176862=fRandomByfloat(this['xmin'],this[_0x5cfc8e(0x20e)]),_0xddbd6b=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0xddbd6b,'lng':_0x176862};}['getParticles'](){const _0xddd09b=_0x3a9b9d;let _0x30e036,_0x36611c,_0x1a1b36;for(let _0xf1b5d3=0x0,_0x506a4f=this['particles'][_0xddd09b(0x211)];_0xf1b5d3<_0x506a4f;_0xf1b5d3++){let _0x2c9199=this['particles'][_0xf1b5d3];_0x2c9199['age']<=0x0&&(_0x2c9199=this['_randomParticle'](_0x2c9199));if(_0x2c9199['age']>0x0){const _0x36652a=_0x2c9199[_0xddd09b(0x2a7)],_0x191cf5=_0x2c9199[_0xddd09b(0x275)];_0x1a1b36=this['getUVByPoint'](_0x36652a,_0x191cf5),_0x1a1b36?(_0x30e036=_0x36652a+this[_0xddd09b(0x212)][0x0]*_0x1a1b36[0x0],_0x36611c=_0x191cf5+this['_calc_speedRate'][0x1]*_0x1a1b36[0x1],_0x2c9199[_0xddd09b(0x2a8)]=_0x36652a,_0x2c9199[_0xddd09b(0x22b)]=_0x191cf5,_0x2c9199[_0xddd09b(0x2a7)]=_0x30e036,_0x2c9199['tlat']=_0x36611c,_0x2c9199[_0xddd09b(0x2a3)]--):_0x2c9199['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x63a489){const _0x3ef179=_0x3a9b9d;let _0x40ca0d,_0x6b8634;for(let _0x431835=0x0;_0x431835<0x1e;_0x431835++){_0x40ca0d=this['getRandomLatLng'](),_0x6b8634=this['getUVByPoint'](_0x40ca0d['lng'],_0x40ca0d['lat']);if(_0x6b8634&&_0x6b8634[0x2]>0x0)break;}if(!_0x6b8634)return _0x63a489;const _0x21c67b=_0x40ca0d['lng']+this[_0x3ef179(0x212)][0x0]*_0x6b8634[0x0],_0x32f582=_0x40ca0d['lat']+this[_0x3ef179(0x212)][0x1]*_0x6b8634[0x1];return _0x63a489[_0x3ef179(0x2a8)]=_0x40ca0d[_0x3ef179(0x2a8)],_0x63a489['lat']=_0x40ca0d[_0x3ef179(0x22b)],_0x63a489[_0x3ef179(0x2a7)]=_0x21c67b,_0x63a489['tlat']=_0x32f582,_0x63a489['age']=Math[_0x3ef179(0x21e)](Math[_0x3ef179(0x277)]()*this[_0x3ef179(0x299)]),_0x63a489;}['destroy'](){for(const _0x38490f in this){delete this[_0x38490f];}}}function fRandomByfloat(_0x2f4a3e,_0xf0f14b){return _0x2f4a3e+Math['random']()*(_0xf0f14b-_0x2f4a3e);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x3a9b9d(0x24b)][_0x3a9b9d(0x293)];class CanvasWindLayer extends BaseLayer{constructor(_0x486ce7={}){super(_0x486ce7),this['_setOptionsHook'](_0x486ce7),this['canvas']=null;}['_setOptionsHook'](_0x2c83ca,_0x5f3f5f){const _0x37a2e1=_0x3a9b9d;this['frameTime']=0x3e8/(_0x2c83ca[_0x37a2e1(0x2be)]||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x2c83ca['color']||'#ffffff',this['lineWidth']=_0x2c83ca[_0x37a2e1(0x2a0)]||0x1,this['fixedHeight']=_0x2c83ca[_0x37a2e1(0x29d)]??0x0,this['reverseY']=_0x2c83ca[_0x37a2e1(0x2c0)]??![],this[_0x37a2e1(0x1e7)]&&this['windField']['setOptions'](_0x2c83ca);}get['layer'](){return this['canvas'];}get[_0x3a9b9d(0x226)](){const _0x1617f0=_0x3a9b9d;return this[_0x1617f0(0x28f)]['scene']['canvas'][_0x1617f0(0x260)];}get['canvasHeight'](){const _0x353ba0=_0x3a9b9d;return this[_0x353ba0(0x28f)][_0x353ba0(0x216)]['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0x9276ef){const _0x2c6ddf=_0x3a9b9d;this['_pointerEvents']=_0x9276ef;if(!this[_0x2c6ddf(0x1e9)])return;_0x9276ef?this['canvas'][_0x2c6ddf(0x2c3)]['pointer-events']=_0x2c6ddf(0x2ba):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){const _0xe0dabf=_0x3a9b9d;return this[_0xe0dabf(0x1f7)]['particlesNumber'];}set['particlesNumber'](_0x8aaf36){const _0x29cbc5=_0x3a9b9d;this['options'][_0x29cbc5(0x22a)]=_0x8aaf36,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x1777ea=_0x3a9b9d;return this[_0x1777ea(0x1f7)]['speedRate'];}set[_0x3a9b9d(0x273)](_0xee6bdb){const _0x14b6ae=_0x3a9b9d;this['options'][_0x14b6ae(0x273)]=_0xee6bdb,this['windField']&&(this['windField']['speedRate']=_0xee6bdb);}get[_0x3a9b9d(0x299)](){const _0x27070f=_0x3a9b9d;return this['options'][_0x27070f(0x299)];}set['maxAge'](_0x548b38){const _0x165074=_0x3a9b9d;this[_0x165074(0x1f7)]['maxAge']=_0x548b38,this['windField']&&(this[_0x165074(0x1e7)]['maxAge']=_0x548b38);}get['data'](){const _0x107e91=_0x3a9b9d;return this[_0x107e91(0x206)];}set['data'](_0x46eac0){this['setData'](_0x46eac0);}['_showHook'](_0x539939){const _0x2cf706=_0x3a9b9d;_0x539939?this['_addedHook']():(this['windData']&&(this['options']['data']=this[_0x2cf706(0x206)]),this[_0x2cf706(0x27b)]());}['_mountedHook'](){const _0x25454e=_0x3a9b9d;this['options']['worker']?this['initWorker']():this['windField']=new CanvasWindField(this[_0x25454e(0x1f7)]);}[_0x3a9b9d(0x24a)](){const _0x571598=_0x3a9b9d;this['canvas']=this[_0x571598(0x258)](),this['canvasContext']=this[_0x571598(0x1e9)]['getContext']('2d',{'willReadFrequently':!![]}),this[_0x571598(0x2af)](),this[_0x571598(0x1f7)]['data']&&this['setData'](this['options']['data']);}[_0x3a9b9d(0x27b)](){this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}[_0x3a9b9d(0x258)](){const _0x2d73e0=_0x3a9b9d,_0xc30a88=mars3d__namespace['DomUtil']['create'](_0x2d73e0(0x1e9),_0x2d73e0(0x2c5),this['_map']['container']);return _0xc30a88[_0x2d73e0(0x2c3)][_0x2d73e0(0x23b)]='absolute',_0xc30a88[_0x2d73e0(0x2c3)]['top']='0px',_0xc30a88[_0x2d73e0(0x2c3)]['left']=_0x2d73e0(0x259),_0xc30a88[_0x2d73e0(0x2c3)]['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0xc30a88['style']['height']=this['_map'][_0x2d73e0(0x216)]['canvas'][_0x2d73e0(0x29b)]+'px',_0xc30a88[_0x2d73e0(0x2c3)][_0x2d73e0(0x291)]=this['_pointerEvents']?'auto':'none',_0xc30a88['style']['zIndex']=this['options']['zIndex']??0x9,_0xc30a88['width']=this[_0x2d73e0(0x28f)][_0x2d73e0(0x216)]['canvas']['clientWidth'],_0xc30a88['height']=this[_0x2d73e0(0x28f)]['scene']['canvas'][_0x2d73e0(0x29b)],_0xc30a88;}[_0x3a9b9d(0x256)](){const _0x559764=_0x3a9b9d;this['canvas']&&(this['canvas'][_0x559764(0x2c3)][_0x559764(0x249)]=this[_0x559764(0x28f)]['scene']['canvas'][_0x559764(0x260)]+'px',this[_0x559764(0x1e9)]['style'][_0x559764(0x26a)]=this['_map']['scene']['canvas']['clientHeight']+'px',this['canvas'][_0x559764(0x249)]=this[_0x559764(0x28f)][_0x559764(0x216)]['canvas'][_0x559764(0x260)],this['canvas']['height']=this['_map'][_0x559764(0x216)][_0x559764(0x1e9)]['clientHeight']);}['bindEvent'](){const _0x319bd7=_0x3a9b9d,_0x55631f=this;let _0x4cb631=Date['now']();(function _0x4e361c(){const _0x39603a=_0x45fc;_0x55631f['animateFrame']=window['requestAnimationFrame'](_0x4e361c);if(_0x55631f[_0x39603a(0x267)]&&_0x55631f[_0x39603a(0x1e7)]){const _0x517822=Date['now'](),_0xfeb693=_0x517822-_0x4cb631;_0xfeb693>_0x55631f[_0x39603a(0x2cb)]&&(_0x4cb631=_0x517822-_0xfeb693%_0x55631f['frameTime'],_0x55631f[_0x39603a(0x238)]());}}(),window[_0x319bd7(0x1ec)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace[_0x319bd7(0x239)]['wheel'],this['_onMapWhellEvent'],this),this[_0x319bd7(0x28f)]['on'](mars3d__namespace['EventType'][_0x319bd7(0x2ac)],this[_0x319bd7(0x20d)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x1990ea=_0x3a9b9d;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this['options'][_0x1990ea(0x2c7)]&&(this['_map']['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x1990ea(0x28f)]['off'](mars3d__namespace['EventType'][_0x1990ea(0x2ac)],this['_onMouseDownEvent'],this),this[_0x1990ea(0x28f)]['off'](mars3d__namespace['EventType']['mouseUp'],this[_0x1990ea(0x2ae)],this),this['_map'][_0x1990ea(0x1ee)](mars3d__namespace['EventType']['mouseMove'],this[_0x1990ea(0x205)],this));}['_onMapWhellEvent'](_0xccac64){const _0x14ac21=_0x3a9b9d;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0x14ac21(0x1e9)])return;this['canvas']['style']['visibility']=_0x14ac21(0x254),this[_0x14ac21(0x240)]=setTimeout(()=>{const _0x29c1d0=_0x14ac21;if(!this['show'])return;this['redraw'](),this['canvas']['style'][_0x29c1d0(0x288)]=_0x29c1d0(0x222);},0xc8);}['_onMouseDownEvent'](_0x3ceee5){const _0x5d407e=_0x3a9b9d;this['mouse_down']=!![],this['_map'][_0x5d407e(0x1ee)](mars3d__namespace[_0x5d407e(0x239)][_0x5d407e(0x2cc)],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x172b38){const _0x46181f=_0x3a9b9d;if(!this['show']||!this['canvas'])return;this[_0x46181f(0x1fd)]&&(this['canvas']['style']['visibility']='hidden',this[_0x46181f(0x252)]=!![]);}['_onMouseUpEvent'](_0x1fc194){const _0x201d70=_0x3a9b9d;if(!this[_0x201d70(0x267)]||!this['canvas'])return;this[_0x201d70(0x28f)]['off'](mars3d__namespace['EventType'][_0x201d70(0x2cc)],this['_onMouseMoveEvent'],this),this[_0x201d70(0x1fd)]&&this['mouse_move']&&this['redraw'](),this['canvas']['style']['visibility']='visible',this[_0x201d70(0x1fd)]=![],this['mouse_move']=![];}[_0x3a9b9d(0x2b2)](_0x51db00){const _0x5e3505=_0x3a9b9d;this[_0x5e3505(0x2b3)](),this['windData']=_0x51db00,this['windField']['setDate'](_0x51db00),this['redraw']();}[_0x3a9b9d(0x209)](){const _0x584fe4=_0x3a9b9d;if(!this[_0x584fe4(0x267)])return;this['windField']['setOptions'](this['options']),this[_0x584fe4(0x238)]();}['update'](){const _0x46c0df=_0x3a9b9d;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField'][_0x46c0df(0x238)]();else{const _0x2d7f5a=this['windField']['getParticles']();this['_drawLines'](_0x2d7f5a);}this['_updateIng']=![];}['_drawLines'](_0xd940d6){const _0x303b3f=_0x3a9b9d;this['canvasContext']['globalCompositeOperation']='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this[_0x303b3f(0x1fe)]['globalCompositeOperation']='lighter',this[_0x303b3f(0x1fe)][_0x303b3f(0x25e)]=0.9,this['canvasContext']['beginPath'](),this[_0x303b3f(0x1fe)][_0x303b3f(0x2a0)]=this['lineWidth'],this['canvasContext'][_0x303b3f(0x2ab)]=this['color'];const _0x5d49bf=this['_map']['scene'][_0x303b3f(0x24f)]!==Cesium['SceneMode']['SCENE3D'],_0x192a89=this[_0x303b3f(0x226)]*0.25;for(let _0x50adc0=0x0,_0x486f9b=_0xd940d6['length'];_0x50adc0<_0x486f9b;_0x50adc0++){const _0x4275c4=_0xd940d6[_0x50adc0],_0x207871=this['_tomap'](_0x4275c4['lng'],_0x4275c4[_0x303b3f(0x22b)],_0x4275c4),_0x509b01=this[_0x303b3f(0x1ef)](_0x4275c4['tlng'],_0x4275c4[_0x303b3f(0x275)],_0x4275c4);if(!_0x207871||!_0x509b01)continue;if(_0x5d49bf&&Math['abs'](_0x207871[0x0]-_0x509b01[0x0])>=_0x192a89)continue;this['canvasContext']['moveTo'](_0x207871[0x0],_0x207871[0x1]),this[_0x303b3f(0x1fe)]['lineTo'](_0x509b01[0x0],_0x509b01[0x1]);}this[_0x303b3f(0x1fe)]['stroke']();}['_tomap'](_0x53698d,_0x2faf13,_0xf2511b){const _0x5241c8=_0x3a9b9d,_0x1cd3a5=Cesium[_0x5241c8(0x235)]['fromDegrees'](_0x53698d,_0x2faf13,this['fixedHeight']),_0x35bd2b=this[_0x5241c8(0x28f)]['scene'];if(_0x35bd2b['mode']===Cesium[_0x5241c8(0x264)]['SCENE3D']){const _0x35c33c=new Cesium['EllipsoidalOccluder'](_0x35bd2b['globe'][_0x5241c8(0x242)],_0x35bd2b['camera']['positionWC']),_0x1e4cfc=_0x35c33c['isPointVisible'](_0x1cd3a5);if(!_0x1e4cfc)return _0xf2511b['age']=0x0,null;}const _0x5cd939=Cesium['SceneTransforms'][_0x5241c8(0x214)](this['_map']['scene'],_0x1cd3a5);return _0x5cd939?[_0x5cd939['x'],_0x5cd939['y']]:null;}['clear'](){const _0x36d2bb=_0x3a9b9d;this[_0x36d2bb(0x1e7)]['clear'](),delete this[_0x36d2bb(0x206)];}[_0x3a9b9d(0x1df)](){const _0x5e1190=_0x3a9b9d;this[_0x5e1190(0x2a6)]=new Worker(this[_0x5e1190(0x1f7)]['worker']),this[_0x5e1190(0x2a6)]['onmessage']=_0x5e44b9=>{const _0x46054c=_0x5e1190;this[_0x46054c(0x202)](_0x5e44b9['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x497687=>{const _0x4b40b2=_0x5e1190;this['worker'][_0x4b40b2(0x2b8)]({'type':_0x4b40b2(0x24e),'options':_0x497687});},'setOptions':_0x4721f4=>{const _0xaa7599=_0x5e1190;this['worker'][_0xaa7599(0x2b8)]({'type':'setOptions','options':_0x4721f4});},'setDate':_0x21edb3=>{this['worker']['postMessage']({'type':'setDate','data':_0x21edb3});},'update':()=>{const _0x536dd1=_0x5e1190;if(this['_updateIng2'])return;this['_updateIng2']=!![],this[_0x536dd1(0x2a6)][_0x536dd1(0x2b8)]({'type':_0x536dd1(0x238)});},'clear':()=>{const _0x58ab7e=_0x5e1190;this[_0x58ab7e(0x2a6)]['postMessage']({'type':_0x58ab7e(0x2b3)});}},this['windField']['init'](this[_0x5e1190(0x1f7)]);}}mars3d__namespace['LayerUtil']['register'](_0x3a9b9d(0x28c),CanvasWindLayer),mars3d__namespace[_0x3a9b9d(0x24b)][_0x3a9b9d(0x2ca)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace[_0x3a9b9d(0x1f4)]=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x3a9b9d(0x22c)]=WindLayer,exports[_0x3a9b9d(0x1f4)]=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0x1b8c(){const _0x8d568e=['toDegrees','style','updateViewerParameters','mars3d-canvasWind','TextureMagnificationFilter','mouseHidden','UNSIGNED_BYTE','currentParticlesPosition','CanvasWindLayer','frameTime','mouseMove','forEach','TWO_PI','initWorker','removeEventListener','isDestroyed','204174UMVDAM','_calcUV','array','dropRate','cos','windField','atan2','canvas','push','LINEAR','addEventListener','ShaderSource','off','_tomap','xmin','outputTexture','10tbpxtl','drawingBufferHeight','WindUtil','addPrimitives','attributeLocations','options','grid','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','colorTable','Pass','createFramebuffer','mouse_down','canvasContext','1415760RLIzZx','_onMap_preRenderEvent','fromGeometry','_drawLines','particlesTextures','trails','_onMouseMoveEvent','windData','max','_randomParticle','redraw','pixelSize','udata','_bilinearInterpolation','_onMouseDownEvent','xmax','createTexture','postProcessingSpeed','length','_calc_speedRate','fragmentShaderSource','wgs84ToWindowCoordinates','setDate','scene','fromCssColorString','createWindTextures','getFullscreenQuad','PrimitiveCollection','getUVByXY','geometry','rgb(206,255,255)','round','windTextures','west','depthMask','visible','nextTrails','PixelDatatype','context','canvasWidth','ymax','once','SCENE3D','particlesNumber','lat','WindLayer','globeBoundingSphere','add','LUMINANCE','currentTrails','defined','697130NZWobK','createSegmentsGeometry','clampToLatitudeRange','Cartesian3','12OGLJkl','floor','update','EventType','nextParticlesSpeed','position','viewRectangleToLonLatRange','createCommand','default','primitiveType','refreshTimer','globe','ellipsoid','toRadians','toGridXY','colors','randomizeParticles','destroy','segments','width','_addedHook','layer','createRenderingPrimitives','Math','init','mode','sin','maxParticles','mouse_move','lon','hidden','PixelFormat','resize','rawRenderState','_createCanvas','0px','_data','currentTrailsColor','_setOptionsHook','execute','globalAlpha','viewerParameters','clientWidth','_speedRate','data','//\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','SceneMode','fromDegrees','segmentsDepth','show','canvasResize','889448RQPKBk','height','PI_OVER_TWO','destroyParticlesTextures','cols','ComponentDatatype','keys','Sampler','commandToExecute','GeometryAttributes','speedRate','Draw','tlat','TRIANGLES','random','TextureMinificationFilter','ComputeCommand','primitives','_removedHook','rows','pow','BufferUsage','271536NYsaWh','vmax','NEAREST','FLOAT','vdata','particleSystem','lev','particlesTextureSize','Framebuffer','visibility','particlesComputing','viewport','commandList','canvasWind','290394VZxcow','vertexShaderSource','_map','shaderProgram','pointerEvents','drawingBufferWidth','BaseLayer','umin','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','framebuffers','createComputingPrimitives','OPAQUE','maxAge','ClearCommand','clientHeight','currentParticlesSpeed','fixedHeight','2514630ieqgky','Matrix4','lineWidth','getOptions','postProcessingPosition','age','Color','uniformMap','worker','tlng','lng','clearCommand','__esModule','strokeStyle','mouseDown','destroyObject','_onMouseUpEvent','bindEvent','Cesium','GeometryAttribute','setData','clear','preExecute','setOptions','particlesRendering','min','postMessage','camera','all','createParticlesTextures','textures','blue','frameRate','commandType','reverseY','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'];_0x1b8c=function(){return _0x8d568e;};return _0x1b8c();}
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-wind",
3
- "version": "3.5.15",
3
+ "version": "3.5.17",
4
4
  "description": "Mars3D平台插件,支持气象 风向图 功能插件",
5
5
  "main": "dist/mars3d-wind.js",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "peerDependencies": {},
10
10
  "devDependencies": {
11
- "mars3d": "~3.5.15"
11
+ "mars3d": "~3.5.17"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "eslint ./src/**/*.{js,ts} --fix"