mars3d-wind 3.6.1 → 3.6.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 +3 -3
- package/package.json +2 -2
package/dist/mars3d-wind.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.6.
|
|
5
|
-
* 编译日期:2023-08-
|
|
4
|
+
* 版本信息:v3.6.2
|
|
5
|
+
* 编译日期:2023-08-21 21:14:17
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2023-03-17
|
|
8
8
|
*/
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
typeof define === 'function' && define.amd ? define(['exports', 'mars3d'], factory) :
|
|
12
12
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-wind"] = {}, global.mars3d));
|
|
13
13
|
})(this, (function (exports, mars3d) {
|
|
14
|
-
'use strict';const _0x27cea4=_0x5a1b;(function(_0x4e0a2e,_0x14b88c){const _0x3fa67b=_0x5a1b,_0x40bb9d=_0x4e0a2e();while(!![]){try{const _0x239054=-parseInt(_0x3fa67b(0x1fe))/0x1*(-parseInt(_0x3fa67b(0x231))/0x2)+-parseInt(_0x3fa67b(0x26e))/0x3+parseInt(_0x3fa67b(0x247))/0x4+-parseInt(_0x3fa67b(0x26c))/0x5+parseInt(_0x3fa67b(0x1d6))/0x6*(-parseInt(_0x3fa67b(0x29a))/0x7)+-parseInt(_0x3fa67b(0x279))/0x8*(parseInt(_0x3fa67b(0x250))/0x9)+parseInt(_0x3fa67b(0x27b))/0xa*(parseInt(_0x3fa67b(0x2bf))/0xb);if(_0x239054===_0x14b88c)break;else _0x40bb9d['push'](_0x40bb9d['shift']());}catch(_0x305595){_0x40bb9d['push'](_0x40bb9d['shift']());}}}(_0x4982,0xb8bb4));function _interopNamespace(_0x35d36a){const _0x34f87b=_0x5a1b;if(_0x35d36a&&_0x35d36a[_0x34f87b(0x2c0)])return _0x35d36a;var _0x1a1bd9=Object['create'](null);return _0x35d36a&&Object[_0x34f87b(0x220)](_0x35d36a)['forEach'](function(_0x5cd636){if(_0x5cd636!=='default'){var _0x4a34dc=Object['getOwnPropertyDescriptor'](_0x35d36a,_0x5cd636);Object['defineProperty'](_0x1a1bd9,_0x5cd636,_0x4a34dc['get']?_0x4a34dc:{'enumerable':!![],'get':function(){return _0x35d36a[_0x5cd636];}});}}),_0x1a1bd9['default']=_0x35d36a,_0x1a1bd9;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x203131,_0x440523){const _0x45b96b=_0x203131*Math['cos'](Cesium$7['Math']['toRadians'](_0x440523));return _0x45b96b;}function getV(_0x125e10,_0x30220e){const _0x2a3eaa=_0x5a1b,_0x14f8b2=_0x125e10*Math['sin'](Cesium$7['Math'][_0x2a3eaa(0x203)](_0x30220e));return _0x14f8b2;}function getSpeed(_0x1b729f,_0x3e3c27){const _0x46aa1e=_0x5a1b,_0x41dd3e=Math['sqrt'](Math[_0x46aa1e(0x25e)](_0x1b729f,0x2)+Math[_0x46aa1e(0x25e)](_0x3e3c27,0x2));return _0x41dd3e;}function getDirection(_0x15fb80,_0x1113bf){let _0xdb03c1=Cesium$7['Math']['toDegrees'](Math['atan2'](_0x1113bf,_0x15fb80));return _0xdb03c1+=_0xdb03c1<0x0?0x168:0x0,_0xdb03c1;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];function _0x4982(){const _0x5a4c59=['now','dimensions','windData','destroy','levmax','_updateIng2','143QhbKRx','__esModule','defined','EventType','_tomap','1026RUYMEQ','canvasContext','currentTrails','ellipsoid','OPAQUE','moveTo','segmentsColor','TextureMinificationFilter','isDestroyed','TextureMagnificationFilter','lighter','mars3d-canvasWind','refreshTimer','beginPath','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','blending','particles','Compute','createTexture','clear','lev','color','frameTime','maxParticles','vmin','_onMap_preRenderEvent','outputTexture','globalCompositeOperation','ymin','tlat','windTextures','particleSystem','currentParticlesSpeed','primitiveType','_map','_removedHook','postProcessingPosition','wheel','viewerParameters','setDate','2221PLsOHF','getUVByPoint','Geometry','GeometryAttributes','_setOptionsHook','toRadians','mouse_down','Matrix4','style','BufferUsage','destroyParticlesTextures','segments','getColorTexture','container','particleHeight','particlesRendering','GeometryAttribute','_pointerEvents','xmin','lat','show','xmax','getOptions','windField','nextTrails','worker','rawRenderState','auto','mod','stroke','forEach','lineWidth','LayerUtil','Framebuffer','keys','EllipsoidalOccluder','vertexShaderSource','_calcUV','canvas','_canrefresh','removeEventListener','createWindTextures','clientWidth','addEventListener','_maxAge','context','colorTable','vdata','commandType','resize','visible','410OtjnqO','RGBA','max','textures','getDefaultRenderState','clearFramebuffers','data','requestAnimationFrame','green','init','SCENE3D','layer','uniformMap','getUVByXY','hidden','canvasWidth','strokeStyle','LINEAR','_onMapWhellEvent','fromGeometry','remove','add','5187688iBdEeo','particlesComputing','destroyObject','tlng','Color','udata','WindUtil','commandList','STATIC_DRAW','567GdvAwP','_colorRamp','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','_calc_speedRate','globe','Pass','mouse_move','Sampler','PixelFormat','postProcessingSpeed','createRenderingTextures','length','particlesTextures','currentParticlesPosition','pow','options','bind','fixedHeight','fromDegrees','maxAge','framebuffers','redraw','_createCanvas','particlesNumber','geometry','reverseY','NEAREST','random','7300320baTOYd','CanvasWindField','3949821BDXMlG','lng','create','cancelAnimationFrame','speed','Cesium','attributeLocations','preExecute','bindEvent','PixelDatatype','particlesTextureSize','76456EBDANQ','FLOAT','2731240UZHlgs','DepthFunction','_data','commandToExecute','age','0px','array','_drawLines','_onMouseDownEvent','off','_speedRate','latRange','toDegrees','ShaderSource','_onMouseMoveEvent','cols','createFramebuffer','createComputingPrimitives','shaderProgram','TRIANGLES','mouseUp','setOptions','clearCommand','removeAll','fill','fragmentShaderSource','min','SceneTransforms','ymax','pointerEvents','trails','47789PtJOPd','framebuffer','isPointVisible','push','_onMouseUpEvent','width','lon','drawingBufferHeight','createCommand','colors','primitives','vertexArray','Draw','postMessage','rows','lonRange','getColor','fromCache','grid','mouseMove','particlesWind','createRawRenderState','once','ZERO','viewport','mode','depthTexture','wind','Math','currentTrailsColor','scene'];_0x4982=function(){return _0x5a4c59;};return _0x4982();}class CustomPrimitive{constructor(_0x3f1f22){const _0x43dccb=_0x5a1b;this[_0x43dccb(0x22e)]=_0x3f1f22['commandType'],this['geometry']=_0x3f1f22['geometry'],this[_0x43dccb(0x274)]=_0x3f1f22['attributeLocations'],this['primitiveType']=_0x3f1f22[_0x43dccb(0x1f7)],this[_0x43dccb(0x23d)]=_0x3f1f22[_0x43dccb(0x23d)],this['vertexShaderSource']=_0x3f1f22[_0x43dccb(0x222)],this['fragmentShaderSource']=_0x3f1f22['fragmentShaderSource'],this[_0x43dccb(0x218)]=_0x3f1f22['rawRenderState'],this['framebuffer']=_0x3f1f22['framebuffer'],this['outputTexture']=_0x3f1f22['outputTexture'],this['autoClear']=_0x3f1f22['autoClear']??![],this[_0x43dccb(0x275)]=_0x3f1f22['preExecute'],this['show']=!![],this['commandToExecute']=undefined,this[_0x43dccb(0x291)]=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0x43dccb(0x29b)],'pass':Cesium$6['Pass'][_0x43dccb(0x1da)]}));}[_0x27cea4(0x2a2)](_0x21d46c){const _0x3ec453=_0x27cea4;switch(this['commandType']){case'Draw':{const _0x30ab75=Cesium$6['VertexArray'][_0x3ec453(0x244)]({'context':_0x21d46c,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x3ec453(0x207)]['STATIC_DRAW']}),_0xe3212=Cesium$6['ShaderProgram']['fromCache']({'context':_0x21d46c,'attributeLocations':this[_0x3ec453(0x274)],'vertexShaderSource':this[_0x3ec453(0x222)],'fragmentShaderSource':this[_0x3ec453(0x294)]}),_0x2c6665=Cesium$6['RenderState'][_0x3ec453(0x2ab)](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0xe3212,'vertexArray':_0x30ab75,'modelMatrix':Cesium$6[_0x3ec453(0x205)]['IDENTITY'],'renderState':_0x2c6665,'uniformMap':this[_0x3ec453(0x23d)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x3ec453(0x1da)],'pickOnly':!![],'owner':this});}case _0x3ec453(0x1e7):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this[_0x3ec453(0x1f0)],'persists':!![]});}}}['setGeometry'](_0x26f928,_0xad8ee9){const _0xabdfed=_0x27cea4;this['geometry']=_0xad8ee9;const _0x1be71f=Cesium$6['VertexArray']['fromGeometry']({'context':_0x26f928,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this[_0xabdfed(0x27e)]['vertexArray']=_0x1be71f;}['update'](_0x2bb761){const _0x3b3285=_0x27cea4;if(!this['show'])return;if(_0x2bb761[_0x3b3285(0x2b3)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x2bb761['context'])),Cesium$6[_0x3b3285(0x2c1)](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x2bb761[_0x3b3285(0x24e)]['push'](this['clearCommand']),_0x2bb761['commandList']['push'](this['commandToExecute']);}[_0x27cea4(0x1de)](){return![];}[_0x27cea4(0x2bc)](){const _0x10784e=_0x27cea4;if(this['clearCommand']){var _0x1f751d,_0x5c8a65;(_0x1f751d=this[_0x10784e(0x291)])!==null&&_0x1f751d!==void 0x0&&_0x1f751d['vertexArray']&&this['clearCommand']['vertexArray'][_0x10784e(0x2bc)](),(_0x5c8a65=this['clearCommand'])!==null&&_0x5c8a65!==void 0x0&&_0x5c8a65['shaderProgram']&&this[_0x10784e(0x291)][_0x10784e(0x28d)][_0x10784e(0x2bc)](),delete this['clearCommand'];}return this[_0x10784e(0x27e)]&&(this['commandToExecute'][_0x10784e(0x2a5)]&&this[_0x10784e(0x27e)]['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute'][_0x10784e(0x28d)][_0x10784e(0x2bc)](),delete this['commandToExecute']),Cesium$6[_0x10784e(0x249)](this);}}const Cesium$5=mars3d__namespace[_0x27cea4(0x273)],Util=(function(){const _0x579f4d=function(){const _0x1ebf14=_0x5a1b,_0x4679fb=new Cesium$5[(_0x1ebf14(0x200))]({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x1ebf14(0x27a)],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5[(_0x1ebf14(0x20e))]({'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 _0x4679fb;},_0x5aaf22=function(_0x2239ff,_0x4d9bbc){const _0x1069f6=_0x5a1b;if(Cesium$5[_0x1069f6(0x2c1)](_0x4d9bbc)){const _0x517dee={};_0x517dee['arrayBufferView']=_0x4d9bbc,_0x2239ff['source']=_0x517dee;}const _0x16997a=new Cesium$5['Texture'](_0x2239ff);return _0x16997a;},_0x1afddd=function(_0x28ad4f,_0x125098,_0x16217c){const _0x507e54=_0x5a1b,_0x462400=new Cesium$5[(_0x507e54(0x21f))]({'context':_0x28ad4f,'colorTextures':[_0x125098],'depthTexture':_0x16217c});return _0x462400;},_0x581aae=function(_0x1f377c){const _0x82c773=_0x5a1b,_0x5b9cec=!![],_0x2e5316=![],_0x7def6e={'viewport':_0x1f377c[_0x82c773(0x2b2)],'depthTest':_0x1f377c['depthTest'],'depthMask':_0x1f377c['depthMask'],'blending':_0x1f377c[_0x82c773(0x1e5)]},_0x193649=Cesium$5['Appearance'][_0x82c773(0x235)](_0x5b9cec,_0x2e5316,_0x7def6e);return _0x193649;},_0x3220e9=function(_0x14ae23){const _0x15b000=_0x5a1b,_0x415823={},_0x22e80c=Cesium$5['Math'][_0x15b000(0x21a)](_0x14ae23['west'],Cesium$5['Math']['TWO_PI']),_0x444a2d=Cesium$5['Math'][_0x15b000(0x21a)](_0x14ae23['east'],Cesium$5['Math']['TWO_PI']),_0x130479=_0x14ae23['width'];let _0x2e16a0,_0x1a34fc;_0x130479>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x2e16a0=0x0,_0x1a34fc=Cesium$5['Math']['TWO_PI']):_0x444a2d-_0x22e80c<_0x130479?(_0x2e16a0=_0x22e80c,_0x1a34fc=_0x22e80c+_0x130479):(_0x2e16a0=_0x22e80c,_0x1a34fc=_0x444a2d);_0x415823[_0x15b000(0x2a0)]={'min':Cesium$5['Math']['toDegrees'](_0x2e16a0),'max':Cesium$5['Math'][_0x15b000(0x287)](_0x1a34fc)};const _0xd12c6e=_0x14ae23['south'],_0x1a2186=_0x14ae23['north'],_0xf858f3=_0x14ae23['height'],_0x3e46e9=_0xf858f3>Cesium$5['Math']['PI']/0xc?_0xf858f3/0x2:0x0;let _0x54b95e=Cesium$5[_0x15b000(0x2b6)]['clampToLatitudeRange'](_0xd12c6e-_0x3e46e9),_0x45b490=Cesium$5['Math']['clampToLatitudeRange'](_0x1a2186+_0x3e46e9);return _0x54b95e<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x54b95e=-Cesium$5['Math']['PI_OVER_TWO']),_0x45b490>Cesium$5['Math']['PI_OVER_THREE']&&(_0x45b490=Cesium$5['Math']['PI_OVER_TWO']),_0x415823['lat']={'min':Cesium$5[_0x15b000(0x2b6)]['toDegrees'](_0x54b95e),'max':Cesium$5[_0x15b000(0x2b6)][_0x15b000(0x287)](_0x45b490)},_0x415823;};return{'getFullscreenQuad':_0x579f4d,'createTexture':_0x5aaf22,'createFramebuffer':_0x1afddd,'createRawRenderState':_0x581aae,'viewRectangleToLonLatRange':_0x3220e9};}());var segmentDraw_vert=_0x27cea4(0x1e4),segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace[_0x27cea4(0x273)];class ParticlesRendering{constructor(_0x140201,_0xc00a1f,_0x2a4b22,_0x9042e2,_0x383942){const _0x2fca59=_0x27cea4;this[_0x2fca59(0x25a)](_0x140201,_0xc00a1f,_0x2a4b22[_0x2fca59(0x2a3)]),this['createRenderingFramebuffers'](_0x140201),this['createRenderingPrimitives'](_0x140201,_0x2a4b22,_0x9042e2,_0x383942);}[_0x27cea4(0x25a)](_0x317940,_0x37f117,_0x49edd){const _0x1f4820=_0x27cea4,_0x3c6a0d={'context':_0x317940,'width':_0x317940['drawingBufferWidth'],'height':_0x317940[_0x1f4820(0x2a1)],'pixelFormat':Cesium$4['PixelFormat'][_0x1f4820(0x232)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x28d4b2={'context':_0x317940,'width':_0x317940['drawingBufferWidth'],'height':_0x317940['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x1f4820(0x258)]['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x53d58d=_0x49edd['length'],_0x4d90c5=new Float32Array(_0x53d58d*0x3);for(let _0x42ee63=0x0;_0x42ee63<_0x53d58d;_0x42ee63++){const _0x2d5c33=Cesium$4['Color']['fromCssColorString'](_0x49edd[_0x42ee63]);_0x4d90c5[0x3*_0x42ee63]=_0x2d5c33['red'],_0x4d90c5[0x3*_0x42ee63+0x1]=_0x2d5c33[_0x1f4820(0x239)],_0x4d90c5[0x3*_0x42ee63+0x2]=_0x2d5c33['blue'];}const _0x452876={'context':_0x317940,'width':_0x53d58d,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0x1f4820(0x1dd)][_0x1f4820(0x242)],'magnificationFilter':Cesium$4[_0x1f4820(0x1df)][_0x1f4820(0x242)]})};this[_0x1f4820(0x234)]={'segmentsColor':Util[_0x1f4820(0x1e8)](_0x3c6a0d),'segmentsDepth':Util['createTexture'](_0x28d4b2),'currentTrailsColor':Util['createTexture'](_0x3c6a0d),'currentTrailsDepth':Util['createTexture'](_0x28d4b2),'nextTrailsColor':Util[_0x1f4820(0x1e8)](_0x3c6a0d),'nextTrailsDepth':Util['createTexture'](_0x28d4b2),'colorTable':Util['createTexture'](_0x452876,_0x4d90c5)};}['createRenderingFramebuffers'](_0x3c4d87){const _0x3f92f0=_0x27cea4;this[_0x3f92f0(0x264)]={'segments':Util['createFramebuffer'](_0x3c4d87,this['textures'][_0x3f92f0(0x1dc)],this[_0x3f92f0(0x234)]['segmentsDepth']),'currentTrails':Util[_0x3f92f0(0x28b)](_0x3c4d87,this[_0x3f92f0(0x234)][_0x3f92f0(0x2b7)],this[_0x3f92f0(0x234)]['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x3c4d87,this['textures']['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x5416f5){const _0x3c3f1f=_0x27cea4,_0x1ad1a2=0x4;let _0x207f97=[];for(let _0x1bf87f=0x0;_0x1bf87f<_0x5416f5[_0x3c3f1f(0x278)];_0x1bf87f++){for(let _0x11de73=0x0;_0x11de73<_0x5416f5[_0x3c3f1f(0x278)];_0x11de73++){for(let _0x4dd69d=0x0;_0x4dd69d<_0x1ad1a2;_0x4dd69d++){_0x207f97['push'](_0x1bf87f/_0x5416f5['particlesTextureSize']),_0x207f97['push'](_0x11de73/_0x5416f5['particlesTextureSize']);}}}_0x207f97=new Float32Array(_0x207f97);let _0x3e9ec1=[];const _0x4ebbcf=[-0x1,0x1],_0x3ba9a9=[-0x1,0x1];for(let _0x265e49=0x0;_0x265e49<_0x5416f5['maxParticles'];_0x265e49++){for(let _0x718bd3=0x0;_0x718bd3<_0x1ad1a2/0x2;_0x718bd3++){for(let _0x3e19d4=0x0;_0x3e19d4<_0x1ad1a2/0x2;_0x3e19d4++){_0x3e9ec1['push'](_0x4ebbcf[_0x718bd3]),_0x3e9ec1[_0x3c3f1f(0x29d)](_0x3ba9a9[_0x3e19d4]),_0x3e9ec1[_0x3c3f1f(0x29d)](0x0);}}}_0x3e9ec1=new Float32Array(_0x3e9ec1);const _0x5547a3=0x6*_0x5416f5['maxParticles'],_0x2741a5=new Uint32Array(_0x5547a3);for(let _0x13df4e=0x0,_0x59ea75=0x0,_0x29c8d1=0x0;_0x13df4e<_0x5416f5['maxParticles'];_0x13df4e++){_0x2741a5[_0x59ea75++]=_0x29c8d1+0x0,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x1,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x2,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x2,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x1,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x3,_0x29c8d1+=0x4;}const _0x48a7f7=new Cesium$4[(_0x3c3f1f(0x200))]({'attributes':new Cesium$4[(_0x3c3f1f(0x201))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x207f97}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x3c3f1f(0x27a)],'componentsPerAttribute':0x3,'values':_0x3e9ec1})}),'indices':_0x2741a5});return _0x48a7f7;}['createRenderingPrimitives'](_0x244097,_0x4e3484,_0x8d011c,_0x8a3772){const _0x5cc87f=_0x27cea4,_0x3c5fed=this;this[_0x5cc87f(0x2a4)]={'segments':new CustomPrimitive({'commandType':_0x5cc87f(0x2a6),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x4e3484),'primitiveType':Cesium$4['PrimitiveType'][_0x5cc87f(0x28e)],'uniformMap':{'currentParticlesPosition':function(){const _0x574a05=_0x5cc87f;return _0x8a3772[_0x574a05(0x25c)]['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x583480=_0x5cc87f;return _0x8a3772['particlesTextures'][_0x583480(0x1fa)];},'postProcessingSpeed':function(){return _0x8a3772['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){return _0x3c5fed['textures']['colorTable'];},'aspect':function(){return _0x244097['drawingBufferWidth']/_0x244097['drawingBufferHeight'];},'pixelSize':function(){return _0x8d011c['pixelSize'];},'lineWidth':function(){return _0x4e3484['lineWidth'];},'particleHeight':function(){const _0xdfb63=_0x5cc87f;return _0x4e3484[_0xdfb63(0x20c)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util[_0x5cc87f(0x2af)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x5cc87f(0x209)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0x558851=_0x5cc87f;return _0x3c5fed[_0x558851(0x234)]['segmentsColor'];},'segmentsDepthTexture':function(){const _0x1d33b3=_0x5cc87f;return _0x3c5fed[_0x1d33b3(0x234)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x16efd3=_0x5cc87f;return _0x3c5fed['framebuffers'][_0x16efd3(0x1d8)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0xd9c111=_0x5cc87f;return _0x3c5fed['framebuffers']['currentTrails'][_0xd9c111(0x2b4)];},'fadeOpacity':function(){return _0x4e3484['fadeOpacity'];}},'vertexShaderSource':new Cesium$4[(_0x5cc87f(0x288))]({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util[_0x5cc87f(0x2af)]({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0x5cc87f(0x27c)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x5cc87f(0x216)],'autoClear':!![],'preExecute':function(){const _0x23d4ac=_0x5cc87f,_0x117c02=_0x3c5fed['framebuffers']['currentTrails'];_0x3c5fed[_0x23d4ac(0x264)]['currentTrails']=_0x3c5fed['framebuffers'][_0x23d4ac(0x216)],_0x3c5fed['framebuffers']['nextTrails']=_0x117c02,_0x3c5fed['primitives'][_0x23d4ac(0x299)]['commandToExecute']['framebuffer']=_0x3c5fed['framebuffers']['nextTrails'],_0x3c5fed['primitives'][_0x23d4ac(0x299)][_0x23d4ac(0x291)][_0x23d4ac(0x29b)]=_0x3c5fed['framebuffers'][_0x23d4ac(0x216)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x21634b=_0x5cc87f;return _0x3c5fed[_0x21634b(0x264)]['nextTrails'][_0x21634b(0x20a)](0x0);},'trailsDepthTexture':function(){return _0x3c5fed['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x5cc87f(0x252)],'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='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x48d2ad,_0x5e4143,_0x2aa9ab,_0x483770){const _0x527642=_0x27cea4;this['data']=_0x5e4143,this['createWindTextures'](_0x48d2ad,_0x5e4143),this['createParticlesTextures'](_0x48d2ad,_0x2aa9ab,_0x483770),this[_0x527642(0x28c)](_0x5e4143,_0x2aa9ab,_0x483770);}[_0x27cea4(0x227)](_0xe08090,_0x4cfea4){const _0x5082aa=_0x27cea4,_0x418e10={'context':_0xe08090,'width':_0x4cfea4['dimensions']['lon'],'height':_0x4cfea4[_0x5082aa(0x2ba)]['lat']*(_0x4cfea4['dimensions'][_0x5082aa(0x1ea)]||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0x5082aa(0x277)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x5082aa(0x257))]({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x5082aa(0x26a)],'magnificationFilter':Cesium$3[_0x5082aa(0x1df)]['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x418e10,_0x4cfea4['U']['array']),'V':Util[_0x5082aa(0x1e8)](_0x418e10,_0x4cfea4['V']['array'])};}['createParticlesTextures'](_0xa5996f,_0x26343a,_0x469284){const _0x2a133f=_0x27cea4,_0x3bd6d2={'context':_0xa5996f,'width':_0x26343a['particlesTextureSize'],'height':_0x26343a[_0x2a133f(0x278)],'pixelFormat':Cesium$3['PixelFormat'][_0x2a133f(0x232)],'pixelDatatype':Cesium$3[_0x2a133f(0x277)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x2a133f(0x257))]({'minificationFilter':Cesium$3[_0x2a133f(0x1dd)][_0x2a133f(0x26a)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0xc61874=this['randomizeParticles'](_0x26343a[_0x2a133f(0x1ed)],_0x469284),_0x228c16=new Float32Array(0x4*_0x26343a[_0x2a133f(0x1ed)])[_0x2a133f(0x293)](0x0);this['particlesTextures']={'particlesWind':Util[_0x2a133f(0x1e8)](_0x3bd6d2),'currentParticlesPosition':Util['createTexture'](_0x3bd6d2,_0xc61874),'nextParticlesPosition':Util['createTexture'](_0x3bd6d2,_0xc61874),'currentParticlesSpeed':Util['createTexture'](_0x3bd6d2,_0x228c16),'nextParticlesSpeed':Util[_0x2a133f(0x1e8)](_0x3bd6d2,_0x228c16),'postProcessingPosition':Util[_0x2a133f(0x1e8)](_0x3bd6d2,_0xc61874),'postProcessingSpeed':Util[_0x2a133f(0x1e8)](_0x3bd6d2,_0x228c16)};}['randomizeParticles'](_0x59d637,_0x37cb2a){const _0x104b62=_0x27cea4,_0x58722c=new Float32Array(0x4*_0x59d637);for(let _0x4eff49=0x0;_0x4eff49<_0x59d637;_0x4eff49++){_0x58722c[0x4*_0x4eff49]=Cesium$3['Math']['randomBetween'](_0x37cb2a['lonRange']['x'],_0x37cb2a['lonRange']['y']),_0x58722c[0x4*_0x4eff49+0x1]=Cesium$3['Math']['randomBetween'](_0x37cb2a['latRange']['x'],_0x37cb2a['latRange']['y']),_0x58722c[0x4*_0x4eff49+0x2]=Cesium$3[_0x104b62(0x2b6)]['randomBetween'](this[_0x104b62(0x237)][_0x104b62(0x1ea)]['min'],this['data']['lev']['max']),_0x58722c[0x4*_0x4eff49+0x3]=0x0;}return _0x58722c;}['destroyParticlesTextures'](){const _0x44400a=_0x27cea4;Object['keys'](this['particlesTextures'])[_0x44400a(0x21c)](_0x41f42f=>{this['particlesTextures'][_0x41f42f]['destroy']();});}['createComputingPrimitives'](_0x4642cf,_0x2f1525,_0x575f46){const _0x5597e6=_0x27cea4,_0x3a781c=new Cesium$3['Cartesian3'](_0x4642cf[_0x5597e6(0x2ba)][_0x5597e6(0x2a0)],_0x4642cf['dimensions']['lat'],_0x4642cf['dimensions']['lev']),_0x1b6917=new Cesium$3['Cartesian3'](_0x4642cf[_0x5597e6(0x2a0)]['min'],_0x4642cf['lat']['min'],_0x4642cf['lev']['min']),_0x2e08d7=new Cesium$3['Cartesian3'](_0x4642cf['lon']['max'],_0x4642cf['lat']['max'],_0x4642cf['lev']['max']),_0x1b86a1=new Cesium$3['Cartesian3']((_0x2e08d7['x']-_0x1b6917['x'])/(_0x3a781c['x']-0x1),(_0x2e08d7['y']-_0x1b6917['y'])/(_0x3a781c['y']-0x1),_0x3a781c['z']>0x1?(_0x2e08d7['z']-_0x1b6917['z'])/(_0x3a781c['z']-0x1):0x1),_0x8265d3=new Cesium$3['Cartesian2'](_0x4642cf['U']['min'],_0x4642cf['U']['max']),_0x26d389=new Cesium$3['Cartesian2'](_0x4642cf['V']['min'],_0x4642cf['V'][_0x5597e6(0x233)]),_0x1c79ef=this;this[_0x5597e6(0x2a4)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){const _0x183ce0=_0x5597e6;return _0x1c79ef[_0x183ce0(0x1f4)]['U'];},'V':function(){const _0x42326c=_0x5597e6;return _0x1c79ef[_0x42326c(0x1f4)]['V'];},'currentParticlesPosition':function(){const _0x3d2f7a=_0x5597e6;return _0x1c79ef[_0x3d2f7a(0x25c)][_0x3d2f7a(0x25d)];},'dimension':function(){return _0x3a781c;},'minimum':function(){return _0x1b6917;},'maximum':function(){return _0x2e08d7;},'interval':function(){return _0x1b86a1;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this[_0x5597e6(0x25c)]['particlesWind'],'preExecute':function(){const _0x137c48=_0x5597e6;_0x1c79ef[_0x137c48(0x2a4)]['getWind']['commandToExecute'][_0x137c48(0x1f0)]=_0x1c79ef[_0x137c48(0x25c)]['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x1ebe06=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x1ebe06(0x1f6)];},'particlesWind':function(){const _0x5dab2b=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x5dab2b(0x2ae)];},'uSpeedRange':function(){return _0x8265d3;},'vSpeedRange':function(){return _0x26d389;},'pixelSize':function(){return _0x575f46['pixelSize'];},'speedFactor':function(){return _0x2f1525['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x3db4fd=_0x5597e6,_0x370992=_0x1c79ef[_0x3db4fd(0x25c)]['currentParticlesSpeed'];_0x1c79ef['particlesTextures']['currentParticlesSpeed']=_0x1c79ef[_0x3db4fd(0x25c)][_0x3db4fd(0x259)],_0x1c79ef['particlesTextures']['postProcessingSpeed']=_0x370992,_0x1c79ef['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x1c79ef['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x514743=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x514743(0x25d)];},'currentParticlesSpeed':function(){const _0x60d321=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x60d321(0x1f6)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x5597e6(0x25c)]['nextParticlesPosition'],'preExecute':function(){const _0x20c6ad=_0x5597e6,_0x4c24de=_0x1c79ef[_0x20c6ad(0x25c)]['currentParticlesPosition'];_0x1c79ef['particlesTextures']['currentParticlesPosition']=_0x1c79ef['particlesTextures']['postProcessingPosition'],_0x1c79ef['particlesTextures']['postProcessingPosition']=_0x4c24de,_0x1c79ef['primitives']['updatePosition']['commandToExecute']['outputTexture']=_0x1c79ef['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x1c79ef['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x1c79ef['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x111edc=_0x5597e6;return _0x575f46[_0x111edc(0x2a9)];},'latRange':function(){const _0xab3afe=_0x5597e6;return _0x575f46[_0xab3afe(0x286)];},'randomCoefficient':function(){const _0x519648=Math['random']();return _0x519648;},'dropRate':function(){return _0x2f1525['dropRate'];},'dropRateBump':function(){return _0x2f1525['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x5597e6(0x25c)][_0x5597e6(0x1fa)],'preExecute':function(){const _0x3cae75=_0x5597e6;_0x1c79ef[_0x3cae75(0x2a4)]['postProcessingPosition']['commandToExecute'][_0x3cae75(0x1f0)]=_0x1c79ef['particlesTextures'][_0x3cae75(0x1fa)];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x5597e6(0x1e7),'uniformMap':{'postProcessingPosition':function(){const _0x5b8222=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x5b8222(0x1fa)];},'nextParticlesSpeed':function(){return _0x1c79ef['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x5597e6(0x259)],'preExecute':function(){const _0x11fb07=_0x5597e6;_0x1c79ef[_0x11fb07(0x2a4)]['postProcessingSpeed']['commandToExecute'][_0x11fb07(0x1f0)]=_0x1c79ef[_0x11fb07(0x25c)]['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x4606bb,_0x4a5f93,_0x5ca518,_0x153a6f){const _0x81d2ab=_0x27cea4;this['context']=_0x4606bb,_0x4a5f93={..._0x4a5f93},_0x4a5f93['udata']&&_0x4a5f93[_0x81d2ab(0x22d)]&&(_0x4a5f93['dimensions']={},_0x4a5f93['dimensions']['lon']=_0x4a5f93[_0x81d2ab(0x28a)],_0x4a5f93['dimensions']['lat']=_0x4a5f93['rows'],_0x4a5f93[_0x81d2ab(0x2ba)]['lev']=_0x4a5f93[_0x81d2ab(0x1ea)]||0x1,_0x4a5f93['lon']={},_0x4a5f93['lon'][_0x81d2ab(0x295)]=_0x4a5f93['xmin'],_0x4a5f93['lon']['max']=_0x4a5f93['xmax'],_0x4a5f93['lat']={},_0x4a5f93[_0x81d2ab(0x211)]['min']=_0x4a5f93['ymin'],_0x4a5f93['lat']['max']=_0x4a5f93['ymax'],_0x4a5f93['lev']={},_0x4a5f93[_0x81d2ab(0x1ea)]['min']=_0x4a5f93['levmin']??0x1,_0x4a5f93['lev']['max']=_0x4a5f93[_0x81d2ab(0x2bd)]??0x1,_0x4a5f93['U']={},_0x4a5f93['U']['array']=new Float32Array(_0x4a5f93['udata']),_0x4a5f93['U']['min']=_0x4a5f93['umin']??Math['min'](..._0x4a5f93['udata']),_0x4a5f93['U'][_0x81d2ab(0x233)]=_0x4a5f93['umax']??Math['max'](..._0x4a5f93[_0x81d2ab(0x24c)]),_0x4a5f93['V']={},_0x4a5f93['V'][_0x81d2ab(0x281)]=new Float32Array(_0x4a5f93[_0x81d2ab(0x22d)]),_0x4a5f93['V']['min']=_0x4a5f93[_0x81d2ab(0x1ee)]??Math['min'](..._0x4a5f93['vdata']),_0x4a5f93['V']['max']=_0x4a5f93['vmax']??Math['max'](..._0x4a5f93[_0x81d2ab(0x22d)])),this['data']=_0x4a5f93,this['options']=_0x5ca518,this['viewerParameters']=_0x153a6f,this[_0x81d2ab(0x248)]=new ParticlesComputing(this[_0x81d2ab(0x22b)],this[_0x81d2ab(0x237)],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x81d2ab(0x248)]);}['canvasResize'](_0xf71a9b){const _0x5a526f=_0x27cea4;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x5a526f(0x248)]['windTextures'])[_0x5a526f(0x21c)](_0xcb7913=>{const _0x274ebb=_0x5a526f;this[_0x274ebb(0x248)]['windTextures'][_0xcb7913][_0x274ebb(0x2bc)]();}),this['particlesRendering']['textures']['colorTable'][_0x5a526f(0x2bc)](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x227e47=>{const _0x3bd0e4=_0x5a526f;this['particlesRendering']['framebuffers'][_0x227e47][_0x3bd0e4(0x2bc)]();}),this['context']=_0xf71a9b,this['particlesComputing']=new ParticlesComputing(this[_0x5a526f(0x22b)],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x5a526f(0x248)]);}[_0x27cea4(0x236)](){const _0x2860f7=_0x27cea4,_0x5c8df0=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x2860f7(0x24b))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0x2860f7(0x255)][_0x2860f7(0x1da)]});Object['keys'](this['particlesRendering'][_0x2860f7(0x264)])['forEach'](_0xeb9e49=>{const _0x4601d0=_0x2860f7;_0x5c8df0['framebuffer']=this['particlesRendering']['framebuffers'][_0xeb9e49],_0x5c8df0['execute'](this[_0x4601d0(0x22b)]);});}['refreshParticles'](_0x5f122b){const _0x37acad=_0x27cea4;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this[_0x37acad(0x248)]['createParticlesTextures'](this['context'],this['options'],this[_0x37acad(0x1fc)]);if(_0x5f122b){var _0x423050,_0x5d5b53;const _0x3abe97=this['particlesRendering']['createSegmentsGeometry'](this['options']);this[_0x37acad(0x20d)][_0x37acad(0x2a4)]['segments'][_0x37acad(0x268)]=_0x3abe97;const _0x49c0c7=Cesium$2['VertexArray'][_0x37acad(0x244)]({'context':this[_0x37acad(0x22b)],'geometry':_0x3abe97,'attributeLocations':this['particlesRendering']['primitives'][_0x37acad(0x209)][_0x37acad(0x274)],'bufferUsage':Cesium$2['BufferUsage'][_0x37acad(0x24f)]});(_0x423050=this['particlesRendering'][_0x37acad(0x2a4)])!==null&&_0x423050!==void 0x0&&(_0x5d5b53=_0x423050[_0x37acad(0x209)])!==null&&_0x5d5b53!==void 0x0&&_0x5d5b53[_0x37acad(0x27e)]&&(this['particlesRendering']['primitives'][_0x37acad(0x209)]['commandToExecute']['vertexArray']=_0x49c0c7);}}[_0x27cea4(0x290)](_0x14c29c){let _0x457623=![];this['options']['maxParticles']!==_0x14c29c['maxParticles']&&(_0x457623=!![]),Object['keys'](_0x14c29c)['forEach'](_0x1d8d10=>{this['options'][_0x1d8d10]=_0x14c29c[_0x1d8d10];}),this['refreshParticles'](_0x457623);}['applyViewerParameters'](_0x12dcf4){const _0x468792=_0x27cea4;Object[_0x468792(0x220)](_0x12dcf4)['forEach'](_0x3c869d=>{this['viewerParameters'][_0x3c869d]=_0x12dcf4[_0x3c869d];}),this['refreshParticles'](![]);}['destroy'](){const _0xec229a=_0x27cea4;clearTimeout(this['canrefresh']),this['particlesComputing'][_0xec229a(0x208)](),Object['keys'](this['particlesComputing']['windTextures'])[_0xec229a(0x21c)](_0x1d4974=>{const _0x210ee3=_0xec229a;this['particlesComputing'][_0x210ee3(0x1f4)][_0x1d4974][_0x210ee3(0x2bc)]();}),this['particlesRendering']['textures'][_0xec229a(0x22c)]['destroy'](),Object[_0xec229a(0x220)](this[_0xec229a(0x20d)]['framebuffers'])['forEach'](_0xe2b9af=>{this['particlesRendering']['framebuffers'][_0xe2b9af]['destroy']();});for(const _0x533a56 in this){delete this[_0x533a56];}}}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)']};function _0x5a1b(_0x3d23e7,_0x3b831f){const _0x4982f3=_0x4982();return _0x5a1b=function(_0x5a1b68,_0x1fd678){_0x5a1b68=_0x5a1b68-0x1d4;let _0x38e2b1=_0x4982f3[_0x5a1b68];return _0x38e2b1;},_0x5a1b(_0x3d23e7,_0x3b831f);}class WindLayer extends BaseLayer$1{constructor(_0x5c0fd4={}){_0x5c0fd4={...DEF_OPTIONS,..._0x5c0fd4},super(_0x5c0fd4),this['_setOptionsHook'](_0x5c0fd4);}get['layer'](){return this['primitives'];}get[_0x27cea4(0x237)](){return this['_data'];}set[_0x27cea4(0x237)](_0x2a9dd0){this['setData'](_0x2a9dd0);}get[_0x27cea4(0x2a3)](){return this['options']['colors'];}set['colors'](_0x47ec26){const _0x26be59=_0x27cea4;this[_0x26be59(0x25f)]['colors']=_0x47ec26,this[_0x26be59(0x1f5)]&&this[_0x26be59(0x1f5)][_0x26be59(0x290)]({'colors':_0x47ec26}),this['resize']();}['_mountedHook'](){}['_addedHook'](){const _0x2cbac4=_0x27cea4;this['scene']=this[_0x2cbac4(0x1f8)]['scene'],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene'][_0x2cbac4(0x2a4)]['add'](this['primitives']),this[_0x2cbac4(0x1fc)]={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x2cbac4(0x2b1)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this[_0x2cbac4(0x22f)][_0x2cbac4(0x260)](this),![]),this['mouse_down']=![],this['mouse_move']=![],this[_0x2cbac4(0x1f8)]['on'](mars3d__namespace['EventType']['wheel'],this[_0x2cbac4(0x243)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this[_0x2cbac4(0x1f8)]['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_data']&&this['setData'](this['_data']);}[_0x27cea4(0x1f9)](){const _0x5aaec6=_0x27cea4;window[_0x5aaec6(0x226)]('resize',this['resize']),this['_map'][_0x5aaec6(0x284)](mars3d__namespace[_0x5aaec6(0x1d4)]['preRender'],this['_onMap_preRenderEvent'],this),this[_0x5aaec6(0x1f8)]['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace[_0x5aaec6(0x1d4)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x5aaec6(0x2a4)]['removeAll'](),this[_0x5aaec6(0x1f8)][_0x5aaec6(0x2b8)][_0x5aaec6(0x2a4)][_0x5aaec6(0x245)](this['primitives']);}[_0x27cea4(0x22f)](){const _0x4e37ea=_0x27cea4;if(!this['show']||!this[_0x4e37ea(0x1f5)])return;this['primitives']['show']=![],this[_0x4e37ea(0x2a4)][_0x4e37ea(0x292)](),this['_map'][_0x4e37ea(0x2b0)](mars3d__namespace['EventType']['preRender'],this[_0x4e37ea(0x1ef)],this);}['_onMap_preRenderEvent'](_0x15a750){this['particleSystem']['canvasResize'](this['scene']['context']),this['addPrimitives'](),this['primitives']['show']=!![];}[_0x27cea4(0x243)](_0x14ff32){const _0x562237=_0x27cea4;clearTimeout(this['refreshTimer']);if(!this[_0x562237(0x212)]||!this['particleSystem'])return;this[_0x562237(0x2a4)]['show']=![],this['refreshTimer']=setTimeout(()=>{const _0x429b2a=_0x562237;if(!this['show'])return;this[_0x429b2a(0x265)]();},0xc8);}['_onMouseDownEvent'](_0x3b7a1a){const _0x28fcca=_0x27cea4;this[_0x28fcca(0x204)]=!![];}['_onMouseMoveEvent'](_0x803fc6){const _0x584169=_0x27cea4;if(!this['show']||!this[_0x584169(0x1f5)])return;this['mouse_down']&&(this['primitives']['show']=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0xbd4d0f){const _0xaf9d6a=_0x27cea4;if(!this[_0xaf9d6a(0x212)]||!this['particleSystem'])return;this['mouse_down']&&this[_0xaf9d6a(0x256)]&&this[_0xaf9d6a(0x265)](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0xf16b6c=_0x27cea4;if(!this[_0xf16b6c(0x1f8)]||!this[_0xf16b6c(0x212)])return;this['updateViewerParameters'](),this[_0xf16b6c(0x1f5)]['applyViewerParameters'](this['viewerParameters']),this[_0xf16b6c(0x2a4)]['show']=!![];}['setData'](_0x43934c){const _0x524d98=_0x27cea4;this[_0x524d98(0x27d)]=_0x43934c,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x524d98(0x22b)],_0x43934c,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}[_0x27cea4(0x202)](_0x22a1dc,_0x36fd9e){const _0x4274a3=_0x27cea4;if(_0x22a1dc)for(const _0x302b8b in _0x22a1dc){this[_0x302b8b]=_0x22a1dc[_0x302b8b];}this[_0x4274a3(0x1f5)]&&this['particleSystem']['setOptions'](this[_0x4274a3(0x214)]());}['getOptions'](){const _0x25c78e=_0x27cea4,_0x531aa1=Math['ceil'](Math['sqrt'](this[_0x25c78e(0x267)]));return this[_0x25c78e(0x267)]=_0x531aa1*_0x531aa1,{'particlesTextureSize':_0x531aa1,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x25c78e(0x261)],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this[_0x25c78e(0x2a3)]};}['addPrimitives'](){const _0x2b1459=_0x27cea4;this[_0x2b1459(0x2a4)]['add'](this['particleSystem']['particlesComputing']['primitives']['getWind']),this['primitives'][_0x2b1459(0x246)](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x2b1459(0x2a4)]['postProcessingPosition']),this[_0x2b1459(0x2a4)]['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this[_0x2b1459(0x2a4)]['add'](this[_0x2b1459(0x1f5)][_0x2b1459(0x20d)][_0x2b1459(0x2a4)][_0x2b1459(0x209)]),this['primitives']['add'](this[_0x2b1459(0x1f5)]['particlesRendering']['primitives'][_0x2b1459(0x299)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0x5ceb4d=_0x27cea4;let _0x39f3a0=this['camera']['computeViewRectangle'](this['scene'][_0x5ceb4d(0x254)][_0x5ceb4d(0x1d9)]);if(!_0x39f3a0){const _0x5b2e17=this['_map']['getExtent']();_0x39f3a0=Cesium$1['Rectangle'][_0x5ceb4d(0x262)](_0x5b2e17[_0x5ceb4d(0x210)],_0x5b2e17['ymin'],_0x5b2e17['xmax'],_0x5b2e17[_0x5ceb4d(0x297)]);}const _0x54e6be=Util['viewRectangleToLonLatRange'](_0x39f3a0);this['viewerParameters']['lonRange']['x']=_0x54e6be[_0x5ceb4d(0x2a0)]['min'],this['viewerParameters']['lonRange']['y']=_0x54e6be['lon']['max'],this['viewerParameters']['latRange']['x']=_0x54e6be[_0x5ceb4d(0x211)]['min'],this['viewerParameters'][_0x5ceb4d(0x286)]['y']=_0x54e6be[_0x5ceb4d(0x211)]['max'];const _0x13d472=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x13d472>0x0&&(this['viewerParameters']['pixelSize']=_0x13d472);}}mars3d__namespace['LayerUtil']['register'](_0x27cea4(0x2b5),WindLayer),mars3d__namespace[_0x27cea4(0x23c)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x4bbdeb=_0x27cea4;this[_0x4bbdeb(0x26f)]=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null,this[_0x4bbdeb(0x272)]=null;}[_0x27cea4(0x2bc)](){for(const _0x3d2f47 in this){delete this[_0x3d2f47];}}}class CanvasWindField{constructor(_0x3073ab){const _0x264c09=_0x27cea4;this[_0x264c09(0x290)](_0x3073ab);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x3946dd){const _0x2f241b=_0x27cea4;this['_speedRate']=(0x64-(_0x3946dd>0x63?0x63:_0x3946dd))*0x64,this[_0x2f241b(0x253)]=[(this['xmax']-this['xmin'])/this['_speedRate'],(this[_0x2f241b(0x297)]-this['ymin'])/this[_0x2f241b(0x285)]];}get['maxAge'](){const _0x3a4b63=_0x27cea4;return this[_0x3a4b63(0x22a)];}set[_0x27cea4(0x263)](_0x1bb231){this['_maxAge']=_0x1bb231;}[_0x27cea4(0x290)](_0x588f59){const _0x4f2770=_0x27cea4;this['options']=_0x588f59,this[_0x4f2770(0x263)]=_0x588f59['maxAge']||0x78,this['speedRate']=_0x588f59['speedRate']||0x32,this['particles']=[];const _0x49e6d8=_0x588f59['particlesNumber']||0x1000;for(let _0x39ef79=0x0;_0x39ef79<_0x49e6d8;_0x39ef79++){const _0x597b8b=this['_randomParticle'](new CanvasParticle());this[_0x4f2770(0x1e6)][_0x4f2770(0x29d)](_0x597b8b);}}[_0x27cea4(0x1fd)](_0x175ca7){const _0x246acb=_0x27cea4;this['rows']=_0x175ca7[_0x246acb(0x2a8)],this[_0x246acb(0x28a)]=_0x175ca7[_0x246acb(0x28a)],this[_0x246acb(0x210)]=_0x175ca7['xmin'],this[_0x246acb(0x213)]=_0x175ca7['xmax'],this[_0x246acb(0x1f2)]=_0x175ca7[_0x246acb(0x1f2)],this['ymax']=_0x175ca7['ymax'],this[_0x246acb(0x2ac)]=[];const _0x49d739=_0x175ca7[_0x246acb(0x24c)],_0x583e8e=_0x175ca7[_0x246acb(0x22d)];let _0x3050d5=![];_0x49d739[_0x246acb(0x25b)]===this['rows']&&_0x49d739[0x0]['length']===this[_0x246acb(0x28a)]&&(_0x3050d5=!![]);let _0x1e2179=0x0,_0x501faf=null,_0x1509f8=null;for(let _0x568378=0x0;_0x568378<this['rows'];_0x568378++){_0x501faf=[];for(let _0x412b52=0x0;_0x412b52<this['cols'];_0x412b52++,_0x1e2179++){_0x3050d5?_0x1509f8=this['_calcUV'](_0x49d739[_0x568378][_0x412b52],_0x583e8e[_0x568378][_0x412b52]):_0x1509f8=this[_0x246acb(0x223)](_0x49d739[_0x1e2179],_0x583e8e[_0x1e2179]),_0x501faf['push'](_0x1509f8);}this['grid']['push'](_0x501faf);}this['options'][_0x246acb(0x269)]&&this['grid']['reverse']();}['clear'](){const _0x1c8f1d=_0x27cea4;delete this['rows'],delete this[_0x1c8f1d(0x28a)],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this[_0x1c8f1d(0x1e6)];}['toGridXY'](_0x316313,_0x1b327c){const _0xd4862e=_0x27cea4,_0x458d00=(_0x316313-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x390004=(this[_0xd4862e(0x297)]-_0x1b327c)/(this[_0xd4862e(0x297)]-this[_0xd4862e(0x1f2)])*(this[_0xd4862e(0x2a8)]-0x1);return[_0x458d00,_0x390004];}[_0x27cea4(0x23e)](_0x4fd932,_0x242457){const _0x4af66a=_0x27cea4;if(_0x4fd932<0x0||_0x4fd932>=this[_0x4af66a(0x28a)]||_0x242457>=this['rows'])return[0x0,0x0,0x0];const _0xce43f2=Math['floor'](_0x4fd932),_0x211715=Math['floor'](_0x242457);if(_0xce43f2===_0x4fd932&&_0x211715===_0x242457)return this['grid'][_0x242457][_0x4fd932];const _0x2390c9=_0xce43f2+0x1,_0x3ae026=_0x211715+0x1,_0x3c0404=this['getUVByXY'](_0xce43f2,_0x211715),_0x5355e2=this[_0x4af66a(0x23e)](_0x2390c9,_0x211715),_0xf0de9c=this['getUVByXY'](_0xce43f2,_0x3ae026),_0x3d8f3a=this['getUVByXY'](_0x2390c9,_0x3ae026);let _0x6f8c3f=null;try{_0x6f8c3f=this['_bilinearInterpolation'](_0x4fd932-_0xce43f2,_0x242457-_0x211715,_0x3c0404,_0x5355e2,_0xf0de9c,_0x3d8f3a);}catch(_0x5129b9){console['log'](_0x4fd932,_0x242457);}return _0x6f8c3f;}['_bilinearInterpolation'](_0x235ab2,_0x69aa16,_0x4d71dc,_0x26809a,_0x363e39,_0x4ffcf9){const _0x22555e=0x1-_0x235ab2,_0x318946=0x1-_0x69aa16,_0x2a0678=_0x22555e*_0x318946,_0x32b22f=_0x235ab2*_0x318946,_0x2dc5f7=_0x22555e*_0x69aa16,_0x5eef66=_0x235ab2*_0x69aa16,_0x137082=_0x4d71dc[0x0]*_0x2a0678+_0x26809a[0x0]*_0x32b22f+_0x363e39[0x0]*_0x2dc5f7+_0x4ffcf9[0x0]*_0x5eef66,_0x2ac328=_0x4d71dc[0x1]*_0x2a0678+_0x26809a[0x1]*_0x32b22f+_0x363e39[0x1]*_0x2dc5f7+_0x4ffcf9[0x1]*_0x5eef66;return this['_calcUV'](_0x137082,_0x2ac328);}[_0x27cea4(0x223)](_0xad731,_0x21261b){return[+_0xad731,+_0x21261b,Math['sqrt'](_0xad731*_0xad731+_0x21261b*_0x21261b)];}[_0x27cea4(0x1ff)](_0x217b45,_0x2f6c3c){if(!this['isInExtent'](_0x217b45,_0x2f6c3c))return null;const _0x5c6cfe=this['toGridXY'](_0x217b45,_0x2f6c3c),_0x4045c5=this['getUVByXY'](_0x5c6cfe[0x0],_0x5c6cfe[0x1]);return _0x4045c5;}['isInExtent'](_0xea5bfa,_0x475620){const _0xbce4e1=_0x27cea4;return _0xea5bfa>=this[_0xbce4e1(0x210)]&&_0xea5bfa<=this['xmax']&&_0x475620>=this['ymin']&&_0x475620<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x5c8462=_0x27cea4,_0xca2b86=fRandomByfloat(this['xmin'],this[_0x5c8462(0x213)]),_0x506558=fRandomByfloat(this['ymin'],this[_0x5c8462(0x297)]);return{'lat':_0x506558,'lng':_0xca2b86};}['getParticles'](){const _0x211b15=_0x27cea4;let _0x17469e,_0x2ed270,_0x282cda;for(let _0x9bf75e=0x0,_0xa9b27f=this['particles']['length'];_0x9bf75e<_0xa9b27f;_0x9bf75e++){let _0x53e15c=this['particles'][_0x9bf75e];_0x53e15c['age']<=0x0&&(_0x53e15c=this['_randomParticle'](_0x53e15c));if(_0x53e15c['age']>0x0){const _0x35cbad=_0x53e15c[_0x211b15(0x24a)],_0x5621a4=_0x53e15c[_0x211b15(0x1f3)];_0x282cda=this['getUVByPoint'](_0x35cbad,_0x5621a4),_0x282cda?(_0x17469e=_0x35cbad+this['_calc_speedRate'][0x0]*_0x282cda[0x0],_0x2ed270=_0x5621a4+this['_calc_speedRate'][0x1]*_0x282cda[0x1],_0x53e15c[_0x211b15(0x26f)]=_0x35cbad,_0x53e15c[_0x211b15(0x211)]=_0x5621a4,_0x53e15c['tlng']=_0x17469e,_0x53e15c['tlat']=_0x2ed270,_0x53e15c['speed']=_0x282cda[0x2],_0x53e15c['age']--):_0x53e15c[_0x211b15(0x27f)]=0x0;}}return this['particles'];}['_randomParticle'](_0x1cb9ce){const _0x4d157d=_0x27cea4;let _0x8e6355,_0x34eae6;for(let _0x1e0f93=0x0;_0x1e0f93<0x1e;_0x1e0f93++){_0x8e6355=this['getRandomLatLng'](),_0x34eae6=this['getUVByPoint'](_0x8e6355[_0x4d157d(0x26f)],_0x8e6355[_0x4d157d(0x211)]);if(_0x34eae6&&_0x34eae6[0x2]>0x0)break;}if(!_0x34eae6)return _0x1cb9ce;const _0x1aa592=_0x8e6355['lng']+this['_calc_speedRate'][0x0]*_0x34eae6[0x0],_0x5983a5=_0x8e6355['lat']+this[_0x4d157d(0x253)][0x1]*_0x34eae6[0x1];return _0x1cb9ce['lng']=_0x8e6355['lng'],_0x1cb9ce['lat']=_0x8e6355['lat'],_0x1cb9ce[_0x4d157d(0x24a)]=_0x1aa592,_0x1cb9ce[_0x4d157d(0x1f3)]=_0x5983a5,_0x1cb9ce[_0x4d157d(0x27f)]=Math['round'](Math['random']()*this['maxAge']),_0x1cb9ce['speed']=_0x34eae6[0x2],_0x1cb9ce;}['destroy'](){for(const _0x5c104c in this){delete this[_0x5c104c];}}}function fRandomByfloat(_0x5e2b2a,_0x1ef117){const _0x5905e7=_0x27cea4;return _0x5e2b2a+Math[_0x5905e7(0x26b)]()*(_0x1ef117-_0x5e2b2a);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x27cea4(0x23c)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0xe45666={}){const _0xe7d087=_0x27cea4;super(_0xe45666),this['_setOptionsHook'](_0xe45666),this[_0xe7d087(0x224)]=null,_0xe45666['colors']&&_0xe45666['steps']&&(this[_0xe7d087(0x251)]=new mars3d__namespace['ColorRamp'](_0xe45666));}[_0x27cea4(0x202)](_0x16d702,_0x50d912){const _0x40bfa2=_0x27cea4;this['frameTime']=0x3e8/(_0x16d702['frameRate']||0xa),this[_0x40bfa2(0x20f)]=this[_0x40bfa2(0x25f)][_0x40bfa2(0x298)]??![],this['color']=_0x16d702[_0x40bfa2(0x1eb)]||'#ffffff',this['lineWidth']=_0x16d702['lineWidth']||0x1,this[_0x40bfa2(0x261)]=_0x16d702['fixedHeight']??0x0,this[_0x40bfa2(0x269)]=_0x16d702['reverseY']??![],this['windField']&&this['windField']['setOptions'](_0x16d702);}get['layer'](){return this['canvas'];}get['canvasWidth'](){return this['_map']['scene']['canvas']['clientWidth'];}get['canvasHeight'](){const _0x1d618d=_0x27cea4;return this[_0x1d618d(0x1f8)]['scene']['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0xfcb783){const _0x2faf68=_0x27cea4;this['_pointerEvents']=_0xfcb783;if(!this['canvas'])return;_0xfcb783?this[_0x2faf68(0x224)]['style']['pointer-events']='all':this[_0x2faf68(0x224)]['style']['pointer-events']='none';}get['particlesNumber'](){const _0x1f3b7b=_0x27cea4;return this['options'][_0x1f3b7b(0x267)];}set[_0x27cea4(0x267)](_0xfea392){const _0x2236b3=_0x27cea4;this['options'][_0x2236b3(0x267)]=_0xfea392,clearTimeout(this['_canrefresh']),this[_0x2236b3(0x225)]=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x33d0cf){this['options']['speedRate']=_0x33d0cf,this['windField']&&(this['windField']['speedRate']=_0x33d0cf);}get[_0x27cea4(0x263)](){return this['options']['maxAge'];}set['maxAge'](_0x34e074){const _0x41672b=_0x27cea4;this['options']['maxAge']=_0x34e074,this[_0x41672b(0x215)]&&(this['windField'][_0x41672b(0x263)]=_0x34e074);}get['data'](){const _0x22626e=_0x27cea4;return this[_0x22626e(0x2bb)];}set['data'](_0x128e7a){this['setData'](_0x128e7a);}['_showHook'](_0x29ff2b){const _0x596d7c=_0x27cea4;_0x29ff2b?this['_addedHook']():(this['windData']&&(this['options']['data']=this[_0x596d7c(0x2bb)]),this[_0x596d7c(0x1f9)]());}['_mountedHook'](){const _0x4d371b=_0x27cea4;this['options']['worker']?this['initWorker']():this[_0x4d371b(0x215)]=new CanvasWindField(this[_0x4d371b(0x25f)]);}['_addedHook'](){const _0x2ffde0=_0x27cea4;this['canvas']=this[_0x2ffde0(0x266)](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x2ffde0(0x276)](),this['options']['data']&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x59a91d=_0x27cea4;this['clear'](),this['unbindEvent'](),this[_0x59a91d(0x224)]&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x10c4f3=_0x27cea4,_0xc9694=mars3d__namespace['DomUtil'][_0x10c4f3(0x270)](_0x10c4f3(0x224),_0x10c4f3(0x1e1),this['_map'][_0x10c4f3(0x20b)]);return _0xc9694['style']['position']='absolute',_0xc9694[_0x10c4f3(0x206)]['top']=_0x10c4f3(0x280),_0xc9694['style']['left']='0px',_0xc9694['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0xc9694['style']['height']=this['_map'][_0x10c4f3(0x2b8)]['canvas']['clientHeight']+'px',_0xc9694['style']['pointerEvents']=this['_pointerEvents']?_0x10c4f3(0x219):'none',_0xc9694[_0x10c4f3(0x206)]['zIndex']=this['options']['zIndex']??0x9,_0xc9694['width']=this[_0x10c4f3(0x1f8)]['scene']['canvas']['clientWidth'],_0xc9694['height']=this['_map']['scene']['canvas']['clientHeight'],_0xc9694;}[_0x27cea4(0x22f)](){const _0x366c65=_0x27cea4;this[_0x366c65(0x224)]&&(this['canvas'][_0x366c65(0x206)]['width']=this[_0x366c65(0x1f8)]['scene']['canvas'][_0x366c65(0x228)]+'px',this[_0x366c65(0x224)]['style']['height']=this[_0x366c65(0x1f8)]['scene'][_0x366c65(0x224)]['clientHeight']+'px',this['canvas'][_0x366c65(0x29f)]=this['_map']['scene'][_0x366c65(0x224)]['clientWidth'],this[_0x366c65(0x224)]['height']=this[_0x366c65(0x1f8)][_0x366c65(0x2b8)]['canvas']['clientHeight']);}['bindEvent'](){const _0x16d85a=_0x27cea4,_0x53d02e=this;let _0x2da524=Date['now']();(function _0x116a44(){const _0x4bcd17=_0x5a1b;_0x53d02e['animateFrame']=window[_0x4bcd17(0x238)](_0x116a44);if(_0x53d02e['show']&&_0x53d02e['windField']){const _0xfa102e=Date[_0x4bcd17(0x2b9)](),_0xc5903=_0xfa102e-_0x2da524;_0xc5903>_0x53d02e[_0x4bcd17(0x1ec)]&&(_0x2da524=_0xfa102e-_0xc5903%_0x53d02e['frameTime'],_0x53d02e['update']());}}(),window[_0x16d85a(0x229)](_0x16d85a(0x22f),this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x16d85a(0x1f8)]['on'](mars3d__namespace[_0x16d85a(0x1d4)]['mouseDown'],this['_onMouseDownEvent'],this),this[_0x16d85a(0x1f8)]['on'](mars3d__namespace['EventType']['mouseUp'],this[_0x16d85a(0x29e)],this)));}['unbindEvent'](){const _0xeb8037=_0x27cea4;window[_0xeb8037(0x271)](this['animateFrame']),delete this['animateFrame'],window[_0xeb8037(0x226)]('resize',this[_0xeb8037(0x22f)]),this[_0xeb8037(0x25f)]['mouseHidden']&&(this[_0xeb8037(0x1f8)]['off'](mars3d__namespace['EventType'][_0xeb8037(0x1fb)],this['_onMapWhellEvent'],this),this[_0xeb8037(0x1f8)][_0xeb8037(0x284)](mars3d__namespace['EventType']['mouseDown'],this[_0xeb8037(0x283)],this),this[_0xeb8037(0x1f8)]['off'](mars3d__namespace['EventType'][_0xeb8037(0x28f)],this[_0xeb8037(0x29e)],this),this['_map'][_0xeb8037(0x284)](mars3d__namespace['EventType'][_0xeb8037(0x2ad)],this[_0xeb8037(0x289)],this));}[_0x27cea4(0x243)](_0x5387f8){const _0x497854=_0x27cea4;clearTimeout(this[_0x497854(0x1e2)]);if(!this['show']||!this['canvas'])return;this[_0x497854(0x224)]['style']['visibility']=_0x497854(0x23f),this['refreshTimer']=setTimeout(()=>{const _0x4f7267=_0x497854;if(!this['show'])return;this[_0x4f7267(0x265)](),this[_0x4f7267(0x224)][_0x4f7267(0x206)]['visibility']=_0x4f7267(0x230);},0xc8);}[_0x27cea4(0x283)](_0x52e76d){const _0x2e8cab=_0x27cea4;this[_0x2e8cab(0x204)]=!![],this[_0x2e8cab(0x1f8)]['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x2e8cab(0x289)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x2e8cab(0x289)],this);}[_0x27cea4(0x289)](_0x344596){const _0x2cf546=_0x27cea4;if(!this['show']||!this['canvas'])return;this[_0x2cf546(0x204)]&&(this[_0x2cf546(0x224)]['style']['visibility']=_0x2cf546(0x23f),this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5e64ff){const _0x4594fd=_0x27cea4;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace[_0x4594fd(0x1d4)][_0x4594fd(0x2ad)],this['_onMouseMoveEvent'],this),this[_0x4594fd(0x204)]&&this['mouse_move']&&this['redraw'](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x5975f3){const _0x45469b=_0x27cea4;this[_0x45469b(0x1e9)](),this['windData']=_0x5975f3,this['windField']['setDate'](_0x5975f3),this['redraw']();}[_0x27cea4(0x265)](){const _0x5f3147=_0x27cea4;if(!this[_0x5f3147(0x212)])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x1d1ae7=this['windField']['getParticles']();this['_drawLines'](_0x1d1ae7);}this['_updateIng']=![];}['_drawLines'](_0x1eddc8){const _0x48cc39=_0x27cea4;this['canvasContext'][_0x48cc39(0x1f1)]='destination-in',this[_0x48cc39(0x1d7)]['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']=_0x48cc39(0x1e0),this[_0x48cc39(0x1d7)]['globalAlpha']=0.9;const _0x2baed3=this['_map']['scene']['mode']!==Cesium['SceneMode'][_0x48cc39(0x23b)],_0x183b10=this[_0x48cc39(0x240)]*0.25;if(this['_colorRamp'])for(let _0x30508c=0x0,_0x340128=_0x1eddc8[_0x48cc39(0x25b)];_0x30508c<_0x340128;_0x30508c++){const _0x1049d8=_0x1eddc8[_0x30508c],_0x34dfd5=this[_0x48cc39(0x1d5)](_0x1049d8[_0x48cc39(0x26f)],_0x1049d8[_0x48cc39(0x211)],_0x1049d8),_0x102fc2=this['_tomap'](_0x1049d8['tlng'],_0x1049d8[_0x48cc39(0x1f3)],_0x1049d8);if(!_0x34dfd5||!_0x102fc2)continue;if(_0x2baed3&&Math['abs'](_0x34dfd5[0x0]-_0x102fc2[0x0])>=_0x183b10)continue;this[_0x48cc39(0x1d7)][_0x48cc39(0x1e3)](),this['canvasContext'][_0x48cc39(0x21d)]=this['lineWidth'],this['canvasContext'][_0x48cc39(0x241)]=this['_colorRamp'][_0x48cc39(0x2aa)](_0x1049d8['speed']),this['canvasContext'][_0x48cc39(0x1db)](_0x34dfd5[0x0],_0x34dfd5[0x1]),this['canvasContext']['lineTo'](_0x102fc2[0x0],_0x102fc2[0x1]),this['canvasContext']['stroke']();}else{this[_0x48cc39(0x1d7)]['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this[_0x48cc39(0x1d7)]['strokeStyle']=this['color'];for(let _0x55056b=0x0,_0x2a4092=_0x1eddc8['length'];_0x55056b<_0x2a4092;_0x55056b++){const _0x5852e1=_0x1eddc8[_0x55056b],_0x861b64=this['_tomap'](_0x5852e1['lng'],_0x5852e1['lat'],_0x5852e1),_0xa3b23f=this['_tomap'](_0x5852e1['tlng'],_0x5852e1[_0x48cc39(0x1f3)],_0x5852e1);if(!_0x861b64||!_0xa3b23f)continue;if(_0x2baed3&&Math['abs'](_0x861b64[0x0]-_0xa3b23f[0x0])>=_0x183b10)continue;this['canvasContext']['moveTo'](_0x861b64[0x0],_0x861b64[0x1]),this['canvasContext']['lineTo'](_0xa3b23f[0x0],_0xa3b23f[0x1]);}this['canvasContext'][_0x48cc39(0x21b)]();}}['_tomap'](_0xd02f5c,_0x278544,_0x26eb2d){const _0x2ac058=_0x27cea4,_0x11b78b=Cesium['Cartesian3']['fromDegrees'](_0xd02f5c,_0x278544,this['fixedHeight']),_0x3e8470=this['_map']['scene'];if(_0x3e8470['mode']===Cesium['SceneMode']['SCENE3D']){const _0xe85383=new Cesium[(_0x2ac058(0x221))](_0x3e8470['globe'][_0x2ac058(0x1d9)],_0x3e8470['camera']['positionWC']),_0x104d61=_0xe85383[_0x2ac058(0x29c)](_0x11b78b);if(!_0x104d61)return _0x26eb2d['age']=0x0,null;}const _0x39b175=Cesium[_0x2ac058(0x296)]['wgs84ToWindowCoordinates'](this['_map'][_0x2ac058(0x2b8)],_0x11b78b);return _0x39b175?[_0x39b175['x'],_0x39b175['y']]:null;}[_0x27cea4(0x1e9)](){const _0x1d9344=_0x27cea4;this['windField']['clear'](),delete this[_0x1d9344(0x2bb)];}['initWorker'](){const _0x335cb7=_0x27cea4;this['worker']=new Worker(this['options']['worker']),this['worker']['onmessage']=_0x428cc4=>{const _0x2588d4=_0x5a1b;this[_0x2588d4(0x282)](_0x428cc4[_0x2588d4(0x237)]['particles']),this[_0x2588d4(0x2be)]=![];},this['windField']={'init':_0x36c4ca=>{const _0x538a50=_0x5a1b;this[_0x538a50(0x217)]['postMessage']({'type':_0x538a50(0x23a),'options':_0x36c4ca});},'setOptions':_0xb30c6d=>{const _0x414fe9=_0x5a1b;this['worker'][_0x414fe9(0x2a7)]({'type':_0x414fe9(0x290),'options':_0xb30c6d});},'setDate':_0x1449e9=>{this['worker']['postMessage']({'type':'setDate','data':_0x1449e9});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0x2d7967=_0x5a1b;this['worker'][_0x2d7967(0x2a7)]({'type':_0x2d7967(0x1e9)});}},this['windField'][_0x335cb7(0x23a)](this['options']);}}mars3d__namespace[_0x27cea4(0x21e)]['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace[_0x27cea4(0x26d)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports[_0x27cea4(0x24d)]=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
14
|
+
'use strict';const _0x2156a7=_0x4707;(function(_0x3290e3,_0x3b2a54){const _0x3f6303=_0x4707,_0x493e20=_0x3290e3();while(!![]){try{const _0x416f8e=parseInt(_0x3f6303(0x18b))/0x1*(parseInt(_0x3f6303(0x19c))/0x2)+parseInt(_0x3f6303(0x1c2))/0x3*(-parseInt(_0x3f6303(0x170))/0x4)+parseInt(_0x3f6303(0x1de))/0x5*(-parseInt(_0x3f6303(0x1d1))/0x6)+-parseInt(_0x3f6303(0x180))/0x7+-parseInt(_0x3f6303(0x1b9))/0x8+-parseInt(_0x3f6303(0x130))/0x9+parseInt(_0x3f6303(0x19a))/0xa;if(_0x416f8e===_0x3b2a54)break;else _0x493e20['push'](_0x493e20['shift']());}catch(_0x243912){_0x493e20['push'](_0x493e20['shift']());}}}(_0x2908,0x6478f));function _interopNamespace(_0x2a3867){const _0x2de94f=_0x4707;if(_0x2a3867&&_0x2a3867['__esModule'])return _0x2a3867;var _0x4d408a=Object['create'](null);return _0x2a3867&&Object[_0x2de94f(0x11d)](_0x2a3867)['forEach'](function(_0x5e0bd6){const _0x373384=_0x2de94f;if(_0x5e0bd6!=='default'){var _0x3bbc8f=Object['getOwnPropertyDescriptor'](_0x2a3867,_0x5e0bd6);Object[_0x373384(0x18a)](_0x4d408a,_0x5e0bd6,_0x3bbc8f['get']?_0x3bbc8f:{'enumerable':!![],'get':function(){return _0x2a3867[_0x5e0bd6];}});}}),_0x4d408a['default']=_0x2a3867,_0x4d408a;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x210761,_0x44f78e){const _0x2667ab=_0x4707,_0x47b29a=_0x210761*Math['cos'](Cesium$7[_0x2667ab(0x1df)]['toRadians'](_0x44f78e));return _0x47b29a;}function getV(_0x101c8b,_0x17ced9){const _0x48fe79=_0x4707,_0x4f6fba=_0x101c8b*Math['sin'](Cesium$7['Math'][_0x48fe79(0x1a3)](_0x17ced9));return _0x4f6fba;}function getSpeed(_0x1d8f67,_0x3038f9){const _0x4e4347=Math['sqrt'](Math['pow'](_0x1d8f67,0x2)+Math['pow'](_0x3038f9,0x2));return _0x4e4347;}function getDirection(_0x39e751,_0x1853e9){const _0x2c3e53=_0x4707;let _0x281eef=Cesium$7[_0x2c3e53(0x1df)]['toDegrees'](Math[_0x2c3e53(0x162)](_0x1853e9,_0x39e751));return _0x281eef+=_0x281eef<0x0?0x168:0x0,_0x281eef;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x42b15a){const _0x5c30ca=_0x4707;this['commandType']=_0x42b15a['commandType'],this[_0x5c30ca(0x1d4)]=_0x42b15a['geometry'],this[_0x5c30ca(0x1c4)]=_0x42b15a['attributeLocations'],this[_0x5c30ca(0x1f0)]=_0x42b15a['primitiveType'],this['uniformMap']=_0x42b15a[_0x5c30ca(0x1e0)],this[_0x5c30ca(0x1bd)]=_0x42b15a['vertexShaderSource'],this['fragmentShaderSource']=_0x42b15a[_0x5c30ca(0x206)],this['rawRenderState']=_0x42b15a['rawRenderState'],this['framebuffer']=_0x42b15a['framebuffer'],this[_0x5c30ca(0x143)]=_0x42b15a['outputTexture'],this['autoClear']=_0x42b15a[_0x5c30ca(0x13b)]??![],this['preExecute']=_0x42b15a[_0x5c30ca(0x15b)],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this[_0x5c30ca(0x173)]=new Cesium$6['ClearCommand']({'color':new Cesium$6[(_0x5c30ca(0x1fa))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x5c30ca(0x17e)][_0x5c30ca(0x174)]}));}['createCommand'](_0x29123c){const _0x20b543=_0x4707;switch(this[_0x20b543(0x1c7)]){case _0x20b543(0x126):{const _0x55b004=Cesium$6[_0x20b543(0x1f4)][_0x20b543(0x1e7)]({'context':_0x29123c,'geometry':this['geometry'],'attributeLocations':this[_0x20b543(0x1c4)],'bufferUsage':Cesium$6['BufferUsage'][_0x20b543(0x1ac)]}),_0x221f97=Cesium$6['ShaderProgram']['fromCache']({'context':_0x29123c,'attributeLocations':this[_0x20b543(0x1c4)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x30c1c4=Cesium$6[_0x20b543(0x184)]['fromCache'](this[_0x20b543(0x1d5)]);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x221f97,'vertexArray':_0x55b004,'modelMatrix':Cesium$6[_0x20b543(0x133)][_0x20b543(0x137)],'renderState':_0x30c1c4,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0x20b543(0x207)],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x20b543(0x14a):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x595959,_0x41d793){const _0x51f2d6=_0x4707;this[_0x51f2d6(0x1d4)]=_0x41d793;const _0x1e5bc4=Cesium$6['VertexArray'][_0x51f2d6(0x1e7)]({'context':_0x595959,'geometry':this['geometry'],'attributeLocations':this[_0x51f2d6(0x1c4)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x1e5bc4;}['update'](_0x1ac89e){const _0x3208b0=_0x4707;if(!this['show'])return;if(_0x1ac89e[_0x3208b0(0x14d)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this[_0x3208b0(0x177)])&&(this[_0x3208b0(0x177)]=this['createCommand'](_0x1ac89e['context'])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x1ac89e['commandList'][_0x3208b0(0x1be)](this[_0x3208b0(0x173)]),_0x1ac89e['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x2d8a74=_0x4707;if(this['clearCommand']){var _0x2eff53,_0xb6ebe;(_0x2eff53=this['clearCommand'])!==null&&_0x2eff53!==void 0x0&&_0x2eff53[_0x2d8a74(0x15d)]&&this['clearCommand'][_0x2d8a74(0x15d)]['destroy'](),(_0xb6ebe=this['clearCommand'])!==null&&_0xb6ebe!==void 0x0&&_0xb6ebe['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this[_0x2d8a74(0x177)]&&(this[_0x2d8a74(0x177)][_0x2d8a74(0x15d)]&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0x2d8a74(0x16b)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x371732=function(){const _0x55b443=_0x4707,_0x1b099f=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x55b443(0x188))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5[(_0x55b443(0x125))]({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x1b099f;},_0x2f8465=function(_0x1fb82e,_0x2bbc1c){const _0x323d9d=_0x4707;if(Cesium$5['defined'](_0x2bbc1c)){const _0x1cc056={};_0x1cc056['arrayBufferView']=_0x2bbc1c,_0x1fb82e[_0x323d9d(0x17f)]=_0x1cc056;}const _0x1e273f=new Cesium$5[(_0x323d9d(0x1c9))](_0x1fb82e);return _0x1e273f;},_0x18aa85=function(_0x60c914,_0x4ebf89,_0x2527a8){const _0x2dd5a7=_0x4707,_0x43afe6=new Cesium$5[(_0x2dd5a7(0x146))]({'context':_0x60c914,'colorTextures':[_0x4ebf89],'depthTexture':_0x2527a8});return _0x43afe6;},_0x2e49e8=function(_0x59c739){const _0x404c2f=_0x4707,_0x3d9c8f=!![],_0x1fe5bc=![],_0x1e160c={'viewport':_0x59c739[_0x404c2f(0x179)],'depthTest':_0x59c739[_0x404c2f(0x19f)],'depthMask':_0x59c739[_0x404c2f(0x19e)],'blending':_0x59c739['blending']},_0x2569e2=Cesium$5['Appearance'][_0x404c2f(0x1ba)](_0x3d9c8f,_0x1fe5bc,_0x1e160c);return _0x2569e2;},_0xd327e9=function(_0x3c83e7){const _0x410041=_0x4707,_0x3d7818={},_0x5e58ce=Cesium$5['Math']['mod'](_0x3c83e7['west'],Cesium$5['Math']['TWO_PI']),_0x41f973=Cesium$5['Math'][_0x410041(0x11f)](_0x3c83e7['east'],Cesium$5['Math']['TWO_PI']),_0x4b2422=_0x3c83e7[_0x410041(0x156)];let _0x5a2d20,_0x13e177;_0x4b2422>Cesium$5[_0x410041(0x1df)][_0x410041(0x1b1)]?(_0x5a2d20=0x0,_0x13e177=Cesium$5['Math'][_0x410041(0x1b2)]):_0x41f973-_0x5e58ce<_0x4b2422?(_0x5a2d20=_0x5e58ce,_0x13e177=_0x5e58ce+_0x4b2422):(_0x5a2d20=_0x5e58ce,_0x13e177=_0x41f973);_0x3d7818['lon']={'min':Cesium$5[_0x410041(0x1df)][_0x410041(0x129)](_0x5a2d20),'max':Cesium$5['Math']['toDegrees'](_0x13e177)};const _0x33a1ec=_0x3c83e7['south'],_0xcdbb42=_0x3c83e7['north'],_0x5c488b=_0x3c83e7[_0x410041(0x200)],_0x120b9d=_0x5c488b>Cesium$5[_0x410041(0x1df)]['PI']/0xc?_0x5c488b/0x2:0x0;let _0xc704c9=Cesium$5[_0x410041(0x1df)][_0x410041(0x202)](_0x33a1ec-_0x120b9d),_0x56a358=Cesium$5[_0x410041(0x1df)]['clampToLatitudeRange'](_0xcdbb42+_0x120b9d);return _0xc704c9<-Cesium$5['Math']['PI_OVER_THREE']&&(_0xc704c9=-Cesium$5['Math']['PI_OVER_TWO']),_0x56a358>Cesium$5['Math']['PI_OVER_THREE']&&(_0x56a358=Cesium$5['Math']['PI_OVER_TWO']),_0x3d7818['lat']={'min':Cesium$5[_0x410041(0x1df)]['toDegrees'](_0xc704c9),'max':Cesium$5['Math'][_0x410041(0x129)](_0x56a358)},_0x3d7818;};return{'getFullscreenQuad':_0x371732,'createTexture':_0x2f8465,'createFramebuffer':_0x18aa85,'createRawRenderState':_0x2e49e8,'viewRectangleToLonLatRange':_0xd327e9};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag=_0x2156a7(0x1c8);const Cesium$4=mars3d__namespace[_0x2156a7(0x1ea)];class ParticlesRendering{constructor(_0x56690f,_0x35a4b1,_0xc37b01,_0x47a7ec,_0x2e625e){this['createRenderingTextures'](_0x56690f,_0x35a4b1,_0xc37b01['colors']),this['createRenderingFramebuffers'](_0x56690f),this['createRenderingPrimitives'](_0x56690f,_0xc37b01,_0x47a7ec,_0x2e625e);}['createRenderingTextures'](_0x414362,_0x548fb2,_0x28e003){const _0x3b58b8=_0x2156a7,_0x2d449d={'context':_0x414362,'width':_0x414362['drawingBufferWidth'],'height':_0x414362['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x3b58b8(0x1ff)]},_0x496514={'context':_0x414362,'width':_0x414362['drawingBufferWidth'],'height':_0x414362['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x40555f=_0x28e003[_0x3b58b8(0x152)],_0x189460=new Float32Array(_0x40555f*0x3);for(let _0x43962b=0x0;_0x43962b<_0x40555f;_0x43962b++){const _0x2e5851=Cesium$4['Color']['fromCssColorString'](_0x28e003[_0x43962b]);_0x189460[0x3*_0x43962b]=_0x2e5851['red'],_0x189460[0x3*_0x43962b+0x1]=_0x2e5851['green'],_0x189460[0x3*_0x43962b+0x2]=_0x2e5851[_0x3b58b8(0x199)];}const _0x163383={'context':_0x414362,'width':_0x40555f,'height':0x1,'pixelFormat':Cesium$4['PixelFormat'][_0x3b58b8(0x168)],'pixelDatatype':Cesium$4[_0x3b58b8(0x131)][_0x3b58b8(0x1e1)],'sampler':new Cesium$4[(_0x3b58b8(0x13d))]({'minificationFilter':Cesium$4[_0x3b58b8(0x172)]['LINEAR'],'magnificationFilter':Cesium$4[_0x3b58b8(0x1b5)][_0x3b58b8(0x15a)]})};this['textures']={'segmentsColor':Util[_0x3b58b8(0x1f2)](_0x2d449d),'segmentsDepth':Util['createTexture'](_0x496514),'currentTrailsColor':Util['createTexture'](_0x2d449d),'currentTrailsDepth':Util['createTexture'](_0x496514),'nextTrailsColor':Util['createTexture'](_0x2d449d),'nextTrailsDepth':Util['createTexture'](_0x496514),'colorTable':Util[_0x3b58b8(0x1f2)](_0x163383,_0x189460)};}['createRenderingFramebuffers'](_0x4e9358){const _0x481a84=_0x2156a7;this['framebuffers']={'segments':Util['createFramebuffer'](_0x4e9358,this['textures']['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x4e9358,this['textures']['currentTrailsColor'],this['textures']['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x4e9358,this[_0x481a84(0x175)]['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}[_0x2156a7(0x1fc)](_0xd6d173){const _0x3d4ae7=_0x2156a7,_0x48608e=0x4;let _0x435852=[];for(let _0x2852a3=0x0;_0x2852a3<_0xd6d173[_0x3d4ae7(0x1e9)];_0x2852a3++){for(let _0x36e342=0x0;_0x36e342<_0xd6d173['particlesTextureSize'];_0x36e342++){for(let _0x158c89=0x0;_0x158c89<_0x48608e;_0x158c89++){_0x435852['push'](_0x2852a3/_0xd6d173[_0x3d4ae7(0x1e9)]),_0x435852['push'](_0x36e342/_0xd6d173[_0x3d4ae7(0x1e9)]);}}}_0x435852=new Float32Array(_0x435852);let _0x11600c=[];const _0x12cdd7=[-0x1,0x1],_0xa4d26f=[-0x1,0x1];for(let _0x27212e=0x0;_0x27212e<_0xd6d173['maxParticles'];_0x27212e++){for(let _0x4c4809=0x0;_0x4c4809<_0x48608e/0x2;_0x4c4809++){for(let _0x394962=0x0;_0x394962<_0x48608e/0x2;_0x394962++){_0x11600c[_0x3d4ae7(0x1be)](_0x12cdd7[_0x4c4809]),_0x11600c['push'](_0xa4d26f[_0x394962]),_0x11600c[_0x3d4ae7(0x1be)](0x0);}}}_0x11600c=new Float32Array(_0x11600c);const _0x368001=0x6*_0xd6d173[_0x3d4ae7(0x1eb)],_0x58e32e=new Uint32Array(_0x368001);for(let _0x42aae8=0x0,_0x27c0fc=0x0,_0x367c80=0x0;_0x42aae8<_0xd6d173['maxParticles'];_0x42aae8++){_0x58e32e[_0x27c0fc++]=_0x367c80+0x0,_0x58e32e[_0x27c0fc++]=_0x367c80+0x1,_0x58e32e[_0x27c0fc++]=_0x367c80+0x2,_0x58e32e[_0x27c0fc++]=_0x367c80+0x2,_0x58e32e[_0x27c0fc++]=_0x367c80+0x1,_0x58e32e[_0x27c0fc++]=_0x367c80+0x3,_0x367c80+=0x4;}const _0x1108e5=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x3d4ae7(0x11e)]['FLOAT'],'componentsPerAttribute':0x2,'values':_0x435852}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x11600c})}),'indices':_0x58e32e});return _0x1108e5;}[_0x2156a7(0x1cb)](_0x34184c,_0x2b52da,_0x34ee91,_0xc29853){const _0x90af35=_0x2156a7,_0xc257ec=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x2b52da),'primitiveType':Cesium$4[_0x90af35(0x1bb)][_0x90af35(0x185)],'uniformMap':{'currentParticlesPosition':function(){return _0xc29853['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x37c387=_0x90af35;return _0xc29853[_0x37c387(0x18e)]['postProcessingPosition'];},'postProcessingSpeed':function(){return _0xc29853['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x457eb4=_0x90af35;return _0xc257ec[_0x457eb4(0x175)]['colorTable'];},'aspect':function(){const _0x5d8a82=_0x90af35;return _0x34184c[_0x5d8a82(0x1ae)]/_0x34184c['drawingBufferHeight'];},'pixelSize':function(){return _0x34ee91['pixelSize'];},'lineWidth':function(){return _0x2b52da['lineWidth'];},'particleHeight':function(){const _0x20ae3e=_0x90af35;return _0x2b52da[_0x20ae3e(0x1e8)];}},'vertexShaderSource':new Cesium$4[(_0x90af35(0x165))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x90af35(0x1b6)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0xc257ec['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x301063=_0x90af35;return _0xc257ec['textures'][_0x301063(0x114)];},'currentTrailsColor':function(){const _0x4f152c=_0x90af35;return _0xc257ec['framebuffers']['currentTrails'][_0x4f152c(0x19b)](0x0);},'trailsDepthTexture':function(){const _0x2d4553=_0x90af35;return _0xc257ec[_0x2d4553(0x169)][_0x2d4553(0x198)]['depthTexture'];},'fadeOpacity':function(){return _0x2b52da['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x90af35(0x165))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x15bed4=_0x90af35,_0x7767fc=_0xc257ec['framebuffers'][_0x15bed4(0x198)];_0xc257ec[_0x15bed4(0x169)]['currentTrails']=_0xc257ec['framebuffers']['nextTrails'],_0xc257ec[_0x15bed4(0x169)]['nextTrails']=_0x7767fc,_0xc257ec['primitives']['trails'][_0x15bed4(0x177)]['framebuffer']=_0xc257ec['framebuffers']['nextTrails'],_0xc257ec[_0x15bed4(0x19d)]['trails'][_0x15bed4(0x173)][_0x15bed4(0x207)]=_0xc257ec[_0x15bed4(0x169)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x1a6419=_0x90af35;return _0xc257ec['framebuffers']['nextTrails'][_0x1a6419(0x19b)](0x0);},'trailsDepthTexture':function(){const _0x194511=_0x90af35;return _0xc257ec[_0x194511(0x169)]['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x90af35(0x165))]({'defines':[_0x90af35(0x18f)],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x90af35(0x1f6)]({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag=_0x2156a7(0x17a),postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';function _0x2908(){const _0x56966e=['_speedRate','lat','getWind','GeometryAttribute','Draw','grid','__esModule','toDegrees','floor','_canrefresh','_pointerEvents','setDate','mouse_down','wheel','2327112RPZVve','PixelDatatype','auto','Matrix4','SceneMode','worker','setOptions','IDENTITY','lng','clear','forEach','autoClear','CanvasWindField','Sampler','postProcessingSpeed','_setOptionsHook','scene','ellipsoid','colors','outputTexture','abs','cols','Framebuffer','remove','windData','lon','Compute','fromDegrees','age','mode','mouseMove','_updateIng2','_onMap_preRenderEvent','ymax','length','mouseHidden','_map','context','width','getColor','sqrt','particles','LINEAR','preExecute','min','vertexArray','getExtent','xmin','rows','clientWidth','atan2','animateFrame','getUVByPoint','ShaderSource','segments','CanvasWindLayer','RGB','framebuffers','data','destroy','fixedHeight','SCENE3D','postProcessingPosition','pointerEvents','956JqYZYZ','steps','TextureMinificationFilter','clearCommand','OPAQUE','textures','colorTable','commandToExecute','stroke','viewport','uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a','canvasWidth','lineWidth','getPixelSize','Pass','source','4958422FtJQYg','currentParticlesSpeed','lev','visibility','RenderState','TRIANGLES','top','position','GeometryAttributes','_onMouseUpEvent','defineProperty','403VTpsEy','createWindTextures','update','particlesTextures','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','vmax','add','drawingBufferHeight','vdata','_removedHook','removeEventListener','windField','options','currentTrails','blue','32637290hafVhA','getColorTexture','432oxcMQF','primitives','depthMask','depthTest','canvasContext','hidden','viewerParameters','toRadians','EventType','max','dropRateBump','speedRate','show','canvasResize','speed','all','STATIC_DRAW','particlesRendering','drawingBufferWidth','ymin','currentParticlesPosition','THREE_PI_OVER_TWO','TWO_PI','postMessage','dimensions','TextureMagnificationFilter','getFullscreenQuad','setData','container','5046536wJZILL','getDefaultRenderState','PrimitiveType','visible','vertexShaderSource','push','NEAREST','udata','lonRange','7269uaXFoF','createParticlesTextures','attributeLocations','absolute','tlat','commandType','uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a','Texture','WindLayer','createRenderingPrimitives','off','particlesNumber','initWorker','frameTime','positionWC','49188FyHIth','canvasHeight','strokeStyle','geometry','rawRenderState','Cartesian2','BaseLayer','rgb(206,255,255)','PixelFormat','Cartesian3','particlesWind','resize','mouseDown','465aAizdM','Math','uniformMap','FLOAT','mouseUp','getOptions','particlesComputing','refreshParticles','onmessage','fromGeometry','particleHeight','particlesTextureSize','Cesium','maxParticles','isPointVisible','globeBoundingSphere','_drawLines','_addedHook','primitiveType','canvas','createTexture','maxAge','VertexArray','particleSystem','createRawRenderState','xmax','addEventListener','_data','Color','_onMapWhellEvent','createSegmentsGeometry','getUVByXY','fadeOpacity','UNSIGNED_BYTE','height','init','clampToLatitudeRange','array','canrefresh','windTextures','fragmentShaderSource','framebuffer','clientHeight','style','_onMouseMoveEvent','camera','_bilinearInterpolation','segmentsDepth','reverseY','_tomap','updatePosition','beginPath','umin','redraw','_onMouseDownEvent','applyViewerParameters','keys','ComponentDatatype','mod','_mountedHook','mouse_move'];_0x2908=function(){return _0x56966e;};return _0x2908();}const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x4fbda8,_0x39c6d0,_0x2a7aee,_0x1866ac){const _0x52e0e7=_0x2156a7;this['data']=_0x39c6d0,this[_0x52e0e7(0x18c)](_0x4fbda8,_0x39c6d0),this['createParticlesTextures'](_0x4fbda8,_0x2a7aee,_0x1866ac),this['createComputingPrimitives'](_0x39c6d0,_0x2a7aee,_0x1866ac);}['createWindTextures'](_0x135c2d,_0x16ec37){const _0x5a6338=_0x2156a7,_0x6f206f={'context':_0x135c2d,'width':_0x16ec37[_0x5a6338(0x1b4)][_0x5a6338(0x149)],'height':_0x16ec37['dimensions']['lat']*(_0x16ec37[_0x5a6338(0x1b4)]['lev']||0x1),'pixelFormat':Cesium$3[_0x5a6338(0x1d9)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x5a6338(0x13d))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x5a6338(0x1bf)]})};this['windTextures']={'U':Util['createTexture'](_0x6f206f,_0x16ec37['U'][_0x5a6338(0x203)]),'V':Util['createTexture'](_0x6f206f,_0x16ec37['V'][_0x5a6338(0x203)])};}['createParticlesTextures'](_0x22905e,_0x353546,_0x16167d){const _0xa6d1c1=_0x2156a7,_0x7ebc18={'context':_0x22905e,'width':_0x353546[_0xa6d1c1(0x1e9)],'height':_0x353546['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0xa6d1c1(0x13d))]({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0xa6d1c1(0x1bf)],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0xa6d1c1(0x1bf)]})},_0x1f6b5e=this['randomizeParticles'](_0x353546[_0xa6d1c1(0x1eb)],_0x16167d),_0x3ebc8b=new Float32Array(0x4*_0x353546['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x7ebc18),'currentParticlesPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'nextParticlesPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'currentParticlesSpeed':Util[_0xa6d1c1(0x1f2)](_0x7ebc18,_0x3ebc8b),'nextParticlesSpeed':Util['createTexture'](_0x7ebc18,_0x3ebc8b),'postProcessingPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'postProcessingSpeed':Util['createTexture'](_0x7ebc18,_0x3ebc8b)};}['randomizeParticles'](_0x115665,_0x255cb9){const _0x23d148=_0x2156a7,_0xb713db=new Float32Array(0x4*_0x115665);for(let _0x262df8=0x0;_0x262df8<_0x115665;_0x262df8++){_0xb713db[0x4*_0x262df8]=Cesium$3['Math']['randomBetween'](_0x255cb9['lonRange']['x'],_0x255cb9['lonRange']['y']),_0xb713db[0x4*_0x262df8+0x1]=Cesium$3[_0x23d148(0x1df)]['randomBetween'](_0x255cb9['latRange']['x'],_0x255cb9['latRange']['y']),_0xb713db[0x4*_0x262df8+0x2]=Cesium$3['Math']['randomBetween'](this['data']['lev']['min'],this['data']['lev']['max']),_0xb713db[0x4*_0x262df8+0x3]=0x0;}return _0xb713db;}['destroyParticlesTextures'](){const _0x22c37e=_0x2156a7;Object['keys'](this['particlesTextures'])[_0x22c37e(0x13a)](_0x5d3e66=>{this['particlesTextures'][_0x5d3e66]['destroy']();});}['createComputingPrimitives'](_0x421fae,_0x3919dd,_0x50c952){const _0x26de1a=_0x2156a7,_0x3735f3=new Cesium$3['Cartesian3'](_0x421fae['dimensions']['lon'],_0x421fae['dimensions']['lat'],_0x421fae['dimensions'][_0x26de1a(0x182)]),_0x82e48b=new Cesium$3['Cartesian3'](_0x421fae['lon']['min'],_0x421fae['lat']['min'],_0x421fae[_0x26de1a(0x182)]['min']),_0x49083e=new Cesium$3['Cartesian3'](_0x421fae['lon']['max'],_0x421fae['lat']['max'],_0x421fae['lev'][_0x26de1a(0x1a5)]),_0x40f28a=new Cesium$3['Cartesian3']((_0x49083e['x']-_0x82e48b['x'])/(_0x3735f3['x']-0x1),(_0x49083e['y']-_0x82e48b['y'])/(_0x3735f3['y']-0x1),_0x3735f3['z']>0x1?(_0x49083e['z']-_0x82e48b['z'])/(_0x3735f3['z']-0x1):0x1),_0x5bbca3=new Cesium$3[(_0x26de1a(0x1d6))](_0x421fae['U'][_0x26de1a(0x15c)],_0x421fae['U'][_0x26de1a(0x1a5)]),_0x511681=new Cesium$3['Cartesian2'](_0x421fae['V']['min'],_0x421fae['V'][_0x26de1a(0x1a5)]),_0x3be6b0=this;this[_0x26de1a(0x19d)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x3be6b0['windTextures']['U'];},'V':function(){return _0x3be6b0['windTextures']['V'];},'currentParticlesPosition':function(){const _0x2b444c=_0x26de1a;return _0x3be6b0[_0x2b444c(0x18e)]['currentParticlesPosition'];},'dimension':function(){return _0x3735f3;},'minimum':function(){return _0x82e48b;},'maximum':function(){return _0x49083e;},'interval':function(){return _0x40f28a;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x26de1a(0x1db)],'preExecute':function(){const _0x35694f=_0x26de1a;_0x3be6b0['primitives']['getWind'][_0x35694f(0x177)]['outputTexture']=_0x3be6b0['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x26557a=_0x26de1a;return _0x3be6b0['particlesTextures'][_0x26557a(0x181)];},'particlesWind':function(){const _0x32f760=_0x26de1a;return _0x3be6b0[_0x32f760(0x18e)][_0x32f760(0x1db)];},'uSpeedRange':function(){return _0x5bbca3;},'vSpeedRange':function(){return _0x511681;},'pixelSize':function(){return _0x50c952['pixelSize'];},'speedFactor':function(){return _0x3919dd['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x3d9025=_0x26de1a,_0x2e20f1=_0x3be6b0['particlesTextures']['currentParticlesSpeed'];_0x3be6b0['particlesTextures']['currentParticlesSpeed']=_0x3be6b0['particlesTextures']['postProcessingSpeed'],_0x3be6b0[_0x3d9025(0x18e)]['postProcessingSpeed']=_0x2e20f1,_0x3be6b0['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x3be6b0['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x3be6b0['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x454adb=_0x26de1a;return _0x3be6b0['particlesTextures'][_0x454adb(0x181)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x448734=_0x26de1a,_0x330b4b=_0x3be6b0[_0x448734(0x18e)][_0x448734(0x1b0)];_0x3be6b0[_0x448734(0x18e)]['currentParticlesPosition']=_0x3be6b0['particlesTextures']['postProcessingPosition'],_0x3be6b0['particlesTextures']['postProcessingPosition']=_0x330b4b,_0x3be6b0['primitives'][_0x448734(0x117)][_0x448734(0x177)][_0x448734(0x143)]=_0x3be6b0['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x3be6b0['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x3be6b0['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x5a23c8=_0x26de1a;return _0x50c952[_0x5a23c8(0x1c1)];},'latRange':function(){return _0x50c952['latRange'];},'randomCoefficient':function(){const _0x275af5=Math['random']();return _0x275af5;},'dropRate':function(){return _0x3919dd['dropRate'];},'dropRateBump':function(){const _0xae8ebb=_0x26de1a;return _0x3919dd[_0xae8ebb(0x1a6)];}},'fragmentShaderSource':new Cesium$3[(_0x26de1a(0x165))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x26de1a(0x18e)][_0x26de1a(0x16e)],'preExecute':function(){const _0x799650=_0x26de1a;_0x3be6b0['primitives'][_0x799650(0x16e)]['commandToExecute'][_0x799650(0x143)]=_0x3be6b0[_0x799650(0x18e)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x3be6b0['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x3be6b0['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x21f5f9=_0x26de1a;_0x3be6b0[_0x21f5f9(0x19d)]['postProcessingSpeed'][_0x21f5f9(0x177)]['outputTexture']=_0x3be6b0['particlesTextures'][_0x21f5f9(0x13e)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x1471ba,_0x4134f8,_0xce899d,_0x4da672){const _0x4c99d0=_0x2156a7;this['context']=_0x1471ba,_0x4134f8={..._0x4134f8},_0x4134f8[_0x4c99d0(0x1c0)]&&_0x4134f8['vdata']&&(_0x4134f8[_0x4c99d0(0x1b4)]={},_0x4134f8['dimensions']['lon']=_0x4134f8['cols'],_0x4134f8['dimensions']['lat']=_0x4134f8['rows'],_0x4134f8['dimensions']['lev']=_0x4134f8[_0x4c99d0(0x182)]||0x1,_0x4134f8[_0x4c99d0(0x149)]={},_0x4134f8[_0x4c99d0(0x149)]['min']=_0x4134f8['xmin'],_0x4134f8['lon'][_0x4c99d0(0x1a5)]=_0x4134f8[_0x4c99d0(0x1f7)],_0x4134f8['lat']={},_0x4134f8[_0x4c99d0(0x123)]['min']=_0x4134f8['ymin'],_0x4134f8['lat'][_0x4c99d0(0x1a5)]=_0x4134f8['ymax'],_0x4134f8['lev']={},_0x4134f8[_0x4c99d0(0x182)]['min']=_0x4134f8['levmin']??0x1,_0x4134f8['lev']['max']=_0x4134f8['levmax']??0x1,_0x4134f8['U']={},_0x4134f8['U']['array']=new Float32Array(_0x4134f8['udata']),_0x4134f8['U']['min']=_0x4134f8[_0x4c99d0(0x119)]??Math['min'](..._0x4134f8['udata']),_0x4134f8['U'][_0x4c99d0(0x1a5)]=_0x4134f8['umax']??Math['max'](..._0x4134f8['udata']),_0x4134f8['V']={},_0x4134f8['V']['array']=new Float32Array(_0x4134f8['vdata']),_0x4134f8['V']['min']=_0x4134f8['vmin']??Math['min'](..._0x4134f8['vdata']),_0x4134f8['V']['max']=_0x4134f8[_0x4c99d0(0x190)]??Math['max'](..._0x4134f8[_0x4c99d0(0x193)])),this['data']=_0x4134f8,this[_0x4c99d0(0x197)]=_0xce899d,this['viewerParameters']=_0x4da672,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this[_0x4c99d0(0x16a)],this[_0x4c99d0(0x197)],this['viewerParameters'],this[_0x4c99d0(0x1e4)]);}['canvasResize'](_0x394457){const _0xd8de5c=_0x2156a7;this['particlesComputing']['destroyParticlesTextures'](),Object[_0xd8de5c(0x11d)](this['particlesComputing'][_0xd8de5c(0x205)])['forEach'](_0x1a2172=>{const _0x20deb5=_0xd8de5c;this[_0x20deb5(0x1e4)]['windTextures'][_0x1a2172][_0x20deb5(0x16b)]();}),this[_0xd8de5c(0x1ad)]['textures'][_0xd8de5c(0x176)]['destroy'](),Object['keys'](this[_0xd8de5c(0x1ad)]['framebuffers'])['forEach'](_0x5f0d11=>{const _0x1ca995=_0xd8de5c;this[_0x1ca995(0x1ad)]['framebuffers'][_0x5f0d11]['destroy']();}),this['context']=_0x394457,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0xd8de5c(0x1a2)]),this[_0xd8de5c(0x1ad)]=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x43c5d6=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x290b37=>{_0x43c5d6['framebuffer']=this['particlesRendering']['framebuffers'][_0x290b37],_0x43c5d6['execute'](this['context']);});}[_0x2156a7(0x1e5)](_0x365dff){const _0x2b0b84=_0x2156a7;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this[_0x2b0b84(0x1e4)][_0x2b0b84(0x1c3)](this[_0x2b0b84(0x155)],this['options'],this['viewerParameters']);if(_0x365dff){var _0x26a33b,_0x52ade3;const _0x603e6c=this['particlesRendering']['createSegmentsGeometry'](this['options']);this[_0x2b0b84(0x1ad)]['primitives']['segments']['geometry']=_0x603e6c;const _0x483df5=Cesium$2[_0x2b0b84(0x1f4)][_0x2b0b84(0x1e7)]({'context':this['context'],'geometry':_0x603e6c,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});(_0x26a33b=this['particlesRendering'][_0x2b0b84(0x19d)])!==null&&_0x26a33b!==void 0x0&&(_0x52ade3=_0x26a33b['segments'])!==null&&_0x52ade3!==void 0x0&&_0x52ade3['commandToExecute']&&(this['particlesRendering']['primitives'][_0x2b0b84(0x166)][_0x2b0b84(0x177)]['vertexArray']=_0x483df5);}}['setOptions'](_0x1bb046){const _0x78b6ed=_0x2156a7;let _0x28175c=![];this['options']['maxParticles']!==_0x1bb046[_0x78b6ed(0x1eb)]&&(_0x28175c=!![]),Object[_0x78b6ed(0x11d)](_0x1bb046)['forEach'](_0x588f3c=>{this['options'][_0x588f3c]=_0x1bb046[_0x588f3c];}),this['refreshParticles'](_0x28175c);}['applyViewerParameters'](_0x39f194){const _0x5e0298=_0x2156a7;Object['keys'](_0x39f194)['forEach'](_0x26d901=>{const _0x394db5=_0x4707;this[_0x394db5(0x1a2)][_0x26d901]=_0x39f194[_0x26d901];}),this[_0x5e0298(0x1e5)](![]);}['destroy'](){const _0x3dba78=_0x2156a7;clearTimeout(this[_0x3dba78(0x204)]),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x3dba78(0x1e4)]['windTextures'])['forEach'](_0x2f0565=>{const _0x38a432=_0x3dba78;this[_0x38a432(0x1e4)]['windTextures'][_0x2f0565]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this[_0x3dba78(0x1ad)]['framebuffers'])['forEach'](_0x4edc46=>{this['particlesRendering']['framebuffers'][_0x4edc46]['destroy']();});for(const _0x313025 in this){delete this[_0x313025];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x2156a7(0x1d8)]};class WindLayer extends BaseLayer$1{constructor(_0x4b5d13={}){_0x4b5d13={...DEF_OPTIONS,..._0x4b5d13},super(_0x4b5d13),this['_setOptionsHook'](_0x4b5d13);}get['layer'](){return this['primitives'];}get['data'](){const _0x1893d1=_0x2156a7;return this[_0x1893d1(0x1f9)];}set['data'](_0x2819df){const _0x5c1f69=_0x2156a7;this[_0x5c1f69(0x1b7)](_0x2819df);}get[_0x2156a7(0x142)](){const _0x2243f2=_0x2156a7;return this[_0x2243f2(0x197)]['colors'];}set['colors'](_0x17a8e4){const _0x495346=_0x2156a7;this[_0x495346(0x197)]['colors']=_0x17a8e4,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x17a8e4}),this['resize']();}[_0x2156a7(0x120)](){}[_0x2156a7(0x1ef)](){const _0x48ba94=_0x2156a7;this[_0x48ba94(0x140)]=this['_map']['scene'],this[_0x48ba94(0x20b)]=this['_map'][_0x48ba94(0x20b)],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives'][_0x48ba94(0x191)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1[(_0x48ba94(0x1d6))](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x48ba94(0x1ed)]=new Cesium$1['BoundingSphere'](Cesium$1[_0x48ba94(0x1da)]['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window[_0x48ba94(0x1f8)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x48ba94(0x154)]['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x48ba94(0x11b)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x48ba94(0x14e)],this[_0x48ba94(0x20a)],this),this['_data']&&this[_0x48ba94(0x1b7)](this['_data']);}[_0x2156a7(0x194)](){const _0x31e695=_0x2156a7;window[_0x31e695(0x195)]('resize',this['resize']),this['_map']['off'](mars3d__namespace['EventType']['preRender'],this[_0x31e695(0x150)],this),this[_0x31e695(0x154)]['off'](mars3d__namespace['EventType'][_0x31e695(0x12f)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this[_0x31e695(0x189)],this),this[_0x31e695(0x154)]['off'](mars3d__namespace['EventType'][_0x31e695(0x14e)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this['_map']['scene']['primitives'][_0x31e695(0x147)](this['primitives']);}['resize'](){const _0x6e1712=_0x2156a7;if(!this[_0x6e1712(0x1a8)]||!this[_0x6e1712(0x1f5)])return;this[_0x6e1712(0x19d)][_0x6e1712(0x1a8)]=![],this[_0x6e1712(0x19d)]['removeAll'](),this[_0x6e1712(0x154)]['once'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}[_0x2156a7(0x150)](_0x124d6c){const _0x6e3749=_0x2156a7;this['particleSystem'][_0x6e3749(0x1a9)](this['scene'][_0x6e3749(0x155)]),this['addPrimitives'](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x35d5a9){const _0xcca857=_0x2156a7;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0xcca857(0x1f5)])return;this[_0xcca857(0x19d)]['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x7f33){const _0x20e988=_0x2156a7;this[_0x20e988(0x12e)]=!![];}['_onMouseMoveEvent'](_0x3f64d1){const _0x927fce=_0x2156a7;if(!this['show']||!this['particleSystem'])return;this[_0x927fce(0x12e)]&&(this['primitives'][_0x927fce(0x1a8)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5bf4bd){const _0xeb1e87=_0x2156a7;if(!this['show']||!this[_0xeb1e87(0x1f5)])return;this[_0xeb1e87(0x12e)]&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this[_0xeb1e87(0x121)]=![];}['redraw'](){const _0x1cb3a0=_0x2156a7;if(!this[_0x1cb3a0(0x154)]||!this['show'])return;this['updateViewerParameters'](),this['particleSystem'][_0x1cb3a0(0x11c)](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x26849b){const _0x15047d=_0x2156a7;this['_data']=_0x26849b,this['particleSystem']&&this['particleSystem']['destroy'](),this[_0x15047d(0x1f5)]=new ParticleSystem(this['scene']['context'],_0x26849b,this[_0x15047d(0x1e3)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x2c11a6,_0x2f399c){const _0x4b34ea=_0x2156a7;if(_0x2c11a6)for(const _0x1b7b60 in _0x2c11a6){this[_0x1b7b60]=_0x2c11a6[_0x1b7b60];}this[_0x4b34ea(0x1f5)]&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x596fb3=_0x2156a7,_0x118ba5=Math['ceil'](Math['sqrt'](this[_0x596fb3(0x1cd)]));return this['particlesNumber']=_0x118ba5*_0x118ba5,{'particlesTextureSize':_0x118ba5,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x596fb3(0x16c)],'fadeOpacity':this[_0x596fb3(0x1fe)],'dropRate':this['dropRate'],'dropRateBump':this[_0x596fb3(0x1a6)],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x2ec673=_0x2156a7;this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x2ec673(0x19d)][_0x2ec673(0x124)]),this['primitives']['add'](this[_0x2ec673(0x1f5)]['particlesComputing']['primitives']['updateSpeed']),this[_0x2ec673(0x19d)]['add'](this[_0x2ec673(0x1f5)]['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem'][_0x2ec673(0x1e4)]['primitives']['postProcessingPosition']),this['primitives'][_0x2ec673(0x191)](this['particleSystem']['particlesComputing'][_0x2ec673(0x19d)]['postProcessingSpeed']),this[_0x2ec673(0x19d)]['add'](this[_0x2ec673(0x1f5)]['particlesRendering'][_0x2ec673(0x19d)]['segments']),this[_0x2ec673(0x19d)]['add'](this['particleSystem']['particlesRendering'][_0x2ec673(0x19d)]['trails']),this['primitives'][_0x2ec673(0x191)](this[_0x2ec673(0x1f5)]['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0xd5abb9=_0x2156a7;let _0x5ea35d=this['camera']['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x5ea35d){const _0x474e0d=this[_0xd5abb9(0x154)][_0xd5abb9(0x15e)]();_0x5ea35d=Cesium$1['Rectangle']['fromDegrees'](_0x474e0d['xmin'],_0x474e0d[_0xd5abb9(0x1af)],_0x474e0d['xmax'],_0x474e0d[_0xd5abb9(0x151)]);}const _0x191392=Util['viewRectangleToLonLatRange'](_0x5ea35d);this['viewerParameters']['lonRange']['x']=_0x191392[_0xd5abb9(0x149)][_0xd5abb9(0x15c)],this['viewerParameters']['lonRange']['y']=_0x191392[_0xd5abb9(0x149)]['max'],this[_0xd5abb9(0x1a2)]['latRange']['x']=_0x191392[_0xd5abb9(0x123)]['min'],this[_0xd5abb9(0x1a2)]['latRange']['y']=_0x191392['lat']['max'];const _0x345da8=this['camera'][_0xd5abb9(0x17d)](this[_0xd5abb9(0x1ed)],this['scene']['drawingBufferWidth'],this[_0xd5abb9(0x140)][_0xd5abb9(0x192)]);_0x345da8>0x0&&(this['viewerParameters']['pixelSize']=_0x345da8);}}function _0x4707(_0x388f15,_0x2e20b8){const _0x2908eb=_0x2908();return _0x4707=function(_0x4707ef,_0x2851c2){_0x4707ef=_0x4707ef-0x114;let _0x3ffc22=_0x2908eb[_0x4707ef];return _0x3ffc22;},_0x4707(_0x388f15,_0x2e20b8);}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer'][_0x2156a7(0x1ca)]=WindLayer;class CanvasParticle{constructor(){const _0x330629=_0x2156a7;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x330629(0x1c6)]=null,this[_0x330629(0x14c)]=null,this['speed']=null;}['destroy'](){for(const _0x191755 in this){delete this[_0x191755];}}}class CanvasWindField{constructor(_0x59a3b2){const _0x3ce213=_0x2156a7;this[_0x3ce213(0x136)](_0x59a3b2);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x1f4b16){const _0x4231a1=_0x2156a7;this['_speedRate']=(0x64-(_0x1f4b16>0x63?0x63:_0x1f4b16))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x4231a1(0x15f)])/this[_0x4231a1(0x122)],(this['ymax']-this['ymin'])/this[_0x4231a1(0x122)]];}get[_0x2156a7(0x1f3)](){return this['_maxAge'];}set['maxAge'](_0x165c06){this['_maxAge']=_0x165c06;}['setOptions'](_0x2cc53a){const _0x73194c=_0x2156a7;this[_0x73194c(0x197)]=_0x2cc53a,this['maxAge']=_0x2cc53a['maxAge']||0x78,this[_0x73194c(0x1a7)]=_0x2cc53a['speedRate']||0x32,this['particles']=[];const _0x3dcc71=_0x2cc53a['particlesNumber']||0x1000;for(let _0x4d45c5=0x0;_0x4d45c5<_0x3dcc71;_0x4d45c5++){const _0x8f2cc4=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x8f2cc4);}}[_0x2156a7(0x12d)](_0x32b794){const _0x1ce269=_0x2156a7;this['rows']=_0x32b794['rows'],this[_0x1ce269(0x145)]=_0x32b794['cols'],this['xmin']=_0x32b794['xmin'],this['xmax']=_0x32b794[_0x1ce269(0x1f7)],this['ymin']=_0x32b794['ymin'],this['ymax']=_0x32b794['ymax'],this['grid']=[];const _0x4c6b54=_0x32b794['udata'],_0x1589c0=_0x32b794['vdata'];let _0x19e477=![];_0x4c6b54['length']===this[_0x1ce269(0x160)]&&_0x4c6b54[0x0][_0x1ce269(0x152)]===this['cols']&&(_0x19e477=!![]);let _0x5a14d6=0x0,_0x980f39=null,_0x4c96bf=null;for(let _0x533ac6=0x0;_0x533ac6<this['rows'];_0x533ac6++){_0x980f39=[];for(let _0x44549b=0x0;_0x44549b<this['cols'];_0x44549b++,_0x5a14d6++){_0x19e477?_0x4c96bf=this['_calcUV'](_0x4c6b54[_0x533ac6][_0x44549b],_0x1589c0[_0x533ac6][_0x44549b]):_0x4c96bf=this['_calcUV'](_0x4c6b54[_0x5a14d6],_0x1589c0[_0x5a14d6]),_0x980f39[_0x1ce269(0x1be)](_0x4c96bf);}this[_0x1ce269(0x127)][_0x1ce269(0x1be)](_0x980f39);}this[_0x1ce269(0x197)]['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x1d072f=_0x2156a7;delete this['rows'],delete this['cols'],delete this[_0x1d072f(0x15f)],delete this[_0x1d072f(0x1f7)],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x4bd175,_0x457a95){const _0x48425d=_0x2156a7,_0x47bc38=(_0x4bd175-this['xmin'])/(this['xmax']-this['xmin'])*(this[_0x48425d(0x145)]-0x1),_0x417a0d=(this[_0x48425d(0x151)]-_0x457a95)/(this[_0x48425d(0x151)]-this['ymin'])*(this['rows']-0x1);return[_0x47bc38,_0x417a0d];}['getUVByXY'](_0x2eb6a7,_0x177a11){const _0x19119c=_0x2156a7;if(_0x2eb6a7<0x0||_0x2eb6a7>=this['cols']||_0x177a11>=this['rows'])return[0x0,0x0,0x0];const _0x328668=Math['floor'](_0x2eb6a7),_0x399750=Math[_0x19119c(0x12a)](_0x177a11);if(_0x328668===_0x2eb6a7&&_0x399750===_0x177a11)return this['grid'][_0x177a11][_0x2eb6a7];const _0x1be07a=_0x328668+0x1,_0xd0ff66=_0x399750+0x1,_0x48c7da=this['getUVByXY'](_0x328668,_0x399750),_0x42c793=this['getUVByXY'](_0x1be07a,_0x399750),_0x5d4800=this[_0x19119c(0x1fd)](_0x328668,_0xd0ff66),_0xb5f156=this[_0x19119c(0x1fd)](_0x1be07a,_0xd0ff66);let _0x2f623b=null;try{_0x2f623b=this[_0x19119c(0x20c)](_0x2eb6a7-_0x328668,_0x177a11-_0x399750,_0x48c7da,_0x42c793,_0x5d4800,_0xb5f156);}catch(_0x98110b){console['log'](_0x2eb6a7,_0x177a11);}return _0x2f623b;}['_bilinearInterpolation'](_0x1977c7,_0x2f4d14,_0x4ad994,_0x3cfc3a,_0x4063b9,_0x15baaf){const _0x1862ac=0x1-_0x1977c7,_0x434565=0x1-_0x2f4d14,_0x44ad57=_0x1862ac*_0x434565,_0x4af553=_0x1977c7*_0x434565,_0x10dbc4=_0x1862ac*_0x2f4d14,_0x551e89=_0x1977c7*_0x2f4d14,_0x17f93e=_0x4ad994[0x0]*_0x44ad57+_0x3cfc3a[0x0]*_0x4af553+_0x4063b9[0x0]*_0x10dbc4+_0x15baaf[0x0]*_0x551e89,_0x1fdc8f=_0x4ad994[0x1]*_0x44ad57+_0x3cfc3a[0x1]*_0x4af553+_0x4063b9[0x1]*_0x10dbc4+_0x15baaf[0x1]*_0x551e89;return this['_calcUV'](_0x17f93e,_0x1fdc8f);}['_calcUV'](_0x37ed19,_0x5e6ef7){const _0x4322a3=_0x2156a7;return[+_0x37ed19,+_0x5e6ef7,Math[_0x4322a3(0x158)](_0x37ed19*_0x37ed19+_0x5e6ef7*_0x5e6ef7)];}['getUVByPoint'](_0x121f5c,_0x3c7f61){if(!this['isInExtent'](_0x121f5c,_0x3c7f61))return null;const _0xfdb291=this['toGridXY'](_0x121f5c,_0x3c7f61),_0x17aa45=this['getUVByXY'](_0xfdb291[0x0],_0xfdb291[0x1]);return _0x17aa45;}['isInExtent'](_0x436bc6,_0x3e8cd8){const _0x12c327=_0x2156a7;return _0x436bc6>=this[_0x12c327(0x15f)]&&_0x436bc6<=this['xmax']&&_0x3e8cd8>=this['ymin']&&_0x3e8cd8<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x4e553c=fRandomByfloat(this['xmin'],this['xmax']),_0x127889=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x127889,'lng':_0x4e553c};}['getParticles'](){const _0x5cf21e=_0x2156a7;let _0x30d42d,_0x51b1ed,_0x4a799c;for(let _0x1fdac2=0x0,_0x5d6abb=this['particles'][_0x5cf21e(0x152)];_0x1fdac2<_0x5d6abb;_0x1fdac2++){let _0x254f08=this['particles'][_0x1fdac2];_0x254f08['age']<=0x0&&(_0x254f08=this['_randomParticle'](_0x254f08));if(_0x254f08['age']>0x0){const _0x3d9047=_0x254f08['tlng'],_0x55e54b=_0x254f08[_0x5cf21e(0x1c6)];_0x4a799c=this[_0x5cf21e(0x164)](_0x3d9047,_0x55e54b),_0x4a799c?(_0x30d42d=_0x3d9047+this['_calc_speedRate'][0x0]*_0x4a799c[0x0],_0x51b1ed=_0x55e54b+this['_calc_speedRate'][0x1]*_0x4a799c[0x1],_0x254f08['lng']=_0x3d9047,_0x254f08['lat']=_0x55e54b,_0x254f08['tlng']=_0x30d42d,_0x254f08['tlat']=_0x51b1ed,_0x254f08[_0x5cf21e(0x1aa)]=_0x4a799c[0x2],_0x254f08['age']--):_0x254f08['age']=0x0;}}return this[_0x5cf21e(0x159)];}['_randomParticle'](_0x4f462b){const _0x3b5c1f=_0x2156a7;let _0x132dc6,_0x3ca113;for(let _0x3f4f81=0x0;_0x3f4f81<0x1e;_0x3f4f81++){_0x132dc6=this['getRandomLatLng'](),_0x3ca113=this['getUVByPoint'](_0x132dc6[_0x3b5c1f(0x138)],_0x132dc6['lat']);if(_0x3ca113&&_0x3ca113[0x2]>0x0)break;}if(!_0x3ca113)return _0x4f462b;const _0x59b9ba=_0x132dc6['lng']+this['_calc_speedRate'][0x0]*_0x3ca113[0x0],_0x5db756=_0x132dc6['lat']+this['_calc_speedRate'][0x1]*_0x3ca113[0x1];return _0x4f462b[_0x3b5c1f(0x138)]=_0x132dc6['lng'],_0x4f462b['lat']=_0x132dc6['lat'],_0x4f462b['tlng']=_0x59b9ba,_0x4f462b['tlat']=_0x5db756,_0x4f462b['age']=Math['round'](Math['random']()*this['maxAge']),_0x4f462b['speed']=_0x3ca113[0x2],_0x4f462b;}[_0x2156a7(0x16b)](){for(const _0x286a36 in this){delete this[_0x286a36];}}}function fRandomByfloat(_0x53ad73,_0x190414){return _0x53ad73+Math['random']()*(_0x190414-_0x53ad73);}const Cesium=mars3d__namespace[_0x2156a7(0x1ea)],BaseLayer=mars3d__namespace['layer'][_0x2156a7(0x1d7)];class CanvasWindLayer extends BaseLayer{constructor(_0x19d0fe={}){const _0x24d091=_0x2156a7;super(_0x19d0fe),this[_0x24d091(0x13f)](_0x19d0fe),this['canvas']=null,_0x19d0fe['colors']&&_0x19d0fe[_0x24d091(0x171)]&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x19d0fe));}['_setOptionsHook'](_0x8a3e05,_0x3b9cdb){const _0x492f04=_0x2156a7;this['frameTime']=0x3e8/(_0x8a3e05['frameRate']||0xa),this[_0x492f04(0x12c)]=this['options']['pointerEvents']??![],this['color']=_0x8a3e05['color']||'#ffffff',this['lineWidth']=_0x8a3e05[_0x492f04(0x17c)]||0x1,this['fixedHeight']=_0x8a3e05['fixedHeight']??0x0,this['reverseY']=_0x8a3e05[_0x492f04(0x115)]??![],this[_0x492f04(0x196)]&&this[_0x492f04(0x196)]['setOptions'](_0x8a3e05);}get['layer'](){const _0x248c98=_0x2156a7;return this[_0x248c98(0x1f1)];}get[_0x2156a7(0x17b)](){const _0x4a7242=_0x2156a7;return this[_0x4a7242(0x154)]['scene']['canvas'][_0x4a7242(0x161)];}get[_0x2156a7(0x1d2)](){const _0x41a0f0=_0x2156a7;return this['_map'][_0x41a0f0(0x140)]['canvas'][_0x41a0f0(0x208)];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0x2156a7(0x16f)](_0x125f7d){const _0x1a5eac=_0x2156a7;this['_pointerEvents']=_0x125f7d;if(!this['canvas'])return;_0x125f7d?this['canvas']['style']['pointer-events']=_0x1a5eac(0x1ab):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x59dbbe){const _0x578223=_0x2156a7;this['options'][_0x578223(0x1cd)]=_0x59dbbe,clearTimeout(this['_canrefresh']),this[_0x578223(0x12b)]=setTimeout(()=>{const _0x2cb539=_0x578223;this[_0x2cb539(0x11a)]();},0x1f4);}get['speedRate'](){const _0x412ce3=_0x2156a7;return this['options'][_0x412ce3(0x1a7)];}set[_0x2156a7(0x1a7)](_0x26dbb7){const _0x2e214c=_0x2156a7;this['options'][_0x2e214c(0x1a7)]=_0x26dbb7,this['windField']&&(this['windField']['speedRate']=_0x26dbb7);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x23fb92){this['options']['maxAge']=_0x23fb92,this['windField']&&(this['windField']['maxAge']=_0x23fb92);}get['data'](){return this['windData'];}set['data'](_0x55345e){const _0x29d818=_0x2156a7;this[_0x29d818(0x1b7)](_0x55345e);}['_showHook'](_0x29ec19){const _0x38d26f=_0x2156a7;_0x29ec19?this['_addedHook']():(this['windData']&&(this['options'][_0x38d26f(0x16a)]=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x153063=_0x2156a7;this['options'][_0x153063(0x135)]?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}[_0x2156a7(0x1ef)](){const _0x44b5e7=_0x2156a7;this['canvas']=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this[_0x44b5e7(0x197)][_0x44b5e7(0x16a)]&&this[_0x44b5e7(0x1b7)](this['options'][_0x44b5e7(0x16a)]);}[_0x2156a7(0x194)](){const _0x3f3386=_0x2156a7;this[_0x3f3386(0x139)](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this[_0x3f3386(0x1f1)]);}['_createCanvas'](){const _0x4b3a5d=_0x2156a7,_0x538c1d=mars3d__namespace['DomUtil']['create'](_0x4b3a5d(0x1f1),'mars3d-canvasWind',this['_map'][_0x4b3a5d(0x1b8)]);return _0x538c1d['style'][_0x4b3a5d(0x187)]=_0x4b3a5d(0x1c5),_0x538c1d['style'][_0x4b3a5d(0x186)]='0px',_0x538c1d['style']['left']='0px',_0x538c1d['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x538c1d['style']['height']=this['_map'][_0x4b3a5d(0x140)][_0x4b3a5d(0x1f1)]['clientHeight']+'px',_0x538c1d['style']['pointerEvents']=this['_pointerEvents']?_0x4b3a5d(0x132):'none',_0x538c1d['style']['zIndex']=this['options']['zIndex']??0x9,_0x538c1d[_0x4b3a5d(0x156)]=this[_0x4b3a5d(0x154)]['scene']['canvas']['clientWidth'],_0x538c1d['height']=this['_map']['scene'][_0x4b3a5d(0x1f1)]['clientHeight'],_0x538c1d;}['resize'](){const _0x1db8d0=_0x2156a7;this['canvas']&&(this[_0x1db8d0(0x1f1)]['style']['width']=this[_0x1db8d0(0x154)][_0x1db8d0(0x140)]['canvas']['clientWidth']+'px',this['canvas']['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',this['canvas']['width']=this['_map']['scene']['canvas']['clientWidth'],this['canvas'][_0x1db8d0(0x200)]=this['_map']['scene']['canvas']['clientHeight']);}['bindEvent'](){const _0xb00f25=_0x2156a7,_0x278b10=this;let _0x1d2ac0=Date['now']();(function _0x381664(){const _0x43fca8=_0x4707;_0x278b10['animateFrame']=window['requestAnimationFrame'](_0x381664);if(_0x278b10['show']&&_0x278b10[_0x43fca8(0x196)]){const _0x459a7d=Date['now'](),_0x164107=_0x459a7d-_0x1d2ac0;_0x164107>_0x278b10[_0x43fca8(0x1cf)]&&(_0x1d2ac0=_0x459a7d-_0x164107%_0x278b10['frameTime'],_0x278b10['update']());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options'][_0xb00f25(0x153)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0xb00f25(0x1a4)][_0xb00f25(0x1dd)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0xb00f25(0x1e2)],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x3087c3=_0x2156a7;window['cancelAnimationFrame'](this[_0x3087c3(0x163)]),delete this['animateFrame'],window['removeEventListener']('resize',this[_0x3087c3(0x1dc)]),this[_0x3087c3(0x197)]['mouseHidden']&&(this[_0x3087c3(0x154)]['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map'][_0x3087c3(0x1cc)](mars3d__namespace['EventType']['mouseDown'],this[_0x3087c3(0x11b)],this),this['_map']['off'](mars3d__namespace['EventType'][_0x3087c3(0x1e2)],this[_0x3087c3(0x189)],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this));}[_0x2156a7(0x1fb)](_0x3bd7f9){const _0x40819a=_0x2156a7;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas'][_0x40819a(0x209)][_0x40819a(0x183)]=_0x40819a(0x1a1),this['refreshTimer']=setTimeout(()=>{const _0x50a156=_0x40819a;if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']=_0x50a156(0x1bc);},0xc8);}['_onMouseDownEvent'](_0x39f619){const _0x10955a=_0x2156a7;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace[_0x10955a(0x1a4)][_0x10955a(0x14e)],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x10955a(0x20a)],this);}[_0x2156a7(0x20a)](_0x487f00){const _0x330b75=_0x2156a7;if(!this[_0x330b75(0x1a8)]||!this['canvas'])return;this['mouse_down']&&(this['canvas'][_0x330b75(0x209)]['visibility']='hidden',this['mouse_move']=!![]);}[_0x2156a7(0x189)](_0x2e61e4){const _0x474750=_0x2156a7;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace[_0x474750(0x1a4)]['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this[_0x474750(0x121)]&&this['redraw'](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this[_0x474750(0x121)]=![];}[_0x2156a7(0x1b7)](_0x2c0093){const _0x5f53ad=_0x2156a7;this['clear'](),this[_0x5f53ad(0x148)]=_0x2c0093,this[_0x5f53ad(0x196)]['setDate'](_0x2c0093),this['redraw']();}['redraw'](){const _0x50dca2=_0x2156a7;if(!this['show'])return;this['windField']['setOptions'](this['options']),this[_0x50dca2(0x18d)]();}['update'](){const _0x1c440d=_0x2156a7;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this[_0x1c440d(0x196)]['update']();else{const _0x39935d=this['windField']['getParticles']();this['_drawLines'](_0x39935d);}this['_updateIng']=![];}[_0x2156a7(0x1ee)](_0x232945){const _0x31ae44=_0x2156a7;this['canvasContext']['globalCompositeOperation']='destination-in',this[_0x31ae44(0x1a0)]['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this[_0x31ae44(0x1a0)]['globalAlpha']=0.9;const _0x1a77bd=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0xe11e4f=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x28cbc0=0x0,_0x1b2cd7=_0x232945['length'];_0x28cbc0<_0x1b2cd7;_0x28cbc0++){const _0x1fda36=_0x232945[_0x28cbc0],_0x239cb3=this['_tomap'](_0x1fda36['lng'],_0x1fda36['lat'],_0x1fda36),_0x6ea21d=this['_tomap'](_0x1fda36['tlng'],_0x1fda36['tlat'],_0x1fda36);if(!_0x239cb3||!_0x6ea21d)continue;if(_0x1a77bd&&Math['abs'](_0x239cb3[0x0]-_0x6ea21d[0x0])>=_0xe11e4f)continue;this[_0x31ae44(0x1a0)]['beginPath'](),this[_0x31ae44(0x1a0)]['lineWidth']=this[_0x31ae44(0x17c)],this['canvasContext']['strokeStyle']=this['_colorRamp'][_0x31ae44(0x157)](_0x1fda36['speed']),this[_0x31ae44(0x1a0)]['moveTo'](_0x239cb3[0x0],_0x239cb3[0x1]),this['canvasContext']['lineTo'](_0x6ea21d[0x0],_0x6ea21d[0x1]),this['canvasContext'][_0x31ae44(0x178)]();}else{this['canvasContext'][_0x31ae44(0x118)](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext'][_0x31ae44(0x1d3)]=this['color'];for(let _0x53962e=0x0,_0x3fb8ce=_0x232945['length'];_0x53962e<_0x3fb8ce;_0x53962e++){const _0x1d8ae3=_0x232945[_0x53962e],_0x280574=this[_0x31ae44(0x116)](_0x1d8ae3['lng'],_0x1d8ae3['lat'],_0x1d8ae3),_0x1dc7a3=this['_tomap'](_0x1d8ae3['tlng'],_0x1d8ae3['tlat'],_0x1d8ae3);if(!_0x280574||!_0x1dc7a3)continue;if(_0x1a77bd&&Math[_0x31ae44(0x144)](_0x280574[0x0]-_0x1dc7a3[0x0])>=_0xe11e4f)continue;this[_0x31ae44(0x1a0)]['moveTo'](_0x280574[0x0],_0x280574[0x1]),this['canvasContext']['lineTo'](_0x1dc7a3[0x0],_0x1dc7a3[0x1]);}this[_0x31ae44(0x1a0)][_0x31ae44(0x178)]();}}[_0x2156a7(0x116)](_0x1533b2,_0x2873cc,_0x235137){const _0x25e70c=_0x2156a7,_0x40b0e7=Cesium['Cartesian3'][_0x25e70c(0x14b)](_0x1533b2,_0x2873cc,this['fixedHeight']),_0xd5a122=this[_0x25e70c(0x154)][_0x25e70c(0x140)];if(_0xd5a122['mode']===Cesium[_0x25e70c(0x134)][_0x25e70c(0x16d)]){const _0x5ddfc=new Cesium['EllipsoidalOccluder'](_0xd5a122['globe'][_0x25e70c(0x141)],_0xd5a122[_0x25e70c(0x20b)][_0x25e70c(0x1d0)]),_0x28c8a4=_0x5ddfc[_0x25e70c(0x1ec)](_0x40b0e7);if(!_0x28c8a4)return _0x235137['age']=0x0,null;}const _0x8cff3a=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x25e70c(0x154)]['scene'],_0x40b0e7);return _0x8cff3a?[_0x8cff3a['x'],_0x8cff3a['y']]:null;}['clear'](){const _0x3bd292=_0x2156a7;this['windField'][_0x3bd292(0x139)](),delete this[_0x3bd292(0x148)];}[_0x2156a7(0x1ce)](){const _0xd53c3d=_0x2156a7;this['worker']=new Worker(this[_0xd53c3d(0x197)][_0xd53c3d(0x135)]),this[_0xd53c3d(0x135)][_0xd53c3d(0x1e6)]=_0x4b81f9=>{this['_drawLines'](_0x4b81f9['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x1d5cf2=>{const _0x4ef3d9=_0xd53c3d;this['worker'][_0x4ef3d9(0x1b3)]({'type':_0x4ef3d9(0x201),'options':_0x1d5cf2});},'setOptions':_0xb91eca=>{const _0x36a686=_0xd53c3d;this['worker'][_0x36a686(0x1b3)]({'type':'setOptions','options':_0xb91eca});},'setDate':_0x2639e5=>{const _0x4235c5=_0xd53c3d;this[_0x4235c5(0x135)][_0x4235c5(0x1b3)]({'type':'setDate','data':_0x2639e5});},'update':()=>{const _0x461f54=_0xd53c3d;if(this[_0x461f54(0x14f)])return;this[_0x461f54(0x14f)]=!![],this['worker'][_0x461f54(0x1b3)]({'type':'update'});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x2156a7(0x167)]=CanvasWindLayer,mars3d__namespace[_0x2156a7(0x13c)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x2156a7(0x1ca)]=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,_0x2156a7(0x128),{'value':!![]});
|
|
15
15
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-wind",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.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.6.
|
|
11
|
+
"mars3d": "~3.6.2"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|