mars3d-wind 3.6.4 → 3.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
3
3
  *
4
- * 版本信息:v3.6.4
5
- * 编译日期:2023-09-05 22:32:10
4
+ * 版本信息:v3.6.6
5
+ * 编译日期:2023-09-19 21:39:38
6
6
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
7
7
  * 使用单位:免费公开版 ,2023-03-17
8
8
  */
@@ -11,5 +11,5 @@
11
11
  typeof define === 'function' && define.amd ? define(['exports', 'mars3d'], factory) :
12
12
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-wind"] = {}, global.mars3d));
13
13
  })(this, (function (exports, mars3d) {
14
- 'use strict';const _0x13d0dd=_0x48a9;(function(_0x44e9cc,_0x2419a1){const _0x3bac8d=_0x48a9,_0x28967e=_0x44e9cc();while(!![]){try{const _0x1d5d76=-parseInt(_0x3bac8d(0x1eb))/0x1+parseInt(_0x3bac8d(0x286))/0x2+parseInt(_0x3bac8d(0x22f))/0x3*(parseInt(_0x3bac8d(0x1f1))/0x4)+-parseInt(_0x3bac8d(0x214))/0x5*(-parseInt(_0x3bac8d(0x26e))/0x6)+-parseInt(_0x3bac8d(0x29d))/0x7*(parseInt(_0x3bac8d(0x295))/0x8)+parseInt(_0x3bac8d(0x2b2))/0x9*(parseInt(_0x3bac8d(0x26d))/0xa)+-parseInt(_0x3bac8d(0x242))/0xb*(parseInt(_0x3bac8d(0x2d4))/0xc);if(_0x1d5d76===_0x2419a1)break;else _0x28967e['push'](_0x28967e['shift']());}catch(_0x5d6f89){_0x28967e['push'](_0x28967e['shift']());}}}(_0x1f58,0x2d790));function _interopNamespace(_0x370fdb){const _0x1ab8a2=_0x48a9;if(_0x370fdb&&_0x370fdb[_0x1ab8a2(0x260)])return _0x370fdb;var _0x4c041c=Object['create'](null);return _0x370fdb&&Object[_0x1ab8a2(0x279)](_0x370fdb)['forEach'](function(_0x1a7bcc){if(_0x1a7bcc!=='default'){var _0x4dfe08=Object['getOwnPropertyDescriptor'](_0x370fdb,_0x1a7bcc);Object['defineProperty'](_0x4c041c,_0x1a7bcc,_0x4dfe08['get']?_0x4dfe08:{'enumerable':!![],'get':function(){return _0x370fdb[_0x1a7bcc];}});}}),_0x4c041c[_0x1ab8a2(0x278)]=_0x370fdb,_0x4c041c;}var mars3d__namespace=_interopNamespace(mars3d);function _0x48a9(_0x1791e2,_0x3524f1){const _0x1f583a=_0x1f58();return _0x48a9=function(_0x48a986,_0x13bcd9){_0x48a986=_0x48a986-0x1eb;let _0x4c86cf=_0x1f583a[_0x48a986];return _0x4c86cf;},_0x48a9(_0x1791e2,_0x3524f1);}const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x246ef1,_0x2f6bcd){const _0x103bb9=_0x48a9,_0x902c47=_0x246ef1*Math['cos'](Cesium$7[_0x103bb9(0x2dd)][_0x103bb9(0x21c)](_0x2f6bcd));return _0x902c47;}function getV(_0x5e0b11,_0x4a8744){const _0x4d3727=_0x48a9,_0x7a619b=_0x5e0b11*Math['sin'](Cesium$7[_0x4d3727(0x2dd)][_0x4d3727(0x21c)](_0x4a8744));return _0x7a619b;}function getSpeed(_0x2dbfc5,_0x5942bd){const _0x230160=_0x48a9,_0x1d779a=Math['sqrt'](Math[_0x230160(0x217)](_0x2dbfc5,0x2)+Math['pow'](_0x5942bd,0x2));return _0x1d779a;}function getDirection(_0x39213f,_0x1b2abb){const _0x1280fa=_0x48a9;let _0x302cf8=Cesium$7[_0x1280fa(0x2dd)]['toDegrees'](Math['atan2'](_0x1b2abb,_0x39213f));return _0x302cf8+=_0x302cf8<0x0?0x168:0x0,_0x302cf8;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x71b4dd){const _0xf5d126=_0x48a9;this[_0xf5d126(0x22a)]=_0x71b4dd['commandType'],this['geometry']=_0x71b4dd['geometry'],this['attributeLocations']=_0x71b4dd[_0xf5d126(0x22e)],this['primitiveType']=_0x71b4dd[_0xf5d126(0x262)],this[_0xf5d126(0x1f0)]=_0x71b4dd['uniformMap'],this['vertexShaderSource']=_0x71b4dd['vertexShaderSource'],this[_0xf5d126(0x293)]=_0x71b4dd[_0xf5d126(0x293)],this[_0xf5d126(0x2b1)]=_0x71b4dd['rawRenderState'],this['framebuffer']=_0x71b4dd[_0xf5d126(0x2af)],this[_0xf5d126(0x2aa)]=_0x71b4dd['outputTexture'],this['autoClear']=_0x71b4dd['autoClear']??![],this[_0xf5d126(0x203)]=_0x71b4dd['preExecute'],this['show']=!![],this[_0xf5d126(0x24c)]=undefined,this[_0xf5d126(0x2cf)]=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0xf5d126(0x2af)],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x2b0937){const _0x2a0178=_0x48a9;switch(this['commandType']){case _0x2a0178(0x2c3):{const _0x22a9b2=Cesium$6['VertexArray']['fromGeometry']({'context':_0x2b0937,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0x2a0178(0x2cc)]}),_0x514df8=Cesium$6['ShaderProgram']['fromCache']({'context':_0x2b0937,'attributeLocations':this[_0x2a0178(0x22e)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this[_0x2a0178(0x293)]}),_0x133211=Cesium$6['RenderState'][_0x2a0178(0x20f)](this[_0x2a0178(0x2b1)]);return new Cesium$6[(_0x2a0178(0x292))]({'primitiveType':this[_0x2a0178(0x262)],'shaderProgram':_0x514df8,'vertexArray':_0x22a9b2,'modelMatrix':Cesium$6['Matrix4'][_0x2a0178(0x284)],'renderState':_0x133211,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0x2a0178(0x2af)],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6[(_0x2a0178(0x21a))]({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x4d348f,_0x1cf196){this['geometry']=_0x1cf196;const _0xc6f496=Cesium$6['VertexArray']['fromGeometry']({'context':_0x4d348f,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0xc6f496;}['update'](_0x5330d5){const _0x93944b=_0x48a9;if(!this[_0x93944b(0x257)])return;if(_0x5330d5[_0x93944b(0x290)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this[_0x93944b(0x204)](_0x5330d5['context'])),Cesium$6['defined'](this['preExecute'])&&this[_0x93944b(0x203)](),Cesium$6[_0x93944b(0x2d9)](this['clearCommand'])&&_0x5330d5[_0x93944b(0x2c5)]['push'](this[_0x93944b(0x2cf)]),_0x5330d5['commandList'][_0x93944b(0x1ef)](this['commandToExecute']);}['isDestroyed'](){return![];}[_0x13d0dd(0x252)](){const _0xe47317=_0x13d0dd;if(this['clearCommand']){var _0x77718f,_0x270711;(_0x77718f=this[_0xe47317(0x2cf)])!==null&&_0x77718f!==void 0x0&&_0x77718f['vertexArray']&&this['clearCommand'][_0xe47317(0x2a6)]['destroy'](),(_0x270711=this['clearCommand'])!==null&&_0x270711!==void 0x0&&_0x270711['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this[_0xe47317(0x24c)]['vertexArray']&&this['commandToExecute']['vertexArray'][_0xe47317(0x252)](),this['commandToExecute'][_0xe47317(0x230)]&&this[_0xe47317(0x24c)]['shaderProgram'][_0xe47317(0x252)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x247a28=function(){const _0x4b2dbe=_0x48a9,_0x8128db=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x4b2dbe(0x221))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5[_0x4b2dbe(0x2ce)][_0x4b2dbe(0x201)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x8128db;},_0x12ef70=function(_0x1b97a5,_0x56381b){if(Cesium$5['defined'](_0x56381b)){const _0x562a22={};_0x562a22['arrayBufferView']=_0x56381b,_0x1b97a5['source']=_0x562a22;}const _0x48ec68=new Cesium$5['Texture'](_0x1b97a5);return _0x48ec68;},_0x458d5b=function(_0x565410,_0x2497ff,_0x14fb56){const _0x244411=new Cesium$5['Framebuffer']({'context':_0x565410,'colorTextures':[_0x2497ff],'depthTexture':_0x14fb56});return _0x244411;},_0x508cdf=function(_0x1da4bf){const _0x5507cd=_0x48a9,_0x147b46=!![],_0x58c91b=![],_0x1a6552={'viewport':_0x1da4bf['viewport'],'depthTest':_0x1da4bf['depthTest'],'depthMask':_0x1da4bf[_0x5507cd(0x24b)],'blending':_0x1da4bf['blending']},_0x5038f0=Cesium$5['Appearance']['getDefaultRenderState'](_0x147b46,_0x58c91b,_0x1a6552);return _0x5038f0;},_0x47d2b5=function(_0x5552ea){const _0x39d1bc=_0x48a9,_0x1d7bbf={},_0x1c69d2=Cesium$5[_0x39d1bc(0x2dd)]['mod'](_0x5552ea['west'],Cesium$5['Math']['TWO_PI']),_0x5a0daa=Cesium$5['Math']['mod'](_0x5552ea[_0x39d1bc(0x20d)],Cesium$5['Math']['TWO_PI']),_0x4e2355=_0x5552ea['width'];let _0x5ae885,_0x1c35f1;_0x4e2355>Cesium$5['Math'][_0x39d1bc(0x21d)]?(_0x5ae885=0x0,_0x1c35f1=Cesium$5['Math']['TWO_PI']):_0x5a0daa-_0x1c69d2<_0x4e2355?(_0x5ae885=_0x1c69d2,_0x1c35f1=_0x1c69d2+_0x4e2355):(_0x5ae885=_0x1c69d2,_0x1c35f1=_0x5a0daa);_0x1d7bbf[_0x39d1bc(0x27c)]={'min':Cesium$5['Math'][_0x39d1bc(0x1ed)](_0x5ae885),'max':Cesium$5[_0x39d1bc(0x2dd)][_0x39d1bc(0x1ed)](_0x1c35f1)};const _0x1a6e4f=_0x5552ea['south'],_0x31c37b=_0x5552ea['north'],_0x75ce1f=_0x5552ea[_0x39d1bc(0x2dc)],_0x41d3a1=_0x75ce1f>Cesium$5[_0x39d1bc(0x2dd)]['PI']/0xc?_0x75ce1f/0x2:0x0;let _0x1dab28=Cesium$5['Math']['clampToLatitudeRange'](_0x1a6e4f-_0x41d3a1),_0x2feb37=Cesium$5['Math']['clampToLatitudeRange'](_0x31c37b+_0x41d3a1);return _0x1dab28<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x1dab28=-Cesium$5['Math']['PI_OVER_TWO']),_0x2feb37>Cesium$5[_0x39d1bc(0x2dd)]['PI_OVER_THREE']&&(_0x2feb37=Cesium$5['Math']['PI_OVER_TWO']),_0x1d7bbf['lat']={'min':Cesium$5['Math']['toDegrees'](_0x1dab28),'max':Cesium$5[_0x39d1bc(0x2dd)]['toDegrees'](_0x2feb37)},_0x1d7bbf;};return{'getFullscreenQuad':_0x247a28,'createTexture':_0x12ef70,'createFramebuffer':_0x458d5b,'createRawRenderState':_0x508cdf,'viewRectangleToLonLatRange':_0x47d2b5};}());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=_0x13d0dd(0x220),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(_0x540d1f,_0x375513,_0x48276b,_0x3139a0,_0x5e488d){this['createRenderingTextures'](_0x540d1f,_0x375513,_0x48276b['colors']),this['createRenderingFramebuffers'](_0x540d1f),this['createRenderingPrimitives'](_0x540d1f,_0x48276b,_0x3139a0,_0x5e488d);}[_0x13d0dd(0x2d5)](_0x34af20,_0x5d83ea,_0x4f1e5f){const _0x5edeb6=_0x13d0dd,_0x5cb856={'context':_0x34af20,'width':_0x34af20['drawingBufferWidth'],'height':_0x34af20[_0x5edeb6(0x237)],'pixelFormat':Cesium$4['PixelFormat'][_0x5edeb6(0x1f9)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x99ddb9={'context':_0x34af20,'width':_0x34af20[_0x5edeb6(0x2d6)],'height':_0x34af20['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4[_0x5edeb6(0x225)]['UNSIGNED_INT']},_0x5a695d=_0x4f1e5f['length'],_0xe71f0a=new Float32Array(_0x5a695d*0x3);for(let _0x43f297=0x0;_0x43f297<_0x5a695d;_0x43f297++){const _0x341b1e=Cesium$4['Color']['fromCssColorString'](_0x4f1e5f[_0x43f297]);_0xe71f0a[0x3*_0x43f297]=_0x341b1e['red'],_0xe71f0a[0x3*_0x43f297+0x1]=_0x341b1e['green'],_0xe71f0a[0x3*_0x43f297+0x2]=_0x341b1e[_0x5edeb6(0x2c1)];}const _0x53870a={'context':_0x34af20,'width':_0x5a695d,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0x5edeb6(0x208)]['LINEAR'],'magnificationFilter':Cesium$4[_0x5edeb6(0x26f)][_0x5edeb6(0x25f)]})};this['textures']={'segmentsColor':Util['createTexture'](_0x5cb856),'segmentsDepth':Util['createTexture'](_0x99ddb9),'currentTrailsColor':Util[_0x5edeb6(0x285)](_0x5cb856),'currentTrailsDepth':Util[_0x5edeb6(0x285)](_0x99ddb9),'nextTrailsColor':Util['createTexture'](_0x5cb856),'nextTrailsDepth':Util['createTexture'](_0x99ddb9),'colorTable':Util['createTexture'](_0x53870a,_0xe71f0a)};}[_0x13d0dd(0x243)](_0x4c2767){const _0x203571=_0x13d0dd;this['framebuffers']={'segments':Util['createFramebuffer'](_0x4c2767,this['textures'][_0x203571(0x29e)],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x4c2767,this[_0x203571(0x2da)][_0x203571(0x20b)],this['textures'][_0x203571(0x2a9)]),'nextTrails':Util['createFramebuffer'](_0x4c2767,this['textures']['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x5d7ac1){const _0x3edab2=_0x13d0dd,_0x61c2e9=0x4;let _0x93de0d=[];for(let _0x9e9dc4=0x0;_0x9e9dc4<_0x5d7ac1['particlesTextureSize'];_0x9e9dc4++){for(let _0x573135=0x0;_0x573135<_0x5d7ac1['particlesTextureSize'];_0x573135++){for(let _0x3f38c2=0x0;_0x3f38c2<_0x61c2e9;_0x3f38c2++){_0x93de0d['push'](_0x9e9dc4/_0x5d7ac1['particlesTextureSize']),_0x93de0d['push'](_0x573135/_0x5d7ac1['particlesTextureSize']);}}}_0x93de0d=new Float32Array(_0x93de0d);let _0x235657=[];const _0x458437=[-0x1,0x1],_0x2c42b7=[-0x1,0x1];for(let _0x4ef676=0x0;_0x4ef676<_0x5d7ac1['maxParticles'];_0x4ef676++){for(let _0x26f305=0x0;_0x26f305<_0x61c2e9/0x2;_0x26f305++){for(let _0x1e90d1=0x0;_0x1e90d1<_0x61c2e9/0x2;_0x1e90d1++){_0x235657['push'](_0x458437[_0x26f305]),_0x235657['push'](_0x2c42b7[_0x1e90d1]),_0x235657['push'](0x0);}}}_0x235657=new Float32Array(_0x235657);const _0x5a588d=0x6*_0x5d7ac1[_0x3edab2(0x2ba)],_0x28cd21=new Uint32Array(_0x5a588d);for(let _0x4d7c99=0x0,_0x219692=0x0,_0x4010b2=0x0;_0x4d7c99<_0x5d7ac1[_0x3edab2(0x2ba)];_0x4d7c99++){_0x28cd21[_0x219692++]=_0x4010b2+0x0,_0x28cd21[_0x219692++]=_0x4010b2+0x1,_0x28cd21[_0x219692++]=_0x4010b2+0x2,_0x28cd21[_0x219692++]=_0x4010b2+0x2,_0x28cd21[_0x219692++]=_0x4010b2+0x1,_0x28cd21[_0x219692++]=_0x4010b2+0x3,_0x4010b2+=0x4;}const _0x1e0d27=new Cesium$4['Geometry']({'attributes':new Cesium$4[(_0x3edab2(0x221))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x3edab2(0x201)],'componentsPerAttribute':0x2,'values':_0x93de0d}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x3edab2(0x2ce)]['FLOAT'],'componentsPerAttribute':0x3,'values':_0x235657})}),'indices':_0x28cd21});return _0x1e0d27;}[_0x13d0dd(0x2ad)](_0x988511,_0x352ed3,_0x38b779,_0x14078d){const _0x3c842b=_0x13d0dd,_0x52144d=this;this['primitives']={'segments':new CustomPrimitive({'commandType':_0x3c842b(0x2c3),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0x3c842b(0x259)](_0x352ed3),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0x179dcc=_0x3c842b;return _0x14078d[_0x179dcc(0x2ac)]['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x14078d['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x39af84=_0x3c842b;return _0x14078d['particlesTextures'][_0x39af84(0x238)];},'colorTable':function(){return _0x52144d['textures']['colorTable'];},'aspect':function(){return _0x988511['drawingBufferWidth']/_0x988511['drawingBufferHeight'];},'pixelSize':function(){return _0x38b779['pixelSize'];},'lineWidth':function(){return _0x352ed3['lineWidth'];},'particleHeight':function(){const _0x168a17=_0x3c842b;return _0x352ed3[_0x168a17(0x29c)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util[_0x3c842b(0x2d7)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x3c842b(0x23e)](),'primitiveType':Cesium$4['PrimitiveType'][_0x3c842b(0x2d0)],'uniformMap':{'segmentsColorTexture':function(){return _0x52144d['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x5e0317=_0x3c842b;return _0x52144d[_0x5e0317(0x2da)][_0x5e0317(0x1fa)];},'currentTrailsColor':function(){return _0x52144d['framebuffers']['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x1c0d8d=_0x3c842b;return _0x52144d['framebuffers'][_0x1c0d8d(0x248)]['depthTexture'];},'fadeOpacity':function(){const _0x46531f=_0x3c842b;return _0x352ed3[_0x46531f(0x240)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x3c842b(0x1f5)],'sources':[trailDraw_frag]}),'rawRenderState':Util[_0x3c842b(0x2d7)]({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0x3c842b(0x265)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x54ca23=_0x3c842b,_0x124a19=_0x52144d['framebuffers']['currentTrails'];_0x52144d['framebuffers'][_0x54ca23(0x248)]=_0x52144d[_0x54ca23(0x2c0)]['nextTrails'],_0x52144d['framebuffers']['nextTrails']=_0x124a19,_0x52144d['primitives']['trails'][_0x54ca23(0x24c)][_0x54ca23(0x2af)]=_0x52144d['framebuffers']['nextTrails'],_0x52144d['primitives'][_0x54ca23(0x236)]['clearCommand'][_0x54ca23(0x2af)]=_0x52144d[_0x54ca23(0x2c0)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){return _0x52144d['framebuffers']['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x3da7af=_0x3c842b;return _0x52144d['framebuffers'][_0x3da7af(0x254)]['depthTexture'];}},'vertexShaderSource':new Cesium$4[(_0x3c842b(0x258))]({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x3c842b(0x1f5)],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag=_0x13d0dd(0x2a8),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(_0x17068a,_0x4c187c,_0xaef8a3,_0x16b044){this['data']=_0x4c187c,this['createWindTextures'](_0x17068a,_0x4c187c),this['createParticlesTextures'](_0x17068a,_0xaef8a3,_0x16b044),this['createComputingPrimitives'](_0x4c187c,_0xaef8a3,_0x16b044);}['createWindTextures'](_0x11ef84,_0x271af5){const _0x7a25a2=_0x13d0dd,_0x577e28={'context':_0x11ef84,'width':_0x271af5['dimensions'][_0x7a25a2(0x27c)],'height':_0x271af5['dimensions']['lat']*(_0x271af5['dimensions']['lev']||0x1),'pixelFormat':Cesium$3[_0x7a25a2(0x212)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x7a25a2(0x28e))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x7a25a2(0x224)]})};this['windTextures']={'U':Util['createTexture'](_0x577e28,_0x271af5['U']['array']),'V':Util['createTexture'](_0x577e28,_0x271af5['V']['array'])};}['createParticlesTextures'](_0xb70493,_0x3865e0,_0x5b88f3){const _0x322c36=_0x13d0dd,_0x11ae43={'context':_0xb70493,'width':_0x3865e0['particlesTextureSize'],'height':_0x3865e0[_0x322c36(0x247)],'pixelFormat':Cesium$3['PixelFormat'][_0x322c36(0x1f9)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x322c36(0x28e))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3[_0x322c36(0x26f)]['NEAREST']})},_0x20f1c2=this['randomizeParticles'](_0x3865e0['maxParticles'],_0x5b88f3),_0x56a715=new Float32Array(0x4*_0x3865e0['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x11ae43),'currentParticlesPosition':Util[_0x322c36(0x285)](_0x11ae43,_0x20f1c2),'nextParticlesPosition':Util[_0x322c36(0x285)](_0x11ae43,_0x20f1c2),'currentParticlesSpeed':Util[_0x322c36(0x285)](_0x11ae43,_0x56a715),'nextParticlesSpeed':Util['createTexture'](_0x11ae43,_0x56a715),'postProcessingPosition':Util['createTexture'](_0x11ae43,_0x20f1c2),'postProcessingSpeed':Util[_0x322c36(0x285)](_0x11ae43,_0x56a715)};}[_0x13d0dd(0x282)](_0x3fb313,_0x1705b9){const _0x44dce9=_0x13d0dd,_0x51fccb=new Float32Array(0x4*_0x3fb313);for(let _0x17928f=0x0;_0x17928f<_0x3fb313;_0x17928f++){_0x51fccb[0x4*_0x17928f]=Cesium$3['Math']['randomBetween'](_0x1705b9[_0x44dce9(0x24f)]['x'],_0x1705b9['lonRange']['y']),_0x51fccb[0x4*_0x17928f+0x1]=Cesium$3['Math']['randomBetween'](_0x1705b9['latRange']['x'],_0x1705b9['latRange']['y']),_0x51fccb[0x4*_0x17928f+0x2]=Cesium$3['Math']['randomBetween'](this['data'][_0x44dce9(0x1ff)]['min'],this['data']['lev'][_0x44dce9(0x298)]),_0x51fccb[0x4*_0x17928f+0x3]=0x0;}return _0x51fccb;}[_0x13d0dd(0x2de)](){const _0x1914cf=_0x13d0dd;Object[_0x1914cf(0x279)](this['particlesTextures'])['forEach'](_0x3febee=>{const _0x3e2cf9=_0x1914cf;this[_0x3e2cf9(0x2ac)][_0x3febee]['destroy']();});}['createComputingPrimitives'](_0x39fb1e,_0x29065d,_0x1ea0a3){const _0xbd312a=_0x13d0dd,_0x4679f9=new Cesium$3['Cartesian3'](_0x39fb1e['dimensions']['lon'],_0x39fb1e['dimensions']['lat'],_0x39fb1e[_0xbd312a(0x28c)][_0xbd312a(0x1ff)]),_0x53d9f2=new Cesium$3['Cartesian3'](_0x39fb1e['lon'][_0xbd312a(0x28f)],_0x39fb1e['lat']['min'],_0x39fb1e['lev'][_0xbd312a(0x28f)]),_0x3cecc2=new Cesium$3[(_0xbd312a(0x251))](_0x39fb1e[_0xbd312a(0x27c)]['max'],_0x39fb1e[_0xbd312a(0x1fe)]['max'],_0x39fb1e[_0xbd312a(0x1ff)]['max']),_0x5188bc=new Cesium$3['Cartesian3']((_0x3cecc2['x']-_0x53d9f2['x'])/(_0x4679f9['x']-0x1),(_0x3cecc2['y']-_0x53d9f2['y'])/(_0x4679f9['y']-0x1),_0x4679f9['z']>0x1?(_0x3cecc2['z']-_0x53d9f2['z'])/(_0x4679f9['z']-0x1):0x1),_0x376ec9=new Cesium$3[(_0xbd312a(0x276))](_0x39fb1e['U']['min'],_0x39fb1e['U'][_0xbd312a(0x298)]),_0x196694=new Cesium$3['Cartesian2'](_0x39fb1e['V']['min'],_0x39fb1e['V'][_0xbd312a(0x298)]),_0x5026dd=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x5026dd['windTextures']['U'];},'V':function(){return _0x5026dd['windTextures']['V'];},'currentParticlesPosition':function(){const _0x3b3342=_0xbd312a;return _0x5026dd[_0x3b3342(0x2ac)]['currentParticlesPosition'];},'dimension':function(){return _0x4679f9;},'minimum':function(){return _0x53d9f2;},'maximum':function(){return _0x3cecc2;},'interval':function(){return _0x5188bc;}},'fragmentShaderSource':new Cesium$3[(_0xbd312a(0x258))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x399ace=_0xbd312a;_0x5026dd[_0x399ace(0x219)]['getWind']['commandToExecute']['outputTexture']=_0x5026dd['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x5026dd['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){return _0x5026dd['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x376ec9;},'vSpeedRange':function(){return _0x196694;},'pixelSize':function(){const _0x2d5c29=_0xbd312a;return _0x1ea0a3[_0x2d5c29(0x253)];},'speedFactor':function(){return _0x29065d['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this[_0xbd312a(0x2ac)][_0xbd312a(0x1ee)],'preExecute':function(){const _0x2c8536=_0xbd312a,_0x10a101=_0x5026dd['particlesTextures']['currentParticlesSpeed'];_0x5026dd['particlesTextures']['currentParticlesSpeed']=_0x5026dd[_0x2c8536(0x2ac)][_0x2c8536(0x238)],_0x5026dd['particlesTextures']['postProcessingSpeed']=_0x10a101,_0x5026dd['primitives']['updateSpeed']['commandToExecute'][_0x2c8536(0x2aa)]=_0x5026dd['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0xc930c7=_0xbd312a;return _0x5026dd[_0xc930c7(0x2ac)][_0xc930c7(0x202)];},'currentParticlesSpeed':function(){return _0x5026dd['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x25d6cf=_0xbd312a,_0x12618f=_0x5026dd[_0x25d6cf(0x2ac)]['currentParticlesPosition'];_0x5026dd[_0x25d6cf(0x2ac)]['currentParticlesPosition']=_0x5026dd['particlesTextures']['postProcessingPosition'],_0x5026dd['particlesTextures'][_0x25d6cf(0x26c)]=_0x12618f,_0x5026dd[_0x25d6cf(0x219)][_0x25d6cf(0x280)][_0x25d6cf(0x24c)]['outputTexture']=_0x5026dd['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0xbd312a(0x23a),'uniformMap':{'nextParticlesPosition':function(){return _0x5026dd['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x3eabae=_0xbd312a;return _0x5026dd['particlesTextures'][_0x3eabae(0x1ee)];},'lonRange':function(){return _0x1ea0a3['lonRange'];},'latRange':function(){const _0x3311e5=_0xbd312a;return _0x1ea0a3[_0x3311e5(0x2d3)];},'randomCoefficient':function(){const _0x3c4203=Math['random']();return _0x3c4203;},'dropRate':function(){return _0x29065d['dropRate'];},'dropRateBump':function(){const _0x53b776=_0xbd312a;return _0x29065d[_0x53b776(0x2bd)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures'][_0xbd312a(0x26c)],'preExecute':function(){const _0x3387c1=_0xbd312a;_0x5026dd['primitives']['postProcessingPosition'][_0x3387c1(0x24c)]['outputTexture']=_0x5026dd[_0x3387c1(0x2ac)][_0x3387c1(0x26c)];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x180a69=_0xbd312a;return _0x5026dd[_0x180a69(0x2ac)]['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x5026dd['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0xbd312a(0x238)],'preExecute':function(){const _0x577078=_0xbd312a;_0x5026dd[_0x577078(0x219)]['postProcessingSpeed']['commandToExecute']['outputTexture']=_0x5026dd['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x52b3d0,_0x6119e4,_0x45f05b,_0x1994cf){const _0x578f32=_0x13d0dd;this['context']=_0x52b3d0,_0x6119e4={..._0x6119e4},_0x6119e4['udata']&&_0x6119e4['vdata']&&(_0x6119e4['dimensions']={},_0x6119e4['dimensions']['lon']=_0x6119e4['cols'],_0x6119e4[_0x578f32(0x28c)]['lat']=_0x6119e4['rows'],_0x6119e4['dimensions'][_0x578f32(0x1ff)]=_0x6119e4['lev']||0x1,_0x6119e4[_0x578f32(0x27c)]={},_0x6119e4[_0x578f32(0x27c)][_0x578f32(0x28f)]=_0x6119e4['xmin'],_0x6119e4['lon']['max']=_0x6119e4['xmax'],_0x6119e4[_0x578f32(0x1fe)]={},_0x6119e4[_0x578f32(0x1fe)]['min']=_0x6119e4['ymin'],_0x6119e4['lat']['max']=_0x6119e4['ymax'],_0x6119e4['lev']={},_0x6119e4['lev']['min']=_0x6119e4['levmin']??0x1,_0x6119e4['lev']['max']=_0x6119e4['levmax']??0x1,_0x6119e4['U']={},_0x6119e4['U']['array']=new Float32Array(_0x6119e4[_0x578f32(0x2d8)]),_0x6119e4['U']['min']=_0x6119e4['umin']??Math['min'](..._0x6119e4['udata']),_0x6119e4['U']['max']=_0x6119e4[_0x578f32(0x206)]??Math['max'](..._0x6119e4['udata']),_0x6119e4['V']={},_0x6119e4['V'][_0x578f32(0x241)]=new Float32Array(_0x6119e4['vdata']),_0x6119e4['V']['min']=_0x6119e4['vmin']??Math[_0x578f32(0x28f)](..._0x6119e4['vdata']),_0x6119e4['V']['max']=_0x6119e4['vmax']??Math['max'](..._0x6119e4[_0x578f32(0x200)])),this['data']=_0x6119e4,this['options']=_0x45f05b,this[_0x578f32(0x2c7)]=_0x1994cf,this['particlesComputing']=new ParticlesComputing(this['context'],this[_0x578f32(0x287)],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this[_0x578f32(0x2b9)],this['viewerParameters'],this['particlesComputing']);}['canvasResize'](_0x36703f){const _0x237855=_0x13d0dd;this['particlesComputing'][_0x237855(0x2de)](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x269089=>{this['particlesComputing']['windTextures'][_0x269089]['destroy']();}),this['particlesRendering']['textures'][_0x237855(0x27f)]['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x327889=>{this['particlesRendering']['framebuffers'][_0x327889]['destroy']();}),this[_0x237855(0x27a)]=_0x36703f,this['particlesComputing']=new ParticlesComputing(this[_0x237855(0x27a)],this['data'],this['options'],this[_0x237855(0x2c7)]),this[_0x237855(0x2a2)]=new ParticlesRendering(this['context'],this[_0x237855(0x287)],this[_0x237855(0x2b9)],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x3a8823=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x24a36f=>{const _0x13c8dd=_0x48a9;_0x3a8823['framebuffer']=this['particlesRendering'][_0x13c8dd(0x2c0)][_0x24a36f],_0x3a8823['execute'](this['context']);});}['refreshParticles'](_0x34d3b1){const _0x1d53d1=_0x13d0dd;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing'][_0x1d53d1(0x250)](this['context'],this[_0x1d53d1(0x2b9)],this[_0x1d53d1(0x2c7)]);if(_0x34d3b1){var _0x517a77,_0x249d79;const _0x42b621=this[_0x1d53d1(0x2a2)]['createSegmentsGeometry'](this[_0x1d53d1(0x2b9)]);this['particlesRendering']['primitives']['segments']['geometry']=_0x42b621;const _0x146f43=Cesium$2['VertexArray']['fromGeometry']({'context':this[_0x1d53d1(0x27a)],'geometry':_0x42b621,'attributeLocations':this['particlesRendering'][_0x1d53d1(0x219)][_0x1d53d1(0x23b)]['attributeLocations'],'bufferUsage':Cesium$2[_0x1d53d1(0x244)]['STATIC_DRAW']});(_0x517a77=this[_0x1d53d1(0x2a2)][_0x1d53d1(0x219)])!==null&&_0x517a77!==void 0x0&&(_0x249d79=_0x517a77[_0x1d53d1(0x23b)])!==null&&_0x249d79!==void 0x0&&_0x249d79[_0x1d53d1(0x24c)]&&(this['particlesRendering']['primitives']['segments']['commandToExecute'][_0x1d53d1(0x2a6)]=_0x146f43);}}[_0x13d0dd(0x289)](_0x506950){const _0x213c1a=_0x13d0dd;let _0x28ade7=![];this[_0x213c1a(0x2b9)]['maxParticles']!==_0x506950['maxParticles']&&(_0x28ade7=!![]),Object['keys'](_0x506950)['forEach'](_0x2c2707=>{const _0x4db316=_0x213c1a;this[_0x4db316(0x2b9)][_0x2c2707]=_0x506950[_0x2c2707];}),this['refreshParticles'](_0x28ade7);}['applyViewerParameters'](_0x3037a3){const _0x49dd61=_0x13d0dd;Object['keys'](_0x3037a3)[_0x49dd61(0x226)](_0x1b04f5=>{const _0x4f2d38=_0x49dd61;this[_0x4f2d38(0x2c7)][_0x1b04f5]=_0x3037a3[_0x1b04f5];}),this['refreshParticles'](![]);}['destroy'](){const _0x27f65e=_0x13d0dd;clearTimeout(this[_0x27f65e(0x274)]),this[_0x27f65e(0x28d)]['destroyParticlesTextures'](),Object['keys'](this[_0x27f65e(0x28d)]['windTextures'])['forEach'](_0x59f2d3=>{this['particlesComputing']['windTextures'][_0x59f2d3]['destroy']();}),this['particlesRendering']['textures'][_0x27f65e(0x27f)][_0x27f65e(0x252)](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x55c68a=>{const _0x4a4f96=_0x27f65e;this[_0x4a4f96(0x2a2)]['framebuffers'][_0x55c68a]['destroy']();});for(const _0xc47462 in this){delete this[_0xc47462];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace[_0x13d0dd(0x21f)]['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(_0x2a01fa={}){_0x2a01fa={...DEF_OPTIONS,..._0x2a01fa},super(_0x2a01fa),this['_setOptionsHook'](_0x2a01fa);}get[_0x13d0dd(0x21f)](){return this['primitives'];}get['data'](){return this['_data'];}set['data'](_0xa90552){const _0x2d91b5=_0x13d0dd;this[_0x2d91b5(0x227)](_0xa90552);}get['colors'](){const _0x24685e=_0x13d0dd;return this['options'][_0x24685e(0x25c)];}set['colors'](_0x26aeac){const _0x5ed11a=_0x13d0dd;this[_0x5ed11a(0x2b9)][_0x5ed11a(0x25c)]=_0x26aeac,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x26aeac}),this['resize']();}[_0x13d0dd(0x211)](){}[_0x13d0dd(0x235)](){const _0x4988d4=_0x13d0dd;this[_0x4988d4(0x2d1)]=this['_map'][_0x4988d4(0x2d1)],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1[(_0x4988d4(0x281))](),this['_map'][_0x4988d4(0x2d1)]['primitives']['add'](this['primitives']),this[_0x4988d4(0x2c7)]={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1[_0x4988d4(0x251)]['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window[_0x4988d4(0x261)](_0x4988d4(0x2b4),this['resize'][_0x4988d4(0x277)](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType'][_0x4988d4(0x2bf)],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x4988d4(0x256)],this['_onMouseMoveEvent'],this),this['_data']&&this[_0x4988d4(0x227)](this['_data']);}['_removedHook'](){const _0x165a19=_0x13d0dd;window['removeEventListener']('resize',this[_0x165a19(0x2b4)]),this['_map']['off'](mars3d__namespace[_0x165a19(0x28a)]['preRender'],this[_0x165a19(0x23c)],this),this['_map'][_0x165a19(0x267)](mars3d__namespace[_0x165a19(0x28a)][_0x165a19(0x2bf)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x165a19(0x2d2)],this['_onMouseDownEvent'],this),this[_0x165a19(0x207)][_0x165a19(0x267)](mars3d__namespace[_0x165a19(0x28a)][_0x165a19(0x234)],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x165a19(0x256)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this['_map'][_0x165a19(0x2d1)][_0x165a19(0x219)]['remove'](this[_0x165a19(0x219)]);}[_0x13d0dd(0x2b4)](){const _0x18d82f=_0x13d0dd;if(!this['show']||!this['particleSystem'])return;this['primitives'][_0x18d82f(0x257)]=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType'][_0x18d82f(0x1fb)],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x19291f){const _0x10e81c=_0x13d0dd;this['particleSystem'][_0x10e81c(0x269)](this[_0x10e81c(0x2d1)][_0x10e81c(0x27a)]),this['addPrimitives'](),this['primitives'][_0x10e81c(0x257)]=!![];}['_onMapWhellEvent'](_0xc6607b){const _0x536e3d=_0x13d0dd;clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this['primitives'][_0x536e3d(0x257)]=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}[_0x13d0dd(0x2b6)](_0x3fcb25){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x25b59e){const _0x361fb3=_0x13d0dd;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&(this[_0x361fb3(0x219)]['show']=![],this['mouse_move']=!![]);}[_0x13d0dd(0x1f3)](_0x32c0b5){const _0x2eaf23=_0x13d0dd;if(!this['show']||!this[_0x2eaf23(0x231)])return;this['mouse_down']&&this[_0x2eaf23(0x1f4)]&&this[_0x2eaf23(0x23d)](),this[_0x2eaf23(0x219)][_0x2eaf23(0x257)]=!![],this[_0x2eaf23(0x21b)]=![],this[_0x2eaf23(0x1f4)]=![];}['redraw'](){const _0x5c4e37=_0x13d0dd;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem'][_0x5c4e37(0x20a)](this[_0x5c4e37(0x2c7)]),this[_0x5c4e37(0x219)]['show']=!![];}['setData'](_0x355a77){const _0x264d3f=_0x13d0dd;this['_data']=_0x355a77,this[_0x264d3f(0x231)]&&this[_0x264d3f(0x231)]['destroy'](),this['particleSystem']=new ParticleSystem(this['scene']['context'],_0x355a77,this[_0x264d3f(0x272)](),this['viewerParameters']),this[_0x264d3f(0x299)]();}['_setOptionsHook'](_0xbe6225,_0x48ab1f){if(_0xbe6225)for(const _0x36d322 in _0xbe6225){this[_0x36d322]=_0xbe6225[_0x36d322];}this['particleSystem']&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x5aa26c=_0x13d0dd,_0x50c4d9=Math[_0x5aa26c(0x2c4)](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x50c4d9*_0x50c4d9,{'particlesTextureSize':_0x50c4d9,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x5aa26c(0x20e)],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}[_0x13d0dd(0x299)](){const _0x35e931=_0x13d0dd;this[_0x35e931(0x219)][_0x35e931(0x2ab)](this[_0x35e931(0x231)][_0x35e931(0x28d)]['primitives']['getWind']),this['primitives']['add'](this[_0x35e931(0x231)]['particlesComputing']['primitives'][_0x35e931(0x1f6)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updatePosition']),this[_0x35e931(0x219)][_0x35e931(0x2ab)](this[_0x35e931(0x231)]['particlesComputing']['primitives'][_0x35e931(0x26c)]),this[_0x35e931(0x219)][_0x35e931(0x2ab)](this['particleSystem']['particlesComputing'][_0x35e931(0x219)]['postProcessingSpeed']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['segments']),this['primitives'][_0x35e931(0x2ab)](this['particleSystem'][_0x35e931(0x2a2)]['primitives']['trails']),this[_0x35e931(0x219)][_0x35e931(0x2ab)](this['particleSystem']['particlesRendering']['primitives'][_0x35e931(0x2b0)]);}['updateViewerParameters'](){const _0x9ea1a3=_0x13d0dd;let _0x26ca39=this[_0x9ea1a3(0x271)]['computeViewRectangle'](this['scene'][_0x9ea1a3(0x1fd)]['ellipsoid']);if(!_0x26ca39){const _0x3f7924=this['_map']['getExtent']();_0x26ca39=Cesium$1[_0x9ea1a3(0x28b)]['fromDegrees'](_0x3f7924['xmin'],_0x3f7924['ymin'],_0x3f7924['xmax'],_0x3f7924['ymax']);}const _0x2b4623=Util['viewRectangleToLonLatRange'](_0x26ca39);this['viewerParameters']['lonRange']['x']=_0x2b4623['lon']['min'],this['viewerParameters'][_0x9ea1a3(0x24f)]['y']=_0x2b4623['lon'][_0x9ea1a3(0x298)],this[_0x9ea1a3(0x2c7)]['latRange']['x']=_0x2b4623[_0x9ea1a3(0x1fe)]['min'],this['viewerParameters']['latRange']['y']=_0x2b4623['lat']['max'];const _0x4af06d=this['camera']['getPixelSize'](this[_0x9ea1a3(0x283)],this['scene']['drawingBufferWidth'],this[_0x9ea1a3(0x2d1)]['drawingBufferHeight']);_0x4af06d>0x0&&(this['viewerParameters']['pixelSize']=_0x4af06d);}}function _0x1f58(){const _0x59f193=['age','umax','_map','TextureMinificationFilter','_maxAge','applyViewerParameters','currentTrailsColor','worker','east','fixedHeight','fromCache','bindEvent','_mountedHook','PixelFormat','none','35QrTYgh','speed','clientHeight','pow','wind','primitives','ComputeCommand','mouse_down','toRadians','THREE_PI_OVER_TWO','stroke','layer','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','GeometryAttributes','hidden','frameRate','NEAREST','PixelDatatype','forEach','setData','clear','lng','commandType','getParticles','ymax','style','attributeLocations','6pRTsHr','shaderProgram','particleSystem','wgs84ToWindowCoordinates','fillRect','mouseUp','_addedHook','trails','drawingBufferHeight','postProcessingSpeed','lineWidth','Compute','segments','_onMap_preRenderEvent','redraw','getFullscreenQuad','_calc_speedRate','fadeOpacity','array','726LMicZQ','createRenderingFramebuffers','BufferUsage','init','SCENE3D','particlesTextureSize','currentTrails','tlng','fromDegrees','depthMask','commandToExecute','update','moveTo','lonRange','createParticlesTextures','Cartesian3','destroy','pixelSize','nextTrails','0px','mouseMove','show','ShaderSource','createSegmentsGeometry','grid','xmin','colors','maxAge','_drawLines','LINEAR','__esModule','addEventListener','primitiveType','isInExtent','xmax','DepthFunction','getUVByPoint','off','reverse','canvasResize','color','speedRate','postProcessingPosition','2409370PBiwkh','163908HYfRzp','TextureMagnificationFilter','_onMapWhellEvent','camera','getOptions','_calcUV','canrefresh','_onMouseMoveEvent','Cartesian2','bind','default','keys','context','_colorRamp','lon','floor','lighter','colorTable','updatePosition','PrimitiveCollection','randomizeParticles','globeBoundingSphere','IDENTITY','createTexture','16852FgAfll','data','beginPath','setOptions','EventType','Rectangle','dimensions','particlesComputing','Sampler','min','mode','pointer-events','DrawCommand','fragmentShaderSource','setDate','8XnKsai','lineTo','sqrt','max','addPrimitives','windField','canvasContext','particleHeight','1519574TLcShp','segmentsColor','length','canvasHeight','width','particlesRendering','refreshTimer','SceneMode','frameTime','vertexArray','canvasWind','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','currentTrailsDepth','outputTexture','add','particlesTextures','createRenderingPrimitives','windData','framebuffer','screen','rawRenderState','9DYgKGd','position','resize','SceneTransforms','_onMouseDownEvent','onmessage','absolute','options','maxParticles','CanvasWindLayer','WindLayer','dropRateBump','canvas','wheel','framebuffers','blue','abs','Draw','ceil','commandList','ellipsoid','viewerParameters','_pointerEvents','postMessage','particles','zIndex','STATIC_DRAW','_tomap','ComponentDatatype','clearCommand','TRIANGLES','scene','mouseDown','latRange','5868dFNPma','createRenderingTextures','drawingBufferWidth','createRawRenderState','udata','defined','textures','animateFrame','height','Math','destroyParticlesTextures','167863AAxYVA','getRandomLatLng','toDegrees','nextParticlesSpeed','push','uniformMap','325772NAlJGc','tlat','_onMouseUpEvent','mouse_move','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','updateSpeed','_speedRate','cols','RGBA','segmentsDepth','preRender','getUVByXY','globe','lat','lev','vdata','FLOAT','currentParticlesPosition','preExecute','createCommand'];_0x1f58=function(){return _0x59f193;};return _0x1f58();}mars3d__namespace['LayerUtil']['register'](_0x13d0dd(0x218),WindLayer),mars3d__namespace[_0x13d0dd(0x21f)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x1803b7=_0x13d0dd;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x1803b7(0x1f2)]=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0x182226 in this){delete this[_0x182226];}}}class CanvasWindField{constructor(_0x2041e3){this['setOptions'](_0x2041e3);}get['speedRate'](){const _0x2adb3b=_0x13d0dd;return this[_0x2adb3b(0x1f7)];}set['speedRate'](_0x352942){const _0x15ba14=_0x13d0dd;this['_speedRate']=(0x64-(_0x352942>0x63?0x63:_0x352942))*0x64,this['_calc_speedRate']=[(this[_0x15ba14(0x264)]-this[_0x15ba14(0x25b)])/this[_0x15ba14(0x1f7)],(this[_0x15ba14(0x22c)]-this['ymin'])/this[_0x15ba14(0x1f7)]];}get['maxAge'](){const _0x1fb3c3=_0x13d0dd;return this[_0x1fb3c3(0x209)];}set['maxAge'](_0x1bc1d5){this['_maxAge']=_0x1bc1d5;}[_0x13d0dd(0x289)](_0x552f13){const _0x45cf53=_0x13d0dd;this['options']=_0x552f13,this['maxAge']=_0x552f13[_0x45cf53(0x25d)]||0x78,this['speedRate']=_0x552f13['speedRate']||0x32,this[_0x45cf53(0x2ca)]=[];const _0x45d219=_0x552f13['particlesNumber']||0x1000;for(let _0x6533bb=0x0;_0x6533bb<_0x45d219;_0x6533bb++){const _0x38bb23=this['_randomParticle'](new CanvasParticle());this['particles'][_0x45cf53(0x1ef)](_0x38bb23);}}[_0x13d0dd(0x294)](_0x293118){const _0x4cead2=_0x13d0dd;this['rows']=_0x293118['rows'],this[_0x4cead2(0x1f8)]=_0x293118[_0x4cead2(0x1f8)],this['xmin']=_0x293118['xmin'],this[_0x4cead2(0x264)]=_0x293118[_0x4cead2(0x264)],this['ymin']=_0x293118['ymin'],this['ymax']=_0x293118[_0x4cead2(0x22c)],this[_0x4cead2(0x25a)]=[];const _0x250d1b=_0x293118['udata'],_0x1a2af4=_0x293118['vdata'];let _0x43c861=![];_0x250d1b[_0x4cead2(0x29f)]===this['rows']&&_0x250d1b[0x0]['length']===this['cols']&&(_0x43c861=!![]);let _0x2d9fa5=0x0,_0x3fb176=null,_0x3c30a7=null;for(let _0x17b2f1=0x0;_0x17b2f1<this['rows'];_0x17b2f1++){_0x3fb176=[];for(let _0x31d206=0x0;_0x31d206<this['cols'];_0x31d206++,_0x2d9fa5++){_0x43c861?_0x3c30a7=this[_0x4cead2(0x273)](_0x250d1b[_0x17b2f1][_0x31d206],_0x1a2af4[_0x17b2f1][_0x31d206]):_0x3c30a7=this['_calcUV'](_0x250d1b[_0x2d9fa5],_0x1a2af4[_0x2d9fa5]),_0x3fb176['push'](_0x3c30a7);}this[_0x4cead2(0x25a)][_0x4cead2(0x1ef)](_0x3fb176);}this[_0x4cead2(0x2b9)]['reverseY']&&this['grid'][_0x4cead2(0x268)]();}['clear'](){const _0x3d1d3d=_0x13d0dd;delete this['rows'],delete this['cols'],delete this[_0x3d1d3d(0x25b)],delete this[_0x3d1d3d(0x264)],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x7f4c29,_0x24d8e8){const _0x3e3ddf=_0x13d0dd,_0xff2623=(_0x7f4c29-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x47f463=(this[_0x3e3ddf(0x22c)]-_0x24d8e8)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0xff2623,_0x47f463];}['getUVByXY'](_0x1e36a1,_0x2898e7){const _0x43b92b=_0x13d0dd;if(_0x1e36a1<0x0||_0x1e36a1>=this['cols']||_0x2898e7>=this['rows'])return[0x0,0x0,0x0];const _0x18be2f=Math['floor'](_0x1e36a1),_0x255c76=Math[_0x43b92b(0x27d)](_0x2898e7);if(_0x18be2f===_0x1e36a1&&_0x255c76===_0x2898e7)return this['grid'][_0x2898e7][_0x1e36a1];const _0x3fc93c=_0x18be2f+0x1,_0x236052=_0x255c76+0x1,_0x437f79=this['getUVByXY'](_0x18be2f,_0x255c76),_0x29aa11=this['getUVByXY'](_0x3fc93c,_0x255c76),_0x5428d0=this[_0x43b92b(0x1fc)](_0x18be2f,_0x236052),_0x21df99=this['getUVByXY'](_0x3fc93c,_0x236052);let _0xb0d8=null;try{_0xb0d8=this['_bilinearInterpolation'](_0x1e36a1-_0x18be2f,_0x2898e7-_0x255c76,_0x437f79,_0x29aa11,_0x5428d0,_0x21df99);}catch(_0xb489e7){console['log'](_0x1e36a1,_0x2898e7);}return _0xb0d8;}['_bilinearInterpolation'](_0x595705,_0x1f819e,_0x4dc772,_0x1b8a86,_0x5e33d7,_0x41e067){const _0x252258=_0x13d0dd,_0x14b8c0=0x1-_0x595705,_0x46ce51=0x1-_0x1f819e,_0x58229c=_0x14b8c0*_0x46ce51,_0x241f6c=_0x595705*_0x46ce51,_0x3292b1=_0x14b8c0*_0x1f819e,_0x2ccc2e=_0x595705*_0x1f819e,_0x3aa1a3=_0x4dc772[0x0]*_0x58229c+_0x1b8a86[0x0]*_0x241f6c+_0x5e33d7[0x0]*_0x3292b1+_0x41e067[0x0]*_0x2ccc2e,_0x51b785=_0x4dc772[0x1]*_0x58229c+_0x1b8a86[0x1]*_0x241f6c+_0x5e33d7[0x1]*_0x3292b1+_0x41e067[0x1]*_0x2ccc2e;return this[_0x252258(0x273)](_0x3aa1a3,_0x51b785);}['_calcUV'](_0x2aad0f,_0x5d94b2){const _0x50f64c=_0x13d0dd;return[+_0x2aad0f,+_0x5d94b2,Math[_0x50f64c(0x297)](_0x2aad0f*_0x2aad0f+_0x5d94b2*_0x5d94b2)];}['getUVByPoint'](_0x55b5a7,_0x261507){const _0x2ec95e=_0x13d0dd;if(!this[_0x2ec95e(0x263)](_0x55b5a7,_0x261507))return null;const _0x49caef=this['toGridXY'](_0x55b5a7,_0x261507),_0xc6f8df=this['getUVByXY'](_0x49caef[0x0],_0x49caef[0x1]);return _0xc6f8df;}['isInExtent'](_0xeaef80,_0x4d2f1f){return _0xeaef80>=this['xmin']&&_0xeaef80<=this['xmax']&&_0x4d2f1f>=this['ymin']&&_0x4d2f1f<=this['ymax']?!![]:![];}[_0x13d0dd(0x1ec)](){const _0x2b7e16=fRandomByfloat(this['xmin'],this['xmax']),_0x53b33a=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x53b33a,'lng':_0x2b7e16};}[_0x13d0dd(0x22b)](){const _0x302b8a=_0x13d0dd;let _0x10b567,_0x7035c2,_0x133456;for(let _0x1490d0=0x0,_0x54b862=this['particles']['length'];_0x1490d0<_0x54b862;_0x1490d0++){let _0x407a44=this['particles'][_0x1490d0];_0x407a44[_0x302b8a(0x205)]<=0x0&&(_0x407a44=this['_randomParticle'](_0x407a44));if(_0x407a44['age']>0x0){const _0x25934c=_0x407a44[_0x302b8a(0x249)],_0x1fb82e=_0x407a44[_0x302b8a(0x1f2)];_0x133456=this[_0x302b8a(0x266)](_0x25934c,_0x1fb82e),_0x133456?(_0x10b567=_0x25934c+this['_calc_speedRate'][0x0]*_0x133456[0x0],_0x7035c2=_0x1fb82e+this[_0x302b8a(0x23f)][0x1]*_0x133456[0x1],_0x407a44['lng']=_0x25934c,_0x407a44['lat']=_0x1fb82e,_0x407a44[_0x302b8a(0x249)]=_0x10b567,_0x407a44['tlat']=_0x7035c2,_0x407a44[_0x302b8a(0x215)]=_0x133456[0x2],_0x407a44[_0x302b8a(0x205)]--):_0x407a44['age']=0x0;}}return this['particles'];}['_randomParticle'](_0xc6dc3e){const _0x25290d=_0x13d0dd;let _0x48cb85,_0x40b305;for(let _0x56c609=0x0;_0x56c609<0x1e;_0x56c609++){_0x48cb85=this[_0x25290d(0x1ec)](),_0x40b305=this['getUVByPoint'](_0x48cb85['lng'],_0x48cb85['lat']);if(_0x40b305&&_0x40b305[0x2]>0x0)break;}if(!_0x40b305)return _0xc6dc3e;const _0x433fad=_0x48cb85[_0x25290d(0x229)]+this['_calc_speedRate'][0x0]*_0x40b305[0x0],_0x214f50=_0x48cb85['lat']+this['_calc_speedRate'][0x1]*_0x40b305[0x1];return _0xc6dc3e[_0x25290d(0x229)]=_0x48cb85['lng'],_0xc6dc3e['lat']=_0x48cb85['lat'],_0xc6dc3e['tlng']=_0x433fad,_0xc6dc3e[_0x25290d(0x1f2)]=_0x214f50,_0xc6dc3e[_0x25290d(0x205)]=Math['round'](Math['random']()*this['maxAge']),_0xc6dc3e['speed']=_0x40b305[0x2],_0xc6dc3e;}[_0x13d0dd(0x252)](){for(const _0x3559a1 in this){delete this[_0x3559a1];}}}function fRandomByfloat(_0x48444a,_0x4464f0){return _0x48444a+Math['random']()*(_0x4464f0-_0x48444a);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0xdc330e={}){const _0x8d9b5e=_0x13d0dd;super(_0xdc330e),this['_setOptionsHook'](_0xdc330e),this['canvas']=null,_0xdc330e['colors']&&_0xdc330e['steps']&&(this[_0x8d9b5e(0x27b)]=new mars3d__namespace['ColorRamp'](_0xdc330e));}['_setOptionsHook'](_0x14947b,_0x5934d6){const _0xf21b35=_0x13d0dd;this['frameTime']=0x3e8/(_0x14947b[_0xf21b35(0x223)]||0xa),this[_0xf21b35(0x2c8)]=this[_0xf21b35(0x2b9)]['pointerEvents']??![],this['color']=_0x14947b[_0xf21b35(0x26a)]||'#ffffff',this['lineWidth']=_0x14947b['lineWidth']||0x1,this['fixedHeight']=_0x14947b['fixedHeight']??0x0,this['reverseY']=_0x14947b['reverseY']??![],this['windField']&&this[_0xf21b35(0x29a)]['setOptions'](_0x14947b);}get[_0x13d0dd(0x21f)](){return this['canvas'];}get['canvasWidth'](){const _0x35e6d0=_0x13d0dd;return this['_map'][_0x35e6d0(0x2d1)][_0x35e6d0(0x2be)]['clientWidth'];}get[_0x13d0dd(0x2a0)](){const _0x3f9c4d=_0x13d0dd;return this['_map']['scene'][_0x3f9c4d(0x2be)]['clientHeight'];}get['pointerEvents'](){const _0x78c083=_0x13d0dd;return this[_0x78c083(0x2c8)];}set['pointerEvents'](_0x12d9af){const _0x21c8ea=_0x13d0dd;this['_pointerEvents']=_0x12d9af;if(!this[_0x21c8ea(0x2be)])return;_0x12d9af?this['canvas'][_0x21c8ea(0x22d)]['pointer-events']='all':this['canvas']['style'][_0x21c8ea(0x291)]='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x2b3af7){this['options']['particlesNumber']=_0x2b3af7,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x5adbc0=_0x13d0dd;return this[_0x5adbc0(0x2b9)]['speedRate'];}set['speedRate'](_0x5d3e55){const _0xc687a0=_0x13d0dd;this['options']['speedRate']=_0x5d3e55,this[_0xc687a0(0x29a)]&&(this['windField'][_0xc687a0(0x26b)]=_0x5d3e55);}get[_0x13d0dd(0x25d)](){return this['options']['maxAge'];}set['maxAge'](_0x1684d7){this['options']['maxAge']=_0x1684d7,this['windField']&&(this['windField']['maxAge']=_0x1684d7);}get['data'](){return this['windData'];}set['data'](_0x56106f){this['setData'](_0x56106f);}['_showHook'](_0x587551){const _0x481e61=_0x13d0dd;_0x587551?this['_addedHook']():(this['windData']&&(this[_0x481e61(0x2b9)]['data']=this['windData']),this['_removedHook']());}[_0x13d0dd(0x211)](){const _0x1aa772=_0x13d0dd;this[_0x1aa772(0x2b9)]['worker']?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}[_0x13d0dd(0x235)](){const _0x15257d=_0x13d0dd;this['canvas']=this['_createCanvas'](),this['canvasContext']=this[_0x15257d(0x2be)]['getContext']('2d',{'willReadFrequently':!![]}),this[_0x15257d(0x210)](),this['options']['data']&&this['setData'](this[_0x15257d(0x2b9)][_0x15257d(0x287)]);}['_removedHook'](){const _0x15069c=_0x13d0dd;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this[_0x15069c(0x2be)]),delete this[_0x15069c(0x2be)]);}['_createCanvas'](){const _0x45ba11=_0x13d0dd,_0x11220e=mars3d__namespace['DomUtil']['create'](_0x45ba11(0x2be),'mars3d-canvasWind',this[_0x45ba11(0x207)]['container']);return _0x11220e['style'][_0x45ba11(0x2b3)]=_0x45ba11(0x2b8),_0x11220e['style']['top']=_0x45ba11(0x255),_0x11220e['style']['left']=_0x45ba11(0x255),_0x11220e[_0x45ba11(0x22d)][_0x45ba11(0x2a1)]=this[_0x45ba11(0x207)][_0x45ba11(0x2d1)][_0x45ba11(0x2be)]['clientWidth']+'px',_0x11220e['style'][_0x45ba11(0x2dc)]=this[_0x45ba11(0x207)][_0x45ba11(0x2d1)][_0x45ba11(0x2be)]['clientHeight']+'px',_0x11220e['style']['pointerEvents']=this[_0x45ba11(0x2c8)]?'auto':_0x45ba11(0x213),_0x11220e[_0x45ba11(0x22d)]['zIndex']=this['options'][_0x45ba11(0x2cb)]??0x9,_0x11220e[_0x45ba11(0x2a1)]=this['_map']['scene']['canvas']['clientWidth'],_0x11220e[_0x45ba11(0x2dc)]=this['_map']['scene'][_0x45ba11(0x2be)][_0x45ba11(0x216)],_0x11220e;}['resize'](){const _0x29ec76=_0x13d0dd;this['canvas']&&(this[_0x29ec76(0x2be)]['style'][_0x29ec76(0x2a1)]=this['_map']['scene'][_0x29ec76(0x2be)]['clientWidth']+'px',this['canvas'][_0x29ec76(0x22d)][_0x29ec76(0x2dc)]=this['_map']['scene']['canvas']['clientHeight']+'px',this[_0x29ec76(0x2be)]['width']=this['_map'][_0x29ec76(0x2d1)][_0x29ec76(0x2be)]['clientWidth'],this['canvas']['height']=this['_map']['scene'][_0x29ec76(0x2be)]['clientHeight']);}['bindEvent'](){const _0x5edc50=_0x13d0dd,_0x112ac9=this;let _0x1ca579=Date['now']();(function _0x11a3a7(){const _0xd577b4=_0x48a9;_0x112ac9[_0xd577b4(0x2db)]=window['requestAnimationFrame'](_0x11a3a7);if(_0x112ac9['show']&&_0x112ac9['windField']){const _0x28453a=Date['now'](),_0x374434=_0x28453a-_0x1ca579;_0x374434>_0x112ac9['frameTime']&&(_0x1ca579=_0x28453a-_0x374434%_0x112ac9[_0xd577b4(0x2a5)],_0x112ac9[_0xd577b4(0x24d)]());}}(),window[_0x5edc50(0x261)](_0x5edc50(0x2b4),this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this[_0x5edc50(0x2b9)]['mouseHidden']&&(this['_map']['on'](mars3d__namespace[_0x5edc50(0x28a)]['wheel'],this['_onMapWhellEvent'],this),this[_0x5edc50(0x207)]['on'](mars3d__namespace[_0x5edc50(0x28a)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x5edc50(0x28a)][_0x5edc50(0x234)],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x2772ec=_0x13d0dd;window['cancelAnimationFrame'](this[_0x2772ec(0x2db)]),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace[_0x2772ec(0x28a)]['wheel'],this[_0x2772ec(0x270)],this),this['_map']['off'](mars3d__namespace[_0x2772ec(0x28a)][_0x2772ec(0x2d2)],this[_0x2772ec(0x2b6)],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x3bceda){const _0x4ba575=_0x13d0dd;clearTimeout(this[_0x4ba575(0x2a3)]);if(!this['show']||!this['canvas'])return;this['canvas']['style']['visibility']=_0x4ba575(0x222),this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']='visible';},0xc8);}[_0x13d0dd(0x2b6)](_0x30d485){const _0x527fc7=_0x13d0dd;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x527fc7(0x275)],this);}['_onMouseMoveEvent'](_0x59f5a0){const _0x25b3d3=_0x13d0dd;if(!this[_0x25b3d3(0x257)]||!this['canvas'])return;this['mouse_down']&&(this[_0x25b3d3(0x2be)][_0x25b3d3(0x22d)]['visibility']='hidden',this['mouse_move']=!![]);}[_0x13d0dd(0x1f3)](_0x254d3a){const _0x4f5251=_0x13d0dd;if(!this['show']||!this['canvas'])return;this[_0x4f5251(0x207)][_0x4f5251(0x267)](mars3d__namespace[_0x4f5251(0x28a)]['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this[_0x4f5251(0x1f4)]&&this['redraw'](),this['canvas']['style']['visibility']='visible',this[_0x4f5251(0x21b)]=![],this['mouse_move']=![];}['setData'](_0x2f4ce6){const _0x3ed1d7=_0x13d0dd;this[_0x3ed1d7(0x228)](),this[_0x3ed1d7(0x2ae)]=_0x2f4ce6,this['windField'][_0x3ed1d7(0x294)](_0x2f4ce6),this['redraw']();}['redraw'](){const _0x3b479c=_0x13d0dd;if(!this['show'])return;this[_0x3b479c(0x29a)]['setOptions'](this['options']),this[_0x3b479c(0x24d)]();}['update'](){const _0x185e05=_0x13d0dd;if(this['_updateIng'])return;this['_updateIng']=!![];if(this[_0x185e05(0x20c)])this['windField']['update']();else{const _0x1565e0=this['windField']['getParticles']();this['_drawLines'](_0x1565e0);}this['_updateIng']=![];}[_0x13d0dd(0x25e)](_0x3e5496){const _0x1099f7=_0x13d0dd;this[_0x1099f7(0x29b)]['globalCompositeOperation']='destination-in',this[_0x1099f7(0x29b)][_0x1099f7(0x233)](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']=_0x1099f7(0x27e),this['canvasContext']['globalAlpha']=0.9;const _0x5f34c9=this[_0x1099f7(0x207)][_0x1099f7(0x2d1)]['mode']!==Cesium['SceneMode']['SCENE3D'],_0x109703=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x2aa470=0x0,_0x2e2d95=_0x3e5496['length'];_0x2aa470<_0x2e2d95;_0x2aa470++){const _0x5ca3d6=_0x3e5496[_0x2aa470],_0x55d0fc=this['_tomap'](_0x5ca3d6['lng'],_0x5ca3d6['lat'],_0x5ca3d6),_0x4b3f4f=this['_tomap'](_0x5ca3d6[_0x1099f7(0x249)],_0x5ca3d6[_0x1099f7(0x1f2)],_0x5ca3d6);if(!_0x55d0fc||!_0x4b3f4f)continue;if(_0x5f34c9&&Math['abs'](_0x55d0fc[0x0]-_0x4b3f4f[0x0])>=_0x109703)continue;this[_0x1099f7(0x29b)]['beginPath'](),this['canvasContext'][_0x1099f7(0x239)]=this['lineWidth'],this['canvasContext']['strokeStyle']=this['_colorRamp']['getColor'](_0x5ca3d6['speed']),this['canvasContext'][_0x1099f7(0x24e)](_0x55d0fc[0x0],_0x55d0fc[0x1]),this['canvasContext']['lineTo'](_0x4b3f4f[0x0],_0x4b3f4f[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext'][_0x1099f7(0x288)](),this[_0x1099f7(0x29b)]['lineWidth']=this['lineWidth'],this[_0x1099f7(0x29b)]['strokeStyle']=this['color'];for(let _0x45451b=0x0,_0x31acd4=_0x3e5496['length'];_0x45451b<_0x31acd4;_0x45451b++){const _0x2eee33=_0x3e5496[_0x45451b],_0x1f483b=this[_0x1099f7(0x2cd)](_0x2eee33['lng'],_0x2eee33[_0x1099f7(0x1fe)],_0x2eee33),_0x2b3dd1=this['_tomap'](_0x2eee33[_0x1099f7(0x249)],_0x2eee33[_0x1099f7(0x1f2)],_0x2eee33);if(!_0x1f483b||!_0x2b3dd1)continue;if(_0x5f34c9&&Math[_0x1099f7(0x2c2)](_0x1f483b[0x0]-_0x2b3dd1[0x0])>=_0x109703)continue;this['canvasContext']['moveTo'](_0x1f483b[0x0],_0x1f483b[0x1]),this['canvasContext'][_0x1099f7(0x296)](_0x2b3dd1[0x0],_0x2b3dd1[0x1]);}this['canvasContext'][_0x1099f7(0x21e)]();}}['_tomap'](_0xa80c83,_0x19568f,_0x5364bc){const _0x3d089d=_0x13d0dd,_0x4b953b=Cesium['Cartesian3'][_0x3d089d(0x24a)](_0xa80c83,_0x19568f,this['fixedHeight']),_0x3bd834=this['_map'][_0x3d089d(0x2d1)];if(_0x3bd834['mode']===Cesium[_0x3d089d(0x2a4)][_0x3d089d(0x246)]){const _0x479b07=new Cesium['EllipsoidalOccluder'](_0x3bd834['globe'][_0x3d089d(0x2c6)],_0x3bd834[_0x3d089d(0x271)]['positionWC']),_0x198ce3=_0x479b07['isPointVisible'](_0x4b953b);if(!_0x198ce3)return _0x5364bc['age']=0x0,null;}const _0x9ea2cc=Cesium[_0x3d089d(0x2b5)][_0x3d089d(0x232)](this['_map']['scene'],_0x4b953b);return _0x9ea2cc?[_0x9ea2cc['x'],_0x9ea2cc['y']]:null;}[_0x13d0dd(0x228)](){this['windField']['clear'](),delete this['windData'];}['initWorker'](){const _0x30d1d5=_0x13d0dd;this[_0x30d1d5(0x20c)]=new Worker(this['options'][_0x30d1d5(0x20c)]),this['worker'][_0x30d1d5(0x2b7)]=_0x3e6b7d=>{this['_drawLines'](_0x3e6b7d['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x48df68=>{const _0x2b58ad=_0x30d1d5;this[_0x2b58ad(0x20c)][_0x2b58ad(0x2c9)]({'type':_0x2b58ad(0x245),'options':_0x48df68});},'setOptions':_0x1a633e=>{const _0xa192d0=_0x30d1d5;this['worker'][_0xa192d0(0x2c9)]({'type':'setOptions','options':_0x1a633e});},'setDate':_0x278046=>{const _0xa56a8f=_0x30d1d5;this[_0xa56a8f(0x20c)][_0xa56a8f(0x2c9)]({'type':_0xa56a8f(0x294),'data':_0x278046});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0x56394f=_0x30d1d5;this['worker']['postMessage']({'type':_0x56394f(0x228)});}},this[_0x30d1d5(0x29a)]['init'](this['options']);}}mars3d__namespace['LayerUtil']['register'](_0x13d0dd(0x2a7),CanvasWindLayer),mars3d__namespace['layer'][_0x13d0dd(0x2bb)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports[_0x13d0dd(0x2bb)]=CanvasWindLayer,exports[_0x13d0dd(0x2bc)]=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x5c5c3c=_0x2757;(function(_0x5c2efe,_0xd42187){const _0xc82c31=_0x2757,_0x388f70=_0x5c2efe();while(!![]){try{const _0x400efc=parseInt(_0xc82c31(0x213))/0x1+parseInt(_0xc82c31(0x237))/0x2*(parseInt(_0xc82c31(0x1a2))/0x3)+-parseInt(_0xc82c31(0x1ff))/0x4*(parseInt(_0xc82c31(0x225))/0x5)+-parseInt(_0xc82c31(0x208))/0x6*(parseInt(_0xc82c31(0x1cb))/0x7)+parseInt(_0xc82c31(0x1ed))/0x8+parseInt(_0xc82c31(0x1d9))/0x9*(-parseInt(_0xc82c31(0x1b6))/0xa)+parseInt(_0xc82c31(0x185))/0xb;if(_0x400efc===_0xd42187)break;else _0x388f70['push'](_0x388f70['shift']());}catch(_0xa69907){_0x388f70['push'](_0x388f70['shift']());}}}(_0x41ec,0xdc945));function _interopNamespace(_0x603be8){const _0x3b2015=_0x2757;if(_0x603be8&&_0x603be8['__esModule'])return _0x603be8;var _0x1c0bbb=Object['create'](null);return _0x603be8&&Object['keys'](_0x603be8)[_0x3b2015(0x204)](function(_0x45ff9e){const _0xe461e2=_0x3b2015;if(_0x45ff9e!=='default'){var _0x3a7091=Object['getOwnPropertyDescriptor'](_0x603be8,_0x45ff9e);Object[_0xe461e2(0x22f)](_0x1c0bbb,_0x45ff9e,_0x3a7091['get']?_0x3a7091:{'enumerable':!![],'get':function(){return _0x603be8[_0x45ff9e];}});}}),_0x1c0bbb['default']=_0x603be8,_0x1c0bbb;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace[_0x5c5c3c(0x21f)];function getU(_0x231166,_0x2baeaf){const _0x236fa7=_0x5c5c3c,_0x270dd3=_0x231166*Math[_0x236fa7(0x1e9)](Cesium$7[_0x236fa7(0x1cc)]['toRadians'](_0x2baeaf));return _0x270dd3;}function getV(_0x4365af,_0x3d6205){const _0x1cc000=_0x5c5c3c,_0x4d440d=_0x4365af*Math['sin'](Cesium$7[_0x1cc000(0x1cc)]['toRadians'](_0x3d6205));return _0x4d440d;}function getSpeed(_0x2944d3,_0x5d4c02){const _0x20669f=_0x5c5c3c,_0x3fea3d=Math[_0x20669f(0x1c1)](Math[_0x20669f(0x1fe)](_0x2944d3,0x2)+Math[_0x20669f(0x1fe)](_0x5d4c02,0x2));return _0x3fea3d;}function getDirection(_0x9d5aa9,_0x34c3af){const _0x24c955=_0x5c5c3c;let _0x43359b=Cesium$7[_0x24c955(0x1cc)][_0x24c955(0x236)](Math[_0x24c955(0x1d8)](_0x34c3af,_0x9d5aa9));return _0x43359b+=_0x43359b<0x0?0x168:0x0,_0x43359b;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x3b1e8f){const _0x9bc3b7=_0x5c5c3c;this[_0x9bc3b7(0x18a)]=_0x3b1e8f['commandType'],this['geometry']=_0x3b1e8f['geometry'],this['attributeLocations']=_0x3b1e8f['attributeLocations'],this[_0x9bc3b7(0x1f1)]=_0x3b1e8f['primitiveType'],this['uniformMap']=_0x3b1e8f[_0x9bc3b7(0x23f)],this['vertexShaderSource']=_0x3b1e8f['vertexShaderSource'],this['fragmentShaderSource']=_0x3b1e8f['fragmentShaderSource'],this['rawRenderState']=_0x3b1e8f['rawRenderState'],this['framebuffer']=_0x3b1e8f[_0x9bc3b7(0x1a9)],this['outputTexture']=_0x3b1e8f['outputTexture'],this['autoClear']=_0x3b1e8f['autoClear']??![],this[_0x9bc3b7(0x1b4)]=_0x3b1e8f[_0x9bc3b7(0x1b4)],this[_0x9bc3b7(0x270)]=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x498ff5){const _0x292f7b=_0x5c5c3c;switch(this[_0x292f7b(0x18a)]){case _0x292f7b(0x25e):{const _0x347871=Cesium$6['VertexArray']['fromGeometry']({'context':_0x498ff5,'geometry':this['geometry'],'attributeLocations':this[_0x292f7b(0x1cf)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x18c0a2=Cesium$6['ShaderProgram']['fromCache']({'context':_0x498ff5,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this[_0x292f7b(0x187)]}),_0x260ae2=Cesium$6['RenderState'][_0x292f7b(0x273)](this[_0x292f7b(0x1d2)]);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x18c0a2,'vertexArray':_0x347871,'modelMatrix':Cesium$6[_0x292f7b(0x210)][_0x292f7b(0x1b2)],'renderState':_0x260ae2,'uniformMap':this[_0x292f7b(0x23f)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x292f7b(0x1c5):{return new Cesium$6[(_0x292f7b(0x1ce))]({'owner':this,'fragmentShaderSource':this[_0x292f7b(0x187)],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}[_0x5c5c3c(0x23e)](_0xd2377a,_0x24d072){const _0x16e5de=_0x5c5c3c;this['geometry']=_0x24d072;const _0x5bb922=Cesium$6['VertexArray']['fromGeometry']({'context':_0xd2377a,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this[_0x16e5de(0x1c3)]['vertexArray']=_0x5bb922;}['update'](_0xdbeb65){const _0x52c94e=_0x5c5c3c;if(!this['show'])return;if(_0xdbeb65['mode']!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6[_0x52c94e(0x200)](this['commandToExecute'])&&(this['commandToExecute']=this[_0x52c94e(0x1e4)](_0xdbeb65['context'])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0xdbeb65['commandList']['push'](this[_0x52c94e(0x224)]),_0xdbeb65['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}[_0x5c5c3c(0x230)](){const _0x319796=_0x5c5c3c;if(this['clearCommand']){var _0x1c0780,_0xe360c4;(_0x1c0780=this[_0x319796(0x224)])!==null&&_0x1c0780!==void 0x0&&_0x1c0780['vertexArray']&&this['clearCommand']['vertexArray']['destroy'](),(_0xe360c4=this['clearCommand'])!==null&&_0xe360c4!==void 0x0&&_0xe360c4[_0x319796(0x219)]&&this[_0x319796(0x224)][_0x319796(0x219)]['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this[_0x319796(0x1c3)]['vertexArray']&&this[_0x319796(0x1c3)]['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0x319796(0x230)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x455706=function(){const _0x72aff4=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x72aff4;},_0x152dbb=function(_0x29e285,_0x58975a){const _0x1c61ad=_0x2757;if(Cesium$5[_0x1c61ad(0x200)](_0x58975a)){const _0x15886f={};_0x15886f['arrayBufferView']=_0x58975a,_0x29e285['source']=_0x15886f;}const _0x32e77f=new Cesium$5['Texture'](_0x29e285);return _0x32e77f;},_0x513d77=function(_0x130142,_0x623eec,_0x3504e3){const _0xb666bc=new Cesium$5['Framebuffer']({'context':_0x130142,'colorTextures':[_0x623eec],'depthTexture':_0x3504e3});return _0xb666bc;},_0x31fb6a=function(_0x48a660){const _0x3abfe5=_0x2757,_0x23af38=!![],_0x1ec935=![],_0x572e8b={'viewport':_0x48a660['viewport'],'depthTest':_0x48a660['depthTest'],'depthMask':_0x48a660[_0x3abfe5(0x1b0)],'blending':_0x48a660['blending']},_0x3c81c7=Cesium$5['Appearance']['getDefaultRenderState'](_0x23af38,_0x1ec935,_0x572e8b);return _0x3c81c7;},_0x27f552=function(_0x1afd8d){const _0x45fae3=_0x2757,_0xfec4fd={},_0x15b82f=Cesium$5['Math']['mod'](_0x1afd8d['west'],Cesium$5['Math']['TWO_PI']),_0x337402=Cesium$5[_0x45fae3(0x1cc)][_0x45fae3(0x263)](_0x1afd8d['east'],Cesium$5[_0x45fae3(0x1cc)]['TWO_PI']),_0x5afe45=_0x1afd8d['width'];let _0x5b75d4,_0x416f6c;_0x5afe45>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x5b75d4=0x0,_0x416f6c=Cesium$5[_0x45fae3(0x1cc)][_0x45fae3(0x242)]):_0x337402-_0x15b82f<_0x5afe45?(_0x5b75d4=_0x15b82f,_0x416f6c=_0x15b82f+_0x5afe45):(_0x5b75d4=_0x15b82f,_0x416f6c=_0x337402);_0xfec4fd['lon']={'min':Cesium$5[_0x45fae3(0x1cc)]['toDegrees'](_0x5b75d4),'max':Cesium$5['Math']['toDegrees'](_0x416f6c)};const _0x153834=_0x1afd8d['south'],_0x17f375=_0x1afd8d[_0x45fae3(0x232)],_0x1fabe1=_0x1afd8d[_0x45fae3(0x20a)],_0x5a8e12=_0x1fabe1>Cesium$5['Math']['PI']/0xc?_0x1fabe1/0x2:0x0;let _0x29aa9d=Cesium$5[_0x45fae3(0x1cc)]['clampToLatitudeRange'](_0x153834-_0x5a8e12),_0x2bd93f=Cesium$5['Math'][_0x45fae3(0x250)](_0x17f375+_0x5a8e12);return _0x29aa9d<-Cesium$5['Math'][_0x45fae3(0x1a0)]&&(_0x29aa9d=-Cesium$5['Math']['PI_OVER_TWO']),_0x2bd93f>Cesium$5['Math']['PI_OVER_THREE']&&(_0x2bd93f=Cesium$5[_0x45fae3(0x1cc)]['PI_OVER_TWO']),_0xfec4fd[_0x45fae3(0x223)]={'min':Cesium$5['Math']['toDegrees'](_0x29aa9d),'max':Cesium$5['Math']['toDegrees'](_0x2bd93f)},_0xfec4fd;};return{'getFullscreenQuad':_0x455706,'createTexture':_0x152dbb,'createFramebuffer':_0x513d77,'createRawRenderState':_0x31fb6a,'viewRectangleToLonLatRange':_0x27f552};}());var segmentDraw_vert=_0x5c5c3c(0x24c),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=_0x5c5c3c(0x266);const Cesium$4=mars3d__namespace['Cesium'];function _0x41ec(){const _0x1461c8=['ymax','FLOAT','_calcUV','removeAll','depthMask','viewerParameters','IDENTITY','particlesRendering','preExecute','update','26450YBuTEn','updateSpeed','currentParticlesSpeed','_updateIng','canvas','grid','levmax','windData','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','outputTexture','mouseUp','sqrt','wgs84ToWindowCoordinates','commandToExecute','ShaderSource','Compute','vmax','_onMouseUpEvent','min','wheel','canvasWidth','12456577DLgaUG','Math','ClearCommand','ComputeCommand','attributeLocations','particleSystem','tlng','rawRenderState','getParticles','xmax','none','depthTexture','nextParticlesSpeed','atan2','5499lvDzeU','Rectangle','randomBetween','Cartesian2','_onMouseDownEvent','redraw','EventType','_createCanvas','particlesComputing','screen','TextureMinificationFilter','createCommand','windTextures','framebuffers','add','camera','cos','mouseDown','windField','_showHook','2382720EOcbBk','getFullscreenQuad','_map','_addedHook','primitiveType','trails','PixelDatatype','_mountedHook','udata','lon','createWindTextures','OPAQUE','isInExtent','ymin','nextTrailsColor','pixelSize','particlesNumber','pow','4868wKErxR','defined','currentParticlesPosition','clear','_updateIng2','forEach','currentTrailsDepth','scene','canvasHeight','6iUakDg','WindUtil','height','latRange','globeBoundingSphere','options','segments','TRIANGLES','Matrix4','age','colors','1646046gfezFA','xmin','BaseLayer','fromCssColorString','colorTable','createRawRenderState','shaderProgram','keys','once','createSegmentsGeometry','currentTrails','getUVByPoint','Cesium','_data','particlesTextureSize','NEAREST','lat','clearCommand','7125ijoPqO','Color','ALWAYS','createTexture','postProcessingPosition','PrimitiveType','data','isPointVisible','fadeOpacity','DISABLE_GL_POSITION_LOG_DEPTH','defineProperty','destroy','canrefresh','north','_drawLines','globalCompositeOperation','segmentsColor','toDegrees','828CaDaUp','preRender','bind','primitives','particlesTextures','_setOptionsHook','_colorRamp','setGeometry','uniformMap','unbindEvent','style','TWO_PI','steps','max','BufferUsage','umax','currentTrailsColor','dropRateBump','mouseHidden','animateFrame','setData','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','strokeStyle','CanvasWindLayer','zIndex','clampToLatitudeRange','mouse_move','resize','layer','_speedRate','removeEventListener','_onMouseMoveEvent','lev','drawingBufferWidth','frameTime','_onMapWhellEvent','maxParticles','container','mouseMove','Draw','pointer-events','speed','_bilinearInterpolation','context','mod','dimensions','particlesWind','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','stroke','applyViewerParameters','getUVByXY','lonRange','STATIC_DRAW','onmessage','push','RGB','width','show','rows','bindEvent','fromCache','createRenderingPrimitives','WindLayer','RGBA','vdata','speedFactor','globe','25510914bQGdFY','clientHeight','fragmentShaderSource','execute','TextureMagnificationFilter','commandType','postProcessingSpeed','cols','left','now','mouse_down','fromDegrees','//\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','pointerEvents','off','lng','nextTrails','_tomap','tlat','setOptions','canvasContext','Sampler','fixedHeight','postMessage','random','drawingBufferHeight','particles','PI_OVER_THREE','umin','12828hSzTHT','worker','length','textures','create','init','color','framebuffer','segmentsDepth','getRandomLatLng'];_0x41ec=function(){return _0x1461c8;};return _0x41ec();}class ParticlesRendering{constructor(_0x4c8f45,_0x45a358,_0x447a13,_0x2e1283,_0x4233c4){const _0x5b6d77=_0x5c5c3c;this['createRenderingTextures'](_0x4c8f45,_0x45a358,_0x447a13['colors']),this['createRenderingFramebuffers'](_0x4c8f45),this[_0x5b6d77(0x17f)](_0x4c8f45,_0x447a13,_0x2e1283,_0x4233c4);}['createRenderingTextures'](_0x275857,_0x4b679a,_0x35808f){const _0x586216=_0x5c5c3c,_0x19bf4d={'context':_0x275857,'width':_0x275857['drawingBufferWidth'],'height':_0x275857[_0x586216(0x19e)],'pixelFormat':Cesium$4['PixelFormat'][_0x586216(0x181)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x113d69={'context':_0x275857,'width':_0x275857[_0x586216(0x258)],'height':_0x275857['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x1d7ca6=_0x35808f['length'],_0x28a2b4=new Float32Array(_0x1d7ca6*0x3);for(let _0x58b92b=0x0;_0x58b92b<_0x1d7ca6;_0x58b92b++){const _0x558273=Cesium$4['Color'][_0x586216(0x216)](_0x35808f[_0x58b92b]);_0x28a2b4[0x3*_0x58b92b]=_0x558273['red'],_0x28a2b4[0x3*_0x58b92b+0x1]=_0x558273['green'],_0x28a2b4[0x3*_0x58b92b+0x2]=_0x558273['blue'];}const _0x5d2974={'context':_0x275857,'width':_0x1d7ca6,'height':0x1,'pixelFormat':Cesium$4['PixelFormat'][_0x586216(0x26e)],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4[(_0x586216(0x19a))]({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this[_0x586216(0x1a5)]={'segmentsColor':Util['createTexture'](_0x19bf4d),'segmentsDepth':Util['createTexture'](_0x113d69),'currentTrailsColor':Util[_0x586216(0x228)](_0x19bf4d),'currentTrailsDepth':Util[_0x586216(0x228)](_0x113d69),'nextTrailsColor':Util['createTexture'](_0x19bf4d),'nextTrailsDepth':Util['createTexture'](_0x113d69),'colorTable':Util['createTexture'](_0x5d2974,_0x28a2b4)};}['createRenderingFramebuffers'](_0x306ad3){const _0x5f05a7=_0x5c5c3c;this['framebuffers']={'segments':Util['createFramebuffer'](_0x306ad3,this['textures'][_0x5f05a7(0x235)],this['textures'][_0x5f05a7(0x1aa)]),'currentTrails':Util['createFramebuffer'](_0x306ad3,this['textures'][_0x5f05a7(0x247)],this['textures'][_0x5f05a7(0x205)]),'nextTrails':Util['createFramebuffer'](_0x306ad3,this[_0x5f05a7(0x1a5)][_0x5f05a7(0x1fb)],this[_0x5f05a7(0x1a5)]['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x1148be){const _0x24baa5=_0x5c5c3c,_0x480bd8=0x4;let _0x4d96d0=[];for(let _0x521787=0x0;_0x521787<_0x1148be['particlesTextureSize'];_0x521787++){for(let _0x4c309e=0x0;_0x4c309e<_0x1148be[_0x24baa5(0x221)];_0x4c309e++){for(let _0x5b7b94=0x0;_0x5b7b94<_0x480bd8;_0x5b7b94++){_0x4d96d0[_0x24baa5(0x26d)](_0x521787/_0x1148be['particlesTextureSize']),_0x4d96d0[_0x24baa5(0x26d)](_0x4c309e/_0x1148be[_0x24baa5(0x221)]);}}}_0x4d96d0=new Float32Array(_0x4d96d0);let _0x411432=[];const _0x2f0738=[-0x1,0x1],_0x501331=[-0x1,0x1];for(let _0x11971=0x0;_0x11971<_0x1148be[_0x24baa5(0x25b)];_0x11971++){for(let _0x14fe7b=0x0;_0x14fe7b<_0x480bd8/0x2;_0x14fe7b++){for(let _0x13ec4a=0x0;_0x13ec4a<_0x480bd8/0x2;_0x13ec4a++){_0x411432['push'](_0x2f0738[_0x14fe7b]),_0x411432['push'](_0x501331[_0x13ec4a]),_0x411432['push'](0x0);}}}_0x411432=new Float32Array(_0x411432);const _0x186938=0x6*_0x1148be[_0x24baa5(0x25b)],_0x177d28=new Uint32Array(_0x186938);for(let _0x49f622=0x0,_0x58d44f=0x0,_0x5264d6=0x0;_0x49f622<_0x1148be['maxParticles'];_0x49f622++){_0x177d28[_0x58d44f++]=_0x5264d6+0x0,_0x177d28[_0x58d44f++]=_0x5264d6+0x1,_0x177d28[_0x58d44f++]=_0x5264d6+0x2,_0x177d28[_0x58d44f++]=_0x5264d6+0x2,_0x177d28[_0x58d44f++]=_0x5264d6+0x1,_0x177d28[_0x58d44f++]=_0x5264d6+0x3,_0x5264d6+=0x4;}const _0x2eb405=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x4d96d0}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x411432})}),'indices':_0x177d28});return _0x2eb405;}['createRenderingPrimitives'](_0x5d9e38,_0x2aa39a,_0x3c0248,_0x5ceaa2){const _0x462f9a=_0x5c5c3c,_0x455eec=this;this[_0x462f9a(0x23a)]={'segments':new CustomPrimitive({'commandType':_0x462f9a(0x25e),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x2aa39a),'primitiveType':Cesium$4[_0x462f9a(0x22a)][_0x462f9a(0x20f)],'uniformMap':{'currentParticlesPosition':function(){const _0x2539e6=_0x462f9a;return _0x5ceaa2['particlesTextures'][_0x2539e6(0x201)];},'postProcessingPosition':function(){return _0x5ceaa2['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x4aff47=_0x462f9a;return _0x5ceaa2[_0x4aff47(0x23b)]['postProcessingSpeed'];},'colorTable':function(){const _0x62e0b7=_0x462f9a;return _0x455eec['textures'][_0x62e0b7(0x217)];},'aspect':function(){const _0x1c998b=_0x462f9a;return _0x5d9e38['drawingBufferWidth']/_0x5d9e38[_0x1c998b(0x19e)];},'pixelSize':function(){return _0x3c0248['pixelSize'];},'lineWidth':function(){return _0x2aa39a['lineWidth'];},'particleHeight':function(){return _0x2aa39a['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'][_0x462f9a(0x20e)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':_0x462f9a(0x25e),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x462f9a(0x1ee)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0x455eec['textures']['segmentsColor'];},'segmentsDepthTexture':function(){return _0x455eec['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0x3ffa1f=_0x462f9a;return _0x455eec[_0x3ffa1f(0x1e6)][_0x3ffa1f(0x21d)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x13aaef=_0x462f9a;return _0x455eec[_0x13aaef(0x1e6)]['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0x2aa39a['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x462f9a(0x22e)],'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'][_0x462f9a(0x227)]},'depthMask':!![]}),'framebuffer':this[_0x462f9a(0x1e6)]['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x4143ce=_0x462f9a,_0x4bc2b2=_0x455eec['framebuffers'][_0x4143ce(0x21d)];_0x455eec[_0x4143ce(0x1e6)][_0x4143ce(0x21d)]=_0x455eec['framebuffers']['nextTrails'],_0x455eec['framebuffers']['nextTrails']=_0x4bc2b2,_0x455eec['primitives']['trails']['commandToExecute'][_0x4143ce(0x1a9)]=_0x455eec['framebuffers']['nextTrails'],_0x455eec['primitives'][_0x4143ce(0x1f2)]['clearCommand'][_0x4143ce(0x1a9)]=_0x455eec['framebuffers']['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':_0x462f9a(0x25e),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0x462f9a(0x20f)],'uniformMap':{'trailsColorTexture':function(){const _0x43a746=_0x462f9a;return _0x455eec['framebuffers'][_0x43a746(0x195)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x4ccc4b=_0x462f9a;return _0x455eec['framebuffers']['nextTrails'][_0x4ccc4b(0x1d6)];}},'vertexShaderSource':new Cesium$4[(_0x462f9a(0x1c4))]({'defines':[_0x462f9a(0x22e)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x462f9a(0x1c4))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x462f9a(0x218)]({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag=_0x5c5c3c(0x191),updateSpeed_frag=_0x5c5c3c(0x1be),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[_0x5c5c3c(0x21f)];class ParticlesComputing{constructor(_0x33d0e3,_0x7ec0fb,_0x43586a,_0x283c19){const _0x1c871e=_0x5c5c3c;this['data']=_0x7ec0fb,this[_0x1c871e(0x1f7)](_0x33d0e3,_0x7ec0fb),this['createParticlesTextures'](_0x33d0e3,_0x43586a,_0x283c19),this['createComputingPrimitives'](_0x7ec0fb,_0x43586a,_0x283c19);}[_0x5c5c3c(0x1f7)](_0xc665ed,_0x88283e){const _0xc0a6b9=_0x5c5c3c,_0x53e498={'context':_0xc665ed,'width':_0x88283e['dimensions']['lon'],'height':_0x88283e['dimensions']['lat']*(_0x88283e['dimensions'][_0xc0a6b9(0x257)]||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0xc0a6b9(0x1f3)]['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3[_0xc0a6b9(0x189)]['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x53e498,_0x88283e['U']['array']),'V':Util['createTexture'](_0x53e498,_0x88283e['V']['array'])};}['createParticlesTextures'](_0x420830,_0x17831e,_0x4f6437){const _0x1bc432=_0x5c5c3c,_0x403d7a={'context':_0x420830,'width':_0x17831e['particlesTextureSize'],'height':_0x17831e['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype'][_0x1bc432(0x1ad)],'flipY':![],'sampler':new Cesium$3[(_0x1bc432(0x19a))]({'minificationFilter':Cesium$3[_0x1bc432(0x1e3)]['NEAREST'],'magnificationFilter':Cesium$3[_0x1bc432(0x189)][_0x1bc432(0x222)]})},_0x188188=this['randomizeParticles'](_0x17831e['maxParticles'],_0x4f6437),_0x101dbb=new Float32Array(0x4*_0x17831e['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x403d7a),'currentParticlesPosition':Util['createTexture'](_0x403d7a,_0x188188),'nextParticlesPosition':Util['createTexture'](_0x403d7a,_0x188188),'currentParticlesSpeed':Util['createTexture'](_0x403d7a,_0x101dbb),'nextParticlesSpeed':Util['createTexture'](_0x403d7a,_0x101dbb),'postProcessingPosition':Util['createTexture'](_0x403d7a,_0x188188),'postProcessingSpeed':Util['createTexture'](_0x403d7a,_0x101dbb)};}['randomizeParticles'](_0x517d04,_0x10662a){const _0x166f5b=_0x5c5c3c,_0x380be7=new Float32Array(0x4*_0x517d04);for(let _0x10fe25=0x0;_0x10fe25<_0x517d04;_0x10fe25++){_0x380be7[0x4*_0x10fe25]=Cesium$3['Math']['randomBetween'](_0x10662a['lonRange']['x'],_0x10662a['lonRange']['y']),_0x380be7[0x4*_0x10fe25+0x1]=Cesium$3['Math'][_0x166f5b(0x1db)](_0x10662a['latRange']['x'],_0x10662a[_0x166f5b(0x20b)]['y']),_0x380be7[0x4*_0x10fe25+0x2]=Cesium$3['Math']['randomBetween'](this['data']['lev']['min'],this['data']['lev']['max']),_0x380be7[0x4*_0x10fe25+0x3]=0x0;}return _0x380be7;}['destroyParticlesTextures'](){const _0xcfce63=_0x5c5c3c;Object['keys'](this['particlesTextures'])[_0xcfce63(0x204)](_0x3b1472=>{const _0x3f5161=_0xcfce63;this[_0x3f5161(0x23b)][_0x3b1472]['destroy']();});}['createComputingPrimitives'](_0x4a3837,_0x41f432,_0x5a010d){const _0x1863d3=_0x5c5c3c,_0x2439ff=new Cesium$3['Cartesian3'](_0x4a3837['dimensions']['lon'],_0x4a3837[_0x1863d3(0x264)]['lat'],_0x4a3837['dimensions'][_0x1863d3(0x257)]),_0x139614=new Cesium$3['Cartesian3'](_0x4a3837['lon'][_0x1863d3(0x1c8)],_0x4a3837[_0x1863d3(0x223)]['min'],_0x4a3837['lev']['min']),_0x22f0a1=new Cesium$3['Cartesian3'](_0x4a3837[_0x1863d3(0x1f6)]['max'],_0x4a3837[_0x1863d3(0x223)]['max'],_0x4a3837['lev']['max']),_0x3590d5=new Cesium$3['Cartesian3']((_0x22f0a1['x']-_0x139614['x'])/(_0x2439ff['x']-0x1),(_0x22f0a1['y']-_0x139614['y'])/(_0x2439ff['y']-0x1),_0x2439ff['z']>0x1?(_0x22f0a1['z']-_0x139614['z'])/(_0x2439ff['z']-0x1):0x1),_0x360a1f=new Cesium$3[(_0x1863d3(0x1dc))](_0x4a3837['U']['min'],_0x4a3837['U'][_0x1863d3(0x244)]),_0x2372f3=new Cesium$3[(_0x1863d3(0x1dc))](_0x4a3837['V'][_0x1863d3(0x1c8)],_0x4a3837['V']['max']),_0x23cfd5=this;this[_0x1863d3(0x23a)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x23cfd5['windTextures']['U'];},'V':function(){const _0x5470fe=_0x1863d3;return _0x23cfd5[_0x5470fe(0x1e5)]['V'];},'currentParticlesPosition':function(){return _0x23cfd5['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x2439ff;},'minimum':function(){return _0x139614;},'maximum':function(){return _0x22f0a1;},'interval':function(){return _0x3590d5;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x22c0c3=_0x1863d3;_0x23cfd5['primitives']['getWind'][_0x22c0c3(0x1c3)]['outputTexture']=_0x23cfd5['particlesTextures'][_0x22c0c3(0x265)];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x23cfd5['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){const _0x2c40b5=_0x1863d3;return _0x23cfd5[_0x2c40b5(0x23b)][_0x2c40b5(0x265)];},'uSpeedRange':function(){return _0x360a1f;},'vSpeedRange':function(){return _0x2372f3;},'pixelSize':function(){return _0x5a010d['pixelSize'];},'speedFactor':function(){return _0x41f432['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x1863d3(0x1d7)],'preExecute':function(){const _0xdcf9bb=_0x1863d3,_0x337be7=_0x23cfd5['particlesTextures'][_0xdcf9bb(0x1b8)];_0x23cfd5[_0xdcf9bb(0x23b)]['currentParticlesSpeed']=_0x23cfd5['particlesTextures']['postProcessingSpeed'],_0x23cfd5['particlesTextures']['postProcessingSpeed']=_0x337be7,_0x23cfd5[_0xdcf9bb(0x23a)][_0xdcf9bb(0x1b7)]['commandToExecute']['outputTexture']=_0x23cfd5['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':_0x1863d3(0x1c5),'uniformMap':{'currentParticlesPosition':function(){const _0x1ccb3d=_0x1863d3;return _0x23cfd5['particlesTextures'][_0x1ccb3d(0x201)];},'currentParticlesSpeed':function(){const _0x45faf8=_0x1863d3;return _0x23cfd5['particlesTextures'][_0x45faf8(0x1b8)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x17003b=_0x1863d3,_0x3060e5=_0x23cfd5['particlesTextures'][_0x17003b(0x201)];_0x23cfd5['particlesTextures']['currentParticlesPosition']=_0x23cfd5[_0x17003b(0x23b)]['postProcessingPosition'],_0x23cfd5['particlesTextures']['postProcessingPosition']=_0x3060e5,_0x23cfd5['primitives']['updatePosition']['commandToExecute'][_0x17003b(0x1bf)]=_0x23cfd5['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x23cfd5['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x23cfd5['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x5a010d['lonRange'];},'latRange':function(){const _0x5d64c9=_0x1863d3;return _0x5a010d[_0x5d64c9(0x20b)];},'randomCoefficient':function(){const _0x219e64=Math['random']();return _0x219e64;},'dropRate':function(){return _0x41f432['dropRate'];},'dropRateBump':function(){return _0x41f432['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures'][_0x1863d3(0x229)],'preExecute':function(){const _0x15f4db=_0x1863d3;_0x23cfd5['primitives'][_0x15f4db(0x229)]['commandToExecute']['outputTexture']=_0x23cfd5['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x1863d3(0x1c5),'uniformMap':{'postProcessingPosition':function(){const _0x29a8e9=_0x1863d3;return _0x23cfd5[_0x29a8e9(0x23b)][_0x29a8e9(0x229)];},'nextParticlesSpeed':function(){return _0x23cfd5['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x1863d3(0x1c4))]({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x5c0132=_0x1863d3;_0x23cfd5['primitives']['postProcessingSpeed']['commandToExecute'][_0x5c0132(0x1bf)]=_0x23cfd5['particlesTextures'][_0x5c0132(0x18b)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x40b3a6,_0x30d58f,_0x3602f6,_0x334232){const _0x5d1513=_0x5c5c3c;this['context']=_0x40b3a6,_0x30d58f={..._0x30d58f},_0x30d58f[_0x5d1513(0x1f5)]&&_0x30d58f['vdata']&&(_0x30d58f['dimensions']={},_0x30d58f[_0x5d1513(0x264)]['lon']=_0x30d58f['cols'],_0x30d58f['dimensions']['lat']=_0x30d58f['rows'],_0x30d58f[_0x5d1513(0x264)]['lev']=_0x30d58f['lev']||0x1,_0x30d58f['lon']={},_0x30d58f['lon']['min']=_0x30d58f[_0x5d1513(0x214)],_0x30d58f[_0x5d1513(0x1f6)]['max']=_0x30d58f['xmax'],_0x30d58f[_0x5d1513(0x223)]={},_0x30d58f['lat'][_0x5d1513(0x1c8)]=_0x30d58f['ymin'],_0x30d58f[_0x5d1513(0x223)]['max']=_0x30d58f['ymax'],_0x30d58f['lev']={},_0x30d58f['lev']['min']=_0x30d58f['levmin']??0x1,_0x30d58f['lev'][_0x5d1513(0x244)]=_0x30d58f[_0x5d1513(0x1bc)]??0x1,_0x30d58f['U']={},_0x30d58f['U']['array']=new Float32Array(_0x30d58f['udata']),_0x30d58f['U']['min']=_0x30d58f[_0x5d1513(0x1a1)]??Math['min'](..._0x30d58f[_0x5d1513(0x1f5)]),_0x30d58f['U']['max']=_0x30d58f[_0x5d1513(0x246)]??Math['max'](..._0x30d58f['udata']),_0x30d58f['V']={},_0x30d58f['V']['array']=new Float32Array(_0x30d58f[_0x5d1513(0x182)]),_0x30d58f['V'][_0x5d1513(0x1c8)]=_0x30d58f['vmin']??Math[_0x5d1513(0x1c8)](..._0x30d58f[_0x5d1513(0x182)]),_0x30d58f['V']['max']=_0x30d58f[_0x5d1513(0x1c6)]??Math['max'](..._0x30d58f[_0x5d1513(0x182)])),this['data']=_0x30d58f,this[_0x5d1513(0x20d)]=_0x3602f6,this['viewerParameters']=_0x334232,this['particlesComputing']=new ParticlesComputing(this['context'],this[_0x5d1513(0x22b)],this['options'],this['viewerParameters']),this[_0x5d1513(0x1b3)]=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x5d1513(0x1e1)]);}['canvasResize'](_0x1daa13){const _0x252dc3=_0x5c5c3c;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing'][_0x252dc3(0x1e5)])[_0x252dc3(0x204)](_0x19b497=>{const _0x42122e=_0x252dc3;this[_0x42122e(0x1e1)][_0x42122e(0x1e5)][_0x19b497]['destroy']();}),this['particlesRendering'][_0x252dc3(0x1a5)]['colorTable']['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x5f0d53=>{this['particlesRendering']['framebuffers'][_0x5f0d53]['destroy']();}),this['context']=_0x1daa13,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0x252dc3(0x1b1)]),this['particlesRendering']=new ParticlesRendering(this['context'],this[_0x252dc3(0x22b)],this[_0x252dc3(0x20d)],this[_0x252dc3(0x1b1)],this['particlesComputing']);}['clearFramebuffers'](){const _0x339e64=_0x5c5c3c,_0x1c45df=new Cesium$2[(_0x339e64(0x1cd))]({'color':new Cesium$2[(_0x339e64(0x226))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass'][_0x339e64(0x1f8)]});Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x581b52=>{const _0x3f98ed=_0x339e64;_0x1c45df['framebuffer']=this['particlesRendering']['framebuffers'][_0x581b52],_0x1c45df[_0x3f98ed(0x188)](this['context']);});}['refreshParticles'](_0x5fe477){const _0x3051e1=_0x5c5c3c;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x5fe477){var _0x2f90d7,_0x38cec7;const _0x2f7c56=this['particlesRendering'][_0x3051e1(0x21c)](this[_0x3051e1(0x20d)]);this['particlesRendering']['primitives'][_0x3051e1(0x20e)]['geometry']=_0x2f7c56;const _0x440bd3=Cesium$2['VertexArray']['fromGeometry']({'context':this['context'],'geometry':_0x2f7c56,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2[_0x3051e1(0x245)][_0x3051e1(0x26b)]});(_0x2f90d7=this['particlesRendering']['primitives'])!==null&&_0x2f90d7!==void 0x0&&(_0x38cec7=_0x2f90d7['segments'])!==null&&_0x38cec7!==void 0x0&&_0x38cec7['commandToExecute']&&(this[_0x3051e1(0x1b3)][_0x3051e1(0x23a)]['segments'][_0x3051e1(0x1c3)]['vertexArray']=_0x440bd3);}}[_0x5c5c3c(0x198)](_0x15b124){const _0x24e48d=_0x5c5c3c;let _0x138891=![];this['options']['maxParticles']!==_0x15b124['maxParticles']&&(_0x138891=!![]),Object['keys'](_0x15b124)[_0x24e48d(0x204)](_0x24748d=>{const _0x6c0706=_0x24e48d;this[_0x6c0706(0x20d)][_0x24748d]=_0x15b124[_0x24748d];}),this['refreshParticles'](_0x138891);}[_0x5c5c3c(0x268)](_0x10ba5d){const _0x626416=_0x5c5c3c;Object['keys'](_0x10ba5d)[_0x626416(0x204)](_0x94b054=>{this['viewerParameters'][_0x94b054]=_0x10ba5d[_0x94b054];}),this['refreshParticles'](![]);}['destroy'](){const _0x319d3d=_0x5c5c3c;clearTimeout(this[_0x319d3d(0x231)]),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x3e2c85=>{const _0x23d0c7=_0x319d3d;this['particlesComputing']['windTextures'][_0x3e2c85][_0x23d0c7(0x230)]();}),this[_0x319d3d(0x1b3)]['textures'][_0x319d3d(0x217)]['destroy'](),Object[_0x319d3d(0x21a)](this['particlesRendering']['framebuffers'])['forEach'](_0x512800=>{const _0x5ad3ae=_0x319d3d;this['particlesRendering']['framebuffers'][_0x512800][_0x5ad3ae(0x230)]();});for(const _0x4c7cfa in this){delete this[_0x4c7cfa];}}}const Cesium$1=mars3d__namespace[_0x5c5c3c(0x21f)],BaseLayer$1=mars3d__namespace['layer'][_0x5c5c3c(0x215)],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(_0x81b661={}){const _0x5025be=_0x5c5c3c;_0x81b661={...DEF_OPTIONS,..._0x81b661},super(_0x81b661),this[_0x5025be(0x23c)](_0x81b661);}get[_0x5c5c3c(0x253)](){const _0x42003b=_0x5c5c3c;return this[_0x42003b(0x23a)];}get['data'](){return this['_data'];}set[_0x5c5c3c(0x22b)](_0x32b49c){this['setData'](_0x32b49c);}get['colors'](){return this['options']['colors'];}set['colors'](_0x3ba08a){const _0x4e8b24=_0x5c5c3c;this['options']['colors']=_0x3ba08a,this[_0x4e8b24(0x1d0)]&&this[_0x4e8b24(0x1d0)][_0x4e8b24(0x198)]({'colors':_0x3ba08a}),this[_0x4e8b24(0x252)]();}['_mountedHook'](){}[_0x5c5c3c(0x1f0)](){const _0x164486=_0x5c5c3c;this['scene']=this['_map']['scene'],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this[_0x164486(0x1ef)]['scene']['primitives']['add'](this['primitives']),this[_0x164486(0x1b1)]={'lonRange':new Cesium$1[(_0x164486(0x1dc))](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x164486(0x20c)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener'](_0x164486(0x252),this['resize']['bind'](this),![]),this[_0x164486(0x18f)]=![],this[_0x164486(0x251)]=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0x164486(0x1df)][_0x164486(0x1ea)],this['_onMouseDownEvent'],this),this[_0x164486(0x1ef)]['on'](mars3d__namespace[_0x164486(0x1df)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace[_0x164486(0x1df)][_0x164486(0x25d)],this[_0x164486(0x256)],this),this[_0x164486(0x220)]&&this[_0x164486(0x24b)](this['_data']);}['_removedHook'](){const _0x31ad27=_0x5c5c3c;window['removeEventListener']('resize',this['resize']),this[_0x31ad27(0x1ef)][_0x31ad27(0x193)](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace[_0x31ad27(0x1df)]['wheel'],this['_onMapWhellEvent'],this),this[_0x31ad27(0x1ef)][_0x31ad27(0x193)](mars3d__namespace['EventType']['mouseDown'],this[_0x31ad27(0x1dd)],this),this[_0x31ad27(0x1ef)][_0x31ad27(0x193)](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives'][_0x31ad27(0x1af)](),this['_map'][_0x31ad27(0x206)]['primitives']['remove'](this['primitives']);}['resize'](){const _0x14285b=_0x5c5c3c;if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this[_0x14285b(0x23a)][_0x14285b(0x1af)](),this['_map'][_0x14285b(0x21b)](mars3d__namespace['EventType'][_0x14285b(0x238)],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x41e314){const _0x168b04=_0x5c5c3c;this['particleSystem']['canvasResize'](this['scene'][_0x168b04(0x262)]),this['addPrimitives'](),this[_0x168b04(0x23a)]['show']=!![];}[_0x5c5c3c(0x25a)](_0x544a42){clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{const _0x1b749e=_0x2757;if(!this[_0x1b749e(0x270)])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x4a9e00){const _0x487e63=_0x5c5c3c;this[_0x487e63(0x18f)]=!![];}[_0x5c5c3c(0x256)](_0x2048ed){const _0x5e1226=_0x5c5c3c;if(!this['show']||!this[_0x5e1226(0x1d0)])return;this['mouse_down']&&(this['primitives']['show']=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x15450a){const _0x22d1af=_0x5c5c3c;if(!this['show']||!this[_0x22d1af(0x1d0)])return;this[_0x22d1af(0x18f)]&&this['mouse_move']&&this['redraw'](),this[_0x22d1af(0x23a)]['show']=!![],this[_0x22d1af(0x18f)]=![],this['mouse_move']=![];}['redraw'](){if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0xdc9e86){const _0x55ec3e=_0x5c5c3c;this['_data']=_0xdc9e86,this[_0x55ec3e(0x1d0)]&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene']['context'],_0xdc9e86,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}[_0x5c5c3c(0x23c)](_0x5de3bf,_0x27cb9b){const _0x5c0ac4=_0x5c5c3c;if(_0x5de3bf)for(const _0x1b50d6 in _0x5de3bf){this[_0x1b50d6]=_0x5de3bf[_0x1b50d6];}this['particleSystem']&&this[_0x5c0ac4(0x1d0)]['setOptions'](this['getOptions']());}['getOptions'](){const _0x61a1d3=_0x5c5c3c,_0x2162b7=Math['ceil'](Math[_0x61a1d3(0x1c1)](this['particlesNumber']));return this['particlesNumber']=_0x2162b7*_0x2162b7,{'particlesTextureSize':_0x2162b7,'maxParticles':this[_0x61a1d3(0x1fd)],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x61a1d3(0x22d)],'dropRate':this['dropRate'],'dropRateBump':this[_0x61a1d3(0x248)],'speedFactor':this[_0x61a1d3(0x183)],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x5a00c1=_0x5c5c3c;this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['getWind']),this[_0x5a00c1(0x23a)]['add'](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this['primitives']['add'](this['particleSystem'][_0x5a00c1(0x1e1)]['primitives']['updatePosition']),this['primitives']['add'](this[_0x5a00c1(0x1d0)][_0x5a00c1(0x1e1)]['primitives'][_0x5a00c1(0x229)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this[_0x5a00c1(0x23a)][_0x5a00c1(0x1e7)](this['particleSystem']['particlesRendering']['primitives'][_0x5a00c1(0x20e)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this['primitives']['add'](this[_0x5a00c1(0x1d0)][_0x5a00c1(0x1b3)][_0x5a00c1(0x23a)][_0x5a00c1(0x1e2)]);}['updateViewerParameters'](){const _0x8d3957=_0x5c5c3c;let _0x30c586=this[_0x8d3957(0x1e8)]['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x30c586){const _0x2d744f=this[_0x8d3957(0x1ef)]['getExtent']();_0x30c586=Cesium$1[_0x8d3957(0x1da)]['fromDegrees'](_0x2d744f[_0x8d3957(0x214)],_0x2d744f['ymin'],_0x2d744f['xmax'],_0x2d744f[_0x8d3957(0x1ac)]);}const _0x30d749=Util['viewRectangleToLonLatRange'](_0x30c586);this[_0x8d3957(0x1b1)][_0x8d3957(0x26a)]['x']=_0x30d749['lon']['min'],this['viewerParameters']['lonRange']['y']=_0x30d749['lon']['max'],this['viewerParameters']['latRange']['x']=_0x30d749['lat']['min'],this[_0x8d3957(0x1b1)][_0x8d3957(0x20b)]['y']=_0x30d749['lat']['max'];const _0x4c52a0=this[_0x8d3957(0x1e8)]['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x4c52a0>0x0&&(this['viewerParameters'][_0x8d3957(0x1fc)]=_0x4c52a0);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;class CanvasParticle{constructor(){this['lng']=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null,this['speed']=null;}[_0x5c5c3c(0x230)](){for(const _0x49e5ec in this){delete this[_0x49e5ec];}}}class CanvasWindField{constructor(_0x3a5950){const _0x12d3a1=_0x5c5c3c;this[_0x12d3a1(0x198)](_0x3a5950);}get['speedRate'](){const _0x563168=_0x5c5c3c;return this[_0x563168(0x254)];}set['speedRate'](_0x29f91f){const _0xfe785f=_0x5c5c3c;this[_0xfe785f(0x254)]=(0x64-(_0x29f91f>0x63?0x63:_0x29f91f))*0x64,this['_calc_speedRate']=[(this[_0xfe785f(0x1d4)]-this[_0xfe785f(0x214)])/this['_speedRate'],(this['ymax']-this['ymin'])/this[_0xfe785f(0x254)]];}get['maxAge'](){return this['_maxAge'];}set['maxAge'](_0x58c4e7){this['_maxAge']=_0x58c4e7;}['setOptions'](_0x4375b3){const _0x5a6012=_0x5c5c3c;this[_0x5a6012(0x20d)]=_0x4375b3,this['maxAge']=_0x4375b3['maxAge']||0x78,this['speedRate']=_0x4375b3['speedRate']||0x32,this[_0x5a6012(0x19f)]=[];const _0x30f1fc=_0x4375b3['particlesNumber']||0x1000;for(let _0x15c83d=0x0;_0x15c83d<_0x30f1fc;_0x15c83d++){const _0x36fdbd=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x36fdbd);}}['setDate'](_0x8027c3){const _0x3384d9=_0x5c5c3c;this['rows']=_0x8027c3['rows'],this[_0x3384d9(0x18c)]=_0x8027c3[_0x3384d9(0x18c)],this['xmin']=_0x8027c3['xmin'],this['xmax']=_0x8027c3['xmax'],this['ymin']=_0x8027c3['ymin'],this['ymax']=_0x8027c3['ymax'],this['grid']=[];const _0x69d903=_0x8027c3['udata'],_0xbd22e3=_0x8027c3['vdata'];let _0x45da45=![];_0x69d903['length']===this[_0x3384d9(0x271)]&&_0x69d903[0x0]['length']===this[_0x3384d9(0x18c)]&&(_0x45da45=!![]);let _0x18561d=0x0,_0x81dbe5=null,_0x1a264b=null;for(let _0x30de44=0x0;_0x30de44<this[_0x3384d9(0x271)];_0x30de44++){_0x81dbe5=[];for(let _0x4f82ba=0x0;_0x4f82ba<this[_0x3384d9(0x18c)];_0x4f82ba++,_0x18561d++){_0x45da45?_0x1a264b=this[_0x3384d9(0x1ae)](_0x69d903[_0x30de44][_0x4f82ba],_0xbd22e3[_0x30de44][_0x4f82ba]):_0x1a264b=this['_calcUV'](_0x69d903[_0x18561d],_0xbd22e3[_0x18561d]),_0x81dbe5['push'](_0x1a264b);}this[_0x3384d9(0x1bb)]['push'](_0x81dbe5);}this['options']['reverseY']&&this['grid']['reverse']();}[_0x5c5c3c(0x202)](){const _0x3663d7=_0x5c5c3c;delete this[_0x3663d7(0x271)],delete this[_0x3663d7(0x18c)],delete this['xmin'],delete this[_0x3663d7(0x1d4)],delete this['ymin'],delete this[_0x3663d7(0x1ac)],delete this['grid'],delete this[_0x3663d7(0x19f)];}['toGridXY'](_0xb1fd76,_0x410170){const _0x1e776d=_0x5c5c3c,_0x25448a=(_0xb1fd76-this[_0x1e776d(0x214)])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x15ffbd=(this['ymax']-_0x410170)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0x25448a,_0x15ffbd];}['getUVByXY'](_0x4c77cd,_0x50b5a9){const _0x39fe7d=_0x5c5c3c;if(_0x4c77cd<0x0||_0x4c77cd>=this['cols']||_0x50b5a9>=this['rows'])return[0x0,0x0,0x0];const _0x241ada=Math['floor'](_0x4c77cd),_0x3fec3c=Math['floor'](_0x50b5a9);if(_0x241ada===_0x4c77cd&&_0x3fec3c===_0x50b5a9)return this[_0x39fe7d(0x1bb)][_0x50b5a9][_0x4c77cd];const _0x205284=_0x241ada+0x1,_0x4e4136=_0x3fec3c+0x1,_0x59debe=this['getUVByXY'](_0x241ada,_0x3fec3c),_0x3ad0a9=this['getUVByXY'](_0x205284,_0x3fec3c),_0x5c9c2f=this['getUVByXY'](_0x241ada,_0x4e4136),_0x5793f1=this[_0x39fe7d(0x269)](_0x205284,_0x4e4136);let _0x38051a=null;try{_0x38051a=this['_bilinearInterpolation'](_0x4c77cd-_0x241ada,_0x50b5a9-_0x3fec3c,_0x59debe,_0x3ad0a9,_0x5c9c2f,_0x5793f1);}catch(_0x325cd3){console['log'](_0x4c77cd,_0x50b5a9);}return _0x38051a;}[_0x5c5c3c(0x261)](_0x255d66,_0x4c9853,_0x1905b5,_0x446811,_0x2efc75,_0x38a2e7){const _0x44a34d=0x1-_0x255d66,_0x470d45=0x1-_0x4c9853,_0x33f52b=_0x44a34d*_0x470d45,_0x2f920d=_0x255d66*_0x470d45,_0x263988=_0x44a34d*_0x4c9853,_0x277ca7=_0x255d66*_0x4c9853,_0x1859e2=_0x1905b5[0x0]*_0x33f52b+_0x446811[0x0]*_0x2f920d+_0x2efc75[0x0]*_0x263988+_0x38a2e7[0x0]*_0x277ca7,_0x47de72=_0x1905b5[0x1]*_0x33f52b+_0x446811[0x1]*_0x2f920d+_0x2efc75[0x1]*_0x263988+_0x38a2e7[0x1]*_0x277ca7;return this['_calcUV'](_0x1859e2,_0x47de72);}[_0x5c5c3c(0x1ae)](_0x80862c,_0xed4117){const _0x513336=_0x5c5c3c;return[+_0x80862c,+_0xed4117,Math[_0x513336(0x1c1)](_0x80862c*_0x80862c+_0xed4117*_0xed4117)];}['getUVByPoint'](_0x40099d,_0x14bacd){const _0x37cb78=_0x5c5c3c;if(!this[_0x37cb78(0x1f9)](_0x40099d,_0x14bacd))return null;const _0x3f8b77=this['toGridXY'](_0x40099d,_0x14bacd),_0x34f7c3=this['getUVByXY'](_0x3f8b77[0x0],_0x3f8b77[0x1]);return _0x34f7c3;}[_0x5c5c3c(0x1f9)](_0x3ce49d,_0x38fc5e){const _0x50d149=_0x5c5c3c;return _0x3ce49d>=this['xmin']&&_0x3ce49d<=this['xmax']&&_0x38fc5e>=this[_0x50d149(0x1fa)]&&_0x38fc5e<=this[_0x50d149(0x1ac)]?!![]:![];}[_0x5c5c3c(0x1ab)](){const _0xefbc2b=fRandomByfloat(this['xmin'],this['xmax']),_0x475023=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x475023,'lng':_0xefbc2b};}[_0x5c5c3c(0x1d3)](){const _0xf3cda4=_0x5c5c3c;let _0xfccb3a,_0x30b324,_0x17d79e;for(let _0x2bd114=0x0,_0x6c6756=this['particles'][_0xf3cda4(0x1a4)];_0x2bd114<_0x6c6756;_0x2bd114++){let _0x40ed75=this[_0xf3cda4(0x19f)][_0x2bd114];_0x40ed75['age']<=0x0&&(_0x40ed75=this['_randomParticle'](_0x40ed75));if(_0x40ed75['age']>0x0){const _0x5de8f4=_0x40ed75['tlng'],_0x237a7c=_0x40ed75['tlat'];_0x17d79e=this['getUVByPoint'](_0x5de8f4,_0x237a7c),_0x17d79e?(_0xfccb3a=_0x5de8f4+this['_calc_speedRate'][0x0]*_0x17d79e[0x0],_0x30b324=_0x237a7c+this['_calc_speedRate'][0x1]*_0x17d79e[0x1],_0x40ed75['lng']=_0x5de8f4,_0x40ed75[_0xf3cda4(0x223)]=_0x237a7c,_0x40ed75['tlng']=_0xfccb3a,_0x40ed75['tlat']=_0x30b324,_0x40ed75[_0xf3cda4(0x260)]=_0x17d79e[0x2],_0x40ed75['age']--):_0x40ed75['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x3b0478){const _0x356bce=_0x5c5c3c;let _0x10c76e,_0x592d6b;for(let _0x8e1096=0x0;_0x8e1096<0x1e;_0x8e1096++){_0x10c76e=this[_0x356bce(0x1ab)](),_0x592d6b=this[_0x356bce(0x21e)](_0x10c76e['lng'],_0x10c76e['lat']);if(_0x592d6b&&_0x592d6b[0x2]>0x0)break;}if(!_0x592d6b)return _0x3b0478;const _0x3847ce=_0x10c76e['lng']+this['_calc_speedRate'][0x0]*_0x592d6b[0x0],_0x30fadf=_0x10c76e['lat']+this['_calc_speedRate'][0x1]*_0x592d6b[0x1];return _0x3b0478[_0x356bce(0x194)]=_0x10c76e[_0x356bce(0x194)],_0x3b0478[_0x356bce(0x223)]=_0x10c76e[_0x356bce(0x223)],_0x3b0478['tlng']=_0x3847ce,_0x3b0478[_0x356bce(0x197)]=_0x30fadf,_0x3b0478['age']=Math['round'](Math['random']()*this['maxAge']),_0x3b0478['speed']=_0x592d6b[0x2],_0x3b0478;}['destroy'](){for(const _0xd873e5 in this){delete this[_0xd873e5];}}}function fRandomByfloat(_0x45a3a2,_0x265e0b){const _0x51b520=_0x5c5c3c;return _0x45a3a2+Math[_0x51b520(0x19d)]()*(_0x265e0b-_0x45a3a2);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x5c5c3c(0x253)][_0x5c5c3c(0x215)];function _0x2757(_0x2d8e4e,_0x420956){const _0x41ec10=_0x41ec();return _0x2757=function(_0x2757ed,_0x4a6476){_0x2757ed=_0x2757ed-0x17f;let _0x2ab0d1=_0x41ec10[_0x2757ed];return _0x2ab0d1;},_0x2757(_0x2d8e4e,_0x420956);}class CanvasWindLayer extends BaseLayer{constructor(_0x509360={}){const _0xf83ba1=_0x5c5c3c;super(_0x509360),this['_setOptionsHook'](_0x509360),this[_0xf83ba1(0x1ba)]=null,_0x509360[_0xf83ba1(0x212)]&&_0x509360[_0xf83ba1(0x243)]&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x509360));}['_setOptionsHook'](_0x6b7cd4,_0x17b672){const _0x1a0ba0=_0x5c5c3c;this['frameTime']=0x3e8/(_0x6b7cd4['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x6b7cd4['color']||'#ffffff',this['lineWidth']=_0x6b7cd4['lineWidth']||0x1,this[_0x1a0ba0(0x19b)]=_0x6b7cd4['fixedHeight']??0x0,this['reverseY']=_0x6b7cd4['reverseY']??![],this['windField']&&this[_0x1a0ba0(0x1eb)][_0x1a0ba0(0x198)](_0x6b7cd4);}get[_0x5c5c3c(0x253)](){return this['canvas'];}get['canvasWidth'](){const _0x39264c=_0x5c5c3c;return this[_0x39264c(0x1ef)][_0x39264c(0x206)]['canvas']['clientWidth'];}get['canvasHeight'](){const _0x1ec8a4=_0x5c5c3c;return this['_map']['scene'][_0x1ec8a4(0x1ba)]['clientHeight'];}get[_0x5c5c3c(0x192)](){return this['_pointerEvents'];}set['pointerEvents'](_0x58f95e){const _0x1e20d7=_0x5c5c3c;this['_pointerEvents']=_0x58f95e;if(!this['canvas'])return;_0x58f95e?this['canvas'][_0x1e20d7(0x241)]['pointer-events']='all':this['canvas']['style'][_0x1e20d7(0x25f)]=_0x1e20d7(0x1d5);}get['particlesNumber'](){const _0x43fb79=_0x5c5c3c;return this[_0x43fb79(0x20d)][_0x43fb79(0x1fd)];}set['particlesNumber'](_0x3b3fee){this['options']['particlesNumber']=_0x3b3fee,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{const _0x42ec64=_0x2757;this[_0x42ec64(0x1de)]();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x2f5924){this['options']['speedRate']=_0x2f5924,this['windField']&&(this['windField']['speedRate']=_0x2f5924);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x116bba){this['options']['maxAge']=_0x116bba,this['windField']&&(this['windField']['maxAge']=_0x116bba);}get[_0x5c5c3c(0x22b)](){return this['windData'];}set[_0x5c5c3c(0x22b)](_0x2b51bd){this['setData'](_0x2b51bd);}[_0x5c5c3c(0x1ec)](_0x6ea03f){const _0x14f7e3=_0x5c5c3c;_0x6ea03f?this[_0x14f7e3(0x1f0)]():(this['windData']&&(this[_0x14f7e3(0x20d)]['data']=this['windData']),this['_removedHook']());}[_0x5c5c3c(0x1f4)](){const _0x3f7624=_0x5c5c3c;this['options']['worker']?this['initWorker']():this['windField']=new CanvasWindField(this[_0x3f7624(0x20d)]);}['_addedHook'](){const _0x57d81b=_0x5c5c3c;this['canvas']=this[_0x57d81b(0x1e0)](),this[_0x57d81b(0x199)]=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x57d81b(0x272)](),this['options']['data']&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x5340b1=_0x5c5c3c;this[_0x5340b1(0x202)](),this['unbindEvent'](),this[_0x5340b1(0x1ba)]&&(this['_map'][_0x5340b1(0x25c)]['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x5f21ec=_0x5c5c3c,_0x181866=mars3d__namespace['DomUtil'][_0x5f21ec(0x1a6)]('canvas','mars3d-canvasWind',this['_map']['container']);return _0x181866['style']['position']='absolute',_0x181866['style']['top']='0px',_0x181866['style'][_0x5f21ec(0x18d)]='0px',_0x181866['style'][_0x5f21ec(0x26f)]=this['_map']['scene']['canvas']['clientWidth']+'px',_0x181866['style']['height']=this[_0x5f21ec(0x1ef)]['scene']['canvas']['clientHeight']+'px',_0x181866['style']['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x181866[_0x5f21ec(0x241)]['zIndex']=this['options'][_0x5f21ec(0x24f)]??0x9,_0x181866['width']=this['_map']['scene']['canvas']['clientWidth'],_0x181866['height']=this['_map'][_0x5f21ec(0x206)]['canvas'][_0x5f21ec(0x186)],_0x181866;}[_0x5c5c3c(0x252)](){const _0xd69604=_0x5c5c3c;this['canvas']&&(this['canvas'][_0xd69604(0x241)][_0xd69604(0x26f)]=this['_map'][_0xd69604(0x206)]['canvas']['clientWidth']+'px',this['canvas']['style'][_0xd69604(0x20a)]=this['_map']['scene']['canvas']['clientHeight']+'px',this['canvas']['width']=this['_map']['scene']['canvas']['clientWidth'],this['canvas']['height']=this['_map'][_0xd69604(0x206)]['canvas']['clientHeight']);}[_0x5c5c3c(0x272)](){const _0x538d42=_0x5c5c3c,_0x454691=this;let _0x460820=Date[_0x538d42(0x18e)]();(function _0x281c48(){const _0x3df3fe=_0x538d42;_0x454691['animateFrame']=window['requestAnimationFrame'](_0x281c48);if(_0x454691['show']&&_0x454691['windField']){const _0x19a08e=Date['now'](),_0x46e9fd=_0x19a08e-_0x460820;_0x46e9fd>_0x454691['frameTime']&&(_0x460820=_0x19a08e-_0x46e9fd%_0x454691[_0x3df3fe(0x259)],_0x454691[_0x3df3fe(0x1b5)]());}}(),window['addEventListener']('resize',this['resize'][_0x538d42(0x239)](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this[_0x538d42(0x1ef)]['on'](mars3d__namespace['EventType'][_0x538d42(0x1c9)],this[_0x538d42(0x25a)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x538d42(0x1ea)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x538d42(0x1df)]['mouseUp'],this['_onMouseUpEvent'],this)));}[_0x5c5c3c(0x240)](){const _0x42e5f3=_0x5c5c3c;window['cancelAnimationFrame'](this[_0x42e5f3(0x24a)]),delete this['animateFrame'],window[_0x42e5f3(0x255)](_0x42e5f3(0x252),this[_0x42e5f3(0x252)]),this[_0x42e5f3(0x20d)][_0x42e5f3(0x249)]&&(this['_map']['off'](mars3d__namespace['EventType'][_0x42e5f3(0x1c9)],this[_0x42e5f3(0x25a)],this),this[_0x42e5f3(0x1ef)]['off'](mars3d__namespace['EventType'][_0x42e5f3(0x1ea)],this['_onMouseDownEvent'],this),this[_0x42e5f3(0x1ef)]['off'](mars3d__namespace['EventType'][_0x42e5f3(0x1c0)],this[_0x42e5f3(0x1c7)],this),this[_0x42e5f3(0x1ef)]['off'](mars3d__namespace[_0x42e5f3(0x1df)]['mouseMove'],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x844598){const _0x46837b=_0x5c5c3c;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this[_0x46837b(0x1ba)]['style']['visibility']='hidden',this['refreshTimer']=setTimeout(()=>{const _0x2bf62d=_0x46837b;if(!this['show'])return;this['redraw'](),this['canvas'][_0x2bf62d(0x241)]['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x593aa4){const _0x20f36f=_0x5c5c3c;this[_0x20f36f(0x18f)]=!![],this[_0x20f36f(0x1ef)]['off'](mars3d__namespace[_0x20f36f(0x1df)]['mouseMove'],this[_0x20f36f(0x256)],this),this[_0x20f36f(0x1ef)]['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x20f36f(0x256)],this);}['_onMouseMoveEvent'](_0xac99ab){const _0x8de1d9=_0x5c5c3c;if(!this[_0x8de1d9(0x270)]||!this['canvas'])return;this['mouse_down']&&(this[_0x8de1d9(0x1ba)]['style']['visibility']='hidden',this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x337c16){const _0x646d30=_0x5c5c3c;if(!this['show']||!this[_0x646d30(0x1ba)])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x646d30(0x256)],this),this[_0x646d30(0x18f)]&&this['mouse_move']&&this[_0x646d30(0x1de)](),this[_0x646d30(0x1ba)]['style']['visibility']='visible',this[_0x646d30(0x18f)]=![],this['mouse_move']=![];}[_0x5c5c3c(0x24b)](_0x243a0a){const _0x462aa8=_0x5c5c3c;this[_0x462aa8(0x202)](),this[_0x462aa8(0x1bd)]=_0x243a0a,this['windField']['setDate'](_0x243a0a),this['redraw']();}['redraw'](){const _0x29d624=_0x5c5c3c;if(!this[_0x29d624(0x270)])return;this[_0x29d624(0x1eb)]['setOptions'](this[_0x29d624(0x20d)]),this['update']();}['update'](){const _0x40943d=_0x5c5c3c;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x3636f4=this['windField']['getParticles']();this['_drawLines'](_0x3636f4);}this[_0x40943d(0x1b9)]=![];}['_drawLines'](_0x3c27a6){const _0x41729a=_0x5c5c3c;this[_0x41729a(0x199)][_0x41729a(0x234)]='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this[_0x41729a(0x207)]),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext']['globalAlpha']=0.9;const _0x1f60e3=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x16a2f4=this[_0x41729a(0x1ca)]*0.25;if(this[_0x41729a(0x23d)])for(let _0x37bd39=0x0,_0xaf5a7b=_0x3c27a6[_0x41729a(0x1a4)];_0x37bd39<_0xaf5a7b;_0x37bd39++){const _0x39e014=_0x3c27a6[_0x37bd39],_0x5d2d4b=this[_0x41729a(0x196)](_0x39e014[_0x41729a(0x194)],_0x39e014['lat'],_0x39e014),_0x52faee=this[_0x41729a(0x196)](_0x39e014['tlng'],_0x39e014['tlat'],_0x39e014);if(!_0x5d2d4b||!_0x52faee)continue;if(_0x1f60e3&&Math['abs'](_0x5d2d4b[0x0]-_0x52faee[0x0])>=_0x16a2f4)continue;this['canvasContext']['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext'][_0x41729a(0x24d)]=this['_colorRamp']['getColor'](_0x39e014['speed']),this[_0x41729a(0x199)]['moveTo'](_0x5d2d4b[0x0],_0x5d2d4b[0x1]),this['canvasContext']['lineTo'](_0x52faee[0x0],_0x52faee[0x1]),this[_0x41729a(0x199)][_0x41729a(0x267)]();}else{this[_0x41729a(0x199)]['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this[_0x41729a(0x1a8)];for(let _0x277bf5=0x0,_0x196a74=_0x3c27a6['length'];_0x277bf5<_0x196a74;_0x277bf5++){const _0xe2ac09=_0x3c27a6[_0x277bf5],_0x3316fe=this['_tomap'](_0xe2ac09[_0x41729a(0x194)],_0xe2ac09['lat'],_0xe2ac09),_0x5a4d8f=this['_tomap'](_0xe2ac09[_0x41729a(0x1d1)],_0xe2ac09['tlat'],_0xe2ac09);if(!_0x3316fe||!_0x5a4d8f)continue;if(_0x1f60e3&&Math['abs'](_0x3316fe[0x0]-_0x5a4d8f[0x0])>=_0x16a2f4)continue;this['canvasContext']['moveTo'](_0x3316fe[0x0],_0x3316fe[0x1]),this[_0x41729a(0x199)]['lineTo'](_0x5a4d8f[0x0],_0x5a4d8f[0x1]);}this[_0x41729a(0x199)][_0x41729a(0x267)]();}}['_tomap'](_0x27804c,_0x27918d,_0x5757de){const _0x3939fd=_0x5c5c3c,_0x82a960=Cesium['Cartesian3'][_0x3939fd(0x190)](_0x27804c,_0x27918d,this['fixedHeight']),_0x5a364e=this['_map']['scene'];if(_0x5a364e['mode']===Cesium['SceneMode']['SCENE3D']){const _0x3b6781=new Cesium['EllipsoidalOccluder'](_0x5a364e[_0x3939fd(0x184)]['ellipsoid'],_0x5a364e['camera']['positionWC']),_0x28be87=_0x3b6781[_0x3939fd(0x22c)](_0x82a960);if(!_0x28be87)return _0x5757de[_0x3939fd(0x211)]=0x0,null;}const _0x39bb20=Cesium['SceneTransforms'][_0x3939fd(0x1c2)](this['_map'][_0x3939fd(0x206)],_0x82a960);return _0x39bb20?[_0x39bb20['x'],_0x39bb20['y']]:null;}['clear'](){const _0x109585=_0x5c5c3c;this[_0x109585(0x1eb)][_0x109585(0x202)](),delete this['windData'];}['initWorker'](){const _0x166783=_0x5c5c3c;this[_0x166783(0x1a3)]=new Worker(this['options']['worker']),this['worker'][_0x166783(0x26c)]=_0x28baf1=>{const _0x575215=_0x166783;this[_0x575215(0x233)](_0x28baf1['data']['particles']),this[_0x575215(0x203)]=![];},this['windField']={'init':_0x10b194=>{const _0x5aa1c4=_0x166783;this['worker'][_0x5aa1c4(0x19c)]({'type':_0x5aa1c4(0x1a7),'options':_0x10b194});},'setOptions':_0xd96877=>{const _0x33a287=_0x166783;this[_0x33a287(0x1a3)]['postMessage']({'type':'setOptions','options':_0xd96877});},'setDate':_0x302543=>{const _0x2639ae=_0x166783;this['worker'][_0x2639ae(0x19c)]({'type':'setDate','data':_0x302543});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0xb1f33f=_0x166783;this[_0xb1f33f(0x1a3)][_0xb1f33f(0x19c)]({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x5c5c3c(0x24e)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x5c5c3c(0x180)]=WindLayer,exports[_0x5c5c3c(0x209)]=WindUtil,Object[_0x5c5c3c(0x22f)](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-wind",
3
- "version": "3.6.4",
3
+ "version": "3.6.6",
4
4
  "description": "Mars3D平台插件,支持气象 风向图 功能插件",
5
5
  "main": "dist/mars3d-wind.js",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "peerDependencies": {},
10
10
  "devDependencies": {
11
- "mars3d": "~3.6.4"
11
+ "mars3d": "~3.6.6"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "eslint ./src/**/*.{js,ts} --fix"