mars3d-wind 3.6.9 → 3.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
3
3
  *
4
- * 版本信息:v3.6.9
5
- * 编译日期:2023-10-17 19:50:11
4
+ * 版本信息:v3.6.10
5
+ * 编译日期:2023-10-23 17:21: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 _0x4d081e=_0x4e28;(function(_0x14e8bf,_0x5c6efb){const _0x5b0de4=_0x4e28,_0x236cbc=_0x14e8bf();while(!![]){try{const _0x3cedc=-parseInt(_0x5b0de4(0x1d9))/0x1*(parseInt(_0x5b0de4(0x19b))/0x2)+parseInt(_0x5b0de4(0x277))/0x3+-parseInt(_0x5b0de4(0x265))/0x4*(parseInt(_0x5b0de4(0x19d))/0x5)+-parseInt(_0x5b0de4(0x1e2))/0x6*(parseInt(_0x5b0de4(0x197))/0x7)+-parseInt(_0x5b0de4(0x20b))/0x8*(-parseInt(_0x5b0de4(0x209))/0x9)+-parseInt(_0x5b0de4(0x1b6))/0xa+parseInt(_0x5b0de4(0x260))/0xb;if(_0x3cedc===_0x5c6efb)break;else _0x236cbc['push'](_0x236cbc['shift']());}catch(_0x40500f){_0x236cbc['push'](_0x236cbc['shift']());}}}(_0x389c,0x1f72a));function _interopNamespace(_0x2f4c04){if(_0x2f4c04&&_0x2f4c04['__esModule'])return _0x2f4c04;var _0x1eab8e=Object['create'](null);return _0x2f4c04&&Object['keys'](_0x2f4c04)['forEach'](function(_0x293f1a){const _0x1861e6=_0x4e28;if(_0x293f1a!==_0x1861e6(0x1e4)){var _0x7648ac=Object[_0x1861e6(0x214)](_0x2f4c04,_0x293f1a);Object[_0x1861e6(0x204)](_0x1eab8e,_0x293f1a,_0x7648ac['get']?_0x7648ac:{'enumerable':!![],'get':function(){return _0x2f4c04[_0x293f1a];}});}}),_0x1eab8e['default']=_0x2f4c04,_0x1eab8e;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function _0x389c(){const _0x2533b3=['Sampler','mouseHidden','setDate','layer','source','canvasWind','645108fLRnbI','_onMouseMoveEvent','windField','postProcessingPosition','levmin','_onMouseDownEvent','keys','randomizeParticles','413bkPCbx','_speedRate','getUVByXY','fromGeometry','7208fanweS','lineTo','5rbuGNS','commandToExecute','context','viewerParameters','particlesTextures','add','PixelFormat','createRenderingFramebuffers','mars3d-canvasWind','LUMINANCE','vdata','createRenderingPrimitives','PixelDatatype','isInExtent','addPrimitives','setOptions','fixedHeight','mouse_move','sqrt','ClearCommand','shaderProgram','particlesRendering','0px','destroy','RGBA','949590zXaagR','_tomap','mouseUp','LayerUtil','all','tlat','PrimitiveType','canvasHeight','canvas','setData','atan2','getPixelSize','Draw','rows','frameTime','segmentsDepth','unbindEvent','nextParticlesPosition','mouseDown','updatePosition','lonRange','mouse_down','absolute','getDefaultRenderState','CanvasWindField','Pass','speedRate','lineWidth','canvasWidth','_pointerEvents','currentTrailsColor','fillRect','lev','postProcessingSpeed','_onMap_preRenderEvent','58Pbpjje','globeBoundingSphere','attributeLocations','Cartesian3','_updateIng2','_bilinearInterpolation','_randomParticle','options','latRange','14154Zlzaqu','worker','default','style','_colorRamp','EllipsoidalOccluder','mod','mouseMove','age','data','particlesTextureSize','createRawRenderState','ComponentDatatype','UNSIGNED_BYTE','_onMouseUpEvent','particlesComputing','setGeometry','fill','rawRenderState','show','windData','segments','ShaderSource','blue','refreshTimer','createSegmentsGeometry','onmessage','postMessage','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','Cartesian2','clearCommand','IDENTITY','execute','refreshParticles','defineProperty','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','update','createTexture','lng','9BoFkvd','maxAge','1769208ozqbBL','currentTrails','primitiveType','wheel','particleHeight','ymax','trails','BufferUsage','xmin','getOwnPropertyDescriptor','TextureMagnificationFilter','framebuffers','particlesNumber','visible','SCENE3D','currentParticlesPosition','applyViewerParameters','clear','getUVByPoint','globe','nextTrails','computeViewRectangle','Cesium','BaseLayer','toGridXY','viewRectangleToLonLatRange','outputTexture','animateFrame','Math','WindLayer','xmax','udata','framebuffer','globalAlpha','removeAll','colorTable','cols','position','clientWidth','resize','length','particleSystem','_mountedHook','scene','toRadians','clampToLatitudeRange','textures','getWind','height','getOptions','preRender','tlng','pointerEvents','min','randomBetween','FLOAT','max','getFullscreenQuad','maxParticles','_map','canvasResize','drawingBufferWidth','dropRate','_data','vertexArray','DepthFunction','removeEventListener','screen','Compute','NEAREST','EventType','particles','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','GeometryAttribute','autoClear','ShaderProgram','off','lat','now','currentParticlesSpeed','width','array','commandType','redraw','colors','2753630dewZhV','primitives','lon','umin','geometry','458140COPEmQ','canvasContext','_showHook','_onMapWhellEvent','toDegrees','visibility','viewport','dimensions','ymin','_updateIng','destroyParticlesTextures','push'];_0x389c=function(){return _0x2533b3;};return _0x389c();}function getU(_0x4f08b6,_0x285ac0){const _0x26a4cc=_0x4e28,_0x38856d=_0x4f08b6*Math['cos'](Cesium$7[_0x26a4cc(0x227)]['toRadians'](_0x285ac0));return _0x38856d;}function getV(_0x158aca,_0x7a2e97){const _0x5514d9=_0x4e28,_0x1898c7=_0x158aca*Math['sin'](Cesium$7[_0x5514d9(0x227)][_0x5514d9(0x237)](_0x7a2e97));return _0x1898c7;}function getSpeed(_0x348e14,_0x11e6de){const _0x132824=Math['sqrt'](Math['pow'](_0x348e14,0x2)+Math['pow'](_0x11e6de,0x2));return _0x132824;}function getDirection(_0x140726,_0x1ebf80){const _0x5781b8=_0x4e28;let _0x1c3aa1=Cesium$7[_0x5781b8(0x227)][_0x5781b8(0x269)](Math[_0x5781b8(0x1c0)](_0x1ebf80,_0x140726));return _0x1c3aa1+=_0x1c3aa1<0x0?0x168:0x0,_0x1c3aa1;}function _0x4e28(_0x206e67,_0x30fc84){const _0x389cbc=_0x389c();return _0x4e28=function(_0x4e282b,_0x3fc3a9){_0x4e282b=_0x4e282b-0x196;let _0x39153e=_0x389cbc[_0x4e282b];return _0x39153e;},_0x4e28(_0x206e67,_0x30fc84);}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x5259a6){const _0x4380db=_0x4e28;this[_0x4380db(0x25d)]=_0x5259a6['commandType'],this['geometry']=_0x5259a6['geometry'],this['attributeLocations']=_0x5259a6['attributeLocations'],this[_0x4380db(0x20d)]=_0x5259a6['primitiveType'],this['uniformMap']=_0x5259a6['uniformMap'],this['vertexShaderSource']=_0x5259a6['vertexShaderSource'],this['fragmentShaderSource']=_0x5259a6['fragmentShaderSource'],this[_0x4380db(0x1f4)]=_0x5259a6['rawRenderState'],this[_0x4380db(0x22b)]=_0x5259a6['framebuffer'],this[_0x4380db(0x225)]=_0x5259a6['outputTexture'],this[_0x4380db(0x255)]=_0x5259a6[_0x4380db(0x255)]??![],this['preExecute']=_0x5259a6['preExecute'],this[_0x4380db(0x1f5)]=!![],this['commandToExecute']=undefined,this[_0x4380db(0x200)]=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6[(_0x4380db(0x1b0))]({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0x4380db(0x22b)],'pass':Cesium$6[_0x4380db(0x1cf)]['OPAQUE']}));}['createCommand'](_0x3d9a76){const _0x543af1=_0x4e28;switch(this['commandType']){case _0x543af1(0x1c2):{const _0x1dd54a=Cesium$6['VertexArray']['fromGeometry']({'context':_0x3d9a76,'geometry':this['geometry'],'attributeLocations':this[_0x543af1(0x1db)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0xa6dad2=Cesium$6[_0x543af1(0x256)]['fromCache']({'context':_0x3d9a76,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this['fragmentShaderSource']}),_0x529e12=Cesium$6['RenderState']['fromCache'](this[_0x543af1(0x1f4)]);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0xa6dad2,'vertexArray':_0x1dd54a,'modelMatrix':Cesium$6['Matrix4'][_0x543af1(0x201)],'renderState':_0x529e12,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6[_0x543af1(0x1cf)]['OPAQUE'],'pickOnly':!![],'owner':this});}case'Compute':{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this[_0x543af1(0x225)],'persists':!![]});}}}[_0x4d081e(0x1f2)](_0x2cae60,_0x32102a){const _0x5817e2=_0x4d081e;this['geometry']=_0x32102a;const _0x29911b=Cesium$6['VertexArray']['fromGeometry']({'context':_0x2cae60,'geometry':this[_0x5817e2(0x264)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x29911b;}['update'](_0x5587e5){const _0x2488bb=_0x4d081e;if(!this[_0x2488bb(0x1f5)])return;if(_0x5587e5['mode']!==Cesium$6['SceneMode'][_0x2488bb(0x219)])return;!Cesium$6['defined'](this['commandToExecute'])&&(this['commandToExecute']=this['createCommand'](_0x5587e5[_0x2488bb(0x19f)])),Cesium$6['defined'](this['preExecute'])&&this['preExecute'](),Cesium$6['defined'](this[_0x2488bb(0x200)])&&_0x5587e5['commandList'][_0x2488bb(0x270)](this[_0x2488bb(0x200)]),_0x5587e5['commandList']['push'](this[_0x2488bb(0x19e)]);}['isDestroyed'](){return![];}[_0x4d081e(0x1b4)](){const _0x2303f5=_0x4d081e;if(this['clearCommand']){var _0x4b89de,_0x4d225c;(_0x4b89de=this['clearCommand'])!==null&&_0x4b89de!==void 0x0&&_0x4b89de['vertexArray']&&this['clearCommand'][_0x2303f5(0x24b)]['destroy'](),(_0x4d225c=this['clearCommand'])!==null&&_0x4d225c!==void 0x0&&_0x4d225c['shaderProgram']&&this['clearCommand'][_0x2303f5(0x1b1)]['destroy'](),delete this['clearCommand'];}return this['commandToExecute']&&(this['commandToExecute'][_0x2303f5(0x24b)]&&this['commandToExecute']['vertexArray'][_0x2303f5(0x1b4)](),this['commandToExecute']['shaderProgram']&&this['commandToExecute'][_0x2303f5(0x1b1)]['destroy'](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x5f1f31=function(){const _0x2a40ea=_0x4e28,_0x517c10=new Cesium$5['Geometry']({'attributes':new Cesium$5['GeometryAttributes']({'position':new Cesium$5[(_0x2a40ea(0x254))]({'componentDatatype':Cesium$5[_0x2a40ea(0x1ee)]['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'][_0x2a40ea(0x242)],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x517c10;},_0x236898=function(_0x5a589f,_0xd603c7){const _0x86e66a=_0x4e28;if(Cesium$5['defined'](_0xd603c7)){const _0xbb1f46={};_0xbb1f46['arrayBufferView']=_0xd603c7,_0x5a589f[_0x86e66a(0x275)]=_0xbb1f46;}const _0x4bc5b2=new Cesium$5['Texture'](_0x5a589f);return _0x4bc5b2;},_0x54b93f=function(_0x3965f4,_0xcdddee,_0x5a0aa9){const _0x16330f=new Cesium$5['Framebuffer']({'context':_0x3965f4,'colorTextures':[_0xcdddee],'depthTexture':_0x5a0aa9});return _0x16330f;},_0x21824f=function(_0xfbca1f){const _0x2280a4=_0x4e28,_0x3b7d8e=!![],_0xa9153a=![],_0x418d91={'viewport':_0xfbca1f[_0x2280a4(0x26b)],'depthTest':_0xfbca1f['depthTest'],'depthMask':_0xfbca1f['depthMask'],'blending':_0xfbca1f['blending']},_0x12732f=Cesium$5['Appearance'][_0x2280a4(0x1cd)](_0x3b7d8e,_0xa9153a,_0x418d91);return _0x12732f;},_0x3f54c7=function(_0x76f58f){const _0x56789c=_0x4e28,_0x35149d={},_0xe02fb4=Cesium$5['Math'][_0x56789c(0x1e8)](_0x76f58f['west'],Cesium$5['Math']['TWO_PI']),_0xefdc80=Cesium$5['Math']['mod'](_0x76f58f['east'],Cesium$5['Math']['TWO_PI']),_0x5227a8=_0x76f58f[_0x56789c(0x25b)];let _0x52064f,_0x408461;_0x5227a8>Cesium$5[_0x56789c(0x227)]['THREE_PI_OVER_TWO']?(_0x52064f=0x0,_0x408461=Cesium$5['Math']['TWO_PI']):_0xefdc80-_0xe02fb4<_0x5227a8?(_0x52064f=_0xe02fb4,_0x408461=_0xe02fb4+_0x5227a8):(_0x52064f=_0xe02fb4,_0x408461=_0xefdc80);_0x35149d['lon']={'min':Cesium$5['Math'][_0x56789c(0x269)](_0x52064f),'max':Cesium$5['Math'][_0x56789c(0x269)](_0x408461)};const _0x26d64a=_0x76f58f['south'],_0x14844f=_0x76f58f['north'],_0xbbdd36=_0x76f58f['height'],_0x7d00db=_0xbbdd36>Cesium$5['Math']['PI']/0xc?_0xbbdd36/0x2:0x0;let _0x22fbbf=Cesium$5['Math'][_0x56789c(0x238)](_0x26d64a-_0x7d00db),_0x266c0c=Cesium$5['Math'][_0x56789c(0x238)](_0x14844f+_0x7d00db);return _0x22fbbf<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x22fbbf=-Cesium$5['Math']['PI_OVER_TWO']),_0x266c0c>Cesium$5[_0x56789c(0x227)]['PI_OVER_THREE']&&(_0x266c0c=Cesium$5[_0x56789c(0x227)]['PI_OVER_TWO']),_0x35149d['lat']={'min':Cesium$5['Math']['toDegrees'](_0x22fbbf),'max':Cesium$5['Math']['toDegrees'](_0x266c0c)},_0x35149d;};return{'getFullscreenQuad':_0x5f1f31,'createTexture':_0x236898,'createFramebuffer':_0x54b93f,'createRawRenderState':_0x21824f,'viewRectangleToLonLatRange':_0x3f54c7};}());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=_0x4d081e(0x205),fullscreen_vert=_0x4d081e(0x253),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(_0x5ab975,_0x24eaa1,_0xc8e639,_0xa0c1c9,_0x5bb49c){const _0x4ba994=_0x4d081e;this['createRenderingTextures'](_0x5ab975,_0x24eaa1,_0xc8e639['colors']),this[_0x4ba994(0x1a4)](_0x5ab975),this['createRenderingPrimitives'](_0x5ab975,_0xc8e639,_0xa0c1c9,_0x5bb49c);}['createRenderingTextures'](_0x2ce7f9,_0x2400bd,_0xa78187){const _0x280335=_0x4d081e,_0x58b2c7={'context':_0x2ce7f9,'width':_0x2ce7f9['drawingBufferWidth'],'height':_0x2ce7f9['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x280335(0x1a3)][_0x280335(0x1b5)],'pixelDatatype':Cesium$4[_0x280335(0x1a9)][_0x280335(0x1ef)]},_0x5aa036={'context':_0x2ce7f9,'width':_0x2ce7f9[_0x280335(0x248)],'height':_0x2ce7f9['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['DEPTH_COMPONENT'],'pixelDatatype':Cesium$4['PixelDatatype']['UNSIGNED_INT']},_0xe7cb88=_0xa78187[_0x280335(0x233)],_0x4a2d34=new Float32Array(_0xe7cb88*0x3);for(let _0x5853e7=0x0;_0x5853e7<_0xe7cb88;_0x5853e7++){const _0x33c4ec=Cesium$4['Color']['fromCssColorString'](_0xa78187[_0x5853e7]);_0x4a2d34[0x3*_0x5853e7]=_0x33c4ec['red'],_0x4a2d34[0x3*_0x5853e7+0x1]=_0x33c4ec['green'],_0x4a2d34[0x3*_0x5853e7+0x2]=_0x33c4ec[_0x280335(0x1f9)];}const _0x4356be={'context':_0x2ce7f9,'width':_0xe7cb88,'height':0x1,'pixelFormat':Cesium$4['PixelFormat']['RGB'],'pixelDatatype':Cesium$4['PixelDatatype']['FLOAT'],'sampler':new Cesium$4['Sampler']({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4[_0x280335(0x215)]['LINEAR']})};this['textures']={'segmentsColor':Util['createTexture'](_0x58b2c7),'segmentsDepth':Util['createTexture'](_0x5aa036),'currentTrailsColor':Util[_0x280335(0x207)](_0x58b2c7),'currentTrailsDepth':Util['createTexture'](_0x5aa036),'nextTrailsColor':Util['createTexture'](_0x58b2c7),'nextTrailsDepth':Util[_0x280335(0x207)](_0x5aa036),'colorTable':Util[_0x280335(0x207)](_0x4356be,_0x4a2d34)};}[_0x4d081e(0x1a4)](_0x7f0600){const _0x21c1ee=_0x4d081e;this['framebuffers']={'segments':Util['createFramebuffer'](_0x7f0600,this['textures']['segmentsColor'],this['textures'][_0x21c1ee(0x1c5)]),'currentTrails':Util['createFramebuffer'](_0x7f0600,this['textures'][_0x21c1ee(0x1d4)],this['textures']['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x7f0600,this[_0x21c1ee(0x239)]['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x339513){const _0x20d181=_0x4d081e,_0x3eea58=0x4;let _0x17bf4d=[];for(let _0x3027d5=0x0;_0x3027d5<_0x339513[_0x20d181(0x1ec)];_0x3027d5++){for(let _0x181c94=0x0;_0x181c94<_0x339513['particlesTextureSize'];_0x181c94++){for(let _0x2268d0=0x0;_0x2268d0<_0x3eea58;_0x2268d0++){_0x17bf4d['push'](_0x3027d5/_0x339513['particlesTextureSize']),_0x17bf4d['push'](_0x181c94/_0x339513['particlesTextureSize']);}}}_0x17bf4d=new Float32Array(_0x17bf4d);let _0x305332=[];const _0x4629c4=[-0x1,0x1],_0x1eaf70=[-0x1,0x1];for(let _0x2ee227=0x0;_0x2ee227<_0x339513[_0x20d181(0x245)];_0x2ee227++){for(let _0x4d3ca5=0x0;_0x4d3ca5<_0x3eea58/0x2;_0x4d3ca5++){for(let _0x393fd5=0x0;_0x393fd5<_0x3eea58/0x2;_0x393fd5++){_0x305332[_0x20d181(0x270)](_0x4629c4[_0x4d3ca5]),_0x305332['push'](_0x1eaf70[_0x393fd5]),_0x305332['push'](0x0);}}}_0x305332=new Float32Array(_0x305332);const _0x720132=0x6*_0x339513[_0x20d181(0x245)],_0x76fa12=new Uint32Array(_0x720132);for(let _0x14902e=0x0,_0x1e434b=0x0,_0x267e61=0x0;_0x14902e<_0x339513['maxParticles'];_0x14902e++){_0x76fa12[_0x1e434b++]=_0x267e61+0x0,_0x76fa12[_0x1e434b++]=_0x267e61+0x1,_0x76fa12[_0x1e434b++]=_0x267e61+0x2,_0x76fa12[_0x1e434b++]=_0x267e61+0x2,_0x76fa12[_0x1e434b++]=_0x267e61+0x1,_0x76fa12[_0x1e434b++]=_0x267e61+0x3,_0x267e61+=0x4;}const _0x2b41f7=new Cesium$4['Geometry']({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x2,'values':_0x17bf4d}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x20d181(0x1ee)][_0x20d181(0x242)],'componentsPerAttribute':0x3,'values':_0x305332})}),'indices':_0x76fa12});return _0x2b41f7;}[_0x4d081e(0x1a8)](_0x21e84e,_0x40a8ea,_0x2eb2ab,_0x1fd0dd){const _0x328651=_0x4d081e,_0x62876=this;this['primitives']={'segments':new CustomPrimitive({'commandType':_0x328651(0x1c2),'attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0x328651(0x1fb)](_0x40a8ea),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){const _0x2dd6d1=_0x328651;return _0x1fd0dd['particlesTextures'][_0x2dd6d1(0x21a)];},'postProcessingPosition':function(){const _0x411ca6=_0x328651;return _0x1fd0dd['particlesTextures'][_0x411ca6(0x27a)];},'postProcessingSpeed':function(){const _0x4a6769=_0x328651;return _0x1fd0dd['particlesTextures'][_0x4a6769(0x1d7)];},'colorTable':function(){return _0x62876['textures']['colorTable'];},'aspect':function(){const _0x5b897b=_0x328651;return _0x21e84e[_0x5b897b(0x248)]/_0x21e84e['drawingBufferHeight'];},'pixelSize':function(){return _0x2eb2ab['pixelSize'];},'lineWidth':function(){const _0x214843=_0x328651;return _0x40a8ea[_0x214843(0x1d1)];},'particleHeight':function(){const _0x4c5375=_0x328651;return _0x40a8ea[_0x4c5375(0x20f)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_frag]}),'rawRenderState':Util[_0x328651(0x1ed)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType']['TRIANGLES'],'uniformMap':{'segmentsColorTexture':function(){return _0x62876['textures']['segmentsColor'];},'segmentsDepthTexture':function(){const _0x1daf20=_0x328651;return _0x62876['textures'][_0x1daf20(0x1c5)];},'currentTrailsColor':function(){const _0x1d0b9e=_0x328651;return _0x62876[_0x1d0b9e(0x216)]['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x49dd74=_0x328651;return _0x62876['framebuffers'][_0x49dd74(0x20c)]['depthTexture'];},'fadeOpacity':function(){return _0x40a8ea['fadeOpacity'];}},'vertexShaderSource':new Cesium$4[(_0x328651(0x1f8))]({'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[_0x328651(0x24c)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers'][_0x328651(0x21f)],'autoClear':!![],'preExecute':function(){const _0x70c196=_0x328651,_0x13eb42=_0x62876['framebuffers']['currentTrails'];_0x62876['framebuffers'][_0x70c196(0x20c)]=_0x62876['framebuffers']['nextTrails'],_0x62876['framebuffers'][_0x70c196(0x21f)]=_0x13eb42,_0x62876[_0x70c196(0x261)]['trails']['commandToExecute']['framebuffer']=_0x62876[_0x70c196(0x216)]['nextTrails'],_0x62876['primitives'][_0x70c196(0x211)]['clearCommand']['framebuffer']=_0x62876[_0x70c196(0x216)]['nextTrails'];}}),'screen':new CustomPrimitive({'commandType':_0x328651(0x1c2),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util[_0x328651(0x244)](),'primitiveType':Cesium$4[_0x328651(0x1bc)]['TRIANGLES'],'uniformMap':{'trailsColorTexture':function(){const _0x2e7c49=_0x328651;return _0x62876['framebuffers'][_0x2e7c49(0x21f)]['getColorTexture'](0x0);},'trailsDepthTexture':function(){const _0x5d0948=_0x328651;return _0x62876['framebuffers'][_0x5d0948(0x21f)]['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x328651(0x1ed)]({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag='//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat*lev\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec3\x20dimension;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20vec3\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0auniform\x20vec3\x20interval;\x20//\x20interval\x20of\x20each\x20dimension\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20\x20\x20lonLatLev.x\x20=\x20mod(lonLatLev.x,\x20360.0);\x0a\x20\x20\x20\x20lonLatLev.y\x20=\x20clamp(lonLatLev.y,\x20-90.0,\x2090.0);\x0a\x0a\x20\x20\x20\x20vec3\x20index3D\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20index3D.x\x20=\x20(lonLatLev.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20\x20\x20index3D.y\x20=\x20(lonLatLev.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x20\x20\x20\x20index3D.z\x20=\x20(lonLatLev.z\x20-\x20minimum.z)\x20/\x20interval.z;\x0a\x0a\x20\x20\x20\x20//\x20the\x20st\x20texture\x20coordinate\x20corresponding\x20to\x20(col,\x20row)\x20index\x0a\x20\x20\x20\x20//\x20example\x0a\x20\x20\x20\x20//\x20data\x20array\x20is\x20[0,\x201,\x202,\x203,\x204,\x205],\x20width\x20=\x203,\x20height\x20=\x202\x0a\x20\x20\x20\x20//\x20the\x20content\x20of\x20texture\x20will\x20be\x0a\x20\x20\x20\x20//\x20t\x201.0\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x203\x204\x205\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x0a\x20\x20\x20\x20//\x20\x20\x20\x20|\x20\x200\x201\x202\x0a\x20\x20\x20\x20//\x20\x20\x200.0------1.0\x20s\x0a\x0a\x20\x20\x20\x20vec2\x20index2D\x20=\x20vec2(index3D.x,\x20index3D.z\x20*\x20dimension.y\x20+\x20index3D.y);\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20(dimension.y\x20*\x20dimension.z));\x0a\x20\x20\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWind(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLatLev);\x0a\x20\x20\x20\x20float\x20result\x20=\x20texture(windTexture,\x20normalizedIndex2D).r;\x0a\x20\x20\x20\x20return\x20result;\x0a}\x0a\x0aconst\x20mat4\x20kernelMatrix\x20=\x20mat4(\x0a\x20\x20\x20\x200.0,\x20-1.0,\x202.0,\x20-1.0,\x20//\x20first\x20column\x0a\x20\x20\x20\x202.0,\x200.0,\x20-5.0,\x203.0,\x20//\x20second\x20column\x0a\x20\x20\x20\x200.0,\x201.0,\x204.0,\x20-3.0,\x20//\x20third\x20column\x0a\x20\x20\x20\x200.0,\x200.0,\x20-1.0,\x201.0\x20//\x20fourth\x20column\x0a);\x0afloat\x20oneDimensionInterpolation(float\x20t,\x20float\x20p0,\x20float\x20p1,\x20float\x20p2,\x20float\x20p3)\x20{\x0a\x20\x20\x20\x20vec4\x20tVec4\x20=\x20vec4(1.0,\x20t,\x20t\x20*\x20t,\x20t\x20*\x20t\x20*\x20t);\x0a\x20\x20\x20\x20tVec4\x20=\x20tVec4\x20/\x202.0;\x0a\x20\x20\x20\x20vec4\x20pVec4\x20=\x20vec4(p0,\x20p1,\x20p2,\x20p3);\x0a\x20\x20\x20\x20return\x20dot((tVec4\x20*\x20kernelMatrix),\x20pVec4);\x0a}\x0a\x0afloat\x20calculateB(sampler2D\x20windTexture,\x20float\x20t,\x20float\x20lon,\x20float\x20lat,\x20float\x20lev)\x20{\x0a\x20\x20\x20\x20float\x20lon0\x20=\x20floor(lon)\x20-\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon1\x20=\x20floor(lon);\x0a\x20\x20\x20\x20float\x20lon2\x20=\x20floor(lon)\x20+\x201.0\x20*\x20interval.x;\x0a\x20\x20\x20\x20float\x20lon3\x20=\x20floor(lon)\x20+\x202.0\x20*\x20interval.x;\x0a\x0a\x20\x20\x20\x20float\x20p0\x20=\x20getWind(windTexture,\x20vec3(lon0,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p1\x20=\x20getWind(windTexture,\x20vec3(lon1,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p2\x20=\x20getWind(windTexture,\x20vec3(lon2,\x20lat,\x20lev));\x0a\x20\x20\x20\x20float\x20p3\x20=\x20getWind(windTexture,\x20vec3(lon3,\x20lat,\x20lev));\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(t,\x20p0,\x20p1,\x20p2,\x20p3);\x0a}\x0a\x0afloat\x20interpolateOneTexture(sampler2D\x20windTexture,\x20vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20float\x20lon\x20=\x20lonLatLev.x;\x0a\x20\x20\x20\x20float\x20lat\x20=\x20lonLatLev.y;\x0a\x20\x20\x20\x20float\x20lev\x20=\x20lonLatLev.z;\x0a\x0a\x20\x20\x20\x20float\x20lat0\x20=\x20floor(lat)\x20-\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat1\x20=\x20floor(lat);\x0a\x20\x20\x20\x20float\x20lat2\x20=\x20floor(lat)\x20+\x201.0\x20*\x20interval.y;\x0a\x20\x20\x20\x20float\x20lat3\x20=\x20floor(lat)\x20+\x202.0\x20*\x20interval.y;\x0a\x0a\x20\x20\x20\x20vec2\x20coefficient\x20=\x20lonLatLev.xy\x20-\x20floor(lonLatLev.xy);\x0a\x20\x20\x20\x20float\x20b0\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat0,\x20lev);\x0a\x20\x20\x20\x20float\x20b1\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat1,\x20lev);\x0a\x20\x20\x20\x20float\x20b2\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat2,\x20lev);\x0a\x20\x20\x20\x20float\x20b3\x20=\x20calculateB(windTexture,\x20coefficient.x,\x20lon,\x20lat3,\x20lev);\x0a\x0a\x20\x20\x20\x20return\x20oneDimensionInterpolation(coefficient.y,\x20b0,\x20b1,\x20b2,\x20b3);\x0a}\x0a\x0avec3\x20bicubic(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm\x0a\x20\x20\x20\x20float\x20u\x20=\x20interpolateOneTexture(U,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20v\x20=\x20interpolateOneTexture(V,\x20lonLatLev);\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20return\x20vec3(u,\x20v,\x20w);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20bicubic(lonLatLev);\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(windVector,\x200.0);\x0a}\x0a',updateSpeed_frag='uniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0auniform\x20sampler2D\x20particlesWind;\x0a\x0a//\x20used\x20to\x20calculate\x20the\x20wind\x20norm\x0auniform\x20vec2\x20uSpeedRange;\x20//\x20(min,\x20max);\x0auniform\x20vec2\x20vSpeedRange;\x0auniform\x20float\x20pixelSize;\x0auniform\x20float\x20speedFactor;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0afloat\x20calculateWindNorm(vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec3\x20percent\x20=\x20vec3(0.0);\x0a\x20\x20\x20\x20percent.x\x20=\x20(speed.x\x20-\x20uSpeedRange.x)\x20/\x20(uSpeedRange.y\x20-\x20uSpeedRange.x);\x0a\x20\x20\x20\x20percent.y\x20=\x20(speed.y\x20-\x20vSpeedRange.x)\x20/\x20(vSpeedRange.y\x20-\x20vSpeedRange.x);\x0a\x20\x20\x20\x20float\x20normalization\x20=\x20length(percent);\x0a\x0a\x20\x20\x20\x20return\x20normalization;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20//\x20vec3\x20currentSpeed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20windVector\x20=\x20texture(particlesWind,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20vec4\x20nextSpeed\x20=\x20vec4(speedFactor\x20*\x20pixelSize\x20*\x20windVector,\x20calculateWindNorm(windVector));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20nextSpeed;\x0a}\x0a',updatePosition_frag='uniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0auniform\x20sampler2D\x20currentParticlesSpeed;\x20//\x20(u,\x20v,\x20w,\x20normalization)\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20lengthOfLonLat(vec3\x20lonLatLev)\x20{\x0a\x20\x20\x20\x20//\x20unit\x20conversion:\x20meters\x20->\x20longitude\x20latitude\x20degrees\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree\x20for\x20detail\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20the\x20length\x20of\x20a\x20degree\x20of\x20latitude\x20and\x20longitude\x20in\x20meters\x0a\x20\x20\x20\x20float\x20latitude\x20=\x20radians(lonLatLev.y);\x0a\x0a\x20\x20\x20\x20float\x20term1\x20=\x20111132.92;\x0a\x20\x20\x20\x20float\x20term2\x20=\x20559.82\x20*\x20cos(2.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term3\x20=\x201.175\x20*\x20cos(4.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term4\x20=\x200.0023\x20*\x20cos(6.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20\x20\x20float\x20term5\x20=\x20111412.84\x20*\x20cos(latitude);\x0a\x20\x20\x20\x20float\x20term6\x20=\x2093.5\x20*\x20cos(3.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20term7\x20=\x200.118\x20*\x20cos(5.0\x20*\x20latitude);\x0a\x20\x20\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avoid\x20updatePosition(vec3\x20lonLatLev,\x20vec3\x20speed)\x20{\x0a\x20\x20\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLatLev);\x0a\x20\x20\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20\x20\x20float\x20w\x20=\x200.0;\x0a\x20\x20\x20\x20vec3\x20windVectorInLonLatLev\x20=\x20vec3(u,\x20v,\x20w);\x0a\x0a\x20\x20\x20\x20vec3\x20nextParticle\x20=\x20lonLatLev\x20+\x20windVectorInLonLatLev;\x0a\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(nextParticle,\x200.0);\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20\x20\x20vec3\x20lonLatLev\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rgb;\x0a\x20\x20\x20\x20vec3\x20speed\x20=\x20texture(currentParticlesSpeed,\x20v_textureCoordinates).rgb;\x0a\x0a\x20\x20\x20\x20updatePosition(lonLatLev,\x20speed);\x0a}\x0a',postProcessingPosition_frag=_0x4d081e(0x1fe),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(_0x18e595,_0x5814c9,_0x1a94a6,_0x579a4d){const _0x728c06=_0x4d081e;this[_0x728c06(0x1eb)]=_0x5814c9,this['createWindTextures'](_0x18e595,_0x5814c9),this['createParticlesTextures'](_0x18e595,_0x1a94a6,_0x579a4d),this['createComputingPrimitives'](_0x5814c9,_0x1a94a6,_0x579a4d);}['createWindTextures'](_0x55f59a,_0x4fafed){const _0x2d791c=_0x4d081e,_0x3b926d={'context':_0x55f59a,'width':_0x4fafed[_0x2d791c(0x26c)][_0x2d791c(0x262)],'height':_0x4fafed['dimensions']['lat']*(_0x4fafed[_0x2d791c(0x26c)]['lev']||0x1),'pixelFormat':Cesium$3['PixelFormat'][_0x2d791c(0x1a6)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3[(_0x2d791c(0x271))]({'minificationFilter':Cesium$3['TextureMinificationFilter']['NEAREST'],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this['windTextures']={'U':Util[_0x2d791c(0x207)](_0x3b926d,_0x4fafed['U']['array']),'V':Util['createTexture'](_0x3b926d,_0x4fafed['V'][_0x2d791c(0x25c)])};}['createParticlesTextures'](_0x2a5806,_0x4d9161,_0x8fb669){const _0x2301b5=_0x4d081e,_0x81f97f={'context':_0x2a5806,'width':_0x4d9161[_0x2301b5(0x1ec)],'height':_0x4d9161['particlesTextureSize'],'pixelFormat':Cesium$3['PixelFormat'][_0x2301b5(0x1b5)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0x2301b5(0x250)],'magnificationFilter':Cesium$3['TextureMagnificationFilter'][_0x2301b5(0x250)]})},_0x385c3f=this[_0x2301b5(0x196)](_0x4d9161['maxParticles'],_0x8fb669),_0x54c0da=new Float32Array(0x4*_0x4d9161['maxParticles'])[_0x2301b5(0x1f3)](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x81f97f),'currentParticlesPosition':Util['createTexture'](_0x81f97f,_0x385c3f),'nextParticlesPosition':Util['createTexture'](_0x81f97f,_0x385c3f),'currentParticlesSpeed':Util['createTexture'](_0x81f97f,_0x54c0da),'nextParticlesSpeed':Util[_0x2301b5(0x207)](_0x81f97f,_0x54c0da),'postProcessingPosition':Util['createTexture'](_0x81f97f,_0x385c3f),'postProcessingSpeed':Util['createTexture'](_0x81f97f,_0x54c0da)};}['randomizeParticles'](_0x9d5ec7,_0x2efb){const _0x21b687=_0x4d081e,_0x19d349=new Float32Array(0x4*_0x9d5ec7);for(let _0x385314=0x0;_0x385314<_0x9d5ec7;_0x385314++){_0x19d349[0x4*_0x385314]=Cesium$3['Math']['randomBetween'](_0x2efb['lonRange']['x'],_0x2efb['lonRange']['y']),_0x19d349[0x4*_0x385314+0x1]=Cesium$3['Math']['randomBetween'](_0x2efb[_0x21b687(0x1e1)]['x'],_0x2efb['latRange']['y']),_0x19d349[0x4*_0x385314+0x2]=Cesium$3['Math'][_0x21b687(0x241)](this['data']['lev']['min'],this['data']['lev'][_0x21b687(0x243)]),_0x19d349[0x4*_0x385314+0x3]=0x0;}return _0x19d349;}[_0x4d081e(0x26f)](){Object['keys'](this['particlesTextures'])['forEach'](_0x193d13=>{this['particlesTextures'][_0x193d13]['destroy']();});}['createComputingPrimitives'](_0x388793,_0x1f3829,_0x56ef1e){const _0x224230=_0x4d081e,_0x3ecb54=new Cesium$3[(_0x224230(0x1dc))](_0x388793[_0x224230(0x26c)]['lon'],_0x388793['dimensions']['lat'],_0x388793['dimensions']['lev']),_0x4ac998=new Cesium$3['Cartesian3'](_0x388793[_0x224230(0x262)][_0x224230(0x240)],_0x388793['lat']['min'],_0x388793['lev']['min']),_0x45c2a1=new Cesium$3[(_0x224230(0x1dc))](_0x388793['lon']['max'],_0x388793['lat']['max'],_0x388793['lev']['max']),_0x4b6ff7=new Cesium$3['Cartesian3']((_0x45c2a1['x']-_0x4ac998['x'])/(_0x3ecb54['x']-0x1),(_0x45c2a1['y']-_0x4ac998['y'])/(_0x3ecb54['y']-0x1),_0x3ecb54['z']>0x1?(_0x45c2a1['z']-_0x4ac998['z'])/(_0x3ecb54['z']-0x1):0x1),_0x337e79=new Cesium$3['Cartesian2'](_0x388793['U'][_0x224230(0x240)],_0x388793['U']['max']),_0x4ccb80=new Cesium$3[(_0x224230(0x1ff))](_0x388793['V'][_0x224230(0x240)],_0x388793['V']['max']),_0x3219d7=this;this[_0x224230(0x261)]={'getWind':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':function(){return _0x3219d7['windTextures']['U'];},'V':function(){return _0x3219d7['windTextures']['V'];},'currentParticlesPosition':function(){const _0x49a22b=_0x224230;return _0x3219d7[_0x49a22b(0x1a1)][_0x49a22b(0x21a)];},'dimension':function(){return _0x3ecb54;},'minimum':function(){return _0x4ac998;},'maximum':function(){return _0x45c2a1;},'interval':function(){return _0x4b6ff7;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x2351ee=_0x224230;_0x3219d7['primitives'][_0x2351ee(0x23a)][_0x2351ee(0x19e)]['outputTexture']=_0x3219d7['particlesTextures']['particlesWind'];}}),'updateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesSpeed':function(){const _0x4a7112=_0x224230;return _0x3219d7['particlesTextures'][_0x4a7112(0x25a)];},'particlesWind':function(){const _0x5df624=_0x224230;return _0x3219d7[_0x5df624(0x1a1)]['particlesWind'];},'uSpeedRange':function(){return _0x337e79;},'vSpeedRange':function(){return _0x4ccb80;},'pixelSize':function(){return _0x56ef1e['pixelSize'];},'speedFactor':function(){return _0x1f3829['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this['particlesTextures']['nextParticlesSpeed'],'preExecute':function(){const _0x159358=_0x224230,_0x51b876=_0x3219d7[_0x159358(0x1a1)][_0x159358(0x25a)];_0x3219d7[_0x159358(0x1a1)][_0x159358(0x25a)]=_0x3219d7['particlesTextures']['postProcessingSpeed'],_0x3219d7['particlesTextures']['postProcessingSpeed']=_0x51b876,_0x3219d7['primitives']['updateSpeed'][_0x159358(0x19e)][_0x159358(0x225)]=_0x3219d7['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':function(){const _0x5a4094=_0x224230;return _0x3219d7[_0x5a4094(0x1a1)]['currentParticlesPosition'];},'currentParticlesSpeed':function(){const _0x565dd0=_0x224230;return _0x3219d7[_0x565dd0(0x1a1)]['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x224230(0x1f8))]({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures'][_0x224230(0x1c7)],'preExecute':function(){const _0x38bf58=_0x224230,_0xe27e53=_0x3219d7['particlesTextures']['currentParticlesPosition'];_0x3219d7[_0x38bf58(0x1a1)]['currentParticlesPosition']=_0x3219d7['particlesTextures'][_0x38bf58(0x27a)],_0x3219d7['particlesTextures']['postProcessingPosition']=_0xe27e53,_0x3219d7['primitives'][_0x38bf58(0x1c9)]['commandToExecute'][_0x38bf58(0x225)]=_0x3219d7[_0x38bf58(0x1a1)]['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':function(){const _0xaa9882=_0x224230;return _0x3219d7['particlesTextures'][_0xaa9882(0x1c7)];},'nextParticlesSpeed':function(){const _0x4db24e=_0x224230;return _0x3219d7[_0x4db24e(0x1a1)]['nextParticlesSpeed'];},'lonRange':function(){return _0x56ef1e['lonRange'];},'latRange':function(){const _0x560242=_0x224230;return _0x56ef1e[_0x560242(0x1e1)];},'randomCoefficient':function(){const _0x2c905e=Math['random']();return _0x2c905e;},'dropRate':function(){const _0x20056f=_0x224230;return _0x1f3829[_0x20056f(0x249)];},'dropRateBump':function(){return _0x1f3829['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){const _0x2af62a=_0x224230;_0x3219d7['primitives'][_0x2af62a(0x27a)][_0x2af62a(0x19e)][_0x2af62a(0x225)]=_0x3219d7['particlesTextures']['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x224230(0x24f),'uniformMap':{'postProcessingPosition':function(){return _0x3219d7['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){const _0x27f549=_0x224230;return _0x3219d7[_0x27f549(0x1a1)]['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures'][_0x224230(0x1d7)],'preExecute':function(){const _0x3ebb67=_0x224230;_0x3219d7[_0x3ebb67(0x261)]['postProcessingSpeed']['commandToExecute'][_0x3ebb67(0x225)]=_0x3219d7[_0x3ebb67(0x1a1)]['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace[_0x4d081e(0x221)];class ParticleSystem{constructor(_0x2aa066,_0x359dcf,_0x5f0031,_0xce6304){const _0x52c3d3=_0x4d081e;this['context']=_0x2aa066,_0x359dcf={..._0x359dcf},_0x359dcf['udata']&&_0x359dcf['vdata']&&(_0x359dcf[_0x52c3d3(0x26c)]={},_0x359dcf['dimensions']['lon']=_0x359dcf['cols'],_0x359dcf[_0x52c3d3(0x26c)]['lat']=_0x359dcf[_0x52c3d3(0x1c3)],_0x359dcf['dimensions'][_0x52c3d3(0x1d6)]=_0x359dcf['lev']||0x1,_0x359dcf[_0x52c3d3(0x262)]={},_0x359dcf[_0x52c3d3(0x262)]['min']=_0x359dcf['xmin'],_0x359dcf[_0x52c3d3(0x262)]['max']=_0x359dcf['xmax'],_0x359dcf['lat']={},_0x359dcf[_0x52c3d3(0x258)]['min']=_0x359dcf['ymin'],_0x359dcf[_0x52c3d3(0x258)]['max']=_0x359dcf['ymax'],_0x359dcf[_0x52c3d3(0x1d6)]={},_0x359dcf['lev']['min']=_0x359dcf[_0x52c3d3(0x27b)]??0x1,_0x359dcf[_0x52c3d3(0x1d6)][_0x52c3d3(0x243)]=_0x359dcf['levmax']??0x1,_0x359dcf['U']={},_0x359dcf['U'][_0x52c3d3(0x25c)]=new Float32Array(_0x359dcf[_0x52c3d3(0x22a)]),_0x359dcf['U']['min']=_0x359dcf[_0x52c3d3(0x263)]??Math['min'](..._0x359dcf['udata']),_0x359dcf['U']['max']=_0x359dcf['umax']??Math['max'](..._0x359dcf['udata']),_0x359dcf['V']={},_0x359dcf['V']['array']=new Float32Array(_0x359dcf[_0x52c3d3(0x1a7)]),_0x359dcf['V'][_0x52c3d3(0x240)]=_0x359dcf['vmin']??Math['min'](..._0x359dcf[_0x52c3d3(0x1a7)]),_0x359dcf['V']['max']=_0x359dcf['vmax']??Math['max'](..._0x359dcf['vdata'])),this[_0x52c3d3(0x1eb)]=_0x359dcf,this['options']=_0x5f0031,this[_0x52c3d3(0x1a0)]=_0xce6304,this['particlesComputing']=new ParticlesComputing(this[_0x52c3d3(0x19f)],this[_0x52c3d3(0x1eb)],this['options'],this[_0x52c3d3(0x1a0)]),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this[_0x52c3d3(0x1a0)],this[_0x52c3d3(0x1f1)]);}[_0x4d081e(0x247)](_0x3c36b8){const _0x1be302=_0x4d081e;this['particlesComputing']['destroyParticlesTextures'](),Object[_0x1be302(0x27d)](this['particlesComputing']['windTextures'])['forEach'](_0x1bf910=>{this['particlesComputing']['windTextures'][_0x1bf910]['destroy']();}),this['particlesRendering']['textures'][_0x1be302(0x22e)]['destroy'](),Object[_0x1be302(0x27d)](this['particlesRendering']['framebuffers'])['forEach'](_0x4c7eeb=>{const _0x23e7b3=_0x1be302;this[_0x23e7b3(0x1b2)]['framebuffers'][_0x4c7eeb]['destroy']();}),this['context']=_0x3c36b8,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this[_0x1be302(0x1e0)],this['viewerParameters']),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this['particlesComputing']);}['clearFramebuffers'](){const _0xabd415=_0x4d081e,_0x2dfdb4=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2[_0xabd415(0x1cf)]['OPAQUE']});Object['keys'](this[_0xabd415(0x1b2)]['framebuffers'])['forEach'](_0x39a298=>{const _0x28d58a=_0xabd415;_0x2dfdb4['framebuffer']=this['particlesRendering']['framebuffers'][_0x39a298],_0x2dfdb4[_0x28d58a(0x202)](this['context']);});}['refreshParticles'](_0x2e2ce5){const _0x4862c6=_0x4d081e;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing']['createParticlesTextures'](this[_0x4862c6(0x19f)],this[_0x4862c6(0x1e0)],this['viewerParameters']);if(_0x2e2ce5){var _0x5d1ab1,_0x4826ff;const _0x1144fb=this['particlesRendering'][_0x4862c6(0x1fb)](this[_0x4862c6(0x1e0)]);this['particlesRendering'][_0x4862c6(0x261)]['segments']['geometry']=_0x1144fb;const _0x1b355e=Cesium$2['VertexArray'][_0x4862c6(0x19a)]({'context':this[_0x4862c6(0x19f)],'geometry':_0x1144fb,'attributeLocations':this['particlesRendering']['primitives'][_0x4862c6(0x1f7)]['attributeLocations'],'bufferUsage':Cesium$2[_0x4862c6(0x212)]['STATIC_DRAW']});(_0x5d1ab1=this['particlesRendering']['primitives'])!==null&&_0x5d1ab1!==void 0x0&&(_0x4826ff=_0x5d1ab1['segments'])!==null&&_0x4826ff!==void 0x0&&_0x4826ff[_0x4862c6(0x19e)]&&(this[_0x4862c6(0x1b2)]['primitives']['segments']['commandToExecute']['vertexArray']=_0x1b355e);}}[_0x4d081e(0x1ac)](_0x3b87cd){let _0x7386c2=![];this['options']['maxParticles']!==_0x3b87cd['maxParticles']&&(_0x7386c2=!![]),Object['keys'](_0x3b87cd)['forEach'](_0x33bc69=>{this['options'][_0x33bc69]=_0x3b87cd[_0x33bc69];}),this['refreshParticles'](_0x7386c2);}['applyViewerParameters'](_0x55cf8e){const _0x430c55=_0x4d081e;Object[_0x430c55(0x27d)](_0x55cf8e)['forEach'](_0x3a596a=>{this['viewerParameters'][_0x3a596a]=_0x55cf8e[_0x3a596a];}),this[_0x430c55(0x203)](![]);}[_0x4d081e(0x1b4)](){const _0x5e0464=_0x4d081e;clearTimeout(this['canrefresh']),this['particlesComputing']['destroyParticlesTextures'](),Object['keys'](this['particlesComputing']['windTextures'])['forEach'](_0x5b7c31=>{const _0x2c86fc=_0x4e28;this[_0x2c86fc(0x1f1)]['windTextures'][_0x5b7c31]['destroy']();}),this['particlesRendering']['textures']['colorTable'][_0x5e0464(0x1b4)](),Object['keys'](this['particlesRendering']['framebuffers'])['forEach'](_0xa42240=>{const _0x45e5ec=_0x5e0464;this[_0x45e5ec(0x1b2)]['framebuffers'][_0xa42240]['destroy']();});for(const _0x145716 in this){delete this[_0x145716];}}}const Cesium$1=mars3d__namespace['Cesium'],BaseLayer$1=mars3d__namespace[_0x4d081e(0x274)]['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(_0x5b92ef={}){_0x5b92ef={...DEF_OPTIONS,..._0x5b92ef},super(_0x5b92ef),this['_setOptionsHook'](_0x5b92ef);}get['layer'](){const _0x476b2d=_0x4d081e;return this[_0x476b2d(0x261)];}get['data'](){return this['_data'];}set['data'](_0x3d03f6){this['setData'](_0x3d03f6);}get['colors'](){return this['options']['colors'];}set['colors'](_0x258c6a){const _0x1bb215=_0x4d081e;this['options'][_0x1bb215(0x25f)]=_0x258c6a,this['particleSystem']&&this[_0x1bb215(0x234)]['setOptions']({'colors':_0x258c6a}),this['resize']();}[_0x4d081e(0x235)](){}['_addedHook'](){const _0x38937b=_0x4d081e;this['scene']=this['_map'][_0x38937b(0x236)],this['camera']=this[_0x38937b(0x246)]['camera'],this['primitives']=new Cesium$1['PrimitiveCollection'](),this['_map']['scene']['primitives']['add'](this['primitives']),this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this[_0x38937b(0x1da)]=new Cesium$1['BoundingSphere'](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this['updateViewerParameters'](),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x38937b(0x251)]['mouseUp'],this[_0x38937b(0x1f0)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x38937b(0x278)],this),this['_data']&&this['setData'](this[_0x38937b(0x24a)]);}['_removedHook'](){const _0x20816f=_0x4d081e;window[_0x20816f(0x24d)]('resize',this['resize']),this[_0x20816f(0x246)][_0x20816f(0x257)](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this[_0x20816f(0x246)][_0x20816f(0x257)](mars3d__namespace['EventType'][_0x20816f(0x1c8)],this[_0x20816f(0x27c)],this),this['_map']['off'](mars3d__namespace['EventType'][_0x20816f(0x1b8)],this['_onMouseUpEvent'],this),this[_0x20816f(0x246)]['off'](mars3d__namespace[_0x20816f(0x251)]['mouseMove'],this['_onMouseMoveEvent'],this),this['primitives'][_0x20816f(0x22d)](),this['_map']['scene']['primitives']['remove'](this['primitives']);}[_0x4d081e(0x232)](){const _0x2d19c9=_0x4d081e;if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this['primitives']['removeAll'](),this['_map']['once'](mars3d__namespace['EventType'][_0x2d19c9(0x23d)],this[_0x2d19c9(0x1d8)],this);}['_onMap_preRenderEvent'](_0x478ad0){const _0x2e723c=_0x4d081e;this['particleSystem'][_0x2e723c(0x247)](this['scene'][_0x2e723c(0x19f)]),this[_0x2e723c(0x1ab)](),this['primitives']['show']=!![];}['_onMapWhellEvent'](_0x2f0627){const _0x383bfe=_0x4d081e;clearTimeout(this[_0x383bfe(0x1fa)]);if(!this['show']||!this[_0x383bfe(0x234)])return;this['primitives']['show']=![],this['refreshTimer']=setTimeout(()=>{if(!this['show'])return;this['redraw']();},0xc8);}['_onMouseDownEvent'](_0x3bf371){this['mouse_down']=!![];}[_0x4d081e(0x278)](_0x409791){const _0x51a915=_0x4d081e;if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&(this[_0x51a915(0x261)]['show']=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x3c49b4){const _0x486c1a=_0x4d081e;if(!this['show']||!this['particleSystem'])return;this[_0x486c1a(0x1cb)]&&this[_0x486c1a(0x1ae)]&&this['redraw'](),this['primitives'][_0x486c1a(0x1f5)]=!![],this['mouse_down']=![],this['mouse_move']=![];}[_0x4d081e(0x25e)](){const _0x369cd5=_0x4d081e;if(!this['_map']||!this['show'])return;this['updateViewerParameters'](),this[_0x369cd5(0x234)][_0x369cd5(0x21b)](this['viewerParameters']),this['primitives'][_0x369cd5(0x1f5)]=!![];}['setData'](_0x5405d9){const _0x4d341a=_0x4d081e;this['_data']=_0x5405d9,this[_0x4d341a(0x234)]&&this['particleSystem']['destroy'](),this['particleSystem']=new ParticleSystem(this['scene'][_0x4d341a(0x19f)],_0x5405d9,this[_0x4d341a(0x23c)](),this[_0x4d341a(0x1a0)]),this['addPrimitives']();}['_setOptionsHook'](_0x1bb011,_0x2ab584){const _0x670129=_0x4d081e;if(_0x1bb011)for(const _0x12371b in _0x1bb011){this[_0x12371b]=_0x1bb011[_0x12371b];}this[_0x670129(0x234)]&&this['particleSystem']['setOptions'](this[_0x670129(0x23c)]());}[_0x4d081e(0x23c)](){const _0x2c36d8=_0x4d081e,_0xaa52ce=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this['particlesNumber']=_0xaa52ce*_0xaa52ce,{'particlesTextureSize':_0xaa52ce,'maxParticles':this[_0x2c36d8(0x217)],'particleHeight':this[_0x2c36d8(0x1ad)],'fadeOpacity':this['fadeOpacity'],'dropRate':this['dropRate'],'dropRateBump':this['dropRateBump'],'speedFactor':this['speedFactor'],'lineWidth':this[_0x2c36d8(0x1d1)],'colors':this['colors']};}['addPrimitives'](){const _0x26e45d=_0x4d081e;this[_0x26e45d(0x261)]['add'](this['particleSystem']['particlesComputing']['primitives']['getWind']),this['primitives'][_0x26e45d(0x1a2)](this['particleSystem']['particlesComputing'][_0x26e45d(0x261)]['updateSpeed']),this['primitives']['add'](this[_0x26e45d(0x234)]['particlesComputing']['primitives']['updatePosition']),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives'][_0x26e45d(0x27a)]),this['primitives']['add'](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this['primitives'][_0x26e45d(0x1a2)](this[_0x26e45d(0x234)]['particlesRendering'][_0x26e45d(0x261)]['segments']),this[_0x26e45d(0x261)]['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this['primitives']['add'](this['particleSystem']['particlesRendering'][_0x26e45d(0x261)][_0x26e45d(0x24e)]);}['updateViewerParameters'](){const _0x14cc6b=_0x4d081e;let _0x486e8f=this['camera'][_0x14cc6b(0x220)](this[_0x14cc6b(0x236)]['globe']['ellipsoid']);if(!_0x486e8f){const _0x233c85=this[_0x14cc6b(0x246)]['getExtent']();_0x486e8f=Cesium$1['Rectangle']['fromDegrees'](_0x233c85[_0x14cc6b(0x213)],_0x233c85['ymin'],_0x233c85[_0x14cc6b(0x229)],_0x233c85[_0x14cc6b(0x210)]);}const _0x297b25=Util[_0x14cc6b(0x224)](_0x486e8f);this['viewerParameters'][_0x14cc6b(0x1ca)]['x']=_0x297b25['lon']['min'],this[_0x14cc6b(0x1a0)][_0x14cc6b(0x1ca)]['y']=_0x297b25['lon']['max'],this[_0x14cc6b(0x1a0)][_0x14cc6b(0x1e1)]['x']=_0x297b25['lat']['min'],this['viewerParameters'][_0x14cc6b(0x1e1)]['y']=_0x297b25['lat']['max'];const _0x39c116=this['camera'][_0x14cc6b(0x1c1)](this[_0x14cc6b(0x1da)],this['scene']['drawingBufferWidth'],this[_0x14cc6b(0x236)]['drawingBufferHeight']);_0x39c116>0x0&&(this['viewerParameters']['pixelSize']=_0x39c116);}}mars3d__namespace[_0x4d081e(0x1b9)]['register']('wind',WindLayer),mars3d__namespace[_0x4d081e(0x274)][_0x4d081e(0x228)]=WindLayer;class CanvasParticle{constructor(){const _0x46ea71=_0x4d081e;this['lng']=null,this['lat']=null,this[_0x46ea71(0x23e)]=null,this[_0x46ea71(0x1bb)]=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0x1f0967 in this){delete this[_0x1f0967];}}}class CanvasWindField{constructor(_0x4b4c87){this['setOptions'](_0x4b4c87);}get['speedRate'](){const _0x1d2a0f=_0x4d081e;return this[_0x1d2a0f(0x198)];}set['speedRate'](_0x1644d8){const _0x242c64=_0x4d081e;this['_speedRate']=(0x64-(_0x1644d8>0x63?0x63:_0x1644d8))*0x64,this['_calc_speedRate']=[(this['xmax']-this['xmin'])/this['_speedRate'],(this[_0x242c64(0x210)]-this['ymin'])/this['_speedRate']];}get['maxAge'](){return this['_maxAge'];}set[_0x4d081e(0x20a)](_0xe2e2eb){this['_maxAge']=_0xe2e2eb;}['setOptions'](_0x214683){const _0x1b5afc=_0x4d081e;this['options']=_0x214683,this[_0x1b5afc(0x20a)]=_0x214683['maxAge']||0x78,this['speedRate']=_0x214683['speedRate']||0x32,this[_0x1b5afc(0x252)]=[];const _0x405d2a=_0x214683[_0x1b5afc(0x217)]||0x1000;for(let _0x1f1ce5=0x0;_0x1f1ce5<_0x405d2a;_0x1f1ce5++){const _0x277a9a=this[_0x1b5afc(0x1df)](new CanvasParticle());this['particles']['push'](_0x277a9a);}}[_0x4d081e(0x273)](_0x494b43){const _0x27b954=_0x4d081e;this['rows']=_0x494b43[_0x27b954(0x1c3)],this[_0x27b954(0x22f)]=_0x494b43[_0x27b954(0x22f)],this[_0x27b954(0x213)]=_0x494b43[_0x27b954(0x213)],this[_0x27b954(0x229)]=_0x494b43['xmax'],this['ymin']=_0x494b43[_0x27b954(0x26d)],this['ymax']=_0x494b43[_0x27b954(0x210)],this['grid']=[];const _0x2ac3a1=_0x494b43['udata'],_0x3af1d9=_0x494b43['vdata'];let _0x2a0a14=![];_0x2ac3a1[_0x27b954(0x233)]===this['rows']&&_0x2ac3a1[0x0]['length']===this['cols']&&(_0x2a0a14=!![]);let _0x24159f=0x0,_0x1014da=null,_0x10ceb3=null;for(let _0x15a40e=0x0;_0x15a40e<this['rows'];_0x15a40e++){_0x1014da=[];for(let _0x38be82=0x0;_0x38be82<this[_0x27b954(0x22f)];_0x38be82++,_0x24159f++){_0x2a0a14?_0x10ceb3=this['_calcUV'](_0x2ac3a1[_0x15a40e][_0x38be82],_0x3af1d9[_0x15a40e][_0x38be82]):_0x10ceb3=this['_calcUV'](_0x2ac3a1[_0x24159f],_0x3af1d9[_0x24159f]),_0x1014da[_0x27b954(0x270)](_0x10ceb3);}this['grid'][_0x27b954(0x270)](_0x1014da);}this['options']['reverseY']&&this['grid']['reverse']();}[_0x4d081e(0x21c)](){const _0x33a5d3=_0x4d081e;delete this['rows'],delete this['cols'],delete this[_0x33a5d3(0x213)],delete this['xmax'],delete this[_0x33a5d3(0x26d)],delete this['ymax'],delete this['grid'],delete this['particles'];}[_0x4d081e(0x223)](_0x283a15,_0xabad6c){const _0x4cc4e5=_0x4d081e,_0x2c2fb6=(_0x283a15-this[_0x4cc4e5(0x213)])/(this[_0x4cc4e5(0x229)]-this['xmin'])*(this[_0x4cc4e5(0x22f)]-0x1),_0x8bbbc3=(this['ymax']-_0xabad6c)/(this[_0x4cc4e5(0x210)]-this[_0x4cc4e5(0x26d)])*(this['rows']-0x1);return[_0x2c2fb6,_0x8bbbc3];}[_0x4d081e(0x199)](_0x31eca9,_0x5a5d22){const _0x14addb=_0x4d081e;if(_0x31eca9<0x0||_0x31eca9>=this['cols']||_0x5a5d22>=this['rows'])return[0x0,0x0,0x0];const _0x8ac5fb=Math['floor'](_0x31eca9),_0xf491aa=Math['floor'](_0x5a5d22);if(_0x8ac5fb===_0x31eca9&&_0xf491aa===_0x5a5d22)return this['grid'][_0x5a5d22][_0x31eca9];const _0x9c65f7=_0x8ac5fb+0x1,_0x1211a6=_0xf491aa+0x1,_0x4c05ae=this[_0x14addb(0x199)](_0x8ac5fb,_0xf491aa),_0x45a120=this[_0x14addb(0x199)](_0x9c65f7,_0xf491aa),_0x42bd19=this[_0x14addb(0x199)](_0x8ac5fb,_0x1211a6),_0x1258f2=this['getUVByXY'](_0x9c65f7,_0x1211a6);let _0x225a01=null;try{_0x225a01=this[_0x14addb(0x1de)](_0x31eca9-_0x8ac5fb,_0x5a5d22-_0xf491aa,_0x4c05ae,_0x45a120,_0x42bd19,_0x1258f2);}catch(_0x48e938){console['log'](_0x31eca9,_0x5a5d22);}return _0x225a01;}[_0x4d081e(0x1de)](_0x53f604,_0x2a21c5,_0xdada1f,_0x255d53,_0x3d7f96,_0x2970d5){const _0x5372c5=0x1-_0x53f604,_0x396372=0x1-_0x2a21c5,_0x30c2ba=_0x5372c5*_0x396372,_0x21e82b=_0x53f604*_0x396372,_0x3656b7=_0x5372c5*_0x2a21c5,_0x319824=_0x53f604*_0x2a21c5,_0x4e615a=_0xdada1f[0x0]*_0x30c2ba+_0x255d53[0x0]*_0x21e82b+_0x3d7f96[0x0]*_0x3656b7+_0x2970d5[0x0]*_0x319824,_0x22dcab=_0xdada1f[0x1]*_0x30c2ba+_0x255d53[0x1]*_0x21e82b+_0x3d7f96[0x1]*_0x3656b7+_0x2970d5[0x1]*_0x319824;return this['_calcUV'](_0x4e615a,_0x22dcab);}['_calcUV'](_0x380c1e,_0x6f2229){const _0x45c250=_0x4d081e;return[+_0x380c1e,+_0x6f2229,Math[_0x45c250(0x1af)](_0x380c1e*_0x380c1e+_0x6f2229*_0x6f2229)];}['getUVByPoint'](_0x150af5,_0x95f32a){const _0x10eb2e=_0x4d081e;if(!this[_0x10eb2e(0x1aa)](_0x150af5,_0x95f32a))return null;const _0x25ee40=this['toGridXY'](_0x150af5,_0x95f32a),_0x99bcf9=this[_0x10eb2e(0x199)](_0x25ee40[0x0],_0x25ee40[0x1]);return _0x99bcf9;}['isInExtent'](_0x35766f,_0x4ccc6e){const _0x3380c4=_0x4d081e;return _0x35766f>=this['xmin']&&_0x35766f<=this[_0x3380c4(0x229)]&&_0x4ccc6e>=this['ymin']&&_0x4ccc6e<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x341ead=fRandomByfloat(this['xmin'],this['xmax']),_0x1119f1=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x1119f1,'lng':_0x341ead};}['getParticles'](){const _0x18a4a6=_0x4d081e;let _0x5d3dea,_0x2c5c96,_0x4f574e;for(let _0x512630=0x0,_0x383379=this[_0x18a4a6(0x252)]['length'];_0x512630<_0x383379;_0x512630++){let _0x2d9e05=this[_0x18a4a6(0x252)][_0x512630];_0x2d9e05['age']<=0x0&&(_0x2d9e05=this['_randomParticle'](_0x2d9e05));if(_0x2d9e05[_0x18a4a6(0x1ea)]>0x0){const _0x507243=_0x2d9e05['tlng'],_0x1c6971=_0x2d9e05['tlat'];_0x4f574e=this['getUVByPoint'](_0x507243,_0x1c6971),_0x4f574e?(_0x5d3dea=_0x507243+this['_calc_speedRate'][0x0]*_0x4f574e[0x0],_0x2c5c96=_0x1c6971+this['_calc_speedRate'][0x1]*_0x4f574e[0x1],_0x2d9e05['lng']=_0x507243,_0x2d9e05['lat']=_0x1c6971,_0x2d9e05['tlng']=_0x5d3dea,_0x2d9e05['tlat']=_0x2c5c96,_0x2d9e05['speed']=_0x4f574e[0x2],_0x2d9e05[_0x18a4a6(0x1ea)]--):_0x2d9e05['age']=0x0;}}return this['particles'];}[_0x4d081e(0x1df)](_0x7db3ba){const _0x2da08e=_0x4d081e;let _0x261e7a,_0x3908f4;for(let _0x31ea2b=0x0;_0x31ea2b<0x1e;_0x31ea2b++){_0x261e7a=this['getRandomLatLng'](),_0x3908f4=this[_0x2da08e(0x21d)](_0x261e7a['lng'],_0x261e7a['lat']);if(_0x3908f4&&_0x3908f4[0x2]>0x0)break;}if(!_0x3908f4)return _0x7db3ba;const _0x54c4cd=_0x261e7a['lng']+this['_calc_speedRate'][0x0]*_0x3908f4[0x0],_0x4f83e8=_0x261e7a['lat']+this['_calc_speedRate'][0x1]*_0x3908f4[0x1];return _0x7db3ba[_0x2da08e(0x208)]=_0x261e7a['lng'],_0x7db3ba[_0x2da08e(0x258)]=_0x261e7a['lat'],_0x7db3ba['tlng']=_0x54c4cd,_0x7db3ba[_0x2da08e(0x1bb)]=_0x4f83e8,_0x7db3ba['age']=Math['round'](Math['random']()*this['maxAge']),_0x7db3ba['speed']=_0x3908f4[0x2],_0x7db3ba;}['destroy'](){for(const _0x28b511 in this){delete this[_0x28b511];}}}function fRandomByfloat(_0x505736,_0x5614bd){return _0x505736+Math['random']()*(_0x5614bd-_0x505736);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0x4d081e(0x222)];class CanvasWindLayer extends BaseLayer{constructor(_0x1e27f4={}){const _0x4b5a99=_0x4d081e;super(_0x1e27f4),this['_setOptionsHook'](_0x1e27f4),this[_0x4b5a99(0x1be)]=null,_0x1e27f4['colors']&&_0x1e27f4['steps']&&(this[_0x4b5a99(0x1e6)]=new mars3d__namespace['ColorRamp'](_0x1e27f4));}['_setOptionsHook'](_0x372118,_0x1050a2){const _0x42e3b4=_0x4d081e;this['frameTime']=0x3e8/(_0x372118['frameRate']||0xa),this['_pointerEvents']=this['options']['pointerEvents']??![],this['color']=_0x372118['color']||'#ffffff',this['lineWidth']=_0x372118['lineWidth']||0x1,this[_0x42e3b4(0x1ad)]=_0x372118['fixedHeight']??0x0,this['reverseY']=_0x372118['reverseY']??![],this[_0x42e3b4(0x279)]&&this[_0x42e3b4(0x279)][_0x42e3b4(0x1ac)](_0x372118);}get['layer'](){const _0x41f801=_0x4d081e;return this[_0x41f801(0x1be)];}get['canvasWidth'](){const _0x4b82d3=_0x4d081e;return this[_0x4b82d3(0x246)][_0x4b82d3(0x236)]['canvas']['clientWidth'];}get['canvasHeight'](){const _0x3dc44e=_0x4d081e;return this['_map'][_0x3dc44e(0x236)]['canvas']['clientHeight'];}get['pointerEvents'](){const _0x10aa53=_0x4d081e;return this[_0x10aa53(0x1d3)];}set['pointerEvents'](_0x16f242){const _0x22e4e2=_0x4d081e;this['_pointerEvents']=_0x16f242;if(!this['canvas'])return;_0x16f242?this['canvas']['style']['pointer-events']=_0x22e4e2(0x1ba):this['canvas'][_0x22e4e2(0x1e5)]['pointer-events']='none';}get['particlesNumber'](){return this['options']['particlesNumber'];}set['particlesNumber'](_0x25b99c){const _0x462cac=_0x4d081e;this[_0x462cac(0x1e0)]['particlesNumber']=_0x25b99c,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set[_0x4d081e(0x1d0)](_0x344e2d){const _0x3c5cd1=_0x4d081e;this[_0x3c5cd1(0x1e0)][_0x3c5cd1(0x1d0)]=_0x344e2d,this['windField']&&(this['windField']['speedRate']=_0x344e2d);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x19a807){const _0x3fa8fd=_0x4d081e;this[_0x3fa8fd(0x1e0)][_0x3fa8fd(0x20a)]=_0x19a807,this['windField']&&(this['windField']['maxAge']=_0x19a807);}get['data'](){return this['windData'];}set['data'](_0x38fb94){const _0x1cee07=_0x4d081e;this[_0x1cee07(0x1bf)](_0x38fb94);}[_0x4d081e(0x267)](_0x2df999){const _0x454911=_0x4d081e;_0x2df999?this['_addedHook']():(this['windData']&&(this['options'][_0x454911(0x1eb)]=this[_0x454911(0x1f6)]),this['_removedHook']());}['_mountedHook'](){const _0x34ecc3=_0x4d081e;this[_0x34ecc3(0x1e0)]['worker']?this['initWorker']():this[_0x34ecc3(0x279)]=new CanvasWindField(this['options']);}['_addedHook'](){const _0x2877a9=_0x4d081e;this['canvas']=this['_createCanvas'](),this[_0x2877a9(0x266)]=this[_0x2877a9(0x1be)]['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options']['data']&&this['setData'](this['options'][_0x2877a9(0x1eb)]);}['_removedHook'](){const _0x50f746=_0x4d081e;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container']['removeChild'](this[_0x50f746(0x1be)]),delete this['canvas']);}['_createCanvas'](){const _0x45512a=_0x4d081e,_0x3435a9=mars3d__namespace['DomUtil']['create'](_0x45512a(0x1be),_0x45512a(0x1a5),this['_map']['container']);return _0x3435a9['style'][_0x45512a(0x230)]=_0x45512a(0x1cc),_0x3435a9['style']['top']='0px',_0x3435a9['style']['left']=_0x45512a(0x1b3),_0x3435a9[_0x45512a(0x1e5)]['width']=this['_map']['scene']['canvas'][_0x45512a(0x231)]+'px',_0x3435a9[_0x45512a(0x1e5)]['height']=this[_0x45512a(0x246)][_0x45512a(0x236)]['canvas']['clientHeight']+'px',_0x3435a9['style'][_0x45512a(0x23f)]=this['_pointerEvents']?'auto':'none',_0x3435a9['style']['zIndex']=this['options']['zIndex']??0x9,_0x3435a9[_0x45512a(0x25b)]=this['_map'][_0x45512a(0x236)]['canvas'][_0x45512a(0x231)],_0x3435a9[_0x45512a(0x23b)]=this[_0x45512a(0x246)]['scene']['canvas']['clientHeight'],_0x3435a9;}['resize'](){const _0x4ea2e1=_0x4d081e;this['canvas']&&(this[_0x4ea2e1(0x1be)]['style']['width']=this['_map']['scene'][_0x4ea2e1(0x1be)]['clientWidth']+'px',this['canvas']['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',this[_0x4ea2e1(0x1be)][_0x4ea2e1(0x25b)]=this['_map']['scene'][_0x4ea2e1(0x1be)]['clientWidth'],this['canvas'][_0x4ea2e1(0x23b)]=this['_map'][_0x4ea2e1(0x236)]['canvas']['clientHeight']);}['bindEvent'](){const _0x399d96=_0x4d081e,_0x58536f=this;let _0x160e28=Date['now']();(function _0x3b4d09(){const _0x547651=_0x4e28;_0x58536f[_0x547651(0x226)]=window['requestAnimationFrame'](_0x3b4d09);if(_0x58536f[_0x547651(0x1f5)]&&_0x58536f[_0x547651(0x279)]){const _0x1d939b=Date[_0x547651(0x259)](),_0x1e79a9=_0x1d939b-_0x160e28;_0x1e79a9>_0x58536f['frameTime']&&(_0x160e28=_0x1d939b-_0x1e79a9%_0x58536f[_0x547651(0x1c4)],_0x58536f[_0x547651(0x206)]());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options'][_0x399d96(0x272)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this[_0x399d96(0x246)]['on'](mars3d__namespace['EventType'][_0x399d96(0x1b8)],this['_onMouseUpEvent'],this)));}[_0x4d081e(0x1c6)](){const _0x1664c6=_0x4d081e;window['cancelAnimationFrame'](this['animateFrame']),delete this['animateFrame'],window[_0x1664c6(0x24d)](_0x1664c6(0x232),this['resize']),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace['EventType'][_0x1664c6(0x20e)],this[_0x1664c6(0x268)],this),this['_map'][_0x1664c6(0x257)](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map'][_0x1664c6(0x257)](mars3d__namespace[_0x1664c6(0x251)]['mouseUp'],this[_0x1664c6(0x1f0)],this),this['_map'][_0x1664c6(0x257)](mars3d__namespace[_0x1664c6(0x251)]['mouseMove'],this['_onMouseMoveEvent'],this));}[_0x4d081e(0x268)](_0x3507b5){const _0x5b4626=_0x4d081e;clearTimeout(this[_0x5b4626(0x1fa)]);if(!this[_0x5b4626(0x1f5)]||!this[_0x5b4626(0x1be)])return;this['canvas'][_0x5b4626(0x1e5)]['visibility']='hidden',this[_0x5b4626(0x1fa)]=setTimeout(()=>{const _0x4fa7ca=_0x5b4626;if(!this[_0x4fa7ca(0x1f5)])return;this[_0x4fa7ca(0x25e)](),this['canvas']['style']['visibility']=_0x4fa7ca(0x218);},0xc8);}['_onMouseDownEvent'](_0x1d112e){const _0x2dacc5=_0x4d081e;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace[_0x2dacc5(0x251)]['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0x3fe26e){const _0x458f65=_0x4d081e;if(!this['show']||!this['canvas'])return;this['mouse_down']&&(this[_0x458f65(0x1be)]['style']['visibility']='hidden',this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x3c2728){const _0x731f34=_0x4d081e;if(!this['show']||!this[_0x731f34(0x1be)])return;this[_0x731f34(0x246)][_0x731f34(0x257)](mars3d__namespace['EventType'][_0x731f34(0x1e9)],this['_onMouseMoveEvent'],this),this['mouse_down']&&this[_0x731f34(0x1ae)]&&this['redraw'](),this['canvas'][_0x731f34(0x1e5)][_0x731f34(0x26a)]='visible',this[_0x731f34(0x1cb)]=![],this['mouse_move']=![];}[_0x4d081e(0x1bf)](_0x36ac04){const _0x267b0d=_0x4d081e;this['clear'](),this['windData']=_0x36ac04,this['windField']['setDate'](_0x36ac04),this[_0x267b0d(0x25e)]();}['redraw'](){const _0x388821=_0x4d081e;if(!this['show'])return;this['windField']['setOptions'](this[_0x388821(0x1e0)]),this['update']();}[_0x4d081e(0x206)](){const _0x2ebd74=_0x4d081e;if(this[_0x2ebd74(0x26e)])return;this[_0x2ebd74(0x26e)]=!![];if(this['worker'])this['windField']['update']();else{const _0x343698=this[_0x2ebd74(0x279)]['getParticles']();this['_drawLines'](_0x343698);}this['_updateIng']=![];}['_drawLines'](_0x294e1d){const _0x1b8d44=_0x4d081e;this['canvasContext']['globalCompositeOperation']='destination-in',this[_0x1b8d44(0x266)][_0x1b8d44(0x1d5)](0x0,0x0,this[_0x1b8d44(0x1d2)],this[_0x1b8d44(0x1bd)]),this[_0x1b8d44(0x266)]['globalCompositeOperation']='lighter',this[_0x1b8d44(0x266)][_0x1b8d44(0x22c)]=0.9;const _0x263767=this['_map']['scene']['mode']!==Cesium['SceneMode']['SCENE3D'],_0x5ab03b=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x13c230=0x0,_0x34e38c=_0x294e1d[_0x1b8d44(0x233)];_0x13c230<_0x34e38c;_0x13c230++){const _0x57b7d3=_0x294e1d[_0x13c230],_0x10e76e=this[_0x1b8d44(0x1b7)](_0x57b7d3[_0x1b8d44(0x208)],_0x57b7d3['lat'],_0x57b7d3),_0xa4ab22=this[_0x1b8d44(0x1b7)](_0x57b7d3['tlng'],_0x57b7d3[_0x1b8d44(0x1bb)],_0x57b7d3);if(!_0x10e76e||!_0xa4ab22)continue;if(_0x263767&&Math['abs'](_0x10e76e[0x0]-_0xa4ab22[0x0])>=_0x5ab03b)continue;this[_0x1b8d44(0x266)]['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this[_0x1b8d44(0x266)]['strokeStyle']=this['_colorRamp']['getColor'](_0x57b7d3['speed']),this['canvasContext']['moveTo'](_0x10e76e[0x0],_0x10e76e[0x1]),this['canvasContext'][_0x1b8d44(0x19c)](_0xa4ab22[0x0],_0xa4ab22[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext']['beginPath'](),this['canvasContext']['lineWidth']=this[_0x1b8d44(0x1d1)],this['canvasContext']['strokeStyle']=this['color'];for(let _0x26fd41=0x0,_0x4a5287=_0x294e1d[_0x1b8d44(0x233)];_0x26fd41<_0x4a5287;_0x26fd41++){const _0x15468a=_0x294e1d[_0x26fd41],_0x2392cf=this['_tomap'](_0x15468a[_0x1b8d44(0x208)],_0x15468a[_0x1b8d44(0x258)],_0x15468a),_0xfbd96d=this['_tomap'](_0x15468a[_0x1b8d44(0x23e)],_0x15468a['tlat'],_0x15468a);if(!_0x2392cf||!_0xfbd96d)continue;if(_0x263767&&Math['abs'](_0x2392cf[0x0]-_0xfbd96d[0x0])>=_0x5ab03b)continue;this['canvasContext']['moveTo'](_0x2392cf[0x0],_0x2392cf[0x1]),this['canvasContext']['lineTo'](_0xfbd96d[0x0],_0xfbd96d[0x1]);}this['canvasContext']['stroke']();}}['_tomap'](_0x2745f8,_0x528211,_0x41e22a){const _0xa95081=_0x4d081e,_0x156009=Cesium['Cartesian3']['fromDegrees'](_0x2745f8,_0x528211,this['fixedHeight']),_0x3b20e8=this['_map']['scene'];if(_0x3b20e8['mode']===Cesium['SceneMode']['SCENE3D']){const _0x4aabd8=new Cesium[(_0xa95081(0x1e7))](_0x3b20e8[_0xa95081(0x21e)]['ellipsoid'],_0x3b20e8['camera']['positionWC']),_0x7dc48=_0x4aabd8['isPointVisible'](_0x156009);if(!_0x7dc48)return _0x41e22a['age']=0x0,null;}const _0x4c33fd=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map']['scene'],_0x156009);return _0x4c33fd?[_0x4c33fd['x'],_0x4c33fd['y']]:null;}['clear'](){this['windField']['clear'](),delete this['windData'];}['initWorker'](){const _0x3d4279=_0x4d081e;this[_0x3d4279(0x1e3)]=new Worker(this[_0x3d4279(0x1e0)]['worker']),this['worker'][_0x3d4279(0x1fc)]=_0x12bef4=>{const _0x342c6e=_0x3d4279;this['_drawLines'](_0x12bef4['data'][_0x342c6e(0x252)]),this['_updateIng2']=![];},this[_0x3d4279(0x279)]={'init':_0x259d63=>{const _0x30d96b=_0x3d4279;this[_0x30d96b(0x1e3)]['postMessage']({'type':'init','options':_0x259d63});},'setOptions':_0x355c42=>{const _0x391fbe=_0x3d4279;this[_0x391fbe(0x1e3)][_0x391fbe(0x1fd)]({'type':'setOptions','options':_0x355c42});},'setDate':_0x1fa720=>{const _0x104e30=_0x3d4279;this[_0x104e30(0x1e3)][_0x104e30(0x1fd)]({'type':'setDate','data':_0x1fa720});},'update':()=>{const _0x534ef6=_0x3d4279;if(this['_updateIng2'])return;this[_0x534ef6(0x1dd)]=!![],this['worker']['postMessage']({'type':_0x534ef6(0x206)});},'clear':()=>{const _0xb065d9=_0x3d4279;this[_0xb065d9(0x1e3)]['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register'](_0x4d081e(0x276),CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace[_0x4d081e(0x1ce)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x4d081e(0x228)]=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x5cbd89=_0x47ce;(function(_0x503d77,_0x1e7b97){const _0x4878ba=_0x47ce,_0x8ac92f=_0x503d77();while(!![]){try{const _0x32e65f=-parseInt(_0x4878ba(0x25b))/0x1*(parseInt(_0x4878ba(0x1d5))/0x2)+-parseInt(_0x4878ba(0x2a2))/0x3*(parseInt(_0x4878ba(0x20b))/0x4)+-parseInt(_0x4878ba(0x218))/0x5+parseInt(_0x4878ba(0x2c0))/0x6*(-parseInt(_0x4878ba(0x266))/0x7)+parseInt(_0x4878ba(0x24b))/0x8+-parseInt(_0x4878ba(0x21a))/0x9*(-parseInt(_0x4878ba(0x2b5))/0xa)+parseInt(_0x4878ba(0x1d3))/0xb;if(_0x32e65f===_0x1e7b97)break;else _0x8ac92f['push'](_0x8ac92f['shift']());}catch(_0x529643){_0x8ac92f['push'](_0x8ac92f['shift']());}}}(_0x20e2,0x6d16d));function _interopNamespace(_0x15d551){const _0x521021=_0x47ce;if(_0x15d551&&_0x15d551['__esModule'])return _0x15d551;var _0x13616c=Object[_0x521021(0x1c9)](null);return _0x15d551&&Object['keys'](_0x15d551)[_0x521021(0x29a)](function(_0x4d83a0){const _0x29c1ff=_0x521021;if(_0x4d83a0!=='default'){var _0x4d5c38=Object[_0x29c1ff(0x25d)](_0x15d551,_0x4d83a0);Object['defineProperty'](_0x13616c,_0x4d83a0,_0x4d5c38[_0x29c1ff(0x2bb)]?_0x4d5c38:{'enumerable':!![],'get':function(){return _0x15d551[_0x4d83a0];}});}}),_0x13616c['default']=_0x15d551,_0x13616c;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x5c8702,_0x571ae8){const _0x79303b=_0x5c8702*Math['cos'](Cesium$7['Math']['toRadians'](_0x571ae8));return _0x79303b;}function getV(_0x3a837a,_0x15508c){const _0x2bb2e8=_0x47ce,_0x2c302f=_0x3a837a*Math[_0x2bb2e8(0x29b)](Cesium$7['Math']['toRadians'](_0x15508c));return _0x2c302f;}function getSpeed(_0x42a875,_0x51a0a0){const _0x31d3a9=_0x47ce,_0x30d5f1=Math[_0x31d3a9(0x26c)](Math['pow'](_0x42a875,0x2)+Math['pow'](_0x51a0a0,0x2));return _0x30d5f1;}function getDirection(_0x4ec706,_0x2267c0){let _0x37c2dd=Cesium$7['Math']['toDegrees'](Math['atan2'](_0x2267c0,_0x4ec706));return _0x37c2dd+=_0x37c2dd<0x0?0x168:0x0,_0x37c2dd;}function _0x47ce(_0x1cc9d3,_0x5c7a81){const _0x20e213=_0x20e2();return _0x47ce=function(_0x47ce64,_0x2bc8b9){_0x47ce64=_0x47ce64-0x1c9;let _0x279539=_0x20e213[_0x47ce64];return _0x279539;},_0x47ce(_0x1cc9d3,_0x5c7a81);}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace[_0x5cbd89(0x260)];function _0x20e2(){const _0x50fa5=['geometry','Texture','north','clear','frameTime','destroyParticlesTextures','BufferUsage','viewerParameters','beginPath','segments','abs','unbindEvent','bindEvent','204UbfvMq','Sampler','clientWidth','length','canvasContext','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','outputTexture','getOptions','_createCanvas','Cartesian3','Math','show','setData','1780675JPoGqs','fragmentShaderSource','9YivTUl','getExtent','randomBetween','//\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','UNSIGNED_BYTE','primitiveType','colorTable','update','mouseDown','keys','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','updateSpeed','container','scene','BoundingSphere','lon','NEAREST','DISABLE_GL_POSITION_LOG_DEPTH','vmax','addPrimitives','segmentsDepth','updatePosition','isInExtent','udata','_pointerEvents','mouse_down','array','segmentsColor','speedRate','DepthFunction','none','particlesRendering','defined','commandToExecute','TRIANGLES','viewport','CanvasWindLayer','GeometryAttributes','log','randomizeParticles','maxAge','clampToLatitudeRange','uniformMap','shaderProgram','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','applyViewerParameters','tlat','wheel','createFramebuffer','5064920BuIHTi','getUVByPoint','framebuffer','vdata','style','xmin','OPAQUE','globeBoundingSphere','drawingBufferHeight','pixelSize','_data','grid','options','particleSystem','lonRange','updateViewerParameters','397988AJjARD','destroy','getOwnPropertyDescriptor','canvas','add','Cesium','windTextures','createTexture','drawingBufferWidth','PrimitiveType','FLOAT','378qIiPvF','max','height','canrefresh','getColorTexture','toDegrees','sqrt','Color','particleHeight','nextTrails','_onMapWhellEvent','data','TextureMagnificationFilter','createRawRenderState','tlng','visible','initWorker','IDENTITY','_setOptionsHook','particlesComputing','nextParticlesPosition','postProcessingSpeed','left','_randomParticle','preExecute','Draw','floor','fixedHeight','speed','mouseMove','particlesTextureSize','primitives','particlesTextures','autoClear','canvasWidth','maxParticles','particles','_onMouseUpEvent','clientHeight','mouse_move','clearCommand','createParticlesTextures','CanvasWindField','resize','visibility','depthTest','Framebuffer','width','removeEventListener','min','_updateIng2','createWindTextures','forEach','sin','createRenderingTextures','getParticles','hidden','color','ShaderSource','off','6057FBJSey','DomUtil','cols','Geometry','ymax','textures','DEPTH_COMPONENT','Compute','camera','dimensions','ComponentDatatype','dropRate','layer','DrawCommand','moveTo','_calcUV','push','_removedHook','createCommand','4888960BTAooc','_updateIng','fromDegrees','wind','south','windField','get','getRandomLatLng','DISABLE_LOG_DEPTH_FRAGMENT_WRITE','refreshTimer','0px','15354zChoHr','lat','_drawLines','mouseUp','create','mouseHidden','SCENE3D','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','getUVByXY','redraw','PixelFormat','setGeometry','attributeLocations','windData','7898924CZPHXP','LUMINANCE','4btCsXa','TWO_PI','Cartesian2','_calc_speedRate','lng','mode','setOptions','particlesWind','vertexShaderSource','SceneMode','vertexArray','context','_onMouseMoveEvent','GeometryAttribute','setDate','lineWidth','framebuffers','LayerUtil','commandType','speedFactor','currentParticlesSpeed','random','RGBA','worker','_map','PixelDatatype','ymin','cancelAnimationFrame','particlesNumber','_onMap_preRenderEvent','EventType','_colorRamp','RenderState','mod','Appearance','currentParticlesPosition','getWind','fadeOpacity','defineProperty','fromGeometry','red'];_0x20e2=function(){return _0x50fa5;};return _0x20e2();}class CustomPrimitive{constructor(_0x3eed0e){const _0x60688e=_0x5cbd89;this[_0x60688e(0x1e7)]=_0x3eed0e['commandType'],this['geometry']=_0x3eed0e[_0x60688e(0x1fe)],this[_0x60688e(0x1d1)]=_0x3eed0e['attributeLocations'],this['primitiveType']=_0x3eed0e[_0x60688e(0x21f)],this[_0x60688e(0x244)]=_0x3eed0e['uniformMap'],this['vertexShaderSource']=_0x3eed0e['vertexShaderSource'],this[_0x60688e(0x219)]=_0x3eed0e[_0x60688e(0x219)],this['rawRenderState']=_0x3eed0e['rawRenderState'],this[_0x60688e(0x24d)]=_0x3eed0e[_0x60688e(0x24d)],this[_0x60688e(0x211)]=_0x3eed0e['outputTexture'],this['autoClear']=_0x3eed0e['autoClear']??![],this['preExecute']=_0x3eed0e['preExecute'],this[_0x60688e(0x216)]=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this[_0x60688e(0x287)]&&(this[_0x60688e(0x28e)]=new Cesium$6['ClearCommand']({'color':new Cesium$6[(_0x60688e(0x26d))](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}['createCommand'](_0x227f34){const _0x48416a=_0x5cbd89;switch(this['commandType']){case'Draw':{const _0x55fd67=Cesium$6['VertexArray']['fromGeometry']({'context':_0x227f34,'geometry':this[_0x48416a(0x1fe)],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x4d32f0=Cesium$6['ShaderProgram']['fromCache']({'context':_0x227f34,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this[_0x48416a(0x1dd)],'fragmentShaderSource':this['fragmentShaderSource']}),_0x298cbd=Cesium$6[_0x48416a(0x1f5)]['fromCache'](this['rawRenderState']);return new Cesium$6[(_0x48416a(0x2af))]({'primitiveType':this['primitiveType'],'shaderProgram':_0x4d32f0,'vertexArray':_0x55fd67,'modelMatrix':Cesium$6['Matrix4'][_0x48416a(0x277)],'renderState':_0x298cbd,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass'][_0x48416a(0x251)],'pickOnly':!![],'owner':this});}case _0x48416a(0x2a9):{return new Cesium$6['ComputeCommand']({'owner':this,'fragmentShaderSource':this[_0x48416a(0x219)],'uniformMap':this['uniformMap'],'outputTexture':this[_0x48416a(0x211)],'persists':!![]});}}}[_0x5cbd89(0x1d0)](_0x1abd28,_0x40fcbd){const _0xa41d79=_0x5cbd89;this[_0xa41d79(0x1fe)]=_0x40fcbd;const _0x56eab3=Cesium$6['VertexArray'][_0xa41d79(0x1fc)]({'context':_0x1abd28,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':Cesium$6[_0xa41d79(0x204)]['STATIC_DRAW']});this['commandToExecute']['vertexArray']=_0x56eab3;}['update'](_0x393643){const _0x391356=_0x5cbd89;if(!this['show'])return;if(_0x393643[_0x391356(0x1da)]!==Cesium$6[_0x391356(0x1de)]['SCENE3D'])return;!Cesium$6[_0x391356(0x23a)](this['commandToExecute'])&&(this[_0x391356(0x23b)]=this[_0x391356(0x2b4)](_0x393643[_0x391356(0x1e0)])),Cesium$6['defined'](this[_0x391356(0x27e)])&&this[_0x391356(0x27e)](),Cesium$6[_0x391356(0x23a)](this['clearCommand'])&&_0x393643['commandList']['push'](this['clearCommand']),_0x393643['commandList']['push'](this['commandToExecute']);}['isDestroyed'](){return![];}[_0x5cbd89(0x25c)](){const _0x118d51=_0x5cbd89;if(this[_0x118d51(0x28e)]){var _0x320432,_0xc6f9ba;(_0x320432=this[_0x118d51(0x28e)])!==null&&_0x320432!==void 0x0&&_0x320432['vertexArray']&&this['clearCommand']['vertexArray'][_0x118d51(0x25c)](),(_0xc6f9ba=this[_0x118d51(0x28e)])!==null&&_0xc6f9ba!==void 0x0&&_0xc6f9ba[_0x118d51(0x245)]&&this['clearCommand']['shaderProgram']['destroy'](),delete this[_0x118d51(0x28e)];}return this['commandToExecute']&&(this['commandToExecute'][_0x118d51(0x1df)]&&this['commandToExecute']['vertexArray']['destroy'](),this['commandToExecute']['shaderProgram']&&this['commandToExecute'][_0x118d51(0x245)][_0x118d51(0x25c)](),delete this['commandToExecute']),Cesium$6['destroyObject'](this);}}const Cesium$5=mars3d__namespace['Cesium'],Util=(function(){const _0x360981=function(){const _0xba6afe=_0x47ce,_0x6c7535=new Cesium$5['Geometry']({'attributes':new Cesium$5[(_0xba6afe(0x23f))]({'position':new Cesium$5[(_0xba6afe(0x1e2))]({'componentDatatype':Cesium$5[_0xba6afe(0x2ac)][_0xba6afe(0x265)],'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']['FLOAT'],'componentsPerAttribute':0x2,'values':new Float32Array([0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x1])})}),'indices':new Uint32Array([0x3,0x2,0x0,0x0,0x2,0x1])});return _0x6c7535;},_0x4fcfd3=function(_0x1231e7,_0x30cdda){const _0xf9312=_0x47ce;if(Cesium$5['defined'](_0x30cdda)){const _0x22a6f6={};_0x22a6f6['arrayBufferView']=_0x30cdda,_0x1231e7['source']=_0x22a6f6;}const _0x42dfa3=new Cesium$5[(_0xf9312(0x1ff))](_0x1231e7);return _0x42dfa3;},_0xbeb86a=function(_0x689c6d,_0x22f482,_0x1a32d9){const _0x5f24d5=_0x47ce,_0x2d79f3=new Cesium$5[(_0x5f24d5(0x294))]({'context':_0x689c6d,'colorTextures':[_0x22f482],'depthTexture':_0x1a32d9});return _0x2d79f3;},_0x2bd449=function(_0x343eb1){const _0x1d878b=_0x47ce,_0x45b055=!![],_0x2ed025=![],_0x51b6ed={'viewport':_0x343eb1[_0x1d878b(0x23d)],'depthTest':_0x343eb1[_0x1d878b(0x293)],'depthMask':_0x343eb1['depthMask'],'blending':_0x343eb1['blending']},_0x597af1=Cesium$5[_0x1d878b(0x1f7)]['getDefaultRenderState'](_0x45b055,_0x2ed025,_0x51b6ed);return _0x597af1;},_0x529978=function(_0x1f4d9e){const _0x20402f=_0x47ce,_0x55db61={},_0x338abb=Cesium$5['Math']['mod'](_0x1f4d9e['west'],Cesium$5['Math']['TWO_PI']),_0x33a766=Cesium$5[_0x20402f(0x215)][_0x20402f(0x1f6)](_0x1f4d9e['east'],Cesium$5['Math']['TWO_PI']),_0x2ac2d2=_0x1f4d9e['width'];let _0x4d0d77,_0x3a838d;_0x2ac2d2>Cesium$5['Math']['THREE_PI_OVER_TWO']?(_0x4d0d77=0x0,_0x3a838d=Cesium$5[_0x20402f(0x215)][_0x20402f(0x1d6)]):_0x33a766-_0x338abb<_0x2ac2d2?(_0x4d0d77=_0x338abb,_0x3a838d=_0x338abb+_0x2ac2d2):(_0x4d0d77=_0x338abb,_0x3a838d=_0x33a766);_0x55db61[_0x20402f(0x229)]={'min':Cesium$5[_0x20402f(0x215)][_0x20402f(0x26b)](_0x4d0d77),'max':Cesium$5[_0x20402f(0x215)]['toDegrees'](_0x3a838d)};const _0x44aa04=_0x1f4d9e[_0x20402f(0x2b9)],_0x47239f=_0x1f4d9e[_0x20402f(0x200)],_0x20b7f3=_0x1f4d9e['height'],_0x5b95bc=_0x20b7f3>Cesium$5['Math']['PI']/0xc?_0x20b7f3/0x2:0x0;let _0x532c3a=Cesium$5['Math']['clampToLatitudeRange'](_0x44aa04-_0x5b95bc),_0x3e9ff1=Cesium$5['Math'][_0x20402f(0x243)](_0x47239f+_0x5b95bc);return _0x532c3a<-Cesium$5['Math']['PI_OVER_THREE']&&(_0x532c3a=-Cesium$5['Math']['PI_OVER_TWO']),_0x3e9ff1>Cesium$5[_0x20402f(0x215)]['PI_OVER_THREE']&&(_0x3e9ff1=Cesium$5['Math']['PI_OVER_TWO']),_0x55db61[_0x20402f(0x2c1)]={'min':Cesium$5['Math']['toDegrees'](_0x532c3a),'max':Cesium$5['Math']['toDegrees'](_0x3e9ff1)},_0x55db61;};return{'getFullscreenQuad':_0x360981,'createTexture':_0x4fcfd3,'createFramebuffer':_0xbeb86a,'createRawRenderState':_0x2bd449,'viewRectangleToLonLatRange':_0x529978};}());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=_0x5cbd89(0x210),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=_0x5cbd89(0x246),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(_0x2c3792,_0x26294d,_0x223a71,_0x295818,_0xbc23ec){this['createRenderingTextures'](_0x2c3792,_0x26294d,_0x223a71['colors']),this['createRenderingFramebuffers'](_0x2c3792),this['createRenderingPrimitives'](_0x2c3792,_0x223a71,_0x295818,_0xbc23ec);}[_0x5cbd89(0x29c)](_0x102664,_0x276ca7,_0x175664){const _0x33ac30=_0x5cbd89,_0x1d4e38={'context':_0x102664,'width':_0x102664['drawingBufferWidth'],'height':_0x102664['drawingBufferHeight'],'pixelFormat':Cesium$4['PixelFormat']['RGBA'],'pixelDatatype':Cesium$4['PixelDatatype'][_0x33ac30(0x21e)]},_0x2baad4={'context':_0x102664,'width':_0x102664['drawingBufferWidth'],'height':_0x102664['drawingBufferHeight'],'pixelFormat':Cesium$4[_0x33ac30(0x1cf)][_0x33ac30(0x2a8)],'pixelDatatype':Cesium$4[_0x33ac30(0x1ee)]['UNSIGNED_INT']},_0x32a1cf=_0x175664[_0x33ac30(0x20e)],_0x50fb39=new Float32Array(_0x32a1cf*0x3);for(let _0xd1f04d=0x0;_0xd1f04d<_0x32a1cf;_0xd1f04d++){const _0x30a79c=Cesium$4[_0x33ac30(0x26d)]['fromCssColorString'](_0x175664[_0xd1f04d]);_0x50fb39[0x3*_0xd1f04d]=_0x30a79c[_0x33ac30(0x1fd)],_0x50fb39[0x3*_0xd1f04d+0x1]=_0x30a79c['green'],_0x50fb39[0x3*_0xd1f04d+0x2]=_0x30a79c['blue'];}const _0x2204c0={'context':_0x102664,'width':_0x32a1cf,'height':0x1,'pixelFormat':Cesium$4[_0x33ac30(0x1cf)]['RGB'],'pixelDatatype':Cesium$4[_0x33ac30(0x1ee)]['FLOAT'],'sampler':new Cesium$4[(_0x33ac30(0x20c))]({'minificationFilter':Cesium$4['TextureMinificationFilter']['LINEAR'],'magnificationFilter':Cesium$4[_0x33ac30(0x272)]['LINEAR']})};this['textures']={'segmentsColor':Util['createTexture'](_0x1d4e38),'segmentsDepth':Util['createTexture'](_0x2baad4),'currentTrailsColor':Util['createTexture'](_0x1d4e38),'currentTrailsDepth':Util[_0x33ac30(0x262)](_0x2baad4),'nextTrailsColor':Util['createTexture'](_0x1d4e38),'nextTrailsDepth':Util['createTexture'](_0x2baad4),'colorTable':Util['createTexture'](_0x2204c0,_0x50fb39)};}['createRenderingFramebuffers'](_0x551529){const _0x1929d5=_0x5cbd89;this['framebuffers']={'segments':Util['createFramebuffer'](_0x551529,this['textures']['segmentsColor'],this[_0x1929d5(0x2a7)][_0x1929d5(0x22e)]),'currentTrails':Util[_0x1929d5(0x24a)](_0x551529,this[_0x1929d5(0x2a7)]['currentTrailsColor'],this[_0x1929d5(0x2a7)]['currentTrailsDepth']),'nextTrails':Util['createFramebuffer'](_0x551529,this[_0x1929d5(0x2a7)]['nextTrailsColor'],this['textures']['nextTrailsDepth'])};}['createSegmentsGeometry'](_0x3c065a){const _0x2f08f0=_0x5cbd89,_0xba3e57=0x4;let _0x31f85a=[];for(let _0x3d2797=0x0;_0x3d2797<_0x3c065a['particlesTextureSize'];_0x3d2797++){for(let _0x3215fd=0x0;_0x3215fd<_0x3c065a['particlesTextureSize'];_0x3215fd++){for(let _0x3bd936=0x0;_0x3bd936<_0xba3e57;_0x3bd936++){_0x31f85a['push'](_0x3d2797/_0x3c065a['particlesTextureSize']),_0x31f85a[_0x2f08f0(0x2b2)](_0x3215fd/_0x3c065a['particlesTextureSize']);}}}_0x31f85a=new Float32Array(_0x31f85a);let _0x21cf54=[];const _0x11d695=[-0x1,0x1],_0x5717e6=[-0x1,0x1];for(let _0x22ed54=0x0;_0x22ed54<_0x3c065a[_0x2f08f0(0x289)];_0x22ed54++){for(let _0x41e7fd=0x0;_0x41e7fd<_0xba3e57/0x2;_0x41e7fd++){for(let _0x5ec1e4=0x0;_0x5ec1e4<_0xba3e57/0x2;_0x5ec1e4++){_0x21cf54['push'](_0x11d695[_0x41e7fd]),_0x21cf54['push'](_0x5717e6[_0x5ec1e4]),_0x21cf54['push'](0x0);}}}_0x21cf54=new Float32Array(_0x21cf54);const _0x12cc12=0x6*_0x3c065a['maxParticles'],_0x4fb767=new Uint32Array(_0x12cc12);for(let _0x19caae=0x0,_0x4ee8c0=0x0,_0x596f58=0x0;_0x19caae<_0x3c065a['maxParticles'];_0x19caae++){_0x4fb767[_0x4ee8c0++]=_0x596f58+0x0,_0x4fb767[_0x4ee8c0++]=_0x596f58+0x1,_0x4fb767[_0x4ee8c0++]=_0x596f58+0x2,_0x4fb767[_0x4ee8c0++]=_0x596f58+0x2,_0x4fb767[_0x4ee8c0++]=_0x596f58+0x1,_0x4fb767[_0x4ee8c0++]=_0x596f58+0x3,_0x596f58+=0x4;}const _0x25492c=new Cesium$4[(_0x2f08f0(0x2a5))]({'attributes':new Cesium$4['GeometryAttributes']({'st':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4[_0x2f08f0(0x2ac)]['FLOAT'],'componentsPerAttribute':0x2,'values':_0x31f85a}),'normal':new Cesium$4['GeometryAttribute']({'componentDatatype':Cesium$4['ComponentDatatype']['FLOAT'],'componentsPerAttribute':0x3,'values':_0x21cf54})}),'indices':_0x4fb767});return _0x25492c;}['createRenderingPrimitives'](_0x17186c,_0x1714db,_0x17a87b,_0x287548){const _0x18200d=_0x5cbd89,_0x3ac7e3=this;this[_0x18200d(0x285)]={'segments':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](_0x1714db),'primitiveType':Cesium$4[_0x18200d(0x264)]['TRIANGLES'],'uniformMap':{'currentParticlesPosition':function(){return _0x287548['particlesTextures']['currentParticlesPosition'];},'postProcessingPosition':function(){return _0x287548['particlesTextures']['postProcessingPosition'];},'postProcessingSpeed':function(){return _0x287548['particlesTextures']['postProcessingSpeed'];},'colorTable':function(){const _0x469efc=_0x18200d;return _0x3ac7e3['textures'][_0x469efc(0x220)];},'aspect':function(){return _0x17186c['drawingBufferWidth']/_0x17186c['drawingBufferHeight'];},'pixelSize':function(){return _0x17a87b['pixelSize'];},'lineWidth':function(){return _0x1714db['lineWidth'];},'particleHeight':function(){const _0x48dde4=_0x18200d;return _0x1714db[_0x48dde4(0x26e)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'sources':[segmentDraw_vert]}),'fragmentShaderSource':new Cesium$4[(_0x18200d(0x2a0))]({'sources':[segmentDraw_frag]}),'rawRenderState':Util['createRawRenderState']({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![]}),'framebuffer':this['framebuffers']['segments'],'autoClear':!![]}),'trails':new CustomPrimitive({'commandType':_0x18200d(0x27f),'attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4['PrimitiveType'][_0x18200d(0x23c)],'uniformMap':{'segmentsColorTexture':function(){const _0x26309c=_0x18200d;return _0x3ac7e3['textures'][_0x26309c(0x235)];},'segmentsDepthTexture':function(){const _0x30b615=_0x18200d;return _0x3ac7e3[_0x30b615(0x2a7)]['segmentsDepth'];},'currentTrailsColor':function(){const _0x14ac6b=_0x18200d;return _0x3ac7e3[_0x14ac6b(0x1e5)]['currentTrails']['getColorTexture'](0x0);},'trailsDepthTexture':function(){return _0x3ac7e3['framebuffers']['currentTrails']['depthTexture'];},'fadeOpacity':function(){const _0x5835e9=_0x18200d;return _0x1714db[_0x5835e9(0x1fa)];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_GL_POSITION_LOG_DEPTH'],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x18200d(0x2bd)],'sources':[trailDraw_frag]}),'rawRenderState':Util[_0x18200d(0x273)]({'viewport':undefined,'depthTest':{'enabled':!![],'func':Cesium$4[_0x18200d(0x237)]['ALWAYS']},'depthMask':!![]}),'framebuffer':this['framebuffers']['nextTrails'],'autoClear':!![],'preExecute':function(){const _0x4b0ee5=_0x18200d,_0x2518b9=_0x3ac7e3['framebuffers']['currentTrails'];_0x3ac7e3[_0x4b0ee5(0x1e5)]['currentTrails']=_0x3ac7e3['framebuffers']['nextTrails'],_0x3ac7e3['framebuffers']['nextTrails']=_0x2518b9,_0x3ac7e3[_0x4b0ee5(0x285)]['trails']['commandToExecute'][_0x4b0ee5(0x24d)]=_0x3ac7e3['framebuffers']['nextTrails'],_0x3ac7e3['primitives']['trails']['clearCommand']['framebuffer']=_0x3ac7e3[_0x4b0ee5(0x1e5)][_0x4b0ee5(0x26f)];}}),'screen':new CustomPrimitive({'commandType':'Draw','attributeLocations':{'position':0x0,'st':0x1},'geometry':Util['getFullscreenQuad'](),'primitiveType':Cesium$4[_0x18200d(0x264)][_0x18200d(0x23c)],'uniformMap':{'trailsColorTexture':function(){const _0x2f1f79=_0x18200d;return _0x3ac7e3['framebuffers']['nextTrails'][_0x2f1f79(0x26a)](0x0);},'trailsDepthTexture':function(){return _0x3ac7e3['framebuffers']['nextTrails']['depthTexture'];}},'vertexShaderSource':new Cesium$4['ShaderSource']({'defines':[_0x18200d(0x22b)],'sources':[fullscreen_vert]}),'fragmentShaderSource':new Cesium$4['ShaderSource']({'defines':['DISABLE_LOG_DEPTH_FRAGMENT_WRITE'],'sources':[screenDraw_frag]}),'rawRenderState':Util[_0x18200d(0x273)]({'viewport':undefined,'depthTest':{'enabled':![]},'depthMask':!![],'blending':{'enabled':!![]}}),'framebuffer':undefined})};}}var getWind_frag=_0x5cbd89(0x21d),updateSpeed_frag=_0x5cbd89(0x1cc),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=_0x5cbd89(0x224),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(_0x376352,_0x5239f4,_0x3c3ea1,_0x10a594){const _0x13b79d=_0x5cbd89;this['data']=_0x5239f4,this[_0x13b79d(0x299)](_0x376352,_0x5239f4),this[_0x13b79d(0x28f)](_0x376352,_0x3c3ea1,_0x10a594),this['createComputingPrimitives'](_0x5239f4,_0x3c3ea1,_0x10a594);}['createWindTextures'](_0x26220b,_0x4922c3){const _0xf1499d=_0x5cbd89,_0x3281d8={'context':_0x26220b,'width':_0x4922c3['dimensions']['lon'],'height':_0x4922c3['dimensions']['lat']*(_0x4922c3[_0xf1499d(0x2ab)]['lev']||0x1),'pixelFormat':Cesium$3['PixelFormat'][_0xf1499d(0x1d4)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0xf1499d(0x22a)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})};this[_0xf1499d(0x261)]={'U':Util['createTexture'](_0x3281d8,_0x4922c3['U'][_0xf1499d(0x234)]),'V':Util[_0xf1499d(0x262)](_0x3281d8,_0x4922c3['V'][_0xf1499d(0x234)])};}['createParticlesTextures'](_0x46d632,_0x3b3ec5,_0x354e29){const _0xab35f=_0x5cbd89,_0x20abe6={'context':_0x46d632,'width':_0x3b3ec5['particlesTextureSize'],'height':_0x3b3ec5[_0xab35f(0x284)],'pixelFormat':Cesium$3['PixelFormat'][_0xab35f(0x1eb)],'pixelDatatype':Cesium$3['PixelDatatype']['FLOAT'],'flipY':![],'sampler':new Cesium$3['Sampler']({'minificationFilter':Cesium$3['TextureMinificationFilter'][_0xab35f(0x22a)],'magnificationFilter':Cesium$3['TextureMagnificationFilter']['NEAREST']})},_0x9d3b15=this[_0xab35f(0x241)](_0x3b3ec5['maxParticles'],_0x354e29),_0x281f85=new Float32Array(0x4*_0x3b3ec5[_0xab35f(0x289)])['fill'](0x0);this['particlesTextures']={'particlesWind':Util['createTexture'](_0x20abe6),'currentParticlesPosition':Util['createTexture'](_0x20abe6,_0x9d3b15),'nextParticlesPosition':Util['createTexture'](_0x20abe6,_0x9d3b15),'currentParticlesSpeed':Util['createTexture'](_0x20abe6,_0x281f85),'nextParticlesSpeed':Util['createTexture'](_0x20abe6,_0x281f85),'postProcessingPosition':Util[_0xab35f(0x262)](_0x20abe6,_0x9d3b15),'postProcessingSpeed':Util[_0xab35f(0x262)](_0x20abe6,_0x281f85)};}[_0x5cbd89(0x241)](_0x276423,_0x28c040){const _0x18efc1=_0x5cbd89,_0x594583=new Float32Array(0x4*_0x276423);for(let _0x47dad1=0x0;_0x47dad1<_0x276423;_0x47dad1++){_0x594583[0x4*_0x47dad1]=Cesium$3['Math'][_0x18efc1(0x21c)](_0x28c040[_0x18efc1(0x259)]['x'],_0x28c040[_0x18efc1(0x259)]['y']),_0x594583[0x4*_0x47dad1+0x1]=Cesium$3['Math']['randomBetween'](_0x28c040['latRange']['x'],_0x28c040['latRange']['y']),_0x594583[0x4*_0x47dad1+0x2]=Cesium$3['Math'][_0x18efc1(0x21c)](this['data']['lev']['min'],this['data']['lev'][_0x18efc1(0x267)]),_0x594583[0x4*_0x47dad1+0x3]=0x0;}return _0x594583;}['destroyParticlesTextures'](){Object['keys'](this['particlesTextures'])['forEach'](_0x2dfdef=>{this['particlesTextures'][_0x2dfdef]['destroy']();});}['createComputingPrimitives'](_0x3d0571,_0x1836f5,_0x3948e2){const _0x1439c7=_0x5cbd89,_0x5a4c16=new Cesium$3[(_0x1439c7(0x214))](_0x3d0571['dimensions']['lon'],_0x3d0571['dimensions']['lat'],_0x3d0571[_0x1439c7(0x2ab)]['lev']),_0x6a9fc2=new Cesium$3['Cartesian3'](_0x3d0571[_0x1439c7(0x229)]['min'],_0x3d0571['lat']['min'],_0x3d0571['lev']['min']),_0xdd1bd1=new Cesium$3['Cartesian3'](_0x3d0571['lon']['max'],_0x3d0571['lat'][_0x1439c7(0x267)],_0x3d0571['lev']['max']),_0x57c591=new Cesium$3['Cartesian3']((_0xdd1bd1['x']-_0x6a9fc2['x'])/(_0x5a4c16['x']-0x1),(_0xdd1bd1['y']-_0x6a9fc2['y'])/(_0x5a4c16['y']-0x1),_0x5a4c16['z']>0x1?(_0xdd1bd1['z']-_0x6a9fc2['z'])/(_0x5a4c16['z']-0x1):0x1),_0x3b86c1=new Cesium$3['Cartesian2'](_0x3d0571['U']['min'],_0x3d0571['U']['max']),_0x3d91e1=new Cesium$3[(_0x1439c7(0x1d7))](_0x3d0571['V'][_0x1439c7(0x297)],_0x3d0571['V']['max']),_0x3db1c7=this;this['primitives']={'getWind':new CustomPrimitive({'commandType':_0x1439c7(0x2a9),'uniformMap':{'U':function(){return _0x3db1c7['windTextures']['U'];},'V':function(){return _0x3db1c7['windTextures']['V'];},'currentParticlesPosition':function(){const _0x536661=_0x1439c7;return _0x3db1c7[_0x536661(0x286)][_0x536661(0x1f8)];},'dimension':function(){return _0x5a4c16;},'minimum':function(){return _0x6a9fc2;},'maximum':function(){return _0xdd1bd1;},'interval':function(){return _0x57c591;}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[getWind_frag]}),'outputTexture':this['particlesTextures']['particlesWind'],'preExecute':function(){const _0x2b4439=_0x1439c7;_0x3db1c7[_0x2b4439(0x285)]['getWind']['commandToExecute'][_0x2b4439(0x211)]=_0x3db1c7['particlesTextures'][_0x2b4439(0x1dc)];}}),'updateSpeed':new CustomPrimitive({'commandType':_0x1439c7(0x2a9),'uniformMap':{'currentParticlesSpeed':function(){const _0xae9ea2=_0x1439c7;return _0x3db1c7['particlesTextures'][_0xae9ea2(0x1e9)];},'particlesWind':function(){const _0x19d372=_0x1439c7;return _0x3db1c7['particlesTextures'][_0x19d372(0x1dc)];},'uSpeedRange':function(){return _0x3b86c1;},'vSpeedRange':function(){return _0x3d91e1;},'pixelSize':function(){const _0x272e77=_0x1439c7;return _0x3948e2[_0x272e77(0x254)];},'speedFactor':function(){return _0x1836f5['speedFactor'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[updateSpeed_frag]}),'outputTexture':this[_0x1439c7(0x286)]['nextParticlesSpeed'],'preExecute':function(){const _0x3c2290=_0x1439c7,_0x2d4391=_0x3db1c7['particlesTextures']['currentParticlesSpeed'];_0x3db1c7['particlesTextures']['currentParticlesSpeed']=_0x3db1c7[_0x3c2290(0x286)]['postProcessingSpeed'],_0x3db1c7['particlesTextures']['postProcessingSpeed']=_0x2d4391,_0x3db1c7[_0x3c2290(0x285)][_0x3c2290(0x225)][_0x3c2290(0x23b)][_0x3c2290(0x211)]=_0x3db1c7['particlesTextures']['nextParticlesSpeed'];}}),'updatePosition':new CustomPrimitive({'commandType':_0x1439c7(0x2a9),'uniformMap':{'currentParticlesPosition':function(){const _0x1ad2c3=_0x1439c7;return _0x3db1c7[_0x1ad2c3(0x286)][_0x1ad2c3(0x1f8)];},'currentParticlesSpeed':function(){const _0x1709cf=_0x1439c7;return _0x3db1c7[_0x1709cf(0x286)]['currentParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x1439c7(0x2a0))]({'sources':[updatePosition_frag]}),'outputTexture':this['particlesTextures'][_0x1439c7(0x27a)],'preExecute':function(){const _0x17dd37=_0x3db1c7['particlesTextures']['currentParticlesPosition'];_0x3db1c7['particlesTextures']['currentParticlesPosition']=_0x3db1c7['particlesTextures']['postProcessingPosition'],_0x3db1c7['particlesTextures']['postProcessingPosition']=_0x17dd37,_0x3db1c7['primitives']['updatePosition']['commandToExecute']['outputTexture']=_0x3db1c7['particlesTextures']['nextParticlesPosition'];}}),'postProcessingPosition':new CustomPrimitive({'commandType':_0x1439c7(0x2a9),'uniformMap':{'nextParticlesPosition':function(){const _0x3c4e09=_0x1439c7;return _0x3db1c7['particlesTextures'][_0x3c4e09(0x27a)];},'nextParticlesSpeed':function(){return _0x3db1c7['particlesTextures']['nextParticlesSpeed'];},'lonRange':function(){const _0x1cfc07=_0x1439c7;return _0x3948e2[_0x1cfc07(0x259)];},'latRange':function(){return _0x3948e2['latRange'];},'randomCoefficient':function(){const _0x5453a6=Math['random']();return _0x5453a6;},'dropRate':function(){const _0x59448c=_0x1439c7;return _0x1836f5[_0x59448c(0x2ad)];},'dropRateBump':function(){return _0x1836f5['dropRateBump'];}},'fragmentShaderSource':new Cesium$3['ShaderSource']({'sources':[postProcessingPosition_frag]}),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':function(){const _0x2d2086=_0x1439c7;_0x3db1c7['primitives']['postProcessingPosition'][_0x2d2086(0x23b)][_0x2d2086(0x211)]=_0x3db1c7[_0x2d2086(0x286)]['postProcessingPosition'];}}),'postProcessingSpeed':new CustomPrimitive({'commandType':_0x1439c7(0x2a9),'uniformMap':{'postProcessingPosition':function(){return _0x3db1c7['particlesTextures']['postProcessingPosition'];},'nextParticlesSpeed':function(){return _0x3db1c7['particlesTextures']['nextParticlesSpeed'];}},'fragmentShaderSource':new Cesium$3[(_0x1439c7(0x2a0))]({'sources':[postProcessingSpeed_frag]}),'outputTexture':this['particlesTextures']['postProcessingSpeed'],'preExecute':function(){const _0x222b38=_0x1439c7;_0x3db1c7['primitives'][_0x222b38(0x27b)]['commandToExecute'][_0x222b38(0x211)]=_0x3db1c7['particlesTextures']['postProcessingSpeed'];}})};}}const Cesium$2=mars3d__namespace[_0x5cbd89(0x260)];class ParticleSystem{constructor(_0x1534eb,_0x1ae7a3,_0x1fcd9e,_0x2c4fe9){const _0x5a8776=_0x5cbd89;this['context']=_0x1534eb,_0x1ae7a3={..._0x1ae7a3},_0x1ae7a3['udata']&&_0x1ae7a3['vdata']&&(_0x1ae7a3['dimensions']={},_0x1ae7a3[_0x5a8776(0x2ab)][_0x5a8776(0x229)]=_0x1ae7a3[_0x5a8776(0x2a4)],_0x1ae7a3[_0x5a8776(0x2ab)][_0x5a8776(0x2c1)]=_0x1ae7a3['rows'],_0x1ae7a3['dimensions']['lev']=_0x1ae7a3['lev']||0x1,_0x1ae7a3['lon']={},_0x1ae7a3[_0x5a8776(0x229)]['min']=_0x1ae7a3['xmin'],_0x1ae7a3[_0x5a8776(0x229)][_0x5a8776(0x267)]=_0x1ae7a3['xmax'],_0x1ae7a3['lat']={},_0x1ae7a3['lat']['min']=_0x1ae7a3[_0x5a8776(0x1ef)],_0x1ae7a3['lat']['max']=_0x1ae7a3['ymax'],_0x1ae7a3['lev']={},_0x1ae7a3['lev']['min']=_0x1ae7a3['levmin']??0x1,_0x1ae7a3['lev']['max']=_0x1ae7a3['levmax']??0x1,_0x1ae7a3['U']={},_0x1ae7a3['U']['array']=new Float32Array(_0x1ae7a3[_0x5a8776(0x231)]),_0x1ae7a3['U']['min']=_0x1ae7a3['umin']??Math['min'](..._0x1ae7a3['udata']),_0x1ae7a3['U'][_0x5a8776(0x267)]=_0x1ae7a3['umax']??Math[_0x5a8776(0x267)](..._0x1ae7a3['udata']),_0x1ae7a3['V']={},_0x1ae7a3['V']['array']=new Float32Array(_0x1ae7a3['vdata']),_0x1ae7a3['V']['min']=_0x1ae7a3['vmin']??Math[_0x5a8776(0x297)](..._0x1ae7a3[_0x5a8776(0x24e)]),_0x1ae7a3['V'][_0x5a8776(0x267)]=_0x1ae7a3[_0x5a8776(0x22c)]??Math['max'](..._0x1ae7a3['vdata'])),this['data']=_0x1ae7a3,this[_0x5a8776(0x257)]=_0x1fcd9e,this[_0x5a8776(0x205)]=_0x2c4fe9,this['particlesComputing']=new ParticlesComputing(this[_0x5a8776(0x1e0)],this['data'],this['options'],this[_0x5a8776(0x205)]),this['particlesRendering']=new ParticlesRendering(this['context'],this['data'],this['options'],this['viewerParameters'],this[_0x5a8776(0x279)]);}['canvasResize'](_0x3ce45b){const _0x507af6=_0x5cbd89;this['particlesComputing']['destroyParticlesTextures'](),Object[_0x507af6(0x223)](this['particlesComputing'][_0x507af6(0x261)])[_0x507af6(0x29a)](_0x305118=>{const _0x521b45=_0x507af6;this[_0x521b45(0x279)]['windTextures'][_0x305118]['destroy']();}),this['particlesRendering'][_0x507af6(0x2a7)]['colorTable'][_0x507af6(0x25c)](),Object[_0x507af6(0x223)](this['particlesRendering'][_0x507af6(0x1e5)])[_0x507af6(0x29a)](_0x296bbc=>{const _0x32f711=_0x507af6;this[_0x32f711(0x239)]['framebuffers'][_0x296bbc][_0x32f711(0x25c)]();}),this[_0x507af6(0x1e0)]=_0x3ce45b,this['particlesComputing']=new ParticlesComputing(this['context'],this['data'],this['options'],this[_0x507af6(0x205)]),this[_0x507af6(0x239)]=new ParticlesRendering(this['context'],this[_0x507af6(0x271)],this[_0x507af6(0x257)],this['viewerParameters'],this[_0x507af6(0x279)]);}['clearFramebuffers'](){const _0x5976b9=_0x5cbd89,_0x292fa4=new Cesium$2['ClearCommand']({'color':new Cesium$2['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Cesium$2['Pass']['OPAQUE']});Object['keys'](this[_0x5976b9(0x239)]['framebuffers'])['forEach'](_0x29246b=>{const _0x40f65=_0x5976b9;_0x292fa4['framebuffer']=this['particlesRendering']['framebuffers'][_0x29246b],_0x292fa4['execute'](this[_0x40f65(0x1e0)]);});}['refreshParticles'](_0xa59fd5){const _0xf6bb0b=_0x5cbd89;this['clearFramebuffers'](),this['particlesComputing']['destroyParticlesTextures'](),this['particlesComputing'][_0xf6bb0b(0x28f)](this['context'],this['options'],this[_0xf6bb0b(0x205)]);if(_0xa59fd5){var _0x362745;const _0x5e9243=this[_0xf6bb0b(0x239)]['createSegmentsGeometry'](this['options']);this['particlesRendering'][_0xf6bb0b(0x285)]['segments']['geometry']=_0x5e9243;const _0xd048b4=Cesium$2['VertexArray']['fromGeometry']({'context':this[_0xf6bb0b(0x1e0)],'geometry':_0x5e9243,'attributeLocations':this[_0xf6bb0b(0x239)]['primitives']['segments']['attributeLocations'],'bufferUsage':Cesium$2['BufferUsage']['STATIC_DRAW']});(_0x362745=this['particlesRendering'][_0xf6bb0b(0x285)])!==null&&_0x362745!==void 0x0&&(_0x362745=_0x362745['segments'])!==null&&_0x362745!==void 0x0&&_0x362745[_0xf6bb0b(0x23b)]&&(this[_0xf6bb0b(0x239)][_0xf6bb0b(0x285)][_0xf6bb0b(0x207)]['commandToExecute'][_0xf6bb0b(0x1df)]=_0xd048b4);}}[_0x5cbd89(0x1db)](_0x28b683){const _0x74cfd9=_0x5cbd89;let _0xf72a25=![];this['options']['maxParticles']!==_0x28b683['maxParticles']&&(_0xf72a25=!![]),Object['keys'](_0x28b683)[_0x74cfd9(0x29a)](_0x4ac37b=>{this['options'][_0x4ac37b]=_0x28b683[_0x4ac37b];}),this['refreshParticles'](_0xf72a25);}[_0x5cbd89(0x247)](_0x28e717){const _0x5e560c=_0x5cbd89;Object['keys'](_0x28e717)[_0x5e560c(0x29a)](_0x21ddfb=>{this['viewerParameters'][_0x21ddfb]=_0x28e717[_0x21ddfb];}),this['refreshParticles'](![]);}['destroy'](){const _0x61b75f=_0x5cbd89;clearTimeout(this[_0x61b75f(0x269)]),this[_0x61b75f(0x279)][_0x61b75f(0x203)](),Object['keys'](this[_0x61b75f(0x279)]['windTextures'])[_0x61b75f(0x29a)](_0xb39513=>{const _0x402a7c=_0x61b75f;this[_0x402a7c(0x279)][_0x402a7c(0x261)][_0xb39513]['destroy']();}),this[_0x61b75f(0x239)]['textures']['colorTable'][_0x61b75f(0x25c)](),Object[_0x61b75f(0x223)](this['particlesRendering']['framebuffers'])['forEach'](_0x848366=>{const _0x54c303=_0x61b75f;this['particlesRendering'][_0x54c303(0x1e5)][_0x848366]['destroy']();});for(const _0x4fbb90 in this){delete this[_0x4fbb90];}}}const Cesium$1=mars3d__namespace[_0x5cbd89(0x260)],BaseLayer$1=mars3d__namespace[_0x5cbd89(0x2ae)]['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(_0xd81593={}){const _0x3bdd0a=_0x5cbd89;_0xd81593={...DEF_OPTIONS,..._0xd81593},super(_0xd81593),this[_0x3bdd0a(0x278)](_0xd81593);}get['layer'](){const _0x2d61e0=_0x5cbd89;return this[_0x2d61e0(0x285)];}get['data'](){return this['_data'];}set[_0x5cbd89(0x271)](_0x40abae){this['setData'](_0x40abae);}get['colors'](){const _0x953d77=_0x5cbd89;return this[_0x953d77(0x257)]['colors'];}set['colors'](_0xd2f6f5){this['options']['colors']=_0xd2f6f5,this['particleSystem']&&this['particleSystem']['setOptions']({'colors':_0xd2f6f5}),this['resize']();}['_mountedHook'](){}['_addedHook'](){const _0x2be843=_0x5cbd89;this['scene']=this[_0x2be843(0x1ed)]['scene'],this['camera']=this['_map'][_0x2be843(0x2aa)],this[_0x2be843(0x285)]=new Cesium$1['PrimitiveCollection'](),this[_0x2be843(0x1ed)]['scene']['primitives']['add'](this['primitives']),this[_0x2be843(0x205)]={'lonRange':new Cesium$1[(_0x2be843(0x1d7))](),'latRange':new Cesium$1['Cartesian2'](),'pixelSize':0x0},this['globeBoundingSphere']=new Cesium$1[(_0x2be843(0x228))](Cesium$1['Cartesian3']['ZERO'],0.99*0x615299),this[_0x2be843(0x25a)](),window['addEventListener'](_0x2be843(0x291),this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace[_0x2be843(0x1f3)][_0x2be843(0x222)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x2be843(0x1f3)]['mouseUp'],this[_0x2be843(0x28b)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this[_0x2be843(0x1e1)],this),this['_data']&&this['setData'](this[_0x2be843(0x255)]);}['_removedHook'](){const _0x1769bb=_0x5cbd89;window[_0x1769bb(0x296)](_0x1769bb(0x291),this['resize']),this['_map']['off'](mars3d__namespace[_0x1769bb(0x1f3)]['preRender'],this['_onMap_preRenderEvent'],this),this['_map']['off'](mars3d__namespace[_0x1769bb(0x1f3)][_0x1769bb(0x249)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace[_0x1769bb(0x1f3)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace[_0x1769bb(0x1f3)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace['EventType'][_0x1769bb(0x283)],this[_0x1769bb(0x1e1)],this),this['primitives']['removeAll'](),this['_map'][_0x1769bb(0x227)]['primitives']['remove'](this[_0x1769bb(0x285)]);}[_0x5cbd89(0x291)](){const _0x52ab77=_0x5cbd89;if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this[_0x52ab77(0x285)]['removeAll'](),this['_map']['once'](mars3d__namespace['EventType']['preRender'],this['_onMap_preRenderEvent'],this);}[_0x5cbd89(0x1f2)](_0x16683c){const _0x2d0cd5=_0x5cbd89;this[_0x2d0cd5(0x258)]['canvasResize'](this['scene']['context']),this['addPrimitives'](),this[_0x2d0cd5(0x285)]['show']=!![];}[_0x5cbd89(0x270)](_0x4bbc94){const _0x28ee17=_0x5cbd89;clearTimeout(this['refreshTimer']);if(!this['show']||!this['particleSystem'])return;this['primitives']['show']=![],this[_0x28ee17(0x2be)]=setTimeout(()=>{const _0xe86eb4=_0x28ee17;if(!this['show'])return;this[_0xe86eb4(0x1ce)]();},0xc8);}['_onMouseDownEvent'](_0x341633){const _0x462124=_0x5cbd89;this[_0x462124(0x233)]=!![];}['_onMouseMoveEvent'](_0x5c9a3b){if(!this['show']||!this['particleSystem'])return;this['mouse_down']&&(this['primitives']['show']=![],this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x21adf6){const _0x4c8c40=_0x5cbd89;if(!this['show']||!this[_0x4c8c40(0x258)])return;this['mouse_down']&&this['mouse_move']&&this[_0x4c8c40(0x1ce)](),this['primitives']['show']=!![],this['mouse_down']=![],this[_0x4c8c40(0x28d)]=![];}[_0x5cbd89(0x1ce)](){const _0x3f832d=_0x5cbd89;if(!this['_map']||!this[_0x3f832d(0x216)])return;this[_0x3f832d(0x25a)](),this[_0x3f832d(0x258)]['applyViewerParameters'](this[_0x3f832d(0x205)]),this['primitives'][_0x3f832d(0x216)]=!![];}['setData'](_0x44b23b){const _0x3d9904=_0x5cbd89;this['_data']=_0x44b23b,this['particleSystem']&&this['particleSystem']['destroy'](),this[_0x3d9904(0x258)]=new ParticleSystem(this['scene'][_0x3d9904(0x1e0)],_0x44b23b,this[_0x3d9904(0x212)](),this[_0x3d9904(0x205)]),this[_0x3d9904(0x22d)]();}['_setOptionsHook'](_0x1fe0bf,_0x24ddbf){const _0x5e2668=_0x5cbd89;if(_0x1fe0bf)for(const _0x29f13c in _0x1fe0bf){this[_0x29f13c]=_0x1fe0bf[_0x29f13c];}this[_0x5e2668(0x258)]&&this['particleSystem']['setOptions'](this['getOptions']());}['getOptions'](){const _0x1fc2e6=_0x5cbd89,_0x21725c=Math['ceil'](Math['sqrt'](this['particlesNumber']));return this[_0x1fc2e6(0x1f1)]=_0x21725c*_0x21725c,{'particlesTextureSize':_0x21725c,'maxParticles':this['particlesNumber'],'particleHeight':this['fixedHeight'],'fadeOpacity':this['fadeOpacity'],'dropRate':this[_0x1fc2e6(0x2ad)],'dropRateBump':this['dropRateBump'],'speedFactor':this[_0x1fc2e6(0x1e8)],'lineWidth':this['lineWidth'],'colors':this['colors']};}[_0x5cbd89(0x22d)](){const _0x898ef7=_0x5cbd89;this['primitives'][_0x898ef7(0x25f)](this['particleSystem'][_0x898ef7(0x279)]['primitives'][_0x898ef7(0x1f9)]),this['primitives']['add'](this['particleSystem'][_0x898ef7(0x279)]['primitives']['updateSpeed']),this['primitives']['add'](this[_0x898ef7(0x258)][_0x898ef7(0x279)][_0x898ef7(0x285)][_0x898ef7(0x22f)]),this['primitives']['add'](this['particleSystem']['particlesComputing'][_0x898ef7(0x285)]['postProcessingPosition']),this['primitives'][_0x898ef7(0x25f)](this['particleSystem']['particlesComputing']['primitives']['postProcessingSpeed']),this['primitives'][_0x898ef7(0x25f)](this['particleSystem']['particlesRendering']['primitives']['segments']),this[_0x898ef7(0x285)]['add'](this['particleSystem']['particlesRendering']['primitives']['trails']),this[_0x898ef7(0x285)][_0x898ef7(0x25f)](this['particleSystem'][_0x898ef7(0x239)]['primitives']['screen']);}['updateViewerParameters'](){const _0x296ef5=_0x5cbd89;let _0x37266c=this['camera']['computeViewRectangle'](this['scene']['globe']['ellipsoid']);if(!_0x37266c){const _0x369e29=this['_map'][_0x296ef5(0x21b)]();_0x37266c=Cesium$1['Rectangle'][_0x296ef5(0x2b7)](_0x369e29[_0x296ef5(0x250)],_0x369e29['ymin'],_0x369e29['xmax'],_0x369e29['ymax']);}const _0x59650c=Util['viewRectangleToLonLatRange'](_0x37266c);this['viewerParameters']['lonRange']['x']=_0x59650c['lon']['min'],this['viewerParameters']['lonRange']['y']=_0x59650c[_0x296ef5(0x229)]['max'],this['viewerParameters']['latRange']['x']=_0x59650c['lat']['min'],this['viewerParameters']['latRange']['y']=_0x59650c[_0x296ef5(0x2c1)][_0x296ef5(0x267)];const _0x47e086=this['camera']['getPixelSize'](this[_0x296ef5(0x252)],this['scene'][_0x296ef5(0x263)],this['scene'][_0x296ef5(0x253)]);_0x47e086>0x0&&(this['viewerParameters'][_0x296ef5(0x254)]=_0x47e086);}}mars3d__namespace[_0x5cbd89(0x1e6)]['register'](_0x5cbd89(0x2b8),WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;class CanvasParticle{constructor(){const _0x31a42a=_0x5cbd89;this['lng']=null,this[_0x31a42a(0x2c1)]=null,this['tlng']=null,this['tlat']=null,this['age']=null,this[_0x31a42a(0x282)]=null;}['destroy'](){for(const _0x42466a in this){delete this[_0x42466a];}}}class CanvasWindField{constructor(_0xcdce79){const _0xe2f09e=_0x5cbd89;this[_0xe2f09e(0x1db)](_0xcdce79);}get['speedRate'](){return this['_speedRate'];}set['speedRate'](_0x145893){const _0x29441f=_0x5cbd89;this['_speedRate']=(0x64-(_0x145893>0x63?0x63:_0x145893))*0x64,this[_0x29441f(0x1d8)]=[(this['xmax']-this[_0x29441f(0x250)])/this['_speedRate'],(this[_0x29441f(0x2a6)]-this['ymin'])/this['_speedRate']];}get['maxAge'](){return this['_maxAge'];}set['maxAge'](_0x5f5456){this['_maxAge']=_0x5f5456;}['setOptions'](_0x4420a0){const _0x16a85c=_0x5cbd89;this['options']=_0x4420a0,this[_0x16a85c(0x242)]=_0x4420a0['maxAge']||0x78,this['speedRate']=_0x4420a0['speedRate']||0x32,this[_0x16a85c(0x28a)]=[];const _0x5b3804=_0x4420a0['particlesNumber']||0x1000;for(let _0x192731=0x0;_0x192731<_0x5b3804;_0x192731++){const _0x3bd72e=this[_0x16a85c(0x27d)](new CanvasParticle());this['particles']['push'](_0x3bd72e);}}[_0x5cbd89(0x1e3)](_0x4c6bd4){const _0x4d3cdd=_0x5cbd89;this['rows']=_0x4c6bd4['rows'],this['cols']=_0x4c6bd4['cols'],this[_0x4d3cdd(0x250)]=_0x4c6bd4[_0x4d3cdd(0x250)],this['xmax']=_0x4c6bd4['xmax'],this[_0x4d3cdd(0x1ef)]=_0x4c6bd4[_0x4d3cdd(0x1ef)],this['ymax']=_0x4c6bd4[_0x4d3cdd(0x2a6)],this['grid']=[];const _0xc8b59e=_0x4c6bd4[_0x4d3cdd(0x231)],_0x46c885=_0x4c6bd4[_0x4d3cdd(0x24e)];let _0x2b0280=![];_0xc8b59e[_0x4d3cdd(0x20e)]===this['rows']&&_0xc8b59e[0x0][_0x4d3cdd(0x20e)]===this['cols']&&(_0x2b0280=!![]);let _0x5f5399=0x0,_0x1643a2=null,_0x2b260d=null;for(let _0x1ddb81=0x0;_0x1ddb81<this['rows'];_0x1ddb81++){_0x1643a2=[];for(let _0x7ae647=0x0;_0x7ae647<this['cols'];_0x7ae647++,_0x5f5399++){_0x2b0280?_0x2b260d=this[_0x4d3cdd(0x2b1)](_0xc8b59e[_0x1ddb81][_0x7ae647],_0x46c885[_0x1ddb81][_0x7ae647]):_0x2b260d=this[_0x4d3cdd(0x2b1)](_0xc8b59e[_0x5f5399],_0x46c885[_0x5f5399]),_0x1643a2['push'](_0x2b260d);}this['grid']['push'](_0x1643a2);}this['options']['reverseY']&&this['grid']['reverse']();}['clear'](){const _0x2fa719=_0x5cbd89;delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this[_0x2fa719(0x2a6)],delete this['grid'],delete this['particles'];}['toGridXY'](_0x15a26c,_0x52a361){const _0x5595c7=_0x5cbd89,_0x4e1f81=(_0x15a26c-this['xmin'])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x6b974f=(this['ymax']-_0x52a361)/(this[_0x5595c7(0x2a6)]-this['ymin'])*(this['rows']-0x1);return[_0x4e1f81,_0x6b974f];}['getUVByXY'](_0x38ce41,_0x20bb6a){const _0x105c58=_0x5cbd89;if(_0x38ce41<0x0||_0x38ce41>=this['cols']||_0x20bb6a>=this['rows'])return[0x0,0x0,0x0];const _0xd93fd4=Math['floor'](_0x38ce41),_0x3e335b=Math[_0x105c58(0x280)](_0x20bb6a);if(_0xd93fd4===_0x38ce41&&_0x3e335b===_0x20bb6a)return this[_0x105c58(0x256)][_0x20bb6a][_0x38ce41];const _0x2ff721=_0xd93fd4+0x1,_0x1ccbcd=_0x3e335b+0x1,_0x44237c=this[_0x105c58(0x1cd)](_0xd93fd4,_0x3e335b),_0x913d0b=this['getUVByXY'](_0x2ff721,_0x3e335b),_0x6c40c2=this['getUVByXY'](_0xd93fd4,_0x1ccbcd),_0x542f19=this['getUVByXY'](_0x2ff721,_0x1ccbcd);let _0x329e77=null;try{_0x329e77=this['_bilinearInterpolation'](_0x38ce41-_0xd93fd4,_0x20bb6a-_0x3e335b,_0x44237c,_0x913d0b,_0x6c40c2,_0x542f19);}catch(_0x1c969d){console[_0x105c58(0x240)](_0x38ce41,_0x20bb6a);}return _0x329e77;}['_bilinearInterpolation'](_0x18176a,_0x460ada,_0x45367b,_0x153c25,_0x2f834e,_0x1dc33c){const _0x2eb1f3=_0x5cbd89,_0x3e134c=0x1-_0x18176a,_0x10f399=0x1-_0x460ada,_0x3f7a41=_0x3e134c*_0x10f399,_0x4d0a0b=_0x18176a*_0x10f399,_0x250c61=_0x3e134c*_0x460ada,_0x5d22bb=_0x18176a*_0x460ada,_0x3ecb88=_0x45367b[0x0]*_0x3f7a41+_0x153c25[0x0]*_0x4d0a0b+_0x2f834e[0x0]*_0x250c61+_0x1dc33c[0x0]*_0x5d22bb,_0x11896e=_0x45367b[0x1]*_0x3f7a41+_0x153c25[0x1]*_0x4d0a0b+_0x2f834e[0x1]*_0x250c61+_0x1dc33c[0x1]*_0x5d22bb;return this[_0x2eb1f3(0x2b1)](_0x3ecb88,_0x11896e);}['_calcUV'](_0x271bac,_0x429102){return[+_0x271bac,+_0x429102,Math['sqrt'](_0x271bac*_0x271bac+_0x429102*_0x429102)];}['getUVByPoint'](_0x43e4c5,_0x4056e5){const _0x50af22=_0x5cbd89;if(!this[_0x50af22(0x230)](_0x43e4c5,_0x4056e5))return null;const _0x53ded0=this['toGridXY'](_0x43e4c5,_0x4056e5),_0x2d2c75=this['getUVByXY'](_0x53ded0[0x0],_0x53ded0[0x1]);return _0x2d2c75;}['isInExtent'](_0x77cf86,_0x32d29a){const _0x4e07d5=_0x5cbd89;return _0x77cf86>=this[_0x4e07d5(0x250)]&&_0x77cf86<=this['xmax']&&_0x32d29a>=this[_0x4e07d5(0x1ef)]&&_0x32d29a<=this['ymax']?!![]:![];}[_0x5cbd89(0x2bc)](){const _0x2b0bef=fRandomByfloat(this['xmin'],this['xmax']),_0x3977f8=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x3977f8,'lng':_0x2b0bef};}['getParticles'](){const _0x3dbfbf=_0x5cbd89;let _0x2e6ccc,_0x594c97,_0x11d4a4;for(let _0x5aa1e5=0x0,_0x34afd5=this['particles']['length'];_0x5aa1e5<_0x34afd5;_0x5aa1e5++){let _0x13b56e=this['particles'][_0x5aa1e5];_0x13b56e['age']<=0x0&&(_0x13b56e=this[_0x3dbfbf(0x27d)](_0x13b56e));if(_0x13b56e['age']>0x0){const _0x9cc8b6=_0x13b56e[_0x3dbfbf(0x274)],_0x51ff4e=_0x13b56e['tlat'];_0x11d4a4=this[_0x3dbfbf(0x24c)](_0x9cc8b6,_0x51ff4e),_0x11d4a4?(_0x2e6ccc=_0x9cc8b6+this['_calc_speedRate'][0x0]*_0x11d4a4[0x0],_0x594c97=_0x51ff4e+this['_calc_speedRate'][0x1]*_0x11d4a4[0x1],_0x13b56e[_0x3dbfbf(0x1d9)]=_0x9cc8b6,_0x13b56e[_0x3dbfbf(0x2c1)]=_0x51ff4e,_0x13b56e['tlng']=_0x2e6ccc,_0x13b56e['tlat']=_0x594c97,_0x13b56e['speed']=_0x11d4a4[0x2],_0x13b56e['age']--):_0x13b56e['age']=0x0;}}return this['particles'];}['_randomParticle'](_0x398d19){const _0x1f9981=_0x5cbd89;let _0x218f9c,_0x15ff05;for(let _0x44c7f8=0x0;_0x44c7f8<0x1e;_0x44c7f8++){_0x218f9c=this['getRandomLatLng'](),_0x15ff05=this[_0x1f9981(0x24c)](_0x218f9c['lng'],_0x218f9c[_0x1f9981(0x2c1)]);if(_0x15ff05&&_0x15ff05[0x2]>0x0)break;}if(!_0x15ff05)return _0x398d19;const _0x463b2f=_0x218f9c['lng']+this['_calc_speedRate'][0x0]*_0x15ff05[0x0],_0x37ab02=_0x218f9c['lat']+this['_calc_speedRate'][0x1]*_0x15ff05[0x1];return _0x398d19[_0x1f9981(0x1d9)]=_0x218f9c[_0x1f9981(0x1d9)],_0x398d19['lat']=_0x218f9c[_0x1f9981(0x2c1)],_0x398d19['tlng']=_0x463b2f,_0x398d19[_0x1f9981(0x248)]=_0x37ab02,_0x398d19['age']=Math['round'](Math['random']()*this['maxAge']),_0x398d19['speed']=_0x15ff05[0x2],_0x398d19;}['destroy'](){for(const _0x3c1767 in this){delete this[_0x3c1767];}}}function fRandomByfloat(_0x312422,_0x4ceae4){const _0x46d745=_0x5cbd89;return _0x312422+Math[_0x46d745(0x1ea)]()*(_0x4ceae4-_0x312422);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x2619dc={}){super(_0x2619dc),this['_setOptionsHook'](_0x2619dc),this['canvas']=null,_0x2619dc['colors']&&_0x2619dc['steps']&&(this['_colorRamp']=new mars3d__namespace['ColorRamp'](_0x2619dc));}[_0x5cbd89(0x278)](_0x569497,_0x3ae5c9){const _0x277147=_0x5cbd89;this['frameTime']=0x3e8/(_0x569497['frameRate']||0xa),this[_0x277147(0x232)]=this['options']['pointerEvents']??![],this['color']=_0x569497['color']||'#ffffff',this['lineWidth']=_0x569497['lineWidth']||0x1,this[_0x277147(0x281)]=_0x569497[_0x277147(0x281)]??0x0,this['reverseY']=_0x569497['reverseY']??![],this['windField']&&this['windField'][_0x277147(0x1db)](_0x569497);}get['layer'](){return this['canvas'];}get['canvasWidth'](){return this['_map']['scene']['canvas']['clientWidth'];}get['canvasHeight'](){const _0x25361e=_0x5cbd89;return this[_0x25361e(0x1ed)]['scene']['canvas']['clientHeight'];}get['pointerEvents'](){const _0x9bdce2=_0x5cbd89;return this[_0x9bdce2(0x232)];}set['pointerEvents'](_0x531717){const _0x26dbf1=_0x5cbd89;this['_pointerEvents']=_0x531717;if(!this['canvas'])return;_0x531717?this['canvas']['style']['pointer-events']='all':this['canvas'][_0x26dbf1(0x24f)]['pointer-events']=_0x26dbf1(0x238);}get['particlesNumber'](){const _0x29f11b=_0x5cbd89;return this[_0x29f11b(0x257)][_0x29f11b(0x1f1)];}set['particlesNumber'](_0x18a586){const _0x15f07d=_0x5cbd89;this[_0x15f07d(0x257)][_0x15f07d(0x1f1)]=_0x18a586,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){const _0xde2018=_0x5cbd89;return this[_0xde2018(0x257)][_0xde2018(0x236)];}set['speedRate'](_0x1fba4e){const _0x19716c=_0x5cbd89;this[_0x19716c(0x257)]['speedRate']=_0x1fba4e,this[_0x19716c(0x2ba)]&&(this[_0x19716c(0x2ba)]['speedRate']=_0x1fba4e);}get['maxAge'](){return this['options']['maxAge'];}set['maxAge'](_0x4d091a){const _0x4651e5=_0x5cbd89;this['options']['maxAge']=_0x4d091a,this[_0x4651e5(0x2ba)]&&(this['windField']['maxAge']=_0x4d091a);}get['data'](){return this['windData'];}set['data'](_0x4ca11d){this['setData'](_0x4ca11d);}['_showHook'](_0x1ed303){const _0x4967b4=_0x5cbd89;_0x1ed303?this['_addedHook']():(this[_0x4967b4(0x1d2)]&&(this['options'][_0x4967b4(0x271)]=this['windData']),this['_removedHook']());}['_mountedHook'](){const _0x41e893=_0x5cbd89;this['options'][_0x41e893(0x1ec)]?this[_0x41e893(0x276)]():this['windField']=new CanvasWindField(this[_0x41e893(0x257)]);}['_addedHook'](){const _0x5586df=_0x5cbd89;this[_0x5586df(0x25e)]=this[_0x5586df(0x213)](),this['canvasContext']=this[_0x5586df(0x25e)]['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options']['data']&&this['setData'](this['options'][_0x5586df(0x271)]);}[_0x5cbd89(0x2b3)](){const _0x2e81eb=_0x5cbd89;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map'][_0x2e81eb(0x226)]['removeChild'](this['canvas']),delete this['canvas']);}[_0x5cbd89(0x213)](){const _0x336e1e=_0x5cbd89,_0x5327a8=mars3d__namespace[_0x336e1e(0x2a3)]['create']('canvas','mars3d-canvasWind',this['_map']['container']);return _0x5327a8['style']['position']='absolute',_0x5327a8['style']['top']=_0x336e1e(0x2bf),_0x5327a8['style'][_0x336e1e(0x27c)]='0px',_0x5327a8['style']['width']=this[_0x336e1e(0x1ed)]['scene']['canvas'][_0x336e1e(0x20d)]+'px',_0x5327a8[_0x336e1e(0x24f)][_0x336e1e(0x268)]=this['_map']['scene'][_0x336e1e(0x25e)]['clientHeight']+'px',_0x5327a8[_0x336e1e(0x24f)]['pointerEvents']=this[_0x336e1e(0x232)]?'auto':'none',_0x5327a8['style']['zIndex']=this['options']['zIndex']??0x9,_0x5327a8[_0x336e1e(0x295)]=this['_map']['scene'][_0x336e1e(0x25e)][_0x336e1e(0x20d)],_0x5327a8[_0x336e1e(0x268)]=this['_map']['scene'][_0x336e1e(0x25e)][_0x336e1e(0x28c)],_0x5327a8;}['resize'](){const _0x57af87=_0x5cbd89;this['canvas']&&(this[_0x57af87(0x25e)][_0x57af87(0x24f)][_0x57af87(0x295)]=this['_map']['scene']['canvas'][_0x57af87(0x20d)]+'px',this['canvas']['style']['height']=this[_0x57af87(0x1ed)][_0x57af87(0x227)][_0x57af87(0x25e)][_0x57af87(0x28c)]+'px',this['canvas']['width']=this['_map']['scene'][_0x57af87(0x25e)]['clientWidth'],this['canvas']['height']=this[_0x57af87(0x1ed)]['scene'][_0x57af87(0x25e)]['clientHeight']);}[_0x5cbd89(0x20a)](){const _0x2260bc=_0x5cbd89,_0x507305=this;let _0x4451f4=Date['now']();(function _0x53e445(){const _0x2cc4a1=_0x47ce;_0x507305['animateFrame']=window['requestAnimationFrame'](_0x53e445);if(_0x507305['show']&&_0x507305['windField']){const _0x44e292=Date['now'](),_0x256950=_0x44e292-_0x4451f4;_0x256950>_0x507305['frameTime']&&(_0x4451f4=_0x44e292-_0x256950%_0x507305[_0x2cc4a1(0x202)],_0x507305['update']());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this[_0x2260bc(0x233)]=![],this[_0x2260bc(0x28d)]=![],this['options'][_0x2260bc(0x1ca)]&&(this['_map']['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x2260bc(0x2c3)],this[_0x2260bc(0x28b)],this)));}[_0x5cbd89(0x209)](){const _0x48bfce=_0x5cbd89;window[_0x48bfce(0x1f0)](this['animateFrame']),delete this['animateFrame'],window[_0x48bfce(0x296)]('resize',this['resize']),this['options'][_0x48bfce(0x1ca)]&&(this[_0x48bfce(0x1ed)]['off'](mars3d__namespace['EventType'][_0x48bfce(0x249)],this[_0x48bfce(0x270)],this),this['_map']['off'](mars3d__namespace[_0x48bfce(0x1f3)]['mouseDown'],this['_onMouseDownEvent'],this),this[_0x48bfce(0x1ed)]['off'](mars3d__namespace['EventType'][_0x48bfce(0x2c3)],this[_0x48bfce(0x28b)],this),this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this[_0x48bfce(0x1e1)],this));}[_0x5cbd89(0x270)](_0x404d13){const _0x4e3508=_0x5cbd89;clearTimeout(this['refreshTimer']);if(!this[_0x4e3508(0x216)]||!this['canvas'])return;this['canvas'][_0x4e3508(0x24f)]['visibility']=_0x4e3508(0x29e),this['refreshTimer']=setTimeout(()=>{const _0x26296c=_0x4e3508;if(!this['show'])return;this[_0x26296c(0x1ce)](),this['canvas'][_0x26296c(0x24f)]['visibility']='visible';},0xc8);}['_onMouseDownEvent'](_0xbf0756){const _0x16a884=_0x5cbd89;this['mouse_down']=!![],this['_map'][_0x16a884(0x2a1)](mars3d__namespace[_0x16a884(0x1f3)]['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}['_onMouseMoveEvent'](_0xc5c13f){const _0x60acd2=_0x5cbd89;if(!this['show']||!this['canvas'])return;this['mouse_down']&&(this['canvas']['style'][_0x60acd2(0x292)]=_0x60acd2(0x29e),this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x277250){const _0x776dc=_0x5cbd89;if(!this[_0x776dc(0x216)]||!this['canvas'])return;this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this[_0x776dc(0x25e)][_0x776dc(0x24f)][_0x776dc(0x292)]=_0x776dc(0x275),this[_0x776dc(0x233)]=![],this['mouse_move']=![];}[_0x5cbd89(0x217)](_0x592680){const _0x548e0d=_0x5cbd89;this[_0x548e0d(0x201)](),this['windData']=_0x592680,this['windField']['setDate'](_0x592680),this[_0x548e0d(0x1ce)]();}['redraw'](){const _0x46da6a=_0x5cbd89;if(!this['show'])return;this['windField']['setOptions'](this[_0x46da6a(0x257)]),this[_0x46da6a(0x221)]();}['update'](){const _0x2daa1f=_0x5cbd89;if(this['_updateIng'])return;this['_updateIng']=!![];if(this[_0x2daa1f(0x1ec)])this['windField']['update']();else{const _0x5518e3=this[_0x2daa1f(0x2ba)][_0x2daa1f(0x29d)]();this[_0x2daa1f(0x2c2)](_0x5518e3);}this[_0x2daa1f(0x2b6)]=![];}[_0x5cbd89(0x2c2)](_0x380f14){const _0x579e1d=_0x5cbd89;this[_0x579e1d(0x20f)]['globalCompositeOperation']='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this[_0x579e1d(0x20f)]['globalAlpha']=0.9;const _0x4f8f24=this['_map']['scene']['mode']!==Cesium['SceneMode'][_0x579e1d(0x1cb)],_0x4a9378=this[_0x579e1d(0x288)]*0.25;if(this['_colorRamp'])for(let _0x233c2a=0x0,_0x37bfc5=_0x380f14['length'];_0x233c2a<_0x37bfc5;_0x233c2a++){const _0xb46714=_0x380f14[_0x233c2a],_0x2798d1=this['_tomap'](_0xb46714['lng'],_0xb46714['lat'],_0xb46714),_0x518a94=this['_tomap'](_0xb46714['tlng'],_0xb46714['tlat'],_0xb46714);if(!_0x2798d1||!_0x518a94)continue;if(_0x4f8f24&&Math[_0x579e1d(0x208)](_0x2798d1[0x0]-_0x518a94[0x0])>=_0x4a9378)continue;this['canvasContext']['beginPath'](),this[_0x579e1d(0x20f)]['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this[_0x579e1d(0x1f4)]['getColor'](_0xb46714['speed']),this['canvasContext']['moveTo'](_0x2798d1[0x0],_0x2798d1[0x1]),this['canvasContext']['lineTo'](_0x518a94[0x0],_0x518a94[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext'][_0x579e1d(0x206)](),this['canvasContext'][_0x579e1d(0x1e4)]=this['lineWidth'],this['canvasContext']['strokeStyle']=this[_0x579e1d(0x29f)];for(let _0x25cbee=0x0,_0x444335=_0x380f14[_0x579e1d(0x20e)];_0x25cbee<_0x444335;_0x25cbee++){const _0x219f71=_0x380f14[_0x25cbee],_0x37ec24=this['_tomap'](_0x219f71['lng'],_0x219f71[_0x579e1d(0x2c1)],_0x219f71),_0x595274=this['_tomap'](_0x219f71['tlng'],_0x219f71['tlat'],_0x219f71);if(!_0x37ec24||!_0x595274)continue;if(_0x4f8f24&&Math['abs'](_0x37ec24[0x0]-_0x595274[0x0])>=_0x4a9378)continue;this[_0x579e1d(0x20f)][_0x579e1d(0x2b0)](_0x37ec24[0x0],_0x37ec24[0x1]),this['canvasContext']['lineTo'](_0x595274[0x0],_0x595274[0x1]);}this['canvasContext']['stroke']();}}['_tomap'](_0x34aeee,_0x4e516b,_0x101b85){const _0x30550a=_0x5cbd89,_0x2c1416=Cesium['Cartesian3']['fromDegrees'](_0x34aeee,_0x4e516b,this[_0x30550a(0x281)]),_0x19d8e1=this[_0x30550a(0x1ed)][_0x30550a(0x227)];if(_0x19d8e1['mode']===Cesium['SceneMode']['SCENE3D']){const _0x3ad025=new Cesium['EllipsoidalOccluder'](_0x19d8e1['globe']['ellipsoid'],_0x19d8e1['camera']['positionWC']),_0x149817=_0x3ad025['isPointVisible'](_0x2c1416);if(!_0x149817)return _0x101b85['age']=0x0,null;}const _0x275a45=Cesium['SceneTransforms']['wgs84ToWindowCoordinates'](this['_map'][_0x30550a(0x227)],_0x2c1416);return _0x275a45?[_0x275a45['x'],_0x275a45['y']]:null;}['clear'](){this['windField']['clear'](),delete this['windData'];}['initWorker'](){const _0x90bc1=_0x5cbd89;this['worker']=new Worker(this[_0x90bc1(0x257)]['worker']),this['worker']['onmessage']=_0x1032d5=>{const _0x458c31=_0x90bc1;this['_drawLines'](_0x1032d5[_0x458c31(0x271)][_0x458c31(0x28a)]),this[_0x458c31(0x298)]=![];},this[_0x90bc1(0x2ba)]={'init':_0x5dc293=>{this['worker']['postMessage']({'type':'init','options':_0x5dc293});},'setOptions':_0x2e2055=>{const _0x3d43d3=_0x90bc1;this[_0x3d43d3(0x1ec)]['postMessage']({'type':_0x3d43d3(0x1db),'options':_0x2e2055});},'setDate':_0x5f06de=>{this['worker']['postMessage']({'type':'setDate','data':_0x5f06de});},'update':()=>{const _0x2284a8=_0x90bc1;if(this['_updateIng2'])return;this[_0x2284a8(0x298)]=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{this['worker']['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace[_0x5cbd89(0x2ae)]['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace[_0x5cbd89(0x290)]=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports['CanvasWindField']=CanvasWindField,exports[_0x5cbd89(0x23e)]=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object[_0x5cbd89(0x1fb)](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-wind",
3
- "version": "3.6.9",
3
+ "version": "3.6.10",
4
4
  "description": "Mars3D平台插件,支持气象 风向图 功能插件",
5
5
  "main": "dist/mars3d-wind.js",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "peerDependencies": {},
10
10
  "devDependencies": {
11
- "mars3d": "~3.6.9"
11
+ "mars3d": "~3.6.10"
12
12
  },
13
13
  "scripts": {
14
14
  "lint": "eslint ./src/**/*.{js,ts} --fix"