mars3d-wind 3.5.11 → 3.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mars3d-wind.js +3 -3
- package/package.json +2 -2
package/dist/mars3d-wind.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.5.
|
|
5
|
-
* 编译日期:2023-06-
|
|
4
|
+
* 版本信息:v3.5.12
|
|
5
|
+
* 编译日期:2023-06-19 18:25:48
|
|
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 _0x506409=_0x1e80;function _0x539a(){const _0x55ae12=['Cesium','sin','addEventListener','LUMINANCE','Color','segments','reverse','647624AIMbWq','canvasHeight','createComputingPrimitives','ShaderSource','ComponentDatatype','GeometryAttributes','show','atan2','data','latRange','getPixelSize','_pointerEvents','_bilinearInterpolation','min','pointer-events','createRenderingTextures','particlesRendering','resize','vertexArray','maxParticles','destroyParticlesTextures','once','pow','//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a','fillRect','lat','length','FLOAT','vertexShaderSource','mouse_down','array','trails','createParticlesTextures','clearCommand','createRenderingPrimitives','ShaderProgram','particlesTextures','updateViewerParameters','width','fadeOpacity','isDestroyed','canrefresh','age','postProcessingSpeed','Pass','207250hdHkab','initWorker','createRenderingFramebuffers','randomBetween','mouse_move','_removedHook','ymin','screen','beginPath','2920437EsEsFh','none','viewport','source','getOptions','_setOptionsHook','fragmentShaderSource','viewerParameters','grid','commandType','NEAREST','_updateIng','geometry','position','bindEvent','_onMouseUpEvent','hidden','uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a','visibility','globeBoundingSphere','refreshParticles','framebuffer','RenderState','drawingBufferWidth','getParticles','postMessage','pixelSize','preExecute','wheel','nextParticlesSpeed','5iKGxWy','_speedRate','vdata','canvasContext','_map','particlesWind','preRender','lineWidth','uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a','randomizeParticles','color','worker','_onMapWhellEvent','DISABLE_GL_POSITION_LOG_DEPTH','tlng','depthTexture','dimensions','toDegrees','OPAQUE','44376IqPpDM','TRIANGLES','BaseLayer','create','createTexture','98203BLgank','removeAll','max','windField','layer','16lYUkVy','shaderProgram','_addedHook','push','canvasWidth','mouseMove','mod','maxAge','currentTrails','nextTrailsColor','_canrefresh','speedRate','currentTrailsDepth','particlesComputing','__esModule','removeEventListener','createRawRenderState','ellipsoid','particlesTextureSize','_calc_speedRate','getRandomLatLng','_calcUV','getUVByXY','setData','_tomap','forEach','EventType','random','destroy','lng','lev','createCommand','options','BufferUsage','xmax','198093oPwQuh','particlesNumber','currentParticlesPosition','409480LpScHe','keys','uniformMap','nextTrails','CanvasWindLayer','mouseDown','addPrimitives','lineTo','windTextures','textures','getDefaultRenderState','commandToExecute','udata','canvasResize','isInExtent','primitives','setDate','toGridXY','WindLayer','clear','colors','PI_OVER_THREE','globalAlpha','ymax','Math','pointerEvents','_data','framebuffers','outputTexture','Cartesian3','init','_onMouseMoveEvent','_onMap_preRenderEvent','now','defineProperty','Compute','lon','createFramebuffer','removeChild','Cartesian2','TWO_PI','Sampler','particleSystem','off','execute','getExtent','redraw','lonRange','DepthFunction','scene','updatePosition','fromGeometry','TextureMinificationFilter','clientWidth','animateFrame','particles','add','xmin','SceneMode','currentParticlesSpeed','camera','cols','canvas','context','_maxAge','style','PixelFormat','_onMouseDownEvent'];_0x539a=function(){return _0x55ae12;};return _0x539a();}(function(_0xae62f8,_0x1d6e76){const _0xa80624=_0x1e80,_0x4a25ef=_0xae62f8();while(!![]){try{const _0x242fd5=-parseInt(_0xa80624(0x18e))/0x1+-parseInt(_0xa80624(0x116))/0x2+parseInt(_0xa80624(0x113))/0x3+parseInt(_0xa80624(0x161))/0x4+parseInt(_0xa80624(0x1b5))/0x5*(-parseInt(_0xa80624(0x1c8))/0x6)+-parseInt(_0xa80624(0x1cd))/0x7*(parseInt(_0xa80624(0x1d2))/0x8)+parseInt(_0xa80624(0x197))/0x9;if(_0x242fd5===_0x1d6e76)break;else _0x4a25ef['push'](_0x4a25ef['shift']());}catch(_0x2069b4){_0x4a25ef['push'](_0x4a25ef['shift']());}}}(_0x539a,0x19a1a));function _interopNamespace(_0x5eeca7){const _0x361e15=_0x1e80;if(_0x5eeca7&&_0x5eeca7[_0x361e15(0x1e0)])return _0x5eeca7;var _0x16adff=Object[_0x361e15(0x1cb)](null);return _0x5eeca7&&Object['keys'](_0x5eeca7)['forEach'](function(_0x4703dc){const _0x1e4674=_0x361e15;if(_0x4703dc!=='default'){var _0x40d920=Object['getOwnPropertyDescriptor'](_0x5eeca7,_0x4703dc);Object[_0x1e4674(0x138)](_0x16adff,_0x4703dc,_0x40d920['get']?_0x40d920:{'enumerable':!![],'get':function(){return _0x5eeca7[_0x4703dc];}});}}),_0x16adff['default']=_0x5eeca7,_0x16adff;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x45692d,_0x4d361a){const _0x16d00a=_0x1e80,_0x4bbfc0=_0x45692d*Math['cos'](Cesium$7[_0x16d00a(0x12e)]['toRadians'](_0x4d361a));return _0x4bbfc0;}function getV(_0x170004,_0x22d66f){const _0x58f00d=_0x1e80,_0x56dd02=_0x170004*Math[_0x58f00d(0x15b)](Cesium$7['Math']['toRadians'](_0x22d66f));return _0x56dd02;}function getSpeed(_0x3da895,_0x7f0898){const _0x182ad3=_0x1e80,_0x4b201b=Math['sqrt'](Math['pow'](_0x3da895,0x2)+Math[_0x182ad3(0x177)](_0x7f0898,0x2));return _0x4b201b;}function getDirection(_0x1144bb,_0x45d326){const _0x59e058=_0x1e80;let _0x6246a7=Cesium$7['Math']['toDegrees'](Math[_0x59e058(0x168)](_0x45d326,_0x1144bb));return _0x6246a7+=_0x6246a7<0x0?0x168:0x0,_0x6246a7;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x39a3b1){const _0x173f97=_0x1e80;this[_0x173f97(0x1a0)]=_0x39a3b1['commandType'],this['geometry']=_0x39a3b1[_0x173f97(0x1a3)],this['attributeLocations']=_0x39a3b1['attributeLocations'],this['primitiveType']=_0x39a3b1['primitiveType'],this['uniformMap']=_0x39a3b1[_0x173f97(0x118)],this['vertexShaderSource']=_0x39a3b1['vertexShaderSource'],this['fragmentShaderSource']=_0x39a3b1[_0x173f97(0x19d)],this['rawRenderState']=_0x39a3b1['rawRenderState'],this['framebuffer']=_0x39a3b1[_0x173f97(0x1ac)],this['outputTexture']=_0x39a3b1[_0x173f97(0x132)],this['autoClear']=_0x39a3b1['autoClear']??![],this[_0x173f97(0x1b2)]=_0x39a3b1[_0x173f97(0x1b2)],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x173f97(0x18d)]['OPAQUE']}));}[_0x506409(0x10f)](_0x3a0fb3){const _0x4c9702=_0x506409;switch(this['commandType']){case'Draw':{const _0x3b3bf9=Cesium$6['VertexArray']['fromGeometry']({'context':_0x3a0fb3,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0x4c9702(0x111)]['STATIC_DRAW']}),_0x4874ce=Cesium$6[_0x4c9702(0x184)]['fromCache']({'context':_0x3a0fb3,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this[_0x4c9702(0x17d)],'fragmentShaderSource':this[_0x4c9702(0x19d)]}),_0x46981c=Cesium$6[_0x4c9702(0x1ad)]['fromCache'](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x4874ce,'vertexArray':_0x3b3bf9,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x46981c,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this[_0x4c9702(0x118)],'outputTexture':this['outputTexture'],'persists':!![]});}}}['setGeometry'](_0x14c008,_0x1b29f9){const _0x5968c0=_0x506409;this[_0x5968c0(0x1a3)]=_0x1b29f9;const _0x261fb3=Cesium$6['VertexArray']['fromGeometry']({'context':_0x14c008,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute'][_0x5968c0(0x173)]=_0x261fb3;}['update'](_0x420150){const _0xf73624=_0x506409;if(!this['show'])return;if(_0x420150['mode']!==Cesium$6[_0xf73624(0x150)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x420150['context'])),Cesium$6['defined'](this[_0xf73624(0x1b2)])&&this['preExecute'](),Cesium$6['defined'](this['clearCommand'])&&_0x420150['commandList']['push'](this['clearCommand']),_0x420150['commandList']['push'](this['commandToExecute']);}[_0x506409(0x189)](){return![];}['destroy'](){const _0x41b113=_0x506409;if(this[_0x41b113(0x182)]){var _0x63d30a,_0x17c81f;(_0x63d30a=this[_0x41b113(0x182)])!==null&&_0x63d30a!==void 0x0&&_0x63d30a[_0x41b113(0x173)]&&this[_0x41b113(0x182)][_0x41b113(0x173)][_0x41b113(0x1ee)](),(_0x17c81f=this[_0x41b113(0x182)])!==null&&_0x17c81f!==void 0x0&&_0x17c81f['shaderProgram']&&this['clearCommand'][_0x41b113(0x1d3)]['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this[_0x41b113(0x121)]['vertexArray'][_0x41b113(0x1ee)](),this['commandToExecute']['shaderProgram']&&this['commandToExecute'][_0x41b113(0x1d3)][_0x41b113(0x1ee)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x1fa1fd=function(){const _0x1e4f8a=_0x1e80,_0x400d57=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5[_0x1e4f8a(0x165)]['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x400d57;},_0x1b5ddc=function(_0x2048cb,_0x2770b1){const _0x5a6581=_0x1e80;if(Cesium$5['defined'](_0x2770b1)){const _0x1379fa={};_0x1379fa['arrayBufferView']=_0x2770b1,_0x2048cb[_0x5a6581(0x19a)]=_0x1379fa;}const _0x5e3408=new Cesium$5['Texture'](_0x2048cb);return _0x5e3408;},_0x5e7788=function(_0x3b9d09,_0x3bd85f,_0x44b26d){const _0x2c528b=new Cesium$5['Framebuffer']({'context':_0x3b9d09,'colorTextures':[_0x3bd85f],'depthTexture':_0x44b26d});return _0x2c528b;},_0x688ab7=function(_0x586958){const _0x4e9b25=_0x1e80,_0x53ea8e=!![],_0x10126a=![],_0x9da9c8={'viewport':_0x586958[_0x4e9b25(0x199)],'depthTest':_0x586958['depthTest'],'depthMask':_0x586958['depthMask'],'blending':_0x586958['blending']},_0x5310c5=Cesium$5['Appearance'][_0x4e9b25(0x120)](_0x53ea8e,_0x10126a,_0x9da9c8);return _0x5310c5;},_0xf9ae34=function(_0x5a508e){const _0x4bda59=_0x1e80,_0x5f0c32={},_0x52e455=Cesium$5['Math'][_0x4bda59(0x1d8)](_0x5a508e['west'],Cesium$5['Math']['TWO_PI']),_0x92a1c6=Cesium$5['Math'][_0x4bda59(0x1d8)](_0x5a508e['east'],Cesium$5['Math']['TWO_PI']),_0x56094c=_0x5a508e[_0x4bda59(0x187)];let _0x500b7c,_0x594f6c;_0x56094c>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x500b7c=0x0,_0x594f6c=Cesium$5[_0x4bda59(0x12e)][_0x4bda59(0x13e)]):_0x92a1c6-_0x52e455<_0x56094c?(_0x500b7c=_0x52e455,_0x594f6c=_0x52e455+_0x56094c):(_0x500b7c=_0x52e455,_0x594f6c=_0x92a1c6);_0x5f0c32['lon']={'min':Cesium$5['Math']['toDegrees'](_0x500b7c),'max':Cesium$5['Math'][_0x4bda59(0x1c6)](_0x594f6c)};const _0x35440f=_0x5a508e['south'],_0x3aafca=_0x5a508e['north'],_0x243959=_0x5a508e['height'],_0x13ebf2=_0x243959>Cesium$5['Math']['PI']/0xc?_0x243959/0x2:0x0;let _0x3041bd=Cesium$5[_0x4bda59(0x12e)]['clampToLatitudeRange'](_0x35440f-_0x13ebf2),_0x505d64=Cesium$5['Math']['clampToLatitudeRange'](_0x3aafca+_0x13ebf2);return _0x3041bd<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x3041bd=-Cesium$5['Math']['PI_OVER_TWO']),_0x505d64>Cesium$5['Math'][_0x4bda59(0x12b)]&&(_0x505d64=Cesium$5['Math']['PI_OVER_TWO']),_0x5f0c32['lat']={'min':Cesium$5['Math']['toDegrees'](_0x3041bd),'max':Cesium$5['Math']['toDegrees'](_0x505d64)},_0x5f0c32;};return{'getFullscreenQuad':_0x1fa1fd,'createTexture':_0x1b5ddc,'createFramebuffer':_0x5e7788,'createRawRenderState':_0x688ab7,'viewRectangleToLonLatRange':_0xf9ae34};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag=_0x506409(0x1bd),fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag=_0x506409(0x1a8);const Cesium$4=mars3d__namespace[_0x506409(0x15a)];class ParticlesRendering{constructor(_0x59c2ce,_0x4bdb63,_0x3136e2,_0x352ddd,_0x14a5fc){const _0x1e0fb5=_0x506409;this['createRenderingTextures'](_0x59c2ce,_0x4bdb63,_0x3136e2['colors']),this['createRenderingFramebuffers'](_0x59c2ce),this[_0x1e0fb5(0x183)](_0x59c2ce,_0x3136e2,_0x352ddd,_0x14a5fc);}[_0x506409(0x170)](_0x37997e,_0x523906,_0x1d72d5){const _0x499474=_0x506409,_0x2193a0={'context':_0x37997e,'width':_0x37997e['drawingBufferWidth'],'height':_0x37997e['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x5d55e2={'context':_0x37997e,'width':_0x37997e[_0x499474(0x1ae)],'height':_0x37997e['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x499474(0x158)]['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x4b1510=_0x1d72d5['length'],_0x253a97=new Float32Array(_0x4b1510*0x3);for(let _0x38111a=0x0;_0x38111a<_0x4b1510;_0x38111a++){const _0x223d6a=Cesium$4['Color']['fromCssColorString'](_0x1d72d5[_0x38111a]);_0x253a97[0x3*_0x38111a]=_0x223d6a['red'],_0x253a97[0x3*_0x38111a+0x1]=_0x223d6a['green'],_0x253a97[0x3*_0x38111a+0x2]=_0x223d6a['blue'];}const _0x498b2a={'context':_0x37997e,'width':_0x4b1510,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x499474(0x17c)],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this[_0x499474(0x11f)]={'segmentsColor':Util['createTexture'](_0x2193a0),'segmentsDepth':Util[_0x499474(0x1cc)](_0x5d55e2),'currentTrailsColor':Util['createTexture'](_0x2193a0),'currentTrailsDepth':Util[_0x499474(0x1cc)](_0x5d55e2),'nextTrailsColor':Util[_0x499474(0x1cc)](_0x2193a0),'nextTrailsDepth':Util[_0x499474(0x1cc)](_0x5d55e2),'colorTable':Util['createTexture'](_0x498b2a,_0x253a97)};}[_0x506409(0x190)](_0x8f1cba){const _0x3597e3=_0x506409;this['framebuffers']={'segments':Util[_0x3597e3(0x13b)](_0x8f1cba,this['textures']['segmentsColor'],this['textures']['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x8f1cba,this['textures']['currentTrailsColor'],this['textures'][_0x3597e3(0x1de)]),'nextTrails':Util['createFramebuffer'](_0x8f1cba,this[_0x3597e3(0x11f)][_0x3597e3(0x1db)],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x459d8f){const _0x167558=_0x506409,_0x1b3249=0x4;let _0x473657=[];for(let _0xc34e42=0x0;_0xc34e42<_0x459d8f['particlesTextureSize'];_0xc34e42++){for(let _0x1f299f=0x0;_0x1f299f<_0x459d8f[_0x167558(0x1e4)];_0x1f299f++){for(let _0x18c11c=0x0;_0x18c11c<_0x1b3249;_0x18c11c++){_0x473657['push'](_0xc34e42/_0x459d8f['particlesTextureSize']),_0x473657['push'](_0x1f299f/_0x459d8f['particlesTextureSize']);}}}_0x473657=new Float32Array(_0x473657);let _0x129fea=[];const _0x388cc6=[-0x1,0x1],_0x30c769=[-0x1,0x1];for(let _0x1e50c0=0x0;_0x1e50c0<_0x459d8f['maxParticles'];_0x1e50c0++){for(let _0x31efa8=0x0;_0x31efa8<_0x1b3249/0x2;_0x31efa8++){for(let _0x1d372b=0x0;_0x1d372b<_0x1b3249/0x2;_0x1d372b++){_0x129fea[_0x167558(0x1d5)](_0x388cc6[_0x31efa8]),_0x129fea['push'](_0x30c769[_0x1d372b]),_0x129fea[_0x167558(0x1d5)](0x0);}}}_0x129fea=new Float32Array(_0x129fea);const _0x28ddc9=0x6*_0x459d8f['maxParticles'],_0x2c545a=new Uint32Array(_0x28ddc9);for(let _0x824204=0x0,_0x17f84b=0x0,_0x301368=0x0;_0x824204<_0x459d8f[_0x167558(0x174)];_0x824204++){_0x2c545a[_0x17f84b++]=_0x301368+0x0,_0x2c545a[_0x17f84b++]=_0x301368+0x1,_0x2c545a[_0x17f84b++]=_0x301368+0x2,_0x2c545a[_0x17f84b++]=_0x301368+0x2,_0x2c545a[_0x17f84b++]=_0x301368+0x1,_0x2c545a[_0x17f84b++]=_0x301368+0x3,_0x301368+=0x4;}const _0x106aef=new Cesium$4['Geometry']({'attributes':new Cesium$4[(_0x167558(0x166))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x167558(0x17c)],'componentsPerAttribute':0x2,'values':_0x473657}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x129fea})}),'indices':_0x2c545a});return _0x106aef;}[_0x506409(0x183)](_0x1a3a9b,_0x4a8296,_0x285f30,_0x2694d9){const _0xe0f636=_0x506409,_0x51e496=this;this[_0xe0f636(0x125)]={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x4a8296),'primitiveType':Cesium$4['PrimitiveType'][_0xe0f636(0x1c9)],'uniformMap':{'currentParticlesPosition':function(){const _0x395d10=_0xe0f636;return _0x2694d9[_0x395d10(0x185)]['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x396846=_0xe0f636;return _0x2694d9[_0x396846(0x185)]['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x2694d9['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0xfe658d=_0xe0f636;return _0x51e496[_0xfe658d(0x11f)]['colorTable'];},'aspect':function(){return _0x1a3a9b['drawingBufferWidth']/_0x1a3a9b['drawingBufferHeight'];},'pixelSize':function(){const _0x2423a3=_0xe0f636;return _0x285f30[_0x2423a3(0x1b1)];},'lineWidth':function(){return _0x4a8296['lineWidth'];},'particleHeight':function(){return _0x4a8296['particleHeight'];}},'vertexShaderSource':new Cesium$4[(_0xe0f636(0x164))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4[(_0xe0f636(0x164))]({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0xe0f636(0x1c9)],'uniformMap':{'segmentsColorTexture':function(){const _0x421e95=_0xe0f636;return _0x51e496[_0x421e95(0x11f)]['segmentsColor'];},'segmentsDepthTexture':function(){const _0x1541e9=_0xe0f636;return _0x51e496[_0x1541e9(0x11f)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x40b559=_0xe0f636;return _0x51e496['framebuffers'][_0x40b559(0x1da)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x3a355a=_0xe0f636;return _0x51e496['framebuffers'][_0x3a355a(0x1da)]['depthTexture'];},'fadeOpacity':function(){return _0x4a8296['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0xe0f636(0x146)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this[_0xe0f636(0x131)]['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x2a8587=_0xe0f636,_0x32dc71=_0x51e496[_0x2a8587(0x131)]['currentTrails'];_0x51e496['framebuffers'][_0x2a8587(0x1da)]=_0x51e496['framebuffers'][_0x2a8587(0x119)],_0x51e496['framebuffers'][_0x2a8587(0x119)]=_0x32dc71,_0x51e496[_0x2a8587(0x125)][_0x2a8587(0x180)]['commandToExecute']['framebuffer']=_0x51e496['framebuffers'][_0x2a8587(0x119)],_0x51e496['primitives']['trails']['clearCommand'][_0x2a8587(0x1ac)]=_0x51e496['framebuffers'][_0x2a8587(0x119)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){return _0x51e496['framebuffers']['nextTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x21d6b8=_0xe0f636;return _0x51e496['framebuffers']['nextTrails'][_0x21d6b8(0x1c4)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0xe0f636(0x1c2)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0xe0f636(0x1e2)]({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag=_0x506409(0x178),updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag='uniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20randomParticle\x20=\x20texture(postProcessingPosition,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20vec4\x20particleSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x0a\x20\x20\x20\x20if\x20(randomParticle.a\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20particleSpeed;\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x329aed,_0x4058e1,_0x25b795,_0x5303b9){const _0x26d317=_0x506409;this['data']=_0x4058e1,this['createWindTextures'](_0x329aed,_0x4058e1),this[_0x26d317(0x181)](_0x329aed,_0x25b795,_0x5303b9),this['createComputingPrimitives'](_0x4058e1,_0x25b795,_0x5303b9);}['createWindTextures'](_0x1ee268,_0x474073){const _0x44a8d8=_0x506409,_0x6da6e5={'context':_0x1ee268,'width':_0x474073['dimensions']['lon'],'height':_0x474073[_0x44a8d8(0x1c5)][_0x44a8d8(0x17a)]*(_0x474073['dimensions']['lev']||0x1),'pixelFormat':Cesium$3['PixelFormat'][_0x44a8d8(0x15d)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x44a8d8(0x13f))]({'minificationFilter':Cesium$3[_0x44a8d8(0x14a)]['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x44a8d8(0x1a1)]})};this['windTextures']={'U':Util[_0x44a8d8(0x1cc)](_0x6da6e5,_0x474073['U']['array']),'V':Util['createTexture'](_0x6da6e5,_0x474073['V']['array'])};}['createParticlesTextures'](_0x4a9743,_0x3d5a09,_0x54d1d8){const _0x321aa0=_0x506409,_0x10efeb={'context':_0x4a9743,'width':_0x3d5a09['particlesTextureSize'],'height':_0x3d5a09['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x650b26=this[_0x321aa0(0x1be)](_0x3d5a09[_0x321aa0(0x174)],_0x54d1d8),_0x4fb09b=new Float32Array(0x4*_0x3d5a09[_0x321aa0(0x174)])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x10efeb),'currentParticlesPosition':Util['createTexture'](_0x10efeb,_0x650b26),'nextParticlesPosition':Util['createTexture'](_0x10efeb,_0x650b26),'currentParticlesSpeed':Util[_0x321aa0(0x1cc)](_0x10efeb,_0x4fb09b),'nextParticlesSpeed':Util['createTexture'](_0x10efeb,_0x4fb09b),'postProcessingPosition':Util['createTexture'](_0x10efeb,_0x650b26),'postProcessingSpeed':Util['createTexture'](_0x10efeb,_0x4fb09b)};}[_0x506409(0x1be)](_0x2f907f,_0x1f691d){const _0x1705b0=_0x506409,_0x36ab71=new Float32Array(0x4*_0x2f907f);for(let _0x5247e5=0x0;_0x5247e5<_0x2f907f;_0x5247e5++){_0x36ab71[0x4*_0x5247e5]=Cesium$3['Math']['randomBetween'](_0x1f691d['lonRange']['x'],_0x1f691d['lonRange']['y']),_0x36ab71[0x4*_0x5247e5+0x1]=Cesium$3[_0x1705b0(0x12e)][_0x1705b0(0x191)](_0x1f691d[_0x1705b0(0x16a)]['x'],_0x1f691d['latRange']['y']),_0x36ab71[0x4*_0x5247e5+0x2]=Cesium$3[_0x1705b0(0x12e)]['randomBetween'](this['data']['lev']['min'],this[_0x1705b0(0x169)]['lev']['max']),_0x36ab71[0x4*_0x5247e5+0x3]=0x0;}return _0x36ab71;}['destroyParticlesTextures'](){const _0x442c65=_0x506409;Object[_0x442c65(0x117)](this[_0x442c65(0x185)])['forEach'](_0x55b377=>{this['particlesTextures'][_0x55b377]['destroy']();});}[_0x506409(0x163)](_0x688716,_0x2b47f1,_0x5d0ad7){const _0x22f769=_0x506409,_0x519c36=new Cesium$3['Cartesian3'](_0x688716[_0x22f769(0x1c5)]['lon'],_0x688716['dimensions']['lat'],_0x688716['dimensions'][_0x22f769(0x1f0)]),_0x21b193=new Cesium$3['Cartesian3'](_0x688716[_0x22f769(0x13a)][_0x22f769(0x16e)],_0x688716['lat']['min'],_0x688716['lev']['min']),_0x7cd71b=new Cesium$3[(_0x22f769(0x133))](_0x688716['lon']['max'],_0x688716['lat'][_0x22f769(0x1cf)],_0x688716[_0x22f769(0x1f0)]['max']),_0x3b285f=new Cesium$3['Cartesian3']((_0x7cd71b['x']-_0x21b193['x'])/(_0x519c36['x']-0x1),(_0x7cd71b['y']-_0x21b193['y'])/(_0x519c36['y']-0x1),_0x519c36['z']>0x1?(_0x7cd71b['z']-_0x21b193['z'])/(_0x519c36['z']-0x1):0x1),_0x10d41=new Cesium$3[(_0x22f769(0x13d))](_0x688716['U']['min'],_0x688716['U']['max']),_0x19d065=new Cesium$3['Cartesian2'](_0x688716['V'][_0x22f769(0x16e)],_0x688716['V'][_0x22f769(0x1cf)]),_0x559488=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x559488['windTextures']['U'];},'V':function(){return _0x559488['windTextures']['V'];},'currentParticlesPosition':function(){const _0x452747=_0x22f769;return _0x559488[_0x452747(0x185)]['currentParticlesPosition'];},'dimension':function(){return _0x519c36;},'minimum':function(){return _0x21b193;},'maximum':function(){return _0x7cd71b;},'interval':function(){return _0x3b285f;}},'fragmentShaderSource':new Cesium$3[(_0x22f769(0x164))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){_0x559488['primitives']['getWind']['commandToExecute']['outputTexture']=_0x559488['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x297600=_0x22f769;return _0x559488['particlesTextures'][_0x297600(0x151)];},'particlesWind':function(){const _0x26d0e3=_0x22f769;return _0x559488['particlesTextures'][_0x26d0e3(0x1ba)];},'uSpeedRange':function(){return _0x10d41;},'vSpeedRange':function(){return _0x19d065;},'pixelSize':function(){return _0x5d0ad7['pixelSize'];},'speedFactor':function(){return _0x2b47f1['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x2c118b=_0x22f769,_0x423edb=_0x559488['particlesTextures']['currentParticlesSpeed'];_0x559488[_0x2c118b(0x185)]['currentParticlesSpeed']=_0x559488['particlesTextures']['postProcessingSpeed'],_0x559488['particlesTextures']['postProcessingSpeed']=_0x423edb,_0x559488['primitives']['updateSpeed']['commandToExecute'][_0x2c118b(0x132)]=_0x559488['particlesTextures'][_0x2c118b(0x1b4)];}}),'updatePosition':new CustomPrimitive({'commandType':_0x22f769(0x139),'uniformMap':{'currentParticlesPosition':function(){const _0x2acf80=_0x22f769;return _0x559488['particlesTextures'][_0x2acf80(0x115)];},'currentParticlesSpeed':function(){const _0x251b51=_0x22f769;return _0x559488['particlesTextures'][_0x251b51(0x151)];}},'fragmentShaderSource':new Cesium$3[(_0x22f769(0x164))]({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x16b87e=_0x22f769,_0x390afa=_0x559488['particlesTextures']['currentParticlesPosition'];_0x559488['particlesTextures']['currentParticlesPosition']=_0x559488['particlesTextures']['postProcessingPosition'],_0x559488['particlesTextures']['postProcessingPosition']=_0x390afa,_0x559488['primitives'][_0x16b87e(0x148)]['commandToExecute']['outputTexture']=_0x559488['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x22f769(0x139),'uniformMap':{'nextParticlesPosition':function(){return _0x559488['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x43dc0a=_0x22f769;return _0x559488[_0x43dc0a(0x185)]['nextParticlesSpeed'];},'lonRange':function(){return _0x5d0ad7['lonRange'];},'latRange':function(){const _0x36b4a7=_0x22f769;return _0x5d0ad7[_0x36b4a7(0x16a)];},'randomCoefficient':function(){const _0x4dc1bf=_0x22f769,_0x11b236=Math[_0x4dc1bf(0x1ed)]();return _0x11b236;},'dropRate':function(){return _0x2b47f1['dropRate'];},'dropRateBump':function(){return _0x2b47f1['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x22f769(0x185)]['postProcessingPosition'],'preExecute':function(){const _0x4d1729=_0x22f769;_0x559488[_0x4d1729(0x125)]['postProcessingPosition']['commandToExecute']['outputTexture']=_0x559488['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x22f769(0x139),'uniformMap':{'postProcessingPosition':function(){const _0x5def67=_0x22f769;return _0x559488[_0x5def67(0x185)]['postProcessingPosition'];},'nextParticlesSpeed':function(){const _0xda93fa=_0x22f769;return _0x559488[_0xda93fa(0x185)][_0xda93fa(0x1b4)];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x2830ee=_0x22f769;_0x559488[_0x2830ee(0x125)]['postProcessingSpeed']['commandToExecute'][_0x2830ee(0x132)]=_0x559488['particlesTextures'][_0x2830ee(0x18c)];}})};}}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x4c6cb2,_0x4b93bb,_0xcf7177,_0x276e4d){const _0xe3b969=_0x506409;this[_0xe3b969(0x155)]=_0x4c6cb2,_0x4b93bb={..._0x4b93bb},_0x4b93bb['udata']&&_0x4b93bb['vdata']&&(_0x4b93bb[_0xe3b969(0x1c5)]={},_0x4b93bb['dimensions'][_0xe3b969(0x13a)]=_0x4b93bb['cols'],_0x4b93bb['dimensions']['lat']=_0x4b93bb['rows'],_0x4b93bb[_0xe3b969(0x1c5)]['lev']=_0x4b93bb['lev']||0x1,_0x4b93bb[_0xe3b969(0x13a)]={},_0x4b93bb[_0xe3b969(0x13a)][_0xe3b969(0x16e)]=_0x4b93bb[_0xe3b969(0x14f)],_0x4b93bb['lon']['max']=_0x4b93bb['xmax'],_0x4b93bb[_0xe3b969(0x17a)]={},_0x4b93bb['lat'][_0xe3b969(0x16e)]=_0x4b93bb['ymin'],_0x4b93bb['lat']['max']=_0x4b93bb['ymax'],_0x4b93bb['lev']={},_0x4b93bb['lev'][_0xe3b969(0x16e)]=_0x4b93bb['levmin']??0x1,_0x4b93bb['lev']['max']=_0x4b93bb['levmax']??0x1,_0x4b93bb['U']={},_0x4b93bb['U']['array']=new Float32Array(_0x4b93bb['udata']),_0x4b93bb['U']['min']=_0x4b93bb['umin']??Math['min'](..._0x4b93bb[_0xe3b969(0x122)]),_0x4b93bb['U']['max']=_0x4b93bb['umax']??Math[_0xe3b969(0x1cf)](..._0x4b93bb['udata']),_0x4b93bb['V']={},_0x4b93bb['V'][_0xe3b969(0x17f)]=new Float32Array(_0x4b93bb[_0xe3b969(0x1b7)]),_0x4b93bb['V']['min']=_0x4b93bb['vmin']??Math['min'](..._0x4b93bb['vdata']),_0x4b93bb['V']['max']=_0x4b93bb['vmax']??Math['max'](..._0x4b93bb['vdata'])),this['data']=_0x4b93bb,this[_0xe3b969(0x110)]=_0xcf7177,this['viewerParameters']=_0x276e4d,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this[_0xe3b969(0x110)],this['viewerParameters']),this[_0xe3b969(0x171)]=new ParticlesRendering(this['context'],this['data'],this['options'],this[_0xe3b969(0x19e)],this['particlesComputing']);}['canvasResize'](_0x76cc59){const _0x258364=_0x506409;this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this[_0x258364(0x1df)]['windTextures'])[_0x258364(0x1eb)](_0x1d4faf=>{const _0x14ce15=_0x258364;this['particlesComputing'][_0x14ce15(0x11e)][_0x1d4faf][_0x14ce15(0x1ee)]();}),this[_0x258364(0x171)]['textures']['colorTable'][_0x258364(0x1ee)](),Object['keys'](this[_0x258364(0x171)]['framebuffers'])['forEach'](_0x2d3877=>{this['particlesRendering']['framebuffers'][_0x2d3877]['destroy']();}),this['context']=_0x76cc59,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x14ef78=_0x506409,_0x1c9833=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x14ef78(0x15e))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass'][_0x14ef78(0x1c7)]});Object[_0x14ef78(0x117)](this['particlesRendering'][_0x14ef78(0x131)])['forEach'](_0x50f3b0=>{const _0x4de16c=_0x14ef78;_0x1c9833[_0x4de16c(0x1ac)]=this['particlesRendering']['framebuffers'][_0x50f3b0],_0x1c9833[_0x4de16c(0x142)](this[_0x4de16c(0x155)]);});}[_0x506409(0x1ab)](_0x2589e8){const _0x5a548d=_0x506409;this['clearFramebuffers'](),this['particlesComputing'][_0x5a548d(0x175)](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x2589e8){const _0x2fbe5f=this['particlesRendering']['createSegmentsGeometry'](this['options']);this['particlesRendering'][_0x5a548d(0x125)][_0x5a548d(0x15f)][_0x5a548d(0x1a3)]=_0x2fbe5f;const _0x4ece7e=Cesium$2['VertexArray'][_0x5a548d(0x149)]({'context':this[_0x5a548d(0x155)],'geometry':_0x2fbe5f,'attributeLocations':this['particlesRendering'][_0x5a548d(0x125)]['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});this['particlesRendering'][_0x5a548d(0x125)][_0x5a548d(0x15f)]['commandToExecute']['vertexArray']=_0x4ece7e;}}['setOptions'](_0x5b0999){const _0x332346=_0x506409;let _0x518211=![];this[_0x332346(0x110)]['maxParticles']!==_0x5b0999['maxParticles']&&(_0x518211=!![]),Object['keys'](_0x5b0999)[_0x332346(0x1eb)](_0x3c3264=>{this['options'][_0x3c3264]=_0x5b0999[_0x3c3264];}),this[_0x332346(0x1ab)](_0x518211);}['applyViewerParameters'](_0x293692){const _0x5de995=_0x506409;Object[_0x5de995(0x117)](_0x293692)['forEach'](_0x144374=>{this['viewerParameters'][_0x144374]=_0x293692[_0x144374];}),this['refreshParticles'](![]);}[_0x506409(0x1ee)](){const _0x229198=_0x506409;clearTimeout(this[_0x229198(0x18a)]),this['particlesComputing']['destroyParticlesTextures'](),Object[_0x229198(0x117)](this['particlesComputing'][_0x229198(0x11e)])[_0x229198(0x1eb)](_0x825270=>{const _0x35fc2b=_0x229198;this[_0x35fc2b(0x1df)]['windTextures'][_0x825270]['destroy']();}),this[_0x229198(0x171)][_0x229198(0x11f)]['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x229198(0x131)])['forEach'](_0x2a0546=>{const _0x2f22f7=_0x229198;this[_0x2f22f7(0x171)]['framebuffers'][_0x2a0546]['destroy']();});for(const _0x3a99c2 in this){delete this[_0x3a99c2];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer'][_0x506409(0x1ca)],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':['rgb(206,255,255)']};class WindLayer extends BaseLayer$1{constructor(_0x155766={}){const _0x42f6d6=_0x506409;_0x155766={...DEF_OPTIONS,..._0x155766},super(_0x155766),this[_0x42f6d6(0x19c)](_0x155766);}get['layer'](){return this['primitives'];}get['data'](){const _0x2378f7=_0x506409;return this[_0x2378f7(0x130)];}set['data'](_0x109b7b){this['setData'](_0x109b7b);}get[_0x506409(0x12a)](){return this['options']['colors'];}set[_0x506409(0x12a)](_0x583336){const _0x3fef8a=_0x506409;this[_0x3fef8a(0x110)][_0x3fef8a(0x12a)]=_0x583336,this['particleSystem']&&this[_0x3fef8a(0x140)]['setOptions']({'colors':_0x583336}),this[_0x3fef8a(0x172)]();}['_mountedHook'](){}['_addedHook'](){const _0x54f2c9=_0x506409;this['scene']=this['_map']['scene'],this[_0x54f2c9(0x152)]=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this[_0x54f2c9(0x1b9)]['scene'][_0x54f2c9(0x125)]['add'](this['primitives']),this[_0x54f2c9(0x19e)]={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x54f2c9(0x1aa)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window[_0x54f2c9(0x15c)]('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace[_0x54f2c9(0x1ec)][_0x54f2c9(0x1b3)],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this[_0x54f2c9(0x1a6)],this),this['_map']['on'](mars3d__namespace[_0x54f2c9(0x1ec)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x54f2c9(0x130)]&&this[_0x54f2c9(0x1e9)](this['_data']);}['_removedHook'](){const _0x502d7a=_0x506409;window['removeEventListener']('resize',this[_0x502d7a(0x172)]),this['_map'][_0x502d7a(0x141)](mars3d__namespace[_0x502d7a(0x1ec)][_0x502d7a(0x1bb)],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x502d7a(0x1b3)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this[_0x502d7a(0x1a6)],this),this['_map'][_0x502d7a(0x141)](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives'][_0x502d7a(0x1ce)](),this['_map']['scene']['primitives']['remove'](this[_0x502d7a(0x125)]);}['resize'](){const _0x483f94=_0x506409;if(!this['show']||!this['particleSystem'])return;this[_0x483f94(0x125)]['show']=![],this['primitives']['removeAll'](),this[_0x483f94(0x1b9)][_0x483f94(0x176)](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}[_0x506409(0x136)](_0x3e2f2c){const _0xf18121=_0x506409;this['particleSystem'][_0xf18121(0x123)](this['scene'][_0xf18121(0x155)]),this[_0xf18121(0x11c)](),this['primitives'][_0xf18121(0x167)]=!![];}['_onMapWhellEvent'](_0x974dcd){const _0x265de6=_0x506409;clearTimeout(this['refreshTimer']);if(!this['show']||!this[_0x265de6(0x140)])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{const _0x375e55=_0x265de6;if(!this[_0x375e55(0x167)])return;this['redraw']();},0xc8);}[_0x506409(0x159)](_0x2050d5){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x4b067f){const _0x1ed4f2=_0x506409;if(!this[_0x1ed4f2(0x167)]||!this['particleSystem'])return;this['mouse_down']&&(this[_0x1ed4f2(0x125)][_0x1ed4f2(0x167)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0xe1dfa5){const _0x3af9ea=_0x506409;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&this[_0x3af9ea(0x192)]&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0x562eee=_0x506409;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this['viewerParameters']),this[_0x562eee(0x125)]['show']=!![];}['setData'](_0x43fc43){const _0x93c355=_0x506409;this['_data']=_0x43fc43,this['particleSystem']&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x93c355(0x155)],_0x43fc43,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}[_0x506409(0x19c)](_0x3f41ff,_0x24a2b2){const _0x16a2ae=_0x506409;if(_0x3f41ff)for(const _0x342b17 in _0x3f41ff){this[_0x342b17]=_0x3f41ff[_0x342b17];}this['particleSystem']&&this[_0x16a2ae(0x140)]['setOptions'](this['getOptions']());}[_0x506409(0x19b)](){const _0x8c341a=_0x506409,_0xfad18f=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this[_0x8c341a(0x114)]=_0xfad18f*_0xfad18f,{'particlesTextureSize':_0xfad18f,'maxParticles':this[_0x8c341a(0x114)],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x8c341a(0x188)],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}[_0x506409(0x11c)](){const _0x177e15=_0x506409;this['primitives']['add'](this['particleSystem'][_0x177e15(0x1df)][_0x177e15(0x125)]['getWind']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this[_0x177e15(0x125)]['add'](this['particleSystem']['particlesComputing'][_0x177e15(0x125)]['updatePosition']),this[_0x177e15(0x125)][_0x177e15(0x14e)](this[_0x177e15(0x140)]['particlesComputing']['primitives']['postProcessingPosition']),this['primitives']['add'](this[_0x177e15(0x140)]['particlesComputing'][_0x177e15(0x125)]['postProcessingSpeed']),this[_0x177e15(0x125)]['add'](this['particleSystem'][_0x177e15(0x171)][_0x177e15(0x125)]['segments']),this['primitives'][_0x177e15(0x14e)](this['particleSystem'][_0x177e15(0x171)][_0x177e15(0x125)][_0x177e15(0x180)]),this['primitives'][_0x177e15(0x14e)](this['particleSystem']['particlesRendering']['primitives'][_0x177e15(0x195)]);}[_0x506409(0x186)](){const _0x31d0dc=_0x506409;let _0x221c03=this['camera']['computeViewRectangle'](this['scene']['globe'][_0x31d0dc(0x1e3)]);if(!_0x221c03){const _0xa2c61f=this[_0x31d0dc(0x1b9)][_0x31d0dc(0x143)]();_0x221c03=Cesium$1['Rectangle']['fromDegrees'](_0xa2c61f[_0x31d0dc(0x14f)],_0xa2c61f['ymin'],_0xa2c61f[_0x31d0dc(0x112)],_0xa2c61f['ymax']);}const _0x132d16=Util['viewRectangleToLonLatRange'](_0x221c03);this['viewerParameters']['lonRange']['x']=_0x132d16['lon']['min'],this['viewerParameters'][_0x31d0dc(0x145)]['y']=_0x132d16['lon']['max'],this['viewerParameters']['latRange']['x']=_0x132d16['lat']['min'],this['viewerParameters'][_0x31d0dc(0x16a)]['y']=_0x132d16['lat']['max'];const _0x1994a5=this['camera'][_0x31d0dc(0x16b)](this[_0x31d0dc(0x1aa)],this['scene'][_0x31d0dc(0x1ae)],this['scene']['drawingBufferHeight']);_0x1994a5>0x0&&(this['viewerParameters']['pixelSize']=_0x1994a5);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer'][_0x506409(0x128)]=WindLayer;class CanvasParticle{constructor(){this['lng']=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null;}['destroy'](){for(const _0x186b57 in this){delete this[_0x186b57];}}}class CanvasWindField{constructor(_0x3e60ea){this['setOptions'](_0x3e60ea);}get['speedRate'](){const _0x3995cf=_0x506409;return this[_0x3995cf(0x1b6)];}set['speedRate'](_0x42f808){const _0x350dff=_0x506409;this['_speedRate']=(0x64-(_0x42f808>0x63?0x63:_0x42f808))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x350dff(0x14f)])/this['_speedRate'],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){const _0x50c8bf=_0x506409;return this[_0x50c8bf(0x156)];}set['maxAge'](_0x1c3f1f){this['_maxAge']=_0x1c3f1f;}['setOptions'](_0x117b8e){const _0x130b46=_0x506409;this['options']=_0x117b8e,this[_0x130b46(0x1d9)]=_0x117b8e[_0x130b46(0x1d9)]||0x78,this['speedRate']=_0x117b8e[_0x130b46(0x1dd)]||0x32,this['particles']=[];const _0x385a02=_0x117b8e['particlesNumber']||0x1000;for(let _0x4110b0=0x0;_0x4110b0<_0x385a02;_0x4110b0++){const _0x37b7e7=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x37b7e7);}}['setDate'](_0x377ef6){const _0x5ac1fd=_0x506409;this['rows']=_0x377ef6['rows'],this[_0x5ac1fd(0x153)]=_0x377ef6['cols'],this['xmin']=_0x377ef6[_0x5ac1fd(0x14f)],this['xmax']=_0x377ef6['xmax'],this[_0x5ac1fd(0x194)]=_0x377ef6['ymin'],this[_0x5ac1fd(0x12d)]=_0x377ef6['ymax'],this['grid']=[];const _0x3269e0=_0x377ef6['udata'],_0x51c87e=_0x377ef6[_0x5ac1fd(0x1b7)];let _0xb84c5b=![];_0x3269e0['length']===this['rows']&&_0x3269e0[0x0][_0x5ac1fd(0x17b)]===this['cols']&&(_0xb84c5b=!![]);let _0x115f1f=0x0,_0x210ebb=null,_0x459590=null;for(let _0x46121d=0x0;_0x46121d<this['rows'];_0x46121d++){_0x210ebb=[];for(let _0x279419=0x0;_0x279419<this['cols'];_0x279419++,_0x115f1f++){_0xb84c5b?_0x459590=this['_calcUV'](_0x3269e0[_0x46121d][_0x279419],_0x51c87e[_0x46121d][_0x279419]):_0x459590=this['_calcUV'](_0x3269e0[_0x115f1f],_0x51c87e[_0x115f1f]),_0x210ebb[_0x5ac1fd(0x1d5)](_0x459590);}this[_0x5ac1fd(0x19f)]['push'](_0x210ebb);}this['options']['reverseY']&&this[_0x5ac1fd(0x19f)][_0x5ac1fd(0x160)]();}[_0x506409(0x129)](){delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x5ba0af,_0x46359e){const _0x8a64b3=_0x506409,_0x41b733=(_0x5ba0af-this[_0x8a64b3(0x14f)])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x26b2da=(this['ymax']-_0x46359e)/(this[_0x8a64b3(0x12d)]-this['ymin'])*(this['rows']-0x1);return[_0x41b733,_0x26b2da];}[_0x506409(0x1e8)](_0x1347af,_0x167a57){const _0x3baaf1=_0x506409;if(_0x1347af<0x0||_0x1347af>=this['cols']||_0x167a57>=this['rows'])return[0x0,0x0,0x0];const _0x179a96=Math['floor'](_0x1347af),_0x39706b=Math['floor'](_0x167a57);if(_0x179a96===_0x1347af&&_0x39706b===_0x167a57)return this['grid'][_0x167a57][_0x1347af];const _0x5adbd8=_0x179a96+0x1,_0x2b5f00=_0x39706b+0x1,_0x246a1a=this[_0x3baaf1(0x1e8)](_0x179a96,_0x39706b),_0x48ea07=this['getUVByXY'](_0x5adbd8,_0x39706b),_0x1cffa5=this['getUVByXY'](_0x179a96,_0x2b5f00),_0x4a86f2=this['getUVByXY'](_0x5adbd8,_0x2b5f00);let _0x46891e=null;try{_0x46891e=this['_bilinearInterpolation'](_0x1347af-_0x179a96,_0x167a57-_0x39706b,_0x246a1a,_0x48ea07,_0x1cffa5,_0x4a86f2);}catch(_0x4d9ac4){console['log'](_0x1347af,_0x167a57);}return _0x46891e;}[_0x506409(0x16d)](_0x11b33d,_0x83a99,_0xc1696c,_0x252fb4,_0x3f6c63,_0x20e83b){const _0x4801f8=_0x506409,_0x2fb6f5=0x1-_0x11b33d,_0x209535=0x1-_0x83a99,_0x26a063=_0x2fb6f5*_0x209535,_0x359d32=_0x11b33d*_0x209535,_0x17ed84=_0x2fb6f5*_0x83a99,_0x4d1071=_0x11b33d*_0x83a99,_0x5be1a1=_0xc1696c[0x0]*_0x26a063+_0x252fb4[0x0]*_0x359d32+_0x3f6c63[0x0]*_0x17ed84+_0x20e83b[0x0]*_0x4d1071,_0x19dc04=_0xc1696c[0x1]*_0x26a063+_0x252fb4[0x1]*_0x359d32+_0x3f6c63[0x1]*_0x17ed84+_0x20e83b[0x1]*_0x4d1071;return this[_0x4801f8(0x1e7)](_0x5be1a1,_0x19dc04);}[_0x506409(0x1e7)](_0x807d48,_0x46820a){return[+_0x807d48,+_0x46820a,Math['sqrt'](_0x807d48*_0x807d48+_0x46820a*_0x46820a)];}['getUVByPoint'](_0x35093d,_0xdb94d1){const _0x218626=_0x506409;if(!this[_0x218626(0x124)](_0x35093d,_0xdb94d1))return null;const _0x63e9c9=this[_0x218626(0x127)](_0x35093d,_0xdb94d1),_0x2b766c=this['getUVByXY'](_0x63e9c9[0x0],_0x63e9c9[0x1]);return _0x2b766c;}['isInExtent'](_0x36d205,_0xdbf1e6){const _0x367103=_0x506409;return _0x36d205>=this[_0x367103(0x14f)]&&_0x36d205<=this['xmax']&&_0xdbf1e6>=this['ymin']&&_0xdbf1e6<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x46c5dd=_0x506409,_0x301222=fRandomByfloat(this['xmin'],this['xmax']),_0x4698ea=fRandomByfloat(this[_0x46c5dd(0x194)],this[_0x46c5dd(0x12d)]);return{'lat':_0x4698ea,'lng':_0x301222};}[_0x506409(0x1af)](){const _0x2fbfcf=_0x506409;let _0x321dde,_0x14b8a9,_0x421460;for(let _0xcb6572=0x0,_0x1ab2f2=this['particles'][_0x2fbfcf(0x17b)];_0xcb6572<_0x1ab2f2;_0xcb6572++){let _0x43c07a=this['particles'][_0xcb6572];_0x43c07a[_0x2fbfcf(0x18b)]<=0x0&&(_0x43c07a=this['_randomParticle'](_0x43c07a));if(_0x43c07a['age']>0x0){const _0x4cee37=_0x43c07a[_0x2fbfcf(0x1c3)],_0x28e6b8=_0x43c07a['tlat'];_0x421460=this['getUVByPoint'](_0x4cee37,_0x28e6b8),_0x421460?(_0x321dde=_0x4cee37+this['_calc_speedRate'][0x0]*_0x421460[0x0],_0x14b8a9=_0x28e6b8+this['_calc_speedRate'][0x1]*_0x421460[0x1],_0x43c07a['lng']=_0x4cee37,_0x43c07a['lat']=_0x28e6b8,_0x43c07a['tlng']=_0x321dde,_0x43c07a['tlat']=_0x14b8a9,_0x43c07a['age']--):_0x43c07a[_0x2fbfcf(0x18b)]=0x0;}}return this[_0x2fbfcf(0x14d)];}['_randomParticle'](_0x3e4a81){const _0xfeebf3=_0x506409;let _0x4f5ead,_0xf82bd;for(let _0x5b0fc3=0x0;_0x5b0fc3<0x1e;_0x5b0fc3++){_0x4f5ead=this[_0xfeebf3(0x1e6)](),_0xf82bd=this['getUVByPoint'](_0x4f5ead['lng'],_0x4f5ead['lat']);if(_0xf82bd&&_0xf82bd[0x2]>0x0)break;}if(!_0xf82bd)return _0x3e4a81;const _0x5e1e33=_0x4f5ead['lng']+this['_calc_speedRate'][0x0]*_0xf82bd[0x0],_0x2c4bb6=_0x4f5ead[_0xfeebf3(0x17a)]+this[_0xfeebf3(0x1e5)][0x1]*_0xf82bd[0x1];return _0x3e4a81['lng']=_0x4f5ead['lng'],_0x3e4a81['lat']=_0x4f5ead[_0xfeebf3(0x17a)],_0x3e4a81['tlng']=_0x5e1e33,_0x3e4a81['tlat']=_0x2c4bb6,_0x3e4a81[_0xfeebf3(0x18b)]=Math['round'](Math['random']()*this['maxAge']),_0x3e4a81;}['destroy'](){for(const _0xf8bd0b in this){delete this[_0xf8bd0b];}}}function _0x1e80(_0x42d67e,_0x3f054d){const _0x539a18=_0x539a();return _0x1e80=function(_0x1e80c8,_0x47c8ab){_0x1e80c8=_0x1e80c8-0x10f;let _0x2ea43e=_0x539a18[_0x1e80c8];return _0x2ea43e;},_0x1e80(_0x42d67e,_0x3f054d);}function fRandomByfloat(_0x444402,_0x1eda80){return _0x444402+Math['random']()*(_0x1eda80-_0x444402);}const Cesium=mars3d__namespace[_0x506409(0x15a)],BaseLayer=mars3d__namespace[_0x506409(0x1d1)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x5822c3={}){const _0x3a606c=_0x506409;super(_0x5822c3),this['_setOptionsHook'](_0x5822c3),this[_0x3a606c(0x154)]=null;}['_setOptionsHook'](_0x285c72,_0x365cc1){const _0x46d556=_0x506409;this['frameTime']=0x3e8/(_0x285c72['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this[_0x46d556(0x1bf)]=_0x285c72['color']||'#ffffff',this['lineWidth']=_0x285c72[_0x46d556(0x1bc)]||0x1,this['fixedHeight']=_0x285c72['fixedHeight']??0x0,this['reverseY']=_0x285c72['reverseY']??![],this['windField']&&this['windField']['setOptions'](_0x285c72);}get['layer'](){return this['canvas'];}get[_0x506409(0x1d6)](){const _0x5e16d3=_0x506409;return this[_0x5e16d3(0x1b9)][_0x5e16d3(0x147)]['canvas']['clientWidth'];}get[_0x506409(0x162)](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){const _0x43efb8=_0x506409;return this[_0x43efb8(0x16c)];}set['pointerEvents'](_0x506723){const _0x2d37e1=_0x506409;this[_0x2d37e1(0x16c)]=_0x506723;if(!this[_0x2d37e1(0x154)])return;_0x506723?this[_0x2d37e1(0x154)]['style'][_0x2d37e1(0x16f)]='all':this['canvas']['style'][_0x2d37e1(0x16f)]=_0x2d37e1(0x198);}get[_0x506409(0x114)](){const _0xf3f0f8=_0x506409;return this['options'][_0xf3f0f8(0x114)];}set[_0x506409(0x114)](_0x4968b1){const _0x227e63=_0x506409;this['options']['particlesNumber']=_0x4968b1,clearTimeout(this[_0x227e63(0x1dc)]),this[_0x227e63(0x1dc)]=setTimeout(()=>{const _0x1bffc5=_0x227e63;this[_0x1bffc5(0x144)]();},0x1f4);}get[_0x506409(0x1dd)](){const _0xea8169=_0x506409;return this['options'][_0xea8169(0x1dd)];}set[_0x506409(0x1dd)](_0x1750e1){const _0x4b119b=_0x506409;this[_0x4b119b(0x110)]['speedRate']=_0x1750e1,this['windField']&&(this['windField']['speedRate']=_0x1750e1);}get[_0x506409(0x1d9)](){return this['options']['maxAge'];}set[_0x506409(0x1d9)](_0x340512){const _0x27164f=_0x506409;this['options'][_0x27164f(0x1d9)]=_0x340512,this['windField']&&(this[_0x27164f(0x1d0)]['maxAge']=_0x340512);}get['data'](){return this['windData'];}set['data'](_0x53e6cb){this['setData'](_0x53e6cb);}['_showHook'](_0xd9cc3c){const _0x2be9b3=_0x506409;_0xd9cc3c?this[_0x2be9b3(0x1d4)]():(this['windData']&&(this['options'][_0x2be9b3(0x169)]=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0xbabe0b=_0x506409;this['options']['worker']?this[_0xbabe0b(0x18f)]():this['windField']=new CanvasWindField(this['options']);}[_0x506409(0x1d4)](){const _0x22e34c=_0x506409;this[_0x22e34c(0x154)]=this['_createCanvas'](),this[_0x22e34c(0x1b8)]=this[_0x22e34c(0x154)]['getContext']('2d',{'willReadFrequently':!![]}),this[_0x22e34c(0x1a5)](),this['options'][_0x22e34c(0x169)]&&this['setData'](this['options']['data']);}[_0x506409(0x193)](){const _0x2e7c23=_0x506409;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container'][_0x2e7c23(0x13c)](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x373837=_0x506409,_0x4b6365=mars3d__namespace['DomUtil']['create']('canvas','mars3d-canvasWind',this['_map']['container']);return _0x4b6365['style'][_0x373837(0x1a4)]='absolute',_0x4b6365['style']['top']='0px',_0x4b6365['style']['left']='0px',_0x4b6365['style'][_0x373837(0x187)]=this['_map'][_0x373837(0x147)][_0x373837(0x154)]['clientWidth']+'px',_0x4b6365['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',_0x4b6365[_0x373837(0x157)][_0x373837(0x12f)]=this[_0x373837(0x16c)]?'auto':_0x373837(0x198),_0x4b6365['style']['zIndex']=this['options']['zIndex']??0x9,_0x4b6365[_0x373837(0x187)]=this['_map'][_0x373837(0x147)]['canvas'][_0x373837(0x14b)],_0x4b6365['height']=this['_map'][_0x373837(0x147)]['canvas']['clientHeight'],_0x4b6365;}[_0x506409(0x172)](){const _0x45092e=_0x506409;this['canvas']&&(this[_0x45092e(0x154)][_0x45092e(0x157)]['width']=this['_map'][_0x45092e(0x147)][_0x45092e(0x154)][_0x45092e(0x14b)]+'px',this[_0x45092e(0x154)][_0x45092e(0x157)]['height']=this['_map']['scene'][_0x45092e(0x154)]['clientHeight']+'px',this['canvas'][_0x45092e(0x187)]=this['_map'][_0x45092e(0x147)]['canvas']['clientWidth'],this['canvas']['height']=this['_map']['scene']['canvas']['clientHeight']);}[_0x506409(0x1a5)](){const _0x188a40=_0x506409,_0x5e0476=this;let _0x2e0b6f=Date['now']();(function _0x4e9f37(){const _0x34e377=_0x1e80;_0x5e0476[_0x34e377(0x14c)]=window['requestAnimationFrame'](_0x4e9f37);if(_0x5e0476['show']&&_0x5e0476[_0x34e377(0x1d0)]){const _0xe84c8d=Date[_0x34e377(0x137)](),_0x27c6a4=_0xe84c8d-_0x2e0b6f;_0x27c6a4>_0x5e0476['frameTime']&&(_0x2e0b6f=_0xe84c8d-_0x27c6a4%_0x5e0476['frameTime'],_0x5e0476['update']());}}(),window['addEventListener']('resize',this[_0x188a40(0x172)]['bind'](this),![]),this[_0x188a40(0x17e)]=![],this['mouse_move']=![],this[_0x188a40(0x110)]['mouseHidden']&&(this[_0x188a40(0x1b9)]['on'](mars3d__namespace[_0x188a40(0x1ec)]['wheel'],this['_onMapWhellEvent'],this),this[_0x188a40(0x1b9)]['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x188a40(0x1ec)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x2b9ff0=_0x506409;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window[_0x2b9ff0(0x1e1)]('resize',this['resize']),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace['EventType']['wheel'],this[_0x2b9ff0(0x1c1)],this),this['_map']['off'](mars3d__namespace[_0x2b9ff0(0x1ec)][_0x2b9ff0(0x11b)],this['_onMouseDownEvent'],this),this[_0x2b9ff0(0x1b9)]['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this[_0x2b9ff0(0x1b9)]['off'](mars3d__namespace['EventType'][_0x2b9ff0(0x1d7)],this[_0x2b9ff0(0x135)],this));}['_onMapWhellEvent'](_0xa1f779){const _0x52c7ba=_0x506409;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas'][_0x52c7ba(0x157)]['visibility']=_0x52c7ba(0x1a7),this['refreshTimer']=setTimeout(()=>{const _0x120d73=_0x52c7ba;if(!this[_0x120d73(0x167)])return;this['redraw'](),this['canvas']['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x2b8bcf){const _0x236d1c=_0x506409;this['mouse_down']=!![],this[_0x236d1c(0x1b9)]['off'](mars3d__namespace['EventType'][_0x236d1c(0x1d7)],this[_0x236d1c(0x135)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x236d1c(0x1d7)],this['_onMouseMoveEvent'],this);}[_0x506409(0x135)](_0x23e9dc){const _0x4ea2dc=_0x506409;if(!this[_0x4ea2dc(0x167)]||!this['canvas'])return;this['mouse_down']&&(this['canvas']['style']['visibility']='hidden',this[_0x4ea2dc(0x192)]=!![]);}['_onMouseUpEvent'](_0x1f7b37){const _0xcc3aab=_0x506409;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace[_0xcc3aab(0x1ec)]['mouseMove'],this[_0xcc3aab(0x135)],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this[_0xcc3aab(0x154)]['style'][_0xcc3aab(0x1a9)]='visible',this['mouse_down']=![],this['mouse_move']=![];}['setData'](_0x55ef83){const _0x59dc63=_0x506409;this['clear'](),this['windData']=_0x55ef83,this['windField'][_0x59dc63(0x126)](_0x55ef83),this['redraw']();}['redraw'](){const _0x297d69=_0x506409;if(!this[_0x297d69(0x167)])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){const _0x518a64=_0x506409;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this[_0x518a64(0x1d0)]['update']();else{const _0xca45e9=this['windField']['getParticles']();this['_drawLines'](_0xca45e9);}this[_0x518a64(0x1a2)]=![];}['_drawLines'](_0x1f32fa){const _0x298004=_0x506409;this[_0x298004(0x1b8)]['globalCompositeOperation']='destination-in',this['canvasContext'][_0x298004(0x179)](0x0,0x0,this[_0x298004(0x1d6)],this['canvasHeight']),this[_0x298004(0x1b8)]['globalCompositeOperation']='lighter',this[_0x298004(0x1b8)][_0x298004(0x12c)]=0.9,this['canvasContext'][_0x298004(0x196)](),this['canvasContext']['lineWidth']=this[_0x298004(0x1bc)],this[_0x298004(0x1b8)]['strokeStyle']=this[_0x298004(0x1bf)];const _0x12d4c0=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x15756e=this['canvasWidth']*0.25;for(let _0x2319c3=0x0,_0x43cb52=_0x1f32fa[_0x298004(0x17b)];_0x2319c3<_0x43cb52;_0x2319c3++){const _0x121d8f=_0x1f32fa[_0x2319c3],_0x544976=this['_tomap'](_0x121d8f[_0x298004(0x1ef)],_0x121d8f[_0x298004(0x17a)],_0x121d8f),_0x529439=this['_tomap'](_0x121d8f[_0x298004(0x1c3)],_0x121d8f['tlat'],_0x121d8f);if(!_0x544976||!_0x529439)continue;if(_0x12d4c0&&Math['abs'](_0x544976[0x0]-_0x529439[0x0])>=_0x15756e)continue;this['canvasContext']['moveTo'](_0x544976[0x0],_0x544976[0x1]),this['canvasContext'][_0x298004(0x11d)](_0x529439[0x0],_0x529439[0x1]);}this['canvasContext']['stroke']();}[_0x506409(0x1ea)](_0x231703,_0x3326b6,_0x413093){const _0x63c813=_0x506409,_0x92e279=Cesium[_0x63c813(0x133)]['fromDegrees'](_0x231703,_0x3326b6,this['fixedHeight']),_0x7a9dcb=this['_map']['scene'];if(_0x7a9dcb['mode']===Cesium['SceneMode']['SCENE3D']){const _0x58ecf9=new Cesium['EllipsoidalOccluder'](_0x7a9dcb['globe'][_0x63c813(0x1e3)],_0x7a9dcb['camera']['positionWC']),_0x19c8a9=_0x58ecf9['isPointVisible'](_0x92e279);if(!_0x19c8a9)return _0x413093['age']=0x0,null;}const _0x5a17de=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map']['scene'],_0x92e279);return _0x5a17de?[_0x5a17de['x'],_0x5a17de['y']]:null;}['clear'](){const _0x342b40=_0x506409;this[_0x342b40(0x1d0)]['clear'](),delete this['windData'];}['initWorker'](){const _0x3194a9=_0x506409;this[_0x3194a9(0x1c0)]=new Worker(this['options']['worker']),this[_0x3194a9(0x1c0)]['onmessage']=_0x2dab22=>{this['_drawLines'](_0x2dab22['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x324e37=>{const _0x23317d=_0x3194a9;this[_0x23317d(0x1c0)]['postMessage']({'type':_0x23317d(0x134),'options':_0x324e37});},'setOptions':_0x406aaf=>{this['worker']['postMessage']({'type':'setOptions','options':_0x406aaf});},'setDate':_0x3578f9=>{const _0x3f480e=_0x3194a9;this['worker'][_0x3f480e(0x1b0)]({'type':_0x3f480e(0x126),'data':_0x3578f9});},'update':()=>{const _0x3a3ccd=_0x3194a9;if(this['_updateIng2'])return;this['_updateIng2']=!![],this[_0x3a3ccd(0x1c0)][_0x3a3ccd(0x1b0)]({'type':'update'});},'clear':()=>{const _0x48bcc9=_0x3194a9;this[_0x48bcc9(0x1c0)]['postMessage']({'type':_0x48bcc9(0x129)});}},this['windField']['init'](this[_0x3194a9(0x110)]);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports[_0x506409(0x11a)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
14
|
+
'use strict';const _0x32f253=_0x10ca;function _0x10ca(_0x3de869,_0x2fd626){const _0x1bf454=_0x1bf4();return _0x10ca=function(_0x10ca67,_0x26d0d5){_0x10ca67=_0x10ca67-0x74;let _0x302ddc=_0x1bf454[_0x10ca67];return _0x302ddc;},_0x10ca(_0x3de869,_0x2fd626);}(function(_0x7814d3,_0xe92d4d){const _0x5495d0=_0x10ca,_0x2c4b07=_0x7814d3();while(!![]){try{const _0x2b6bf9=parseInt(_0x5495d0(0x133))/0x1*(parseInt(_0x5495d0(0x118))/0x2)+-parseInt(_0x5495d0(0xd7))/0x3+-parseInt(_0x5495d0(0xea))/0x4*(-parseInt(_0x5495d0(0xfa))/0x5)+parseInt(_0x5495d0(0x13e))/0x6+parseInt(_0x5495d0(0x155))/0x7*(parseInt(_0x5495d0(0x97))/0x8)+-parseInt(_0x5495d0(0xa9))/0x9*(parseInt(_0x5495d0(0x138))/0xa)+-parseInt(_0x5495d0(0xb9))/0xb;if(_0x2b6bf9===_0xe92d4d)break;else _0x2c4b07['push'](_0x2c4b07['shift']());}catch(_0x2fd597){_0x2c4b07['push'](_0x2c4b07['shift']());}}}(_0x1bf4,0x3cf54));function _interopNamespace(_0x2fc2bf){const _0x23e46f=_0x10ca;if(_0x2fc2bf&&_0x2fc2bf['__esModule'])return _0x2fc2bf;var _0x14e702=Object['create'](null);return _0x2fc2bf&&Object[_0x23e46f(0xcd)](_0x2fc2bf)['forEach'](function(_0x4d46a5){const _0x5c0a0e=_0x23e46f;if(_0x4d46a5!==_0x5c0a0e(0x149)){var _0x521607=Object['getOwnPropertyDescriptor'](_0x2fc2bf,_0x4d46a5);Object['defineProperty'](_0x14e702,_0x4d46a5,_0x521607['get']?_0x521607:{'enumerable':!![],'get':function(){return _0x2fc2bf[_0x4d46a5];}});}}),_0x14e702['default']=_0x2fc2bf,_0x14e702;}function _0x1bf4(){const _0x3c78f0=['redraw','drawingBufferWidth','SceneMode','commandList','getDefaultRenderState','windField','_removedHook','layer','log','globalCompositeOperation','TextureMagnificationFilter','positionWC','Cesium','globe','particlesTextures','height','tlng','push','setData','nextTrailsColor','particlesTextureSize','color','width','2tAEmlX','postProcessingPosition','TWO_PI','none','WindUtil','1217230YfAEFN','LayerUtil','ymin','getOptions','textures','segments','1936974YRFzUa','rawRenderState','postProcessingSpeed','Cartesian2','animateFrame','lineWidth','_pointerEvents','dropRate','SceneTransforms','currentParticlesPosition','getWind','default','toGridXY','primitives','now','getParticles','fillRect','createParticlesTextures','xmax','isInExtent','Math','Framebuffer','strokeStyle','623kWSqwD','wheel','fromDegrees','commandToExecute','_showHook','execute','ellipsoid','CanvasWindLayer','fragmentShaderSource','framebuffers','windTextures','atan2','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','options','reverseY','add','_data','age','_addedHook','currentTrailsDepth','windData','canvasContext','_onMouseUpEvent','length','createComputingPrimitives','createCommand','grid','PI_OVER_THREE','0px','destroyParticlesTextures','CanvasWindField','fill','createTexture','lng','autoClear','mouseUp','_speedRate','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','defined','speedRate','canvasResize','attributeLocations','createFramebuffer','GeometryAttributes','Cartesian3','resize','lat','mouse_down','show','Sampler','EventType','particles','RGBA','7408UEdJWq','xmin','canvas','ClearCommand','outputTexture','fromGeometry','mode','nextParticlesPosition','clearCommand','particlesRendering','camera','LINEAR','max','clear','cols','particleSystem','SCENE3D','udata','36TcAIJI','currentTrails','ymax','toDegrees','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','min','_onMouseDownEvent','Rectangle','colorTable','getUVByXY','particlesComputing','getRandomLatLng','particlesWind','context','DISABLE_GL_POSITION_LOG_DEPTH','lev','2081167UzkOqq','colors','framebuffer','getPixelSize','lon','_map','shaderProgram','PrimitiveType','drawingBufferHeight','update','mouseDown','_randomParticle','getColorTexture','Geometry','worker','addEventListener','beginPath','setOptions','off','destroy','keys','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','maxParticles','PixelDatatype','_onMapWhellEvent','ZERO','defineProperty','commandType','randomBetween','_onMouseMoveEvent','746850ZfrAle','TextureMinificationFilter','levmax','remove','trails','bindEvent','THREE_PI_OVER_TWO','sqrt','mouse_move','vdata','postMessage','absolute','ComputeCommand','preRender','style','west','ShaderSource','_updateIng','geometry','280216HYFlXB','updateSpeed','latRange','DEPTH_COMPONENT','uniformMap','pow','STATIC_DRAW','maxAge','forEach','primitiveType','dimensions','lonRange','mouseMove','fromCssColorString','NEAREST','refreshParticles','25NmPONu','particlesNumber','floor','random','nextTrails','clientHeight','viewport','data','pixelSize','_drawLines','scene','nextParticlesSpeed','viewerParameters','ceil','applyViewerParameters','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','createRenderingPrimitives','Compute','FLOAT','depthMask','setDate','visibility','RenderState','rows','preExecute','tlat','_calc_speedRate','mouseHidden','fixedHeight','Color','419210CeKiHq','createSegmentsGeometry','removeAll','_tomap'];_0x1bf4=function(){return _0x3c78f0;};return _0x1bf4();}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x5c888b,_0x552f4c){const _0x5cf532=_0x5c888b*Math['cos'](Cesium$7['Math']['toRadians'](_0x552f4c));return _0x5cf532;}function getV(_0x17b8b2,_0x2b0856){const _0x34714c=_0x17b8b2*Math['sin'](Cesium$7['Math']['toRadians'](_0x2b0856));return _0x34714c;}function getSpeed(_0x340ce9,_0x3cc52f){const _0x3791e2=_0x10ca,_0x55753c=Math['sqrt'](Math[_0x3791e2(0xef)](_0x340ce9,0x2)+Math['pow'](_0x3cc52f,0x2));return _0x55753c;}function getDirection(_0x5946bd,_0x6491a3){const _0xafb622=_0x10ca;let _0x38fed2=Cesium$7['Math'][_0xafb622(0xac)](Math[_0xafb622(0x160)](_0x6491a3,_0x5946bd));return _0x38fed2+=_0x38fed2<0x0?0x168:0x0,_0x38fed2;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x31cb5f){const _0x5410c2=_0x10ca;this[_0x5410c2(0xd4)]=_0x31cb5f['commandType'],this['geometry']=_0x31cb5f['geometry'],this['attributeLocations']=_0x31cb5f[_0x5410c2(0x8b)],this['primitiveType']=_0x31cb5f[_0x5410c2(0xf3)],this[_0x5410c2(0xee)]=_0x31cb5f['uniformMap'],this['vertexShaderSource']=_0x31cb5f['vertexShaderSource'],this['fragmentShaderSource']=_0x31cb5f[_0x5410c2(0x15d)],this['rawRenderState']=_0x31cb5f[_0x5410c2(0x13f)],this['framebuffer']=_0x31cb5f[_0x5410c2(0xbb)],this[_0x5410c2(0x9b)]=_0x31cb5f['outputTexture'],this[_0x5410c2(0x84)]=_0x31cb5f['autoClear']??![],this[_0x5410c2(0x112)]=_0x31cb5f['preExecute'],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6[(_0x5410c2(0x9a))]({'color':new Cesium$6[(_0x5410c2(0x117))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}[_0x32f253(0x7b)](_0x32384a){const _0x596d7d=_0x32f253;switch(this['commandType']){case'Draw':{const _0x238ce0=Cesium$6['VertexArray'][_0x596d7d(0x9c)]({'context':_0x32384a,'geometry':this['geometry'],'attributeLocations':this[_0x596d7d(0x8b)],'bufferUsage':Cesium$6['BufferUsage'][_0x596d7d(0xf0)]}),_0x4cffa2=Cesium$6['ShaderProgram']['fromCache']({'context':_0x32384a,'attributeLocations':this[_0x596d7d(0x8b)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x124856=Cesium$6[_0x596d7d(0x110)]['fromCache'](this[_0x596d7d(0x13f)]);return new Cesium$6['DrawCommand']({'primitiveType':this[_0x596d7d(0xf3)],'shaderProgram':_0x4cffa2,'vertexArray':_0x238ce0,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x124856,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x596d7d(0x10b):{return new Cesium$6[(_0x596d7d(0xe3))]({'owner':this,'fragmentShaderSource':this[_0x596d7d(0x15d)],'uniformMap':this[_0x596d7d(0xee)],'outputTexture':this[_0x596d7d(0x9b)],'persists':!![]});}}}['setGeometry'](_0x4032ec,_0x26b8ee){const _0x18acc6=_0x32f253;this['geometry']=_0x26b8ee;const _0x5d524f=Cesium$6['VertexArray']['fromGeometry']({'context':_0x4032ec,'geometry':this[_0x18acc6(0xe9)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x5d524f;}[_0x32f253(0xc2)](_0x11603b){const _0x422a30=_0x32f253;if(!this['show'])return;if(_0x11603b['mode']!==Cesium$6['SceneMode'][_0x422a30(0xa7)])return;!Cesium$6[_0x422a30(0x88)](this[_0x422a30(0x158)])&&(this['commandToExecute']=this['createCommand'](_0x11603b[_0x422a30(0xb6)])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this[_0x422a30(0x9f)])&&_0x11603b[_0x422a30(0x11f)]['push'](this['clearCommand']),_0x11603b['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}[_0x32f253(0xcc)](){const _0x3c670a=_0x32f253;if(this[_0x3c670a(0x9f)]){var _0x46d4d8,_0x6de5a3;(_0x46d4d8=this[_0x3c670a(0x9f)])!==null&&_0x46d4d8!==void 0x0&&_0x46d4d8['vertexArray']&&this[_0x3c670a(0x9f)]['vertexArray']['destroy'](),(_0x6de5a3=this[_0x3c670a(0x9f)])!==null&&_0x6de5a3!==void 0x0&&_0x6de5a3['shaderProgram']&&this['clearCommand']['shaderProgram'][_0x3c670a(0xcc)](),delete this['clearCommand'];}return this[_0x3c670a(0x158)]&&(this['commandToExecute']['vertexArray']&&this['commandToExecute']['vertexArray']['destroy'](),this[_0x3c670a(0x158)][_0x3c670a(0xbf)]&&this['commandToExecute']['shaderProgram']['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x167f6e=function(){const _0x54dfeb=_0x10ca,_0x46ac25=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0x54dfeb(0x8d))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0])}),'st':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5['ComponentDatatype'][_0x54dfeb(0x10c)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x46ac25;},_0x5c6b89=function(_0x511a6b,_0xef4852){const _0x4a9a07=_0x10ca;if(Cesium$5[_0x4a9a07(0x88)](_0xef4852)){const _0x1607b8={};_0x1607b8['arrayBufferView']=_0xef4852,_0x511a6b['source']=_0x1607b8;}const _0x2a7bb=new Cesium$5['Texture'](_0x511a6b);return _0x2a7bb;},_0x5c34ea=function(_0x567906,_0x496031,_0x1a3d10){const _0x3a74dd=_0x10ca,_0x125d67=new Cesium$5[(_0x3a74dd(0x153))]({'context':_0x567906,'colorTextures':[_0x496031],'depthTexture':_0x1a3d10});return _0x125d67;},_0x38e495=function(_0x5df003){const _0x5469dc=_0x10ca,_0x35465f=!![],_0x43cfde=![],_0x10c043={'viewport':_0x5df003[_0x5469dc(0x100)],'depthTest':_0x5df003['depthTest'],'depthMask':_0x5df003[_0x5469dc(0x10d)],'blending':_0x5df003['blending']},_0x13034c=Cesium$5['Appearance'][_0x5469dc(0x120)](_0x35465f,_0x43cfde,_0x10c043);return _0x13034c;},_0x53f1e7=function(_0x2fd62c){const _0x1859f9=_0x10ca,_0x55aaa0={},_0x1e626e=Cesium$5['Math']['mod'](_0x2fd62c[_0x1859f9(0xe6)],Cesium$5['Math'][_0x1859f9(0x135)]),_0x8bfebb=Cesium$5['Math']['mod'](_0x2fd62c['east'],Cesium$5[_0x1859f9(0x152)]['TWO_PI']),_0x463ce0=_0x2fd62c[_0x1859f9(0x132)];let _0x2d513d,_0x207f74;_0x463ce0>Cesium$5['Math'][_0x1859f9(0xdd)]?(_0x2d513d=0x0,_0x207f74=Cesium$5['Math'][_0x1859f9(0x135)]):_0x8bfebb-_0x1e626e<_0x463ce0?(_0x2d513d=_0x1e626e,_0x207f74=_0x1e626e+_0x463ce0):(_0x2d513d=_0x1e626e,_0x207f74=_0x8bfebb);_0x55aaa0['lon']={'min':Cesium$5['Math']['toDegrees'](_0x2d513d),'max':Cesium$5['Math'][_0x1859f9(0xac)](_0x207f74)};const _0x4cf442=_0x2fd62c['south'],_0x322592=_0x2fd62c['north'],_0x36ef87=_0x2fd62c['height'],_0x5ed67f=_0x36ef87>Cesium$5['Math']['PI']/0xc?_0x36ef87/0x2:0x0;let _0x17c45d=Cesium$5[_0x1859f9(0x152)]['clampToLatitudeRange'](_0x4cf442-_0x5ed67f),_0x564c3d=Cesium$5['Math']['clampToLatitudeRange'](_0x322592+_0x5ed67f);return _0x17c45d<-Cesium$5['Math'][_0x1859f9(0x7d)]&&(_0x17c45d=-Cesium$5['Math']['PI_OVER_TWO']),_0x564c3d>Cesium$5[_0x1859f9(0x152)]['PI_OVER_THREE']&&(_0x564c3d=Cesium$5['Math']['PI_OVER_TWO']),_0x55aaa0[_0x1859f9(0x90)]={'min':Cesium$5['Math']['toDegrees'](_0x17c45d),'max':Cesium$5[_0x1859f9(0x152)][_0x1859f9(0xac)](_0x564c3d)},_0x55aaa0;};return{'getFullscreenQuad':_0x167f6e,'createTexture':_0x5c6b89,'createFramebuffer':_0x5c34ea,'createRawRenderState':_0x38e495,'viewRectangleToLonLatRange':_0x53f1e7};}());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=_0x32f253(0xce),fullscreen_vert=_0x32f253(0xad),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=_0x32f253(0x109);const Cesium$4=mars3d__namespace[_0x32f253(0x128)];class ParticlesRendering{constructor(_0x45d86c,_0x42cd35,_0x3c57c4,_0x29b620,_0x2448d1){const _0x3f667d=_0x32f253;this['createRenderingTextures'](_0x45d86c,_0x42cd35,_0x3c57c4['colors']),this['createRenderingFramebuffers'](_0x45d86c),this[_0x3f667d(0x10a)](_0x45d86c,_0x3c57c4,_0x29b620,_0x2448d1);}['createRenderingTextures'](_0x3c0fb3,_0x57e08e,_0x3a5d06){const _0x440e1e=_0x32f253,_0x21301a={'context':_0x3c0fb3,'width':_0x3c0fb3['drawingBufferWidth'],'height':_0x3c0fb3['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_BYTE']},_0x514642={'context':_0x3c0fb3,'width':_0x3c0fb3['drawingBufferWidth'],'height':_0x3c0fb3[_0x440e1e(0xc1)],'pixelFormat':Cesium$4['PixelFormat'][_0x440e1e(0xed)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x280bfa=_0x3a5d06['length'],_0x34672e=new Float32Array(_0x280bfa*0x3);for(let _0x21efe8=0x0;_0x21efe8<_0x280bfa;_0x21efe8++){const _0x24eab9=Cesium$4['Color'][_0x440e1e(0xf7)](_0x3a5d06[_0x21efe8]);_0x34672e[0x3*_0x21efe8]=_0x24eab9['red'],_0x34672e[0x3*_0x21efe8+0x1]=_0x24eab9['green'],_0x34672e[0x3*_0x21efe8+0x2]=_0x24eab9['blue'];}const _0x202125={'context':_0x3c0fb3,'width':_0x280bfa,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x440e1e(0x10c)],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4[_0x440e1e(0xd8)][_0x440e1e(0xa2)],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this['textures']={'segmentsColor':Util[_0x440e1e(0x82)](_0x21301a),'segmentsDepth':Util['createTexture'](_0x514642),'currentTrailsColor':Util['createTexture'](_0x21301a),'currentTrailsDepth':Util[_0x440e1e(0x82)](_0x514642),'nextTrailsColor':Util['createTexture'](_0x21301a),'nextTrailsDepth':Util['createTexture'](_0x514642),'colorTable':Util['createTexture'](_0x202125,_0x34672e)};}['createRenderingFramebuffers'](_0x274cd7){const _0x2f2c0b=_0x32f253;this['framebuffers']={'segments':Util['createFramebuffer'](_0x274cd7,this[_0x2f2c0b(0x13c)]['segmentsColor'],this[_0x2f2c0b(0x13c)]['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x274cd7,this[_0x2f2c0b(0x13c)]['currentTrailsColor'],this['textures'][_0x2f2c0b(0x75)]),'nextTrails':Util[_0x2f2c0b(0x8c)](_0x274cd7,this['textures'][_0x2f2c0b(0x12f)],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x29a1c7){const _0x3312a8=_0x32f253,_0xfb88d=0x4;let _0x5d2ec9=[];for(let _0x18026c=0x0;_0x18026c<_0x29a1c7['particlesTextureSize'];_0x18026c++){for(let _0x417ee9=0x0;_0x417ee9<_0x29a1c7['particlesTextureSize'];_0x417ee9++){for(let _0x423452=0x0;_0x423452<_0xfb88d;_0x423452++){_0x5d2ec9['push'](_0x18026c/_0x29a1c7[_0x3312a8(0x130)]),_0x5d2ec9['push'](_0x417ee9/_0x29a1c7[_0x3312a8(0x130)]);}}}_0x5d2ec9=new Float32Array(_0x5d2ec9);let _0x3c9f92=[];const _0x30378f=[-0x1,0x1],_0x46533e=[-0x1,0x1];for(let _0x2ee577=0x0;_0x2ee577<_0x29a1c7['maxParticles'];_0x2ee577++){for(let _0x11b8f9=0x0;_0x11b8f9<_0xfb88d/0x2;_0x11b8f9++){for(let _0x1e9a23=0x0;_0x1e9a23<_0xfb88d/0x2;_0x1e9a23++){_0x3c9f92['push'](_0x30378f[_0x11b8f9]),_0x3c9f92['push'](_0x46533e[_0x1e9a23]),_0x3c9f92['push'](0x0);}}}_0x3c9f92=new Float32Array(_0x3c9f92);const _0x5a4269=0x6*_0x29a1c7['maxParticles'],_0xd13301=new Uint32Array(_0x5a4269);for(let _0x2a91cc=0x0,_0xd425e0=0x0,_0x210111=0x0;_0x2a91cc<_0x29a1c7['maxParticles'];_0x2a91cc++){_0xd13301[_0xd425e0++]=_0x210111+0x0,_0xd13301[_0xd425e0++]=_0x210111+0x1,_0xd13301[_0xd425e0++]=_0x210111+0x2,_0xd13301[_0xd425e0++]=_0x210111+0x2,_0xd13301[_0xd425e0++]=_0x210111+0x1,_0xd13301[_0xd425e0++]=_0x210111+0x3,_0x210111+=0x4;}const _0x47b897=new Cesium$4[(_0x3312a8(0xc6))]({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x5d2ec9}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x3c9f92})}),'indices':_0xd13301});return _0x47b897;}['createRenderingPrimitives'](_0x80a6db,_0x5b09da,_0x5946d0,_0x4009c9){const _0x3ace56=_0x32f253,_0x151b2b=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0x3ace56(0x119)](_0x5b09da),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0x41ba44=_0x3ace56;return _0x4009c9['particlesTextures'][_0x41ba44(0x147)];},'postProcessingPosition':function(){return _0x4009c9['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){const _0x48c0f4=_0x3ace56;return _0x4009c9[_0x48c0f4(0x12a)]['postProcessingSpeed'];},'colorTable':function(){return _0x151b2b['textures']['colorTable'];},'aspect':function(){const _0x549495=_0x3ace56;return _0x80a6db[_0x549495(0x11d)]/_0x80a6db['drawingBufferHeight'];},'pixelSize':function(){return _0x5946d0['pixelSize'];},'lineWidth':function(){const _0x314e9a=_0x3ace56;return _0x5b09da[_0x314e9a(0x143)];},'particleHeight':function(){return _0x5b09da['particleHeight'];}},'vertexShaderSource':new Cesium$4[(_0x3ace56(0xe7))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this[_0x3ace56(0x15e)]['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x3ace56(0xc0)]['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0x151b2b['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x20c4d5=_0x3ace56;return _0x151b2b[_0x20c4d5(0x13c)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x30ffa1=_0x3ace56;return _0x151b2b['framebuffers'][_0x30ffa1(0xaa)][_0x30ffa1(0xc5)](0x0);},'trailsDepthTexture':function(){return _0x151b2b['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0x5b09da['fadeOpacity'];}},'vertexShaderSource':new Cesium$4[(_0x3ace56(0xe7))]({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x3ace56(0x87)],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction']['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x22b2f6=_0x3ace56,_0x7ba02b=_0x151b2b['framebuffers']['currentTrails'];_0x151b2b['framebuffers']['currentTrails']=_0x151b2b[_0x22b2f6(0x15e)]['nextTrails'],_0x151b2b['framebuffers']['nextTrails']=_0x7ba02b,_0x151b2b['primitives']['trails']['commandToExecute']['framebuffer']=_0x151b2b['framebuffers'][_0x22b2f6(0xfe)],_0x151b2b[_0x22b2f6(0x14b)][_0x22b2f6(0xdb)]['clearCommand']['framebuffer']=_0x151b2b['framebuffers'][_0x22b2f6(0xfe)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x3ace56(0xc0)]['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x319c3b=_0x3ace56;return _0x151b2b['framebuffers'][_0x319c3b(0xfe)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x4d5ea8=_0x3ace56;return _0x151b2b['framebuffers'][_0x4d5ea8(0xfe)]['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x3ace56(0xb7)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag='uniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20nextParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x20//\x20use\x20to\x20improve\x20the\x20pseudo-random\x20generator\x0auniform\x20float\x20dropRate;\x20//\x20drop\x20rate\x20is\x20a\x20chance\x20a\x20particle\x20will\x20restart\x20at\x20random\x20position\x20to\x20avoid\x20degeneration\x0auniform\x20float\x20dropRateBump;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898,\x2078.233,\x204375.85453);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0,\x201.0);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec3\x20generateRandomParticle(vec2\x20seed,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20longitude\x20is\x20in\x20[0,\x20360]\x0a\x20\x20\x20\x20float\x20randomLon\x20=\x20mod(rand(seed,\x20lonRange),\x20360.0);\x0a\x20\x20\x20\x20float\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x0a\x20\x20\x20\x20return\x20vec3(randomLon,\x20randomLat,\x20lev);\x0a}\x0a\x0abool\x20particleOutbound(vec3\x20particle)\x20{\x0a\x20\x20\x20\x20return\x20particle.y\x20<\x20-90.0\x20||\x20particle.y\x20>\x2090.0;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20texture(nextParticlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20nextSpeed.a;\x0a\x0a\x20\x20\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec2\x20seed2\x20=\x20nextSpeed.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20\x20\x20vec3\x20randomParticle\x20=\x20generateRandomParticle(seed1,\x20nextParticle.z);\x0a\x20\x20\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20\x20\x20if\x20(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(randomParticle,\x201.0);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a\x20\x20\x20\x20}\x0a}\x0a',postProcessingSpeed_frag=_0x32f253(0x161);const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x4871e0,_0x32703e,_0x3f6d03,_0x345298){const _0x562e47=_0x32f253;this['data']=_0x32703e,this['createWindTextures'](_0x4871e0,_0x32703e),this[_0x562e47(0x14f)](_0x4871e0,_0x3f6d03,_0x345298),this['createComputingPrimitives'](_0x32703e,_0x3f6d03,_0x345298);}['createWindTextures'](_0x14f252,_0x595e79){const _0x2f9068=_0x32f253,_0x129a38={'context':_0x14f252,'width':_0x595e79['dimensions']['lon'],'height':_0x595e79['dimensions']['lat']*(_0x595e79['dimensions']['lev']||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0x2f9068(0xd0)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x2f9068(0x93))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x2f9068(0xf8)]})};this['windTextures']={'U':Util['createTexture'](_0x129a38,_0x595e79['U']['array']),'V':Util[_0x2f9068(0x82)](_0x129a38,_0x595e79['V']['array'])};}['createParticlesTextures'](_0x46ed46,_0x3cf5a6,_0x441c75){const _0xe29a21=_0x32f253,_0x5f512f={'context':_0x46ed46,'width':_0x3cf5a6[_0xe29a21(0x130)],'height':_0x3cf5a6[_0xe29a21(0x130)],'pixelFormat':Cesium$3['PixelFormat'][_0xe29a21(0x96)],'pixelDatatype':Cesium$3[_0xe29a21(0xd0)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0xe29a21(0x93))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3[_0xe29a21(0x126)]['NEAREST']})},_0x52e9cd=this['randomizeParticles'](_0x3cf5a6[_0xe29a21(0xcf)],_0x441c75),_0x1609d9=new Float32Array(0x4*_0x3cf5a6['maxParticles'])[_0xe29a21(0x81)](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x5f512f),'currentParticlesPosition':Util[_0xe29a21(0x82)](_0x5f512f,_0x52e9cd),'nextParticlesPosition':Util['createTexture'](_0x5f512f,_0x52e9cd),'currentParticlesSpeed':Util['createTexture'](_0x5f512f,_0x1609d9),'nextParticlesSpeed':Util['createTexture'](_0x5f512f,_0x1609d9),'postProcessingPosition':Util['createTexture'](_0x5f512f,_0x52e9cd),'postProcessingSpeed':Util['createTexture'](_0x5f512f,_0x1609d9)};}['randomizeParticles'](_0x559471,_0x2e800f){const _0x5e4e81=_0x32f253,_0x149353=new Float32Array(0x4*_0x559471);for(let _0x557e4e=0x0;_0x557e4e<_0x559471;_0x557e4e++){_0x149353[0x4*_0x557e4e]=Cesium$3['Math'][_0x5e4e81(0xd5)](_0x2e800f['lonRange']['x'],_0x2e800f[_0x5e4e81(0xf5)]['y']),_0x149353[0x4*_0x557e4e+0x1]=Cesium$3['Math']['randomBetween'](_0x2e800f['latRange']['x'],_0x2e800f['latRange']['y']),_0x149353[0x4*_0x557e4e+0x2]=Cesium$3['Math']['randomBetween'](this[_0x5e4e81(0x101)]['lev'][_0x5e4e81(0xae)],this[_0x5e4e81(0x101)]['lev']['max']),_0x149353[0x4*_0x557e4e+0x3]=0x0;}return _0x149353;}[_0x32f253(0x7f)](){const _0x35b433=_0x32f253;Object[_0x35b433(0xcd)](this['particlesTextures'])[_0x35b433(0xf2)](_0x16c457=>{const _0x8f0a4b=_0x35b433;this['particlesTextures'][_0x16c457][_0x8f0a4b(0xcc)]();});}[_0x32f253(0x7a)](_0x31e2c1,_0x12c730,_0x38f6d2){const _0x4fe314=_0x32f253,_0x3fd593=new Cesium$3['Cartesian3'](_0x31e2c1['dimensions'][_0x4fe314(0xbd)],_0x31e2c1['dimensions'][_0x4fe314(0x90)],_0x31e2c1['dimensions'][_0x4fe314(0xb8)]),_0xd61f56=new Cesium$3[(_0x4fe314(0x8e))](_0x31e2c1['lon'][_0x4fe314(0xae)],_0x31e2c1['lat']['min'],_0x31e2c1['lev']['min']),_0x189279=new Cesium$3['Cartesian3'](_0x31e2c1['lon']['max'],_0x31e2c1['lat'][_0x4fe314(0xa3)],_0x31e2c1['lev'][_0x4fe314(0xa3)]),_0x5b32a1=new Cesium$3['Cartesian3']((_0x189279['x']-_0xd61f56['x'])/(_0x3fd593['x']-0x1),(_0x189279['y']-_0xd61f56['y'])/(_0x3fd593['y']-0x1),_0x3fd593['z']>0x1?(_0x189279['z']-_0xd61f56['z'])/(_0x3fd593['z']-0x1):0x1),_0x48c40e=new Cesium$3['Cartesian2'](_0x31e2c1['U']['min'],_0x31e2c1['U']['max']),_0x42a3b8=new Cesium$3['Cartesian2'](_0x31e2c1['V']['min'],_0x31e2c1['V'][_0x4fe314(0xa3)]),_0x3a6142=this;this[_0x4fe314(0x14b)]={'getWind':new CustomPrimitive({'commandType':_0x4fe314(0x10b),'uniformMap':{'U':function(){return _0x3a6142['windTextures']['U'];},'V':function(){return _0x3a6142['windTextures']['V'];},'currentParticlesPosition':function(){const _0x5c9173=_0x4fe314;return _0x3a6142['particlesTextures'][_0x5c9173(0x147)];},'dimension':function(){return _0x3fd593;},'minimum':function(){return _0xd61f56;},'maximum':function(){return _0x189279;},'interval':function(){return _0x5b32a1;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this[_0x4fe314(0x12a)]['particlesWind'],'preExecute':function(){const _0x2d7eef=_0x4fe314;_0x3a6142['primitives'][_0x2d7eef(0x148)][_0x2d7eef(0x158)]['outputTexture']=_0x3a6142['particlesTextures'][_0x2d7eef(0xb5)];}}),'updateSpeed':new CustomPrimitive({'commandType':_0x4fe314(0x10b),'uniformMap':{'currentParticlesSpeed':function(){const _0x4c8b81=_0x4fe314;return _0x3a6142[_0x4c8b81(0x12a)]['currentParticlesSpeed'];},'particlesWind':function(){const _0x280650=_0x4fe314;return _0x3a6142[_0x280650(0x12a)]['particlesWind'];},'uSpeedRange':function(){return _0x48c40e;},'vSpeedRange':function(){return _0x42a3b8;},'pixelSize':function(){return _0x38f6d2['pixelSize'];},'speedFactor':function(){return _0x12c730['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x315231=_0x4fe314,_0x4405ee=_0x3a6142[_0x315231(0x12a)]['currentParticlesSpeed'];_0x3a6142['particlesTextures']['currentParticlesSpeed']=_0x3a6142[_0x315231(0x12a)]['postProcessingSpeed'],_0x3a6142['particlesTextures'][_0x315231(0x140)]=_0x4405ee,_0x3a6142[_0x315231(0x14b)][_0x315231(0xeb)]['commandToExecute'][_0x315231(0x9b)]=_0x3a6142[_0x315231(0x12a)][_0x315231(0x105)];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){return _0x3a6142['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){return _0x3a6142['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x4fe314(0x12a)][_0x4fe314(0x9e)],'preExecute':function(){const _0x1e08c8=_0x4fe314,_0x22eb8c=_0x3a6142['particlesTextures']['currentParticlesPosition'];_0x3a6142['particlesTextures']['currentParticlesPosition']=_0x3a6142['particlesTextures']['postProcessingPosition'],_0x3a6142[_0x1e08c8(0x12a)]['postProcessingPosition']=_0x22eb8c,_0x3a6142[_0x1e08c8(0x14b)]['updatePosition']['commandToExecute'][_0x1e08c8(0x9b)]=_0x3a6142['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x4fe314(0x10b),'uniformMap':{'nextParticlesPosition':function(){const _0x399ccb=_0x4fe314;return _0x3a6142[_0x399ccb(0x12a)]['nextParticlesPosition'];},'nextParticlesSpeed':function(){return _0x3a6142['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x1b7ff6=_0x4fe314;return _0x38f6d2[_0x1b7ff6(0xf5)];},'latRange':function(){const _0xe80835=_0x4fe314;return _0x38f6d2[_0xe80835(0xec)];},'randomCoefficient':function(){const _0x426af8=Math['random']();return _0x426af8;},'dropRate':function(){const _0x481654=_0x4fe314;return _0x12c730[_0x481654(0x145)];},'dropRateBump':function(){return _0x12c730['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x4fe314(0x12a)]['postProcessingPosition'],'preExecute':function(){const _0x1992e9=_0x4fe314;_0x3a6142[_0x1992e9(0x14b)][_0x1992e9(0x134)]['commandToExecute']['outputTexture']=_0x3a6142['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x4fe314(0x10b),'uniformMap':{'postProcessingPosition':function(){const _0x146fbd=_0x4fe314;return _0x3a6142[_0x146fbd(0x12a)][_0x146fbd(0x134)];},'nextParticlesSpeed':function(){const _0x34376b=_0x4fe314;return _0x3a6142[_0x34376b(0x12a)]['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x4fe314(0xe7))]({'sources':[postProcessingSpeed_frag]}),'outputTexture':this[_0x4fe314(0x12a)]['postProcessingSpeed'],'preExecute':function(){const _0x5f475c=_0x4fe314;_0x3a6142[_0x5f475c(0x14b)]['postProcessingSpeed']['commandToExecute'][_0x5f475c(0x9b)]=_0x3a6142['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace[_0x32f253(0x128)];class ParticleSystem{constructor(_0x36c315,_0x9aae71,_0x5b4c16,_0x313273){const _0x566f8e=_0x32f253;this[_0x566f8e(0xb6)]=_0x36c315,_0x9aae71={..._0x9aae71},_0x9aae71[_0x566f8e(0xa8)]&&_0x9aae71['vdata']&&(_0x9aae71[_0x566f8e(0xf4)]={},_0x9aae71['dimensions'][_0x566f8e(0xbd)]=_0x9aae71['cols'],_0x9aae71[_0x566f8e(0xf4)][_0x566f8e(0x90)]=_0x9aae71['rows'],_0x9aae71['dimensions'][_0x566f8e(0xb8)]=_0x9aae71['lev']||0x1,_0x9aae71['lon']={},_0x9aae71['lon']['min']=_0x9aae71['xmin'],_0x9aae71['lon']['max']=_0x9aae71['xmax'],_0x9aae71['lat']={},_0x9aae71['lat']['min']=_0x9aae71['ymin'],_0x9aae71['lat']['max']=_0x9aae71['ymax'],_0x9aae71['lev']={},_0x9aae71['lev'][_0x566f8e(0xae)]=_0x9aae71['levmin']??0x1,_0x9aae71['lev'][_0x566f8e(0xa3)]=_0x9aae71[_0x566f8e(0xd9)]??0x1,_0x9aae71['U']={},_0x9aae71['U']['array']=new Float32Array(_0x9aae71['udata']),_0x9aae71['U']['min']=_0x9aae71['umin']??Math[_0x566f8e(0xae)](..._0x9aae71[_0x566f8e(0xa8)]),_0x9aae71['U']['max']=_0x9aae71['umax']??Math['max'](..._0x9aae71['udata']),_0x9aae71['V']={},_0x9aae71['V']['array']=new Float32Array(_0x9aae71['vdata']),_0x9aae71['V'][_0x566f8e(0xae)]=_0x9aae71['vmin']??Math['min'](..._0x9aae71[_0x566f8e(0xe0)]),_0x9aae71['V'][_0x566f8e(0xa3)]=_0x9aae71['vmax']??Math['max'](..._0x9aae71['vdata'])),this[_0x566f8e(0x101)]=_0x9aae71,this['options']=_0x5b4c16,this['viewerParameters']=_0x313273,this[_0x566f8e(0xb3)]=new ParticlesComputing(this['context'],this[_0x566f8e(0x101)],this['options'],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}[_0x32f253(0x8a)](_0x1ee010){const _0x3f3824=_0x32f253;this[_0x3f3824(0xb3)][_0x3f3824(0x7f)](),Object['keys'](this['particlesComputing']['windTextures'])[_0x3f3824(0xf2)](_0xc6445a=>{const _0x1f83f0=_0x3f3824;this[_0x1f83f0(0xb3)][_0x1f83f0(0x15f)][_0xc6445a]['destroy']();}),this['particlesRendering']['textures'][_0x3f3824(0xb1)]['destroy'](),Object['keys'](this[_0x3f3824(0xa0)]['framebuffers'])['forEach'](_0x2bdff9=>{const _0x1385d4=_0x3f3824;this['particlesRendering'][_0x1385d4(0x15e)][_0x2bdff9]['destroy']();}),this['context']=_0x1ee010,this['particlesComputing']=new ParticlesComputing(this[_0x3f3824(0xb6)],this['data'],this[_0x3f3824(0x162)],this['viewerParameters']),this[_0x3f3824(0xa0)]=new ParticlesRendering(this['context'],this['data'],this[_0x3f3824(0x162)],this[_0x3f3824(0x106)],this['particlesComputing']);}['clearFramebuffers'](){const _0x3e9d8c=_0x32f253,_0x1c2829=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x3e9d8c(0x117))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object[_0x3e9d8c(0xcd)](this[_0x3e9d8c(0xa0)][_0x3e9d8c(0x15e)])['forEach'](_0x2effbf=>{const _0xae2350=_0x3e9d8c;_0x1c2829['framebuffer']=this['particlesRendering'][_0xae2350(0x15e)][_0x2effbf],_0x1c2829[_0xae2350(0x15a)](this['context']);});}[_0x32f253(0xf9)](_0x5adc51){const _0x123dd4=_0x32f253;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this['viewerParameters']);if(_0x5adc51){const _0x159ebd=this[_0x123dd4(0xa0)]['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives']['segments']['geometry']=_0x159ebd;const _0x3cbbae=Cesium$2['VertexArray'][_0x123dd4(0x9c)]({'context':this[_0x123dd4(0xb6)],'geometry':_0x159ebd,'attributeLocations':this[_0x123dd4(0xa0)]['primitives'][_0x123dd4(0x13d)]['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});this['particlesRendering']['primitives'][_0x123dd4(0x13d)]['commandToExecute']['vertexArray']=_0x3cbbae;}}[_0x32f253(0xca)](_0xd23477){const _0x75f703=_0x32f253;let _0x26ec6e=![];this['options'][_0x75f703(0xcf)]!==_0xd23477['maxParticles']&&(_0x26ec6e=!![]),Object['keys'](_0xd23477)['forEach'](_0x101433=>{const _0xec1819=_0x75f703;this[_0xec1819(0x162)][_0x101433]=_0xd23477[_0x101433];}),this['refreshParticles'](_0x26ec6e);}[_0x32f253(0x108)](_0x1ccf34){Object['keys'](_0x1ccf34)['forEach'](_0x3b08d3=>{this['viewerParameters'][_0x3b08d3]=_0x1ccf34[_0x3b08d3];}),this['refreshParticles'](![]);}['destroy'](){const _0x25f40e=_0x32f253;clearTimeout(this['canrefresh']),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing'][_0x25f40e(0x15f)])[_0x25f40e(0xf2)](_0x53b89d=>{const _0x5dce2f=_0x25f40e;this['particlesComputing']['windTextures'][_0x53b89d][_0x5dce2f(0xcc)]();}),this[_0x25f40e(0xa0)][_0x25f40e(0x13c)]['colorTable']['destroy'](),Object[_0x25f40e(0xcd)](this['particlesRendering']['framebuffers'])['forEach'](_0x350b42=>{const _0x1f2bfe=_0x25f40e;this[_0x1f2bfe(0xa0)]['framebuffers'][_0x350b42]['destroy']();});for(const _0x180d89 in this){delete this[_0x180d89];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesNumber':0x1000,'fixedHeight':0x0,'fadeOpacity':0.996,'dropRate':0.003,'dropRateBump':0.01,'speedFactor':0.5,'lineWidth':0x2,'colors':['rgb(206,255,255)']};class WindLayer extends BaseLayer$1{constructor(_0x2dc9b3={}){_0x2dc9b3={...DEF_OPTIONS,..._0x2dc9b3},super(_0x2dc9b3),this['_setOptionsHook'](_0x2dc9b3);}get[_0x32f253(0x123)](){return this['primitives'];}get['data'](){return this['_data'];}set[_0x32f253(0x101)](_0x3fb9cc){this['setData'](_0x3fb9cc);}get['colors'](){return this['options']['colors'];}set['colors'](_0x4c5ae2){const _0x4ca547=_0x32f253;this['options'][_0x4ca547(0xba)]=_0x4c5ae2,this['particleSystem']&&this[_0x4ca547(0xa6)]['setOptions']({'colors':_0x4c5ae2}),this['resize']();}['_mountedHook'](){}['_addedHook'](){const _0x111bfc=_0x32f253;this['scene']=this['_map']['scene'],this[_0x111bfc(0xa1)]=this['_map']['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this[_0x111bfc(0xbe)][_0x111bfc(0x104)][_0x111bfc(0x14b)]['add'](this[_0x111bfc(0x14b)]),this['viewerParameters']={'lonRange':new Cesium$1[(_0x111bfc(0x141))](),'latRange':new Cesium$1[(_0x111bfc(0x141))](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x111bfc(0xd2)],0.99*0x615299),this['updateViewerParameters'](),window[_0x111bfc(0xc8)](_0x111bfc(0x8f),this['resize']['bind'](this),![]),this['mouse_down']=![],this[_0x111bfc(0xdf)]=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x111bfc(0xbe)]['on'](mars3d__namespace['EventType'][_0x111bfc(0xc3)],this[_0x111bfc(0xaf)],this),this['_map']['on'](mars3d__namespace['EventType'][_0x111bfc(0x85)],this['_onMouseUpEvent'],this),this[_0x111bfc(0xbe)]['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x111bfc(0x165)]&&this['setData'](this['_data']);}[_0x32f253(0x122)](){const _0x5b909c=_0x32f253;window['removeEventListener'](_0x5b909c(0x8f),this['resize']),this['_map']['off'](mars3d__namespace['EventType'][_0x5b909c(0xe4)],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace[_0x5b909c(0x94)]['wheel'],this['_onMapWhellEvent'],this),this['_map'][_0x5b909c(0xcb)](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x5b909c(0x85)],this['_onMouseUpEvent'],this),this[_0x5b909c(0xbe)]['off'](mars3d__namespace['EventType'][_0x5b909c(0xf6)],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this['_map']['scene'][_0x5b909c(0x14b)][_0x5b909c(0xda)](this['primitives']);}['resize'](){const _0x11a145=_0x32f253;if(!this[_0x11a145(0x92)]||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives'][_0x11a145(0x11a)](),this['_map']['once'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x437e01){const _0x4a8b45=_0x32f253;this['particleSystem']['canvasResize'](this[_0x4a8b45(0x104)]['context']),this['addPrimitives'](),this['primitives']['show']=!![];}[_0x32f253(0xd1)](_0x5bcff6){const _0x260e84=_0x32f253;clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this[_0x260e84(0x14b)][_0x260e84(0x92)]=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}[_0x32f253(0xaf)](_0xa445a6){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x54539f){const _0x4155fd=_0x32f253;if(!this[_0x4155fd(0x92)]||!this['particleSystem'])return;this['mouse_down']&&(this['primitives'][_0x4155fd(0x92)]=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x5c75d7){const _0x1c3ea3=_0x32f253;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this[_0x1c3ea3(0x91)]=![],this['mouse_move']=![];}['redraw'](){const _0x887309=_0x32f253;if(!this[_0x887309(0xbe)]||!this[_0x887309(0x92)])return;this['updateViewerParameters'](),this['particleSystem'][_0x887309(0x108)](this['viewerParameters']),this[_0x887309(0x14b)]['show']=!![];}[_0x32f253(0x12e)](_0x120d64){const _0x13f446=_0x32f253;this['_data']=_0x120d64,this['particleSystem']&&this[_0x13f446(0xa6)]['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x13f446(0xb6)],_0x120d64,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x1ca2f9,_0x349bb2){if(_0x1ca2f9)for(const _0x4e8a7e in _0x1ca2f9){this[_0x4e8a7e]=_0x1ca2f9[_0x4e8a7e];}this['particleSystem']&&this['particleSystem']['setOptions'](this['getOptions']());}[_0x32f253(0x13b)](){const _0x100dee=_0x32f253,_0x5bf61a=Math[_0x100dee(0x107)](Math[_0x100dee(0xde)](this['particlesNumber']));return this['particlesNumber']=_0x5bf61a*_0x5bf61a,{'particlesTextureSize':_0x5bf61a,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this[_0x100dee(0x145)],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x22476d=_0x32f253;this[_0x22476d(0x14b)][_0x22476d(0x164)](this[_0x22476d(0xa6)]['particlesComputing']['primitives'][_0x22476d(0x148)]),this[_0x22476d(0x14b)]['add'](this['particleSystem']['particlesComputing']['primitives']['updateSpeed']),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x22476d(0x14b)]['updatePosition']),this['primitives']['add'](this[_0x22476d(0xa6)]['particlesComputing']['primitives']['postProcessingPosition']),this['primitives'][_0x22476d(0x164)](this[_0x22476d(0xa6)]['particlesComputing'][_0x22476d(0x14b)][_0x22476d(0x140)]),this['primitives'][_0x22476d(0x164)](this['particleSystem']['particlesRendering']['primitives']['segments']),this['primitives']['add'](this['particleSystem'][_0x22476d(0xa0)]['primitives']['trails']),this['primitives']['add'](this['particleSystem'][_0x22476d(0xa0)][_0x22476d(0x14b)]['screen']);}['updateViewerParameters'](){const _0x440f7d=_0x32f253;let _0x2d644e=this['camera']['computeViewRectangle'](this['scene'][_0x440f7d(0x129)]['ellipsoid']);if(!_0x2d644e){const _0x1dd2a3=this[_0x440f7d(0xbe)]['getExtent']();_0x2d644e=Cesium$1[_0x440f7d(0xb0)]['fromDegrees'](_0x1dd2a3[_0x440f7d(0x98)],_0x1dd2a3[_0x440f7d(0x13a)],_0x1dd2a3['xmax'],_0x1dd2a3['ymax']);}const _0x381189=Util['viewRectangleToLonLatRange'](_0x2d644e);this['viewerParameters']['lonRange']['x']=_0x381189[_0x440f7d(0xbd)]['min'],this['viewerParameters'][_0x440f7d(0xf5)]['y']=_0x381189['lon']['max'],this['viewerParameters']['latRange']['x']=_0x381189['lat']['min'],this['viewerParameters']['latRange']['y']=_0x381189['lat']['max'];const _0xb08dfc=this['camera'][_0x440f7d(0xbc)](this['globeBoundingSphere'],this[_0x440f7d(0x104)]['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0xb08dfc>0x0&&(this['viewerParameters'][_0x440f7d(0x102)]=_0xb08dfc);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0xf40103=_0x32f253;this['lng']=null,this['lat']=null,this[_0xf40103(0x12c)]=null,this['tlat']=null,this[_0xf40103(0x166)]=null;}['destroy'](){for(const _0x3b3b16 in this){delete this[_0x3b3b16];}}}class CanvasWindField{constructor(_0x3294d0){this['setOptions'](_0x3294d0);}get[_0x32f253(0x89)](){return this['_speedRate'];}set['speedRate'](_0x8b1570){const _0xb027f=_0x32f253;this['_speedRate']=(0x64-(_0x8b1570>0x63?0x63:_0x8b1570))*0x64,this[_0xb027f(0x114)]=[(this['xmax']-this['xmin'])/this['_speedRate'],(this[_0xb027f(0xab)]-this['ymin'])/this[_0xb027f(0x86)]];}get['maxAge'](){return this['_maxAge'];}set['maxAge'](_0x3cb2dc){this['_maxAge']=_0x3cb2dc;}[_0x32f253(0xca)](_0x1fd502){const _0x261da1=_0x32f253;this['options']=_0x1fd502,this['maxAge']=_0x1fd502[_0x261da1(0xf1)]||0x78,this['speedRate']=_0x1fd502['speedRate']||0x32,this['particles']=[];const _0x5a383b=_0x1fd502[_0x261da1(0xfb)]||0x1000;for(let _0x43e0fb=0x0;_0x43e0fb<_0x5a383b;_0x43e0fb++){const _0x1ff522=this['_randomParticle'](new CanvasParticle());this[_0x261da1(0x95)]['push'](_0x1ff522);}}[_0x32f253(0x10e)](_0x5f25b5){const _0x5cb21f=_0x32f253;this['rows']=_0x5f25b5['rows'],this[_0x5cb21f(0xa5)]=_0x5f25b5['cols'],this['xmin']=_0x5f25b5['xmin'],this['xmax']=_0x5f25b5[_0x5cb21f(0x150)],this['ymin']=_0x5f25b5['ymin'],this['ymax']=_0x5f25b5['ymax'],this['grid']=[];const _0x4cf67b=_0x5f25b5[_0x5cb21f(0xa8)],_0x2c9a7c=_0x5f25b5['vdata'];let _0x27ece6=![];_0x4cf67b[_0x5cb21f(0x79)]===this['rows']&&_0x4cf67b[0x0]['length']===this[_0x5cb21f(0xa5)]&&(_0x27ece6=!![]);let _0xcab4a2=0x0,_0x175580=null,_0x55b155=null;for(let _0x472f6e=0x0;_0x472f6e<this['rows'];_0x472f6e++){_0x175580=[];for(let _0x35fa45=0x0;_0x35fa45<this['cols'];_0x35fa45++,_0xcab4a2++){_0x27ece6?_0x55b155=this['_calcUV'](_0x4cf67b[_0x472f6e][_0x35fa45],_0x2c9a7c[_0x472f6e][_0x35fa45]):_0x55b155=this['_calcUV'](_0x4cf67b[_0xcab4a2],_0x2c9a7c[_0xcab4a2]),_0x175580[_0x5cb21f(0x12d)](_0x55b155);}this[_0x5cb21f(0x7c)]['push'](_0x175580);}this['options'][_0x5cb21f(0x163)]&&this['grid']['reverse']();}['clear'](){delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}[_0x32f253(0x14a)](_0x4ff0a2,_0x28fc62){const _0x45c7d6=_0x32f253,_0x1cf53a=(_0x4ff0a2-this['xmin'])/(this[_0x45c7d6(0x150)]-this[_0x45c7d6(0x98)])*(this['cols']-0x1),_0x30fa1a=(this['ymax']-_0x28fc62)/(this[_0x45c7d6(0xab)]-this['ymin'])*(this[_0x45c7d6(0x111)]-0x1);return[_0x1cf53a,_0x30fa1a];}['getUVByXY'](_0x31938b,_0x46cd39){const _0x5076e0=_0x32f253;if(_0x31938b<0x0||_0x31938b>=this[_0x5076e0(0xa5)]||_0x46cd39>=this['rows'])return[0x0,0x0,0x0];const _0x194e1c=Math['floor'](_0x31938b),_0x304a3f=Math[_0x5076e0(0xfc)](_0x46cd39);if(_0x194e1c===_0x31938b&&_0x304a3f===_0x46cd39)return this['grid'][_0x46cd39][_0x31938b];const _0x31508b=_0x194e1c+0x1,_0x46051c=_0x304a3f+0x1,_0x550c1f=this['getUVByXY'](_0x194e1c,_0x304a3f),_0x297b10=this['getUVByXY'](_0x31508b,_0x304a3f),_0x12bbcd=this['getUVByXY'](_0x194e1c,_0x46051c),_0x37a09d=this[_0x5076e0(0xb2)](_0x31508b,_0x46051c);let _0x37a32f=null;try{_0x37a32f=this['_bilinearInterpolation'](_0x31938b-_0x194e1c,_0x46cd39-_0x304a3f,_0x550c1f,_0x297b10,_0x12bbcd,_0x37a09d);}catch(_0x5b06d3){console[_0x5076e0(0x124)](_0x31938b,_0x46cd39);}return _0x37a32f;}['_bilinearInterpolation'](_0x4ba81,_0x30b717,_0x4f885,_0x307ff6,_0x2f8987,_0x5ede08){const _0x5bbd17=0x1-_0x4ba81,_0x3ce50c=0x1-_0x30b717,_0x216fd0=_0x5bbd17*_0x3ce50c,_0xb0825=_0x4ba81*_0x3ce50c,_0x5740aa=_0x5bbd17*_0x30b717,_0x3a3543=_0x4ba81*_0x30b717,_0x4e69d8=_0x4f885[0x0]*_0x216fd0+_0x307ff6[0x0]*_0xb0825+_0x2f8987[0x0]*_0x5740aa+_0x5ede08[0x0]*_0x3a3543,_0x363e74=_0x4f885[0x1]*_0x216fd0+_0x307ff6[0x1]*_0xb0825+_0x2f8987[0x1]*_0x5740aa+_0x5ede08[0x1]*_0x3a3543;return this['_calcUV'](_0x4e69d8,_0x363e74);}['_calcUV'](_0x2a7e06,_0xcc68e7){return[+_0x2a7e06,+_0xcc68e7,Math['sqrt'](_0x2a7e06*_0x2a7e06+_0xcc68e7*_0xcc68e7)];}['getUVByPoint'](_0x586556,_0x1f0452){const _0x46060f=_0x32f253;if(!this['isInExtent'](_0x586556,_0x1f0452))return null;const _0x4782a4=this[_0x46060f(0x14a)](_0x586556,_0x1f0452),_0x1bafab=this['getUVByXY'](_0x4782a4[0x0],_0x4782a4[0x1]);return _0x1bafab;}[_0x32f253(0x151)](_0x4293f4,_0xc7b7a6){const _0x5db4e1=_0x32f253;return _0x4293f4>=this['xmin']&&_0x4293f4<=this['xmax']&&_0xc7b7a6>=this['ymin']&&_0xc7b7a6<=this[_0x5db4e1(0xab)]?!![]:![];}['getRandomLatLng'](){const _0x48c19b=_0x32f253,_0x1b58e4=fRandomByfloat(this['xmin'],this['xmax']),_0x2b412f=fRandomByfloat(this[_0x48c19b(0x13a)],this['ymax']);return{'lat':_0x2b412f,'lng':_0x1b58e4};}['getParticles'](){const _0x342913=_0x32f253;let _0x1f4e78,_0x9c2a7a,_0x1d6a07;for(let _0x5d13b8=0x0,_0x5dc8f8=this['particles']['length'];_0x5d13b8<_0x5dc8f8;_0x5d13b8++){let _0x1affab=this['particles'][_0x5d13b8];_0x1affab['age']<=0x0&&(_0x1affab=this[_0x342913(0xc4)](_0x1affab));if(_0x1affab[_0x342913(0x166)]>0x0){const _0x47c118=_0x1affab[_0x342913(0x12c)],_0x23630c=_0x1affab[_0x342913(0x113)];_0x1d6a07=this['getUVByPoint'](_0x47c118,_0x23630c),_0x1d6a07?(_0x1f4e78=_0x47c118+this[_0x342913(0x114)][0x0]*_0x1d6a07[0x0],_0x9c2a7a=_0x23630c+this['_calc_speedRate'][0x1]*_0x1d6a07[0x1],_0x1affab['lng']=_0x47c118,_0x1affab['lat']=_0x23630c,_0x1affab['tlng']=_0x1f4e78,_0x1affab['tlat']=_0x9c2a7a,_0x1affab['age']--):_0x1affab['age']=0x0;}}return this[_0x342913(0x95)];}['_randomParticle'](_0x354677){const _0x28eb20=_0x32f253;let _0x1faeac,_0x21092a;for(let _0x1b66c7=0x0;_0x1b66c7<0x1e;_0x1b66c7++){_0x1faeac=this[_0x28eb20(0xb4)](),_0x21092a=this['getUVByPoint'](_0x1faeac[_0x28eb20(0x83)],_0x1faeac['lat']);if(_0x21092a&&_0x21092a[0x2]>0x0)break;}if(!_0x21092a)return _0x354677;const _0x1a1f8e=_0x1faeac['lng']+this[_0x28eb20(0x114)][0x0]*_0x21092a[0x0],_0x34dca3=_0x1faeac[_0x28eb20(0x90)]+this[_0x28eb20(0x114)][0x1]*_0x21092a[0x1];return _0x354677[_0x28eb20(0x83)]=_0x1faeac[_0x28eb20(0x83)],_0x354677['lat']=_0x1faeac['lat'],_0x354677['tlng']=_0x1a1f8e,_0x354677['tlat']=_0x34dca3,_0x354677[_0x28eb20(0x166)]=Math['round'](Math[_0x28eb20(0xfd)]()*this['maxAge']),_0x354677;}['destroy'](){for(const _0x54ca32 in this){delete this[_0x54ca32];}}}function fRandomByfloat(_0x5c4c64,_0x41c429){return _0x5c4c64+Math['random']()*(_0x41c429-_0x5c4c64);}const Cesium=mars3d__namespace[_0x32f253(0x128)],BaseLayer=mars3d__namespace[_0x32f253(0x123)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0xded0be={}){const _0x19305f=_0x32f253;super(_0xded0be),this['_setOptionsHook'](_0xded0be),this[_0x19305f(0x99)]=null;}['_setOptionsHook'](_0x4f29a2,_0x42d408){const _0x14aa13=_0x32f253;this['frameTime']=0x3e8/(_0x4f29a2['frameRate']||0xa),this[_0x14aa13(0x144)]=this['options']['pointerEvents']??![],this[_0x14aa13(0x131)]=_0x4f29a2['color']||'#ffffff',this['lineWidth']=_0x4f29a2[_0x14aa13(0x143)]||0x1,this['fixedHeight']=_0x4f29a2['fixedHeight']??0x0,this[_0x14aa13(0x163)]=_0x4f29a2[_0x14aa13(0x163)]??![],this['windField']&&this['windField']['setOptions'](_0x4f29a2);}get['layer'](){return this['canvas'];}get['canvasWidth'](){const _0x1ac5d4=_0x32f253;return this[_0x1ac5d4(0xbe)]['scene']['canvas']['clientWidth'];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0x28b96e){const _0x3a928a=_0x32f253;this['_pointerEvents']=_0x28b96e;if(!this['canvas'])return;_0x28b96e?this['canvas'][_0x3a928a(0xe5)]['pointer-events']='all':this['canvas']['style']['pointer-events']=_0x3a928a(0x136);}get[_0x32f253(0xfb)](){const _0x2c98f6=_0x32f253;return this[_0x2c98f6(0x162)]['particlesNumber'];}set['particlesNumber'](_0x407fe2){const _0x200e11=_0x32f253;this[_0x200e11(0x162)]['particlesNumber']=_0x407fe2,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x2ea546){const _0x2b7eb4=_0x32f253;this['options']['speedRate']=_0x2ea546,this['windField']&&(this[_0x2b7eb4(0x121)]['speedRate']=_0x2ea546);}get['maxAge'](){const _0x48562c=_0x32f253;return this[_0x48562c(0x162)]['maxAge'];}set['maxAge'](_0x37c6a0){const _0xbffd7c=_0x32f253;this['options']['maxAge']=_0x37c6a0,this[_0xbffd7c(0x121)]&&(this['windField']['maxAge']=_0x37c6a0);}get['data'](){const _0x343e9f=_0x32f253;return this[_0x343e9f(0x76)];}set['data'](_0x3ae153){const _0x55162a=_0x32f253;this[_0x55162a(0x12e)](_0x3ae153);}[_0x32f253(0x159)](_0x1c0d8d){const _0x45236c=_0x32f253;_0x1c0d8d?this[_0x45236c(0x74)]():(this[_0x45236c(0x76)]&&(this['options'][_0x45236c(0x101)]=this['windData']),this[_0x45236c(0x122)]());}['_mountedHook'](){this['options']['worker']?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}['_addedHook'](){const _0x7b810f=_0x32f253;this['canvas']=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options']['data']&&this['setData'](this['options'][_0x7b810f(0x101)]);}['_removedHook'](){const _0x50e2da=_0x32f253;this['clear'](),this['unbindEvent'](),this[_0x50e2da(0x99)]&&(this[_0x50e2da(0xbe)]['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x407ce4=_0x32f253,_0x221827=mars3d__namespace['DomUtil']['create']('canvas','mars3d-canvasWind',this[_0x407ce4(0xbe)]['container']);return _0x221827['style']['position']=_0x407ce4(0xe2),_0x221827[_0x407ce4(0xe5)]['top']=_0x407ce4(0x7e),_0x221827[_0x407ce4(0xe5)]['left']='0px',_0x221827[_0x407ce4(0xe5)][_0x407ce4(0x132)]=this['_map']['scene']['canvas']['clientWidth']+'px',_0x221827['style'][_0x407ce4(0x12b)]=this[_0x407ce4(0xbe)]['scene']['canvas']['clientHeight']+'px',_0x221827['style']['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x221827['style']['zIndex']=this['options']['zIndex']??0x9,_0x221827[_0x407ce4(0x132)]=this['_map']['scene'][_0x407ce4(0x99)]['clientWidth'],_0x221827['height']=this['_map']['scene']['canvas'][_0x407ce4(0xff)],_0x221827;}['resize'](){const _0x513220=_0x32f253;this['canvas']&&(this['canvas']['style']['width']=this[_0x513220(0xbe)]['scene']['canvas']['clientWidth']+'px',this['canvas']['style']['height']=this[_0x513220(0xbe)]['scene'][_0x513220(0x99)]['clientHeight']+'px',this['canvas']['width']=this[_0x513220(0xbe)]['scene']['canvas']['clientWidth'],this['canvas']['height']=this['_map'][_0x513220(0x104)]['canvas']['clientHeight']);}[_0x32f253(0xdc)](){const _0x4ff6b1=_0x32f253,_0x3bcbf6=this;let _0x4f0e0a=Date[_0x4ff6b1(0x14c)]();(function _0x353312(){const _0x909603=_0x4ff6b1;_0x3bcbf6[_0x909603(0x142)]=window['requestAnimationFrame'](_0x353312);if(_0x3bcbf6['show']&&_0x3bcbf6['windField']){const _0x1dfe05=Date[_0x909603(0x14c)](),_0x4f043e=_0x1dfe05-_0x4f0e0a;_0x4f043e>_0x3bcbf6['frameTime']&&(_0x4f0e0a=_0x1dfe05-_0x4f043e%_0x3bcbf6['frameTime'],_0x3bcbf6['update']());}}(),window['addEventListener']('resize',this[_0x4ff6b1(0x8f)]['bind'](this),![]),this['mouse_down']=![],this[_0x4ff6b1(0xdf)]=![],this['options'][_0x4ff6b1(0x115)]&&(this['_map']['on'](mars3d__namespace[_0x4ff6b1(0x94)][_0x4ff6b1(0x156)],this[_0x4ff6b1(0xd1)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x5a73b9=_0x32f253;window['cancelAnimationFrame'](this[_0x5a73b9(0x142)]),delete this[_0x5a73b9(0x142)],window['removeEventListener']('resize',this['resize']),this['options'][_0x5a73b9(0x115)]&&(this['_map'][_0x5a73b9(0xcb)](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x5a73b9(0xc3)],this[_0x5a73b9(0xaf)],this),this[_0x5a73b9(0xbe)]['off'](mars3d__namespace[_0x5a73b9(0x94)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map'][_0x5a73b9(0xcb)](mars3d__namespace[_0x5a73b9(0x94)]['mouseMove'],this[_0x5a73b9(0xd6)],this));}['_onMapWhellEvent'](_0x1391b1){const _0x60626=_0x32f253;clearTimeout(this['refreshTimer']);if(!this[_0x60626(0x92)]||!this['canvas'])return;this[_0x60626(0x99)]['style']['visibility']='hidden',this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0x49023c){const _0xcb8cde=_0x32f253;this[_0xcb8cde(0x91)]=!![],this['_map']['off'](mars3d__namespace[_0xcb8cde(0x94)]['mouseMove'],this['_onMouseMoveEvent'],this),this[_0xcb8cde(0xbe)]['on'](mars3d__namespace['EventType'][_0xcb8cde(0xf6)],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x4db7a5){const _0x33b530=_0x32f253;if(!this['show']||!this['canvas'])return;this['mouse_down']&&(this['canvas'][_0x33b530(0xe5)][_0x33b530(0x10f)]='hidden',this[_0x33b530(0xdf)]=!![]);}[_0x32f253(0x78)](_0x22cb56){const _0x25708f=_0x32f253;if(!this['show']||!this['canvas'])return;this[_0x25708f(0xbe)]['off'](mars3d__namespace[_0x25708f(0x94)]['mouseMove'],this[_0x25708f(0xd6)],this),this[_0x25708f(0x91)]&&this['mouse_move']&&this['redraw'](),this[_0x25708f(0x99)]['style']['visibility']='visible',this['mouse_down']=![],this[_0x25708f(0xdf)]=![];}[_0x32f253(0x12e)](_0x30f651){const _0x379bcd=_0x32f253;this['clear'](),this[_0x379bcd(0x76)]=_0x30f651,this['windField']['setDate'](_0x30f651),this[_0x379bcd(0x11c)]();}['redraw'](){const _0x4559a4=_0x32f253;if(!this[_0x4559a4(0x92)])return;this['windField'][_0x4559a4(0xca)](this['options']),this['update']();}['update'](){const _0x4eaf19=_0x32f253;if(this[_0x4eaf19(0xe8)])return;this['_updateIng']=!![];if(this['worker'])this[_0x4eaf19(0x121)]['update']();else{const _0x410ab4=this['windField'][_0x4eaf19(0x14d)]();this['_drawLines'](_0x410ab4);}this['_updateIng']=![];}[_0x32f253(0x103)](_0xe712fc){const _0x51f74f=_0x32f253;this['canvasContext']['globalCompositeOperation']='destination-in',this['canvasContext'][_0x51f74f(0x14e)](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext'][_0x51f74f(0x125)]='lighter',this[_0x51f74f(0x77)]['globalAlpha']=0.9,this[_0x51f74f(0x77)][_0x51f74f(0xc9)](),this['canvasContext'][_0x51f74f(0x143)]=this['lineWidth'],this['canvasContext'][_0x51f74f(0x154)]=this['color'];const _0x20fb77=this['_map']['scene'][_0x51f74f(0x9d)]!==Cesium['SceneMode'][_0x51f74f(0xa7)],_0x5e4d26=this['canvasWidth']*0.25;for(let _0x2226e9=0x0,_0x525c2b=_0xe712fc[_0x51f74f(0x79)];_0x2226e9<_0x525c2b;_0x2226e9++){const _0x63b49e=_0xe712fc[_0x2226e9],_0x204b4f=this[_0x51f74f(0x11b)](_0x63b49e[_0x51f74f(0x83)],_0x63b49e['lat'],_0x63b49e),_0x50ec24=this['_tomap'](_0x63b49e['tlng'],_0x63b49e['tlat'],_0x63b49e);if(!_0x204b4f||!_0x50ec24)continue;if(_0x20fb77&&Math['abs'](_0x204b4f[0x0]-_0x50ec24[0x0])>=_0x5e4d26)continue;this['canvasContext']['moveTo'](_0x204b4f[0x0],_0x204b4f[0x1]),this[_0x51f74f(0x77)]['lineTo'](_0x50ec24[0x0],_0x50ec24[0x1]);}this['canvasContext']['stroke']();}['_tomap'](_0x4e724f,_0x2c139c,_0x25612e){const _0x222996=_0x32f253,_0x13e306=Cesium[_0x222996(0x8e)][_0x222996(0x157)](_0x4e724f,_0x2c139c,this[_0x222996(0x116)]),_0x539947=this[_0x222996(0xbe)]['scene'];if(_0x539947[_0x222996(0x9d)]===Cesium[_0x222996(0x11e)]['SCENE3D']){const _0x428d1d=new Cesium['EllipsoidalOccluder'](_0x539947[_0x222996(0x129)][_0x222996(0x15b)],_0x539947['camera'][_0x222996(0x127)]),_0x10ee10=_0x428d1d['isPointVisible'](_0x13e306);if(!_0x10ee10)return _0x25612e['age']=0x0,null;}const _0x3896b8=Cesium[_0x222996(0x146)]['wgs84ToWindowCoordinates'](this['_map']['scene'],_0x13e306);return _0x3896b8?[_0x3896b8['x'],_0x3896b8['y']]:null;}['clear'](){const _0x91f9c9=_0x32f253;this['windField'][_0x91f9c9(0xa4)](),delete this[_0x91f9c9(0x76)];}['initWorker'](){const _0x47aa60=_0x32f253;this['worker']=new Worker(this['options'][_0x47aa60(0xc7)]),this['worker']['onmessage']=_0xe13f76=>{const _0x580ccc=_0x47aa60;this['_drawLines'](_0xe13f76['data'][_0x580ccc(0x95)]),this['_updateIng2']=![];},this[_0x47aa60(0x121)]={'init':_0x1a0144=>{const _0x318105=_0x47aa60;this['worker'][_0x318105(0xe1)]({'type':'init','options':_0x1a0144});},'setOptions':_0x5cfd8d=>{const _0x571feb=_0x47aa60;this['worker'][_0x571feb(0xe1)]({'type':'setOptions','options':_0x5cfd8d});},'setDate':_0x5bec31=>{const _0x3b9f7f=_0x47aa60;this['worker']['postMessage']({'type':_0x3b9f7f(0x10e),'data':_0x5bec31});},'update':()=>{const _0x43f0d6=_0x47aa60;if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':_0x43f0d6(0xc2)});},'clear':()=>{const _0x1543dc=_0x47aa60;this['worker'][_0x1543dc(0xe1)]({'type':'clear'});}},this[_0x47aa60(0x121)]['init'](this['options']);}}mars3d__namespace[_0x32f253(0x139)]['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x32f253(0x15c)]=CanvasWindLayer,mars3d__namespace[_0x32f253(0x80)]=CanvasWindField,mars3d__namespace[_0x32f253(0x137)]=WindUtil,exports[_0x32f253(0x80)]=CanvasWindField,exports[_0x32f253(0x15c)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object[_0x32f253(0xd3)](exports,'__esModule',{'value':!![]});
|
|
15
15
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-wind",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.12",
|
|
4
4
|
"description": "Mars3D平台插件,支持气象 风向图 功能插件",
|
|
5
5
|
"main": "dist/mars3d-wind.js",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"peerDependencies": {},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"mars3d": "~3.5.
|
|
11
|
+
"mars3d": "~3.5.12"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|