mars3d-wind 3.6.7 → 3.6.8

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.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
3
3
  *
4
- * 版本信息:v3.6.7
5
- * 编译日期:2023-09-26 10:50:24
4
+ * 版本信息:v3.6.8
5
+ * 编译日期:2023-10-09 22:20:34
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 _0x157ab1=_0x2da3;(function(_0x123ee5,_0x22e41a){const _0x245316=_0x2da3,_0x4d72d5=_0x123ee5();while(!![]){try{const _0x29e199=parseInt(_0x245316(0x259))/0x1*(-parseInt(_0x245316(0x231))/0x2)+parseInt(_0x245316(0x276))/0x3*(parseInt(_0x245316(0x2a2))/0x4)+-parseInt(_0x245316(0x26b))/0x5*(-parseInt(_0x245316(0x257))/0x6)+parseInt(_0x245316(0x200))/0x7*(parseInt(_0x245316(0x206))/0x8)+-parseInt(_0x245316(0x22d))/0x9*(parseInt(_0x245316(0x224))/0xa)+parseInt(_0x245316(0x2bc))/0xb+parseInt(_0x245316(0x2c3))/0xc*(-parseInt(_0x245316(0x1e9))/0xd);if(_0x29e199===_0x22e41a)break;else _0x4d72d5['push'](_0x4d72d5['shift']());}catch(_0x46f01b){_0x4d72d5['push'](_0x4d72d5['shift']());}}}(_0x17cd,0x97126));function _interopNamespace(_0x3bf992){if(_0x3bf992&&_0x3bf992['__esModule'])return _0x3bf992;var _0x45a740=Object['create'](null);return _0x3bf992&&Object['keys'](_0x3bf992)['forEach'](function(_0x286587){if(_0x286587!=='default'){var _0x2f1ada=Object['getOwnPropertyDescriptor'](_0x3bf992,_0x286587);Object['defineProperty'](_0x45a740,_0x286587,_0x2f1ada['get']?_0x2f1ada:{'enumerable':!![],'get':function(){return _0x3bf992[_0x286587];}});}}),_0x45a740['default']=_0x3bf992,_0x45a740;}function _0x17cd(){const _0x17fae0=['BufferUsage','speedRate','_randomParticle','_bilinearInterpolation','absolute','1556711tmioTx','auto','pointerEvents','maxParticles','red','currentTrailsDepth','viewRectangleToLonLatRange','width','canvasWind','lonRange','_setOptionsHook','canvas','mouse_move','getPixelSize','xmin','zIndex','_data','currentParticlesSpeed','_addedHook','getFullscreenQuad','update','createRenderingFramebuffers','particles','4011lOVKTW','lat','updateViewerParameters','cancelAnimationFrame','lineWidth','depthTest','9904pMUnEv','createTexture','toDegrees','abs','Draw','getOptions','latRange','height','lon','EventType','_onMouseUpEvent','mode','age','maxAge','framebuffer','windTextures','_onMouseMoveEvent','IDENTITY','dimensions','vertexArray','clientHeight','Cesium','color','getDefaultRenderState','WindLayer','_drawLines','currentTrailsColor','mouseMove','framebuffers','nextParticlesSpeed','10PvcpmR','LayerUtil','currentTrails','VertexArray','style','tlat','min','push','postProcessingSpeed','2977857vDCbBu','preRender','max','OPAQUE','222648zmvoCJ','remove','CanvasWindLayer','all','randomizeParticles','setDate','options','globeBoundingSphere','context','isPointVisible','sqrt','canvasContext','createRawRenderState','colors','_map','shaderProgram','Compute','show','strokeStyle','animateFrame','globalCompositeOperation','particlesTextures','particlesComputing','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','PixelFormat','getParticles','cols','primitives','beginPath','data','xmax','ShaderSource','length','keys','postMessage','speed','updateSpeed','worker','64884iIhckD','nextTrailsColor','3mKakiC','createParticlesTextures','randomBetween','LINEAR','_onMapWhellEvent','init','TRIANGLES','Color','pow','frameTime','NEAREST','_calcUV','vertexShaderSource','toGridXY','canvasWidth','RGBA','clearCommand','SCENE3D','465ZxZkua','PixelDatatype','createSegmentsGeometry','createRenderingTextures','random','preExecute','_showHook','addPrimitives','postProcessingPosition','Math','getWind','354WfMoOG','rows','defined','viewerParameters','createRenderingPrimitives','getUVByXY','frameRate','ymax','addEventListener','createCommand','_updateIng2','array','windData','udata','off','lng','0px','mars3d-canvasWind','_pointerEvents','_onMap_preRenderEvent','outputTexture','Geometry','getRandomLatLng','bindEvent','mouseDown','moveTo','segmentsColor','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','fillRect','canvasHeight','lev','position','defineProperty','particlesTextureSize','commandToExecute','pixelSize','resize','Appearance','_colorRamp','clientWidth','vdata','destroyParticlesTextures','colorTable','removeAll','28812ZHSQrQ','segments','particlesRendering','destroy','STATIC_DRAW','fragmentShaderSource','TextureMinificationFilter','Texture','_updateIng','scene','textures','log','fixedHeight','blue','vmax','Cartesian3','PrimitiveType','uniformMap','lineTo','BaseLayer','_calc_speedRate','commandType','tlng','green','_tomap','refreshParticles','8297344iGFnJV','particlesWind','_speedRate','DISABLE_GL_POSITION_LOG_DEPTH','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','canvasResize','DomUtil','204fbMcsV','drawingBufferWidth','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','forEach','CanvasWindField','currentParticlesPosition','ComponentDatatype','particleSystem','camera','steps','windField','grid','setOptions','_mountedHook','SceneMode','isInExtent','ClearCommand','attributeLocations','Cartesian2','ymin','globe','container','geometry','nextTrails','getUVByPoint','mouseUp','redraw','drawingBufferHeight','getExtent','FLOAT'];_0x17cd=function(){return _0x17fae0;};return _0x17cd();}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0xb03007,_0x316166){const _0x50a1a0=_0xb03007*Math['cos'](Cesium$7['Math']['toRadians'](_0x316166));return _0x50a1a0;}function _0x2da3(_0x14d8cf,_0x4d25b0){const _0x17cd84=_0x17cd();return _0x2da3=function(_0x2da3bb,_0x59464f){_0x2da3bb=_0x2da3bb-0x1dc;let _0x51f46b=_0x17cd84[_0x2da3bb];return _0x51f46b;},_0x2da3(_0x14d8cf,_0x4d25b0);}function getV(_0x5030ab,_0x2452b5){const _0x210a31=_0x5030ab*Math['sin'](Cesium$7['Math']['toRadians'](_0x2452b5));return _0x210a31;}function getSpeed(_0x1410dc,_0x1fb675){const _0x37c98d=_0x2da3,_0x4a259c=Math[_0x37c98d(0x23b)](Math[_0x37c98d(0x261)](_0x1410dc,0x2)+Math[_0x37c98d(0x261)](_0x1fb675,0x2));return _0x4a259c;}function getDirection(_0x409e6d,_0x52081c){const _0x3b1860=_0x2da3;let _0x276d20=Cesium$7['Math'][_0x3b1860(0x208)](Math['atan2'](_0x52081c,_0x409e6d));return _0x276d20+=_0x276d20<0x0?0x168:0x0,_0x276d20;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x41e30d){const _0x11b7f6=_0x2da3;this[_0x11b7f6(0x2b7)]=_0x41e30d['commandType'],this['geometry']=_0x41e30d['geometry'],this[_0x11b7f6(0x2d4)]=_0x41e30d['attributeLocations'],this['primitiveType']=_0x41e30d['primitiveType'],this[_0x11b7f6(0x2b3)]=_0x41e30d[_0x11b7f6(0x2b3)],this['vertexShaderSource']=_0x41e30d['vertexShaderSource'],this['fragmentShaderSource']=_0x41e30d[_0x11b7f6(0x2a7)],this['rawRenderState']=_0x41e30d['rawRenderState'],this['framebuffer']=_0x41e30d[_0x11b7f6(0x214)],this['outputTexture']=_0x41e30d['outputTexture'],this['autoClear']=_0x41e30d['autoClear']??![],this[_0x11b7f6(0x270)]=_0x41e30d['preExecute'],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6[(_0x11b7f6(0x260))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x303767){const _0xfa30a6=_0x2da3;switch(this[_0xfa30a6(0x2b7)]){case _0xfa30a6(0x20a):{const _0x184cb1=Cesium$6['VertexArray']['fromGeometry']({'context':_0x303767,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0xfa30a6(0x1e4)]['STATIC_DRAW']}),_0xe31a9f=Cesium$6['ShaderProgram']['fromCache']({'context':_0x303767,'attributeLocations':this[_0xfa30a6(0x2d4)],'vertexShaderSource':this[_0xfa30a6(0x265)],'fragmentShaderSource':this['fragmentShaderSource']}),_0x1c1c37=Cesium$6['RenderState']['fromCache'](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0xe31a9f,'vertexArray':_0x184cb1,'modelMatrix':Cesium$6['Matrix4'][_0xfa30a6(0x217)],'renderState':_0x1c1c37,'uniformMap':this[_0xfa30a6(0x2b3)],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0xfa30a6(0x214)],'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[_0xfa30a6(0x28a)],'persists':!![]});}}}['setGeometry'](_0x2c9f41,_0x41370a){const _0x299e7d=_0x2da3;this['geometry']=_0x41370a;const _0x30fbb7=Cesium$6['VertexArray']['fromGeometry']({'context':_0x2c9f41,'geometry':this[_0x299e7d(0x1dc)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0x299e7d(0x2a6)]});this['commandToExecute']['vertexArray']=_0x30fbb7;}['update'](_0x13ba42){const _0x4b4254=_0x2da3;if(!this['show'])return;if(_0x13ba42['mode']!==Cesium$6[_0x4b4254(0x2d1)][_0x4b4254(0x26a)])return;!Cesium$6[_0x4b4254(0x278)](this['commandToExecute'])&&(this['commandToExecute']=this[_0x4b4254(0x27f)](_0x13ba42[_0x4b4254(0x239)])),Cesium$6['defined'](this[_0x4b4254(0x270)])&&this[_0x4b4254(0x270)](),Cesium$6[_0x4b4254(0x278)](this['clearCommand'])&&_0x13ba42['commandList']['push'](this[_0x4b4254(0x269)]),_0x13ba42['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x32227b=_0x2da3;if(this[_0x32227b(0x269)]){var _0xefe0e1,_0xe7cfc7;(_0xefe0e1=this['clearCommand'])!==null&&_0xefe0e1!==void 0x0&&_0xefe0e1[_0x32227b(0x219)]&&this['clearCommand']['vertexArray'][_0x32227b(0x2a5)](),(_0xe7cfc7=this[_0x32227b(0x269)])!==null&&_0xe7cfc7!==void 0x0&&_0xe7cfc7[_0x32227b(0x240)]&&this[_0x32227b(0x269)][_0x32227b(0x240)][_0x32227b(0x2a5)](),delete this[_0x32227b(0x269)];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this['commandToExecute']['vertexArray'][_0x32227b(0x2a5)](),this['commandToExecute']['shaderProgram']&&this[_0x32227b(0x298)][_0x32227b(0x240)]['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace[_0x157ab1(0x21b)],Util=(function(){const _0x1adfe2=function(){const _0x5ba9b9=_0x2da3,_0x2ab81a=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5[_0x5ba9b9(0x2c9)]['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[_0x5ba9b9(0x2c9)]['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x2ab81a;},_0x5abd99=function(_0x560415,_0x32fd9b){const _0x1f9262=_0x2da3;if(Cesium$5['defined'](_0x32fd9b)){const _0x105828={};_0x105828['arrayBufferView']=_0x32fd9b,_0x560415['source']=_0x105828;}const _0x2de470=new Cesium$5[(_0x1f9262(0x2a9))](_0x560415);return _0x2de470;},_0x136fbd=function(_0x407995,_0x328a42,_0x5517b5){const _0x11210a=new Cesium$5['Framebuffer']({'context':_0x407995,'colorTextures':[_0x328a42],'depthTexture':_0x5517b5});return _0x11210a;},_0x298b8b=function(_0x584ab5){const _0x5638c9=_0x2da3,_0x32a08e=!![],_0x38c5aa=![],_0x382490={'viewport':_0x584ab5['viewport'],'depthTest':_0x584ab5[_0x5638c9(0x205)],'depthMask':_0x584ab5['depthMask'],'blending':_0x584ab5['blending']},_0x55cea5=Cesium$5[_0x5638c9(0x29b)][_0x5638c9(0x21d)](_0x32a08e,_0x38c5aa,_0x382490);return _0x55cea5;},_0x16e603=function(_0x1283f6){const _0x1ccc0a=_0x2da3,_0x2a216f={},_0x3a4ec9=Cesium$5['Math']['mod'](_0x1283f6['west'],Cesium$5[_0x1ccc0a(0x274)]['TWO_PI']),_0x149d00=Cesium$5[_0x1ccc0a(0x274)]['mod'](_0x1283f6['east'],Cesium$5[_0x1ccc0a(0x274)]['TWO_PI']),_0x3c85d2=_0x1283f6['width'];let _0x58f772,_0x25eab6;_0x3c85d2>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x58f772=0x0,_0x25eab6=Cesium$5['Math']['TWO_PI']):_0x149d00-_0x3a4ec9<_0x3c85d2?(_0x58f772=_0x3a4ec9,_0x25eab6=_0x3a4ec9+_0x3c85d2):(_0x58f772=_0x3a4ec9,_0x25eab6=_0x149d00);_0x2a216f[_0x1ccc0a(0x20e)]={'min':Cesium$5['Math'][_0x1ccc0a(0x208)](_0x58f772),'max':Cesium$5['Math']['toDegrees'](_0x25eab6)};const _0xeffa40=_0x1283f6['south'],_0x17c3b8=_0x1283f6['north'],_0x4238a2=_0x1283f6[_0x1ccc0a(0x20d)],_0x3de1ef=_0x4238a2>Cesium$5['Math']['PI']/0xc?_0x4238a2/0x2:0x0;let _0x533412=Cesium$5['Math']['clampToLatitudeRange'](_0xeffa40-_0x3de1ef),_0x13beb2=Cesium$5['Math']['clampToLatitudeRange'](_0x17c3b8+_0x3de1ef);return _0x533412<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x533412=-Cesium$5[_0x1ccc0a(0x274)]['PI_OVER_TWO']),_0x13beb2>Cesium$5[_0x1ccc0a(0x274)]['PI_OVER_THREE']&&(_0x13beb2=Cesium$5[_0x1ccc0a(0x274)]['PI_OVER_TWO']),_0x2a216f['lat']={'min':Cesium$5['Math']['toDegrees'](_0x533412),'max':Cesium$5['Math']['toDegrees'](_0x13beb2)},_0x2a216f;};return{'getFullscreenQuad':_0x1adfe2,'createTexture':_0x5abd99,'createFramebuffer':_0x136fbd,'createRawRenderState':_0x298b8b,'viewRectangleToLonLatRange':_0x16e603};}());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=_0x157ab1(0x2c0),trailDraw_frag=_0x157ab1(0x291),screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x31daf4,_0x5e8228,_0x112327,_0x3d7a9b,_0x2ea792){const _0x5259da=_0x157ab1;this[_0x5259da(0x26e)](_0x31daf4,_0x5e8228,_0x112327[_0x5259da(0x23e)]),this['createRenderingFramebuffers'](_0x31daf4),this[_0x5259da(0x27a)](_0x31daf4,_0x112327,_0x3d7a9b,_0x2ea792);}['createRenderingTextures'](_0x2c3fd9,_0x2365d7,_0x3773a1){const _0x103373=_0x157ab1,_0x4ae663={'context':_0x2c3fd9,'width':_0x2c3fd9['drawingBufferWidth'],'height':_0x2c3fd9['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x5807c5={'context':_0x2c3fd9,'width':_0x2c3fd9['drawingBufferWidth'],'height':_0x2c3fd9['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x1ac035=_0x3773a1['length'],_0xb9567b=new Float32Array(_0x1ac035*0x3);for(let _0xfe80ff=0x0;_0xfe80ff<_0x1ac035;_0xfe80ff++){const _0x1f0e5a=Cesium$4['Color']['fromCssColorString'](_0x3773a1[_0xfe80ff]);_0xb9567b[0x3*_0xfe80ff]=_0x1f0e5a[_0x103373(0x1ed)],_0xb9567b[0x3*_0xfe80ff+0x1]=_0x1f0e5a[_0x103373(0x2b9)],_0xb9567b[0x3*_0xfe80ff+0x2]=_0x1f0e5a[_0x103373(0x2af)];}const _0x5b0021={'context':_0x2c3fd9,'width':_0x1ac035,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x103373(0x1e3)],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter'][_0x103373(0x25c)],'magnificationFilter':Cesium$4['TextureMagnificationFilter'][_0x103373(0x25c)]})};this['textures']={'segmentsColor':Util[_0x103373(0x207)](_0x4ae663),'segmentsDepth':Util['createTexture'](_0x5807c5),'currentTrailsColor':Util[_0x103373(0x207)](_0x4ae663),'currentTrailsDepth':Util['createTexture'](_0x5807c5),'nextTrailsColor':Util['createTexture'](_0x4ae663),'nextTrailsDepth':Util['createTexture'](_0x5807c5),'colorTable':Util['createTexture'](_0x5b0021,_0xb9567b)};}[_0x157ab1(0x1fe)](_0x4bae77){const _0x30f210=_0x157ab1;this['framebuffers']={'segments':Util['createFramebuffer'](_0x4bae77,this['textures'][_0x30f210(0x290)],this[_0x30f210(0x2ac)]['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x4bae77,this['textures'][_0x30f210(0x220)],this[_0x30f210(0x2ac)][_0x30f210(0x1ee)]),'nextTrails':Util['createFramebuffer'](_0x4bae77,this[_0x30f210(0x2ac)][_0x30f210(0x258)],this['textures']['nextTrailsDepth'])};}[_0x157ab1(0x26d)](_0xbea75a){const _0x190251=_0x157ab1,_0x531b29=0x4;let _0x403b16=[];for(let _0x44f92e=0x0;_0x44f92e<_0xbea75a[_0x190251(0x297)];_0x44f92e++){for(let _0x478a41=0x0;_0x478a41<_0xbea75a['particlesTextureSize'];_0x478a41++){for(let _0x77aae8=0x0;_0x77aae8<_0x531b29;_0x77aae8++){_0x403b16['push'](_0x44f92e/_0xbea75a[_0x190251(0x297)]),_0x403b16['push'](_0x478a41/_0xbea75a['particlesTextureSize']);}}}_0x403b16=new Float32Array(_0x403b16);let _0x5266b6=[];const _0x505854=[-0x1,0x1],_0x9fd501=[-0x1,0x1];for(let _0xf4ea=0x0;_0xf4ea<_0xbea75a[_0x190251(0x1ec)];_0xf4ea++){for(let _0x2096fb=0x0;_0x2096fb<_0x531b29/0x2;_0x2096fb++){for(let _0x1842a3=0x0;_0x1842a3<_0x531b29/0x2;_0x1842a3++){_0x5266b6[_0x190251(0x22b)](_0x505854[_0x2096fb]),_0x5266b6['push'](_0x9fd501[_0x1842a3]),_0x5266b6['push'](0x0);}}}_0x5266b6=new Float32Array(_0x5266b6);const _0x31f3c9=0x6*_0xbea75a['maxParticles'],_0x1f4d46=new Uint32Array(_0x31f3c9);for(let _0x4f05b9=0x0,_0x4459a4=0x0,_0x3c4a55=0x0;_0x4f05b9<_0xbea75a['maxParticles'];_0x4f05b9++){_0x1f4d46[_0x4459a4++]=_0x3c4a55+0x0,_0x1f4d46[_0x4459a4++]=_0x3c4a55+0x1,_0x1f4d46[_0x4459a4++]=_0x3c4a55+0x2,_0x1f4d46[_0x4459a4++]=_0x3c4a55+0x2,_0x1f4d46[_0x4459a4++]=_0x3c4a55+0x1,_0x1f4d46[_0x4459a4++]=_0x3c4a55+0x3,_0x3c4a55+=0x4;}const _0x4018bd=new Cesium$4[(_0x190251(0x28b))]({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x403b16}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x5266b6})}),'indices':_0x1f4d46});return _0x4018bd;}[_0x157ab1(0x27a)](_0x54fe72,_0x1002bd,_0x10d151,_0x40c5bc){const _0xf6fde5=_0x157ab1,_0x56aee9=this;this['primitives']={'segments':new CustomPrimitive({'commandType':_0xf6fde5(0x20a),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x1002bd),'primitiveType':Cesium$4[_0xf6fde5(0x2b2)]['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0x32dc69=_0xf6fde5;return _0x40c5bc[_0x32dc69(0x246)]['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x40c5bc['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x417f9b=_0xf6fde5;return _0x40c5bc[_0x417f9b(0x246)]['postProcessingSpeed'];},'colorTable':function(){const _0x115cf0=_0xf6fde5;return _0x56aee9['textures'][_0x115cf0(0x2a0)];},'aspect':function(){const _0x3e2497=_0xf6fde5;return _0x54fe72[_0x3e2497(0x2c4)]/_0x54fe72[_0x3e2497(0x1e1)];},'pixelSize':function(){return _0x10d151['pixelSize'];},'lineWidth':function(){return _0x1002bd['lineWidth'];},'particleHeight':function(){return _0x1002bd['particleHeight'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0xf6fde5(0x2a3)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0xf6fde5(0x1fc)](),'primitiveType':Cesium$4[_0xf6fde5(0x2b2)][_0xf6fde5(0x25f)],'uniformMap':{'segmentsColorTexture':function(){return _0x56aee9['textures']['segmentsColor'];},'segmentsDepthTexture':function(){return _0x56aee9['textures']['segmentsDepth'];},'currentTrailsColor':function(){return _0x56aee9['framebuffers']['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x56aee9['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0x1002bd['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0xf6fde5(0x2bf)],'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']['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0xf6fde5(0x222)]['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x4908db=_0xf6fde5,_0x4eaf5a=_0x56aee9['framebuffers']['currentTrails'];_0x56aee9['framebuffers'][_0x4908db(0x226)]=_0x56aee9['framebuffers'][_0x4908db(0x1dd)],_0x56aee9['framebuffers'][_0x4908db(0x1dd)]=_0x4eaf5a,_0x56aee9['primitives']['trails'][_0x4908db(0x298)]['framebuffer']=_0x56aee9[_0x4908db(0x222)][_0x4908db(0x1dd)],_0x56aee9['primitives']['trails']['clearCommand']['framebuffer']=_0x56aee9['framebuffers']['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0xf6fde5(0x25f)],'uniformMap':{'trailsColorTexture':function(){return _0x56aee9['framebuffers']['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x56aee9['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0xf6fde5(0x250))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0xf6fde5(0x23d)]({'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=_0x157ab1(0x248),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=_0x157ab1(0x2c5),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(_0x3afdf8,_0x309734,_0x31fd64,_0x2552fc){const _0x847ca1=_0x157ab1;this['data']=_0x309734,this['createWindTextures'](_0x3afdf8,_0x309734),this[_0x847ca1(0x25a)](_0x3afdf8,_0x31fd64,_0x2552fc),this['createComputingPrimitives'](_0x309734,_0x31fd64,_0x2552fc);}['createWindTextures'](_0x57d4de,_0x32d88d){const _0x2c1adf=_0x157ab1,_0x500cd0={'context':_0x57d4de,'width':_0x32d88d['dimensions']['lon'],'height':_0x32d88d[_0x2c1adf(0x218)][_0x2c1adf(0x201)]*(_0x32d88d['dimensions'][_0x2c1adf(0x294)]||0x1),'pixelFormat':Cesium$3[_0x2c1adf(0x249)]['LUMINANCE'],'pixelDatatype':Cesium$3[_0x2c1adf(0x26c)]['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3[_0x2c1adf(0x2a8)]['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x500cd0,_0x32d88d['U'][_0x2c1adf(0x281)]),'V':Util['createTexture'](_0x500cd0,_0x32d88d['V']['array'])};}['createParticlesTextures'](_0x52c382,_0x4c52d5,_0x1a468d){const _0x1ec9a7=_0x157ab1,_0x456e96={'context':_0x52c382,'width':_0x4c52d5['particlesTextureSize'],'height':_0x4c52d5['particlesTextureSize'],'pixelFormat':Cesium$3[_0x1ec9a7(0x249)][_0x1ec9a7(0x268)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3[_0x1ec9a7(0x2a8)][_0x1ec9a7(0x263)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x3b470b=this[_0x1ec9a7(0x235)](_0x4c52d5['maxParticles'],_0x1a468d),_0x50889a=new Float32Array(0x4*_0x4c52d5['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x456e96),'currentParticlesPosition':Util['createTexture'](_0x456e96,_0x3b470b),'nextParticlesPosition':Util[_0x1ec9a7(0x207)](_0x456e96,_0x3b470b),'currentParticlesSpeed':Util[_0x1ec9a7(0x207)](_0x456e96,_0x50889a),'nextParticlesSpeed':Util[_0x1ec9a7(0x207)](_0x456e96,_0x50889a),'postProcessingPosition':Util['createTexture'](_0x456e96,_0x3b470b),'postProcessingSpeed':Util['createTexture'](_0x456e96,_0x50889a)};}['randomizeParticles'](_0x2a6f70,_0x1c81f5){const _0x3247dd=_0x157ab1,_0x53751b=new Float32Array(0x4*_0x2a6f70);for(let _0x4f9d24=0x0;_0x4f9d24<_0x2a6f70;_0x4f9d24++){_0x53751b[0x4*_0x4f9d24]=Cesium$3[_0x3247dd(0x274)]['randomBetween'](_0x1c81f5['lonRange']['x'],_0x1c81f5['lonRange']['y']),_0x53751b[0x4*_0x4f9d24+0x1]=Cesium$3[_0x3247dd(0x274)][_0x3247dd(0x25b)](_0x1c81f5['latRange']['x'],_0x1c81f5[_0x3247dd(0x20c)]['y']),_0x53751b[0x4*_0x4f9d24+0x2]=Cesium$3['Math']['randomBetween'](this['data'][_0x3247dd(0x294)]['min'],this[_0x3247dd(0x24e)]['lev']['max']),_0x53751b[0x4*_0x4f9d24+0x3]=0x0;}return _0x53751b;}['destroyParticlesTextures'](){const _0x1a3b0f=_0x157ab1;Object['keys'](this[_0x1a3b0f(0x246)])[_0x1a3b0f(0x2c6)](_0xf56359=>{this['particlesTextures'][_0xf56359]['destroy']();});}['createComputingPrimitives'](_0x3a9e13,_0x5b86e9,_0x5c0ade){const _0x5c8d24=_0x157ab1,_0x57e4f5=new Cesium$3['Cartesian3'](_0x3a9e13['dimensions']['lon'],_0x3a9e13['dimensions']['lat'],_0x3a9e13['dimensions']['lev']),_0x499416=new Cesium$3['Cartesian3'](_0x3a9e13['lon']['min'],_0x3a9e13['lat']['min'],_0x3a9e13[_0x5c8d24(0x294)][_0x5c8d24(0x22a)]),_0x1c8c1b=new Cesium$3['Cartesian3'](_0x3a9e13['lon']['max'],_0x3a9e13['lat']['max'],_0x3a9e13[_0x5c8d24(0x294)][_0x5c8d24(0x22f)]),_0x371086=new Cesium$3[(_0x5c8d24(0x2b1))]((_0x1c8c1b['x']-_0x499416['x'])/(_0x57e4f5['x']-0x1),(_0x1c8c1b['y']-_0x499416['y'])/(_0x57e4f5['y']-0x1),_0x57e4f5['z']>0x1?(_0x1c8c1b['z']-_0x499416['z'])/(_0x57e4f5['z']-0x1):0x1),_0x3b2ed8=new Cesium$3[(_0x5c8d24(0x2d5))](_0x3a9e13['U']['min'],_0x3a9e13['U'][_0x5c8d24(0x22f)]),_0x1238a3=new Cesium$3[(_0x5c8d24(0x2d5))](_0x3a9e13['V']['min'],_0x3a9e13['V'][_0x5c8d24(0x22f)]),_0x11eaa3=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x11eaa3['windTextures']['U'];},'V':function(){return _0x11eaa3['windTextures']['V'];},'currentParticlesPosition':function(){return _0x11eaa3['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x57e4f5;},'minimum':function(){return _0x499416;},'maximum':function(){return _0x1c8c1b;},'interval':function(){return _0x371086;}},'fragmentShaderSource':new Cesium$3[(_0x5c8d24(0x250))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x5c8d24(0x2bd)],'preExecute':function(){const _0x337671=_0x5c8d24;_0x11eaa3[_0x337671(0x24c)][_0x337671(0x275)]['commandToExecute']['outputTexture']=_0x11eaa3['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':_0x5c8d24(0x241),'uniformMap':{'currentParticlesSpeed':function(){const _0x47d28f=_0x5c8d24;return _0x11eaa3[_0x47d28f(0x246)][_0x47d28f(0x1fa)];},'particlesWind':function(){const _0x433a5a=_0x5c8d24;return _0x11eaa3[_0x433a5a(0x246)]['particlesWind'];},'uSpeedRange':function(){return _0x3b2ed8;},'vSpeedRange':function(){return _0x1238a3;},'pixelSize':function(){const _0x4876f0=_0x5c8d24;return _0x5c0ade[_0x4876f0(0x299)];},'speedFactor':function(){return _0x5b86e9['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this[_0x5c8d24(0x246)][_0x5c8d24(0x223)],'preExecute':function(){const _0x23d605=_0x5c8d24,_0x28e9fe=_0x11eaa3[_0x23d605(0x246)]['currentParticlesSpeed'];_0x11eaa3['particlesTextures']['currentParticlesSpeed']=_0x11eaa3[_0x23d605(0x246)]['postProcessingSpeed'],_0x11eaa3['particlesTextures'][_0x23d605(0x22c)]=_0x28e9fe,_0x11eaa3[_0x23d605(0x24c)][_0x23d605(0x255)]['commandToExecute']['outputTexture']=_0x11eaa3['particlesTextures'][_0x23d605(0x223)];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x448ebf=_0x5c8d24;return _0x11eaa3['particlesTextures'][_0x448ebf(0x2c8)];},'currentParticlesSpeed':function(){const _0x53889f=_0x5c8d24;return _0x11eaa3[_0x53889f(0x246)]['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x5c8d24(0x246)]['nextParticlesPosition'],'preExecute':function(){const _0x5bd8b8=_0x5c8d24,_0x1d64cc=_0x11eaa3['particlesTextures'][_0x5bd8b8(0x2c8)];_0x11eaa3[_0x5bd8b8(0x246)][_0x5bd8b8(0x2c8)]=_0x11eaa3[_0x5bd8b8(0x246)][_0x5bd8b8(0x273)],_0x11eaa3[_0x5bd8b8(0x246)]['postProcessingPosition']=_0x1d64cc,_0x11eaa3[_0x5bd8b8(0x24c)]['updatePosition'][_0x5bd8b8(0x298)]['outputTexture']=_0x11eaa3[_0x5bd8b8(0x246)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x11eaa3['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x11eaa3['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x1497a5=_0x5c8d24;return _0x5c0ade[_0x1497a5(0x1f2)];},'latRange':function(){return _0x5c0ade['latRange'];},'randomCoefficient':function(){const _0x10f257=_0x5c8d24,_0x390cd6=Math[_0x10f257(0x26f)]();return _0x390cd6;},'dropRate':function(){return _0x5b86e9['dropRate'];},'dropRateBump':function(){return _0x5b86e9['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures'][_0x5c8d24(0x273)],'preExecute':function(){const _0x55f131=_0x5c8d24;_0x11eaa3['primitives'][_0x55f131(0x273)]['commandToExecute']['outputTexture']=_0x11eaa3[_0x55f131(0x246)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x11eaa3['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x11eaa3['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x5c8d24(0x250))]({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x5c8d24(0x22c)],'preExecute':function(){const _0x414d5a=_0x5c8d24;_0x11eaa3['primitives']['postProcessingSpeed']['commandToExecute']['outputTexture']=_0x11eaa3['particlesTextures'][_0x414d5a(0x22c)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x824176,_0x37fb6d,_0x2aebc6,_0x16ef4c){const _0x5847d1=_0x157ab1;this[_0x5847d1(0x239)]=_0x824176,_0x37fb6d={..._0x37fb6d},_0x37fb6d[_0x5847d1(0x283)]&&_0x37fb6d['vdata']&&(_0x37fb6d['dimensions']={},_0x37fb6d['dimensions'][_0x5847d1(0x20e)]=_0x37fb6d['cols'],_0x37fb6d['dimensions'][_0x5847d1(0x201)]=_0x37fb6d[_0x5847d1(0x277)],_0x37fb6d['dimensions']['lev']=_0x37fb6d[_0x5847d1(0x294)]||0x1,_0x37fb6d['lon']={},_0x37fb6d['lon'][_0x5847d1(0x22a)]=_0x37fb6d[_0x5847d1(0x1f7)],_0x37fb6d[_0x5847d1(0x20e)]['max']=_0x37fb6d['xmax'],_0x37fb6d['lat']={},_0x37fb6d[_0x5847d1(0x201)][_0x5847d1(0x22a)]=_0x37fb6d[_0x5847d1(0x2d6)],_0x37fb6d['lat'][_0x5847d1(0x22f)]=_0x37fb6d[_0x5847d1(0x27d)],_0x37fb6d[_0x5847d1(0x294)]={},_0x37fb6d['lev']['min']=_0x37fb6d['levmin']??0x1,_0x37fb6d[_0x5847d1(0x294)]['max']=_0x37fb6d['levmax']??0x1,_0x37fb6d['U']={},_0x37fb6d['U']['array']=new Float32Array(_0x37fb6d['udata']),_0x37fb6d['U'][_0x5847d1(0x22a)]=_0x37fb6d['umin']??Math['min'](..._0x37fb6d['udata']),_0x37fb6d['U']['max']=_0x37fb6d['umax']??Math['max'](..._0x37fb6d['udata']),_0x37fb6d['V']={},_0x37fb6d['V']['array']=new Float32Array(_0x37fb6d['vdata']),_0x37fb6d['V']['min']=_0x37fb6d['vmin']??Math['min'](..._0x37fb6d['vdata']),_0x37fb6d['V'][_0x5847d1(0x22f)]=_0x37fb6d[_0x5847d1(0x2b0)]??Math['max'](..._0x37fb6d['vdata'])),this[_0x5847d1(0x24e)]=_0x37fb6d,this['options']=_0x2aebc6,this['viewerParameters']=_0x16ef4c,this[_0x5847d1(0x247)]=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0x5847d1(0x239)],this['data'],this['options'],this[_0x5847d1(0x279)],this['particlesComputing']);}[_0x157ab1(0x2c1)](_0x164389){const _0x1e8d3a=_0x157ab1;this[_0x1e8d3a(0x247)]['destroyParticlesTextures'](),Object['keys'](this['particlesComputing'][_0x1e8d3a(0x215)])['forEach'](_0x110f75=>{const _0x22557a=_0x1e8d3a;this['particlesComputing']['windTextures'][_0x110f75][_0x22557a(0x2a5)]();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this[_0x1e8d3a(0x2a4)]['framebuffers'])[_0x1e8d3a(0x2c6)](_0x3e75f0=>{this['particlesRendering']['framebuffers'][_0x3e75f0]['destroy']();}),this['context']=_0x164389,this['particlesComputing']=new ParticlesComputing(this[_0x1e8d3a(0x239)],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this[_0x1e8d3a(0x237)],this['viewerParameters'],this[_0x1e8d3a(0x247)]);}['clearFramebuffers'](){const _0x16af2f=_0x157ab1,_0x530ae4=new Cesium$2[(_0x16af2f(0x2d3))]({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass'][_0x16af2f(0x230)]});Object[_0x16af2f(0x252)](this['particlesRendering']['framebuffers'])['forEach'](_0x5a43cd=>{const _0x2ba9c6=_0x16af2f;_0x530ae4['framebuffer']=this[_0x2ba9c6(0x2a4)]['framebuffers'][_0x5a43cd],_0x530ae4['execute'](this[_0x2ba9c6(0x239)]);});}['refreshParticles'](_0x2ec2ba){const _0x32921b=_0x157ab1;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x2ec2ba){var _0x159bb8,_0x1bec4e;const _0x57f20f=this['particlesRendering'][_0x32921b(0x26d)](this['options']);this['particlesRendering']['primitives']['segments'][_0x32921b(0x1dc)]=_0x57f20f;const _0x50708a=Cesium$2[_0x32921b(0x227)]['fromGeometry']({'context':this['context'],'geometry':_0x57f20f,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2[_0x32921b(0x1e4)]['STATIC_DRAW']});(_0x159bb8=this[_0x32921b(0x2a4)]['primitives'])!==null&&_0x159bb8!==void 0x0&&(_0x1bec4e=_0x159bb8['segments'])!==null&&_0x1bec4e!==void 0x0&&_0x1bec4e['commandToExecute']&&(this['particlesRendering']['primitives']['segments']['commandToExecute']['vertexArray']=_0x50708a);}}[_0x157ab1(0x2cf)](_0x35672e){const _0x2bb7ec=_0x157ab1;let _0x1177e8=![];this['options']['maxParticles']!==_0x35672e['maxParticles']&&(_0x1177e8=!![]),Object['keys'](_0x35672e)['forEach'](_0x2fe984=>{const _0x139e78=_0x2da3;this[_0x139e78(0x237)][_0x2fe984]=_0x35672e[_0x2fe984];}),this[_0x2bb7ec(0x2bb)](_0x1177e8);}['applyViewerParameters'](_0x26a114){Object['keys'](_0x26a114)['forEach'](_0xc3b73d=>{this['viewerParameters'][_0xc3b73d]=_0x26a114[_0xc3b73d];}),this['refreshParticles'](![]);}['destroy'](){const _0x6f6874=_0x157ab1;clearTimeout(this['canrefresh']),this['particlesComputing'][_0x6f6874(0x29f)](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x2d5b09=>{this['particlesComputing']['windTextures'][_0x2d5b09]['destroy']();}),this[_0x6f6874(0x2a4)][_0x6f6874(0x2ac)]['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x6f6874(0x222)])['forEach'](_0x43c1da=>{const _0x55a594=_0x6f6874;this[_0x55a594(0x2a4)]['framebuffers'][_0x43c1da]['destroy']();});for(const _0x8ec6ad in this){delete this[_0x8ec6ad];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':['rgb(206,255,255)']};class WindLayer extends BaseLayer$1{constructor(_0x19e7a1={}){const _0x3b8aaa=_0x157ab1;_0x19e7a1={...DEF_OPTIONS,..._0x19e7a1},super(_0x19e7a1),this[_0x3b8aaa(0x1f3)](_0x19e7a1);}get['layer'](){return this['primitives'];}get['data'](){return this['_data'];}set[_0x157ab1(0x24e)](_0x29c5a5){this['setData'](_0x29c5a5);}get['colors'](){const _0x114c9b=_0x157ab1;return this['options'][_0x114c9b(0x23e)];}set['colors'](_0x52ef41){this['options']['colors']=_0x52ef41,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x52ef41}),this['resize']();}[_0x157ab1(0x2d0)](){}[_0x157ab1(0x1fb)](){const _0x20b773=_0x157ab1;this['scene']=this['_map']['scene'],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives']['add'](this['primitives']),this[_0x20b773(0x279)]={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x20b773(0x238)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this[_0x20b773(0x202)](),window['addEventListener']('resize',this[_0x20b773(0x29a)]['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x20b773(0x23f)]['on'](mars3d__namespace[_0x20b773(0x20f)][_0x20b773(0x28e)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x20b773(0x20f)]['mouseUp'],this[_0x20b773(0x210)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x20b773(0x221)],this[_0x20b773(0x216)],this),this['_data']&&this['setData'](this['_data']);}['_removedHook'](){const _0x539ecc=_0x157ab1;window['removeEventListener']('resize',this['resize']),this['_map']['off'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this),this[_0x539ecc(0x23f)][_0x539ecc(0x284)](mars3d__namespace[_0x539ecc(0x20f)]['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x539ecc(0x28e)],this['_onMouseDownEvent'],this),this[_0x539ecc(0x23f)]['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this[_0x539ecc(0x23f)]['off'](mars3d__namespace['EventType'][_0x539ecc(0x221)],this['_onMouseMoveEvent'],this),this['primitives'][_0x539ecc(0x2a1)](),this['_map']['scene'][_0x539ecc(0x24c)][_0x539ecc(0x232)](this['primitives']);}[_0x157ab1(0x29a)](){const _0x296d61=_0x157ab1;if(!this[_0x296d61(0x242)]||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType'][_0x296d61(0x22e)],this['_onMap_preRenderEvent'],this);}[_0x157ab1(0x289)](_0x2ff006){const _0x2cd786=_0x157ab1;this[_0x2cd786(0x2ca)]['canvasResize'](this['scene']['context']),this['addPrimitives'](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x4fe3d2){clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0xf87b43){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x56df18){const _0x3c33f0=_0x157ab1;if(!this['show']||!this[_0x3c33f0(0x2ca)])return;this['mouse_down']&&(this['primitives'][_0x3c33f0(0x242)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5b2336){const _0x12448b=_0x157ab1;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&this[_0x12448b(0x1f5)]&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}[_0x157ab1(0x1e0)](){const _0x95a439=_0x157ab1;if(!this[_0x95a439(0x23f)]||!this['show'])return;this['updateViewerParameters'](),this[_0x95a439(0x2ca)]['applyViewerParameters'](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x11e010){const _0x21fadd=_0x157ab1;this[_0x21fadd(0x1f9)]=_0x11e010,this['particleSystem']&&this[_0x21fadd(0x2ca)]['destroy'](),this['particleSystem']=new ParticleSystem(this['scene']['context'],_0x11e010,this[_0x21fadd(0x20b)](),this[_0x21fadd(0x279)]),this[_0x21fadd(0x272)]();}['_setOptionsHook'](_0x36aee7,_0x278dc8){if(_0x36aee7)for(const _0x48f2eb in _0x36aee7){this[_0x48f2eb]=_0x36aee7[_0x48f2eb];}this['particleSystem']&&this['particleSystem']['setOptions'](this['getOptions']());}[_0x157ab1(0x20b)](){const _0x44e4e2=_0x157ab1,_0x1fcaea=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x1fcaea*_0x1fcaea,{'particlesTextureSize':_0x1fcaea,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x44e4e2(0x2ae)],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this[_0x44e4e2(0x204)],'colors':this[_0x44e4e2(0x23e)]};}[_0x157ab1(0x272)](){const _0x112ba7=_0x157ab1;this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives'][_0x112ba7(0x275)]),this[_0x112ba7(0x24c)]['add'](this['particleSystem']['particlesComputing'][_0x112ba7(0x24c)][_0x112ba7(0x255)]),this[_0x112ba7(0x24c)]['add'](this['particleSystem']['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem'][_0x112ba7(0x247)]['primitives']['postProcessingPosition']),this[_0x112ba7(0x24c)]['add'](this['particleSystem']['particlesComputing']['primitives'][_0x112ba7(0x22c)]),this[_0x112ba7(0x24c)]['add'](this[_0x112ba7(0x2ca)]['particlesRendering']['primitives']['segments']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this[_0x112ba7(0x24c)]['add'](this['particleSystem'][_0x112ba7(0x2a4)][_0x112ba7(0x24c)]['screen']);}['updateViewerParameters'](){const _0x28d53b=_0x157ab1;let _0x572ab8=this['camera']['computeViewRectangle'](this['scene'][_0x28d53b(0x2d7)]['ellipsoid']);if(!_0x572ab8){const _0x57dff5=this['_map'][_0x28d53b(0x1e2)]();_0x572ab8=Cesium$1['Rectangle']['fromDegrees'](_0x57dff5[_0x28d53b(0x1f7)],_0x57dff5[_0x28d53b(0x2d6)],_0x57dff5['xmax'],_0x57dff5['ymax']);}const _0x28b4e1=Util[_0x28d53b(0x1ef)](_0x572ab8);this['viewerParameters'][_0x28d53b(0x1f2)]['x']=_0x28b4e1[_0x28d53b(0x20e)]['min'],this['viewerParameters']['lonRange']['y']=_0x28b4e1['lon']['max'],this['viewerParameters']['latRange']['x']=_0x28b4e1['lat']['min'],this['viewerParameters'][_0x28d53b(0x20c)]['y']=_0x28b4e1[_0x28d53b(0x201)][_0x28d53b(0x22f)];const _0x41f30f=this[_0x28d53b(0x2cb)][_0x28d53b(0x1f6)](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x41f30f>0x0&&(this['viewerParameters']['pixelSize']=_0x41f30f);}}mars3d__namespace[_0x157ab1(0x225)]['register']('wind',WindLayer),mars3d__namespace['layer'][_0x157ab1(0x21e)]=WindLayer;class CanvasParticle{constructor(){const _0x1a7cc4=_0x157ab1;this[_0x1a7cc4(0x285)]=null,this[_0x1a7cc4(0x201)]=null,this[_0x1a7cc4(0x2b8)]=null,this[_0x1a7cc4(0x229)]=null,this['age']=null,this['speed']=null;}[_0x157ab1(0x2a5)](){for(const _0x47f73d in this){delete this[_0x47f73d];}}}class CanvasWindField{constructor(_0x1d4401){const _0x4f2202=_0x157ab1;this[_0x4f2202(0x2cf)](_0x1d4401);}get[_0x157ab1(0x1e5)](){return this['_speedRate'];}set[_0x157ab1(0x1e5)](_0x4f99db){const _0x350bbc=_0x157ab1;this['_speedRate']=(0x64-(_0x4f99db>0x63?0x63:_0x4f99db))*0x64,this[_0x350bbc(0x2b6)]=[(this[_0x350bbc(0x24f)]-this['xmin'])/this[_0x350bbc(0x2be)],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){return this['_maxAge'];}set[_0x157ab1(0x213)](_0x1557a3){this['_maxAge']=_0x1557a3;}['setOptions'](_0x4cb382){const _0x5a6508=_0x157ab1;this['options']=_0x4cb382,this['maxAge']=_0x4cb382[_0x5a6508(0x213)]||0x78,this[_0x5a6508(0x1e5)]=_0x4cb382[_0x5a6508(0x1e5)]||0x32,this['particles']=[];const _0x23e3d8=_0x4cb382['particlesNumber']||0x1000;for(let _0x2e5425=0x0;_0x2e5425<_0x23e3d8;_0x2e5425++){const _0x4d052c=this[_0x5a6508(0x1e6)](new CanvasParticle());this['particles']['push'](_0x4d052c);}}[_0x157ab1(0x236)](_0x4c25b6){const _0x1db808=_0x157ab1;this['rows']=_0x4c25b6['rows'],this['cols']=_0x4c25b6[_0x1db808(0x24b)],this['xmin']=_0x4c25b6['xmin'],this[_0x1db808(0x24f)]=_0x4c25b6[_0x1db808(0x24f)],this[_0x1db808(0x2d6)]=_0x4c25b6['ymin'],this['ymax']=_0x4c25b6['ymax'],this[_0x1db808(0x2ce)]=[];const _0x32429d=_0x4c25b6['udata'],_0x2aaac9=_0x4c25b6[_0x1db808(0x29e)];let _0x1ba735=![];_0x32429d[_0x1db808(0x251)]===this['rows']&&_0x32429d[0x0]['length']===this['cols']&&(_0x1ba735=!![]);let _0x48910d=0x0,_0x3c698d=null,_0x386f15=null;for(let _0x5ebc7b=0x0;_0x5ebc7b<this['rows'];_0x5ebc7b++){_0x3c698d=[];for(let _0x268e35=0x0;_0x268e35<this['cols'];_0x268e35++,_0x48910d++){_0x1ba735?_0x386f15=this['_calcUV'](_0x32429d[_0x5ebc7b][_0x268e35],_0x2aaac9[_0x5ebc7b][_0x268e35]):_0x386f15=this[_0x1db808(0x264)](_0x32429d[_0x48910d],_0x2aaac9[_0x48910d]),_0x3c698d[_0x1db808(0x22b)](_0x386f15);}this['grid'][_0x1db808(0x22b)](_0x3c698d);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x183c9c=_0x157ab1;delete this['rows'],delete this['cols'],delete this['xmin'],delete this[_0x183c9c(0x24f)],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this[_0x183c9c(0x1ff)];}[_0x157ab1(0x266)](_0x1c994e,_0x557f3f){const _0x2dd8ef=_0x157ab1,_0x6174c4=(_0x1c994e-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x2bf2fd=(this[_0x2dd8ef(0x27d)]-_0x557f3f)/(this['ymax']-this['ymin'])*(this[_0x2dd8ef(0x277)]-0x1);return[_0x6174c4,_0x2bf2fd];}[_0x157ab1(0x27b)](_0x242b0a,_0x13cc4d){const _0x15cca4=_0x157ab1;if(_0x242b0a<0x0||_0x242b0a>=this['cols']||_0x13cc4d>=this[_0x15cca4(0x277)])return[0x0,0x0,0x0];const _0x474ebb=Math['floor'](_0x242b0a),_0x14064c=Math['floor'](_0x13cc4d);if(_0x474ebb===_0x242b0a&&_0x14064c===_0x13cc4d)return this[_0x15cca4(0x2ce)][_0x13cc4d][_0x242b0a];const _0x1fadae=_0x474ebb+0x1,_0xe9c01f=_0x14064c+0x1,_0x261577=this['getUVByXY'](_0x474ebb,_0x14064c),_0x4748b1=this[_0x15cca4(0x27b)](_0x1fadae,_0x14064c),_0x50cd44=this[_0x15cca4(0x27b)](_0x474ebb,_0xe9c01f),_0x245d6e=this['getUVByXY'](_0x1fadae,_0xe9c01f);let _0x599aae=null;try{_0x599aae=this[_0x15cca4(0x1e7)](_0x242b0a-_0x474ebb,_0x13cc4d-_0x14064c,_0x261577,_0x4748b1,_0x50cd44,_0x245d6e);}catch(_0x4fac12){console[_0x15cca4(0x2ad)](_0x242b0a,_0x13cc4d);}return _0x599aae;}['_bilinearInterpolation'](_0x1b66a9,_0xb0ad52,_0x89dac,_0x116cd5,_0x5bcf8d,_0x2320f6){const _0x222fd9=0x1-_0x1b66a9,_0x52b814=0x1-_0xb0ad52,_0x262461=_0x222fd9*_0x52b814,_0x146f67=_0x1b66a9*_0x52b814,_0x4aaa75=_0x222fd9*_0xb0ad52,_0xeb906f=_0x1b66a9*_0xb0ad52,_0x41066f=_0x89dac[0x0]*_0x262461+_0x116cd5[0x0]*_0x146f67+_0x5bcf8d[0x0]*_0x4aaa75+_0x2320f6[0x0]*_0xeb906f,_0x28fcea=_0x89dac[0x1]*_0x262461+_0x116cd5[0x1]*_0x146f67+_0x5bcf8d[0x1]*_0x4aaa75+_0x2320f6[0x1]*_0xeb906f;return this['_calcUV'](_0x41066f,_0x28fcea);}['_calcUV'](_0x38bf3f,_0x194e08){return[+_0x38bf3f,+_0x194e08,Math['sqrt'](_0x38bf3f*_0x38bf3f+_0x194e08*_0x194e08)];}['getUVByPoint'](_0x1bdcdd,_0x293562){const _0x2dddac=_0x157ab1;if(!this[_0x2dddac(0x2d2)](_0x1bdcdd,_0x293562))return null;const _0x26e45c=this[_0x2dddac(0x266)](_0x1bdcdd,_0x293562),_0x34c616=this['getUVByXY'](_0x26e45c[0x0],_0x26e45c[0x1]);return _0x34c616;}['isInExtent'](_0x20a657,_0x1062c2){const _0x474505=_0x157ab1;return _0x20a657>=this[_0x474505(0x1f7)]&&_0x20a657<=this[_0x474505(0x24f)]&&_0x1062c2>=this['ymin']&&_0x1062c2<=this['ymax']?!![]:![];}[_0x157ab1(0x28c)](){const _0x3bc5ad=_0x157ab1,_0x50d14a=fRandomByfloat(this[_0x3bc5ad(0x1f7)],this[_0x3bc5ad(0x24f)]),_0x401f03=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x401f03,'lng':_0x50d14a};}['getParticles'](){const _0x267198=_0x157ab1;let _0x5f71b1,_0x1b3f40,_0x571a71;for(let _0x1661db=0x0,_0x3c0e1a=this['particles']['length'];_0x1661db<_0x3c0e1a;_0x1661db++){let _0x4b7192=this['particles'][_0x1661db];_0x4b7192[_0x267198(0x212)]<=0x0&&(_0x4b7192=this['_randomParticle'](_0x4b7192));if(_0x4b7192['age']>0x0){const _0x374895=_0x4b7192['tlng'],_0x23cd75=_0x4b7192['tlat'];_0x571a71=this['getUVByPoint'](_0x374895,_0x23cd75),_0x571a71?(_0x5f71b1=_0x374895+this[_0x267198(0x2b6)][0x0]*_0x571a71[0x0],_0x1b3f40=_0x23cd75+this[_0x267198(0x2b6)][0x1]*_0x571a71[0x1],_0x4b7192['lng']=_0x374895,_0x4b7192[_0x267198(0x201)]=_0x23cd75,_0x4b7192[_0x267198(0x2b8)]=_0x5f71b1,_0x4b7192['tlat']=_0x1b3f40,_0x4b7192[_0x267198(0x254)]=_0x571a71[0x2],_0x4b7192['age']--):_0x4b7192[_0x267198(0x212)]=0x0;}}return this[_0x267198(0x1ff)];}['_randomParticle'](_0x1b3830){const _0x24f7f6=_0x157ab1;let _0x4faec7,_0x1d57f5;for(let _0x27ef84=0x0;_0x27ef84<0x1e;_0x27ef84++){_0x4faec7=this['getRandomLatLng'](),_0x1d57f5=this[_0x24f7f6(0x1de)](_0x4faec7['lng'],_0x4faec7[_0x24f7f6(0x201)]);if(_0x1d57f5&&_0x1d57f5[0x2]>0x0)break;}if(!_0x1d57f5)return _0x1b3830;const _0x5e98fb=_0x4faec7['lng']+this[_0x24f7f6(0x2b6)][0x0]*_0x1d57f5[0x0],_0x27725d=_0x4faec7['lat']+this[_0x24f7f6(0x2b6)][0x1]*_0x1d57f5[0x1];return _0x1b3830['lng']=_0x4faec7['lng'],_0x1b3830['lat']=_0x4faec7['lat'],_0x1b3830['tlng']=_0x5e98fb,_0x1b3830['tlat']=_0x27725d,_0x1b3830['age']=Math['round'](Math[_0x24f7f6(0x26f)]()*this['maxAge']),_0x1b3830[_0x24f7f6(0x254)]=_0x1d57f5[0x2],_0x1b3830;}['destroy'](){for(const _0x2d868f in this){delete this[_0x2d868f];}}}function fRandomByfloat(_0x20b413,_0x1be31c){return _0x20b413+Math['random']()*(_0x1be31c-_0x20b413);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0x157ab1(0x2b5)];class CanvasWindLayer extends BaseLayer{constructor(_0x1de8dd={}){const _0x2f42c3=_0x157ab1;super(_0x1de8dd),this['_setOptionsHook'](_0x1de8dd),this[_0x2f42c3(0x1f4)]=null,_0x1de8dd[_0x2f42c3(0x23e)]&&_0x1de8dd[_0x2f42c3(0x2cc)]&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x1de8dd));}['_setOptionsHook'](_0x2c14e8,_0x475ff5){const _0x1cdd91=_0x157ab1;this['frameTime']=0x3e8/(_0x2c14e8[_0x1cdd91(0x27c)]||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x2c14e8[_0x1cdd91(0x21c)]||'#ffffff',this[_0x1cdd91(0x204)]=_0x2c14e8[_0x1cdd91(0x204)]||0x1,this['fixedHeight']=_0x2c14e8['fixedHeight']??0x0,this['reverseY']=_0x2c14e8['reverseY']??![],this[_0x1cdd91(0x2cd)]&&this['windField']['setOptions'](_0x2c14e8);}get['layer'](){return this['canvas'];}get['canvasWidth'](){const _0xd84398=_0x157ab1;return this[_0xd84398(0x23f)][_0xd84398(0x2ab)]['canvas']['clientWidth'];}get[_0x157ab1(0x293)](){const _0x59a300=_0x157ab1;return this[_0x59a300(0x23f)][_0x59a300(0x2ab)]['canvas']['clientHeight'];}get[_0x157ab1(0x1eb)](){const _0x29d4ef=_0x157ab1;return this[_0x29d4ef(0x288)];}set['pointerEvents'](_0x5b4772){const _0x47f3a2=_0x157ab1;this['_pointerEvents']=_0x5b4772;if(!this['canvas'])return;_0x5b4772?this['canvas']['style']['pointer-events']=_0x47f3a2(0x234):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x28503b){const _0x2f252c=_0x157ab1;this[_0x2f252c(0x237)]['particlesNumber']=_0x28503b,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get[_0x157ab1(0x1e5)](){return this['options']['speedRate'];}set['speedRate'](_0x3290ec){const _0x49926d=_0x157ab1;this['options'][_0x49926d(0x1e5)]=_0x3290ec,this['windField']&&(this['windField'][_0x49926d(0x1e5)]=_0x3290ec);}get[_0x157ab1(0x213)](){return this['options']['maxAge'];}set['maxAge'](_0x551890){const _0x1c404e=_0x157ab1;this[_0x1c404e(0x237)][_0x1c404e(0x213)]=_0x551890,this[_0x1c404e(0x2cd)]&&(this['windField'][_0x1c404e(0x213)]=_0x551890);}get[_0x157ab1(0x24e)](){return this['windData'];}set['data'](_0x211d1d){this['setData'](_0x211d1d);}[_0x157ab1(0x271)](_0x27ee1c){const _0x12ef3d=_0x157ab1;_0x27ee1c?this['_addedHook']():(this['windData']&&(this[_0x12ef3d(0x237)]['data']=this[_0x12ef3d(0x282)]),this['_removedHook']());}[_0x157ab1(0x2d0)](){const _0x50661a=_0x157ab1;this['options'][_0x50661a(0x256)]?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x3f233d=_0x157ab1;this[_0x3f233d(0x1f4)]=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x3f233d(0x28d)](),this[_0x3f233d(0x237)]['data']&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x211d3b=_0x157ab1;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map'][_0x211d3b(0x2d8)]['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x5590f1=_0x157ab1,_0xc4cea0=mars3d__namespace[_0x5590f1(0x2c2)]['create'](_0x5590f1(0x1f4),_0x5590f1(0x287),this['_map']['container']);return _0xc4cea0['style'][_0x5590f1(0x295)]=_0x5590f1(0x1e8),_0xc4cea0['style']['top']=_0x5590f1(0x286),_0xc4cea0['style']['left']='0px',_0xc4cea0['style'][_0x5590f1(0x1f0)]=this[_0x5590f1(0x23f)]['scene']['canvas'][_0x5590f1(0x29d)]+'px',_0xc4cea0['style']['height']=this['_map']['scene']['canvas'][_0x5590f1(0x21a)]+'px',_0xc4cea0['style']['pointerEvents']=this['_pointerEvents']?_0x5590f1(0x1ea):'none',_0xc4cea0[_0x5590f1(0x228)]['zIndex']=this[_0x5590f1(0x237)][_0x5590f1(0x1f8)]??0x9,_0xc4cea0[_0x5590f1(0x1f0)]=this['_map']['scene']['canvas'][_0x5590f1(0x29d)],_0xc4cea0['height']=this[_0x5590f1(0x23f)][_0x5590f1(0x2ab)]['canvas']['clientHeight'],_0xc4cea0;}[_0x157ab1(0x29a)](){const _0x5aa856=_0x157ab1;this['canvas']&&(this['canvas']['style']['width']=this['_map'][_0x5aa856(0x2ab)]['canvas']['clientWidth']+'px',this['canvas']['style']['height']=this[_0x5aa856(0x23f)]['scene']['canvas'][_0x5aa856(0x21a)]+'px',this[_0x5aa856(0x1f4)]['width']=this['_map']['scene']['canvas']['clientWidth'],this['canvas'][_0x5aa856(0x20d)]=this['_map']['scene'][_0x5aa856(0x1f4)]['clientHeight']);}['bindEvent'](){const _0x5cb505=_0x157ab1,_0x311f89=this;let _0xd1c077=Date['now']();(function _0x115f1e(){const _0x1e347=_0x2da3;_0x311f89[_0x1e347(0x244)]=window['requestAnimationFrame'](_0x115f1e);if(_0x311f89['show']&&_0x311f89['windField']){const _0x3d85c1=Date['now'](),_0x59d31e=_0x3d85c1-_0xd1c077;_0x59d31e>_0x311f89['frameTime']&&(_0xd1c077=_0x3d85c1-_0x59d31e%_0x311f89[_0x1e347(0x262)],_0x311f89['update']());}}(),window[_0x5cb505(0x27e)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this[_0x5cb505(0x1f5)]=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x5cb505(0x25d)],this),this['_map']['on'](mars3d__namespace[_0x5cb505(0x20f)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x5cb505(0x1df)],this[_0x5cb505(0x210)],this)));}['unbindEvent'](){const _0xb80c1b=_0x157ab1;window[_0xb80c1b(0x203)](this[_0xb80c1b(0x244)]),delete this['animateFrame'],window['removeEventListener']('resize',this[_0xb80c1b(0x29a)]),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map'][_0xb80c1b(0x284)](mars3d__namespace['EventType'][_0xb80c1b(0x28e)],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this[_0xb80c1b(0x210)],this),this[_0xb80c1b(0x23f)]['off'](mars3d__namespace[_0xb80c1b(0x20f)]['mouseMove'],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x1da927){const _0x14655e=_0x157ab1;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0x14655e(0x1f4)])return;this[_0x14655e(0x1f4)]['style']['visibility']='hidden',this['refreshTimer']=setTimeout(()=>{const _0x5f5d2d=_0x14655e;if(!this['show'])return;this[_0x5f5d2d(0x1e0)](),this['canvas'][_0x5f5d2d(0x228)]['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x41e684){this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x75ccb8){const _0x15400f=_0x157ab1;if(!this['show']||!this['canvas'])return;this['mouse_down']&&(this[_0x15400f(0x1f4)]['style']['visibility']='hidden',this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x274ea8){const _0x377cd3=_0x157ab1;if(!this[_0x377cd3(0x242)]||!this['canvas'])return;this[_0x377cd3(0x23f)]['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this[_0x377cd3(0x1f5)]&&this['redraw'](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x3541d9){this['clear'](),this['windData']=_0x3541d9,this['windField']['setDate'](_0x3541d9),this['redraw']();}['redraw'](){const _0x338e80=_0x157ab1;if(!this[_0x338e80(0x242)])return;this[_0x338e80(0x2cd)]['setOptions'](this['options']),this[_0x338e80(0x1fd)]();}['update'](){const _0x318fda=_0x157ab1;if(this['_updateIng'])return;this[_0x318fda(0x2aa)]=!![];if(this['worker'])this[_0x318fda(0x2cd)]['update']();else{const _0x5dc4a1=this[_0x318fda(0x2cd)][_0x318fda(0x24a)]();this[_0x318fda(0x21f)](_0x5dc4a1);}this['_updateIng']=![];}['_drawLines'](_0x19404e){const _0x56e843=_0x157ab1;this['canvasContext'][_0x56e843(0x245)]='destination-in',this['canvasContext'][_0x56e843(0x292)](0x0,0x0,this[_0x56e843(0x267)],this['canvasHeight']),this['canvasContext'][_0x56e843(0x245)]='lighter',this['canvasContext']['globalAlpha']=0.9;const _0x20beff=this['_map']['scene'][_0x56e843(0x211)]!==Cesium['SceneMode']['SCENE3D'],_0x105394=this['canvasWidth']*0.25;if(this[_0x56e843(0x29c)])for(let _0x12ab7c=0x0,_0x9a7729=_0x19404e[_0x56e843(0x251)];_0x12ab7c<_0x9a7729;_0x12ab7c++){const _0x1abc03=_0x19404e[_0x12ab7c],_0x12c116=this['_tomap'](_0x1abc03['lng'],_0x1abc03['lat'],_0x1abc03),_0x30643a=this[_0x56e843(0x2ba)](_0x1abc03[_0x56e843(0x2b8)],_0x1abc03[_0x56e843(0x229)],_0x1abc03);if(!_0x12c116||!_0x30643a)continue;if(_0x20beff&&Math[_0x56e843(0x209)](_0x12c116[0x0]-_0x30643a[0x0])>=_0x105394)continue;this['canvasContext'][_0x56e843(0x24d)](),this[_0x56e843(0x23c)]['lineWidth']=this[_0x56e843(0x204)],this[_0x56e843(0x23c)]['strokeStyle']=this[_0x56e843(0x29c)]['getColor'](_0x1abc03['speed']),this[_0x56e843(0x23c)][_0x56e843(0x28f)](_0x12c116[0x0],_0x12c116[0x1]),this['canvasContext'][_0x56e843(0x2b4)](_0x30643a[0x0],_0x30643a[0x1]),this[_0x56e843(0x23c)]['stroke']();}else{this['canvasContext']['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this[_0x56e843(0x23c)][_0x56e843(0x243)]=this['color'];for(let _0x474586=0x0,_0x4916e3=_0x19404e['length'];_0x474586<_0x4916e3;_0x474586++){const _0x13de51=_0x19404e[_0x474586],_0x58e887=this['_tomap'](_0x13de51['lng'],_0x13de51[_0x56e843(0x201)],_0x13de51),_0x3f4736=this['_tomap'](_0x13de51['tlng'],_0x13de51['tlat'],_0x13de51);if(!_0x58e887||!_0x3f4736)continue;if(_0x20beff&&Math['abs'](_0x58e887[0x0]-_0x3f4736[0x0])>=_0x105394)continue;this[_0x56e843(0x23c)][_0x56e843(0x28f)](_0x58e887[0x0],_0x58e887[0x1]),this['canvasContext']['lineTo'](_0x3f4736[0x0],_0x3f4736[0x1]);}this['canvasContext']['stroke']();}}['_tomap'](_0x10fb96,_0x4454b1,_0x6b41c6){const _0x3db2bf=_0x157ab1,_0x34319e=Cesium[_0x3db2bf(0x2b1)]['fromDegrees'](_0x10fb96,_0x4454b1,this['fixedHeight']),_0x21c4f4=this[_0x3db2bf(0x23f)]['scene'];if(_0x21c4f4['mode']===Cesium[_0x3db2bf(0x2d1)]['SCENE3D']){const _0x2d0a82=new Cesium['EllipsoidalOccluder'](_0x21c4f4['globe']['ellipsoid'],_0x21c4f4['camera']['positionWC']),_0x528b6f=_0x2d0a82[_0x3db2bf(0x23a)](_0x34319e);if(!_0x528b6f)return _0x6b41c6['age']=0x0,null;}const _0x501ff5=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x3db2bf(0x23f)]['scene'],_0x34319e);return _0x501ff5?[_0x501ff5['x'],_0x501ff5['y']]:null;}['clear'](){this['windField']['clear'](),delete this['windData'];}['initWorker'](){const _0x3fbdd1=_0x157ab1;this[_0x3fbdd1(0x256)]=new Worker(this['options'][_0x3fbdd1(0x256)]),this['worker']['onmessage']=_0x248eba=>{const _0x8d5e30=_0x3fbdd1;this['_drawLines'](_0x248eba['data'][_0x8d5e30(0x1ff)]),this['_updateIng2']=![];},this['windField']={'init':_0x3f3e75=>{const _0x16cd12=_0x3fbdd1;this['worker']['postMessage']({'type':_0x16cd12(0x25e),'options':_0x3f3e75});},'setOptions':_0x594ab3=>{const _0x14b60e=_0x3fbdd1;this['worker']['postMessage']({'type':_0x14b60e(0x2cf),'options':_0x594ab3});},'setDate':_0x23282d=>{const _0x15beaf=_0x3fbdd1;this[_0x15beaf(0x256)]['postMessage']({'type':'setDate','data':_0x23282d});},'update':()=>{const _0x27822c=_0x3fbdd1;if(this[_0x27822c(0x280)])return;this['_updateIng2']=!![],this[_0x27822c(0x256)]['postMessage']({'type':'update'});},'clear':()=>{const _0x4a44ea=_0x3fbdd1;this[_0x4a44ea(0x256)][_0x4a44ea(0x253)]({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace[_0x157ab1(0x225)]['register'](_0x157ab1(0x1f1),CanvasWindLayer),mars3d__namespace['layer'][_0x157ab1(0x233)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x157ab1(0x2c7)]=CanvasWindField,exports[_0x157ab1(0x233)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object[_0x157ab1(0x296)](exports,'__esModule',{'value':!![]});
14
+ 'use strict';function _0x1c85(){const _0x545f2c=['_map','keys','primitives','canvas','drawingBufferWidth','log','10bWsIGi','BufferUsage','tlng','camera','nextParticlesSpeed','_onMouseMoveEvent','CanvasWindLayer','getUVByPoint','rgb(206,255,255)','OPAQUE','default','Math','vmin','depthTexture','mouseDown','clearCommand','cols','ymax','hidden','Appearance','fragmentShaderSource','attributeLocations','currentParticlesSpeed','addPrimitives','nextTrailsDepth','wind','Draw','particlesRendering','reverseY','setData','1142776wPqesF','top','defined','source','preRender','framebuffer','PixelDatatype','GeometryAttribute','west','50448RueeWC','udata','getExtent','clientWidth','Cartesian3','TWO_PI','speedRate','nextParticlesPosition','abs','_mountedHook','resize','_speedRate','get','options','toGridXY','windField','layer','show','lev','speed','//\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','length','TextureMinificationFilter','positionWC','refreshTimer','age','lineWidth','clear','tlat','once','pow','ceil','maxParticles','_onMouseUpEvent','vertexArray','mouseMove','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','mouse_move','windTextures','currentParticlesPosition','xmin','_calcUV','updateViewerParameters','_onMapWhellEvent','preExecute','ColorRamp','Framebuffer','outputTexture','ShaderSource','currentTrailsDepth','update','BoundingSphere','Cartesian2','fixedHeight','requestAnimationFrame','postMessage','__esModule','off','lon','9ffnQwu','nextTrails','_onMap_preRenderEvent','createWindTextures','PixelFormat','49314ZnFfIS','add','dropRateBump','isInExtent','createParticlesTextures','NEAREST','destroy','createSegmentsGeometry','wheel','dimensions','particlesTextures','ShaderProgram','globalCompositeOperation','_drawLines','randomBetween','updateSpeed','umin','latRange','UNSIGNED_BYTE','worker','bind','getFullscreenQuad','_updateIng','colors','initWorker','particlesComputing','commandToExecute','_calc_speedRate','init','fromCssColorString','particlesWind','clearFramebuffers','lng','shaderProgram','_setOptionsHook','fromCache','847aMLBCK','primitiveType','DISABLE_GL_POSITION_LOG_DEPTH','_onMouseDownEvent','currentTrails','27185150qJqrph','_updateIng2','mars3d-canvasWind','445440KYYPON','refreshParticles','frameTime','GeometryAttributes','framebuffers','style','rows','createRenderingPrimitives','_tomap','fillRect','clampToLatitudeRange','lat','1085572BxJJmS','getOwnPropertyDescriptor','color','xmax','ComponentDatatype','height','forEach','redraw','uniformMap','sqrt','stroke','particlesTextureSize','onmessage','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','array','pixelSize','1338096gFbBFW','Compute','clientHeight','postProcessingPosition','moveTo','Cesium','particlesNumber','_randomParticle','push','_pointerEvents','blue','pointerEvents','lineTo','context','Sampler','min','drawingBufferHeight','_bilinearInterpolation','levmax','levmin','SceneTransforms','grid','scene','canvasContext','destroyParticlesTextures','particleSystem','setOptions','viewerParameters','removeChild','data','all','maxAge','segments','mouse_down','getUVByXY','_removedHook','unbindEvent','globe','geometry','WindUtil','EventType','randomizeParticles','createComputingPrimitives','getParticles','max','getRandomLatLng','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','trails','mouseHidden','FLOAT','windData','textures','PrimitiveType','createTexture','atan2','addEventListener','fill'];_0x1c85=function(){return _0x545f2c;};return _0x1c85();}const _0x2451d4=_0x54f3;(function(_0x3cbd19,_0x554831){const _0x48c4cd=_0x54f3,_0x302578=_0x3cbd19();while(!![]){try{const _0x5e1543=-parseInt(_0x48c4cd(0x2a1))/0x1+-parseInt(_0x48c4cd(0x220))/0x2+-parseInt(_0x48c4cd(0x229))/0x3+-parseInt(_0x48c4cd(0x2b1))/0x4*(-parseInt(_0x48c4cd(0x202))/0x5)+parseInt(_0x48c4cd(0x269))/0x6*(-parseInt(_0x48c4cd(0x28d))/0x7)+-parseInt(_0x48c4cd(0x295))/0x8+-parseInt(_0x48c4cd(0x264))/0x9*(-parseInt(_0x48c4cd(0x292))/0xa);if(_0x5e1543===_0x554831)break;else _0x302578['push'](_0x302578['shift']());}catch(_0xe6f673){_0x302578['push'](_0x302578['shift']());}}}(_0x1c85,0xa2038));function _interopNamespace(_0x54bf1b){const _0x3c144c=_0x54f3;if(_0x54bf1b&&_0x54bf1b['__esModule'])return _0x54bf1b;var _0xea2a3f=Object['create'](null);return _0x54bf1b&&Object['keys'](_0x54bf1b)[_0x3c144c(0x2a7)](function(_0x314df7){const _0x4dc403=_0x3c144c;if(_0x314df7!==_0x4dc403(0x20c)){var _0x4cd561=Object[_0x4dc403(0x2a2)](_0x54bf1b,_0x314df7);Object['defineProperty'](_0xea2a3f,_0x314df7,_0x4cd561[_0x4dc403(0x235)]?_0x4cd561:{'enumerable':!![],'get':function(){return _0x54bf1b[_0x314df7];}});}}),_0xea2a3f['default']=_0x54bf1b,_0xea2a3f;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x5480ab,_0x2c3f21){const _0x4a888b=_0x54f3,_0x4d1287=_0x5480ab*Math['cos'](Cesium$7[_0x4a888b(0x20d)]['toRadians'](_0x2c3f21));return _0x4d1287;}function getV(_0x1382bf,_0x14fc28){const _0x3ab5b5=_0x1382bf*Math['sin'](Cesium$7['Math']['toRadians'](_0x14fc28));return _0x3ab5b5;}function getSpeed(_0x3a7fb5,_0x26cb76){const _0x1d2715=_0x54f3,_0x2e3c68=Math['sqrt'](Math[_0x1d2715(0x247)](_0x3a7fb5,0x2)+Math[_0x1d2715(0x247)](_0x26cb76,0x2));return _0x2e3c68;}function _0x54f3(_0x1921fd,_0x4c3722){const _0x1c8558=_0x1c85();return _0x54f3=function(_0x54f32d,_0x34c889){_0x54f32d=_0x54f32d-0x1c9;let _0x20d705=_0x1c8558[_0x54f32d];return _0x20d705;},_0x54f3(_0x1921fd,_0x4c3722);}function getDirection(_0x1041fd,_0x15e34b){const _0x5493d6=_0x54f3;let _0x2606f5=Cesium$7[_0x5493d6(0x20d)]['toDegrees'](Math[_0x5493d6(0x1f9)](_0x15e34b,_0x1041fd));return _0x2606f5+=_0x2606f5<0x0?0x168:0x0,_0x2606f5;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x5de465){const _0x35f312=_0x54f3;this['commandType']=_0x5de465['commandType'],this[_0x35f312(0x1e9)]=_0x5de465['geometry'],this[_0x35f312(0x217)]=_0x5de465['attributeLocations'],this['primitiveType']=_0x5de465[_0x35f312(0x28e)],this[_0x35f312(0x2a9)]=_0x5de465[_0x35f312(0x2a9)],this['vertexShaderSource']=_0x5de465['vertexShaderSource'],this['fragmentShaderSource']=_0x5de465['fragmentShaderSource'],this['rawRenderState']=_0x5de465['rawRenderState'],this['framebuffer']=_0x5de465['framebuffer'],this['outputTexture']=_0x5de465['outputTexture'],this['autoClear']=_0x5de465['autoClear']??![],this[_0x35f312(0x255)]=_0x5de465[_0x35f312(0x255)],this['show']=!![],this[_0x35f312(0x283)]=undefined,this['clearCommand']=undefined,this['autoClear']&&(this[_0x35f312(0x211)]=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0x35f312(0x225)],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x3b6db7){const _0x461227=_0x54f3;switch(this['commandType']){case _0x461227(0x21c):{const _0x409be7=Cesium$6['VertexArray']['fromGeometry']({'context':_0x3b6db7,'geometry':this[_0x461227(0x1e9)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x461227(0x203)]['STATIC_DRAW']}),_0xddb90e=Cesium$6[_0x461227(0x274)][_0x461227(0x28c)]({'context':_0x3b6db7,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this[_0x461227(0x216)]}),_0x19b461=Cesium$6['RenderState']['fromCache'](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0xddb90e,'vertexArray':_0x409be7,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x19b461,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x461227(0x20b)],'pickOnly':!![],'owner':this});}case _0x461227(0x2b2):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this[_0x461227(0x258)],'persists':!![]});}}}['setGeometry'](_0x47bb20,_0x261212){const _0x321a9a=_0x54f3;this['geometry']=_0x261212;const _0x6e65d2=Cesium$6['VertexArray']['fromGeometry']({'context':_0x47bb20,'geometry':this['geometry'],'attributeLocations':this[_0x321a9a(0x217)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x6e65d2;}[_0x2451d4(0x25b)](_0x5ac457){const _0x509e99=_0x2451d4;if(!this['show'])return;if(_0x5ac457['mode']!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6[_0x509e99(0x222)](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x5ac457['context'])),Cesium$6['defined'](this[_0x509e99(0x255)])&&this['preExecute'](),Cesium$6['defined'](this[_0x509e99(0x211)])&&_0x5ac457['commandList']['push'](this['clearCommand']),_0x5ac457['commandList'][_0x509e99(0x1cb)](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x17b2eb=_0x2451d4;if(this['clearCommand']){var _0x4679b9,_0x3eba6d;(_0x4679b9=this['clearCommand'])!==null&&_0x4679b9!==void 0x0&&_0x4679b9[_0x17b2eb(0x24b)]&&this['clearCommand']['vertexArray'][_0x17b2eb(0x26f)](),(_0x3eba6d=this['clearCommand'])!==null&&_0x3eba6d!==void 0x0&&_0x3eba6d['shaderProgram']&&this['clearCommand']['shaderProgram'][_0x17b2eb(0x26f)](),delete this['clearCommand'];}return this['commandToExecute']&&(this[_0x17b2eb(0x283)]['vertexArray']&&this['commandToExecute'][_0x17b2eb(0x24b)][_0x17b2eb(0x26f)](),this['commandToExecute'][_0x17b2eb(0x28a)]&&this['commandToExecute'][_0x17b2eb(0x28a)][_0x17b2eb(0x26f)](),delete this[_0x17b2eb(0x283)]),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x4bab99=function(){const _0x4e0c14=_0x54f3,_0x59f276=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[_0x4e0c14(0x2a5)]['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x59f276;},_0x3f7c21=function(_0x3251c7,_0x3f78d2){const _0x15e3fb=_0x54f3;if(Cesium$5['defined'](_0x3f78d2)){const _0x39866e={};_0x39866e['arrayBufferView']=_0x3f78d2,_0x3251c7[_0x15e3fb(0x223)]=_0x39866e;}const _0x131d19=new Cesium$5['Texture'](_0x3251c7);return _0x131d19;},_0x9c71f8=function(_0x3b9b91,_0x1926d8,_0x5285a1){const _0x3a3569=_0x54f3,_0x14fd9e=new Cesium$5[(_0x3a3569(0x257))]({'context':_0x3b9b91,'colorTextures':[_0x1926d8],'depthTexture':_0x5285a1});return _0x14fd9e;},_0x4a4f73=function(_0x58a857){const _0x54e277=_0x54f3,_0x181454=!![],_0x1799b6=![],_0x3bcb01={'viewport':_0x58a857['viewport'],'depthTest':_0x58a857['depthTest'],'depthMask':_0x58a857['depthMask'],'blending':_0x58a857['blending']},_0x5c8672=Cesium$5[_0x54e277(0x215)]['getDefaultRenderState'](_0x181454,_0x1799b6,_0x3bcb01);return _0x5c8672;},_0x2fba1d=function(_0x386f46){const _0x432b22=_0x54f3,_0x5a559c={},_0x3cd749=Cesium$5[_0x432b22(0x20d)]['mod'](_0x386f46[_0x432b22(0x228)],Cesium$5['Math'][_0x432b22(0x22e)]),_0x57ecee=Cesium$5['Math']['mod'](_0x386f46['east'],Cesium$5['Math'][_0x432b22(0x22e)]),_0x1c701c=_0x386f46['width'];let _0x4da117,_0x2a50d3;_0x1c701c>Cesium$5[_0x432b22(0x20d)]['THREE_PI_OVER_TWO']?(_0x4da117=0x0,_0x2a50d3=Cesium$5['Math'][_0x432b22(0x22e)]):_0x57ecee-_0x3cd749<_0x1c701c?(_0x4da117=_0x3cd749,_0x2a50d3=_0x3cd749+_0x1c701c):(_0x4da117=_0x3cd749,_0x2a50d3=_0x57ecee);_0x5a559c[_0x432b22(0x263)]={'min':Cesium$5['Math']['toDegrees'](_0x4da117),'max':Cesium$5[_0x432b22(0x20d)]['toDegrees'](_0x2a50d3)};const _0x189d46=_0x386f46['south'],_0x4b8332=_0x386f46['north'],_0x3e32e4=_0x386f46['height'],_0x408b1a=_0x3e32e4>Cesium$5['Math']['PI']/0xc?_0x3e32e4/0x2:0x0;let _0x541020=Cesium$5['Math'][_0x432b22(0x29f)](_0x189d46-_0x408b1a),_0x46535f=Cesium$5['Math']['clampToLatitudeRange'](_0x4b8332+_0x408b1a);return _0x541020<-Cesium$5[_0x432b22(0x20d)]['PI_OVER_THREE']&&(_0x541020=-Cesium$5['Math']['PI_OVER_TWO']),_0x46535f>Cesium$5[_0x432b22(0x20d)]['PI_OVER_THREE']&&(_0x46535f=Cesium$5['Math']['PI_OVER_TWO']),_0x5a559c['lat']={'min':Cesium$5[_0x432b22(0x20d)]['toDegrees'](_0x541020),'max':Cesium$5['Math']['toDegrees'](_0x46535f)},_0x5a559c;};return{'getFullscreenQuad':_0x4bab99,'createTexture':_0x3f7c21,'createFramebuffer':_0x9c71f8,'createRawRenderState':_0x4a4f73,'viewRectangleToLonLatRange':_0x2fba1d};}());var segmentDraw_vert=_0x2451d4(0x24d),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=_0x2451d4(0x2ae),screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x21d642,_0x47a0dc,_0x483317,_0x56d0bc,_0x34befa){this['createRenderingTextures'](_0x21d642,_0x47a0dc,_0x483317['colors']),this['createRenderingFramebuffers'](_0x21d642),this['createRenderingPrimitives'](_0x21d642,_0x483317,_0x56d0bc,_0x34befa);}['createRenderingTextures'](_0x508476,_0x443b8c,_0x10268a){const _0xa4b83b=_0x2451d4,_0x1025cf={'context':_0x508476,'width':_0x508476['drawingBufferWidth'],'height':_0x508476['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype'][_0xa4b83b(0x27b)]},_0x432b94={'context':_0x508476,'width':_0x508476[_0xa4b83b(0x200)],'height':_0x508476[_0xa4b83b(0x1d3)],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4[_0xa4b83b(0x226)]['UNSIGNED_INT']},_0x2bb0fa=_0x10268a[_0xa4b83b(0x23e)],_0x496f60=new Float32Array(_0x2bb0fa*0x3);for(let _0x14c65d=0x0;_0x14c65d<_0x2bb0fa;_0x14c65d++){const _0x145c31=Cesium$4['Color'][_0xa4b83b(0x286)](_0x10268a[_0x14c65d]);_0x496f60[0x3*_0x14c65d]=_0x145c31['red'],_0x496f60[0x3*_0x14c65d+0x1]=_0x145c31['green'],_0x496f60[0x3*_0x14c65d+0x2]=_0x145c31[_0xa4b83b(0x1cd)];}const _0x31a0ca={'context':_0x508476,'width':_0x2bb0fa,'height':0x1,'pixelFormat':Cesium$4[_0xa4b83b(0x268)]['RGB'],'pixelDatatype':Cesium$4[_0xa4b83b(0x226)]['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0xa4b83b(0x23f)]['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this[_0xa4b83b(0x1f6)]={'segmentsColor':Util['createTexture'](_0x1025cf),'segmentsDepth':Util[_0xa4b83b(0x1f8)](_0x432b94),'currentTrailsColor':Util['createTexture'](_0x1025cf),'currentTrailsDepth':Util['createTexture'](_0x432b94),'nextTrailsColor':Util['createTexture'](_0x1025cf),'nextTrailsDepth':Util['createTexture'](_0x432b94),'colorTable':Util['createTexture'](_0x31a0ca,_0x496f60)};}['createRenderingFramebuffers'](_0x3f5603){const _0x4c4408=_0x2451d4;this['framebuffers']={'segments':Util['createFramebuffer'](_0x3f5603,this['textures']['segmentsColor'],this[_0x4c4408(0x1f6)]['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x3f5603,this[_0x4c4408(0x1f6)]['currentTrailsColor'],this[_0x4c4408(0x1f6)][_0x4c4408(0x25a)]),'nextTrails':Util['createFramebuffer'](_0x3f5603,this['textures']['nextTrailsColor'],this['textures'][_0x4c4408(0x21a)])};}['createSegmentsGeometry'](_0x4fe7e7){const _0x14b32c=_0x2451d4,_0x24b2ea=0x4;let _0x3769cc=[];for(let _0x25f1cf=0x0;_0x25f1cf<_0x4fe7e7['particlesTextureSize'];_0x25f1cf++){for(let _0x53db3f=0x0;_0x53db3f<_0x4fe7e7['particlesTextureSize'];_0x53db3f++){for(let _0x22ea2d=0x0;_0x22ea2d<_0x24b2ea;_0x22ea2d++){_0x3769cc['push'](_0x25f1cf/_0x4fe7e7['particlesTextureSize']),_0x3769cc['push'](_0x53db3f/_0x4fe7e7[_0x14b32c(0x2ac)]);}}}_0x3769cc=new Float32Array(_0x3769cc);let _0x4fc3aa=[];const _0x16b093=[-0x1,0x1],_0xde8ad5=[-0x1,0x1];for(let _0x41ddf1=0x0;_0x41ddf1<_0x4fe7e7['maxParticles'];_0x41ddf1++){for(let _0x505102=0x0;_0x505102<_0x24b2ea/0x2;_0x505102++){for(let _0x35bf80=0x0;_0x35bf80<_0x24b2ea/0x2;_0x35bf80++){_0x4fc3aa['push'](_0x16b093[_0x505102]),_0x4fc3aa[_0x14b32c(0x1cb)](_0xde8ad5[_0x35bf80]),_0x4fc3aa['push'](0x0);}}}_0x4fc3aa=new Float32Array(_0x4fc3aa);const _0x9dc08f=0x6*_0x4fe7e7[_0x14b32c(0x249)],_0x31ba72=new Uint32Array(_0x9dc08f);for(let _0x9f2d3e=0x0,_0x495e80=0x0,_0x1e3010=0x0;_0x9f2d3e<_0x4fe7e7['maxParticles'];_0x9f2d3e++){_0x31ba72[_0x495e80++]=_0x1e3010+0x0,_0x31ba72[_0x495e80++]=_0x1e3010+0x1,_0x31ba72[_0x495e80++]=_0x1e3010+0x2,_0x31ba72[_0x495e80++]=_0x1e3010+0x2,_0x31ba72[_0x495e80++]=_0x1e3010+0x1,_0x31ba72[_0x495e80++]=_0x1e3010+0x3,_0x1e3010+=0x4;}const _0x3ff54a=new Cesium$4['Geometry']({'attributes':new Cesium$4[(_0x14b32c(0x298))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x14b32c(0x2a5)]['FLOAT'],'componentsPerAttribute':0x2,'values':_0x3769cc}),'normal':new Cesium$4[(_0x14b32c(0x227))]({'componentDatatype':Cesium$4['ComponentDatatype'][_0x14b32c(0x1f4)],'componentsPerAttribute':0x3,'values':_0x4fc3aa})}),'indices':_0x31ba72});return _0x3ff54a;}[_0x2451d4(0x29c)](_0x44e2c5,_0x4f9cf5,_0x4e01c0,_0x55f06d){const _0x444dfb=_0x2451d4,_0x4b64ed=this;this[_0x444dfb(0x1fe)]={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0x444dfb(0x270)](_0x4f9cf5),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0x455663=_0x444dfb;return _0x55f06d['particlesTextures'][_0x455663(0x250)];},'postProcessingPosition':function(){return _0x55f06d['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x474add=_0x444dfb;return _0x55f06d[_0x474add(0x273)]['postProcessingSpeed'];},'colorTable':function(){return _0x4b64ed['textures']['colorTable'];},'aspect':function(){const _0x558ddc=_0x444dfb;return _0x44e2c5[_0x558ddc(0x200)]/_0x44e2c5['drawingBufferHeight'];},'pixelSize':function(){return _0x4e01c0['pixelSize'];},'lineWidth':function(){return _0x4f9cf5['lineWidth'];},'particleHeight':function(){return _0x4f9cf5['particleHeight'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x444dfb(0x27e)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0x4b64ed['textures']['segmentsColor'];},'segmentsDepthTexture':function(){return _0x4b64ed['textures']['segmentsDepth'];},'currentTrailsColor':function(){return _0x4b64ed['framebuffers']['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x78b14b=_0x444dfb;return _0x4b64ed['framebuffers']['currentTrails'][_0x78b14b(0x20f)];},'fadeOpacity':function(){return _0x4f9cf5['fadeOpacity'];}},'vertexShaderSource':new Cesium$4[(_0x444dfb(0x259))]({'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']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x444dfb(0x265)],'autoClear':!![],'preExecute':function(){const _0x4a6b1a=_0x444dfb,_0x5e2bb7=_0x4b64ed[_0x4a6b1a(0x299)][_0x4a6b1a(0x291)];_0x4b64ed['framebuffers']['currentTrails']=_0x4b64ed[_0x4a6b1a(0x299)]['nextTrails'],_0x4b64ed['framebuffers']['nextTrails']=_0x5e2bb7,_0x4b64ed['primitives']['trails']['commandToExecute']['framebuffer']=_0x4b64ed[_0x4a6b1a(0x299)][_0x4a6b1a(0x265)],_0x4b64ed['primitives'][_0x4a6b1a(0x1f2)][_0x4a6b1a(0x211)]['framebuffer']=_0x4b64ed[_0x4a6b1a(0x299)][_0x4a6b1a(0x265)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x444dfb(0x1f7)]['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){return _0x4b64ed['framebuffers']['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x4b64ed['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x444dfb(0x28f)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x444dfb(0x259))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag=_0x2451d4(0x23d),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=_0x2451d4(0x1f1);const Cesium$3=mars3d__namespace[_0x2451d4(0x2b6)];class ParticlesComputing{constructor(_0x166627,_0xc21a6c,_0x45b0da,_0x502a1d){this['data']=_0xc21a6c,this['createWindTextures'](_0x166627,_0xc21a6c),this['createParticlesTextures'](_0x166627,_0x45b0da,_0x502a1d),this['createComputingPrimitives'](_0xc21a6c,_0x45b0da,_0x502a1d);}[_0x2451d4(0x267)](_0x42d8e6,_0x535d0b){const _0x40b277=_0x2451d4,_0x2831cd={'context':_0x42d8e6,'width':_0x535d0b['dimensions']['lon'],'height':_0x535d0b[_0x40b277(0x272)][_0x40b277(0x2a0)]*(_0x535d0b['dimensions']['lev']||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x40b277(0x1d1))]({'minificationFilter':Cesium$3[_0x40b277(0x23f)]['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x40b277(0x26e)]})};this[_0x40b277(0x24f)]={'U':Util[_0x40b277(0x1f8)](_0x2831cd,_0x535d0b['U']['array']),'V':Util[_0x40b277(0x1f8)](_0x2831cd,_0x535d0b['V']['array'])};}['createParticlesTextures'](_0x4d0689,_0x5d5804,_0x481d66){const _0x1f7f37=_0x2451d4,_0x1485ae={'context':_0x4d0689,'width':_0x5d5804['particlesTextureSize'],'height':_0x5d5804['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3[_0x1f7f37(0x23f)][_0x1f7f37(0x26e)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x4ec3c5=this['randomizeParticles'](_0x5d5804[_0x1f7f37(0x249)],_0x481d66),_0x6951ab=new Float32Array(0x4*_0x5d5804['maxParticles'])[_0x1f7f37(0x1fb)](0x0);this['particlesTextures']={'particlesWind':Util[_0x1f7f37(0x1f8)](_0x1485ae),'currentParticlesPosition':Util['createTexture'](_0x1485ae,_0x4ec3c5),'nextParticlesPosition':Util['createTexture'](_0x1485ae,_0x4ec3c5),'currentParticlesSpeed':Util['createTexture'](_0x1485ae,_0x6951ab),'nextParticlesSpeed':Util['createTexture'](_0x1485ae,_0x6951ab),'postProcessingPosition':Util[_0x1f7f37(0x1f8)](_0x1485ae,_0x4ec3c5),'postProcessingSpeed':Util['createTexture'](_0x1485ae,_0x6951ab)};}[_0x2451d4(0x1ec)](_0x30edcb,_0x5c3732){const _0x1a8e8b=_0x2451d4,_0x224955=new Float32Array(0x4*_0x30edcb);for(let _0x305405=0x0;_0x305405<_0x30edcb;_0x305405++){_0x224955[0x4*_0x305405]=Cesium$3['Math'][_0x1a8e8b(0x277)](_0x5c3732['lonRange']['x'],_0x5c3732['lonRange']['y']),_0x224955[0x4*_0x305405+0x1]=Cesium$3['Math']['randomBetween'](_0x5c3732[_0x1a8e8b(0x27a)]['x'],_0x5c3732['latRange']['y']),_0x224955[0x4*_0x305405+0x2]=Cesium$3[_0x1a8e8b(0x20d)]['randomBetween'](this['data'][_0x1a8e8b(0x23b)]['min'],this['data'][_0x1a8e8b(0x23b)]['max']),_0x224955[0x4*_0x305405+0x3]=0x0;}return _0x224955;}['destroyParticlesTextures'](){Object['keys'](this['particlesTextures'])['forEach'](_0x271cef=>{const _0x495ed6=_0x54f3;this[_0x495ed6(0x273)][_0x271cef][_0x495ed6(0x26f)]();});}[_0x2451d4(0x1ed)](_0x2f664a,_0x381abf,_0x4cf004){const _0x99c614=_0x2451d4,_0x5fd604=new Cesium$3[(_0x99c614(0x22d))](_0x2f664a[_0x99c614(0x272)]['lon'],_0x2f664a['dimensions'][_0x99c614(0x2a0)],_0x2f664a['dimensions']['lev']),_0x215121=new Cesium$3[(_0x99c614(0x22d))](_0x2f664a['lon']['min'],_0x2f664a[_0x99c614(0x2a0)][_0x99c614(0x1d2)],_0x2f664a['lev']['min']),_0x556bf9=new Cesium$3[(_0x99c614(0x22d))](_0x2f664a['lon']['max'],_0x2f664a[_0x99c614(0x2a0)][_0x99c614(0x1ef)],_0x2f664a['lev'][_0x99c614(0x1ef)]),_0x4db06a=new Cesium$3['Cartesian3']((_0x556bf9['x']-_0x215121['x'])/(_0x5fd604['x']-0x1),(_0x556bf9['y']-_0x215121['y'])/(_0x5fd604['y']-0x1),_0x5fd604['z']>0x1?(_0x556bf9['z']-_0x215121['z'])/(_0x5fd604['z']-0x1):0x1),_0x4d5699=new Cesium$3[(_0x99c614(0x25d))](_0x2f664a['U']['min'],_0x2f664a['U']['max']),_0x13c0ad=new Cesium$3['Cartesian2'](_0x2f664a['V']['min'],_0x2f664a['V'][_0x99c614(0x1ef)]),_0x21410f=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x21410f['windTextures']['U'];},'V':function(){return _0x21410f['windTextures']['V'];},'currentParticlesPosition':function(){return _0x21410f['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x5fd604;},'minimum':function(){return _0x215121;},'maximum':function(){return _0x556bf9;},'interval':function(){return _0x4db06a;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x99c614(0x287)],'preExecute':function(){const _0x25db22=_0x99c614;_0x21410f['primitives']['getWind']['commandToExecute'][_0x25db22(0x258)]=_0x21410f['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':_0x99c614(0x2b2),'uniformMap':{'currentParticlesSpeed':function(){const _0x45f8c8=_0x99c614;return _0x21410f['particlesTextures'][_0x45f8c8(0x218)];},'particlesWind':function(){const _0x2f6e1f=_0x99c614;return _0x21410f['particlesTextures'][_0x2f6e1f(0x287)];},'uSpeedRange':function(){return _0x4d5699;},'vSpeedRange':function(){return _0x13c0ad;},'pixelSize':function(){const _0x23bdd3=_0x99c614;return _0x4cf004[_0x23bdd3(0x2b0)];},'speedFactor':function(){return _0x381abf['speedFactor'];}},'fragmentShaderSource':new Cesium$3[(_0x99c614(0x259))]({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x88b34b=_0x99c614,_0x43909b=_0x21410f['particlesTextures']['currentParticlesSpeed'];_0x21410f['particlesTextures']['currentParticlesSpeed']=_0x21410f['particlesTextures']['postProcessingSpeed'],_0x21410f[_0x88b34b(0x273)]['postProcessingSpeed']=_0x43909b,_0x21410f[_0x88b34b(0x1fe)]['updateSpeed'][_0x88b34b(0x283)]['outputTexture']=_0x21410f[_0x88b34b(0x273)][_0x88b34b(0x206)];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x4336cf=_0x99c614;return _0x21410f[_0x4336cf(0x273)][_0x4336cf(0x250)];},'currentParticlesSpeed':function(){return _0x21410f['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x99c614(0x273)][_0x99c614(0x230)],'preExecute':function(){const _0x1a86c5=_0x99c614,_0x21b5b2=_0x21410f['particlesTextures']['currentParticlesPosition'];_0x21410f[_0x1a86c5(0x273)]['currentParticlesPosition']=_0x21410f['particlesTextures']['postProcessingPosition'],_0x21410f['particlesTextures']['postProcessingPosition']=_0x21b5b2,_0x21410f[_0x1a86c5(0x1fe)]['updatePosition']['commandToExecute'][_0x1a86c5(0x258)]=_0x21410f[_0x1a86c5(0x273)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x99c614(0x2b2),'uniformMap':{'nextParticlesPosition':function(){const _0x5e3c1f=_0x99c614;return _0x21410f[_0x5e3c1f(0x273)][_0x5e3c1f(0x230)];},'nextParticlesSpeed':function(){return _0x21410f['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x4cf004['lonRange'];},'latRange':function(){const _0x2b76e4=_0x99c614;return _0x4cf004[_0x2b76e4(0x27a)];},'randomCoefficient':function(){const _0x3fc1b4=Math['random']();return _0x3fc1b4;},'dropRate':function(){return _0x381abf['dropRate'];},'dropRateBump':function(){const _0x2d95f6=_0x99c614;return _0x381abf[_0x2d95f6(0x26b)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x99c614(0x273)]['postProcessingPosition'],'preExecute':function(){_0x21410f['primitives']['postProcessingPosition']['commandToExecute']['outputTexture']=_0x21410f['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x5a07bb=_0x99c614;return _0x21410f['particlesTextures'][_0x5a07bb(0x2b4)];},'nextParticlesSpeed':function(){return _0x21410f['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x29259b=_0x99c614;_0x21410f['primitives']['postProcessingSpeed'][_0x29259b(0x283)]['outputTexture']=_0x21410f['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x5d87ed,_0x445910,_0x4c1759,_0x178be4){const _0x4bd3e1=_0x2451d4;this['context']=_0x5d87ed,_0x445910={..._0x445910},_0x445910[_0x4bd3e1(0x22a)]&&_0x445910['vdata']&&(_0x445910['dimensions']={},_0x445910['dimensions']['lon']=_0x445910['cols'],_0x445910[_0x4bd3e1(0x272)]['lat']=_0x445910[_0x4bd3e1(0x29b)],_0x445910[_0x4bd3e1(0x272)]['lev']=_0x445910['lev']||0x1,_0x445910['lon']={},_0x445910['lon']['min']=_0x445910['xmin'],_0x445910['lon']['max']=_0x445910['xmax'],_0x445910[_0x4bd3e1(0x2a0)]={},_0x445910[_0x4bd3e1(0x2a0)]['min']=_0x445910['ymin'],_0x445910['lat'][_0x4bd3e1(0x1ef)]=_0x445910[_0x4bd3e1(0x213)],_0x445910[_0x4bd3e1(0x23b)]={},_0x445910['lev'][_0x4bd3e1(0x1d2)]=_0x445910[_0x4bd3e1(0x1d6)]??0x1,_0x445910['lev']['max']=_0x445910[_0x4bd3e1(0x1d5)]??0x1,_0x445910['U']={},_0x445910['U'][_0x4bd3e1(0x2af)]=new Float32Array(_0x445910['udata']),_0x445910['U']['min']=_0x445910[_0x4bd3e1(0x279)]??Math['min'](..._0x445910['udata']),_0x445910['U']['max']=_0x445910['umax']??Math['max'](..._0x445910['udata']),_0x445910['V']={},_0x445910['V']['array']=new Float32Array(_0x445910['vdata']),_0x445910['V']['min']=_0x445910[_0x4bd3e1(0x20e)]??Math[_0x4bd3e1(0x1d2)](..._0x445910['vdata']),_0x445910['V']['max']=_0x445910['vmax']??Math['max'](..._0x445910['vdata'])),this[_0x4bd3e1(0x1e0)]=_0x445910,this[_0x4bd3e1(0x236)]=_0x4c1759,this['viewerParameters']=_0x178be4,this[_0x4bd3e1(0x282)]=new ParticlesComputing(this['context'],this[_0x4bd3e1(0x1e0)],this[_0x4bd3e1(0x236)],this[_0x4bd3e1(0x1de)]),this[_0x4bd3e1(0x21d)]=new ParticlesRendering(this['context'],this[_0x4bd3e1(0x1e0)],this['options'],this['viewerParameters'],this['particlesComputing']);}['canvasResize'](_0x2119dc){const _0x14c7b7=_0x2451d4;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])[_0x14c7b7(0x2a7)](_0x13e5bd=>{const _0x40cac5=_0x14c7b7;this[_0x40cac5(0x282)]['windTextures'][_0x13e5bd][_0x40cac5(0x26f)]();}),this['particlesRendering'][_0x14c7b7(0x1f6)]['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x14c7b7(0x299)])[_0x14c7b7(0x2a7)](_0x1879ff=>{this['particlesRendering']['framebuffers'][_0x1879ff]['destroy']();}),this['context']=_0x2119dc,this[_0x14c7b7(0x282)]=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0x14c7b7(0x1d0)],this['data'],this['options'],this['viewerParameters'],this[_0x14c7b7(0x282)]);}[_0x2451d4(0x288)](){const _0x3cf167=_0x2451d4,_0x3a2644=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object[_0x3cf167(0x1fd)](this['particlesRendering']['framebuffers'])[_0x3cf167(0x2a7)](_0x3a6d58=>{_0x3a2644['framebuffer']=this['particlesRendering']['framebuffers'][_0x3a6d58],_0x3a2644['execute'](this['context']);});}['refreshParticles'](_0x38af90){const _0xdc7e68=_0x2451d4;this['clearFramebuffers'](),this[_0xdc7e68(0x282)]['destroyParticlesTextures'](),this['particlesComputing'][_0xdc7e68(0x26d)](this['context'],this['options'],this[_0xdc7e68(0x1de)]);if(_0x38af90){var _0x34598e,_0x47d8ed;const _0x447d18=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives'][_0xdc7e68(0x1e3)]['geometry']=_0x447d18;const _0x1f524e=Cesium$2['VertexArray']['fromGeometry']({'context':this['context'],'geometry':_0x447d18,'attributeLocations':this['particlesRendering'][_0xdc7e68(0x1fe)]['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});(_0x34598e=this['particlesRendering']['primitives'])!==null&&_0x34598e!==void 0x0&&(_0x47d8ed=_0x34598e['segments'])!==null&&_0x47d8ed!==void 0x0&&_0x47d8ed['commandToExecute']&&(this['particlesRendering']['primitives'][_0xdc7e68(0x1e3)]['commandToExecute']['vertexArray']=_0x1f524e);}}['setOptions'](_0x15e011){const _0x4e58b0=_0x2451d4;let _0x5e5162=![];this['options']['maxParticles']!==_0x15e011['maxParticles']&&(_0x5e5162=!![]),Object['keys'](_0x15e011)['forEach'](_0xee10d3=>{this['options'][_0xee10d3]=_0x15e011[_0xee10d3];}),this[_0x4e58b0(0x296)](_0x5e5162);}['applyViewerParameters'](_0x2e29ae){Object['keys'](_0x2e29ae)['forEach'](_0x1ebbd8=>{this['viewerParameters'][_0x1ebbd8]=_0x2e29ae[_0x1ebbd8];}),this['refreshParticles'](![]);}[_0x2451d4(0x26f)](){const _0x5f2b80=_0x2451d4;clearTimeout(this['canrefresh']),this[_0x5f2b80(0x282)][_0x5f2b80(0x1db)](),Object['keys'](this[_0x5f2b80(0x282)]['windTextures'])[_0x5f2b80(0x2a7)](_0x18195d=>{this['particlesComputing']['windTextures'][_0x18195d]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x5f2b80(0x299)])['forEach'](_0x33be7a=>{this['particlesRendering']['framebuffers'][_0x33be7a]['destroy']();});for(const _0x8b485b in this){delete this[_0x8b485b];}}}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':[_0x2451d4(0x20a)]};class WindLayer extends BaseLayer$1{constructor(_0x4e97ec={}){_0x4e97ec={...DEF_OPTIONS,..._0x4e97ec},super(_0x4e97ec),this['_setOptionsHook'](_0x4e97ec);}get[_0x2451d4(0x239)](){const _0xddc3ec=_0x2451d4;return this[_0xddc3ec(0x1fe)];}get['data'](){return this['_data'];}set['data'](_0x18a42a){const _0xe2b5cd=_0x2451d4;this[_0xe2b5cd(0x21f)](_0x18a42a);}get['colors'](){const _0x59bc34=_0x2451d4;return this[_0x59bc34(0x236)]['colors'];}set['colors'](_0x3718a1){const _0x3714db=_0x2451d4;this['options'][_0x3714db(0x280)]=_0x3718a1,this['particleSystem']&&this['particleSystem'][_0x3714db(0x1dd)]({'colors':_0x3718a1}),this[_0x3714db(0x233)]();}[_0x2451d4(0x232)](){}['_addedHook'](){const _0x5cf879=_0x2451d4;this['scene']=this['_map']['scene'],this['camera']=this[_0x5cf879(0x1fc)]['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives'][_0x5cf879(0x26a)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1[(_0x5cf879(0x25c))](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this['resize'][_0x5cf879(0x27d)](this),![]),this[_0x5cf879(0x1e4)]=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace[_0x5cf879(0x1eb)][_0x5cf879(0x271)],this[_0x5cf879(0x254)],this),this[_0x5cf879(0x1fc)]['on'](mars3d__namespace['EventType'][_0x5cf879(0x210)],this['_onMouseDownEvent'],this),this[_0x5cf879(0x1fc)]['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_data']&&this[_0x5cf879(0x21f)](this['_data']);}[_0x2451d4(0x1e6)](){const _0x3e20ac=_0x2451d4;window['removeEventListener'](_0x3e20ac(0x233),this[_0x3e20ac(0x233)]),this[_0x3e20ac(0x1fc)]['off'](mars3d__namespace[_0x3e20ac(0x1eb)][_0x3e20ac(0x224)],this[_0x3e20ac(0x266)],this),this['_map'][_0x3e20ac(0x262)](mars3d__namespace['EventType'][_0x3e20ac(0x271)],this['_onMapWhellEvent'],this),this[_0x3e20ac(0x1fc)][_0x3e20ac(0x262)](mars3d__namespace[_0x3e20ac(0x1eb)][_0x3e20ac(0x210)],this['_onMouseDownEvent'],this),this[_0x3e20ac(0x1fc)][_0x3e20ac(0x262)](mars3d__namespace[_0x3e20ac(0x1eb)]['mouseUp'],this['_onMouseUpEvent'],this),this[_0x3e20ac(0x1fc)]['off'](mars3d__namespace[_0x3e20ac(0x1eb)]['mouseMove'],this[_0x3e20ac(0x207)],this),this['primitives']['removeAll'](),this['_map']['scene']['primitives']['remove'](this[_0x3e20ac(0x1fe)]);}[_0x2451d4(0x233)](){const _0x47610a=_0x2451d4;if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this[_0x47610a(0x1fc)][_0x47610a(0x246)](mars3d__namespace[_0x47610a(0x1eb)]['preRender'],this['_onMap_preRenderEvent'],this);}[_0x2451d4(0x266)](_0x2795c7){const _0x45b6f5=_0x2451d4;this['particleSystem']['canvasResize'](this['scene'][_0x45b6f5(0x1d0)]),this[_0x45b6f5(0x219)](),this[_0x45b6f5(0x1fe)][_0x45b6f5(0x23a)]=!![];}['_onMapWhellEvent'](_0x5efae0){const _0x587fb5=_0x2451d4;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0x587fb5(0x1dc)])return;this[_0x587fb5(0x1fe)]['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x2b4ffb){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x2a5d0d){const _0x507ee3=_0x2451d4;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&(this[_0x507ee3(0x1fe)]['show']=![],this['mouse_move']=!![]);}[_0x2451d4(0x24a)](_0xbc705d){const _0x43fa66=_0x2451d4;if(!this['show']||!this['particleSystem'])return;this[_0x43fa66(0x1e4)]&&this['mouse_move']&&this[_0x43fa66(0x2a8)](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0x4197cd=_0x2451d4;if(!this[_0x4197cd(0x1fc)]||!this[_0x4197cd(0x23a)])return;this['updateViewerParameters'](),this[_0x4197cd(0x1dc)]['applyViewerParameters'](this['viewerParameters']),this[_0x4197cd(0x1fe)]['show']=!![];}['setData'](_0x180135){const _0x5c2d22=_0x2451d4;this['_data']=_0x180135,this[_0x5c2d22(0x1dc)]&&this['particleSystem']['destroy'](),this[_0x5c2d22(0x1dc)]=new ParticleSystem(this[_0x5c2d22(0x1d9)][_0x5c2d22(0x1d0)],_0x180135,this['getOptions'](),this[_0x5c2d22(0x1de)]),this['addPrimitives']();}[_0x2451d4(0x28b)](_0x3a6aa1,_0x2b2ecd){const _0x56c1b1=_0x2451d4;if(_0x3a6aa1)for(const _0xf20745 in _0x3a6aa1){this[_0xf20745]=_0x3a6aa1[_0xf20745];}this['particleSystem']&&this[_0x56c1b1(0x1dc)]['setOptions'](this['getOptions']());}['getOptions'](){const _0x555c77=_0x2451d4,_0x377eeb=Math[_0x555c77(0x248)](Math[_0x555c77(0x2aa)](this['particlesNumber']));return this['particlesNumber']=_0x377eeb*_0x377eeb,{'particlesTextureSize':_0x377eeb,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this[_0x555c77(0x280)]};}[_0x2451d4(0x219)](){const _0xc8a163=_0x2451d4;this[_0xc8a163(0x1fe)]['add'](this[_0xc8a163(0x1dc)]['particlesComputing']['primitives']['getWind']),this[_0xc8a163(0x1fe)]['add'](this['particleSystem']['particlesComputing']['primitives'][_0xc8a163(0x278)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updatePosition']),this[_0xc8a163(0x1fe)][_0xc8a163(0x26a)](this[_0xc8a163(0x1dc)]['particlesComputing']['primitives']['postProcessingPosition']),this[_0xc8a163(0x1fe)]['add'](this[_0xc8a163(0x1dc)][_0xc8a163(0x282)][_0xc8a163(0x1fe)]['postProcessingSpeed']),this['primitives']['add'](this['particleSystem'][_0xc8a163(0x21d)]['primitives']['segments']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['screen']);}[_0x2451d4(0x253)](){const _0x285e74=_0x2451d4;let _0x214b2e=this[_0x285e74(0x205)]['computeViewRectangle'](this['scene'][_0x285e74(0x1e8)]['ellipsoid']);if(!_0x214b2e){const _0x1d50de=this['_map'][_0x285e74(0x22b)]();_0x214b2e=Cesium$1['Rectangle']['fromDegrees'](_0x1d50de['xmin'],_0x1d50de['ymin'],_0x1d50de['xmax'],_0x1d50de['ymax']);}const _0x4c558f=Util['viewRectangleToLonLatRange'](_0x214b2e);this[_0x285e74(0x1de)]['lonRange']['x']=_0x4c558f['lon']['min'],this[_0x285e74(0x1de)]['lonRange']['y']=_0x4c558f['lon'][_0x285e74(0x1ef)],this['viewerParameters'][_0x285e74(0x27a)]['x']=_0x4c558f['lat']['min'],this[_0x285e74(0x1de)]['latRange']['y']=_0x4c558f['lat']['max'];const _0xb9a50c=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0xb9a50c>0x0&&(this['viewerParameters'][_0x285e74(0x2b0)]=_0xb9a50c);}}mars3d__namespace['LayerUtil']['register'](_0x2451d4(0x21b),WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x1349e2=_0x2451d4;this['lng']=null,this[_0x1349e2(0x2a0)]=null,this['tlng']=null,this[_0x1349e2(0x245)]=null,this['age']=null,this[_0x1349e2(0x23c)]=null;}['destroy'](){for(const _0x11a717 in this){delete this[_0x11a717];}}}class CanvasWindField{constructor(_0x4f94ef){this['setOptions'](_0x4f94ef);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x5de5e9){const _0x2131d0=_0x2451d4;this['_speedRate']=(0x64-(_0x5de5e9>0x63?0x63:_0x5de5e9))*0x64,this[_0x2131d0(0x284)]=[(this['xmax']-this[_0x2131d0(0x251)])/this[_0x2131d0(0x234)],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){return this['_maxAge'];}set['maxAge'](_0x51f8b0){this['_maxAge']=_0x51f8b0;}[_0x2451d4(0x1dd)](_0x57c94a){const _0x440f04=_0x2451d4;this['options']=_0x57c94a,this['maxAge']=_0x57c94a['maxAge']||0x78,this[_0x440f04(0x22f)]=_0x57c94a['speedRate']||0x32,this['particles']=[];const _0x4ddb17=_0x57c94a['particlesNumber']||0x1000;for(let _0x29d527=0x0;_0x29d527<_0x4ddb17;_0x29d527++){const _0x21af2d=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x21af2d);}}['setDate'](_0xbef59f){const _0x5cd00c=_0x2451d4;this[_0x5cd00c(0x29b)]=_0xbef59f['rows'],this['cols']=_0xbef59f['cols'],this[_0x5cd00c(0x251)]=_0xbef59f['xmin'],this['xmax']=_0xbef59f['xmax'],this['ymin']=_0xbef59f['ymin'],this['ymax']=_0xbef59f[_0x5cd00c(0x213)],this['grid']=[];const _0x2f859d=_0xbef59f['udata'],_0x5aa67f=_0xbef59f['vdata'];let _0x15ab91=![];_0x2f859d['length']===this[_0x5cd00c(0x29b)]&&_0x2f859d[0x0]['length']===this[_0x5cd00c(0x212)]&&(_0x15ab91=!![]);let _0x33c3f1=0x0,_0x54fc75=null,_0x436bf4=null;for(let _0x1a0f2a=0x0;_0x1a0f2a<this['rows'];_0x1a0f2a++){_0x54fc75=[];for(let _0x4960ee=0x0;_0x4960ee<this['cols'];_0x4960ee++,_0x33c3f1++){_0x15ab91?_0x436bf4=this['_calcUV'](_0x2f859d[_0x1a0f2a][_0x4960ee],_0x5aa67f[_0x1a0f2a][_0x4960ee]):_0x436bf4=this[_0x5cd00c(0x252)](_0x2f859d[_0x33c3f1],_0x5aa67f[_0x33c3f1]),_0x54fc75[_0x5cd00c(0x1cb)](_0x436bf4);}this['grid'][_0x5cd00c(0x1cb)](_0x54fc75);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x4aaa86=_0x2451d4;delete this['rows'],delete this[_0x4aaa86(0x212)],delete this['xmin'],delete this[_0x4aaa86(0x2a4)],delete this['ymin'],delete this['ymax'],delete this[_0x4aaa86(0x1d8)],delete this['particles'];}[_0x2451d4(0x237)](_0x37babc,_0x27bb4a){const _0xfddf8a=_0x2451d4,_0x4e90a3=(_0x37babc-this['xmin'])/(this[_0xfddf8a(0x2a4)]-this['xmin'])*(this[_0xfddf8a(0x212)]-0x1),_0x4ed80e=(this['ymax']-_0x27bb4a)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0x4e90a3,_0x4ed80e];}['getUVByXY'](_0x1d0e4e,_0x4a1a17){const _0x5a7c41=_0x2451d4;if(_0x1d0e4e<0x0||_0x1d0e4e>=this['cols']||_0x4a1a17>=this['rows'])return[0x0,0x0,0x0];const _0x8fa459=Math['floor'](_0x1d0e4e),_0x1085e1=Math['floor'](_0x4a1a17);if(_0x8fa459===_0x1d0e4e&&_0x1085e1===_0x4a1a17)return this['grid'][_0x4a1a17][_0x1d0e4e];const _0x4661cc=_0x8fa459+0x1,_0x46c19f=_0x1085e1+0x1,_0x754f0c=this['getUVByXY'](_0x8fa459,_0x1085e1),_0x479cc3=this[_0x5a7c41(0x1e5)](_0x4661cc,_0x1085e1),_0x4cdca2=this['getUVByXY'](_0x8fa459,_0x46c19f),_0x40bddf=this['getUVByXY'](_0x4661cc,_0x46c19f);let _0x529a50=null;try{_0x529a50=this['_bilinearInterpolation'](_0x1d0e4e-_0x8fa459,_0x4a1a17-_0x1085e1,_0x754f0c,_0x479cc3,_0x4cdca2,_0x40bddf);}catch(_0x122301){console[_0x5a7c41(0x201)](_0x1d0e4e,_0x4a1a17);}return _0x529a50;}[_0x2451d4(0x1d4)](_0x153a1f,_0x27812b,_0x3aefe4,_0x52291e,_0x481e3d,_0x9fdff1){const _0x2c1c18=0x1-_0x153a1f,_0x686c6f=0x1-_0x27812b,_0x1f81aa=_0x2c1c18*_0x686c6f,_0x549404=_0x153a1f*_0x686c6f,_0x156761=_0x2c1c18*_0x27812b,_0x2c7455=_0x153a1f*_0x27812b,_0x2eba9e=_0x3aefe4[0x0]*_0x1f81aa+_0x52291e[0x0]*_0x549404+_0x481e3d[0x0]*_0x156761+_0x9fdff1[0x0]*_0x2c7455,_0x469542=_0x3aefe4[0x1]*_0x1f81aa+_0x52291e[0x1]*_0x549404+_0x481e3d[0x1]*_0x156761+_0x9fdff1[0x1]*_0x2c7455;return this['_calcUV'](_0x2eba9e,_0x469542);}['_calcUV'](_0x1f9e60,_0x2dbf80){return[+_0x1f9e60,+_0x2dbf80,Math['sqrt'](_0x1f9e60*_0x1f9e60+_0x2dbf80*_0x2dbf80)];}['getUVByPoint'](_0x1867d2,_0x1914a1){if(!this['isInExtent'](_0x1867d2,_0x1914a1))return null;const _0xa7e493=this['toGridXY'](_0x1867d2,_0x1914a1),_0x585ac4=this['getUVByXY'](_0xa7e493[0x0],_0xa7e493[0x1]);return _0x585ac4;}[_0x2451d4(0x26c)](_0x17955a,_0x1e8d51){const _0x90eee1=_0x2451d4;return _0x17955a>=this['xmin']&&_0x17955a<=this[_0x90eee1(0x2a4)]&&_0x1e8d51>=this['ymin']&&_0x1e8d51<=this['ymax']?!![]:![];}[_0x2451d4(0x1f0)](){const _0x3995c8=_0x2451d4,_0x419a85=fRandomByfloat(this['xmin'],this[_0x3995c8(0x2a4)]),_0x34879f=fRandomByfloat(this['ymin'],this[_0x3995c8(0x213)]);return{'lat':_0x34879f,'lng':_0x419a85};}['getParticles'](){const _0x22647e=_0x2451d4;let _0x1f30c7,_0x48a2f3,_0x3372e8;for(let _0x4d544a=0x0,_0x54afd=this['particles'][_0x22647e(0x23e)];_0x4d544a<_0x54afd;_0x4d544a++){let _0x457635=this['particles'][_0x4d544a];_0x457635['age']<=0x0&&(_0x457635=this['_randomParticle'](_0x457635));if(_0x457635[_0x22647e(0x242)]>0x0){const _0x1b6731=_0x457635['tlng'],_0x4fa0b8=_0x457635[_0x22647e(0x245)];_0x3372e8=this['getUVByPoint'](_0x1b6731,_0x4fa0b8),_0x3372e8?(_0x1f30c7=_0x1b6731+this[_0x22647e(0x284)][0x0]*_0x3372e8[0x0],_0x48a2f3=_0x4fa0b8+this[_0x22647e(0x284)][0x1]*_0x3372e8[0x1],_0x457635[_0x22647e(0x289)]=_0x1b6731,_0x457635['lat']=_0x4fa0b8,_0x457635['tlng']=_0x1f30c7,_0x457635[_0x22647e(0x245)]=_0x48a2f3,_0x457635[_0x22647e(0x23c)]=_0x3372e8[0x2],_0x457635['age']--):_0x457635[_0x22647e(0x242)]=0x0;}}return this['particles'];}[_0x2451d4(0x1ca)](_0x575cee){const _0x5a1622=_0x2451d4;let _0x28c295,_0x469dc8;for(let _0x108880=0x0;_0x108880<0x1e;_0x108880++){_0x28c295=this['getRandomLatLng'](),_0x469dc8=this[_0x5a1622(0x209)](_0x28c295['lng'],_0x28c295['lat']);if(_0x469dc8&&_0x469dc8[0x2]>0x0)break;}if(!_0x469dc8)return _0x575cee;const _0x1530c1=_0x28c295['lng']+this['_calc_speedRate'][0x0]*_0x469dc8[0x0],_0x3065d0=_0x28c295['lat']+this[_0x5a1622(0x284)][0x1]*_0x469dc8[0x1];return _0x575cee[_0x5a1622(0x289)]=_0x28c295['lng'],_0x575cee[_0x5a1622(0x2a0)]=_0x28c295['lat'],_0x575cee['tlng']=_0x1530c1,_0x575cee['tlat']=_0x3065d0,_0x575cee['age']=Math['round'](Math['random']()*this['maxAge']),_0x575cee['speed']=_0x469dc8[0x2],_0x575cee;}['destroy'](){for(const _0x6c83b in this){delete this[_0x6c83b];}}}function fRandomByfloat(_0x1872d,_0x3bbe67){return _0x1872d+Math['random']()*(_0x3bbe67-_0x1872d);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x2451d4(0x239)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x41d009={}){const _0x3c9ddf=_0x2451d4;super(_0x41d009),this['_setOptionsHook'](_0x41d009),this['canvas']=null,_0x41d009['colors']&&_0x41d009['steps']&&(this['_colorRamp']=new mars3d__namespace[(_0x3c9ddf(0x256))](_0x41d009));}['_setOptionsHook'](_0x24cf68,_0x1847b9){const _0x7337b7=_0x2451d4;this[_0x7337b7(0x297)]=0x3e8/(_0x24cf68['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this[_0x7337b7(0x2a3)]=_0x24cf68['color']||'#ffffff',this[_0x7337b7(0x243)]=_0x24cf68['lineWidth']||0x1,this['fixedHeight']=_0x24cf68[_0x7337b7(0x25e)]??0x0,this[_0x7337b7(0x21e)]=_0x24cf68['reverseY']??![],this['windField']&&this['windField']['setOptions'](_0x24cf68);}get['layer'](){return this['canvas'];}get['canvasWidth'](){const _0x78353f=_0x2451d4;return this['_map']['scene'][_0x78353f(0x1ff)][_0x78353f(0x22c)];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){const _0x3e9d96=_0x2451d4;return this[_0x3e9d96(0x1cc)];}set['pointerEvents'](_0x32ba80){const _0x272111=_0x2451d4;this[_0x272111(0x1cc)]=_0x32ba80;if(!this['canvas'])return;_0x32ba80?this[_0x272111(0x1ff)]['style']['pointer-events']=_0x272111(0x1e1):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set[_0x2451d4(0x1c9)](_0x1369db){const _0x24911b=_0x2451d4;this['options'][_0x24911b(0x1c9)]=_0x1369db,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x52e38c=_0x2451d4;return this[_0x52e38c(0x236)]['speedRate'];}set['speedRate'](_0xd87da8){const _0x165dde=_0x2451d4;this[_0x165dde(0x236)]['speedRate']=_0xd87da8,this['windField']&&(this['windField']['speedRate']=_0xd87da8);}get['maxAge'](){const _0x50fbf1=_0x2451d4;return this['options'][_0x50fbf1(0x1e2)];}set['maxAge'](_0x354fcd){const _0x565598=_0x2451d4;this['options'][_0x565598(0x1e2)]=_0x354fcd,this['windField']&&(this['windField']['maxAge']=_0x354fcd);}get['data'](){return this['windData'];}set[_0x2451d4(0x1e0)](_0x12b012){this['setData'](_0x12b012);}['_showHook'](_0x1bbbb1){_0x1bbbb1?this['_addedHook']():(this['windData']&&(this['options']['data']=this['windData']),this['_removedHook']());}['_mountedHook'](){this['options']['worker']?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x557a35=_0x2451d4;this['canvas']=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options']['data']&&this[_0x557a35(0x21f)](this[_0x557a35(0x236)]['data']);}['_removedHook'](){const _0x3a5044=_0x2451d4;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container'][_0x3a5044(0x1df)](this['canvas']),delete this[_0x3a5044(0x1ff)]);}['_createCanvas'](){const _0x22137c=_0x2451d4,_0x5cc11a=mars3d__namespace['DomUtil']['create']('canvas',_0x22137c(0x294),this[_0x22137c(0x1fc)]['container']);return _0x5cc11a['style']['position']='absolute',_0x5cc11a['style'][_0x22137c(0x221)]='0px',_0x5cc11a['style']['left']='0px',_0x5cc11a[_0x22137c(0x29a)]['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x5cc11a[_0x22137c(0x29a)]['height']=this['_map']['scene']['canvas'][_0x22137c(0x2b3)]+'px',_0x5cc11a['style'][_0x22137c(0x1ce)]=this['_pointerEvents']?'auto':'none',_0x5cc11a['style']['zIndex']=this[_0x22137c(0x236)]['zIndex']??0x9,_0x5cc11a['width']=this['_map']['scene']['canvas']['clientWidth'],_0x5cc11a[_0x22137c(0x2a6)]=this[_0x22137c(0x1fc)]['scene'][_0x22137c(0x1ff)][_0x22137c(0x2b3)],_0x5cc11a;}[_0x2451d4(0x233)](){const _0x427e23=_0x2451d4;this['canvas']&&(this[_0x427e23(0x1ff)]['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',this['canvas'][_0x427e23(0x29a)][_0x427e23(0x2a6)]=this['_map']['scene'][_0x427e23(0x1ff)][_0x427e23(0x2b3)]+'px',this['canvas']['width']=this[_0x427e23(0x1fc)]['scene']['canvas']['clientWidth'],this[_0x427e23(0x1ff)][_0x427e23(0x2a6)]=this['_map'][_0x427e23(0x1d9)]['canvas']['clientHeight']);}['bindEvent'](){const _0x3a9a54=_0x2451d4,_0x135430=this;let _0x1fd706=Date['now']();(function _0xe6c28b(){const _0x34d06f=_0x54f3;_0x135430['animateFrame']=window[_0x34d06f(0x25f)](_0xe6c28b);if(_0x135430['show']&&_0x135430['windField']){const _0x2f3019=Date['now'](),_0x928edd=_0x2f3019-_0x1fd706;_0x928edd>_0x135430['frameTime']&&(_0x1fd706=_0x2f3019-_0x928edd%_0x135430[_0x34d06f(0x297)],_0x135430['update']());}}(),window[_0x3a9a54(0x1fa)]('resize',this[_0x3a9a54(0x233)]['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x3a9a54(0x254)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this)));}[_0x2451d4(0x1e7)](){const _0x1f73fe=_0x2451d4;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window['removeEventListener']('resize',this[_0x1f73fe(0x233)]),this['options'][_0x1f73fe(0x1f3)]&&(this[_0x1f73fe(0x1fc)][_0x1f73fe(0x262)](mars3d__namespace['EventType'][_0x1f73fe(0x271)],this[_0x1f73fe(0x254)],this),this[_0x1f73fe(0x1fc)]['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this[_0x1f73fe(0x1fc)]['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map'][_0x1f73fe(0x262)](mars3d__namespace['EventType']['mouseMove'],this[_0x1f73fe(0x207)],this));}['_onMapWhellEvent'](_0x52bc7a){const _0x52678e=_0x2451d4;clearTimeout(this[_0x52678e(0x241)]);if(!this[_0x52678e(0x23a)]||!this[_0x52678e(0x1ff)])return;this['canvas']['style']['visibility']='hidden',this[_0x52678e(0x241)]=setTimeout(()=>{if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']='visible';},0xc8);}[_0x2451d4(0x290)](_0x4784b5){const _0x2f654c=_0x2451d4;this[_0x2f654c(0x1e4)]=!![],this['_map']['off'](mars3d__namespace['EventType'][_0x2f654c(0x24c)],this[_0x2f654c(0x207)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x2f654c(0x207)],this);}['_onMouseMoveEvent'](_0x306218){const _0x3e2c76=_0x2451d4;if(!this[_0x3e2c76(0x23a)]||!this[_0x3e2c76(0x1ff)])return;this['mouse_down']&&(this['canvas']['style']['visibility']=_0x3e2c76(0x214),this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x260c44){const _0x39429e=_0x2451d4;if(!this['show']||!this[_0x39429e(0x1ff)])return;this[_0x39429e(0x1fc)]['off'](mars3d__namespace['EventType'][_0x39429e(0x24c)],this['_onMouseMoveEvent'],this),this['mouse_down']&&this['mouse_move']&&this[_0x39429e(0x2a8)](),this['canvas'][_0x39429e(0x29a)]['visibility']='visible',this[_0x39429e(0x1e4)]=![],this[_0x39429e(0x24e)]=![];}[_0x2451d4(0x21f)](_0x7af3ce){this['clear'](),this['windData']=_0x7af3ce,this['windField']['setDate'](_0x7af3ce),this['redraw']();}['redraw'](){const _0x41b062=_0x2451d4;if(!this[_0x41b062(0x23a)])return;this['windField']['setOptions'](this['options']),this['update']();}[_0x2451d4(0x25b)](){const _0x16aef9=_0x2451d4;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x218ab3=this[_0x16aef9(0x238)][_0x16aef9(0x1ee)]();this[_0x16aef9(0x276)](_0x218ab3);}this[_0x16aef9(0x27f)]=![];}['_drawLines'](_0x3e6c2d){const _0x2f58ef=_0x2451d4;this[_0x2f58ef(0x1da)][_0x2f58ef(0x275)]='destination-in',this['canvasContext'][_0x2f58ef(0x29e)](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext']['globalAlpha']=0.9;const _0x1e195d=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x489f73=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x3749e0=0x0,_0x54f013=_0x3e6c2d[_0x2f58ef(0x23e)];_0x3749e0<_0x54f013;_0x3749e0++){const _0x3c3809=_0x3e6c2d[_0x3749e0],_0x69d1fc=this[_0x2f58ef(0x29d)](_0x3c3809[_0x2f58ef(0x289)],_0x3c3809[_0x2f58ef(0x2a0)],_0x3c3809),_0x4bf61b=this['_tomap'](_0x3c3809[_0x2f58ef(0x204)],_0x3c3809[_0x2f58ef(0x245)],_0x3c3809);if(!_0x69d1fc||!_0x4bf61b)continue;if(_0x1e195d&&Math[_0x2f58ef(0x231)](_0x69d1fc[0x0]-_0x4bf61b[0x0])>=_0x489f73)continue;this['canvasContext']['beginPath'](),this[_0x2f58ef(0x1da)]['lineWidth']=this[_0x2f58ef(0x243)],this['canvasContext']['strokeStyle']=this['_colorRamp']['getColor'](_0x3c3809['speed']),this[_0x2f58ef(0x1da)]['moveTo'](_0x69d1fc[0x0],_0x69d1fc[0x1]),this['canvasContext']['lineTo'](_0x4bf61b[0x0],_0x4bf61b[0x1]),this['canvasContext'][_0x2f58ef(0x2ab)]();}else{this[_0x2f58ef(0x1da)]['beginPath'](),this['canvasContext'][_0x2f58ef(0x243)]=this[_0x2f58ef(0x243)],this['canvasContext']['strokeStyle']=this['color'];for(let _0x2eada6=0x0,_0x4bc4c0=_0x3e6c2d[_0x2f58ef(0x23e)];_0x2eada6<_0x4bc4c0;_0x2eada6++){const _0x3c18af=_0x3e6c2d[_0x2eada6],_0x14d4b8=this['_tomap'](_0x3c18af['lng'],_0x3c18af[_0x2f58ef(0x2a0)],_0x3c18af),_0x34fd25=this[_0x2f58ef(0x29d)](_0x3c18af[_0x2f58ef(0x204)],_0x3c18af['tlat'],_0x3c18af);if(!_0x14d4b8||!_0x34fd25)continue;if(_0x1e195d&&Math['abs'](_0x14d4b8[0x0]-_0x34fd25[0x0])>=_0x489f73)continue;this['canvasContext'][_0x2f58ef(0x2b5)](_0x14d4b8[0x0],_0x14d4b8[0x1]),this['canvasContext'][_0x2f58ef(0x1cf)](_0x34fd25[0x0],_0x34fd25[0x1]);}this['canvasContext']['stroke']();}}[_0x2451d4(0x29d)](_0x2cc015,_0x1d9296,_0x201f92){const _0x4c963a=_0x2451d4,_0x124789=Cesium['Cartesian3']['fromDegrees'](_0x2cc015,_0x1d9296,this[_0x4c963a(0x25e)]),_0x1d0d8=this[_0x4c963a(0x1fc)][_0x4c963a(0x1d9)];if(_0x1d0d8['mode']===Cesium['SceneMode']['SCENE3D']){const _0x2c4504=new Cesium['EllipsoidalOccluder'](_0x1d0d8['globe']['ellipsoid'],_0x1d0d8['camera'][_0x4c963a(0x240)]),_0x572806=_0x2c4504['isPointVisible'](_0x124789);if(!_0x572806)return _0x201f92['age']=0x0,null;}const _0x18b731=Cesium[_0x4c963a(0x1d7)]['wgs84ToWindowCoordinates'](this['_map']['scene'],_0x124789);return _0x18b731?[_0x18b731['x'],_0x18b731['y']]:null;}['clear'](){const _0xd41d81=_0x2451d4;this['windField']['clear'](),delete this[_0xd41d81(0x1f5)];}[_0x2451d4(0x281)](){const _0x29c34b=_0x2451d4;this['worker']=new Worker(this['options']['worker']),this[_0x29c34b(0x27c)][_0x29c34b(0x2ad)]=_0x2b1bfa=>{const _0x4b1477=_0x29c34b;this['_drawLines'](_0x2b1bfa[_0x4b1477(0x1e0)]['particles']),this['_updateIng2']=![];},this[_0x29c34b(0x238)]={'init':_0x4c2a77=>{const _0x58dda4=_0x29c34b;this['worker'][_0x58dda4(0x260)]({'type':'init','options':_0x4c2a77});},'setOptions':_0x37779a=>{const _0x1700ce=_0x29c34b;this['worker']['postMessage']({'type':_0x1700ce(0x1dd),'options':_0x37779a});},'setDate':_0x4e67c2=>{this['worker']['postMessage']({'type':'setDate','data':_0x4e67c2});},'update':()=>{const _0x2807b0=_0x29c34b;if(this['_updateIng2'])return;this[_0x2807b0(0x293)]=!![],this['worker']['postMessage']({'type':_0x2807b0(0x25b)});},'clear':()=>{const _0x16ddd3=_0x29c34b;this[_0x16ddd3(0x27c)]['postMessage']({'type':_0x16ddd3(0x244)});}},this['windField'][_0x29c34b(0x285)](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports[_0x2451d4(0x208)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports[_0x2451d4(0x1ea)]=WindUtil,Object['defineProperty'](exports,_0x2451d4(0x261),{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-wind",
3
- "version": "3.6.7",
3
+ "version": "3.6.8",
4
4
  "description": "Mars3D平台插件,支持气象 风向图 功能插件",
5
5
  "main": "dist/mars3d-wind.js",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "peerDependencies": {},
10
10
  "devDependencies": {
11
- "mars3d": "~3.6.7"
11
+ "mars3d": "~3.6.8"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "eslint ./src/**/*.{js,ts} --fix"