mars3d-wind 3.7.0 → 3.7.2
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 +4 -4
- package/package.json +2 -4
package/dist/mars3d-wind.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.7.
|
|
5
|
-
* 编译日期:2024-01-
|
|
4
|
+
* 版本信息:v3.7.2
|
|
5
|
+
* 编译日期:2024-01-29 17:17:13
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
|
-
* 使用单位:免费公开版 ,
|
|
7
|
+
* 使用单位:免费公开版 ,2024-01-15
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, (window.mars3d || require('mars3d'))) :
|
|
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 _0x589cd8=_0x38cd;(function(_0xd01413,_0x3a35eb){const _0x4dade2=_0x38cd,_0x24910d=_0xd01413();while(!![]){try{const _0x44422c=-parseInt(_0x4dade2(0x235))/0x1+-parseInt(_0x4dade2(0x196))/0x2+parseInt(_0x4dade2(0x17d))/0x3+parseInt(_0x4dade2(0x1d7))/0x4*(parseInt(_0x4dade2(0x192))/0x5)+-parseInt(_0x4dade2(0x23b))/0x6*(-parseInt(_0x4dade2(0x1f7))/0x7)+-parseInt(_0x4dade2(0x1df))/0x8+parseInt(_0x4dade2(0x240))/0x9;if(_0x44422c===_0x3a35eb)break;else _0x24910d['push'](_0x24910d['shift']());}catch(_0xa401a6){_0x24910d['push'](_0x24910d['shift']());}}}(_0x1821,0x8f498));function _interopNamespace(_0x2c40e8){const _0x23cf51=_0x38cd;if(_0x2c40e8&&_0x2c40e8[_0x23cf51(0x214)])return _0x2c40e8;var _0x38d35d=Object['create'](null);return _0x2c40e8&&Object['keys'](_0x2c40e8)[_0x23cf51(0x1b4)](function(_0x1cf0cc){if(_0x1cf0cc!=='default'){var _0x574443=Object['getOwnPropertyDescriptor'](_0x2c40e8,_0x1cf0cc);Object['defineProperty'](_0x38d35d,_0x1cf0cc,_0x574443['get']?_0x574443:{'enumerable':!![],'get':function(){return _0x2c40e8[_0x1cf0cc];}});}}),_0x38d35d[_0x23cf51(0x243)]=_0x2c40e8,_0x38d35d;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x60ace1,_0x1161cb){const _0xd5fc40=_0x60ace1*Math['cos'](Cesium$7['Math']['toRadians'](_0x1161cb));return _0xd5fc40;}function getV(_0x361792,_0x574f72){const _0x39a245=_0x361792*Math['sin'](Cesium$7['Math']['toRadians'](_0x574f72));return _0x39a245;}function _0x38cd(_0x4db144,_0x36dac2){const _0x182144=_0x1821();return _0x38cd=function(_0x38cd2e,_0x5cde6c){_0x38cd2e=_0x38cd2e-0x178;let _0xecf315=_0x182144[_0x38cd2e];return _0xecf315;},_0x38cd(_0x4db144,_0x36dac2);}function getSpeed(_0x297b2f,_0x828a8d){const _0x892893=_0x38cd,_0xd419ae=Math[_0x892893(0x1f8)](Math[_0x892893(0x1db)](_0x297b2f,0x2)+Math['pow'](_0x828a8d,0x2));return _0xd419ae;}function getDirection(_0x5f3896,_0x217150){const _0xc15aa6=_0x38cd;let _0x5944a5=Cesium$7[_0xc15aa6(0x19c)][_0xc15aa6(0x220)](Math['atan2'](_0x217150,_0x5f3896));return _0x5944a5+=_0x5944a5<0x0?0x168:0x0,_0x5944a5;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x8848d9){const _0x24d32f=_0x38cd;this['commandType']=_0x8848d9['commandType'],this[_0x24d32f(0x242)]=_0x8848d9['geometry'],this['attributeLocations']=_0x8848d9['attributeLocations'],this['primitiveType']=_0x8848d9[_0x24d32f(0x218)],this['uniformMap']=_0x8848d9['uniformMap'],this['vertexShaderSource']=_0x8848d9['vertexShaderSource'],this[_0x24d32f(0x261)]=_0x8848d9['fragmentShaderSource'],this['rawRenderState']=_0x8848d9[_0x24d32f(0x1e0)],this[_0x24d32f(0x1cf)]=_0x8848d9[_0x24d32f(0x1cf)],this['outputTexture']=_0x8848d9['outputTexture'],this['autoClear']=_0x8848d9['autoClear']??![],this['preExecute']=_0x8848d9['preExecute'],this['show']=!![],this['commandToExecute']=undefined,this[_0x24d32f(0x213)]=undefined,this['autoClear']&&(this[_0x24d32f(0x213)]=new Cesium$6['ClearCommand']({'color':new Cesium$6[(_0x24d32f(0x1d8))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x24d32f(0x1fa)]['OPAQUE']}));}[_0x589cd8(0x265)](_0x35dc1d){const _0x16f745=_0x589cd8;switch(this['commandType']){case'Draw':{const _0x4fe10e=Cesium$6['VertexArray']['fromGeometry']({'context':_0x35dc1d,'geometry':this['geometry'],'attributeLocations':this[_0x16f745(0x1f0)],'bufferUsage':Cesium$6[_0x16f745(0x18c)][_0x16f745(0x1b8)]}),_0x49d66b=Cesium$6['ShaderProgram']['fromCache']({'context':_0x35dc1d,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0xb86b03=Cesium$6['RenderState'][_0x16f745(0x1d6)](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x49d66b,'vertexArray':_0x4fe10e,'modelMatrix':Cesium$6['Matrix4'][_0x16f745(0x1d3)],'renderState':_0xb86b03,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0x16f745(0x1cf)],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x16f745(0x1b7):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this[_0x16f745(0x1de)],'outputTexture':this['outputTexture'],'persists':!![]});}}}[_0x589cd8(0x1b0)](_0x34bd5e,_0x5ea161){const _0x35cdc8=_0x589cd8;this['geometry']=_0x5ea161;const _0x12a871=Cesium$6['VertexArray']['fromGeometry']({'context':_0x34bd5e,'geometry':this['geometry'],'attributeLocations':this[_0x35cdc8(0x1f0)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x12a871;}[_0x589cd8(0x1ea)](_0x1f2024){const _0x36d441=_0x589cd8;if(!this['show'])return;if(_0x1f2024['mode']!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6[_0x36d441(0x185)](this['commandToExecute'])&&(this['commandToExecute']=this[_0x36d441(0x265)](_0x1f2024[_0x36d441(0x1be)])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6[_0x36d441(0x185)](this[_0x36d441(0x213)])&&_0x1f2024['commandList']['push'](this[_0x36d441(0x213)]),_0x1f2024['commandList']['push'](this['commandToExecute']);}[_0x589cd8(0x210)](){return![];}['destroy'](){const _0x774a09=_0x589cd8;if(this['clearCommand']){var _0x400ac,_0x3bf6fa;(_0x400ac=this['clearCommand'])!==null&&_0x400ac!==void 0x0&&_0x400ac[_0x774a09(0x18b)]&&this['clearCommand']['vertexArray']['destroy'](),(_0x3bf6fa=this['clearCommand'])!==null&&_0x3bf6fa!==void 0x0&&_0x3bf6fa[_0x774a09(0x22d)]&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this[_0x774a09(0x25b)]['vertexArray']&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram']['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace[_0x589cd8(0x195)],Util=(function(){const _0x1a92c4=function(){const _0x203d5f=_0x38cd,_0x56dfa9=new Cesium$5[(_0x203d5f(0x223))]({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5[(_0x203d5f(0x254))]({'componentDatatype':Cesium$5[_0x203d5f(0x199)]['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 _0x56dfa9;},_0x23d928=function(_0x897bf3,_0x417be2){const _0xb6ba73=_0x38cd;if(Cesium$5['defined'](_0x417be2)){const _0x580164={};_0x580164['arrayBufferView']=_0x417be2,_0x897bf3[_0xb6ba73(0x1c5)]=_0x580164;}const _0x438f53=new Cesium$5['Texture'](_0x897bf3);return _0x438f53;},_0x584d5f=function(_0x20dfa2,_0x13909f,_0x4429e4){const _0x49f0f0=new Cesium$5['Framebuffer']({'context':_0x20dfa2,'colorTextures':[_0x13909f],'depthTexture':_0x4429e4});return _0x49f0f0;},_0x10f7e6=function(_0x216d8d){const _0x36c033=_0x38cd,_0x1d6f6a=!![],_0x247846=![],_0x51d618={'viewport':_0x216d8d['viewport'],'depthTest':_0x216d8d[_0x36c033(0x1ae)],'depthMask':_0x216d8d[_0x36c033(0x238)],'blending':_0x216d8d[_0x36c033(0x1af)]},_0x1a5bf9=Cesium$5[_0x36c033(0x204)]['getDefaultRenderState'](_0x1d6f6a,_0x247846,_0x51d618);return _0x1a5bf9;},_0x262d4b=function(_0x52e55f){const _0x2d93ed=_0x38cd,_0x5077dc={},_0x20c2ef=Cesium$5[_0x2d93ed(0x19c)]['mod'](_0x52e55f['west'],Cesium$5[_0x2d93ed(0x19c)][_0x2d93ed(0x178)]),_0x561ce1=Cesium$5[_0x2d93ed(0x19c)]['mod'](_0x52e55f['east'],Cesium$5['Math']['TWO_PI']),_0x146943=_0x52e55f[_0x2d93ed(0x207)];let _0xc2b7ec,_0x105a07;_0x146943>Cesium$5[_0x2d93ed(0x19c)]['THREE_PI_OVER_TWO']?(_0xc2b7ec=0x0,_0x105a07=Cesium$5['Math']['TWO_PI']):_0x561ce1-_0x20c2ef<_0x146943?(_0xc2b7ec=_0x20c2ef,_0x105a07=_0x20c2ef+_0x146943):(_0xc2b7ec=_0x20c2ef,_0x105a07=_0x561ce1);_0x5077dc['lon']={'min':Cesium$5['Math']['toDegrees'](_0xc2b7ec),'max':Cesium$5[_0x2d93ed(0x19c)]['toDegrees'](_0x105a07)};const _0x3aeedf=_0x52e55f['south'],_0x5e5271=_0x52e55f['north'],_0x4a762c=_0x52e55f[_0x2d93ed(0x186)],_0x1fc271=_0x4a762c>Cesium$5['Math']['PI']/0xc?_0x4a762c/0x2:0x0;let _0xeb12=Cesium$5['Math'][_0x2d93ed(0x209)](_0x3aeedf-_0x1fc271),_0x4ef8a6=Cesium$5['Math'][_0x2d93ed(0x209)](_0x5e5271+_0x1fc271);return _0xeb12<-Cesium$5['Math'][_0x2d93ed(0x20e)]&&(_0xeb12=-Cesium$5['Math']['PI_OVER_TWO']),_0x4ef8a6>Cesium$5['Math']['PI_OVER_THREE']&&(_0x4ef8a6=Cesium$5['Math']['PI_OVER_TWO']),_0x5077dc[_0x2d93ed(0x1f4)]={'min':Cesium$5['Math']['toDegrees'](_0xeb12),'max':Cesium$5['Math']['toDegrees'](_0x4ef8a6)},_0x5077dc;};return{'getFullscreenQuad':_0x1a92c4,'createTexture':_0x23d928,'createFramebuffer':_0x584d5f,'createRawRenderState':_0x10f7e6,'viewRectangleToLonLatRange':_0x262d4b};}());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=_0x589cd8(0x1d1),trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x32b17e,_0x278eca,_0x3d9fe4,_0xd8a097,_0x53a179){const _0xc7521=_0x589cd8;this['createRenderingTextures'](_0x32b17e,_0x278eca,_0x3d9fe4[_0xc7521(0x19e)]),this['createRenderingFramebuffers'](_0x32b17e),this[_0xc7521(0x268)](_0x32b17e,_0x3d9fe4,_0xd8a097,_0x53a179);}['createRenderingTextures'](_0x32de50,_0x2e55a6,_0x11e472){const _0x1f2249=_0x589cd8,_0x173423={'context':_0x32de50,'width':_0x32de50['drawingBufferWidth'],'height':_0x32de50['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x1f2249(0x182)]['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x1fdbb2={'context':_0x32de50,'width':_0x32de50[_0x1f2249(0x181)],'height':_0x32de50[_0x1f2249(0x259)],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x864f29=_0x11e472['length'],_0xb49309=new Float32Array(_0x864f29*0x3);for(let _0x36cea0=0x0;_0x36cea0<_0x864f29;_0x36cea0++){const _0x165e8b=Cesium$4['Color']['fromCssColorString'](_0x11e472[_0x36cea0]);_0xb49309[0x3*_0x36cea0]=_0x165e8b['red'],_0xb49309[0x3*_0x36cea0+0x1]=_0x165e8b['green'],_0xb49309[0x3*_0x36cea0+0x2]=_0x165e8b['blue'];}const _0x42fbdb={'context':_0x32de50,'width':_0x864f29,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4[(_0x1f2249(0x1b1))]({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this['textures']={'segmentsColor':Util['createTexture'](_0x173423),'segmentsDepth':Util['createTexture'](_0x1fdbb2),'currentTrailsColor':Util[_0x1f2249(0x202)](_0x173423),'currentTrailsDepth':Util['createTexture'](_0x1fdbb2),'nextTrailsColor':Util[_0x1f2249(0x202)](_0x173423),'nextTrailsDepth':Util[_0x1f2249(0x202)](_0x1fdbb2),'colorTable':Util[_0x1f2249(0x202)](_0x42fbdb,_0xb49309)};}['createRenderingFramebuffers'](_0x473b20){const _0x3c327c=_0x589cd8;this[_0x3c327c(0x230)]={'segments':Util[_0x3c327c(0x23a)](_0x473b20,this[_0x3c327c(0x1ec)]['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util[_0x3c327c(0x23a)](_0x473b20,this['textures']['currentTrailsColor'],this['textures']['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x473b20,this[_0x3c327c(0x1ec)]['nextTrailsColor'],this[_0x3c327c(0x1ec)]['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x4e9ea2){const _0x58f84b=_0x589cd8,_0x2c3286=0x4;let _0x5d04de=[];for(let _0x4c10e5=0x0;_0x4c10e5<_0x4e9ea2['particlesTextureSize'];_0x4c10e5++){for(let _0x1d0721=0x0;_0x1d0721<_0x4e9ea2['particlesTextureSize'];_0x1d0721++){for(let _0x7a29af=0x0;_0x7a29af<_0x2c3286;_0x7a29af++){_0x5d04de[_0x58f84b(0x1c7)](_0x4c10e5/_0x4e9ea2['particlesTextureSize']),_0x5d04de[_0x58f84b(0x1c7)](_0x1d0721/_0x4e9ea2['particlesTextureSize']);}}}_0x5d04de=new Float32Array(_0x5d04de);let _0x3f726e=[];const _0x15cdd1=[-0x1,0x1],_0x51a112=[-0x1,0x1];for(let _0x4a5a62=0x0;_0x4a5a62<_0x4e9ea2['maxParticles'];_0x4a5a62++){for(let _0x35b7a1=0x0;_0x35b7a1<_0x2c3286/0x2;_0x35b7a1++){for(let _0x439c5a=0x0;_0x439c5a<_0x2c3286/0x2;_0x439c5a++){_0x3f726e['push'](_0x15cdd1[_0x35b7a1]),_0x3f726e['push'](_0x51a112[_0x439c5a]),_0x3f726e['push'](0x0);}}}_0x3f726e=new Float32Array(_0x3f726e);const _0x12a7eb=0x6*_0x4e9ea2['maxParticles'],_0x5c0e43=new Uint32Array(_0x12a7eb);for(let _0x2d0df1=0x0,_0x53378b=0x0,_0xe9b293=0x0;_0x2d0df1<_0x4e9ea2['maxParticles'];_0x2d0df1++){_0x5c0e43[_0x53378b++]=_0xe9b293+0x0,_0x5c0e43[_0x53378b++]=_0xe9b293+0x1,_0x5c0e43[_0x53378b++]=_0xe9b293+0x2,_0x5c0e43[_0x53378b++]=_0xe9b293+0x2,_0x5c0e43[_0x53378b++]=_0xe9b293+0x1,_0x5c0e43[_0x53378b++]=_0xe9b293+0x3,_0xe9b293+=0x4;}const _0x3cb0ca=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x58f84b(0x22f)],'componentsPerAttribute':0x2,'values':_0x5d04de}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x3f726e})}),'indices':_0x5c0e43});return _0x3cb0ca;}['createRenderingPrimitives'](_0x3cb7fb,_0x4eeac3,_0x4b7d40,_0x47f234){const _0x16b7c9=_0x589cd8,_0x369078=this;this[_0x16b7c9(0x18f)]={'segments':new CustomPrimitive({'commandType':_0x16b7c9(0x253),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x4eeac3),'primitiveType':Cesium$4[_0x16b7c9(0x1c6)][_0x16b7c9(0x1f3)],'uniformMap':{'currentParticlesPosition':function(){return _0x47f234['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x47f234['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x3b107b=_0x16b7c9;return _0x47f234[_0x3b107b(0x1dd)]['postProcessingSpeed'];},'colorTable':function(){const _0x392cbc=_0x16b7c9;return _0x369078[_0x392cbc(0x1ec)]['colorTable'];},'aspect':function(){const _0xf56275=_0x16b7c9;return _0x3cb7fb[_0xf56275(0x181)]/_0x3cb7fb['drawingBufferHeight'];},'pixelSize':function(){const _0x18d0f5=_0x16b7c9;return _0x4b7d40[_0x18d0f5(0x184)];},'lineWidth':function(){return _0x4eeac3['lineWidth'];},'particleHeight':function(){const _0x3e6e42=_0x16b7c9;return _0x4eeac3[_0x3e6e42(0x180)];}},'vertexShaderSource':new Cesium$4[(_0x16b7c9(0x1bd))]({'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[_0x16b7c9(0x212)](),'primitiveType':Cesium$4[_0x16b7c9(0x1c6)]['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0x369078['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x5cf4da=_0x16b7c9;return _0x369078['textures'][_0x5cf4da(0x1fd)];},'currentTrailsColor':function(){const _0x15ad2e=_0x16b7c9;return _0x369078[_0x15ad2e(0x230)]['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x369078['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0x4eeac3['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x16b7c9(0x1bd))]({'defines':[_0x16b7c9(0x229)],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0x16b7c9(0x221)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x2a570a=_0x16b7c9,_0x431c39=_0x369078['framebuffers'][_0x2a570a(0x21b)];_0x369078['framebuffers'][_0x2a570a(0x21b)]=_0x369078['framebuffers']['nextTrails'],_0x369078['framebuffers']['nextTrails']=_0x431c39,_0x369078[_0x2a570a(0x18f)]['trails'][_0x2a570a(0x25b)][_0x2a570a(0x1cf)]=_0x369078[_0x2a570a(0x230)][_0x2a570a(0x211)],_0x369078['primitives'][_0x2a570a(0x21c)][_0x2a570a(0x213)]['framebuffer']=_0x369078['framebuffers'][_0x2a570a(0x211)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x16b7c9(0x212)](),'primitiveType':Cesium$4['PrimitiveType'][_0x16b7c9(0x1f3)],'uniformMap':{'trailsColorTexture':function(){const _0x2c20c8=_0x16b7c9;return _0x369078['framebuffers'][_0x2c20c8(0x211)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x369078['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x16b7c9(0x1cb)]({'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=_0x589cd8(0x1a6),postProcessingPosition_frag=_0x589cd8(0x247),postProcessingSpeed_frag=_0x589cd8(0x1ca);const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x39fc18,_0xe01c8e,_0x1a02b2,_0xc9dfa7){const _0x2f0899=_0x589cd8;this['data']=_0xe01c8e,this[_0x2f0899(0x193)](_0x39fc18,_0xe01c8e),this['createParticlesTextures'](_0x39fc18,_0x1a02b2,_0xc9dfa7),this['createComputingPrimitives'](_0xe01c8e,_0x1a02b2,_0xc9dfa7);}['createWindTextures'](_0x1e17fa,_0xb04238){const _0x174a18=_0x589cd8,_0x47307e={'context':_0x1e17fa,'width':_0xb04238[_0x174a18(0x262)]['lon'],'height':_0xb04238['dimensions']['lat']*(_0xb04238[_0x174a18(0x262)]['lev']||0x1),'pixelFormat':Cesium$3[_0x174a18(0x182)][_0x174a18(0x1fb)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x174a18(0x1c3)],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x174a18(0x1c3)]})};this[_0x174a18(0x1bb)]={'U':Util['createTexture'](_0x47307e,_0xb04238['U']['array']),'V':Util['createTexture'](_0x47307e,_0xb04238['V']['array'])};}['createParticlesTextures'](_0x2fb82f,_0x2bb69e,_0xc2571e){const _0x49ee06=_0x589cd8,_0x452314={'context':_0x2fb82f,'width':_0x2bb69e['particlesTextureSize'],'height':_0x2bb69e[_0x49ee06(0x1bc)],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3[_0x49ee06(0x1eb)]['NEAREST'],'magnificationFilter':Cesium$3[_0x49ee06(0x203)]['NEAREST']})},_0x237b5f=this[_0x49ee06(0x1ab)](_0x2bb69e[_0x49ee06(0x237)],_0xc2571e),_0x373c45=new Float32Array(0x4*_0x2bb69e[_0x49ee06(0x237)])['fill'](0x0);this['particlesTextures']={'particlesWind':Util[_0x49ee06(0x202)](_0x452314),'currentParticlesPosition':Util['createTexture'](_0x452314,_0x237b5f),'nextParticlesPosition':Util['createTexture'](_0x452314,_0x237b5f),'currentParticlesSpeed':Util['createTexture'](_0x452314,_0x373c45),'nextParticlesSpeed':Util[_0x49ee06(0x202)](_0x452314,_0x373c45),'postProcessingPosition':Util['createTexture'](_0x452314,_0x237b5f),'postProcessingSpeed':Util[_0x49ee06(0x202)](_0x452314,_0x373c45)};}['randomizeParticles'](_0x5016e0,_0x14a091){const _0x1cfc76=_0x589cd8,_0x548000=new Float32Array(0x4*_0x5016e0);for(let _0x365160=0x0;_0x365160<_0x5016e0;_0x365160++){_0x548000[0x4*_0x365160]=Cesium$3['Math'][_0x1cfc76(0x23f)](_0x14a091['lonRange']['x'],_0x14a091[_0x1cfc76(0x22c)]['y']),_0x548000[0x4*_0x365160+0x1]=Cesium$3[_0x1cfc76(0x19c)][_0x1cfc76(0x23f)](_0x14a091['latRange']['x'],_0x14a091['latRange']['y']),_0x548000[0x4*_0x365160+0x2]=Cesium$3[_0x1cfc76(0x19c)]['randomBetween'](this['data']['lev'][_0x1cfc76(0x1f5)],this['data']['lev']['max']),_0x548000[0x4*_0x365160+0x3]=0x0;}return _0x548000;}[_0x589cd8(0x215)](){Object['keys'](this['particlesTextures'])['forEach'](_0x118dc1=>{const _0x14782a=_0x38cd;this[_0x14782a(0x1dd)][_0x118dc1][_0x14782a(0x263)]();});}['createComputingPrimitives'](_0x2bac58,_0x237889,_0x20d209){const _0x42ecb7=_0x589cd8,_0x308017=new Cesium$3[(_0x42ecb7(0x1d0))](_0x2bac58['dimensions'][_0x42ecb7(0x20b)],_0x2bac58['dimensions']['lat'],_0x2bac58[_0x42ecb7(0x262)][_0x42ecb7(0x227)]),_0xe21531=new Cesium$3[(_0x42ecb7(0x1d0))](_0x2bac58['lon']['min'],_0x2bac58['lat'][_0x42ecb7(0x1f5)],_0x2bac58['lev'][_0x42ecb7(0x1f5)]),_0x9c40b3=new Cesium$3['Cartesian3'](_0x2bac58['lon'][_0x42ecb7(0x1e3)],_0x2bac58['lat'][_0x42ecb7(0x1e3)],_0x2bac58[_0x42ecb7(0x227)][_0x42ecb7(0x1e3)]),_0x3f5d72=new Cesium$3[(_0x42ecb7(0x1d0))]((_0x9c40b3['x']-_0xe21531['x'])/(_0x308017['x']-0x1),(_0x9c40b3['y']-_0xe21531['y'])/(_0x308017['y']-0x1),_0x308017['z']>0x1?(_0x9c40b3['z']-_0xe21531['z'])/(_0x308017['z']-0x1):0x1),_0x4d5ab7=new Cesium$3['Cartesian2'](_0x2bac58['U']['min'],_0x2bac58['U']['max']),_0x248428=new Cesium$3[(_0x42ecb7(0x25f))](_0x2bac58['V']['min'],_0x2bac58['V']['max']),_0x12a1a6=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':_0x42ecb7(0x1b7),'uniformMap':{'U':function(){return _0x12a1a6['windTextures']['U'];},'V':function(){return _0x12a1a6['windTextures']['V'];},'currentParticlesPosition':function(){return _0x12a1a6['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x308017;},'minimum':function(){return _0xe21531;},'maximum':function(){return _0x9c40b3;},'interval':function(){return _0x3f5d72;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x42ecb7(0x1d5)],'preExecute':function(){const _0x5b2796=_0x42ecb7;_0x12a1a6['primitives'][_0x5b2796(0x1a5)]['commandToExecute'][_0x5b2796(0x236)]=_0x12a1a6['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x12a1a6['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){return _0x12a1a6['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x4d5ab7;},'vSpeedRange':function(){return _0x248428;},'pixelSize':function(){const _0x1f5448=_0x42ecb7;return _0x20d209[_0x1f5448(0x184)];},'speedFactor':function(){return _0x237889['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x39dd36=_0x42ecb7,_0x2dd41f=_0x12a1a6[_0x39dd36(0x1dd)]['currentParticlesSpeed'];_0x12a1a6['particlesTextures']['currentParticlesSpeed']=_0x12a1a6['particlesTextures'][_0x39dd36(0x20d)],_0x12a1a6['particlesTextures']['postProcessingSpeed']=_0x2dd41f,_0x12a1a6['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x12a1a6['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x12a1a6['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x1a25fd=_0x42ecb7;return _0x12a1a6[_0x1a25fd(0x1dd)]['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x42ecb7(0x1dd)][_0x42ecb7(0x24d)],'preExecute':function(){const _0x23fcd6=_0x42ecb7,_0x54a255=_0x12a1a6['particlesTextures']['currentParticlesPosition'];_0x12a1a6[_0x23fcd6(0x1dd)]['currentParticlesPosition']=_0x12a1a6['particlesTextures']['postProcessingPosition'],_0x12a1a6['particlesTextures']['postProcessingPosition']=_0x54a255,_0x12a1a6['primitives']['updatePosition']['commandToExecute'][_0x23fcd6(0x236)]=_0x12a1a6[_0x23fcd6(0x1dd)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x42ecb7(0x1b7),'uniformMap':{'nextParticlesPosition':function(){return _0x12a1a6['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x12a1a6['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x20d209['lonRange'];},'latRange':function(){return _0x20d209['latRange'];},'randomCoefficient':function(){const _0x2c37e9=Math['random']();return _0x2c37e9;},'dropRate':function(){return _0x237889['dropRate'];},'dropRateBump':function(){return _0x237889['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures'][_0x42ecb7(0x23c)],'preExecute':function(){const _0x7f45d8=_0x42ecb7;_0x12a1a6[_0x7f45d8(0x18f)]['postProcessingPosition']['commandToExecute']['outputTexture']=_0x12a1a6[_0x7f45d8(0x1dd)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x3a4973=_0x42ecb7;return _0x12a1a6['particlesTextures'][_0x3a4973(0x23c)];},'nextParticlesSpeed':function(){return _0x12a1a6['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x42ecb7(0x1bd))]({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x42ecb7(0x20d)],'preExecute':function(){const _0x3701dc=_0x42ecb7;_0x12a1a6['primitives']['postProcessingSpeed']['commandToExecute']['outputTexture']=_0x12a1a6['particlesTextures'][_0x3701dc(0x20d)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x498e7c,_0x234aad,_0x293f59,_0x42aff5){const _0x451155=_0x589cd8;this['context']=_0x498e7c,_0x234aad={..._0x234aad},_0x234aad['udata']&&_0x234aad['vdata']&&(_0x234aad['dimensions']={},_0x234aad['dimensions']['lon']=_0x234aad['cols'],_0x234aad['dimensions'][_0x451155(0x1f4)]=_0x234aad['rows'],_0x234aad['dimensions'][_0x451155(0x227)]=_0x234aad['lev']||0x1,_0x234aad['lon']={},_0x234aad['lon']['min']=_0x234aad[_0x451155(0x246)],_0x234aad['lon']['max']=_0x234aad['xmax'],_0x234aad[_0x451155(0x1f4)]={},_0x234aad['lat']['min']=_0x234aad['ymin'],_0x234aad[_0x451155(0x1f4)]['max']=_0x234aad['ymax'],_0x234aad['lev']={},_0x234aad[_0x451155(0x227)][_0x451155(0x1f5)]=_0x234aad[_0x451155(0x1ee)]??0x1,_0x234aad['lev']['max']=_0x234aad['levmax']??0x1,_0x234aad['U']={},_0x234aad['U'][_0x451155(0x18e)]=new Float32Array(_0x234aad[_0x451155(0x194)]),_0x234aad['U'][_0x451155(0x1f5)]=_0x234aad[_0x451155(0x1d9)]??Math['min'](..._0x234aad['udata']),_0x234aad['U'][_0x451155(0x1e3)]=_0x234aad['umax']??Math['max'](..._0x234aad[_0x451155(0x194)]),_0x234aad['V']={},_0x234aad['V']['array']=new Float32Array(_0x234aad['vdata']),_0x234aad['V']['min']=_0x234aad['vmin']??Math['min'](..._0x234aad[_0x451155(0x189)]),_0x234aad['V']['max']=_0x234aad['vmax']??Math['max'](..._0x234aad[_0x451155(0x189)])),this['data']=_0x234aad,this['options']=_0x293f59,this[_0x451155(0x233)]=_0x42aff5,this[_0x451155(0x257)]=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this[_0x451155(0x19a)]=new ParticlesRendering(this['context'],this[_0x451155(0x234)],this['options'],this[_0x451155(0x233)],this['particlesComputing']);}['canvasResize'](_0x28a8f6){const _0x31d733=_0x589cd8;this['particlesComputing'][_0x31d733(0x215)](),Object['keys'](this[_0x31d733(0x257)]['windTextures'])['forEach'](_0x511fdc=>{this['particlesComputing']['windTextures'][_0x511fdc]['destroy']();}),this['particlesRendering']['textures']['colorTable'][_0x31d733(0x263)](),Object['keys'](this['particlesRendering'][_0x31d733(0x230)])[_0x31d733(0x1b4)](_0x22d2a5=>{this['particlesRendering']['framebuffers'][_0x22d2a5]['destroy']();}),this['context']=_0x28a8f6,this['particlesComputing']=new ParticlesComputing(this[_0x31d733(0x1be)],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this[_0x31d733(0x20f)],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x3f6e88=_0x589cd8,_0x571d1c=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x3f6e88(0x1d8))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object[_0x3f6e88(0x1a3)](this[_0x3f6e88(0x19a)][_0x3f6e88(0x230)])['forEach'](_0x19e8cc=>{const _0x5539da=_0x3f6e88;_0x571d1c['framebuffer']=this['particlesRendering'][_0x5539da(0x230)][_0x19e8cc],_0x571d1c['execute'](this['context']);});}['refreshParticles'](_0x815190){const _0x5c3ee8=_0x589cd8;this[_0x5c3ee8(0x1b9)](),this[_0x5c3ee8(0x257)]['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this[_0x5c3ee8(0x1be)],this[_0x5c3ee8(0x20f)],this[_0x5c3ee8(0x233)]);if(_0x815190){var _0x14f208;const _0x3ecfec=this[_0x5c3ee8(0x19a)]['createSegmentsGeometry'](this['options']);this[_0x5c3ee8(0x19a)]['primitives']['segments'][_0x5c3ee8(0x242)]=_0x3ecfec;const _0x299f3e=Cesium$2['VertexArray'][_0x5c3ee8(0x179)]({'context':this['context'],'geometry':_0x3ecfec,'attributeLocations':this['particlesRendering'][_0x5c3ee8(0x18f)]['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});(_0x14f208=this['particlesRendering']['primitives'])!==null&&_0x14f208!==void 0x0&&(_0x14f208=_0x14f208['segments'])!==null&&_0x14f208!==void 0x0&&_0x14f208['commandToExecute']&&(this[_0x5c3ee8(0x19a)][_0x5c3ee8(0x18f)]['segments']['commandToExecute']['vertexArray']=_0x299f3e);}}['setOptions'](_0x49dcd2){const _0x136628=_0x589cd8;let _0x1be17e=![];this[_0x136628(0x20f)][_0x136628(0x237)]!==_0x49dcd2['maxParticles']&&(_0x1be17e=!![]),Object['keys'](_0x49dcd2)['forEach'](_0x4b81e4=>{this['options'][_0x4b81e4]=_0x49dcd2[_0x4b81e4];}),this['refreshParticles'](_0x1be17e);}['applyViewerParameters'](_0x329163){Object['keys'](_0x329163)['forEach'](_0x419fd4=>{const _0x19c52b=_0x38cd;this[_0x19c52b(0x233)][_0x419fd4]=_0x329163[_0x419fd4];}),this['refreshParticles'](![]);}[_0x589cd8(0x263)](){clearTimeout(this['canrefresh']),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x3a842f=>{const _0xd0225f=_0x38cd;this[_0xd0225f(0x257)]['windTextures'][_0x3a842f]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x22a3ba=>{const _0x5bf346=_0x38cd;this[_0x5bf346(0x19a)]['framebuffers'][_0x22a3ba][_0x5bf346(0x263)]();});for(const _0x33c27c in this){delete this[_0x33c27c];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':['rgb(206,255,255)']};class WindLayer extends BaseLayer$1{constructor(_0xf5f3ed={}){_0xf5f3ed={...DEF_OPTIONS,..._0xf5f3ed},super(_0xf5f3ed),this['_setOptionsHook'](_0xf5f3ed);}get['layer'](){return this['primitives'];}get['data'](){return this['_data'];}set[_0x589cd8(0x234)](_0x312c90){const _0x23a7fa=_0x589cd8;this[_0x23a7fa(0x1c1)](_0x312c90);}get['colors'](){return this['options']['colors'];}set['colors'](_0x4e2df2){const _0xeb0448=_0x589cd8;this['options'][_0xeb0448(0x19e)]=_0x4e2df2,this['particleSystem']&&this[_0xeb0448(0x241)]['setOptions']({'colors':_0x4e2df2}),this['resize']();}['_mountedHook'](){}[_0x589cd8(0x25d)](){const _0x2f6ef9=_0x589cd8;this['scene']=this['_map']['scene'],this['camera']=this['_map'][_0x2f6ef9(0x22b)],this[_0x2f6ef9(0x18f)]=new Cesium$1['PrimitiveCollection'](),this['_map'][_0x2f6ef9(0x24f)][_0x2f6ef9(0x18f)]['add'](this[_0x2f6ef9(0x18f)]),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x2f6ef9(0x256)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this[_0x2f6ef9(0x1b6)](),window['addEventListener']('resize',this[_0x2f6ef9(0x208)][_0x2f6ef9(0x252)](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType'][_0x2f6ef9(0x25a)],this['_onMapWhellEvent'],this),this[_0x2f6ef9(0x187)]['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this[_0x2f6ef9(0x187)]['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x2f6ef9(0x232)],this['_onMouseMoveEvent'],this),this['_data']&&this[_0x2f6ef9(0x1c1)](this['_data']);}['_removedHook'](){const _0x3d3e3d=_0x589cd8;window['removeEventListener']('resize',this['resize']),this[_0x3d3e3d(0x187)]['off'](mars3d__namespace[_0x3d3e3d(0x1e6)]['preRender'],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace[_0x3d3e3d(0x1e6)]['wheel'],this['_onMapWhellEvent'],this),this[_0x3d3e3d(0x187)][_0x3d3e3d(0x198)](mars3d__namespace[_0x3d3e3d(0x1e6)]['mouseDown'],this[_0x3d3e3d(0x1d4)],this),this[_0x3d3e3d(0x187)]['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x3d3e3d(0x232)],this['_onMouseMoveEvent'],this),this['primitives'][_0x3d3e3d(0x1a7)](),this['_map']['scene']['primitives']['remove'](this['primitives']);}['resize'](){const _0x10b586=_0x589cd8;if(!this['show']||!this['particleSystem'])return;this[_0x10b586(0x18f)]['show']=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType']['preRender'],this[_0x10b586(0x197)],this);}[_0x589cd8(0x197)](_0x271979){const _0x50f98f=_0x589cd8;this['particleSystem']['canvasResize'](this[_0x50f98f(0x24f)]['context']),this['addPrimitives'](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x905a54){const _0x2a7e59=_0x589cd8;clearTimeout(this[_0x2a7e59(0x21a)]);if(!this[_0x2a7e59(0x20c)]||!this['particleSystem'])return;this['primitives'][_0x2a7e59(0x20c)]=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x53f289){const _0x382b7c=_0x589cd8;this[_0x382b7c(0x1fc)]=!![];}['_onMouseMoveEvent'](_0x665ea8){const _0x31c552=_0x589cd8;if(!this['show']||!this['particleSystem'])return;this[_0x31c552(0x1fc)]&&(this['primitives']['show']=![],this[_0x31c552(0x206)]=!![]);}['_onMouseUpEvent'](_0x121901){const _0x365092=_0x589cd8;if(!this[_0x365092(0x20c)]||!this['particleSystem'])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this[_0x365092(0x1fc)]=![],this[_0x365092(0x206)]=![];}['redraw'](){if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x4282c6){const _0x2cd4d5=_0x589cd8;this[_0x2cd4d5(0x1ce)]=_0x4282c6,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x2cd4d5(0x1be)],_0x4282c6,this['getOptions'](),this[_0x2cd4d5(0x233)]),this[_0x2cd4d5(0x1a8)]();}['_setOptionsHook'](_0x2e35b8,_0x1c4d1a){const _0xd87e89=_0x589cd8;if(_0x2e35b8)for(const _0x26eb96 in _0x2e35b8){this[_0x26eb96]=_0x2e35b8[_0x26eb96];}this['particleSystem']&&this['particleSystem']['setOptions'](this[_0xd87e89(0x21f)]());}['getOptions'](){const _0xbba503=_0x589cd8,_0x345c6b=Math['ceil'](Math[_0xbba503(0x1f8)](this['particlesNumber']));return this[_0xbba503(0x1a1)]=_0x345c6b*_0x345c6b,{'particlesTextureSize':_0x345c6b,'maxParticles':this[_0xbba503(0x1a1)],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this[_0xbba503(0x245)],'dropRateBump':this[_0xbba503(0x24e)],'speedFactor':this['speedFactor'],'lineWidth':this[_0xbba503(0x1ba)],'colors':this['colors']};}['addPrimitives'](){const _0x499d0a=_0x589cd8;this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives'][_0x499d0a(0x1a5)]),this['primitives']['add'](this[_0x499d0a(0x241)]['particlesComputing']['primitives']['updateSpeed']),this[_0x499d0a(0x18f)][_0x499d0a(0x1e1)](this[_0x499d0a(0x241)]['particlesComputing']['primitives'][_0x499d0a(0x19f)]),this[_0x499d0a(0x18f)]['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingPosition']),this['primitives']['add'](this[_0x499d0a(0x241)]['particlesComputing']['primitives'][_0x499d0a(0x20d)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['segments']),this['primitives']['add'](this['particleSystem']['particlesRendering'][_0x499d0a(0x18f)][_0x499d0a(0x21c)]),this['primitives']['add'](this['particleSystem']['particlesRendering'][_0x499d0a(0x18f)]['screen']);}['updateViewerParameters'](){const _0x395ec1=_0x589cd8;let _0x57efad=this[_0x395ec1(0x22b)]['computeViewRectangle'](this['scene']['globe'][_0x395ec1(0x19d)]);if(!_0x57efad){const _0x7ae47=this['_map']['getExtent']();_0x57efad=Cesium$1['Rectangle']['fromDegrees'](_0x7ae47['xmin'],_0x7ae47[_0x395ec1(0x1e7)],_0x7ae47[_0x395ec1(0x18d)],_0x7ae47['ymax']);}const _0x2331ad=Util[_0x395ec1(0x1b2)](_0x57efad);this['viewerParameters']['lonRange']['x']=_0x2331ad[_0x395ec1(0x20b)]['min'],this[_0x395ec1(0x233)]['lonRange']['y']=_0x2331ad['lon']['max'],this['viewerParameters']['latRange']['x']=_0x2331ad['lat'][_0x395ec1(0x1f5)],this[_0x395ec1(0x233)]['latRange']['y']=_0x2331ad['lat']['max'];const _0x7aab97=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene'][_0x395ec1(0x181)],this[_0x395ec1(0x24f)][_0x395ec1(0x259)]);_0x7aab97>0x0&&(this[_0x395ec1(0x233)]['pixelSize']=_0x7aab97);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace[_0x589cd8(0x251)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x3b7961=_0x589cd8;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x3b7961(0x23d)]=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0x4ca202 in this){delete this[_0x4ca202];}}}class CanvasWindField{constructor(_0x37a8d4){const _0x2dbe86=_0x589cd8;this[_0x2dbe86(0x24c)](_0x37a8d4);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x3ad870){this['_speedRate']=(0x64-(_0x3ad870>0x63?0x63:_0x3ad870))*0x64,this['_calc_speedRate']=[(this['xmax']-this['xmin'])/this['_speedRate'],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){return this['_maxAge'];}set[_0x589cd8(0x249)](_0xefe69b){const _0x462269=_0x589cd8;this[_0x462269(0x20a)]=_0xefe69b;}['setOptions'](_0x51c19b){const _0x3d5ad0=_0x589cd8;this[_0x3d5ad0(0x20f)]=_0x51c19b,this[_0x3d5ad0(0x249)]=_0x51c19b['maxAge']||0x78,this['speedRate']=_0x51c19b['speedRate']||0x32,this['particles']=[];const _0x21dca3=_0x51c19b[_0x3d5ad0(0x1a1)]||0x1000;for(let _0x3ec0e1=0x0;_0x3ec0e1<_0x21dca3;_0x3ec0e1++){const _0x5624e1=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x5624e1);}}['setDate'](_0x54d113){const _0x3ded86=_0x589cd8;this[_0x3ded86(0x216)]=_0x54d113['rows'],this[_0x3ded86(0x1f2)]=_0x54d113['cols'],this['xmin']=_0x54d113['xmin'],this[_0x3ded86(0x18d)]=_0x54d113['xmax'],this['ymin']=_0x54d113['ymin'],this[_0x3ded86(0x250)]=_0x54d113['ymax'],this['grid']=[];const _0x586a26=_0x54d113['udata'],_0x5ed979=_0x54d113[_0x3ded86(0x189)];let _0x4791cc=![];_0x586a26['length']===this['rows']&&_0x586a26[0x0]['length']===this['cols']&&(_0x4791cc=!![]);let _0x352d21=0x0,_0x1dfde=null,_0x59c62f=null;for(let _0x32c8d2=0x0;_0x32c8d2<this['rows'];_0x32c8d2++){_0x1dfde=[];for(let _0x1f4a1c=0x0;_0x1f4a1c<this['cols'];_0x1f4a1c++,_0x352d21++){_0x4791cc?_0x59c62f=this['_calcUV'](_0x586a26[_0x32c8d2][_0x1f4a1c],_0x5ed979[_0x32c8d2][_0x1f4a1c]):_0x59c62f=this['_calcUV'](_0x586a26[_0x352d21],_0x5ed979[_0x352d21]),_0x1dfde['push'](_0x59c62f);}this['grid']['push'](_0x1dfde);}this['options']['reverseY']&&this[_0x3ded86(0x25e)][_0x3ded86(0x1c8)]();}['clear'](){const _0x26cfdb=_0x589cd8;delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this[_0x26cfdb(0x1e7)],delete this['ymax'],delete this[_0x26cfdb(0x25e)],delete this[_0x26cfdb(0x222)];}['toGridXY'](_0xefe915,_0x38ea65){const _0x15f93b=_0x589cd8,_0x25e1f5=(_0xefe915-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0xabf558=(this['ymax']-_0x38ea65)/(this[_0x15f93b(0x250)]-this['ymin'])*(this['rows']-0x1);return[_0x25e1f5,_0xabf558];}['getUVByXY'](_0x475462,_0x4cd8c3){const _0x206d4c=_0x589cd8;if(_0x475462<0x0||_0x475462>=this['cols']||_0x4cd8c3>=this['rows'])return[0x0,0x0,0x0];const _0x44242a=Math['floor'](_0x475462),_0xbbbffe=Math[_0x206d4c(0x231)](_0x4cd8c3);if(_0x44242a===_0x475462&&_0xbbbffe===_0x4cd8c3)return this['grid'][_0x4cd8c3][_0x475462];const _0x159908=_0x44242a+0x1,_0x17c3c=_0xbbbffe+0x1,_0x38c32b=this['getUVByXY'](_0x44242a,_0xbbbffe),_0x470e43=this['getUVByXY'](_0x159908,_0xbbbffe),_0x28b717=this['getUVByXY'](_0x44242a,_0x17c3c),_0x2b9191=this['getUVByXY'](_0x159908,_0x17c3c);let _0x185426=null;try{_0x185426=this[_0x206d4c(0x244)](_0x475462-_0x44242a,_0x4cd8c3-_0xbbbffe,_0x38c32b,_0x470e43,_0x28b717,_0x2b9191);}catch(_0x4a52cd){console['log'](_0x475462,_0x4cd8c3);}return _0x185426;}[_0x589cd8(0x244)](_0x26fce5,_0x3d18a3,_0x235754,_0x7a4504,_0x28f026,_0x4383ff){const _0x142879=0x1-_0x26fce5,_0x23c1df=0x1-_0x3d18a3,_0x13ff12=_0x142879*_0x23c1df,_0x255690=_0x26fce5*_0x23c1df,_0x5a4cb9=_0x142879*_0x3d18a3,_0x12c9e4=_0x26fce5*_0x3d18a3,_0x2e852e=_0x235754[0x0]*_0x13ff12+_0x7a4504[0x0]*_0x255690+_0x28f026[0x0]*_0x5a4cb9+_0x4383ff[0x0]*_0x12c9e4,_0x549086=_0x235754[0x1]*_0x13ff12+_0x7a4504[0x1]*_0x255690+_0x28f026[0x1]*_0x5a4cb9+_0x4383ff[0x1]*_0x12c9e4;return this['_calcUV'](_0x2e852e,_0x549086);}['_calcUV'](_0x5c530e,_0x5dfc68){return[+_0x5c530e,+_0x5dfc68,Math['sqrt'](_0x5c530e*_0x5c530e+_0x5dfc68*_0x5dfc68)];}['getUVByPoint'](_0x3c5e9f,_0x471947){if(!this['isInExtent'](_0x3c5e9f,_0x471947))return null;const _0x1270f0=this['toGridXY'](_0x3c5e9f,_0x471947),_0x296eb6=this['getUVByXY'](_0x1270f0[0x0],_0x1270f0[0x1]);return _0x296eb6;}['isInExtent'](_0xbfee8a,_0x3a7f24){const _0x4a6b46=_0x589cd8;return _0xbfee8a>=this[_0x4a6b46(0x246)]&&_0xbfee8a<=this[_0x4a6b46(0x18d)]&&_0x3a7f24>=this[_0x4a6b46(0x1e7)]&&_0x3a7f24<=this['ymax']?!![]:![];}[_0x589cd8(0x190)](){const _0x54946b=_0x589cd8,_0x44675c=fRandomByfloat(this['xmin'],this['xmax']),_0x5c822a=fRandomByfloat(this['ymin'],this[_0x54946b(0x250)]);return{'lat':_0x5c822a,'lng':_0x44675c};}[_0x589cd8(0x1f6)](){const _0x1cd87e=_0x589cd8;let _0x2ff369,_0x552036,_0x5c8c84;for(let _0x12e1f7=0x0,_0x1064e4=this['particles']['length'];_0x12e1f7<_0x1064e4;_0x12e1f7++){let _0x45d3cd=this['particles'][_0x12e1f7];_0x45d3cd['age']<=0x0&&(_0x45d3cd=this[_0x1cd87e(0x1e8)](_0x45d3cd));if(_0x45d3cd[_0x1cd87e(0x21e)]>0x0){const _0x592dc7=_0x45d3cd['tlng'],_0x581505=_0x45d3cd['tlat'];_0x5c8c84=this['getUVByPoint'](_0x592dc7,_0x581505),_0x5c8c84?(_0x2ff369=_0x592dc7+this['_calc_speedRate'][0x0]*_0x5c8c84[0x0],_0x552036=_0x581505+this['_calc_speedRate'][0x1]*_0x5c8c84[0x1],_0x45d3cd['lng']=_0x592dc7,_0x45d3cd['lat']=_0x581505,_0x45d3cd['tlng']=_0x2ff369,_0x45d3cd['tlat']=_0x552036,_0x45d3cd['speed']=_0x5c8c84[0x2],_0x45d3cd['age']--):_0x45d3cd[_0x1cd87e(0x21e)]=0x0;}}return this['particles'];}['_randomParticle'](_0x473af8){const _0x24f5b9=_0x589cd8;let _0x2c5ada,_0x4f1ff1;for(let _0x752f5d=0x0;_0x752f5d<0x1e;_0x752f5d++){_0x2c5ada=this[_0x24f5b9(0x190)](),_0x4f1ff1=this[_0x24f5b9(0x260)](_0x2c5ada[_0x24f5b9(0x1fe)],_0x2c5ada[_0x24f5b9(0x1f4)]);if(_0x4f1ff1&&_0x4f1ff1[0x2]>0x0)break;}if(!_0x4f1ff1)return _0x473af8;const _0x541f96=_0x2c5ada['lng']+this['_calc_speedRate'][0x0]*_0x4f1ff1[0x0],_0x31395d=_0x2c5ada[_0x24f5b9(0x1f4)]+this['_calc_speedRate'][0x1]*_0x4f1ff1[0x1];return _0x473af8['lng']=_0x2c5ada['lng'],_0x473af8['lat']=_0x2c5ada['lat'],_0x473af8['tlng']=_0x541f96,_0x473af8['tlat']=_0x31395d,_0x473af8['age']=Math['round'](Math[_0x24f5b9(0x1a4)]()*this['maxAge']),_0x473af8[_0x24f5b9(0x219)]=_0x4f1ff1[0x2],_0x473af8;}['destroy'](){for(const _0x5775ab in this){delete this[_0x5775ab];}}}function _0x1821(){const _0x575615=['fillRect','pixelSize','defined','height','_map','_drawLines','vdata','CanvasWindField','vertexArray','BufferUsage','xmax','array','primitives','getRandomLatLng','mode','25aSDEYe','createWindTextures','udata','Cesium','1447276sGOjPG','_onMap_preRenderEvent','off','ComponentDatatype','particlesRendering','visibility','Math','ellipsoid','colors','updatePosition','cancelAnimationFrame','particlesNumber','canvasHeight','keys','random','getWind','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','removeAll','addPrimitives','length','clear','randomizeParticles','postMessage','worker','depthTest','blending','setGeometry','Sampler','viewRectangleToLonLatRange','SceneTransforms','forEach','canvasWidth','updateViewerParameters','Compute','STATIC_DRAW','clearFramebuffers','lineWidth','windTextures','particlesTextureSize','ShaderSource','context','top','initWorker','setData','_updateIng2','NEAREST','_canrefresh','source','PrimitiveType','push','reverse','0px','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','createRawRenderState','redraw','BaseLayer','_data','framebuffer','Cartesian3','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','windField','IDENTITY','_onMouseDownEvent','particlesWind','fromCache','696092YmcWQM','Color','umin','reverseY','pow','LayerUtil','particlesTextures','uniformMap','7225464gZBfOm','rawRenderState','add','CanvasWindLayer','max','globe','auto','EventType','ymin','_randomParticle','clientWidth','update','TextureMinificationFilter','textures','animateFrame','levmin','pointer-events','attributeLocations','canvas','cols','TRIANGLES','lat','min','getParticles','7cqkaVL','sqrt','none','Pass','LUMINANCE','mouse_down','segmentsDepth','lng','_onMouseMoveEvent','strokeStyle','_mountedHook','createTexture','TextureMagnificationFilter','Appearance','_onMouseUpEvent','mouse_move','width','resize','clampToLatitudeRange','_maxAge','lon','show','postProcessingSpeed','PI_OVER_THREE','options','isDestroyed','nextTrails','getFullscreenQuad','clearCommand','__esModule','destroyParticlesTextures','rows','_onMapWhellEvent','primitiveType','speed','refreshTimer','currentTrails','trails','left','age','getOptions','toDegrees','DepthFunction','particles','Geometry','style','windData','_setOptionsHook','lev','_pointerEvents','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','_updateIng','camera','lonRange','shaderProgram','canvasWind','FLOAT','framebuffers','floor','mouseMove','viewerParameters','data','1015311ukcaWF','outputTexture','maxParticles','depthMask','SceneMode','createFramebuffer','1536474ZTzfEJ','postProcessingPosition','tlat','canvasContext','randomBetween','14150178mSBuap','particleSystem','geometry','default','_bilinearInterpolation','dropRate','xmin','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','mouseUp','maxAge','mouseDown','addEventListener','setOptions','nextParticlesPosition','dropRateBump','scene','ymax','layer','bind','Draw','GeometryAttribute','frameTime','globeBoundingSphere','particlesComputing','moveTo','drawingBufferHeight','wheel','commandToExecute','now','_addedHook','grid','Cartesian2','getUVByPoint','fragmentShaderSource','dimensions','destroy','all','createCommand','_colorRamp','requestAnimationFrame','createRenderingPrimitives','TWO_PI','fromGeometry','_tomap','fixedHeight','container','1591800RxwfyS','init','clientHeight','particleHeight','drawingBufferWidth','PixelFormat'];_0x1821=function(){return _0x575615;};return _0x1821();}function fRandomByfloat(_0x24405d,_0xcc1334){const _0x7ac0d7=_0x589cd8;return _0x24405d+Math[_0x7ac0d7(0x1a4)]()*(_0xcc1334-_0x24405d);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x589cd8(0x251)][_0x589cd8(0x1cd)];class CanvasWindLayer extends BaseLayer{constructor(_0x18772c={}){const _0x8ba335=_0x589cd8;super(_0x18772c),this['_setOptionsHook'](_0x18772c),this['canvas']=null,_0x18772c['colors']&&_0x18772c['steps']&&(this[_0x8ba335(0x266)]=new mars3d__namespace['ColorRamp'](_0x18772c));}[_0x589cd8(0x226)](_0x268f02,_0x45ae27){const _0x3b0c75=_0x589cd8;this[_0x3b0c75(0x255)]=0x3e8/(_0x268f02['frameRate']||0xa),this[_0x3b0c75(0x228)]=this['options']['pointerEvents']??![],this['color']=_0x268f02['color']||'#ffffff',this[_0x3b0c75(0x1ba)]=_0x268f02['lineWidth']||0x1,this[_0x3b0c75(0x17b)]=_0x268f02['fixedHeight']??0x0,this[_0x3b0c75(0x1da)]=_0x268f02['reverseY']??![],this['windField']&&this[_0x3b0c75(0x1d2)]['setOptions'](_0x268f02);}get['layer'](){return this['canvas'];}get['canvasWidth'](){const _0x44cf77=_0x589cd8;return this[_0x44cf77(0x187)]['scene'][_0x44cf77(0x1f1)]['clientWidth'];}get[_0x589cd8(0x1a2)](){const _0x20cb83=_0x589cd8;return this[_0x20cb83(0x187)][_0x20cb83(0x24f)]['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0xc23c1e){const _0x2333d9=_0x589cd8;this['_pointerEvents']=_0xc23c1e;if(!this['canvas'])return;_0xc23c1e?this[_0x2333d9(0x1f1)]['style'][_0x2333d9(0x1ef)]=_0x2333d9(0x264):this[_0x2333d9(0x1f1)][_0x2333d9(0x224)][_0x2333d9(0x1ef)]='none';}get['particlesNumber'](){const _0x26be74=_0x589cd8;return this['options'][_0x26be74(0x1a1)];}set['particlesNumber'](_0x540901){const _0x605d3c=_0x589cd8;this['options'][_0x605d3c(0x1a1)]=_0x540901,clearTimeout(this['_canrefresh']),this[_0x605d3c(0x1c4)]=setTimeout(()=>{const _0x2e2843=_0x605d3c;this[_0x2e2843(0x1cc)]();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x4d25a1){this['options']['speedRate']=_0x4d25a1,this['windField']&&(this['windField']['speedRate']=_0x4d25a1);}get[_0x589cd8(0x249)](){return this['options']['maxAge'];}set['maxAge'](_0x5d5719){const _0x11644b=_0x589cd8;this[_0x11644b(0x20f)]['maxAge']=_0x5d5719,this['windField']&&(this['windField'][_0x11644b(0x249)]=_0x5d5719);}get['data'](){const _0xff318b=_0x589cd8;return this[_0xff318b(0x225)];}set['data'](_0x74a9fd){const _0x32f94e=_0x589cd8;this[_0x32f94e(0x1c1)](_0x74a9fd);}['_showHook'](_0x125f52){const _0x2f0c9d=_0x589cd8;_0x125f52?this['_addedHook']():(this[_0x2f0c9d(0x225)]&&(this['options']['data']=this[_0x2f0c9d(0x225)]),this['_removedHook']());}[_0x589cd8(0x201)](){const _0x2309d4=_0x589cd8;this['options']['worker']?this[_0x2309d4(0x1c0)]():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x342344=_0x589cd8;this[_0x342344(0x1f1)]=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options'][_0x342344(0x234)]&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x493a79=_0x589cd8;this[_0x493a79(0x1aa)](),this['unbindEvent'](),this[_0x493a79(0x1f1)]&&(this[_0x493a79(0x187)][_0x493a79(0x17c)]['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x157b97=_0x589cd8,_0x356630=mars3d__namespace['DomUtil']['create']('canvas','mars3d-canvasWind',this[_0x157b97(0x187)]['container']);return _0x356630['style']['position']='absolute',_0x356630['style'][_0x157b97(0x1bf)]='0px',_0x356630['style'][_0x157b97(0x21d)]=_0x157b97(0x1c9),_0x356630[_0x157b97(0x224)]['width']=this['_map']['scene']['canvas'][_0x157b97(0x1e9)]+'px',_0x356630[_0x157b97(0x224)][_0x157b97(0x186)]=this['_map'][_0x157b97(0x24f)]['canvas'][_0x157b97(0x17f)]+'px',_0x356630['style']['pointerEvents']=this[_0x157b97(0x228)]?_0x157b97(0x1e5):_0x157b97(0x1f9),_0x356630['style']['zIndex']=this['options']['zIndex']??0x9,_0x356630['width']=this[_0x157b97(0x187)]['scene']['canvas']['clientWidth'],_0x356630['height']=this['_map']['scene'][_0x157b97(0x1f1)][_0x157b97(0x17f)],_0x356630;}['resize'](){const _0x5f3474=_0x589cd8;this[_0x5f3474(0x1f1)]&&(this[_0x5f3474(0x1f1)]['style']['width']=this['_map']['scene'][_0x5f3474(0x1f1)]['clientWidth']+'px',this['canvas']['style']['height']=this[_0x5f3474(0x187)]['scene']['canvas'][_0x5f3474(0x17f)]+'px',this['canvas']['width']=this['_map']['scene']['canvas'][_0x5f3474(0x1e9)],this[_0x5f3474(0x1f1)]['height']=this['_map']['scene'][_0x5f3474(0x1f1)][_0x5f3474(0x17f)]);}['bindEvent'](){const _0x4f34e1=_0x589cd8,_0x451175=this;let _0x5a21f7=Date[_0x4f34e1(0x25c)]();(function _0xd8ae1a(){const _0x1b8223=_0x4f34e1;_0x451175['animateFrame']=window[_0x1b8223(0x267)](_0xd8ae1a);if(_0x451175['show']&&_0x451175['windField']){const _0x3c80cb=Date[_0x1b8223(0x25c)](),_0x545aca=_0x3c80cb-_0x5a21f7;_0x545aca>_0x451175['frameTime']&&(_0x5a21f7=_0x3c80cb-_0x545aca%_0x451175[_0x1b8223(0x255)],_0x451175['update']());}}(),window[_0x4f34e1(0x24b)](_0x4f34e1(0x208),this['resize'][_0x4f34e1(0x252)](this),![]),this[_0x4f34e1(0x1fc)]=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace[_0x4f34e1(0x1e6)][_0x4f34e1(0x25a)],this[_0x4f34e1(0x217)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x4f34e1(0x24a)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x4f34e1(0x1e6)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x4e03ab=_0x589cd8;window[_0x4e03ab(0x1a0)](this[_0x4e03ab(0x1ed)]),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this[_0x4e03ab(0x20f)]['mouseHidden']&&(this['_map']['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x4e03ab(0x187)]['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this[_0x4e03ab(0x187)][_0x4e03ab(0x198)](mars3d__namespace['EventType'][_0x4e03ab(0x248)],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this));}[_0x589cd8(0x217)](_0x48de6b){const _0x265c11=_0x589cd8;clearTimeout(this['refreshTimer']);if(!this[_0x265c11(0x20c)]||!this[_0x265c11(0x1f1)])return;this['canvas']['style'][_0x265c11(0x19b)]='hidden',this['refreshTimer']=setTimeout(()=>{const _0x4ed818=_0x265c11;if(!this[_0x4ed818(0x20c)])return;this[_0x4ed818(0x1cc)](),this['canvas']['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x4b6eec){const _0x2dfe0d=_0x589cd8;this['mouse_down']=!![],this[_0x2dfe0d(0x187)]['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x34a45c){const _0x21d04d=_0x589cd8;if(!this[_0x21d04d(0x20c)]||!this[_0x21d04d(0x1f1)])return;this['mouse_down']&&(this['canvas']['style'][_0x21d04d(0x19b)]='hidden',this[_0x21d04d(0x206)]=!![]);}[_0x589cd8(0x205)](_0xdd45d){const _0x146939=_0x589cd8;if(!this['show']||!this[_0x146939(0x1f1)])return;this['_map']['off'](mars3d__namespace['EventType'][_0x146939(0x232)],this[_0x146939(0x1ff)],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['canvas']['style']['visibility']='visible',this[_0x146939(0x1fc)]=![],this['mouse_move']=![];}['setData'](_0x5252ff){const _0x318170=_0x589cd8;this['clear'](),this['windData']=_0x5252ff,this[_0x318170(0x1d2)]['setDate'](_0x5252ff),this['redraw']();}['redraw'](){const _0x10f7e3=_0x589cd8;if(!this['show'])return;this['windField'][_0x10f7e3(0x24c)](this[_0x10f7e3(0x20f)]),this['update']();}['update'](){const _0x3951f8=_0x589cd8;if(this[_0x3951f8(0x22a)])return;this['_updateIng']=!![];if(this[_0x3951f8(0x1ad)])this[_0x3951f8(0x1d2)]['update']();else{const _0x13eb8a=this['windField']['getParticles']();this['_drawLines'](_0x13eb8a);}this['_updateIng']=![];}[_0x589cd8(0x188)](_0x138534){const _0xc6139c=_0x589cd8;this[_0xc6139c(0x23e)]['globalCompositeOperation']='destination-in',this['canvasContext'][_0xc6139c(0x183)](0x0,0x0,this[_0xc6139c(0x1b5)],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext']['globalAlpha']=0.9;const _0x70a21b=this['_map']['scene'][_0xc6139c(0x191)]!==Cesium[_0xc6139c(0x239)]['SCENE3D'],_0x5d9b1f=this[_0xc6139c(0x1b5)]*0.25;if(this['_colorRamp'])for(let _0x4f62d6=0x0,_0x23228e=_0x138534['length'];_0x4f62d6<_0x23228e;_0x4f62d6++){const _0x315608=_0x138534[_0x4f62d6],_0x39bce9=this['_tomap'](_0x315608[_0xc6139c(0x1fe)],_0x315608['lat'],_0x315608),_0x46ae7f=this[_0xc6139c(0x17a)](_0x315608['tlng'],_0x315608['tlat'],_0x315608);if(!_0x39bce9||!_0x46ae7f)continue;if(_0x70a21b&&Math['abs'](_0x39bce9[0x0]-_0x46ae7f[0x0])>=_0x5d9b1f)continue;this['canvasContext']['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this['_colorRamp']['getColor'](_0x315608['speed']),this['canvasContext'][_0xc6139c(0x258)](_0x39bce9[0x0],_0x39bce9[0x1]),this['canvasContext']['lineTo'](_0x46ae7f[0x0],_0x46ae7f[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext']['beginPath'](),this[_0xc6139c(0x23e)]['lineWidth']=this['lineWidth'],this['canvasContext'][_0xc6139c(0x200)]=this['color'];for(let _0x96e575=0x0,_0x46b2df=_0x138534[_0xc6139c(0x1a9)];_0x96e575<_0x46b2df;_0x96e575++){const _0x1f9fde=_0x138534[_0x96e575],_0x154f47=this['_tomap'](_0x1f9fde['lng'],_0x1f9fde['lat'],_0x1f9fde),_0x2ddbd2=this['_tomap'](_0x1f9fde['tlng'],_0x1f9fde['tlat'],_0x1f9fde);if(!_0x154f47||!_0x2ddbd2)continue;if(_0x70a21b&&Math['abs'](_0x154f47[0x0]-_0x2ddbd2[0x0])>=_0x5d9b1f)continue;this[_0xc6139c(0x23e)][_0xc6139c(0x258)](_0x154f47[0x0],_0x154f47[0x1]),this['canvasContext']['lineTo'](_0x2ddbd2[0x0],_0x2ddbd2[0x1]);}this[_0xc6139c(0x23e)]['stroke']();}}['_tomap'](_0x55f804,_0xf4fa09,_0x4a8822){const _0x248ff4=_0x589cd8,_0x229484=Cesium['Cartesian3']['fromDegrees'](_0x55f804,_0xf4fa09,this['fixedHeight']),_0x389a1c=this['_map']['scene'];if(_0x389a1c['mode']===Cesium['SceneMode']['SCENE3D']){const _0xb4ccc4=new Cesium['EllipsoidalOccluder'](_0x389a1c[_0x248ff4(0x1e4)]['ellipsoid'],_0x389a1c['camera']['positionWC']),_0x5e786d=_0xb4ccc4['isPointVisible'](_0x229484);if(!_0x5e786d)return _0x4a8822[_0x248ff4(0x21e)]=0x0,null;}const _0x480fe2=Cesium[_0x248ff4(0x1b3)]['wgs84ToWindowCoordinates'](this['_map']['scene'],_0x229484);return _0x480fe2?[_0x480fe2['x'],_0x480fe2['y']]:null;}['clear'](){const _0x18e81d=_0x589cd8;this['windField'][_0x18e81d(0x1aa)](),delete this['windData'];}['initWorker'](){const _0x4d2c90=_0x589cd8;this[_0x4d2c90(0x1ad)]=new Worker(this['options']['worker']),this['worker']['onmessage']=_0x1d80d5=>{const _0x4b0191=_0x4d2c90;this['_drawLines'](_0x1d80d5[_0x4b0191(0x234)]['particles']),this[_0x4b0191(0x1c2)]=![];},this['windField']={'init':_0x2ded11=>{const _0x3849d6=_0x4d2c90;this['worker']['postMessage']({'type':_0x3849d6(0x17e),'options':_0x2ded11});},'setOptions':_0x3796d2=>{const _0x3cb3c1=_0x4d2c90;this[_0x3cb3c1(0x1ad)][_0x3cb3c1(0x1ac)]({'type':'setOptions','options':_0x3796d2});},'setDate':_0x2da5ba=>{const _0x2c021b=_0x4d2c90;this[_0x2c021b(0x1ad)][_0x2c021b(0x1ac)]({'type':'setDate','data':_0x2da5ba});},'update':()=>{const _0x1e9114=_0x4d2c90;if(this['_updateIng2'])return;this[_0x1e9114(0x1c2)]=!![],this['worker']['postMessage']({'type':_0x1e9114(0x1ea)});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace[_0x589cd8(0x1dc)]['register'](_0x589cd8(0x22e),CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace[_0x589cd8(0x18a)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports[_0x589cd8(0x1e2)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
14
|
+
'use strict';const _0x1c87b7=_0x1cfd;(function(_0x4a6bb5,_0xb24105){const _0x563c13=_0x1cfd,_0xc2f834=_0x4a6bb5();while(!![]){try{const _0x22750e=parseInt(_0x563c13(0x183))/0x1*(parseInt(_0x563c13(0x158))/0x2)+parseInt(_0x563c13(0x177))/0x3+parseInt(_0x563c13(0xd3))/0x4+-parseInt(_0x563c13(0x17b))/0x5*(-parseInt(_0x563c13(0x1ac))/0x6)+-parseInt(_0x563c13(0xbf))/0x7+-parseInt(_0x563c13(0xe7))/0x8+-parseInt(_0x563c13(0x10c))/0x9;if(_0x22750e===_0xb24105)break;else _0xc2f834['push'](_0xc2f834['shift']());}catch(_0x25258e){_0xc2f834['push'](_0xc2f834['shift']());}}}(_0x2a8c,0x67721));function _interopNamespace(_0x4ef233){if(_0x4ef233&&_0x4ef233['__esModule'])return _0x4ef233;var _0x339714=Object['create'](null);return _0x4ef233&&Object['keys'](_0x4ef233)['forEach'](function(_0x5ab1db){const _0x3352b6=_0x1cfd;if(_0x5ab1db!==_0x3352b6(0x195)){var _0x1c635f=Object[_0x3352b6(0x133)](_0x4ef233,_0x5ab1db);Object['defineProperty'](_0x339714,_0x5ab1db,_0x1c635f[_0x3352b6(0xdb)]?_0x1c635f:{'enumerable':!![],'get':function(){return _0x4ef233[_0x5ab1db];}});}}),_0x339714['default']=_0x4ef233,_0x339714;}var mars3d__namespace=_interopNamespace(mars3d);function _0x2a8c(){const _0x19df8d=['randomBetween','visible','keys','destination-in','tlng','cols','canvasContext','createFramebuffer','canvasResize','fadeOpacity','blue','_addedHook','Math','scene','setDate','show','particlesRendering','depthTest','nextTrails','floor','FLOAT','ellipsoid','getOwnPropertyDescriptor','clampToLatitudeRange','particlesTextures','LayerUtil','framebuffer','fromDegrees','wheel','particleSystem','age','particlesTextureSize','mouseHidden','currentParticlesPosition','createParticlesTextures','udata','getColorTexture','segmentsDepth','ShaderSource','randomizeParticles','mouseMove','particlesNumber','_onMap_preRenderEvent','Compute','vdata','getUVByXY','_onMapWhellEvent','data','updatePosition','windField','particles','segments','_map','toRadians','PI_OVER_THREE','mouseDown','createTexture','TextureMagnificationFilter','fill','24926MgvkyK','EventType','min','_calc_speedRate','fromCssColorString','xmin','getColor','speedRate','SCENE3D','reverseY','PixelFormat','forEach','Draw','clientHeight','speed','lat','style','getUVByPoint','attributeLocations','colorTable','preExecute','mouse_move','frameTime','speedFactor','applyViewerParameters','refreshTimer','commandToExecute','postMessage','framebuffers','_colorRamp','commandType','1379703HyzwwC','red','GeometryAttribute','cos','60LdoUHe','createCommand','LINEAR','worker','rows','maxParticles','removeEventListener','max','27htCicA','remove','colors','destroyParticlesTextures','position','init','_updateIng','west','dropRate','Cesium','fromGeometry','refreshParticles','getDefaultRenderState','latRange','BufferUsage','container','currentTrails','moveTo','default','Cartesian3','mouse_down','getParticles','getExtent','_setOptionsHook','stroke','unbindEvent','particlesWind','xmax','_data','absolute','_calcUV','SceneMode','viewerParameters','_speedRate','DomUtil','DrawCommand','getFullscreenQuad','_onMouseMoveEvent','addEventListener','pixelSize','globalAlpha','66684OpRLAW','lng','rgb(206,255,255)','sqrt','textures','rawRenderState','setData','canvas','depthMask','initWorker','vertexArray','1165283AqiBFa','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','Sampler','nextTrailsColor','createRenderingFramebuffers','requestAnimationFrame','postProcessingSpeed','_removedHook','green','tlat','push','resize','_pointerEvents','CanvasWindField','updateViewerParameters','nextParticlesPosition','array','visibility','createRenderingTextures','umax','1921656NRCtWb','uniformMap','destroy','Color','length','BoundingSphere','globalCompositeOperation','lineWidth','get','vertexShaderSource','setOptions','source','Geometry','particlesComputing','getOptions','add','postProcessingPosition','outputTexture','maxAge','VertexArray','2607200yqTzeq','canvasWidth','lonRange','0px','fragmentShaderSource','_onMouseUpEvent','width','createWindTextures','PixelDatatype','lon','fixedHeight','WindLayer','TRIANGLES','top','context','primitives','ceil','depthTexture','createSegmentsGeometry','drawingBufferHeight','_bilinearInterpolation','nextParticlesSpeed','lev','clientWidth','currentParticlesSpeed','drawingBufferWidth','mouseUp','_onMouseDownEvent','options','_randomParticle','_tomap','_createCanvas','dimensions','update','mars3d-canvasWind','windData','TextureMinificationFilter','4446918MMdRsR','grid','toDegrees','redraw','color','ymin','_drawLines','layer','GeometryAttributes','clearCommand','_showHook','off','TWO_PI','pow','ymax','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','globe'];_0x2a8c=function(){return _0x19df8d;};return _0x2a8c();}const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x4a7726,_0x795688){const _0x58bf54=_0x1cfd,_0x1c8c05=_0x4a7726*Math[_0x58bf54(0x17a)](Cesium$7['Math']['toRadians'](_0x795688));return _0x1c8c05;}function getV(_0x2c9a85,_0x57950b){const _0x3e9336=_0x1cfd,_0x4dab58=_0x2c9a85*Math['sin'](Cesium$7['Math'][_0x3e9336(0x152)](_0x57950b));return _0x4dab58;}function getSpeed(_0x20c020,_0x106e0a){const _0x172893=_0x1cfd,_0x2f05b9=Math['sqrt'](Math['pow'](_0x20c020,0x2)+Math[_0x172893(0x119)](_0x106e0a,0x2));return _0x2f05b9;}function getDirection(_0x376523,_0x3092b7){let _0x1a8138=Cesium$7['Math']['toDegrees'](Math['atan2'](_0x3092b7,_0x376523));return _0x1a8138+=_0x1a8138<0x0?0x168:0x0,_0x1a8138;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x3d4820){const _0x4c50bf=_0x1cfd;this[_0x4c50bf(0x176)]=_0x3d4820['commandType'],this['geometry']=_0x3d4820['geometry'],this['attributeLocations']=_0x3d4820['attributeLocations'],this['primitiveType']=_0x3d4820['primitiveType'],this['uniformMap']=_0x3d4820['uniformMap'],this[_0x4c50bf(0xdc)]=_0x3d4820['vertexShaderSource'],this[_0x4c50bf(0xeb)]=_0x3d4820['fragmentShaderSource'],this[_0x4c50bf(0x1b1)]=_0x3d4820['rawRenderState'],this['framebuffer']=_0x3d4820['framebuffer'],this[_0x4c50bf(0xe4)]=_0x3d4820[_0x4c50bf(0xe4)],this['autoClear']=_0x3d4820['autoClear']??![],this[_0x4c50bf(0x16c)]=_0x3d4820['preExecute'],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this[_0x4c50bf(0x115)]=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}[_0x1c87b7(0x17c)](_0x3c689e){const _0x420cb4=_0x1c87b7;switch(this['commandType']){case'Draw':{const _0x2097c9=Cesium$6['VertexArray']['fromGeometry']({'context':_0x3c689e,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x3a05b9=Cesium$6['ShaderProgram']['fromCache']({'context':_0x3c689e,'attributeLocations':this[_0x420cb4(0x16a)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x20518d=Cesium$6['RenderState']['fromCache'](this['rawRenderState']);return new Cesium$6[(_0x420cb4(0x1a6))]({'primitiveType':this['primitiveType'],'shaderProgram':_0x3a05b9,'vertexArray':_0x2097c9,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x20518d,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this[_0x420cb4(0xd4)],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x2e39db,_0x594849){const _0x538f8d=_0x1c87b7;this['geometry']=_0x594849;const _0xff4f06=Cesium$6[_0x538f8d(0xe6)]['fromGeometry']({'context':_0x2e39db,'geometry':this['geometry'],'attributeLocations':this[_0x538f8d(0x16a)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0xff4f06;}[_0x1c87b7(0x108)](_0x50bd04){const _0x220135=_0x1c87b7;if(!this['show'])return;if(_0x50bd04['mode']!==Cesium$6[_0x220135(0x1a2)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this[_0x220135(0x17c)](_0x50bd04['context'])),Cesium$6['defined'](this['preExecute'])&&this[_0x220135(0x16c)](),Cesium$6['defined'](this[_0x220135(0x115)])&&_0x50bd04['commandList'][_0x220135(0xc9)](this['clearCommand']),_0x50bd04['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x50eac0=_0x1c87b7;if(this['clearCommand']){var _0x2f74c9,_0x49f73b;(_0x2f74c9=this[_0x50eac0(0x115)])!==null&&_0x2f74c9!==void 0x0&&_0x2f74c9[_0x50eac0(0xbe)]&&this['clearCommand']['vertexArray']['destroy'](),(_0x49f73b=this['clearCommand'])!==null&&_0x49f73b!==void 0x0&&_0x49f73b['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this[_0x50eac0(0x172)]['vertexArray'][_0x50eac0(0xd5)](),this['commandToExecute']['shaderProgram']&&this[_0x50eac0(0x172)]['shaderProgram'][_0x50eac0(0xd5)](),delete this[_0x50eac0(0x172)]),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x1f3ff0=function(){const _0x43d3f8=_0x1cfd,_0x49da0f=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x43d3f8(0x131)],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5[(_0x43d3f8(0x179))]({'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 _0x49da0f;},_0x3741f3=function(_0x108c19,_0x4ceff4){const _0x546691=_0x1cfd;if(Cesium$5['defined'](_0x4ceff4)){const _0xa2d587={};_0xa2d587['arrayBufferView']=_0x4ceff4,_0x108c19[_0x546691(0xde)]=_0xa2d587;}const _0x3b9f6a=new Cesium$5['Texture'](_0x108c19);return _0x3b9f6a;},_0x312839=function(_0x1f02dd,_0x13b66c,_0x3efa69){const _0x3ec57c=new Cesium$5['Framebuffer']({'context':_0x1f02dd,'colorTextures':[_0x13b66c],'depthTexture':_0x3efa69});return _0x3ec57c;},_0xca9ad=function(_0x2e21ad){const _0x5f030e=_0x1cfd,_0x347042=!![],_0x182c18=![],_0x5f513b={'viewport':_0x2e21ad['viewport'],'depthTest':_0x2e21ad[_0x5f030e(0x12e)],'depthMask':_0x2e21ad[_0x5f030e(0xbc)],'blending':_0x2e21ad['blending']},_0x6a4ebe=Cesium$5['Appearance'][_0x5f030e(0x18f)](_0x347042,_0x182c18,_0x5f513b);return _0x6a4ebe;},_0x514567=function(_0x5d5381){const _0x54b450=_0x1cfd,_0x106303={},_0x285eb8=Cesium$5['Math']['mod'](_0x5d5381[_0x54b450(0x18a)],Cesium$5[_0x54b450(0x129)]['TWO_PI']),_0x28e505=Cesium$5[_0x54b450(0x129)]['mod'](_0x5d5381['east'],Cesium$5[_0x54b450(0x129)][_0x54b450(0x118)]),_0x128f03=_0x5d5381['width'];let _0x346dc3,_0x1ddc26;_0x128f03>Cesium$5[_0x54b450(0x129)]['THREE_PI_OVER_TWO']?(_0x346dc3=0x0,_0x1ddc26=Cesium$5['Math']['TWO_PI']):_0x28e505-_0x285eb8<_0x128f03?(_0x346dc3=_0x285eb8,_0x1ddc26=_0x285eb8+_0x128f03):(_0x346dc3=_0x285eb8,_0x1ddc26=_0x28e505);_0x106303['lon']={'min':Cesium$5['Math'][_0x54b450(0x10e)](_0x346dc3),'max':Cesium$5[_0x54b450(0x129)][_0x54b450(0x10e)](_0x1ddc26)};const _0x443c36=_0x5d5381['south'],_0x5317de=_0x5d5381['north'],_0xef1479=_0x5d5381['height'],_0x382d50=_0xef1479>Cesium$5['Math']['PI']/0xc?_0xef1479/0x2:0x0;let _0x410fbb=Cesium$5['Math'][_0x54b450(0x134)](_0x443c36-_0x382d50),_0x9c7f54=Cesium$5['Math']['clampToLatitudeRange'](_0x5317de+_0x382d50);return _0x410fbb<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x410fbb=-Cesium$5['Math']['PI_OVER_TWO']),_0x9c7f54>Cesium$5[_0x54b450(0x129)][_0x54b450(0x153)]&&(_0x9c7f54=Cesium$5[_0x54b450(0x129)]['PI_OVER_TWO']),_0x106303['lat']={'min':Cesium$5['Math']['toDegrees'](_0x410fbb),'max':Cesium$5[_0x54b450(0x129)]['toDegrees'](_0x9c7f54)},_0x106303;};return{'getFullscreenQuad':_0x1f3ff0,'createTexture':_0x3741f3,'createFramebuffer':_0x312839,'createRawRenderState':_0xca9ad,'viewRectangleToLonLatRange':_0x514567};}());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=_0x1c87b7(0x11b),trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace[_0x1c87b7(0x18c)];class ParticlesRendering{constructor(_0x3d6ee7,_0x3f384c,_0xefe5e6,_0xc3bfe1,_0x56557f){const _0x39004e=_0x1c87b7;this[_0x39004e(0xd1)](_0x3d6ee7,_0x3f384c,_0xefe5e6['colors']),this['createRenderingFramebuffers'](_0x3d6ee7),this['createRenderingPrimitives'](_0x3d6ee7,_0xefe5e6,_0xc3bfe1,_0x56557f);}[_0x1c87b7(0xd1)](_0x23c801,_0x586d07,_0x3c9c20){const _0x56125a=_0x1c87b7,_0x454599={'context':_0x23c801,'width':_0x23c801[_0x56125a(0x100)],'height':_0x23c801['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x56125a(0x162)]['RGBA'],'pixelDatatype':Cesium$4[_0x56125a(0xef)]['UNSIGNED_BYTE']},_0x3aa6d6={'context':_0x23c801,'width':_0x23c801['drawingBufferWidth'],'height':_0x23c801[_0x56125a(0xfa)],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4[_0x56125a(0xef)]['UNSIGNED_INT']},_0x2719e4=_0x3c9c20['length'],_0x3acadf=new Float32Array(_0x2719e4*0x3);for(let _0x5607cb=0x0;_0x5607cb<_0x2719e4;_0x5607cb++){const _0x1c60a2=Cesium$4['Color'][_0x56125a(0x15c)](_0x3c9c20[_0x5607cb]);_0x3acadf[0x3*_0x5607cb]=_0x1c60a2[_0x56125a(0x178)],_0x3acadf[0x3*_0x5607cb+0x1]=_0x1c60a2[_0x56125a(0xc7)],_0x3acadf[0x3*_0x5607cb+0x2]=_0x1c60a2[_0x56125a(0x127)];}const _0x21ff6a={'context':_0x23c801,'width':_0x2719e4,'height':0x1,'pixelFormat':Cesium$4[_0x56125a(0x162)]['RGB'],'pixelDatatype':Cesium$4[_0x56125a(0xef)]['FLOAT'],'sampler':new Cesium$4[(_0x56125a(0xc1))]({'minificationFilter':Cesium$4['TextureMinificationFilter'][_0x56125a(0x17d)],'magnificationFilter':Cesium$4[_0x56125a(0x156)]['LINEAR']})};this['textures']={'segmentsColor':Util[_0x56125a(0x155)](_0x454599),'segmentsDepth':Util['createTexture'](_0x3aa6d6),'currentTrailsColor':Util[_0x56125a(0x155)](_0x454599),'currentTrailsDepth':Util['createTexture'](_0x3aa6d6),'nextTrailsColor':Util[_0x56125a(0x155)](_0x454599),'nextTrailsDepth':Util['createTexture'](_0x3aa6d6),'colorTable':Util['createTexture'](_0x21ff6a,_0x3acadf)};}[_0x1c87b7(0xc3)](_0x40c776){const _0x3dddb0=_0x1c87b7;this['framebuffers']={'segments':Util[_0x3dddb0(0x124)](_0x40c776,this[_0x3dddb0(0x1b0)]['segmentsColor'],this[_0x3dddb0(0x1b0)][_0x3dddb0(0x142)]),'currentTrails':Util['createFramebuffer'](_0x40c776,this['textures']['currentTrailsColor'],this[_0x3dddb0(0x1b0)]['currentTrailsDepth']),'nextTrails':Util[_0x3dddb0(0x124)](_0x40c776,this['textures'][_0x3dddb0(0xc2)],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x11ddd8){const _0xe122e6=_0x1c87b7,_0x2d9627=0x4;let _0x1f226e=[];for(let _0xa29845=0x0;_0xa29845<_0x11ddd8[_0xe122e6(0x13c)];_0xa29845++){for(let _0x28dab4=0x0;_0x28dab4<_0x11ddd8[_0xe122e6(0x13c)];_0x28dab4++){for(let _0x26160c=0x0;_0x26160c<_0x2d9627;_0x26160c++){_0x1f226e['push'](_0xa29845/_0x11ddd8['particlesTextureSize']),_0x1f226e['push'](_0x28dab4/_0x11ddd8['particlesTextureSize']);}}}_0x1f226e=new Float32Array(_0x1f226e);let _0x556a98=[];const _0x1ab12b=[-0x1,0x1],_0x1aecbe=[-0x1,0x1];for(let _0x1a6440=0x0;_0x1a6440<_0x11ddd8['maxParticles'];_0x1a6440++){for(let _0xfe1c2a=0x0;_0xfe1c2a<_0x2d9627/0x2;_0xfe1c2a++){for(let _0x3be5c8=0x0;_0x3be5c8<_0x2d9627/0x2;_0x3be5c8++){_0x556a98[_0xe122e6(0xc9)](_0x1ab12b[_0xfe1c2a]),_0x556a98[_0xe122e6(0xc9)](_0x1aecbe[_0x3be5c8]),_0x556a98[_0xe122e6(0xc9)](0x0);}}}_0x556a98=new Float32Array(_0x556a98);const _0xcfbadf=0x6*_0x11ddd8[_0xe122e6(0x180)],_0x48a82c=new Uint32Array(_0xcfbadf);for(let _0x2f04e0=0x0,_0x5b2628=0x0,_0x3c0d4b=0x0;_0x2f04e0<_0x11ddd8['maxParticles'];_0x2f04e0++){_0x48a82c[_0x5b2628++]=_0x3c0d4b+0x0,_0x48a82c[_0x5b2628++]=_0x3c0d4b+0x1,_0x48a82c[_0x5b2628++]=_0x3c0d4b+0x2,_0x48a82c[_0x5b2628++]=_0x3c0d4b+0x2,_0x48a82c[_0x5b2628++]=_0x3c0d4b+0x1,_0x48a82c[_0x5b2628++]=_0x3c0d4b+0x3,_0x3c0d4b+=0x4;}const _0x3da12e=new Cesium$4[(_0xe122e6(0xdf))]({'attributes':new Cesium$4[(_0xe122e6(0x114))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x1f226e}),'normal':new Cesium$4[(_0xe122e6(0x179))]({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x556a98})}),'indices':_0x48a82c});return _0x3da12e;}['createRenderingPrimitives'](_0x5eb6ae,_0x4c4159,_0x5b1e27,_0x5f0c0b){const _0x6a3f95=_0x1c87b7,_0x4a7d7=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x4c4159),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x5f0c0b['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x5f0c0b['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x5f0c0b['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x554a49=_0x1cfd;return _0x4a7d7[_0x554a49(0x1b0)][_0x554a49(0x16b)];},'aspect':function(){const _0x2c7bac=_0x1cfd;return _0x5eb6ae['drawingBufferWidth']/_0x5eb6ae[_0x2c7bac(0xfa)];},'pixelSize':function(){return _0x5b1e27['pixelSize'];},'lineWidth':function(){return _0x4c4159['lineWidth'];},'particleHeight':function(){return _0x4c4159['particleHeight'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this[_0x6a3f95(0x174)]['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':_0x6a3f95(0x164),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x6a3f95(0x1a7)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0x4a7d7['textures']['segmentsColor'];},'segmentsDepthTexture':function(){return _0x4a7d7['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0x52e7ec=_0x6a3f95;return _0x4a7d7['framebuffers']['currentTrails'][_0x52e7ec(0x141)](0x0);},'trailsDepthTexture':function(){const _0xdff40c=_0x6a3f95;return _0x4a7d7['framebuffers'][_0xdff40c(0x193)]['depthTexture'];},'fadeOpacity':function(){return _0x4c4159['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x6a3f95(0x143))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0x6a3f95(0x174)][_0x6a3f95(0x12f)],'autoClear':!![],'preExecute':function(){const _0x4c8a0a=_0x6a3f95,_0x670fd6=_0x4a7d7[_0x4c8a0a(0x174)][_0x4c8a0a(0x193)];_0x4a7d7['framebuffers']['currentTrails']=_0x4a7d7['framebuffers']['nextTrails'],_0x4a7d7['framebuffers']['nextTrails']=_0x670fd6,_0x4a7d7[_0x4c8a0a(0xf6)]['trails'][_0x4c8a0a(0x172)]['framebuffer']=_0x4a7d7[_0x4c8a0a(0x174)]['nextTrails'],_0x4a7d7[_0x4c8a0a(0xf6)]['trails']['clearCommand']['framebuffer']=_0x4a7d7[_0x4c8a0a(0x174)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':_0x6a3f95(0x164),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x6a3f95(0x1a7)](),'primitiveType':Cesium$4['PrimitiveType'][_0x6a3f95(0xf3)],'uniformMap':{'trailsColorTexture':function(){const _0x303a2e=_0x6a3f95;return _0x4a7d7[_0x303a2e(0x174)]['nextTrails'][_0x303a2e(0x141)](0x0);},'trailsDepthTexture':function(){const _0x18264e=_0x6a3f95;return _0x4a7d7['framebuffers']['nextTrails'][_0x18264e(0xf8)];}},'vertexShaderSource':new Cesium$4[(_0x6a3f95(0x143))]({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag=_0x1c87b7(0xc0),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[_0x1c87b7(0x18c)];class ParticlesComputing{constructor(_0x19dccb,_0x3c20b4,_0x16b753,_0x50b3a7){const _0x3d18a2=_0x1c87b7;this[_0x3d18a2(0x14c)]=_0x3c20b4,this[_0x3d18a2(0xee)](_0x19dccb,_0x3c20b4),this[_0x3d18a2(0x13f)](_0x19dccb,_0x16b753,_0x50b3a7),this['createComputingPrimitives'](_0x3c20b4,_0x16b753,_0x50b3a7);}['createWindTextures'](_0x16f0d1,_0x3ff46b){const _0x17df04=_0x1c87b7,_0x18f2fe={'context':_0x16f0d1,'width':_0x3ff46b['dimensions'][_0x17df04(0xf0)],'height':_0x3ff46b[_0x17df04(0x107)]['lat']*(_0x3ff46b['dimensions'][_0x17df04(0xfd)]||0x1),'pixelFormat':Cesium$3[_0x17df04(0x162)]['LUMINANCE'],'pixelDatatype':Cesium$3[_0x17df04(0xef)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x17df04(0xc1))]({'minificationFilter':Cesium$3[_0x17df04(0x10b)]['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x18f2fe,_0x3ff46b['U'][_0x17df04(0xcf)]),'V':Util[_0x17df04(0x155)](_0x18f2fe,_0x3ff46b['V']['array'])};}[_0x1c87b7(0x13f)](_0x385c0d,_0x285efb,_0x103454){const _0x4c3cfc=_0x1c87b7,_0x4390a0={'context':_0x385c0d,'width':_0x285efb['particlesTextureSize'],'height':_0x285efb[_0x4c3cfc(0x13c)],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3[_0x4c3cfc(0xef)]['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x4017cd=this[_0x4c3cfc(0x144)](_0x285efb['maxParticles'],_0x103454),_0xe7b215=new Float32Array(0x4*_0x285efb['maxParticles'])[_0x4c3cfc(0x157)](0x0);this['particlesTextures']={'particlesWind':Util[_0x4c3cfc(0x155)](_0x4390a0),'currentParticlesPosition':Util[_0x4c3cfc(0x155)](_0x4390a0,_0x4017cd),'nextParticlesPosition':Util[_0x4c3cfc(0x155)](_0x4390a0,_0x4017cd),'currentParticlesSpeed':Util['createTexture'](_0x4390a0,_0xe7b215),'nextParticlesSpeed':Util[_0x4c3cfc(0x155)](_0x4390a0,_0xe7b215),'postProcessingPosition':Util['createTexture'](_0x4390a0,_0x4017cd),'postProcessingSpeed':Util[_0x4c3cfc(0x155)](_0x4390a0,_0xe7b215)};}['randomizeParticles'](_0x2fac58,_0x35f6e1){const _0xc98c25=_0x1c87b7,_0x3126c3=new Float32Array(0x4*_0x2fac58);for(let _0x1bed57=0x0;_0x1bed57<_0x2fac58;_0x1bed57++){_0x3126c3[0x4*_0x1bed57]=Cesium$3['Math']['randomBetween'](_0x35f6e1[_0xc98c25(0xe9)]['x'],_0x35f6e1[_0xc98c25(0xe9)]['y']),_0x3126c3[0x4*_0x1bed57+0x1]=Cesium$3['Math'][_0xc98c25(0x11d)](_0x35f6e1['latRange']['x'],_0x35f6e1[_0xc98c25(0x190)]['y']),_0x3126c3[0x4*_0x1bed57+0x2]=Cesium$3['Math'][_0xc98c25(0x11d)](this['data']['lev'][_0xc98c25(0x15a)],this['data']['lev']['max']),_0x3126c3[0x4*_0x1bed57+0x3]=0x0;}return _0x3126c3;}['destroyParticlesTextures'](){const _0x15b059=_0x1c87b7;Object['keys'](this[_0x15b059(0x135)])['forEach'](_0x2332db=>{const _0x50a837=_0x15b059;this[_0x50a837(0x135)][_0x2332db]['destroy']();});}['createComputingPrimitives'](_0x378af0,_0xb94017,_0x48d72f){const _0x5a48a6=_0x1c87b7,_0x59b78e=new Cesium$3[(_0x5a48a6(0x196))](_0x378af0['dimensions']['lon'],_0x378af0['dimensions'][_0x5a48a6(0x167)],_0x378af0['dimensions']['lev']),_0x56aa94=new Cesium$3['Cartesian3'](_0x378af0['lon'][_0x5a48a6(0x15a)],_0x378af0[_0x5a48a6(0x167)]['min'],_0x378af0['lev'][_0x5a48a6(0x15a)]),_0x1ccbdf=new Cesium$3[(_0x5a48a6(0x196))](_0x378af0['lon'][_0x5a48a6(0x182)],_0x378af0[_0x5a48a6(0x167)][_0x5a48a6(0x182)],_0x378af0['lev']['max']),_0x383dc1=new Cesium$3[(_0x5a48a6(0x196))]((_0x1ccbdf['x']-_0x56aa94['x'])/(_0x59b78e['x']-0x1),(_0x1ccbdf['y']-_0x56aa94['y'])/(_0x59b78e['y']-0x1),_0x59b78e['z']>0x1?(_0x1ccbdf['z']-_0x56aa94['z'])/(_0x59b78e['z']-0x1):0x1),_0x3680c7=new Cesium$3['Cartesian2'](_0x378af0['U']['min'],_0x378af0['U']['max']),_0x4ec023=new Cesium$3['Cartesian2'](_0x378af0['V']['min'],_0x378af0['V']['max']),_0x4383dd=this;this[_0x5a48a6(0xf6)]={'getWind':new CustomPrimitive({'commandType':_0x5a48a6(0x148),'uniformMap':{'U':function(){return _0x4383dd['windTextures']['U'];},'V':function(){return _0x4383dd['windTextures']['V'];},'currentParticlesPosition':function(){const _0x3a54dd=_0x5a48a6;return _0x4383dd['particlesTextures'][_0x3a54dd(0x13e)];},'dimension':function(){return _0x59b78e;},'minimum':function(){return _0x56aa94;},'maximum':function(){return _0x1ccbdf;},'interval':function(){return _0x383dc1;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x568599=_0x5a48a6;_0x4383dd[_0x568599(0xf6)]['getWind'][_0x568599(0x172)]['outputTexture']=_0x4383dd[_0x568599(0x135)]['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':_0x5a48a6(0x148),'uniformMap':{'currentParticlesSpeed':function(){return _0x4383dd['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){const _0x25d4b1=_0x5a48a6;return _0x4383dd['particlesTextures'][_0x25d4b1(0x19d)];},'uSpeedRange':function(){return _0x3680c7;},'vSpeedRange':function(){return _0x4ec023;},'pixelSize':function(){return _0x48d72f['pixelSize'];},'speedFactor':function(){return _0xb94017['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x5a48a6(0xfc)],'preExecute':function(){const _0x38287e=_0x5a48a6,_0x2104a0=_0x4383dd['particlesTextures']['currentParticlesSpeed'];_0x4383dd['particlesTextures']['currentParticlesSpeed']=_0x4383dd['particlesTextures'][_0x38287e(0xc5)],_0x4383dd[_0x38287e(0x135)]['postProcessingSpeed']=_0x2104a0,_0x4383dd[_0x38287e(0xf6)]['updateSpeed']['commandToExecute'][_0x38287e(0xe4)]=_0x4383dd['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x4383dd['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x1c4448=_0x5a48a6;return _0x4383dd[_0x1c4448(0x135)][_0x1c4448(0xff)];}},'fragmentShaderSource':new Cesium$3[(_0x5a48a6(0x143))]({'sources':[updatePosition_frag]}),'outputTexture':this[_0x5a48a6(0x135)]['nextParticlesPosition'],'preExecute':function(){const _0x29ddd4=_0x5a48a6,_0x1d8b6b=_0x4383dd['particlesTextures']['currentParticlesPosition'];_0x4383dd['particlesTextures']['currentParticlesPosition']=_0x4383dd['particlesTextures'][_0x29ddd4(0xe3)],_0x4383dd['particlesTextures'][_0x29ddd4(0xe3)]=_0x1d8b6b,_0x4383dd['primitives']['updatePosition']['commandToExecute']['outputTexture']=_0x4383dd[_0x29ddd4(0x135)][_0x29ddd4(0xce)];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x5a48a6(0x148),'uniformMap':{'nextParticlesPosition':function(){const _0x21414c=_0x5a48a6;return _0x4383dd['particlesTextures'][_0x21414c(0xce)];},'nextParticlesSpeed':function(){const _0x4dc64e=_0x5a48a6;return _0x4383dd[_0x4dc64e(0x135)]['nextParticlesSpeed'];},'lonRange':function(){return _0x48d72f['lonRange'];},'latRange':function(){return _0x48d72f['latRange'];},'randomCoefficient':function(){const _0x31396e=Math['random']();return _0x31396e;},'dropRate':function(){const _0x50311f=_0x5a48a6;return _0xb94017[_0x50311f(0x18b)];},'dropRateBump':function(){return _0xb94017['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){const _0x3d31b1=_0x5a48a6;_0x4383dd['primitives'][_0x3d31b1(0xe3)]['commandToExecute']['outputTexture']=_0x4383dd['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x468840=_0x5a48a6;return _0x4383dd[_0x468840(0x135)]['postProcessingPosition'];},'nextParticlesSpeed':function(){const _0x53c043=_0x5a48a6;return _0x4383dd['particlesTextures'][_0x53c043(0xfc)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this[_0x5a48a6(0x135)][_0x5a48a6(0xc5)],'preExecute':function(){const _0x2e510d=_0x5a48a6;_0x4383dd['primitives']['postProcessingSpeed'][_0x2e510d(0x172)][_0x2e510d(0xe4)]=_0x4383dd['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x21c0e5,_0x516b7b,_0xf2f2b3,_0x518f21){const _0x13959e=_0x1c87b7;this['context']=_0x21c0e5,_0x516b7b={..._0x516b7b},_0x516b7b['udata']&&_0x516b7b[_0x13959e(0x149)]&&(_0x516b7b['dimensions']={},_0x516b7b['dimensions']['lon']=_0x516b7b[_0x13959e(0x122)],_0x516b7b['dimensions'][_0x13959e(0x167)]=_0x516b7b[_0x13959e(0x17f)],_0x516b7b['dimensions']['lev']=_0x516b7b['lev']||0x1,_0x516b7b['lon']={},_0x516b7b['lon'][_0x13959e(0x15a)]=_0x516b7b['xmin'],_0x516b7b[_0x13959e(0xf0)]['max']=_0x516b7b['xmax'],_0x516b7b['lat']={},_0x516b7b['lat']['min']=_0x516b7b['ymin'],_0x516b7b['lat']['max']=_0x516b7b['ymax'],_0x516b7b['lev']={},_0x516b7b['lev']['min']=_0x516b7b['levmin']??0x1,_0x516b7b[_0x13959e(0xfd)]['max']=_0x516b7b['levmax']??0x1,_0x516b7b['U']={},_0x516b7b['U']['array']=new Float32Array(_0x516b7b['udata']),_0x516b7b['U'][_0x13959e(0x15a)]=_0x516b7b['umin']??Math[_0x13959e(0x15a)](..._0x516b7b[_0x13959e(0x140)]),_0x516b7b['U']['max']=_0x516b7b[_0x13959e(0xd2)]??Math['max'](..._0x516b7b[_0x13959e(0x140)]),_0x516b7b['V']={},_0x516b7b['V']['array']=new Float32Array(_0x516b7b[_0x13959e(0x149)]),_0x516b7b['V']['min']=_0x516b7b['vmin']??Math[_0x13959e(0x15a)](..._0x516b7b[_0x13959e(0x149)]),_0x516b7b['V']['max']=_0x516b7b['vmax']??Math[_0x13959e(0x182)](..._0x516b7b[_0x13959e(0x149)])),this[_0x13959e(0x14c)]=_0x516b7b,this['options']=_0xf2f2b3,this['viewerParameters']=_0x518f21,this[_0x13959e(0xe0)]=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0x13959e(0x1a3)]),this['particlesRendering']=new ParticlesRendering(this['context'],this[_0x13959e(0x14c)],this['options'],this['viewerParameters'],this['particlesComputing']);}[_0x1c87b7(0x125)](_0x39ab61){const _0x4d66ba=_0x1c87b7;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x266704=>{const _0x4e912f=_0x1cfd;this['particlesComputing']['windTextures'][_0x266704][_0x4e912f(0xd5)]();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering']['framebuffers'])[_0x4d66ba(0x163)](_0x2cd374=>{this['particlesRendering']['framebuffers'][_0x2cd374]['destroy']();}),this[_0x4d66ba(0xf5)]=_0x39ab61,this[_0x4d66ba(0xe0)]=new ParticlesComputing(this['context'],this['data'],this[_0x4d66ba(0x103)],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0x4d66ba(0xf5)],this['data'],this[_0x4d66ba(0x103)],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x5fe76b=_0x1c87b7,_0x5e1ebf=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x5fe76b(0xd6))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0xbb17ce=>{const _0x55a43f=_0x5fe76b;_0x5e1ebf[_0x55a43f(0x137)]=this['particlesRendering']['framebuffers'][_0xbb17ce],_0x5e1ebf['execute'](this[_0x55a43f(0xf5)]);});}[_0x1c87b7(0x18e)](_0x12a3b0){const _0x58889c=_0x1c87b7;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing'][_0x58889c(0x13f)](this['context'],this['options'],this['viewerParameters']);if(_0x12a3b0){var _0x227676;const _0x41420a=this['particlesRendering'][_0x58889c(0xf9)](this['options']);this[_0x58889c(0x12d)]['primitives']['segments']['geometry']=_0x41420a;const _0x4ee6fc=Cesium$2['VertexArray'][_0x58889c(0x18d)]({'context':this['context'],'geometry':_0x41420a,'attributeLocations':this['particlesRendering']['primitives'][_0x58889c(0x150)]['attributeLocations'],'bufferUsage':Cesium$2[_0x58889c(0x191)]['STATIC_DRAW']});(_0x227676=this[_0x58889c(0x12d)]['primitives'])!==null&&_0x227676!==void 0x0&&(_0x227676=_0x227676['segments'])!==null&&_0x227676!==void 0x0&&_0x227676['commandToExecute']&&(this['particlesRendering']['primitives'][_0x58889c(0x150)]['commandToExecute'][_0x58889c(0xbe)]=_0x4ee6fc);}}['setOptions'](_0x8f37c1){const _0x6b15b7=_0x1c87b7;let _0x3e7c32=![];this[_0x6b15b7(0x103)][_0x6b15b7(0x180)]!==_0x8f37c1[_0x6b15b7(0x180)]&&(_0x3e7c32=!![]),Object[_0x6b15b7(0x11f)](_0x8f37c1)['forEach'](_0x569d5a=>{this['options'][_0x569d5a]=_0x8f37c1[_0x569d5a];}),this[_0x6b15b7(0x18e)](_0x3e7c32);}['applyViewerParameters'](_0x3d1351){const _0x108216=_0x1c87b7;Object[_0x108216(0x11f)](_0x3d1351)['forEach'](_0x46895f=>{this['viewerParameters'][_0x46895f]=_0x3d1351[_0x46895f];}),this['refreshParticles'](![]);}['destroy'](){const _0x1318d7=_0x1c87b7;clearTimeout(this['canrefresh']),this['particlesComputing'][_0x1318d7(0x186)](),Object['keys'](this[_0x1318d7(0xe0)]['windTextures'])['forEach'](_0x394221=>{this['particlesComputing']['windTextures'][_0x394221]['destroy']();}),this[_0x1318d7(0x12d)]['textures'][_0x1318d7(0x16b)][_0x1318d7(0xd5)](),Object['keys'](this['particlesRendering']['framebuffers'])[_0x1318d7(0x163)](_0x14c1e7=>{const _0x46cdea=_0x1318d7;this[_0x46cdea(0x12d)][_0x46cdea(0x174)][_0x14c1e7]['destroy']();});for(const _0x470a96 in this){delete this[_0x470a96];}}}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':[_0x1c87b7(0x1ae)]};class WindLayer extends BaseLayer$1{constructor(_0x3d9feb={}){const _0x36a773=_0x1c87b7;_0x3d9feb={...DEF_OPTIONS,..._0x3d9feb},super(_0x3d9feb),this[_0x36a773(0x19a)](_0x3d9feb);}get[_0x1c87b7(0x113)](){return this['primitives'];}get[_0x1c87b7(0x14c)](){const _0x14b371=_0x1c87b7;return this[_0x14b371(0x19f)];}set['data'](_0x1e997e){this['setData'](_0x1e997e);}get['colors'](){return this['options']['colors'];}set['colors'](_0x463e31){this['options']['colors']=_0x463e31,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x463e31}),this['resize']();}['_mountedHook'](){}[_0x1c87b7(0x128)](){const _0x2ba6ab=_0x1c87b7;this[_0x2ba6ab(0x12a)]=this[_0x2ba6ab(0x151)][_0x2ba6ab(0x12a)],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives'][_0x2ba6ab(0xe2)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1[(_0x2ba6ab(0xd8))](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener'](_0x2ba6ab(0xca),this[_0x2ba6ab(0xca)]['bind'](this),![]),this['mouse_down']=![],this[_0x2ba6ab(0x16d)]=![],this[_0x2ba6ab(0x151)]['on'](mars3d__namespace['EventType']['wheel'],this[_0x2ba6ab(0x14b)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x2ba6ab(0x102)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x2ba6ab(0x101)],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace[_0x2ba6ab(0x159)][_0x2ba6ab(0x145)],this['_onMouseMoveEvent'],this),this['_data']&&this['setData'](this[_0x2ba6ab(0x19f)]);}[_0x1c87b7(0xc6)](){const _0x27b7f4=_0x1c87b7;window[_0x27b7f4(0x181)]('resize',this['resize']),this['_map']['off'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this),this[_0x27b7f4(0x151)]['off'](mars3d__namespace['EventType'][_0x27b7f4(0x139)],this['_onMapWhellEvent'],this),this['_map'][_0x27b7f4(0x117)](mars3d__namespace['EventType'][_0x27b7f4(0x154)],this[_0x27b7f4(0x102)],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x27b7f4(0x145)],this['_onMouseMoveEvent'],this),this[_0x27b7f4(0xf6)]['removeAll'](),this['_map']['scene']['primitives'][_0x27b7f4(0x184)](this[_0x27b7f4(0xf6)]);}['resize'](){const _0x2a7e50=_0x1c87b7;if(!this['show']||!this['particleSystem'])return;this[_0x2a7e50(0xf6)]['show']=![],this['primitives']['removeAll'](),this[_0x2a7e50(0x151)]['once'](mars3d__namespace['EventType']['preRender'],this[_0x2a7e50(0x147)],this);}['_onMap_preRenderEvent'](_0x34dcc0){const _0x4413e6=_0x1c87b7;this['particleSystem'][_0x4413e6(0x125)](this['scene']['context']),this['addPrimitives'](),this[_0x4413e6(0xf6)][_0x4413e6(0x12c)]=!![];}[_0x1c87b7(0x14b)](_0x2a5abc){const _0x77f0ab=_0x1c87b7;clearTimeout(this['refreshTimer']);if(!this[_0x77f0ab(0x12c)]||!this['particleSystem'])return;this[_0x77f0ab(0xf6)][_0x77f0ab(0x12c)]=![],this['refreshTimer']=setTimeout(()=>{const _0x369e47=_0x77f0ab;if(!this['show'])return;this[_0x369e47(0x10f)]();},0xc8);}[_0x1c87b7(0x102)](_0x4c1574){const _0x1dc98b=_0x1c87b7;this[_0x1dc98b(0x197)]=!![];}['_onMouseMoveEvent'](_0x21cbe5){const _0x30ab66=_0x1c87b7;if(!this['show']||!this['particleSystem'])return;this[_0x30ab66(0x197)]&&(this[_0x30ab66(0xf6)]['show']=![],this[_0x30ab66(0x16d)]=!![]);}[_0x1c87b7(0xec)](_0x56ac55){const _0x409116=_0x1c87b7;if(!this[_0x409116(0x12c)]||!this[_0x409116(0x13a)])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this[_0x409116(0xf6)]['show']=!![],this['mouse_down']=![],this[_0x409116(0x16d)]=![];}[_0x1c87b7(0x10f)](){const _0x31e53a=_0x1c87b7;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this[_0x31e53a(0x13a)][_0x31e53a(0x170)](this['viewerParameters']),this[_0x31e53a(0xf6)]['show']=!![];}['setData'](_0x300025){const _0x2a2cf3=_0x1c87b7;this['_data']=_0x300025,this[_0x2a2cf3(0x13a)]&&this['particleSystem']['destroy'](),this[_0x2a2cf3(0x13a)]=new ParticleSystem(this['scene']['context'],_0x300025,this[_0x2a2cf3(0xe1)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x162ed4,_0xa9b1d8){if(_0x162ed4)for(const _0x41476b in _0x162ed4){this[_0x41476b]=_0x162ed4[_0x41476b];}this['particleSystem']&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x213ec5=_0x1c87b7,_0x46030f=Math[_0x213ec5(0xf7)](Math[_0x213ec5(0x1af)](this[_0x213ec5(0x146)]));return this['particlesNumber']=_0x46030f*_0x46030f,{'particlesTextureSize':_0x46030f,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x213ec5(0x126)],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this[_0x213ec5(0x16f)],'lineWidth':this['lineWidth'],'colors':this[_0x213ec5(0x185)]};}['addPrimitives'](){const _0x5e5469=_0x1c87b7;this['primitives'][_0x5e5469(0xe2)](this['particleSystem'][_0x5e5469(0xe0)]['primitives']['getWind']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this[_0x5e5469(0xf6)]['add'](this['particleSystem']['particlesComputing']['primitives'][_0x5e5469(0x14d)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingPosition']),this['primitives']['add'](this[_0x5e5469(0x13a)][_0x5e5469(0xe0)]['primitives'][_0x5e5469(0xc5)]),this['primitives']['add'](this['particleSystem'][_0x5e5469(0x12d)][_0x5e5469(0xf6)][_0x5e5469(0x150)]),this['primitives']['add'](this[_0x5e5469(0x13a)]['particlesRendering']['primitives']['trails']),this['primitives']['add'](this['particleSystem'][_0x5e5469(0x12d)]['primitives']['screen']);}[_0x1c87b7(0xcd)](){const _0x4bc424=_0x1c87b7;let _0x1cf920=this['camera']['computeViewRectangle'](this['scene'][_0x4bc424(0x11c)]['ellipsoid']);if(!_0x1cf920){const _0x38d426=this['_map'][_0x4bc424(0x199)]();_0x1cf920=Cesium$1['Rectangle']['fromDegrees'](_0x38d426['xmin'],_0x38d426['ymin'],_0x38d426[_0x4bc424(0x19e)],_0x38d426['ymax']);}const _0x5c5d41=Util['viewRectangleToLonLatRange'](_0x1cf920);this['viewerParameters']['lonRange']['x']=_0x5c5d41['lon'][_0x4bc424(0x15a)],this['viewerParameters'][_0x4bc424(0xe9)]['y']=_0x5c5d41['lon'][_0x4bc424(0x182)],this['viewerParameters']['latRange']['x']=_0x5c5d41['lat']['min'],this['viewerParameters']['latRange']['y']=_0x5c5d41[_0x4bc424(0x167)]['max'];const _0x52c962=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene'][_0x4bc424(0x100)],this['scene']['drawingBufferHeight']);_0x52c962>0x0&&(this['viewerParameters'][_0x4bc424(0x1aa)]=_0x52c962);}}mars3d__namespace[_0x1c87b7(0x136)]['register']('wind',WindLayer),mars3d__namespace[_0x1c87b7(0x113)][_0x1c87b7(0xf2)]=WindLayer;class CanvasParticle{constructor(){const _0x4c1cdf=_0x1c87b7;this[_0x4c1cdf(0x1ad)]=null,this['lat']=null,this['tlng']=null,this[_0x4c1cdf(0xc8)]=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0xdea592 in this){delete this[_0xdea592];}}}class CanvasWindField{constructor(_0x4363ae){this['setOptions'](_0x4363ae);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x4005cf){const _0x4a7113=_0x1c87b7;this[_0x4a7113(0x1a4)]=(0x64-(_0x4005cf>0x63?0x63:_0x4005cf))*0x64,this['_calc_speedRate']=[(this[_0x4a7113(0x19e)]-this['xmin'])/this['_speedRate'],(this['ymax']-this[_0x4a7113(0x111)])/this[_0x4a7113(0x1a4)]];}get[_0x1c87b7(0xe5)](){return this['_maxAge'];}set['maxAge'](_0x1363bf){this['_maxAge']=_0x1363bf;}[_0x1c87b7(0xdd)](_0x30e62a){const _0x26835e=_0x1c87b7;this['options']=_0x30e62a,this['maxAge']=_0x30e62a['maxAge']||0x78,this['speedRate']=_0x30e62a[_0x26835e(0x15f)]||0x32,this[_0x26835e(0x14f)]=[];const _0x2a6e91=_0x30e62a['particlesNumber']||0x1000;for(let _0x4c3bb8=0x0;_0x4c3bb8<_0x2a6e91;_0x4c3bb8++){const _0x21bb54=this['_randomParticle'](new CanvasParticle());this['particles'][_0x26835e(0xc9)](_0x21bb54);}}[_0x1c87b7(0x12b)](_0x8715dd){const _0x23c82b=_0x1c87b7;this['rows']=_0x8715dd[_0x23c82b(0x17f)],this['cols']=_0x8715dd['cols'],this['xmin']=_0x8715dd['xmin'],this['xmax']=_0x8715dd[_0x23c82b(0x19e)],this['ymin']=_0x8715dd['ymin'],this['ymax']=_0x8715dd['ymax'],this['grid']=[];const _0x1e5f28=_0x8715dd['udata'],_0x228b66=_0x8715dd['vdata'];let _0xc5be43=![];_0x1e5f28['length']===this[_0x23c82b(0x17f)]&&_0x1e5f28[0x0]['length']===this[_0x23c82b(0x122)]&&(_0xc5be43=!![]);let _0x1de7e7=0x0,_0x581b17=null,_0x9de1a=null;for(let _0x55418e=0x0;_0x55418e<this[_0x23c82b(0x17f)];_0x55418e++){_0x581b17=[];for(let _0x3d5333=0x0;_0x3d5333<this['cols'];_0x3d5333++,_0x1de7e7++){_0xc5be43?_0x9de1a=this['_calcUV'](_0x1e5f28[_0x55418e][_0x3d5333],_0x228b66[_0x55418e][_0x3d5333]):_0x9de1a=this[_0x23c82b(0x1a1)](_0x1e5f28[_0x1de7e7],_0x228b66[_0x1de7e7]),_0x581b17[_0x23c82b(0xc9)](_0x9de1a);}this['grid']['push'](_0x581b17);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x1c6abd=_0x1c87b7;delete this['rows'],delete this[_0x1c6abd(0x122)],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this[_0x1c6abd(0x11a)],delete this[_0x1c6abd(0x10d)],delete this[_0x1c6abd(0x14f)];}['toGridXY'](_0x109939,_0x569c1c){const _0x1e470c=_0x1c87b7,_0x3898c2=(_0x109939-this['xmin'])/(this['xmax']-this[_0x1e470c(0x15d)])*(this['cols']-0x1),_0x2b068c=(this['ymax']-_0x569c1c)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0x3898c2,_0x2b068c];}['getUVByXY'](_0x56c4d4,_0x379b33){const _0x57823d=_0x1c87b7;if(_0x56c4d4<0x0||_0x56c4d4>=this['cols']||_0x379b33>=this[_0x57823d(0x17f)])return[0x0,0x0,0x0];const _0xeda4ad=Math['floor'](_0x56c4d4),_0x14911d=Math[_0x57823d(0x130)](_0x379b33);if(_0xeda4ad===_0x56c4d4&&_0x14911d===_0x379b33)return this['grid'][_0x379b33][_0x56c4d4];const _0x4ffe03=_0xeda4ad+0x1,_0x5e535e=_0x14911d+0x1,_0x585b78=this[_0x57823d(0x14a)](_0xeda4ad,_0x14911d),_0x9dbb90=this[_0x57823d(0x14a)](_0x4ffe03,_0x14911d),_0x474c3f=this['getUVByXY'](_0xeda4ad,_0x5e535e),_0x5f2e41=this['getUVByXY'](_0x4ffe03,_0x5e535e);let _0x1cca0e=null;try{_0x1cca0e=this['_bilinearInterpolation'](_0x56c4d4-_0xeda4ad,_0x379b33-_0x14911d,_0x585b78,_0x9dbb90,_0x474c3f,_0x5f2e41);}catch(_0xe0f588){console['log'](_0x56c4d4,_0x379b33);}return _0x1cca0e;}[_0x1c87b7(0xfb)](_0x266146,_0x1d5f6d,_0x3f2b35,_0x44614f,_0x3af3bf,_0x5d9ac1){const _0x2f02b6=0x1-_0x266146,_0x3a5c48=0x1-_0x1d5f6d,_0x481378=_0x2f02b6*_0x3a5c48,_0x4c4cf7=_0x266146*_0x3a5c48,_0x3fdf4a=_0x2f02b6*_0x1d5f6d,_0x174e38=_0x266146*_0x1d5f6d,_0x127556=_0x3f2b35[0x0]*_0x481378+_0x44614f[0x0]*_0x4c4cf7+_0x3af3bf[0x0]*_0x3fdf4a+_0x5d9ac1[0x0]*_0x174e38,_0x2cba3a=_0x3f2b35[0x1]*_0x481378+_0x44614f[0x1]*_0x4c4cf7+_0x3af3bf[0x1]*_0x3fdf4a+_0x5d9ac1[0x1]*_0x174e38;return this['_calcUV'](_0x127556,_0x2cba3a);}['_calcUV'](_0x14b5b7,_0xc15e9b){return[+_0x14b5b7,+_0xc15e9b,Math['sqrt'](_0x14b5b7*_0x14b5b7+_0xc15e9b*_0xc15e9b)];}[_0x1c87b7(0x169)](_0x47f0c8,_0x373a49){if(!this['isInExtent'](_0x47f0c8,_0x373a49))return null;const _0x2149d7=this['toGridXY'](_0x47f0c8,_0x373a49),_0x5d8615=this['getUVByXY'](_0x2149d7[0x0],_0x2149d7[0x1]);return _0x5d8615;}['isInExtent'](_0x522e5a,_0x53c293){const _0x3a5489=_0x1c87b7;return _0x522e5a>=this['xmin']&&_0x522e5a<=this[_0x3a5489(0x19e)]&&_0x53c293>=this['ymin']&&_0x53c293<=this[_0x3a5489(0x11a)]?!![]:![];}['getRandomLatLng'](){const _0x32fd8f=_0x1c87b7,_0x2cb30f=fRandomByfloat(this[_0x32fd8f(0x15d)],this['xmax']),_0xd942aa=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0xd942aa,'lng':_0x2cb30f};}[_0x1c87b7(0x198)](){const _0x5209e0=_0x1c87b7;let _0x3be269,_0x22b46e,_0x36598c;for(let _0x3f2479=0x0,_0x2565ff=this[_0x5209e0(0x14f)][_0x5209e0(0xd7)];_0x3f2479<_0x2565ff;_0x3f2479++){let _0x1d079c=this[_0x5209e0(0x14f)][_0x3f2479];_0x1d079c[_0x5209e0(0x13b)]<=0x0&&(_0x1d079c=this[_0x5209e0(0x104)](_0x1d079c));if(_0x1d079c['age']>0x0){const _0x314a0c=_0x1d079c[_0x5209e0(0x121)],_0x13b532=_0x1d079c['tlat'];_0x36598c=this['getUVByPoint'](_0x314a0c,_0x13b532),_0x36598c?(_0x3be269=_0x314a0c+this['_calc_speedRate'][0x0]*_0x36598c[0x0],_0x22b46e=_0x13b532+this[_0x5209e0(0x15b)][0x1]*_0x36598c[0x1],_0x1d079c[_0x5209e0(0x1ad)]=_0x314a0c,_0x1d079c['lat']=_0x13b532,_0x1d079c['tlng']=_0x3be269,_0x1d079c[_0x5209e0(0xc8)]=_0x22b46e,_0x1d079c[_0x5209e0(0x166)]=_0x36598c[0x2],_0x1d079c['age']--):_0x1d079c[_0x5209e0(0x13b)]=0x0;}}return this[_0x5209e0(0x14f)];}['_randomParticle'](_0x3fd469){const _0x165681=_0x1c87b7;let _0x200d47,_0x2f8a89;for(let _0x179b3f=0x0;_0x179b3f<0x1e;_0x179b3f++){_0x200d47=this['getRandomLatLng'](),_0x2f8a89=this['getUVByPoint'](_0x200d47['lng'],_0x200d47['lat']);if(_0x2f8a89&&_0x2f8a89[0x2]>0x0)break;}if(!_0x2f8a89)return _0x3fd469;const _0x1f37b6=_0x200d47['lng']+this[_0x165681(0x15b)][0x0]*_0x2f8a89[0x0],_0x3e5e7b=_0x200d47[_0x165681(0x167)]+this['_calc_speedRate'][0x1]*_0x2f8a89[0x1];return _0x3fd469['lng']=_0x200d47[_0x165681(0x1ad)],_0x3fd469['lat']=_0x200d47[_0x165681(0x167)],_0x3fd469[_0x165681(0x121)]=_0x1f37b6,_0x3fd469['tlat']=_0x3e5e7b,_0x3fd469['age']=Math['round'](Math['random']()*this['maxAge']),_0x3fd469[_0x165681(0x166)]=_0x2f8a89[0x2],_0x3fd469;}[_0x1c87b7(0xd5)](){for(const _0x4b8173 in this){delete this[_0x4b8173];}}}function fRandomByfloat(_0x5cf1ae,_0x447564){return _0x5cf1ae+Math['random']()*(_0x447564-_0x5cf1ae);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x1c87b7(0x113)]['BaseLayer'];function _0x1cfd(_0x98eeb,_0x59a659){const _0x2a8cc6=_0x2a8c();return _0x1cfd=function(_0x1cfde8,_0x5f09a8){_0x1cfde8=_0x1cfde8-0xba;let _0x34bee2=_0x2a8cc6[_0x1cfde8];return _0x34bee2;},_0x1cfd(_0x98eeb,_0x59a659);}class CanvasWindLayer extends BaseLayer{constructor(_0x2ac53c={}){const _0x15b729=_0x1c87b7;super(_0x2ac53c),this['_setOptionsHook'](_0x2ac53c),this['canvas']=null,_0x2ac53c['colors']&&_0x2ac53c['steps']&&(this[_0x15b729(0x175)]=new mars3d__namespace['ColorRamp'](_0x2ac53c));}[_0x1c87b7(0x19a)](_0x14abde,_0x36744e){const _0x125d03=_0x1c87b7;this['frameTime']=0x3e8/(_0x14abde['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this[_0x125d03(0x110)]=_0x14abde['color']||'#ffffff',this['lineWidth']=_0x14abde['lineWidth']||0x1,this['fixedHeight']=_0x14abde['fixedHeight']??0x0,this['reverseY']=_0x14abde[_0x125d03(0x161)]??![],this['windField']&&this[_0x125d03(0x14e)][_0x125d03(0xdd)](_0x14abde);}get['layer'](){const _0x599292=_0x1c87b7;return this[_0x599292(0xbb)];}get['canvasWidth'](){return this['_map']['scene']['canvas']['clientWidth'];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0xf6599f){const _0x131db3=_0x1c87b7;this[_0x131db3(0xcb)]=_0xf6599f;if(!this[_0x131db3(0xbb)])return;_0xf6599f?this['canvas'][_0x131db3(0x168)]['pointer-events']='all':this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){const _0x4f0eb9=_0x1c87b7;return this['options'][_0x4f0eb9(0x146)];}set[_0x1c87b7(0x146)](_0xd4ec5c){const _0x1bbe9d=_0x1c87b7;this['options'][_0x1bbe9d(0x146)]=_0xd4ec5c,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x372b64){const _0x44208f=_0x1c87b7;this['options'][_0x44208f(0x15f)]=_0x372b64,this['windField']&&(this['windField']['speedRate']=_0x372b64);}get['maxAge'](){const _0x96a601=_0x1c87b7;return this['options'][_0x96a601(0xe5)];}set['maxAge'](_0x5ae692){const _0x88f9cb=_0x1c87b7;this['options'][_0x88f9cb(0xe5)]=_0x5ae692,this['windField']&&(this['windField'][_0x88f9cb(0xe5)]=_0x5ae692);}get['data'](){return this['windData'];}set['data'](_0x42faf5){const _0x1568a5=_0x1c87b7;this[_0x1568a5(0xba)](_0x42faf5);}[_0x1c87b7(0x116)](_0x576493){const _0x3e35bc=_0x1c87b7;_0x576493?this[_0x3e35bc(0x128)]():(this[_0x3e35bc(0x10a)]&&(this['options']['data']=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x552f5f=_0x1c87b7;this[_0x552f5f(0x103)]['worker']?this[_0x552f5f(0xbd)]():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x5cd6e6=_0x1c87b7;this['canvas']=this['_createCanvas'](),this['canvasContext']=this[_0x5cd6e6(0xbb)]['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this[_0x5cd6e6(0x103)]['data']&&this['setData'](this[_0x5cd6e6(0x103)][_0x5cd6e6(0x14c)]);}['_removedHook'](){const _0x57871d=_0x1c87b7;this['clear'](),this['unbindEvent'](),this[_0x57871d(0xbb)]&&(this[_0x57871d(0x151)][_0x57871d(0x192)]['removeChild'](this['canvas']),delete this[_0x57871d(0xbb)]);}[_0x1c87b7(0x106)](){const _0x3e12e9=_0x1c87b7,_0x5636b6=mars3d__namespace[_0x3e12e9(0x1a5)]['create']('canvas',_0x3e12e9(0x109),this['_map']['container']);return _0x5636b6['style'][_0x3e12e9(0x187)]=_0x3e12e9(0x1a0),_0x5636b6[_0x3e12e9(0x168)][_0x3e12e9(0xf4)]=_0x3e12e9(0xea),_0x5636b6['style']['left']='0px',_0x5636b6['style']['width']=this['_map'][_0x3e12e9(0x12a)][_0x3e12e9(0xbb)]['clientWidth']+'px',_0x5636b6[_0x3e12e9(0x168)]['height']=this['_map']['scene'][_0x3e12e9(0xbb)]['clientHeight']+'px',_0x5636b6[_0x3e12e9(0x168)]['pointerEvents']=this[_0x3e12e9(0xcb)]?'auto':'none',_0x5636b6['style']['zIndex']=this['options']['zIndex']??0x9,_0x5636b6[_0x3e12e9(0xed)]=this['_map']['scene'][_0x3e12e9(0xbb)][_0x3e12e9(0xfe)],_0x5636b6['height']=this['_map'][_0x3e12e9(0x12a)]['canvas']['clientHeight'],_0x5636b6;}['resize'](){const _0x4d70af=_0x1c87b7;this['canvas']&&(this['canvas']['style']['width']=this['_map']['scene']['canvas'][_0x4d70af(0xfe)]+'px',this[_0x4d70af(0xbb)]['style']['height']=this['_map'][_0x4d70af(0x12a)]['canvas']['clientHeight']+'px',this['canvas']['width']=this['_map']['scene']['canvas']['clientWidth'],this[_0x4d70af(0xbb)]['height']=this['_map']['scene']['canvas'][_0x4d70af(0x165)]);}['bindEvent'](){const _0xc71cbc=_0x1c87b7,_0x3f6b06=this;let _0x3f25c0=Date['now']();(function _0x289bdd(){const _0x1e85c9=_0x1cfd;_0x3f6b06['animateFrame']=window[_0x1e85c9(0xc4)](_0x289bdd);if(_0x3f6b06['show']&&_0x3f6b06['windField']){const _0x1f5b75=Date['now'](),_0x3e8cfa=_0x1f5b75-_0x3f25c0;_0x3e8cfa>_0x3f6b06['frameTime']&&(_0x3f25c0=_0x1f5b75-_0x3e8cfa%_0x3f6b06[_0x1e85c9(0x16e)],_0x3f6b06[_0x1e85c9(0x108)]());}}(),window[_0xc71cbc(0x1a9)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this[_0xc71cbc(0x16d)]=![],this[_0xc71cbc(0x103)][_0xc71cbc(0x13d)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0xc71cbc(0x159)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this[_0xc71cbc(0xec)],this)));}[_0x1c87b7(0x19c)](){const _0x107a5d=_0x1c87b7;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this['options']['mouseHidden']&&(this['_map'][_0x107a5d(0x117)](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace[_0x107a5d(0x159)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x107a5d(0x145)],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x2433ca){const _0x4fb772=_0x1c87b7;clearTimeout(this[_0x4fb772(0x171)]);if(!this['show']||!this[_0x4fb772(0xbb)])return;this['canvas'][_0x4fb772(0x168)][_0x4fb772(0xd0)]='hidden',this['refreshTimer']=setTimeout(()=>{const _0x11de58=_0x4fb772;if(!this[_0x11de58(0x12c)])return;this['redraw'](),this['canvas']['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0xd2a812){const _0x28a8d3=_0x1c87b7;this[_0x28a8d3(0x197)]=!![],this[_0x28a8d3(0x151)]['off'](mars3d__namespace['EventType'][_0x28a8d3(0x145)],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x28a8d3(0x145)],this[_0x28a8d3(0x1a8)],this);}[_0x1c87b7(0x1a8)](_0x2a68ad){const _0x5b4ca1=_0x1c87b7;if(!this['show']||!this['canvas'])return;this[_0x5b4ca1(0x197)]&&(this['canvas']['style']['visibility']='hidden',this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x1e5e8a){const _0x947572=_0x1c87b7;if(!this[_0x947572(0x12c)]||!this['canvas'])return;this['_map'][_0x947572(0x117)](mars3d__namespace['EventType']['mouseMove'],this[_0x947572(0x1a8)],this),this['mouse_down']&&this[_0x947572(0x16d)]&&this['redraw'](),this['canvas']['style']['visibility']=_0x947572(0x11e),this['mouse_down']=![],this[_0x947572(0x16d)]=![];}['setData'](_0xc9e5ae){const _0x1e0445=_0x1c87b7;this['clear'](),this['windData']=_0xc9e5ae,this['windField'][_0x1e0445(0x12b)](_0xc9e5ae),this['redraw']();}['redraw'](){if(!this['show'])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){const _0x1dc70a=_0x1c87b7;if(this[_0x1dc70a(0x189)])return;this['_updateIng']=!![];if(this[_0x1dc70a(0x17e)])this['windField'][_0x1dc70a(0x108)]();else{const _0x567aee=this[_0x1dc70a(0x14e)][_0x1dc70a(0x198)]();this['_drawLines'](_0x567aee);}this[_0x1dc70a(0x189)]=![];}['_drawLines'](_0xddc281){const _0x5c2848=_0x1c87b7;this['canvasContext'][_0x5c2848(0xd9)]=_0x5c2848(0x120),this['canvasContext']['fillRect'](0x0,0x0,this[_0x5c2848(0xe8)],this['canvasHeight']),this[_0x5c2848(0x123)]['globalCompositeOperation']='lighter',this['canvasContext'][_0x5c2848(0x1ab)]=0.9;const _0x23cd16=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x3c1a2f=this['canvasWidth']*0.25;if(this[_0x5c2848(0x175)])for(let _0x27abeb=0x0,_0xefeb3e=_0xddc281['length'];_0x27abeb<_0xefeb3e;_0x27abeb++){const _0x30d8d6=_0xddc281[_0x27abeb],_0x21a765=this[_0x5c2848(0x105)](_0x30d8d6[_0x5c2848(0x1ad)],_0x30d8d6['lat'],_0x30d8d6),_0xffcf51=this['_tomap'](_0x30d8d6['tlng'],_0x30d8d6['tlat'],_0x30d8d6);if(!_0x21a765||!_0xffcf51)continue;if(_0x23cd16&&Math['abs'](_0x21a765[0x0]-_0xffcf51[0x0])>=_0x3c1a2f)continue;this['canvasContext']['beginPath'](),this[_0x5c2848(0x123)]['lineWidth']=this[_0x5c2848(0xda)],this[_0x5c2848(0x123)]['strokeStyle']=this['_colorRamp'][_0x5c2848(0x15e)](_0x30d8d6['speed']),this['canvasContext'][_0x5c2848(0x194)](_0x21a765[0x0],_0x21a765[0x1]),this['canvasContext']['lineTo'](_0xffcf51[0x0],_0xffcf51[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext']['beginPath'](),this['canvasContext'][_0x5c2848(0xda)]=this['lineWidth'],this['canvasContext']['strokeStyle']=this['color'];for(let _0x359ede=0x0,_0x1097fb=_0xddc281['length'];_0x359ede<_0x1097fb;_0x359ede++){const _0x2e7e76=_0xddc281[_0x359ede],_0x50ae33=this['_tomap'](_0x2e7e76[_0x5c2848(0x1ad)],_0x2e7e76['lat'],_0x2e7e76),_0x56e41e=this['_tomap'](_0x2e7e76[_0x5c2848(0x121)],_0x2e7e76['tlat'],_0x2e7e76);if(!_0x50ae33||!_0x56e41e)continue;if(_0x23cd16&&Math['abs'](_0x50ae33[0x0]-_0x56e41e[0x0])>=_0x3c1a2f)continue;this['canvasContext']['moveTo'](_0x50ae33[0x0],_0x50ae33[0x1]),this[_0x5c2848(0x123)]['lineTo'](_0x56e41e[0x0],_0x56e41e[0x1]);}this['canvasContext'][_0x5c2848(0x19b)]();}}['_tomap'](_0x8c32fb,_0x47cbdd,_0x45de3e){const _0x20bfb3=_0x1c87b7,_0x2fddc2=Cesium[_0x20bfb3(0x196)][_0x20bfb3(0x138)](_0x8c32fb,_0x47cbdd,this[_0x20bfb3(0xf1)]),_0x52cd28=this['_map'][_0x20bfb3(0x12a)];if(_0x52cd28['mode']===Cesium['SceneMode'][_0x20bfb3(0x160)]){const _0x38e982=new Cesium['EllipsoidalOccluder'](_0x52cd28['globe'][_0x20bfb3(0x132)],_0x52cd28['camera']['positionWC']),_0x422a7a=_0x38e982['isPointVisible'](_0x2fddc2);if(!_0x422a7a)return _0x45de3e['age']=0x0,null;}const _0x4bb128=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map']['scene'],_0x2fddc2);return _0x4bb128?[_0x4bb128['x'],_0x4bb128['y']]:null;}['clear'](){const _0x578da1=_0x1c87b7;this[_0x578da1(0x14e)]['clear'](),delete this['windData'];}[_0x1c87b7(0xbd)](){const _0x525bcc=_0x1c87b7;this['worker']=new Worker(this[_0x525bcc(0x103)][_0x525bcc(0x17e)]),this[_0x525bcc(0x17e)]['onmessage']=_0x4b9104=>{const _0x201440=_0x525bcc;this[_0x201440(0x112)](_0x4b9104['data']['particles']),this['_updateIng2']=![];},this[_0x525bcc(0x14e)]={'init':_0x4e1747=>{const _0xb6bc83=_0x525bcc;this[_0xb6bc83(0x17e)]['postMessage']({'type':_0xb6bc83(0x188),'options':_0x4e1747});},'setOptions':_0x42a7c4=>{this['worker']['postMessage']({'type':'setOptions','options':_0x42a7c4});},'setDate':_0x13171d=>{const _0x2a800b=_0x525bcc;this[_0x2a800b(0x17e)]['postMessage']({'type':'setDate','data':_0x13171d});},'update':()=>{const _0x4e0163=_0x525bcc;if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker'][_0x4e0163(0x173)]({'type':'update'});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this[_0x525bcc(0x14e)][_0x525bcc(0x188)](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x1c87b7(0xcc)]=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=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.7.
|
|
3
|
+
"version": "3.7.2",
|
|
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.7.
|
|
11
|
+
"mars3d": "~3.7.2"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
"build": {
|
|
38
38
|
"plugin": true,
|
|
39
39
|
"globals": {
|
|
40
|
-
"@turf/turf": "turf",
|
|
41
|
-
"mars3d-cesium": "Cesium",
|
|
42
40
|
"mars3d": "mars3d"
|
|
43
41
|
},
|
|
44
42
|
"minify": "obfuscator",
|