mars3d-wind 3.5.13 → 3.5.15
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-
|
|
4
|
+
* 版本信息:v3.5.15
|
|
5
|
+
* 编译日期:2023-07-10 19:14:29
|
|
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 _0x5b607a=_0x203e;(function(_0x4af834,_0xa44d16){const _0x23fcc0=_0x203e,_0x3bed95=_0x4af834();while(!![]){try{const _0xd434bb=-parseInt(_0x23fcc0(0x155))/0x1*(parseInt(_0x23fcc0(0xe4))/0x2)+parseInt(_0x23fcc0(0xd9))/0x3*(-parseInt(_0x23fcc0(0x10b))/0x4)+parseInt(_0x23fcc0(0xc6))/0x5+-parseInt(_0x23fcc0(0xcc))/0x6+parseInt(_0x23fcc0(0xc0))/0x7*(parseInt(_0x23fcc0(0xab))/0x8)+-parseInt(_0x23fcc0(0x174))/0x9*(parseInt(_0x23fcc0(0xa4))/0xa)+-parseInt(_0x23fcc0(0xb8))/0xb*(-parseInt(_0x23fcc0(0x119))/0xc);if(_0xd434bb===_0xa44d16)break;else _0x3bed95['push'](_0x3bed95['shift']());}catch(_0x3d2a1f){_0x3bed95['push'](_0x3bed95['shift']());}}}(_0x288a,0x475e8));function _interopNamespace(_0x32ae99){const _0x2cd555=_0x203e;if(_0x32ae99&&_0x32ae99['__esModule'])return _0x32ae99;var _0x3db10f=Object['create'](null);return _0x32ae99&&Object[_0x2cd555(0x99)](_0x32ae99)[_0x2cd555(0x167)](function(_0x10a092){const _0x4530c8=_0x2cd555;if(_0x10a092!=='default'){var _0xfcc758=Object[_0x4530c8(0xaf)](_0x32ae99,_0x10a092);Object[_0x4530c8(0xbf)](_0x3db10f,_0x10a092,_0xfcc758[_0x4530c8(0x16e)]?_0xfcc758:{'enumerable':!![],'get':function(){return _0x32ae99[_0x10a092];}});}}),_0x3db10f['default']=_0x32ae99,_0x3db10f;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace[_0x5b607a(0x112)];function getU(_0x32db93,_0x43cbc6){const _0x44b5ce=_0x5b607a,_0x367642=_0x32db93*Math[_0x44b5ce(0x135)](Cesium$7[_0x44b5ce(0xc2)]['toRadians'](_0x43cbc6));return _0x367642;}function getV(_0x1a98c8,_0xa484a0){const _0x1ff33b=_0x1a98c8*Math['sin'](Cesium$7['Math']['toRadians'](_0xa484a0));return _0x1ff33b;}function getSpeed(_0xa9059d,_0x56323a){const _0x52b497=Math['sqrt'](Math['pow'](_0xa9059d,0x2)+Math['pow'](_0x56323a,0x2));return _0x52b497;}function getDirection(_0x4cac24,_0x24e84f){let _0x1cdec1=Cesium$7['Math']['toDegrees'](Math['atan2'](_0x24e84f,_0x4cac24));return _0x1cdec1+=_0x1cdec1<0x0?0x168:0x0,_0x1cdec1;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x46a873){const _0x481d82=_0x5b607a;this['commandType']=_0x46a873['commandType'],this['geometry']=_0x46a873['geometry'],this[_0x481d82(0x98)]=_0x46a873[_0x481d82(0x98)],this['primitiveType']=_0x46a873['primitiveType'],this['uniformMap']=_0x46a873[_0x481d82(0xac)],this['vertexShaderSource']=_0x46a873[_0x481d82(0xb4)],this['fragmentShaderSource']=_0x46a873['fragmentShaderSource'],this[_0x481d82(0xfd)]=_0x46a873['rawRenderState'],this[_0x481d82(0x11e)]=_0x46a873['framebuffer'],this['outputTexture']=_0x46a873['outputTexture'],this['autoClear']=_0x46a873[_0x481d82(0x16d)]??![],this['preExecute']=_0x46a873['preExecute'],this['show']=!![],this[_0x481d82(0xe9)]=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6[(_0x481d82(0x104))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x942934){const _0x2488d3=_0x5b607a;switch(this[_0x2488d3(0xc7)]){case'Draw':{const _0x10f6c3=Cesium$6['VertexArray']['fromGeometry']({'context':_0x942934,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x2b73e5=Cesium$6['ShaderProgram']['fromCache']({'context':_0x942934,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x152028=Cesium$6['RenderState'][_0x2488d3(0xb7)](this['rawRenderState']);return new Cesium$6[(_0x2488d3(0x12d))]({'primitiveType':this[_0x2488d3(0x121)],'shaderProgram':_0x2b73e5,'vertexArray':_0x10f6c3,'modelMatrix':Cesium$6[_0x2488d3(0x12c)]['IDENTITY'],'renderState':_0x152028,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this[_0x2488d3(0x11e)],'pass':Cesium$6[_0x2488d3(0xd3)]['OPAQUE'],'pickOnly':!![],'owner':this});}case _0x2488d3(0xb1):{return new Cesium$6[(_0x2488d3(0xaa))]({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this[_0x2488d3(0xac)],'outputTexture':this['outputTexture'],'persists':!![]});}}}[_0x5b607a(0x108)](_0x326eca,_0x38dd33){const _0x3d5c96=_0x5b607a;this['geometry']=_0x38dd33;const _0x5c14a0=Cesium$6['VertexArray'][_0x3d5c96(0xf0)]({'context':_0x326eca,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0x3d5c96(0x16f)]});this['commandToExecute']['vertexArray']=_0x5c14a0;}['update'](_0x1e0b5e){const _0x1c83d5=_0x5b607a;if(!this['show'])return;if(_0x1e0b5e['mode']!==Cesium$6['SceneMode']['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x1e0b5e[_0x1c83d5(0x140)])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6[_0x1c83d5(0x10e)](this[_0x1c83d5(0xb9)])&&_0x1e0b5e[_0x1c83d5(0x110)]['push'](this['clearCommand']),_0x1e0b5e['commandList'][_0x1c83d5(0x179)](this[_0x1c83d5(0xe9)]);}['isDestroyed'](){return![];}['destroy'](){const _0x475ba7=_0x5b607a;if(this['clearCommand']){var _0x1171f7,_0x41dfeb;(_0x1171f7=this['clearCommand'])!==null&&_0x1171f7!==void 0x0&&_0x1171f7['vertexArray']&&this[_0x475ba7(0xb9)][_0x475ba7(0x134)]['destroy'](),(_0x41dfeb=this['clearCommand'])!==null&&_0x41dfeb!==void 0x0&&_0x41dfeb['shaderProgram']&&this[_0x475ba7(0xb9)][_0x475ba7(0x170)]['destroy'](),delete this[_0x475ba7(0xb9)];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this['commandToExecute'][_0x475ba7(0x134)]['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram']['destroy'](),delete this[_0x475ba7(0xe9)]),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x2377ad=function(){const _0x2844f6=_0x203e,_0x1c82da=new Cesium$5[(_0x2844f6(0x16b))]({'attributes':new Cesium$5[(_0x2844f6(0x14c))]({'position':new Cesium$5['GeometryAttribute']({'componentDatatype':Cesium$5[_0x2844f6(0x138)]['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'][_0x2844f6(0x115)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x1c82da;},_0x27e1ce=function(_0x1bcba5,_0x5bd4e5){if(Cesium$5['defined'](_0x5bd4e5)){const _0x57364d={};_0x57364d['arrayBufferView']=_0x5bd4e5,_0x1bcba5['source']=_0x57364d;}const _0x1d7ee4=new Cesium$5['Texture'](_0x1bcba5);return _0x1d7ee4;},_0x11f478=function(_0x3409c3,_0x2ea066,_0x101f30){const _0x58f641=new Cesium$5['Framebuffer']({'context':_0x3409c3,'colorTextures':[_0x2ea066],'depthTexture':_0x101f30});return _0x58f641;},_0x4ccf9a=function(_0x52d177){const _0x1f14d2=_0x203e,_0x12341d=!![],_0x4d9c13=![],_0x3d3ac0={'viewport':_0x52d177['viewport'],'depthTest':_0x52d177['depthTest'],'depthMask':_0x52d177['depthMask'],'blending':_0x52d177['blending']},_0x2fcb64=Cesium$5[_0x1f14d2(0xbd)]['getDefaultRenderState'](_0x12341d,_0x4d9c13,_0x3d3ac0);return _0x2fcb64;},_0x218f1b=function(_0x982da7){const _0xad4fbd=_0x203e,_0x1b1045={},_0x4ad89b=Cesium$5['Math']['mod'](_0x982da7[_0xad4fbd(0xe5)],Cesium$5['Math']['TWO_PI']),_0x41a979=Cesium$5[_0xad4fbd(0xc2)]['mod'](_0x982da7['east'],Cesium$5['Math']['TWO_PI']),_0x212196=_0x982da7['width'];let _0x3fd7fb,_0x1a267e;_0x212196>Cesium$5[_0xad4fbd(0xc2)]['THREE_PI_OVER_TWO']?(_0x3fd7fb=0x0,_0x1a267e=Cesium$5[_0xad4fbd(0xc2)]['TWO_PI']):_0x41a979-_0x4ad89b<_0x212196?(_0x3fd7fb=_0x4ad89b,_0x1a267e=_0x4ad89b+_0x212196):(_0x3fd7fb=_0x4ad89b,_0x1a267e=_0x41a979);_0x1b1045['lon']={'min':Cesium$5['Math']['toDegrees'](_0x3fd7fb),'max':Cesium$5['Math']['toDegrees'](_0x1a267e)};const _0x4adcb8=_0x982da7['south'],_0x28a4e5=_0x982da7['north'],_0x1b2cf5=_0x982da7['height'],_0x59fbfd=_0x1b2cf5>Cesium$5[_0xad4fbd(0xc2)]['PI']/0xc?_0x1b2cf5/0x2:0x0;let _0x50e75f=Cesium$5[_0xad4fbd(0xc2)]['clampToLatitudeRange'](_0x4adcb8-_0x59fbfd),_0xc51164=Cesium$5[_0xad4fbd(0xc2)]['clampToLatitudeRange'](_0x28a4e5+_0x59fbfd);return _0x50e75f<-Cesium$5['Math'][_0xad4fbd(0x139)]&&(_0x50e75f=-Cesium$5[_0xad4fbd(0xc2)]['PI_OVER_TWO']),_0xc51164>Cesium$5['Math'][_0xad4fbd(0x139)]&&(_0xc51164=Cesium$5[_0xad4fbd(0xc2)]['PI_OVER_TWO']),_0x1b1045['lat']={'min':Cesium$5[_0xad4fbd(0xc2)]['toDegrees'](_0x50e75f),'max':Cesium$5['Math'][_0xad4fbd(0x13d)](_0xc51164)},_0x1b1045;};return{'getFullscreenQuad':_0x2377ad,'createTexture':_0x27e1ce,'createFramebuffer':_0x11f478,'createRawRenderState':_0x4ccf9a,'viewRectangleToLonLatRange':_0x218f1b};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x5ce72a,_0x527b78,_0x59ac37,_0x226dc6,_0x25600a){const _0x482696=_0x5b607a;this[_0x482696(0x16a)](_0x5ce72a,_0x527b78,_0x59ac37['colors']),this['createRenderingFramebuffers'](_0x5ce72a),this['createRenderingPrimitives'](_0x5ce72a,_0x59ac37,_0x226dc6,_0x25600a);}['createRenderingTextures'](_0x3ef9e3,_0x3dd9ee,_0x23a68c){const _0x5a3775=_0x5b607a,_0x81cadc={'context':_0x3ef9e3,'width':_0x3ef9e3['drawingBufferWidth'],'height':_0x3ef9e3['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x5a3775(0xef)]['RGBA'],'pixelDatatype':Cesium$4[_0x5a3775(0x156)]['UNSIGNED_BYTE']},_0x1d5ecc={'context':_0x3ef9e3,'width':_0x3ef9e3['drawingBufferWidth'],'height':_0x3ef9e3['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x5a3775(0xef)]['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x5a3775(0x159)]},_0x3af1a9=_0x23a68c[_0x5a3775(0xf7)],_0x572d60=new Float32Array(_0x3af1a9*0x3);for(let _0x259658=0x0;_0x259658<_0x3af1a9;_0x259658++){const _0x3c83fe=Cesium$4[_0x5a3775(0x104)][_0x5a3775(0x11c)](_0x23a68c[_0x259658]);_0x572d60[0x3*_0x259658]=_0x3c83fe['red'],_0x572d60[0x3*_0x259658+0x1]=_0x3c83fe['green'],_0x572d60[0x3*_0x259658+0x2]=_0x3c83fe['blue'];}const _0x2d7e56={'context':_0x3ef9e3,'width':_0x3af1a9,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x5a3775(0x115)],'sampler':new Cesium$4[(_0x5a3775(0x106))]({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter']['LINEAR']})};this['textures']={'segmentsColor':Util['createTexture'](_0x81cadc),'segmentsDepth':Util['createTexture'](_0x1d5ecc),'currentTrailsColor':Util['createTexture'](_0x81cadc),'currentTrailsDepth':Util['createTexture'](_0x1d5ecc),'nextTrailsColor':Util['createTexture'](_0x81cadc),'nextTrailsDepth':Util['createTexture'](_0x1d5ecc),'colorTable':Util[_0x5a3775(0x13f)](_0x2d7e56,_0x572d60)};}['createRenderingFramebuffers'](_0x51d39e){const _0x403ae1=_0x5b607a;this['framebuffers']={'segments':Util['createFramebuffer'](_0x51d39e,this['textures']['segmentsColor'],this['textures'][_0x403ae1(0x15d)]),'currentTrails':Util['createFramebuffer'](_0x51d39e,this[_0x403ae1(0xad)]['currentTrailsColor'],this['textures']['currentTrailsDepth']),'nextTrails':Util[_0x403ae1(0x146)](_0x51d39e,this[_0x403ae1(0xad)]['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}[_0x5b607a(0x15c)](_0x512fc9){const _0x2ccf79=_0x5b607a,_0x23a383=0x4;let _0x334bb2=[];for(let _0x5dcc6e=0x0;_0x5dcc6e<_0x512fc9['particlesTextureSize'];_0x5dcc6e++){for(let _0x1dbdba=0x0;_0x1dbdba<_0x512fc9[_0x2ccf79(0x10d)];_0x1dbdba++){for(let _0x11ab12=0x0;_0x11ab12<_0x23a383;_0x11ab12++){_0x334bb2['push'](_0x5dcc6e/_0x512fc9[_0x2ccf79(0x10d)]),_0x334bb2['push'](_0x1dbdba/_0x512fc9['particlesTextureSize']);}}}_0x334bb2=new Float32Array(_0x334bb2);let _0x370075=[];const _0x58c28d=[-0x1,0x1],_0x1a1bde=[-0x1,0x1];for(let _0x4a5e54=0x0;_0x4a5e54<_0x512fc9['maxParticles'];_0x4a5e54++){for(let _0x467092=0x0;_0x467092<_0x23a383/0x2;_0x467092++){for(let _0x3a6b67=0x0;_0x3a6b67<_0x23a383/0x2;_0x3a6b67++){_0x370075['push'](_0x58c28d[_0x467092]),_0x370075['push'](_0x1a1bde[_0x3a6b67]),_0x370075['push'](0x0);}}}_0x370075=new Float32Array(_0x370075);const _0x5e98d2=0x6*_0x512fc9['maxParticles'],_0x31d86e=new Uint32Array(_0x5e98d2);for(let _0x2674d0=0x0,_0xf878f9=0x0,_0xfc902f=0x0;_0x2674d0<_0x512fc9[_0x2ccf79(0xa5)];_0x2674d0++){_0x31d86e[_0xf878f9++]=_0xfc902f+0x0,_0x31d86e[_0xf878f9++]=_0xfc902f+0x1,_0x31d86e[_0xf878f9++]=_0xfc902f+0x2,_0x31d86e[_0xf878f9++]=_0xfc902f+0x2,_0x31d86e[_0xf878f9++]=_0xfc902f+0x1,_0x31d86e[_0xf878f9++]=_0xfc902f+0x3,_0xfc902f+=0x4;}const _0x53f3e3=new Cesium$4['Geometry']({'attributes':new Cesium$4[(_0x2ccf79(0x14c))]({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x334bb2}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x370075})}),'indices':_0x31d86e});return _0x53f3e3;}[_0x5b607a(0x12e)](_0x328720,_0x29bce0,_0x444c45,_0x29b939){const _0x26f7b1=_0x5b607a,_0x2b3306=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x29bce0),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x29b939['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){const _0x5d5ef0=_0x203e;return _0x29b939[_0x5d5ef0(0xf2)][_0x5d5ef0(0x173)];},'postProcessingSpeed':function(){return _0x29b939['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){return _0x2b3306['textures']['colorTable'];},'aspect':function(){return _0x328720['drawingBufferWidth']/_0x328720['drawingBufferHeight'];},'pixelSize':function(){return _0x444c45['pixelSize'];},'lineWidth':function(){return _0x29bce0['lineWidth'];},'particleHeight':function(){return _0x29bce0['particleHeight'];}},'vertexShaderSource':new Cesium$4[(_0x26f7b1(0x124))]({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util[_0x26f7b1(0xc8)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x26f7b1(0x133)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':_0x26f7b1(0xdf),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x26f7b1(0x13a)](),'primitiveType':Cesium$4[_0x26f7b1(0x166)]['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0x16a6bf=_0x26f7b1;return _0x2b3306[_0x16a6bf(0xad)]['segmentsColor'];},'segmentsDepthTexture':function(){return _0x2b3306['textures']['segmentsDepth'];},'currentTrailsColor':function(){const _0xb3bf58=_0x26f7b1;return _0x2b3306['framebuffers']['currentTrails'][_0xb3bf58(0x150)](0x0);},'trailsDepthTexture':function(){return _0x2b3306['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){return _0x29bce0['fadeOpacity'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4[(_0x26f7b1(0x124))]({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction'][_0x26f7b1(0xde)]},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x5a3d4d=_0x26f7b1,_0x43898f=_0x2b3306[_0x5a3d4d(0x10f)][_0x5a3d4d(0xfa)];_0x2b3306[_0x5a3d4d(0x10f)]['currentTrails']=_0x2b3306['framebuffers']['nextTrails'],_0x2b3306['framebuffers']['nextTrails']=_0x43898f,_0x2b3306[_0x5a3d4d(0xd4)]['trails']['commandToExecute'][_0x5a3d4d(0x11e)]=_0x2b3306['framebuffers'][_0x5a3d4d(0x9f)],_0x2b3306['primitives']['trails']['clearCommand']['framebuffer']=_0x2b3306[_0x5a3d4d(0x10f)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x26f7b1(0x166)]['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x51d37d=_0x26f7b1;return _0x2b3306[_0x51d37d(0x10f)][_0x51d37d(0x9f)][_0x51d37d(0x150)](0x0);},'trailsDepthTexture':function(){return _0x2b3306['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x26f7b1(0xa3)],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag=_0x5b607a(0x15f),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';function _0x203e(_0x3889b4,_0x3c23f7){const _0x288ab2=_0x288a();return _0x203e=function(_0x203e23,_0x5acfd1){_0x203e23=_0x203e23-0x94;let _0x5e9c8b=_0x288ab2[_0x203e23];return _0x5e9c8b;},_0x203e(_0x3889b4,_0x3c23f7);}const Cesium$3=mars3d__namespace['Cesium'];class ParticlesComputing{constructor(_0x498d18,_0x3d545b,_0x530829,_0x47f3dc){const _0x4a638b=_0x5b607a;this['data']=_0x3d545b,this['createWindTextures'](_0x498d18,_0x3d545b),this['createParticlesTextures'](_0x498d18,_0x530829,_0x47f3dc),this[_0x4a638b(0x123)](_0x3d545b,_0x530829,_0x47f3dc);}['createWindTextures'](_0x3983eb,_0x4de7cc){const _0x4ebfe0=_0x5b607a,_0x3577ca={'context':_0x3983eb,'width':_0x4de7cc[_0x4ebfe0(0xa2)][_0x4ebfe0(0x107)],'height':_0x4de7cc[_0x4ebfe0(0xa2)]['lat']*(_0x4de7cc['dimensions'][_0x4ebfe0(0xae)]||0x1),'pixelFormat':Cesium$3['PixelFormat']['LUMINANCE'],'pixelDatatype':Cesium$3[_0x4ebfe0(0x156)]['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3[_0x4ebfe0(0x131)]['NEAREST']})};this['windTextures']={'U':Util['createTexture'](_0x3577ca,_0x4de7cc['U'][_0x4ebfe0(0x152)]),'V':Util['createTexture'](_0x3577ca,_0x4de7cc['V'][_0x4ebfe0(0x152)])};}[_0x5b607a(0x14a)](_0x37e272,_0x5cc718,_0x2d667b){const _0x12618b=_0x5b607a,_0x42ff7b={'context':_0x37e272,'width':_0x5cc718[_0x12618b(0x10d)],'height':_0x5cc718['particlesTextureSize'],'pixelFormat':Cesium$3[_0x12618b(0xef)]['RGBA'],'pixelDatatype':Cesium$3[_0x12618b(0x156)]['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x12618b(0x106))]({'minificationFilter':Cesium$3[_0x12618b(0xe1)]['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x12618b(0x17a)]})},_0x1691cf=this[_0x12618b(0xf6)](_0x5cc718['maxParticles'],_0x2d667b),_0x5d7b40=new Float32Array(0x4*_0x5cc718[_0x12618b(0xa5)])[_0x12618b(0xe2)](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x42ff7b),'currentParticlesPosition':Util[_0x12618b(0x13f)](_0x42ff7b,_0x1691cf),'nextParticlesPosition':Util['createTexture'](_0x42ff7b,_0x1691cf),'currentParticlesSpeed':Util['createTexture'](_0x42ff7b,_0x5d7b40),'nextParticlesSpeed':Util['createTexture'](_0x42ff7b,_0x5d7b40),'postProcessingPosition':Util['createTexture'](_0x42ff7b,_0x1691cf),'postProcessingSpeed':Util['createTexture'](_0x42ff7b,_0x5d7b40)};}[_0x5b607a(0xf6)](_0x304e57,_0x1d6d33){const _0x4b87e4=_0x5b607a,_0x2f0b34=new Float32Array(0x4*_0x304e57);for(let _0x285e3f=0x0;_0x285e3f<_0x304e57;_0x285e3f++){_0x2f0b34[0x4*_0x285e3f]=Cesium$3['Math']['randomBetween'](_0x1d6d33[_0x4b87e4(0x9d)]['x'],_0x1d6d33[_0x4b87e4(0x9d)]['y']),_0x2f0b34[0x4*_0x285e3f+0x1]=Cesium$3['Math']['randomBetween'](_0x1d6d33['latRange']['x'],_0x1d6d33[_0x4b87e4(0x147)]['y']),_0x2f0b34[0x4*_0x285e3f+0x2]=Cesium$3['Math']['randomBetween'](this['data']['lev']['min'],this['data']['lev'][_0x4b87e4(0x16c)]),_0x2f0b34[0x4*_0x285e3f+0x3]=0x0;}return _0x2f0b34;}[_0x5b607a(0x114)](){const _0x5ec9a8=_0x5b607a;Object['keys'](this['particlesTextures'])[_0x5ec9a8(0x167)](_0x2f105f=>{const _0x13d3cb=_0x5ec9a8;this[_0x13d3cb(0xf2)][_0x2f105f]['destroy']();});}['createComputingPrimitives'](_0x362d00,_0x4ea417,_0x24ffcd){const _0x345c45=_0x5b607a,_0x15eac7=new Cesium$3['Cartesian3'](_0x362d00['dimensions']['lon'],_0x362d00['dimensions']['lat'],_0x362d00[_0x345c45(0xa2)][_0x345c45(0xae)]),_0x4bd66e=new Cesium$3[(_0x345c45(0xa9))](_0x362d00['lon'][_0x345c45(0x129)],_0x362d00[_0x345c45(0x14f)]['min'],_0x362d00['lev']['min']),_0x834392=new Cesium$3['Cartesian3'](_0x362d00[_0x345c45(0x107)]['max'],_0x362d00['lat'][_0x345c45(0x16c)],_0x362d00['lev'][_0x345c45(0x16c)]),_0x43de86=new Cesium$3[(_0x345c45(0xa9))]((_0x834392['x']-_0x4bd66e['x'])/(_0x15eac7['x']-0x1),(_0x834392['y']-_0x4bd66e['y'])/(_0x15eac7['y']-0x1),_0x15eac7['z']>0x1?(_0x834392['z']-_0x4bd66e['z'])/(_0x15eac7['z']-0x1):0x1),_0x3cb131=new Cesium$3[(_0x345c45(0x163))](_0x362d00['U'][_0x345c45(0x129)],_0x362d00['U']['max']),_0x4df8fb=new Cesium$3['Cartesian2'](_0x362d00['V']['min'],_0x362d00['V'][_0x345c45(0x16c)]),_0x4190af=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':_0x345c45(0xb1),'uniformMap':{'U':function(){return _0x4190af['windTextures']['U'];},'V':function(){const _0x5e8838=_0x345c45;return _0x4190af[_0x5e8838(0xed)]['V'];},'currentParticlesPosition':function(){const _0x15a7ef=_0x345c45;return _0x4190af['particlesTextures'][_0x15a7ef(0xc9)];},'dimension':function(){return _0x15eac7;},'minimum':function(){return _0x4bd66e;},'maximum':function(){return _0x834392;},'interval':function(){return _0x43de86;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){_0x4190af['primitives']['getWind']['commandToExecute']['outputTexture']=_0x4190af['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x4190af['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){const _0x2bd083=_0x345c45;return _0x4190af[_0x2bd083(0xf2)]['particlesWind'];},'uSpeedRange':function(){return _0x3cb131;},'vSpeedRange':function(){return _0x4df8fb;},'pixelSize':function(){const _0x42b7b1=_0x345c45;return _0x24ffcd[_0x42b7b1(0x143)];},'speedFactor':function(){return _0x4ea417['speedFactor'];}},'fragmentShaderSource':new Cesium$3[(_0x345c45(0x124))]({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x345c45(0xee)],'preExecute':function(){const _0x1f817e=_0x345c45,_0x22d5e8=_0x4190af[_0x1f817e(0xf2)]['currentParticlesSpeed'];_0x4190af['particlesTextures']['currentParticlesSpeed']=_0x4190af['particlesTextures']['postProcessingSpeed'],_0x4190af['particlesTextures']['postProcessingSpeed']=_0x22d5e8,_0x4190af[_0x1f817e(0xd4)][_0x1f817e(0x154)][_0x1f817e(0xe9)]['outputTexture']=_0x4190af['particlesTextures'][_0x1f817e(0xee)];}}),'updatePosition':new CustomPrimitive({'commandType':_0x345c45(0xb1),'uniformMap':{'currentParticlesPosition':function(){return _0x4190af['particlesTextures']['currentParticlesPosition'];},'currentParticlesSpeed':function(){return _0x4190af['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x345c45(0x124))]({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':function(){const _0x36178f=_0x345c45,_0x37c542=_0x4190af['particlesTextures']['currentParticlesPosition'];_0x4190af[_0x36178f(0xf2)]['currentParticlesPosition']=_0x4190af[_0x36178f(0xf2)]['postProcessingPosition'],_0x4190af['particlesTextures'][_0x36178f(0x173)]=_0x37c542,_0x4190af[_0x36178f(0xd4)]['updatePosition']['commandToExecute']['outputTexture']=_0x4190af[_0x36178f(0xf2)][_0x36178f(0x13b)];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){const _0x2d7e62=_0x345c45;return _0x4190af['particlesTextures'][_0x2d7e62(0x13b)];},'nextParticlesSpeed':function(){return _0x4190af['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){return _0x24ffcd['lonRange'];},'latRange':function(){return _0x24ffcd['latRange'];},'randomCoefficient':function(){const _0xee57db=_0x345c45,_0x5046f1=Math[_0xee57db(0x164)]();return _0x5046f1;},'dropRate':function(){return _0x4ea417['dropRate'];},'dropRateBump':function(){return _0x4ea417['dropRateBump'];}},'fragmentShaderSource':new Cesium$3[(_0x345c45(0x124))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this[_0x345c45(0xf2)]['postProcessingPosition'],'preExecute':function(){const _0x56820d=_0x345c45;_0x4190af['primitives']['postProcessingPosition'][_0x56820d(0xe9)]['outputTexture']=_0x4190af['particlesTextures'][_0x56820d(0x173)];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){return _0x4190af['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x4190af['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x345c45(0x124))]({'sources':[postProcessingSpeed_frag]}),'outputTexture':this[_0x345c45(0xf2)]['postProcessingSpeed'],'preExecute':function(){const _0x85d5d9=_0x345c45;_0x4190af['primitives'][_0x85d5d9(0xbe)]['commandToExecute']['outputTexture']=_0x4190af['particlesTextures']['postProcessingSpeed'];}})};}}function _0x288a(){const _0x48cfde=['PixelDatatype','setData','_onMouseDownEvent','UNSIGNED_INT','once','tlat','createSegmentsGeometry','segmentsDepth','_map','//\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','camera','strokeStyle','SceneMode','Cartesian2','random','mode','PrimitiveType','forEach','cols','_data','createRenderingTextures','Geometry','max','autoClear','get','STATIC_DRAW','shaderProgram','getRandomLatLng','init','postProcessingPosition','149103HuKzRc','_createCanvas','udata','geometry','canvas','push','NEAREST','now','getUVByXY','lineWidth','mouse_down','attributeLocations','keys','viewerParameters','ymin','off','lonRange','particleSystem','nextTrails','refreshParticles','colorTable','dimensions','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','20SNSWvO','maxParticles','layer','height','wgs84ToWindowCoordinates','Cartesian3','ComputeCommand','16SQrGEp','uniformMap','textures','lev','getOwnPropertyDescriptor','addEventListener','Compute','particlesRendering','pointer-events','vertexShaderSource','lng','lineTo','fromCache','55jTfTsf','clearCommand','SCENE3D','canvasWidth','style','Appearance','postProcessingSpeed','defineProperty','1363691mgtmxP','screen','Math','particlesComputing','width','colors','351830zaKRLj','commandType','createRawRenderState','currentParticlesPosition','bindEvent','wheel','888900SsgMfE','visibility','particlesNumber','mouseMove','abs','_calc_speedRate','globalAlpha','Pass','primitives','container','particles','umax','mouseHidden','1347WNLGnF','resize','remove','show','setOptions','ALWAYS','Draw','xmin','TextureMinificationFilter','fill','fixedHeight','32bWKhEK','west','scene','data','mouse_move','commandToExecute','age','frameRate','EventType','windTextures','nextParticlesSpeed','PixelFormat','fromGeometry','windField','particlesTextures','windData','auto','maxAge','randomizeParticles','length','cancelAnimationFrame','add','currentTrails','globe','vdata','rawRenderState','sqrt','LayerUtil','CanvasWindLayer','drawingBufferHeight','reverseY','rows','Color','tlng','Sampler','lon','setGeometry','ymax','preRender','920eCIBXZ','isInExtent','particlesTextureSize','defined','framebuffers','commandList','redraw','Cesium','postMessage','destroyParticlesTextures','FLOAT','_pointerEvents','_addedHook','_drawLines','687576ZfhsnF','_onMouseMoveEvent','worker','fromCssColorString','toGridXY','framebuffer','__esModule','visible','primitiveType','mouseDown','createComputingPrimitives','ShaderSource','destroy','mouseUp','getPixelSize','frameTime','min','xmax','0px','Matrix4','DrawCommand','createRenderingPrimitives','refreshTimer','fadeOpacity','TextureMagnificationFilter','clear','segments','vertexArray','cos','beginPath','pointerEvents','ComponentDatatype','PI_OVER_THREE','getFullscreenQuad','nextParticlesPosition','options','toDegrees','update','createTexture','context','trails','removeChild','pixelSize','canvasContext','_calcUV','createFramebuffer','latRange','_setOptionsHook','CanvasWindField','createParticlesTextures','wind','GeometryAttributes','ellipsoid','left','lat','getColorTexture','_onMapWhellEvent','array','mars3d-canvasWind','updateSpeed','10600lwJSOx'];_0x288a=function(){return _0x48cfde;};return _0x288a();}const Cesium$2=mars3d__namespace['Cesium'];class ParticleSystem{constructor(_0x3554a3,_0x745fc,_0x1e4572,_0x1f298a){const _0x321e2b=_0x5b607a;this['context']=_0x3554a3,_0x745fc={..._0x745fc},_0x745fc['udata']&&_0x745fc[_0x321e2b(0xfc)]&&(_0x745fc[_0x321e2b(0xa2)]={},_0x745fc['dimensions'][_0x321e2b(0x107)]=_0x745fc[_0x321e2b(0x168)],_0x745fc['dimensions']['lat']=_0x745fc['rows'],_0x745fc['dimensions']['lev']=_0x745fc[_0x321e2b(0xae)]||0x1,_0x745fc['lon']={},_0x745fc[_0x321e2b(0x107)]['min']=_0x745fc[_0x321e2b(0xe0)],_0x745fc['lon']['max']=_0x745fc['xmax'],_0x745fc[_0x321e2b(0x14f)]={},_0x745fc[_0x321e2b(0x14f)]['min']=_0x745fc[_0x321e2b(0x9b)],_0x745fc['lat'][_0x321e2b(0x16c)]=_0x745fc[_0x321e2b(0x109)],_0x745fc['lev']={},_0x745fc[_0x321e2b(0xae)][_0x321e2b(0x129)]=_0x745fc['levmin']??0x1,_0x745fc[_0x321e2b(0xae)][_0x321e2b(0x16c)]=_0x745fc['levmax']??0x1,_0x745fc['U']={},_0x745fc['U']['array']=new Float32Array(_0x745fc[_0x321e2b(0x176)]),_0x745fc['U'][_0x321e2b(0x129)]=_0x745fc['umin']??Math['min'](..._0x745fc[_0x321e2b(0x176)]),_0x745fc['U']['max']=_0x745fc[_0x321e2b(0xd7)]??Math[_0x321e2b(0x16c)](..._0x745fc[_0x321e2b(0x176)]),_0x745fc['V']={},_0x745fc['V']['array']=new Float32Array(_0x745fc['vdata']),_0x745fc['V'][_0x321e2b(0x129)]=_0x745fc['vmin']??Math['min'](..._0x745fc['vdata']),_0x745fc['V'][_0x321e2b(0x16c)]=_0x745fc['vmax']??Math['max'](..._0x745fc['vdata'])),this['data']=_0x745fc,this['options']=_0x1e4572,this['viewerParameters']=_0x1f298a,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']);}['canvasResize'](_0x4d4c9c){const _0x4c6b52=_0x5b607a;this['particlesComputing']['destroyParticlesTextures'](),Object[_0x4c6b52(0x99)](this['particlesComputing']['windTextures'])['forEach'](_0x1c9ec2=>{const _0x504a04=_0x4c6b52;this[_0x504a04(0xc3)]['windTextures'][_0x1c9ec2]['destroy']();}),this['particlesRendering'][_0x4c6b52(0xad)][_0x4c6b52(0xa1)]['destroy'](),Object['keys'](this[_0x4c6b52(0xb2)]['framebuffers'])['forEach'](_0x37a8ad=>{this['particlesRendering']['framebuffers'][_0x37a8ad]['destroy']();}),this['context']=_0x4d4c9c,this[_0x4c6b52(0xc3)]=new ParticlesComputing(this['context'],this['data'],this[_0x4c6b52(0x13c)],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0x24f9f1=_0x5b607a,_0x3abdaf=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x24f9f1(0x104))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this['particlesRendering'][_0x24f9f1(0x10f)])[_0x24f9f1(0x167)](_0x5764dd=>{_0x3abdaf['framebuffer']=this['particlesRendering']['framebuffers'][_0x5764dd],_0x3abdaf['execute'](this['context']);});}[_0x5b607a(0xa0)](_0x2712a9){const _0x1fddbf=_0x5b607a;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this['context'],this['options'],this[_0x1fddbf(0x9a)]);if(_0x2712a9){const _0x5dcfd6=this[_0x1fddbf(0xb2)]['createSegmentsGeometry'](this['options']);this['particlesRendering']['primitives']['segments'][_0x1fddbf(0x177)]=_0x5dcfd6;const _0x5f3f07=Cesium$2['VertexArray']['fromGeometry']({'context':this['context'],'geometry':_0x5dcfd6,'attributeLocations':this['particlesRendering']['primitives'][_0x1fddbf(0x133)][_0x1fddbf(0x98)],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});this[_0x1fddbf(0xb2)]['primitives'][_0x1fddbf(0x133)]['commandToExecute'][_0x1fddbf(0x134)]=_0x5f3f07;}}['setOptions'](_0x1da898){const _0x5602d4=_0x5b607a;let _0x329f38=![];this[_0x5602d4(0x13c)]['maxParticles']!==_0x1da898[_0x5602d4(0xa5)]&&(_0x329f38=!![]),Object[_0x5602d4(0x99)](_0x1da898)['forEach'](_0x373f5=>{const _0xe52654=_0x5602d4;this[_0xe52654(0x13c)][_0x373f5]=_0x1da898[_0x373f5];}),this[_0x5602d4(0xa0)](_0x329f38);}['applyViewerParameters'](_0x2e925e){Object['keys'](_0x2e925e)['forEach'](_0x195b2d=>{const _0x48f022=_0x203e;this[_0x48f022(0x9a)][_0x195b2d]=_0x2e925e[_0x195b2d];}),this['refreshParticles'](![]);}[_0x5b607a(0x125)](){const _0x422ec7=_0x5b607a;clearTimeout(this['canrefresh']),this[_0x422ec7(0xc3)]['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])[_0x422ec7(0x167)](_0x44b3ee=>{const _0x2975c1=_0x422ec7;this[_0x2975c1(0xc3)]['windTextures'][_0x44b3ee]['destroy']();}),this['particlesRendering'][_0x422ec7(0xad)][_0x422ec7(0xa1)]['destroy'](),Object[_0x422ec7(0x99)](this[_0x422ec7(0xb2)][_0x422ec7(0x10f)])[_0x422ec7(0x167)](_0x568471=>{const _0x5c980e=_0x422ec7;this['particlesRendering'][_0x5c980e(0x10f)][_0x568471]['destroy']();});for(const _0x13e517 in this){delete this[_0x13e517];}}}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(_0x3da218={}){_0x3da218={...DEF_OPTIONS,..._0x3da218},super(_0x3da218),this['_setOptionsHook'](_0x3da218);}get[_0x5b607a(0xa6)](){const _0x13553c=_0x5b607a;return this[_0x13553c(0xd4)];}get['data'](){return this['_data'];}set[_0x5b607a(0xe7)](_0x184292){const _0x4bd4b7=_0x5b607a;this[_0x4bd4b7(0x157)](_0x184292);}get['colors'](){return this['options']['colors'];}set['colors'](_0x50896e){const _0x15b274=_0x5b607a;this['options'][_0x15b274(0xc5)]=_0x50896e,this['particleSystem']&&this[_0x15b274(0x9e)]['setOptions']({'colors':_0x50896e}),this[_0x15b274(0xda)]();}['_mountedHook'](){}['_addedHook'](){const _0x4b9139=_0x5b607a;this['scene']=this['_map']['scene'],this['camera']=this['_map'][_0x4b9139(0x160)],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives']['add'](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1[(_0x4b9139(0x163))](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this[_0x4b9139(0xda)]['bind'](this),![]),this[_0x4b9139(0x97)]=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType'][_0x4b9139(0xcb)],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this[_0x4b9139(0x15e)]['on'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x4b9139(0xcf)],this[_0x4b9139(0x11a)],this),this[_0x4b9139(0x169)]&&this[_0x4b9139(0x157)](this[_0x4b9139(0x169)]);}['_removedHook'](){const _0x27d907=_0x5b607a;window['removeEventListener'](_0x27d907(0xda),this['resize']),this[_0x27d907(0x15e)]['off'](mars3d__namespace['EventType'][_0x27d907(0x10a)],this['_onMap_preRenderEvent'],this),this[_0x27d907(0x15e)]['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x27d907(0x15e)]['off'](mars3d__namespace['EventType']['mouseDown'],this[_0x27d907(0x158)],this),this['_map']['off'](mars3d__namespace[_0x27d907(0xec)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace[_0x27d907(0xec)]['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this['_map']['scene'][_0x27d907(0xd4)][_0x27d907(0xdb)](this['primitives']);}['resize'](){const _0x10e846=_0x5b607a;if(!this[_0x10e846(0xdc)]||!this['particleSystem'])return;this['primitives']['show']=![],this[_0x10e846(0xd4)]['removeAll'](),this['_map'][_0x10e846(0x15a)](mars3d__namespace[_0x10e846(0xec)]['preRender'],this['_onMap_preRenderEvent'],this);}['_onMap_preRenderEvent'](_0x7569fa){const _0x480a5a=_0x5b607a;this['particleSystem']['canvasResize'](this[_0x480a5a(0xe6)]['context']),this['addPrimitives'](),this[_0x480a5a(0xd4)]['show']=!![];}['_onMapWhellEvent'](_0x52f92b){const _0x38a807=_0x5b607a;clearTimeout(this['refreshTimer']);if(!this[_0x38a807(0xdc)]||!this[_0x38a807(0x9e)])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x54bf67){this['mouse_down']=!![];}[_0x5b607a(0x11a)](_0x2549ad){const _0x370d91=_0x5b607a;if(!this['show']||!this[_0x370d91(0x9e)])return;this[_0x370d91(0x97)]&&(this['primitives']['show']=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x9ad043){const _0x46441a=_0x5b607a;if(!this[_0x46441a(0xdc)]||!this['particleSystem'])return;this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}['redraw'](){const _0x23e8d1=_0x5b607a;if(!this[_0x23e8d1(0x15e)]||!this['show'])return;this['updateViewerParameters'](),this['particleSystem']['applyViewerParameters'](this[_0x23e8d1(0x9a)]),this['primitives'][_0x23e8d1(0xdc)]=!![];}[_0x5b607a(0x157)](_0x1d21ee){const _0x167d0b=_0x5b607a;this['_data']=_0x1d21ee,this['particleSystem']&&this['particleSystem'][_0x167d0b(0x125)](),this['particleSystem']=new ParticleSystem(this['scene']['context'],_0x1d21ee,this['getOptions'](),this['viewerParameters']),this['addPrimitives']();}['_setOptionsHook'](_0x26c82e,_0xfe74ce){if(_0x26c82e)for(const _0x1ad160 in _0x26c82e){this[_0x1ad160]=_0x26c82e[_0x1ad160];}this['particleSystem']&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x6c653=_0x5b607a,_0x19d73b=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0x19d73b*_0x19d73b,{'particlesTextureSize':_0x19d73b,'maxParticles':this[_0x6c653(0xce)],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x6c653(0x130)],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this['colors']};}['addPrimitives'](){const _0x4de648=_0x5b607a;this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['getWind']),this['primitives'][_0x4de648(0xf9)](this['particleSystem'][_0x4de648(0xc3)]['primitives'][_0x4de648(0x154)]),this[_0x4de648(0xd4)]['add'](this['particleSystem']['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this[_0x4de648(0x9e)][_0x4de648(0xc3)]['primitives']['postProcessingPosition']),this['primitives']['add'](this['particleSystem'][_0x4de648(0xc3)]['primitives']['postProcessingSpeed']),this['primitives']['add'](this[_0x4de648(0x9e)][_0x4de648(0xb2)]['primitives']['segments']),this['primitives'][_0x4de648(0xf9)](this['particleSystem'][_0x4de648(0xb2)]['primitives'][_0x4de648(0x141)]),this['primitives'][_0x4de648(0xf9)](this[_0x4de648(0x9e)]['particlesRendering']['primitives'][_0x4de648(0xc1)]);}['updateViewerParameters'](){const _0xcb5ca0=_0x5b607a;let _0x2fbb7c=this[_0xcb5ca0(0x160)]['computeViewRectangle'](this['scene'][_0xcb5ca0(0xfb)]['ellipsoid']);if(!_0x2fbb7c){const _0x47c7b3=this['_map']['getExtent']();_0x2fbb7c=Cesium$1['Rectangle']['fromDegrees'](_0x47c7b3[_0xcb5ca0(0xe0)],_0x47c7b3['ymin'],_0x47c7b3['xmax'],_0x47c7b3['ymax']);}const _0x11ad5c=Util['viewRectangleToLonLatRange'](_0x2fbb7c);this['viewerParameters'][_0xcb5ca0(0x9d)]['x']=_0x11ad5c['lon']['min'],this['viewerParameters']['lonRange']['y']=_0x11ad5c[_0xcb5ca0(0x107)]['max'],this[_0xcb5ca0(0x9a)]['latRange']['x']=_0x11ad5c['lat']['min'],this['viewerParameters']['latRange']['y']=_0x11ad5c[_0xcb5ca0(0x14f)]['max'];const _0x4af74e=this[_0xcb5ca0(0x160)][_0xcb5ca0(0x127)](this['globeBoundingSphere'],this[_0xcb5ca0(0xe6)]['drawingBufferWidth'],this['scene'][_0xcb5ca0(0x101)]);_0x4af74e>0x0&&(this['viewerParameters']['pixelSize']=_0x4af74e);}}mars3d__namespace[_0x5b607a(0xff)]['register'](_0x5b607a(0x14b),WindLayer),mars3d__namespace[_0x5b607a(0xa6)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x2425dd=_0x5b607a;this[_0x2425dd(0xb5)]=null,this['lat']=null,this[_0x2425dd(0x105)]=null,this[_0x2425dd(0x15b)]=null,this[_0x2425dd(0xea)]=null;}[_0x5b607a(0x125)](){for(const _0x178662 in this){delete this[_0x178662];}}}class CanvasWindField{constructor(_0x1f1df6){const _0x105c57=_0x5b607a;this[_0x105c57(0xdd)](_0x1f1df6);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x1593cd){const _0x15f220=_0x5b607a;this['_speedRate']=(0x64-(_0x1593cd>0x63?0x63:_0x1593cd))*0x64,this['_calc_speedRate']=[(this[_0x15f220(0x12a)]-this['xmin'])/this['_speedRate'],(this['ymax']-this['ymin'])/this['_speedRate']];}get[_0x5b607a(0xf5)](){return this['_maxAge'];}set[_0x5b607a(0xf5)](_0x2516c6){this['_maxAge']=_0x2516c6;}[_0x5b607a(0xdd)](_0x55f862){const _0x4b815a=_0x5b607a;this['options']=_0x55f862,this['maxAge']=_0x55f862[_0x4b815a(0xf5)]||0x78,this['speedRate']=_0x55f862['speedRate']||0x32,this[_0x4b815a(0xd6)]=[];const _0x120e44=_0x55f862['particlesNumber']||0x1000;for(let _0x363e21=0x0;_0x363e21<_0x120e44;_0x363e21++){const _0xca062b=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0xca062b);}}['setDate'](_0x21234e){const _0x10baef=_0x5b607a;this['rows']=_0x21234e['rows'],this[_0x10baef(0x168)]=_0x21234e[_0x10baef(0x168)],this['xmin']=_0x21234e['xmin'],this[_0x10baef(0x12a)]=_0x21234e['xmax'],this[_0x10baef(0x9b)]=_0x21234e[_0x10baef(0x9b)],this['ymax']=_0x21234e['ymax'],this['grid']=[];const _0x270102=_0x21234e['udata'],_0x686451=_0x21234e['vdata'];let _0x343a04=![];_0x270102['length']===this['rows']&&_0x270102[0x0]['length']===this[_0x10baef(0x168)]&&(_0x343a04=!![]);let _0xbf970c=0x0,_0x8a07ad=null,_0x4f382e=null;for(let _0xf8a94f=0x0;_0xf8a94f<this['rows'];_0xf8a94f++){_0x8a07ad=[];for(let _0x373581=0x0;_0x373581<this['cols'];_0x373581++,_0xbf970c++){_0x343a04?_0x4f382e=this['_calcUV'](_0x270102[_0xf8a94f][_0x373581],_0x686451[_0xf8a94f][_0x373581]):_0x4f382e=this['_calcUV'](_0x270102[_0xbf970c],_0x686451[_0xbf970c]),_0x8a07ad['push'](_0x4f382e);}this['grid']['push'](_0x8a07ad);}this[_0x10baef(0x13c)][_0x10baef(0x102)]&&this['grid']['reverse']();}[_0x5b607a(0x132)](){const _0x396e5c=_0x5b607a;delete this['rows'],delete this[_0x396e5c(0x168)],delete this['xmin'],delete this['xmax'],delete this[_0x396e5c(0x9b)],delete this['ymax'],delete this['grid'],delete this['particles'];}[_0x5b607a(0x11d)](_0x221685,_0x1fe279){const _0x20058e=_0x5b607a,_0x31568a=(_0x221685-this['xmin'])/(this['xmax']-this[_0x20058e(0xe0)])*(this['cols']-0x1),_0x393b0a=(this['ymax']-_0x1fe279)/(this[_0x20058e(0x109)]-this[_0x20058e(0x9b)])*(this[_0x20058e(0x103)]-0x1);return[_0x31568a,_0x393b0a];}['getUVByXY'](_0x7b548c,_0x440016){const _0x3a83c7=_0x5b607a;if(_0x7b548c<0x0||_0x7b548c>=this['cols']||_0x440016>=this['rows'])return[0x0,0x0,0x0];const _0x21d5e7=Math['floor'](_0x7b548c),_0x4c143c=Math['floor'](_0x440016);if(_0x21d5e7===_0x7b548c&&_0x4c143c===_0x440016)return this['grid'][_0x440016][_0x7b548c];const _0x1687ed=_0x21d5e7+0x1,_0x5266d8=_0x4c143c+0x1,_0x54f8d9=this['getUVByXY'](_0x21d5e7,_0x4c143c),_0x2dbc8a=this['getUVByXY'](_0x1687ed,_0x4c143c),_0x2728cb=this[_0x3a83c7(0x95)](_0x21d5e7,_0x5266d8),_0x1a1654=this['getUVByXY'](_0x1687ed,_0x5266d8);let _0x23b594=null;try{_0x23b594=this['_bilinearInterpolation'](_0x7b548c-_0x21d5e7,_0x440016-_0x4c143c,_0x54f8d9,_0x2dbc8a,_0x2728cb,_0x1a1654);}catch(_0x1493b3){console['log'](_0x7b548c,_0x440016);}return _0x23b594;}['_bilinearInterpolation'](_0xdb5ba8,_0x49567f,_0x1a4fc6,_0x121d17,_0x529a76,_0x20d3d5){const _0x6c3242=0x1-_0xdb5ba8,_0xc90956=0x1-_0x49567f,_0x28bd0c=_0x6c3242*_0xc90956,_0x397f2b=_0xdb5ba8*_0xc90956,_0x366fd8=_0x6c3242*_0x49567f,_0x554d9e=_0xdb5ba8*_0x49567f,_0x7f5c66=_0x1a4fc6[0x0]*_0x28bd0c+_0x121d17[0x0]*_0x397f2b+_0x529a76[0x0]*_0x366fd8+_0x20d3d5[0x0]*_0x554d9e,_0x57bcd4=_0x1a4fc6[0x1]*_0x28bd0c+_0x121d17[0x1]*_0x397f2b+_0x529a76[0x1]*_0x366fd8+_0x20d3d5[0x1]*_0x554d9e;return this['_calcUV'](_0x7f5c66,_0x57bcd4);}[_0x5b607a(0x145)](_0x5eb13c,_0x22c433){const _0x31965a=_0x5b607a;return[+_0x5eb13c,+_0x22c433,Math[_0x31965a(0xfe)](_0x5eb13c*_0x5eb13c+_0x22c433*_0x22c433)];}['getUVByPoint'](_0x2490c3,_0x488450){const _0x3fe83b=_0x5b607a;if(!this[_0x3fe83b(0x10c)](_0x2490c3,_0x488450))return null;const _0x6b4f9e=this['toGridXY'](_0x2490c3,_0x488450),_0x4c5a37=this[_0x3fe83b(0x95)](_0x6b4f9e[0x0],_0x6b4f9e[0x1]);return _0x4c5a37;}['isInExtent'](_0x4d61dc,_0xe8cec6){const _0xb76ca9=_0x5b607a;return _0x4d61dc>=this[_0xb76ca9(0xe0)]&&_0x4d61dc<=this[_0xb76ca9(0x12a)]&&_0xe8cec6>=this['ymin']&&_0xe8cec6<=this[_0xb76ca9(0x109)]?!![]:![];}[_0x5b607a(0x171)](){const _0x573df5=_0x5b607a,_0x266c97=fRandomByfloat(this[_0x573df5(0xe0)],this['xmax']),_0x307007=fRandomByfloat(this[_0x573df5(0x9b)],this['ymax']);return{'lat':_0x307007,'lng':_0x266c97};}['getParticles'](){const _0x2a143a=_0x5b607a;let _0x1dd2b6,_0x58fad1,_0x18136e;for(let _0x5ea7f3=0x0,_0x7d1278=this['particles'][_0x2a143a(0xf7)];_0x5ea7f3<_0x7d1278;_0x5ea7f3++){let _0x1861ed=this['particles'][_0x5ea7f3];_0x1861ed[_0x2a143a(0xea)]<=0x0&&(_0x1861ed=this['_randomParticle'](_0x1861ed));if(_0x1861ed['age']>0x0){const _0x483230=_0x1861ed['tlng'],_0x189cc7=_0x1861ed[_0x2a143a(0x15b)];_0x18136e=this['getUVByPoint'](_0x483230,_0x189cc7),_0x18136e?(_0x1dd2b6=_0x483230+this['_calc_speedRate'][0x0]*_0x18136e[0x0],_0x58fad1=_0x189cc7+this['_calc_speedRate'][0x1]*_0x18136e[0x1],_0x1861ed[_0x2a143a(0xb5)]=_0x483230,_0x1861ed['lat']=_0x189cc7,_0x1861ed['tlng']=_0x1dd2b6,_0x1861ed['tlat']=_0x58fad1,_0x1861ed['age']--):_0x1861ed['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x23767c){const _0x462e82=_0x5b607a;let _0x54b811,_0x319793;for(let _0x4a37fb=0x0;_0x4a37fb<0x1e;_0x4a37fb++){_0x54b811=this[_0x462e82(0x171)](),_0x319793=this['getUVByPoint'](_0x54b811['lng'],_0x54b811['lat']);if(_0x319793&&_0x319793[0x2]>0x0)break;}if(!_0x319793)return _0x23767c;const _0x39bb76=_0x54b811[_0x462e82(0xb5)]+this['_calc_speedRate'][0x0]*_0x319793[0x0],_0x306ca9=_0x54b811['lat']+this[_0x462e82(0xd1)][0x1]*_0x319793[0x1];return _0x23767c['lng']=_0x54b811['lng'],_0x23767c['lat']=_0x54b811['lat'],_0x23767c['tlng']=_0x39bb76,_0x23767c['tlat']=_0x306ca9,_0x23767c[_0x462e82(0xea)]=Math['round'](Math[_0x462e82(0x164)]()*this['maxAge']),_0x23767c;}['destroy'](){for(const _0x2a10f2 in this){delete this[_0x2a10f2];}}}function fRandomByfloat(_0xf0f5d4,_0x3011ab){return _0xf0f5d4+Math['random']()*(_0x3011ab-_0xf0f5d4);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x5b607a(0xa6)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x4d6c56={}){const _0x898db7=_0x5b607a;super(_0x4d6c56),this[_0x898db7(0x148)](_0x4d6c56),this[_0x898db7(0x178)]=null;}[_0x5b607a(0x148)](_0x4565a2,_0x51e11e){const _0x29aa50=_0x5b607a;this['frameTime']=0x3e8/(_0x4565a2[_0x29aa50(0xeb)]||0xa),this['_pointerEvents']=this[_0x29aa50(0x13c)]['pointerEvents']??![],this['color']=_0x4565a2['color']||'#ffffff',this['lineWidth']=_0x4565a2['lineWidth']||0x1,this['fixedHeight']=_0x4565a2['fixedHeight']??0x0,this['reverseY']=_0x4565a2[_0x29aa50(0x102)]??![],this['windField']&&this['windField']['setOptions'](_0x4565a2);}get['layer'](){return this['canvas'];}get['canvasWidth'](){return this['_map']['scene']['canvas']['clientWidth'];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get[_0x5b607a(0x137)](){const _0x5e5f91=_0x5b607a;return this[_0x5e5f91(0x116)];}set[_0x5b607a(0x137)](_0x4913f1){const _0x3b573c=_0x5b607a;this[_0x3b573c(0x116)]=_0x4913f1;if(!this['canvas'])return;_0x4913f1?this['canvas'][_0x3b573c(0xbc)][_0x3b573c(0xb3)]='all':this['canvas'][_0x3b573c(0xbc)][_0x3b573c(0xb3)]='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x5406bb){this['options']['particlesNumber']=_0x5406bb,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{const _0x3277e8=_0x203e;this[_0x3277e8(0x111)]();},0x1f4);}get['speedRate'](){const _0x1effa0=_0x5b607a;return this[_0x1effa0(0x13c)]['speedRate'];}set['speedRate'](_0x5bbb05){const _0x509ac9=_0x5b607a;this['options']['speedRate']=_0x5bbb05,this['windField']&&(this[_0x509ac9(0xf1)]['speedRate']=_0x5bbb05);}get['maxAge'](){const _0x20c17a=_0x5b607a;return this['options'][_0x20c17a(0xf5)];}set['maxAge'](_0x984ad1){const _0x2b8583=_0x5b607a;this['options']['maxAge']=_0x984ad1,this['windField']&&(this['windField'][_0x2b8583(0xf5)]=_0x984ad1);}get['data'](){const _0x470922=_0x5b607a;return this[_0x470922(0xf3)];}set[_0x5b607a(0xe7)](_0x4fe1f2){this['setData'](_0x4fe1f2);}['_showHook'](_0x50e86f){const _0x5b184b=_0x5b607a;_0x50e86f?this[_0x5b184b(0x117)]():(this['windData']&&(this['options'][_0x5b184b(0xe7)]=this[_0x5b184b(0xf3)]),this['_removedHook']());}['_mountedHook'](){const _0x59ce94=_0x5b607a;this['options']['worker']?this['initWorker']():this['windField']=new CanvasWindField(this[_0x59ce94(0x13c)]);}['_addedHook'](){const _0x48ba4a=_0x5b607a;this[_0x48ba4a(0x178)]=this['_createCanvas'](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x48ba4a(0xca)](),this['options']['data']&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x3497b1=_0x5b607a;this[_0x3497b1(0x132)](),this['unbindEvent'](),this['canvas']&&(this[_0x3497b1(0x15e)]['container'][_0x3497b1(0x142)](this['canvas']),delete this['canvas']);}[_0x5b607a(0x175)](){const _0xecab=_0x5b607a,_0x248ce0=mars3d__namespace['DomUtil']['create'](_0xecab(0x178),_0xecab(0x153),this['_map'][_0xecab(0xd5)]);return _0x248ce0['style']['position']='absolute',_0x248ce0['style']['top']=_0xecab(0x12b),_0x248ce0[_0xecab(0xbc)][_0xecab(0x14e)]='0px',_0x248ce0['style'][_0xecab(0xc4)]=this['_map'][_0xecab(0xe6)]['canvas']['clientWidth']+'px',_0x248ce0[_0xecab(0xbc)]['height']=this[_0xecab(0x15e)]['scene'][_0xecab(0x178)]['clientHeight']+'px',_0x248ce0[_0xecab(0xbc)]['pointerEvents']=this['_pointerEvents']?_0xecab(0xf4):'none',_0x248ce0[_0xecab(0xbc)]['zIndex']=this['options']['zIndex']??0x9,_0x248ce0['width']=this['_map']['scene']['canvas']['clientWidth'],_0x248ce0['height']=this['_map']['scene']['canvas']['clientHeight'],_0x248ce0;}['resize'](){const _0x5804d8=_0x5b607a;this['canvas']&&(this['canvas'][_0x5804d8(0xbc)]['width']=this['_map']['scene']['canvas']['clientWidth']+'px',this[_0x5804d8(0x178)]['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',this[_0x5804d8(0x178)]['width']=this['_map']['scene'][_0x5804d8(0x178)]['clientWidth'],this[_0x5804d8(0x178)][_0x5804d8(0xa7)]=this[_0x5804d8(0x15e)]['scene']['canvas']['clientHeight']);}['bindEvent'](){const _0x1ba1f0=_0x5b607a,_0x563243=this;let _0x4c385f=Date[_0x1ba1f0(0x94)]();(function _0x500255(){const _0x29b986=_0x1ba1f0;_0x563243['animateFrame']=window['requestAnimationFrame'](_0x500255);if(_0x563243['show']&&_0x563243['windField']){const _0x4ee154=Date['now'](),_0x32673a=_0x4ee154-_0x4c385f;_0x32673a>_0x563243['frameTime']&&(_0x4c385f=_0x4ee154-_0x32673a%_0x563243[_0x29b986(0x128)],_0x563243['update']());}}(),window[_0x1ba1f0(0xb0)]('resize',this['resize']['bind'](this),![]),this[_0x1ba1f0(0x97)]=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this[_0x1ba1f0(0x151)],this),this[_0x1ba1f0(0x15e)]['on'](mars3d__namespace[_0x1ba1f0(0xec)][_0x1ba1f0(0x122)],this[_0x1ba1f0(0x158)],this),this['_map']['on'](mars3d__namespace[_0x1ba1f0(0xec)][_0x1ba1f0(0x126)],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0xcf11c=_0x5b607a;window[_0xcf11c(0xf8)](this['animateFrame']),delete this['animateFrame'],window['removeEventListener']('resize',this['resize']),this['options'][_0xcf11c(0xd8)]&&(this['_map'][_0xcf11c(0x9c)](mars3d__namespace[_0xcf11c(0xec)]['wheel'],this[_0xcf11c(0x151)],this),this['_map']['off'](mars3d__namespace['EventType'][_0xcf11c(0x122)],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace[_0xcf11c(0xec)]['mouseMove'],this[_0xcf11c(0x11a)],this));}['_onMapWhellEvent'](_0x50d732){const _0x42b999=_0x5b607a;clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this[_0x42b999(0x178)]['style'][_0x42b999(0xcd)]='hidden',this[_0x42b999(0x12f)]=setTimeout(()=>{const _0x1e6683=_0x42b999;if(!this[_0x1e6683(0xdc)])return;this['redraw'](),this['canvas']['style']['visibility']=_0x1e6683(0x120);},0xc8);}['_onMouseDownEvent'](_0x35b973){const _0x1aa499=_0x5b607a;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x1aa499(0x15e)]['on'](mars3d__namespace[_0x1aa499(0xec)][_0x1aa499(0xcf)],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x41e316){const _0x418be9=_0x5b607a;if(!this['show']||!this['canvas'])return;this['mouse_down']&&(this['canvas']['style']['visibility']='hidden',this[_0x418be9(0xe8)]=!![]);}['_onMouseUpEvent'](_0xbdd526){const _0x3b3b62=_0x5b607a;if(!this['show']||!this['canvas'])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x3b3b62(0x97)]&&this['mouse_move']&&this['redraw'](),this['canvas']['style'][_0x3b3b62(0xcd)]='visible',this[_0x3b3b62(0x97)]=![],this['mouse_move']=![];}['setData'](_0x156b48){this['clear'](),this['windData']=_0x156b48,this['windField']['setDate'](_0x156b48),this['redraw']();}['redraw'](){if(!this['show'])return;this['windField']['setOptions'](this['options']),this['update']();}['update'](){const _0x4ea62e=_0x5b607a;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x39973c=this[_0x4ea62e(0xf1)]['getParticles']();this['_drawLines'](_0x39973c);}this['_updateIng']=![];}[_0x5b607a(0x118)](_0x3882fe){const _0x2d0471=_0x5b607a;this[_0x2d0471(0x144)]['globalCompositeOperation']='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this[_0x2d0471(0x144)]['globalCompositeOperation']='lighter',this['canvasContext'][_0x2d0471(0xd2)]=0.9,this[_0x2d0471(0x144)][_0x2d0471(0x136)](),this['canvasContext'][_0x2d0471(0x96)]=this['lineWidth'],this[_0x2d0471(0x144)][_0x2d0471(0x161)]=this['color'];const _0x4ef94e=this[_0x2d0471(0x15e)]['scene'][_0x2d0471(0x165)]!==Cesium[_0x2d0471(0x162)][_0x2d0471(0xba)],_0x5792f3=this[_0x2d0471(0xbb)]*0.25;for(let _0x59a355=0x0,_0x754793=_0x3882fe['length'];_0x59a355<_0x754793;_0x59a355++){const _0x10b65e=_0x3882fe[_0x59a355],_0x484b92=this['_tomap'](_0x10b65e[_0x2d0471(0xb5)],_0x10b65e['lat'],_0x10b65e),_0x35d73c=this['_tomap'](_0x10b65e[_0x2d0471(0x105)],_0x10b65e['tlat'],_0x10b65e);if(!_0x484b92||!_0x35d73c)continue;if(_0x4ef94e&&Math[_0x2d0471(0xd0)](_0x484b92[0x0]-_0x35d73c[0x0])>=_0x5792f3)continue;this[_0x2d0471(0x144)]['moveTo'](_0x484b92[0x0],_0x484b92[0x1]),this['canvasContext'][_0x2d0471(0xb6)](_0x35d73c[0x0],_0x35d73c[0x1]);}this['canvasContext']['stroke']();}['_tomap'](_0x1b9809,_0x159930,_0x194fd5){const _0x3c08f1=_0x5b607a,_0x6bfcd2=Cesium['Cartesian3']['fromDegrees'](_0x1b9809,_0x159930,this[_0x3c08f1(0xe3)]),_0x1e5d6d=this['_map'][_0x3c08f1(0xe6)];if(_0x1e5d6d[_0x3c08f1(0x165)]===Cesium['SceneMode']['SCENE3D']){const _0x1fbe38=new Cesium['EllipsoidalOccluder'](_0x1e5d6d[_0x3c08f1(0xfb)][_0x3c08f1(0x14d)],_0x1e5d6d['camera']['positionWC']),_0x17bac9=_0x1fbe38['isPointVisible'](_0x6bfcd2);if(!_0x17bac9)return _0x194fd5['age']=0x0,null;}const _0x4d8d59=Cesium['SceneTransforms'][_0x3c08f1(0xa8)](this[_0x3c08f1(0x15e)][_0x3c08f1(0xe6)],_0x6bfcd2);return _0x4d8d59?[_0x4d8d59['x'],_0x4d8d59['y']]:null;}['clear'](){const _0x820ec5=_0x5b607a;this['windField'][_0x820ec5(0x132)](),delete this['windData'];}['initWorker'](){const _0x5b8fa0=_0x5b607a;this['worker']=new Worker(this['options']['worker']),this['worker']['onmessage']=_0x28d64d=>{const _0x3a97a2=_0x203e;this['_drawLines'](_0x28d64d[_0x3a97a2(0xe7)]['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x1c6fb8=>{const _0x439c60=_0x203e;this['worker'][_0x439c60(0x113)]({'type':'init','options':_0x1c6fb8});},'setOptions':_0x5c5ae6=>{this['worker']['postMessage']({'type':'setOptions','options':_0x5c5ae6});},'setDate':_0xb8edd1=>{this['worker']['postMessage']({'type':'setDate','data':_0xb8edd1});},'update':()=>{const _0x28930f=_0x203e;if(this['_updateIng2'])return;this['_updateIng2']=!![],this[_0x28930f(0x11b)]['postMessage']({'type':_0x28930f(0x13e)});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField'][_0x5b8fa0(0x172)](this[_0x5b8fa0(0x13c)]);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer'][_0x5b607a(0x100)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x5b607a(0x149)]=CanvasWindField,exports[_0x5b607a(0x100)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,_0x5b607a(0x11f),{'value':!![]});
|
|
14
|
+
'use strict';const _0xb93ce=_0x57a3;(function(_0x230989,_0x2a4aee){const _0x18252d=_0x57a3,_0x2966c8=_0x230989();while(!![]){try{const _0x38ca56=parseInt(_0x18252d(0x279))/0x1*(-parseInt(_0x18252d(0x26a))/0x2)+-parseInt(_0x18252d(0x209))/0x3*(-parseInt(_0x18252d(0x240))/0x4)+-parseInt(_0x18252d(0x23f))/0x5*(-parseInt(_0x18252d(0x29f))/0x6)+-parseInt(_0x18252d(0x23b))/0x7+-parseInt(_0x18252d(0x24a))/0x8*(-parseInt(_0x18252d(0x260))/0x9)+parseInt(_0x18252d(0x24e))/0xa+-parseInt(_0x18252d(0x256))/0xb;if(_0x38ca56===_0x2a4aee)break;else _0x2966c8['push'](_0x2966c8['shift']());}catch(_0x33c748){_0x2966c8['push'](_0x2966c8['shift']());}}}(_0x354a,0xee219));function _interopNamespace(_0x495e03){if(_0x495e03&&_0x495e03['__esModule'])return _0x495e03;var _0x37674a=Object['create'](null);return _0x495e03&&Object['keys'](_0x495e03)['forEach'](function(_0x25edd3){const _0x3a16b8=_0x57a3;if(_0x25edd3!=='default'){var _0x5fa0f9=Object['getOwnPropertyDescriptor'](_0x495e03,_0x25edd3);Object[_0x3a16b8(0x274)](_0x37674a,_0x25edd3,_0x5fa0f9[_0x3a16b8(0x269)]?_0x5fa0f9:{'enumerable':!![],'get':function(){return _0x495e03[_0x25edd3];}});}}),_0x37674a['default']=_0x495e03,_0x37674a;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x5785a5,_0x3afc38){const _0xb9d714=_0x5785a5*Math['cos'](Cesium$7['Math']['toRadians'](_0x3afc38));return _0xb9d714;}function getV(_0x25e216,_0x45a990){const _0xd47c82=_0x57a3,_0x188dd3=_0x25e216*Math[_0xd47c82(0x25d)](Cesium$7['Math']['toRadians'](_0x45a990));return _0x188dd3;}function getSpeed(_0x1b6f8f,_0xee1429){const _0x5aaad3=_0x57a3,_0x352b11=Math['sqrt'](Math[_0x5aaad3(0x253)](_0x1b6f8f,0x2)+Math['pow'](_0xee1429,0x2));return _0x352b11;}function getDirection(_0x55fcff,_0x49dccb){const _0x43098f=_0x57a3;let _0x5b5a64=Cesium$7['Math'][_0x43098f(0x20d)](Math[_0x43098f(0x2bb)](_0x49dccb,_0x55fcff));return _0x5b5a64+=_0x5b5a64<0x0?0x168:0x0,_0x5b5a64;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x32880e){const _0x529e3b=_0x57a3;this['commandType']=_0x32880e['commandType'],this['geometry']=_0x32880e['geometry'],this['attributeLocations']=_0x32880e['attributeLocations'],this['primitiveType']=_0x32880e['primitiveType'],this['uniformMap']=_0x32880e['uniformMap'],this[_0x529e3b(0x288)]=_0x32880e['vertexShaderSource'],this['fragmentShaderSource']=_0x32880e['fragmentShaderSource'],this[_0x529e3b(0x27f)]=_0x32880e[_0x529e3b(0x27f)],this['framebuffer']=_0x32880e['framebuffer'],this['outputTexture']=_0x32880e['outputTexture'],this['autoClear']=_0x32880e['autoClear']??![],this[_0x529e3b(0x1e4)]=_0x32880e['preExecute'],this['show']=!![],this[_0x529e3b(0x2a9)]=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6[(_0x529e3b(0x2bc))]({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}[_0xb93ce(0x233)](_0x34a2ee){const _0xf0db18=_0xb93ce;switch(this[_0xf0db18(0x2ae)]){case _0xf0db18(0x212):{const _0x44cfad=Cesium$6['VertexArray']['fromGeometry']({'context':_0x34a2ee,'geometry':this[_0xf0db18(0x298)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage'][_0xf0db18(0x228)]}),_0x3cddad=Cesium$6['ShaderProgram']['fromCache']({'context':_0x34a2ee,'attributeLocations':this[_0xf0db18(0x24d)],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this[_0xf0db18(0x234)]}),_0x38058d=Cesium$6['RenderState']['fromCache'](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x3cddad,'vertexArray':_0x44cfad,'modelMatrix':Cesium$6['Matrix4'][_0xf0db18(0x2a8)],'renderState':_0x38058d,'uniformMap':this[_0xf0db18(0x299)],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0xf0db18(0x29d)],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this[_0xf0db18(0x299)],'outputTexture':this[_0xf0db18(0x28d)],'persists':!![]});}}}['setGeometry'](_0x270d3a,_0xc25580){const _0x386cc4=_0xb93ce;this['geometry']=_0xc25580;const _0x38bc0e=Cesium$6['VertexArray'][_0x386cc4(0x2a5)]({'context':_0x270d3a,'geometry':this[_0x386cc4(0x298)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute'][_0x386cc4(0x1f2)]=_0x38bc0e;}['update'](_0x3cccf2){const _0x300436=_0xb93ce;if(!this[_0x300436(0x2a1)])return;if(_0x3cccf2['mode']!==Cesium$6[_0x300436(0x20f)]['SCENE3D'])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x3cccf2['context'])),Cesium$6['defined'](this[_0x300436(0x1e4)])&&this['preExecute'](),Cesium$6['defined'](this[_0x300436(0x1ff)])&&_0x3cccf2[_0x300436(0x1df)]['push'](this['clearCommand']),_0x3cccf2['commandList']['push'](this[_0x300436(0x2a9)]);}[_0xb93ce(0x1e3)](){return![];}[_0xb93ce(0x244)](){const _0x4fa85c=_0xb93ce;if(this['clearCommand']){var _0x3e6984,_0x20cdc7;(_0x3e6984=this['clearCommand'])!==null&&_0x3e6984!==void 0x0&&_0x3e6984['vertexArray']&&this['clearCommand']['vertexArray']['destroy'](),(_0x20cdc7=this[_0x4fa85c(0x1ff)])!==null&&_0x20cdc7!==void 0x0&&_0x20cdc7['shaderProgram']&&this[_0x4fa85c(0x1ff)][_0x4fa85c(0x237)]['destroy'](),delete this[_0x4fa85c(0x1ff)];}return this['commandToExecute']&&(this['commandToExecute']['vertexArray']&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute']['shaderProgram']['destroy'](),delete this[_0x4fa85c(0x2a9)]),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x267f3a=function(){const _0x386e5a=_0x57a3,_0x58994b=new Cesium$5[(_0x386e5a(0x271))]({'attributes':new Cesium$5[(_0x386e5a(0x20b))]({'position':new Cesium$5[(_0x386e5a(0x280))]({'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'][_0x386e5a(0x2c3)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x58994b;},_0xead11c=function(_0x2507de,_0x326740){if(Cesium$5['defined'](_0x326740)){const _0x484152={};_0x484152['arrayBufferView']=_0x326740,_0x2507de['source']=_0x484152;}const _0x10d9a9=new Cesium$5['Texture'](_0x2507de);return _0x10d9a9;},_0x567b9f=function(_0x3ee427,_0x41949b,_0x4b4610){const _0x234450=new Cesium$5['Framebuffer']({'context':_0x3ee427,'colorTextures':[_0x41949b],'depthTexture':_0x4b4610});return _0x234450;},_0x41068a=function(_0x530cdb){const _0x2bb169=!![],_0x1faeaf=![],_0x5561fe={'viewport':_0x530cdb['viewport'],'depthTest':_0x530cdb['depthTest'],'depthMask':_0x530cdb['depthMask'],'blending':_0x530cdb['blending']},_0x252fc8=Cesium$5['Appearance']['getDefaultRenderState'](_0x2bb169,_0x1faeaf,_0x5561fe);return _0x252fc8;},_0x1bdb4a=function(_0x14f92f){const _0x522832=_0x57a3,_0x30a6cf={},_0x5cd147=Cesium$5['Math']['mod'](_0x14f92f[_0x522832(0x2c4)],Cesium$5['Math']['TWO_PI']),_0x5db3d9=Cesium$5['Math'][_0x522832(0x201)](_0x14f92f['east'],Cesium$5['Math']['TWO_PI']),_0x2d1c1a=_0x14f92f['width'];let _0x4c23f2,_0x35bfa6;_0x2d1c1a>Cesium$5['Math'][_0x522832(0x1ee)]?(_0x4c23f2=0x0,_0x35bfa6=Cesium$5[_0x522832(0x26c)][_0x522832(0x21c)]):_0x5db3d9-_0x5cd147<_0x2d1c1a?(_0x4c23f2=_0x5cd147,_0x35bfa6=_0x5cd147+_0x2d1c1a):(_0x4c23f2=_0x5cd147,_0x35bfa6=_0x5db3d9);_0x30a6cf['lon']={'min':Cesium$5[_0x522832(0x26c)]['toDegrees'](_0x4c23f2),'max':Cesium$5[_0x522832(0x26c)][_0x522832(0x20d)](_0x35bfa6)};const _0x460363=_0x14f92f['south'],_0x182fc1=_0x14f92f['north'],_0x5c9f21=_0x14f92f['height'],_0x4b605c=_0x5c9f21>Cesium$5['Math']['PI']/0xc?_0x5c9f21/0x2:0x0;let _0x43264f=Cesium$5['Math'][_0x522832(0x27e)](_0x460363-_0x4b605c),_0x332af4=Cesium$5[_0x522832(0x26c)][_0x522832(0x27e)](_0x182fc1+_0x4b605c);return _0x43264f<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x43264f=-Cesium$5[_0x522832(0x26c)]['PI_OVER_TWO']),_0x332af4>Cesium$5[_0x522832(0x26c)][_0x522832(0x2ad)]&&(_0x332af4=Cesium$5['Math'][_0x522832(0x248)]),_0x30a6cf['lat']={'min':Cesium$5[_0x522832(0x26c)][_0x522832(0x20d)](_0x43264f),'max':Cesium$5['Math']['toDegrees'](_0x332af4)},_0x30a6cf;};return{'getFullscreenQuad':_0x267f3a,'createTexture':_0xead11c,'createFramebuffer':_0x567b9f,'createRawRenderState':_0x41068a,'viewRectangleToLonLatRange':_0x1bdb4a};}());var segmentDraw_vert='in\x20vec2\x20st;\x0a//\x20it\x20is\x20not\x20normal\x20itself,\x20but\x20used\x20to\x20control\x20normal\x0ain\x20vec3\x20normal;\x20//\x20(point\x20to\x20use,\x20offset\x20sign,\x20not\x20used\x20component)\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20postProcessingSpeed;\x0a\x0auniform\x20float\x20particleHeight;\x0a\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20lineWidth;\x0a\x0aout\x20float\x20speedNormalization;\x0a\x0avec3\x20convertCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20WGS\x2084\x20geometric\x20constants\x0a\x20\x20\x20\x20float\x20a\x20=\x206378137.0;\x20//\x20Semi-major\x20axis\x0a\x20\x20\x20\x20float\x20b\x20=\x206356752.3142;\x20//\x20Semi-minor\x20axis\x0a\x20\x20\x20\x20float\x20e2\x20=\x206.69437999014e-3;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x20\x20\x20\x20float\x20longitude\x20=\x20radians(lonLatLev.x);\x0a\x0a\x20\x20\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x0a\x20\x20\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calcProjectedCoordinate(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20the\x20range\x20of\x20longitude\x20in\x20Cesium\x20is\x20[-180,\x20180]\x20but\x20the\x20range\x20of\x20longitude\x20in\x20the\x20NetCDF\x20file\x20is\x20[0,\x20360]\x0a\x20\x20\x20\x20//\x20[0,\x20180]\x20is\x20corresponding\x20to\x20[0,\x20180]\x20and\x20[180,\x20360]\x20is\x20corresponding\x20to\x20[-180,\x200]\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x\x20+\x20180.0,\x20360.0)\x20-\x20180.0;\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLatLev);\x0a\x20\x20\x20\x20vec4\x20projectedCoordinate\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0);\x0a\x20\x20\x20\x20return\x20projectedCoordinate;\x0a}\x0a\x0avec4\x20calcOffset(vec4\x20currentProjectedCoordinate,\x20vec4\x20nextProjectedCoordinate,\x20float\x20offsetSign)\x20{\x0a\x20\x20\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0);\x0a\x20\x20\x20\x20vec2\x20currentXY\x20=\x20(currentProjectedCoordinate.xy\x20/\x20currentProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x20\x20\x20\x20vec2\x20nextXY\x20=\x20(nextProjectedCoordinate.xy\x20/\x20nextProjectedCoordinate.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20float\x20offsetLength\x20=\x20lineWidth\x20/\x202.0;\x0a\x20\x20\x20\x20vec2\x20direction\x20=\x20normalize(nextXY\x20-\x20currentXY);\x0a\x20\x20\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x20\x20\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0,\x200.0);\x0a\x20\x20\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec2\x20particleIndex\x20=\x20st;\x0a\x0a\x20\x20\x20\x20vec3\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rgb;\x0a\x20\x20\x20\x20vec4\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex);\x0a\x0a\x20\x20\x20\x20vec4\x20currentProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20vec4\x20nextProjectedCoordinate\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(nextPosition.w\x20>\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20currentProjectedCoordinate\x20=\x20calcProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20\x20\x20\x20\x20nextProjectedCoordinate\x20=\x20calcProjectedCoordinate(nextPosition.xyz);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20float\x20pointToUse\x20=\x20normal.x;\x20//\x20-1\x20is\x20currentProjectedCoordinate\x20and\x20+1\x20is\x20nextProjectedCoordinate\x0a\x20\x20\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x0a\x20\x20\x20\x20vec4\x20offset\x20=\x20pixelSize\x20*\x20calcOffset(currentProjectedCoordinate,\x20nextProjectedCoordinate,\x20offsetSign);\x0a\x20\x20\x20\x20if\x20(pointToUse\x20<\x200.0)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20currentProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20nextProjectedCoordinate\x20+\x20offset;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20speedNormalization\x20=\x20texture(postProcessingSpeed,\x20particleIndex).a;\x0a}\x0a',segmentDraw_frag='uniform\x20sampler2D\x20colorTable;\x0a\x0ain\x20float\x20speedNormalization;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20texture(colorTable,\x20vec2(speedNormalization,\x200.0));\x0a}\x0a',fullscreen_vert='in\x20vec3\x20position;\x0ain\x20vec2\x20st;\x0a\x0aout\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20textureCoordinate\x20=\x20st;\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x201.0);\x0a}\x0a',trailDraw_frag='uniform\x20sampler2D\x20segmentsColorTexture;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0auniform\x20sampler2D\x20currentTrailsColor;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0auniform\x20float\x20fadeOpacity;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20pointsColor\x20=\x20texture(segmentsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(currentTrailsColor,\x20textureCoordinate);\x0a\x0a\x20\x20\x20\x20trailsColor\x20=\x20floor(fadeOpacity\x20*\x20255.0\x20*\x20trailsColor)\x20/\x20255.0;\x20//\x20make\x20sure\x20the\x20trailsColor\x20will\x20be\x20strictly\x20decreased\x0a\x0a\x20\x20\x20\x20float\x20pointsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20if\x20(pointsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20pointsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20out_FragColor\x20+\x20trailsColor;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragDepth\x20=\x20min(pointsDepth,\x20trailsDepth);\x0a}\x0a',screenDraw_frag='uniform\x20sampler2D\x20trailsColorTexture;\x0auniform\x20sampler2D\x20trailsDepthTexture;\x0a\x0ain\x20vec2\x20textureCoordinate;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20vec4\x20trailsColor\x20=\x20texture(trailsColorTexture,\x20textureCoordinate);\x0a\x20\x20\x20\x20float\x20trailsDepth\x20=\x20texture(trailsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x0a\x20\x20\x20\x20if\x20(trailsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20trailsColor;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20out_FragColor\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20}\x0a}\x0a';const Cesium$4=mars3d__namespace['Cesium'];class ParticlesRendering{constructor(_0x37964b,_0x39ada1,_0x1437af,_0x4b5c0a,_0x112e45){const _0x427831=_0xb93ce;this['createRenderingTextures'](_0x37964b,_0x39ada1,_0x1437af['colors']),this[_0x427831(0x225)](_0x37964b),this['createRenderingPrimitives'](_0x37964b,_0x1437af,_0x4b5c0a,_0x112e45);}['createRenderingTextures'](_0x180e98,_0xa19e85,_0x52c759){const _0x1e2aa9=_0xb93ce,_0x272c43={'context':_0x180e98,'width':_0x180e98['drawingBufferWidth'],'height':_0x180e98['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4[_0x1e2aa9(0x220)]['UNSIGNED_BYTE']},_0x56f6f2={'context':_0x180e98,'width':_0x180e98['drawingBufferWidth'],'height':_0x180e98['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x1e2aa9(0x232)][_0x1e2aa9(0x287)],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0x4fe99d=_0x52c759['length'],_0x347391=new Float32Array(_0x4fe99d*0x3);for(let _0x2f351e=0x0;_0x2f351e<_0x4fe99d;_0x2f351e++){const _0x3960c4=Cesium$4['Color']['fromCssColorString'](_0x52c759[_0x2f351e]);_0x347391[0x3*_0x2f351e]=_0x3960c4['red'],_0x347391[0x3*_0x2f351e+0x1]=_0x3960c4['green'],_0x347391[0x3*_0x2f351e+0x2]=_0x3960c4['blue'];}const _0x120c2b={'context':_0x180e98,'width':_0x4fe99d,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4[_0x1e2aa9(0x220)]['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4['TextureMagnificationFilter'][_0x1e2aa9(0x23e)]})};this['textures']={'segmentsColor':Util[_0x1e2aa9(0x259)](_0x272c43),'segmentsDepth':Util[_0x1e2aa9(0x259)](_0x56f6f2),'currentTrailsColor':Util['createTexture'](_0x272c43),'currentTrailsDepth':Util['createTexture'](_0x56f6f2),'nextTrailsColor':Util[_0x1e2aa9(0x259)](_0x272c43),'nextTrailsDepth':Util[_0x1e2aa9(0x259)](_0x56f6f2),'colorTable':Util['createTexture'](_0x120c2b,_0x347391)};}['createRenderingFramebuffers'](_0x35c995){const _0x5d2143=_0xb93ce;this['framebuffers']={'segments':Util['createFramebuffer'](_0x35c995,this['textures']['segmentsColor'],this[_0x5d2143(0x24b)]['segmentsDepth']),'currentTrails':Util['createFramebuffer'](_0x35c995,this[_0x5d2143(0x24b)]['currentTrailsColor'],this[_0x5d2143(0x24b)]['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x35c995,this['textures'][_0x5d2143(0x2aa)],this['textures'][_0x5d2143(0x1f9)])};}['createSegmentsGeometry'](_0x965c12){const _0x1c01d7=_0xb93ce,_0x1b6179=0x4;let _0x2cad91=[];for(let _0x4d18b3=0x0;_0x4d18b3<_0x965c12[_0x1c01d7(0x245)];_0x4d18b3++){for(let _0x3e2332=0x0;_0x3e2332<_0x965c12['particlesTextureSize'];_0x3e2332++){for(let _0x1d6b0b=0x0;_0x1d6b0b<_0x1b6179;_0x1d6b0b++){_0x2cad91['push'](_0x4d18b3/_0x965c12['particlesTextureSize']),_0x2cad91['push'](_0x3e2332/_0x965c12['particlesTextureSize']);}}}_0x2cad91=new Float32Array(_0x2cad91);let _0x1da22c=[];const _0x3e5fca=[-0x1,0x1],_0x503f80=[-0x1,0x1];for(let _0x38767a=0x0;_0x38767a<_0x965c12['maxParticles'];_0x38767a++){for(let _0xbc1bce=0x0;_0xbc1bce<_0x1b6179/0x2;_0xbc1bce++){for(let _0x2779fb=0x0;_0x2779fb<_0x1b6179/0x2;_0x2779fb++){_0x1da22c['push'](_0x3e5fca[_0xbc1bce]),_0x1da22c['push'](_0x503f80[_0x2779fb]),_0x1da22c['push'](0x0);}}}_0x1da22c=new Float32Array(_0x1da22c);const _0x3cb2a1=0x6*_0x965c12['maxParticles'],_0x14a1f6=new Uint32Array(_0x3cb2a1);for(let _0x42adb8=0x0,_0x58be02=0x0,_0x3c5b96=0x0;_0x42adb8<_0x965c12['maxParticles'];_0x42adb8++){_0x14a1f6[_0x58be02++]=_0x3c5b96+0x0,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x1,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x2,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x2,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x1,_0x14a1f6[_0x58be02++]=_0x3c5b96+0x3,_0x3c5b96+=0x4;}const _0x205b76=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4[(_0x1c01d7(0x280))]({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x2cad91}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype'][_0x1c01d7(0x2c3)],'componentsPerAttribute':0x3,'values':_0x1da22c})}),'indices':_0x14a1f6});return _0x205b76;}['createRenderingPrimitives'](_0x107851,_0x3e2e80,_0x4f3ec6,_0x45d00d){const _0x3972e8=_0xb93ce,_0x3662d9=this;this['primitives']={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x3e2e80),'primitiveType':Cesium$4['PrimitiveType'][_0x3972e8(0x1f8)],'uniformMap':{'currentParticlesPosition':function(){const _0x14438b=_0x3972e8;return _0x45d00d[_0x14438b(0x1e9)][_0x14438b(0x2a2)];},'postProcessingPosition':function(){const _0x5289fb=_0x3972e8;return _0x45d00d['particlesTextures'][_0x5289fb(0x252)];},'postProcessingSpeed':function(){const _0x295047=_0x3972e8;return _0x45d00d['particlesTextures'][_0x295047(0x1f0)];},'colorTable':function(){const _0x484a37=_0x3972e8;return _0x3662d9[_0x484a37(0x24b)][_0x484a37(0x210)];},'aspect':function(){return _0x107851['drawingBufferWidth']/_0x107851['drawingBufferHeight'];},'pixelSize':function(){const _0xab0431=_0x3972e8;return _0x4f3ec6[_0xab0431(0x250)];},'lineWidth':function(){return _0x3e2e80['lineWidth'];},'particleHeight':function(){return _0x3e2e80['particleHeight'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x3972e8(0x224)],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':_0x3972e8(0x212),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x3972e8(0x26d)]['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){const _0x48b892=_0x3972e8;return _0x3662d9['textures'][_0x48b892(0x1fb)];},'segmentsDepthTexture':function(){const _0x2a9e71=_0x3972e8;return _0x3662d9[_0x2a9e71(0x24b)]['segmentsDepth'];},'currentTrailsColor':function(){const _0xf5a10f=_0x3972e8;return _0x3662d9['framebuffers']['currentTrails'][_0xf5a10f(0x204)](0x0);},'trailsDepthTexture':function(){return _0x3662d9['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){const _0x2c188b=_0x3972e8;return _0x3e2e80[_0x2c188b(0x264)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[trailDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4['DepthFunction'][_0x3972e8(0x1fe)]},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x3d25f7=_0x3972e8,_0x4f3eb0=_0x3662d9[_0x3d25f7(0x211)]['currentTrails'];_0x3662d9['framebuffers']['currentTrails']=_0x3662d9['framebuffers']['nextTrails'],_0x3662d9['framebuffers']['nextTrails']=_0x4f3eb0,_0x3662d9['primitives']['trails']['commandToExecute']['framebuffer']=_0x3662d9['framebuffers']['nextTrails'],_0x3662d9['primitives']['trails']['clearCommand']['framebuffer']=_0x3662d9['framebuffers'][_0x3d25f7(0x20e)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x38de90=_0x3972e8;return _0x3662d9[_0x38de90(0x211)][_0x38de90(0x20e)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x9d2f4c=_0x3972e8;return _0x3662d9['framebuffers']['nextTrails'][_0x9d2f4c(0x246)];}},'vertexShaderSource':new Cesium$4[(_0x3972e8(0x206))]({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag=_0xb93ce(0x273),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(_0x28fc1b,_0x55b609,_0xa6b07f,_0x20acba){this['data']=_0x55b609,this['createWindTextures'](_0x28fc1b,_0x55b609),this['createParticlesTextures'](_0x28fc1b,_0xa6b07f,_0x20acba),this['createComputingPrimitives'](_0x55b609,_0xa6b07f,_0x20acba);}['createWindTextures'](_0x26278e,_0x16ac8e){const _0x1bd364=_0xb93ce,_0x1426db={'context':_0x26278e,'width':_0x16ac8e[_0x1bd364(0x282)]['lon'],'height':_0x16ac8e['dimensions']['lat']*(_0x16ac8e[_0x1bd364(0x282)]['lev']||0x1),'pixelFormat':Cesium$3[_0x1bd364(0x232)][_0x1bd364(0x28a)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util[_0x1bd364(0x259)](_0x1426db,_0x16ac8e['U'][_0x1bd364(0x2bd)]),'V':Util['createTexture'](_0x1426db,_0x16ac8e['V']['array'])};}[_0xb93ce(0x2b8)](_0x5ef2eb,_0xf0b3c,_0x29e2bc){const _0x18ffdc=_0xb93ce,_0x1152e7={'context':_0x5ef2eb,'width':_0xf0b3c['particlesTextureSize'],'height':_0xf0b3c[_0x18ffdc(0x245)],'pixelFormat':Cesium$3['PixelFormat']['RGBA'],'pixelDatatype':Cesium$3[_0x18ffdc(0x220)]['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x18ffdc(0x1dd)]})},_0x58ee28=this['randomizeParticles'](_0xf0b3c['maxParticles'],_0x29e2bc),_0x5ad4ce=new Float32Array(0x4*_0xf0b3c['maxParticles'])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x1152e7),'currentParticlesPosition':Util['createTexture'](_0x1152e7,_0x58ee28),'nextParticlesPosition':Util['createTexture'](_0x1152e7,_0x58ee28),'currentParticlesSpeed':Util[_0x18ffdc(0x259)](_0x1152e7,_0x5ad4ce),'nextParticlesSpeed':Util['createTexture'](_0x1152e7,_0x5ad4ce),'postProcessingPosition':Util['createTexture'](_0x1152e7,_0x58ee28),'postProcessingSpeed':Util['createTexture'](_0x1152e7,_0x5ad4ce)};}['randomizeParticles'](_0x1e6c33,_0x5d90eb){const _0x1a86c7=_0xb93ce,_0x5ca397=new Float32Array(0x4*_0x1e6c33);for(let _0x3188a7=0x0;_0x3188a7<_0x1e6c33;_0x3188a7++){_0x5ca397[0x4*_0x3188a7]=Cesium$3['Math']['randomBetween'](_0x5d90eb['lonRange']['x'],_0x5d90eb['lonRange']['y']),_0x5ca397[0x4*_0x3188a7+0x1]=Cesium$3[_0x1a86c7(0x26c)][_0x1a86c7(0x295)](_0x5d90eb[_0x1a86c7(0x1f6)]['x'],_0x5d90eb['latRange']['y']),_0x5ca397[0x4*_0x3188a7+0x2]=Cesium$3['Math'][_0x1a86c7(0x295)](this['data'][_0x1a86c7(0x22f)]['min'],this['data']['lev']['max']),_0x5ca397[0x4*_0x3188a7+0x3]=0x0;}return _0x5ca397;}['destroyParticlesTextures'](){Object['keys'](this['particlesTextures'])['forEach'](_0x5722d3=>{this['particlesTextures'][_0x5722d3]['destroy']();});}['createComputingPrimitives'](_0x360a06,_0x308ba6,_0x4ceb39){const _0x210767=_0xb93ce,_0x1cf59d=new Cesium$3['Cartesian3'](_0x360a06[_0x210767(0x282)]['lon'],_0x360a06['dimensions']['lat'],_0x360a06['dimensions']['lev']),_0x32a69b=new Cesium$3['Cartesian3'](_0x360a06['lon']['min'],_0x360a06['lat'][_0x210767(0x29b)],_0x360a06['lev']['min']),_0x32b286=new Cesium$3['Cartesian3'](_0x360a06['lon']['max'],_0x360a06['lat']['max'],_0x360a06['lev'][_0x210767(0x272)]),_0x5bf9e8=new Cesium$3[(_0x210767(0x27c))]((_0x32b286['x']-_0x32a69b['x'])/(_0x1cf59d['x']-0x1),(_0x32b286['y']-_0x32a69b['y'])/(_0x1cf59d['y']-0x1),_0x1cf59d['z']>0x1?(_0x32b286['z']-_0x32a69b['z'])/(_0x1cf59d['z']-0x1):0x1),_0xb5caf4=new Cesium$3['Cartesian2'](_0x360a06['U'][_0x210767(0x29b)],_0x360a06['U']['max']),_0x17e253=new Cesium$3['Cartesian2'](_0x360a06['V']['min'],_0x360a06['V'][_0x210767(0x272)]),_0x150a9f=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x150a9f['windTextures']['U'];},'V':function(){const _0x424dcb=_0x210767;return _0x150a9f[_0x424dcb(0x1fa)]['V'];},'currentParticlesPosition':function(){return _0x150a9f['particlesTextures']['currentParticlesPosition'];},'dimension':function(){return _0x1cf59d;},'minimum':function(){return _0x32a69b;},'maximum':function(){return _0x32b286;},'interval':function(){return _0x5bf9e8;}},'fragmentShaderSource':new Cesium$3[(_0x210767(0x206))]({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x199b45=_0x210767;_0x150a9f['primitives']['getWind']['commandToExecute']['outputTexture']=_0x150a9f['particlesTextures'][_0x199b45(0x1ec)];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){return _0x150a9f['particlesTextures']['currentParticlesSpeed'];},'particlesWind':function(){const _0x5c3d79=_0x210767;return _0x150a9f['particlesTextures'][_0x5c3d79(0x1ec)];},'uSpeedRange':function(){return _0xb5caf4;},'vSpeedRange':function(){return _0x17e253;},'pixelSize':function(){return _0x4ceb39['pixelSize'];},'speedFactor':function(){return _0x308ba6['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x210767(0x2b7)],'preExecute':function(){const _0x27b124=_0x210767,_0x1e6144=_0x150a9f['particlesTextures']['currentParticlesSpeed'];_0x150a9f['particlesTextures']['currentParticlesSpeed']=_0x150a9f['particlesTextures']['postProcessingSpeed'],_0x150a9f['particlesTextures']['postProcessingSpeed']=_0x1e6144,_0x150a9f['primitives']['updateSpeed']['commandToExecute']['outputTexture']=_0x150a9f['particlesTextures'][_0x27b124(0x2b7)];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x32aae5=_0x210767;return _0x150a9f['particlesTextures'][_0x32aae5(0x2a2)];},'currentParticlesSpeed':function(){return _0x150a9f['particlesTextures']['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updatePosition_frag]}),'outputTexture':this[_0x210767(0x1e9)]['nextParticlesPosition'],'preExecute':function(){const _0x3766b9=_0x210767,_0x5416ea=_0x150a9f['particlesTextures']['currentParticlesPosition'];_0x150a9f['particlesTextures']['currentParticlesPosition']=_0x150a9f['particlesTextures']['postProcessingPosition'],_0x150a9f['particlesTextures']['postProcessingPosition']=_0x5416ea,_0x150a9f['primitives']['updatePosition'][_0x3766b9(0x2a9)]['outputTexture']=_0x150a9f['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){return _0x150a9f['particlesTextures']['nextParticlesPosition'];},'nextParticlesSpeed':function(){const _0x39e679=_0x210767;return _0x150a9f[_0x39e679(0x1e9)][_0x39e679(0x2b7)];},'lonRange':function(){return _0x4ceb39['lonRange'];},'latRange':function(){return _0x4ceb39['latRange'];},'randomCoefficient':function(){const _0x4a3cd1=Math['random']();return _0x4a3cd1;},'dropRate':function(){const _0x5ee65b=_0x210767;return _0x308ba6[_0x5ee65b(0x263)];},'dropRateBump':function(){return _0x308ba6['dropRateBump'];}},'fragmentShaderSource':new Cesium$3[(_0x210767(0x206))]({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){_0x150a9f['primitives']['postProcessingPosition']['commandToExecute']['outputTexture']=_0x150a9f['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'postProcessingPosition':function(){const _0x562ae2=_0x210767;return _0x150a9f['particlesTextures'][_0x562ae2(0x252)];},'nextParticlesSpeed':function(){const _0x3f7f27=_0x210767;return _0x150a9f[_0x3f7f27(0x1e9)]['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x210767(0x1f0)],'preExecute':function(){const _0xa97331=_0x210767;_0x150a9f['primitives'][_0xa97331(0x1f0)]['commandToExecute'][_0xa97331(0x28d)]=_0x150a9f['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace[_0xb93ce(0x219)];function _0x57a3(_0x123f71,_0x30ba99){const _0x354a0f=_0x354a();return _0x57a3=function(_0x57a318,_0x3bb826){_0x57a318=_0x57a318-0x1dc;let _0x2b52f2=_0x354a0f[_0x57a318];return _0x2b52f2;},_0x57a3(_0x123f71,_0x30ba99);}class ParticleSystem{constructor(_0xffb8ad,_0x21c7f5,_0x24306e,_0x3160f4){const _0x376d0b=_0xb93ce;this[_0x376d0b(0x257)]=_0xffb8ad,_0x21c7f5={..._0x21c7f5},_0x21c7f5['udata']&&_0x21c7f5['vdata']&&(_0x21c7f5['dimensions']={},_0x21c7f5[_0x376d0b(0x282)]['lon']=_0x21c7f5['cols'],_0x21c7f5['dimensions']['lat']=_0x21c7f5['rows'],_0x21c7f5['dimensions']['lev']=_0x21c7f5['lev']||0x1,_0x21c7f5[_0x376d0b(0x2b9)]={},_0x21c7f5['lon']['min']=_0x21c7f5['xmin'],_0x21c7f5['lon'][_0x376d0b(0x272)]=_0x21c7f5[_0x376d0b(0x22d)],_0x21c7f5['lat']={},_0x21c7f5['lat']['min']=_0x21c7f5['ymin'],_0x21c7f5['lat']['max']=_0x21c7f5['ymax'],_0x21c7f5['lev']={},_0x21c7f5['lev']['min']=_0x21c7f5['levmin']??0x1,_0x21c7f5[_0x376d0b(0x22f)]['max']=_0x21c7f5['levmax']??0x1,_0x21c7f5['U']={},_0x21c7f5['U'][_0x376d0b(0x2bd)]=new Float32Array(_0x21c7f5['udata']),_0x21c7f5['U'][_0x376d0b(0x29b)]=_0x21c7f5[_0x376d0b(0x21f)]??Math[_0x376d0b(0x29b)](..._0x21c7f5['udata']),_0x21c7f5['U'][_0x376d0b(0x272)]=_0x21c7f5[_0x376d0b(0x296)]??Math[_0x376d0b(0x272)](..._0x21c7f5['udata']),_0x21c7f5['V']={},_0x21c7f5['V']['array']=new Float32Array(_0x21c7f5['vdata']),_0x21c7f5['V'][_0x376d0b(0x29b)]=_0x21c7f5['vmin']??Math['min'](..._0x21c7f5['vdata']),_0x21c7f5['V']['max']=_0x21c7f5['vmax']??Math['max'](..._0x21c7f5[_0x376d0b(0x2b0)])),this[_0x376d0b(0x26e)]=_0x21c7f5,this['options']=_0x24306e,this[_0x376d0b(0x29a)]=_0x3160f4,this[_0x376d0b(0x2c1)]=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0x376d0b(0x29a)]),this['particlesRendering']=new ParticlesRendering(this[_0x376d0b(0x257)],this[_0x376d0b(0x26e)],this['options'],this['viewerParameters'],this['particlesComputing']);}['canvasResize'](_0x46d1e2){const _0x4a3a01=_0xb93ce;this['particlesComputing'][_0x4a3a01(0x208)](),Object[_0x4a3a01(0x24c)](this['particlesComputing'][_0x4a3a01(0x1fa)])[_0x4a3a01(0x2a0)](_0x5260ee=>{const _0xf8df5a=_0x4a3a01;this['particlesComputing']['windTextures'][_0x5260ee][_0xf8df5a(0x244)]();}),this['particlesRendering']['textures']['colorTable']['destroy'](),Object['keys'](this['particlesRendering'][_0x4a3a01(0x211)])[_0x4a3a01(0x2a0)](_0x5f47b4=>{this['particlesRendering']['framebuffers'][_0x5f47b4]['destroy']();}),this[_0x4a3a01(0x257)]=_0x46d1e2,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this[_0x4a3a01(0x2b3)],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x4a3a01(0x2c1)]);}['clearFramebuffers'](){const _0x32b3ce=_0xb93ce,_0xbaeae7=new Cesium$2['ClearCommand']({'color':new Cesium$2[(_0x32b3ce(0x1ed))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this['particlesRendering'][_0x32b3ce(0x211)])['forEach'](_0x722fb2=>{const _0x1340e2=_0x32b3ce;_0xbaeae7['framebuffer']=this['particlesRendering']['framebuffers'][_0x722fb2],_0xbaeae7['execute'](this[_0x1340e2(0x257)]);});}['refreshParticles'](_0x44d2f5){const _0x4d3700=_0xb93ce;this[_0x4d3700(0x25e)](),this[_0x4d3700(0x2c1)]['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this[_0x4d3700(0x257)],this['options'],this['viewerParameters']);if(_0x44d2f5){const _0x3314a7=this['particlesRendering']['createSegmentsGeometry'](this[_0x4d3700(0x2b3)]);this['particlesRendering'][_0x4d3700(0x21e)][_0x4d3700(0x224)]['geometry']=_0x3314a7;const _0x4a8484=Cesium$2[_0x4d3700(0x1fd)]['fromGeometry']({'context':this['context'],'geometry':_0x3314a7,'attributeLocations':this['particlesRendering']['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2[_0x4d3700(0x213)]['STATIC_DRAW']});this['particlesRendering']['primitives']['segments']['commandToExecute'][_0x4d3700(0x1f2)]=_0x4a8484;}}[_0xb93ce(0x2be)](_0x7f34b5){const _0x384911=_0xb93ce;let _0x3fc820=![];this['options']['maxParticles']!==_0x7f34b5['maxParticles']&&(_0x3fc820=!![]),Object[_0x384911(0x24c)](_0x7f34b5)['forEach'](_0x1d9890=>{const _0x43fe43=_0x384911;this[_0x43fe43(0x2b3)][_0x1d9890]=_0x7f34b5[_0x1d9890];}),this[_0x384911(0x22e)](_0x3fc820);}[_0xb93ce(0x267)](_0x25dfd2){const _0x5d33a5=_0xb93ce;Object[_0x5d33a5(0x24c)](_0x25dfd2)['forEach'](_0x56e274=>{this['viewerParameters'][_0x56e274]=_0x25dfd2[_0x56e274];}),this[_0x5d33a5(0x22e)](![]);}[_0xb93ce(0x244)](){const _0xcb331e=_0xb93ce;clearTimeout(this['canrefresh']),this['particlesComputing'][_0xcb331e(0x208)](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0xeb7cc5=>{this['particlesComputing']['windTextures'][_0xeb7cc5]['destroy']();}),this['particlesRendering'][_0xcb331e(0x24b)][_0xcb331e(0x210)]['destroy'](),Object[_0xcb331e(0x24c)](this['particlesRendering'][_0xcb331e(0x211)])['forEach'](_0x5b9db5=>{const _0x5e251c=_0xcb331e;this[_0x5e251c(0x26f)]['framebuffers'][_0x5b9db5]['destroy']();});for(const _0x16a771 in this){delete this[_0x16a771];}}}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(_0x537968={}){_0x537968={...DEF_OPTIONS,..._0x537968},super(_0x537968),this['_setOptionsHook'](_0x537968);}get['layer'](){return this['primitives'];}get['data'](){const _0x21a7f2=_0xb93ce;return this[_0x21a7f2(0x1f1)];}set['data'](_0x45316d){this['setData'](_0x45316d);}get[_0xb93ce(0x227)](){return this['options']['colors'];}set['colors'](_0x56dea6){this['options']['colors']=_0x56dea6,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0x56dea6}),this['resize']();}[_0xb93ce(0x1de)](){}['_addedHook'](){const _0x37c47d=_0xb93ce;this[_0x37c47d(0x1e1)]=this[_0x37c47d(0x222)]['scene'],this['camera']=this['_map'][_0x37c47d(0x2af)],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene'][_0x37c47d(0x21e)][_0x37c47d(0x22b)](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3'][_0x37c47d(0x25b)],0.99*0x615299),this['updateViewerParameters'](),window[_0x37c47d(0x22c)]('resize',this['resize']['bind'](this),![]),this[_0x37c47d(0x1fc)]=![],this['mouse_move']=![],this[_0x37c47d(0x222)]['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x37c47d(0x231)][_0x37c47d(0x290)],this['_onMouseUpEvent'],this),this[_0x37c47d(0x222)]['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_data']&&this['setData'](this['_data']);}['_removedHook'](){const _0x293618=_0xb93ce;window['removeEventListener']('resize',this[_0x293618(0x2c2)]),this[_0x293618(0x222)]['off'](mars3d__namespace['EventType'][_0x293618(0x214)],this['_onMap_preRenderEvent'],this),this[_0x293618(0x222)][_0x293618(0x230)](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x293618(0x222)]['off'](mars3d__namespace['EventType']['mouseDown'],this[_0x293618(0x29e)],this),this[_0x293618(0x222)][_0x293618(0x230)](mars3d__namespace['EventType']['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives']['removeAll'](),this[_0x293618(0x222)]['scene']['primitives'][_0x293618(0x2b6)](this[_0x293618(0x21e)]);}['resize'](){const _0x5ecff7=_0xb93ce;if(!this['show']||!this['particleSystem'])return;this[_0x5ecff7(0x21e)][_0x5ecff7(0x2a1)]=![],this[_0x5ecff7(0x21e)][_0x5ecff7(0x284)](),this['_map'][_0x5ecff7(0x268)](mars3d__namespace['EventType']['preRender'],this[_0x5ecff7(0x2c0)],this);}['_onMap_preRenderEvent'](_0x307ef4){const _0x12aaae=_0xb93ce;this['particleSystem'][_0x12aaae(0x28c)](this['scene']['context']),this['addPrimitives'](),this['primitives']['show']=!![];}[_0xb93ce(0x200)](_0xc92d8d){const _0xcc8781=_0xb93ce;clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this[_0xcc8781(0x21e)]['show']=![],this[_0xcc8781(0x281)]=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}[_0xb93ce(0x29e)](_0x5b70a6){this['mouse_down']=!![];}['_onMouseMoveEvent'](_0x1e5912){const _0x44a60a=_0xb93ce;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&(this[_0x44a60a(0x21e)]['show']=![],this[_0x44a60a(0x247)]=!![]);}['_onMouseUpEvent'](_0x444c65){const _0x27c753=_0xb93ce;if(!this['show']||!this[_0x27c753(0x2a3)])return;this['mouse_down']&&this[_0x27c753(0x247)]&&this['redraw'](),this['primitives']['show']=!![],this['mouse_down']=![],this['mouse_move']=![];}[_0xb93ce(0x20a)](){const _0x4a57b7=_0xb93ce;if(!this['_map']||!this['show'])return;this[_0x4a57b7(0x1ea)](),this['particleSystem'][_0x4a57b7(0x267)](this['viewerParameters']),this['primitives']['show']=!![];}['setData'](_0x59a22c){const _0xe1f11b=_0xb93ce;this['_data']=_0x59a22c,this['particleSystem']&&this['particleSystem'][_0xe1f11b(0x244)](),this[_0xe1f11b(0x2a3)]=new ParticleSystem(this['scene']['context'],_0x59a22c,this['getOptions'](),this[_0xe1f11b(0x29a)]),this['addPrimitives']();}[_0xb93ce(0x25f)](_0x5b847a,_0x5bf910){const _0x38e147=_0xb93ce;if(_0x5b847a)for(const _0x2a230b in _0x5b847a){this[_0x2a230b]=_0x5b847a[_0x2a230b];}this['particleSystem']&&this['particleSystem']['setOptions'](this[_0x38e147(0x216)]());}['getOptions'](){const _0x10281a=_0xb93ce,_0x4da112=Math['ceil'](Math[_0x10281a(0x255)](this['particlesNumber']));return this['particlesNumber']=_0x4da112*_0x4da112,{'particlesTextureSize':_0x4da112,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this[_0x10281a(0x264)],'dropRate':this['dropRate'],'dropRateBump':this[_0x10281a(0x276)],'speedFactor':this['speedFactor'],'lineWidth':this['lineWidth'],'colors':this[_0x10281a(0x227)]};}['addPrimitives'](){const _0x18cf76=_0xb93ce;this['primitives']['add'](this[_0x18cf76(0x2a3)][_0x18cf76(0x2c1)]['primitives']['getWind']),this[_0x18cf76(0x21e)]['add'](this['particleSystem']['particlesComputing'][_0x18cf76(0x21e)][_0x18cf76(0x1ef)]),this['primitives'][_0x18cf76(0x22b)](this['particleSystem']['particlesComputing']['primitives'][_0x18cf76(0x1e5)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingPosition']),this['primitives'][_0x18cf76(0x22b)](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives']['segments']),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives'][_0x18cf76(0x2b2)]),this['primitives']['add'](this['particleSystem']['particlesRendering']['primitives'][_0x18cf76(0x261)]);}['updateViewerParameters'](){const _0x3f09a4=_0xb93ce;let _0x2333ee=this[_0x3f09a4(0x2af)][_0x3f09a4(0x202)](this['scene']['globe']['ellipsoid']);if(!_0x2333ee){const _0x4c8ee8=this['_map']['getExtent']();_0x2333ee=Cesium$1['Rectangle']['fromDegrees'](_0x4c8ee8[_0x3f09a4(0x23c)],_0x4c8ee8[_0x3f09a4(0x21a)],_0x4c8ee8['xmax'],_0x4c8ee8[_0x3f09a4(0x223)]);}const _0x2843c7=Util['viewRectangleToLonLatRange'](_0x2333ee);this[_0x3f09a4(0x29a)]['lonRange']['x']=_0x2843c7['lon']['min'],this[_0x3f09a4(0x29a)]['lonRange']['y']=_0x2843c7[_0x3f09a4(0x2b9)]['max'],this['viewerParameters']['latRange']['x']=_0x2843c7['lat'][_0x3f09a4(0x29b)],this['viewerParameters']['latRange']['y']=_0x2843c7['lat'][_0x3f09a4(0x272)];const _0x1e6344=this[_0x3f09a4(0x2af)]['getPixelSize'](this['globeBoundingSphere'],this['scene']['drawingBufferWidth'],this['scene']['drawingBufferHeight']);_0x1e6344>0x0&&(this['viewerParameters']['pixelSize']=_0x1e6344);}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace[_0xb93ce(0x27d)]['WindLayer']=WindLayer;class CanvasParticle{constructor(){this['lng']=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null;}[_0xb93ce(0x244)](){for(const _0x4df18e in this){delete this[_0x4df18e];}}}class CanvasWindField{constructor(_0x5b0837){this['setOptions'](_0x5b0837);}get[_0xb93ce(0x286)](){const _0x247c39=_0xb93ce;return this[_0x247c39(0x1eb)];}set['speedRate'](_0x39ad03){const _0x359939=_0xb93ce;this['_speedRate']=(0x64-(_0x39ad03>0x63?0x63:_0x39ad03))*0x64,this['_calc_speedRate']=[(this['xmax']-this[_0x359939(0x23c)])/this['_speedRate'],(this['ymax']-this[_0x359939(0x21a)])/this['_speedRate']];}get[_0xb93ce(0x265)](){return this['_maxAge'];}set['maxAge'](_0x3fc2b5){const _0x57413e=_0xb93ce;this[_0x57413e(0x2a6)]=_0x3fc2b5;}['setOptions'](_0x4ea6da){const _0x17e9b8=_0xb93ce;this[_0x17e9b8(0x2b3)]=_0x4ea6da,this[_0x17e9b8(0x265)]=_0x4ea6da['maxAge']||0x78,this['speedRate']=_0x4ea6da['speedRate']||0x32,this[_0x17e9b8(0x23a)]=[];const _0x2021d0=_0x4ea6da[_0x17e9b8(0x285)]||0x1000;for(let _0x3a3180=0x0;_0x3a3180<_0x2021d0;_0x3a3180++){const _0x4e9342=this[_0x17e9b8(0x1e0)](new CanvasParticle());this[_0x17e9b8(0x23a)]['push'](_0x4e9342);}}[_0xb93ce(0x1f3)](_0x96537a){const _0xbc9d69=_0xb93ce;this['rows']=_0x96537a['rows'],this['cols']=_0x96537a[_0xbc9d69(0x28b)],this['xmin']=_0x96537a['xmin'],this[_0xbc9d69(0x22d)]=_0x96537a['xmax'],this['ymin']=_0x96537a['ymin'],this[_0xbc9d69(0x223)]=_0x96537a['ymax'],this['grid']=[];const _0x530d5d=_0x96537a['udata'],_0x184a15=_0x96537a['vdata'];let _0x1d3a36=![];_0x530d5d['length']===this[_0xbc9d69(0x217)]&&_0x530d5d[0x0]['length']===this[_0xbc9d69(0x28b)]&&(_0x1d3a36=!![]);let _0x593a2e=0x0,_0x1cd2c1=null,_0x4e08e3=null;for(let _0x928688=0x0;_0x928688<this['rows'];_0x928688++){_0x1cd2c1=[];for(let _0x124f18=0x0;_0x124f18<this[_0xbc9d69(0x28b)];_0x124f18++,_0x593a2e++){_0x1d3a36?_0x4e08e3=this['_calcUV'](_0x530d5d[_0x928688][_0x124f18],_0x184a15[_0x928688][_0x124f18]):_0x4e08e3=this['_calcUV'](_0x530d5d[_0x593a2e],_0x184a15[_0x593a2e]),_0x1cd2c1[_0xbc9d69(0x251)](_0x4e08e3);}this['grid']['push'](_0x1cd2c1);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x59b0b3=_0xb93ce;delete this[_0x59b0b3(0x217)],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this[_0x59b0b3(0x23a)];}[_0xb93ce(0x241)](_0x15c966,_0x4abada){const _0x82298a=_0xb93ce,_0x233f64=(_0x15c966-this[_0x82298a(0x23c)])/(this['xmax']-this[_0x82298a(0x23c)])*(this['cols']-0x1),_0x3b0854=(this['ymax']-_0x4abada)/(this[_0x82298a(0x223)]-this['ymin'])*(this['rows']-0x1);return[_0x233f64,_0x3b0854];}[_0xb93ce(0x258)](_0x359d2b,_0x481f61){const _0x50e62f=_0xb93ce;if(_0x359d2b<0x0||_0x359d2b>=this['cols']||_0x481f61>=this[_0x50e62f(0x217)])return[0x0,0x0,0x0];const _0x546f1c=Math['floor'](_0x359d2b),_0x16076d=Math['floor'](_0x481f61);if(_0x546f1c===_0x359d2b&&_0x16076d===_0x481f61)return this[_0x50e62f(0x27b)][_0x481f61][_0x359d2b];const _0x32191d=_0x546f1c+0x1,_0x5c401c=_0x16076d+0x1,_0x31158c=this['getUVByXY'](_0x546f1c,_0x16076d),_0x7e5999=this[_0x50e62f(0x258)](_0x32191d,_0x16076d),_0x49541a=this[_0x50e62f(0x258)](_0x546f1c,_0x5c401c),_0x207312=this[_0x50e62f(0x258)](_0x32191d,_0x5c401c);let _0x4aafd8=null;try{_0x4aafd8=this['_bilinearInterpolation'](_0x359d2b-_0x546f1c,_0x481f61-_0x16076d,_0x31158c,_0x7e5999,_0x49541a,_0x207312);}catch(_0x23fc52){console[_0x50e62f(0x278)](_0x359d2b,_0x481f61);}return _0x4aafd8;}['_bilinearInterpolation'](_0x2d8829,_0x5616d2,_0x4a36b2,_0x4eac8e,_0x4eb3aa,_0x76b2ef){const _0x2dde72=0x1-_0x2d8829,_0x3e499c=0x1-_0x5616d2,_0x52778e=_0x2dde72*_0x3e499c,_0x183fa9=_0x2d8829*_0x3e499c,_0x37dc80=_0x2dde72*_0x5616d2,_0x762942=_0x2d8829*_0x5616d2,_0x29a7b8=_0x4a36b2[0x0]*_0x52778e+_0x4eac8e[0x0]*_0x183fa9+_0x4eb3aa[0x0]*_0x37dc80+_0x76b2ef[0x0]*_0x762942,_0x11eb92=_0x4a36b2[0x1]*_0x52778e+_0x4eac8e[0x1]*_0x183fa9+_0x4eb3aa[0x1]*_0x37dc80+_0x76b2ef[0x1]*_0x762942;return this['_calcUV'](_0x29a7b8,_0x11eb92);}['_calcUV'](_0x5c3aa3,_0x106ec8){const _0x1cc28e=_0xb93ce;return[+_0x5c3aa3,+_0x106ec8,Math[_0x1cc28e(0x255)](_0x5c3aa3*_0x5c3aa3+_0x106ec8*_0x106ec8)];}['getUVByPoint'](_0x1fdfc0,_0x2c9e11){const _0x1ca0b2=_0xb93ce;if(!this['isInExtent'](_0x1fdfc0,_0x2c9e11))return null;const _0x3d4ac1=this[_0x1ca0b2(0x241)](_0x1fdfc0,_0x2c9e11),_0xe5ce56=this['getUVByXY'](_0x3d4ac1[0x0],_0x3d4ac1[0x1]);return _0xe5ce56;}[_0xb93ce(0x28f)](_0xea4576,_0x281733){const _0x2c945a=_0xb93ce;return _0xea4576>=this[_0x2c945a(0x23c)]&&_0xea4576<=this[_0x2c945a(0x22d)]&&_0x281733>=this['ymin']&&_0x281733<=this['ymax']?!![]:![];}[_0xb93ce(0x283)](){const _0x235846=fRandomByfloat(this['xmin'],this['xmax']),_0x2620a9=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x2620a9,'lng':_0x235846};}['getParticles'](){const _0x23c024=_0xb93ce;let _0x54c524,_0x402b94,_0x46fd34;for(let _0xcf80a6=0x0,_0xf6a07f=this[_0x23c024(0x23a)][_0x23c024(0x254)];_0xcf80a6<_0xf6a07f;_0xcf80a6++){let _0x5af26f=this['particles'][_0xcf80a6];_0x5af26f['age']<=0x0&&(_0x5af26f=this['_randomParticle'](_0x5af26f));if(_0x5af26f['age']>0x0){const _0xc3dc09=_0x5af26f['tlng'],_0x402685=_0x5af26f['tlat'];_0x46fd34=this['getUVByPoint'](_0xc3dc09,_0x402685),_0x46fd34?(_0x54c524=_0xc3dc09+this['_calc_speedRate'][0x0]*_0x46fd34[0x0],_0x402b94=_0x402685+this[_0x23c024(0x1dc)][0x1]*_0x46fd34[0x1],_0x5af26f[_0x23c024(0x275)]=_0xc3dc09,_0x5af26f['lat']=_0x402685,_0x5af26f['tlng']=_0x54c524,_0x5af26f['tlat']=_0x402b94,_0x5af26f[_0x23c024(0x243)]--):_0x5af26f['age']=0x0;}}return this['particles'];}[_0xb93ce(0x1e0)](_0x52716d){const _0x221292=_0xb93ce;let _0x3ea6ce,_0x3668f9;for(let _0x17041b=0x0;_0x17041b<0x1e;_0x17041b++){_0x3ea6ce=this[_0x221292(0x283)](),_0x3668f9=this[_0x221292(0x229)](_0x3ea6ce['lng'],_0x3ea6ce[_0x221292(0x270)]);if(_0x3668f9&&_0x3668f9[0x2]>0x0)break;}if(!_0x3668f9)return _0x52716d;const _0xce19c5=_0x3ea6ce[_0x221292(0x275)]+this['_calc_speedRate'][0x0]*_0x3668f9[0x0],_0x4c2adf=_0x3ea6ce['lat']+this['_calc_speedRate'][0x1]*_0x3668f9[0x1];return _0x52716d['lng']=_0x3ea6ce['lng'],_0x52716d[_0x221292(0x270)]=_0x3ea6ce['lat'],_0x52716d['tlng']=_0xce19c5,_0x52716d['tlat']=_0x4c2adf,_0x52716d['age']=Math[_0x221292(0x21b)](Math['random']()*this['maxAge']),_0x52716d;}['destroy'](){for(const _0x2cf761 in this){delete this[_0x2cf761];}}}function _0x354a(){const _0x1b9c23=['globalAlpha','pixelSize','push','postProcessingPosition','pow','length','sqrt','30563951gCSTQt','context','getUVByXY','createTexture','container','ZERO','abs','sin','clearFramebuffers','_setOptionsHook','17403669DceTaP','screen','bindEvent','dropRate','fadeOpacity','maxAge','pointerEvents','applyViewerParameters','once','get','15506sVvzYh','mouseHidden','Math','PrimitiveType','data','particlesRendering','lat','Geometry','max','//\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','defineProperty','lng','dropRateBump','clear','log','134hzwqfL','position','grid','Cartesian3','layer','clampToLatitudeRange','rawRenderState','GeometryAttribute','refreshTimer','dimensions','getRandomLatLng','removeAll','particlesNumber','speedRate','DEPTH_COMPONENT','vertexShaderSource','CanvasWindLayer','LUMINANCE','cols','canvasResize','outputTexture','#ffffff','isInExtent','mouseUp','_createCanvas','unbindEvent','mode','worker','randomBetween','umax','CanvasWindField','geometry','uniformMap','viewerParameters','min','canvasContext','OPAQUE','_onMouseDownEvent','6uJmigj','forEach','show','currentParticlesPosition','particleSystem','BaseLayer','fromGeometry','_maxAge','canvasWidth','IDENTITY','commandToExecute','nextTrailsColor','_onMouseUpEvent','height','PI_OVER_THREE','commandType','camera','vdata','init','trails','options','none','_showHook','remove','nextParticlesSpeed','createParticlesTextures','lon','style','atan2','ClearCommand','array','setOptions','now','_onMap_preRenderEvent','particlesComputing','resize','FLOAT','west','_calc_speedRate','NEAREST','_mountedHook','commandList','_randomParticle','scene','windField','isDestroyed','preExecute','updatePosition','_drawLines','destination-in','frameTime','particlesTextures','updateViewerParameters','_speedRate','particlesWind','Color','THREE_PI_OVER_TWO','updateSpeed','postProcessingSpeed','_data','vertexArray','setDate','all','animateFrame','latRange','visibility','TRIANGLES','nextTrailsDepth','windTextures','segmentsColor','mouse_down','VertexArray','ALWAYS','clearCommand','_onMapWhellEvent','mod','computeViewRectangle','visible','getColorTexture','width','ShaderSource','reverseY','destroyParticlesTextures','1239mSRaQe','redraw','GeometryAttributes','pointer-events','toDegrees','nextTrails','SceneMode','colorTable','framebuffers','Draw','BufferUsage','preRender','color','getOptions','rows','_onMouseMoveEvent','Cesium','ymin','round','TWO_PI','clientWidth','primitives','umin','PixelDatatype','EllipsoidalOccluder','_map','ymax','segments','createRenderingFramebuffers','bind','colors','STATIC_DRAW','getUVByPoint','wheel','add','addEventListener','xmax','refreshParticles','lev','off','EventType','PixelFormat','createCommand','fragmentShaderSource','clientHeight','SCENE3D','shaderProgram','initWorker','create','particles','3489941dBUiYS','xmin','mouseMove','LINEAR','3108145Ecktao','8452WyNvlx','toGridXY','windData','age','destroy','particlesTextureSize','depthTexture','mouse_move','PI_OVER_TWO','canvas','8QalAjF','textures','keys','attributeLocations','18633520sDVzcQ'];_0x354a=function(){return _0x1b9c23;};return _0x354a();}function fRandomByfloat(_0x4a902c,_0x5a79ce){return _0x4a902c+Math['random']()*(_0x5a79ce-_0x4a902c);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0xb93ce(0x2a4)];class CanvasWindLayer extends BaseLayer{constructor(_0x4f996b={}){const _0x2ab08c=_0xb93ce;super(_0x4f996b),this[_0x2ab08c(0x25f)](_0x4f996b),this['canvas']=null;}['_setOptionsHook'](_0x493ee9,_0x24fc69){const _0x4726f0=_0xb93ce;this['frameTime']=0x3e8/(_0x493ee9['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x493ee9[_0x4726f0(0x215)]||_0x4726f0(0x28e),this['lineWidth']=_0x493ee9['lineWidth']||0x1,this['fixedHeight']=_0x493ee9['fixedHeight']??0x0,this[_0x4726f0(0x207)]=_0x493ee9[_0x4726f0(0x207)]??![],this['windField']&&this['windField']['setOptions'](_0x493ee9);}get['layer'](){return this['canvas'];}get['canvasWidth'](){const _0x175082=_0xb93ce;return this['_map']['scene'][_0x175082(0x249)]['clientWidth'];}get['canvasHeight'](){return this['_map']['scene']['canvas']['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0xb93ce(0x266)](_0x2223ec){const _0x3fd622=_0xb93ce;this['_pointerEvents']=_0x2223ec;if(!this['canvas'])return;_0x2223ec?this['canvas']['style'][_0x3fd622(0x20c)]=_0x3fd622(0x1f4):this['canvas']['style']['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set[_0xb93ce(0x285)](_0x251018){const _0x518fcd=_0xb93ce;this[_0x518fcd(0x2b3)]['particlesNumber']=_0x251018,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0x32ab52=_0xb93ce;return this[_0x32ab52(0x2b3)]['speedRate'];}set['speedRate'](_0x3fb2f9){const _0x55e907=_0xb93ce;this[_0x55e907(0x2b3)][_0x55e907(0x286)]=_0x3fb2f9,this['windField']&&(this['windField']['speedRate']=_0x3fb2f9);}get[_0xb93ce(0x265)](){const _0x578a67=_0xb93ce;return this['options'][_0x578a67(0x265)];}set['maxAge'](_0x91d3d0){const _0x1f3126=_0xb93ce;this['options'][_0x1f3126(0x265)]=_0x91d3d0,this['windField']&&(this['windField'][_0x1f3126(0x265)]=_0x91d3d0);}get['data'](){return this['windData'];}set['data'](_0x398f54){this['setData'](_0x398f54);}[_0xb93ce(0x2b5)](_0x3ca4d2){const _0x372c71=_0xb93ce;_0x3ca4d2?this['_addedHook']():(this[_0x372c71(0x242)]&&(this['options']['data']=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x24a44c=_0xb93ce;this[_0x24a44c(0x2b3)]['worker']?this['initWorker']():this['windField']=new CanvasWindField(this[_0x24a44c(0x2b3)]);}['_addedHook'](){const _0x64b37c=_0xb93ce;this['canvas']=this[_0x64b37c(0x291)](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this[_0x64b37c(0x262)](),this['options'][_0x64b37c(0x26e)]&&this['setData'](this['options'][_0x64b37c(0x26e)]);}['_removedHook'](){const _0x57f488=_0xb93ce;this['clear'](),this[_0x57f488(0x292)](),this['canvas']&&(this['_map']['container']['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x4b3b04=_0xb93ce,_0x5bc367=mars3d__namespace['DomUtil'][_0x4b3b04(0x239)]('canvas','mars3d-canvasWind',this['_map'][_0x4b3b04(0x25a)]);return _0x5bc367[_0x4b3b04(0x2ba)][_0x4b3b04(0x27a)]='absolute',_0x5bc367[_0x4b3b04(0x2ba)]['top']='0px',_0x5bc367['style']['left']='0px',_0x5bc367['style']['width']=this['_map']['scene']['canvas']['clientWidth']+'px',_0x5bc367[_0x4b3b04(0x2ba)]['height']=this['_map'][_0x4b3b04(0x1e1)]['canvas'][_0x4b3b04(0x235)]+'px',_0x5bc367[_0x4b3b04(0x2ba)]['pointerEvents']=this['_pointerEvents']?'auto':_0x4b3b04(0x2b4),_0x5bc367[_0x4b3b04(0x2ba)]['zIndex']=this[_0x4b3b04(0x2b3)]['zIndex']??0x9,_0x5bc367['width']=this['_map'][_0x4b3b04(0x1e1)][_0x4b3b04(0x249)]['clientWidth'],_0x5bc367['height']=this['_map']['scene'][_0x4b3b04(0x249)]['clientHeight'],_0x5bc367;}['resize'](){const _0x43c0f4=_0xb93ce;this['canvas']&&(this['canvas']['style']['width']=this['_map'][_0x43c0f4(0x1e1)]['canvas'][_0x43c0f4(0x21d)]+'px',this['canvas']['style'][_0x43c0f4(0x2ac)]=this['_map']['scene']['canvas'][_0x43c0f4(0x235)]+'px',this[_0x43c0f4(0x249)][_0x43c0f4(0x205)]=this['_map']['scene']['canvas'][_0x43c0f4(0x21d)],this[_0x43c0f4(0x249)]['height']=this['_map'][_0x43c0f4(0x1e1)][_0x43c0f4(0x249)][_0x43c0f4(0x235)]);}['bindEvent'](){const _0x31be5f=_0xb93ce,_0x160d81=this;let _0x2b5a6c=Date[_0x31be5f(0x2bf)]();(function _0x2c1353(){const _0x506122=_0x31be5f;_0x160d81[_0x506122(0x1f5)]=window['requestAnimationFrame'](_0x2c1353);if(_0x160d81['show']&&_0x160d81['windField']){const _0x583298=Date['now'](),_0x4fee85=_0x583298-_0x2b5a6c;_0x4fee85>_0x160d81[_0x506122(0x1e8)]&&(_0x2b5a6c=_0x583298-_0x4fee85%_0x160d81['frameTime'],_0x160d81['update']());}}(),window['addEventListener'](_0x31be5f(0x2c2),this['resize'][_0x31be5f(0x226)](this),![]),this['mouse_down']=![],this[_0x31be5f(0x247)]=![],this[_0x31be5f(0x2b3)]['mouseHidden']&&(this['_map']['on'](mars3d__namespace[_0x31be5f(0x231)]['wheel'],this[_0x31be5f(0x200)],this),this['_map']['on'](mars3d__namespace[_0x31be5f(0x231)]['mouseDown'],this['_onMouseDownEvent'],this),this[_0x31be5f(0x222)]['on'](mars3d__namespace[_0x31be5f(0x231)]['mouseUp'],this[_0x31be5f(0x2ab)],this)));}['unbindEvent'](){const _0x1a018d=_0xb93ce;window['cancelAnimationFrame'](this['animateFrame']),delete this[_0x1a018d(0x1f5)],window['removeEventListener'](_0x1a018d(0x2c2),this[_0x1a018d(0x2c2)]),this['options'][_0x1a018d(0x26b)]&&(this['_map']['off'](mars3d__namespace['EventType'][_0x1a018d(0x22a)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this[_0x1a018d(0x29e)],this),this['_map']['off'](mars3d__namespace['EventType'][_0x1a018d(0x290)],this['_onMouseUpEvent'],this),this['_map'][_0x1a018d(0x230)](mars3d__namespace['EventType'][_0x1a018d(0x23d)],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x346fc3){const _0x58f8c2=_0xb93ce;clearTimeout(this[_0x58f8c2(0x281)]);if(!this[_0x58f8c2(0x2a1)]||!this['canvas'])return;this['canvas']['style'][_0x58f8c2(0x1f7)]='hidden',this['refreshTimer']=setTimeout(()=>{const _0x3f092c=_0x58f8c2;if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']=_0x3f092c(0x203);},0xc8);}['_onMouseDownEvent'](_0xe3ffbc){const _0x47ec3a=_0xb93ce;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace[_0x47ec3a(0x231)]['mouseMove'],this[_0x47ec3a(0x218)],this),this['_map']['on'](mars3d__namespace[_0x47ec3a(0x231)]['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x4d9955){const _0x1acf13=_0xb93ce;if(!this['show']||!this[_0x1acf13(0x249)])return;this['mouse_down']&&(this['canvas'][_0x1acf13(0x2ba)]['visibility']='hidden',this['mouse_move']=!![]);}[_0xb93ce(0x2ab)](_0x5230b2){const _0x4fd1f0=_0xb93ce;if(!this['show']||!this['canvas'])return;this['_map'][_0x4fd1f0(0x230)](mars3d__namespace['EventType'][_0x4fd1f0(0x23d)],this[_0x4fd1f0(0x218)],this),this['mouse_down']&&this[_0x4fd1f0(0x247)]&&this['redraw'](),this['canvas']['style']['visibility']='visible',this[_0x4fd1f0(0x1fc)]=![],this['mouse_move']=![];}['setData'](_0x5c9462){const _0x3faf4a=_0xb93ce;this[_0x3faf4a(0x277)](),this['windData']=_0x5c9462,this['windField']['setDate'](_0x5c9462),this['redraw']();}['redraw'](){const _0x415c48=_0xb93ce;if(!this['show'])return;this[_0x415c48(0x1e2)]['setOptions'](this[_0x415c48(0x2b3)]),this['update']();}['update'](){const _0x3b66eb=_0xb93ce;if(this['_updateIng'])return;this['_updateIng']=!![];if(this['worker'])this['windField']['update']();else{const _0x1986f1=this['windField']['getParticles']();this[_0x3b66eb(0x1e6)](_0x1986f1);}this['_updateIng']=![];}['_drawLines'](_0x429a70){const _0x1c9fbf=_0xb93ce;this['canvasContext']['globalCompositeOperation']=_0x1c9fbf(0x1e7),this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext'][_0x1c9fbf(0x24f)]=0.9,this[_0x1c9fbf(0x29c)]['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this[_0x1c9fbf(0x215)];const _0x535336=this[_0x1c9fbf(0x222)]['scene'][_0x1c9fbf(0x293)]!==Cesium[_0x1c9fbf(0x20f)][_0x1c9fbf(0x236)],_0x47e018=this[_0x1c9fbf(0x2a7)]*0.25;for(let _0x26635b=0x0,_0x3b38d3=_0x429a70['length'];_0x26635b<_0x3b38d3;_0x26635b++){const _0x33974b=_0x429a70[_0x26635b],_0x1b41d8=this['_tomap'](_0x33974b['lng'],_0x33974b[_0x1c9fbf(0x270)],_0x33974b),_0x41e19=this['_tomap'](_0x33974b['tlng'],_0x33974b['tlat'],_0x33974b);if(!_0x1b41d8||!_0x41e19)continue;if(_0x535336&&Math[_0x1c9fbf(0x25c)](_0x1b41d8[0x0]-_0x41e19[0x0])>=_0x47e018)continue;this['canvasContext']['moveTo'](_0x1b41d8[0x0],_0x1b41d8[0x1]),this[_0x1c9fbf(0x29c)]['lineTo'](_0x41e19[0x0],_0x41e19[0x1]);}this['canvasContext']['stroke']();}['_tomap'](_0x2b949c,_0x2ce290,_0x40709d){const _0x352538=_0xb93ce,_0x105226=Cesium['Cartesian3']['fromDegrees'](_0x2b949c,_0x2ce290,this['fixedHeight']),_0x19690c=this[_0x352538(0x222)][_0x352538(0x1e1)];if(_0x19690c[_0x352538(0x293)]===Cesium['SceneMode'][_0x352538(0x236)]){const _0x31e7f8=new Cesium[(_0x352538(0x221))](_0x19690c['globe']['ellipsoid'],_0x19690c['camera']['positionWC']),_0x4014b6=_0x31e7f8['isPointVisible'](_0x105226);if(!_0x4014b6)return _0x40709d[_0x352538(0x243)]=0x0,null;}const _0xef1fb4=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this[_0x352538(0x222)][_0x352538(0x1e1)],_0x105226);return _0xef1fb4?[_0xef1fb4['x'],_0xef1fb4['y']]:null;}['clear'](){this['windField']['clear'](),delete this['windData'];}[_0xb93ce(0x238)](){const _0x77804e=_0xb93ce;this['worker']=new Worker(this[_0x77804e(0x2b3)]['worker']),this['worker']['onmessage']=_0x5e5e7c=>{const _0x37857e=_0x77804e;this[_0x37857e(0x1e6)](_0x5e5e7c['data'][_0x37857e(0x23a)]),this['_updateIng2']=![];},this['windField']={'init':_0x491aa6=>{const _0x3a46bb=_0x77804e;this[_0x3a46bb(0x294)]['postMessage']({'type':_0x3a46bb(0x2b1),'options':_0x491aa6});},'setOptions':_0x57f422=>{this['worker']['postMessage']({'type':'setOptions','options':_0x57f422});},'setDate':_0x398864=>{this['worker']['postMessage']({'type':'setDate','data':_0x398864});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0x21b371=_0x77804e;this[_0x21b371(0x294)]['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace[_0xb93ce(0x27d)][_0xb93ce(0x289)]=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0xb93ce(0x297)]=CanvasWindField,exports[_0xb93ce(0x289)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
15
15
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-wind",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.15",
|
|
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.15"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|