mars3d-wind 3.6.2 → 3.6.3
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.
- package/dist/mars3d-wind.js +3 -3
- package/package.json +2 -2
package/dist/mars3d-wind.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.6.
|
|
5
|
-
* 编译日期:2023-08-
|
|
4
|
+
* 版本信息:v3.6.3
|
|
5
|
+
* 编译日期:2023-08-29 15:40: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 _0x2156a7=_0x4707;(function(_0x3290e3,_0x3b2a54){const _0x3f6303=_0x4707,_0x493e20=_0x3290e3();while(!![]){try{const _0x416f8e=parseInt(_0x3f6303(0x18b))/0x1*(parseInt(_0x3f6303(0x19c))/0x2)+parseInt(_0x3f6303(0x1c2))/0x3*(-parseInt(_0x3f6303(0x170))/0x4)+parseInt(_0x3f6303(0x1de))/0x5*(-parseInt(_0x3f6303(0x1d1))/0x6)+-parseInt(_0x3f6303(0x180))/0x7+-parseInt(_0x3f6303(0x1b9))/0x8+-parseInt(_0x3f6303(0x130))/0x9+parseInt(_0x3f6303(0x19a))/0xa;if(_0x416f8e===_0x3b2a54)break;else _0x493e20['push'](_0x493e20['shift']());}catch(_0x243912){_0x493e20['push'](_0x493e20['shift']());}}}(_0x2908,0x6478f));function _interopNamespace(_0x2a3867){const _0x2de94f=_0x4707;if(_0x2a3867&&_0x2a3867['__esModule'])return _0x2a3867;var _0x4d408a=Object['create'](null);return _0x2a3867&&Object[_0x2de94f(0x11d)](_0x2a3867)['forEach'](function(_0x5e0bd6){const _0x373384=_0x2de94f;if(_0x5e0bd6!=='default'){var _0x3bbc8f=Object['getOwnPropertyDescriptor'](_0x2a3867,_0x5e0bd6);Object[_0x373384(0x18a)](_0x4d408a,_0x5e0bd6,_0x3bbc8f['get']?_0x3bbc8f:{'enumerable':!![],'get':function(){return _0x2a3867[_0x5e0bd6];}});}}),_0x4d408a['default']=_0x2a3867,_0x4d408a;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x210761,_0x44f78e){const _0x2667ab=_0x4707,_0x47b29a=_0x210761*Math['cos'](Cesium$7[_0x2667ab(0x1df)]['toRadians'](_0x44f78e));return _0x47b29a;}function getV(_0x101c8b,_0x17ced9){const _0x48fe79=_0x4707,_0x4f6fba=_0x101c8b*Math['sin'](Cesium$7['Math'][_0x48fe79(0x1a3)](_0x17ced9));return _0x4f6fba;}function getSpeed(_0x1d8f67,_0x3038f9){const _0x4e4347=Math['sqrt'](Math['pow'](_0x1d8f67,0x2)+Math['pow'](_0x3038f9,0x2));return _0x4e4347;}function getDirection(_0x39e751,_0x1853e9){const _0x2c3e53=_0x4707;let _0x281eef=Cesium$7[_0x2c3e53(0x1df)]['toDegrees'](Math[_0x2c3e53(0x162)](_0x1853e9,_0x39e751));return _0x281eef+=_0x281eef<0x0?0x168:0x0,_0x281eef;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x42b15a){const _0x5c30ca=_0x4707;this['commandType']=_0x42b15a['commandType'],this[_0x5c30ca(0x1d4)]=_0x42b15a['geometry'],this[_0x5c30ca(0x1c4)]=_0x42b15a['attributeLocations'],this[_0x5c30ca(0x1f0)]=_0x42b15a['primitiveType'],this['uniformMap']=_0x42b15a[_0x5c30ca(0x1e0)],this[_0x5c30ca(0x1bd)]=_0x42b15a['vertexShaderSource'],this['fragmentShaderSource']=_0x42b15a[_0x5c30ca(0x206)],this['rawRenderState']=_0x42b15a['rawRenderState'],this['framebuffer']=_0x42b15a['framebuffer'],this[_0x5c30ca(0x143)]=_0x42b15a['outputTexture'],this['autoClear']=_0x42b15a[_0x5c30ca(0x13b)]??![],this['preExecute']=_0x42b15a[_0x5c30ca(0x15b)],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this[_0x5c30ca(0x173)]=new Cesium$6['ClearCommand']({'color':new Cesium$6[(_0x5c30ca(0x1fa))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x5c30ca(0x17e)][_0x5c30ca(0x174)]}));}['createCommand'](_0x29123c){const _0x20b543=_0x4707;switch(this[_0x20b543(0x1c7)]){case _0x20b543(0x126):{const _0x55b004=Cesium$6[_0x20b543(0x1f4)][_0x20b543(0x1e7)]({'context':_0x29123c,'geometry':this['geometry'],'attributeLocations':this[_0x20b543(0x1c4)],'bufferUsage':Cesium$6['BufferUsage'][_0x20b543(0x1ac)]}),_0x221f97=Cesium$6['ShaderProgram']['fromCache']({'context':_0x29123c,'attributeLocations':this[_0x20b543(0x1c4)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x30c1c4=Cesium$6[_0x20b543(0x184)]['fromCache'](this[_0x20b543(0x1d5)]);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x221f97,'vertexArray':_0x55b004,'modelMatrix':Cesium$6[_0x20b543(0x133)][_0x20b543(0x137)],'renderState':_0x30c1c4,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0x20b543(0x207)],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x20b543(0x14a):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x595959,_0x41d793){const _0x51f2d6=_0x4707;this[_0x51f2d6(0x1d4)]=_0x41d793;const _0x1e5bc4=Cesium$6['VertexArray'][_0x51f2d6(0x1e7)]({'context':_0x595959,'geometry':this['geometry'],'attributeLocations':this[_0x51f2d6(0x1c4)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x1e5bc4;}['update'](_0x1ac89e){const _0x3208b0=_0x4707;if(!this['show'])return;if(_0x1ac89e[_0x3208b0(0x14d)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this[_0x3208b0(0x177)])&&(this[_0x3208b0(0x177)]=this['createCommand'](_0x1ac89e['context'])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x1ac89e['commandList'][_0x3208b0(0x1be)](this[_0x3208b0(0x173)]),_0x1ac89e['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x2d8a74=_0x4707;if(this['clearCommand']){var _0x2eff53,_0xb6ebe;(_0x2eff53=this['clearCommand'])!==null&&_0x2eff53!==void 0x0&&_0x2eff53[_0x2d8a74(0x15d)]&&this['clearCommand'][_0x2d8a74(0x15d)]['destroy'](),(_0xb6ebe=this['clearCommand'])!==null&&_0xb6ebe!==void 0x0&&_0xb6ebe['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this[_0x2d8a74(0x177)]&&(this[_0x2d8a74(0x177)][_0x2d8a74(0x15d)]&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0x2d8a74(0x16b)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x371732=function(){const _0x55b443=_0x4707,_0x1b099f=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x55b443(0x188))]({'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[(_0x55b443(0x125))]({'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 _0x1b099f;},_0x2f8465=function(_0x1fb82e,_0x2bbc1c){const _0x323d9d=_0x4707;if(Cesium$5['defined'](_0x2bbc1c)){const _0x1cc056={};_0x1cc056['arrayBufferView']=_0x2bbc1c,_0x1fb82e[_0x323d9d(0x17f)]=_0x1cc056;}const _0x1e273f=new Cesium$5[(_0x323d9d(0x1c9))](_0x1fb82e);return _0x1e273f;},_0x18aa85=function(_0x60c914,_0x4ebf89,_0x2527a8){const _0x2dd5a7=_0x4707,_0x43afe6=new Cesium$5[(_0x2dd5a7(0x146))]({'context':_0x60c914,'colorTextures':[_0x4ebf89],'depthTexture':_0x2527a8});return _0x43afe6;},_0x2e49e8=function(_0x59c739){const _0x404c2f=_0x4707,_0x3d9c8f=!![],_0x1fe5bc=![],_0x1e160c={'viewport':_0x59c739[_0x404c2f(0x179)],'depthTest':_0x59c739[_0x404c2f(0x19f)],'depthMask':_0x59c739[_0x404c2f(0x19e)],'blending':_0x59c739['blending']},_0x2569e2=Cesium$5['Appearance'][_0x404c2f(0x1ba)](_0x3d9c8f,_0x1fe5bc,_0x1e160c);return _0x2569e2;},_0xd327e9=function(_0x3c83e7){const _0x410041=_0x4707,_0x3d7818={},_0x5e58ce=Cesium$5['Math']['mod'](_0x3c83e7['west'],Cesium$5['Math']['TWO_PI']),_0x41f973=Cesium$5['Math'][_0x410041(0x11f)](_0x3c83e7['east'],Cesium$5['Math']['TWO_PI']),_0x4b2422=_0x3c83e7[_0x410041(0x156)];let _0x5a2d20,_0x13e177;_0x4b2422>Cesium$5[_0x410041(0x1df)][_0x410041(0x1b1)]?(_0x5a2d20=0x0,_0x13e177=Cesium$5['Math'][_0x410041(0x1b2)]):_0x41f973-_0x5e58ce<_0x4b2422?(_0x5a2d20=_0x5e58ce,_0x13e177=_0x5e58ce+_0x4b2422):(_0x5a2d20=_0x5e58ce,_0x13e177=_0x41f973);_0x3d7818['lon']={'min':Cesium$5[_0x410041(0x1df)][_0x410041(0x129)](_0x5a2d20),'max':Cesium$5['Math']['toDegrees'](_0x13e177)};const _0x33a1ec=_0x3c83e7['south'],_0xcdbb42=_0x3c83e7['north'],_0x5c488b=_0x3c83e7[_0x410041(0x200)],_0x120b9d=_0x5c488b>Cesium$5[_0x410041(0x1df)]['PI']/0xc?_0x5c488b/0x2:0x0;let _0xc704c9=Cesium$5[_0x410041(0x1df)][_0x410041(0x202)](_0x33a1ec-_0x120b9d),_0x56a358=Cesium$5[_0x410041(0x1df)]['clampToLatitudeRange'](_0xcdbb42+_0x120b9d);return _0xc704c9<-Cesium$5['Math']['PI_OVER_THREE']&&(_0xc704c9=-Cesium$5['Math']['PI_OVER_TWO']),_0x56a358>Cesium$5['Math']['PI_OVER_THREE']&&(_0x56a358=Cesium$5['Math']['PI_OVER_TWO']),_0x3d7818['lat']={'min':Cesium$5[_0x410041(0x1df)]['toDegrees'](_0xc704c9),'max':Cesium$5['Math'][_0x410041(0x129)](_0x56a358)},_0x3d7818;};return{'getFullscreenQuad':_0x371732,'createTexture':_0x2f8465,'createFramebuffer':_0x18aa85,'createRawRenderState':_0x2e49e8,'viewRectangleToLonLatRange':_0xd327e9};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag=_0x2156a7(0x1c8);const Cesium$4=mars3d__namespace[_0x2156a7(0x1ea)];class ParticlesRendering{constructor(_0x56690f,_0x35a4b1,_0xc37b01,_0x47a7ec,_0x2e625e){this['createRenderingTextures'](_0x56690f,_0x35a4b1,_0xc37b01['colors']),this['createRenderingFramebuffers'](_0x56690f),this['createRenderingPrimitives'](_0x56690f,_0xc37b01,_0x47a7ec,_0x2e625e);}['createRenderingTextures'](_0x414362,_0x548fb2,_0x28e003){const _0x3b58b8=_0x2156a7,_0x2d449d={'context':_0x414362,'width':_0x414362['drawingBufferWidth'],'height':_0x414362['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x3b58b8(0x1ff)]},_0x496514={'context':_0x414362,'width':_0x414362['drawingBufferWidth'],'height':_0x414362['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x40555f=_0x28e003[_0x3b58b8(0x152)],_0x189460=new Float32Array(_0x40555f*0x3);for(let _0x43962b=0x0;_0x43962b<_0x40555f;_0x43962b++){const _0x2e5851=Cesium$4['Color']['fromCssColorString'](_0x28e003[_0x43962b]);_0x189460[0x3*_0x43962b]=_0x2e5851['red'],_0x189460[0x3*_0x43962b+0x1]=_0x2e5851['green'],_0x189460[0x3*_0x43962b+0x2]=_0x2e5851[_0x3b58b8(0x199)];}const _0x163383={'context':_0x414362,'width':_0x40555f,'height':0x1,'pixelFormat':Cesium$4['PixelFormat'][_0x3b58b8(0x168)],'pixelDatatype':Cesium$4[_0x3b58b8(0x131)][_0x3b58b8(0x1e1)],'sampler':new Cesium$4[(_0x3b58b8(0x13d))]({'minificationFilter':Cesium$4[_0x3b58b8(0x172)]['LINEAR'],'magnificationFilter':Cesium$4[_0x3b58b8(0x1b5)][_0x3b58b8(0x15a)]})};this['textures']={'segmentsColor':Util[_0x3b58b8(0x1f2)](_0x2d449d),'segmentsDepth':Util['createTexture'](_0x496514),'currentTrailsColor':Util['createTexture'](_0x2d449d),'currentTrailsDepth':Util['createTexture'](_0x496514),'nextTrailsColor':Util['createTexture'](_0x2d449d),'nextTrailsDepth':Util['createTexture'](_0x496514),'colorTable':Util[_0x3b58b8(0x1f2)](_0x163383,_0x189460)};}['createRenderingFramebuffers'](_0x4e9358){const _0x481a84=_0x2156a7;this['framebuffers']={'segments':Util['createFramebuffer'](_0x4e9358,this['textures']['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x4e9358,this['textures']['currentTrailsColor'],this['textures']['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x4e9358,this[_0x481a84(0x175)]['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}[_0x2156a7(0x1fc)](_0xd6d173){const _0x3d4ae7=_0x2156a7,_0x48608e=0x4;let _0x435852=[];for(let _0x2852a3=0x0;_0x2852a3<_0xd6d173[_0x3d4ae7(0x1e9)];_0x2852a3++){for(let _0x36e342=0x0;_0x36e342<_0xd6d173['particlesTextureSize'];_0x36e342++){for(let _0x158c89=0x0;_0x158c89<_0x48608e;_0x158c89++){_0x435852['push'](_0x2852a3/_0xd6d173[_0x3d4ae7(0x1e9)]),_0x435852['push'](_0x36e342/_0xd6d173[_0x3d4ae7(0x1e9)]);}}}_0x435852=new Float32Array(_0x435852);let _0x11600c=[];const _0x12cdd7=[-0x1,0x1],_0xa4d26f=[-0x1,0x1];for(let _0x27212e=0x0;_0x27212e<_0xd6d173['maxParticles'];_0x27212e++){for(let _0x4c4809=0x0;_0x4c4809<_0x48608e/0x2;_0x4c4809++){for(let _0x394962=0x0;_0x394962<_0x48608e/0x2;_0x394962++){_0x11600c[_0x3d4ae7(0x1be)](_0x12cdd7[_0x4c4809]),_0x11600c['push'](_0xa4d26f[_0x394962]),_0x11600c[_0x3d4ae7(0x1be)](0x0);}}}_0x11600c=new Float32Array(_0x11600c);const _0x368001=0x6*_0xd6d173[_0x3d4ae7(0x1eb)],_0x58e32e=new Uint32Array(_0x368001);for(let _0x42aae8=0x0,_0x27c0fc=0x0,_0x367c80=0x0;_0x42aae8<_0xd6d173['maxParticles'];_0x42aae8++){_0x58e32e[_0x27c0fc++]=_0x367c80+0x0,_0x58e32e[_0x27c0fc++]=_0x367c80+0x1,_0x58e32e[_0x27c0fc++]=_0x367c80+0x2,_0x58e32e[_0x27c0fc++]=_0x367c80+0x2,_0x58e32e[_0x27c0fc++]=_0x367c80+0x1,_0x58e32e[_0x27c0fc++]=_0x367c80+0x3,_0x367c80+=0x4;}const _0x1108e5=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x3d4ae7(0x11e)]['FLOAT'],'componentsPerAttribute':0x2,'values':_0x435852}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x11600c})}),'indices':_0x58e32e});return _0x1108e5;}[_0x2156a7(0x1cb)](_0x34184c,_0x2b52da,_0x34ee91,_0xc29853){const _0x90af35=_0x2156a7,_0xc257ec=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x2b52da),'primitiveType':Cesium$4[_0x90af35(0x1bb)][_0x90af35(0x185)],'uniformMap':{'currentParticlesPosition':function(){return _0xc29853['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x37c387=_0x90af35;return _0xc29853[_0x37c387(0x18e)]['postProcessingPosition'];},'postProcessingSpeed':function(){return _0xc29853['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x457eb4=_0x90af35;return _0xc257ec[_0x457eb4(0x175)]['colorTable'];},'aspect':function(){const _0x5d8a82=_0x90af35;return _0x34184c[_0x5d8a82(0x1ae)]/_0x34184c['drawingBufferHeight'];},'pixelSize':function(){return _0x34ee91['pixelSize'];},'lineWidth':function(){return _0x2b52da['lineWidth'];},'particleHeight':function(){const _0x20ae3e=_0x90af35;return _0x2b52da[_0x20ae3e(0x1e8)];}},'vertexShaderSource':new Cesium$4[(_0x90af35(0x165))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x90af35(0x1b6)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0xc257ec['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x301063=_0x90af35;return _0xc257ec['textures'][_0x301063(0x114)];},'currentTrailsColor':function(){const _0x4f152c=_0x90af35;return _0xc257ec['framebuffers']['currentTrails'][_0x4f152c(0x19b)](0x0);},'trailsDepthTexture':function(){const _0x2d4553=_0x90af35;return _0xc257ec[_0x2d4553(0x169)][_0x2d4553(0x198)]['depthTexture'];},'fadeOpacity':function(){return _0x2b52da['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x90af35(0x165))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x15bed4=_0x90af35,_0x7767fc=_0xc257ec['framebuffers'][_0x15bed4(0x198)];_0xc257ec[_0x15bed4(0x169)]['currentTrails']=_0xc257ec['framebuffers']['nextTrails'],_0xc257ec[_0x15bed4(0x169)]['nextTrails']=_0x7767fc,_0xc257ec['primitives']['trails'][_0x15bed4(0x177)]['framebuffer']=_0xc257ec['framebuffers']['nextTrails'],_0xc257ec[_0x15bed4(0x19d)]['trails'][_0x15bed4(0x173)][_0x15bed4(0x207)]=_0xc257ec[_0x15bed4(0x169)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x1a6419=_0x90af35;return _0xc257ec['framebuffers']['nextTrails'][_0x1a6419(0x19b)](0x0);},'trailsDepthTexture':function(){const _0x194511=_0x90af35;return _0xc257ec[_0x194511(0x169)]['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x90af35(0x165))]({'defines':[_0x90af35(0x18f)],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x90af35(0x1f6)]({'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=_0x2156a7(0x17a),postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';function _0x2908(){const _0x56966e=['_speedRate','lat','getWind','GeometryAttribute','Draw','grid','__esModule','toDegrees','floor','_canrefresh','_pointerEvents','setDate','mouse_down','wheel','2327112RPZVve','PixelDatatype','auto','Matrix4','SceneMode','worker','setOptions','IDENTITY','lng','clear','forEach','autoClear','CanvasWindField','Sampler','postProcessingSpeed','_setOptionsHook','scene','ellipsoid','colors','outputTexture','abs','cols','Framebuffer','remove','windData','lon','Compute','fromDegrees','age','mode','mouseMove','_updateIng2','_onMap_preRenderEvent','ymax','length','mouseHidden','_map','context','width','getColor','sqrt','particles','LINEAR','preExecute','min','vertexArray','getExtent','xmin','rows','clientWidth','atan2','animateFrame','getUVByPoint','ShaderSource','segments','CanvasWindLayer','RGB','framebuffers','data','destroy','fixedHeight','SCENE3D','postProcessingPosition','pointerEvents','956JqYZYZ','steps','TextureMinificationFilter','clearCommand','OPAQUE','textures','colorTable','commandToExecute','stroke','viewport','uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a','canvasWidth','lineWidth','getPixelSize','Pass','source','4958422FtJQYg','currentParticlesSpeed','lev','visibility','RenderState','TRIANGLES','top','position','GeometryAttributes','_onMouseUpEvent','defineProperty','403VTpsEy','createWindTextures','update','particlesTextures','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','vmax','add','drawingBufferHeight','vdata','_removedHook','removeEventListener','windField','options','currentTrails','blue','32637290hafVhA','getColorTexture','432oxcMQF','primitives','depthMask','depthTest','canvasContext','hidden','viewerParameters','toRadians','EventType','max','dropRateBump','speedRate','show','canvasResize','speed','all','STATIC_DRAW','particlesRendering','drawingBufferWidth','ymin','currentParticlesPosition','THREE_PI_OVER_TWO','TWO_PI','postMessage','dimensions','TextureMagnificationFilter','getFullscreenQuad','setData','container','5046536wJZILL','getDefaultRenderState','PrimitiveType','visible','vertexShaderSource','push','NEAREST','udata','lonRange','7269uaXFoF','createParticlesTextures','attributeLocations','absolute','tlat','commandType','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','Texture','WindLayer','createRenderingPrimitives','off','particlesNumber','initWorker','frameTime','positionWC','49188FyHIth','canvasHeight','strokeStyle','geometry','rawRenderState','Cartesian2','BaseLayer','rgb(206,255,255)','PixelFormat','Cartesian3','particlesWind','resize','mouseDown','465aAizdM','Math','uniformMap','FLOAT','mouseUp','getOptions','particlesComputing','refreshParticles','onmessage','fromGeometry','particleHeight','particlesTextureSize','Cesium','maxParticles','isPointVisible','globeBoundingSphere','_drawLines','_addedHook','primitiveType','canvas','createTexture','maxAge','VertexArray','particleSystem','createRawRenderState','xmax','addEventListener','_data','Color','_onMapWhellEvent','createSegmentsGeometry','getUVByXY','fadeOpacity','UNSIGNED_BYTE','height','init','clampToLatitudeRange','array','canrefresh','windTextures','fragmentShaderSource','framebuffer','clientHeight','style','_onMouseMoveEvent','camera','_bilinearInterpolation','segmentsDepth','reverseY','_tomap','updatePosition','beginPath','umin','redraw','_onMouseDownEvent','applyViewerParameters','keys','ComponentDatatype','mod','_mountedHook','mouse_move'];_0x2908=function(){return _0x56966e;};return _0x2908();}const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x4fbda8,_0x39c6d0,_0x2a7aee,_0x1866ac){const _0x52e0e7=_0x2156a7;this['data']=_0x39c6d0,this[_0x52e0e7(0x18c)](_0x4fbda8,_0x39c6d0),this['createParticlesTextures'](_0x4fbda8,_0x2a7aee,_0x1866ac),this['createComputingPrimitives'](_0x39c6d0,_0x2a7aee,_0x1866ac);}['createWindTextures'](_0x135c2d,_0x16ec37){const _0x5a6338=_0x2156a7,_0x6f206f={'context':_0x135c2d,'width':_0x16ec37[_0x5a6338(0x1b4)][_0x5a6338(0x149)],'height':_0x16ec37['dimensions']['lat']*(_0x16ec37[_0x5a6338(0x1b4)]['lev']||0x1),'pixelFormat':Cesium$3[_0x5a6338(0x1d9)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x5a6338(0x13d))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x5a6338(0x1bf)]})};this['windTextures']={'U':Util['createTexture'](_0x6f206f,_0x16ec37['U'][_0x5a6338(0x203)]),'V':Util['createTexture'](_0x6f206f,_0x16ec37['V'][_0x5a6338(0x203)])};}['createParticlesTextures'](_0x22905e,_0x353546,_0x16167d){const _0xa6d1c1=_0x2156a7,_0x7ebc18={'context':_0x22905e,'width':_0x353546[_0xa6d1c1(0x1e9)],'height':_0x353546['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0xa6d1c1(0x13d))]({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0xa6d1c1(0x1bf)],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0xa6d1c1(0x1bf)]})},_0x1f6b5e=this['randomizeParticles'](_0x353546[_0xa6d1c1(0x1eb)],_0x16167d),_0x3ebc8b=new Float32Array(0x4*_0x353546['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x7ebc18),'currentParticlesPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'nextParticlesPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'currentParticlesSpeed':Util[_0xa6d1c1(0x1f2)](_0x7ebc18,_0x3ebc8b),'nextParticlesSpeed':Util['createTexture'](_0x7ebc18,_0x3ebc8b),'postProcessingPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'postProcessingSpeed':Util['createTexture'](_0x7ebc18,_0x3ebc8b)};}['randomizeParticles'](_0x115665,_0x255cb9){const _0x23d148=_0x2156a7,_0xb713db=new Float32Array(0x4*_0x115665);for(let _0x262df8=0x0;_0x262df8<_0x115665;_0x262df8++){_0xb713db[0x4*_0x262df8]=Cesium$3['Math']['randomBetween'](_0x255cb9['lonRange']['x'],_0x255cb9['lonRange']['y']),_0xb713db[0x4*_0x262df8+0x1]=Cesium$3[_0x23d148(0x1df)]['randomBetween'](_0x255cb9['latRange']['x'],_0x255cb9['latRange']['y']),_0xb713db[0x4*_0x262df8+0x2]=Cesium$3['Math']['randomBetween'](this['data']['lev']['min'],this['data']['lev']['max']),_0xb713db[0x4*_0x262df8+0x3]=0x0;}return _0xb713db;}['destroyParticlesTextures'](){const _0x22c37e=_0x2156a7;Object['keys'](this['particlesTextures'])[_0x22c37e(0x13a)](_0x5d3e66=>{this['particlesTextures'][_0x5d3e66]['destroy']();});}['createComputingPrimitives'](_0x421fae,_0x3919dd,_0x50c952){const _0x26de1a=_0x2156a7,_0x3735f3=new Cesium$3['Cartesian3'](_0x421fae['dimensions']['lon'],_0x421fae['dimensions']['lat'],_0x421fae['dimensions'][_0x26de1a(0x182)]),_0x82e48b=new Cesium$3['Cartesian3'](_0x421fae['lon']['min'],_0x421fae['lat']['min'],_0x421fae[_0x26de1a(0x182)]['min']),_0x49083e=new Cesium$3['Cartesian3'](_0x421fae['lon']['max'],_0x421fae['lat']['max'],_0x421fae['lev'][_0x26de1a(0x1a5)]),_0x40f28a=new Cesium$3['Cartesian3']((_0x49083e['x']-_0x82e48b['x'])/(_0x3735f3['x']-0x1),(_0x49083e['y']-_0x82e48b['y'])/(_0x3735f3['y']-0x1),_0x3735f3['z']>0x1?(_0x49083e['z']-_0x82e48b['z'])/(_0x3735f3['z']-0x1):0x1),_0x5bbca3=new Cesium$3[(_0x26de1a(0x1d6))](_0x421fae['U'][_0x26de1a(0x15c)],_0x421fae['U'][_0x26de1a(0x1a5)]),_0x511681=new Cesium$3['Cartesian2'](_0x421fae['V']['min'],_0x421fae['V'][_0x26de1a(0x1a5)]),_0x3be6b0=this;this[_0x26de1a(0x19d)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x3be6b0['windTextures']['U'];},'V':function(){return _0x3be6b0['windTextures']['V'];},'currentParticlesPosition':function(){const _0x2b444c=_0x26de1a;return _0x3be6b0[_0x2b444c(0x18e)]['currentParticlesPosition'];},'dimension':function(){return _0x3735f3;},'minimum':function(){return _0x82e48b;},'maximum':function(){return _0x49083e;},'interval':function(){return _0x40f28a;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x26de1a(0x1db)],'preExecute':function(){const _0x35694f=_0x26de1a;_0x3be6b0['primitives']['getWind'][_0x35694f(0x177)]['outputTexture']=_0x3be6b0['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x26557a=_0x26de1a;return _0x3be6b0['particlesTextures'][_0x26557a(0x181)];},'particlesWind':function(){const _0x32f760=_0x26de1a;return _0x3be6b0[_0x32f760(0x18e)][_0x32f760(0x1db)];},'uSpeedRange':function(){return _0x5bbca3;},'vSpeedRange':function(){return _0x511681;},'pixelSize':function(){return _0x50c952['pixelSize'];},'speedFactor':function(){return _0x3919dd['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x3d9025=_0x26de1a,_0x2e20f1=_0x3be6b0['particlesTextures']['currentParticlesSpeed'];_0x3be6b0['particlesTextures']['currentParticlesSpeed']=_0x3be6b0['particlesTextures']['postProcessingSpeed'],_0x3be6b0[_0x3d9025(0x18e)]['postProcessingSpeed']=_0x2e20f1,_0x3be6b0['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x3be6b0['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x3be6b0['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x454adb=_0x26de1a;return _0x3be6b0['particlesTextures'][_0x454adb(0x181)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x448734=_0x26de1a,_0x330b4b=_0x3be6b0[_0x448734(0x18e)][_0x448734(0x1b0)];_0x3be6b0[_0x448734(0x18e)]['currentParticlesPosition']=_0x3be6b0['particlesTextures']['postProcessingPosition'],_0x3be6b0['particlesTextures']['postProcessingPosition']=_0x330b4b,_0x3be6b0['primitives'][_0x448734(0x117)][_0x448734(0x177)][_0x448734(0x143)]=_0x3be6b0['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x3be6b0['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x3be6b0['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x5a23c8=_0x26de1a;return _0x50c952[_0x5a23c8(0x1c1)];},'latRange':function(){return _0x50c952['latRange'];},'randomCoefficient':function(){const _0x275af5=Math['random']();return _0x275af5;},'dropRate':function(){return _0x3919dd['dropRate'];},'dropRateBump':function(){const _0xae8ebb=_0x26de1a;return _0x3919dd[_0xae8ebb(0x1a6)];}},'fragmentShaderSource':new Cesium$3[(_0x26de1a(0x165))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x26de1a(0x18e)][_0x26de1a(0x16e)],'preExecute':function(){const _0x799650=_0x26de1a;_0x3be6b0['primitives'][_0x799650(0x16e)]['commandToExecute'][_0x799650(0x143)]=_0x3be6b0[_0x799650(0x18e)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x3be6b0['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x3be6b0['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x21f5f9=_0x26de1a;_0x3be6b0[_0x21f5f9(0x19d)]['postProcessingSpeed'][_0x21f5f9(0x177)]['outputTexture']=_0x3be6b0['particlesTextures'][_0x21f5f9(0x13e)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x1471ba,_0x4134f8,_0xce899d,_0x4da672){const _0x4c99d0=_0x2156a7;this['context']=_0x1471ba,_0x4134f8={..._0x4134f8},_0x4134f8[_0x4c99d0(0x1c0)]&&_0x4134f8['vdata']&&(_0x4134f8[_0x4c99d0(0x1b4)]={},_0x4134f8['dimensions']['lon']=_0x4134f8['cols'],_0x4134f8['dimensions']['lat']=_0x4134f8['rows'],_0x4134f8['dimensions']['lev']=_0x4134f8[_0x4c99d0(0x182)]||0x1,_0x4134f8[_0x4c99d0(0x149)]={},_0x4134f8[_0x4c99d0(0x149)]['min']=_0x4134f8['xmin'],_0x4134f8['lon'][_0x4c99d0(0x1a5)]=_0x4134f8[_0x4c99d0(0x1f7)],_0x4134f8['lat']={},_0x4134f8[_0x4c99d0(0x123)]['min']=_0x4134f8['ymin'],_0x4134f8['lat'][_0x4c99d0(0x1a5)]=_0x4134f8['ymax'],_0x4134f8['lev']={},_0x4134f8[_0x4c99d0(0x182)]['min']=_0x4134f8['levmin']??0x1,_0x4134f8['lev']['max']=_0x4134f8['levmax']??0x1,_0x4134f8['U']={},_0x4134f8['U']['array']=new Float32Array(_0x4134f8['udata']),_0x4134f8['U']['min']=_0x4134f8[_0x4c99d0(0x119)]??Math['min'](..._0x4134f8['udata']),_0x4134f8['U'][_0x4c99d0(0x1a5)]=_0x4134f8['umax']??Math['max'](..._0x4134f8['udata']),_0x4134f8['V']={},_0x4134f8['V']['array']=new Float32Array(_0x4134f8['vdata']),_0x4134f8['V']['min']=_0x4134f8['vmin']??Math['min'](..._0x4134f8['vdata']),_0x4134f8['V']['max']=_0x4134f8[_0x4c99d0(0x190)]??Math['max'](..._0x4134f8[_0x4c99d0(0x193)])),this['data']=_0x4134f8,this[_0x4c99d0(0x197)]=_0xce899d,this['viewerParameters']=_0x4da672,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this[_0x4c99d0(0x16a)],this[_0x4c99d0(0x197)],this['viewerParameters'],this[_0x4c99d0(0x1e4)]);}['canvasResize'](_0x394457){const _0xd8de5c=_0x2156a7;this['particlesComputing']['destroyParticlesTextures'](),Object[_0xd8de5c(0x11d)](this['particlesComputing'][_0xd8de5c(0x205)])['forEach'](_0x1a2172=>{const _0x20deb5=_0xd8de5c;this[_0x20deb5(0x1e4)]['windTextures'][_0x1a2172][_0x20deb5(0x16b)]();}),this[_0xd8de5c(0x1ad)]['textures'][_0xd8de5c(0x176)]['destroy'](),Object['keys'](this[_0xd8de5c(0x1ad)]['framebuffers'])['forEach'](_0x5f0d11=>{const _0x1ca995=_0xd8de5c;this[_0x1ca995(0x1ad)]['framebuffers'][_0x5f0d11]['destroy']();}),this['context']=_0x394457,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0xd8de5c(0x1a2)]),this[_0xd8de5c(0x1ad)]=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x43c5d6=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'](_0x290b37=>{_0x43c5d6['framebuffer']=this['particlesRendering']['framebuffers'][_0x290b37],_0x43c5d6['execute'](this['context']);});}[_0x2156a7(0x1e5)](_0x365dff){const _0x2b0b84=_0x2156a7;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this[_0x2b0b84(0x1e4)][_0x2b0b84(0x1c3)](this[_0x2b0b84(0x155)],this['options'],this['viewerParameters']);if(_0x365dff){var _0x26a33b,_0x52ade3;const _0x603e6c=this['particlesRendering']['createSegmentsGeometry'](this['options']);this[_0x2b0b84(0x1ad)]['primitives']['segments']['geometry']=_0x603e6c;const _0x483df5=Cesium$2[_0x2b0b84(0x1f4)][_0x2b0b84(0x1e7)]({'context':this['context'],'geometry':_0x603e6c,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});(_0x26a33b=this['particlesRendering'][_0x2b0b84(0x19d)])!==null&&_0x26a33b!==void 0x0&&(_0x52ade3=_0x26a33b['segments'])!==null&&_0x52ade3!==void 0x0&&_0x52ade3['commandToExecute']&&(this['particlesRendering']['primitives'][_0x2b0b84(0x166)][_0x2b0b84(0x177)]['vertexArray']=_0x483df5);}}['setOptions'](_0x1bb046){const _0x78b6ed=_0x2156a7;let _0x28175c=![];this['options']['maxParticles']!==_0x1bb046[_0x78b6ed(0x1eb)]&&(_0x28175c=!![]),Object[_0x78b6ed(0x11d)](_0x1bb046)['forEach'](_0x588f3c=>{this['options'][_0x588f3c]=_0x1bb046[_0x588f3c];}),this['refreshParticles'](_0x28175c);}['applyViewerParameters'](_0x39f194){const _0x5e0298=_0x2156a7;Object['keys'](_0x39f194)['forEach'](_0x26d901=>{const _0x394db5=_0x4707;this[_0x394db5(0x1a2)][_0x26d901]=_0x39f194[_0x26d901];}),this[_0x5e0298(0x1e5)](![]);}['destroy'](){const _0x3dba78=_0x2156a7;clearTimeout(this[_0x3dba78(0x204)]),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x3dba78(0x1e4)]['windTextures'])['forEach'](_0x2f0565=>{const _0x38a432=_0x3dba78;this[_0x38a432(0x1e4)]['windTextures'][_0x2f0565]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this[_0x3dba78(0x1ad)]['framebuffers'])['forEach'](_0x4edc46=>{this['particlesRendering']['framebuffers'][_0x4edc46]['destroy']();});for(const _0x313025 in this){delete this[_0x313025];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x2156a7(0x1d8)]};class WindLayer extends BaseLayer$1{constructor(_0x4b5d13={}){_0x4b5d13={...DEF_OPTIONS,..._0x4b5d13},super(_0x4b5d13),this['_setOptionsHook'](_0x4b5d13);}get['layer'](){return this['primitives'];}get['data'](){const _0x1893d1=_0x2156a7;return this[_0x1893d1(0x1f9)];}set['data'](_0x2819df){const _0x5c1f69=_0x2156a7;this[_0x5c1f69(0x1b7)](_0x2819df);}get[_0x2156a7(0x142)](){const _0x2243f2=_0x2156a7;return this[_0x2243f2(0x197)]['colors'];}set['colors'](_0x17a8e4){const _0x495346=_0x2156a7;this[_0x495346(0x197)]['colors']=_0x17a8e4,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x17a8e4}),this['resize']();}[_0x2156a7(0x120)](){}[_0x2156a7(0x1ef)](){const _0x48ba94=_0x2156a7;this[_0x48ba94(0x140)]=this['_map']['scene'],this[_0x48ba94(0x20b)]=this['_map'][_0x48ba94(0x20b)],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives'][_0x48ba94(0x191)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1[(_0x48ba94(0x1d6))](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x48ba94(0x1ed)]=new Cesium$1['BoundingSphere'](Cesium$1[_0x48ba94(0x1da)]['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window[_0x48ba94(0x1f8)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x48ba94(0x154)]['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x48ba94(0x11b)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x48ba94(0x14e)],this[_0x48ba94(0x20a)],this),this['_data']&&this[_0x48ba94(0x1b7)](this['_data']);}[_0x2156a7(0x194)](){const _0x31e695=_0x2156a7;window[_0x31e695(0x195)]('resize',this['resize']),this['_map']['off'](mars3d__namespace['EventType']['preRender'],this[_0x31e695(0x150)],this),this[_0x31e695(0x154)]['off'](mars3d__namespace['EventType'][_0x31e695(0x12f)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this[_0x31e695(0x189)],this),this[_0x31e695(0x154)]['off'](mars3d__namespace['EventType'][_0x31e695(0x14e)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this['_map']['scene']['primitives'][_0x31e695(0x147)](this['primitives']);}['resize'](){const _0x6e1712=_0x2156a7;if(!this[_0x6e1712(0x1a8)]||!this[_0x6e1712(0x1f5)])return;this[_0x6e1712(0x19d)][_0x6e1712(0x1a8)]=![],this[_0x6e1712(0x19d)]['removeAll'](),this[_0x6e1712(0x154)]['once'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}[_0x2156a7(0x150)](_0x124d6c){const _0x6e3749=_0x2156a7;this['particleSystem'][_0x6e3749(0x1a9)](this['scene'][_0x6e3749(0x155)]),this['addPrimitives'](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x35d5a9){const _0xcca857=_0x2156a7;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0xcca857(0x1f5)])return;this[_0xcca857(0x19d)]['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x7f33){const _0x20e988=_0x2156a7;this[_0x20e988(0x12e)]=!![];}['_onMouseMoveEvent'](_0x3f64d1){const _0x927fce=_0x2156a7;if(!this['show']||!this['particleSystem'])return;this[_0x927fce(0x12e)]&&(this['primitives'][_0x927fce(0x1a8)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5bf4bd){const _0xeb1e87=_0x2156a7;if(!this['show']||!this[_0xeb1e87(0x1f5)])return;this[_0xeb1e87(0x12e)]&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this[_0xeb1e87(0x121)]=![];}['redraw'](){const _0x1cb3a0=_0x2156a7;if(!this[_0x1cb3a0(0x154)]||!this['show'])return;this['updateViewerParameters'](),this['particleSystem'][_0x1cb3a0(0x11c)](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x26849b){const _0x15047d=_0x2156a7;this['_data']=_0x26849b,this['particleSystem']&&this['particleSystem']['destroy'](),this[_0x15047d(0x1f5)]=new ParticleSystem(this['scene']['context'],_0x26849b,this[_0x15047d(0x1e3)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x2c11a6,_0x2f399c){const _0x4b34ea=_0x2156a7;if(_0x2c11a6)for(const _0x1b7b60 in _0x2c11a6){this[_0x1b7b60]=_0x2c11a6[_0x1b7b60];}this[_0x4b34ea(0x1f5)]&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x596fb3=_0x2156a7,_0x118ba5=Math['ceil'](Math['sqrt'](this[_0x596fb3(0x1cd)]));return this['particlesNumber']=_0x118ba5*_0x118ba5,{'particlesTextureSize':_0x118ba5,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x596fb3(0x16c)],'fadeOpacity':this[_0x596fb3(0x1fe)],'dropRate':this['dropRate'],'dropRateBump':this[_0x596fb3(0x1a6)],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x2ec673=_0x2156a7;this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x2ec673(0x19d)][_0x2ec673(0x124)]),this['primitives']['add'](this[_0x2ec673(0x1f5)]['particlesComputing']['primitives']['updateSpeed']),this[_0x2ec673(0x19d)]['add'](this[_0x2ec673(0x1f5)]['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem'][_0x2ec673(0x1e4)]['primitives']['postProcessingPosition']),this['primitives'][_0x2ec673(0x191)](this['particleSystem']['particlesComputing'][_0x2ec673(0x19d)]['postProcessingSpeed']),this[_0x2ec673(0x19d)]['add'](this[_0x2ec673(0x1f5)]['particlesRendering'][_0x2ec673(0x19d)]['segments']),this[_0x2ec673(0x19d)]['add'](this['particleSystem']['particlesRendering'][_0x2ec673(0x19d)]['trails']),this['primitives'][_0x2ec673(0x191)](this[_0x2ec673(0x1f5)]['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0xd5abb9=_0x2156a7;let _0x5ea35d=this['camera']['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x5ea35d){const _0x474e0d=this[_0xd5abb9(0x154)][_0xd5abb9(0x15e)]();_0x5ea35d=Cesium$1['Rectangle']['fromDegrees'](_0x474e0d['xmin'],_0x474e0d[_0xd5abb9(0x1af)],_0x474e0d['xmax'],_0x474e0d[_0xd5abb9(0x151)]);}const _0x191392=Util['viewRectangleToLonLatRange'](_0x5ea35d);this['viewerParameters']['lonRange']['x']=_0x191392[_0xd5abb9(0x149)][_0xd5abb9(0x15c)],this['viewerParameters']['lonRange']['y']=_0x191392[_0xd5abb9(0x149)]['max'],this[_0xd5abb9(0x1a2)]['latRange']['x']=_0x191392[_0xd5abb9(0x123)]['min'],this[_0xd5abb9(0x1a2)]['latRange']['y']=_0x191392['lat']['max'];const _0x345da8=this['camera'][_0xd5abb9(0x17d)](this[_0xd5abb9(0x1ed)],this['scene']['drawingBufferWidth'],this[_0xd5abb9(0x140)][_0xd5abb9(0x192)]);_0x345da8>0x0&&(this['viewerParameters']['pixelSize']=_0x345da8);}}function _0x4707(_0x388f15,_0x2e20b8){const _0x2908eb=_0x2908();return _0x4707=function(_0x4707ef,_0x2851c2){_0x4707ef=_0x4707ef-0x114;let _0x3ffc22=_0x2908eb[_0x4707ef];return _0x3ffc22;},_0x4707(_0x388f15,_0x2e20b8);}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer'][_0x2156a7(0x1ca)]=WindLayer;class CanvasParticle{constructor(){const _0x330629=_0x2156a7;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x330629(0x1c6)]=null,this[_0x330629(0x14c)]=null,this['speed']=null;}['destroy'](){for(const _0x191755 in this){delete this[_0x191755];}}}class CanvasWindField{constructor(_0x59a3b2){const _0x3ce213=_0x2156a7;this[_0x3ce213(0x136)](_0x59a3b2);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x1f4b16){const _0x4231a1=_0x2156a7;this['_speedRate']=(0x64-(_0x1f4b16>0x63?0x63:_0x1f4b16))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x4231a1(0x15f)])/this[_0x4231a1(0x122)],(this['ymax']-this['ymin'])/this[_0x4231a1(0x122)]];}get[_0x2156a7(0x1f3)](){return this['_maxAge'];}set['maxAge'](_0x165c06){this['_maxAge']=_0x165c06;}['setOptions'](_0x2cc53a){const _0x73194c=_0x2156a7;this[_0x73194c(0x197)]=_0x2cc53a,this['maxAge']=_0x2cc53a['maxAge']||0x78,this[_0x73194c(0x1a7)]=_0x2cc53a['speedRate']||0x32,this['particles']=[];const _0x3dcc71=_0x2cc53a['particlesNumber']||0x1000;for(let _0x4d45c5=0x0;_0x4d45c5<_0x3dcc71;_0x4d45c5++){const _0x8f2cc4=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x8f2cc4);}}[_0x2156a7(0x12d)](_0x32b794){const _0x1ce269=_0x2156a7;this['rows']=_0x32b794['rows'],this[_0x1ce269(0x145)]=_0x32b794['cols'],this['xmin']=_0x32b794['xmin'],this['xmax']=_0x32b794[_0x1ce269(0x1f7)],this['ymin']=_0x32b794['ymin'],this['ymax']=_0x32b794['ymax'],this['grid']=[];const _0x4c6b54=_0x32b794['udata'],_0x1589c0=_0x32b794['vdata'];let _0x19e477=![];_0x4c6b54['length']===this[_0x1ce269(0x160)]&&_0x4c6b54[0x0][_0x1ce269(0x152)]===this['cols']&&(_0x19e477=!![]);let _0x5a14d6=0x0,_0x980f39=null,_0x4c96bf=null;for(let _0x533ac6=0x0;_0x533ac6<this['rows'];_0x533ac6++){_0x980f39=[];for(let _0x44549b=0x0;_0x44549b<this['cols'];_0x44549b++,_0x5a14d6++){_0x19e477?_0x4c96bf=this['_calcUV'](_0x4c6b54[_0x533ac6][_0x44549b],_0x1589c0[_0x533ac6][_0x44549b]):_0x4c96bf=this['_calcUV'](_0x4c6b54[_0x5a14d6],_0x1589c0[_0x5a14d6]),_0x980f39[_0x1ce269(0x1be)](_0x4c96bf);}this[_0x1ce269(0x127)][_0x1ce269(0x1be)](_0x980f39);}this[_0x1ce269(0x197)]['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x1d072f=_0x2156a7;delete this['rows'],delete this['cols'],delete this[_0x1d072f(0x15f)],delete this[_0x1d072f(0x1f7)],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x4bd175,_0x457a95){const _0x48425d=_0x2156a7,_0x47bc38=(_0x4bd175-this['xmin'])/(this['xmax']-this['xmin'])*(this[_0x48425d(0x145)]-0x1),_0x417a0d=(this[_0x48425d(0x151)]-_0x457a95)/(this[_0x48425d(0x151)]-this['ymin'])*(this['rows']-0x1);return[_0x47bc38,_0x417a0d];}['getUVByXY'](_0x2eb6a7,_0x177a11){const _0x19119c=_0x2156a7;if(_0x2eb6a7<0x0||_0x2eb6a7>=this['cols']||_0x177a11>=this['rows'])return[0x0,0x0,0x0];const _0x328668=Math['floor'](_0x2eb6a7),_0x399750=Math[_0x19119c(0x12a)](_0x177a11);if(_0x328668===_0x2eb6a7&&_0x399750===_0x177a11)return this['grid'][_0x177a11][_0x2eb6a7];const _0x1be07a=_0x328668+0x1,_0xd0ff66=_0x399750+0x1,_0x48c7da=this['getUVByXY'](_0x328668,_0x399750),_0x42c793=this['getUVByXY'](_0x1be07a,_0x399750),_0x5d4800=this[_0x19119c(0x1fd)](_0x328668,_0xd0ff66),_0xb5f156=this[_0x19119c(0x1fd)](_0x1be07a,_0xd0ff66);let _0x2f623b=null;try{_0x2f623b=this[_0x19119c(0x20c)](_0x2eb6a7-_0x328668,_0x177a11-_0x399750,_0x48c7da,_0x42c793,_0x5d4800,_0xb5f156);}catch(_0x98110b){console['log'](_0x2eb6a7,_0x177a11);}return _0x2f623b;}['_bilinearInterpolation'](_0x1977c7,_0x2f4d14,_0x4ad994,_0x3cfc3a,_0x4063b9,_0x15baaf){const _0x1862ac=0x1-_0x1977c7,_0x434565=0x1-_0x2f4d14,_0x44ad57=_0x1862ac*_0x434565,_0x4af553=_0x1977c7*_0x434565,_0x10dbc4=_0x1862ac*_0x2f4d14,_0x551e89=_0x1977c7*_0x2f4d14,_0x17f93e=_0x4ad994[0x0]*_0x44ad57+_0x3cfc3a[0x0]*_0x4af553+_0x4063b9[0x0]*_0x10dbc4+_0x15baaf[0x0]*_0x551e89,_0x1fdc8f=_0x4ad994[0x1]*_0x44ad57+_0x3cfc3a[0x1]*_0x4af553+_0x4063b9[0x1]*_0x10dbc4+_0x15baaf[0x1]*_0x551e89;return this['_calcUV'](_0x17f93e,_0x1fdc8f);}['_calcUV'](_0x37ed19,_0x5e6ef7){const _0x4322a3=_0x2156a7;return[+_0x37ed19,+_0x5e6ef7,Math[_0x4322a3(0x158)](_0x37ed19*_0x37ed19+_0x5e6ef7*_0x5e6ef7)];}['getUVByPoint'](_0x121f5c,_0x3c7f61){if(!this['isInExtent'](_0x121f5c,_0x3c7f61))return null;const _0xfdb291=this['toGridXY'](_0x121f5c,_0x3c7f61),_0x17aa45=this['getUVByXY'](_0xfdb291[0x0],_0xfdb291[0x1]);return _0x17aa45;}['isInExtent'](_0x436bc6,_0x3e8cd8){const _0x12c327=_0x2156a7;return _0x436bc6>=this[_0x12c327(0x15f)]&&_0x436bc6<=this['xmax']&&_0x3e8cd8>=this['ymin']&&_0x3e8cd8<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x4e553c=fRandomByfloat(this['xmin'],this['xmax']),_0x127889=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x127889,'lng':_0x4e553c};}['getParticles'](){const _0x5cf21e=_0x2156a7;let _0x30d42d,_0x51b1ed,_0x4a799c;for(let _0x1fdac2=0x0,_0x5d6abb=this['particles'][_0x5cf21e(0x152)];_0x1fdac2<_0x5d6abb;_0x1fdac2++){let _0x254f08=this['particles'][_0x1fdac2];_0x254f08['age']<=0x0&&(_0x254f08=this['_randomParticle'](_0x254f08));if(_0x254f08['age']>0x0){const _0x3d9047=_0x254f08['tlng'],_0x55e54b=_0x254f08[_0x5cf21e(0x1c6)];_0x4a799c=this[_0x5cf21e(0x164)](_0x3d9047,_0x55e54b),_0x4a799c?(_0x30d42d=_0x3d9047+this['_calc_speedRate'][0x0]*_0x4a799c[0x0],_0x51b1ed=_0x55e54b+this['_calc_speedRate'][0x1]*_0x4a799c[0x1],_0x254f08['lng']=_0x3d9047,_0x254f08['lat']=_0x55e54b,_0x254f08['tlng']=_0x30d42d,_0x254f08['tlat']=_0x51b1ed,_0x254f08[_0x5cf21e(0x1aa)]=_0x4a799c[0x2],_0x254f08['age']--):_0x254f08['age']=0x0;}}return this[_0x5cf21e(0x159)];}['_randomParticle'](_0x4f462b){const _0x3b5c1f=_0x2156a7;let _0x132dc6,_0x3ca113;for(let _0x3f4f81=0x0;_0x3f4f81<0x1e;_0x3f4f81++){_0x132dc6=this['getRandomLatLng'](),_0x3ca113=this['getUVByPoint'](_0x132dc6[_0x3b5c1f(0x138)],_0x132dc6['lat']);if(_0x3ca113&&_0x3ca113[0x2]>0x0)break;}if(!_0x3ca113)return _0x4f462b;const _0x59b9ba=_0x132dc6['lng']+this['_calc_speedRate'][0x0]*_0x3ca113[0x0],_0x5db756=_0x132dc6['lat']+this['_calc_speedRate'][0x1]*_0x3ca113[0x1];return _0x4f462b[_0x3b5c1f(0x138)]=_0x132dc6['lng'],_0x4f462b['lat']=_0x132dc6['lat'],_0x4f462b['tlng']=_0x59b9ba,_0x4f462b['tlat']=_0x5db756,_0x4f462b['age']=Math['round'](Math['random']()*this['maxAge']),_0x4f462b['speed']=_0x3ca113[0x2],_0x4f462b;}[_0x2156a7(0x16b)](){for(const _0x286a36 in this){delete this[_0x286a36];}}}function fRandomByfloat(_0x53ad73,_0x190414){return _0x53ad73+Math['random']()*(_0x190414-_0x53ad73);}const Cesium=mars3d__namespace[_0x2156a7(0x1ea)],BaseLayer=mars3d__namespace['layer'][_0x2156a7(0x1d7)];class CanvasWindLayer extends BaseLayer{constructor(_0x19d0fe={}){const _0x24d091=_0x2156a7;super(_0x19d0fe),this[_0x24d091(0x13f)](_0x19d0fe),this['canvas']=null,_0x19d0fe['colors']&&_0x19d0fe[_0x24d091(0x171)]&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x19d0fe));}['_setOptionsHook'](_0x8a3e05,_0x3b9cdb){const _0x492f04=_0x2156a7;this['frameTime']=0x3e8/(_0x8a3e05['frameRate']||0xa),this[_0x492f04(0x12c)]=this['options']['pointerEvents']??![],this['color']=_0x8a3e05['color']||'#ffffff',this['lineWidth']=_0x8a3e05[_0x492f04(0x17c)]||0x1,this['fixedHeight']=_0x8a3e05['fixedHeight']??0x0,this['reverseY']=_0x8a3e05[_0x492f04(0x115)]??![],this[_0x492f04(0x196)]&&this[_0x492f04(0x196)]['setOptions'](_0x8a3e05);}get['layer'](){const _0x248c98=_0x2156a7;return this[_0x248c98(0x1f1)];}get[_0x2156a7(0x17b)](){const _0x4a7242=_0x2156a7;return this[_0x4a7242(0x154)]['scene']['canvas'][_0x4a7242(0x161)];}get[_0x2156a7(0x1d2)](){const _0x41a0f0=_0x2156a7;return this['_map'][_0x41a0f0(0x140)]['canvas'][_0x41a0f0(0x208)];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0x2156a7(0x16f)](_0x125f7d){const _0x1a5eac=_0x2156a7;this['_pointerEvents']=_0x125f7d;if(!this['canvas'])return;_0x125f7d?this['canvas']['style']['pointer-events']=_0x1a5eac(0x1ab):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x59dbbe){const _0x578223=_0x2156a7;this['options'][_0x578223(0x1cd)]=_0x59dbbe,clearTimeout(this['_canrefresh']),this[_0x578223(0x12b)]=setTimeout(()=>{const _0x2cb539=_0x578223;this[_0x2cb539(0x11a)]();},0x1f4);}get['speedRate'](){const _0x412ce3=_0x2156a7;return this['options'][_0x412ce3(0x1a7)];}set[_0x2156a7(0x1a7)](_0x26dbb7){const _0x2e214c=_0x2156a7;this['options'][_0x2e214c(0x1a7)]=_0x26dbb7,this['windField']&&(this['windField']['speedRate']=_0x26dbb7);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x23fb92){this['options']['maxAge']=_0x23fb92,this['windField']&&(this['windField']['maxAge']=_0x23fb92);}get['data'](){return this['windData'];}set['data'](_0x55345e){const _0x29d818=_0x2156a7;this[_0x29d818(0x1b7)](_0x55345e);}['_showHook'](_0x29ec19){const _0x38d26f=_0x2156a7;_0x29ec19?this['_addedHook']():(this['windData']&&(this['options'][_0x38d26f(0x16a)]=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x153063=_0x2156a7;this['options'][_0x153063(0x135)]?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}[_0x2156a7(0x1ef)](){const _0x44b5e7=_0x2156a7;this['canvas']=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this[_0x44b5e7(0x197)][_0x44b5e7(0x16a)]&&this[_0x44b5e7(0x1b7)](this['options'][_0x44b5e7(0x16a)]);}[_0x2156a7(0x194)](){const _0x3f3386=_0x2156a7;this[_0x3f3386(0x139)](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this[_0x3f3386(0x1f1)]);}['_createCanvas'](){const _0x4b3a5d=_0x2156a7,_0x538c1d=mars3d__namespace['DomUtil']['create'](_0x4b3a5d(0x1f1),'mars3d-canvasWind',this['_map'][_0x4b3a5d(0x1b8)]);return _0x538c1d['style'][_0x4b3a5d(0x187)]=_0x4b3a5d(0x1c5),_0x538c1d['style'][_0x4b3a5d(0x186)]='0px',_0x538c1d['style']['left']='0px',_0x538c1d['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x538c1d['style']['height']=this['_map'][_0x4b3a5d(0x140)][_0x4b3a5d(0x1f1)]['clientHeight']+'px',_0x538c1d['style']['pointerEvents']=this['_pointerEvents']?_0x4b3a5d(0x132):'none',_0x538c1d['style']['zIndex']=this['options']['zIndex']??0x9,_0x538c1d[_0x4b3a5d(0x156)]=this[_0x4b3a5d(0x154)]['scene']['canvas']['clientWidth'],_0x538c1d['height']=this['_map']['scene'][_0x4b3a5d(0x1f1)]['clientHeight'],_0x538c1d;}['resize'](){const _0x1db8d0=_0x2156a7;this['canvas']&&(this[_0x1db8d0(0x1f1)]['style']['width']=this[_0x1db8d0(0x154)][_0x1db8d0(0x140)]['canvas']['clientWidth']+'px',this['canvas']['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',this['canvas']['width']=this['_map']['scene']['canvas']['clientWidth'],this['canvas'][_0x1db8d0(0x200)]=this['_map']['scene']['canvas']['clientHeight']);}['bindEvent'](){const _0xb00f25=_0x2156a7,_0x278b10=this;let _0x1d2ac0=Date['now']();(function _0x381664(){const _0x43fca8=_0x4707;_0x278b10['animateFrame']=window['requestAnimationFrame'](_0x381664);if(_0x278b10['show']&&_0x278b10[_0x43fca8(0x196)]){const _0x459a7d=Date['now'](),_0x164107=_0x459a7d-_0x1d2ac0;_0x164107>_0x278b10[_0x43fca8(0x1cf)]&&(_0x1d2ac0=_0x459a7d-_0x164107%_0x278b10['frameTime'],_0x278b10['update']());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options'][_0xb00f25(0x153)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0xb00f25(0x1a4)][_0xb00f25(0x1dd)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0xb00f25(0x1e2)],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x3087c3=_0x2156a7;window['cancelAnimationFrame'](this[_0x3087c3(0x163)]),delete this['animateFrame'],window['removeEventListener']('resize',this[_0x3087c3(0x1dc)]),this[_0x3087c3(0x197)]['mouseHidden']&&(this[_0x3087c3(0x154)]['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map'][_0x3087c3(0x1cc)](mars3d__namespace['EventType']['mouseDown'],this[_0x3087c3(0x11b)],this),this['_map']['off'](mars3d__namespace['EventType'][_0x3087c3(0x1e2)],this[_0x3087c3(0x189)],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this));}[_0x2156a7(0x1fb)](_0x3bd7f9){const _0x40819a=_0x2156a7;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas'][_0x40819a(0x209)][_0x40819a(0x183)]=_0x40819a(0x1a1),this['refreshTimer']=setTimeout(()=>{const _0x50a156=_0x40819a;if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']=_0x50a156(0x1bc);},0xc8);}['_onMouseDownEvent'](_0x39f619){const _0x10955a=_0x2156a7;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace[_0x10955a(0x1a4)][_0x10955a(0x14e)],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x10955a(0x20a)],this);}[_0x2156a7(0x20a)](_0x487f00){const _0x330b75=_0x2156a7;if(!this[_0x330b75(0x1a8)]||!this['canvas'])return;this['mouse_down']&&(this['canvas'][_0x330b75(0x209)]['visibility']='hidden',this['mouse_move']=!![]);}[_0x2156a7(0x189)](_0x2e61e4){const _0x474750=_0x2156a7;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace[_0x474750(0x1a4)]['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this[_0x474750(0x121)]&&this['redraw'](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this[_0x474750(0x121)]=![];}[_0x2156a7(0x1b7)](_0x2c0093){const _0x5f53ad=_0x2156a7;this['clear'](),this[_0x5f53ad(0x148)]=_0x2c0093,this[_0x5f53ad(0x196)]['setDate'](_0x2c0093),this['redraw']();}['redraw'](){const _0x50dca2=_0x2156a7;if(!this['show'])return;this['windField']['setOptions'](this['options']),this[_0x50dca2(0x18d)]();}['update'](){const _0x1c440d=_0x2156a7;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this[_0x1c440d(0x196)]['update']();else{const _0x39935d=this['windField']['getParticles']();this['_drawLines'](_0x39935d);}this['_updateIng']=![];}[_0x2156a7(0x1ee)](_0x232945){const _0x31ae44=_0x2156a7;this['canvasContext']['globalCompositeOperation']='destination-in',this[_0x31ae44(0x1a0)]['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this[_0x31ae44(0x1a0)]['globalAlpha']=0.9;const _0x1a77bd=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0xe11e4f=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x28cbc0=0x0,_0x1b2cd7=_0x232945['length'];_0x28cbc0<_0x1b2cd7;_0x28cbc0++){const _0x1fda36=_0x232945[_0x28cbc0],_0x239cb3=this['_tomap'](_0x1fda36['lng'],_0x1fda36['lat'],_0x1fda36),_0x6ea21d=this['_tomap'](_0x1fda36['tlng'],_0x1fda36['tlat'],_0x1fda36);if(!_0x239cb3||!_0x6ea21d)continue;if(_0x1a77bd&&Math['abs'](_0x239cb3[0x0]-_0x6ea21d[0x0])>=_0xe11e4f)continue;this[_0x31ae44(0x1a0)]['beginPath'](),this[_0x31ae44(0x1a0)]['lineWidth']=this[_0x31ae44(0x17c)],this['canvasContext']['strokeStyle']=this['_colorRamp'][_0x31ae44(0x157)](_0x1fda36['speed']),this[_0x31ae44(0x1a0)]['moveTo'](_0x239cb3[0x0],_0x239cb3[0x1]),this['canvasContext']['lineTo'](_0x6ea21d[0x0],_0x6ea21d[0x1]),this['canvasContext'][_0x31ae44(0x178)]();}else{this['canvasContext'][_0x31ae44(0x118)](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext'][_0x31ae44(0x1d3)]=this['color'];for(let _0x53962e=0x0,_0x3fb8ce=_0x232945['length'];_0x53962e<_0x3fb8ce;_0x53962e++){const _0x1d8ae3=_0x232945[_0x53962e],_0x280574=this[_0x31ae44(0x116)](_0x1d8ae3['lng'],_0x1d8ae3['lat'],_0x1d8ae3),_0x1dc7a3=this['_tomap'](_0x1d8ae3['tlng'],_0x1d8ae3['tlat'],_0x1d8ae3);if(!_0x280574||!_0x1dc7a3)continue;if(_0x1a77bd&&Math[_0x31ae44(0x144)](_0x280574[0x0]-_0x1dc7a3[0x0])>=_0xe11e4f)continue;this[_0x31ae44(0x1a0)]['moveTo'](_0x280574[0x0],_0x280574[0x1]),this['canvasContext']['lineTo'](_0x1dc7a3[0x0],_0x1dc7a3[0x1]);}this[_0x31ae44(0x1a0)][_0x31ae44(0x178)]();}}[_0x2156a7(0x116)](_0x1533b2,_0x2873cc,_0x235137){const _0x25e70c=_0x2156a7,_0x40b0e7=Cesium['Cartesian3'][_0x25e70c(0x14b)](_0x1533b2,_0x2873cc,this['fixedHeight']),_0xd5a122=this[_0x25e70c(0x154)][_0x25e70c(0x140)];if(_0xd5a122['mode']===Cesium[_0x25e70c(0x134)][_0x25e70c(0x16d)]){const _0x5ddfc=new Cesium['EllipsoidalOccluder'](_0xd5a122['globe'][_0x25e70c(0x141)],_0xd5a122[_0x25e70c(0x20b)][_0x25e70c(0x1d0)]),_0x28c8a4=_0x5ddfc[_0x25e70c(0x1ec)](_0x40b0e7);if(!_0x28c8a4)return _0x235137['age']=0x0,null;}const _0x8cff3a=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x25e70c(0x154)]['scene'],_0x40b0e7);return _0x8cff3a?[_0x8cff3a['x'],_0x8cff3a['y']]:null;}['clear'](){const _0x3bd292=_0x2156a7;this['windField'][_0x3bd292(0x139)](),delete this[_0x3bd292(0x148)];}[_0x2156a7(0x1ce)](){const _0xd53c3d=_0x2156a7;this['worker']=new Worker(this[_0xd53c3d(0x197)][_0xd53c3d(0x135)]),this[_0xd53c3d(0x135)][_0xd53c3d(0x1e6)]=_0x4b81f9=>{this['_drawLines'](_0x4b81f9['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x1d5cf2=>{const _0x4ef3d9=_0xd53c3d;this['worker'][_0x4ef3d9(0x1b3)]({'type':_0x4ef3d9(0x201),'options':_0x1d5cf2});},'setOptions':_0xb91eca=>{const _0x36a686=_0xd53c3d;this['worker'][_0x36a686(0x1b3)]({'type':'setOptions','options':_0xb91eca});},'setDate':_0x2639e5=>{const _0x4235c5=_0xd53c3d;this[_0x4235c5(0x135)][_0x4235c5(0x1b3)]({'type':'setDate','data':_0x2639e5});},'update':()=>{const _0x461f54=_0xd53c3d;if(this[_0x461f54(0x14f)])return;this[_0x461f54(0x14f)]=!![],this['worker'][_0x461f54(0x1b3)]({'type':'update'});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x2156a7(0x167)]=CanvasWindLayer,mars3d__namespace[_0x2156a7(0x13c)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x2156a7(0x1ca)]=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,_0x2156a7(0x128),{'value':!![]});
|
|
14
|
+
'use strict';const _0x3805a0=_0x3ef7;(function(_0x325ff4,_0x1162fa){const _0x252b32=_0x3ef7,_0x32b783=_0x325ff4();while(!![]){try{const _0x1264cb=parseInt(_0x252b32(0x101))/0x1*(parseInt(_0x252b32(0x19f))/0x2)+parseInt(_0x252b32(0x181))/0x3+-parseInt(_0x252b32(0x146))/0x4*(parseInt(_0x252b32(0x171))/0x5)+-parseInt(_0x252b32(0x136))/0x6+parseInt(_0x252b32(0x10f))/0x7+-parseInt(_0x252b32(0x1ab))/0x8+parseInt(_0x252b32(0x1e2))/0x9*(parseInt(_0x252b32(0x1b3))/0xa);if(_0x1264cb===_0x1162fa)break;else _0x32b783['push'](_0x32b783['shift']());}catch(_0x343dd7){_0x32b783['push'](_0x32b783['shift']());}}}(_0x5513,0x6d01b));function _interopNamespace(_0x253141){const _0x32fd7f=_0x3ef7;if(_0x253141&&_0x253141['__esModule'])return _0x253141;var _0x117bdd=Object[_0x32fd7f(0x106)](null);return _0x253141&&Object[_0x32fd7f(0x180)](_0x253141)['forEach'](function(_0x1bcd98){const _0x3ef518=_0x32fd7f;if(_0x1bcd98!=='default'){var _0x5ef7eb=Object[_0x3ef518(0x1ef)](_0x253141,_0x1bcd98);Object[_0x3ef518(0x1e1)](_0x117bdd,_0x1bcd98,_0x5ef7eb['get']?_0x5ef7eb:{'enumerable':!![],'get':function(){return _0x253141[_0x1bcd98];}});}}),_0x117bdd['default']=_0x253141,_0x117bdd;}var mars3d__namespace=_interopNamespace(mars3d);function _0x3ef7(_0x433883,_0x5554b6){const _0x5513e8=_0x5513();return _0x3ef7=function(_0x3ef769,_0x384c50){_0x3ef769=_0x3ef769-0xfb;let _0x2e6c25=_0x5513e8[_0x3ef769];return _0x2e6c25;},_0x3ef7(_0x433883,_0x5554b6);}const Cesium$7=mars3d__namespace[_0x3805a0(0x13e)];function getU(_0x31c9bc,_0x1b3350){const _0x49b109=_0x3805a0,_0x4ce4f2=_0x31c9bc*Math['cos'](Cesium$7[_0x49b109(0x1ca)][_0x49b109(0x116)](_0x1b3350));return _0x4ce4f2;}function getV(_0x1f1177,_0x27dc60){const _0x19d026=_0x3805a0,_0x137697=_0x1f1177*Math['sin'](Cesium$7[_0x19d026(0x1ca)]['toRadians'](_0x27dc60));return _0x137697;}function getSpeed(_0x129f67,_0x545a1d){const _0x6c3091=_0x3805a0,_0x1301ce=Math[_0x6c3091(0x1d5)](Math[_0x6c3091(0x1e5)](_0x129f67,0x2)+Math['pow'](_0x545a1d,0x2));return _0x1301ce;}function getDirection(_0x30f3f8,_0x2e6a18){const _0x567167=_0x3805a0;let _0x3cf73b=Cesium$7[_0x567167(0x1ca)]['toDegrees'](Math['atan2'](_0x2e6a18,_0x30f3f8));return _0x3cf73b+=_0x3cf73b<0x0?0x168:0x0,_0x3cf73b;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace[_0x3805a0(0x13e)];class CustomPrimitive{constructor(_0x5c8cf3){const _0x46b4c6=_0x3805a0;this['commandType']=_0x5c8cf3[_0x46b4c6(0x139)],this['geometry']=_0x5c8cf3['geometry'],this['attributeLocations']=_0x5c8cf3[_0x46b4c6(0x12a)],this['primitiveType']=_0x5c8cf3[_0x46b4c6(0x15d)],this[_0x46b4c6(0x1df)]=_0x5c8cf3['uniformMap'],this['vertexShaderSource']=_0x5c8cf3['vertexShaderSource'],this[_0x46b4c6(0x165)]=_0x5c8cf3[_0x46b4c6(0x165)],this[_0x46b4c6(0x10d)]=_0x5c8cf3['rawRenderState'],this[_0x46b4c6(0x1a1)]=_0x5c8cf3['framebuffer'],this['outputTexture']=_0x5c8cf3['outputTexture'],this['autoClear']=_0x5c8cf3['autoClear']??![],this['preExecute']=_0x5c8cf3[_0x46b4c6(0x161)],this['show']=!![],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'](_0x43328c){const _0x4160c0=_0x3805a0;switch(this['commandType']){case'Draw':{const _0x575f6f=Cesium$6['VertexArray']['fromGeometry']({'context':_0x43328c,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x4160c0(0x1ee)]['STATIC_DRAW']}),_0x13c751=Cesium$6['ShaderProgram']['fromCache']({'context':_0x43328c,'attributeLocations':this[_0x4160c0(0x12a)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x3c0536=Cesium$6['RenderState']['fromCache'](this['rawRenderState']);return new Cesium$6[(_0x4160c0(0x166))]({'primitiveType':this['primitiveType'],'shaderProgram':_0x13c751,'vertexArray':_0x575f6f,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x3c0536,'uniformMap':this[_0x4160c0(0x1df)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x4160c0(0x19d)],'pickOnly':!![],'owner':this});}case _0x4160c0(0x186):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this[_0x4160c0(0x1eb)],'persists':!![]});}}}['setGeometry'](_0x51ea05,_0x51a7bf){const _0x30f2ec=_0x3805a0;this['geometry']=_0x51a7bf;const _0x4d8a1d=Cesium$6['VertexArray'][_0x30f2ec(0x144)]({'context':_0x51ea05,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0x30f2ec(0x10c)]});this[_0x30f2ec(0x138)]['vertexArray']=_0x4d8a1d;}[_0x3805a0(0x119)](_0x371d41){const _0x1685a9=_0x3805a0;if(!this['show'])return;if(_0x371d41['mode']!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this[_0x1685a9(0x138)])&&(this[_0x1685a9(0x138)]=this['createCommand'](_0x371d41['context'])),Cesium$6['defined'](this[_0x1685a9(0x161)])&&this['preExecute'](),Cesium$6['defined'](this[_0x1685a9(0x1e7)])&&_0x371d41['commandList']['push'](this['clearCommand']),_0x371d41['commandList'][_0x1685a9(0x108)](this['commandToExecute']);}[_0x3805a0(0x1d8)](){return![];}[_0x3805a0(0x153)](){const _0x25e767=_0x3805a0;if(this['clearCommand']){var _0x1e998d,_0x41ce8d;(_0x1e998d=this['clearCommand'])!==null&&_0x1e998d!==void 0x0&&_0x1e998d['vertexArray']&&this['clearCommand']['vertexArray']['destroy'](),(_0x41ce8d=this['clearCommand'])!==null&&_0x41ce8d!==void 0x0&&_0x41ce8d[_0x25e767(0x1b0)]&&this['clearCommand']['shaderProgram'][_0x25e767(0x153)](),delete this['clearCommand'];}return this[_0x25e767(0x138)]&&(this['commandToExecute']['vertexArray']&&this[_0x25e767(0x138)]['vertexArray'][_0x25e767(0x153)](),this['commandToExecute'][_0x25e767(0x1b0)]&&this['commandToExecute'][_0x25e767(0x1b0)]['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x1acc74=function(){const _0x129d32=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 _0x129d32;},_0xef6cb4=function(_0x509b32,_0x545a8a){const _0x5269d7=_0x3ef7;if(Cesium$5['defined'](_0x545a8a)){const _0x121063={};_0x121063['arrayBufferView']=_0x545a8a,_0x509b32[_0x5269d7(0x196)]=_0x121063;}const _0x29a435=new Cesium$5['Texture'](_0x509b32);return _0x29a435;},_0x760a99=function(_0x25c9c7,_0x267efe,_0x35ce09){const _0x4e93d5=new Cesium$5['Framebuffer']({'context':_0x25c9c7,'colorTextures':[_0x267efe],'depthTexture':_0x35ce09});return _0x4e93d5;},_0x47b9b5=function(_0x42fe36){const _0x453aa0=_0x3ef7,_0x42cabb=!![],_0x31871a=![],_0x4e8854={'viewport':_0x42fe36[_0x453aa0(0x197)],'depthTest':_0x42fe36['depthTest'],'depthMask':_0x42fe36['depthMask'],'blending':_0x42fe36[_0x453aa0(0x175)]},_0x24dbd3=Cesium$5['Appearance']['getDefaultRenderState'](_0x42cabb,_0x31871a,_0x4e8854);return _0x24dbd3;},_0x42e7aa=function(_0x3c3311){const _0x4be2c7=_0x3ef7,_0x4b28c9={},_0x1b4413=Cesium$5['Math']['mod'](_0x3c3311['west'],Cesium$5['Math']['TWO_PI']),_0x48ab6f=Cesium$5[_0x4be2c7(0x1ca)][_0x4be2c7(0x11e)](_0x3c3311['east'],Cesium$5[_0x4be2c7(0x1ca)]['TWO_PI']),_0x195889=_0x3c3311['width'];let _0x12810c,_0x5666c8;_0x195889>Cesium$5['Math'][_0x4be2c7(0x105)]?(_0x12810c=0x0,_0x5666c8=Cesium$5[_0x4be2c7(0x1ca)]['TWO_PI']):_0x48ab6f-_0x1b4413<_0x195889?(_0x12810c=_0x1b4413,_0x5666c8=_0x1b4413+_0x195889):(_0x12810c=_0x1b4413,_0x5666c8=_0x48ab6f);_0x4b28c9[_0x4be2c7(0x167)]={'min':Cesium$5[_0x4be2c7(0x1ca)][_0x4be2c7(0x1c1)](_0x12810c),'max':Cesium$5[_0x4be2c7(0x1ca)]['toDegrees'](_0x5666c8)};const _0x185ae5=_0x3c3311[_0x4be2c7(0x126)],_0x2d2767=_0x3c3311[_0x4be2c7(0x1b6)],_0x27d591=_0x3c3311['height'],_0x1838de=_0x27d591>Cesium$5[_0x4be2c7(0x1ca)]['PI']/0xc?_0x27d591/0x2:0x0;let _0x53d506=Cesium$5[_0x4be2c7(0x1ca)]['clampToLatitudeRange'](_0x185ae5-_0x1838de),_0x53180c=Cesium$5['Math'][_0x4be2c7(0x1c2)](_0x2d2767+_0x1838de);return _0x53d506<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x53d506=-Cesium$5['Math']['PI_OVER_TWO']),_0x53180c>Cesium$5['Math'][_0x4be2c7(0x131)]&&(_0x53180c=Cesium$5['Math'][_0x4be2c7(0x14f)]),_0x4b28c9['lat']={'min':Cesium$5['Math']['toDegrees'](_0x53d506),'max':Cesium$5['Math']['toDegrees'](_0x53180c)},_0x4b28c9;};return{'getFullscreenQuad':_0x1acc74,'createTexture':_0xef6cb4,'createFramebuffer':_0x760a99,'createRawRenderState':_0x47b9b5,'viewRectangleToLonLatRange':_0x42e7aa};}());var segmentDraw_vert=_0x3805a0(0x17a),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=_0x3805a0(0xfe),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(_0x48d385,_0x5a1e50,_0x6ab56d,_0x19b196,_0x584abb){const _0x50d74c=_0x3805a0;this[_0x50d74c(0x178)](_0x48d385,_0x5a1e50,_0x6ab56d['colors']),this[_0x50d74c(0x10a)](_0x48d385),this['createRenderingPrimitives'](_0x48d385,_0x6ab56d,_0x19b196,_0x584abb);}['createRenderingTextures'](_0x55de57,_0x4eec8e,_0x31eab4){const _0x3e3cc9=_0x3805a0,_0x1404a0={'context':_0x55de57,'width':_0x55de57['drawingBufferWidth'],'height':_0x55de57['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat'][_0x3e3cc9(0x123)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x47c512={'context':_0x55de57,'width':_0x55de57['drawingBufferWidth'],'height':_0x55de57['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x3e3cc9(0x190)]},_0x3cf872=_0x31eab4[_0x3e3cc9(0x11b)],_0x5d76f6=new Float32Array(_0x3cf872*0x3);for(let _0x40f853=0x0;_0x40f853<_0x3cf872;_0x40f853++){const _0x599936=Cesium$4['Color'][_0x3e3cc9(0x183)](_0x31eab4[_0x40f853]);_0x5d76f6[0x3*_0x40f853]=_0x599936['red'],_0x5d76f6[0x3*_0x40f853+0x1]=_0x599936[_0x3e3cc9(0x1d2)],_0x5d76f6[0x3*_0x40f853+0x2]=_0x599936['blue'];}const _0x2567f5={'context':_0x55de57,'width':_0x3cf872,'height':0x1,'pixelFormat':Cesium$4[_0x3e3cc9(0x187)]['RGB'],'pixelDatatype':Cesium$4[_0x3e3cc9(0x16b)]['FLOAT'],'sampler':new Cesium$4[(_0x3e3cc9(0x1f1))]({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this[_0x3e3cc9(0x124)]={'segmentsColor':Util['createTexture'](_0x1404a0),'segmentsDepth':Util[_0x3e3cc9(0x1e3)](_0x47c512),'currentTrailsColor':Util['createTexture'](_0x1404a0),'currentTrailsDepth':Util['createTexture'](_0x47c512),'nextTrailsColor':Util[_0x3e3cc9(0x1e3)](_0x1404a0),'nextTrailsDepth':Util['createTexture'](_0x47c512),'colorTable':Util['createTexture'](_0x2567f5,_0x5d76f6)};}['createRenderingFramebuffers'](_0x2ed300){const _0x1ba69d=_0x3805a0;this['framebuffers']={'segments':Util['createFramebuffer'](_0x2ed300,this[_0x1ba69d(0x124)]['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x2ed300,this['textures'][_0x1ba69d(0x1d1)],this['textures'][_0x1ba69d(0x173)]),'nextTrails':Util['createFramebuffer'](_0x2ed300,this[_0x1ba69d(0x124)]['nextTrailsColor'],this['textures'][_0x1ba69d(0xfc)])};}['createSegmentsGeometry'](_0x5aa087){const _0x85ee2d=_0x3805a0,_0x2eaaf9=0x4;let _0x3b24f8=[];for(let _0x4b1006=0x0;_0x4b1006<_0x5aa087[_0x85ee2d(0x18b)];_0x4b1006++){for(let _0x5e105d=0x0;_0x5e105d<_0x5aa087['particlesTextureSize'];_0x5e105d++){for(let _0x50651a=0x0;_0x50651a<_0x2eaaf9;_0x50651a++){_0x3b24f8['push'](_0x4b1006/_0x5aa087[_0x85ee2d(0x18b)]),_0x3b24f8['push'](_0x5e105d/_0x5aa087['particlesTextureSize']);}}}_0x3b24f8=new Float32Array(_0x3b24f8);let _0x3f1b5c=[];const _0xccf26e=[-0x1,0x1],_0x2ac0b5=[-0x1,0x1];for(let _0x26d581=0x0;_0x26d581<_0x5aa087['maxParticles'];_0x26d581++){for(let _0x327b44=0x0;_0x327b44<_0x2eaaf9/0x2;_0x327b44++){for(let _0x4e5f3d=0x0;_0x4e5f3d<_0x2eaaf9/0x2;_0x4e5f3d++){_0x3f1b5c['push'](_0xccf26e[_0x327b44]),_0x3f1b5c[_0x85ee2d(0x108)](_0x2ac0b5[_0x4e5f3d]),_0x3f1b5c['push'](0x0);}}}_0x3f1b5c=new Float32Array(_0x3f1b5c);const _0x5c637a=0x6*_0x5aa087[_0x85ee2d(0x1d3)],_0xd3391b=new Uint32Array(_0x5c637a);for(let _0x5573ae=0x0,_0x1dfe66=0x0,_0x30703a=0x0;_0x5573ae<_0x5aa087[_0x85ee2d(0x1d3)];_0x5573ae++){_0xd3391b[_0x1dfe66++]=_0x30703a+0x0,_0xd3391b[_0x1dfe66++]=_0x30703a+0x1,_0xd3391b[_0x1dfe66++]=_0x30703a+0x2,_0xd3391b[_0x1dfe66++]=_0x30703a+0x2,_0xd3391b[_0x1dfe66++]=_0x30703a+0x1,_0xd3391b[_0x1dfe66++]=_0x30703a+0x3,_0x30703a+=0x4;}const _0x2d7a88=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4[(_0x85ee2d(0x12c))]({'componentDatatype':Cesium$4['ComponentDatatype'][_0x85ee2d(0x128)],'componentsPerAttribute':0x2,'values':_0x3b24f8}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x3f1b5c})}),'indices':_0xd3391b});return _0x2d7a88;}['createRenderingPrimitives'](_0x54ec8e,_0x5f1ecc,_0x10ae34,_0x24d5de){const _0x1e765f=_0x3805a0,_0x18444d=this;this['primitives']={'segments':new CustomPrimitive({'commandType':_0x1e765f(0x1db),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x5f1ecc),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x24d5de['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x39ca79=_0x1e765f;return _0x24d5de[_0x39ca79(0x194)]['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x24d5de['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x179f68=_0x1e765f;return _0x18444d[_0x179f68(0x124)][_0x179f68(0x176)];},'aspect':function(){return _0x54ec8e['drawingBufferWidth']/_0x54ec8e['drawingBufferHeight'];},'pixelSize':function(){return _0x10ae34['pixelSize'];},'lineWidth':function(){return _0x5f1ecc['lineWidth'];},'particleHeight':function(){return _0x5f1ecc['particleHeight'];}},'vertexShaderSource':new Cesium$4[(_0x1e765f(0xff))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util[_0x1e765f(0x19c)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x1e765f(0x198)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0x1e765f(0x18c)],'uniformMap':{'segmentsColorTexture':function(){return _0x18444d['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x4767d6=_0x1e765f;return _0x18444d[_0x4767d6(0x124)][_0x4767d6(0x1af)];},'currentTrailsColor':function(){const _0x94ad1b=_0x1e765f;return _0x18444d['framebuffers'][_0x94ad1b(0x102)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x41141c=_0x1e765f;return _0x18444d[_0x41141c(0x1dc)]['currentTrails'][_0x41141c(0x129)];},'fadeOpacity':function(){return _0x5f1ecc['fadeOpacity'];}},'vertexShaderSource':new Cesium$4[(_0x1e765f(0xff))]({'defines':[_0x1e765f(0x193)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x1e765f(0xff))]({'defines':[_0x1e765f(0x130)],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0x1e765f(0x114)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0x1e765f(0x1dc)][_0x1e765f(0x1cf)],'autoClear':!![],'preExecute':function(){const _0x951cf8=_0x1e765f,_0x15bd2f=_0x18444d['framebuffers']['currentTrails'];_0x18444d['framebuffers']['currentTrails']=_0x18444d['framebuffers']['nextTrails'],_0x18444d['framebuffers'][_0x951cf8(0x1cf)]=_0x15bd2f,_0x18444d[_0x951cf8(0x11c)][_0x951cf8(0x1e9)]['commandToExecute']['framebuffer']=_0x18444d[_0x951cf8(0x1dc)][_0x951cf8(0x1cf)],_0x18444d['primitives']['trails']['clearCommand']['framebuffer']=_0x18444d['framebuffers']['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x1e765f(0x16a)](),'primitiveType':Cesium$4[_0x1e765f(0x1a2)]['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x42293d=_0x1e765f;return _0x18444d['framebuffers'][_0x42293d(0x1cf)][_0x42293d(0x1b2)](0x0);},'trailsDepthTexture':function(){const _0x441073=_0x1e765f;return _0x18444d[_0x441073(0x1dc)]['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x1e765f(0x19c)]({'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=_0x3805a0(0x170),postProcessingPosition_frag=_0x3805a0(0x1c6),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[_0x3805a0(0x13e)];class ParticlesComputing{constructor(_0x1a29ce,_0x5ec22b,_0x280cd7,_0x2fa8e3){const _0xb99fd3=_0x3805a0;this[_0xb99fd3(0x1d6)]=_0x5ec22b,this['createWindTextures'](_0x1a29ce,_0x5ec22b),this['createParticlesTextures'](_0x1a29ce,_0x280cd7,_0x2fa8e3),this['createComputingPrimitives'](_0x5ec22b,_0x280cd7,_0x2fa8e3);}['createWindTextures'](_0x1edbed,_0x186b04){const _0x27ce49=_0x3805a0,_0x10fef5={'context':_0x1edbed,'width':_0x186b04['dimensions'][_0x27ce49(0x167)],'height':_0x186b04[_0x27ce49(0x1b5)]['lat']*(_0x186b04['dimensions'][_0x27ce49(0x1c7)]||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0x27ce49(0x16b)][_0x27ce49(0x128)],'flipY':![],'sampler':new Cesium$3[(_0x27ce49(0x1f1))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util[_0x27ce49(0x1e3)](_0x10fef5,_0x186b04['U']['array']),'V':Util['createTexture'](_0x10fef5,_0x186b04['V']['array'])};}[_0x3805a0(0x107)](_0x419b22,_0x110d32,_0xec4f01){const _0x28c970=_0x3805a0,_0x47f6d9={'context':_0x419b22,'width':_0x110d32['particlesTextureSize'],'height':_0x110d32[_0x28c970(0x18b)],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x28c970(0x1e6)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x484b24=this['randomizeParticles'](_0x110d32['maxParticles'],_0xec4f01),_0x4e8491=new Float32Array(0x4*_0x110d32[_0x28c970(0x1d3)])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x47f6d9),'currentParticlesPosition':Util['createTexture'](_0x47f6d9,_0x484b24),'nextParticlesPosition':Util['createTexture'](_0x47f6d9,_0x484b24),'currentParticlesSpeed':Util['createTexture'](_0x47f6d9,_0x4e8491),'nextParticlesSpeed':Util['createTexture'](_0x47f6d9,_0x4e8491),'postProcessingPosition':Util['createTexture'](_0x47f6d9,_0x484b24),'postProcessingSpeed':Util['createTexture'](_0x47f6d9,_0x4e8491)};}['randomizeParticles'](_0xa5736e,_0x2a38a8){const _0x44d5d5=_0x3805a0,_0x5a51a4=new Float32Array(0x4*_0xa5736e);for(let _0x3d4693=0x0;_0x3d4693<_0xa5736e;_0x3d4693++){_0x5a51a4[0x4*_0x3d4693]=Cesium$3['Math']['randomBetween'](_0x2a38a8[_0x44d5d5(0x141)]['x'],_0x2a38a8[_0x44d5d5(0x141)]['y']),_0x5a51a4[0x4*_0x3d4693+0x1]=Cesium$3['Math']['randomBetween'](_0x2a38a8['latRange']['x'],_0x2a38a8['latRange']['y']),_0x5a51a4[0x4*_0x3d4693+0x2]=Cesium$3['Math'][_0x44d5d5(0x18e)](this['data']['lev'][_0x44d5d5(0x1f2)],this['data']['lev'][_0x44d5d5(0x177)]),_0x5a51a4[0x4*_0x3d4693+0x3]=0x0;}return _0x5a51a4;}['destroyParticlesTextures'](){Object['keys'](this['particlesTextures'])['forEach'](_0x5cffd9=>{this['particlesTextures'][_0x5cffd9]['destroy']();});}['createComputingPrimitives'](_0x4ec821,_0x340238,_0x313fe0){const _0x927bbe=_0x3805a0,_0x4164e8=new Cesium$3[(_0x927bbe(0x11a))](_0x4ec821[_0x927bbe(0x1b5)][_0x927bbe(0x167)],_0x4ec821['dimensions']['lat'],_0x4ec821['dimensions']['lev']),_0x892908=new Cesium$3['Cartesian3'](_0x4ec821[_0x927bbe(0x167)]['min'],_0x4ec821['lat']['min'],_0x4ec821['lev']['min']),_0x142584=new Cesium$3['Cartesian3'](_0x4ec821['lon'][_0x927bbe(0x177)],_0x4ec821['lat']['max'],_0x4ec821[_0x927bbe(0x1c7)]['max']),_0x20ce42=new Cesium$3['Cartesian3']((_0x142584['x']-_0x892908['x'])/(_0x4164e8['x']-0x1),(_0x142584['y']-_0x892908['y'])/(_0x4164e8['y']-0x1),_0x4164e8['z']>0x1?(_0x142584['z']-_0x892908['z'])/(_0x4164e8['z']-0x1):0x1),_0x4cc8bc=new Cesium$3['Cartesian2'](_0x4ec821['U']['min'],_0x4ec821['U'][_0x927bbe(0x177)]),_0x18e042=new Cesium$3['Cartesian2'](_0x4ec821['V']['min'],_0x4ec821['V']['max']),_0x509fe8=this;this[_0x927bbe(0x11c)]={'getWind':new CustomPrimitive({'commandType':_0x927bbe(0x186),'uniformMap':{'U':function(){return _0x509fe8['windTextures']['U'];},'V':function(){const _0x4679a4=_0x927bbe;return _0x509fe8[_0x4679a4(0x152)]['V'];},'currentParticlesPosition':function(){return _0x509fe8['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x4164e8;},'minimum':function(){return _0x892908;},'maximum':function(){return _0x142584;},'interval':function(){return _0x20ce42;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this[_0x927bbe(0x194)]['particlesWind'],'preExecute':function(){const _0x45f441=_0x927bbe;_0x509fe8[_0x45f441(0x11c)]['getWind'][_0x45f441(0x138)]['outputTexture']=_0x509fe8['particlesTextures'][_0x45f441(0x1ce)];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x509fe8['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){return _0x509fe8['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x4cc8bc;},'vSpeedRange':function(){return _0x18e042;},'pixelSize':function(){const _0x5b5f33=_0x927bbe;return _0x313fe0[_0x5b5f33(0x1d9)];},'speedFactor':function(){const _0x54460c=_0x927bbe;return _0x340238[_0x54460c(0x1d0)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x927bbe(0x158)],'preExecute':function(){const _0x441470=_0x927bbe,_0x351deb=_0x509fe8['particlesTextures'][_0x441470(0x1a7)];_0x509fe8['particlesTextures']['currentParticlesSpeed']=_0x509fe8['particlesTextures']['postProcessingSpeed'],_0x509fe8['particlesTextures']['postProcessingSpeed']=_0x351deb,_0x509fe8[_0x441470(0x11c)]['updateSpeed']['commandToExecute']['outputTexture']=_0x509fe8['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':_0x927bbe(0x186),'uniformMap':{'currentParticlesPosition':function(){const _0x2d64ea=_0x927bbe;return _0x509fe8[_0x2d64ea(0x194)]['currentParticlesPosition'];},'currentParticlesSpeed':function(){return _0x509fe8['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures'][_0x927bbe(0x1a8)],'preExecute':function(){const _0x9d7c75=_0x927bbe,_0x3c1064=_0x509fe8[_0x9d7c75(0x194)]['currentParticlesPosition'];_0x509fe8['particlesTextures']['currentParticlesPosition']=_0x509fe8['particlesTextures']['postProcessingPosition'],_0x509fe8['particlesTextures']['postProcessingPosition']=_0x3c1064,_0x509fe8[_0x9d7c75(0x11c)]['updatePosition'][_0x9d7c75(0x138)]['outputTexture']=_0x509fe8['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x927bbe(0x186),'uniformMap':{'nextParticlesPosition':function(){const _0x3c37dd=_0x927bbe;return _0x509fe8[_0x3c37dd(0x194)]['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x31473e=_0x927bbe;return _0x509fe8['particlesTextures'][_0x31473e(0x158)];},'lonRange':function(){return _0x313fe0['lonRange'];},'latRange':function(){return _0x313fe0['latRange'];},'randomCoefficient':function(){const _0x455f1d=Math['random']();return _0x455f1d;},'dropRate':function(){return _0x340238['dropRate'];},'dropRateBump':function(){return _0x340238['dropRateBump'];}},'fragmentShaderSource':new Cesium$3[(_0x927bbe(0xff))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x927bbe(0x194)]['postProcessingPosition'],'preExecute':function(){const _0x3cd41e=_0x927bbe;_0x509fe8[_0x3cd41e(0x11c)]['postProcessingPosition'][_0x3cd41e(0x138)]['outputTexture']=_0x509fe8['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x509fe8['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){const _0x261819=_0x927bbe;return _0x509fe8['particlesTextures'][_0x261819(0x158)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x927bbe(0x1cd)],'preExecute':function(){const _0x45fb55=_0x927bbe;_0x509fe8['primitives']['postProcessingSpeed'][_0x45fb55(0x138)]['outputTexture']=_0x509fe8['particlesTextures'][_0x45fb55(0x1cd)];}})};}}const Cesium$2=mars3d__namespace[_0x3805a0(0x13e)];class ParticleSystem{constructor(_0x40c857,_0x1d896b,_0x9fadaf,_0x40ba22){const _0x16686e=_0x3805a0;this['context']=_0x40c857,_0x1d896b={..._0x1d896b},_0x1d896b[_0x16686e(0x1bf)]&&_0x1d896b['vdata']&&(_0x1d896b['dimensions']={},_0x1d896b['dimensions']['lon']=_0x1d896b[_0x16686e(0x103)],_0x1d896b['dimensions']['lat']=_0x1d896b['rows'],_0x1d896b[_0x16686e(0x1b5)]['lev']=_0x1d896b['lev']||0x1,_0x1d896b['lon']={},_0x1d896b['lon']['min']=_0x1d896b[_0x16686e(0x143)],_0x1d896b['lon']['max']=_0x1d896b[_0x16686e(0x132)],_0x1d896b['lat']={},_0x1d896b['lat']['min']=_0x1d896b['ymin'],_0x1d896b['lat']['max']=_0x1d896b[_0x16686e(0x104)],_0x1d896b['lev']={},_0x1d896b['lev'][_0x16686e(0x1f2)]=_0x1d896b[_0x16686e(0x1bb)]??0x1,_0x1d896b[_0x16686e(0x1c7)][_0x16686e(0x177)]=_0x1d896b['levmax']??0x1,_0x1d896b['U']={},_0x1d896b['U'][_0x16686e(0x18f)]=new Float32Array(_0x1d896b['udata']),_0x1d896b['U']['min']=_0x1d896b['umin']??Math['min'](..._0x1d896b['udata']),_0x1d896b['U'][_0x16686e(0x177)]=_0x1d896b[_0x16686e(0x1e4)]??Math[_0x16686e(0x177)](..._0x1d896b[_0x16686e(0x1bf)]),_0x1d896b['V']={},_0x1d896b['V']['array']=new Float32Array(_0x1d896b['vdata']),_0x1d896b['V']['min']=_0x1d896b['vmin']??Math[_0x16686e(0x1f2)](..._0x1d896b['vdata']),_0x1d896b['V']['max']=_0x1d896b[_0x16686e(0x168)]??Math['max'](..._0x1d896b['vdata'])),this[_0x16686e(0x1d6)]=_0x1d896b,this[_0x16686e(0x10e)]=_0x9fadaf,this['viewerParameters']=_0x40ba22,this['particlesComputing']=new ParticlesComputing(this[_0x16686e(0x1bc)],this['data'],this['options'],this['viewerParameters']),this[_0x16686e(0x145)]=new ParticlesRendering(this[_0x16686e(0x1bc)],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}[_0x3805a0(0x1f0)](_0x350deb){const _0x16242d=_0x3805a0;this[_0x16242d(0x1c3)]['destroyParticlesTextures'](),Object[_0x16242d(0x180)](this[_0x16242d(0x1c3)]['windTextures'])['forEach'](_0x4f5f5f=>{const _0x185965=_0x16242d;this['particlesComputing'][_0x185965(0x152)][_0x4f5f5f]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])[_0x16242d(0x1a6)](_0x5e55f1=>{this['particlesRendering']['framebuffers'][_0x5e55f1]['destroy']();}),this[_0x16242d(0x1bc)]=_0x350deb,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this[_0x16242d(0x10e)],this['viewerParameters']),this[_0x16242d(0x145)]=new ParticlesRendering(this['context'],this['data'],this['options'],this[_0x16242d(0x142)],this['particlesComputing']);}['clearFramebuffers'](){const _0x4f625f=_0x3805a0,_0x1e7a08=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0x4f625f(0x174)][_0x4f625f(0x19d)]});Object['keys'](this['particlesRendering']['framebuffers'])[_0x4f625f(0x1a6)](_0x139a11=>{const _0x4b18c8=_0x4f625f;_0x1e7a08['framebuffer']=this['particlesRendering']['framebuffers'][_0x139a11],_0x1e7a08['execute'](this[_0x4b18c8(0x1bc)]);});}['refreshParticles'](_0x17e4fd){const _0x4cef67=_0x3805a0;this[_0x4cef67(0x172)](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this[_0x4cef67(0x1bc)],this[_0x4cef67(0x10e)],this['viewerParameters']);if(_0x17e4fd){var _0x1077c6,_0x546fdc;const _0x325773=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives']['segments']['geometry']=_0x325773;const _0x185001=Cesium$2[_0x4cef67(0x13d)]['fromGeometry']({'context':this['context'],'geometry':_0x325773,'attributeLocations':this['particlesRendering']['primitives'][_0x4cef67(0x198)][_0x4cef67(0x12a)],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});(_0x1077c6=this['particlesRendering'][_0x4cef67(0x11c)])!==null&&_0x1077c6!==void 0x0&&(_0x546fdc=_0x1077c6['segments'])!==null&&_0x546fdc!==void 0x0&&_0x546fdc['commandToExecute']&&(this['particlesRendering']['primitives']['segments']['commandToExecute'][_0x4cef67(0x17b)]=_0x185001);}}['setOptions'](_0x25907d){const _0x3e467c=_0x3805a0;let _0x2c9588=![];this[_0x3e467c(0x10e)][_0x3e467c(0x1d3)]!==_0x25907d[_0x3e467c(0x1d3)]&&(_0x2c9588=!![]),Object['keys'](_0x25907d)['forEach'](_0x283264=>{this['options'][_0x283264]=_0x25907d[_0x283264];}),this['refreshParticles'](_0x2c9588);}['applyViewerParameters'](_0x298cdf){Object['keys'](_0x298cdf)['forEach'](_0x5e9f7c=>{this['viewerParameters'][_0x5e9f7c]=_0x298cdf[_0x5e9f7c];}),this['refreshParticles'](![]);}['destroy'](){const _0x3ace97=_0x3805a0;clearTimeout(this['canrefresh']),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])[_0x3ace97(0x1a6)](_0x4989c9=>{const _0x595269=_0x3ace97;this[_0x595269(0x1c3)][_0x595269(0x152)][_0x4989c9]['destroy']();}),this[_0x3ace97(0x145)]['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x383d25=>{this['particlesRendering']['framebuffers'][_0x383d25]['destroy']();});for(const _0x3957be in this){delete this[_0x3957be];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x3805a0(0x127)]};class WindLayer extends BaseLayer$1{constructor(_0x597ffb={}){_0x597ffb={...DEF_OPTIONS,..._0x597ffb},super(_0x597ffb),this['_setOptionsHook'](_0x597ffb);}get['layer'](){return this['primitives'];}get['data'](){return this['_data'];}set['data'](_0x4d29c2){const _0x2b2461=_0x3805a0;this[_0x2b2461(0x195)](_0x4d29c2);}get[_0x3805a0(0x169)](){return this['options']['colors'];}set['colors'](_0x16e19f){const _0x89b7a8=_0x3805a0;this[_0x89b7a8(0x10e)]['colors']=_0x16e19f,this['particleSystem']&&this[_0x89b7a8(0x18d)]['setOptions']({'colors':_0x16e19f}),this[_0x89b7a8(0x1b4)]();}[_0x3805a0(0x1c9)](){}['_addedHook'](){const _0x1ae661=_0x3805a0;this['scene']=this[_0x1ae661(0x199)]['scene'],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1[(_0x1ae661(0x1e8))](),this[_0x1ae661(0x199)][_0x1ae661(0x1ec)]['primitives'][_0x1ae661(0x1c0)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1[(_0x1ae661(0x133))](),'pixelSize':0x0},this[_0x1ae661(0x1a4)]=new Cesium$1['BoundingSphere'](Cesium$1[_0x1ae661(0x11a)][_0x1ae661(0x118)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this['resize']['bind'](this),![]),this[_0x1ae661(0x16e)]=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType'][_0x1ae661(0x1a5)],this[_0x1ae661(0x1c8)],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[_0x1ae661(0x135)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x1ae661(0x1a9)]&&this['setData'](this['_data']);}['_removedHook'](){const _0x4775c1=_0x3805a0;window[_0x4775c1(0xfd)]('resize',this[_0x4775c1(0x1b4)]),this[_0x4775c1(0x199)]['off'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace[_0x4775c1(0x135)]['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x4775c1(0x17c)],this[_0x4775c1(0x184)],this),this[_0x4775c1(0x199)]['off'](mars3d__namespace['EventType'][_0x4775c1(0x1c4)],this[_0x4775c1(0x157)],this),this['_map']['off'](mars3d__namespace[_0x4775c1(0x135)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x4775c1(0x11c)]['removeAll'](),this[_0x4775c1(0x199)]['scene'][_0x4775c1(0x11c)][_0x4775c1(0x148)](this[_0x4775c1(0x11c)]);}['resize'](){if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x14f91b){const _0x4ba227=_0x3805a0;this[_0x4ba227(0x18d)]['canvasResize'](this['scene']['context']),this[_0x4ba227(0x12b)](),this[_0x4ba227(0x11c)][_0x4ba227(0x18a)]=!![];}['_onMapWhellEvent'](_0x3b2e0d){const _0x4e0bb9=_0x3805a0;clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this[_0x4e0bb9(0x11c)]['show']=![],this[_0x4e0bb9(0x15b)]=setTimeout(()=>{const _0x5dd46c=_0x4e0bb9;if(!this['show'])return;this[_0x5dd46c(0x1aa)]();},0xc8);}[_0x3805a0(0x184)](_0x45a769){const _0x1ccc9e=_0x3805a0;this[_0x1ccc9e(0x16e)]=!![];}[_0x3805a0(0xfb)](_0x51fe78){const _0x5a7fea=_0x3805a0;if(!this[_0x5a7fea(0x18a)]||!this[_0x5a7fea(0x18d)])return;this['mouse_down']&&(this['primitives'][_0x5a7fea(0x18a)]=![],this[_0x5a7fea(0x149)]=!![]);}['_onMouseUpEvent'](_0x41b0e6){const _0x350f86=_0x3805a0;if(!this['show']||!this[_0x350f86(0x18d)])return;this['mouse_down']&&this['mouse_move']&&this[_0x350f86(0x1aa)](),this[_0x350f86(0x11c)][_0x350f86(0x18a)]=!![],this[_0x350f86(0x16e)]=![],this['mouse_move']=![];}['redraw'](){const _0x2e437c=_0x3805a0;if(!this['_map']||!this[_0x2e437c(0x18a)])return;this[_0x2e437c(0x14d)](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x5924b8){const _0x6110bc=_0x3805a0;this['_data']=_0x5924b8,this['particleSystem']&&this['particleSystem'][_0x6110bc(0x153)](),this['particleSystem']=new ParticleSystem(this[_0x6110bc(0x1ec)][_0x6110bc(0x1bc)],_0x5924b8,this[_0x6110bc(0x160)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x4dbd62,_0x35e687){const _0x126c32=_0x3805a0;if(_0x4dbd62)for(const _0x49c8ae in _0x4dbd62){this[_0x49c8ae]=_0x4dbd62[_0x49c8ae];}this['particleSystem']&&this['particleSystem']['setOptions'](this[_0x126c32(0x160)]());}['getOptions'](){const _0x355441=_0x3805a0,_0x84f90e=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x84f90e*_0x84f90e,{'particlesTextureSize':_0x84f90e,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this[_0x355441(0x1d0)],'lineWidth':this[_0x355441(0x1cc)],'colors':this['colors']};}['addPrimitives'](){const _0x33297a=_0x3805a0;this['primitives']['add'](this[_0x33297a(0x18d)]['particlesComputing']['primitives']['getWind']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this[_0x33297a(0x11c)][_0x33297a(0x1c0)](this['particleSystem'][_0x33297a(0x1c3)]['primitives'][_0x33297a(0x1b1)]),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x33297a(0x11c)][_0x33297a(0x185)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this[_0x33297a(0x11c)]['add'](this[_0x33297a(0x18d)][_0x33297a(0x145)][_0x33297a(0x11c)]['segments']),this[_0x33297a(0x11c)]['add'](this['particleSystem']['particlesRendering']['primitives'][_0x33297a(0x1e9)]),this['primitives']['add'](this['particleSystem']['particlesRendering'][_0x33297a(0x11c)]['screen']);}['updateViewerParameters'](){const _0x59e4f3=_0x3805a0;let _0x5cf0d0=this['camera']['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x5cf0d0){const _0x16aa78=this['_map']['getExtent']();_0x5cf0d0=Cesium$1['Rectangle'][_0x59e4f3(0x19a)](_0x16aa78['xmin'],_0x16aa78['ymin'],_0x16aa78[_0x59e4f3(0x132)],_0x16aa78['ymax']);}const _0x56bebf=Util['viewRectangleToLonLatRange'](_0x5cf0d0);this['viewerParameters']['lonRange']['x']=_0x56bebf['lon'][_0x59e4f3(0x1f2)],this['viewerParameters']['lonRange']['y']=_0x56bebf['lon']['max'],this['viewerParameters']['latRange']['x']=_0x56bebf[_0x59e4f3(0x159)]['min'],this['viewerParameters'][_0x59e4f3(0x1b7)]['y']=_0x56bebf['lat'][_0x59e4f3(0x177)];const _0x2c3d99=this[_0x59e4f3(0x147)][_0x59e4f3(0x1de)](this['globeBoundingSphere'],this['scene'][_0x59e4f3(0x13a)],this['scene'][_0x59e4f3(0x122)]);_0x2c3d99>0x0&&(this[_0x59e4f3(0x142)]['pixelSize']=_0x2c3d99);}}mars3d__namespace['LayerUtil'][_0x3805a0(0x137)]('wind',WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;function _0x5513(){const _0x4aecd0=['stroke','south','rgb(206,255,255)','FLOAT','depthTexture','attributeLocations','addPrimitives','GeometryAttribute','globe','canvasWidth','tlat','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','PI_OVER_THREE','xmax','Cartesian2','particlesNumber','EventType','3893598YPfUno','register','commandToExecute','commandType','drawingBufferWidth','tlng','_calc_speedRate','VertexArray','Cesium','off','clear','lonRange','viewerParameters','xmin','fromGeometry','particlesRendering','4jePcQd','camera','remove','mouse_move','canvasContext','SCENE3D','bindEvent','updateViewerParameters','windField','PI_OVER_TWO','reverseY','visibility','windTextures','destroy','_maxAge','WindUtil','unbindEvent','_onMouseUpEvent','nextParticlesSpeed','lat','_drawLines','refreshTimer','BaseLayer','primitiveType','fixedHeight','getUVByXY','getOptions','preExecute','getColor','top','toGridXY','fragmentShaderSource','DrawCommand','lon','vmax','colors','getFullscreenQuad','PixelDatatype','_tomap','canvas','mouse_down','speed','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','232355qIezlm','clearFramebuffers','currentTrailsDepth','Pass','blending','colorTable','max','createRenderingTextures','getUVByPoint','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','vertexArray','mouseDown','mars3d-canvasWind','abs','worker','keys','2127912jSvdvz','removeChild','fromCssColorString','_onMouseDownEvent','postProcessingPosition','Compute','PixelFormat','strokeStyle','globalCompositeOperation','show','particlesTextureSize','TRIANGLES','particleSystem','randomBetween','array','UNSIGNED_INT','rows','reverse','DISABLE_GL_POSITION_LOG_DEPTH','particlesTextures','setData','source','viewport','segments','_map','fromDegrees','lng','createRawRenderState','OPAQUE','init','395154cvHZHs','container','framebuffer','PrimitiveType','all','globeBoundingSphere','wheel','forEach','currentParticlesSpeed','nextParticlesPosition','_data','redraw','3659760kqjMQH','windData','vdata','random','segmentsDepth','shaderProgram','updatePosition','getColorTexture','74190oGhbDy','resize','dimensions','north','latRange','getRandomLatLng','animateFrame','wgs84ToWindowCoordinates','levmin','context','postMessage','_randomParticle','udata','add','toDegrees','clampToLatitudeRange','particlesComputing','mouseUp','color','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','lev','_onMapWhellEvent','_mountedHook','Math','_createCanvas','lineWidth','postProcessingSpeed','particlesWind','nextTrails','speedFactor','currentTrailsColor','green','maxParticles','setDate','sqrt','data','grid','isDestroyed','pixelSize','age','Draw','framebuffers','_updateIng2','getPixelSize','uniformMap','maxAge','defineProperty','36ZlgftP','createTexture','umax','pow','NEAREST','clearCommand','PrimitiveCollection','trails','CanvasWindField','outputTexture','scene','clientWidth','BufferUsage','getOwnPropertyDescriptor','canvasResize','Sampler','min','_onMouseMoveEvent','nextTrailsDepth','removeEventListener','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','ShaderSource','speedRate','1SrHpEX','currentTrails','cols','ymax','THREE_PI_OVER_TWO','create','createParticlesTextures','push','mouseMove','createRenderingFramebuffers','_pointerEvents','STATIC_DRAW','rawRenderState','options','4639656VIfgny','layer','clientHeight','width','_addedHook','DepthFunction','isInExtent','toRadians','height','ZERO','update','Cartesian3','length','primitives','particles','mod','positionWC','style','_setOptionsHook','drawingBufferHeight','RGBA','textures'];_0x5513=function(){return _0x4aecd0;};return _0x5513();}class CanvasParticle{constructor(){const _0x5a7cea=_0x3805a0;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x5a7cea(0x12f)]=null,this['age']=null,this[_0x5a7cea(0x16f)]=null;}['destroy'](){for(const _0xe6a2ab in this){delete this[_0xe6a2ab];}}}class CanvasWindField{constructor(_0x5efb52){this['setOptions'](_0x5efb52);}get[_0x3805a0(0x100)](){return this['_speedRate'];}set['speedRate'](_0x265bb4){this['_speedRate']=(0x64-(_0x265bb4>0x63?0x63:_0x265bb4))*0x64,this['_calc_speedRate']=[(this['xmax']-this['xmin'])/this['_speedRate'],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){const _0x5500de=_0x3805a0;return this[_0x5500de(0x154)];}set[_0x3805a0(0x1e0)](_0x3d0b1e){this['_maxAge']=_0x3d0b1e;}['setOptions'](_0x4895c4){const _0x191a0b=_0x3805a0;this['options']=_0x4895c4,this['maxAge']=_0x4895c4['maxAge']||0x78,this['speedRate']=_0x4895c4[_0x191a0b(0x100)]||0x32,this[_0x191a0b(0x11d)]=[];const _0xedb27=_0x4895c4['particlesNumber']||0x1000;for(let _0xefe91b=0x0;_0xefe91b<_0xedb27;_0xefe91b++){const _0x1adbcd=this[_0x191a0b(0x1be)](new CanvasParticle());this[_0x191a0b(0x11d)]['push'](_0x1adbcd);}}[_0x3805a0(0x1d4)](_0x1c25c7){const _0x30c4dd=_0x3805a0;this[_0x30c4dd(0x191)]=_0x1c25c7[_0x30c4dd(0x191)],this['cols']=_0x1c25c7[_0x30c4dd(0x103)],this['xmin']=_0x1c25c7['xmin'],this[_0x30c4dd(0x132)]=_0x1c25c7['xmax'],this['ymin']=_0x1c25c7['ymin'],this['ymax']=_0x1c25c7['ymax'],this['grid']=[];const _0xfd909e=_0x1c25c7[_0x30c4dd(0x1bf)],_0x2a2e0b=_0x1c25c7[_0x30c4dd(0x1ad)];let _0x571ad1=![];_0xfd909e['length']===this['rows']&&_0xfd909e[0x0]['length']===this[_0x30c4dd(0x103)]&&(_0x571ad1=!![]);let _0x37cc13=0x0,_0x2fd242=null,_0x1424e0=null;for(let _0x5340d5=0x0;_0x5340d5<this['rows'];_0x5340d5++){_0x2fd242=[];for(let _0x2719f7=0x0;_0x2719f7<this['cols'];_0x2719f7++,_0x37cc13++){_0x571ad1?_0x1424e0=this['_calcUV'](_0xfd909e[_0x5340d5][_0x2719f7],_0x2a2e0b[_0x5340d5][_0x2719f7]):_0x1424e0=this['_calcUV'](_0xfd909e[_0x37cc13],_0x2a2e0b[_0x37cc13]),_0x2fd242['push'](_0x1424e0);}this['grid']['push'](_0x2fd242);}this[_0x30c4dd(0x10e)]['reverseY']&&this['grid'][_0x30c4dd(0x192)]();}['clear'](){const _0x5ccddf=_0x3805a0;delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this[_0x5ccddf(0x1d7)],delete this[_0x5ccddf(0x11d)];}['toGridXY'](_0x445f04,_0x259df7){const _0x469d4d=_0x3805a0,_0x27b6b4=(_0x445f04-this[_0x469d4d(0x143)])/(this['xmax']-this['xmin'])*(this[_0x469d4d(0x103)]-0x1),_0x2e0f42=(this[_0x469d4d(0x104)]-_0x259df7)/(this[_0x469d4d(0x104)]-this['ymin'])*(this[_0x469d4d(0x191)]-0x1);return[_0x27b6b4,_0x2e0f42];}['getUVByXY'](_0xb31130,_0x505da5){const _0x3ce910=_0x3805a0;if(_0xb31130<0x0||_0xb31130>=this['cols']||_0x505da5>=this['rows'])return[0x0,0x0,0x0];const _0x4c6e0b=Math['floor'](_0xb31130),_0xb1e704=Math['floor'](_0x505da5);if(_0x4c6e0b===_0xb31130&&_0xb1e704===_0x505da5)return this[_0x3ce910(0x1d7)][_0x505da5][_0xb31130];const _0x5b9e9f=_0x4c6e0b+0x1,_0x213d90=_0xb1e704+0x1,_0x28aad1=this['getUVByXY'](_0x4c6e0b,_0xb1e704),_0x262811=this[_0x3ce910(0x15f)](_0x5b9e9f,_0xb1e704),_0x9e6e94=this['getUVByXY'](_0x4c6e0b,_0x213d90),_0x14978d=this['getUVByXY'](_0x5b9e9f,_0x213d90);let _0x372b17=null;try{_0x372b17=this['_bilinearInterpolation'](_0xb31130-_0x4c6e0b,_0x505da5-_0xb1e704,_0x28aad1,_0x262811,_0x9e6e94,_0x14978d);}catch(_0x30ee16){console['log'](_0xb31130,_0x505da5);}return _0x372b17;}['_bilinearInterpolation'](_0x27e769,_0x2c6560,_0x39d9dc,_0x1b2d69,_0x2b77db,_0x4fb530){const _0x338ffa=0x1-_0x27e769,_0x1f26a0=0x1-_0x2c6560,_0x2ac9cd=_0x338ffa*_0x1f26a0,_0x292f91=_0x27e769*_0x1f26a0,_0x4aaa1c=_0x338ffa*_0x2c6560,_0x536758=_0x27e769*_0x2c6560,_0x577ddf=_0x39d9dc[0x0]*_0x2ac9cd+_0x1b2d69[0x0]*_0x292f91+_0x2b77db[0x0]*_0x4aaa1c+_0x4fb530[0x0]*_0x536758,_0x1ec708=_0x39d9dc[0x1]*_0x2ac9cd+_0x1b2d69[0x1]*_0x292f91+_0x2b77db[0x1]*_0x4aaa1c+_0x4fb530[0x1]*_0x536758;return this['_calcUV'](_0x577ddf,_0x1ec708);}['_calcUV'](_0x36158f,_0x471323){const _0x4fbe59=_0x3805a0;return[+_0x36158f,+_0x471323,Math[_0x4fbe59(0x1d5)](_0x36158f*_0x36158f+_0x471323*_0x471323)];}['getUVByPoint'](_0x36e753,_0x390849){const _0x3e2b04=_0x3805a0;if(!this[_0x3e2b04(0x115)](_0x36e753,_0x390849))return null;const _0x4510ef=this[_0x3e2b04(0x164)](_0x36e753,_0x390849),_0x14edb6=this[_0x3e2b04(0x15f)](_0x4510ef[0x0],_0x4510ef[0x1]);return _0x14edb6;}['isInExtent'](_0x4b0bb8,_0xf2554a){const _0x275ad1=_0x3805a0;return _0x4b0bb8>=this['xmin']&&_0x4b0bb8<=this[_0x275ad1(0x132)]&&_0xf2554a>=this['ymin']&&_0xf2554a<=this[_0x275ad1(0x104)]?!![]:![];}['getRandomLatLng'](){const _0x5a7d8f=_0x3805a0,_0x139608=fRandomByfloat(this['xmin'],this['xmax']),_0x39eba7=fRandomByfloat(this['ymin'],this[_0x5a7d8f(0x104)]);return{'lat':_0x39eba7,'lng':_0x139608};}['getParticles'](){const _0x5c5a48=_0x3805a0;let _0x31402e,_0x30fe8d,_0x45fac8;for(let _0x3b146a=0x0,_0x2176f4=this['particles']['length'];_0x3b146a<_0x2176f4;_0x3b146a++){let _0x9333c1=this['particles'][_0x3b146a];_0x9333c1['age']<=0x0&&(_0x9333c1=this[_0x5c5a48(0x1be)](_0x9333c1));if(_0x9333c1['age']>0x0){const _0x5a46d8=_0x9333c1['tlng'],_0x37f97c=_0x9333c1[_0x5c5a48(0x12f)];_0x45fac8=this[_0x5c5a48(0x179)](_0x5a46d8,_0x37f97c),_0x45fac8?(_0x31402e=_0x5a46d8+this[_0x5c5a48(0x13c)][0x0]*_0x45fac8[0x0],_0x30fe8d=_0x37f97c+this[_0x5c5a48(0x13c)][0x1]*_0x45fac8[0x1],_0x9333c1['lng']=_0x5a46d8,_0x9333c1[_0x5c5a48(0x159)]=_0x37f97c,_0x9333c1['tlng']=_0x31402e,_0x9333c1['tlat']=_0x30fe8d,_0x9333c1['speed']=_0x45fac8[0x2],_0x9333c1[_0x5c5a48(0x1da)]--):_0x9333c1['age']=0x0;}}return this[_0x5c5a48(0x11d)];}[_0x3805a0(0x1be)](_0x4cc740){const _0x3a89f3=_0x3805a0;let _0x56556d,_0x59df49;for(let _0x55eda9=0x0;_0x55eda9<0x1e;_0x55eda9++){_0x56556d=this[_0x3a89f3(0x1b8)](),_0x59df49=this['getUVByPoint'](_0x56556d[_0x3a89f3(0x19b)],_0x56556d[_0x3a89f3(0x159)]);if(_0x59df49&&_0x59df49[0x2]>0x0)break;}if(!_0x59df49)return _0x4cc740;const _0x293078=_0x56556d['lng']+this['_calc_speedRate'][0x0]*_0x59df49[0x0],_0x5f652a=_0x56556d[_0x3a89f3(0x159)]+this['_calc_speedRate'][0x1]*_0x59df49[0x1];return _0x4cc740['lng']=_0x56556d[_0x3a89f3(0x19b)],_0x4cc740['lat']=_0x56556d['lat'],_0x4cc740['tlng']=_0x293078,_0x4cc740['tlat']=_0x5f652a,_0x4cc740['age']=Math['round'](Math[_0x3a89f3(0x1ae)]()*this['maxAge']),_0x4cc740['speed']=_0x59df49[0x2],_0x4cc740;}['destroy'](){for(const _0xaa7a93 in this){delete this[_0xaa7a93];}}}function fRandomByfloat(_0x46cc3c,_0x383a34){const _0x2a52d0=_0x3805a0;return _0x46cc3c+Math[_0x2a52d0(0x1ae)]()*(_0x383a34-_0x46cc3c);}const Cesium=mars3d__namespace[_0x3805a0(0x13e)],BaseLayer=mars3d__namespace['layer'][_0x3805a0(0x15c)];class CanvasWindLayer extends BaseLayer{constructor(_0x144459={}){const _0x17fa28=_0x3805a0;super(_0x144459),this[_0x17fa28(0x121)](_0x144459),this[_0x17fa28(0x16d)]=null,_0x144459['colors']&&_0x144459['steps']&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x144459));}['_setOptionsHook'](_0x215ca1,_0x54047e){const _0x259a7a=_0x3805a0;this['frameTime']=0x3e8/(_0x215ca1['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x215ca1[_0x259a7a(0x1c5)]||'#ffffff',this[_0x259a7a(0x1cc)]=_0x215ca1[_0x259a7a(0x1cc)]||0x1,this[_0x259a7a(0x15e)]=_0x215ca1[_0x259a7a(0x15e)]??0x0,this['reverseY']=_0x215ca1[_0x259a7a(0x150)]??![],this['windField']&&this['windField']['setOptions'](_0x215ca1);}get[_0x3805a0(0x110)](){return this['canvas'];}get[_0x3805a0(0x12e)](){const _0x5389e9=_0x3805a0;return this['_map'][_0x5389e9(0x1ec)][_0x5389e9(0x16d)]['clientWidth'];}get['canvasHeight'](){const _0x23b2e1=_0x3805a0;return this['_map'][_0x23b2e1(0x1ec)][_0x23b2e1(0x16d)][_0x23b2e1(0x111)];}get['pointerEvents'](){const _0x229ece=_0x3805a0;return this[_0x229ece(0x10b)];}set['pointerEvents'](_0x25aacd){const _0x4ddc16=_0x3805a0;this['_pointerEvents']=_0x25aacd;if(!this['canvas'])return;_0x25aacd?this[_0x4ddc16(0x16d)][_0x4ddc16(0x120)]['pointer-events']=_0x4ddc16(0x1a3):this['canvas']['style']['pointer-events']='none';}get[_0x3805a0(0x134)](){return this['options']['particlesNumber'];}set[_0x3805a0(0x134)](_0x17cffe){this['options']['particlesNumber']=_0x17cffe,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x28a62a=_0x3805a0;return this[_0x28a62a(0x10e)][_0x28a62a(0x100)];}set['speedRate'](_0x57a028){const _0x44c73e=_0x3805a0;this['options'][_0x44c73e(0x100)]=_0x57a028,this['windField']&&(this['windField']['speedRate']=_0x57a028);}get[_0x3805a0(0x1e0)](){return this['options']['maxAge'];}set['maxAge'](_0x5cc922){this['options']['maxAge']=_0x5cc922,this['windField']&&(this['windField']['maxAge']=_0x5cc922);}get['data'](){const _0x2c1522=_0x3805a0;return this[_0x2c1522(0x1ac)];}set[_0x3805a0(0x1d6)](_0x4e8319){this['setData'](_0x4e8319);}['_showHook'](_0x2a5359){const _0x2e9f8b=_0x3805a0;_0x2a5359?this[_0x2e9f8b(0x113)]():(this[_0x2e9f8b(0x1ac)]&&(this['options']['data']=this[_0x2e9f8b(0x1ac)]),this['_removedHook']());}['_mountedHook'](){const _0x36bbe1=_0x3805a0;this[_0x36bbe1(0x10e)][_0x36bbe1(0x17f)]?this['initWorker']():this[_0x36bbe1(0x14e)]=new CanvasWindField(this['options']);}['_addedHook'](){const _0x24b8af=_0x3805a0;this[_0x24b8af(0x16d)]=this['_createCanvas'](),this['canvasContext']=this[_0x24b8af(0x16d)]['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this[_0x24b8af(0x10e)][_0x24b8af(0x1d6)]&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x5d4449=_0x3805a0;this['clear'](),this[_0x5d4449(0x156)](),this[_0x5d4449(0x16d)]&&(this['_map']['container'][_0x5d4449(0x182)](this['canvas']),delete this[_0x5d4449(0x16d)]);}[_0x3805a0(0x1cb)](){const _0x29b99d=_0x3805a0,_0x4155d6=mars3d__namespace['DomUtil']['create']('canvas',_0x29b99d(0x17d),this['_map'][_0x29b99d(0x1a0)]);return _0x4155d6[_0x29b99d(0x120)]['position']='absolute',_0x4155d6['style'][_0x29b99d(0x163)]='0px',_0x4155d6[_0x29b99d(0x120)]['left']='0px',_0x4155d6[_0x29b99d(0x120)][_0x29b99d(0x112)]=this[_0x29b99d(0x199)]['scene'][_0x29b99d(0x16d)]['clientWidth']+'px',_0x4155d6['style']['height']=this[_0x29b99d(0x199)]['scene']['canvas']['clientHeight']+'px',_0x4155d6['style']['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x4155d6['style']['zIndex']=this[_0x29b99d(0x10e)]['zIndex']??0x9,_0x4155d6['width']=this['_map']['scene']['canvas'][_0x29b99d(0x1ed)],_0x4155d6['height']=this[_0x29b99d(0x199)]['scene'][_0x29b99d(0x16d)][_0x29b99d(0x111)],_0x4155d6;}['resize'](){const _0x362650=_0x3805a0;this['canvas']&&(this[_0x362650(0x16d)]['style'][_0x362650(0x112)]=this['_map'][_0x362650(0x1ec)][_0x362650(0x16d)][_0x362650(0x1ed)]+'px',this[_0x362650(0x16d)]['style'][_0x362650(0x117)]=this[_0x362650(0x199)]['scene'][_0x362650(0x16d)]['clientHeight']+'px',this['canvas']['width']=this['_map']['scene']['canvas'][_0x362650(0x1ed)],this['canvas']['height']=this[_0x362650(0x199)][_0x362650(0x1ec)]['canvas']['clientHeight']);}[_0x3805a0(0x14c)](){const _0x48fe70=_0x3805a0,_0x5296d2=this;let _0x2a088f=Date['now']();(function _0x564772(){const _0x300310=_0x3ef7;_0x5296d2[_0x300310(0x1b9)]=window['requestAnimationFrame'](_0x564772);if(_0x5296d2['show']&&_0x5296d2[_0x300310(0x14e)]){const _0x369ab1=Date['now'](),_0x5133e0=_0x369ab1-_0x2a088f;_0x5133e0>_0x5296d2['frameTime']&&(_0x2a088f=_0x369ab1-_0x5133e0%_0x5296d2['frameTime'],_0x5296d2['update']());}}(),window['addEventListener'](_0x48fe70(0x1b4),this[_0x48fe70(0x1b4)]['bind'](this),![]),this[_0x48fe70(0x16e)]=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this[_0x48fe70(0x199)]['on'](mars3d__namespace[_0x48fe70(0x135)][_0x48fe70(0x1a5)],this[_0x48fe70(0x1c8)],this),this[_0x48fe70(0x199)]['on'](mars3d__namespace['EventType'][_0x48fe70(0x17c)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x48fe70(0x135)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x20b73b=_0x3805a0;window['cancelAnimationFrame'](this[_0x20b73b(0x1b9)]),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this[_0x20b73b(0x10e)]['mouseHidden']&&(this['_map'][_0x20b73b(0x13f)](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace[_0x20b73b(0x135)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace[_0x20b73b(0x135)][_0x20b73b(0x1c4)],this[_0x20b73b(0x157)],this),this['_map']['off'](mars3d__namespace[_0x20b73b(0x135)]['mouseMove'],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x529896){const _0x19267d=_0x3805a0;clearTimeout(this[_0x19267d(0x15b)]);if(!this['show']||!this[_0x19267d(0x16d)])return;this[_0x19267d(0x16d)]['style'][_0x19267d(0x151)]='hidden',this['refreshTimer']=setTimeout(()=>{const _0x2de8ad=_0x19267d;if(!this[_0x2de8ad(0x18a)])return;this['redraw'](),this[_0x2de8ad(0x16d)]['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x1ed3cd){const _0xffdd1a=_0x3805a0;this['mouse_down']=!![],this['_map'][_0xffdd1a(0x13f)](mars3d__namespace[_0xffdd1a(0x135)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0xffdd1a(0x199)]['on'](mars3d__namespace['EventType'][_0xffdd1a(0x109)],this['_onMouseMoveEvent'],this);}[_0x3805a0(0xfb)](_0x2e0bb5){const _0x4e4733=_0x3805a0;if(!this['show']||!this[_0x4e4733(0x16d)])return;this['mouse_down']&&(this[_0x4e4733(0x16d)]['style'][_0x4e4733(0x151)]='hidden',this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5ede9b){const _0x1d2a6c=_0x3805a0;if(!this[_0x1d2a6c(0x18a)]||!this['canvas'])return;this[_0x1d2a6c(0x199)]['off'](mars3d__namespace['EventType'][_0x1d2a6c(0x109)],this[_0x1d2a6c(0xfb)],this),this[_0x1d2a6c(0x16e)]&&this[_0x1d2a6c(0x149)]&&this['redraw'](),this[_0x1d2a6c(0x16d)]['style']['visibility']='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x4854eb){const _0x1d88b7=_0x3805a0;this['clear'](),this[_0x1d88b7(0x1ac)]=_0x4854eb,this[_0x1d88b7(0x14e)]['setDate'](_0x4854eb),this['redraw']();}[_0x3805a0(0x1aa)](){if(!this['show'])return;this['windField']['setOptions'](this['options']),this['update']();}[_0x3805a0(0x119)](){if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x5be297=this['windField']['getParticles']();this['_drawLines'](_0x5be297);}this['_updateIng']=![];}[_0x3805a0(0x15a)](_0x4da14d){const _0x4f107a=_0x3805a0;this['canvasContext']['globalCompositeOperation']='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this[_0x4f107a(0x12e)],this['canvasHeight']),this['canvasContext'][_0x4f107a(0x189)]='lighter',this['canvasContext']['globalAlpha']=0.9;const _0x344366=this[_0x4f107a(0x199)]['scene']['mode']!==Cesium['SceneMode'][_0x4f107a(0x14b)],_0x2727d1=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x5c7ce0=0x0,_0x5ea574=_0x4da14d['length'];_0x5c7ce0<_0x5ea574;_0x5c7ce0++){const _0x3077eb=_0x4da14d[_0x5c7ce0],_0x1cc9df=this[_0x4f107a(0x16c)](_0x3077eb[_0x4f107a(0x19b)],_0x3077eb['lat'],_0x3077eb),_0x59dcd4=this['_tomap'](_0x3077eb[_0x4f107a(0x13b)],_0x3077eb[_0x4f107a(0x12f)],_0x3077eb);if(!_0x1cc9df||!_0x59dcd4)continue;if(_0x344366&&Math['abs'](_0x1cc9df[0x0]-_0x59dcd4[0x0])>=_0x2727d1)continue;this[_0x4f107a(0x14a)]['beginPath'](),this[_0x4f107a(0x14a)]['lineWidth']=this['lineWidth'],this[_0x4f107a(0x14a)][_0x4f107a(0x188)]=this['_colorRamp'][_0x4f107a(0x162)](_0x3077eb['speed']),this[_0x4f107a(0x14a)]['moveTo'](_0x1cc9df[0x0],_0x1cc9df[0x1]),this['canvasContext']['lineTo'](_0x59dcd4[0x0],_0x59dcd4[0x1]),this[_0x4f107a(0x14a)][_0x4f107a(0x125)]();}else{this['canvasContext']['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this[_0x4f107a(0x14a)]['strokeStyle']=this[_0x4f107a(0x1c5)];for(let _0x1c08eb=0x0,_0x2da873=_0x4da14d[_0x4f107a(0x11b)];_0x1c08eb<_0x2da873;_0x1c08eb++){const _0xdf0145=_0x4da14d[_0x1c08eb],_0x41d8ad=this['_tomap'](_0xdf0145['lng'],_0xdf0145['lat'],_0xdf0145),_0x7e1db6=this['_tomap'](_0xdf0145['tlng'],_0xdf0145['tlat'],_0xdf0145);if(!_0x41d8ad||!_0x7e1db6)continue;if(_0x344366&&Math[_0x4f107a(0x17e)](_0x41d8ad[0x0]-_0x7e1db6[0x0])>=_0x2727d1)continue;this['canvasContext']['moveTo'](_0x41d8ad[0x0],_0x41d8ad[0x1]),this['canvasContext']['lineTo'](_0x7e1db6[0x0],_0x7e1db6[0x1]);}this['canvasContext']['stroke']();}}['_tomap'](_0x4cef1b,_0x445dad,_0x1c2855){const _0xb393=_0x3805a0,_0x471db5=Cesium['Cartesian3'][_0xb393(0x19a)](_0x4cef1b,_0x445dad,this['fixedHeight']),_0x37c838=this['_map'][_0xb393(0x1ec)];if(_0x37c838['mode']===Cesium['SceneMode'][_0xb393(0x14b)]){const _0x2a17be=new Cesium['EllipsoidalOccluder'](_0x37c838[_0xb393(0x12d)]['ellipsoid'],_0x37c838['camera'][_0xb393(0x11f)]),_0x4ac039=_0x2a17be['isPointVisible'](_0x471db5);if(!_0x4ac039)return _0x1c2855['age']=0x0,null;}const _0x1021d5=Cesium['SceneTransforms'][_0xb393(0x1ba)](this['_map']['scene'],_0x471db5);return _0x1021d5?[_0x1021d5['x'],_0x1021d5['y']]:null;}['clear'](){const _0x4ce0ee=_0x3805a0;this['windField']['clear'](),delete this[_0x4ce0ee(0x1ac)];}['initWorker'](){const _0x5a9322=_0x3805a0;this['worker']=new Worker(this[_0x5a9322(0x10e)][_0x5a9322(0x17f)]),this['worker']['onmessage']=_0x38d569=>{const _0x5ed973=_0x5a9322;this['_drawLines'](_0x38d569['data']['particles']),this[_0x5ed973(0x1dd)]=![];},this['windField']={'init':_0x24fb92=>{const _0x1644fd=_0x5a9322;this['worker']['postMessage']({'type':_0x1644fd(0x19e),'options':_0x24fb92});},'setOptions':_0x53fa4b=>{const _0x2a97b7=_0x5a9322;this['worker'][_0x2a97b7(0x1bd)]({'type':'setOptions','options':_0x53fa4b});},'setDate':_0x4a0ad5=>{this['worker']['postMessage']({'type':'setDate','data':_0x4a0ad5});},'update':()=>{const _0x117ed6=_0x5a9322;if(this[_0x117ed6(0x1dd)])return;this['_updateIng2']=!![],this[_0x117ed6(0x17f)][_0x117ed6(0x1bd)]({'type':_0x117ed6(0x119)});},'clear':()=>{const _0x3c1bd4=_0x5a9322;this[_0x3c1bd4(0x17f)][_0x3c1bd4(0x1bd)]({'type':_0x3c1bd4(0x140)});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace[_0x3805a0(0x110)]['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x3805a0(0x1ea)]=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports[_0x3805a0(0x155)]=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
15
15
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-wind",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"description": "Mars3D平台插件,支持气象 风向图 功能插件",
|
|
5
5
|
"main": "dist/mars3d-wind.js",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"peerDependencies": {},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"mars3d": "~3.6.
|
|
11
|
+
"mars3d": "~3.6.3"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|