mars3d-wind 3.5.9 → 3.5.11
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.5.
|
|
5
|
-
* 编译日期:2023-
|
|
4
|
+
* 版本信息:v3.5.11
|
|
5
|
+
* 编译日期:2023-06-12 21:55:03
|
|
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 _0x55787c=_0x540d;(function(_0x25d3ba,_0x58b667){const _0x10d12b=_0x540d,_0x4a65cf=_0x25d3ba();while(!![]){try{const _0x4e317a=parseInt(_0x10d12b(0x14b))/0x1+parseInt(_0x10d12b(0x167))/0x2*(parseInt(_0x10d12b(0xd1))/0x3)+parseInt(_0x10d12b(0x171))/0x4+parseInt(_0x10d12b(0x164))/0x5+parseInt(_0x10d12b(0xc6))/0x6+parseInt(_0x10d12b(0xfe))/0x7+-parseInt(_0x10d12b(0xd0))/0x8*(parseInt(_0x10d12b(0x150))/0x9);if(_0x4e317a===_0x58b667)break;else _0x4a65cf['push'](_0x4a65cf['shift']());}catch(_0x77a1f4){_0x4a65cf['push'](_0x4a65cf['shift']());}}}(_0x5cad,0x6abef));function _interopNamespace(_0x124104){const _0x390f04=_0x540d;if(_0x124104&&_0x124104['__esModule'])return _0x124104;var _0x4c6fdf=Object['create'](null);return _0x124104&&Object[_0x390f04(0x10a)](_0x124104)['forEach'](function(_0x29ca1e){const _0x21ada0=_0x390f04;if(_0x29ca1e!=='default'){var _0x3f25b9=Object['getOwnPropertyDescriptor'](_0x124104,_0x29ca1e);Object['defineProperty'](_0x4c6fdf,_0x29ca1e,_0x3f25b9[_0x21ada0(0x137)]?_0x3f25b9:{'enumerable':!![],'get':function(){return _0x124104[_0x29ca1e];}});}}),_0x4c6fdf[_0x390f04(0x106)]=_0x124104,_0x4c6fdf;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x2a0f95,_0x2f5289){const _0x2bb7ab=_0x540d,_0x1b574f=_0x2a0f95*Math[_0x2bb7ab(0xc3)](Cesium$7[_0x2bb7ab(0xf4)]['toRadians'](_0x2f5289));return _0x1b574f;}function getV(_0x56440a,_0x11a43f){const _0x5a2c0d=_0x540d,_0x1f24c2=_0x56440a*Math['sin'](Cesium$7[_0x5a2c0d(0xf4)]['toRadians'](_0x11a43f));return _0x1f24c2;}function _0x5cad(){const _0x2b108f=['mars3d-canvasWind','once','camera','ZERO','forEach','default','particlesWind','dropRateBump','wheel','keys','createParticlesTextures','array','mode','blue','lev','positionWC','lonRange','windTextures','particlesTextureSize','_mountedHook','currentParticlesPosition','sqrt','PI_OVER_THREE','PixelFormat','particlesNumber','container','reverseY','animateFrame','setOptions','pointerEvents','fromCssColorString','TWO_PI','cols','updateViewerParameters','context','canvasContext','fragmentShaderSource','lineWidth','Cesium','SceneMode','mouse_down','currentTrailsDepth','wind','particleSystem','particlesComputing','_addedHook','nextParticlesPosition','Cartesian2','xmin','__esModule','clientWidth','CanvasWindLayer','createSegmentsGeometry','outputTexture','get','cancelAnimationFrame','TRIANGLES','createFramebuffer','_onMap_preRenderEvent','resize','commandToExecute','preExecute','drawingBufferHeight','height','RenderState','_drawLines','_canrefresh','ymin','destroyParticlesTextures','options','commandType','defined','clientHeight','textures','112572zpEtUB','windData','GeometryAttributes','LINEAR','lat','348021VFvrfW','_calc_speedRate','ShaderSource','clear','addPrimitives','applyViewerParameters','currentTrails','_onMouseMoveEvent','OPAQUE','round','north','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','uniformMap','colorTable','clearCommand','worker','_updateIng2','particlesRendering','onmessage','viewerParameters','1922220JDLJNK','east','rgb(206,255,255)','142gYwUfW','getRandomLatLng','setData','postMessage','_bilinearInterpolation','windField','_onMapWhellEvent','primitives','setDate','fromCache','1287232bHCjeI','TextureMagnificationFilter','toGridXY','udata','tlng','globalAlpha','latRange','postProcessingSpeed','STATIC_DRAW','createRenderingPrimitives','addEventListener','pow','createRawRenderState','NEAREST','add','vertexArray','mouse_move','_data','fixedHeight','getOptions','createTexture','scene','age','maxParticles','autoClear','visible','WindLayer','GeometryAttribute','_pointerEvents','lon','mouseUp','nextTrails','destroy','_speedRate','vdata','UNSIGNED_BYTE','framebuffer','mouseMove','ymax','layer','Sampler','pointer-events','Framebuffer','off','createWindTextures','mouseDown','show','EventType','max','cos','rows','PixelDatatype','464094vZJyfd','removeEventListener','canvas','data','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','dimensions','frameTime','nextParticlesSpeed','RGBA','particlesTextures','256YJsRVs','9237nGPZbH','toDegrees','maxAge','speedRate','redraw','hidden','tlat','fromGeometry','particleHeight','BaseLayer','mod','viewRectangleToLonLatRange','length','none','ellipsoid','primitiveType','requestAnimationFrame','FLOAT','dropRate','Cartesian3','attributeLocations','getUVByXY','CanvasWindField','_map','now','refreshTimer','segments','min','frameRate','_calcUV','push','rawRenderState','bindEvent','framebuffers','postProcessingPosition','Math','getParticles','bind','geometry','style','commandList','drawingBufferWidth','xmax','DrawCommand','_onMouseDownEvent','3918999bwhExj','colors','depthTexture'];_0x5cad=function(){return _0x2b108f;};return _0x5cad();}function _0x540d(_0x4e530a,_0x377ff1){const _0x5cad08=_0x5cad();return _0x540d=function(_0x540d44,_0x576ed3){_0x540d44=_0x540d44-0x93;let _0x2865a7=_0x5cad08[_0x540d44];return _0x2865a7;},_0x540d(_0x4e530a,_0x377ff1);}function getSpeed(_0x545e9b,_0x31dbc2){const _0x1241c2=_0x540d,_0x12e9d9=Math[_0x1241c2(0x116)](Math[_0x1241c2(0x9d)](_0x545e9b,0x2)+Math[_0x1241c2(0x9d)](_0x31dbc2,0x2));return _0x12e9d9;}function getDirection(_0x3ee57e,_0x3605d2){const _0x18383e=_0x540d;let _0x4045be=Cesium$7[_0x18383e(0xf4)][_0x18383e(0xd2)](Math['atan2'](_0x3605d2,_0x3ee57e));return _0x4045be+=_0x4045be<0x0?0x168:0x0,_0x4045be;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace[_0x55787c(0x127)];class CustomPrimitive{constructor(_0x4d4ece){const _0x5984a8=_0x55787c;this['commandType']=_0x4d4ece[_0x5984a8(0x147)],this[_0x5984a8(0xf7)]=_0x4d4ece['geometry'],this[_0x5984a8(0xe5)]=_0x4d4ece['attributeLocations'],this[_0x5984a8(0xe0)]=_0x4d4ece['primitiveType'],this[_0x5984a8(0x15c)]=_0x4d4ece[_0x5984a8(0x15c)],this['vertexShaderSource']=_0x4d4ece['vertexShaderSource'],this[_0x5984a8(0x125)]=_0x4d4ece['fragmentShaderSource'],this['rawRenderState']=_0x4d4ece[_0x5984a8(0xf0)],this[_0x5984a8(0xb6)]=_0x4d4ece['framebuffer'],this[_0x5984a8(0x136)]=_0x4d4ece['outputTexture'],this['autoClear']=_0x4d4ece['autoClear']??![],this['preExecute']=_0x4d4ece[_0x5984a8(0x13e)],this['show']=!![],this['commandToExecute']=undefined,this[_0x5984a8(0x15e)]=undefined,this[_0x5984a8(0xaa)]&&(this[_0x5984a8(0x15e)]=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x5984a8(0x158)]}));}['createCommand'](_0x344488){const _0x13afc0=_0x55787c;switch(this['commandType']){case'Draw':{const _0x34abc4=Cesium$6['VertexArray']['fromGeometry']({'context':_0x344488,'geometry':this[_0x13afc0(0xf7)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x59b86b=Cesium$6['ShaderProgram']['fromCache']({'context':_0x344488,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x232a23=Cesium$6[_0x13afc0(0x141)][_0x13afc0(0x170)](this['rawRenderState']);return new Cesium$6[(_0x13afc0(0xfc))]({'primitiveType':this[_0x13afc0(0xe0)],'shaderProgram':_0x59b86b,'vertexArray':_0x34abc4,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x232a23,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x579f64,_0x54cb49){this['geometry']=_0x54cb49;const _0x51272a=Cesium$6['VertexArray']['fromGeometry']({'context':_0x579f64,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x51272a;}['update'](_0x443ec3){const _0x5eb02f=_0x55787c;if(!this[_0x5eb02f(0xc0)])return;if(_0x443ec3[_0x5eb02f(0x10d)]!==Cesium$6[_0x5eb02f(0x128)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x443ec3['context'])),Cesium$6[_0x5eb02f(0x148)](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x443ec3['commandList']['push'](this['clearCommand']),_0x443ec3[_0x5eb02f(0xf9)]['push'](this['commandToExecute']);}['isDestroyed'](){return![];}[_0x55787c(0xb2)](){const _0x373eed=_0x55787c;if(this['clearCommand']){var _0x27ae80,_0x59434e;(_0x27ae80=this['clearCommand'])!==null&&_0x27ae80!==void 0x0&&_0x27ae80[_0x373eed(0xa1)]&&this['clearCommand'][_0x373eed(0xa1)][_0x373eed(0xb2)](),(_0x59434e=this['clearCommand'])!==null&&_0x59434e!==void 0x0&&_0x59434e['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this[_0x373eed(0x13d)]['vertexArray']&&this['commandToExecute']['vertexArray']['destroy'](),this[_0x373eed(0x13d)]['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0x373eed(0xb2)](),delete this[_0x373eed(0x13d)]),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace[_0x55787c(0x127)],Util=(function(){const _0x3e24d8=function(){const _0x496d4e=_0x540d,_0x3879b8=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x496d4e(0x14d))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x496d4e(0xe2)],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x3879b8;},_0x2ce4f2=function(_0xa028ee,_0x2c4dd2){const _0x5b4f2c=_0x540d;if(Cesium$5[_0x5b4f2c(0x148)](_0x2c4dd2)){const _0x3a186a={};_0x3a186a['arrayBufferView']=_0x2c4dd2,_0xa028ee['source']=_0x3a186a;}const _0x19a65e=new Cesium$5['Texture'](_0xa028ee);return _0x19a65e;},_0x53eab8=function(_0x230f63,_0x387dd1,_0x56132c){const _0x4a73dc=_0x540d,_0x205b8b=new Cesium$5[(_0x4a73dc(0xbc))]({'context':_0x230f63,'colorTextures':[_0x387dd1],'depthTexture':_0x56132c});return _0x205b8b;},_0x44036=function(_0x91b12f){const _0x4da589=!![],_0x4e3e4a=![],_0xd1e23d={'viewport':_0x91b12f['viewport'],'depthTest':_0x91b12f['depthTest'],'depthMask':_0x91b12f['depthMask'],'blending':_0x91b12f['blending']},_0xc07e80=Cesium$5['Appearance']['getDefaultRenderState'](_0x4da589,_0x4e3e4a,_0xd1e23d);return _0xc07e80;},_0x142cd0=function(_0xb25b25){const _0x1b0403=_0x540d,_0x10773a={},_0x1ef96f=Cesium$5['Math']['mod'](_0xb25b25['west'],Cesium$5['Math']['TWO_PI']),_0xded9b1=Cesium$5['Math'][_0x1b0403(0xdb)](_0xb25b25[_0x1b0403(0x165)],Cesium$5[_0x1b0403(0xf4)]['TWO_PI']),_0x17a535=_0xb25b25['width'];let _0x305cc4,_0x354bc9;_0x17a535>Cesium$5[_0x1b0403(0xf4)]['THREE_PI_OVER_TWO']?(_0x305cc4=0x0,_0x354bc9=Cesium$5['Math'][_0x1b0403(0x120)]):_0xded9b1-_0x1ef96f<_0x17a535?(_0x305cc4=_0x1ef96f,_0x354bc9=_0x1ef96f+_0x17a535):(_0x305cc4=_0x1ef96f,_0x354bc9=_0xded9b1);_0x10773a['lon']={'min':Cesium$5['Math']['toDegrees'](_0x305cc4),'max':Cesium$5['Math'][_0x1b0403(0xd2)](_0x354bc9)};const _0x3d58ff=_0xb25b25['south'],_0x4cfe2a=_0xb25b25[_0x1b0403(0x15a)],_0x5beb91=_0xb25b25['height'],_0x553f46=_0x5beb91>Cesium$5[_0x1b0403(0xf4)]['PI']/0xc?_0x5beb91/0x2:0x0;let _0x316440=Cesium$5['Math']['clampToLatitudeRange'](_0x3d58ff-_0x553f46),_0x5060fe=Cesium$5['Math']['clampToLatitudeRange'](_0x4cfe2a+_0x553f46);return _0x316440<-Cesium$5['Math'][_0x1b0403(0x117)]&&(_0x316440=-Cesium$5['Math']['PI_OVER_TWO']),_0x5060fe>Cesium$5[_0x1b0403(0xf4)]['PI_OVER_THREE']&&(_0x5060fe=Cesium$5['Math']['PI_OVER_TWO']),_0x10773a['lat']={'min':Cesium$5[_0x1b0403(0xf4)]['toDegrees'](_0x316440),'max':Cesium$5[_0x1b0403(0xf4)]['toDegrees'](_0x5060fe)},_0x10773a;};return{'getFullscreenQuad':_0x3e24d8,'createTexture':_0x2ce4f2,'createFramebuffer':_0x53eab8,'createRawRenderState':_0x44036,'viewRectangleToLonLatRange':_0x142cd0};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace[_0x55787c(0x127)];class ParticlesRendering{constructor(_0x4620c1,_0x1aef1f,_0x459f2c,_0xa41167,_0x20898a){const _0x57f522=_0x55787c;this['createRenderingTextures'](_0x4620c1,_0x1aef1f,_0x459f2c[_0x57f522(0xff)]),this['createRenderingFramebuffers'](_0x4620c1),this['createRenderingPrimitives'](_0x4620c1,_0x459f2c,_0xa41167,_0x20898a);}['createRenderingTextures'](_0x2a19b2,_0x148a5c,_0x184d72){const _0x2c8f3a=_0x55787c,_0x3ca480={'context':_0x2a19b2,'width':_0x2a19b2['drawingBufferWidth'],'height':_0x2a19b2['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat'][_0x2c8f3a(0xce)],'pixelDatatype':Cesium$4['PixelDatatype'][_0x2c8f3a(0xb5)]},_0x29c568={'context':_0x2a19b2,'width':_0x2a19b2[_0x2c8f3a(0xfa)],'height':_0x2a19b2[_0x2c8f3a(0x13f)],'pixelFormat':Cesium$4[_0x2c8f3a(0x118)]['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4[_0x2c8f3a(0xc5)]['UNSIGNED_INT']},_0x1a4aa1=_0x184d72[_0x2c8f3a(0xdd)],_0xbf2176=new Float32Array(_0x1a4aa1*0x3);for(let _0xbbdeb9=0x0;_0xbbdeb9<_0x1a4aa1;_0xbbdeb9++){const _0xc5c2b8=Cesium$4['Color'][_0x2c8f3a(0x11f)](_0x184d72[_0xbbdeb9]);_0xbf2176[0x3*_0xbbdeb9]=_0xc5c2b8['red'],_0xbf2176[0x3*_0xbbdeb9+0x1]=_0xc5c2b8['green'],_0xbf2176[0x3*_0xbbdeb9+0x2]=_0xc5c2b8[_0x2c8f3a(0x10e)];}const _0x3a62fe={'context':_0x2a19b2,'width':_0x1a4aa1,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4[(_0x2c8f3a(0xba))]({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter'][_0x2c8f3a(0x14e)]})};this['textures']={'segmentsColor':Util[_0x2c8f3a(0xa6)](_0x3ca480),'segmentsDepth':Util[_0x2c8f3a(0xa6)](_0x29c568),'currentTrailsColor':Util['createTexture'](_0x3ca480),'currentTrailsDepth':Util['createTexture'](_0x29c568),'nextTrailsColor':Util[_0x2c8f3a(0xa6)](_0x3ca480),'nextTrailsDepth':Util['createTexture'](_0x29c568),'colorTable':Util['createTexture'](_0x3a62fe,_0xbf2176)};}['createRenderingFramebuffers'](_0x2732c3){const _0x529c77=_0x55787c;this['framebuffers']={'segments':Util['createFramebuffer'](_0x2732c3,this[_0x529c77(0x14a)]['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x2732c3,this['textures']['currentTrailsColor'],this[_0x529c77(0x14a)][_0x529c77(0x12a)]),'nextTrails':Util[_0x529c77(0x13a)](_0x2732c3,this['textures']['nextTrailsColor'],this[_0x529c77(0x14a)]['nextTrailsDepth'])};}[_0x55787c(0x135)](_0x38242c){const _0x208c32=_0x55787c,_0x5d0688=0x4;let _0x1aff6a=[];for(let _0x2d7e87=0x0;_0x2d7e87<_0x38242c[_0x208c32(0x113)];_0x2d7e87++){for(let _0x313351=0x0;_0x313351<_0x38242c['particlesTextureSize'];_0x313351++){for(let _0x408e11=0x0;_0x408e11<_0x5d0688;_0x408e11++){_0x1aff6a['push'](_0x2d7e87/_0x38242c[_0x208c32(0x113)]),_0x1aff6a[_0x208c32(0xef)](_0x313351/_0x38242c['particlesTextureSize']);}}}_0x1aff6a=new Float32Array(_0x1aff6a);let _0x5d1462=[];const _0x375ef0=[-0x1,0x1],_0x4b1d5c=[-0x1,0x1];for(let _0x578a24=0x0;_0x578a24<_0x38242c[_0x208c32(0xa9)];_0x578a24++){for(let _0x242ccf=0x0;_0x242ccf<_0x5d0688/0x2;_0x242ccf++){for(let _0x6426c9=0x0;_0x6426c9<_0x5d0688/0x2;_0x6426c9++){_0x5d1462['push'](_0x375ef0[_0x242ccf]),_0x5d1462['push'](_0x4b1d5c[_0x6426c9]),_0x5d1462[_0x208c32(0xef)](0x0);}}}_0x5d1462=new Float32Array(_0x5d1462);const _0x4d20bf=0x6*_0x38242c['maxParticles'],_0x5e4761=new Uint32Array(_0x4d20bf);for(let _0x2f828b=0x0,_0x5e5cc1=0x0,_0x521470=0x0;_0x2f828b<_0x38242c['maxParticles'];_0x2f828b++){_0x5e4761[_0x5e5cc1++]=_0x521470+0x0,_0x5e4761[_0x5e5cc1++]=_0x521470+0x1,_0x5e4761[_0x5e5cc1++]=_0x521470+0x2,_0x5e4761[_0x5e5cc1++]=_0x521470+0x2,_0x5e4761[_0x5e5cc1++]=_0x521470+0x1,_0x5e4761[_0x5e5cc1++]=_0x521470+0x3,_0x521470+=0x4;}const _0x56a4e2=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x208c32(0xe2)],'componentsPerAttribute':0x2,'values':_0x1aff6a}),'normal':new Cesium$4[(_0x208c32(0xad))]({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x5d1462})}),'indices':_0x5e4761});return _0x56a4e2;}[_0x55787c(0x9b)](_0x101b64,_0x183f0d,_0x24d77a,_0x42c84c){const _0x34c441=_0x55787c,_0x51d4f1=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x183f0d),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0x4e6a2d=_0x540d;return _0x42c84c['particlesTextures'][_0x4e6a2d(0x115)];},'postProcessingPosition':function(){return _0x42c84c['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x42c84c['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x11ef22=_0x540d;return _0x51d4f1[_0x11ef22(0x14a)][_0x11ef22(0x15d)];},'aspect':function(){return _0x101b64['drawingBufferWidth']/_0x101b64['drawingBufferHeight'];},'pixelSize':function(){return _0x24d77a['pixelSize'];},'lineWidth':function(){return _0x183f0d['lineWidth'];},'particleHeight':function(){const _0x1bd923=_0x540d;return _0x183f0d[_0x1bd923(0xd9)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this[_0x34c441(0xf2)]['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0x34c441(0x139)],'uniformMap':{'segmentsColorTexture':function(){const _0x356a81=_0x34c441;return _0x51d4f1[_0x356a81(0x14a)]['segmentsColor'];},'segmentsDepthTexture':function(){return _0x51d4f1['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0x554c4a=_0x34c441;return _0x51d4f1[_0x554c4a(0xf2)]['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x3ed461=_0x34c441;return _0x51d4f1[_0x3ed461(0xf2)]['currentTrails'][_0x3ed461(0x100)];},'fadeOpacity':function(){return _0x183f0d['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util[_0x34c441(0x9e)]({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0x34c441(0xf2)][_0x34c441(0xb1)],'autoClear':!![],'preExecute':function(){const _0x1c19f0=_0x34c441,_0x4f47d1=_0x51d4f1[_0x1c19f0(0xf2)][_0x1c19f0(0x156)];_0x51d4f1['framebuffers']['currentTrails']=_0x51d4f1['framebuffers'][_0x1c19f0(0xb1)],_0x51d4f1['framebuffers']['nextTrails']=_0x4f47d1,_0x51d4f1['primitives']['trails'][_0x1c19f0(0x13d)][_0x1c19f0(0xb6)]=_0x51d4f1['framebuffers']['nextTrails'],_0x51d4f1['primitives']['trails'][_0x1c19f0(0x15e)]['framebuffer']=_0x51d4f1[_0x1c19f0(0xf2)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0x34c441(0x139)],'uniformMap':{'trailsColorTexture':function(){const _0x32d9a3=_0x34c441;return _0x51d4f1[_0x32d9a3(0xf2)]['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x51e89b=_0x34c441;return _0x51d4f1[_0x51e89b(0xf2)]['nextTrails'][_0x51e89b(0x100)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x34c441(0x152))]({'defines':[_0x34c441(0x15b)],'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=_0x55787c(0xca),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[_0x55787c(0x127)];class ParticlesComputing{constructor(_0x94356a,_0x4aa6f3,_0x5a047a,_0x289bf4){const _0x60b717=_0x55787c;this['data']=_0x4aa6f3,this[_0x60b717(0xbe)](_0x94356a,_0x4aa6f3),this['createParticlesTextures'](_0x94356a,_0x5a047a,_0x289bf4),this['createComputingPrimitives'](_0x4aa6f3,_0x5a047a,_0x289bf4);}[_0x55787c(0xbe)](_0x149309,_0x594b87){const _0x1df4cc=_0x55787c,_0x106405={'context':_0x149309,'width':_0x594b87['dimensions'][_0x1df4cc(0xaf)],'height':_0x594b87[_0x1df4cc(0xcb)]['lat']*(_0x594b87[_0x1df4cc(0xcb)][_0x1df4cc(0x10f)]||0x1),'pixelFormat':Cesium$3[_0x1df4cc(0x118)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x1df4cc(0x9f)],'magnificationFilter':Cesium$3[_0x1df4cc(0x93)]['NEAREST']})};this[_0x1df4cc(0x112)]={'U':Util['createTexture'](_0x106405,_0x594b87['U'][_0x1df4cc(0x10c)]),'V':Util['createTexture'](_0x106405,_0x594b87['V'][_0x1df4cc(0x10c)])};}[_0x55787c(0x10b)](_0x22f495,_0x3bdf3a,_0x820719){const _0x74a70a=_0x55787c,_0x3b2d9a={'context':_0x22f495,'width':_0x3bdf3a[_0x74a70a(0x113)],'height':_0x3bdf3a['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat'][_0x74a70a(0xce)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x74a70a(0xba))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x74a70a(0x9f)]})},_0x20336a=this['randomizeParticles'](_0x3bdf3a['maxParticles'],_0x820719),_0x1b9a40=new Float32Array(0x4*_0x3bdf3a['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x3b2d9a),'currentParticlesPosition':Util['createTexture'](_0x3b2d9a,_0x20336a),'nextParticlesPosition':Util[_0x74a70a(0xa6)](_0x3b2d9a,_0x20336a),'currentParticlesSpeed':Util[_0x74a70a(0xa6)](_0x3b2d9a,_0x1b9a40),'nextParticlesSpeed':Util['createTexture'](_0x3b2d9a,_0x1b9a40),'postProcessingPosition':Util['createTexture'](_0x3b2d9a,_0x20336a),'postProcessingSpeed':Util['createTexture'](_0x3b2d9a,_0x1b9a40)};}['randomizeParticles'](_0xea19e4,_0x43d7ed){const _0x6b031e=_0x55787c,_0x12f9a3=new Float32Array(0x4*_0xea19e4);for(let _0x21cd82=0x0;_0x21cd82<_0xea19e4;_0x21cd82++){_0x12f9a3[0x4*_0x21cd82]=Cesium$3['Math']['randomBetween'](_0x43d7ed['lonRange']['x'],_0x43d7ed['lonRange']['y']),_0x12f9a3[0x4*_0x21cd82+0x1]=Cesium$3['Math']['randomBetween'](_0x43d7ed['latRange']['x'],_0x43d7ed['latRange']['y']),_0x12f9a3[0x4*_0x21cd82+0x2]=Cesium$3['Math']['randomBetween'](this['data'][_0x6b031e(0x10f)]['min'],this['data']['lev'][_0x6b031e(0xc2)]),_0x12f9a3[0x4*_0x21cd82+0x3]=0x0;}return _0x12f9a3;}['destroyParticlesTextures'](){const _0x2ebdf0=_0x55787c;Object[_0x2ebdf0(0x10a)](this['particlesTextures'])['forEach'](_0x29fa74=>{const _0x46b563=_0x2ebdf0;this['particlesTextures'][_0x29fa74][_0x46b563(0xb2)]();});}['createComputingPrimitives'](_0x4a0933,_0x3b90a3,_0x55dbd7){const _0x4bb531=_0x55787c,_0x99d4ce=new Cesium$3['Cartesian3'](_0x4a0933[_0x4bb531(0xcb)]['lon'],_0x4a0933['dimensions']['lat'],_0x4a0933[_0x4bb531(0xcb)]['lev']),_0x4aab01=new Cesium$3['Cartesian3'](_0x4a0933['lon']['min'],_0x4a0933[_0x4bb531(0x14f)]['min'],_0x4a0933[_0x4bb531(0x10f)]['min']),_0x378015=new Cesium$3['Cartesian3'](_0x4a0933['lon']['max'],_0x4a0933['lat']['max'],_0x4a0933['lev']['max']),_0x88ab2d=new Cesium$3[(_0x4bb531(0xe4))]((_0x378015['x']-_0x4aab01['x'])/(_0x99d4ce['x']-0x1),(_0x378015['y']-_0x4aab01['y'])/(_0x99d4ce['y']-0x1),_0x99d4ce['z']>0x1?(_0x378015['z']-_0x4aab01['z'])/(_0x99d4ce['z']-0x1):0x1),_0xeb4f15=new Cesium$3['Cartesian2'](_0x4a0933['U'][_0x4bb531(0xec)],_0x4a0933['U']['max']),_0x371b7e=new Cesium$3[(_0x4bb531(0x130))](_0x4a0933['V']['min'],_0x4a0933['V']['max']),_0x507001=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x507001['windTextures']['U'];},'V':function(){return _0x507001['windTextures']['V'];},'currentParticlesPosition':function(){const _0x8c8fb6=_0x4bb531;return _0x507001[_0x8c8fb6(0xcf)]['currentParticlesPosition'];},'dimension':function(){return _0x99d4ce;},'minimum':function(){return _0x4aab01;},'maximum':function(){return _0x378015;},'interval':function(){return _0x88ab2d;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x4bb531(0x107)],'preExecute':function(){const _0x17101e=_0x4bb531;_0x507001['primitives']['getWind']['commandToExecute']['outputTexture']=_0x507001[_0x17101e(0xcf)]['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x52234f=_0x4bb531;return _0x507001[_0x52234f(0xcf)]['currentParticlesSpeed'];},'particlesWind':function(){const _0x14dc3a=_0x4bb531;return _0x507001['particlesTextures'][_0x14dc3a(0x107)];},'uSpeedRange':function(){return _0xeb4f15;},'vSpeedRange':function(){return _0x371b7e;},'pixelSize':function(){return _0x55dbd7['pixelSize'];},'speedFactor':function(){return _0x3b90a3['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this[_0x4bb531(0xcf)]['nextParticlesSpeed'],'preExecute':function(){const _0x5ac039=_0x4bb531,_0x5bcf7d=_0x507001['particlesTextures']['currentParticlesSpeed'];_0x507001[_0x5ac039(0xcf)]['currentParticlesSpeed']=_0x507001['particlesTextures']['postProcessingSpeed'],_0x507001['particlesTextures']['postProcessingSpeed']=_0x5bcf7d,_0x507001['primitives']['updateSpeed']['commandToExecute'][_0x5ac039(0x136)]=_0x507001['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x507001['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){return _0x507001['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures'][_0x4bb531(0x12f)],'preExecute':function(){const _0xbb5c5c=_0x4bb531,_0xd86c6d=_0x507001['particlesTextures']['currentParticlesPosition'];_0x507001['particlesTextures'][_0xbb5c5c(0x115)]=_0x507001['particlesTextures']['postProcessingPosition'],_0x507001[_0xbb5c5c(0xcf)]['postProcessingPosition']=_0xd86c6d,_0x507001['primitives']['updatePosition']['commandToExecute']['outputTexture']=_0x507001['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){const _0x5dc147=_0x4bb531;return _0x507001[_0x5dc147(0xcf)]['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x5a115d=_0x4bb531;return _0x507001['particlesTextures'][_0x5a115d(0xcd)];},'lonRange':function(){const _0x153a3d=_0x4bb531;return _0x55dbd7[_0x153a3d(0x111)];},'latRange':function(){const _0x1f3843=_0x4bb531;return _0x55dbd7[_0x1f3843(0x98)];},'randomCoefficient':function(){const _0x3b4c20=Math['random']();return _0x3b4c20;},'dropRate':function(){return _0x3b90a3['dropRate'];},'dropRateBump':function(){return _0x3b90a3['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x4bb531(0xcf)]['postProcessingPosition'],'preExecute':function(){const _0x59260d=_0x4bb531;_0x507001['primitives']['postProcessingPosition'][_0x59260d(0x13d)]['outputTexture']=_0x507001['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x23b757=_0x4bb531;return _0x507001[_0x23b757(0xcf)]['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x507001['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){_0x507001['primitives']['postProcessingSpeed']['commandToExecute']['outputTexture']=_0x507001['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x42b7f9,_0x56e07e,_0x26e7f4,_0x4f2369){const _0x10b8c9=_0x55787c;this['context']=_0x42b7f9,_0x56e07e={..._0x56e07e},_0x56e07e['udata']&&_0x56e07e['vdata']&&(_0x56e07e['dimensions']={},_0x56e07e['dimensions'][_0x10b8c9(0xaf)]=_0x56e07e[_0x10b8c9(0x121)],_0x56e07e['dimensions']['lat']=_0x56e07e[_0x10b8c9(0xc4)],_0x56e07e['dimensions'][_0x10b8c9(0x10f)]=_0x56e07e['lev']||0x1,_0x56e07e['lon']={},_0x56e07e['lon']['min']=_0x56e07e['xmin'],_0x56e07e['lon']['max']=_0x56e07e[_0x10b8c9(0xfb)],_0x56e07e[_0x10b8c9(0x14f)]={},_0x56e07e['lat']['min']=_0x56e07e[_0x10b8c9(0x144)],_0x56e07e['lat']['max']=_0x56e07e['ymax'],_0x56e07e['lev']={},_0x56e07e[_0x10b8c9(0x10f)]['min']=_0x56e07e['levmin']??0x1,_0x56e07e['lev']['max']=_0x56e07e['levmax']??0x1,_0x56e07e['U']={},_0x56e07e['U'][_0x10b8c9(0x10c)]=new Float32Array(_0x56e07e[_0x10b8c9(0x95)]),_0x56e07e['U']['min']=_0x56e07e['umin']??Math['min'](..._0x56e07e['udata']),_0x56e07e['U']['max']=_0x56e07e['umax']??Math['max'](..._0x56e07e['udata']),_0x56e07e['V']={},_0x56e07e['V'][_0x10b8c9(0x10c)]=new Float32Array(_0x56e07e['vdata']),_0x56e07e['V'][_0x10b8c9(0xec)]=_0x56e07e['vmin']??Math[_0x10b8c9(0xec)](..._0x56e07e['vdata']),_0x56e07e['V']['max']=_0x56e07e['vmax']??Math['max'](..._0x56e07e[_0x10b8c9(0xb4)])),this['data']=_0x56e07e,this['options']=_0x26e7f4,this[_0x10b8c9(0x163)]=_0x4f2369,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this[_0x10b8c9(0xc9)],this[_0x10b8c9(0x146)],this['viewerParameters'],this[_0x10b8c9(0x12d)]);}['canvasResize'](_0x316430){const _0x17e151=_0x55787c;this['particlesComputing']['destroyParticlesTextures'](),Object[_0x17e151(0x10a)](this['particlesComputing'][_0x17e151(0x112)])['forEach'](_0x54c5ec=>{this['particlesComputing']['windTextures'][_0x54c5ec]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x17e151(0xf2)])[_0x17e151(0x105)](_0x2a2ca8=>{this['particlesRendering']['framebuffers'][_0x2a2ca8]['destroy']();}),this['context']=_0x316430,this[_0x17e151(0x12d)]=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x17e151(0x12d)]);}['clearFramebuffers'](){const _0x5174c0=_0x55787c,_0x4deb7b=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object[_0x5174c0(0x10a)](this['particlesRendering'][_0x5174c0(0xf2)])[_0x5174c0(0x105)](_0xd8633c=>{const _0x49000a=_0x5174c0;_0x4deb7b[_0x49000a(0xb6)]=this['particlesRendering'][_0x49000a(0xf2)][_0xd8633c],_0x4deb7b['execute'](this['context']);});}['refreshParticles'](_0x4d9d90){const _0x381f1c=_0x55787c;this['clearFramebuffers'](),this[_0x381f1c(0x12d)]['destroyParticlesTextures'](),this[_0x381f1c(0x12d)]['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x4d9d90){const _0x4ee365=this[_0x381f1c(0x161)]['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives']['segments']['geometry']=_0x4ee365;const _0x595978=Cesium$2['VertexArray'][_0x381f1c(0xd8)]({'context':this['context'],'geometry':_0x4ee365,'attributeLocations':this['particlesRendering']['primitives'][_0x381f1c(0xeb)]['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage'][_0x381f1c(0x9a)]});this[_0x381f1c(0x161)]['primitives']['segments']['commandToExecute']['vertexArray']=_0x595978;}}['setOptions'](_0x4ba9e9){const _0x55033a=_0x55787c;let _0x24b4ba=![];this['options'][_0x55033a(0xa9)]!==_0x4ba9e9['maxParticles']&&(_0x24b4ba=!![]),Object[_0x55033a(0x10a)](_0x4ba9e9)['forEach'](_0x5abb97=>{this['options'][_0x5abb97]=_0x4ba9e9[_0x5abb97];}),this['refreshParticles'](_0x24b4ba);}['applyViewerParameters'](_0x3d553){const _0x494890=_0x55787c;Object['keys'](_0x3d553)[_0x494890(0x105)](_0x89a21c=>{this['viewerParameters'][_0x89a21c]=_0x3d553[_0x89a21c];}),this['refreshParticles'](![]);}['destroy'](){const _0x3f8c9d=_0x55787c;clearTimeout(this['canrefresh']),this[_0x3f8c9d(0x12d)][_0x3f8c9d(0x145)](),Object['keys'](this[_0x3f8c9d(0x12d)][_0x3f8c9d(0x112)])['forEach'](_0x4f47cf=>{this['particlesComputing']['windTextures'][_0x4f47cf]['destroy']();}),this[_0x3f8c9d(0x161)]['textures'][_0x3f8c9d(0x15d)]['destroy'](),Object['keys'](this['particlesRendering'][_0x3f8c9d(0xf2)])[_0x3f8c9d(0x105)](_0x31cec0=>{const _0x129b6f=_0x3f8c9d;this[_0x129b6f(0x161)]['framebuffers'][_0x31cec0][_0x129b6f(0xb2)]();});for(const _0x93786f in this){delete this[_0x93786f];}}}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':[_0x55787c(0x166)]};class WindLayer extends BaseLayer$1{constructor(_0x56f488={}){_0x56f488={...DEF_OPTIONS,..._0x56f488},super(_0x56f488),this['_setOptionsHook'](_0x56f488);}get['layer'](){return this['primitives'];}get['data'](){return this['_data'];}set['data'](_0x52764d){const _0x20fc19=_0x55787c;this[_0x20fc19(0x169)](_0x52764d);}get['colors'](){return this['options']['colors'];}set['colors'](_0x247ae1){const _0x4977e5=_0x55787c;this['options']['colors']=_0x247ae1,this['particleSystem']&&this['particleSystem'][_0x4977e5(0x11d)]({'colors':_0x247ae1}),this[_0x4977e5(0x13c)]();}[_0x55787c(0x114)](){}['_addedHook'](){const _0x37a14b=_0x55787c;this['scene']=this['_map']['scene'],this[_0x37a14b(0x103)]=this['_map']['camera'],this[_0x37a14b(0x16e)]=new Cesium$1['PrimitiveCollection'](),this[_0x37a14b(0xe8)]['scene']['primitives']['add'](this['primitives']),this[_0x37a14b(0x163)]={'lonRange':new Cesium$1[(_0x37a14b(0x130))](),'latRange':new Cesium$1[(_0x37a14b(0x130))](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1[_0x37a14b(0xe4)][_0x37a14b(0x104)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this[_0x37a14b(0x13c)][_0x37a14b(0xf6)](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType'][_0x37a14b(0x109)],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x37a14b(0xfd)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x37a14b(0xb0)],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_data']&&this['setData'](this['_data']);}['_removedHook'](){const _0x594a36=_0x55787c;window['removeEventListener']('resize',this['resize']),this['_map']['off'](mars3d__namespace[_0x594a36(0xc1)]['preRender'],this['_onMap_preRenderEvent'],this),this[_0x594a36(0xe8)]['off'](mars3d__namespace['EventType']['wheel'],this[_0x594a36(0x16d)],this),this['_map'][_0x594a36(0xbd)](mars3d__namespace['EventType'][_0x594a36(0xbf)],this[_0x594a36(0xfd)],this),this[_0x594a36(0xe8)]['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x594a36(0xb7)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this[_0x594a36(0xe8)]['scene']['primitives']['remove'](this['primitives']);}['resize'](){const _0x180ca2=_0x55787c;if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this['_map'][_0x180ca2(0x102)](mars3d__namespace['EventType']['preRender'],this[_0x180ca2(0x13b)],this);}['_onMap_preRenderEvent'](_0x50de2b){const _0x20a600=_0x55787c;this['particleSystem']['canvasResize'](this[_0x20a600(0xa7)]['context']),this[_0x20a600(0x154)](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x2d4d8b){const _0x993214=_0x55787c;clearTimeout(this[_0x993214(0xea)]);if(!this['show']||!this[_0x993214(0x12c)])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}[_0x55787c(0xfd)](_0x4ac89a){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x5c7e84){const _0x2fb1b4=_0x55787c;if(!this[_0x2fb1b4(0xc0)]||!this[_0x2fb1b4(0x12c)])return;this['mouse_down']&&(this['primitives'][_0x2fb1b4(0xc0)]=![],this[_0x2fb1b4(0xa2)]=!![]);}['_onMouseUpEvent'](_0x320479){const _0x2e9afb=_0x55787c;if(!this[_0x2e9afb(0xc0)]||!this[_0x2e9afb(0x12c)])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0x5ea8f9=_0x55787c;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this[_0x5ea8f9(0x12c)][_0x5ea8f9(0x155)](this['viewerParameters']),this[_0x5ea8f9(0x16e)]['show']=!![];}['setData'](_0x5dd0a6){const _0x14088d=_0x55787c;this[_0x14088d(0xa3)]=_0x5dd0a6,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x14088d(0x123)],_0x5dd0a6,this[_0x14088d(0xa5)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x15efc3,_0x534aff){const _0x1ea354=_0x55787c;if(_0x15efc3)for(const _0x64df07 in _0x15efc3){this[_0x64df07]=_0x15efc3[_0x64df07];}this['particleSystem']&&this[_0x1ea354(0x12c)]['setOptions'](this['getOptions']());}['getOptions'](){const _0x415cd4=_0x55787c,_0x43fb7e=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this[_0x415cd4(0x119)]=_0x43fb7e*_0x43fb7e,{'particlesTextureSize':_0x43fb7e,'maxParticles':this[_0x415cd4(0x119)],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this[_0x415cd4(0xe3)],'dropRateBump':this[_0x415cd4(0x108)],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x25a9ea=_0x55787c;this['primitives']['add'](this[_0x25a9ea(0x12c)][_0x25a9ea(0x12d)]['primitives']['getWind']),this['primitives']['add'](this[_0x25a9ea(0x12c)]['particlesComputing']['primitives']['updateSpeed']),this['primitives']['add'](this['particleSystem'][_0x25a9ea(0x12d)][_0x25a9ea(0x16e)]['updatePosition']),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x25a9ea(0x16e)][_0x25a9ea(0xf3)]),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x25a9ea(0x16e)][_0x25a9ea(0x99)]),this[_0x25a9ea(0x16e)][_0x25a9ea(0xa0)](this['particleSystem']['particlesRendering'][_0x25a9ea(0x16e)]['segments']),this[_0x25a9ea(0x16e)]['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this['primitives'][_0x25a9ea(0xa0)](this['particleSystem']['particlesRendering']['primitives']['screen']);}[_0x55787c(0x122)](){const _0xe3fa1e=_0x55787c;let _0x457af1=this[_0xe3fa1e(0x103)]['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x457af1){const _0x2c503b=this[_0xe3fa1e(0xe8)]['getExtent']();_0x457af1=Cesium$1['Rectangle']['fromDegrees'](_0x2c503b['xmin'],_0x2c503b[_0xe3fa1e(0x144)],_0x2c503b['xmax'],_0x2c503b[_0xe3fa1e(0xb8)]);}const _0x37fbad=Util[_0xe3fa1e(0xdc)](_0x457af1);this['viewerParameters']['lonRange']['x']=_0x37fbad['lon']['min'],this['viewerParameters']['lonRange']['y']=_0x37fbad[_0xe3fa1e(0xaf)][_0xe3fa1e(0xc2)],this['viewerParameters'][_0xe3fa1e(0x98)]['x']=_0x37fbad['lat']['min'],this['viewerParameters']['latRange']['y']=_0x37fbad['lat']['max'];const _0x4da1bb=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene'][_0xe3fa1e(0x13f)]);_0x4da1bb>0x0&&(this[_0xe3fa1e(0x163)]['pixelSize']=_0x4da1bb);}}mars3d__namespace['LayerUtil']['register'](_0x55787c(0x12b),WindLayer),mars3d__namespace['layer'][_0x55787c(0xac)]=WindLayer;class CanvasParticle{constructor(){const _0x545d4b=_0x55787c;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x545d4b(0xd7)]=null,this[_0x545d4b(0xa8)]=null;}['destroy'](){for(const _0x328155 in this){delete this[_0x328155];}}}class CanvasWindField{constructor(_0x56db1b){this['setOptions'](_0x56db1b);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x4fd78d){const _0x178aa9=_0x55787c;this[_0x178aa9(0xb3)]=(0x64-(_0x4fd78d>0x63?0x63:_0x4fd78d))*0x64,this[_0x178aa9(0x151)]=[(this['xmax']-this[_0x178aa9(0x131)])/this['_speedRate'],(this['ymax']-this['ymin'])/this[_0x178aa9(0xb3)]];}get['maxAge'](){return this['_maxAge'];}set['maxAge'](_0x4033bd){this['_maxAge']=_0x4033bd;}[_0x55787c(0x11d)](_0x5e2956){const _0x4edba4=_0x55787c;this['options']=_0x5e2956,this['maxAge']=_0x5e2956['maxAge']||0x78,this['speedRate']=_0x5e2956[_0x4edba4(0xd4)]||0x32,this['particles']=[];const _0x14dead=_0x5e2956['particlesNumber']||0x1000;for(let _0x1308b3=0x0;_0x1308b3<_0x14dead;_0x1308b3++){const _0x171c50=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x171c50);}}[_0x55787c(0x16f)](_0x1835e1){const _0x5eebf7=_0x55787c;this[_0x5eebf7(0xc4)]=_0x1835e1['rows'],this['cols']=_0x1835e1['cols'],this['xmin']=_0x1835e1['xmin'],this['xmax']=_0x1835e1['xmax'],this['ymin']=_0x1835e1[_0x5eebf7(0x144)],this['ymax']=_0x1835e1['ymax'],this['grid']=[];const _0x5897b6=_0x1835e1['udata'],_0x45ec33=_0x1835e1['vdata'];let _0x1c72ef=![];_0x5897b6[_0x5eebf7(0xdd)]===this['rows']&&_0x5897b6[0x0]['length']===this['cols']&&(_0x1c72ef=!![]);let _0x2fd230=0x0,_0x3d6a7e=null,_0x2e5888=null;for(let _0x25d19e=0x0;_0x25d19e<this['rows'];_0x25d19e++){_0x3d6a7e=[];for(let _0x5e5490=0x0;_0x5e5490<this['cols'];_0x5e5490++,_0x2fd230++){_0x1c72ef?_0x2e5888=this['_calcUV'](_0x5897b6[_0x25d19e][_0x5e5490],_0x45ec33[_0x25d19e][_0x5e5490]):_0x2e5888=this['_calcUV'](_0x5897b6[_0x2fd230],_0x45ec33[_0x2fd230]),_0x3d6a7e[_0x5eebf7(0xef)](_0x2e5888);}this['grid']['push'](_0x3d6a7e);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x4b3437=_0x55787c;delete this[_0x4b3437(0xc4)],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}[_0x55787c(0x94)](_0x37497a,_0x1a2997){const _0x108adc=_0x55787c,_0x45ea97=(_0x37497a-this[_0x108adc(0x131)])/(this['xmax']-this[_0x108adc(0x131)])*(this['cols']-0x1),_0x5e954f=(this[_0x108adc(0xb8)]-_0x1a2997)/(this['ymax']-this[_0x108adc(0x144)])*(this['rows']-0x1);return[_0x45ea97,_0x5e954f];}['getUVByXY'](_0x266193,_0x58dd8f){const _0x47af92=_0x55787c;if(_0x266193<0x0||_0x266193>=this[_0x47af92(0x121)]||_0x58dd8f>=this['rows'])return[0x0,0x0,0x0];const _0x416d2d=Math['floor'](_0x266193),_0x4ee3a6=Math['floor'](_0x58dd8f);if(_0x416d2d===_0x266193&&_0x4ee3a6===_0x58dd8f)return this['grid'][_0x58dd8f][_0x266193];const _0x3794c4=_0x416d2d+0x1,_0x3ce5c1=_0x4ee3a6+0x1,_0x101f22=this[_0x47af92(0xe6)](_0x416d2d,_0x4ee3a6),_0x87be59=this[_0x47af92(0xe6)](_0x3794c4,_0x4ee3a6),_0x142b31=this['getUVByXY'](_0x416d2d,_0x3ce5c1),_0x4cbba9=this['getUVByXY'](_0x3794c4,_0x3ce5c1);let _0x18996e=null;try{_0x18996e=this[_0x47af92(0x16b)](_0x266193-_0x416d2d,_0x58dd8f-_0x4ee3a6,_0x101f22,_0x87be59,_0x142b31,_0x4cbba9);}catch(_0x369fee){console['log'](_0x266193,_0x58dd8f);}return _0x18996e;}['_bilinearInterpolation'](_0x326a5b,_0x4b9735,_0x38e19f,_0x25406e,_0x2f813d,_0x2b49e2){const _0x3c0f33=0x1-_0x326a5b,_0x39e4cf=0x1-_0x4b9735,_0x7c292d=_0x3c0f33*_0x39e4cf,_0x31b05f=_0x326a5b*_0x39e4cf,_0x3703d8=_0x3c0f33*_0x4b9735,_0x8f9d0d=_0x326a5b*_0x4b9735,_0x3fa790=_0x38e19f[0x0]*_0x7c292d+_0x25406e[0x0]*_0x31b05f+_0x2f813d[0x0]*_0x3703d8+_0x2b49e2[0x0]*_0x8f9d0d,_0x4f88a9=_0x38e19f[0x1]*_0x7c292d+_0x25406e[0x1]*_0x31b05f+_0x2f813d[0x1]*_0x3703d8+_0x2b49e2[0x1]*_0x8f9d0d;return this['_calcUV'](_0x3fa790,_0x4f88a9);}[_0x55787c(0xee)](_0x2840d7,_0x450d37){return[+_0x2840d7,+_0x450d37,Math['sqrt'](_0x2840d7*_0x2840d7+_0x450d37*_0x450d37)];}['getUVByPoint'](_0x4975c4,_0x29e8b1){if(!this['isInExtent'](_0x4975c4,_0x29e8b1))return null;const _0x3782bf=this['toGridXY'](_0x4975c4,_0x29e8b1),_0x1f8992=this['getUVByXY'](_0x3782bf[0x0],_0x3782bf[0x1]);return _0x1f8992;}['isInExtent'](_0x396a4e,_0x98ff64){const _0x541493=_0x55787c;return _0x396a4e>=this[_0x541493(0x131)]&&_0x396a4e<=this[_0x541493(0xfb)]&&_0x98ff64>=this[_0x541493(0x144)]&&_0x98ff64<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x2fb677=_0x55787c,_0x8c017=fRandomByfloat(this['xmin'],this[_0x2fb677(0xfb)]),_0x6d4e4e=fRandomByfloat(this[_0x2fb677(0x144)],this['ymax']);return{'lat':_0x6d4e4e,'lng':_0x8c017};}['getParticles'](){const _0x5ed161=_0x55787c;let _0xb2b215,_0x41f1e9,_0x3d8543;for(let _0x392263=0x0,_0x1348b7=this['particles']['length'];_0x392263<_0x1348b7;_0x392263++){let _0x11a69b=this['particles'][_0x392263];_0x11a69b['age']<=0x0&&(_0x11a69b=this['_randomParticle'](_0x11a69b));if(_0x11a69b['age']>0x0){const _0x10c3d0=_0x11a69b[_0x5ed161(0x96)],_0x9ac72a=_0x11a69b['tlat'];_0x3d8543=this['getUVByPoint'](_0x10c3d0,_0x9ac72a),_0x3d8543?(_0xb2b215=_0x10c3d0+this['_calc_speedRate'][0x0]*_0x3d8543[0x0],_0x41f1e9=_0x9ac72a+this['_calc_speedRate'][0x1]*_0x3d8543[0x1],_0x11a69b['lng']=_0x10c3d0,_0x11a69b[_0x5ed161(0x14f)]=_0x9ac72a,_0x11a69b['tlng']=_0xb2b215,_0x11a69b['tlat']=_0x41f1e9,_0x11a69b[_0x5ed161(0xa8)]--):_0x11a69b['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x34a162){const _0x48af14=_0x55787c;let _0x2c9685,_0x507573;for(let _0x17926c=0x0;_0x17926c<0x1e;_0x17926c++){_0x2c9685=this[_0x48af14(0x168)](),_0x507573=this['getUVByPoint'](_0x2c9685['lng'],_0x2c9685['lat']);if(_0x507573&&_0x507573[0x2]>0x0)break;}if(!_0x507573)return _0x34a162;const _0x1523a1=_0x2c9685['lng']+this['_calc_speedRate'][0x0]*_0x507573[0x0],_0x4e8756=_0x2c9685['lat']+this['_calc_speedRate'][0x1]*_0x507573[0x1];return _0x34a162['lng']=_0x2c9685['lng'],_0x34a162['lat']=_0x2c9685['lat'],_0x34a162['tlng']=_0x1523a1,_0x34a162['tlat']=_0x4e8756,_0x34a162['age']=Math[_0x48af14(0x159)](Math['random']()*this['maxAge']),_0x34a162;}[_0x55787c(0xb2)](){for(const _0x456e95 in this){delete this[_0x456e95];}}}function fRandomByfloat(_0xa8322b,_0x165b7f){return _0xa8322b+Math['random']()*(_0x165b7f-_0xa8322b);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x55787c(0xb9)][_0x55787c(0xda)];class CanvasWindLayer extends BaseLayer{constructor(_0x3cb11d={}){super(_0x3cb11d),this['_setOptionsHook'](_0x3cb11d),this['canvas']=null;}['_setOptionsHook'](_0x1fd621,_0x18fd9f){const _0x492f46=_0x55787c;this['frameTime']=0x3e8/(_0x1fd621[_0x492f46(0xed)]||0xa),this[_0x492f46(0xae)]=this['options']['pointerEvents']??![],this['color']=_0x1fd621['color']||'#ffffff',this['lineWidth']=_0x1fd621['lineWidth']||0x1,this[_0x492f46(0xa4)]=_0x1fd621[_0x492f46(0xa4)]??0x0,this['reverseY']=_0x1fd621[_0x492f46(0x11b)]??![],this['windField']&&this['windField'][_0x492f46(0x11d)](_0x1fd621);}get[_0x55787c(0xb9)](){const _0x22bbc3=_0x55787c;return this[_0x22bbc3(0xc8)];}get['canvasWidth'](){const _0x3d27fe=_0x55787c;return this[_0x3d27fe(0xe8)][_0x3d27fe(0xa7)]['canvas']['clientWidth'];}get['canvasHeight'](){const _0x1fa35d=_0x55787c;return this['_map']['scene']['canvas'][_0x1fa35d(0x149)];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0x55787c(0x11e)](_0x2b20ef){const _0x3efa01=_0x55787c;this['_pointerEvents']=_0x2b20ef;if(!this[_0x3efa01(0xc8)])return;_0x2b20ef?this[_0x3efa01(0xc8)]['style']['pointer-events']='all':this['canvas']['style'][_0x3efa01(0xbb)]=_0x3efa01(0xde);}get['particlesNumber'](){const _0x43a72e=_0x55787c;return this[_0x43a72e(0x146)][_0x43a72e(0x119)];}set['particlesNumber'](_0x29639b){const _0x32f608=_0x55787c;this['options']['particlesNumber']=_0x29639b,clearTimeout(this['_canrefresh']),this[_0x32f608(0x143)]=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x37a586){const _0x25587b=_0x55787c;this[_0x25587b(0x146)]['speedRate']=_0x37a586,this['windField']&&(this['windField']['speedRate']=_0x37a586);}get[_0x55787c(0xd3)](){const _0x528824=_0x55787c;return this['options'][_0x528824(0xd3)];}set['maxAge'](_0x55982b){const _0x559eed=_0x55787c;this['options']['maxAge']=_0x55982b,this['windField']&&(this[_0x559eed(0x16c)]['maxAge']=_0x55982b);}get['data'](){const _0x4ca0fa=_0x55787c;return this[_0x4ca0fa(0x14c)];}set['data'](_0x35d141){this['setData'](_0x35d141);}['_showHook'](_0x4f46e4){const _0x4fc179=_0x55787c;_0x4f46e4?this[_0x4fc179(0x12e)]():(this[_0x4fc179(0x14c)]&&(this[_0x4fc179(0x146)]['data']=this[_0x4fc179(0x14c)]),this['_removedHook']());}['_mountedHook'](){const _0x708acc=_0x55787c;this['options'][_0x708acc(0x15f)]?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x393c79=_0x55787c;this[_0x393c79(0xc8)]=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x393c79(0xf1)](),this[_0x393c79(0x146)]['data']&&this[_0x393c79(0x169)](this['options'][_0x393c79(0xc9)]);}['_removedHook'](){const _0x2d378f=_0x55787c;this['clear'](),this['unbindEvent'](),this[_0x2d378f(0xc8)]&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x3ef515=_0x55787c,_0x4e8747=mars3d__namespace['DomUtil']['create'](_0x3ef515(0xc8),_0x3ef515(0x101),this['_map'][_0x3ef515(0x11a)]);return _0x4e8747[_0x3ef515(0xf8)]['position']='absolute',_0x4e8747[_0x3ef515(0xf8)]['top']='0px',_0x4e8747['style']['left']='0px',_0x4e8747['style']['width']=this['_map']['scene'][_0x3ef515(0xc8)][_0x3ef515(0x133)]+'px',_0x4e8747[_0x3ef515(0xf8)]['height']=this['_map'][_0x3ef515(0xa7)]['canvas']['clientHeight']+'px',_0x4e8747['style'][_0x3ef515(0x11e)]=this['_pointerEvents']?'auto':'none',_0x4e8747[_0x3ef515(0xf8)]['zIndex']=this[_0x3ef515(0x146)]['zIndex']??0x9,_0x4e8747['width']=this[_0x3ef515(0xe8)]['scene']['canvas']['clientWidth'],_0x4e8747[_0x3ef515(0x140)]=this[_0x3ef515(0xe8)]['scene']['canvas'][_0x3ef515(0x149)],_0x4e8747;}['resize'](){const _0x5bc353=_0x55787c;this['canvas']&&(this['canvas'][_0x5bc353(0xf8)]['width']=this['_map']['scene'][_0x5bc353(0xc8)]['clientWidth']+'px',this['canvas']['style']['height']=this[_0x5bc353(0xe8)][_0x5bc353(0xa7)]['canvas']['clientHeight']+'px',this['canvas']['width']=this[_0x5bc353(0xe8)]['scene'][_0x5bc353(0xc8)]['clientWidth'],this['canvas']['height']=this[_0x5bc353(0xe8)]['scene']['canvas'][_0x5bc353(0x149)]);}['bindEvent'](){const _0x2eaaa8=_0x55787c,_0x5efaae=this;let _0x3180a5=Date[_0x2eaaa8(0xe9)]();(function _0x19b84b(){const _0x29c9d0=_0x2eaaa8;_0x5efaae['animateFrame']=window[_0x29c9d0(0xe1)](_0x19b84b);if(_0x5efaae[_0x29c9d0(0xc0)]&&_0x5efaae['windField']){const _0x29c8e0=Date[_0x29c9d0(0xe9)](),_0x28729a=_0x29c8e0-_0x3180a5;_0x28729a>_0x5efaae['frameTime']&&(_0x3180a5=_0x29c8e0-_0x28729a%_0x5efaae[_0x29c9d0(0xcc)],_0x5efaae['update']());}}(),window[_0x2eaaa8(0x9c)]('resize',this[_0x2eaaa8(0x13c)]['bind'](this),![]),this['mouse_down']=![],this[_0x2eaaa8(0xa2)]=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x2eaaa8(0x16d)],this),this[_0x2eaaa8(0xe8)]['on'](mars3d__namespace[_0x2eaaa8(0xc1)][_0x2eaaa8(0xbf)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x2eaaa8(0xc1)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x6a01a8=_0x55787c;window[_0x6a01a8(0x138)](this[_0x6a01a8(0x11c)]),delete this['animateFrame'],window[_0x6a01a8(0xc7)]('resize',this[_0x6a01a8(0x13c)]),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace[_0x6a01a8(0xc1)]['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace[_0x6a01a8(0xc1)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x6a01a8(0x157)],this));}['_onMapWhellEvent'](_0x5b64cf){clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas']['style']['visibility']='hidden',this['refreshTimer']=setTimeout(()=>{const _0x267215=_0x540d;if(!this[_0x267215(0xc0)])return;this['redraw'](),this['canvas']['style']['visibility']=_0x267215(0xab);},0xc8);}[_0x55787c(0xfd)](_0x549ad4){const _0x165baa=_0x55787c;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace[_0x165baa(0xc1)]['mouseMove'],this[_0x165baa(0x157)],this);}[_0x55787c(0x157)](_0x2db880){const _0x4ca7ea=_0x55787c;if(!this[_0x4ca7ea(0xc0)]||!this[_0x4ca7ea(0xc8)])return;this['mouse_down']&&(this['canvas']['style']['visibility']=_0x4ca7ea(0xd6),this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x8a1f72){const _0x4abdd2=_0x55787c;if(!this['show']||!this[_0x4abdd2(0xc8)])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['canvas']['style']['visibility']='visible',this[_0x4abdd2(0x129)]=![],this['mouse_move']=![];}[_0x55787c(0x169)](_0x24563f){const _0x1d3dd1=_0x55787c;this[_0x1d3dd1(0x153)](),this[_0x1d3dd1(0x14c)]=_0x24563f,this['windField']['setDate'](_0x24563f),this['redraw']();}[_0x55787c(0xd5)](){const _0xc9336c=_0x55787c;if(!this[_0xc9336c(0xc0)])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){const _0x1d20ad=_0x55787c;if(this['_updateIng'])return;this['_updateIng']=!![];if(this[_0x1d20ad(0x15f)])this['windField']['update']();else{const _0x39135f=this['windField'][_0x1d20ad(0xf5)]();this[_0x1d20ad(0x142)](_0x39135f);}this['_updateIng']=![];}[_0x55787c(0x142)](_0x313ce0){const _0x5660c7=_0x55787c;this['canvasContext']['globalCompositeOperation']='destination-in',this[_0x5660c7(0x124)]['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext'][_0x5660c7(0x97)]=0.9,this['canvasContext']['beginPath'](),this['canvasContext'][_0x5660c7(0x126)]=this['lineWidth'],this['canvasContext']['strokeStyle']=this['color'];const _0x9fabf3=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x2e3c0f=this['canvasWidth']*0.25;for(let _0x2ba329=0x0,_0x3e4d3d=_0x313ce0['length'];_0x2ba329<_0x3e4d3d;_0x2ba329++){const _0x133472=_0x313ce0[_0x2ba329],_0x464fa0=this['_tomap'](_0x133472['lng'],_0x133472['lat'],_0x133472),_0x240988=this['_tomap'](_0x133472['tlng'],_0x133472['tlat'],_0x133472);if(!_0x464fa0||!_0x240988)continue;if(_0x9fabf3&&Math['abs'](_0x464fa0[0x0]-_0x240988[0x0])>=_0x2e3c0f)continue;this[_0x5660c7(0x124)]['moveTo'](_0x464fa0[0x0],_0x464fa0[0x1]),this['canvasContext']['lineTo'](_0x240988[0x0],_0x240988[0x1]);}this[_0x5660c7(0x124)]['stroke']();}['_tomap'](_0x5dc5d8,_0x29dd47,_0x28f872){const _0x44c8c8=_0x55787c,_0x3f3093=Cesium['Cartesian3']['fromDegrees'](_0x5dc5d8,_0x29dd47,this['fixedHeight']),_0x2c62bf=this['_map']['scene'];if(_0x2c62bf['mode']===Cesium[_0x44c8c8(0x128)]['SCENE3D']){const _0x70bcb0=new Cesium['EllipsoidalOccluder'](_0x2c62bf['globe'][_0x44c8c8(0xdf)],_0x2c62bf['camera'][_0x44c8c8(0x110)]),_0xe9f21d=_0x70bcb0['isPointVisible'](_0x3f3093);if(!_0xe9f21d)return _0x28f872['age']=0x0,null;}const _0x3b5184=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x44c8c8(0xe8)][_0x44c8c8(0xa7)],_0x3f3093);return _0x3b5184?[_0x3b5184['x'],_0x3b5184['y']]:null;}[_0x55787c(0x153)](){const _0x57572a=_0x55787c;this['windField']['clear'](),delete this[_0x57572a(0x14c)];}['initWorker'](){const _0xee72c0=_0x55787c;this['worker']=new Worker(this[_0xee72c0(0x146)]['worker']),this[_0xee72c0(0x15f)][_0xee72c0(0x162)]=_0x8bc59f=>{this['_drawLines'](_0x8bc59f['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x16649b=>{const _0x3d66c8=_0xee72c0;this[_0x3d66c8(0x15f)]['postMessage']({'type':'init','options':_0x16649b});},'setOptions':_0x1abeeb=>{const _0x50b77b=_0xee72c0;this['worker'][_0x50b77b(0x16a)]({'type':_0x50b77b(0x11d),'options':_0x1abeeb});},'setDate':_0x2db6f4=>{this['worker']['postMessage']({'type':'setDate','data':_0x2db6f4});},'update':()=>{const _0x1a4f47=_0xee72c0;if(this[_0x1a4f47(0x160)])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField']['init'](this[_0xee72c0(0x146)]);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x55787c(0x134)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x55787c(0xe7)]=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,_0x55787c(0x132),{'value':!![]});
|
|
14
|
+
'use strict';const _0x506409=_0x1e80;function _0x539a(){const _0x55ae12=['Cesium','sin','addEventListener','LUMINANCE','Color','segments','reverse','647624AIMbWq','canvasHeight','createComputingPrimitives','ShaderSource','ComponentDatatype','GeometryAttributes','show','atan2','data','latRange','getPixelSize','_pointerEvents','_bilinearInterpolation','min','pointer-events','createRenderingTextures','particlesRendering','resize','vertexArray','maxParticles','destroyParticlesTextures','once','pow','//\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','fillRect','lat','length','FLOAT','vertexShaderSource','mouse_down','array','trails','createParticlesTextures','clearCommand','createRenderingPrimitives','ShaderProgram','particlesTextures','updateViewerParameters','width','fadeOpacity','isDestroyed','canrefresh','age','postProcessingSpeed','Pass','207250hdHkab','initWorker','createRenderingFramebuffers','randomBetween','mouse_move','_removedHook','ymin','screen','beginPath','2920437EsEsFh','none','viewport','source','getOptions','_setOptionsHook','fragmentShaderSource','viewerParameters','grid','commandType','NEAREST','_updateIng','geometry','position','bindEvent','_onMouseUpEvent','hidden','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','visibility','globeBoundingSphere','refreshParticles','framebuffer','RenderState','drawingBufferWidth','getParticles','postMessage','pixelSize','preExecute','wheel','nextParticlesSpeed','5iKGxWy','_speedRate','vdata','canvasContext','_map','particlesWind','preRender','lineWidth','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','randomizeParticles','color','worker','_onMapWhellEvent','DISABLE_GL_POSITION_LOG_DEPTH','tlng','depthTexture','dimensions','toDegrees','OPAQUE','44376IqPpDM','TRIANGLES','BaseLayer','create','createTexture','98203BLgank','removeAll','max','windField','layer','16lYUkVy','shaderProgram','_addedHook','push','canvasWidth','mouseMove','mod','maxAge','currentTrails','nextTrailsColor','_canrefresh','speedRate','currentTrailsDepth','particlesComputing','__esModule','removeEventListener','createRawRenderState','ellipsoid','particlesTextureSize','_calc_speedRate','getRandomLatLng','_calcUV','getUVByXY','setData','_tomap','forEach','EventType','random','destroy','lng','lev','createCommand','options','BufferUsage','xmax','198093oPwQuh','particlesNumber','currentParticlesPosition','409480LpScHe','keys','uniformMap','nextTrails','CanvasWindLayer','mouseDown','addPrimitives','lineTo','windTextures','textures','getDefaultRenderState','commandToExecute','udata','canvasResize','isInExtent','primitives','setDate','toGridXY','WindLayer','clear','colors','PI_OVER_THREE','globalAlpha','ymax','Math','pointerEvents','_data','framebuffers','outputTexture','Cartesian3','init','_onMouseMoveEvent','_onMap_preRenderEvent','now','defineProperty','Compute','lon','createFramebuffer','removeChild','Cartesian2','TWO_PI','Sampler','particleSystem','off','execute','getExtent','redraw','lonRange','DepthFunction','scene','updatePosition','fromGeometry','TextureMinificationFilter','clientWidth','animateFrame','particles','add','xmin','SceneMode','currentParticlesSpeed','camera','cols','canvas','context','_maxAge','style','PixelFormat','_onMouseDownEvent'];_0x539a=function(){return _0x55ae12;};return _0x539a();}(function(_0xae62f8,_0x1d6e76){const _0xa80624=_0x1e80,_0x4a25ef=_0xae62f8();while(!![]){try{const _0x242fd5=-parseInt(_0xa80624(0x18e))/0x1+-parseInt(_0xa80624(0x116))/0x2+parseInt(_0xa80624(0x113))/0x3+parseInt(_0xa80624(0x161))/0x4+parseInt(_0xa80624(0x1b5))/0x5*(-parseInt(_0xa80624(0x1c8))/0x6)+-parseInt(_0xa80624(0x1cd))/0x7*(parseInt(_0xa80624(0x1d2))/0x8)+parseInt(_0xa80624(0x197))/0x9;if(_0x242fd5===_0x1d6e76)break;else _0x4a25ef['push'](_0x4a25ef['shift']());}catch(_0x2069b4){_0x4a25ef['push'](_0x4a25ef['shift']());}}}(_0x539a,0x19a1a));function _interopNamespace(_0x5eeca7){const _0x361e15=_0x1e80;if(_0x5eeca7&&_0x5eeca7[_0x361e15(0x1e0)])return _0x5eeca7;var _0x16adff=Object[_0x361e15(0x1cb)](null);return _0x5eeca7&&Object['keys'](_0x5eeca7)['forEach'](function(_0x4703dc){const _0x1e4674=_0x361e15;if(_0x4703dc!=='default'){var _0x40d920=Object['getOwnPropertyDescriptor'](_0x5eeca7,_0x4703dc);Object[_0x1e4674(0x138)](_0x16adff,_0x4703dc,_0x40d920['get']?_0x40d920:{'enumerable':!![],'get':function(){return _0x5eeca7[_0x4703dc];}});}}),_0x16adff['default']=_0x5eeca7,_0x16adff;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x45692d,_0x4d361a){const _0x16d00a=_0x1e80,_0x4bbfc0=_0x45692d*Math['cos'](Cesium$7[_0x16d00a(0x12e)]['toRadians'](_0x4d361a));return _0x4bbfc0;}function getV(_0x170004,_0x22d66f){const _0x58f00d=_0x1e80,_0x56dd02=_0x170004*Math[_0x58f00d(0x15b)](Cesium$7['Math']['toRadians'](_0x22d66f));return _0x56dd02;}function getSpeed(_0x3da895,_0x7f0898){const _0x182ad3=_0x1e80,_0x4b201b=Math['sqrt'](Math['pow'](_0x3da895,0x2)+Math[_0x182ad3(0x177)](_0x7f0898,0x2));return _0x4b201b;}function getDirection(_0x1144bb,_0x45d326){const _0x59e058=_0x1e80;let _0x6246a7=Cesium$7['Math']['toDegrees'](Math[_0x59e058(0x168)](_0x45d326,_0x1144bb));return _0x6246a7+=_0x6246a7<0x0?0x168:0x0,_0x6246a7;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x39a3b1){const _0x173f97=_0x1e80;this[_0x173f97(0x1a0)]=_0x39a3b1['commandType'],this['geometry']=_0x39a3b1[_0x173f97(0x1a3)],this['attributeLocations']=_0x39a3b1['attributeLocations'],this['primitiveType']=_0x39a3b1['primitiveType'],this['uniformMap']=_0x39a3b1[_0x173f97(0x118)],this['vertexShaderSource']=_0x39a3b1['vertexShaderSource'],this['fragmentShaderSource']=_0x39a3b1[_0x173f97(0x19d)],this['rawRenderState']=_0x39a3b1['rawRenderState'],this['framebuffer']=_0x39a3b1[_0x173f97(0x1ac)],this['outputTexture']=_0x39a3b1[_0x173f97(0x132)],this['autoClear']=_0x39a3b1['autoClear']??![],this[_0x173f97(0x1b2)]=_0x39a3b1[_0x173f97(0x1b2)],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x173f97(0x18d)]['OPAQUE']}));}[_0x506409(0x10f)](_0x3a0fb3){const _0x4c9702=_0x506409;switch(this['commandType']){case'Draw':{const _0x3b3bf9=Cesium$6['VertexArray']['fromGeometry']({'context':_0x3a0fb3,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x4c9702(0x111)]['STATIC_DRAW']}),_0x4874ce=Cesium$6[_0x4c9702(0x184)]['fromCache']({'context':_0x3a0fb3,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this[_0x4c9702(0x17d)],'fragmentShaderSource':this[_0x4c9702(0x19d)]}),_0x46981c=Cesium$6[_0x4c9702(0x1ad)]['fromCache'](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x4874ce,'vertexArray':_0x3b3bf9,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x46981c,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this[_0x4c9702(0x118)],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x14c008,_0x1b29f9){const _0x5968c0=_0x506409;this[_0x5968c0(0x1a3)]=_0x1b29f9;const _0x261fb3=Cesium$6['VertexArray']['fromGeometry']({'context':_0x14c008,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute'][_0x5968c0(0x173)]=_0x261fb3;}['update'](_0x420150){const _0xf73624=_0x506409;if(!this['show'])return;if(_0x420150['mode']!==Cesium$6[_0xf73624(0x150)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x420150['context'])),Cesium$6['defined'](this[_0xf73624(0x1b2)])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x420150['commandList']['push'](this['clearCommand']),_0x420150['commandList']['push'](this['commandToExecute']);}[_0x506409(0x189)](){return![];}['destroy'](){const _0x41b113=_0x506409;if(this[_0x41b113(0x182)]){var _0x63d30a,_0x17c81f;(_0x63d30a=this[_0x41b113(0x182)])!==null&&_0x63d30a!==void 0x0&&_0x63d30a[_0x41b113(0x173)]&&this[_0x41b113(0x182)][_0x41b113(0x173)][_0x41b113(0x1ee)](),(_0x17c81f=this[_0x41b113(0x182)])!==null&&_0x17c81f!==void 0x0&&_0x17c81f['shaderProgram']&&this['clearCommand'][_0x41b113(0x1d3)]['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this[_0x41b113(0x121)]['vertexArray'][_0x41b113(0x1ee)](),this['commandToExecute']['shaderProgram']&&this['commandToExecute'][_0x41b113(0x1d3)][_0x41b113(0x1ee)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x1fa1fd=function(){const _0x1e4f8a=_0x1e80,_0x400d57=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5[_0x1e4f8a(0x165)]['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x400d57;},_0x1b5ddc=function(_0x2048cb,_0x2770b1){const _0x5a6581=_0x1e80;if(Cesium$5['defined'](_0x2770b1)){const _0x1379fa={};_0x1379fa['arrayBufferView']=_0x2770b1,_0x2048cb[_0x5a6581(0x19a)]=_0x1379fa;}const _0x5e3408=new Cesium$5['Texture'](_0x2048cb);return _0x5e3408;},_0x5e7788=function(_0x3b9d09,_0x3bd85f,_0x44b26d){const _0x2c528b=new Cesium$5['Framebuffer']({'context':_0x3b9d09,'colorTextures':[_0x3bd85f],'depthTexture':_0x44b26d});return _0x2c528b;},_0x688ab7=function(_0x586958){const _0x4e9b25=_0x1e80,_0x53ea8e=!![],_0x10126a=![],_0x9da9c8={'viewport':_0x586958[_0x4e9b25(0x199)],'depthTest':_0x586958['depthTest'],'depthMask':_0x586958['depthMask'],'blending':_0x586958['blending']},_0x5310c5=Cesium$5['Appearance'][_0x4e9b25(0x120)](_0x53ea8e,_0x10126a,_0x9da9c8);return _0x5310c5;},_0xf9ae34=function(_0x5a508e){const _0x4bda59=_0x1e80,_0x5f0c32={},_0x52e455=Cesium$5['Math'][_0x4bda59(0x1d8)](_0x5a508e['west'],Cesium$5['Math']['TWO_PI']),_0x92a1c6=Cesium$5['Math'][_0x4bda59(0x1d8)](_0x5a508e['east'],Cesium$5['Math']['TWO_PI']),_0x56094c=_0x5a508e[_0x4bda59(0x187)];let _0x500b7c,_0x594f6c;_0x56094c>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x500b7c=0x0,_0x594f6c=Cesium$5[_0x4bda59(0x12e)][_0x4bda59(0x13e)]):_0x92a1c6-_0x52e455<_0x56094c?(_0x500b7c=_0x52e455,_0x594f6c=_0x52e455+_0x56094c):(_0x500b7c=_0x52e455,_0x594f6c=_0x92a1c6);_0x5f0c32['lon']={'min':Cesium$5['Math']['toDegrees'](_0x500b7c),'max':Cesium$5['Math'][_0x4bda59(0x1c6)](_0x594f6c)};const _0x35440f=_0x5a508e['south'],_0x3aafca=_0x5a508e['north'],_0x243959=_0x5a508e['height'],_0x13ebf2=_0x243959>Cesium$5['Math']['PI']/0xc?_0x243959/0x2:0x0;let _0x3041bd=Cesium$5[_0x4bda59(0x12e)]['clampToLatitudeRange'](_0x35440f-_0x13ebf2),_0x505d64=Cesium$5['Math']['clampToLatitudeRange'](_0x3aafca+_0x13ebf2);return _0x3041bd<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x3041bd=-Cesium$5['Math']['PI_OVER_TWO']),_0x505d64>Cesium$5['Math'][_0x4bda59(0x12b)]&&(_0x505d64=Cesium$5['Math']['PI_OVER_TWO']),_0x5f0c32['lat']={'min':Cesium$5['Math']['toDegrees'](_0x3041bd),'max':Cesium$5['Math']['toDegrees'](_0x505d64)},_0x5f0c32;};return{'getFullscreenQuad':_0x1fa1fd,'createTexture':_0x1b5ddc,'createFramebuffer':_0x5e7788,'createRawRenderState':_0x688ab7,'viewRectangleToLonLatRange':_0xf9ae34};}());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=_0x506409(0x1bd),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=_0x506409(0x1a8);const Cesium$4=mars3d__namespace[_0x506409(0x15a)];class ParticlesRendering{constructor(_0x59c2ce,_0x4bdb63,_0x3136e2,_0x352ddd,_0x14a5fc){const _0x1e0fb5=_0x506409;this['createRenderingTextures'](_0x59c2ce,_0x4bdb63,_0x3136e2['colors']),this['createRenderingFramebuffers'](_0x59c2ce),this[_0x1e0fb5(0x183)](_0x59c2ce,_0x3136e2,_0x352ddd,_0x14a5fc);}[_0x506409(0x170)](_0x37997e,_0x523906,_0x1d72d5){const _0x499474=_0x506409,_0x2193a0={'context':_0x37997e,'width':_0x37997e['drawingBufferWidth'],'height':_0x37997e['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x5d55e2={'context':_0x37997e,'width':_0x37997e[_0x499474(0x1ae)],'height':_0x37997e['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x499474(0x158)]['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x4b1510=_0x1d72d5['length'],_0x253a97=new Float32Array(_0x4b1510*0x3);for(let _0x38111a=0x0;_0x38111a<_0x4b1510;_0x38111a++){const _0x223d6a=Cesium$4['Color']['fromCssColorString'](_0x1d72d5[_0x38111a]);_0x253a97[0x3*_0x38111a]=_0x223d6a['red'],_0x253a97[0x3*_0x38111a+0x1]=_0x223d6a['green'],_0x253a97[0x3*_0x38111a+0x2]=_0x223d6a['blue'];}const _0x498b2a={'context':_0x37997e,'width':_0x4b1510,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x499474(0x17c)],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this[_0x499474(0x11f)]={'segmentsColor':Util['createTexture'](_0x2193a0),'segmentsDepth':Util[_0x499474(0x1cc)](_0x5d55e2),'currentTrailsColor':Util['createTexture'](_0x2193a0),'currentTrailsDepth':Util[_0x499474(0x1cc)](_0x5d55e2),'nextTrailsColor':Util[_0x499474(0x1cc)](_0x2193a0),'nextTrailsDepth':Util[_0x499474(0x1cc)](_0x5d55e2),'colorTable':Util['createTexture'](_0x498b2a,_0x253a97)};}[_0x506409(0x190)](_0x8f1cba){const _0x3597e3=_0x506409;this['framebuffers']={'segments':Util[_0x3597e3(0x13b)](_0x8f1cba,this['textures']['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x8f1cba,this['textures']['currentTrailsColor'],this['textures'][_0x3597e3(0x1de)]),'nextTrails':Util['createFramebuffer'](_0x8f1cba,this[_0x3597e3(0x11f)][_0x3597e3(0x1db)],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x459d8f){const _0x167558=_0x506409,_0x1b3249=0x4;let _0x473657=[];for(let _0xc34e42=0x0;_0xc34e42<_0x459d8f['particlesTextureSize'];_0xc34e42++){for(let _0x1f299f=0x0;_0x1f299f<_0x459d8f[_0x167558(0x1e4)];_0x1f299f++){for(let _0x18c11c=0x0;_0x18c11c<_0x1b3249;_0x18c11c++){_0x473657['push'](_0xc34e42/_0x459d8f['particlesTextureSize']),_0x473657['push'](_0x1f299f/_0x459d8f['particlesTextureSize']);}}}_0x473657=new Float32Array(_0x473657);let _0x129fea=[];const _0x388cc6=[-0x1,0x1],_0x30c769=[-0x1,0x1];for(let _0x1e50c0=0x0;_0x1e50c0<_0x459d8f['maxParticles'];_0x1e50c0++){for(let _0x31efa8=0x0;_0x31efa8<_0x1b3249/0x2;_0x31efa8++){for(let _0x1d372b=0x0;_0x1d372b<_0x1b3249/0x2;_0x1d372b++){_0x129fea[_0x167558(0x1d5)](_0x388cc6[_0x31efa8]),_0x129fea['push'](_0x30c769[_0x1d372b]),_0x129fea[_0x167558(0x1d5)](0x0);}}}_0x129fea=new Float32Array(_0x129fea);const _0x28ddc9=0x6*_0x459d8f['maxParticles'],_0x2c545a=new Uint32Array(_0x28ddc9);for(let _0x824204=0x0,_0x17f84b=0x0,_0x301368=0x0;_0x824204<_0x459d8f[_0x167558(0x174)];_0x824204++){_0x2c545a[_0x17f84b++]=_0x301368+0x0,_0x2c545a[_0x17f84b++]=_0x301368+0x1,_0x2c545a[_0x17f84b++]=_0x301368+0x2,_0x2c545a[_0x17f84b++]=_0x301368+0x2,_0x2c545a[_0x17f84b++]=_0x301368+0x1,_0x2c545a[_0x17f84b++]=_0x301368+0x3,_0x301368+=0x4;}const _0x106aef=new Cesium$4['Geometry']({'attributes':new Cesium$4[(_0x167558(0x166))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x167558(0x17c)],'componentsPerAttribute':0x2,'values':_0x473657}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x129fea})}),'indices':_0x2c545a});return _0x106aef;}[_0x506409(0x183)](_0x1a3a9b,_0x4a8296,_0x285f30,_0x2694d9){const _0xe0f636=_0x506409,_0x51e496=this;this[_0xe0f636(0x125)]={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x4a8296),'primitiveType':Cesium$4['PrimitiveType'][_0xe0f636(0x1c9)],'uniformMap':{'currentParticlesPosition':function(){const _0x395d10=_0xe0f636;return _0x2694d9[_0x395d10(0x185)]['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x396846=_0xe0f636;return _0x2694d9[_0x396846(0x185)]['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x2694d9['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0xfe658d=_0xe0f636;return _0x51e496[_0xfe658d(0x11f)]['colorTable'];},'aspect':function(){return _0x1a3a9b['drawingBufferWidth']/_0x1a3a9b['drawingBufferHeight'];},'pixelSize':function(){const _0x2423a3=_0xe0f636;return _0x285f30[_0x2423a3(0x1b1)];},'lineWidth':function(){return _0x4a8296['lineWidth'];},'particleHeight':function(){return _0x4a8296['particleHeight'];}},'vertexShaderSource':new Cesium$4[(_0xe0f636(0x164))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4[(_0xe0f636(0x164))]({'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['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0xe0f636(0x1c9)],'uniformMap':{'segmentsColorTexture':function(){const _0x421e95=_0xe0f636;return _0x51e496[_0x421e95(0x11f)]['segmentsColor'];},'segmentsDepthTexture':function(){const _0x1541e9=_0xe0f636;return _0x51e496[_0x1541e9(0x11f)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x40b559=_0xe0f636;return _0x51e496['framebuffers'][_0x40b559(0x1da)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x3a355a=_0xe0f636;return _0x51e496['framebuffers'][_0x3a355a(0x1da)]['depthTexture'];},'fadeOpacity':function(){return _0x4a8296['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0xe0f636(0x146)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0xe0f636(0x131)]['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x2a8587=_0xe0f636,_0x32dc71=_0x51e496[_0x2a8587(0x131)]['currentTrails'];_0x51e496['framebuffers'][_0x2a8587(0x1da)]=_0x51e496['framebuffers'][_0x2a8587(0x119)],_0x51e496['framebuffers'][_0x2a8587(0x119)]=_0x32dc71,_0x51e496[_0x2a8587(0x125)][_0x2a8587(0x180)]['commandToExecute']['framebuffer']=_0x51e496['framebuffers'][_0x2a8587(0x119)],_0x51e496['primitives']['trails']['clearCommand'][_0x2a8587(0x1ac)]=_0x51e496['framebuffers'][_0x2a8587(0x119)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){return _0x51e496['framebuffers']['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x21d6b8=_0xe0f636;return _0x51e496['framebuffers']['nextTrails'][_0x21d6b8(0x1c4)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0xe0f636(0x1c2)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0xe0f636(0x1e2)]({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag=_0x506409(0x178),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(_0x329aed,_0x4058e1,_0x25b795,_0x5303b9){const _0x26d317=_0x506409;this['data']=_0x4058e1,this['createWindTextures'](_0x329aed,_0x4058e1),this[_0x26d317(0x181)](_0x329aed,_0x25b795,_0x5303b9),this['createComputingPrimitives'](_0x4058e1,_0x25b795,_0x5303b9);}['createWindTextures'](_0x1ee268,_0x474073){const _0x44a8d8=_0x506409,_0x6da6e5={'context':_0x1ee268,'width':_0x474073['dimensions']['lon'],'height':_0x474073[_0x44a8d8(0x1c5)][_0x44a8d8(0x17a)]*(_0x474073['dimensions']['lev']||0x1),'pixelFormat':Cesium$3['PixelFormat'][_0x44a8d8(0x15d)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x44a8d8(0x13f))]({'minificationFilter':Cesium$3[_0x44a8d8(0x14a)]['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x44a8d8(0x1a1)]})};this['windTextures']={'U':Util[_0x44a8d8(0x1cc)](_0x6da6e5,_0x474073['U']['array']),'V':Util['createTexture'](_0x6da6e5,_0x474073['V']['array'])};}['createParticlesTextures'](_0x4a9743,_0x3d5a09,_0x54d1d8){const _0x321aa0=_0x506409,_0x10efeb={'context':_0x4a9743,'width':_0x3d5a09['particlesTextureSize'],'height':_0x3d5a09['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x650b26=this[_0x321aa0(0x1be)](_0x3d5a09[_0x321aa0(0x174)],_0x54d1d8),_0x4fb09b=new Float32Array(0x4*_0x3d5a09[_0x321aa0(0x174)])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x10efeb),'currentParticlesPosition':Util['createTexture'](_0x10efeb,_0x650b26),'nextParticlesPosition':Util['createTexture'](_0x10efeb,_0x650b26),'currentParticlesSpeed':Util[_0x321aa0(0x1cc)](_0x10efeb,_0x4fb09b),'nextParticlesSpeed':Util['createTexture'](_0x10efeb,_0x4fb09b),'postProcessingPosition':Util['createTexture'](_0x10efeb,_0x650b26),'postProcessingSpeed':Util['createTexture'](_0x10efeb,_0x4fb09b)};}[_0x506409(0x1be)](_0x2f907f,_0x1f691d){const _0x1705b0=_0x506409,_0x36ab71=new Float32Array(0x4*_0x2f907f);for(let _0x5247e5=0x0;_0x5247e5<_0x2f907f;_0x5247e5++){_0x36ab71[0x4*_0x5247e5]=Cesium$3['Math']['randomBetween'](_0x1f691d['lonRange']['x'],_0x1f691d['lonRange']['y']),_0x36ab71[0x4*_0x5247e5+0x1]=Cesium$3[_0x1705b0(0x12e)][_0x1705b0(0x191)](_0x1f691d[_0x1705b0(0x16a)]['x'],_0x1f691d['latRange']['y']),_0x36ab71[0x4*_0x5247e5+0x2]=Cesium$3[_0x1705b0(0x12e)]['randomBetween'](this['data']['lev']['min'],this[_0x1705b0(0x169)]['lev']['max']),_0x36ab71[0x4*_0x5247e5+0x3]=0x0;}return _0x36ab71;}['destroyParticlesTextures'](){const _0x442c65=_0x506409;Object[_0x442c65(0x117)](this[_0x442c65(0x185)])['forEach'](_0x55b377=>{this['particlesTextures'][_0x55b377]['destroy']();});}[_0x506409(0x163)](_0x688716,_0x2b47f1,_0x5d0ad7){const _0x22f769=_0x506409,_0x519c36=new Cesium$3['Cartesian3'](_0x688716[_0x22f769(0x1c5)]['lon'],_0x688716['dimensions']['lat'],_0x688716['dimensions'][_0x22f769(0x1f0)]),_0x21b193=new Cesium$3['Cartesian3'](_0x688716[_0x22f769(0x13a)][_0x22f769(0x16e)],_0x688716['lat']['min'],_0x688716['lev']['min']),_0x7cd71b=new Cesium$3[(_0x22f769(0x133))](_0x688716['lon']['max'],_0x688716['lat'][_0x22f769(0x1cf)],_0x688716[_0x22f769(0x1f0)]['max']),_0x3b285f=new Cesium$3['Cartesian3']((_0x7cd71b['x']-_0x21b193['x'])/(_0x519c36['x']-0x1),(_0x7cd71b['y']-_0x21b193['y'])/(_0x519c36['y']-0x1),_0x519c36['z']>0x1?(_0x7cd71b['z']-_0x21b193['z'])/(_0x519c36['z']-0x1):0x1),_0x10d41=new Cesium$3[(_0x22f769(0x13d))](_0x688716['U']['min'],_0x688716['U']['max']),_0x19d065=new Cesium$3['Cartesian2'](_0x688716['V'][_0x22f769(0x16e)],_0x688716['V'][_0x22f769(0x1cf)]),_0x559488=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x559488['windTextures']['U'];},'V':function(){return _0x559488['windTextures']['V'];},'currentParticlesPosition':function(){const _0x452747=_0x22f769;return _0x559488[_0x452747(0x185)]['currentParticlesPosition'];},'dimension':function(){return _0x519c36;},'minimum':function(){return _0x21b193;},'maximum':function(){return _0x7cd71b;},'interval':function(){return _0x3b285f;}},'fragmentShaderSource':new Cesium$3[(_0x22f769(0x164))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){_0x559488['primitives']['getWind']['commandToExecute']['outputTexture']=_0x559488['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x297600=_0x22f769;return _0x559488['particlesTextures'][_0x297600(0x151)];},'particlesWind':function(){const _0x26d0e3=_0x22f769;return _0x559488['particlesTextures'][_0x26d0e3(0x1ba)];},'uSpeedRange':function(){return _0x10d41;},'vSpeedRange':function(){return _0x19d065;},'pixelSize':function(){return _0x5d0ad7['pixelSize'];},'speedFactor':function(){return _0x2b47f1['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x2c118b=_0x22f769,_0x423edb=_0x559488['particlesTextures']['currentParticlesSpeed'];_0x559488[_0x2c118b(0x185)]['currentParticlesSpeed']=_0x559488['particlesTextures']['postProcessingSpeed'],_0x559488['particlesTextures']['postProcessingSpeed']=_0x423edb,_0x559488['primitives']['updateSpeed']['commandToExecute'][_0x2c118b(0x132)]=_0x559488['particlesTextures'][_0x2c118b(0x1b4)];}}),'updatePosition':new CustomPrimitive({'commandType':_0x22f769(0x139),'uniformMap':{'currentParticlesPosition':function(){const _0x2acf80=_0x22f769;return _0x559488['particlesTextures'][_0x2acf80(0x115)];},'currentParticlesSpeed':function(){const _0x251b51=_0x22f769;return _0x559488['particlesTextures'][_0x251b51(0x151)];}},'fragmentShaderSource':new Cesium$3[(_0x22f769(0x164))]({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x16b87e=_0x22f769,_0x390afa=_0x559488['particlesTextures']['currentParticlesPosition'];_0x559488['particlesTextures']['currentParticlesPosition']=_0x559488['particlesTextures']['postProcessingPosition'],_0x559488['particlesTextures']['postProcessingPosition']=_0x390afa,_0x559488['primitives'][_0x16b87e(0x148)]['commandToExecute']['outputTexture']=_0x559488['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x22f769(0x139),'uniformMap':{'nextParticlesPosition':function(){return _0x559488['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x43dc0a=_0x22f769;return _0x559488[_0x43dc0a(0x185)]['nextParticlesSpeed'];},'lonRange':function(){return _0x5d0ad7['lonRange'];},'latRange':function(){const _0x36b4a7=_0x22f769;return _0x5d0ad7[_0x36b4a7(0x16a)];},'randomCoefficient':function(){const _0x4dc1bf=_0x22f769,_0x11b236=Math[_0x4dc1bf(0x1ed)]();return _0x11b236;},'dropRate':function(){return _0x2b47f1['dropRate'];},'dropRateBump':function(){return _0x2b47f1['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x22f769(0x185)]['postProcessingPosition'],'preExecute':function(){const _0x4d1729=_0x22f769;_0x559488[_0x4d1729(0x125)]['postProcessingPosition']['commandToExecute']['outputTexture']=_0x559488['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x22f769(0x139),'uniformMap':{'postProcessingPosition':function(){const _0x5def67=_0x22f769;return _0x559488[_0x5def67(0x185)]['postProcessingPosition'];},'nextParticlesSpeed':function(){const _0xda93fa=_0x22f769;return _0x559488[_0xda93fa(0x185)][_0xda93fa(0x1b4)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x2830ee=_0x22f769;_0x559488[_0x2830ee(0x125)]['postProcessingSpeed']['commandToExecute'][_0x2830ee(0x132)]=_0x559488['particlesTextures'][_0x2830ee(0x18c)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x4c6cb2,_0x4b93bb,_0xcf7177,_0x276e4d){const _0xe3b969=_0x506409;this[_0xe3b969(0x155)]=_0x4c6cb2,_0x4b93bb={..._0x4b93bb},_0x4b93bb['udata']&&_0x4b93bb['vdata']&&(_0x4b93bb[_0xe3b969(0x1c5)]={},_0x4b93bb['dimensions'][_0xe3b969(0x13a)]=_0x4b93bb['cols'],_0x4b93bb['dimensions']['lat']=_0x4b93bb['rows'],_0x4b93bb[_0xe3b969(0x1c5)]['lev']=_0x4b93bb['lev']||0x1,_0x4b93bb[_0xe3b969(0x13a)]={},_0x4b93bb[_0xe3b969(0x13a)][_0xe3b969(0x16e)]=_0x4b93bb[_0xe3b969(0x14f)],_0x4b93bb['lon']['max']=_0x4b93bb['xmax'],_0x4b93bb[_0xe3b969(0x17a)]={},_0x4b93bb['lat'][_0xe3b969(0x16e)]=_0x4b93bb['ymin'],_0x4b93bb['lat']['max']=_0x4b93bb['ymax'],_0x4b93bb['lev']={},_0x4b93bb['lev'][_0xe3b969(0x16e)]=_0x4b93bb['levmin']??0x1,_0x4b93bb['lev']['max']=_0x4b93bb['levmax']??0x1,_0x4b93bb['U']={},_0x4b93bb['U']['array']=new Float32Array(_0x4b93bb['udata']),_0x4b93bb['U']['min']=_0x4b93bb['umin']??Math['min'](..._0x4b93bb[_0xe3b969(0x122)]),_0x4b93bb['U']['max']=_0x4b93bb['umax']??Math[_0xe3b969(0x1cf)](..._0x4b93bb['udata']),_0x4b93bb['V']={},_0x4b93bb['V'][_0xe3b969(0x17f)]=new Float32Array(_0x4b93bb[_0xe3b969(0x1b7)]),_0x4b93bb['V']['min']=_0x4b93bb['vmin']??Math['min'](..._0x4b93bb['vdata']),_0x4b93bb['V']['max']=_0x4b93bb['vmax']??Math['max'](..._0x4b93bb['vdata'])),this['data']=_0x4b93bb,this[_0xe3b969(0x110)]=_0xcf7177,this['viewerParameters']=_0x276e4d,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this[_0xe3b969(0x110)],this['viewerParameters']),this[_0xe3b969(0x171)]=new ParticlesRendering(this['context'],this['data'],this['options'],this[_0xe3b969(0x19e)],this['particlesComputing']);}['canvasResize'](_0x76cc59){const _0x258364=_0x506409;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x258364(0x1df)]['windTextures'])[_0x258364(0x1eb)](_0x1d4faf=>{const _0x14ce15=_0x258364;this['particlesComputing'][_0x14ce15(0x11e)][_0x1d4faf][_0x14ce15(0x1ee)]();}),this[_0x258364(0x171)]['textures']['colorTable'][_0x258364(0x1ee)](),Object['keys'](this[_0x258364(0x171)]['framebuffers'])['forEach'](_0x2d3877=>{this['particlesRendering']['framebuffers'][_0x2d3877]['destroy']();}),this['context']=_0x76cc59,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x14ef78=_0x506409,_0x1c9833=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x14ef78(0x15e))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass'][_0x14ef78(0x1c7)]});Object[_0x14ef78(0x117)](this['particlesRendering'][_0x14ef78(0x131)])['forEach'](_0x50f3b0=>{const _0x4de16c=_0x14ef78;_0x1c9833[_0x4de16c(0x1ac)]=this['particlesRendering']['framebuffers'][_0x50f3b0],_0x1c9833[_0x4de16c(0x142)](this[_0x4de16c(0x155)]);});}[_0x506409(0x1ab)](_0x2589e8){const _0x5a548d=_0x506409;this['clearFramebuffers'](),this['particlesComputing'][_0x5a548d(0x175)](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x2589e8){const _0x2fbe5f=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering'][_0x5a548d(0x125)][_0x5a548d(0x15f)][_0x5a548d(0x1a3)]=_0x2fbe5f;const _0x4ece7e=Cesium$2['VertexArray'][_0x5a548d(0x149)]({'context':this[_0x5a548d(0x155)],'geometry':_0x2fbe5f,'attributeLocations':this['particlesRendering'][_0x5a548d(0x125)]['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});this['particlesRendering'][_0x5a548d(0x125)][_0x5a548d(0x15f)]['commandToExecute']['vertexArray']=_0x4ece7e;}}['setOptions'](_0x5b0999){const _0x332346=_0x506409;let _0x518211=![];this[_0x332346(0x110)]['maxParticles']!==_0x5b0999['maxParticles']&&(_0x518211=!![]),Object['keys'](_0x5b0999)[_0x332346(0x1eb)](_0x3c3264=>{this['options'][_0x3c3264]=_0x5b0999[_0x3c3264];}),this[_0x332346(0x1ab)](_0x518211);}['applyViewerParameters'](_0x293692){const _0x5de995=_0x506409;Object[_0x5de995(0x117)](_0x293692)['forEach'](_0x144374=>{this['viewerParameters'][_0x144374]=_0x293692[_0x144374];}),this['refreshParticles'](![]);}[_0x506409(0x1ee)](){const _0x229198=_0x506409;clearTimeout(this[_0x229198(0x18a)]),this['particlesComputing']['destroyParticlesTextures'](),Object[_0x229198(0x117)](this['particlesComputing'][_0x229198(0x11e)])[_0x229198(0x1eb)](_0x825270=>{const _0x35fc2b=_0x229198;this[_0x35fc2b(0x1df)]['windTextures'][_0x825270]['destroy']();}),this[_0x229198(0x171)][_0x229198(0x11f)]['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x229198(0x131)])['forEach'](_0x2a0546=>{const _0x2f22f7=_0x229198;this[_0x2f22f7(0x171)]['framebuffers'][_0x2a0546]['destroy']();});for(const _0x3a99c2 in this){delete this[_0x3a99c2];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer'][_0x506409(0x1ca)],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':['rgb(206,255,255)']};class WindLayer extends BaseLayer$1{constructor(_0x155766={}){const _0x42f6d6=_0x506409;_0x155766={...DEF_OPTIONS,..._0x155766},super(_0x155766),this[_0x42f6d6(0x19c)](_0x155766);}get['layer'](){return this['primitives'];}get['data'](){const _0x2378f7=_0x506409;return this[_0x2378f7(0x130)];}set['data'](_0x109b7b){this['setData'](_0x109b7b);}get[_0x506409(0x12a)](){return this['options']['colors'];}set[_0x506409(0x12a)](_0x583336){const _0x3fef8a=_0x506409;this[_0x3fef8a(0x110)][_0x3fef8a(0x12a)]=_0x583336,this['particleSystem']&&this[_0x3fef8a(0x140)]['setOptions']({'colors':_0x583336}),this[_0x3fef8a(0x172)]();}['_mountedHook'](){}['_addedHook'](){const _0x54f2c9=_0x506409;this['scene']=this['_map']['scene'],this[_0x54f2c9(0x152)]=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this[_0x54f2c9(0x1b9)]['scene'][_0x54f2c9(0x125)]['add'](this['primitives']),this[_0x54f2c9(0x19e)]={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x54f2c9(0x1aa)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window[_0x54f2c9(0x15c)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace[_0x54f2c9(0x1ec)][_0x54f2c9(0x1b3)],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this[_0x54f2c9(0x1a6)],this),this['_map']['on'](mars3d__namespace[_0x54f2c9(0x1ec)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x54f2c9(0x130)]&&this[_0x54f2c9(0x1e9)](this['_data']);}['_removedHook'](){const _0x502d7a=_0x506409;window['removeEventListener']('resize',this[_0x502d7a(0x172)]),this['_map'][_0x502d7a(0x141)](mars3d__namespace[_0x502d7a(0x1ec)][_0x502d7a(0x1bb)],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x502d7a(0x1b3)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this[_0x502d7a(0x1a6)],this),this['_map'][_0x502d7a(0x141)](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives'][_0x502d7a(0x1ce)](),this['_map']['scene']['primitives']['remove'](this[_0x502d7a(0x125)]);}['resize'](){const _0x483f94=_0x506409;if(!this['show']||!this['particleSystem'])return;this[_0x483f94(0x125)]['show']=![],this['primitives']['removeAll'](),this[_0x483f94(0x1b9)][_0x483f94(0x176)](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}[_0x506409(0x136)](_0x3e2f2c){const _0xf18121=_0x506409;this['particleSystem'][_0xf18121(0x123)](this['scene'][_0xf18121(0x155)]),this[_0xf18121(0x11c)](),this['primitives'][_0xf18121(0x167)]=!![];}['_onMapWhellEvent'](_0x974dcd){const _0x265de6=_0x506409;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0x265de6(0x140)])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{const _0x375e55=_0x265de6;if(!this[_0x375e55(0x167)])return;this['redraw']();},0xc8);}[_0x506409(0x159)](_0x2050d5){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x4b067f){const _0x1ed4f2=_0x506409;if(!this[_0x1ed4f2(0x167)]||!this['particleSystem'])return;this['mouse_down']&&(this[_0x1ed4f2(0x125)][_0x1ed4f2(0x167)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0xe1dfa5){const _0x3af9ea=_0x506409;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&this[_0x3af9ea(0x192)]&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0x562eee=_0x506409;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this[_0x562eee(0x125)]['show']=!![];}['setData'](_0x43fc43){const _0x93c355=_0x506409;this['_data']=_0x43fc43,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x93c355(0x155)],_0x43fc43,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}[_0x506409(0x19c)](_0x3f41ff,_0x24a2b2){const _0x16a2ae=_0x506409;if(_0x3f41ff)for(const _0x342b17 in _0x3f41ff){this[_0x342b17]=_0x3f41ff[_0x342b17];}this['particleSystem']&&this[_0x16a2ae(0x140)]['setOptions'](this['getOptions']());}[_0x506409(0x19b)](){const _0x8c341a=_0x506409,_0xfad18f=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this[_0x8c341a(0x114)]=_0xfad18f*_0xfad18f,{'particlesTextureSize':_0xfad18f,'maxParticles':this[_0x8c341a(0x114)],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x8c341a(0x188)],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}[_0x506409(0x11c)](){const _0x177e15=_0x506409;this['primitives']['add'](this['particleSystem'][_0x177e15(0x1df)][_0x177e15(0x125)]['getWind']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this[_0x177e15(0x125)]['add'](this['particleSystem']['particlesComputing'][_0x177e15(0x125)]['updatePosition']),this[_0x177e15(0x125)][_0x177e15(0x14e)](this[_0x177e15(0x140)]['particlesComputing']['primitives']['postProcessingPosition']),this['primitives']['add'](this[_0x177e15(0x140)]['particlesComputing'][_0x177e15(0x125)]['postProcessingSpeed']),this[_0x177e15(0x125)]['add'](this['particleSystem'][_0x177e15(0x171)][_0x177e15(0x125)]['segments']),this['primitives'][_0x177e15(0x14e)](this['particleSystem'][_0x177e15(0x171)][_0x177e15(0x125)][_0x177e15(0x180)]),this['primitives'][_0x177e15(0x14e)](this['particleSystem']['particlesRendering']['primitives'][_0x177e15(0x195)]);}[_0x506409(0x186)](){const _0x31d0dc=_0x506409;let _0x221c03=this['camera']['computeViewRectangle'](this['scene']['globe'][_0x31d0dc(0x1e3)]);if(!_0x221c03){const _0xa2c61f=this[_0x31d0dc(0x1b9)][_0x31d0dc(0x143)]();_0x221c03=Cesium$1['Rectangle']['fromDegrees'](_0xa2c61f[_0x31d0dc(0x14f)],_0xa2c61f['ymin'],_0xa2c61f[_0x31d0dc(0x112)],_0xa2c61f['ymax']);}const _0x132d16=Util['viewRectangleToLonLatRange'](_0x221c03);this['viewerParameters']['lonRange']['x']=_0x132d16['lon']['min'],this['viewerParameters'][_0x31d0dc(0x145)]['y']=_0x132d16['lon']['max'],this['viewerParameters']['latRange']['x']=_0x132d16['lat']['min'],this['viewerParameters'][_0x31d0dc(0x16a)]['y']=_0x132d16['lat']['max'];const _0x1994a5=this['camera'][_0x31d0dc(0x16b)](this[_0x31d0dc(0x1aa)],this['scene'][_0x31d0dc(0x1ae)],this['scene']['drawingBufferHeight']);_0x1994a5>0x0&&(this['viewerParameters']['pixelSize']=_0x1994a5);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer'][_0x506409(0x128)]=WindLayer;class CanvasParticle{constructor(){this['lng']=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null;}['destroy'](){for(const _0x186b57 in this){delete this[_0x186b57];}}}class CanvasWindField{constructor(_0x3e60ea){this['setOptions'](_0x3e60ea);}get['speedRate'](){const _0x3995cf=_0x506409;return this[_0x3995cf(0x1b6)];}set['speedRate'](_0x42f808){const _0x350dff=_0x506409;this['_speedRate']=(0x64-(_0x42f808>0x63?0x63:_0x42f808))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x350dff(0x14f)])/this['_speedRate'],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){const _0x50c8bf=_0x506409;return this[_0x50c8bf(0x156)];}set['maxAge'](_0x1c3f1f){this['_maxAge']=_0x1c3f1f;}['setOptions'](_0x117b8e){const _0x130b46=_0x506409;this['options']=_0x117b8e,this[_0x130b46(0x1d9)]=_0x117b8e[_0x130b46(0x1d9)]||0x78,this['speedRate']=_0x117b8e[_0x130b46(0x1dd)]||0x32,this['particles']=[];const _0x385a02=_0x117b8e['particlesNumber']||0x1000;for(let _0x4110b0=0x0;_0x4110b0<_0x385a02;_0x4110b0++){const _0x37b7e7=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x37b7e7);}}['setDate'](_0x377ef6){const _0x5ac1fd=_0x506409;this['rows']=_0x377ef6['rows'],this[_0x5ac1fd(0x153)]=_0x377ef6['cols'],this['xmin']=_0x377ef6[_0x5ac1fd(0x14f)],this['xmax']=_0x377ef6['xmax'],this[_0x5ac1fd(0x194)]=_0x377ef6['ymin'],this[_0x5ac1fd(0x12d)]=_0x377ef6['ymax'],this['grid']=[];const _0x3269e0=_0x377ef6['udata'],_0x51c87e=_0x377ef6[_0x5ac1fd(0x1b7)];let _0xb84c5b=![];_0x3269e0['length']===this['rows']&&_0x3269e0[0x0][_0x5ac1fd(0x17b)]===this['cols']&&(_0xb84c5b=!![]);let _0x115f1f=0x0,_0x210ebb=null,_0x459590=null;for(let _0x46121d=0x0;_0x46121d<this['rows'];_0x46121d++){_0x210ebb=[];for(let _0x279419=0x0;_0x279419<this['cols'];_0x279419++,_0x115f1f++){_0xb84c5b?_0x459590=this['_calcUV'](_0x3269e0[_0x46121d][_0x279419],_0x51c87e[_0x46121d][_0x279419]):_0x459590=this['_calcUV'](_0x3269e0[_0x115f1f],_0x51c87e[_0x115f1f]),_0x210ebb[_0x5ac1fd(0x1d5)](_0x459590);}this[_0x5ac1fd(0x19f)]['push'](_0x210ebb);}this['options']['reverseY']&&this[_0x5ac1fd(0x19f)][_0x5ac1fd(0x160)]();}[_0x506409(0x129)](){delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x5ba0af,_0x46359e){const _0x8a64b3=_0x506409,_0x41b733=(_0x5ba0af-this[_0x8a64b3(0x14f)])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x26b2da=(this['ymax']-_0x46359e)/(this[_0x8a64b3(0x12d)]-this['ymin'])*(this['rows']-0x1);return[_0x41b733,_0x26b2da];}[_0x506409(0x1e8)](_0x1347af,_0x167a57){const _0x3baaf1=_0x506409;if(_0x1347af<0x0||_0x1347af>=this['cols']||_0x167a57>=this['rows'])return[0x0,0x0,0x0];const _0x179a96=Math['floor'](_0x1347af),_0x39706b=Math['floor'](_0x167a57);if(_0x179a96===_0x1347af&&_0x39706b===_0x167a57)return this['grid'][_0x167a57][_0x1347af];const _0x5adbd8=_0x179a96+0x1,_0x2b5f00=_0x39706b+0x1,_0x246a1a=this[_0x3baaf1(0x1e8)](_0x179a96,_0x39706b),_0x48ea07=this['getUVByXY'](_0x5adbd8,_0x39706b),_0x1cffa5=this['getUVByXY'](_0x179a96,_0x2b5f00),_0x4a86f2=this['getUVByXY'](_0x5adbd8,_0x2b5f00);let _0x46891e=null;try{_0x46891e=this['_bilinearInterpolation'](_0x1347af-_0x179a96,_0x167a57-_0x39706b,_0x246a1a,_0x48ea07,_0x1cffa5,_0x4a86f2);}catch(_0x4d9ac4){console['log'](_0x1347af,_0x167a57);}return _0x46891e;}[_0x506409(0x16d)](_0x11b33d,_0x83a99,_0xc1696c,_0x252fb4,_0x3f6c63,_0x20e83b){const _0x4801f8=_0x506409,_0x2fb6f5=0x1-_0x11b33d,_0x209535=0x1-_0x83a99,_0x26a063=_0x2fb6f5*_0x209535,_0x359d32=_0x11b33d*_0x209535,_0x17ed84=_0x2fb6f5*_0x83a99,_0x4d1071=_0x11b33d*_0x83a99,_0x5be1a1=_0xc1696c[0x0]*_0x26a063+_0x252fb4[0x0]*_0x359d32+_0x3f6c63[0x0]*_0x17ed84+_0x20e83b[0x0]*_0x4d1071,_0x19dc04=_0xc1696c[0x1]*_0x26a063+_0x252fb4[0x1]*_0x359d32+_0x3f6c63[0x1]*_0x17ed84+_0x20e83b[0x1]*_0x4d1071;return this[_0x4801f8(0x1e7)](_0x5be1a1,_0x19dc04);}[_0x506409(0x1e7)](_0x807d48,_0x46820a){return[+_0x807d48,+_0x46820a,Math['sqrt'](_0x807d48*_0x807d48+_0x46820a*_0x46820a)];}['getUVByPoint'](_0x35093d,_0xdb94d1){const _0x218626=_0x506409;if(!this[_0x218626(0x124)](_0x35093d,_0xdb94d1))return null;const _0x63e9c9=this[_0x218626(0x127)](_0x35093d,_0xdb94d1),_0x2b766c=this['getUVByXY'](_0x63e9c9[0x0],_0x63e9c9[0x1]);return _0x2b766c;}['isInExtent'](_0x36d205,_0xdbf1e6){const _0x367103=_0x506409;return _0x36d205>=this[_0x367103(0x14f)]&&_0x36d205<=this['xmax']&&_0xdbf1e6>=this['ymin']&&_0xdbf1e6<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x46c5dd=_0x506409,_0x301222=fRandomByfloat(this['xmin'],this['xmax']),_0x4698ea=fRandomByfloat(this[_0x46c5dd(0x194)],this[_0x46c5dd(0x12d)]);return{'lat':_0x4698ea,'lng':_0x301222};}[_0x506409(0x1af)](){const _0x2fbfcf=_0x506409;let _0x321dde,_0x14b8a9,_0x421460;for(let _0xcb6572=0x0,_0x1ab2f2=this['particles'][_0x2fbfcf(0x17b)];_0xcb6572<_0x1ab2f2;_0xcb6572++){let _0x43c07a=this['particles'][_0xcb6572];_0x43c07a[_0x2fbfcf(0x18b)]<=0x0&&(_0x43c07a=this['_randomParticle'](_0x43c07a));if(_0x43c07a['age']>0x0){const _0x4cee37=_0x43c07a[_0x2fbfcf(0x1c3)],_0x28e6b8=_0x43c07a['tlat'];_0x421460=this['getUVByPoint'](_0x4cee37,_0x28e6b8),_0x421460?(_0x321dde=_0x4cee37+this['_calc_speedRate'][0x0]*_0x421460[0x0],_0x14b8a9=_0x28e6b8+this['_calc_speedRate'][0x1]*_0x421460[0x1],_0x43c07a['lng']=_0x4cee37,_0x43c07a['lat']=_0x28e6b8,_0x43c07a['tlng']=_0x321dde,_0x43c07a['tlat']=_0x14b8a9,_0x43c07a['age']--):_0x43c07a[_0x2fbfcf(0x18b)]=0x0;}}return this[_0x2fbfcf(0x14d)];}['_randomParticle'](_0x3e4a81){const _0xfeebf3=_0x506409;let _0x4f5ead,_0xf82bd;for(let _0x5b0fc3=0x0;_0x5b0fc3<0x1e;_0x5b0fc3++){_0x4f5ead=this[_0xfeebf3(0x1e6)](),_0xf82bd=this['getUVByPoint'](_0x4f5ead['lng'],_0x4f5ead['lat']);if(_0xf82bd&&_0xf82bd[0x2]>0x0)break;}if(!_0xf82bd)return _0x3e4a81;const _0x5e1e33=_0x4f5ead['lng']+this['_calc_speedRate'][0x0]*_0xf82bd[0x0],_0x2c4bb6=_0x4f5ead[_0xfeebf3(0x17a)]+this[_0xfeebf3(0x1e5)][0x1]*_0xf82bd[0x1];return _0x3e4a81['lng']=_0x4f5ead['lng'],_0x3e4a81['lat']=_0x4f5ead[_0xfeebf3(0x17a)],_0x3e4a81['tlng']=_0x5e1e33,_0x3e4a81['tlat']=_0x2c4bb6,_0x3e4a81[_0xfeebf3(0x18b)]=Math['round'](Math['random']()*this['maxAge']),_0x3e4a81;}['destroy'](){for(const _0xf8bd0b in this){delete this[_0xf8bd0b];}}}function _0x1e80(_0x42d67e,_0x3f054d){const _0x539a18=_0x539a();return _0x1e80=function(_0x1e80c8,_0x47c8ab){_0x1e80c8=_0x1e80c8-0x10f;let _0x2ea43e=_0x539a18[_0x1e80c8];return _0x2ea43e;},_0x1e80(_0x42d67e,_0x3f054d);}function fRandomByfloat(_0x444402,_0x1eda80){return _0x444402+Math['random']()*(_0x1eda80-_0x444402);}const Cesium=mars3d__namespace[_0x506409(0x15a)],BaseLayer=mars3d__namespace[_0x506409(0x1d1)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x5822c3={}){const _0x3a606c=_0x506409;super(_0x5822c3),this['_setOptionsHook'](_0x5822c3),this[_0x3a606c(0x154)]=null;}['_setOptionsHook'](_0x285c72,_0x365cc1){const _0x46d556=_0x506409;this['frameTime']=0x3e8/(_0x285c72['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this[_0x46d556(0x1bf)]=_0x285c72['color']||'#ffffff',this['lineWidth']=_0x285c72[_0x46d556(0x1bc)]||0x1,this['fixedHeight']=_0x285c72['fixedHeight']??0x0,this['reverseY']=_0x285c72['reverseY']??![],this['windField']&&this['windField']['setOptions'](_0x285c72);}get['layer'](){return this['canvas'];}get[_0x506409(0x1d6)](){const _0x5e16d3=_0x506409;return this[_0x5e16d3(0x1b9)][_0x5e16d3(0x147)]['canvas']['clientWidth'];}get[_0x506409(0x162)](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){const _0x43efb8=_0x506409;return this[_0x43efb8(0x16c)];}set['pointerEvents'](_0x506723){const _0x2d37e1=_0x506409;this[_0x2d37e1(0x16c)]=_0x506723;if(!this[_0x2d37e1(0x154)])return;_0x506723?this[_0x2d37e1(0x154)]['style'][_0x2d37e1(0x16f)]='all':this['canvas']['style'][_0x2d37e1(0x16f)]=_0x2d37e1(0x198);}get[_0x506409(0x114)](){const _0xf3f0f8=_0x506409;return this['options'][_0xf3f0f8(0x114)];}set[_0x506409(0x114)](_0x4968b1){const _0x227e63=_0x506409;this['options']['particlesNumber']=_0x4968b1,clearTimeout(this[_0x227e63(0x1dc)]),this[_0x227e63(0x1dc)]=setTimeout(()=>{const _0x1bffc5=_0x227e63;this[_0x1bffc5(0x144)]();},0x1f4);}get[_0x506409(0x1dd)](){const _0xea8169=_0x506409;return this['options'][_0xea8169(0x1dd)];}set[_0x506409(0x1dd)](_0x1750e1){const _0x4b119b=_0x506409;this[_0x4b119b(0x110)]['speedRate']=_0x1750e1,this['windField']&&(this['windField']['speedRate']=_0x1750e1);}get[_0x506409(0x1d9)](){return this['options']['maxAge'];}set[_0x506409(0x1d9)](_0x340512){const _0x27164f=_0x506409;this['options'][_0x27164f(0x1d9)]=_0x340512,this['windField']&&(this[_0x27164f(0x1d0)]['maxAge']=_0x340512);}get['data'](){return this['windData'];}set['data'](_0x53e6cb){this['setData'](_0x53e6cb);}['_showHook'](_0xd9cc3c){const _0x2be9b3=_0x506409;_0xd9cc3c?this[_0x2be9b3(0x1d4)]():(this['windData']&&(this['options'][_0x2be9b3(0x169)]=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0xbabe0b=_0x506409;this['options']['worker']?this[_0xbabe0b(0x18f)]():this['windField']=new CanvasWindField(this['options']);}[_0x506409(0x1d4)](){const _0x22e34c=_0x506409;this[_0x22e34c(0x154)]=this['_createCanvas'](),this[_0x22e34c(0x1b8)]=this[_0x22e34c(0x154)]['getContext']('2d',{'willReadFrequently':!![]}),this[_0x22e34c(0x1a5)](),this['options'][_0x22e34c(0x169)]&&this['setData'](this['options']['data']);}[_0x506409(0x193)](){const _0x2e7c23=_0x506409;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container'][_0x2e7c23(0x13c)](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x373837=_0x506409,_0x4b6365=mars3d__namespace['DomUtil']['create']('canvas','mars3d-canvasWind',this['_map']['container']);return _0x4b6365['style'][_0x373837(0x1a4)]='absolute',_0x4b6365['style']['top']='0px',_0x4b6365['style']['left']='0px',_0x4b6365['style'][_0x373837(0x187)]=this['_map'][_0x373837(0x147)][_0x373837(0x154)]['clientWidth']+'px',_0x4b6365['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',_0x4b6365[_0x373837(0x157)][_0x373837(0x12f)]=this[_0x373837(0x16c)]?'auto':_0x373837(0x198),_0x4b6365['style']['zIndex']=this['options']['zIndex']??0x9,_0x4b6365[_0x373837(0x187)]=this['_map'][_0x373837(0x147)]['canvas'][_0x373837(0x14b)],_0x4b6365['height']=this['_map'][_0x373837(0x147)]['canvas']['clientHeight'],_0x4b6365;}[_0x506409(0x172)](){const _0x45092e=_0x506409;this['canvas']&&(this[_0x45092e(0x154)][_0x45092e(0x157)]['width']=this['_map'][_0x45092e(0x147)][_0x45092e(0x154)][_0x45092e(0x14b)]+'px',this[_0x45092e(0x154)][_0x45092e(0x157)]['height']=this['_map']['scene'][_0x45092e(0x154)]['clientHeight']+'px',this['canvas'][_0x45092e(0x187)]=this['_map'][_0x45092e(0x147)]['canvas']['clientWidth'],this['canvas']['height']=this['_map']['scene']['canvas']['clientHeight']);}[_0x506409(0x1a5)](){const _0x188a40=_0x506409,_0x5e0476=this;let _0x2e0b6f=Date['now']();(function _0x4e9f37(){const _0x34e377=_0x1e80;_0x5e0476[_0x34e377(0x14c)]=window['requestAnimationFrame'](_0x4e9f37);if(_0x5e0476['show']&&_0x5e0476[_0x34e377(0x1d0)]){const _0xe84c8d=Date[_0x34e377(0x137)](),_0x27c6a4=_0xe84c8d-_0x2e0b6f;_0x27c6a4>_0x5e0476['frameTime']&&(_0x2e0b6f=_0xe84c8d-_0x27c6a4%_0x5e0476['frameTime'],_0x5e0476['update']());}}(),window['addEventListener']('resize',this[_0x188a40(0x172)]['bind'](this),![]),this[_0x188a40(0x17e)]=![],this['mouse_move']=![],this[_0x188a40(0x110)]['mouseHidden']&&(this[_0x188a40(0x1b9)]['on'](mars3d__namespace[_0x188a40(0x1ec)]['wheel'],this['_onMapWhellEvent'],this),this[_0x188a40(0x1b9)]['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x188a40(0x1ec)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x2b9ff0=_0x506409;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window[_0x2b9ff0(0x1e1)]('resize',this['resize']),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace['EventType']['wheel'],this[_0x2b9ff0(0x1c1)],this),this['_map']['off'](mars3d__namespace[_0x2b9ff0(0x1ec)][_0x2b9ff0(0x11b)],this['_onMouseDownEvent'],this),this[_0x2b9ff0(0x1b9)]['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this[_0x2b9ff0(0x1b9)]['off'](mars3d__namespace['EventType'][_0x2b9ff0(0x1d7)],this[_0x2b9ff0(0x135)],this));}['_onMapWhellEvent'](_0xa1f779){const _0x52c7ba=_0x506409;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas'][_0x52c7ba(0x157)]['visibility']=_0x52c7ba(0x1a7),this['refreshTimer']=setTimeout(()=>{const _0x120d73=_0x52c7ba;if(!this[_0x120d73(0x167)])return;this['redraw'](),this['canvas']['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x2b8bcf){const _0x236d1c=_0x506409;this['mouse_down']=!![],this[_0x236d1c(0x1b9)]['off'](mars3d__namespace['EventType'][_0x236d1c(0x1d7)],this[_0x236d1c(0x135)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x236d1c(0x1d7)],this['_onMouseMoveEvent'],this);}[_0x506409(0x135)](_0x23e9dc){const _0x4ea2dc=_0x506409;if(!this[_0x4ea2dc(0x167)]||!this['canvas'])return;this['mouse_down']&&(this['canvas']['style']['visibility']='hidden',this[_0x4ea2dc(0x192)]=!![]);}['_onMouseUpEvent'](_0x1f7b37){const _0xcc3aab=_0x506409;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace[_0xcc3aab(0x1ec)]['mouseMove'],this[_0xcc3aab(0x135)],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this[_0xcc3aab(0x154)]['style'][_0xcc3aab(0x1a9)]='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x55ef83){const _0x59dc63=_0x506409;this['clear'](),this['windData']=_0x55ef83,this['windField'][_0x59dc63(0x126)](_0x55ef83),this['redraw']();}['redraw'](){const _0x297d69=_0x506409;if(!this[_0x297d69(0x167)])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){const _0x518a64=_0x506409;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this[_0x518a64(0x1d0)]['update']();else{const _0xca45e9=this['windField']['getParticles']();this['_drawLines'](_0xca45e9);}this[_0x518a64(0x1a2)]=![];}['_drawLines'](_0x1f32fa){const _0x298004=_0x506409;this[_0x298004(0x1b8)]['globalCompositeOperation']='destination-in',this['canvasContext'][_0x298004(0x179)](0x0,0x0,this[_0x298004(0x1d6)],this['canvasHeight']),this[_0x298004(0x1b8)]['globalCompositeOperation']='lighter',this[_0x298004(0x1b8)][_0x298004(0x12c)]=0.9,this['canvasContext'][_0x298004(0x196)](),this['canvasContext']['lineWidth']=this[_0x298004(0x1bc)],this[_0x298004(0x1b8)]['strokeStyle']=this[_0x298004(0x1bf)];const _0x12d4c0=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x15756e=this['canvasWidth']*0.25;for(let _0x2319c3=0x0,_0x43cb52=_0x1f32fa[_0x298004(0x17b)];_0x2319c3<_0x43cb52;_0x2319c3++){const _0x121d8f=_0x1f32fa[_0x2319c3],_0x544976=this['_tomap'](_0x121d8f[_0x298004(0x1ef)],_0x121d8f[_0x298004(0x17a)],_0x121d8f),_0x529439=this['_tomap'](_0x121d8f[_0x298004(0x1c3)],_0x121d8f['tlat'],_0x121d8f);if(!_0x544976||!_0x529439)continue;if(_0x12d4c0&&Math['abs'](_0x544976[0x0]-_0x529439[0x0])>=_0x15756e)continue;this['canvasContext']['moveTo'](_0x544976[0x0],_0x544976[0x1]),this['canvasContext'][_0x298004(0x11d)](_0x529439[0x0],_0x529439[0x1]);}this['canvasContext']['stroke']();}[_0x506409(0x1ea)](_0x231703,_0x3326b6,_0x413093){const _0x63c813=_0x506409,_0x92e279=Cesium[_0x63c813(0x133)]['fromDegrees'](_0x231703,_0x3326b6,this['fixedHeight']),_0x7a9dcb=this['_map']['scene'];if(_0x7a9dcb['mode']===Cesium['SceneMode']['SCENE3D']){const _0x58ecf9=new Cesium['EllipsoidalOccluder'](_0x7a9dcb['globe'][_0x63c813(0x1e3)],_0x7a9dcb['camera']['positionWC']),_0x19c8a9=_0x58ecf9['isPointVisible'](_0x92e279);if(!_0x19c8a9)return _0x413093['age']=0x0,null;}const _0x5a17de=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map']['scene'],_0x92e279);return _0x5a17de?[_0x5a17de['x'],_0x5a17de['y']]:null;}['clear'](){const _0x342b40=_0x506409;this[_0x342b40(0x1d0)]['clear'](),delete this['windData'];}['initWorker'](){const _0x3194a9=_0x506409;this[_0x3194a9(0x1c0)]=new Worker(this['options']['worker']),this[_0x3194a9(0x1c0)]['onmessage']=_0x2dab22=>{this['_drawLines'](_0x2dab22['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x324e37=>{const _0x23317d=_0x3194a9;this[_0x23317d(0x1c0)]['postMessage']({'type':_0x23317d(0x134),'options':_0x324e37});},'setOptions':_0x406aaf=>{this['worker']['postMessage']({'type':'setOptions','options':_0x406aaf});},'setDate':_0x3578f9=>{const _0x3f480e=_0x3194a9;this['worker'][_0x3f480e(0x1b0)]({'type':_0x3f480e(0x126),'data':_0x3578f9});},'update':()=>{const _0x3a3ccd=_0x3194a9;if(this['_updateIng2'])return;this['_updateIng2']=!![],this[_0x3a3ccd(0x1c0)][_0x3a3ccd(0x1b0)]({'type':'update'});},'clear':()=>{const _0x48bcc9=_0x3194a9;this[_0x48bcc9(0x1c0)]['postMessage']({'type':_0x48bcc9(0x129)});}},this['windField']['init'](this[_0x3194a9(0x110)]);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports[_0x506409(0x11a)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
15
15
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-wind",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.11",
|
|
4
4
|
"description": "Mars3D平台插件,支持气象 风向图 功能插件",
|
|
5
5
|
"main": "dist/mars3d-wind.js",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"peerDependencies": {},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"mars3d": "~3.5.
|
|
11
|
+
"mars3d": "~3.5.11"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|