mars3d-wind 3.6.0 → 3.6.1

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.0
5
- * 编译日期:2023-08-04 12:18:29
4
+ * 版本信息:v3.6.1
5
+ * 编译日期:2023-08-14 21:28:14
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 _0x2e45ab=_0x27a6;(function(_0x4e9c89,_0x1f011a){const _0x1c811d=_0x27a6,_0x28ba54=_0x4e9c89();while(!![]){try{const _0x298b95=-parseInt(_0x1c811d(0x204))/0x1+parseInt(_0x1c811d(0x288))/0x2*(parseInt(_0x1c811d(0x24c))/0x3)+-parseInt(_0x1c811d(0x290))/0x4*(-parseInt(_0x1c811d(0x1f7))/0x5)+-parseInt(_0x1c811d(0x236))/0x6+-parseInt(_0x1c811d(0x1de))/0x7*(-parseInt(_0x1c811d(0x20f))/0x8)+parseInt(_0x1c811d(0x223))/0x9*(-parseInt(_0x1c811d(0x224))/0xa)+parseInt(_0x1c811d(0x23d))/0xb*(parseInt(_0x1c811d(0x229))/0xc);if(_0x298b95===_0x1f011a)break;else _0x28ba54['push'](_0x28ba54['shift']());}catch(_0x32e38b){_0x28ba54['push'](_0x28ba54['shift']());}}}(_0x4163,0xc1477));function _0x4163(){const _0x4ae84d=['maxAge','push','width','off','windData','_maxAge','now','scene','colors','OPAQUE','vdata','clearFramebuffers','_drawLines','preExecute','61365EMZsxH','fixedHeight','FLOAT','createSegmentsGeometry','destroy','ShaderSource','framebuffers','Math','commandToExecute','lon','sin','particlesTextureSize','max','658039uXuupZ','all','LINEAR','lonRange','_map','mouseMove','getWind','createWindTextures','rows','_data','create','437264zOFLHL','WindUtil','toDegrees','options','removeAll','array','lev','primitiveType','uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a','mouseUp','destroyParticlesTextures','segments','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','color','cols','pow','fill','randomBetween','uniformMap','isPointVisible','2121759gVdDDa','10GKJrNL','setOptions','updatePosition','canvas','updateSpeed','12TKHKVS','createRenderingFramebuffers','getFullscreenQuad','particles','ymax','show','_mountedHook','toGridXY','cos','Compute','particlesRendering','GeometryAttribute','ymin','5930160aIAWOR','isInExtent','getUVByXY','mouseDown','vertexShaderSource','applyViewerParameters','createRenderingPrimitives','10497575EHYrOz','context','BaseLayer','blue','primitives','setDate','TWO_PI','defined','_addedHook','frameRate','_onMouseMoveEvent','lineWidth','nextTrails','fragmentShaderSource','clientHeight','3mypaxD','frameTime','autoClear','updateViewerParameters','windField','createCommand','defineProperty','particleHeight','outputTexture','LayerUtil','_updateIng','currentTrailsDepth','SceneMode','fromCssColorString','animateFrame','udata','canvasResize','destination-in','segmentsColor','NEAREST','left','WindLayer','latRange','keys','Color','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','textures','_calc_speedRate','ceil','currentTrailsColor','worker','canvasWidth','min','PI_OVER_THREE','dimensions','getPixelSize','postProcessingPosition','Sampler','tlng','random','zIndex','createTexture','vertexArray','height','GeometryAttributes','Appearance','createFramebuffer','add','EventType','requestAnimationFrame','globeBoundingSphere','Pass','atan2','createRawRenderState','clear','lng','particlesTextures','Texture','refreshParticles','randomizeParticles','257418lgDgto','canvasContext','TextureMinificationFilter','speedRate','particlesWind','viewRectangleToLonLatRange','attributeLocations','fadeOpacity','180dZBpyz','particleSystem','drawingBufferHeight','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','floor','ClearCommand','mouse_move','_randomParticle','particlesComputing','clearCommand','style','lat','Rectangle','DEPTH_COMPONENT','_onMapWhellEvent','bindEvent','IDENTITY','init','PrimitiveCollection','nextParticlesSpeed','Draw','TextureMagnificationFilter','layer','DomUtil','viewerParameters','update','Cesium','_tomap','BufferUsage','mouse_down','xmin','postMessage','_updateIng2','PixelDatatype','source','cancelAnimationFrame','postProcessingSpeed','windTextures','_setOptionsHook','visibility','colorTable','particlesNumber','grid','currentTrails','age','currentParticlesSpeed','_onMouseUpEvent','xmax','round','geometry','DepthFunction','DISABLE_GL_POSITION_LOG_DEPTH','fromCache','_speedRate','__esModule','133YlKXsn','framebuffer','length','maxParticles','data','forEach','resize','PixelFormat','Framebuffer','pointerEvents','camera'];_0x4163=function(){return _0x4ae84d;};return _0x4163();}function _interopNamespace(_0x5ce6fb){const _0x273b0f=_0x27a6;if(_0x5ce6fb&&_0x5ce6fb[_0x273b0f(0x1dd)])return _0x5ce6fb;var _0x3b7a35=Object['create'](null);return _0x5ce6fb&&Object['keys'](_0x5ce6fb)[_0x273b0f(0x1e3)](function(_0x33375b){if(_0x33375b!=='default'){var _0x9f3b97=Object['getOwnPropertyDescriptor'](_0x5ce6fb,_0x33375b);Object['defineProperty'](_0x3b7a35,_0x33375b,_0x9f3b97['get']?_0x9f3b97:{'enumerable':!![],'get':function(){return _0x5ce6fb[_0x33375b];}});}}),_0x3b7a35['default']=_0x5ce6fb,_0x3b7a35;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x276767,_0x48a1c4){const _0x12876f=_0x27a6,_0x5d1065=_0x276767*Math[_0x12876f(0x231)](Cesium$7['Math']['toRadians'](_0x48a1c4));return _0x5d1065;}function getV(_0xa6c1e7,_0x5eefb8){const _0x7ef18f=_0x27a6,_0x333aca=_0xa6c1e7*Math[_0x7ef18f(0x201)](Cesium$7['Math']['toRadians'](_0x5eefb8));return _0x333aca;}function getSpeed(_0x482b45,_0x45507d){const _0x43ecfb=_0x27a6,_0x45ff34=Math['sqrt'](Math[_0x43ecfb(0x21e)](_0x482b45,0x2)+Math['pow'](_0x45507d,0x2));return _0x45ff34;}function getDirection(_0x343e08,_0x321ef0){const _0x2a680a=_0x27a6;let _0x4cf5ed=Cesium$7['Math'][_0x2a680a(0x211)](Math[_0x2a680a(0x280)](_0x321ef0,_0x343e08));return _0x4cf5ed+=_0x4cf5ed<0x0?0x168:0x0,_0x4cf5ed;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x40f743){const _0xd1b9f2=_0x27a6;this['commandType']=_0x40f743['commandType'],this['geometry']=_0x40f743[_0xd1b9f2(0x1d8)],this['attributeLocations']=_0x40f743[_0xd1b9f2(0x28e)],this['primitiveType']=_0x40f743[_0xd1b9f2(0x216)],this[_0xd1b9f2(0x221)]=_0x40f743['uniformMap'],this['vertexShaderSource']=_0x40f743['vertexShaderSource'],this['fragmentShaderSource']=_0x40f743['fragmentShaderSource'],this['rawRenderState']=_0x40f743['rawRenderState'],this[_0xd1b9f2(0x1df)]=_0x40f743[_0xd1b9f2(0x1df)],this['outputTexture']=_0x40f743['outputTexture'],this[_0xd1b9f2(0x24e)]=_0x40f743[_0xd1b9f2(0x24e)]??![],this['preExecute']=_0x40f743['preExecute'],this['show']=!![],this[_0xd1b9f2(0x1ff)]=undefined,this['clearCommand']=undefined,this['autoClear']&&(this[_0xd1b9f2(0x299)]=new Cesium$6[(_0xd1b9f2(0x295))]({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0xd1b9f2(0x1df)],'pass':Cesium$6['Pass'][_0xd1b9f2(0x1f2)]}));}['createCommand'](_0x6b04d){const _0x70a34d=_0x27a6;switch(this['commandType']){case _0x70a34d(0x2a4):{const _0x4e167f=Cesium$6['VertexArray']['fromGeometry']({'context':_0x6b04d,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x441e28=Cesium$6['ShaderProgram']['fromCache']({'context':_0x6b04d,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this[_0x70a34d(0x23a)],'fragmentShaderSource':this['fragmentShaderSource']}),_0x775292=Cesium$6['RenderState'][_0x70a34d(0x1db)](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x441e28,'vertexArray':_0x4e167f,'modelMatrix':Cesium$6['Matrix4'][_0x70a34d(0x2a0)],'renderState':_0x775292,'uniformMap':this[_0x70a34d(0x221)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this[_0x70a34d(0x24a)],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x1a10ba,_0x165450){const _0x5b88b0=_0x27a6;this['geometry']=_0x165450;const _0x24a29d=Cesium$6['VertexArray']['fromGeometry']({'context':_0x1a10ba,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x5b88b0(0x1c3)]['STATIC_DRAW']});this['commandToExecute'][_0x5b88b0(0x276)]=_0x24a29d;}['update'](_0x23292c){const _0x42008d=_0x27a6;if(!this['show'])return;if(_0x23292c['mode']!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this[_0x42008d(0x251)](_0x23292c[_0x42008d(0x23e)])),Cesium$6[_0x42008d(0x244)](this[_0x42008d(0x1f6)])&&this['preExecute'](),Cesium$6[_0x42008d(0x244)](this['clearCommand'])&&_0x23292c['commandList']['push'](this['clearCommand']),_0x23292c['commandList'][_0x42008d(0x1ea)](this[_0x42008d(0x1ff)]);}['isDestroyed'](){return![];}['destroy'](){const _0x5b9fea=_0x27a6;if(this[_0x5b9fea(0x299)]){var _0x37e792,_0x28f754;(_0x37e792=this[_0x5b9fea(0x299)])!==null&&_0x37e792!==void 0x0&&_0x37e792['vertexArray']&&this['clearCommand'][_0x5b9fea(0x276)]['destroy'](),(_0x28f754=this['clearCommand'])!==null&&_0x28f754!==void 0x0&&_0x28f754['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this[_0x5b9fea(0x1ff)]['vertexArray']&&this[_0x5b9fea(0x1ff)]['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram']['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0xd700ae=function(){const _0x415a0a=_0x27a6,_0x3d88da=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x415a0a(0x278))]({'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[(_0x415a0a(0x234))]({'componentDatatype':Cesium$5['ComponentDatatype'][_0x415a0a(0x1f9)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x3d88da;},_0x278d73=function(_0x1d187d,_0x57aff1){const _0x3fa3e6=_0x27a6;if(Cesium$5['defined'](_0x57aff1)){const _0x3e1de2={};_0x3e1de2['arrayBufferView']=_0x57aff1,_0x1d187d[_0x3fa3e6(0x1c9)]=_0x3e1de2;}const _0x12672f=new Cesium$5[(_0x3fa3e6(0x285))](_0x1d187d);return _0x12672f;},_0x4e1ffb=function(_0x20801e,_0x3547de,_0x4ebbec){const _0x35bb1a=_0x27a6,_0x208a1b=new Cesium$5[(_0x35bb1a(0x1e6))]({'context':_0x20801e,'colorTextures':[_0x3547de],'depthTexture':_0x4ebbec});return _0x208a1b;},_0x5c79af=function(_0x4f21ab){const _0x1670c8=_0x27a6,_0x2c2c3e=!![],_0x1dcb36=![],_0x3c7c7b={'viewport':_0x4f21ab['viewport'],'depthTest':_0x4f21ab['depthTest'],'depthMask':_0x4f21ab['depthMask'],'blending':_0x4f21ab['blending']},_0x27a157=Cesium$5[_0x1670c8(0x279)]['getDefaultRenderState'](_0x2c2c3e,_0x1dcb36,_0x3c7c7b);return _0x27a157;},_0x1ef406=function(_0x427c95){const _0x208b22=_0x27a6,_0xf422a4={},_0x3e3ffd=Cesium$5['Math']['mod'](_0x427c95['west'],Cesium$5[_0x208b22(0x1fe)]['TWO_PI']),_0x6c280d=Cesium$5['Math']['mod'](_0x427c95['east'],Cesium$5[_0x208b22(0x1fe)][_0x208b22(0x243)]),_0x1a5902=_0x427c95[_0x208b22(0x1eb)];let _0x58d51f,_0x227b71;_0x1a5902>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x58d51f=0x0,_0x227b71=Cesium$5['Math']['TWO_PI']):_0x6c280d-_0x3e3ffd<_0x1a5902?(_0x58d51f=_0x3e3ffd,_0x227b71=_0x3e3ffd+_0x1a5902):(_0x58d51f=_0x3e3ffd,_0x227b71=_0x6c280d);_0xf422a4['lon']={'min':Cesium$5['Math']['toDegrees'](_0x58d51f),'max':Cesium$5['Math'][_0x208b22(0x211)](_0x227b71)};const _0xfe8b87=_0x427c95['south'],_0x3c356f=_0x427c95['north'],_0x4a5bd7=_0x427c95[_0x208b22(0x277)],_0x1cbd23=_0x4a5bd7>Cesium$5[_0x208b22(0x1fe)]['PI']/0xc?_0x4a5bd7/0x2:0x0;let _0x4d1246=Cesium$5['Math']['clampToLatitudeRange'](_0xfe8b87-_0x1cbd23),_0x658959=Cesium$5['Math']['clampToLatitudeRange'](_0x3c356f+_0x1cbd23);return _0x4d1246<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x4d1246=-Cesium$5['Math']['PI_OVER_TWO']),_0x658959>Cesium$5[_0x208b22(0x1fe)][_0x208b22(0x26d)]&&(_0x658959=Cesium$5['Math']['PI_OVER_TWO']),_0xf422a4['lat']={'min':Cesium$5[_0x208b22(0x1fe)][_0x208b22(0x211)](_0x4d1246),'max':Cesium$5['Math']['toDegrees'](_0x658959)},_0xf422a4;};return{'getFullscreenQuad':_0xd700ae,'createTexture':_0x278d73,'createFramebuffer':_0x4e1ffb,'createRawRenderState':_0x5c79af,'viewRectangleToLonLatRange':_0x1ef406};}());function _0x27a6(_0xda849d,_0x51d576){const _0x4163f6=_0x4163();return _0x27a6=function(_0x27a6de,_0xf70677){_0x27a6de=_0x27a6de-0x1c1;let _0x5ec50b=_0x4163f6[_0x27a6de];return _0x5ec50b;},_0x27a6(_0xda849d,_0x51d576);}var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x5d5ddd,_0x471570,_0xe24926,_0x1e746c,_0x22d5aa){const _0x6d93dd=_0x27a6;this['createRenderingTextures'](_0x5d5ddd,_0x471570,_0xe24926['colors']),this[_0x6d93dd(0x22a)](_0x5d5ddd),this['createRenderingPrimitives'](_0x5d5ddd,_0xe24926,_0x1e746c,_0x22d5aa);}['createRenderingTextures'](_0x54d92c,_0xeb8970,_0x15a29b){const _0x24081e=_0x27a6,_0x3db916={'context':_0x54d92c,'width':_0x54d92c['drawingBufferWidth'],'height':_0x54d92c['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x24c417={'context':_0x54d92c,'width':_0x54d92c['drawingBufferWidth'],'height':_0x54d92c[_0x24081e(0x292)],'pixelFormat':Cesium$4[_0x24081e(0x1e5)][_0x24081e(0x29d)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0xddf974=_0x15a29b[_0x24081e(0x1e0)],_0x2d39d5=new Float32Array(_0xddf974*0x3);for(let _0x4415e4=0x0;_0x4415e4<_0xddf974;_0x4415e4++){const _0x13618f=Cesium$4['Color'][_0x24081e(0x259)](_0x15a29b[_0x4415e4]);_0x2d39d5[0x3*_0x4415e4]=_0x13618f['red'],_0x2d39d5[0x3*_0x4415e4+0x1]=_0x13618f['green'],_0x2d39d5[0x3*_0x4415e4+0x2]=_0x13618f[_0x24081e(0x240)];}const _0x292a9={'context':_0x54d92c,'width':_0xddf974,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0x24081e(0x28a)][_0x24081e(0x206)],'magnificationFilter':Cesium$4['TextureMagnificationFilter'][_0x24081e(0x206)]})};this['textures']={'segmentsColor':Util[_0x24081e(0x275)](_0x3db916),'segmentsDepth':Util[_0x24081e(0x275)](_0x24c417),'currentTrailsColor':Util['createTexture'](_0x3db916),'currentTrailsDepth':Util[_0x24081e(0x275)](_0x24c417),'nextTrailsColor':Util['createTexture'](_0x3db916),'nextTrailsDepth':Util['createTexture'](_0x24c417),'colorTable':Util['createTexture'](_0x292a9,_0x2d39d5)};}['createRenderingFramebuffers'](_0xbf80ad){const _0xdf213=_0x27a6;this[_0xdf213(0x1fd)]={'segments':Util['createFramebuffer'](_0xbf80ad,this['textures'][_0xdf213(0x25e)],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0xbf80ad,this['textures'][_0xdf213(0x269)],this['textures'][_0xdf213(0x257)]),'nextTrails':Util[_0xdf213(0x27a)](_0xbf80ad,this['textures']['nextTrailsColor'],this[_0xdf213(0x266)]['nextTrailsDepth'])};}[_0x2e45ab(0x1fa)](_0x429288){const _0x6bc2c7=_0x2e45ab,_0xbb25ab=0x4;let _0x52951e=[];for(let _0x205a88=0x0;_0x205a88<_0x429288['particlesTextureSize'];_0x205a88++){for(let _0x3855c6=0x0;_0x3855c6<_0x429288[_0x6bc2c7(0x202)];_0x3855c6++){for(let _0x4b0d7b=0x0;_0x4b0d7b<_0xbb25ab;_0x4b0d7b++){_0x52951e['push'](_0x205a88/_0x429288['particlesTextureSize']),_0x52951e[_0x6bc2c7(0x1ea)](_0x3855c6/_0x429288[_0x6bc2c7(0x202)]);}}}_0x52951e=new Float32Array(_0x52951e);let _0x20262e=[];const _0x34da7c=[-0x1,0x1],_0x537076=[-0x1,0x1];for(let _0x12b095=0x0;_0x12b095<_0x429288[_0x6bc2c7(0x1e1)];_0x12b095++){for(let _0x5b9dfe=0x0;_0x5b9dfe<_0xbb25ab/0x2;_0x5b9dfe++){for(let _0x5185bb=0x0;_0x5185bb<_0xbb25ab/0x2;_0x5185bb++){_0x20262e['push'](_0x34da7c[_0x5b9dfe]),_0x20262e['push'](_0x537076[_0x5185bb]),_0x20262e[_0x6bc2c7(0x1ea)](0x0);}}}_0x20262e=new Float32Array(_0x20262e);const _0x2a560b=0x6*_0x429288['maxParticles'],_0x4fb53a=new Uint32Array(_0x2a560b);for(let _0x2b2343=0x0,_0x451421=0x0,_0x561064=0x0;_0x2b2343<_0x429288['maxParticles'];_0x2b2343++){_0x4fb53a[_0x451421++]=_0x561064+0x0,_0x4fb53a[_0x451421++]=_0x561064+0x1,_0x4fb53a[_0x451421++]=_0x561064+0x2,_0x4fb53a[_0x451421++]=_0x561064+0x2,_0x4fb53a[_0x451421++]=_0x561064+0x1,_0x4fb53a[_0x451421++]=_0x561064+0x3,_0x561064+=0x4;}const _0x5bba54=new Cesium$4['Geometry']({'attributes':new Cesium$4[(_0x6bc2c7(0x278))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x52951e}),'normal':new Cesium$4[(_0x6bc2c7(0x234))]({'componentDatatype':Cesium$4['ComponentDatatype'][_0x6bc2c7(0x1f9)],'componentsPerAttribute':0x3,'values':_0x20262e})}),'indices':_0x4fb53a});return _0x5bba54;}[_0x2e45ab(0x23c)](_0xd64477,_0x184fea,_0x2c9c9e,_0x300758){const _0xb7c70d=_0x2e45ab,_0x37d2f0=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0xb7c70d(0x1fa)](_0x184fea),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x300758['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x436a0a=_0xb7c70d;return _0x300758[_0x436a0a(0x284)]['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x300758['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){return _0x37d2f0['textures']['colorTable'];},'aspect':function(){return _0xd64477['drawingBufferWidth']/_0xd64477['drawingBufferHeight'];},'pixelSize':function(){return _0x2c9c9e['pixelSize'];},'lineWidth':function(){const _0x51bc4b=_0xb7c70d;return _0x184fea[_0x51bc4b(0x248)];},'particleHeight':function(){const _0x2369d7=_0xb7c70d;return _0x184fea[_0x2369d7(0x253)];}},'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'][_0xb7c70d(0x21a)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0xb7c70d(0x22b)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0x37d2f0['textures']['segmentsColor'];},'segmentsDepthTexture':function(){return _0x37d2f0['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0x19038f=_0xb7c70d;return _0x37d2f0['framebuffers'][_0x19038f(0x1d2)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x321940=_0xb7c70d;return _0x37d2f0[_0x321940(0x1fd)]['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0x184fea['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0xb7c70d(0x1da)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0xb7c70d(0x1fc))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0xb7c70d(0x1d9)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0xb7c70d(0x1fd)]['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x36b6ed=_0xb7c70d,_0x37815e=_0x37d2f0['framebuffers'][_0x36b6ed(0x1d2)];_0x37d2f0['framebuffers'][_0x36b6ed(0x1d2)]=_0x37d2f0['framebuffers']['nextTrails'],_0x37d2f0['framebuffers']['nextTrails']=_0x37815e,_0x37d2f0[_0x36b6ed(0x241)]['trails']['commandToExecute']['framebuffer']=_0x37d2f0['framebuffers']['nextTrails'],_0x37d2f0['primitives']['trails']['clearCommand']['framebuffer']=_0x37d2f0['framebuffers'][_0x36b6ed(0x249)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x38bd3a=_0xb7c70d;return _0x37d2f0['framebuffers'][_0x38bd3a(0x249)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x37d2f0['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0xb7c70d(0x281)]({'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=_0x2e45ab(0x265),updatePosition_frag=_0x2e45ab(0x21b),postProcessingPosition_frag=_0x2e45ab(0x217),postProcessingSpeed_frag=_0x2e45ab(0x293);const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x4ea218,_0x3d1efc,_0x4512cb,_0x8d37d3){const _0x5f4560=_0x2e45ab;this['data']=_0x3d1efc,this[_0x5f4560(0x20b)](_0x4ea218,_0x3d1efc),this['createParticlesTextures'](_0x4ea218,_0x4512cb,_0x8d37d3),this['createComputingPrimitives'](_0x3d1efc,_0x4512cb,_0x8d37d3);}['createWindTextures'](_0x31e469,_0x45e933){const _0x3b5194=_0x2e45ab,_0x17a180={'context':_0x31e469,'width':_0x45e933[_0x3b5194(0x26e)][_0x3b5194(0x200)],'height':_0x45e933['dimensions'][_0x3b5194(0x29b)]*(_0x45e933['dimensions']['lev']||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0x3b5194(0x1c8)]['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util[_0x3b5194(0x275)](_0x17a180,_0x45e933['U']['array']),'V':Util[_0x3b5194(0x275)](_0x17a180,_0x45e933['V'][_0x3b5194(0x214)])};}['createParticlesTextures'](_0x2536b6,_0x35e23b,_0x892bd0){const _0x137de0=_0x2e45ab,_0x7fff5e={'context':_0x2536b6,'width':_0x35e23b['particlesTextureSize'],'height':_0x35e23b['particlesTextureSize'],'pixelFormat':Cesium$3[_0x137de0(0x1e5)]['RGBA'],'pixelDatatype':Cesium$3[_0x137de0(0x1c8)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x137de0(0x271))]({'minificationFilter':Cesium$3[_0x137de0(0x28a)]['NEAREST'],'magnificationFilter':Cesium$3[_0x137de0(0x2a5)][_0x137de0(0x25f)]})},_0x29760c=this['randomizeParticles'](_0x35e23b['maxParticles'],_0x892bd0),_0x2ff53d=new Float32Array(0x4*_0x35e23b[_0x137de0(0x1e1)])[_0x137de0(0x21f)](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x7fff5e),'currentParticlesPosition':Util['createTexture'](_0x7fff5e,_0x29760c),'nextParticlesPosition':Util[_0x137de0(0x275)](_0x7fff5e,_0x29760c),'currentParticlesSpeed':Util[_0x137de0(0x275)](_0x7fff5e,_0x2ff53d),'nextParticlesSpeed':Util[_0x137de0(0x275)](_0x7fff5e,_0x2ff53d),'postProcessingPosition':Util['createTexture'](_0x7fff5e,_0x29760c),'postProcessingSpeed':Util['createTexture'](_0x7fff5e,_0x2ff53d)};}[_0x2e45ab(0x287)](_0x3318fb,_0x51135a){const _0x59eecb=_0x2e45ab,_0x20d5d5=new Float32Array(0x4*_0x3318fb);for(let _0x278378=0x0;_0x278378<_0x3318fb;_0x278378++){_0x20d5d5[0x4*_0x278378]=Cesium$3['Math'][_0x59eecb(0x220)](_0x51135a['lonRange']['x'],_0x51135a[_0x59eecb(0x207)]['y']),_0x20d5d5[0x4*_0x278378+0x1]=Cesium$3[_0x59eecb(0x1fe)]['randomBetween'](_0x51135a[_0x59eecb(0x262)]['x'],_0x51135a['latRange']['y']),_0x20d5d5[0x4*_0x278378+0x2]=Cesium$3['Math']['randomBetween'](this[_0x59eecb(0x1e2)]['lev']['min'],this[_0x59eecb(0x1e2)]['lev'][_0x59eecb(0x203)]),_0x20d5d5[0x4*_0x278378+0x3]=0x0;}return _0x20d5d5;}['destroyParticlesTextures'](){const _0x183060=_0x2e45ab;Object[_0x183060(0x263)](this[_0x183060(0x284)])['forEach'](_0x1429a7=>{this['particlesTextures'][_0x1429a7]['destroy']();});}['createComputingPrimitives'](_0x349792,_0x460875,_0x488c8a){const _0x51739c=_0x2e45ab,_0x247115=new Cesium$3['Cartesian3'](_0x349792[_0x51739c(0x26e)]['lon'],_0x349792['dimensions']['lat'],_0x349792[_0x51739c(0x26e)][_0x51739c(0x215)]),_0x507841=new Cesium$3['Cartesian3'](_0x349792['lon']['min'],_0x349792[_0x51739c(0x29b)]['min'],_0x349792[_0x51739c(0x215)]['min']),_0x5af50c=new Cesium$3['Cartesian3'](_0x349792[_0x51739c(0x200)]['max'],_0x349792['lat']['max'],_0x349792['lev']['max']),_0x5890d5=new Cesium$3['Cartesian3']((_0x5af50c['x']-_0x507841['x'])/(_0x247115['x']-0x1),(_0x5af50c['y']-_0x507841['y'])/(_0x247115['y']-0x1),_0x247115['z']>0x1?(_0x5af50c['z']-_0x507841['z'])/(_0x247115['z']-0x1):0x1),_0x71d518=new Cesium$3['Cartesian2'](_0x349792['U'][_0x51739c(0x26c)],_0x349792['U']['max']),_0x72e474=new Cesium$3['Cartesian2'](_0x349792['V']['min'],_0x349792['V']['max']),_0x5c4c5f=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){const _0x34678c=_0x51739c;return _0x5c4c5f[_0x34678c(0x1cc)]['U'];},'V':function(){return _0x5c4c5f['windTextures']['V'];},'currentParticlesPosition':function(){const _0x39ac9b=_0x51739c;return _0x5c4c5f[_0x39ac9b(0x284)]['currentParticlesPosition'];},'dimension':function(){return _0x247115;},'minimum':function(){return _0x507841;},'maximum':function(){return _0x5af50c;},'interval':function(){return _0x5890d5;}},'fragmentShaderSource':new Cesium$3[(_0x51739c(0x1fc))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x36a96b=_0x51739c;_0x5c4c5f['primitives']['getWind']['commandToExecute']['outputTexture']=_0x5c4c5f['particlesTextures'][_0x36a96b(0x28c)];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x1543a7=_0x51739c;return _0x5c4c5f['particlesTextures'][_0x1543a7(0x1d4)];},'particlesWind':function(){return _0x5c4c5f['particlesTextures']['particlesWind'];},'uSpeedRange':function(){return _0x71d518;},'vSpeedRange':function(){return _0x72e474;},'pixelSize':function(){return _0x488c8a['pixelSize'];},'speedFactor':function(){return _0x460875['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x40a83a=_0x51739c,_0x2f578b=_0x5c4c5f['particlesTextures']['currentParticlesSpeed'];_0x5c4c5f['particlesTextures']['currentParticlesSpeed']=_0x5c4c5f[_0x40a83a(0x284)]['postProcessingSpeed'],_0x5c4c5f['particlesTextures']['postProcessingSpeed']=_0x2f578b,_0x5c4c5f['primitives']['updateSpeed']['commandToExecute'][_0x40a83a(0x254)]=_0x5c4c5f['particlesTextures'][_0x40a83a(0x2a3)];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x2763e1=_0x51739c;return _0x5c4c5f[_0x2763e1(0x284)]['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x2cbbbc=_0x51739c;return _0x5c4c5f['particlesTextures'][_0x2cbbbc(0x1d4)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x51739c(0x284)]['nextParticlesPosition'],'preExecute':function(){const _0x5b3e3b=_0x51739c,_0x534b15=_0x5c4c5f[_0x5b3e3b(0x284)]['currentParticlesPosition'];_0x5c4c5f['particlesTextures']['currentParticlesPosition']=_0x5c4c5f['particlesTextures']['postProcessingPosition'],_0x5c4c5f['particlesTextures'][_0x5b3e3b(0x270)]=_0x534b15,_0x5c4c5f[_0x5b3e3b(0x241)][_0x5b3e3b(0x226)]['commandToExecute']['outputTexture']=_0x5c4c5f[_0x5b3e3b(0x284)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x51739c(0x232),'uniformMap':{'nextParticlesPosition':function(){return _0x5c4c5f['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x5c4c5f['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x488c8a['lonRange'];},'latRange':function(){return _0x488c8a['latRange'];},'randomCoefficient':function(){const _0x57909d=_0x51739c,_0x3d3bd7=Math[_0x57909d(0x273)]();return _0x3d3bd7;},'dropRate':function(){return _0x460875['dropRate'];},'dropRateBump':function(){return _0x460875['dropRateBump'];}},'fragmentShaderSource':new Cesium$3[(_0x51739c(0x1fc))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){const _0x325951=_0x51739c;_0x5c4c5f[_0x325951(0x241)]['postProcessingPosition']['commandToExecute'][_0x325951(0x254)]=_0x5c4c5f['particlesTextures'][_0x325951(0x270)];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x5c4c5f['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x5c4c5f['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this[_0x51739c(0x284)]['postProcessingSpeed'],'preExecute':function(){const _0x874052=_0x51739c;_0x5c4c5f['primitives']['postProcessingSpeed'][_0x874052(0x1ff)]['outputTexture']=_0x5c4c5f['particlesTextures'][_0x874052(0x1cb)];}})};}}const Cesium$2=mars3d__namespace[_0x2e45ab(0x1c1)];class ParticleSystem{constructor(_0x2781f6,_0x292794,_0x1cc75f,_0x253293){const _0x583733=_0x2e45ab;this['context']=_0x2781f6,_0x292794={..._0x292794},_0x292794['udata']&&_0x292794[_0x583733(0x1f3)]&&(_0x292794['dimensions']={},_0x292794[_0x583733(0x26e)][_0x583733(0x200)]=_0x292794['cols'],_0x292794[_0x583733(0x26e)]['lat']=_0x292794['rows'],_0x292794['dimensions'][_0x583733(0x215)]=_0x292794['lev']||0x1,_0x292794['lon']={},_0x292794['lon']['min']=_0x292794['xmin'],_0x292794[_0x583733(0x200)][_0x583733(0x203)]=_0x292794['xmax'],_0x292794['lat']={},_0x292794['lat'][_0x583733(0x26c)]=_0x292794['ymin'],_0x292794[_0x583733(0x29b)]['max']=_0x292794['ymax'],_0x292794[_0x583733(0x215)]={},_0x292794['lev']['min']=_0x292794['levmin']??0x1,_0x292794['lev'][_0x583733(0x203)]=_0x292794['levmax']??0x1,_0x292794['U']={},_0x292794['U']['array']=new Float32Array(_0x292794['udata']),_0x292794['U']['min']=_0x292794['umin']??Math['min'](..._0x292794['udata']),_0x292794['U'][_0x583733(0x203)]=_0x292794['umax']??Math['max'](..._0x292794['udata']),_0x292794['V']={},_0x292794['V']['array']=new Float32Array(_0x292794['vdata']),_0x292794['V'][_0x583733(0x26c)]=_0x292794['vmin']??Math[_0x583733(0x26c)](..._0x292794['vdata']),_0x292794['V'][_0x583733(0x203)]=_0x292794['vmax']??Math['max'](..._0x292794['vdata'])),this[_0x583733(0x1e2)]=_0x292794,this['options']=_0x1cc75f,this['viewerParameters']=_0x253293,this['particlesComputing']=new ParticlesComputing(this[_0x583733(0x23e)],this['data'],this['options'],this['viewerParameters']),this[_0x583733(0x233)]=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x583733(0x298)]);}[_0x2e45ab(0x25c)](_0x455097){const _0x3c0fed=_0x2e45ab;this['particlesComputing']['destroyParticlesTextures'](),Object[_0x3c0fed(0x263)](this['particlesComputing'][_0x3c0fed(0x1cc)])['forEach'](_0x4c316c=>{const _0x37f291=_0x3c0fed;this['particlesComputing']['windTextures'][_0x4c316c][_0x37f291(0x1fb)]();}),this[_0x3c0fed(0x233)]['textures'][_0x3c0fed(0x1cf)][_0x3c0fed(0x1fb)](),Object[_0x3c0fed(0x263)](this['particlesRendering']['framebuffers'])[_0x3c0fed(0x1e3)](_0x43f8dc=>{const _0x15df18=_0x3c0fed;this[_0x15df18(0x233)]['framebuffers'][_0x43f8dc][_0x15df18(0x1fb)]();}),this[_0x3c0fed(0x23e)]=_0x455097,this[_0x3c0fed(0x298)]=new ParticlesComputing(this['context'],this['data'],this[_0x3c0fed(0x212)],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this[_0x3c0fed(0x23e)],this['data'],this[_0x3c0fed(0x212)],this['viewerParameters'],this['particlesComputing']);}[_0x2e45ab(0x1f4)](){const _0x321a51=_0x2e45ab,_0x298542=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x321a51(0x264))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0x321a51(0x27f)]['OPAQUE']});Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x345c40=>{const _0x59f203=_0x321a51;_0x298542['framebuffer']=this['particlesRendering']['framebuffers'][_0x345c40],_0x298542['execute'](this[_0x59f203(0x23e)]);});}['refreshParticles'](_0x19750b){const _0x4b3a5d=_0x2e45ab;this[_0x4b3a5d(0x1f4)](),this['particlesComputing']['destroyParticlesTextures'](),this[_0x4b3a5d(0x298)]['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x19750b){const _0x51004e=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives']['segments']['geometry']=_0x51004e;const _0x1885ed=Cesium$2['VertexArray']['fromGeometry']({'context':this['context'],'geometry':_0x51004e,'attributeLocations':this['particlesRendering'][_0x4b3a5d(0x241)]['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});this['particlesRendering']['primitives']['segments']['commandToExecute']['vertexArray']=_0x1885ed;}}['setOptions'](_0x2fc265){const _0x3aeafe=_0x2e45ab;let _0x596d21=![];this[_0x3aeafe(0x212)]['maxParticles']!==_0x2fc265['maxParticles']&&(_0x596d21=!![]),Object['keys'](_0x2fc265)['forEach'](_0x5e6d90=>{this['options'][_0x5e6d90]=_0x2fc265[_0x5e6d90];}),this[_0x3aeafe(0x286)](_0x596d21);}[_0x2e45ab(0x23b)](_0x5b9848){const _0x1f44ef=_0x2e45ab;Object[_0x1f44ef(0x263)](_0x5b9848)['forEach'](_0x3bf009=>{this['viewerParameters'][_0x3bf009]=_0x5b9848[_0x3bf009];}),this['refreshParticles'](![]);}['destroy'](){const _0x979dbc=_0x2e45ab;clearTimeout(this['canrefresh']),this['particlesComputing'][_0x979dbc(0x219)](),Object[_0x979dbc(0x263)](this['particlesComputing']['windTextures'])[_0x979dbc(0x1e3)](_0x2e980f=>{const _0x14aa82=_0x979dbc;this[_0x14aa82(0x298)]['windTextures'][_0x2e980f]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object[_0x979dbc(0x263)](this['particlesRendering'][_0x979dbc(0x1fd)])['forEach'](_0x176b22=>{const _0x36a2f4=_0x979dbc;this[_0x36a2f4(0x233)]['framebuffers'][_0x176b22][_0x36a2f4(0x1fb)]();});for(const _0xe76fe3 in this){delete this[_0xe76fe3];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace[_0x2e45ab(0x2a6)][_0x2e45ab(0x23f)],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(_0xeec1f0={}){_0xeec1f0={...DEF_OPTIONS,..._0xeec1f0},super(_0xeec1f0),this['_setOptionsHook'](_0xeec1f0);}get['layer'](){return this['primitives'];}get['data'](){return this['_data'];}set[_0x2e45ab(0x1e2)](_0x1704f5){this['setData'](_0x1704f5);}get['colors'](){const _0x99a0de=_0x2e45ab;return this[_0x99a0de(0x212)]['colors'];}set['colors'](_0x3b8c20){const _0x279ecc=_0x2e45ab;this['options']['colors']=_0x3b8c20,this[_0x279ecc(0x291)]&&this['particleSystem'][_0x279ecc(0x225)]({'colors':_0x3b8c20}),this[_0x279ecc(0x1e4)]();}[_0x2e45ab(0x22f)](){}[_0x2e45ab(0x245)](){const _0x53f186=_0x2e45ab;this['scene']=this[_0x53f186(0x208)]['scene'],this['camera']=this['_map'][_0x53f186(0x1e8)],this['primitives']=new Cesium$1[(_0x53f186(0x2a2))](),this['_map']['scene']['primitives']['add'](this[_0x53f186(0x241)]),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x53f186(0x27e)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener'](_0x53f186(0x1e4),this[_0x53f186(0x1e4)]['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x53f186(0x29e)],this),this[_0x53f186(0x208)]['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x53f186(0x218)],this[_0x53f186(0x1d5)],this),this[_0x53f186(0x208)]['on'](mars3d__namespace[_0x53f186(0x27c)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x53f186(0x20d)]&&this['setData'](this['_data']);}['_removedHook'](){const _0x369766=_0x2e45ab;window['removeEventListener'](_0x369766(0x1e4),this[_0x369766(0x1e4)]),this['_map']['off'](mars3d__namespace[_0x369766(0x27c)]['preRender'],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x369766(0x239)],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x369766(0x218)],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x369766(0x209)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this[_0x369766(0x208)]['scene']['primitives']['remove'](this['primitives']);}[_0x2e45ab(0x1e4)](){const _0x7d0163=_0x2e45ab;if(!this[_0x7d0163(0x22e)]||!this['particleSystem'])return;this['primitives'][_0x7d0163(0x22e)]=![],this['primitives'][_0x7d0163(0x213)](),this['_map']['once'](mars3d__namespace[_0x7d0163(0x27c)]['preRender'],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x257c84){const _0xb9e45b=_0x2e45ab;this['particleSystem']['canvasResize'](this[_0xb9e45b(0x1f0)]['context']),this['addPrimitives'](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x4ee147){const _0x7068f0=_0x2e45ab;clearTimeout(this['refreshTimer']);if(!this[_0x7068f0(0x22e)]||!this[_0x7068f0(0x291)])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x5ae461){this['mouse_down']=!![];}[_0x2e45ab(0x247)](_0x58ce2f){const _0x5aa589=_0x2e45ab;if(!this['show']||!this[_0x5aa589(0x291)])return;this[_0x5aa589(0x1c4)]&&(this['primitives']['show']=![],this[_0x5aa589(0x296)]=!![]);}['_onMouseUpEvent'](_0x6d35cc){if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0xf3278a){const _0x34a596=_0x2e45ab;this['_data']=_0xf3278a,this['particleSystem']&&this[_0x34a596(0x291)][_0x34a596(0x1fb)](),this['particleSystem']=new ParticleSystem(this['scene'][_0x34a596(0x23e)],_0xf3278a,this['getOptions'](),this[_0x34a596(0x2a8)]),this['addPrimitives']();}['_setOptionsHook'](_0x566d44,_0x2dbae8){if(_0x566d44)for(const _0x308af3 in _0x566d44){this[_0x308af3]=_0x566d44[_0x308af3];}this['particleSystem']&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x59c68f=_0x2e45ab,_0x2fffa1=Math[_0x59c68f(0x268)](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x2fffa1*_0x2fffa1,{'particlesTextureSize':_0x2fffa1,'maxParticles':this[_0x59c68f(0x1d0)],'particleHeight':this[_0x59c68f(0x1f8)],'fadeOpacity':this[_0x59c68f(0x28f)],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this[_0x59c68f(0x1f1)]};}['addPrimitives'](){const _0x3b58ed=_0x2e45ab;this['primitives'][_0x3b58ed(0x27b)](this[_0x3b58ed(0x291)]['particlesComputing']['primitives'][_0x3b58ed(0x20a)]),this['primitives']['add'](this['particleSystem'][_0x3b58ed(0x298)]['primitives'][_0x3b58ed(0x228)]),this[_0x3b58ed(0x241)][_0x3b58ed(0x27b)](this[_0x3b58ed(0x291)]['particlesComputing'][_0x3b58ed(0x241)]['updatePosition']),this['primitives'][_0x3b58ed(0x27b)](this['particleSystem']['particlesComputing'][_0x3b58ed(0x241)]['postProcessingPosition']),this[_0x3b58ed(0x241)][_0x3b58ed(0x27b)](this[_0x3b58ed(0x291)]['particlesComputing']['primitives'][_0x3b58ed(0x1cb)]),this['primitives']['add'](this[_0x3b58ed(0x291)][_0x3b58ed(0x233)]['primitives']['segments']),this[_0x3b58ed(0x241)]['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this['primitives'][_0x3b58ed(0x27b)](this['particleSystem']['particlesRendering']['primitives']['screen']);}[_0x2e45ab(0x24f)](){const _0x2af1c5=_0x2e45ab;let _0x32fe11=this[_0x2af1c5(0x1e8)]['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x32fe11){const _0x57534a=this['_map']['getExtent']();_0x32fe11=Cesium$1[_0x2af1c5(0x29c)]['fromDegrees'](_0x57534a['xmin'],_0x57534a['ymin'],_0x57534a[_0x2af1c5(0x1d6)],_0x57534a['ymax']);}const _0x7fefe5=Util[_0x2af1c5(0x28d)](_0x32fe11);this['viewerParameters']['lonRange']['x']=_0x7fefe5[_0x2af1c5(0x200)][_0x2af1c5(0x26c)],this['viewerParameters']['lonRange']['y']=_0x7fefe5[_0x2af1c5(0x200)]['max'],this['viewerParameters']['latRange']['x']=_0x7fefe5['lat']['min'],this['viewerParameters']['latRange']['y']=_0x7fefe5['lat']['max'];const _0x5e0a83=this['camera'][_0x2af1c5(0x26f)](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x5e0a83>0x0&&(this[_0x2af1c5(0x2a8)]['pixelSize']=_0x5e0a83);}}mars3d__namespace[_0x2e45ab(0x255)]['register']('wind',WindLayer),mars3d__namespace[_0x2e45ab(0x2a6)][_0x2e45ab(0x261)]=WindLayer;class CanvasParticle{constructor(){const _0x3fa6c8=_0x2e45ab;this[_0x3fa6c8(0x283)]=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null;}['destroy'](){for(const _0x3fef1f in this){delete this[_0x3fef1f];}}}class CanvasWindField{constructor(_0x36fe85){const _0x4fea6e=_0x2e45ab;this[_0x4fea6e(0x225)](_0x36fe85);}get['speedRate'](){const _0x120818=_0x2e45ab;return this[_0x120818(0x1dc)];}set[_0x2e45ab(0x28b)](_0x29a8da){const _0x407394=_0x2e45ab;this[_0x407394(0x1dc)]=(0x64-(_0x29a8da>0x63?0x63:_0x29a8da))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x407394(0x1c5)])/this[_0x407394(0x1dc)],(this['ymax']-this[_0x407394(0x235)])/this['_speedRate']];}get[_0x2e45ab(0x1e9)](){const _0x1f4dbd=_0x2e45ab;return this[_0x1f4dbd(0x1ee)];}set[_0x2e45ab(0x1e9)](_0x39c74c){this['_maxAge']=_0x39c74c;}[_0x2e45ab(0x225)](_0x25be84){const _0x42dcf4=_0x2e45ab;this['options']=_0x25be84,this['maxAge']=_0x25be84['maxAge']||0x78,this['speedRate']=_0x25be84['speedRate']||0x32,this['particles']=[];const _0x4f1077=_0x25be84[_0x42dcf4(0x1d0)]||0x1000;for(let _0xb40b0f=0x0;_0xb40b0f<_0x4f1077;_0xb40b0f++){const _0x482fcd=this['_randomParticle'](new CanvasParticle());this[_0x42dcf4(0x22c)]['push'](_0x482fcd);}}['setDate'](_0x40ebbe){const _0x4a2e41=_0x2e45ab;this[_0x4a2e41(0x20c)]=_0x40ebbe['rows'],this['cols']=_0x40ebbe['cols'],this[_0x4a2e41(0x1c5)]=_0x40ebbe[_0x4a2e41(0x1c5)],this['xmax']=_0x40ebbe['xmax'],this[_0x4a2e41(0x235)]=_0x40ebbe['ymin'],this['ymax']=_0x40ebbe[_0x4a2e41(0x22d)],this['grid']=[];const _0x1b2587=_0x40ebbe[_0x4a2e41(0x25b)],_0x15c99c=_0x40ebbe['vdata'];let _0x25f2d0=![];_0x1b2587[_0x4a2e41(0x1e0)]===this[_0x4a2e41(0x20c)]&&_0x1b2587[0x0]['length']===this['cols']&&(_0x25f2d0=!![]);let _0xe725b3=0x0,_0x921a74=null,_0x5da40f=null;for(let _0x6ac34e=0x0;_0x6ac34e<this[_0x4a2e41(0x20c)];_0x6ac34e++){_0x921a74=[];for(let _0x3de1a3=0x0;_0x3de1a3<this['cols'];_0x3de1a3++,_0xe725b3++){_0x25f2d0?_0x5da40f=this['_calcUV'](_0x1b2587[_0x6ac34e][_0x3de1a3],_0x15c99c[_0x6ac34e][_0x3de1a3]):_0x5da40f=this['_calcUV'](_0x1b2587[_0xe725b3],_0x15c99c[_0xe725b3]),_0x921a74['push'](_0x5da40f);}this[_0x4a2e41(0x1d1)]['push'](_0x921a74);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0xd62b48=_0x2e45ab;delete this['rows'],delete this['cols'],delete this[_0xd62b48(0x1c5)],delete this[_0xd62b48(0x1d6)],delete this['ymin'],delete this['ymax'],delete this[_0xd62b48(0x1d1)],delete this[_0xd62b48(0x22c)];}['toGridXY'](_0x5969a5,_0x36e8af){const _0x578089=_0x2e45ab,_0x5a17b7=(_0x5969a5-this[_0x578089(0x1c5)])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x394f6b=(this[_0x578089(0x22d)]-_0x36e8af)/(this['ymax']-this['ymin'])*(this['rows']-0x1);return[_0x5a17b7,_0x394f6b];}['getUVByXY'](_0x1b631c,_0x6a6458){const _0x3cb963=_0x2e45ab;if(_0x1b631c<0x0||_0x1b631c>=this[_0x3cb963(0x21d)]||_0x6a6458>=this['rows'])return[0x0,0x0,0x0];const _0x1ad494=Math['floor'](_0x1b631c),_0x1394a1=Math[_0x3cb963(0x294)](_0x6a6458);if(_0x1ad494===_0x1b631c&&_0x1394a1===_0x6a6458)return this['grid'][_0x6a6458][_0x1b631c];const _0x136c05=_0x1ad494+0x1,_0x39b18c=_0x1394a1+0x1,_0x17ffde=this[_0x3cb963(0x238)](_0x1ad494,_0x1394a1),_0x124e91=this['getUVByXY'](_0x136c05,_0x1394a1),_0x26dcb8=this['getUVByXY'](_0x1ad494,_0x39b18c),_0x7c6ed3=this['getUVByXY'](_0x136c05,_0x39b18c);let _0xcc8801=null;try{_0xcc8801=this['_bilinearInterpolation'](_0x1b631c-_0x1ad494,_0x6a6458-_0x1394a1,_0x17ffde,_0x124e91,_0x26dcb8,_0x7c6ed3);}catch(_0x12919d){console['log'](_0x1b631c,_0x6a6458);}return _0xcc8801;}['_bilinearInterpolation'](_0xda6276,_0x2bd895,_0x4d2a53,_0x2c2cc9,_0x4be9db,_0x26a038){const _0x545296=0x1-_0xda6276,_0x2e00a3=0x1-_0x2bd895,_0x24e350=_0x545296*_0x2e00a3,_0x26dcaa=_0xda6276*_0x2e00a3,_0x5b912f=_0x545296*_0x2bd895,_0x3eb8db=_0xda6276*_0x2bd895,_0x495375=_0x4d2a53[0x0]*_0x24e350+_0x2c2cc9[0x0]*_0x26dcaa+_0x4be9db[0x0]*_0x5b912f+_0x26a038[0x0]*_0x3eb8db,_0x47a630=_0x4d2a53[0x1]*_0x24e350+_0x2c2cc9[0x1]*_0x26dcaa+_0x4be9db[0x1]*_0x5b912f+_0x26a038[0x1]*_0x3eb8db;return this['_calcUV'](_0x495375,_0x47a630);}['_calcUV'](_0x1ff84e,_0x53d003){return[+_0x1ff84e,+_0x53d003,Math['sqrt'](_0x1ff84e*_0x1ff84e+_0x53d003*_0x53d003)];}['getUVByPoint'](_0x346108,_0x3c07cf){const _0x185333=_0x2e45ab;if(!this[_0x185333(0x237)](_0x346108,_0x3c07cf))return null;const _0xc1f551=this[_0x185333(0x230)](_0x346108,_0x3c07cf),_0x273769=this['getUVByXY'](_0xc1f551[0x0],_0xc1f551[0x1]);return _0x273769;}['isInExtent'](_0x5c0c28,_0x2e3823){const _0x3b82c8=_0x2e45ab;return _0x5c0c28>=this['xmin']&&_0x5c0c28<=this['xmax']&&_0x2e3823>=this['ymin']&&_0x2e3823<=this[_0x3b82c8(0x22d)]?!![]:![];}['getRandomLatLng'](){const _0x3dce26=_0x2e45ab,_0x35787f=fRandomByfloat(this[_0x3dce26(0x1c5)],this['xmax']),_0x356973=fRandomByfloat(this['ymin'],this[_0x3dce26(0x22d)]);return{'lat':_0x356973,'lng':_0x35787f};}['getParticles'](){const _0x4cfde3=_0x2e45ab;let _0x2e9000,_0xd0d3e,_0x4d1502;for(let _0x4f2662=0x0,_0x59a261=this[_0x4cfde3(0x22c)]['length'];_0x4f2662<_0x59a261;_0x4f2662++){let _0x486373=this['particles'][_0x4f2662];_0x486373['age']<=0x0&&(_0x486373=this[_0x4cfde3(0x297)](_0x486373));if(_0x486373[_0x4cfde3(0x1d3)]>0x0){const _0x361aa1=_0x486373['tlng'],_0x4dde3f=_0x486373['tlat'];_0x4d1502=this['getUVByPoint'](_0x361aa1,_0x4dde3f),_0x4d1502?(_0x2e9000=_0x361aa1+this['_calc_speedRate'][0x0]*_0x4d1502[0x0],_0xd0d3e=_0x4dde3f+this[_0x4cfde3(0x267)][0x1]*_0x4d1502[0x1],_0x486373['lng']=_0x361aa1,_0x486373['lat']=_0x4dde3f,_0x486373[_0x4cfde3(0x272)]=_0x2e9000,_0x486373['tlat']=_0xd0d3e,_0x486373['age']--):_0x486373['age']=0x0;}}return this[_0x4cfde3(0x22c)];}['_randomParticle'](_0x55c79f){const _0x16f210=_0x2e45ab;let _0x12fb23,_0x244ac2;for(let _0x3f184c=0x0;_0x3f184c<0x1e;_0x3f184c++){_0x12fb23=this['getRandomLatLng'](),_0x244ac2=this['getUVByPoint'](_0x12fb23['lng'],_0x12fb23[_0x16f210(0x29b)]);if(_0x244ac2&&_0x244ac2[0x2]>0x0)break;}if(!_0x244ac2)return _0x55c79f;const _0x9fb3aa=_0x12fb23['lng']+this['_calc_speedRate'][0x0]*_0x244ac2[0x0],_0x5e64bc=_0x12fb23['lat']+this['_calc_speedRate'][0x1]*_0x244ac2[0x1];return _0x55c79f['lng']=_0x12fb23['lng'],_0x55c79f[_0x16f210(0x29b)]=_0x12fb23['lat'],_0x55c79f['tlng']=_0x9fb3aa,_0x55c79f['tlat']=_0x5e64bc,_0x55c79f[_0x16f210(0x1d3)]=Math[_0x16f210(0x1d7)](Math['random']()*this[_0x16f210(0x1e9)]),_0x55c79f;}['destroy'](){for(const _0x1bcce1 in this){delete this[_0x1bcce1];}}}function fRandomByfloat(_0x15a868,_0xee9357){const _0x50b3bc=_0x2e45ab;return _0x15a868+Math[_0x50b3bc(0x273)]()*(_0xee9357-_0x15a868);}const Cesium=mars3d__namespace[_0x2e45ab(0x1c1)],BaseLayer=mars3d__namespace[_0x2e45ab(0x2a6)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x37e573={}){super(_0x37e573),this['_setOptionsHook'](_0x37e573),this['canvas']=null;}[_0x2e45ab(0x1cd)](_0x306fb,_0x5fcf47){const _0x565d10=_0x2e45ab;this['frameTime']=0x3e8/(_0x306fb[_0x565d10(0x246)]||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x306fb['color']||'#ffffff',this['lineWidth']=_0x306fb['lineWidth']||0x1,this['fixedHeight']=_0x306fb[_0x565d10(0x1f8)]??0x0,this['reverseY']=_0x306fb['reverseY']??![],this['windField']&&this[_0x565d10(0x250)]['setOptions'](_0x306fb);}get['layer'](){return this['canvas'];}get[_0x2e45ab(0x26b)](){const _0x4ad59a=_0x2e45ab;return this['_map'][_0x4ad59a(0x1f0)][_0x4ad59a(0x227)]['clientWidth'];}get['canvasHeight'](){const _0x1776f2=_0x2e45ab;return this['_map']['scene']['canvas'][_0x1776f2(0x24b)];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0x2e45ab(0x1e7)](_0x2586e3){const _0x1130dc=_0x2e45ab;this['_pointerEvents']=_0x2586e3;if(!this['canvas'])return;_0x2586e3?this['canvas'][_0x1130dc(0x29a)]['pointer-events']=_0x1130dc(0x205):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set[_0x2e45ab(0x1d0)](_0x3414ac){const _0x7cd22f=_0x2e45ab;this['options'][_0x7cd22f(0x1d0)]=_0x3414ac,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set[_0x2e45ab(0x28b)](_0x2e833c){this['options']['speedRate']=_0x2e833c,this['windField']&&(this['windField']['speedRate']=_0x2e833c);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x408888){const _0x576f1d=_0x2e45ab;this['options']['maxAge']=_0x408888,this['windField']&&(this[_0x576f1d(0x250)]['maxAge']=_0x408888);}get[_0x2e45ab(0x1e2)](){return this['windData'];}set['data'](_0x5f2c36){this['setData'](_0x5f2c36);}['_showHook'](_0x12c41e){const _0x4d7a62=_0x2e45ab;_0x12c41e?this['_addedHook']():(this[_0x4d7a62(0x1ed)]&&(this[_0x4d7a62(0x212)]['data']=this['windData']),this['_removedHook']());}['_mountedHook'](){this['options']['worker']?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x53c1c4=_0x2e45ab;this['canvas']=this['_createCanvas'](),this[_0x53c1c4(0x289)]=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x53c1c4(0x29f)](),this['options']['data']&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x5d22e2=_0x2e45ab;this[_0x5d22e2(0x282)](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this[_0x5d22e2(0x227)]);}['_createCanvas'](){const _0x24efd7=_0x2e45ab,_0x282fc1=mars3d__namespace[_0x24efd7(0x2a7)][_0x24efd7(0x20e)]('canvas','mars3d-canvasWind',this[_0x24efd7(0x208)]['container']);return _0x282fc1['style']['position']='absolute',_0x282fc1['style']['top']='0px',_0x282fc1['style'][_0x24efd7(0x260)]='0px',_0x282fc1['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x282fc1['style']['height']=this['_map']['scene']['canvas'][_0x24efd7(0x24b)]+'px',_0x282fc1['style']['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x282fc1['style']['zIndex']=this['options'][_0x24efd7(0x274)]??0x9,_0x282fc1['width']=this['_map']['scene']['canvas']['clientWidth'],_0x282fc1['height']=this['_map']['scene']['canvas'][_0x24efd7(0x24b)],_0x282fc1;}['resize'](){const _0x2ab2cc=_0x2e45ab;this[_0x2ab2cc(0x227)]&&(this['canvas']['style'][_0x2ab2cc(0x1eb)]=this['_map']['scene'][_0x2ab2cc(0x227)]['clientWidth']+'px',this['canvas']['style'][_0x2ab2cc(0x277)]=this[_0x2ab2cc(0x208)][_0x2ab2cc(0x1f0)]['canvas'][_0x2ab2cc(0x24b)]+'px',this['canvas']['width']=this[_0x2ab2cc(0x208)]['scene']['canvas']['clientWidth'],this[_0x2ab2cc(0x227)][_0x2ab2cc(0x277)]=this['_map'][_0x2ab2cc(0x1f0)][_0x2ab2cc(0x227)][_0x2ab2cc(0x24b)]);}['bindEvent'](){const _0x4850d5=_0x2e45ab,_0x4e4545=this;let _0x15e028=Date['now']();(function _0x238a9d(){const _0x3bd871=_0x27a6;_0x4e4545['animateFrame']=window[_0x3bd871(0x27d)](_0x238a9d);if(_0x4e4545[_0x3bd871(0x22e)]&&_0x4e4545['windField']){const _0x29cb9a=Date[_0x3bd871(0x1ef)](),_0x26af7c=_0x29cb9a-_0x15e028;_0x26af7c>_0x4e4545['frameTime']&&(_0x15e028=_0x29cb9a-_0x26af7c%_0x4e4545[_0x3bd871(0x24d)],_0x4e4545[_0x3bd871(0x2a9)]());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this[_0x4850d5(0x296)]=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x4850d5(0x218)],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x20c1fb=_0x2e45ab;window[_0x20c1fb(0x1ca)](this[_0x20c1fb(0x25a)]),delete this['animateFrame'],window['removeEventListener']('resize',this[_0x20c1fb(0x1e4)]),this[_0x20c1fb(0x212)]['mouseHidden']&&(this['_map'][_0x20c1fb(0x1ec)](mars3d__namespace[_0x20c1fb(0x27c)]['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace[_0x20c1fb(0x27c)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map'][_0x20c1fb(0x1ec)](mars3d__namespace['EventType'][_0x20c1fb(0x218)],this[_0x20c1fb(0x1d5)],this),this[_0x20c1fb(0x208)]['off'](mars3d__namespace['EventType'][_0x20c1fb(0x209)],this['_onMouseMoveEvent'],this));}[_0x2e45ab(0x29e)](_0x183456){const _0x25f4b6=_0x2e45ab;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas']['style'][_0x25f4b6(0x1ce)]='hidden',this['refreshTimer']=setTimeout(()=>{const _0x5adc51=_0x25f4b6;if(!this[_0x5adc51(0x22e)])return;this['redraw'](),this['canvas']['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x2085a5){const _0x5981a5=_0x2e45ab;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace[_0x5981a5(0x27c)]['mouseMove'],this[_0x5981a5(0x247)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x36a465){const _0x1a7ad0=_0x2e45ab;if(!this['show']||!this['canvas'])return;this[_0x1a7ad0(0x1c4)]&&(this['canvas']['style']['visibility']='hidden',this['mouse_move']=!![]);}[_0x2e45ab(0x1d5)](_0xb775c1){const _0x1bef19=_0x2e45ab;if(!this['show']||!this[_0x1bef19(0x227)])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x1bef19(0x1c4)]&&this['mouse_move']&&this['redraw'](),this['canvas']['style'][_0x1bef19(0x1ce)]='visible',this['mouse_down']=![],this[_0x1bef19(0x296)]=![];}['setData'](_0x2c39a0){const _0x825ecf=_0x2e45ab;this['clear'](),this['windData']=_0x2c39a0,this[_0x825ecf(0x250)]['setDate'](_0x2c39a0),this['redraw']();}['redraw'](){const _0x49c880=_0x2e45ab;if(!this['show'])return;this['windField']['setOptions'](this['options']),this[_0x49c880(0x2a9)]();}['update'](){const _0x2b1e6d=_0x2e45ab;if(this['_updateIng'])return;this[_0x2b1e6d(0x256)]=!![];if(this[_0x2b1e6d(0x26a)])this['windField']['update']();else{const _0x345790=this[_0x2b1e6d(0x250)]['getParticles']();this['_drawLines'](_0x345790);}this['_updateIng']=![];}[_0x2e45ab(0x1f5)](_0x1ad245){const _0x57f3c2=_0x2e45ab;this[_0x57f3c2(0x289)]['globalCompositeOperation']=_0x57f3c2(0x25d),this[_0x57f3c2(0x289)]['fillRect'](0x0,0x0,this[_0x57f3c2(0x26b)],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this[_0x57f3c2(0x289)]['globalAlpha']=0.9,this['canvasContext']['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this[_0x57f3c2(0x289)]['strokeStyle']=this[_0x57f3c2(0x21c)];const _0x5bef0f=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x101185=this['canvasWidth']*0.25;for(let _0x2312e4=0x0,_0x4caf41=_0x1ad245['length'];_0x2312e4<_0x4caf41;_0x2312e4++){const _0x58ee04=_0x1ad245[_0x2312e4],_0x579366=this['_tomap'](_0x58ee04['lng'],_0x58ee04[_0x57f3c2(0x29b)],_0x58ee04),_0x27b014=this['_tomap'](_0x58ee04['tlng'],_0x58ee04['tlat'],_0x58ee04);if(!_0x579366||!_0x27b014)continue;if(_0x5bef0f&&Math['abs'](_0x579366[0x0]-_0x27b014[0x0])>=_0x101185)continue;this['canvasContext']['moveTo'](_0x579366[0x0],_0x579366[0x1]),this['canvasContext']['lineTo'](_0x27b014[0x0],_0x27b014[0x1]);}this['canvasContext']['stroke']();}[_0x2e45ab(0x1c2)](_0x2777da,_0x1e26e6,_0x22866b){const _0x35ccad=_0x2e45ab,_0x34ca3d=Cesium['Cartesian3']['fromDegrees'](_0x2777da,_0x1e26e6,this['fixedHeight']),_0x2863e5=this['_map']['scene'];if(_0x2863e5['mode']===Cesium[_0x35ccad(0x258)]['SCENE3D']){const _0x1338f0=new Cesium['EllipsoidalOccluder'](_0x2863e5['globe']['ellipsoid'],_0x2863e5['camera']['positionWC']),_0xbd407a=_0x1338f0[_0x35ccad(0x222)](_0x34ca3d);if(!_0xbd407a)return _0x22866b['age']=0x0,null;}const _0x1fc658=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map'][_0x35ccad(0x1f0)],_0x34ca3d);return _0x1fc658?[_0x1fc658['x'],_0x1fc658['y']]:null;}['clear'](){const _0x1134b8=_0x2e45ab;this['windField'][_0x1134b8(0x282)](),delete this['windData'];}['initWorker'](){this['worker']=new Worker(this['options']['worker']),this['worker']['onmessage']=_0x1b8d01=>{const _0x5d2534=_0x27a6;this['_drawLines'](_0x1b8d01['data'][_0x5d2534(0x22c)]),this[_0x5d2534(0x1c7)]=![];},this['windField']={'init':_0x229220=>{const _0x341fa9=_0x27a6;this['worker']['postMessage']({'type':_0x341fa9(0x2a1),'options':_0x229220});},'setOptions':_0x1273e2=>{this['worker']['postMessage']({'type':'setOptions','options':_0x1273e2});},'setDate':_0x4e295d=>{const _0x2b76ab=_0x27a6;this[_0x2b76ab(0x26a)][_0x2b76ab(0x1c6)]({'type':_0x2b76ab(0x242),'data':_0x4e295d});},'update':()=>{const _0x1f09d3=_0x27a6;if(this[_0x1f09d3(0x1c7)])return;this['_updateIng2']=!![],this[_0x1f09d3(0x26a)]['postMessage']({'type':'update'});},'clear':()=>{const _0x1ebf06=_0x27a6;this['worker']['postMessage']({'type':_0x1ebf06(0x282)});}},this['windField']['init'](this['options']);}}mars3d__namespace[_0x2e45ab(0x255)]['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports[_0x2e45ab(0x210)]=WindUtil,Object[_0x2e45ab(0x252)](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x27cea4=_0x5a1b;(function(_0x4e0a2e,_0x14b88c){const _0x3fa67b=_0x5a1b,_0x40bb9d=_0x4e0a2e();while(!![]){try{const _0x239054=-parseInt(_0x3fa67b(0x1fe))/0x1*(-parseInt(_0x3fa67b(0x231))/0x2)+-parseInt(_0x3fa67b(0x26e))/0x3+parseInt(_0x3fa67b(0x247))/0x4+-parseInt(_0x3fa67b(0x26c))/0x5+parseInt(_0x3fa67b(0x1d6))/0x6*(-parseInt(_0x3fa67b(0x29a))/0x7)+-parseInt(_0x3fa67b(0x279))/0x8*(parseInt(_0x3fa67b(0x250))/0x9)+parseInt(_0x3fa67b(0x27b))/0xa*(parseInt(_0x3fa67b(0x2bf))/0xb);if(_0x239054===_0x14b88c)break;else _0x40bb9d['push'](_0x40bb9d['shift']());}catch(_0x305595){_0x40bb9d['push'](_0x40bb9d['shift']());}}}(_0x4982,0xb8bb4));function _interopNamespace(_0x35d36a){const _0x34f87b=_0x5a1b;if(_0x35d36a&&_0x35d36a[_0x34f87b(0x2c0)])return _0x35d36a;var _0x1a1bd9=Object['create'](null);return _0x35d36a&&Object[_0x34f87b(0x220)](_0x35d36a)['forEach'](function(_0x5cd636){if(_0x5cd636!=='default'){var _0x4a34dc=Object['getOwnPropertyDescriptor'](_0x35d36a,_0x5cd636);Object['defineProperty'](_0x1a1bd9,_0x5cd636,_0x4a34dc['get']?_0x4a34dc:{'enumerable':!![],'get':function(){return _0x35d36a[_0x5cd636];}});}}),_0x1a1bd9['default']=_0x35d36a,_0x1a1bd9;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x203131,_0x440523){const _0x45b96b=_0x203131*Math['cos'](Cesium$7['Math']['toRadians'](_0x440523));return _0x45b96b;}function getV(_0x125e10,_0x30220e){const _0x2a3eaa=_0x5a1b,_0x14f8b2=_0x125e10*Math['sin'](Cesium$7['Math'][_0x2a3eaa(0x203)](_0x30220e));return _0x14f8b2;}function getSpeed(_0x1b729f,_0x3e3c27){const _0x46aa1e=_0x5a1b,_0x41dd3e=Math['sqrt'](Math[_0x46aa1e(0x25e)](_0x1b729f,0x2)+Math[_0x46aa1e(0x25e)](_0x3e3c27,0x2));return _0x41dd3e;}function getDirection(_0x15fb80,_0x1113bf){let _0xdb03c1=Cesium$7['Math']['toDegrees'](Math['atan2'](_0x1113bf,_0x15fb80));return _0xdb03c1+=_0xdb03c1<0x0?0x168:0x0,_0xdb03c1;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];function _0x4982(){const _0x5a4c59=['now','dimensions','windData','destroy','levmax','_updateIng2','143QhbKRx','__esModule','defined','EventType','_tomap','1026RUYMEQ','canvasContext','currentTrails','ellipsoid','OPAQUE','moveTo','segmentsColor','TextureMinificationFilter','isDestroyed','TextureMagnificationFilter','lighter','mars3d-canvasWind','refreshTimer','beginPath','in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a','blending','particles','Compute','createTexture','clear','lev','color','frameTime','maxParticles','vmin','_onMap_preRenderEvent','outputTexture','globalCompositeOperation','ymin','tlat','windTextures','particleSystem','currentParticlesSpeed','primitiveType','_map','_removedHook','postProcessingPosition','wheel','viewerParameters','setDate','2221PLsOHF','getUVByPoint','Geometry','GeometryAttributes','_setOptionsHook','toRadians','mouse_down','Matrix4','style','BufferUsage','destroyParticlesTextures','segments','getColorTexture','container','particleHeight','particlesRendering','GeometryAttribute','_pointerEvents','xmin','lat','show','xmax','getOptions','windField','nextTrails','worker','rawRenderState','auto','mod','stroke','forEach','lineWidth','LayerUtil','Framebuffer','keys','EllipsoidalOccluder','vertexShaderSource','_calcUV','canvas','_canrefresh','removeEventListener','createWindTextures','clientWidth','addEventListener','_maxAge','context','colorTable','vdata','commandType','resize','visible','410OtjnqO','RGBA','max','textures','getDefaultRenderState','clearFramebuffers','data','requestAnimationFrame','green','init','SCENE3D','layer','uniformMap','getUVByXY','hidden','canvasWidth','strokeStyle','LINEAR','_onMapWhellEvent','fromGeometry','remove','add','5187688iBdEeo','particlesComputing','destroyObject','tlng','Color','udata','WindUtil','commandList','STATIC_DRAW','567GdvAwP','_colorRamp','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','_calc_speedRate','globe','Pass','mouse_move','Sampler','PixelFormat','postProcessingSpeed','createRenderingTextures','length','particlesTextures','currentParticlesPosition','pow','options','bind','fixedHeight','fromDegrees','maxAge','framebuffers','redraw','_createCanvas','particlesNumber','geometry','reverseY','NEAREST','random','7300320baTOYd','CanvasWindField','3949821BDXMlG','lng','create','cancelAnimationFrame','speed','Cesium','attributeLocations','preExecute','bindEvent','PixelDatatype','particlesTextureSize','76456EBDANQ','FLOAT','2731240UZHlgs','DepthFunction','_data','commandToExecute','age','0px','array','_drawLines','_onMouseDownEvent','off','_speedRate','latRange','toDegrees','ShaderSource','_onMouseMoveEvent','cols','createFramebuffer','createComputingPrimitives','shaderProgram','TRIANGLES','mouseUp','setOptions','clearCommand','removeAll','fill','fragmentShaderSource','min','SceneTransforms','ymax','pointerEvents','trails','47789PtJOPd','framebuffer','isPointVisible','push','_onMouseUpEvent','width','lon','drawingBufferHeight','createCommand','colors','primitives','vertexArray','Draw','postMessage','rows','lonRange','getColor','fromCache','grid','mouseMove','particlesWind','createRawRenderState','once','ZERO','viewport','mode','depthTexture','wind','Math','currentTrailsColor','scene'];_0x4982=function(){return _0x5a4c59;};return _0x4982();}class CustomPrimitive{constructor(_0x3f1f22){const _0x43dccb=_0x5a1b;this[_0x43dccb(0x22e)]=_0x3f1f22['commandType'],this['geometry']=_0x3f1f22['geometry'],this[_0x43dccb(0x274)]=_0x3f1f22['attributeLocations'],this['primitiveType']=_0x3f1f22[_0x43dccb(0x1f7)],this[_0x43dccb(0x23d)]=_0x3f1f22[_0x43dccb(0x23d)],this['vertexShaderSource']=_0x3f1f22[_0x43dccb(0x222)],this['fragmentShaderSource']=_0x3f1f22['fragmentShaderSource'],this[_0x43dccb(0x218)]=_0x3f1f22['rawRenderState'],this['framebuffer']=_0x3f1f22['framebuffer'],this['outputTexture']=_0x3f1f22['outputTexture'],this['autoClear']=_0x3f1f22['autoClear']??![],this[_0x43dccb(0x275)]=_0x3f1f22['preExecute'],this['show']=!![],this['commandToExecute']=undefined,this[_0x43dccb(0x291)]=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0x43dccb(0x29b)],'pass':Cesium$6['Pass'][_0x43dccb(0x1da)]}));}[_0x27cea4(0x2a2)](_0x21d46c){const _0x3ec453=_0x27cea4;switch(this['commandType']){case'Draw':{const _0x30ab75=Cesium$6['VertexArray'][_0x3ec453(0x244)]({'context':_0x21d46c,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x3ec453(0x207)]['STATIC_DRAW']}),_0xe3212=Cesium$6['ShaderProgram']['fromCache']({'context':_0x21d46c,'attributeLocations':this[_0x3ec453(0x274)],'vertexShaderSource':this[_0x3ec453(0x222)],'fragmentShaderSource':this[_0x3ec453(0x294)]}),_0x2c6665=Cesium$6['RenderState'][_0x3ec453(0x2ab)](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0xe3212,'vertexArray':_0x30ab75,'modelMatrix':Cesium$6[_0x3ec453(0x205)]['IDENTITY'],'renderState':_0x2c6665,'uniformMap':this[_0x3ec453(0x23d)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x3ec453(0x1da)],'pickOnly':!![],'owner':this});}case _0x3ec453(0x1e7):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this[_0x3ec453(0x1f0)],'persists':!![]});}}}['setGeometry'](_0x26f928,_0xad8ee9){const _0xabdfed=_0x27cea4;this['geometry']=_0xad8ee9;const _0x1be71f=Cesium$6['VertexArray']['fromGeometry']({'context':_0x26f928,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this[_0xabdfed(0x27e)]['vertexArray']=_0x1be71f;}['update'](_0x2bb761){const _0x3b3285=_0x27cea4;if(!this['show'])return;if(_0x2bb761[_0x3b3285(0x2b3)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x2bb761['context'])),Cesium$6[_0x3b3285(0x2c1)](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x2bb761[_0x3b3285(0x24e)]['push'](this['clearCommand']),_0x2bb761['commandList']['push'](this['commandToExecute']);}[_0x27cea4(0x1de)](){return![];}[_0x27cea4(0x2bc)](){const _0x10784e=_0x27cea4;if(this['clearCommand']){var _0x1f751d,_0x5c8a65;(_0x1f751d=this[_0x10784e(0x291)])!==null&&_0x1f751d!==void 0x0&&_0x1f751d['vertexArray']&&this['clearCommand']['vertexArray'][_0x10784e(0x2bc)](),(_0x5c8a65=this['clearCommand'])!==null&&_0x5c8a65!==void 0x0&&_0x5c8a65['shaderProgram']&&this[_0x10784e(0x291)][_0x10784e(0x28d)][_0x10784e(0x2bc)](),delete this['clearCommand'];}return this[_0x10784e(0x27e)]&&(this['commandToExecute'][_0x10784e(0x2a5)]&&this[_0x10784e(0x27e)]['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute'][_0x10784e(0x28d)][_0x10784e(0x2bc)](),delete this['commandToExecute']),Cesium$6[_0x10784e(0x249)](this);}}const Cesium$5=mars3d__namespace[_0x27cea4(0x273)],Util=(function(){const _0x579f4d=function(){const _0x1ebf14=_0x5a1b,_0x4679fb=new Cesium$5[(_0x1ebf14(0x200))]({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x1ebf14(0x27a)],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5[(_0x1ebf14(0x20e))]({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x4679fb;},_0x5aaf22=function(_0x2239ff,_0x4d9bbc){const _0x1069f6=_0x5a1b;if(Cesium$5[_0x1069f6(0x2c1)](_0x4d9bbc)){const _0x517dee={};_0x517dee['arrayBufferView']=_0x4d9bbc,_0x2239ff['source']=_0x517dee;}const _0x16997a=new Cesium$5['Texture'](_0x2239ff);return _0x16997a;},_0x1afddd=function(_0x28ad4f,_0x125098,_0x16217c){const _0x507e54=_0x5a1b,_0x462400=new Cesium$5[(_0x507e54(0x21f))]({'context':_0x28ad4f,'colorTextures':[_0x125098],'depthTexture':_0x16217c});return _0x462400;},_0x581aae=function(_0x1f377c){const _0x82c773=_0x5a1b,_0x5b9cec=!![],_0x2e5316=![],_0x7def6e={'viewport':_0x1f377c[_0x82c773(0x2b2)],'depthTest':_0x1f377c['depthTest'],'depthMask':_0x1f377c['depthMask'],'blending':_0x1f377c[_0x82c773(0x1e5)]},_0x193649=Cesium$5['Appearance'][_0x82c773(0x235)](_0x5b9cec,_0x2e5316,_0x7def6e);return _0x193649;},_0x3220e9=function(_0x14ae23){const _0x15b000=_0x5a1b,_0x415823={},_0x22e80c=Cesium$5['Math'][_0x15b000(0x21a)](_0x14ae23['west'],Cesium$5['Math']['TWO_PI']),_0x444a2d=Cesium$5['Math'][_0x15b000(0x21a)](_0x14ae23['east'],Cesium$5['Math']['TWO_PI']),_0x130479=_0x14ae23['width'];let _0x2e16a0,_0x1a34fc;_0x130479>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x2e16a0=0x0,_0x1a34fc=Cesium$5['Math']['TWO_PI']):_0x444a2d-_0x22e80c<_0x130479?(_0x2e16a0=_0x22e80c,_0x1a34fc=_0x22e80c+_0x130479):(_0x2e16a0=_0x22e80c,_0x1a34fc=_0x444a2d);_0x415823[_0x15b000(0x2a0)]={'min':Cesium$5['Math']['toDegrees'](_0x2e16a0),'max':Cesium$5['Math'][_0x15b000(0x287)](_0x1a34fc)};const _0xd12c6e=_0x14ae23['south'],_0x1a2186=_0x14ae23['north'],_0xf858f3=_0x14ae23['height'],_0x3e46e9=_0xf858f3>Cesium$5['Math']['PI']/0xc?_0xf858f3/0x2:0x0;let _0x54b95e=Cesium$5[_0x15b000(0x2b6)]['clampToLatitudeRange'](_0xd12c6e-_0x3e46e9),_0x45b490=Cesium$5['Math']['clampToLatitudeRange'](_0x1a2186+_0x3e46e9);return _0x54b95e<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x54b95e=-Cesium$5['Math']['PI_OVER_TWO']),_0x45b490>Cesium$5['Math']['PI_OVER_THREE']&&(_0x45b490=Cesium$5['Math']['PI_OVER_TWO']),_0x415823['lat']={'min':Cesium$5[_0x15b000(0x2b6)]['toDegrees'](_0x54b95e),'max':Cesium$5[_0x15b000(0x2b6)][_0x15b000(0x287)](_0x45b490)},_0x415823;};return{'getFullscreenQuad':_0x579f4d,'createTexture':_0x5aaf22,'createFramebuffer':_0x1afddd,'createRawRenderState':_0x581aae,'viewRectangleToLonLatRange':_0x3220e9};}());var segmentDraw_vert=_0x27cea4(0x1e4),segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace[_0x27cea4(0x273)];class ParticlesRendering{constructor(_0x140201,_0xc00a1f,_0x2a4b22,_0x9042e2,_0x383942){const _0x2fca59=_0x27cea4;this[_0x2fca59(0x25a)](_0x140201,_0xc00a1f,_0x2a4b22[_0x2fca59(0x2a3)]),this['createRenderingFramebuffers'](_0x140201),this['createRenderingPrimitives'](_0x140201,_0x2a4b22,_0x9042e2,_0x383942);}[_0x27cea4(0x25a)](_0x317940,_0x37f117,_0x49edd){const _0x1f4820=_0x27cea4,_0x3c6a0d={'context':_0x317940,'width':_0x317940['drawingBufferWidth'],'height':_0x317940[_0x1f4820(0x2a1)],'pixelFormat':Cesium$4['PixelFormat'][_0x1f4820(0x232)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x28d4b2={'context':_0x317940,'width':_0x317940['drawingBufferWidth'],'height':_0x317940['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x1f4820(0x258)]['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x53d58d=_0x49edd['length'],_0x4d90c5=new Float32Array(_0x53d58d*0x3);for(let _0x42ee63=0x0;_0x42ee63<_0x53d58d;_0x42ee63++){const _0x2d5c33=Cesium$4['Color']['fromCssColorString'](_0x49edd[_0x42ee63]);_0x4d90c5[0x3*_0x42ee63]=_0x2d5c33['red'],_0x4d90c5[0x3*_0x42ee63+0x1]=_0x2d5c33[_0x1f4820(0x239)],_0x4d90c5[0x3*_0x42ee63+0x2]=_0x2d5c33['blue'];}const _0x452876={'context':_0x317940,'width':_0x53d58d,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0x1f4820(0x1dd)][_0x1f4820(0x242)],'magnificationFilter':Cesium$4[_0x1f4820(0x1df)][_0x1f4820(0x242)]})};this[_0x1f4820(0x234)]={'segmentsColor':Util[_0x1f4820(0x1e8)](_0x3c6a0d),'segmentsDepth':Util['createTexture'](_0x28d4b2),'currentTrailsColor':Util['createTexture'](_0x3c6a0d),'currentTrailsDepth':Util['createTexture'](_0x28d4b2),'nextTrailsColor':Util[_0x1f4820(0x1e8)](_0x3c6a0d),'nextTrailsDepth':Util['createTexture'](_0x28d4b2),'colorTable':Util['createTexture'](_0x452876,_0x4d90c5)};}['createRenderingFramebuffers'](_0x3c4d87){const _0x3f92f0=_0x27cea4;this[_0x3f92f0(0x264)]={'segments':Util['createFramebuffer'](_0x3c4d87,this['textures'][_0x3f92f0(0x1dc)],this[_0x3f92f0(0x234)]['segmentsDepth']),'currentTrails':Util[_0x3f92f0(0x28b)](_0x3c4d87,this[_0x3f92f0(0x234)][_0x3f92f0(0x2b7)],this[_0x3f92f0(0x234)]['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x3c4d87,this['textures']['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x5416f5){const _0x3c3f1f=_0x27cea4,_0x1ad1a2=0x4;let _0x207f97=[];for(let _0x1bf87f=0x0;_0x1bf87f<_0x5416f5[_0x3c3f1f(0x278)];_0x1bf87f++){for(let _0x11de73=0x0;_0x11de73<_0x5416f5[_0x3c3f1f(0x278)];_0x11de73++){for(let _0x4dd69d=0x0;_0x4dd69d<_0x1ad1a2;_0x4dd69d++){_0x207f97['push'](_0x1bf87f/_0x5416f5['particlesTextureSize']),_0x207f97['push'](_0x11de73/_0x5416f5['particlesTextureSize']);}}}_0x207f97=new Float32Array(_0x207f97);let _0x3e9ec1=[];const _0x4ebbcf=[-0x1,0x1],_0x3ba9a9=[-0x1,0x1];for(let _0x265e49=0x0;_0x265e49<_0x5416f5['maxParticles'];_0x265e49++){for(let _0x718bd3=0x0;_0x718bd3<_0x1ad1a2/0x2;_0x718bd3++){for(let _0x3e19d4=0x0;_0x3e19d4<_0x1ad1a2/0x2;_0x3e19d4++){_0x3e9ec1['push'](_0x4ebbcf[_0x718bd3]),_0x3e9ec1[_0x3c3f1f(0x29d)](_0x3ba9a9[_0x3e19d4]),_0x3e9ec1[_0x3c3f1f(0x29d)](0x0);}}}_0x3e9ec1=new Float32Array(_0x3e9ec1);const _0x5547a3=0x6*_0x5416f5['maxParticles'],_0x2741a5=new Uint32Array(_0x5547a3);for(let _0x13df4e=0x0,_0x59ea75=0x0,_0x29c8d1=0x0;_0x13df4e<_0x5416f5['maxParticles'];_0x13df4e++){_0x2741a5[_0x59ea75++]=_0x29c8d1+0x0,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x1,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x2,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x2,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x1,_0x2741a5[_0x59ea75++]=_0x29c8d1+0x3,_0x29c8d1+=0x4;}const _0x48a7f7=new Cesium$4[(_0x3c3f1f(0x200))]({'attributes':new Cesium$4[(_0x3c3f1f(0x201))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x207f97}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x3c3f1f(0x27a)],'componentsPerAttribute':0x3,'values':_0x3e9ec1})}),'indices':_0x2741a5});return _0x48a7f7;}['createRenderingPrimitives'](_0x244097,_0x4e3484,_0x8d011c,_0x8a3772){const _0x5cc87f=_0x27cea4,_0x3c5fed=this;this[_0x5cc87f(0x2a4)]={'segments':new CustomPrimitive({'commandType':_0x5cc87f(0x2a6),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x4e3484),'primitiveType':Cesium$4['PrimitiveType'][_0x5cc87f(0x28e)],'uniformMap':{'currentParticlesPosition':function(){const _0x574a05=_0x5cc87f;return _0x8a3772[_0x574a05(0x25c)]['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x583480=_0x5cc87f;return _0x8a3772['particlesTextures'][_0x583480(0x1fa)];},'postProcessingSpeed':function(){return _0x8a3772['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){return _0x3c5fed['textures']['colorTable'];},'aspect':function(){return _0x244097['drawingBufferWidth']/_0x244097['drawingBufferHeight'];},'pixelSize':function(){return _0x8d011c['pixelSize'];},'lineWidth':function(){return _0x4e3484['lineWidth'];},'particleHeight':function(){const _0xdfb63=_0x5cc87f;return _0x4e3484[_0xdfb63(0x20c)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util[_0x5cc87f(0x2af)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x5cc87f(0x209)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0x558851=_0x5cc87f;return _0x3c5fed[_0x558851(0x234)]['segmentsColor'];},'segmentsDepthTexture':function(){const _0x1d33b3=_0x5cc87f;return _0x3c5fed[_0x1d33b3(0x234)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x16efd3=_0x5cc87f;return _0x3c5fed['framebuffers'][_0x16efd3(0x1d8)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0xd9c111=_0x5cc87f;return _0x3c5fed['framebuffers']['currentTrails'][_0xd9c111(0x2b4)];},'fadeOpacity':function(){return _0x4e3484['fadeOpacity'];}},'vertexShaderSource':new Cesium$4[(_0x5cc87f(0x288))]({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util[_0x5cc87f(0x2af)]({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0x5cc87f(0x27c)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x5cc87f(0x216)],'autoClear':!![],'preExecute':function(){const _0x23d4ac=_0x5cc87f,_0x117c02=_0x3c5fed['framebuffers']['currentTrails'];_0x3c5fed[_0x23d4ac(0x264)]['currentTrails']=_0x3c5fed['framebuffers'][_0x23d4ac(0x216)],_0x3c5fed['framebuffers']['nextTrails']=_0x117c02,_0x3c5fed['primitives'][_0x23d4ac(0x299)]['commandToExecute']['framebuffer']=_0x3c5fed['framebuffers']['nextTrails'],_0x3c5fed['primitives'][_0x23d4ac(0x299)][_0x23d4ac(0x291)][_0x23d4ac(0x29b)]=_0x3c5fed['framebuffers'][_0x23d4ac(0x216)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x21634b=_0x5cc87f;return _0x3c5fed[_0x21634b(0x264)]['nextTrails'][_0x21634b(0x20a)](0x0);},'trailsDepthTexture':function(){return _0x3c5fed['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x5cc87f(0x252)],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x48d2ad,_0x5e4143,_0x2aa9ab,_0x483770){const _0x527642=_0x27cea4;this['data']=_0x5e4143,this['createWindTextures'](_0x48d2ad,_0x5e4143),this['createParticlesTextures'](_0x48d2ad,_0x2aa9ab,_0x483770),this[_0x527642(0x28c)](_0x5e4143,_0x2aa9ab,_0x483770);}[_0x27cea4(0x227)](_0xe08090,_0x4cfea4){const _0x5082aa=_0x27cea4,_0x418e10={'context':_0xe08090,'width':_0x4cfea4['dimensions']['lon'],'height':_0x4cfea4[_0x5082aa(0x2ba)]['lat']*(_0x4cfea4['dimensions'][_0x5082aa(0x1ea)]||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0x5082aa(0x277)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x5082aa(0x257))]({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x5082aa(0x26a)],'magnificationFilter':Cesium$3[_0x5082aa(0x1df)]['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x418e10,_0x4cfea4['U']['array']),'V':Util[_0x5082aa(0x1e8)](_0x418e10,_0x4cfea4['V']['array'])};}['createParticlesTextures'](_0xa5996f,_0x26343a,_0x469284){const _0x2a133f=_0x27cea4,_0x3bd6d2={'context':_0xa5996f,'width':_0x26343a['particlesTextureSize'],'height':_0x26343a[_0x2a133f(0x278)],'pixelFormat':Cesium$3['PixelFormat'][_0x2a133f(0x232)],'pixelDatatype':Cesium$3[_0x2a133f(0x277)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x2a133f(0x257))]({'minificationFilter':Cesium$3[_0x2a133f(0x1dd)][_0x2a133f(0x26a)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0xc61874=this['randomizeParticles'](_0x26343a[_0x2a133f(0x1ed)],_0x469284),_0x228c16=new Float32Array(0x4*_0x26343a[_0x2a133f(0x1ed)])[_0x2a133f(0x293)](0x0);this['particlesTextures']={'particlesWind':Util[_0x2a133f(0x1e8)](_0x3bd6d2),'currentParticlesPosition':Util['createTexture'](_0x3bd6d2,_0xc61874),'nextParticlesPosition':Util['createTexture'](_0x3bd6d2,_0xc61874),'currentParticlesSpeed':Util['createTexture'](_0x3bd6d2,_0x228c16),'nextParticlesSpeed':Util[_0x2a133f(0x1e8)](_0x3bd6d2,_0x228c16),'postProcessingPosition':Util[_0x2a133f(0x1e8)](_0x3bd6d2,_0xc61874),'postProcessingSpeed':Util[_0x2a133f(0x1e8)](_0x3bd6d2,_0x228c16)};}['randomizeParticles'](_0x59d637,_0x37cb2a){const _0x104b62=_0x27cea4,_0x58722c=new Float32Array(0x4*_0x59d637);for(let _0x4eff49=0x0;_0x4eff49<_0x59d637;_0x4eff49++){_0x58722c[0x4*_0x4eff49]=Cesium$3['Math']['randomBetween'](_0x37cb2a['lonRange']['x'],_0x37cb2a['lonRange']['y']),_0x58722c[0x4*_0x4eff49+0x1]=Cesium$3['Math']['randomBetween'](_0x37cb2a['latRange']['x'],_0x37cb2a['latRange']['y']),_0x58722c[0x4*_0x4eff49+0x2]=Cesium$3[_0x104b62(0x2b6)]['randomBetween'](this[_0x104b62(0x237)][_0x104b62(0x1ea)]['min'],this['data']['lev']['max']),_0x58722c[0x4*_0x4eff49+0x3]=0x0;}return _0x58722c;}['destroyParticlesTextures'](){const _0x44400a=_0x27cea4;Object['keys'](this['particlesTextures'])[_0x44400a(0x21c)](_0x41f42f=>{this['particlesTextures'][_0x41f42f]['destroy']();});}['createComputingPrimitives'](_0x4642cf,_0x2f1525,_0x575f46){const _0x5597e6=_0x27cea4,_0x3a781c=new Cesium$3['Cartesian3'](_0x4642cf[_0x5597e6(0x2ba)][_0x5597e6(0x2a0)],_0x4642cf['dimensions']['lat'],_0x4642cf['dimensions']['lev']),_0x1b6917=new Cesium$3['Cartesian3'](_0x4642cf[_0x5597e6(0x2a0)]['min'],_0x4642cf['lat']['min'],_0x4642cf['lev']['min']),_0x2e08d7=new Cesium$3['Cartesian3'](_0x4642cf['lon']['max'],_0x4642cf['lat']['max'],_0x4642cf['lev']['max']),_0x1b86a1=new Cesium$3['Cartesian3']((_0x2e08d7['x']-_0x1b6917['x'])/(_0x3a781c['x']-0x1),(_0x2e08d7['y']-_0x1b6917['y'])/(_0x3a781c['y']-0x1),_0x3a781c['z']>0x1?(_0x2e08d7['z']-_0x1b6917['z'])/(_0x3a781c['z']-0x1):0x1),_0x8265d3=new Cesium$3['Cartesian2'](_0x4642cf['U']['min'],_0x4642cf['U']['max']),_0x26d389=new Cesium$3['Cartesian2'](_0x4642cf['V']['min'],_0x4642cf['V'][_0x5597e6(0x233)]),_0x1c79ef=this;this[_0x5597e6(0x2a4)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){const _0x183ce0=_0x5597e6;return _0x1c79ef[_0x183ce0(0x1f4)]['U'];},'V':function(){const _0x42326c=_0x5597e6;return _0x1c79ef[_0x42326c(0x1f4)]['V'];},'currentParticlesPosition':function(){const _0x3d2f7a=_0x5597e6;return _0x1c79ef[_0x3d2f7a(0x25c)][_0x3d2f7a(0x25d)];},'dimension':function(){return _0x3a781c;},'minimum':function(){return _0x1b6917;},'maximum':function(){return _0x2e08d7;},'interval':function(){return _0x1b86a1;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this[_0x5597e6(0x25c)]['particlesWind'],'preExecute':function(){const _0x137c48=_0x5597e6;_0x1c79ef[_0x137c48(0x2a4)]['getWind']['commandToExecute'][_0x137c48(0x1f0)]=_0x1c79ef[_0x137c48(0x25c)]['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x1ebe06=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x1ebe06(0x1f6)];},'particlesWind':function(){const _0x5dab2b=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x5dab2b(0x2ae)];},'uSpeedRange':function(){return _0x8265d3;},'vSpeedRange':function(){return _0x26d389;},'pixelSize':function(){return _0x575f46['pixelSize'];},'speedFactor':function(){return _0x2f1525['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x3db4fd=_0x5597e6,_0x370992=_0x1c79ef[_0x3db4fd(0x25c)]['currentParticlesSpeed'];_0x1c79ef['particlesTextures']['currentParticlesSpeed']=_0x1c79ef[_0x3db4fd(0x25c)][_0x3db4fd(0x259)],_0x1c79ef['particlesTextures']['postProcessingSpeed']=_0x370992,_0x1c79ef['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x1c79ef['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x514743=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x514743(0x25d)];},'currentParticlesSpeed':function(){const _0x60d321=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x60d321(0x1f6)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x5597e6(0x25c)]['nextParticlesPosition'],'preExecute':function(){const _0x20c6ad=_0x5597e6,_0x4c24de=_0x1c79ef[_0x20c6ad(0x25c)]['currentParticlesPosition'];_0x1c79ef['particlesTextures']['currentParticlesPosition']=_0x1c79ef['particlesTextures']['postProcessingPosition'],_0x1c79ef['particlesTextures']['postProcessingPosition']=_0x4c24de,_0x1c79ef['primitives']['updatePosition']['commandToExecute']['outputTexture']=_0x1c79ef['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x1c79ef['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x1c79ef['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x111edc=_0x5597e6;return _0x575f46[_0x111edc(0x2a9)];},'latRange':function(){const _0xab3afe=_0x5597e6;return _0x575f46[_0xab3afe(0x286)];},'randomCoefficient':function(){const _0x519648=Math['random']();return _0x519648;},'dropRate':function(){return _0x2f1525['dropRate'];},'dropRateBump':function(){return _0x2f1525['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x5597e6(0x25c)][_0x5597e6(0x1fa)],'preExecute':function(){const _0x3cae75=_0x5597e6;_0x1c79ef[_0x3cae75(0x2a4)]['postProcessingPosition']['commandToExecute'][_0x3cae75(0x1f0)]=_0x1c79ef['particlesTextures'][_0x3cae75(0x1fa)];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x5597e6(0x1e7),'uniformMap':{'postProcessingPosition':function(){const _0x5b8222=_0x5597e6;return _0x1c79ef['particlesTextures'][_0x5b8222(0x1fa)];},'nextParticlesSpeed':function(){return _0x1c79ef['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x5597e6(0x259)],'preExecute':function(){const _0x11fb07=_0x5597e6;_0x1c79ef[_0x11fb07(0x2a4)]['postProcessingSpeed']['commandToExecute'][_0x11fb07(0x1f0)]=_0x1c79ef[_0x11fb07(0x25c)]['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x4606bb,_0x4a5f93,_0x5ca518,_0x153a6f){const _0x81d2ab=_0x27cea4;this['context']=_0x4606bb,_0x4a5f93={..._0x4a5f93},_0x4a5f93['udata']&&_0x4a5f93[_0x81d2ab(0x22d)]&&(_0x4a5f93['dimensions']={},_0x4a5f93['dimensions']['lon']=_0x4a5f93[_0x81d2ab(0x28a)],_0x4a5f93['dimensions']['lat']=_0x4a5f93['rows'],_0x4a5f93[_0x81d2ab(0x2ba)]['lev']=_0x4a5f93[_0x81d2ab(0x1ea)]||0x1,_0x4a5f93['lon']={},_0x4a5f93['lon'][_0x81d2ab(0x295)]=_0x4a5f93['xmin'],_0x4a5f93['lon']['max']=_0x4a5f93['xmax'],_0x4a5f93['lat']={},_0x4a5f93[_0x81d2ab(0x211)]['min']=_0x4a5f93['ymin'],_0x4a5f93['lat']['max']=_0x4a5f93['ymax'],_0x4a5f93['lev']={},_0x4a5f93[_0x81d2ab(0x1ea)]['min']=_0x4a5f93['levmin']??0x1,_0x4a5f93['lev']['max']=_0x4a5f93[_0x81d2ab(0x2bd)]??0x1,_0x4a5f93['U']={},_0x4a5f93['U']['array']=new Float32Array(_0x4a5f93['udata']),_0x4a5f93['U']['min']=_0x4a5f93['umin']??Math['min'](..._0x4a5f93['udata']),_0x4a5f93['U'][_0x81d2ab(0x233)]=_0x4a5f93['umax']??Math['max'](..._0x4a5f93[_0x81d2ab(0x24c)]),_0x4a5f93['V']={},_0x4a5f93['V'][_0x81d2ab(0x281)]=new Float32Array(_0x4a5f93[_0x81d2ab(0x22d)]),_0x4a5f93['V']['min']=_0x4a5f93[_0x81d2ab(0x1ee)]??Math['min'](..._0x4a5f93['vdata']),_0x4a5f93['V']['max']=_0x4a5f93['vmax']??Math['max'](..._0x4a5f93[_0x81d2ab(0x22d)])),this['data']=_0x4a5f93,this['options']=_0x5ca518,this['viewerParameters']=_0x153a6f,this[_0x81d2ab(0x248)]=new ParticlesComputing(this[_0x81d2ab(0x22b)],this[_0x81d2ab(0x237)],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x81d2ab(0x248)]);}['canvasResize'](_0xf71a9b){const _0x5a526f=_0x27cea4;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x5a526f(0x248)]['windTextures'])[_0x5a526f(0x21c)](_0xcb7913=>{const _0x274ebb=_0x5a526f;this[_0x274ebb(0x248)]['windTextures'][_0xcb7913][_0x274ebb(0x2bc)]();}),this['particlesRendering']['textures']['colorTable'][_0x5a526f(0x2bc)](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x227e47=>{const _0x3bd0e4=_0x5a526f;this['particlesRendering']['framebuffers'][_0x227e47][_0x3bd0e4(0x2bc)]();}),this['context']=_0xf71a9b,this['particlesComputing']=new ParticlesComputing(this[_0x5a526f(0x22b)],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x5a526f(0x248)]);}[_0x27cea4(0x236)](){const _0x2860f7=_0x27cea4,_0x5c8df0=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x2860f7(0x24b))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0x2860f7(0x255)][_0x2860f7(0x1da)]});Object['keys'](this['particlesRendering'][_0x2860f7(0x264)])['forEach'](_0xeb9e49=>{const _0x4601d0=_0x2860f7;_0x5c8df0['framebuffer']=this['particlesRendering']['framebuffers'][_0xeb9e49],_0x5c8df0['execute'](this[_0x4601d0(0x22b)]);});}['refreshParticles'](_0x5f122b){const _0x37acad=_0x27cea4;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this[_0x37acad(0x248)]['createParticlesTextures'](this['context'],this['options'],this[_0x37acad(0x1fc)]);if(_0x5f122b){var _0x423050,_0x5d5b53;const _0x3abe97=this['particlesRendering']['createSegmentsGeometry'](this['options']);this[_0x37acad(0x20d)][_0x37acad(0x2a4)]['segments'][_0x37acad(0x268)]=_0x3abe97;const _0x49c0c7=Cesium$2['VertexArray'][_0x37acad(0x244)]({'context':this[_0x37acad(0x22b)],'geometry':_0x3abe97,'attributeLocations':this['particlesRendering']['primitives'][_0x37acad(0x209)][_0x37acad(0x274)],'bufferUsage':Cesium$2['BufferUsage'][_0x37acad(0x24f)]});(_0x423050=this['particlesRendering'][_0x37acad(0x2a4)])!==null&&_0x423050!==void 0x0&&(_0x5d5b53=_0x423050[_0x37acad(0x209)])!==null&&_0x5d5b53!==void 0x0&&_0x5d5b53[_0x37acad(0x27e)]&&(this['particlesRendering']['primitives'][_0x37acad(0x209)]['commandToExecute']['vertexArray']=_0x49c0c7);}}[_0x27cea4(0x290)](_0x14c29c){let _0x457623=![];this['options']['maxParticles']!==_0x14c29c['maxParticles']&&(_0x457623=!![]),Object['keys'](_0x14c29c)['forEach'](_0x1d8d10=>{this['options'][_0x1d8d10]=_0x14c29c[_0x1d8d10];}),this['refreshParticles'](_0x457623);}['applyViewerParameters'](_0x12dcf4){const _0x468792=_0x27cea4;Object[_0x468792(0x220)](_0x12dcf4)['forEach'](_0x3c869d=>{this['viewerParameters'][_0x3c869d]=_0x12dcf4[_0x3c869d];}),this['refreshParticles'](![]);}['destroy'](){const _0xec229a=_0x27cea4;clearTimeout(this['canrefresh']),this['particlesComputing'][_0xec229a(0x208)](),Object['keys'](this['particlesComputing']['windTextures'])[_0xec229a(0x21c)](_0x1d4974=>{const _0x210ee3=_0xec229a;this['particlesComputing'][_0x210ee3(0x1f4)][_0x1d4974][_0x210ee3(0x2bc)]();}),this['particlesRendering']['textures'][_0xec229a(0x22c)]['destroy'](),Object[_0xec229a(0x220)](this[_0xec229a(0x20d)]['framebuffers'])['forEach'](_0xe2b9af=>{this['particlesRendering']['framebuffers'][_0xe2b9af]['destroy']();});for(const _0x533a56 in this){delete this[_0x533a56];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':['rgb(206,255,255)']};function _0x5a1b(_0x3d23e7,_0x3b831f){const _0x4982f3=_0x4982();return _0x5a1b=function(_0x5a1b68,_0x1fd678){_0x5a1b68=_0x5a1b68-0x1d4;let _0x38e2b1=_0x4982f3[_0x5a1b68];return _0x38e2b1;},_0x5a1b(_0x3d23e7,_0x3b831f);}class WindLayer extends BaseLayer$1{constructor(_0x5c0fd4={}){_0x5c0fd4={...DEF_OPTIONS,..._0x5c0fd4},super(_0x5c0fd4),this['_setOptionsHook'](_0x5c0fd4);}get['layer'](){return this['primitives'];}get[_0x27cea4(0x237)](){return this['_data'];}set[_0x27cea4(0x237)](_0x2a9dd0){this['setData'](_0x2a9dd0);}get[_0x27cea4(0x2a3)](){return this['options']['colors'];}set['colors'](_0x47ec26){const _0x26be59=_0x27cea4;this[_0x26be59(0x25f)]['colors']=_0x47ec26,this[_0x26be59(0x1f5)]&&this[_0x26be59(0x1f5)][_0x26be59(0x290)]({'colors':_0x47ec26}),this['resize']();}['_mountedHook'](){}['_addedHook'](){const _0x2cbac4=_0x27cea4;this['scene']=this[_0x2cbac4(0x1f8)]['scene'],this['camera']=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene'][_0x2cbac4(0x2a4)]['add'](this['primitives']),this[_0x2cbac4(0x1fc)]={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x2cbac4(0x2b1)],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this[_0x2cbac4(0x22f)][_0x2cbac4(0x260)](this),![]),this['mouse_down']=![],this['mouse_move']=![],this[_0x2cbac4(0x1f8)]['on'](mars3d__namespace['EventType']['wheel'],this[_0x2cbac4(0x243)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this[_0x2cbac4(0x1f8)]['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_data']&&this['setData'](this['_data']);}[_0x27cea4(0x1f9)](){const _0x5aaec6=_0x27cea4;window[_0x5aaec6(0x226)]('resize',this['resize']),this['_map'][_0x5aaec6(0x284)](mars3d__namespace[_0x5aaec6(0x1d4)]['preRender'],this['_onMap_preRenderEvent'],this),this[_0x5aaec6(0x1f8)]['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace[_0x5aaec6(0x1d4)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x5aaec6(0x2a4)]['removeAll'](),this[_0x5aaec6(0x1f8)][_0x5aaec6(0x2b8)][_0x5aaec6(0x2a4)][_0x5aaec6(0x245)](this['primitives']);}[_0x27cea4(0x22f)](){const _0x4e37ea=_0x27cea4;if(!this['show']||!this[_0x4e37ea(0x1f5)])return;this['primitives']['show']=![],this[_0x4e37ea(0x2a4)][_0x4e37ea(0x292)](),this['_map'][_0x4e37ea(0x2b0)](mars3d__namespace['EventType']['preRender'],this[_0x4e37ea(0x1ef)],this);}['_onMap_preRenderEvent'](_0x15a750){this['particleSystem']['canvasResize'](this['scene']['context']),this['addPrimitives'](),this['primitives']['show']=!![];}[_0x27cea4(0x243)](_0x14ff32){const _0x562237=_0x27cea4;clearTimeout(this['refreshTimer']);if(!this[_0x562237(0x212)]||!this['particleSystem'])return;this[_0x562237(0x2a4)]['show']=![],this['refreshTimer']=setTimeout(()=>{const _0x429b2a=_0x562237;if(!this['show'])return;this[_0x429b2a(0x265)]();},0xc8);}['_onMouseDownEvent'](_0x3b7a1a){const _0x28fcca=_0x27cea4;this[_0x28fcca(0x204)]=!![];}['_onMouseMoveEvent'](_0x803fc6){const _0x584169=_0x27cea4;if(!this['show']||!this[_0x584169(0x1f5)])return;this['mouse_down']&&(this['primitives']['show']=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0xbd4d0f){const _0xaf9d6a=_0x27cea4;if(!this[_0xaf9d6a(0x212)]||!this['particleSystem'])return;this['mouse_down']&&this[_0xaf9d6a(0x256)]&&this[_0xaf9d6a(0x265)](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0xf16b6c=_0x27cea4;if(!this[_0xf16b6c(0x1f8)]||!this[_0xf16b6c(0x212)])return;this['updateViewerParameters'](),this[_0xf16b6c(0x1f5)]['applyViewerParameters'](this['viewerParameters']),this[_0xf16b6c(0x2a4)]['show']=!![];}['setData'](_0x43934c){const _0x524d98=_0x27cea4;this[_0x524d98(0x27d)]=_0x43934c,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x524d98(0x22b)],_0x43934c,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}[_0x27cea4(0x202)](_0x22a1dc,_0x36fd9e){const _0x4274a3=_0x27cea4;if(_0x22a1dc)for(const _0x302b8b in _0x22a1dc){this[_0x302b8b]=_0x22a1dc[_0x302b8b];}this[_0x4274a3(0x1f5)]&&this['particleSystem']['setOptions'](this[_0x4274a3(0x214)]());}['getOptions'](){const _0x25c78e=_0x27cea4,_0x531aa1=Math['ceil'](Math['sqrt'](this[_0x25c78e(0x267)]));return this[_0x25c78e(0x267)]=_0x531aa1*_0x531aa1,{'particlesTextureSize':_0x531aa1,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x25c78e(0x261)],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this[_0x25c78e(0x2a3)]};}['addPrimitives'](){const _0x2b1459=_0x27cea4;this[_0x2b1459(0x2a4)]['add'](this['particleSystem']['particlesComputing']['primitives']['getWind']),this['primitives'][_0x2b1459(0x246)](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x2b1459(0x2a4)]['postProcessingPosition']),this[_0x2b1459(0x2a4)]['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this[_0x2b1459(0x2a4)]['add'](this[_0x2b1459(0x1f5)][_0x2b1459(0x20d)][_0x2b1459(0x2a4)][_0x2b1459(0x209)]),this['primitives']['add'](this[_0x2b1459(0x1f5)]['particlesRendering']['primitives'][_0x2b1459(0x299)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0x5ceb4d=_0x27cea4;let _0x39f3a0=this['camera']['computeViewRectangle'](this['scene'][_0x5ceb4d(0x254)][_0x5ceb4d(0x1d9)]);if(!_0x39f3a0){const _0x5b2e17=this['_map']['getExtent']();_0x39f3a0=Cesium$1['Rectangle'][_0x5ceb4d(0x262)](_0x5b2e17[_0x5ceb4d(0x210)],_0x5b2e17['ymin'],_0x5b2e17['xmax'],_0x5b2e17[_0x5ceb4d(0x297)]);}const _0x54e6be=Util['viewRectangleToLonLatRange'](_0x39f3a0);this['viewerParameters']['lonRange']['x']=_0x54e6be[_0x5ceb4d(0x2a0)]['min'],this['viewerParameters']['lonRange']['y']=_0x54e6be['lon']['max'],this['viewerParameters']['latRange']['x']=_0x54e6be[_0x5ceb4d(0x211)]['min'],this['viewerParameters'][_0x5ceb4d(0x286)]['y']=_0x54e6be[_0x5ceb4d(0x211)]['max'];const _0x13d472=this['camera']['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x13d472>0x0&&(this['viewerParameters']['pixelSize']=_0x13d472);}}mars3d__namespace['LayerUtil']['register'](_0x27cea4(0x2b5),WindLayer),mars3d__namespace[_0x27cea4(0x23c)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x4bbdeb=_0x27cea4;this[_0x4bbdeb(0x26f)]=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null,this[_0x4bbdeb(0x272)]=null;}[_0x27cea4(0x2bc)](){for(const _0x3d2f47 in this){delete this[_0x3d2f47];}}}class CanvasWindField{constructor(_0x3073ab){const _0x264c09=_0x27cea4;this[_0x264c09(0x290)](_0x3073ab);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x3946dd){const _0x2f241b=_0x27cea4;this['_speedRate']=(0x64-(_0x3946dd>0x63?0x63:_0x3946dd))*0x64,this[_0x2f241b(0x253)]=[(this['xmax']-this['xmin'])/this['_speedRate'],(this[_0x2f241b(0x297)]-this['ymin'])/this[_0x2f241b(0x285)]];}get['maxAge'](){const _0x3a4b63=_0x27cea4;return this[_0x3a4b63(0x22a)];}set[_0x27cea4(0x263)](_0x1bb231){this['_maxAge']=_0x1bb231;}[_0x27cea4(0x290)](_0x588f59){const _0x4f2770=_0x27cea4;this['options']=_0x588f59,this[_0x4f2770(0x263)]=_0x588f59['maxAge']||0x78,this['speedRate']=_0x588f59['speedRate']||0x32,this['particles']=[];const _0x49e6d8=_0x588f59['particlesNumber']||0x1000;for(let _0x39ef79=0x0;_0x39ef79<_0x49e6d8;_0x39ef79++){const _0x597b8b=this['_randomParticle'](new CanvasParticle());this[_0x4f2770(0x1e6)][_0x4f2770(0x29d)](_0x597b8b);}}[_0x27cea4(0x1fd)](_0x175ca7){const _0x246acb=_0x27cea4;this['rows']=_0x175ca7[_0x246acb(0x2a8)],this[_0x246acb(0x28a)]=_0x175ca7[_0x246acb(0x28a)],this[_0x246acb(0x210)]=_0x175ca7['xmin'],this[_0x246acb(0x213)]=_0x175ca7['xmax'],this[_0x246acb(0x1f2)]=_0x175ca7[_0x246acb(0x1f2)],this['ymax']=_0x175ca7['ymax'],this[_0x246acb(0x2ac)]=[];const _0x49d739=_0x175ca7[_0x246acb(0x24c)],_0x583e8e=_0x175ca7[_0x246acb(0x22d)];let _0x3050d5=![];_0x49d739[_0x246acb(0x25b)]===this['rows']&&_0x49d739[0x0]['length']===this[_0x246acb(0x28a)]&&(_0x3050d5=!![]);let _0x1e2179=0x0,_0x501faf=null,_0x1509f8=null;for(let _0x568378=0x0;_0x568378<this['rows'];_0x568378++){_0x501faf=[];for(let _0x412b52=0x0;_0x412b52<this['cols'];_0x412b52++,_0x1e2179++){_0x3050d5?_0x1509f8=this['_calcUV'](_0x49d739[_0x568378][_0x412b52],_0x583e8e[_0x568378][_0x412b52]):_0x1509f8=this[_0x246acb(0x223)](_0x49d739[_0x1e2179],_0x583e8e[_0x1e2179]),_0x501faf['push'](_0x1509f8);}this['grid']['push'](_0x501faf);}this['options'][_0x246acb(0x269)]&&this['grid']['reverse']();}['clear'](){const _0x1c8f1d=_0x27cea4;delete this['rows'],delete this[_0x1c8f1d(0x28a)],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this[_0x1c8f1d(0x1e6)];}['toGridXY'](_0x316313,_0x1b327c){const _0xd4862e=_0x27cea4,_0x458d00=(_0x316313-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x390004=(this[_0xd4862e(0x297)]-_0x1b327c)/(this[_0xd4862e(0x297)]-this[_0xd4862e(0x1f2)])*(this[_0xd4862e(0x2a8)]-0x1);return[_0x458d00,_0x390004];}[_0x27cea4(0x23e)](_0x4fd932,_0x242457){const _0x4af66a=_0x27cea4;if(_0x4fd932<0x0||_0x4fd932>=this[_0x4af66a(0x28a)]||_0x242457>=this['rows'])return[0x0,0x0,0x0];const _0xce43f2=Math['floor'](_0x4fd932),_0x211715=Math['floor'](_0x242457);if(_0xce43f2===_0x4fd932&&_0x211715===_0x242457)return this['grid'][_0x242457][_0x4fd932];const _0x2390c9=_0xce43f2+0x1,_0x3ae026=_0x211715+0x1,_0x3c0404=this['getUVByXY'](_0xce43f2,_0x211715),_0x5355e2=this[_0x4af66a(0x23e)](_0x2390c9,_0x211715),_0xf0de9c=this['getUVByXY'](_0xce43f2,_0x3ae026),_0x3d8f3a=this['getUVByXY'](_0x2390c9,_0x3ae026);let _0x6f8c3f=null;try{_0x6f8c3f=this['_bilinearInterpolation'](_0x4fd932-_0xce43f2,_0x242457-_0x211715,_0x3c0404,_0x5355e2,_0xf0de9c,_0x3d8f3a);}catch(_0x5129b9){console['log'](_0x4fd932,_0x242457);}return _0x6f8c3f;}['_bilinearInterpolation'](_0x235ab2,_0x69aa16,_0x4d71dc,_0x26809a,_0x363e39,_0x4ffcf9){const _0x22555e=0x1-_0x235ab2,_0x318946=0x1-_0x69aa16,_0x2a0678=_0x22555e*_0x318946,_0x32b22f=_0x235ab2*_0x318946,_0x2dc5f7=_0x22555e*_0x69aa16,_0x5eef66=_0x235ab2*_0x69aa16,_0x137082=_0x4d71dc[0x0]*_0x2a0678+_0x26809a[0x0]*_0x32b22f+_0x363e39[0x0]*_0x2dc5f7+_0x4ffcf9[0x0]*_0x5eef66,_0x2ac328=_0x4d71dc[0x1]*_0x2a0678+_0x26809a[0x1]*_0x32b22f+_0x363e39[0x1]*_0x2dc5f7+_0x4ffcf9[0x1]*_0x5eef66;return this['_calcUV'](_0x137082,_0x2ac328);}[_0x27cea4(0x223)](_0xad731,_0x21261b){return[+_0xad731,+_0x21261b,Math['sqrt'](_0xad731*_0xad731+_0x21261b*_0x21261b)];}[_0x27cea4(0x1ff)](_0x217b45,_0x2f6c3c){if(!this['isInExtent'](_0x217b45,_0x2f6c3c))return null;const _0x5c6cfe=this['toGridXY'](_0x217b45,_0x2f6c3c),_0x4045c5=this['getUVByXY'](_0x5c6cfe[0x0],_0x5c6cfe[0x1]);return _0x4045c5;}['isInExtent'](_0xea5bfa,_0x475620){const _0xbce4e1=_0x27cea4;return _0xea5bfa>=this[_0xbce4e1(0x210)]&&_0xea5bfa<=this['xmax']&&_0x475620>=this['ymin']&&_0x475620<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x5c8462=_0x27cea4,_0xca2b86=fRandomByfloat(this['xmin'],this[_0x5c8462(0x213)]),_0x506558=fRandomByfloat(this['ymin'],this[_0x5c8462(0x297)]);return{'lat':_0x506558,'lng':_0xca2b86};}['getParticles'](){const _0x211b15=_0x27cea4;let _0x17469e,_0x2ed270,_0x282cda;for(let _0x9bf75e=0x0,_0xa9b27f=this['particles']['length'];_0x9bf75e<_0xa9b27f;_0x9bf75e++){let _0x53e15c=this['particles'][_0x9bf75e];_0x53e15c['age']<=0x0&&(_0x53e15c=this['_randomParticle'](_0x53e15c));if(_0x53e15c['age']>0x0){const _0x35cbad=_0x53e15c[_0x211b15(0x24a)],_0x5621a4=_0x53e15c[_0x211b15(0x1f3)];_0x282cda=this['getUVByPoint'](_0x35cbad,_0x5621a4),_0x282cda?(_0x17469e=_0x35cbad+this['_calc_speedRate'][0x0]*_0x282cda[0x0],_0x2ed270=_0x5621a4+this['_calc_speedRate'][0x1]*_0x282cda[0x1],_0x53e15c[_0x211b15(0x26f)]=_0x35cbad,_0x53e15c[_0x211b15(0x211)]=_0x5621a4,_0x53e15c['tlng']=_0x17469e,_0x53e15c['tlat']=_0x2ed270,_0x53e15c['speed']=_0x282cda[0x2],_0x53e15c['age']--):_0x53e15c[_0x211b15(0x27f)]=0x0;}}return this['particles'];}['_randomParticle'](_0x1cb9ce){const _0x4d157d=_0x27cea4;let _0x8e6355,_0x34eae6;for(let _0x1e0f93=0x0;_0x1e0f93<0x1e;_0x1e0f93++){_0x8e6355=this['getRandomLatLng'](),_0x34eae6=this['getUVByPoint'](_0x8e6355[_0x4d157d(0x26f)],_0x8e6355[_0x4d157d(0x211)]);if(_0x34eae6&&_0x34eae6[0x2]>0x0)break;}if(!_0x34eae6)return _0x1cb9ce;const _0x1aa592=_0x8e6355['lng']+this['_calc_speedRate'][0x0]*_0x34eae6[0x0],_0x5983a5=_0x8e6355['lat']+this[_0x4d157d(0x253)][0x1]*_0x34eae6[0x1];return _0x1cb9ce['lng']=_0x8e6355['lng'],_0x1cb9ce['lat']=_0x8e6355['lat'],_0x1cb9ce[_0x4d157d(0x24a)]=_0x1aa592,_0x1cb9ce[_0x4d157d(0x1f3)]=_0x5983a5,_0x1cb9ce[_0x4d157d(0x27f)]=Math['round'](Math['random']()*this['maxAge']),_0x1cb9ce['speed']=_0x34eae6[0x2],_0x1cb9ce;}['destroy'](){for(const _0x5c104c in this){delete this[_0x5c104c];}}}function fRandomByfloat(_0x5e2b2a,_0x1ef117){const _0x5905e7=_0x27cea4;return _0x5e2b2a+Math[_0x5905e7(0x26b)]()*(_0x1ef117-_0x5e2b2a);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x27cea4(0x23c)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0xe45666={}){const _0xe7d087=_0x27cea4;super(_0xe45666),this['_setOptionsHook'](_0xe45666),this[_0xe7d087(0x224)]=null,_0xe45666['colors']&&_0xe45666['steps']&&(this[_0xe7d087(0x251)]=new mars3d__namespace['ColorRamp'](_0xe45666));}[_0x27cea4(0x202)](_0x16d702,_0x50d912){const _0x40bfa2=_0x27cea4;this['frameTime']=0x3e8/(_0x16d702['frameRate']||0xa),this[_0x40bfa2(0x20f)]=this[_0x40bfa2(0x25f)][_0x40bfa2(0x298)]??![],this['color']=_0x16d702[_0x40bfa2(0x1eb)]||'#ffffff',this['lineWidth']=_0x16d702['lineWidth']||0x1,this[_0x40bfa2(0x261)]=_0x16d702['fixedHeight']??0x0,this[_0x40bfa2(0x269)]=_0x16d702['reverseY']??![],this['windField']&&this['windField']['setOptions'](_0x16d702);}get['layer'](){return this['canvas'];}get['canvasWidth'](){return this['_map']['scene']['canvas']['clientWidth'];}get['canvasHeight'](){const _0x1d618d=_0x27cea4;return this[_0x1d618d(0x1f8)]['scene']['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0xfcb783){const _0x2faf68=_0x27cea4;this['_pointerEvents']=_0xfcb783;if(!this['canvas'])return;_0xfcb783?this[_0x2faf68(0x224)]['style']['pointer-events']='all':this[_0x2faf68(0x224)]['style']['pointer-events']='none';}get['particlesNumber'](){const _0x1f3b7b=_0x27cea4;return this['options'][_0x1f3b7b(0x267)];}set[_0x27cea4(0x267)](_0xfea392){const _0x2236b3=_0x27cea4;this['options'][_0x2236b3(0x267)]=_0xfea392,clearTimeout(this['_canrefresh']),this[_0x2236b3(0x225)]=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x33d0cf){this['options']['speedRate']=_0x33d0cf,this['windField']&&(this['windField']['speedRate']=_0x33d0cf);}get[_0x27cea4(0x263)](){return this['options']['maxAge'];}set['maxAge'](_0x34e074){const _0x41672b=_0x27cea4;this['options']['maxAge']=_0x34e074,this[_0x41672b(0x215)]&&(this['windField'][_0x41672b(0x263)]=_0x34e074);}get['data'](){const _0x22626e=_0x27cea4;return this[_0x22626e(0x2bb)];}set['data'](_0x128e7a){this['setData'](_0x128e7a);}['_showHook'](_0x29ff2b){const _0x596d7c=_0x27cea4;_0x29ff2b?this['_addedHook']():(this['windData']&&(this['options']['data']=this[_0x596d7c(0x2bb)]),this[_0x596d7c(0x1f9)]());}['_mountedHook'](){const _0x4d371b=_0x27cea4;this['options']['worker']?this['initWorker']():this[_0x4d371b(0x215)]=new CanvasWindField(this[_0x4d371b(0x25f)]);}['_addedHook'](){const _0x2ffde0=_0x27cea4;this['canvas']=this[_0x2ffde0(0x266)](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x2ffde0(0x276)](),this['options']['data']&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x59a91d=_0x27cea4;this['clear'](),this['unbindEvent'](),this[_0x59a91d(0x224)]&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x10c4f3=_0x27cea4,_0xc9694=mars3d__namespace['DomUtil'][_0x10c4f3(0x270)](_0x10c4f3(0x224),_0x10c4f3(0x1e1),this['_map'][_0x10c4f3(0x20b)]);return _0xc9694['style']['position']='absolute',_0xc9694[_0x10c4f3(0x206)]['top']=_0x10c4f3(0x280),_0xc9694['style']['left']='0px',_0xc9694['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0xc9694['style']['height']=this['_map'][_0x10c4f3(0x2b8)]['canvas']['clientHeight']+'px',_0xc9694['style']['pointerEvents']=this['_pointerEvents']?_0x10c4f3(0x219):'none',_0xc9694[_0x10c4f3(0x206)]['zIndex']=this['options']['zIndex']??0x9,_0xc9694['width']=this[_0x10c4f3(0x1f8)]['scene']['canvas']['clientWidth'],_0xc9694['height']=this['_map']['scene']['canvas']['clientHeight'],_0xc9694;}[_0x27cea4(0x22f)](){const _0x366c65=_0x27cea4;this[_0x366c65(0x224)]&&(this['canvas'][_0x366c65(0x206)]['width']=this[_0x366c65(0x1f8)]['scene']['canvas'][_0x366c65(0x228)]+'px',this[_0x366c65(0x224)]['style']['height']=this[_0x366c65(0x1f8)]['scene'][_0x366c65(0x224)]['clientHeight']+'px',this['canvas'][_0x366c65(0x29f)]=this['_map']['scene'][_0x366c65(0x224)]['clientWidth'],this[_0x366c65(0x224)]['height']=this[_0x366c65(0x1f8)][_0x366c65(0x2b8)]['canvas']['clientHeight']);}['bindEvent'](){const _0x16d85a=_0x27cea4,_0x53d02e=this;let _0x2da524=Date['now']();(function _0x116a44(){const _0x4bcd17=_0x5a1b;_0x53d02e['animateFrame']=window[_0x4bcd17(0x238)](_0x116a44);if(_0x53d02e['show']&&_0x53d02e['windField']){const _0xfa102e=Date[_0x4bcd17(0x2b9)](),_0xc5903=_0xfa102e-_0x2da524;_0xc5903>_0x53d02e[_0x4bcd17(0x1ec)]&&(_0x2da524=_0xfa102e-_0xc5903%_0x53d02e['frameTime'],_0x53d02e['update']());}}(),window[_0x16d85a(0x229)](_0x16d85a(0x22f),this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x16d85a(0x1f8)]['on'](mars3d__namespace[_0x16d85a(0x1d4)]['mouseDown'],this['_onMouseDownEvent'],this),this[_0x16d85a(0x1f8)]['on'](mars3d__namespace['EventType']['mouseUp'],this[_0x16d85a(0x29e)],this)));}['unbindEvent'](){const _0xeb8037=_0x27cea4;window[_0xeb8037(0x271)](this['animateFrame']),delete this['animateFrame'],window[_0xeb8037(0x226)]('resize',this[_0xeb8037(0x22f)]),this[_0xeb8037(0x25f)]['mouseHidden']&&(this[_0xeb8037(0x1f8)]['off'](mars3d__namespace['EventType'][_0xeb8037(0x1fb)],this['_onMapWhellEvent'],this),this[_0xeb8037(0x1f8)][_0xeb8037(0x284)](mars3d__namespace['EventType']['mouseDown'],this[_0xeb8037(0x283)],this),this[_0xeb8037(0x1f8)]['off'](mars3d__namespace['EventType'][_0xeb8037(0x28f)],this[_0xeb8037(0x29e)],this),this['_map'][_0xeb8037(0x284)](mars3d__namespace['EventType'][_0xeb8037(0x2ad)],this[_0xeb8037(0x289)],this));}[_0x27cea4(0x243)](_0x5387f8){const _0x497854=_0x27cea4;clearTimeout(this[_0x497854(0x1e2)]);if(!this['show']||!this['canvas'])return;this[_0x497854(0x224)]['style']['visibility']=_0x497854(0x23f),this['refreshTimer']=setTimeout(()=>{const _0x4f7267=_0x497854;if(!this['show'])return;this[_0x4f7267(0x265)](),this[_0x4f7267(0x224)][_0x4f7267(0x206)]['visibility']=_0x4f7267(0x230);},0xc8);}[_0x27cea4(0x283)](_0x52e76d){const _0x2e8cab=_0x27cea4;this[_0x2e8cab(0x204)]=!![],this[_0x2e8cab(0x1f8)]['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x2e8cab(0x289)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x2e8cab(0x289)],this);}[_0x27cea4(0x289)](_0x344596){const _0x2cf546=_0x27cea4;if(!this['show']||!this['canvas'])return;this[_0x2cf546(0x204)]&&(this[_0x2cf546(0x224)]['style']['visibility']=_0x2cf546(0x23f),this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5e64ff){const _0x4594fd=_0x27cea4;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace[_0x4594fd(0x1d4)][_0x4594fd(0x2ad)],this['_onMouseMoveEvent'],this),this[_0x4594fd(0x204)]&&this['mouse_move']&&this['redraw'](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x5975f3){const _0x45469b=_0x27cea4;this[_0x45469b(0x1e9)](),this['windData']=_0x5975f3,this['windField']['setDate'](_0x5975f3),this['redraw']();}[_0x27cea4(0x265)](){const _0x5f3147=_0x27cea4;if(!this[_0x5f3147(0x212)])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x1d1ae7=this['windField']['getParticles']();this['_drawLines'](_0x1d1ae7);}this['_updateIng']=![];}['_drawLines'](_0x1eddc8){const _0x48cc39=_0x27cea4;this['canvasContext'][_0x48cc39(0x1f1)]='destination-in',this[_0x48cc39(0x1d7)]['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']=_0x48cc39(0x1e0),this[_0x48cc39(0x1d7)]['globalAlpha']=0.9;const _0x2baed3=this['_map']['scene']['mode']!==Cesium['SceneMode'][_0x48cc39(0x23b)],_0x183b10=this[_0x48cc39(0x240)]*0.25;if(this['_colorRamp'])for(let _0x30508c=0x0,_0x340128=_0x1eddc8[_0x48cc39(0x25b)];_0x30508c<_0x340128;_0x30508c++){const _0x1049d8=_0x1eddc8[_0x30508c],_0x34dfd5=this[_0x48cc39(0x1d5)](_0x1049d8[_0x48cc39(0x26f)],_0x1049d8[_0x48cc39(0x211)],_0x1049d8),_0x102fc2=this['_tomap'](_0x1049d8['tlng'],_0x1049d8[_0x48cc39(0x1f3)],_0x1049d8);if(!_0x34dfd5||!_0x102fc2)continue;if(_0x2baed3&&Math['abs'](_0x34dfd5[0x0]-_0x102fc2[0x0])>=_0x183b10)continue;this[_0x48cc39(0x1d7)][_0x48cc39(0x1e3)](),this['canvasContext'][_0x48cc39(0x21d)]=this['lineWidth'],this['canvasContext'][_0x48cc39(0x241)]=this['_colorRamp'][_0x48cc39(0x2aa)](_0x1049d8['speed']),this['canvasContext'][_0x48cc39(0x1db)](_0x34dfd5[0x0],_0x34dfd5[0x1]),this['canvasContext']['lineTo'](_0x102fc2[0x0],_0x102fc2[0x1]),this['canvasContext']['stroke']();}else{this[_0x48cc39(0x1d7)]['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this[_0x48cc39(0x1d7)]['strokeStyle']=this['color'];for(let _0x55056b=0x0,_0x2a4092=_0x1eddc8['length'];_0x55056b<_0x2a4092;_0x55056b++){const _0x5852e1=_0x1eddc8[_0x55056b],_0x861b64=this['_tomap'](_0x5852e1['lng'],_0x5852e1['lat'],_0x5852e1),_0xa3b23f=this['_tomap'](_0x5852e1['tlng'],_0x5852e1[_0x48cc39(0x1f3)],_0x5852e1);if(!_0x861b64||!_0xa3b23f)continue;if(_0x2baed3&&Math['abs'](_0x861b64[0x0]-_0xa3b23f[0x0])>=_0x183b10)continue;this['canvasContext']['moveTo'](_0x861b64[0x0],_0x861b64[0x1]),this['canvasContext']['lineTo'](_0xa3b23f[0x0],_0xa3b23f[0x1]);}this['canvasContext'][_0x48cc39(0x21b)]();}}['_tomap'](_0xd02f5c,_0x278544,_0x26eb2d){const _0x2ac058=_0x27cea4,_0x11b78b=Cesium['Cartesian3']['fromDegrees'](_0xd02f5c,_0x278544,this['fixedHeight']),_0x3e8470=this['_map']['scene'];if(_0x3e8470['mode']===Cesium['SceneMode']['SCENE3D']){const _0xe85383=new Cesium[(_0x2ac058(0x221))](_0x3e8470['globe'][_0x2ac058(0x1d9)],_0x3e8470['camera']['positionWC']),_0x104d61=_0xe85383[_0x2ac058(0x29c)](_0x11b78b);if(!_0x104d61)return _0x26eb2d['age']=0x0,null;}const _0x39b175=Cesium[_0x2ac058(0x296)]['wgs84ToWindowCoordinates'](this['_map'][_0x2ac058(0x2b8)],_0x11b78b);return _0x39b175?[_0x39b175['x'],_0x39b175['y']]:null;}[_0x27cea4(0x1e9)](){const _0x1d9344=_0x27cea4;this['windField']['clear'](),delete this[_0x1d9344(0x2bb)];}['initWorker'](){const _0x335cb7=_0x27cea4;this['worker']=new Worker(this['options']['worker']),this['worker']['onmessage']=_0x428cc4=>{const _0x2588d4=_0x5a1b;this[_0x2588d4(0x282)](_0x428cc4[_0x2588d4(0x237)]['particles']),this[_0x2588d4(0x2be)]=![];},this['windField']={'init':_0x36c4ca=>{const _0x538a50=_0x5a1b;this[_0x538a50(0x217)]['postMessage']({'type':_0x538a50(0x23a),'options':_0x36c4ca});},'setOptions':_0xb30c6d=>{const _0x414fe9=_0x5a1b;this['worker'][_0x414fe9(0x2a7)]({'type':_0x414fe9(0x290),'options':_0xb30c6d});},'setDate':_0x1449e9=>{this['worker']['postMessage']({'type':'setDate','data':_0x1449e9});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0x2d7967=_0x5a1b;this['worker'][_0x2d7967(0x2a7)]({'type':_0x2d7967(0x1e9)});}},this['windField'][_0x335cb7(0x23a)](this['options']);}}mars3d__namespace[_0x27cea4(0x21e)]['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace[_0x27cea4(0x26d)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports[_0x27cea4(0x24d)]=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-wind",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
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.0"
11
+ "mars3d": "~3.6.1"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "eslint ./src/**/*.{js,ts} --fix"