lg_frontend/static/libs/mars3d/plugins/wind/mars3d-wind.js

16 lines
80 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
*
* 版本信息v3.7.3
* 编译日期2024-02-05 13:29:13
* 版权所有Copyright by 火星科技 http://mars3d.cn
* 使用单位:免费公开版 2024-01-15
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, (window.mars3d || require('mars3d'))) :
typeof define === 'function' && define.amd ? define(['exports', 'mars3d'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-wind"] = {}, global.mars3d));
})(this, (function (exports, mars3d) {
'use strict';const _0x3fd775=_0x35e7;(function(_0x46fd85,_0x4dc0d9){const _0x36ae32=_0x35e7,_0x2fd198=_0x46fd85();while(!![]){try{const _0x16e866=parseInt(_0x36ae32(0x212))/0x1+-parseInt(_0x36ae32(0x206))/0x2*(parseInt(_0x36ae32(0x215))/0x3)+parseInt(_0x36ae32(0x27a))/0x4*(parseInt(_0x36ae32(0x295))/0x5)+parseInt(_0x36ae32(0x2a0))/0x6*(parseInt(_0x36ae32(0x219))/0x7)+-parseInt(_0x36ae32(0x2b9))/0x8*(parseInt(_0x36ae32(0x2aa))/0x9)+parseInt(_0x36ae32(0x24e))/0xa*(-parseInt(_0x36ae32(0x2e1))/0xb)+parseInt(_0x36ae32(0x247))/0xc*(parseInt(_0x36ae32(0x27c))/0xd);if(_0x16e866===_0x4dc0d9)break;else _0x2fd198['push'](_0x2fd198['shift']());}catch(_0x411739){_0x2fd198['push'](_0x2fd198['shift']());}}}(_0x3adb,0xbe343));function _interopNamespace(_0x34263b){if(_0x34263b&&_0x34263b['__esModule'])return _0x34263b;var _0x2eb2eb=Object['create'](null);return _0x34263b&&Object['keys'](_0x34263b)['forEach'](function(_0x373d47){const _0x25764c=_0x35e7;if(_0x373d47!==_0x25764c(0x26d)){var _0x47b6c0=Object[_0x25764c(0x241)](_0x34263b,_0x373d47);Object[_0x25764c(0x2d5)](_0x2eb2eb,_0x373d47,_0x47b6c0[_0x25764c(0x284)]?_0x47b6c0:{'enumerable':!![],'get':function(){return _0x34263b[_0x373d47];}});}}),_0x2eb2eb['default']=_0x34263b,_0x2eb2eb;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x39d31c,_0x49d8c4){const _0x9fa55d=_0x35e7,_0x19418b=_0x39d31c*Math[_0x9fa55d(0x286)](Cesium$7['Math']['toRadians'](_0x49d8c4));return _0x19418b;}function getV(_0x258727,_0x3f0b1d){const _0x4de3ae=_0x35e7,_0x2ed739=_0x258727*Math[_0x4de3ae(0x216)](Cesium$7['Math'][_0x4de3ae(0x254)](_0x3f0b1d));return _0x2ed739;}function getSpeed(_0x179f22,_0x22326f){const _0x26396a=_0x35e7,_0x15d0cc=Math[_0x26396a(0x291)](Math[_0x26396a(0x227)](_0x179f22,0x2)+Math['pow'](_0x22326f,0x2));return _0x15d0cc;}function getDirection(_0x361df9,_0x1ba0e0){const _0x39a67a=_0x35e7;let _0xc8725a=Cesium$7[_0x39a67a(0x211)]['toDegrees'](Math['atan2'](_0x1ba0e0,_0x361df9));return _0xc8725a+=_0xc8725a<0x0?0x168:0x0,_0xc8725a;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace[_0x3fd775(0x2c9)];class CustomPrimitive{constructor(_0x4b3cb2){const _0x3465aa=_0x3fd775;this['commandType']=_0x4b3cb2['commandType'],this[_0x3465aa(0x1fe)]=_0x4b3cb2['geometry'],this['attributeLocations']=_0x4b3cb2['attributeLocations'],this['primitiveType']=_0x4b3cb2['primitiveType'],this['uniformMap']=_0x4b3cb2['uniformMap'],this['vertexShaderSource']=_0x4b3cb2['vertexShaderSource'],this['fragmentShaderSource']=_0x4b3cb2['fragmentShaderSource'],this['rawRenderState']=_0x4b3cb2['rawRenderState'],this['framebuffer']=_0x4b3cb2['framebuffer'],this['outputTexture']=_0x4b3cb2[_0x3465aa(0x288)],this[_0x3465aa(0x2bc)]=_0x4b3cb2[_0x3465aa(0x2bc)]??![],this['preExecute']=_0x4b3cb2['preExecute'],this[_0x3465aa(0x24b)]=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}[_0x3fd775(0x2c8)](_0x551de3){const _0x29f5e6=_0x3fd775;switch(this['commandType']){case _0x29f5e6(0x2c2):{const _0x193c77=Cesium$6['VertexArray']['fromGeometry']({'context':_0x551de3,'geometry':this['geometry'],'attributeLocations':this[_0x29f5e6(0x2ae)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x39d2d6=Cesium$6['ShaderProgram']['fromCache']({'context':_0x551de3,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this[_0x29f5e6(0x242)],'fragmentShaderSource':this[_0x29f5e6(0x1fd)]}),_0x2f317e=Cesium$6['RenderState'][_0x29f5e6(0x29c)](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x39d2d6,'vertexArray':_0x193c77,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x2f317e,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x29f5e6(0x2a5)],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6[(_0x29f5e6(0x29d))]({'owner':this,'fragmentShaderSource':this[_0x29f5e6(0x1fd)],'uniformMap':this[_0x29f5e6(0x25d)],'outputTexture':this[_0x29f5e6(0x288)],'persists':!![]});}}}['setGeometry'](_0x5d92ec,_0x2b4b6c){const _0x2450ca=_0x3fd775;this['geometry']=_0x2b4b6c;const _0x137a2b=Cesium$6['VertexArray']['fromGeometry']({'context':_0x5d92ec,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0x2450ca(0x2ac)]});this['commandToExecute']['vertexArray']=_0x137a2b;}['update'](_0x135422){const _0x38cc89=_0x3fd775;if(!this['show'])return;if(_0x135422['mode']!==Cesium$6[_0x38cc89(0x2a3)][_0x38cc89(0x2ab)])return;!Cesium$6[_0x38cc89(0x270)](this[_0x38cc89(0x2ca)])&&(this[_0x38cc89(0x2ca)]=this['createCommand'](_0x135422[_0x38cc89(0x25b)])),Cesium$6['defined'](this[_0x38cc89(0x2e0)])&&this['preExecute'](),Cesium$6[_0x38cc89(0x270)](this['clearCommand'])&&_0x135422['commandList']['push'](this['clearCommand']),_0x135422['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x700ad6=_0x3fd775;if(this['clearCommand']){var _0x31f75f,_0x22110b;(_0x31f75f=this['clearCommand'])!==null&&_0x31f75f!==void 0x0&&_0x31f75f['vertexArray']&&this['clearCommand']['vertexArray']['destroy'](),(_0x22110b=this[_0x700ad6(0x2a6)])!==null&&_0x22110b!==void 0x0&&_0x22110b['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this[_0x700ad6(0x2ca)]&&(this[_0x700ad6(0x2ca)]['vertexArray']&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute'][_0x700ad6(0x23d)]&&this['commandToExecute'][_0x700ad6(0x23d)]['destroy'](),delete this['commandToExecute']),Cesium$6[_0x700ad6(0x1f8)](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x1f1fd2=function(){const _0xb7fbf3=_0x35e7,_0x5de4a2=new Cesium$5[(_0xb7fbf3(0x265))]({'attributes':new Cesium$5[(_0xb7fbf3(0x214))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5[_0xb7fbf3(0x21c)]['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[_0xb7fbf3(0x21c)][_0xb7fbf3(0x2c4)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x5de4a2;},_0x51fad9=function(_0x3a2548,_0x399380){const _0x2120c1=_0x35e7;if(Cesium$5['defined'](_0x399380)){const _0x238887={};_0x238887[_0x2120c1(0x240)]=_0x399380,_0x3a2548[_0x2120c1(0x22b)]=_0x238887;}const _0x10d2c4=new Cesium$5['Texture'](_0x3a2548);return _0x10d2c4;},_0x30197b=function(_0xca885a,_0x44f1d9,_0x58f97b){const _0x2842c1=_0x35e7,_0x14db37=new Cesium$5[(_0x2842c1(0x2ce))]({'context':_0xca885a,'colorTextures':[_0x44f1d9],'depthTexture':_0x58f97b});return _0x14db37;},_0x565fba=function(_0x58741c){const _0xd4281d=_0x35e7,_0x4e7bc4=!![],_0x55e789=![],_0x2b0b59={'viewport':_0x58741c[_0xd4281d(0x29f)],'depthTest':_0x58741c['depthTest'],'depthMask':_0x58741c[_0xd4281d(0x264)],'blending':_0x58741c['blending']},_0x56feb9=Cesium$5[_0xd4281d(0x297)]['getDefaultRenderState'](_0x4e7bc4,_0x55e789,_0x2b0b59);return _0x56feb9;},_0x4571cc=function(_0x1dde05){const _0x5d6ff1=_0x35e7,_0x3e1304={},_0x22d516=Cesium$5['Math'][_0x5d6ff1(0x1ff)](_0x1dde05[_0x5d6ff1(0x231)],Cesium$5['Math']['TWO_PI']),_0x281b42=Cesium$5['Math'][_0x5d6ff1(0x1ff)](_0x1dde05[_0x5d6ff1(0x2d8)],Cesium$5['Math']['TWO_PI']),_0x169cd1=_0x1dde05['width'];let _0x1dc387,_0x3dfb5f;_0x169cd1>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x1dc387=0x0,_0x3dfb5f=Cesium$5[_0x5d6ff1(0x211)]['TWO_PI']):_0x281b42-_0x22d516<_0x169cd1?(_0x1dc387=_0x22d516,_0x3dfb5f=_0x22d516+_0x169cd1):(_0x1dc387=_0x22d516,_0x3dfb5f=_0x281b42);_0x3e1304['lon']={'min':Cesium$5['Math']['toDegrees'](_0x1dc387),'max':Cesium$5['Math']['toDegrees'](_0x3dfb5f)};const _0x3fc558=_0x1dde05[_0x5d6ff1(0x2c5)],_0x13735d=_0x1dde05['north'],_0x22c5c6=_0x1dde05['height'],_0x4309dc=_0x22c5c6>Cesium$5[_0x5d6ff1(0x211)]['PI']/0xc?_0x22c5c6/0x2:0x0;let _0x139ae6=Cesium$5['Math']['clampToLatitudeRange'](_0x3fc558-_0x4309dc),_0x983df2=Cesium$5['Math']['clampToLatitudeRange'](_0x13735d+_0x4309dc);return _0x139ae6<-Cesium$5[_0x5d6ff1(0x211)]['PI_OVER_THREE']&&(_0x139ae6=-Cesium$5[_0x5d6ff1(0x211)]['PI_OVER_TWO']),_0x983df2>Cesium$5['Math']['PI_OVER_THREE']&&(_0x983df2=Cesium$5['Math']['PI_OVER_TWO']),_0x3e1304[_0x5d6ff1(0x229)]={'min':Cesium$5['Math'][_0x5d6ff1(0x2cc)](_0x139ae6),'max':Cesium$5[_0x5d6ff1(0x211)]['toDegrees'](_0x983df2)},_0x3e1304;};return{'getFullscreenQuad':_0x1f1fd2,'createTexture':_0x51fad9,'createFramebuffer':_0x30197b,'createRawRenderState':_0x565fba,'viewRectangleToLonLatRange':_0x4571cc};}());var segmentDraw_vert=_0x3fd775(0x243),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[_0x3fd775(0x2c9)];class ParticlesRendering{constructor(_0x5aee6e,_0x4a6ac6,_0x82df0,_0x29264a,_0x25fb98){const _0x54bed4=_0x3fd775;this['createRenderingTextures'](_0x5aee6e,_0x4a6ac6,_0x82df0[_0x54bed4(0x2cf)]),this['createRenderingFramebuffers'](_0x5aee6e),this['createRenderingPrimitives'](_0x5aee6e,_0x82df0,_0x29264a,_0x25fb98);}['createRenderingTextures'](_0x1233e0,_0x5110c4,_0x74208d){const _0x483efb=_0x3fd775,_0x225cf0={'context':_0x1233e0,'width':_0x1233e0['drawingBufferWidth'],'height':_0x1233e0['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x109a72={'context':_0x1233e0,'width':_0x1233e0['drawingBufferWidth'],'height':_0x1233e0['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4[_0x483efb(0x2d1)][_0x483efb(0x228)]},_0x4cbe43=_0x74208d[_0x483efb(0x255)],_0x1f9023=new Float32Array(_0x4cbe43*0x3);for(let _0x4528ad=0x0;_0x4528ad<_0x4cbe43;_0x4528ad++){const _0x1613e5=Cesium$4['Color'][_0x483efb(0x2b1)](_0x74208d[_0x4528ad]);_0x1f9023[0x3*_0x4528ad]=_0x1613e5['red'],_0x1f9023[0x3*_0x4528ad+0x1]=_0x1613e5['green'],_0x1f9023[0x3*_0x4528ad+0x2]=_0x1613e5['blue'];}const _0x4e1b0c={'context':_0x1233e0,'width':_0x4cbe43,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x483efb(0x2c4)],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter'][_0x483efb(0x1f5)],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this['textures']={'segmentsColor':Util['createTexture'](_0x225cf0),'segmentsDepth':Util['createTexture'](_0x109a72),'currentTrailsColor':Util['createTexture'](_0x225cf0),'currentTrailsDepth':Util['createTexture'](_0x109a72),'nextTrailsColor':Util[_0x483efb(0x20d)](_0x225cf0),'nextTrailsDepth':Util['createTexture'](_0x109a72),'colorTable':Util[_0x483efb(0x20d)](_0x4e1b0c,_0x1f9023)};}['createRenderingFramebuffers'](_0x3efbc3){const _0x445415=_0x3fd775;this['framebuffers']={'segments':Util[_0x445415(0x274)](_0x3efbc3,this['textures']['segmentsColor'],this[_0x445415(0x2d7)]['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x3efbc3,this['textures']['currentTrailsColor'],this[_0x445415(0x2d7)]['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x3efbc3,this['textures'][_0x445415(0x221)],this['textures'][_0x445415(0x28a)])};}[_0x3fd775(0x23a)](_0x17f31e){const _0x46f6ee=_0x3fd775,_0x594856=0x4;let _0xafb780=[];for(let _0x477d2e=0x0;_0x477d2e<_0x17f31e['particlesTextureSize'];_0x477d2e++){for(let _0x102422=0x0;_0x102422<_0x17f31e[_0x46f6ee(0x238)];_0x102422++){for(let _0x2c7365=0x0;_0x2c7365<_0x594856;_0x2c7365++){_0xafb780['push'](_0x477d2e/_0x17f31e['particlesTextureSize']),_0xafb780['push'](_0x102422/_0x17f31e[_0x46f6ee(0x238)]);}}}_0xafb780=new Float32Array(_0xafb780);let _0x28260c=[];const _0x41e4c7=[-0x1,0x1],_0x5f3371=[-0x1,0x1];for(let _0x1fa214=0x0;_0x1fa214<_0x17f31e['maxParticles'];_0x1fa214++){for(let _0x3c5df3=0x0;_0x3c5df3<_0x594856/0x2;_0x3c5df3++){for(let _0x59159f=0x0;_0x59159f<_0x594856/0x2;_0x59159f++){_0x28260c['push'](_0x41e4c7[_0x3c5df3]),_0x28260c['push'](_0x5f3371[_0x59159f]),_0x28260c['push'](0x0);}}}_0x28260c=new Float32Array(_0x28260c);const _0x429835=0x6*_0x17f31e['maxParticles'],_0x36b8b5=new Uint32Array(_0x429835);for(let _0x44f0fd=0x0,_0x42ea2b=0x0,_0xe134e=0x0;_0x44f0fd<_0x17f31e['maxParticles'];_0x44f0fd++){_0x36b8b5[_0x42ea2b++]=_0xe134e+0x0,_0x36b8b5[_0x42ea2b++]=_0xe134e+0x1,_0x36b8b5[_0x42ea2b++]=_0xe134e+0x2,_0x36b8b5[_0x42ea2b++]=_0xe134e+0x2,_0x36b8b5[_0x42ea2b++]=_0xe134e+0x1,_0x36b8b5[_0x42ea2b++]=_0xe134e+0x3,_0xe134e+=0x4;}const _0x599bf7=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4[(_0x46f6ee(0x272))]({'componentDatatype':Cesium$4['ComponentDatatype'][_0x46f6ee(0x2c4)],'componentsPerAttribute':0x2,'values':_0xafb780}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x28260c})}),'indices':_0x36b8b5});return _0x599bf7;}['createRenderingPrimitives'](_0x93d236,_0x146b21,_0x370aa6,_0x250c1f){const _0x5562d5=_0x3fd775,_0x5914c1=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x146b21),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0xec9ee7=_0x35e7;return _0x250c1f[_0xec9ee7(0x2df)]['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x250c1f['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x250c1f['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x35f874=_0x35e7;return _0x5914c1[_0x35f874(0x2d7)]['colorTable'];},'aspect':function(){return _0x93d236['drawingBufferWidth']/_0x93d236['drawingBufferHeight'];},'pixelSize':function(){const _0x383fd4=_0x35e7;return _0x370aa6[_0x383fd4(0x24d)];},'lineWidth':function(){return _0x146b21['lineWidth'];},'particleHeight':function(){const _0x135bdd=_0x35e7;return _0x146b21[_0x135bdd(0x2dd)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4[(_0x5562d5(0x23e))]({'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'][_0x5562d5(0x26c)],'uniformMap':{'segmentsColorTexture':function(){const _0x43d72e=_0x5562d5;return _0x5914c1['textures'][_0x43d72e(0x271)];},'segmentsDepthTexture':function(){return _0x5914c1['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0x12310a=_0x5562d5;return _0x5914c1[_0x12310a(0x2c0)]['currentTrails'][_0x12310a(0x294)](0x0);},'trailsDepthTexture':function(){const _0x33a32b=_0x5562d5;return _0x5914c1[_0x33a32b(0x2c0)][_0x33a32b(0x250)][_0x33a32b(0x1fc)];},'fadeOpacity':function(){return _0x146b21['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['DepthFunction'][_0x5562d5(0x290)]},'depthMask':!![]}),'framebuffer':this[_0x5562d5(0x2c0)][_0x5562d5(0x296)],'autoClear':!![],'preExecute':function(){const _0x14856a=_0x5562d5,_0x1a7a74=_0x5914c1[_0x14856a(0x2c0)]['currentTrails'];_0x5914c1['framebuffers']['currentTrails']=_0x5914c1['framebuffers']['nextTrails'],_0x5914c1['framebuffers']['nextTrails']=_0x1a7a74,_0x5914c1[_0x14856a(0x2ba)]['trails'][_0x14856a(0x2ca)]['framebuffer']=_0x5914c1['framebuffers']['nextTrails'],_0x5914c1[_0x14856a(0x2ba)]['trails'][_0x14856a(0x2a6)][_0x14856a(0x283)]=_0x5914c1['framebuffers']['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':_0x5562d5(0x2c2),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){return _0x5914c1['framebuffers']['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x21384c=_0x5562d5;return _0x5914c1[_0x21384c(0x2c0)]['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x5562d5(0x23e))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag='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[_0x3fd775(0x2c9)];class ParticlesComputing{constructor(_0x6cd0b,_0x58195d,_0x207bd7,_0x31496a){const _0x9664ba=_0x3fd775;this[_0x9664ba(0x258)]=_0x58195d,this['createWindTextures'](_0x6cd0b,_0x58195d),this['createParticlesTextures'](_0x6cd0b,_0x207bd7,_0x31496a),this[_0x9664ba(0x277)](_0x58195d,_0x207bd7,_0x31496a);}['createWindTextures'](_0x8c7ae3,_0x346ba3){const _0x2e7ca9=_0x3fd775,_0x3ea663={'context':_0x8c7ae3,'width':_0x346ba3['dimensions'][_0x2e7ca9(0x2b4)],'height':_0x346ba3['dimensions']['lat']*(_0x346ba3['dimensions']['lev']||0x1),'pixelFormat':Cesium$3[_0x2e7ca9(0x28b)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype'][_0x2e7ca9(0x2c4)],'flipY':![],'sampler':new Cesium$3[(_0x2e7ca9(0x2b6))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3[_0x2e7ca9(0x282)][_0x2e7ca9(0x2a8)]})};this[_0x2e7ca9(0x20b)]={'U':Util['createTexture'](_0x3ea663,_0x346ba3['U'][_0x2e7ca9(0x266)]),'V':Util[_0x2e7ca9(0x20d)](_0x3ea663,_0x346ba3['V']['array'])};}[_0x3fd775(0x226)](_0x13d350,_0x20829e,_0x33d893){const _0x3229b9=_0x3fd775,_0x1fe37a={'context':_0x13d350,'width':_0x20829e['particlesTextureSize'],'height':_0x20829e['particlesTextureSize'],'pixelFormat':Cesium$3[_0x3229b9(0x28b)]['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype'][_0x3229b9(0x2c4)],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x3229b9(0x2a8)],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x3229b9(0x2a8)]})},_0xe01f12=this[_0x3229b9(0x2e4)](_0x20829e[_0x3229b9(0x205)],_0x33d893),_0x3d865f=new Float32Array(0x4*_0x20829e['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x1fe37a),'currentParticlesPosition':Util['createTexture'](_0x1fe37a,_0xe01f12),'nextParticlesPosition':Util[_0x3229b9(0x20d)](_0x1fe37a,_0xe01f12),'currentParticlesSpeed':Util['createTexture'](_0x1fe37a,_0x3d865f),'nextParticlesSpeed':Util['createTexture'](_0x1fe37a,_0x3d865f),'postProcessingPosition':Util['createTexture'](_0x1fe37a,_0xe01f12),'postProcessingSpeed':Util['createTexture'](_0x1fe37a,_0x3d865f)};}['randomizeParticles'](_0x3df526,_0x307f36){const _0x3794c8=_0x3fd775,_0x148808=new Float32Array(0x4*_0x3df526);for(let _0x81584e=0x0;_0x81584e<_0x3df526;_0x81584e++){_0x148808[0x4*_0x81584e]=Cesium$3['Math']['randomBetween'](_0x307f36[_0x3794c8(0x21f)]['x'],_0x307f36['lonRange']['y']),_0x148808[0x4*_0x81584e+0x1]=Cesium$3['Math']['randomBetween'](_0x307f36[_0x3794c8(0x2a7)]['x'],_0x307f36['latRange']['y']),_0x148808[0x4*_0x81584e+0x2]=Cesium$3['Math']['randomBetween'](this[_0x3794c8(0x258)]['lev']['min'],this[_0x3794c8(0x258)]['lev']['max']),_0x148808[0x4*_0x81584e+0x3]=0x0;}return _0x148808;}['destroyParticlesTextures'](){Object['keys'](this['particlesTextures'])['forEach'](_0x387882=>{const _0x4c212d=_0x35e7;this[_0x4c212d(0x2df)][_0x387882]['destroy']();});}[_0x3fd775(0x277)](_0x11ee8d,_0x2dea34,_0xec4ec2){const _0x5efc96=_0x3fd775,_0x3f854d=new Cesium$3[(_0x5efc96(0x25e))](_0x11ee8d[_0x5efc96(0x260)][_0x5efc96(0x2b4)],_0x11ee8d[_0x5efc96(0x260)]['lat'],_0x11ee8d['dimensions']['lev']),_0x1393cc=new Cesium$3['Cartesian3'](_0x11ee8d['lon'][_0x5efc96(0x20a)],_0x11ee8d['lat']['min'],_0x11ee8d['lev']['min']),_0x57bdc1=new Cesium$3[(_0x5efc96(0x25e))](_0x11ee8d['lon']['max'],_0x11ee8d[_0x5efc96(0x229)]['max'],_0x11ee8d['lev']['max']),_0x5b650a=new Cesium$3[(_0x5efc96(0x25e))]((_0x57bdc1['x']-_0x1393cc['x'])/(_0x3f854d['x']-0x1),(_0x57bdc1['y']-_0x1393cc['y'])/(_0x3f854d['y']-0x1),_0x3f854d['z']>0x1?(_0x57bdc1['z']-_0x1393cc['z'])/(_0x3f854d['z']-0x1):0x1),_0x4c9c10=new Cesium$3['Cartesian2'](_0x11ee8d['U'][_0x5efc96(0x20a)],_0x11ee8d['U']['max']),_0x176c8f=new Cesium$3['Cartesian2'](_0x11ee8d['V']['min'],_0x11ee8d['V']['max']),_0x16d5d5=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){const _0x5c507b=_0x5efc96;return _0x16d5d5[_0x5c507b(0x20b)]['U'];},'V':function(){const _0x11153f=_0x5efc96;return _0x16d5d5[_0x11153f(0x20b)]['V'];},'currentParticlesPosition':function(){const _0x5993f3=_0x5efc96;return _0x16d5d5[_0x5993f3(0x2df)][_0x5993f3(0x2a4)];},'dimension':function(){return _0x3f854d;},'minimum':function(){return _0x1393cc;},'maximum':function(){return _0x57bdc1;},'interval':function(){return _0x5b650a;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this[_0x5efc96(0x2df)]['particlesWind'],'preExecute':function(){const _0x230f82=_0x5efc96;_0x16d5d5[_0x230f82(0x2ba)]['getWind']['commandToExecute']['outputTexture']=_0x16d5d5['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x16d5d5['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){return _0x16d5d5['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x4c9c10;},'vSpeedRange':function(){return _0x176c8f;},'pixelSize':function(){return _0xec4ec2['pixelSize'];},'speedFactor':function(){return _0x2dea34['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x18e99a=_0x5efc96,_0x333f2d=_0x16d5d5['particlesTextures']['currentParticlesSpeed'];_0x16d5d5['particlesTextures']['currentParticlesSpeed']=_0x16d5d5['particlesTextures'][_0x18e99a(0x2da)],_0x16d5d5['particlesTextures']['postProcessingSpeed']=_0x333f2d,_0x16d5d5['primitives'][_0x18e99a(0x275)][_0x18e99a(0x2ca)][_0x18e99a(0x288)]=_0x16d5d5['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x16d5d5['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){return _0x16d5d5['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x5efc96(0x23e))]({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x2e53f4=_0x5efc96,_0x5b9bbd=_0x16d5d5['particlesTextures']['currentParticlesPosition'];_0x16d5d5[_0x2e53f4(0x2df)][_0x2e53f4(0x2a4)]=_0x16d5d5['particlesTextures']['postProcessingPosition'],_0x16d5d5[_0x2e53f4(0x2df)]['postProcessingPosition']=_0x5b9bbd,_0x16d5d5['primitives']['updatePosition'][_0x2e53f4(0x2ca)]['outputTexture']=_0x16d5d5[_0x2e53f4(0x2df)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){const _0x59b33d=_0x5efc96;return _0x16d5d5[_0x59b33d(0x2df)][_0x59b33d(0x2ad)];},'nextParticlesSpeed':function(){const _0x518b06=_0x5efc96;return _0x16d5d5[_0x518b06(0x2df)]['nextParticlesSpeed'];},'lonRange':function(){return _0xec4ec2['lonRange'];},'latRange':function(){return _0xec4ec2['latRange'];},'randomCoefficient':function(){const _0x2871d7=Math['random']();return _0x2871d7;},'dropRate':function(){return _0x2dea34['dropRate'];},'dropRateBump':function(){return _0x2dea34['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){const _0x4057fc=_0x5efc96;_0x16d5d5['primitives']['postProcessingPosition']['commandToExecute'][_0x4057fc(0x288)]=_0x16d5d5[_0x4057fc(0x2df)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x1c9b0b=_0x5efc96;return _0x16d5d5['particlesTextures'][_0x1c9b0b(0x278)];},'nextParticlesSpeed':function(){const _0x161948=_0x5efc96;return _0x16d5d5[_0x161948(0x2df)]['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x33ea31=_0x5efc96;_0x16d5d5[_0x33ea31(0x2ba)]['postProcessingSpeed']['commandToExecute']['outputTexture']=_0x16d5d5[_0x33ea31(0x2df)][_0x33ea31(0x2da)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x19ed0c,_0x3513ac,_0x10e4f6,_0x4f22e4){const _0x4d2192=_0x3fd775;this['context']=_0x19ed0c,_0x3513ac={..._0x3513ac},_0x3513ac[_0x4d2192(0x209)]&&_0x3513ac['vdata']&&(_0x3513ac['dimensions']={},_0x3513ac['dimensions']['lon']=_0x3513ac['cols'],_0x3513ac['dimensions'][_0x4d2192(0x229)]=_0x3513ac['rows'],_0x3513ac[_0x4d2192(0x260)]['lev']=_0x3513ac[_0x4d2192(0x21e)]||0x1,_0x3513ac[_0x4d2192(0x2b4)]={},_0x3513ac['lon']['min']=_0x3513ac['xmin'],_0x3513ac['lon']['max']=_0x3513ac[_0x4d2192(0x1fb)],_0x3513ac['lat']={},_0x3513ac[_0x4d2192(0x229)]['min']=_0x3513ac['ymin'],_0x3513ac['lat']['max']=_0x3513ac['ymax'],_0x3513ac['lev']={},_0x3513ac['lev'][_0x4d2192(0x20a)]=_0x3513ac['levmin']??0x1,_0x3513ac[_0x4d2192(0x21e)]['max']=_0x3513ac['levmax']??0x1,_0x3513ac['U']={},_0x3513ac['U']['array']=new Float32Array(_0x3513ac['udata']),_0x3513ac['U']['min']=_0x3513ac['umin']??Math['min'](..._0x3513ac[_0x4d2192(0x209)]),_0x3513ac['U']['max']=_0x3513ac['umax']??Math[_0x4d2192(0x292)](..._0x3513ac[_0x4d2192(0x209)]),_0x3513ac['V']={},_0x3513ac['V']['array']=new Float32Array(_0x3513ac['vdata']),_0x3513ac['V']['min']=_0x3513ac[_0x4d2192(0x298)]??Math['min'](..._0x3513ac['vdata']),_0x3513ac['V']['max']=_0x3513ac['vmax']??Math['max'](..._0x3513ac['vdata'])),this['data']=_0x3513ac,this['options']=_0x10e4f6,this[_0x4d2192(0x28d)]=_0x4f22e4,this['particlesComputing']=new ParticlesComputing(this[_0x4d2192(0x25b)],this['data'],this['options'],this[_0x4d2192(0x28d)]),this[_0x4d2192(0x293)]=new ParticlesRendering(this['context'],this[_0x4d2192(0x258)],this['options'],this['viewerParameters'],this['particlesComputing']);}['canvasResize'](_0x4408ba){const _0x5236af=_0x3fd775;this[_0x5236af(0x269)]['destroyParticlesTextures'](),Object['keys'](this[_0x5236af(0x269)][_0x5236af(0x20b)])[_0x5236af(0x2d4)](_0x3e9100=>{this['particlesComputing']['windTextures'][_0x3e9100]['destroy']();}),this[_0x5236af(0x293)]['textures']['colorTable']['destroy'](),Object[_0x5236af(0x223)](this['particlesRendering']['framebuffers'])['forEach'](_0x1121c8=>{const _0x1949ab=_0x5236af;this['particlesRendering'][_0x1949ab(0x2c0)][_0x1121c8]['destroy']();}),this['context']=_0x4408ba,this['particlesComputing']=new ParticlesComputing(this[_0x5236af(0x25b)],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x5236af(0x269)]);}['clearFramebuffers'](){const _0x20f68e=_0x3fd775,_0x28f1e2=new Cesium$2[(_0x20f68e(0x20e))]({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0x20f68e(0x22c)][_0x20f68e(0x2a5)]});Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x5e70e8=>{_0x28f1e2['framebuffer']=this['particlesRendering']['framebuffers'][_0x5e70e8],_0x28f1e2['execute'](this['context']);});}['refreshParticles'](_0x2a4401){const _0x583e14=_0x3fd775;this[_0x583e14(0x2a1)](),this[_0x583e14(0x269)]['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x2a4401){var _0x5381a1;const _0x15df69=this[_0x583e14(0x293)]['createSegmentsGeometry'](this[_0x583e14(0x25c)]);this['particlesRendering']['primitives']['segments']['geometry']=_0x15df69;const _0x53db79=Cesium$2['VertexArray']['fromGeometry']({'context':this['context'],'geometry':_0x15df69,'attributeLocations':this['particlesRendering']['primitives'][_0x583e14(0x203)][_0x583e14(0x2ae)],'bufferUsage':Cesium$2['BufferUsage'][_0x583e14(0x2ac)]});(_0x5381a1=this['particlesRendering'][_0x583e14(0x2ba)])!==null&&_0x5381a1!==void 0x0&&(_0x5381a1=_0x5381a1[_0x583e14(0x203)])!==null&&_0x5381a1!==void 0x0&&_0x5381a1['commandToExecute']&&(this['particlesRendering'][_0x583e14(0x2ba)]['segments']['commandToExecute']['vertexArray']=_0x53db79);}}['setOptions'](_0x3f5181){let _0xfcc9d2=![];this['options']['maxParticles']!==_0x3f5181['maxParticles']&&(_0xfcc9d2=!![]),Object['keys'](_0x3f5181)['forEach'](_0x4c04b8=>{const _0x369951=_0x35e7;this[_0x369951(0x25c)][_0x4c04b8]=_0x3f5181[_0x4c04b8];}),this['refreshParticles'](_0xfcc9d2);}[_0x3fd775(0x2d0)](_0x133c72){const _0x5aa45f=_0x3fd775;Object['keys'](_0x133c72)['forEach'](_0x46932a=>{this['viewerParameters'][_0x46932a]=_0x133c72[_0x46932a];}),this[_0x5aa45f(0x253)](![]);}['destroy'](){const _0x26e4ee=_0x3fd775;clearTimeout(this['canrefresh']),this[_0x26e4ee(0x269)][_0x26e4ee(0x218)](),Object['keys'](this[_0x26e4ee(0x269)]['windTextures'])[_0x26e4ee(0x2d4)](_0x3a616a=>{const _0x36efb1=_0x26e4ee;this[_0x36efb1(0x269)][_0x36efb1(0x20b)][_0x3a616a]['destroy']();}),this['particlesRendering'][_0x26e4ee(0x2d7)]['colorTable'][_0x26e4ee(0x262)](),Object['keys'](this['particlesRendering']['framebuffers'])[_0x26e4ee(0x2d4)](_0x3349dc=>{const _0x14fb5b=_0x26e4ee;this[_0x14fb5b(0x293)]['framebuffers'][_0x3349dc]['destroy']();});for(const _0x23cf07 in this){delete this[_0x23cf07];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':['rgb(206,255,255)']};function _0x35e7(_0x493cdf,_0x158d31){const _0x3adbc2=_0x3adb();return _0x35e7=function(_0x35e756,_0x3757bb){_0x35e756=_0x35e756-0x1f4;let _0x5aa5d4=_0x3adbc2[_0x35e756];return _0x5aa5d4;},_0x35e7(_0x493cdf,_0x158d31);}class WindLayer extends BaseLayer$1{constructor(_0x4696c4={}){_0x4696c4={...DEF_OPTIONS,..._0x4696c4},super(_0x4696c4),this['_setOptionsHook'](_0x4696c4);}get[_0x3fd775(0x1fa)](){return this['primitives'];}get['data'](){const _0xe84b75=_0x3fd775;return this[_0xe84b75(0x26b)];}set['data'](_0x290681){this['setData'](_0x290681);}get[_0x3fd775(0x2cf)](){return this['options']['colors'];}set['colors'](_0x2428aa){const _0x450325=_0x3fd775;this['options']['colors']=_0x2428aa,this['particleSystem']&&this['particleSystem'][_0x450325(0x1f9)]({'colors':_0x2428aa}),this[_0x450325(0x299)]();}[_0x3fd775(0x273)](){}['_addedHook'](){const _0x3f366c=_0x3fd775;this[_0x3f366c(0x201)]=this['_map']['scene'],this[_0x3f366c(0x24a)]=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives'][_0x3f366c(0x25f)](this[_0x3f366c(0x2ba)]),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x3f366c(0x249)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this[_0x3f366c(0x22a)]['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0x3f366c(0x21a)][_0x3f366c(0x287)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x3f366c(0x21b)],this[_0x3f366c(0x2b2)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x3f366c(0x22e)],this['_onMouseMoveEvent'],this),this['_data']&&this[_0x3f366c(0x217)](this['_data']);}['_removedHook'](){const _0x4774bb=_0x3fd775;window['removeEventListener'](_0x4774bb(0x299),this['resize']),this['_map']['off'](mars3d__namespace[_0x4774bb(0x21a)]['preRender'],this[_0x4774bb(0x2be)],this),this['_map'][_0x4774bb(0x1f7)](mars3d__namespace['EventType'][_0x4774bb(0x21d)],this['_onMapWhellEvent'],this),this[_0x4774bb(0x22a)][_0x4774bb(0x1f7)](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map'][_0x4774bb(0x1f7)](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this[_0x4774bb(0x22a)][_0x4774bb(0x1f7)](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this[_0x4774bb(0x22a)]['scene']['primitives']['remove'](this['primitives']);}[_0x3fd775(0x299)](){const _0x3a33a3=_0x3fd775;if(!this['show']||!this[_0x3a33a3(0x233)])return;this[_0x3a33a3(0x2ba)]['show']=![],this['primitives']['removeAll'](),this['_map'][_0x3a33a3(0x29a)](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x5d8d08){const _0x5966f3=_0x3fd775;this['particleSystem'][_0x5966f3(0x2db)](this['scene']['context']),this[_0x5966f3(0x2b5)](),this[_0x5966f3(0x2ba)]['show']=!![];}['_onMapWhellEvent'](_0x10e6b2){const _0x10611a=_0x3fd775;clearTimeout(this[_0x10611a(0x2bf)]);if(!this['show']||!this['particleSystem'])return;this[_0x10611a(0x2ba)][_0x10611a(0x24b)]=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}[_0x3fd775(0x27e)](_0x3892ae){const _0x5063d1=_0x3fd775;this[_0x5063d1(0x200)]=!![];}[_0x3fd775(0x28e)](_0x147799){const _0x1aa366=_0x3fd775;if(!this[_0x1aa366(0x24b)]||!this['particleSystem'])return;this['mouse_down']&&(this['primitives'][_0x1aa366(0x24b)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x1310fe){const _0x1a8a23=_0x3fd775;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this[_0x1a8a23(0x2ba)]['show']=!![],this[_0x1a8a23(0x200)]=![],this[_0x1a8a23(0x27f)]=![];}['redraw'](){const _0x479fa5=_0x3fd775;if(!this['_map']||!this['show'])return;this[_0x479fa5(0x252)](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0xd554a2){const _0x171267=_0x3fd775;this[_0x171267(0x26b)]=_0xd554a2,this[_0x171267(0x233)]&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x171267(0x25b)],_0xd554a2,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}[_0x3fd775(0x280)](_0x3f8f57,_0x521788){const _0xb31b9d=_0x3fd775;if(_0x3f8f57)for(const _0x189295 in _0x3f8f57){this[_0x189295]=_0x3f8f57[_0x189295];}this[_0xb31b9d(0x233)]&&this['particleSystem'][_0xb31b9d(0x1f9)](this['getOptions']());}[_0x3fd775(0x27b)](){const _0x25c046=_0x3fd775,_0x171592=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x171592*_0x171592,{'particlesTextureSize':_0x171592,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x25c046(0x22d)],'dropRate':this[_0x25c046(0x232)],'dropRateBump':this[_0x25c046(0x23c)],'speedFactor':this[_0x25c046(0x2d6)],'lineWidth':this['lineWidth'],'colors':this[_0x25c046(0x2cf)]};}['addPrimitives'](){const _0x1702e2=_0x3fd775;this['primitives'][_0x1702e2(0x25f)](this[_0x1702e2(0x233)][_0x1702e2(0x269)]['primitives']['getWind']),this[_0x1702e2(0x2ba)]['add'](this['particleSystem']['particlesComputing']['primitives'][_0x1702e2(0x275)]),this[_0x1702e2(0x2ba)]['add'](this['particleSystem'][_0x1702e2(0x269)]['primitives'][_0x1702e2(0x2af)]),this['primitives'][_0x1702e2(0x25f)](this['particleSystem'][_0x1702e2(0x269)]['primitives']['postProcessingPosition']),this[_0x1702e2(0x2ba)][_0x1702e2(0x25f)](this['particleSystem'][_0x1702e2(0x269)]['primitives'][_0x1702e2(0x2da)]),this[_0x1702e2(0x2ba)]['add'](this[_0x1702e2(0x233)]['particlesRendering']['primitives']['segments']),this['primitives']['add'](this['particleSystem'][_0x1702e2(0x293)]['primitives']['trails']),this['primitives']['add'](this[_0x1702e2(0x233)]['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0x39bf89=_0x3fd775;let _0x480bca=this['camera']['computeViewRectangle'](this[_0x39bf89(0x201)]['globe']['ellipsoid']);if(!_0x480bca){const _0x4929b1=this[_0x39bf89(0x22a)]['getExtent']();_0x480bca=Cesium$1['Rectangle'][_0x39bf89(0x245)](_0x4929b1['xmin'],_0x4929b1[_0x39bf89(0x263)],_0x4929b1['xmax'],_0x4929b1['ymax']);}const _0x54db0e=Util[_0x39bf89(0x22f)](_0x480bca);this['viewerParameters']['lonRange']['x']=_0x54db0e['lon']['min'],this['viewerParameters'][_0x39bf89(0x21f)]['y']=_0x54db0e['lon']['max'],this['viewerParameters']['latRange']['x']=_0x54db0e[_0x39bf89(0x229)][_0x39bf89(0x20a)],this['viewerParameters']['latRange']['y']=_0x54db0e['lat']['max'];const _0x3bc978=this['camera'][_0x39bf89(0x213)](this['globeBoundingSphere'],this[_0x39bf89(0x201)]['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x3bc978>0x0&&(this['viewerParameters']['pixelSize']=_0x3bc978);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;function _0x3adb(){const _0x4e40c2=['context','options','uniformMap','Cartesian3','add','dimensions','rows','destroy','ymin','depthMask','Geometry','array','getUVByXY','fixedHeight','particlesComputing','floor','_data','TRIANGLES','default','random','getParticles','defined','segmentsColor','GeometryAttribute','_mountedHook','createFramebuffer','updateSpeed','_speedRate','createComputingPrimitives','postProcessingPosition','postMessage','40BCQOrB','getOptions','1669187TzgwvP','0px','_onMouseDownEvent','mouse_move','_setOptionsHook','redraw','TextureMagnificationFilter','framebuffer','get','removeEventListener','cos','mouseDown','outputTexture','height','nextTrailsDepth','PixelFormat','bind','viewerParameters','_onMouseMoveEvent','SceneTransforms','ALWAYS','sqrt','max','particlesRendering','getColorTexture','628455pASGOb','nextTrails','Appearance','vmin','resize','once','tlat','fromCache','ComputeCommand','globe','viewport','410334BxwNzB','clearFramebuffers','pointerEvents','SceneMode','currentParticlesPosition','OPAQUE','clearCommand','latRange','NEAREST','globalAlpha','9RVbQbF','SCENE3D','STATIC_DRAW','nextParticlesPosition','attributeLocations','updatePosition','absolute','fromCssColorString','_onMouseUpEvent','canvas','lon','addPrimitives','Sampler','canvasWidth','particles','2896376cruTuN','primitives','clientHeight','autoClear','_drawLines','_onMap_preRenderEvent','refreshTimer','framebuffers','WindUtil','Draw','canvasContext','FLOAT','south','canvasWind','style','createCommand','Cesium','commandToExecute','animateFrame','toDegrees','grid','Framebuffer','colors','applyViewerParameters','PixelDatatype','beginPath','_bilinearInterpolation','forEach','defineProperty','speedFactor','textures','east','round','postProcessingSpeed','canvasResize','stroke','particleHeight','ellipsoid','particlesTextures','preExecute','546227njTizE','xmin','_calc_speedRate','randomizeParticles','BaseLayer','LINEAR','WindLayer','off','destroyObject','setOptions','layer','xmax','depthTexture','fragmentShaderSource','geometry','mod','mouse_down','scene','speed','segments','_tomap','maxParticles','2ehuONF','_addedHook','speedRate','udata','min','windTextures','lighter','createTexture','ClearCommand','visible','windData','Math','655314rEDOGi','getPixelSize','GeometryAttributes','2319018OUHWOn','sin','setData','destroyParticlesTextures','98abMeVO','EventType','mouseUp','ComponentDatatype','wheel','lev','lonRange','_onMapWhellEvent','nextTrailsColor','globalCompositeOperation','keys','age','steps','createParticlesTextures','pow','UNSIGNED_INT','lat','_map','source','Pass','fadeOpacity','mouseMove','viewRectangleToLonLatRange','lineWidth','west','dropRate','particleSystem','onmessage','frameTime','clientWidth','getUVByPoint','particlesTextureSize','init','createSegmentsGeometry','cols','dropRateBump','shaderProgram','ShaderSource','now','arrayBufferView','getOwnPropertyDescriptor','vertexShaderSource','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','clear','fromDegrees','worker','36hpfMPv','_updateIng','ZERO','camera','show','getRandomLatLng','pixelSize','270HfnNuw','addEventListener','currentTrails','windField','updateViewerParameters','refreshParticles','toRadians','length','lineTo','maxAge','data','push','update'];_0x3adb=function(){return _0x4e40c2;};return _0x3adb();}class CanvasParticle{constructor(){const _0x5cdd39=_0x3fd775;this['lng']=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this[_0x5cdd39(0x224)]=null,this[_0x5cdd39(0x202)]=null;}['destroy'](){for(const _0x7d370d in this){delete this[_0x7d370d];}}}class CanvasWindField{constructor(_0x2cad23){this['setOptions'](_0x2cad23);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x3e1252){const _0x3f543c=_0x3fd775;this['_speedRate']=(0x64-(_0x3e1252>0x63?0x63:_0x3e1252))*0x64,this[_0x3f543c(0x2e3)]=[(this[_0x3f543c(0x1fb)]-this[_0x3f543c(0x2e2)])/this[_0x3f543c(0x276)],(this['ymax']-this['ymin'])/this[_0x3f543c(0x276)]];}get[_0x3fd775(0x257)](){return this['_maxAge'];}set['maxAge'](_0x2cd20a){this['_maxAge']=_0x2cd20a;}['setOptions'](_0x5d747f){const _0x1baea2=_0x3fd775;this['options']=_0x5d747f,this['maxAge']=_0x5d747f['maxAge']||0x78,this[_0x1baea2(0x208)]=_0x5d747f['speedRate']||0x32,this[_0x1baea2(0x2b8)]=[];const _0x5122bf=_0x5d747f['particlesNumber']||0x1000;for(let _0x242d7d=0x0;_0x242d7d<_0x5122bf;_0x242d7d++){const _0x36b48a=this['_randomParticle'](new CanvasParticle());this['particles'][_0x1baea2(0x259)](_0x36b48a);}}['setDate'](_0x3da943){const _0x59cdc1=_0x3fd775;this[_0x59cdc1(0x261)]=_0x3da943['rows'],this['cols']=_0x3da943[_0x59cdc1(0x23b)],this['xmin']=_0x3da943[_0x59cdc1(0x2e2)],this[_0x59cdc1(0x1fb)]=_0x3da943['xmax'],this['ymin']=_0x3da943[_0x59cdc1(0x263)],this['ymax']=_0x3da943['ymax'],this['grid']=[];const _0x3ffdc2=_0x3da943['udata'],_0xf0f3a0=_0x3da943['vdata'];let _0x3cf6b8=![];_0x3ffdc2['length']===this['rows']&&_0x3ffdc2[0x0][_0x59cdc1(0x255)]===this['cols']&&(_0x3cf6b8=!![]);let _0x419d29=0x0,_0x255a81=null,_0xc14830=null;for(let _0x5d84da=0x0;_0x5d84da<this['rows'];_0x5d84da++){_0x255a81=[];for(let _0x3ba66b=0x0;_0x3ba66b<this['cols'];_0x3ba66b++,_0x419d29++){_0x3cf6b8?_0xc14830=this['_calcUV'](_0x3ffdc2[_0x5d84da][_0x3ba66b],_0xf0f3a0[_0x5d84da][_0x3ba66b]):_0xc14830=this['_calcUV'](_0x3ffdc2[_0x419d29],_0xf0f3a0[_0x419d29]),_0x255a81['push'](_0xc14830);}this[_0x59cdc1(0x2cd)]['push'](_0x255a81);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x2ba1be=_0x3fd775;delete this[_0x2ba1be(0x261)],delete this['cols'],delete this[_0x2ba1be(0x2e2)],delete this[_0x2ba1be(0x1fb)],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x12926d,_0xb365c3){const _0x2deec9=(_0x12926d-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x5a864a=(this['ymax']-_0xb365c3)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0x2deec9,_0x5a864a];}[_0x3fd775(0x267)](_0x3f103b,_0x1f4d2c){const _0x26f91f=_0x3fd775;if(_0x3f103b<0x0||_0x3f103b>=this['cols']||_0x1f4d2c>=this['rows'])return[0x0,0x0,0x0];const _0x54ed6b=Math[_0x26f91f(0x26a)](_0x3f103b),_0x4da522=Math['floor'](_0x1f4d2c);if(_0x54ed6b===_0x3f103b&&_0x4da522===_0x1f4d2c)return this['grid'][_0x1f4d2c][_0x3f103b];const _0x310d0f=_0x54ed6b+0x1,_0x46e57f=_0x4da522+0x1,_0x550ccd=this[_0x26f91f(0x267)](_0x54ed6b,_0x4da522),_0x31f366=this['getUVByXY'](_0x310d0f,_0x4da522),_0x59aa2c=this['getUVByXY'](_0x54ed6b,_0x46e57f),_0x5390f9=this['getUVByXY'](_0x310d0f,_0x46e57f);let _0x1ec796=null;try{_0x1ec796=this[_0x26f91f(0x2d3)](_0x3f103b-_0x54ed6b,_0x1f4d2c-_0x4da522,_0x550ccd,_0x31f366,_0x59aa2c,_0x5390f9);}catch(_0x5670cd){console['log'](_0x3f103b,_0x1f4d2c);}return _0x1ec796;}[_0x3fd775(0x2d3)](_0x1e6d91,_0x4705b,_0x489b6e,_0x135267,_0x5d8eae,_0x59f17d){const _0x263ae6=0x1-_0x1e6d91,_0x485517=0x1-_0x4705b,_0x5d95ce=_0x263ae6*_0x485517,_0x537735=_0x1e6d91*_0x485517,_0x5722ad=_0x263ae6*_0x4705b,_0x4bf540=_0x1e6d91*_0x4705b,_0x296442=_0x489b6e[0x0]*_0x5d95ce+_0x135267[0x0]*_0x537735+_0x5d8eae[0x0]*_0x5722ad+_0x59f17d[0x0]*_0x4bf540,_0x4c458b=_0x489b6e[0x1]*_0x5d95ce+_0x135267[0x1]*_0x537735+_0x5d8eae[0x1]*_0x5722ad+_0x59f17d[0x1]*_0x4bf540;return this['_calcUV'](_0x296442,_0x4c458b);}['_calcUV'](_0x593536,_0x48d335){const _0x5721ca=_0x3fd775;return[+_0x593536,+_0x48d335,Math[_0x5721ca(0x291)](_0x593536*_0x593536+_0x48d335*_0x48d335)];}['getUVByPoint'](_0x48df3b,_0x1cb44b){if(!this['isInExtent'](_0x48df3b,_0x1cb44b))return null;const _0x4fd9b2=this['toGridXY'](_0x48df3b,_0x1cb44b),_0xb6e909=this['getUVByXY'](_0x4fd9b2[0x0],_0x4fd9b2[0x1]);return _0xb6e909;}['isInExtent'](_0x4559bc,_0x37bc89){const _0x2b9c31=_0x3fd775;return _0x4559bc>=this['xmin']&&_0x4559bc<=this[_0x2b9c31(0x1fb)]&&_0x37bc89>=this['ymin']&&_0x37bc89<=this['ymax']?!![]:![];}[_0x3fd775(0x24c)](){const _0x3a0645=_0x3fd775,_0x453612=fRandomByfloat(this['xmin'],this[_0x3a0645(0x1fb)]),_0x55406f=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x55406f,'lng':_0x453612};}[_0x3fd775(0x26f)](){const _0x5e6630=_0x3fd775;let _0x277621,_0x2c06e9,_0x5e4c15;for(let _0x3a50ac=0x0,_0xf9da6d=this[_0x5e6630(0x2b8)]['length'];_0x3a50ac<_0xf9da6d;_0x3a50ac++){let _0x581ef1=this[_0x5e6630(0x2b8)][_0x3a50ac];_0x581ef1[_0x5e6630(0x224)]<=0x0&&(_0x581ef1=this['_randomParticle'](_0x581ef1));if(_0x581ef1[_0x5e6630(0x224)]>0x0){const _0x3c3acd=_0x581ef1['tlng'],_0xe25645=_0x581ef1['tlat'];_0x5e4c15=this['getUVByPoint'](_0x3c3acd,_0xe25645),_0x5e4c15?(_0x277621=_0x3c3acd+this[_0x5e6630(0x2e3)][0x0]*_0x5e4c15[0x0],_0x2c06e9=_0xe25645+this['_calc_speedRate'][0x1]*_0x5e4c15[0x1],_0x581ef1['lng']=_0x3c3acd,_0x581ef1['lat']=_0xe25645,_0x581ef1['tlng']=_0x277621,_0x581ef1['tlat']=_0x2c06e9,_0x581ef1['speed']=_0x5e4c15[0x2],_0x581ef1[_0x5e6630(0x224)]--):_0x581ef1[_0x5e6630(0x224)]=0x0;}}return this[_0x5e6630(0x2b8)];}['_randomParticle'](_0x557e88){const _0x1e0ff9=_0x3fd775;let _0x5e52ed,_0x4e6c7b;for(let _0x384b67=0x0;_0x384b67<0x1e;_0x384b67++){_0x5e52ed=this[_0x1e0ff9(0x24c)](),_0x4e6c7b=this[_0x1e0ff9(0x237)](_0x5e52ed['lng'],_0x5e52ed['lat']);if(_0x4e6c7b&&_0x4e6c7b[0x2]>0x0)break;}if(!_0x4e6c7b)return _0x557e88;const _0x567a8f=_0x5e52ed['lng']+this['_calc_speedRate'][0x0]*_0x4e6c7b[0x0],_0x10d103=_0x5e52ed[_0x1e0ff9(0x229)]+this['_calc_speedRate'][0x1]*_0x4e6c7b[0x1];return _0x557e88['lng']=_0x5e52ed['lng'],_0x557e88[_0x1e0ff9(0x229)]=_0x5e52ed['lat'],_0x557e88['tlng']=_0x567a8f,_0x557e88[_0x1e0ff9(0x29b)]=_0x10d103,_0x557e88[_0x1e0ff9(0x224)]=Math[_0x1e0ff9(0x2d9)](Math[_0x1e0ff9(0x26e)]()*this['maxAge']),_0x557e88['speed']=_0x4e6c7b[0x2],_0x557e88;}['destroy'](){for(const _0x282540 in this){delete this[_0x282540];}}}function fRandomByfloat(_0x2fd1c6,_0x38c59a){const _0x2affcd=_0x3fd775;return _0x2fd1c6+Math[_0x2affcd(0x26e)]()*(_0x38c59a-_0x2fd1c6);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x3fd775(0x1fa)][_0x3fd775(0x1f4)];class CanvasWindLayer extends BaseLayer{constructor(_0x3d9ee0={}){const _0x1490dd=_0x3fd775;super(_0x3d9ee0),this['_setOptionsHook'](_0x3d9ee0),this['canvas']=null,_0x3d9ee0[_0x1490dd(0x2cf)]&&_0x3d9ee0[_0x1490dd(0x225)]&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x3d9ee0));}['_setOptionsHook'](_0x2db09a,_0x1d4522){const _0x427597=_0x3fd775;this[_0x427597(0x235)]=0x3e8/(_0x2db09a['frameRate']||0xa),this['_pointerEvents']=this['options'][_0x427597(0x2a2)]??![],this['color']=_0x2db09a['color']||'#ffffff',this['lineWidth']=_0x2db09a[_0x427597(0x230)]||0x1,this[_0x427597(0x268)]=_0x2db09a['fixedHeight']??0x0,this['reverseY']=_0x2db09a['reverseY']??![],this[_0x427597(0x251)]&&this[_0x427597(0x251)][_0x427597(0x1f9)](_0x2db09a);}get['layer'](){const _0x4c0394=_0x3fd775;return this[_0x4c0394(0x2b3)];}get[_0x3fd775(0x2b7)](){const _0x585fcf=_0x3fd775;return this['_map'][_0x585fcf(0x201)]['canvas']['clientWidth'];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get[_0x3fd775(0x2a2)](){return this['_pointerEvents'];}set[_0x3fd775(0x2a2)](_0x29bdc9){const _0x276022=_0x3fd775;this['_pointerEvents']=_0x29bdc9;if(!this['canvas'])return;_0x29bdc9?this['canvas'][_0x276022(0x2c7)]['pointer-events']='all':this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x3f3e5c){this['options']['particlesNumber']=_0x3f3e5c,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x165ae4=_0x3fd775;return this[_0x165ae4(0x25c)]['speedRate'];}set['speedRate'](_0x41b923){const _0x2b23e8=_0x3fd775;this['options']['speedRate']=_0x41b923,this[_0x2b23e8(0x251)]&&(this[_0x2b23e8(0x251)]['speedRate']=_0x41b923);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x522d97){const _0x2d76aa=_0x3fd775;this['options']['maxAge']=_0x522d97,this[_0x2d76aa(0x251)]&&(this[_0x2d76aa(0x251)]['maxAge']=_0x522d97);}get['data'](){const _0xee8381=_0x3fd775;return this[_0xee8381(0x210)];}set['data'](_0x4e980e){this['setData'](_0x4e980e);}['_showHook'](_0x440215){const _0x15f51d=_0x3fd775;_0x440215?this[_0x15f51d(0x207)]():(this[_0x15f51d(0x210)]&&(this['options'][_0x15f51d(0x258)]=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x13f6d9=_0x3fd775;this[_0x13f6d9(0x25c)]['worker']?this['initWorker']():this['windField']=new CanvasWindField(this[_0x13f6d9(0x25c)]);}[_0x3fd775(0x207)](){const _0x594103=_0x3fd775;this[_0x594103(0x2b3)]=this['_createCanvas'](),this[_0x594103(0x2c3)]=this[_0x594103(0x2b3)]['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options'][_0x594103(0x258)]&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x49dcc1=_0x3fd775;this[_0x49dcc1(0x244)](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x34b684=_0x3fd775,_0x134700=mars3d__namespace['DomUtil']['create']('canvas','mars3d-canvasWind',this['_map']['container']);return _0x134700['style']['position']=_0x34b684(0x2b0),_0x134700[_0x34b684(0x2c7)]['top']=_0x34b684(0x27d),_0x134700['style']['left']='0px',_0x134700['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x134700['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',_0x134700['style']['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x134700[_0x34b684(0x2c7)]['zIndex']=this['options']['zIndex']??0x9,_0x134700['width']=this['_map']['scene']['canvas'][_0x34b684(0x236)],_0x134700[_0x34b684(0x289)]=this['_map']['scene']['canvas']['clientHeight'],_0x134700;}['resize'](){const _0x2a3817=_0x3fd775;this['canvas']&&(this['canvas']['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',this['canvas']['style']['height']=this[_0x2a3817(0x22a)][_0x2a3817(0x201)]['canvas'][_0x2a3817(0x2bb)]+'px',this['canvas']['width']=this[_0x2a3817(0x22a)]['scene'][_0x2a3817(0x2b3)]['clientWidth'],this['canvas']['height']=this['_map']['scene']['canvas']['clientHeight']);}['bindEvent'](){const _0x33a808=_0x3fd775,_0x406710=this;let _0x29ec97=Date['now']();(function _0x3e6450(){const _0x167b71=_0x35e7;_0x406710[_0x167b71(0x2cb)]=window['requestAnimationFrame'](_0x3e6450);if(_0x406710[_0x167b71(0x24b)]&&_0x406710[_0x167b71(0x251)]){const _0x4853bb=Date[_0x167b71(0x23f)](),_0x4ddc68=_0x4853bb-_0x29ec97;_0x4ddc68>_0x406710['frameTime']&&(_0x29ec97=_0x4853bb-_0x4ddc68%_0x406710['frameTime'],_0x406710[_0x167b71(0x25a)]());}}(),window[_0x33a808(0x24f)](_0x33a808(0x299),this[_0x33a808(0x299)][_0x33a808(0x28c)](this),![]),this['mouse_down']=![],this[_0x33a808(0x27f)]=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType'][_0x33a808(0x21d)],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x33a808(0x287)],this[_0x33a808(0x27e)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x4efdec=_0x3fd775;window['cancelAnimationFrame'](this[_0x4efdec(0x2cb)]),delete this['animateFrame'],window[_0x4efdec(0x285)]('resize',this[_0x4efdec(0x299)]),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace[_0x4efdec(0x21a)]['wheel'],this['_onMapWhellEvent'],this),this[_0x4efdec(0x22a)]['off'](mars3d__namespace['EventType'][_0x4efdec(0x287)],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map'][_0x4efdec(0x1f7)](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this));}[_0x3fd775(0x220)](_0xd407fa){const _0x172a7b=_0x3fd775;clearTimeout(this[_0x172a7b(0x2bf)]);if(!this[_0x172a7b(0x24b)]||!this['canvas'])return;this['canvas'][_0x172a7b(0x2c7)]['visibility']='hidden',this['refreshTimer']=setTimeout(()=>{const _0x4a7294=_0x172a7b;if(!this['show'])return;this[_0x4a7294(0x281)](),this['canvas'][_0x4a7294(0x2c7)]['visibility']=_0x4a7294(0x20f);},0xc8);}['_onMouseDownEvent'](_0x3d5146){const _0x2e6529=_0x3fd775;this['mouse_down']=!![],this['_map'][_0x2e6529(0x1f7)](mars3d__namespace['EventType'][_0x2e6529(0x22e)],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x1a819f){const _0x54707b=_0x3fd775;if(!this['show']||!this[_0x54707b(0x2b3)])return;this['mouse_down']&&(this[_0x54707b(0x2b3)][_0x54707b(0x2c7)]['visibility']='hidden',this[_0x54707b(0x27f)]=!![]);}[_0x3fd775(0x2b2)](_0x56cf57){const _0x56ba55=_0x3fd775;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x56ba55(0x28e)],this),this[_0x56ba55(0x200)]&&this['mouse_move']&&this['redraw'](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x5b041c){const _0x2b81ad=_0x3fd775;this['clear'](),this[_0x2b81ad(0x210)]=_0x5b041c,this['windField']['setDate'](_0x5b041c),this['redraw']();}['redraw'](){const _0x5bc800=_0x3fd775;if(!this[_0x5bc800(0x24b)])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){const _0x2f9207=_0x3fd775;if(this[_0x2f9207(0x248)])return;this[_0x2f9207(0x248)]=!![];if(this[_0x2f9207(0x246)])this['windField']['update']();else{const _0x10ed02=this[_0x2f9207(0x251)]['getParticles']();this[_0x2f9207(0x2bd)](_0x10ed02);}this['_updateIng']=![];}['_drawLines'](_0xbad7e5){const _0x1807d1=_0x3fd775;this['canvasContext']['globalCompositeOperation']='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext'][_0x1807d1(0x222)]=_0x1807d1(0x20c),this['canvasContext'][_0x1807d1(0x2a9)]=0.9;const _0x54c721=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0xcb8c5=this[_0x1807d1(0x2b7)]*0.25;if(this['_colorRamp'])for(let _0x5849d8=0x0,_0x1b1774=_0xbad7e5['length'];_0x5849d8<_0x1b1774;_0x5849d8++){const _0x4f4d5a=_0xbad7e5[_0x5849d8],_0x3f0e06=this['_tomap'](_0x4f4d5a['lng'],_0x4f4d5a['lat'],_0x4f4d5a),_0x2e82c9=this['_tomap'](_0x4f4d5a['tlng'],_0x4f4d5a[_0x1807d1(0x29b)],_0x4f4d5a);if(!_0x3f0e06||!_0x2e82c9)continue;if(_0x54c721&&Math['abs'](_0x3f0e06[0x0]-_0x2e82c9[0x0])>=_0xcb8c5)continue;this[_0x1807d1(0x2c3)]['beginPath'](),this['canvasContext']['lineWidth']=this[_0x1807d1(0x230)],this['canvasContext']['strokeStyle']=this['_colorRamp']['getColor'](_0x4f4d5a[_0x1807d1(0x202)]),this['canvasContext']['moveTo'](_0x3f0e06[0x0],_0x3f0e06[0x1]),this['canvasContext'][_0x1807d1(0x256)](_0x2e82c9[0x0],_0x2e82c9[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext'][_0x1807d1(0x2d2)](),this[_0x1807d1(0x2c3)]['lineWidth']=this['lineWidth'],this[_0x1807d1(0x2c3)]['strokeStyle']=this['color'];for(let _0x1d999c=0x0,_0x3745da=_0xbad7e5[_0x1807d1(0x255)];_0x1d999c<_0x3745da;_0x1d999c++){const _0x362583=_0xbad7e5[_0x1d999c],_0x190287=this['_tomap'](_0x362583['lng'],_0x362583['lat'],_0x362583),_0x523e0f=this[_0x1807d1(0x204)](_0x362583['tlng'],_0x362583[_0x1807d1(0x29b)],_0x362583);if(!_0x190287||!_0x523e0f)continue;if(_0x54c721&&Math['abs'](_0x190287[0x0]-_0x523e0f[0x0])>=_0xcb8c5)continue;this['canvasContext']['moveTo'](_0x190287[0x0],_0x190287[0x1]),this['canvasContext'][_0x1807d1(0x256)](_0x523e0f[0x0],_0x523e0f[0x1]);}this[_0x1807d1(0x2c3)][_0x1807d1(0x2dc)]();}}['_tomap'](_0x30c1ad,_0x4d5254,_0x23bac0){const _0x36e15f=_0x3fd775,_0x1e4e55=Cesium['Cartesian3']['fromDegrees'](_0x30c1ad,_0x4d5254,this['fixedHeight']),_0x44f801=this['_map']['scene'];if(_0x44f801['mode']===Cesium['SceneMode']['SCENE3D']){const _0x4dbf08=new Cesium['EllipsoidalOccluder'](_0x44f801[_0x36e15f(0x29e)][_0x36e15f(0x2de)],_0x44f801['camera']['positionWC']),_0x518f4a=_0x4dbf08['isPointVisible'](_0x1e4e55);if(!_0x518f4a)return _0x23bac0['age']=0x0,null;}const _0x3540bc=Cesium[_0x36e15f(0x28f)]['wgs84ToWindowCoordinates'](this['_map'][_0x36e15f(0x201)],_0x1e4e55);return _0x3540bc?[_0x3540bc['x'],_0x3540bc['y']]:null;}['clear'](){const _0x41b3a6=_0x3fd775;this[_0x41b3a6(0x251)][_0x41b3a6(0x244)](),delete this[_0x41b3a6(0x210)];}['initWorker'](){const _0x50a02a=_0x3fd775;this['worker']=new Worker(this['options']['worker']),this[_0x50a02a(0x246)][_0x50a02a(0x234)]=_0x222e50=>{const _0xa51b13=_0x50a02a;this[_0xa51b13(0x2bd)](_0x222e50['data']['particles']),this['_updateIng2']=![];},this[_0x50a02a(0x251)]={'init':_0x42c8e4=>{const _0x5b1c72=_0x50a02a;this['worker']['postMessage']({'type':_0x5b1c72(0x239),'options':_0x42c8e4});},'setOptions':_0x5ee134=>{const _0x475060=_0x50a02a;this[_0x475060(0x246)]['postMessage']({'type':'setOptions','options':_0x5ee134});},'setDate':_0x2bccb6=>{const _0x13ba2e=_0x50a02a;this['worker'][_0x13ba2e(0x279)]({'type':'setDate','data':_0x2bccb6});},'update':()=>{const _0x309a55=_0x50a02a;if(this['_updateIng2'])return;this['_updateIng2']=!![],this[_0x309a55(0x246)]['postMessage']({'type':_0x309a55(0x25a)});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this[_0x50a02a(0x251)]['init'](this[_0x50a02a(0x25c)]);}}mars3d__namespace['LayerUtil']['register'](_0x3fd775(0x2c6),CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace[_0x3fd775(0x2c1)]=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x3fd775(0x1f6)]=WindLayer,exports['WindUtil']=WindUtil,Object[_0x3fd775(0x2d5)](exports,'__esModule',{'value':!![]});
}));