mars3d-wind 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mars3d-wind.js +3 -3
- package/package.json +2 -2
package/dist/mars3d-wind.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.6.
|
|
5
|
-
* 编译日期:2023-08-
|
|
4
|
+
* 版本信息:v3.6.2
|
|
5
|
+
* 编译日期:2023-08-21 21:14:17
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2023-03-17
|
|
8
8
|
*/
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
typeof define === 'function' && define.amd ? define(['exports', 'mars3d'], factory) :
|
|
12
12
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-wind"] = {}, global.mars3d));
|
|
13
13
|
})(this, (function (exports, mars3d) {
|
|
14
|
-
'use strict';const _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 _0x2156a7=_0x4707;(function(_0x3290e3,_0x3b2a54){const _0x3f6303=_0x4707,_0x493e20=_0x3290e3();while(!![]){try{const _0x416f8e=parseInt(_0x3f6303(0x18b))/0x1*(parseInt(_0x3f6303(0x19c))/0x2)+parseInt(_0x3f6303(0x1c2))/0x3*(-parseInt(_0x3f6303(0x170))/0x4)+parseInt(_0x3f6303(0x1de))/0x5*(-parseInt(_0x3f6303(0x1d1))/0x6)+-parseInt(_0x3f6303(0x180))/0x7+-parseInt(_0x3f6303(0x1b9))/0x8+-parseInt(_0x3f6303(0x130))/0x9+parseInt(_0x3f6303(0x19a))/0xa;if(_0x416f8e===_0x3b2a54)break;else _0x493e20['push'](_0x493e20['shift']());}catch(_0x243912){_0x493e20['push'](_0x493e20['shift']());}}}(_0x2908,0x6478f));function _interopNamespace(_0x2a3867){const _0x2de94f=_0x4707;if(_0x2a3867&&_0x2a3867['__esModule'])return _0x2a3867;var _0x4d408a=Object['create'](null);return _0x2a3867&&Object[_0x2de94f(0x11d)](_0x2a3867)['forEach'](function(_0x5e0bd6){const _0x373384=_0x2de94f;if(_0x5e0bd6!=='default'){var _0x3bbc8f=Object['getOwnPropertyDescriptor'](_0x2a3867,_0x5e0bd6);Object[_0x373384(0x18a)](_0x4d408a,_0x5e0bd6,_0x3bbc8f['get']?_0x3bbc8f:{'enumerable':!![],'get':function(){return _0x2a3867[_0x5e0bd6];}});}}),_0x4d408a['default']=_0x2a3867,_0x4d408a;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x210761,_0x44f78e){const _0x2667ab=_0x4707,_0x47b29a=_0x210761*Math['cos'](Cesium$7[_0x2667ab(0x1df)]['toRadians'](_0x44f78e));return _0x47b29a;}function getV(_0x101c8b,_0x17ced9){const _0x48fe79=_0x4707,_0x4f6fba=_0x101c8b*Math['sin'](Cesium$7['Math'][_0x48fe79(0x1a3)](_0x17ced9));return _0x4f6fba;}function getSpeed(_0x1d8f67,_0x3038f9){const _0x4e4347=Math['sqrt'](Math['pow'](_0x1d8f67,0x2)+Math['pow'](_0x3038f9,0x2));return _0x4e4347;}function getDirection(_0x39e751,_0x1853e9){const _0x2c3e53=_0x4707;let _0x281eef=Cesium$7[_0x2c3e53(0x1df)]['toDegrees'](Math[_0x2c3e53(0x162)](_0x1853e9,_0x39e751));return _0x281eef+=_0x281eef<0x0?0x168:0x0,_0x281eef;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x42b15a){const _0x5c30ca=_0x4707;this['commandType']=_0x42b15a['commandType'],this[_0x5c30ca(0x1d4)]=_0x42b15a['geometry'],this[_0x5c30ca(0x1c4)]=_0x42b15a['attributeLocations'],this[_0x5c30ca(0x1f0)]=_0x42b15a['primitiveType'],this['uniformMap']=_0x42b15a[_0x5c30ca(0x1e0)],this[_0x5c30ca(0x1bd)]=_0x42b15a['vertexShaderSource'],this['fragmentShaderSource']=_0x42b15a[_0x5c30ca(0x206)],this['rawRenderState']=_0x42b15a['rawRenderState'],this['framebuffer']=_0x42b15a['framebuffer'],this[_0x5c30ca(0x143)]=_0x42b15a['outputTexture'],this['autoClear']=_0x42b15a[_0x5c30ca(0x13b)]??![],this['preExecute']=_0x42b15a[_0x5c30ca(0x15b)],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this[_0x5c30ca(0x173)]=new Cesium$6['ClearCommand']({'color':new Cesium$6[(_0x5c30ca(0x1fa))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x5c30ca(0x17e)][_0x5c30ca(0x174)]}));}['createCommand'](_0x29123c){const _0x20b543=_0x4707;switch(this[_0x20b543(0x1c7)]){case _0x20b543(0x126):{const _0x55b004=Cesium$6[_0x20b543(0x1f4)][_0x20b543(0x1e7)]({'context':_0x29123c,'geometry':this['geometry'],'attributeLocations':this[_0x20b543(0x1c4)],'bufferUsage':Cesium$6['BufferUsage'][_0x20b543(0x1ac)]}),_0x221f97=Cesium$6['ShaderProgram']['fromCache']({'context':_0x29123c,'attributeLocations':this[_0x20b543(0x1c4)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x30c1c4=Cesium$6[_0x20b543(0x184)]['fromCache'](this[_0x20b543(0x1d5)]);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x221f97,'vertexArray':_0x55b004,'modelMatrix':Cesium$6[_0x20b543(0x133)][_0x20b543(0x137)],'renderState':_0x30c1c4,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0x20b543(0x207)],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x20b543(0x14a):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x595959,_0x41d793){const _0x51f2d6=_0x4707;this[_0x51f2d6(0x1d4)]=_0x41d793;const _0x1e5bc4=Cesium$6['VertexArray'][_0x51f2d6(0x1e7)]({'context':_0x595959,'geometry':this['geometry'],'attributeLocations':this[_0x51f2d6(0x1c4)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x1e5bc4;}['update'](_0x1ac89e){const _0x3208b0=_0x4707;if(!this['show'])return;if(_0x1ac89e[_0x3208b0(0x14d)]!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this[_0x3208b0(0x177)])&&(this[_0x3208b0(0x177)]=this['createCommand'](_0x1ac89e['context'])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x1ac89e['commandList'][_0x3208b0(0x1be)](this[_0x3208b0(0x173)]),_0x1ac89e['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}['destroy'](){const _0x2d8a74=_0x4707;if(this['clearCommand']){var _0x2eff53,_0xb6ebe;(_0x2eff53=this['clearCommand'])!==null&&_0x2eff53!==void 0x0&&_0x2eff53[_0x2d8a74(0x15d)]&&this['clearCommand'][_0x2d8a74(0x15d)]['destroy'](),(_0xb6ebe=this['clearCommand'])!==null&&_0xb6ebe!==void 0x0&&_0xb6ebe['shaderProgram']&&this['clearCommand']['shaderProgram']['destroy'](),delete this['clearCommand'];}return this[_0x2d8a74(0x177)]&&(this[_0x2d8a74(0x177)][_0x2d8a74(0x15d)]&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram'][_0x2d8a74(0x16b)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x371732=function(){const _0x55b443=_0x4707,_0x1b099f=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x55b443(0x188))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5[(_0x55b443(0x125))]({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x1b099f;},_0x2f8465=function(_0x1fb82e,_0x2bbc1c){const _0x323d9d=_0x4707;if(Cesium$5['defined'](_0x2bbc1c)){const _0x1cc056={};_0x1cc056['arrayBufferView']=_0x2bbc1c,_0x1fb82e[_0x323d9d(0x17f)]=_0x1cc056;}const _0x1e273f=new Cesium$5[(_0x323d9d(0x1c9))](_0x1fb82e);return _0x1e273f;},_0x18aa85=function(_0x60c914,_0x4ebf89,_0x2527a8){const _0x2dd5a7=_0x4707,_0x43afe6=new Cesium$5[(_0x2dd5a7(0x146))]({'context':_0x60c914,'colorTextures':[_0x4ebf89],'depthTexture':_0x2527a8});return _0x43afe6;},_0x2e49e8=function(_0x59c739){const _0x404c2f=_0x4707,_0x3d9c8f=!![],_0x1fe5bc=![],_0x1e160c={'viewport':_0x59c739[_0x404c2f(0x179)],'depthTest':_0x59c739[_0x404c2f(0x19f)],'depthMask':_0x59c739[_0x404c2f(0x19e)],'blending':_0x59c739['blending']},_0x2569e2=Cesium$5['Appearance'][_0x404c2f(0x1ba)](_0x3d9c8f,_0x1fe5bc,_0x1e160c);return _0x2569e2;},_0xd327e9=function(_0x3c83e7){const _0x410041=_0x4707,_0x3d7818={},_0x5e58ce=Cesium$5['Math']['mod'](_0x3c83e7['west'],Cesium$5['Math']['TWO_PI']),_0x41f973=Cesium$5['Math'][_0x410041(0x11f)](_0x3c83e7['east'],Cesium$5['Math']['TWO_PI']),_0x4b2422=_0x3c83e7[_0x410041(0x156)];let _0x5a2d20,_0x13e177;_0x4b2422>Cesium$5[_0x410041(0x1df)][_0x410041(0x1b1)]?(_0x5a2d20=0x0,_0x13e177=Cesium$5['Math'][_0x410041(0x1b2)]):_0x41f973-_0x5e58ce<_0x4b2422?(_0x5a2d20=_0x5e58ce,_0x13e177=_0x5e58ce+_0x4b2422):(_0x5a2d20=_0x5e58ce,_0x13e177=_0x41f973);_0x3d7818['lon']={'min':Cesium$5[_0x410041(0x1df)][_0x410041(0x129)](_0x5a2d20),'max':Cesium$5['Math']['toDegrees'](_0x13e177)};const _0x33a1ec=_0x3c83e7['south'],_0xcdbb42=_0x3c83e7['north'],_0x5c488b=_0x3c83e7[_0x410041(0x200)],_0x120b9d=_0x5c488b>Cesium$5[_0x410041(0x1df)]['PI']/0xc?_0x5c488b/0x2:0x0;let _0xc704c9=Cesium$5[_0x410041(0x1df)][_0x410041(0x202)](_0x33a1ec-_0x120b9d),_0x56a358=Cesium$5[_0x410041(0x1df)]['clampToLatitudeRange'](_0xcdbb42+_0x120b9d);return _0xc704c9<-Cesium$5['Math']['PI_OVER_THREE']&&(_0xc704c9=-Cesium$5['Math']['PI_OVER_TWO']),_0x56a358>Cesium$5['Math']['PI_OVER_THREE']&&(_0x56a358=Cesium$5['Math']['PI_OVER_TWO']),_0x3d7818['lat']={'min':Cesium$5[_0x410041(0x1df)]['toDegrees'](_0xc704c9),'max':Cesium$5['Math'][_0x410041(0x129)](_0x56a358)},_0x3d7818;};return{'getFullscreenQuad':_0x371732,'createTexture':_0x2f8465,'createFramebuffer':_0x18aa85,'createRawRenderState':_0x2e49e8,'viewRectangleToLonLatRange':_0xd327e9};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag=_0x2156a7(0x1c8);const Cesium$4=mars3d__namespace[_0x2156a7(0x1ea)];class ParticlesRendering{constructor(_0x56690f,_0x35a4b1,_0xc37b01,_0x47a7ec,_0x2e625e){this['createRenderingTextures'](_0x56690f,_0x35a4b1,_0xc37b01['colors']),this['createRenderingFramebuffers'](_0x56690f),this['createRenderingPrimitives'](_0x56690f,_0xc37b01,_0x47a7ec,_0x2e625e);}['createRenderingTextures'](_0x414362,_0x548fb2,_0x28e003){const _0x3b58b8=_0x2156a7,_0x2d449d={'context':_0x414362,'width':_0x414362['drawingBufferWidth'],'height':_0x414362['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x3b58b8(0x1ff)]},_0x496514={'context':_0x414362,'width':_0x414362['drawingBufferWidth'],'height':_0x414362['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x40555f=_0x28e003[_0x3b58b8(0x152)],_0x189460=new Float32Array(_0x40555f*0x3);for(let _0x43962b=0x0;_0x43962b<_0x40555f;_0x43962b++){const _0x2e5851=Cesium$4['Color']['fromCssColorString'](_0x28e003[_0x43962b]);_0x189460[0x3*_0x43962b]=_0x2e5851['red'],_0x189460[0x3*_0x43962b+0x1]=_0x2e5851['green'],_0x189460[0x3*_0x43962b+0x2]=_0x2e5851[_0x3b58b8(0x199)];}const _0x163383={'context':_0x414362,'width':_0x40555f,'height':0x1,'pixelFormat':Cesium$4['PixelFormat'][_0x3b58b8(0x168)],'pixelDatatype':Cesium$4[_0x3b58b8(0x131)][_0x3b58b8(0x1e1)],'sampler':new Cesium$4[(_0x3b58b8(0x13d))]({'minificationFilter':Cesium$4[_0x3b58b8(0x172)]['LINEAR'],'magnificationFilter':Cesium$4[_0x3b58b8(0x1b5)][_0x3b58b8(0x15a)]})};this['textures']={'segmentsColor':Util[_0x3b58b8(0x1f2)](_0x2d449d),'segmentsDepth':Util['createTexture'](_0x496514),'currentTrailsColor':Util['createTexture'](_0x2d449d),'currentTrailsDepth':Util['createTexture'](_0x496514),'nextTrailsColor':Util['createTexture'](_0x2d449d),'nextTrailsDepth':Util['createTexture'](_0x496514),'colorTable':Util[_0x3b58b8(0x1f2)](_0x163383,_0x189460)};}['createRenderingFramebuffers'](_0x4e9358){const _0x481a84=_0x2156a7;this['framebuffers']={'segments':Util['createFramebuffer'](_0x4e9358,this['textures']['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x4e9358,this['textures']['currentTrailsColor'],this['textures']['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x4e9358,this[_0x481a84(0x175)]['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}[_0x2156a7(0x1fc)](_0xd6d173){const _0x3d4ae7=_0x2156a7,_0x48608e=0x4;let _0x435852=[];for(let _0x2852a3=0x0;_0x2852a3<_0xd6d173[_0x3d4ae7(0x1e9)];_0x2852a3++){for(let _0x36e342=0x0;_0x36e342<_0xd6d173['particlesTextureSize'];_0x36e342++){for(let _0x158c89=0x0;_0x158c89<_0x48608e;_0x158c89++){_0x435852['push'](_0x2852a3/_0xd6d173[_0x3d4ae7(0x1e9)]),_0x435852['push'](_0x36e342/_0xd6d173[_0x3d4ae7(0x1e9)]);}}}_0x435852=new Float32Array(_0x435852);let _0x11600c=[];const _0x12cdd7=[-0x1,0x1],_0xa4d26f=[-0x1,0x1];for(let _0x27212e=0x0;_0x27212e<_0xd6d173['maxParticles'];_0x27212e++){for(let _0x4c4809=0x0;_0x4c4809<_0x48608e/0x2;_0x4c4809++){for(let _0x394962=0x0;_0x394962<_0x48608e/0x2;_0x394962++){_0x11600c[_0x3d4ae7(0x1be)](_0x12cdd7[_0x4c4809]),_0x11600c['push'](_0xa4d26f[_0x394962]),_0x11600c[_0x3d4ae7(0x1be)](0x0);}}}_0x11600c=new Float32Array(_0x11600c);const _0x368001=0x6*_0xd6d173[_0x3d4ae7(0x1eb)],_0x58e32e=new Uint32Array(_0x368001);for(let _0x42aae8=0x0,_0x27c0fc=0x0,_0x367c80=0x0;_0x42aae8<_0xd6d173['maxParticles'];_0x42aae8++){_0x58e32e[_0x27c0fc++]=_0x367c80+0x0,_0x58e32e[_0x27c0fc++]=_0x367c80+0x1,_0x58e32e[_0x27c0fc++]=_0x367c80+0x2,_0x58e32e[_0x27c0fc++]=_0x367c80+0x2,_0x58e32e[_0x27c0fc++]=_0x367c80+0x1,_0x58e32e[_0x27c0fc++]=_0x367c80+0x3,_0x367c80+=0x4;}const _0x1108e5=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x3d4ae7(0x11e)]['FLOAT'],'componentsPerAttribute':0x2,'values':_0x435852}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x11600c})}),'indices':_0x58e32e});return _0x1108e5;}[_0x2156a7(0x1cb)](_0x34184c,_0x2b52da,_0x34ee91,_0xc29853){const _0x90af35=_0x2156a7,_0xc257ec=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x2b52da),'primitiveType':Cesium$4[_0x90af35(0x1bb)][_0x90af35(0x185)],'uniformMap':{'currentParticlesPosition':function(){return _0xc29853['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x37c387=_0x90af35;return _0xc29853[_0x37c387(0x18e)]['postProcessingPosition'];},'postProcessingSpeed':function(){return _0xc29853['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x457eb4=_0x90af35;return _0xc257ec[_0x457eb4(0x175)]['colorTable'];},'aspect':function(){const _0x5d8a82=_0x90af35;return _0x34184c[_0x5d8a82(0x1ae)]/_0x34184c['drawingBufferHeight'];},'pixelSize':function(){return _0x34ee91['pixelSize'];},'lineWidth':function(){return _0x2b52da['lineWidth'];},'particleHeight':function(){const _0x20ae3e=_0x90af35;return _0x2b52da[_0x20ae3e(0x1e8)];}},'vertexShaderSource':new Cesium$4[(_0x90af35(0x165))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x90af35(0x1b6)](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0xc257ec['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x301063=_0x90af35;return _0xc257ec['textures'][_0x301063(0x114)];},'currentTrailsColor':function(){const _0x4f152c=_0x90af35;return _0xc257ec['framebuffers']['currentTrails'][_0x4f152c(0x19b)](0x0);},'trailsDepthTexture':function(){const _0x2d4553=_0x90af35;return _0xc257ec[_0x2d4553(0x169)][_0x2d4553(0x198)]['depthTexture'];},'fadeOpacity':function(){return _0x2b52da['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x90af35(0x165))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x15bed4=_0x90af35,_0x7767fc=_0xc257ec['framebuffers'][_0x15bed4(0x198)];_0xc257ec[_0x15bed4(0x169)]['currentTrails']=_0xc257ec['framebuffers']['nextTrails'],_0xc257ec[_0x15bed4(0x169)]['nextTrails']=_0x7767fc,_0xc257ec['primitives']['trails'][_0x15bed4(0x177)]['framebuffer']=_0xc257ec['framebuffers']['nextTrails'],_0xc257ec[_0x15bed4(0x19d)]['trails'][_0x15bed4(0x173)][_0x15bed4(0x207)]=_0xc257ec[_0x15bed4(0x169)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x1a6419=_0x90af35;return _0xc257ec['framebuffers']['nextTrails'][_0x1a6419(0x19b)](0x0);},'trailsDepthTexture':function(){const _0x194511=_0x90af35;return _0xc257ec[_0x194511(0x169)]['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x90af35(0x165))]({'defines':[_0x90af35(0x18f)],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x90af35(0x1f6)]({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag=_0x2156a7(0x17a),postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';function _0x2908(){const _0x56966e=['_speedRate','lat','getWind','GeometryAttribute','Draw','grid','__esModule','toDegrees','floor','_canrefresh','_pointerEvents','setDate','mouse_down','wheel','2327112RPZVve','PixelDatatype','auto','Matrix4','SceneMode','worker','setOptions','IDENTITY','lng','clear','forEach','autoClear','CanvasWindField','Sampler','postProcessingSpeed','_setOptionsHook','scene','ellipsoid','colors','outputTexture','abs','cols','Framebuffer','remove','windData','lon','Compute','fromDegrees','age','mode','mouseMove','_updateIng2','_onMap_preRenderEvent','ymax','length','mouseHidden','_map','context','width','getColor','sqrt','particles','LINEAR','preExecute','min','vertexArray','getExtent','xmin','rows','clientWidth','atan2','animateFrame','getUVByPoint','ShaderSource','segments','CanvasWindLayer','RGB','framebuffers','data','destroy','fixedHeight','SCENE3D','postProcessingPosition','pointerEvents','956JqYZYZ','steps','TextureMinificationFilter','clearCommand','OPAQUE','textures','colorTable','commandToExecute','stroke','viewport','uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a','canvasWidth','lineWidth','getPixelSize','Pass','source','4958422FtJQYg','currentParticlesSpeed','lev','visibility','RenderState','TRIANGLES','top','position','GeometryAttributes','_onMouseUpEvent','defineProperty','403VTpsEy','createWindTextures','update','particlesTextures','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','vmax','add','drawingBufferHeight','vdata','_removedHook','removeEventListener','windField','options','currentTrails','blue','32637290hafVhA','getColorTexture','432oxcMQF','primitives','depthMask','depthTest','canvasContext','hidden','viewerParameters','toRadians','EventType','max','dropRateBump','speedRate','show','canvasResize','speed','all','STATIC_DRAW','particlesRendering','drawingBufferWidth','ymin','currentParticlesPosition','THREE_PI_OVER_TWO','TWO_PI','postMessage','dimensions','TextureMagnificationFilter','getFullscreenQuad','setData','container','5046536wJZILL','getDefaultRenderState','PrimitiveType','visible','vertexShaderSource','push','NEAREST','udata','lonRange','7269uaXFoF','createParticlesTextures','attributeLocations','absolute','tlat','commandType','uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a','Texture','WindLayer','createRenderingPrimitives','off','particlesNumber','initWorker','frameTime','positionWC','49188FyHIth','canvasHeight','strokeStyle','geometry','rawRenderState','Cartesian2','BaseLayer','rgb(206,255,255)','PixelFormat','Cartesian3','particlesWind','resize','mouseDown','465aAizdM','Math','uniformMap','FLOAT','mouseUp','getOptions','particlesComputing','refreshParticles','onmessage','fromGeometry','particleHeight','particlesTextureSize','Cesium','maxParticles','isPointVisible','globeBoundingSphere','_drawLines','_addedHook','primitiveType','canvas','createTexture','maxAge','VertexArray','particleSystem','createRawRenderState','xmax','addEventListener','_data','Color','_onMapWhellEvent','createSegmentsGeometry','getUVByXY','fadeOpacity','UNSIGNED_BYTE','height','init','clampToLatitudeRange','array','canrefresh','windTextures','fragmentShaderSource','framebuffer','clientHeight','style','_onMouseMoveEvent','camera','_bilinearInterpolation','segmentsDepth','reverseY','_tomap','updatePosition','beginPath','umin','redraw','_onMouseDownEvent','applyViewerParameters','keys','ComponentDatatype','mod','_mountedHook','mouse_move'];_0x2908=function(){return _0x56966e;};return _0x2908();}const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x4fbda8,_0x39c6d0,_0x2a7aee,_0x1866ac){const _0x52e0e7=_0x2156a7;this['data']=_0x39c6d0,this[_0x52e0e7(0x18c)](_0x4fbda8,_0x39c6d0),this['createParticlesTextures'](_0x4fbda8,_0x2a7aee,_0x1866ac),this['createComputingPrimitives'](_0x39c6d0,_0x2a7aee,_0x1866ac);}['createWindTextures'](_0x135c2d,_0x16ec37){const _0x5a6338=_0x2156a7,_0x6f206f={'context':_0x135c2d,'width':_0x16ec37[_0x5a6338(0x1b4)][_0x5a6338(0x149)],'height':_0x16ec37['dimensions']['lat']*(_0x16ec37[_0x5a6338(0x1b4)]['lev']||0x1),'pixelFormat':Cesium$3[_0x5a6338(0x1d9)]['LUMINANCE'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x5a6338(0x13d))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x5a6338(0x1bf)]})};this['windTextures']={'U':Util['createTexture'](_0x6f206f,_0x16ec37['U'][_0x5a6338(0x203)]),'V':Util['createTexture'](_0x6f206f,_0x16ec37['V'][_0x5a6338(0x203)])};}['createParticlesTextures'](_0x22905e,_0x353546,_0x16167d){const _0xa6d1c1=_0x2156a7,_0x7ebc18={'context':_0x22905e,'width':_0x353546[_0xa6d1c1(0x1e9)],'height':_0x353546['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0xa6d1c1(0x13d))]({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0xa6d1c1(0x1bf)],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0xa6d1c1(0x1bf)]})},_0x1f6b5e=this['randomizeParticles'](_0x353546[_0xa6d1c1(0x1eb)],_0x16167d),_0x3ebc8b=new Float32Array(0x4*_0x353546['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x7ebc18),'currentParticlesPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'nextParticlesPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'currentParticlesSpeed':Util[_0xa6d1c1(0x1f2)](_0x7ebc18,_0x3ebc8b),'nextParticlesSpeed':Util['createTexture'](_0x7ebc18,_0x3ebc8b),'postProcessingPosition':Util['createTexture'](_0x7ebc18,_0x1f6b5e),'postProcessingSpeed':Util['createTexture'](_0x7ebc18,_0x3ebc8b)};}['randomizeParticles'](_0x115665,_0x255cb9){const _0x23d148=_0x2156a7,_0xb713db=new Float32Array(0x4*_0x115665);for(let _0x262df8=0x0;_0x262df8<_0x115665;_0x262df8++){_0xb713db[0x4*_0x262df8]=Cesium$3['Math']['randomBetween'](_0x255cb9['lonRange']['x'],_0x255cb9['lonRange']['y']),_0xb713db[0x4*_0x262df8+0x1]=Cesium$3[_0x23d148(0x1df)]['randomBetween'](_0x255cb9['latRange']['x'],_0x255cb9['latRange']['y']),_0xb713db[0x4*_0x262df8+0x2]=Cesium$3['Math']['randomBetween'](this['data']['lev']['min'],this['data']['lev']['max']),_0xb713db[0x4*_0x262df8+0x3]=0x0;}return _0xb713db;}['destroyParticlesTextures'](){const _0x22c37e=_0x2156a7;Object['keys'](this['particlesTextures'])[_0x22c37e(0x13a)](_0x5d3e66=>{this['particlesTextures'][_0x5d3e66]['destroy']();});}['createComputingPrimitives'](_0x421fae,_0x3919dd,_0x50c952){const _0x26de1a=_0x2156a7,_0x3735f3=new Cesium$3['Cartesian3'](_0x421fae['dimensions']['lon'],_0x421fae['dimensions']['lat'],_0x421fae['dimensions'][_0x26de1a(0x182)]),_0x82e48b=new Cesium$3['Cartesian3'](_0x421fae['lon']['min'],_0x421fae['lat']['min'],_0x421fae[_0x26de1a(0x182)]['min']),_0x49083e=new Cesium$3['Cartesian3'](_0x421fae['lon']['max'],_0x421fae['lat']['max'],_0x421fae['lev'][_0x26de1a(0x1a5)]),_0x40f28a=new Cesium$3['Cartesian3']((_0x49083e['x']-_0x82e48b['x'])/(_0x3735f3['x']-0x1),(_0x49083e['y']-_0x82e48b['y'])/(_0x3735f3['y']-0x1),_0x3735f3['z']>0x1?(_0x49083e['z']-_0x82e48b['z'])/(_0x3735f3['z']-0x1):0x1),_0x5bbca3=new Cesium$3[(_0x26de1a(0x1d6))](_0x421fae['U'][_0x26de1a(0x15c)],_0x421fae['U'][_0x26de1a(0x1a5)]),_0x511681=new Cesium$3['Cartesian2'](_0x421fae['V']['min'],_0x421fae['V'][_0x26de1a(0x1a5)]),_0x3be6b0=this;this[_0x26de1a(0x19d)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x3be6b0['windTextures']['U'];},'V':function(){return _0x3be6b0['windTextures']['V'];},'currentParticlesPosition':function(){const _0x2b444c=_0x26de1a;return _0x3be6b0[_0x2b444c(0x18e)]['currentParticlesPosition'];},'dimension':function(){return _0x3735f3;},'minimum':function(){return _0x82e48b;},'maximum':function(){return _0x49083e;},'interval':function(){return _0x40f28a;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures'][_0x26de1a(0x1db)],'preExecute':function(){const _0x35694f=_0x26de1a;_0x3be6b0['primitives']['getWind'][_0x35694f(0x177)]['outputTexture']=_0x3be6b0['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x26557a=_0x26de1a;return _0x3be6b0['particlesTextures'][_0x26557a(0x181)];},'particlesWind':function(){const _0x32f760=_0x26de1a;return _0x3be6b0[_0x32f760(0x18e)][_0x32f760(0x1db)];},'uSpeedRange':function(){return _0x5bbca3;},'vSpeedRange':function(){return _0x511681;},'pixelSize':function(){return _0x50c952['pixelSize'];},'speedFactor':function(){return _0x3919dd['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x3d9025=_0x26de1a,_0x2e20f1=_0x3be6b0['particlesTextures']['currentParticlesSpeed'];_0x3be6b0['particlesTextures']['currentParticlesSpeed']=_0x3be6b0['particlesTextures']['postProcessingSpeed'],_0x3be6b0[_0x3d9025(0x18e)]['postProcessingSpeed']=_0x2e20f1,_0x3be6b0['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x3be6b0['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x3be6b0['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x454adb=_0x26de1a;return _0x3be6b0['particlesTextures'][_0x454adb(0x181)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x448734=_0x26de1a,_0x330b4b=_0x3be6b0[_0x448734(0x18e)][_0x448734(0x1b0)];_0x3be6b0[_0x448734(0x18e)]['currentParticlesPosition']=_0x3be6b0['particlesTextures']['postProcessingPosition'],_0x3be6b0['particlesTextures']['postProcessingPosition']=_0x330b4b,_0x3be6b0['primitives'][_0x448734(0x117)][_0x448734(0x177)][_0x448734(0x143)]=_0x3be6b0['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x3be6b0['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x3be6b0['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x5a23c8=_0x26de1a;return _0x50c952[_0x5a23c8(0x1c1)];},'latRange':function(){return _0x50c952['latRange'];},'randomCoefficient':function(){const _0x275af5=Math['random']();return _0x275af5;},'dropRate':function(){return _0x3919dd['dropRate'];},'dropRateBump':function(){const _0xae8ebb=_0x26de1a;return _0x3919dd[_0xae8ebb(0x1a6)];}},'fragmentShaderSource':new Cesium$3[(_0x26de1a(0x165))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x26de1a(0x18e)][_0x26de1a(0x16e)],'preExecute':function(){const _0x799650=_0x26de1a;_0x3be6b0['primitives'][_0x799650(0x16e)]['commandToExecute'][_0x799650(0x143)]=_0x3be6b0[_0x799650(0x18e)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x3be6b0['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x3be6b0['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x21f5f9=_0x26de1a;_0x3be6b0[_0x21f5f9(0x19d)]['postProcessingSpeed'][_0x21f5f9(0x177)]['outputTexture']=_0x3be6b0['particlesTextures'][_0x21f5f9(0x13e)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x1471ba,_0x4134f8,_0xce899d,_0x4da672){const _0x4c99d0=_0x2156a7;this['context']=_0x1471ba,_0x4134f8={..._0x4134f8},_0x4134f8[_0x4c99d0(0x1c0)]&&_0x4134f8['vdata']&&(_0x4134f8[_0x4c99d0(0x1b4)]={},_0x4134f8['dimensions']['lon']=_0x4134f8['cols'],_0x4134f8['dimensions']['lat']=_0x4134f8['rows'],_0x4134f8['dimensions']['lev']=_0x4134f8[_0x4c99d0(0x182)]||0x1,_0x4134f8[_0x4c99d0(0x149)]={},_0x4134f8[_0x4c99d0(0x149)]['min']=_0x4134f8['xmin'],_0x4134f8['lon'][_0x4c99d0(0x1a5)]=_0x4134f8[_0x4c99d0(0x1f7)],_0x4134f8['lat']={},_0x4134f8[_0x4c99d0(0x123)]['min']=_0x4134f8['ymin'],_0x4134f8['lat'][_0x4c99d0(0x1a5)]=_0x4134f8['ymax'],_0x4134f8['lev']={},_0x4134f8[_0x4c99d0(0x182)]['min']=_0x4134f8['levmin']??0x1,_0x4134f8['lev']['max']=_0x4134f8['levmax']??0x1,_0x4134f8['U']={},_0x4134f8['U']['array']=new Float32Array(_0x4134f8['udata']),_0x4134f8['U']['min']=_0x4134f8[_0x4c99d0(0x119)]??Math['min'](..._0x4134f8['udata']),_0x4134f8['U'][_0x4c99d0(0x1a5)]=_0x4134f8['umax']??Math['max'](..._0x4134f8['udata']),_0x4134f8['V']={},_0x4134f8['V']['array']=new Float32Array(_0x4134f8['vdata']),_0x4134f8['V']['min']=_0x4134f8['vmin']??Math['min'](..._0x4134f8['vdata']),_0x4134f8['V']['max']=_0x4134f8[_0x4c99d0(0x190)]??Math['max'](..._0x4134f8[_0x4c99d0(0x193)])),this['data']=_0x4134f8,this[_0x4c99d0(0x197)]=_0xce899d,this['viewerParameters']=_0x4da672,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this[_0x4c99d0(0x16a)],this[_0x4c99d0(0x197)],this['viewerParameters'],this[_0x4c99d0(0x1e4)]);}['canvasResize'](_0x394457){const _0xd8de5c=_0x2156a7;this['particlesComputing']['destroyParticlesTextures'](),Object[_0xd8de5c(0x11d)](this['particlesComputing'][_0xd8de5c(0x205)])['forEach'](_0x1a2172=>{const _0x20deb5=_0xd8de5c;this[_0x20deb5(0x1e4)]['windTextures'][_0x1a2172][_0x20deb5(0x16b)]();}),this[_0xd8de5c(0x1ad)]['textures'][_0xd8de5c(0x176)]['destroy'](),Object['keys'](this[_0xd8de5c(0x1ad)]['framebuffers'])['forEach'](_0x5f0d11=>{const _0x1ca995=_0xd8de5c;this[_0x1ca995(0x1ad)]['framebuffers'][_0x5f0d11]['destroy']();}),this['context']=_0x394457,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0xd8de5c(0x1a2)]),this[_0xd8de5c(0x1ad)]=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x43c5d6=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0x290b37=>{_0x43c5d6['framebuffer']=this['particlesRendering']['framebuffers'][_0x290b37],_0x43c5d6['execute'](this['context']);});}[_0x2156a7(0x1e5)](_0x365dff){const _0x2b0b84=_0x2156a7;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this[_0x2b0b84(0x1e4)][_0x2b0b84(0x1c3)](this[_0x2b0b84(0x155)],this['options'],this['viewerParameters']);if(_0x365dff){var _0x26a33b,_0x52ade3;const _0x603e6c=this['particlesRendering']['createSegmentsGeometry'](this['options']);this[_0x2b0b84(0x1ad)]['primitives']['segments']['geometry']=_0x603e6c;const _0x483df5=Cesium$2[_0x2b0b84(0x1f4)][_0x2b0b84(0x1e7)]({'context':this['context'],'geometry':_0x603e6c,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});(_0x26a33b=this['particlesRendering'][_0x2b0b84(0x19d)])!==null&&_0x26a33b!==void 0x0&&(_0x52ade3=_0x26a33b['segments'])!==null&&_0x52ade3!==void 0x0&&_0x52ade3['commandToExecute']&&(this['particlesRendering']['primitives'][_0x2b0b84(0x166)][_0x2b0b84(0x177)]['vertexArray']=_0x483df5);}}['setOptions'](_0x1bb046){const _0x78b6ed=_0x2156a7;let _0x28175c=![];this['options']['maxParticles']!==_0x1bb046[_0x78b6ed(0x1eb)]&&(_0x28175c=!![]),Object[_0x78b6ed(0x11d)](_0x1bb046)['forEach'](_0x588f3c=>{this['options'][_0x588f3c]=_0x1bb046[_0x588f3c];}),this['refreshParticles'](_0x28175c);}['applyViewerParameters'](_0x39f194){const _0x5e0298=_0x2156a7;Object['keys'](_0x39f194)['forEach'](_0x26d901=>{const _0x394db5=_0x4707;this[_0x394db5(0x1a2)][_0x26d901]=_0x39f194[_0x26d901];}),this[_0x5e0298(0x1e5)](![]);}['destroy'](){const _0x3dba78=_0x2156a7;clearTimeout(this[_0x3dba78(0x204)]),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x3dba78(0x1e4)]['windTextures'])['forEach'](_0x2f0565=>{const _0x38a432=_0x3dba78;this[_0x38a432(0x1e4)]['windTextures'][_0x2f0565]['destroy']();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this[_0x3dba78(0x1ad)]['framebuffers'])['forEach'](_0x4edc46=>{this['particlesRendering']['framebuffers'][_0x4edc46]['destroy']();});for(const _0x313025 in this){delete this[_0x313025];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':[_0x2156a7(0x1d8)]};class WindLayer extends BaseLayer$1{constructor(_0x4b5d13={}){_0x4b5d13={...DEF_OPTIONS,..._0x4b5d13},super(_0x4b5d13),this['_setOptionsHook'](_0x4b5d13);}get['layer'](){return this['primitives'];}get['data'](){const _0x1893d1=_0x2156a7;return this[_0x1893d1(0x1f9)];}set['data'](_0x2819df){const _0x5c1f69=_0x2156a7;this[_0x5c1f69(0x1b7)](_0x2819df);}get[_0x2156a7(0x142)](){const _0x2243f2=_0x2156a7;return this[_0x2243f2(0x197)]['colors'];}set['colors'](_0x17a8e4){const _0x495346=_0x2156a7;this[_0x495346(0x197)]['colors']=_0x17a8e4,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x17a8e4}),this['resize']();}[_0x2156a7(0x120)](){}[_0x2156a7(0x1ef)](){const _0x48ba94=_0x2156a7;this[_0x48ba94(0x140)]=this['_map']['scene'],this[_0x48ba94(0x20b)]=this['_map'][_0x48ba94(0x20b)],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives'][_0x48ba94(0x191)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1[(_0x48ba94(0x1d6))](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x48ba94(0x1ed)]=new Cesium$1['BoundingSphere'](Cesium$1[_0x48ba94(0x1da)]['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window[_0x48ba94(0x1f8)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x48ba94(0x154)]['on'](mars3d__namespace['EventType']['mouseDown'],this[_0x48ba94(0x11b)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x48ba94(0x14e)],this[_0x48ba94(0x20a)],this),this['_data']&&this[_0x48ba94(0x1b7)](this['_data']);}[_0x2156a7(0x194)](){const _0x31e695=_0x2156a7;window[_0x31e695(0x195)]('resize',this['resize']),this['_map']['off'](mars3d__namespace['EventType']['preRender'],this[_0x31e695(0x150)],this),this[_0x31e695(0x154)]['off'](mars3d__namespace['EventType'][_0x31e695(0x12f)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this[_0x31e695(0x189)],this),this[_0x31e695(0x154)]['off'](mars3d__namespace['EventType'][_0x31e695(0x14e)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this['_map']['scene']['primitives'][_0x31e695(0x147)](this['primitives']);}['resize'](){const _0x6e1712=_0x2156a7;if(!this[_0x6e1712(0x1a8)]||!this[_0x6e1712(0x1f5)])return;this[_0x6e1712(0x19d)][_0x6e1712(0x1a8)]=![],this[_0x6e1712(0x19d)]['removeAll'](),this[_0x6e1712(0x154)]['once'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}[_0x2156a7(0x150)](_0x124d6c){const _0x6e3749=_0x2156a7;this['particleSystem'][_0x6e3749(0x1a9)](this['scene'][_0x6e3749(0x155)]),this['addPrimitives'](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x35d5a9){const _0xcca857=_0x2156a7;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0xcca857(0x1f5)])return;this[_0xcca857(0x19d)]['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x7f33){const _0x20e988=_0x2156a7;this[_0x20e988(0x12e)]=!![];}['_onMouseMoveEvent'](_0x3f64d1){const _0x927fce=_0x2156a7;if(!this['show']||!this['particleSystem'])return;this[_0x927fce(0x12e)]&&(this['primitives'][_0x927fce(0x1a8)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5bf4bd){const _0xeb1e87=_0x2156a7;if(!this['show']||!this[_0xeb1e87(0x1f5)])return;this[_0xeb1e87(0x12e)]&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this[_0xeb1e87(0x121)]=![];}['redraw'](){const _0x1cb3a0=_0x2156a7;if(!this[_0x1cb3a0(0x154)]||!this['show'])return;this['updateViewerParameters'](),this['particleSystem'][_0x1cb3a0(0x11c)](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x26849b){const _0x15047d=_0x2156a7;this['_data']=_0x26849b,this['particleSystem']&&this['particleSystem']['destroy'](),this[_0x15047d(0x1f5)]=new ParticleSystem(this['scene']['context'],_0x26849b,this[_0x15047d(0x1e3)](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x2c11a6,_0x2f399c){const _0x4b34ea=_0x2156a7;if(_0x2c11a6)for(const _0x1b7b60 in _0x2c11a6){this[_0x1b7b60]=_0x2c11a6[_0x1b7b60];}this[_0x4b34ea(0x1f5)]&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x596fb3=_0x2156a7,_0x118ba5=Math['ceil'](Math['sqrt'](this[_0x596fb3(0x1cd)]));return this['particlesNumber']=_0x118ba5*_0x118ba5,{'particlesTextureSize':_0x118ba5,'maxParticles':this['particlesNumber'],'particleHeight':this[_0x596fb3(0x16c)],'fadeOpacity':this[_0x596fb3(0x1fe)],'dropRate':this['dropRate'],'dropRateBump':this[_0x596fb3(0x1a6)],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x2ec673=_0x2156a7;this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x2ec673(0x19d)][_0x2ec673(0x124)]),this['primitives']['add'](this[_0x2ec673(0x1f5)]['particlesComputing']['primitives']['updateSpeed']),this[_0x2ec673(0x19d)]['add'](this[_0x2ec673(0x1f5)]['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem'][_0x2ec673(0x1e4)]['primitives']['postProcessingPosition']),this['primitives'][_0x2ec673(0x191)](this['particleSystem']['particlesComputing'][_0x2ec673(0x19d)]['postProcessingSpeed']),this[_0x2ec673(0x19d)]['add'](this[_0x2ec673(0x1f5)]['particlesRendering'][_0x2ec673(0x19d)]['segments']),this[_0x2ec673(0x19d)]['add'](this['particleSystem']['particlesRendering'][_0x2ec673(0x19d)]['trails']),this['primitives'][_0x2ec673(0x191)](this[_0x2ec673(0x1f5)]['particlesRendering']['primitives']['screen']);}['updateViewerParameters'](){const _0xd5abb9=_0x2156a7;let _0x5ea35d=this['camera']['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x5ea35d){const _0x474e0d=this[_0xd5abb9(0x154)][_0xd5abb9(0x15e)]();_0x5ea35d=Cesium$1['Rectangle']['fromDegrees'](_0x474e0d['xmin'],_0x474e0d[_0xd5abb9(0x1af)],_0x474e0d['xmax'],_0x474e0d[_0xd5abb9(0x151)]);}const _0x191392=Util['viewRectangleToLonLatRange'](_0x5ea35d);this['viewerParameters']['lonRange']['x']=_0x191392[_0xd5abb9(0x149)][_0xd5abb9(0x15c)],this['viewerParameters']['lonRange']['y']=_0x191392[_0xd5abb9(0x149)]['max'],this[_0xd5abb9(0x1a2)]['latRange']['x']=_0x191392[_0xd5abb9(0x123)]['min'],this[_0xd5abb9(0x1a2)]['latRange']['y']=_0x191392['lat']['max'];const _0x345da8=this['camera'][_0xd5abb9(0x17d)](this[_0xd5abb9(0x1ed)],this['scene']['drawingBufferWidth'],this[_0xd5abb9(0x140)][_0xd5abb9(0x192)]);_0x345da8>0x0&&(this['viewerParameters']['pixelSize']=_0x345da8);}}function _0x4707(_0x388f15,_0x2e20b8){const _0x2908eb=_0x2908();return _0x4707=function(_0x4707ef,_0x2851c2){_0x4707ef=_0x4707ef-0x114;let _0x3ffc22=_0x2908eb[_0x4707ef];return _0x3ffc22;},_0x4707(_0x388f15,_0x2e20b8);}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer'][_0x2156a7(0x1ca)]=WindLayer;class CanvasParticle{constructor(){const _0x330629=_0x2156a7;this['lng']=null,this['lat']=null,this['tlng']=null,this[_0x330629(0x1c6)]=null,this[_0x330629(0x14c)]=null,this['speed']=null;}['destroy'](){for(const _0x191755 in this){delete this[_0x191755];}}}class CanvasWindField{constructor(_0x59a3b2){const _0x3ce213=_0x2156a7;this[_0x3ce213(0x136)](_0x59a3b2);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x1f4b16){const _0x4231a1=_0x2156a7;this['_speedRate']=(0x64-(_0x1f4b16>0x63?0x63:_0x1f4b16))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x4231a1(0x15f)])/this[_0x4231a1(0x122)],(this['ymax']-this['ymin'])/this[_0x4231a1(0x122)]];}get[_0x2156a7(0x1f3)](){return this['_maxAge'];}set['maxAge'](_0x165c06){this['_maxAge']=_0x165c06;}['setOptions'](_0x2cc53a){const _0x73194c=_0x2156a7;this[_0x73194c(0x197)]=_0x2cc53a,this['maxAge']=_0x2cc53a['maxAge']||0x78,this[_0x73194c(0x1a7)]=_0x2cc53a['speedRate']||0x32,this['particles']=[];const _0x3dcc71=_0x2cc53a['particlesNumber']||0x1000;for(let _0x4d45c5=0x0;_0x4d45c5<_0x3dcc71;_0x4d45c5++){const _0x8f2cc4=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x8f2cc4);}}[_0x2156a7(0x12d)](_0x32b794){const _0x1ce269=_0x2156a7;this['rows']=_0x32b794['rows'],this[_0x1ce269(0x145)]=_0x32b794['cols'],this['xmin']=_0x32b794['xmin'],this['xmax']=_0x32b794[_0x1ce269(0x1f7)],this['ymin']=_0x32b794['ymin'],this['ymax']=_0x32b794['ymax'],this['grid']=[];const _0x4c6b54=_0x32b794['udata'],_0x1589c0=_0x32b794['vdata'];let _0x19e477=![];_0x4c6b54['length']===this[_0x1ce269(0x160)]&&_0x4c6b54[0x0][_0x1ce269(0x152)]===this['cols']&&(_0x19e477=!![]);let _0x5a14d6=0x0,_0x980f39=null,_0x4c96bf=null;for(let _0x533ac6=0x0;_0x533ac6<this['rows'];_0x533ac6++){_0x980f39=[];for(let _0x44549b=0x0;_0x44549b<this['cols'];_0x44549b++,_0x5a14d6++){_0x19e477?_0x4c96bf=this['_calcUV'](_0x4c6b54[_0x533ac6][_0x44549b],_0x1589c0[_0x533ac6][_0x44549b]):_0x4c96bf=this['_calcUV'](_0x4c6b54[_0x5a14d6],_0x1589c0[_0x5a14d6]),_0x980f39[_0x1ce269(0x1be)](_0x4c96bf);}this[_0x1ce269(0x127)][_0x1ce269(0x1be)](_0x980f39);}this[_0x1ce269(0x197)]['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x1d072f=_0x2156a7;delete this['rows'],delete this['cols'],delete this[_0x1d072f(0x15f)],delete this[_0x1d072f(0x1f7)],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x4bd175,_0x457a95){const _0x48425d=_0x2156a7,_0x47bc38=(_0x4bd175-this['xmin'])/(this['xmax']-this['xmin'])*(this[_0x48425d(0x145)]-0x1),_0x417a0d=(this[_0x48425d(0x151)]-_0x457a95)/(this[_0x48425d(0x151)]-this['ymin'])*(this['rows']-0x1);return[_0x47bc38,_0x417a0d];}['getUVByXY'](_0x2eb6a7,_0x177a11){const _0x19119c=_0x2156a7;if(_0x2eb6a7<0x0||_0x2eb6a7>=this['cols']||_0x177a11>=this['rows'])return[0x0,0x0,0x0];const _0x328668=Math['floor'](_0x2eb6a7),_0x399750=Math[_0x19119c(0x12a)](_0x177a11);if(_0x328668===_0x2eb6a7&&_0x399750===_0x177a11)return this['grid'][_0x177a11][_0x2eb6a7];const _0x1be07a=_0x328668+0x1,_0xd0ff66=_0x399750+0x1,_0x48c7da=this['getUVByXY'](_0x328668,_0x399750),_0x42c793=this['getUVByXY'](_0x1be07a,_0x399750),_0x5d4800=this[_0x19119c(0x1fd)](_0x328668,_0xd0ff66),_0xb5f156=this[_0x19119c(0x1fd)](_0x1be07a,_0xd0ff66);let _0x2f623b=null;try{_0x2f623b=this[_0x19119c(0x20c)](_0x2eb6a7-_0x328668,_0x177a11-_0x399750,_0x48c7da,_0x42c793,_0x5d4800,_0xb5f156);}catch(_0x98110b){console['log'](_0x2eb6a7,_0x177a11);}return _0x2f623b;}['_bilinearInterpolation'](_0x1977c7,_0x2f4d14,_0x4ad994,_0x3cfc3a,_0x4063b9,_0x15baaf){const _0x1862ac=0x1-_0x1977c7,_0x434565=0x1-_0x2f4d14,_0x44ad57=_0x1862ac*_0x434565,_0x4af553=_0x1977c7*_0x434565,_0x10dbc4=_0x1862ac*_0x2f4d14,_0x551e89=_0x1977c7*_0x2f4d14,_0x17f93e=_0x4ad994[0x0]*_0x44ad57+_0x3cfc3a[0x0]*_0x4af553+_0x4063b9[0x0]*_0x10dbc4+_0x15baaf[0x0]*_0x551e89,_0x1fdc8f=_0x4ad994[0x1]*_0x44ad57+_0x3cfc3a[0x1]*_0x4af553+_0x4063b9[0x1]*_0x10dbc4+_0x15baaf[0x1]*_0x551e89;return this['_calcUV'](_0x17f93e,_0x1fdc8f);}['_calcUV'](_0x37ed19,_0x5e6ef7){const _0x4322a3=_0x2156a7;return[+_0x37ed19,+_0x5e6ef7,Math[_0x4322a3(0x158)](_0x37ed19*_0x37ed19+_0x5e6ef7*_0x5e6ef7)];}['getUVByPoint'](_0x121f5c,_0x3c7f61){if(!this['isInExtent'](_0x121f5c,_0x3c7f61))return null;const _0xfdb291=this['toGridXY'](_0x121f5c,_0x3c7f61),_0x17aa45=this['getUVByXY'](_0xfdb291[0x0],_0xfdb291[0x1]);return _0x17aa45;}['isInExtent'](_0x436bc6,_0x3e8cd8){const _0x12c327=_0x2156a7;return _0x436bc6>=this[_0x12c327(0x15f)]&&_0x436bc6<=this['xmax']&&_0x3e8cd8>=this['ymin']&&_0x3e8cd8<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x4e553c=fRandomByfloat(this['xmin'],this['xmax']),_0x127889=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x127889,'lng':_0x4e553c};}['getParticles'](){const _0x5cf21e=_0x2156a7;let _0x30d42d,_0x51b1ed,_0x4a799c;for(let _0x1fdac2=0x0,_0x5d6abb=this['particles'][_0x5cf21e(0x152)];_0x1fdac2<_0x5d6abb;_0x1fdac2++){let _0x254f08=this['particles'][_0x1fdac2];_0x254f08['age']<=0x0&&(_0x254f08=this['_randomParticle'](_0x254f08));if(_0x254f08['age']>0x0){const _0x3d9047=_0x254f08['tlng'],_0x55e54b=_0x254f08[_0x5cf21e(0x1c6)];_0x4a799c=this[_0x5cf21e(0x164)](_0x3d9047,_0x55e54b),_0x4a799c?(_0x30d42d=_0x3d9047+this['_calc_speedRate'][0x0]*_0x4a799c[0x0],_0x51b1ed=_0x55e54b+this['_calc_speedRate'][0x1]*_0x4a799c[0x1],_0x254f08['lng']=_0x3d9047,_0x254f08['lat']=_0x55e54b,_0x254f08['tlng']=_0x30d42d,_0x254f08['tlat']=_0x51b1ed,_0x254f08[_0x5cf21e(0x1aa)]=_0x4a799c[0x2],_0x254f08['age']--):_0x254f08['age']=0x0;}}return this[_0x5cf21e(0x159)];}['_randomParticle'](_0x4f462b){const _0x3b5c1f=_0x2156a7;let _0x132dc6,_0x3ca113;for(let _0x3f4f81=0x0;_0x3f4f81<0x1e;_0x3f4f81++){_0x132dc6=this['getRandomLatLng'](),_0x3ca113=this['getUVByPoint'](_0x132dc6[_0x3b5c1f(0x138)],_0x132dc6['lat']);if(_0x3ca113&&_0x3ca113[0x2]>0x0)break;}if(!_0x3ca113)return _0x4f462b;const _0x59b9ba=_0x132dc6['lng']+this['_calc_speedRate'][0x0]*_0x3ca113[0x0],_0x5db756=_0x132dc6['lat']+this['_calc_speedRate'][0x1]*_0x3ca113[0x1];return _0x4f462b[_0x3b5c1f(0x138)]=_0x132dc6['lng'],_0x4f462b['lat']=_0x132dc6['lat'],_0x4f462b['tlng']=_0x59b9ba,_0x4f462b['tlat']=_0x5db756,_0x4f462b['age']=Math['round'](Math['random']()*this['maxAge']),_0x4f462b['speed']=_0x3ca113[0x2],_0x4f462b;}[_0x2156a7(0x16b)](){for(const _0x286a36 in this){delete this[_0x286a36];}}}function fRandomByfloat(_0x53ad73,_0x190414){return _0x53ad73+Math['random']()*(_0x190414-_0x53ad73);}const Cesium=mars3d__namespace[_0x2156a7(0x1ea)],BaseLayer=mars3d__namespace['layer'][_0x2156a7(0x1d7)];class CanvasWindLayer extends BaseLayer{constructor(_0x19d0fe={}){const _0x24d091=_0x2156a7;super(_0x19d0fe),this[_0x24d091(0x13f)](_0x19d0fe),this['canvas']=null,_0x19d0fe['colors']&&_0x19d0fe[_0x24d091(0x171)]&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x19d0fe));}['_setOptionsHook'](_0x8a3e05,_0x3b9cdb){const _0x492f04=_0x2156a7;this['frameTime']=0x3e8/(_0x8a3e05['frameRate']||0xa),this[_0x492f04(0x12c)]=this['options']['pointerEvents']??![],this['color']=_0x8a3e05['color']||'#ffffff',this['lineWidth']=_0x8a3e05[_0x492f04(0x17c)]||0x1,this['fixedHeight']=_0x8a3e05['fixedHeight']??0x0,this['reverseY']=_0x8a3e05[_0x492f04(0x115)]??![],this[_0x492f04(0x196)]&&this[_0x492f04(0x196)]['setOptions'](_0x8a3e05);}get['layer'](){const _0x248c98=_0x2156a7;return this[_0x248c98(0x1f1)];}get[_0x2156a7(0x17b)](){const _0x4a7242=_0x2156a7;return this[_0x4a7242(0x154)]['scene']['canvas'][_0x4a7242(0x161)];}get[_0x2156a7(0x1d2)](){const _0x41a0f0=_0x2156a7;return this['_map'][_0x41a0f0(0x140)]['canvas'][_0x41a0f0(0x208)];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0x2156a7(0x16f)](_0x125f7d){const _0x1a5eac=_0x2156a7;this['_pointerEvents']=_0x125f7d;if(!this['canvas'])return;_0x125f7d?this['canvas']['style']['pointer-events']=_0x1a5eac(0x1ab):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x59dbbe){const _0x578223=_0x2156a7;this['options'][_0x578223(0x1cd)]=_0x59dbbe,clearTimeout(this['_canrefresh']),this[_0x578223(0x12b)]=setTimeout(()=>{const _0x2cb539=_0x578223;this[_0x2cb539(0x11a)]();},0x1f4);}get['speedRate'](){const _0x412ce3=_0x2156a7;return this['options'][_0x412ce3(0x1a7)];}set[_0x2156a7(0x1a7)](_0x26dbb7){const _0x2e214c=_0x2156a7;this['options'][_0x2e214c(0x1a7)]=_0x26dbb7,this['windField']&&(this['windField']['speedRate']=_0x26dbb7);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x23fb92){this['options']['maxAge']=_0x23fb92,this['windField']&&(this['windField']['maxAge']=_0x23fb92);}get['data'](){return this['windData'];}set['data'](_0x55345e){const _0x29d818=_0x2156a7;this[_0x29d818(0x1b7)](_0x55345e);}['_showHook'](_0x29ec19){const _0x38d26f=_0x2156a7;_0x29ec19?this['_addedHook']():(this['windData']&&(this['options'][_0x38d26f(0x16a)]=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x153063=_0x2156a7;this['options'][_0x153063(0x135)]?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}[_0x2156a7(0x1ef)](){const _0x44b5e7=_0x2156a7;this['canvas']=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this[_0x44b5e7(0x197)][_0x44b5e7(0x16a)]&&this[_0x44b5e7(0x1b7)](this['options'][_0x44b5e7(0x16a)]);}[_0x2156a7(0x194)](){const _0x3f3386=_0x2156a7;this[_0x3f3386(0x139)](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this[_0x3f3386(0x1f1)]);}['_createCanvas'](){const _0x4b3a5d=_0x2156a7,_0x538c1d=mars3d__namespace['DomUtil']['create'](_0x4b3a5d(0x1f1),'mars3d-canvasWind',this['_map'][_0x4b3a5d(0x1b8)]);return _0x538c1d['style'][_0x4b3a5d(0x187)]=_0x4b3a5d(0x1c5),_0x538c1d['style'][_0x4b3a5d(0x186)]='0px',_0x538c1d['style']['left']='0px',_0x538c1d['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x538c1d['style']['height']=this['_map'][_0x4b3a5d(0x140)][_0x4b3a5d(0x1f1)]['clientHeight']+'px',_0x538c1d['style']['pointerEvents']=this['_pointerEvents']?_0x4b3a5d(0x132):'none',_0x538c1d['style']['zIndex']=this['options']['zIndex']??0x9,_0x538c1d[_0x4b3a5d(0x156)]=this[_0x4b3a5d(0x154)]['scene']['canvas']['clientWidth'],_0x538c1d['height']=this['_map']['scene'][_0x4b3a5d(0x1f1)]['clientHeight'],_0x538c1d;}['resize'](){const _0x1db8d0=_0x2156a7;this['canvas']&&(this[_0x1db8d0(0x1f1)]['style']['width']=this[_0x1db8d0(0x154)][_0x1db8d0(0x140)]['canvas']['clientWidth']+'px',this['canvas']['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',this['canvas']['width']=this['_map']['scene']['canvas']['clientWidth'],this['canvas'][_0x1db8d0(0x200)]=this['_map']['scene']['canvas']['clientHeight']);}['bindEvent'](){const _0xb00f25=_0x2156a7,_0x278b10=this;let _0x1d2ac0=Date['now']();(function _0x381664(){const _0x43fca8=_0x4707;_0x278b10['animateFrame']=window['requestAnimationFrame'](_0x381664);if(_0x278b10['show']&&_0x278b10[_0x43fca8(0x196)]){const _0x459a7d=Date['now'](),_0x164107=_0x459a7d-_0x1d2ac0;_0x164107>_0x278b10[_0x43fca8(0x1cf)]&&(_0x1d2ac0=_0x459a7d-_0x164107%_0x278b10['frameTime'],_0x278b10['update']());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options'][_0xb00f25(0x153)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0xb00f25(0x1a4)][_0xb00f25(0x1dd)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0xb00f25(0x1e2)],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x3087c3=_0x2156a7;window['cancelAnimationFrame'](this[_0x3087c3(0x163)]),delete this['animateFrame'],window['removeEventListener']('resize',this[_0x3087c3(0x1dc)]),this[_0x3087c3(0x197)]['mouseHidden']&&(this[_0x3087c3(0x154)]['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map'][_0x3087c3(0x1cc)](mars3d__namespace['EventType']['mouseDown'],this[_0x3087c3(0x11b)],this),this['_map']['off'](mars3d__namespace['EventType'][_0x3087c3(0x1e2)],this[_0x3087c3(0x189)],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this));}[_0x2156a7(0x1fb)](_0x3bd7f9){const _0x40819a=_0x2156a7;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas'][_0x40819a(0x209)][_0x40819a(0x183)]=_0x40819a(0x1a1),this['refreshTimer']=setTimeout(()=>{const _0x50a156=_0x40819a;if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']=_0x50a156(0x1bc);},0xc8);}['_onMouseDownEvent'](_0x39f619){const _0x10955a=_0x2156a7;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace[_0x10955a(0x1a4)][_0x10955a(0x14e)],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x10955a(0x20a)],this);}[_0x2156a7(0x20a)](_0x487f00){const _0x330b75=_0x2156a7;if(!this[_0x330b75(0x1a8)]||!this['canvas'])return;this['mouse_down']&&(this['canvas'][_0x330b75(0x209)]['visibility']='hidden',this['mouse_move']=!![]);}[_0x2156a7(0x189)](_0x2e61e4){const _0x474750=_0x2156a7;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace[_0x474750(0x1a4)]['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this[_0x474750(0x121)]&&this['redraw'](),this['canvas']['style']['visibility']='visible',this['mouse_down']=![],this[_0x474750(0x121)]=![];}[_0x2156a7(0x1b7)](_0x2c0093){const _0x5f53ad=_0x2156a7;this['clear'](),this[_0x5f53ad(0x148)]=_0x2c0093,this[_0x5f53ad(0x196)]['setDate'](_0x2c0093),this['redraw']();}['redraw'](){const _0x50dca2=_0x2156a7;if(!this['show'])return;this['windField']['setOptions'](this['options']),this[_0x50dca2(0x18d)]();}['update'](){const _0x1c440d=_0x2156a7;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this[_0x1c440d(0x196)]['update']();else{const _0x39935d=this['windField']['getParticles']();this['_drawLines'](_0x39935d);}this['_updateIng']=![];}[_0x2156a7(0x1ee)](_0x232945){const _0x31ae44=_0x2156a7;this['canvasContext']['globalCompositeOperation']='destination-in',this[_0x31ae44(0x1a0)]['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this[_0x31ae44(0x1a0)]['globalAlpha']=0.9;const _0x1a77bd=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0xe11e4f=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x28cbc0=0x0,_0x1b2cd7=_0x232945['length'];_0x28cbc0<_0x1b2cd7;_0x28cbc0++){const _0x1fda36=_0x232945[_0x28cbc0],_0x239cb3=this['_tomap'](_0x1fda36['lng'],_0x1fda36['lat'],_0x1fda36),_0x6ea21d=this['_tomap'](_0x1fda36['tlng'],_0x1fda36['tlat'],_0x1fda36);if(!_0x239cb3||!_0x6ea21d)continue;if(_0x1a77bd&&Math['abs'](_0x239cb3[0x0]-_0x6ea21d[0x0])>=_0xe11e4f)continue;this[_0x31ae44(0x1a0)]['beginPath'](),this[_0x31ae44(0x1a0)]['lineWidth']=this[_0x31ae44(0x17c)],this['canvasContext']['strokeStyle']=this['_colorRamp'][_0x31ae44(0x157)](_0x1fda36['speed']),this[_0x31ae44(0x1a0)]['moveTo'](_0x239cb3[0x0],_0x239cb3[0x1]),this['canvasContext']['lineTo'](_0x6ea21d[0x0],_0x6ea21d[0x1]),this['canvasContext'][_0x31ae44(0x178)]();}else{this['canvasContext'][_0x31ae44(0x118)](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext'][_0x31ae44(0x1d3)]=this['color'];for(let _0x53962e=0x0,_0x3fb8ce=_0x232945['length'];_0x53962e<_0x3fb8ce;_0x53962e++){const _0x1d8ae3=_0x232945[_0x53962e],_0x280574=this[_0x31ae44(0x116)](_0x1d8ae3['lng'],_0x1d8ae3['lat'],_0x1d8ae3),_0x1dc7a3=this['_tomap'](_0x1d8ae3['tlng'],_0x1d8ae3['tlat'],_0x1d8ae3);if(!_0x280574||!_0x1dc7a3)continue;if(_0x1a77bd&&Math[_0x31ae44(0x144)](_0x280574[0x0]-_0x1dc7a3[0x0])>=_0xe11e4f)continue;this[_0x31ae44(0x1a0)]['moveTo'](_0x280574[0x0],_0x280574[0x1]),this['canvasContext']['lineTo'](_0x1dc7a3[0x0],_0x1dc7a3[0x1]);}this[_0x31ae44(0x1a0)][_0x31ae44(0x178)]();}}[_0x2156a7(0x116)](_0x1533b2,_0x2873cc,_0x235137){const _0x25e70c=_0x2156a7,_0x40b0e7=Cesium['Cartesian3'][_0x25e70c(0x14b)](_0x1533b2,_0x2873cc,this['fixedHeight']),_0xd5a122=this[_0x25e70c(0x154)][_0x25e70c(0x140)];if(_0xd5a122['mode']===Cesium[_0x25e70c(0x134)][_0x25e70c(0x16d)]){const _0x5ddfc=new Cesium['EllipsoidalOccluder'](_0xd5a122['globe'][_0x25e70c(0x141)],_0xd5a122[_0x25e70c(0x20b)][_0x25e70c(0x1d0)]),_0x28c8a4=_0x5ddfc[_0x25e70c(0x1ec)](_0x40b0e7);if(!_0x28c8a4)return _0x235137['age']=0x0,null;}const _0x8cff3a=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x25e70c(0x154)]['scene'],_0x40b0e7);return _0x8cff3a?[_0x8cff3a['x'],_0x8cff3a['y']]:null;}['clear'](){const _0x3bd292=_0x2156a7;this['windField'][_0x3bd292(0x139)](),delete this[_0x3bd292(0x148)];}[_0x2156a7(0x1ce)](){const _0xd53c3d=_0x2156a7;this['worker']=new Worker(this[_0xd53c3d(0x197)][_0xd53c3d(0x135)]),this[_0xd53c3d(0x135)][_0xd53c3d(0x1e6)]=_0x4b81f9=>{this['_drawLines'](_0x4b81f9['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x1d5cf2=>{const _0x4ef3d9=_0xd53c3d;this['worker'][_0x4ef3d9(0x1b3)]({'type':_0x4ef3d9(0x201),'options':_0x1d5cf2});},'setOptions':_0xb91eca=>{const _0x36a686=_0xd53c3d;this['worker'][_0x36a686(0x1b3)]({'type':'setOptions','options':_0xb91eca});},'setDate':_0x2639e5=>{const _0x4235c5=_0xd53c3d;this[_0x4235c5(0x135)][_0x4235c5(0x1b3)]({'type':'setDate','data':_0x2639e5});},'update':()=>{const _0x461f54=_0xd53c3d;if(this[_0x461f54(0x14f)])return;this[_0x461f54(0x14f)]=!![],this['worker'][_0x461f54(0x1b3)]({'type':'update'});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x2156a7(0x167)]=CanvasWindLayer,mars3d__namespace[_0x2156a7(0x13c)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x2156a7(0x1ca)]=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,_0x2156a7(0x128),{'value':!![]});
|
|
15
15
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-wind",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"description": "Mars3D平台插件,支持气象 风向图 功能插件",
|
|
5
5
|
"main": "dist/mars3d-wind.js",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"peerDependencies": {},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"mars3d": "~3.6.
|
|
11
|
+
"mars3d": "~3.6.2"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|