/** * Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind * * 版本信息:v3.10.12 * 编译日期:2026-01-11 17:27 * 版权所有:Copyright by 火星科技 http://mars3d.cn * 使用单位:山东慧创信息科技有限公司 ,2025-08-04 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, (window.mars3d || require('mars3d'))) : typeof define === 'function' && define.amd ? define(['exports', 'mars3d'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-wind"] = {}, global.mars3d)); })(this, (function (exports, mars3d) { 'use strict';const _0x41c01c=_0x46b6;(function(_0x3bd10,_0x53ce5a){const _0x4a480c=_0x46b6,_0x40bfd6=_0x3bd10();while(!![]){try{const _0x2baa3b=parseInt(_0x4a480c(0x224))/0x1*(-parseInt(_0x4a480c(0x231))/0x2)+-parseInt(_0x4a480c(0x208))/0x3+-parseInt(_0x4a480c(0x1f5))/0x4*(-parseInt(_0x4a480c(0x1ce))/0x5)+parseInt(_0x4a480c(0x1f0))/0x6*(parseInt(_0x4a480c(0x25f))/0x7)+parseInt(_0x4a480c(0x1ad))/0x8*(-parseInt(_0x4a480c(0x1cc))/0x9)+parseInt(_0x4a480c(0x230))/0xa*(parseInt(_0x4a480c(0x1e9))/0xb)+parseInt(_0x4a480c(0x274))/0xc*(parseInt(_0x4a480c(0x1c6))/0xd);if(_0x2baa3b===_0x53ce5a)break;else _0x40bfd6['push'](_0x40bfd6['shift']());}catch(_0x124bcd){_0x40bfd6['push'](_0x40bfd6['shift']());}}}(_0x1137,0x9d681));function _interopNamespace(_0x55621d){const _0x4ee8af=_0x46b6;if(_0x55621d&&_0x55621d['__esModule'])return _0x55621d;var _0x44060a=Object['create'](null);return _0x55621d&&Object[_0x4ee8af(0x21f)](_0x55621d)['forEach'](function(_0x1a3bc4){const _0x3b5047=_0x4ee8af;if(_0x1a3bc4!=='default'){var _0xcd1ef9=Object[_0x3b5047(0x26d)](_0x55621d,_0x1a3bc4);Object['defineProperty'](_0x44060a,_0x1a3bc4,_0xcd1ef9['get']?_0xcd1ef9:{'enumerable':!![],'get':function(){return _0x55621d[_0x1a3bc4];}});}}),_0x44060a['default']=_0x55621d,_0x44060a;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$2=mars3d__namespace['Cesium'];function _0x1137(){const _0x4ead1e=['windField','PointTrans','tlat','clientHeight','forEach','_animateFrame','colorTable','cos','drawingBufferWidth','_showHook','UNSIGNED_INT','frameRateMonitor','speed','globalCompositeOperation','destroyParticlesTextures','_speedRate','call','speedRate','Cesium','reCreateWindTextures','context','frameRate','south','18148351Rchrig','show','cancelAnimationFrame','lonRange','destroy','EventType','99foyiKD','container','5PuYltR','worker','scene','particleSystem','createRenderingFramebuffers','min','CanvasWindField','ellipsoid','outputTexture','requestAnimationFrame','_drawLines','resize','clear','grid','hidden','preExecute','windData','lineWidth','LayerUtil','cols','getContext','particlesTextures','frameTime','particlesNumber','frameState.commandList\x20is\x20undefined','slice','globe','385561zfCKfa','#version\x20300\x20es\x0a\x0a//\x20the\x20size\x20of\x20UV\x20textures:\x20width\x20=\x20lon,\x20height\x20=\x20lat\x0auniform\x20sampler2D\x20U;\x20//\x20eastward\x20wind\x0auniform\x20sampler2D\x20V;\x20//\x20northward\x20wind\x0auniform\x20sampler2D\x20currentParticlesPosition;\x20//\x20(lon,\x20lat,\x20lev)\x0a\x0auniform\x20vec2\x20uRange;\x20//\x20(min,\x20max)\x0auniform\x20vec2\x20vRange;\x20//\x20(min,\x20max)\x0auniform\x20vec2\x20speedRange;\x20//\x20(min,\x20max)\x0auniform\x20vec2\x20dimension;\x20//\x20(lon,\x20lat)\x0auniform\x20vec2\x20minimum;\x20//\x20minimum\x20of\x20each\x20dimension\x0auniform\x20vec2\x20maximum;\x20//\x20maximum\x20of\x20each\x20dimension\x0a\x0auniform\x20float\x20speedScaleFactor;\x0auniform\x20float\x20frameRateAdjustment;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0avec2\x20getInterval(vec2\x20maximum,\x20vec2\x20minimum,\x20vec2\x20dimension)\x20{\x0a\x20\x20return\x20(maximum\x20-\x20minimum)\x20/\x20(dimension\x20-\x201.0f);\x0a}\x0a\x0avec2\x20mapPositionToNormalizedIndex2D(vec2\x20lonLat)\x20{\x0a\x20\x20\x20\x20//\x20ensure\x20the\x20range\x20of\x20longitude\x20and\x20latitude\x0a\x20\x20lonLat.x\x20=\x20clamp(lonLat.x,\x20minimum.x,\x20maximum.x);\x0a\x20\x20lonLat.y\x20=\x20clamp(lonLat.y,\x20minimum.y,\x20maximum.y);\x0a\x0a\x20\x20vec2\x20interval\x20=\x20getInterval(maximum,\x20minimum,\x20dimension);\x0a\x0a\x20\x20vec2\x20index2D\x20=\x20vec2(0.0f);\x0a\x20\x20index2D.x\x20=\x20(lonLat.x\x20-\x20minimum.x)\x20/\x20interval.x;\x0a\x20\x20index2D.y\x20=\x20(lonLat.y\x20-\x20minimum.y)\x20/\x20interval.y;\x0a\x0a\x20\x20vec2\x20normalizedIndex2D\x20=\x20vec2(index2D.x\x20/\x20dimension.x,\x20index2D.y\x20/\x20dimension.y);\x0a\x20\x20return\x20normalizedIndex2D;\x0a}\x0a\x0afloat\x20getWindComponent(sampler2D\x20componentTexture,\x20vec2\x20lonLat)\x20{\x0a\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLat);\x0a\x20\x20float\x20result\x20=\x20texture(componentTexture,\x20normalizedIndex2D).r;\x0a\x20\x20return\x20result;\x0a}\x0a\x0avec2\x20getWindComponents(vec2\x20lonLat)\x20{\x0a\x20\x20vec2\x20normalizedIndex2D\x20=\x20mapPositionToNormalizedIndex2D(lonLat);\x0a\x20\x20float\x20u\x20=\x20texture(U,\x20normalizedIndex2D).r;\x0a\x20\x20float\x20v\x20=\x20texture(V,\x20normalizedIndex2D).r;\x0a\x20\x20return\x20vec2(u,\x20v);\x0a}\x0a\x0avec2\x20bilinearInterpolation(vec2\x20lonLat)\x20{\x0a\x20\x20float\x20lon\x20=\x20lonLat.x;\x0a\x20\x20float\x20lat\x20=\x20lonLat.y;\x0a\x0a\x20\x20vec2\x20interval\x20=\x20getInterval(maximum,\x20minimum,\x20dimension);\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20grid\x20cell\x20coordinates\x0a\x20\x20float\x20lon0\x20=\x20floor(lon\x20/\x20interval.x)\x20*\x20interval.x;\x0a\x20\x20float\x20lon1\x20=\x20lon0\x20+\x20interval.x;\x0a\x20\x20float\x20lat0\x20=\x20floor(lat\x20/\x20interval.y)\x20*\x20interval.y;\x0a\x20\x20float\x20lat1\x20=\x20lat0\x20+\x20interval.y;\x0a\x0a\x20\x20\x20\x20//\x20Get\x20wind\x20vectors\x20at\x20four\x20corners\x0a\x20\x20vec2\x20v00\x20=\x20getWindComponents(vec2(lon0,\x20lat0));\x0a\x20\x20vec2\x20v10\x20=\x20getWindComponents(vec2(lon1,\x20lat0));\x0a\x20\x20vec2\x20v01\x20=\x20getWindComponents(vec2(lon0,\x20lat1));\x0a\x20\x20vec2\x20v11\x20=\x20getWindComponents(vec2(lon1,\x20lat1));\x0a\x0a\x20\x20\x20\x20//\x20Check\x20if\x20all\x20wind\x20vectors\x20are\x20zero\x0a\x20\x20if(length(v00)\x20==\x200.0f\x20&&\x20length(v10)\x20==\x200.0f\x20&&\x20length(v01)\x20==\x200.0f\x20&&\x20length(v11)\x20==\x200.0f)\x20{\x0a\x20\x20\x20\x20return\x20vec2(0.0f,\x200.0f);\x0a\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20interpolation\x20weights\x0a\x20\x20float\x20s\x20=\x20(lon\x20-\x20lon0)\x20/\x20interval.x;\x0a\x20\x20float\x20t\x20=\x20(lat\x20-\x20lat0)\x20/\x20interval.y;\x0a\x0a\x20\x20\x20\x20//\x20Perform\x20bilinear\x20interpolation\x20on\x20vector\x20components\x0a\x20\x20vec2\x20v0\x20=\x20mix(v00,\x20v10,\x20s);\x0a\x20\x20vec2\x20v1\x20=\x20mix(v01,\x20v11,\x20s);\x0a\x20\x20return\x20mix(v0,\x20v1,\x20t);\x0a}\x0a\x0avec2\x20lengthOfLonLat(vec2\x20lonLat)\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\x20float\x20latitude\x20=\x20radians(lonLat.y);\x0a\x0a\x20\x20float\x20term1\x20=\x20111132.92f;\x0a\x20\x20float\x20term2\x20=\x20559.82f\x20*\x20cos(2.0f\x20*\x20latitude);\x0a\x20\x20float\x20term3\x20=\x201.175f\x20*\x20cos(4.0f\x20*\x20latitude);\x0a\x20\x20float\x20term4\x20=\x200.0023f\x20*\x20cos(6.0f\x20*\x20latitude);\x0a\x20\x20float\x20latLength\x20=\x20term1\x20-\x20term2\x20+\x20term3\x20-\x20term4;\x0a\x0a\x20\x20float\x20term5\x20=\x20111412.84f\x20*\x20cos(latitude);\x0a\x20\x20float\x20term6\x20=\x2093.5f\x20*\x20cos(3.0f\x20*\x20latitude);\x0a\x20\x20float\x20term7\x20=\x200.118f\x20*\x20cos(5.0f\x20*\x20latitude);\x0a\x20\x20float\x20longLength\x20=\x20term5\x20-\x20term6\x20+\x20term7;\x0a\x0a\x20\x20return\x20vec2(longLength,\x20latLength);\x0a}\x0a\x0avec2\x20convertSpeedUnitToLonLat(vec2\x20lonLat,\x20vec2\x20speed)\x20{\x0a\x20\x20vec2\x20lonLatLength\x20=\x20lengthOfLonLat(lonLat);\x0a\x20\x20float\x20u\x20=\x20speed.x\x20/\x20lonLatLength.x;\x0a\x20\x20float\x20v\x20=\x20speed.y\x20/\x20lonLatLength.y;\x0a\x20\x20vec2\x20windVectorInLonLat\x20=\x20vec2(u,\x20v);\x0a\x0a\x20\x20return\x20windVectorInLonLat;\x0a}\x0a\x0avec2\x20calculateSpeedByRungeKutta2(vec2\x20lonLat)\x20{\x0a\x20\x20\x20\x20//\x20see\x20https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Second-order_methods_with_two_stages\x20for\x20detail\x0a\x20\x20const\x20float\x20h\x20=\x200.5f;\x0a\x0a\x20\x20vec2\x20y_n\x20=\x20lonLat;\x0a\x20\x20vec2\x20f_n\x20=\x20bilinearInterpolation(lonLat);\x0a\x20\x20vec2\x20midpoint\x20=\x20y_n\x20+\x200.5f\x20*\x20h\x20*\x20convertSpeedUnitToLonLat(y_n,\x20f_n)\x20*\x20speedScaleFactor;\x0a\x20\x20vec2\x20speed\x20=\x20h\x20*\x20bilinearInterpolation(midpoint)\x20*\x20speedScaleFactor;\x0a\x0a\x20\x20return\x20speed;\x0a}\x0a\x0avec2\x20calculateWindNorm(vec2\x20speed)\x20{\x0a\x20\x20float\x20speedLength\x20=\x20length(speed.xy);\x0a\x20\x20if(speedLength\x20==\x200.0f)\x20{\x0a\x20\x20\x20\x20return\x20vec2(0.0f);\x0a\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20Clamp\x20speedLength\x20to\x20range\x0a\x20\x20float\x20clampedSpeed\x20=\x20clamp(speedLength,\x20speedRange.x,\x20speedRange.y);\x0a\x20\x20float\x20normalizedSpeed\x20=\x20(clampedSpeed\x20-\x20speedRange.x)\x20/\x20(speedRange.y\x20-\x20speedRange.x);\x0a\x20\x20return\x20vec2(speedLength,\x20normalizedSpeed);\x0a}\x0a\x0aout\x20vec4\x20fragColor;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20texture\x20coordinate\x20must\x20be\x20normalized\x0a\x20\x20vec2\x20lonLat\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rg;\x0a\x20\x20vec2\x20speedOrigin\x20=\x20bilinearInterpolation(lonLat);\x0a\x20\x20vec2\x20speed\x20=\x20calculateSpeedByRungeKutta2(lonLat)\x20*\x20frameRateAdjustment;\x0a\x20\x20vec2\x20speedInLonLat\x20=\x20convertSpeedUnitToLonLat(lonLat,\x20speed);\x0a\x0a\x20\x20fragColor\x20=\x20vec4(speedInLonLat,\x20calculateWindNorm(speedOrigin));\x0a}\x0a','east','particlesTextureSize\x20must\x20be\x20greater\x20than\x200','_updateIng','layer','min\x20is\x20undefined,\x20calculate\x20min','6ekrmmt','data','bounds','FUNC_ADD','flatMap','426560daOBeA','style','particles','setOptions','update','#ffffff','useViewerBounds','dynamic','processWindData','log','2026-01-11\x2017:26','createWindTextures','getSegmentDrawFragmentShader','_pointerEvents','fragmentShaderSource','setDate','redraw','ymax','pixelSize','2931225jJTQCX','postProcessingPosition','_removedHook','clearCommand','segments','push','none','Cartesian2','zIndex','computing','west','Compute','pow','maxAge','round','off','morphComplete','xmin','vmin','udata','_colorRamp','_onMouseMoveEvent','getPrimitives','keys','init','array','abs','LINEAR','6271YSmHBW','object','camera','EllipsoidalOccluder','particlesSpeed','commandType','mouse_move','fromCache','_calcUV','bind','SCENE3D','autoClear','360XpLibG','408NxPFFM','UNSIGNED_BYTE','length','canvas','mouseDown','WindLayer','initWorker','framebuffer','xmax','moveTo','Math','ymin','north','currentParticlesPosition','updateViewerParameters','getPostProcessingPositionShader','flipY','age','commandToExecute','getDefaultRenderState','fromDegrees','rendering','visibility','geometry','sqrt','canvasHeight','width','particlesTextureSize','rawRenderState','ColorRamp','_onMouseDownEvent','max','_onMouseUpEvent','alt','removeEventListener','canvasContext','clientWidth','height','fromCssColorString','getUVByXY','domain','isDestroyed','commandList','rows','windTextures','attributeLocations','1296722ACxgFl','createSegmentsGeometry','warn','_map','_tomap','primitives','random','lng','changed','framebuffers','_randomParticle','OPAQUE','visible','color','getOwnPropertyDescriptor','_bilinearInterpolation','onmessage','createColorTableTexture','createRawRenderState','colors','frameRateAdjustment','12sdSTPO','beginPath','viewerParameters','_setOptionsHook','reverse','FLOAT','wheel','nextParticlesPosition','floor','options','shaderProgram','displayRange','fromGeometry','mouse_down','postMessage','getDataAtLonLat','tlng','35384BliRYk','_addedHook'];_0x1137=function(){return _0x4ead1e;};return _0x1137();}function getU(_0x27a5ca,_0x28d412){const _0x3a1bae=_0x46b6,_0x58afba=_0x27a5ca*Math[_0x3a1bae(0x1b6)](Cesium$2['Math']['toRadians'](_0x28d412));return _0x58afba;}function getV(_0x329d6a,_0x222def){const _0x2086e4=_0x329d6a*Math['sin'](Cesium$2['Math']['toRadians'](_0x222def));return _0x2086e4;}function getSpeed(_0x128b8d,_0x45010b){const _0x38ff93=_0x46b6,_0x244d7b=Math['sqrt'](Math['pow'](_0x128b8d,0x2)+Math[_0x38ff93(0x214)](_0x45010b,0x2));return _0x244d7b;}function getDirection(_0x1813b9,_0x3338ef){const _0x35f6cd=_0x46b6;let _0x29e75c=Cesium$2[_0x35f6cd(0x23b)]['toDegrees'](Math['atan2'](_0x3338ef,_0x1813b9));return _0x29e75c+=_0x29e75c<0x0?0x168:0x0,_0x29e75c;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const version='3.10.12',buildTime=_0x41c01c(0x1ff);var updatePositionShader='#version\x20300\x20es\x0aprecision\x20highp\x20float;\x0a\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20particlesSpeed;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0aout\x20vec4\x20fragColor;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20获取当前粒子的位置\x0a\x20\x20vec2\x20currentPos\x20=\x20texture(currentParticlesPosition,\x20v_textureCoordinates).rg;\x0a\x20\x20\x20\x20//\x20获取粒子的速度\x0a\x20\x20vec2\x20speed\x20=\x20texture(particlesSpeed,\x20v_textureCoordinates).rg;\x0a\x20\x20\x20\x20//\x20计算下一个位置\x0a\x20\x20vec2\x20nextPos\x20=\x20currentPos\x20+\x20speed;\x0a\x0a\x20\x20\x20\x20//\x20将新的位置写入\x20fragColor\x0a\x20\x20fragColor\x20=\x20vec4(nextPos,\x200.0f,\x201.0f);\x0a}\x0a',calculateSpeedShader=_0x41c01c(0x1ea),postProcessingPositionFragmentShader='#version\x20300\x20es\x0aprecision\x20highp\x20float;\x0a\x0auniform\x20sampler2D\x20nextParticlesPosition;\x0auniform\x20sampler2D\x20particlesSpeed;\x20//\x20(u,\x20v,\x20norm)\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20lonRange;\x0auniform\x20vec2\x20latRange;\x0a\x0a//\x20range\x20(min,\x20max)\x0auniform\x20vec2\x20dataLonRange;\x0auniform\x20vec2\x20dataLatRange;\x0a\x0auniform\x20float\x20randomCoefficient;\x0auniform\x20float\x20dropRate;\x0auniform\x20float\x20dropRateBump;\x0a\x0a//\x20添加新的\x20uniform\x20变量\x0auniform\x20bool\x20useViewerBounds;\x0a\x0ain\x20vec2\x20v_textureCoordinates;\x0a\x0a//\x20pseudo-random\x20generator\x0aconst\x20vec3\x20randomConstants\x20=\x20vec3(12.9898f,\x2078.233f,\x204375.85453f);\x0aconst\x20vec2\x20normalRange\x20=\x20vec2(0.0f,\x201.0f);\x0afloat\x20rand(vec2\x20seed,\x20vec2\x20range)\x20{\x0a\x20\x20vec2\x20randomSeed\x20=\x20randomCoefficient\x20*\x20seed;\x0a\x20\x20float\x20temp\x20=\x20dot(randomConstants.xy,\x20randomSeed);\x0a\x20\x20temp\x20=\x20fract(sin(temp)\x20*\x20(randomConstants.z\x20+\x20temp));\x0a\x20\x20return\x20temp\x20*\x20(range.y\x20-\x20range.x)\x20+\x20range.x;\x0a}\x0a\x0avec2\x20generateRandomParticle(vec2\x20seed)\x20{\x0a\x20\x20vec2\x20range;\x0a\x20\x20float\x20randomLon,\x20randomLat;\x0a\x0a\x20\x20if(useViewerBounds)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20在当前视域范围内生成粒子\x0a\x20\x20\x20\x20randomLon\x20=\x20rand(seed,\x20lonRange);\x0a\x20\x20\x20\x20randomLat\x20=\x20rand(-seed,\x20latRange);\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20在数据范围内生成粒子\x0a\x20\x20\x20\x20randomLon\x20=\x20rand(seed,\x20dataLonRange);\x0a\x20\x20\x20\x20randomLat\x20=\x20rand(-seed,\x20dataLatRange);\x0a\x20\x20}\x0a\x0a\x20\x20return\x20vec2(randomLon,\x20randomLat);\x0a}\x0a\x0abool\x20particleOutbound(vec2\x20particle)\x20{\x0a\x20\x20return\x20particle.y\x20<\x20dataLatRange.x\x20||\x20particle.y\x20>\x20dataLatRange.y\x20||\x20particle.x\x20<\x20dataLonRange.x\x20||\x20particle.x\x20>\x20dataLonRange.y;\x0a}\x0a\x0aout\x20vec4\x20fragColor;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20vec2\x20nextParticle\x20=\x20texture(nextParticlesPosition,\x20v_textureCoordinates).rg;\x0a\x20\x20vec4\x20nextSpeed\x20=\x20texture(particlesSpeed,\x20v_textureCoordinates);\x0a\x20\x20float\x20speedNorm\x20=\x20nextSpeed.a;\x0a\x20\x20float\x20particleDropRate\x20=\x20dropRate\x20+\x20dropRateBump\x20*\x20speedNorm;\x0a\x0a\x20\x20vec2\x20seed1\x20=\x20nextParticle.xy\x20+\x20v_textureCoordinates;\x0a\x20\x20vec2\x20seed2\x20=\x20nextSpeed.rg\x20+\x20v_textureCoordinates;\x0a\x20\x20vec2\x20randomParticle\x20=\x20generateRandomParticle(seed1);\x0a\x20\x20float\x20randomNumber\x20=\x20rand(seed2,\x20normalRange);\x0a\x0a\x20\x20if(randomNumber\x20<\x20particleDropRate\x20||\x20particleOutbound(nextParticle))\x20{\x0a\x20\x20\x20\x20fragColor\x20=\x20vec4(randomParticle,\x200.0f,\x201.0f);\x20//\x201.0\x20means\x20this\x20is\x20a\x20random\x20particle\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20fragColor\x20=\x20vec4(nextParticle,\x200.0f,\x200.0f);\x0a\x20\x20}\x0a}\x0a',renderParticlesFragmentShader='#version\x20300\x20es\x0aprecision\x20highp\x20float;\x0a\x0ain\x20vec4\x20speed;\x0ain\x20float\x20v_segmentPosition;\x0ain\x20vec2\x20textureCoordinate;\x0a\x0auniform\x20vec2\x20domain;\x0auniform\x20vec2\x20displayRange;\x0auniform\x20sampler2D\x20colorTable;\x0auniform\x20sampler2D\x20segmentsDepthTexture;\x0a\x0aout\x20vec4\x20fragColor;\x0a\x0avoid\x20main()\x20{\x0a\x20\x20const\x20float\x20zero\x20=\x200.0f;\x0a\x20\x20if(speed.a\x20>\x20zero\x20&&\x20speed.b\x20>\x20displayRange.x\x20&&\x20speed.b\x20<\x20displayRange.y)\x20{\x0a\x20\x20\x20\x20float\x20speedLength\x20=\x20clamp(speed.b,\x20domain.x,\x20domain.y);\x0a\x20\x20\x20\x20float\x20normalizedSpeed\x20=\x20(speedLength\x20-\x20domain.x)\x20/\x20(domain.y\x20-\x20domain.x);\x0a\x20\x20\x20\x20vec4\x20baseColor\x20=\x20texture(colorTable,\x20vec2(normalizedSpeed,\x20zero));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用更平滑的渐变效果\x0a\x20\x20\x20\x20float\x20alpha\x20=\x20smoothstep(0.0f,\x201.0f,\x20v_segmentPosition);\x0a\x20\x20\x20\x20alpha\x20=\x20pow(alpha,\x201.5f);\x20//\x20调整透明度渐变曲线\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20根据速度调整透明度\x0a\x20\x20\x20\x20float\x20speedAlpha\x20=\x20mix(0.3f,\x201.0f,\x20speed.a);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20组合颜色和透明度\x0a\x20\x20\x20\x20fragColor\x20=\x20vec4(baseColor.rgb,\x20baseColor.a\x20*\x20alpha\x20*\x20speedAlpha);\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20fragColor\x20=\x20vec4(zero);\x0a\x20\x20}\x0a\x0a\x20\x20float\x20segmentsDepth\x20=\x20texture(segmentsDepthTexture,\x20textureCoordinate).r;\x0a\x20\x20float\x20globeDepth\x20=\x20czm_unpackDepth(texture(czm_globeDepthTexture,\x20textureCoordinate));\x0a\x20\x20if(segmentsDepth\x20<\x20globeDepth)\x20{\x0a\x20\x20\x20\x20fragColor\x20=\x20vec4(zero);\x0a\x20\x20}\x0a}\x0a',renderParticlesVertexShader='#version\x20300\x20es\x0aprecision\x20highp\x20float;\x0a\x0ain\x20vec2\x20st;\x0ain\x20vec3\x20normal;\x0a\x0auniform\x20sampler2D\x20previousParticlesPosition;\x0auniform\x20sampler2D\x20currentParticlesPosition;\x0auniform\x20sampler2D\x20postProcessingPosition;\x0auniform\x20sampler2D\x20particlesSpeed;\x0a\x0auniform\x20float\x20frameRateAdjustment;\x0auniform\x20float\x20particleHeight;\x0auniform\x20float\x20aspect;\x0auniform\x20float\x20pixelSize;\x0auniform\x20vec2\x20lineWidth;\x0auniform\x20vec2\x20lineLength;\x0auniform\x20vec2\x20domain;\x0auniform\x20bool\x20is3D;\x0a\x0a//\x20添加输出变量传递给片元着色器\x0aout\x20vec4\x20speed;\x0aout\x20float\x20v_segmentPosition;\x0aout\x20vec2\x20textureCoordinate;\x0a\x0a//\x20添加结构体定义\x0astruct\x20adjacentPoints\x20{\x0a\x20\x20vec4\x20previous;\x0a\x20\x20vec4\x20current;\x0a\x20\x20vec4\x20next;\x0a};\x0a\x0avec3\x20convertCoordinate(vec2\x20lonLat)\x20{\x0a\x20\x20\x20\x20//\x20WGS84\x20(lon,\x20lat,\x20lev)\x20->\x20ECEF\x20(x,\x20y,\x20z)\x0a\x20\x20\x20\x20//\x20read\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\x20float\x20a\x20=\x206378137.0f;\x20//\x20Semi-major\x20axis\x0a\x20\x20float\x20b\x20=\x206356752.3142f;\x20//\x20Semi-minor\x20axis\x0a\x20\x20float\x20e2\x20=\x206.69437999014e-3f;\x20//\x20First\x20eccentricity\x20squared\x0a\x0a\x20\x20float\x20latitude\x20=\x20radians(lonLat.y);\x0a\x20\x20float\x20longitude\x20=\x20radians(lonLat.x);\x0a\x0a\x20\x20float\x20cosLat\x20=\x20cos(latitude);\x0a\x20\x20float\x20sinLat\x20=\x20sin(latitude);\x0a\x20\x20float\x20cosLon\x20=\x20cos(longitude);\x0a\x20\x20float\x20sinLon\x20=\x20sin(longitude);\x0a\x0a\x20\x20float\x20N_Phi\x20=\x20a\x20/\x20sqrt(1.0f\x20-\x20e2\x20*\x20sinLat\x20*\x20sinLat);\x0a\x20\x20float\x20h\x20=\x20particleHeight;\x20//\x20it\x20should\x20be\x20high\x20enough\x20otherwise\x20the\x20particle\x20may\x20not\x20pass\x20the\x20terrain\x20depth\x20test\x0a\x20\x20vec3\x20cartesian\x20=\x20vec3(0.0f);\x0a\x20\x20cartesian.x\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20cosLon;\x0a\x20\x20cartesian.y\x20=\x20(N_Phi\x20+\x20h)\x20*\x20cosLat\x20*\x20sinLon;\x0a\x20\x20cartesian.z\x20=\x20((b\x20*\x20b)\x20/\x20(a\x20*\x20a)\x20*\x20N_Phi\x20+\x20h)\x20*\x20sinLat;\x0a\x20\x20return\x20cartesian;\x0a}\x0a\x0avec4\x20calculateProjectedCoordinate(vec2\x20lonLat)\x20{\x0a\x20\x20if(is3D)\x20{\x0a\x20\x20\x20\x20vec3\x20particlePosition\x20=\x20convertCoordinate(lonLat);\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用\x20modelViewProjection\x20矩阵进行投影变换\x0a\x20\x20\x20\x20vec4\x20projectedPosition\x20=\x20czm_modelViewProjection\x20*\x20vec4(particlePosition,\x201.0f);\x0a\x20\x20\x20\x20return\x20projectedPosition;\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20vec3\x20position2D\x20=\x20vec3(radians(lonLat.x),\x20radians(lonLat.y),\x200.0f);\x0a\x20\x20\x20\x20return\x20czm_modelViewProjection\x20*\x20vec4(position2D,\x201.0f);\x0a\x20\x20}\x0a}\x0a\x0avec4\x20calculateOffsetOnNormalDirection(vec4\x20pointA,\x20vec4\x20pointB,\x20float\x20offsetSign,\x20float\x20widthFactor)\x20{\x0a\x20\x20vec2\x20aspectVec2\x20=\x20vec2(aspect,\x201.0f);\x0a\x20\x20vec2\x20pointA_XY\x20=\x20(pointA.xy\x20/\x20pointA.w)\x20*\x20aspectVec2;\x0a\x20\x20vec2\x20pointB_XY\x20=\x20(pointB.xy\x20/\x20pointB.w)\x20*\x20aspectVec2;\x0a\x0a\x20\x20\x20\x20//\x20计算方向向量\x0a\x20\x20vec2\x20direction\x20=\x20normalize(pointB_XY\x20-\x20pointA_XY);\x0a\x0a\x20\x20\x20\x20//\x20计算法向量\x0a\x20\x20vec2\x20normalVector\x20=\x20vec2(-direction.y,\x20direction.x);\x0a\x20\x20normalVector.x\x20=\x20normalVector.x\x20/\x20aspect;\x0a\x0a\x20\x20\x20\x20//\x20使用\x20widthFactor\x20调整宽度\x0a\x20\x20float\x20offsetLength\x20=\x20widthFactor\x20*\x20lineWidth.y;\x0a\x20\x20normalVector\x20=\x20offsetLength\x20*\x20normalVector;\x0a\x0a\x20\x20vec4\x20offset\x20=\x20vec4(offsetSign\x20*\x20normalVector,\x200.0f,\x200.0f);\x0a\x20\x20return\x20offset;\x0a}\x0a\x0avoid\x20main()\x20{\x0a\x20\x20\x20\x20//\x20翻转\x20Y\x20轴坐标\x0a\x20\x20vec2\x20flippedIndex\x20=\x20vec2(st.x,\x201.0f\x20-\x20st.y);\x0a\x0a\x20\x20vec2\x20particleIndex\x20=\x20flippedIndex;\x0a\x20\x20speed\x20=\x20texture(particlesSpeed,\x20particleIndex);\x0a\x0a\x20\x20vec2\x20previousPosition\x20=\x20texture(previousParticlesPosition,\x20particleIndex).rg;\x0a\x20\x20vec2\x20currentPosition\x20=\x20texture(currentParticlesPosition,\x20particleIndex).rg;\x0a\x20\x20vec2\x20nextPosition\x20=\x20texture(postProcessingPosition,\x20particleIndex).rg;\x0a\x0a\x20\x20float\x20isAnyRandomPointUsed\x20=\x20texture(postProcessingPosition,\x20particleIndex).a\x20+\x0a\x20\x20\x20\x20texture(currentParticlesPosition,\x20particleIndex).a\x20+\x0a\x20\x20\x20\x20texture(previousParticlesPosition,\x20particleIndex).a;\x0a\x0a\x20\x20adjacentPoints\x20projectedCoordinates;\x0a\x20\x20if(isAnyRandomPointUsed\x20>\x200.0f)\x20{\x0a\x20\x20\x20\x20projectedCoordinates.previous\x20=\x20calculateProjectedCoordinate(previousPosition);\x0a\x20\x20\x20\x20projectedCoordinates.current\x20=\x20projectedCoordinates.previous;\x0a\x20\x20\x20\x20projectedCoordinates.next\x20=\x20projectedCoordinates.previous;\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20projectedCoordinates.previous\x20=\x20calculateProjectedCoordinate(previousPosition);\x0a\x20\x20\x20\x20projectedCoordinates.current\x20=\x20calculateProjectedCoordinate(currentPosition);\x0a\x20\x20\x20\x20projectedCoordinates.next\x20=\x20calculateProjectedCoordinate(nextPosition);\x0a\x20\x20}\x0a\x0a\x20\x20int\x20pointToUse\x20=\x20int(normal.x);\x0a\x20\x20float\x20offsetSign\x20=\x20normal.y;\x0a\x20\x20vec4\x20offset\x20=\x20vec4(0.0f);\x0a\x0a\x20\x20\x20\x20//\x20计算速度相关的宽度和长度因子\x0a\x20\x20float\x20speedLength\x20=\x20clamp(speed.b,\x20domain.x,\x20domain.y);\x0a\x20\x20float\x20normalizedSpeed\x20=\x20(speedLength\x20-\x20domain.x)\x20/\x20(domain.y\x20-\x20domain.x);\x0a\x0a\x20\x20\x20\x20//\x20根据速度计算宽度\x0a\x20\x20float\x20widthFactor\x20=\x20mix(lineWidth.x,\x20lineWidth.y,\x20normalizedSpeed);\x0a\x20\x20widthFactor\x20*=\x20(pointToUse\x20<\x200\x20?\x201.0f\x20:\x200.5f);\x20//\x20头部更宽,尾部更窄\x0a\x0a\x20\x20\x20\x20//\x20Calculate\x20length\x20based\x20on\x20speed\x0a\x20\x20float\x20lengthFactor\x20=\x20mix(lineLength.x,\x20lineLength.y,\x20normalizedSpeed)\x20*\x20pixelSize;\x0a\x0a\x20\x20if(pointToUse\x20==\x201)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20头部位置\x0a\x20\x20\x20\x20offset\x20=\x20pixelSize\x20*\x20calculateOffsetOnNormalDirection(projectedCoordinates.previous,\x20projectedCoordinates.current,\x20offsetSign,\x20widthFactor);\x0a\x20\x20\x20\x20gl_Position\x20=\x20projectedCoordinates.previous\x20+\x20offset;\x0a\x20\x20\x20\x20v_segmentPosition\x20=\x200.0f;\x20//\x20头部\x0a\x20\x20}\x20else\x20if(pointToUse\x20==\x20-1)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Get\x20direction\x20and\x20normalize\x20it\x20to\x20length\x201.0\x0a\x20\x20\x20\x20vec4\x20direction\x20=\x20normalize(projectedCoordinates.next\x20-\x20projectedCoordinates.current);\x0a\x20\x20\x20\x20vec4\x20extendedPosition\x20=\x20projectedCoordinates.current\x20+\x20direction\x20*\x20lengthFactor;\x0a\x0a\x20\x20\x20\x20offset\x20=\x20pixelSize\x20*\x20calculateOffsetOnNormalDirection(projectedCoordinates.current,\x20extendedPosition,\x20offsetSign,\x20widthFactor);\x0a\x20\x20\x20\x20gl_Position\x20=\x20extendedPosition\x20+\x20offset;\x0a\x20\x20\x20\x20v_segmentPosition\x20=\x201.0f;\x20//\x20尾部\x0a\x20\x20}\x0a\x0a\x20\x20textureCoordinate\x20=\x20st;\x0a}\x0a';const {ShaderSource:ShaderSource$1}=mars3d__namespace['Cesium'];class ShaderManager{static['getCalculateSpeedShader'](){return new ShaderSource$1({'sources':[calculateSpeedShader]});}static['getUpdatePositionShader'](){return new ShaderSource$1({'sources':[updatePositionShader]});}static['getSegmentDrawVertexShader'](){return new ShaderSource$1({'sources':[renderParticlesVertexShader]});}static['getSegmentDrawFragmentShader'](){return new ShaderSource$1({'sources':[renderParticlesFragmentShader]});}static[_0x41c01c(0x240)](){return new ShaderSource$1({'sources':[postProcessingPositionFragmentShader]});}}const {BufferUsage:BufferUsage$1,ClearCommand:ClearCommand$1,Color:Color$2,ComputeCommand,DrawCommand,Geometry:Geometry$1,Matrix4,Pass:Pass$1,PrimitiveType:PrimitiveType$1,RenderState,ShaderProgram,ShaderSource,VertexArray:VertexArray$1,defined,destroyObject}=mars3d__namespace['Cesium'];class CustomPrimitive{constructor(_0x460fd0){const _0x4105f1=_0x41c01c;this[_0x4105f1(0x229)]=_0x460fd0['commandType'],this['geometry']=_0x460fd0['geometry'],this[_0x4105f1(0x25e)]=_0x460fd0['attributeLocations'],this['primitiveType']=_0x460fd0['primitiveType'],this['uniformMap']=_0x460fd0['uniformMap']||{},this['vertexShaderSource']=_0x460fd0['vertexShaderSource'],this['fragmentShaderSource']=_0x460fd0['fragmentShaderSource'],this[_0x4105f1(0x24d)]=_0x460fd0['rawRenderState'],this['framebuffer']=_0x460fd0['framebuffer'],this['outputTexture']=_0x460fd0[_0x4105f1(0x1d6)],this[_0x4105f1(0x22f)]=_0x460fd0['autoClear']??![],this['preExecute']=_0x460fd0['preExecute'],this['show']=!![],this[_0x4105f1(0x243)]=undefined,this[_0x4105f1(0x20b)]=undefined,this['isDynamic']=_0x460fd0['isDynamic']??(()=>!![]),this['autoClear']&&(this['clearCommand']=new ClearCommand$1({'color':new Color$2(0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0x4105f1(0x238)],'pass':Pass$1['OPAQUE']}));}['createCommand'](_0x44a78c){const _0x34f867=_0x41c01c;if(this[_0x34f867(0x229)]==='Draw'){const _0x2743d9=VertexArray$1[_0x34f867(0x1a8)]({'context':_0x44a78c,'geometry':this[_0x34f867(0x248)],'attributeLocations':this[_0x34f867(0x25e)],'bufferUsage':BufferUsage$1['STATIC_DRAW']}),_0x5622ff=ShaderProgram[_0x34f867(0x22b)]({'context':_0x44a78c,'vertexShaderSource':this['vertexShaderSource'],'fragmentShaderSource':this[_0x34f867(0x203)],'attributeLocations':this['attributeLocations']}),_0x197d70=RenderState['fromCache'](this['rawRenderState']);return new DrawCommand({'owner':this,'vertexArray':_0x2743d9,'primitiveType':this['primitiveType'],'modelMatrix':Matrix4['IDENTITY'],'renderState':_0x197d70,'shaderProgram':_0x5622ff,'framebuffer':this['framebuffer'],'uniformMap':this['uniformMap'],'pass':Pass$1['OPAQUE']});}else{if(this['commandType']==='Compute')return new ComputeCommand({'owner':this,'fragmentShaderSource':this[_0x34f867(0x203)],'uniformMap':this['uniformMap'],'outputTexture':this[_0x34f867(0x1d6)],'persists':!![]});else throw new Error('Unknown\x20command\x20type');}}['setGeometry'](_0x1df99c,_0x5ab18b){const _0x2e3912=_0x41c01c;this['geometry']=_0x5ab18b,defined(this['commandToExecute'])&&(this[_0x2e3912(0x243)]['vertexArray']=VertexArray$1['fromGeometry']({'context':_0x1df99c,'geometry':this[_0x2e3912(0x248)],'attributeLocations':this['attributeLocations'],'bufferUsage':BufferUsage$1['STATIC_DRAW']}));}['update'](_0x52bb19){const _0x3a1a01=_0x41c01c;if(!this['isDynamic']())return;if(!this['show']||!defined(_0x52bb19))return;!defined(this[_0x3a1a01(0x243)])&&(this['commandToExecute']=this['createCommand'](_0x52bb19[_0x3a1a01(0x1c3)]));defined(this['preExecute'])&&this[_0x3a1a01(0x1dd)]();if(!_0x52bb19[_0x3a1a01(0x25b)]){console['warn'](_0x3a1a01(0x1e6));return;}defined(this['clearCommand'])&&_0x52bb19[_0x3a1a01(0x25b)][_0x3a1a01(0x20d)](this['clearCommand']),defined(this[_0x3a1a01(0x243)])&&_0x52bb19['commandList'][_0x3a1a01(0x20d)](this['commandToExecute']);}[_0x41c01c(0x25a)](){return![];}['destroy'](){const _0x52f351=_0x41c01c;if(defined(this[_0x52f351(0x243)])){var _0x374839;(_0x374839=this['commandToExecute'][_0x52f351(0x1a6)])===null||_0x374839===void 0x0||_0x374839['destroy'](),this[_0x52f351(0x243)]['shaderProgram']=undefined;}return destroyObject(this);}}function deepMerge(_0x50d264,_0x82e2f7){const _0x8fd71c=_0x41c01c;if(!_0x50d264)return _0x82e2f7;if(!_0x82e2f7)return _0x50d264;const _0x38f4d9={..._0x82e2f7};for(const _0x4bc38a in _0x50d264){if(Object['prototype']['hasOwnProperty'][_0x8fd71c(0x1bf)](_0x50d264,_0x4bc38a)){const _0x575a01=_0x50d264[_0x4bc38a],_0x414ddf=_0x82e2f7[_0x4bc38a];if(Array['isArray'](_0x575a01)){_0x38f4d9[_0x4bc38a]=_0x575a01[_0x8fd71c(0x1e7)]();continue;}if(_0x575a01&&typeof _0x575a01===_0x8fd71c(0x225)){_0x38f4d9[_0x4bc38a]=deepMerge(_0x575a01,_0x414ddf||{});continue;}_0x575a01!==undefined&&(_0x38f4d9[_0x4bc38a]=_0x575a01);}}return _0x38f4d9;}const {Cartesian2:Cartesian2$1,FrameRateMonitor,PixelDatatype:PixelDatatype$1,PixelFormat:PixelFormat$1,Sampler:Sampler$1,Texture:Texture$1,TextureMagnificationFilter:TextureMagnificationFilter$1,TextureMinificationFilter:TextureMinificationFilter$1}=mars3d__namespace['Cesium'];class WindParticlesComputing{constructor(_0x3d8526,_0x45f627,_0x29c163,_0x142453,_0x2027a6){const _0x40d613=_0x41c01c;this['context']=_0x3d8526,this['options']=_0x29c163,this[_0x40d613(0x276)]=_0x142453,this['windData']=_0x45f627,this['frameRate']=0x3c,this[_0x40d613(0x273)]=0x1,this['frameRateMonitor']=new FrameRateMonitor({'scene':_0x2027a6,'samplingWindow':0x1,'quietPeriod':0x0}),this['initFrameRate'](),this[_0x40d613(0x200)](),this['createParticlesTextures'](),this['createComputingPrimitives']();}['initFrameRate'](){const _0x592654=_0x41c01c,_0x576302=()=>{const _0x1ff142=_0x46b6;this[_0x1ff142(0x1ba)]['lastFramesPerSecond']>0x14&&(this['frameRate']=this[_0x1ff142(0x1ba)]['lastFramesPerSecond'],this[_0x1ff142(0x273)]=0x3c/Math['max'](this[_0x1ff142(0x1c4)],0x1));};_0x576302();const _0x88a1cd=setInterval(_0x576302,0x3e8),_0x462018=this['destroy'][_0x592654(0x22d)](this);this['destroy']=()=>{clearInterval(_0x88a1cd),_0x462018();};}[_0x41c01c(0x200)](){const _0x3ef914=_0x41c01c,_0x374280={'context':this[_0x3ef914(0x1c3)],'width':this['windData']['width'],'height':this['windData']['height'],'pixelFormat':PixelFormat$1['RED'],'pixelDatatype':PixelDatatype$1[_0x3ef914(0x1a1)],'flipY':this['options'][_0x3ef914(0x241)]??![],'sampler':new Sampler$1({'minificationFilter':TextureMinificationFilter$1[_0x3ef914(0x223)],'magnificationFilter':TextureMagnificationFilter$1[_0x3ef914(0x223)]})};this['windTextures']={'U':new Texture$1({..._0x374280,'source':{'arrayBufferView':new Float32Array(this['windData']['u'][_0x3ef914(0x221)])}}),'V':new Texture$1({..._0x374280,'source':{'arrayBufferView':new Float32Array(this[_0x3ef914(0x1de)]['v']['array'])}})};}['createParticlesTextures'](){const _0x58b6da=_0x41c01c,_0x4da81d={'context':this['context'],'width':this[_0x58b6da(0x1a5)][_0x58b6da(0x24c)],'height':this['options']['particlesTextureSize'],'pixelFormat':PixelFormat$1['RGBA'],'pixelDatatype':PixelDatatype$1['FLOAT'],'flipY':![],'source':{'arrayBufferView':new Float32Array(this['options']['particlesTextureSize']*this['options']['particlesTextureSize']*0x4)['fill'](0x0)},'sampler':new Sampler$1({'minificationFilter':TextureMinificationFilter$1['NEAREST'],'magnificationFilter':TextureMagnificationFilter$1['NEAREST']})};this['particlesTextures']={'previousParticlesPosition':new Texture$1(_0x4da81d),'currentParticlesPosition':new Texture$1(_0x4da81d),'nextParticlesPosition':new Texture$1(_0x4da81d),'postProcessingPosition':new Texture$1(_0x4da81d),'particlesSpeed':new Texture$1(_0x4da81d)};}[_0x41c01c(0x1bd)](){const _0x51fbe4=_0x41c01c;Object['values'](this['particlesTextures'])[_0x51fbe4(0x1b3)](_0x321ad6=>_0x321ad6['destroy']());}['createComputingPrimitives'](){const _0x2c7b64=_0x41c01c;this['primitives']={'calculateSpeed':new CustomPrimitive({'commandType':_0x2c7b64(0x213),'uniformMap':{'U':()=>this['windTextures']['U'],'V':()=>this['windTextures']['V'],'uRange':()=>new Cartesian2$1(this[_0x2c7b64(0x1de)]['u']['min'],this[_0x2c7b64(0x1de)]['u'][_0x2c7b64(0x250)]),'vRange':()=>new Cartesian2$1(this['windData']['v']['min'],this[_0x2c7b64(0x1de)]['v']['max']),'speedRange':()=>new Cartesian2$1(this['windData'][_0x2c7b64(0x1bb)][_0x2c7b64(0x1d3)],this['windData']['speed'][_0x2c7b64(0x250)]),'currentParticlesPosition':()=>this['particlesTextures'][_0x2c7b64(0x23e)],'speedScaleFactor':()=>{return(this['viewerParameters']['pixelSize']+0x32)*this['options']['speedFactor'];},'frameRateAdjustment':()=>this['frameRateAdjustment'],'dimension':()=>new Cartesian2$1(this['windData']['width'],this['windData'][_0x2c7b64(0x256)]),'minimum':()=>new Cartesian2$1(this[_0x2c7b64(0x1de)]['bounds'][_0x2c7b64(0x212)],this['windData']['bounds'][_0x2c7b64(0x1c5)]),'maximum':()=>new Cartesian2$1(this['windData']['bounds']['east'],this['windData'][_0x2c7b64(0x1f2)]['north'])},'fragmentShaderSource':ShaderManager['getCalculateSpeedShader'](),'outputTexture':this['particlesTextures'][_0x2c7b64(0x228)],'preExecute':()=>{const _0x65a6c=_0x2c7b64,_0x53a269=this['particlesTextures']['previousParticlesPosition'];this['particlesTextures']['previousParticlesPosition']=this['particlesTextures']['currentParticlesPosition'],this['particlesTextures']['currentParticlesPosition']=this['particlesTextures']['postProcessingPosition'],this[_0x65a6c(0x1e3)][_0x65a6c(0x209)]=_0x53a269,this[_0x65a6c(0x264)]['calculateSpeed']['commandToExecute']&&(this['primitives']['calculateSpeed'][_0x65a6c(0x243)][_0x65a6c(0x1d6)]=this['particlesTextures']['particlesSpeed']);},'isDynamic':()=>this['options']['dynamic']}),'updatePosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'currentParticlesPosition':()=>this['particlesTextures']['currentParticlesPosition'],'particlesSpeed':()=>this[_0x2c7b64(0x1e3)]['particlesSpeed']},'fragmentShaderSource':ShaderManager['getUpdatePositionShader'](),'outputTexture':this['particlesTextures'][_0x2c7b64(0x1a3)],'preExecute':()=>{const _0x578694=_0x2c7b64;this['primitives']['updatePosition']['commandToExecute']&&(this['primitives']['updatePosition'][_0x578694(0x243)]['outputTexture']=this['particlesTextures'][_0x578694(0x1a3)]);},'isDynamic':()=>this[_0x2c7b64(0x1a5)][_0x2c7b64(0x1fc)]}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':()=>this['particlesTextures'][_0x2c7b64(0x1a3)],'particlesSpeed':()=>this[_0x2c7b64(0x1e3)]['particlesSpeed'],'lonRange':()=>this[_0x2c7b64(0x276)][_0x2c7b64(0x1c9)],'latRange':()=>this['viewerParameters']['latRange'],'dataLonRange':()=>new Cartesian2$1(this[_0x2c7b64(0x1de)]['bounds'][_0x2c7b64(0x212)],this[_0x2c7b64(0x1de)]['bounds'][_0x2c7b64(0x1eb)]),'dataLatRange':()=>new Cartesian2$1(this['windData']['bounds']['south'],this['windData']['bounds']['north']),'randomCoefficient':function(){const _0x5ab59a=_0x2c7b64;return Math[_0x5ab59a(0x265)]();},'dropRate':()=>this['options']['dropRate'],'dropRateBump':()=>this['options']['dropRateBump'],'useViewerBounds':()=>this['options'][_0x2c7b64(0x1fb)]},'fragmentShaderSource':ShaderManager['getPostProcessingPositionShader'](),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':()=>{const _0x4c3aab=_0x2c7b64;this[_0x4c3aab(0x264)]['postProcessingPosition']['commandToExecute']&&(this['primitives'][_0x4c3aab(0x209)]['commandToExecute'][_0x4c3aab(0x1d6)]=this['particlesTextures']['postProcessingPosition']);},'isDynamic':()=>this['options'][_0x2c7b64(0x1fc)]})};}[_0x41c01c(0x1c2)](){const _0x37dacc=_0x41c01c;this[_0x37dacc(0x25d)]['U']['destroy'](),this[_0x37dacc(0x25d)]['V']['destroy'](),this['createWindTextures']();}['updateWindData'](_0x404880){this['windData']=_0x404880,this['reCreateWindTextures']();}['updateOptions'](_0x1217a9){const _0x18c75a=_0x41c01c,_0x4acb21=_0x1217a9['flipY']!==undefined&&_0x1217a9['flipY']!==this[_0x18c75a(0x1a5)]['flipY'];this['options']=deepMerge(_0x1217a9,this['options']),_0x4acb21&&this['reCreateWindTextures']();}['processWindData'](_0x29f5b8){const _0x5bc30f=_0x41c01c,{array:_0x5d7609}=_0x29f5b8;let {min:_0x3f32f1,max:_0xd435bc}=_0x29f5b8;const _0x249f75=new Float32Array(_0x5d7609['length']);_0x3f32f1===undefined&&(console[_0x5bc30f(0x261)](_0x5bc30f(0x1ef)),_0x3f32f1=Math['min'](..._0x5d7609));_0xd435bc===undefined&&(console['warn']('max\x20is\x20undefined,\x20calculate\x20max'),_0xd435bc=Math[_0x5bc30f(0x250)](..._0x5d7609));const _0x42de96=Math[_0x5bc30f(0x250)](Math['abs'](_0x3f32f1),Math['abs'](_0xd435bc));for(let _0x54f422=0x0;_0x54f422<_0x5d7609[_0x5bc30f(0x233)];_0x54f422++){const _0x5c87f4=_0x5d7609[_0x54f422]/_0x42de96;_0x249f75[_0x54f422]=_0x5c87f4;}return _0x249f75;}['destroy'](){const _0x433e24=_0x41c01c;Object['values'](this['windTextures'])['forEach'](_0x354d0c=>_0x354d0c['destroy']()),Object['values'](this['particlesTextures'])['forEach'](_0x1f737a=>_0x1f737a['destroy']()),Object['values'](this[_0x433e24(0x264)])['forEach'](_0x3f1f23=>_0x3f1f23['destroy']()),this['frameRateMonitor'][_0x433e24(0x1ca)]();}}function _0x46b6(_0x32bcef,_0x554f67){const _0x1137f2=_0x1137();return _0x46b6=function(_0x46b6f7,_0x413138){_0x46b6f7=_0x46b6f7-0x1a1;let _0x23f1a2=_0x1137f2[_0x46b6f7];return _0x23f1a2;},_0x46b6(_0x32bcef,_0x554f67);}const {Appearance,BufferUsage,Cartesian2,Color:Color$1,ComponentDatatype,Framebuffer,Geometry,GeometryAttribute,GeometryAttributes,PixelDatatype,PixelFormat,PrimitiveType,Sampler,SceneMode,Texture,TextureMagnificationFilter,TextureMinificationFilter,TextureWrap,VertexArray}=mars3d__namespace['Cesium'];class WindParticlesRendering{constructor(_0x47deb4,_0x4bde07,_0x2124fa,_0x3f9b30){const _0x332de0=_0x41c01c;this['context']=_0x47deb4,this[_0x332de0(0x1a5)]=_0x4bde07,this[_0x332de0(0x276)]=_0x2124fa,this['computing']=_0x3f9b30,(typeof this['options'][_0x332de0(0x24c)]!=='number'||this['options'][_0x332de0(0x24c)]<=0x0)&&(console['error']('Invalid\x20particlesTextureSize.\x20Using\x20default\x20value\x20of\x20256.'),this[_0x332de0(0x1a5)]['particlesTextureSize']=0x100),this['colorTable']=this['createColorTableTexture'](),this['textures']=this['createRenderingTextures'](),this['framebuffers']=this['createRenderingFramebuffers'](),this['primitives']=this['createPrimitives']();}['createRenderingTextures'](){const _0x5d5adc=_0x41c01c,_0x4f37a2={'context':this[_0x5d5adc(0x1c3)],'width':this['context']['drawingBufferWidth'],'height':this['context']['drawingBufferHeight'],'pixelFormat':PixelFormat['RGBA'],'pixelDatatype':PixelDatatype[_0x5d5adc(0x232)]},_0x425e11={'context':this[_0x5d5adc(0x1c3)],'width':this['context'][_0x5d5adc(0x1b7)],'height':this['context']['drawingBufferHeight'],'pixelFormat':PixelFormat['DEPTH_COMPONENT'],'pixelDatatype':PixelDatatype[_0x5d5adc(0x1b9)]};return{'segmentsColor':new Texture(_0x4f37a2),'segmentsDepth':new Texture(_0x425e11)};}[_0x41c01c(0x1d2)](){return{'segments':new Framebuffer({'context':this['context'],'colorTextures':[this['textures']['segmentsColor']],'depthTexture':this['textures']['segmentsDepth']})};}['destoryRenderingFramebuffers'](){Object['values'](this['framebuffers'])['forEach'](_0x5a6c0e=>{_0x5a6c0e['destroy']();});}['createColorTableTexture'](){const _0x40857a=_0x41c01c,_0x3c9405=new Float32Array(this['options']['colors'][_0x40857a(0x1f4)](_0x556b94=>{const _0x1b4f1f=_0x40857a,_0xf4e761=Color$1[_0x1b4f1f(0x257)](_0x556b94);return[_0xf4e761['red'],_0xf4e761['green'],_0xf4e761['blue'],_0xf4e761['alpha']];}));return new Texture({'context':this[_0x40857a(0x1c3)],'width':this[_0x40857a(0x1a5)]['colors']['length'],'height':0x1,'pixelFormat':PixelFormat['RGBA'],'pixelDatatype':PixelDatatype['FLOAT'],'sampler':new Sampler({'minificationFilter':TextureMinificationFilter['LINEAR'],'magnificationFilter':TextureMagnificationFilter[_0x40857a(0x223)],'wrapS':TextureWrap['CLAMP_TO_EDGE'],'wrapT':TextureWrap['CLAMP_TO_EDGE']}),'source':{'width':this[_0x40857a(0x1a5)]['colors']['length'],'height':0x1,'arrayBufferView':_0x3c9405}});}[_0x41c01c(0x260)](){const _0x5ed434=0x4,_0x2a123e=this['options']['particlesTextureSize'];let _0x378363=[];for(let _0x43556a=0x0;_0x43556a<_0x2a123e;_0x43556a++){for(let _0x26cb07=0x0;_0x26cb07<_0x2a123e;_0x26cb07++){for(let _0x2d10bb=0x0;_0x2d10bb<_0x5ed434;_0x2d10bb++){_0x378363['push'](_0x43556a/_0x2a123e),_0x378363['push'](_0x26cb07/_0x2a123e);}}}_0x378363=new Float32Array(_0x378363);const _0x4cec24=this['options']['particlesTextureSize']**0x2;let _0x12ed27=[];for(let _0x588a82=0x0;_0x588a82<_0x4cec24;_0x588a82++){_0x12ed27['push'](-0x1,-0x1,0x0,-0x1,0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0);}_0x12ed27=new Float32Array(_0x12ed27);let _0x59f6af=[];for(let _0x54f844=0x0,_0x12f0e6=0x0;_0x54f844<_0x4cec24;_0x54f844++){_0x59f6af['push'](_0x12f0e6+0x0,_0x12f0e6+0x1,_0x12f0e6+0x2,_0x12f0e6+0x2,_0x12f0e6+0x1,_0x12f0e6+0x3),_0x12f0e6+=_0x5ed434;}_0x59f6af=new Uint32Array(_0x59f6af);const _0x38acec=new Geometry({'attributes':new GeometryAttributes({'st':new GeometryAttribute({'componentDatatype':ComponentDatatype['FLOAT'],'componentsPerAttribute':0x2,'values':_0x378363}),'normal':new GeometryAttribute({'componentDatatype':ComponentDatatype['FLOAT'],'componentsPerAttribute':0x3,'values':_0x12ed27})}),'indices':_0x59f6af});return _0x38acec;}['createRawRenderState'](_0x3f61ef){const _0x4365d8=_0x41c01c;return Appearance[_0x4365d8(0x244)](!![],![],{'viewport':undefined,'depthTest':undefined,'depthMask':undefined,'blending':undefined,..._0x3f61ef});}['createPrimitives'](){const _0x5ac10b=_0x41c01c,_0x48e53a=new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this[_0x5ac10b(0x260)](),'primitiveType':PrimitiveType['TRIANGLES'],'uniformMap':{'previousParticlesPosition':()=>this['computing']['particlesTextures']['previousParticlesPosition'],'currentParticlesPosition':()=>this['computing'][_0x5ac10b(0x1e3)]['currentParticlesPosition'],'postProcessingPosition':()=>this['computing']['particlesTextures']['postProcessingPosition'],'particlesSpeed':()=>this[_0x5ac10b(0x211)]['particlesTextures']['particlesSpeed'],'frameRateAdjustment':()=>this['computing']['frameRateAdjustment'],'colorTable':()=>this[_0x5ac10b(0x1b5)],'domain':()=>{const _0x17b524=_0x5ac10b;var _0x23d158,_0x4057ae;const _0x1c9f17=new Cartesian2(((_0x23d158=this['options']['domain'])===null||_0x23d158===void 0x0?void 0x0:_0x23d158['min'])??this['computing'][_0x17b524(0x1de)]['speed'][_0x17b524(0x1d3)],((_0x4057ae=this['options'][_0x17b524(0x259)])===null||_0x4057ae===void 0x0?void 0x0:_0x4057ae[_0x17b524(0x250)])??this['computing'][_0x17b524(0x1de)]['speed'][_0x17b524(0x250)]);return _0x1c9f17;},'displayRange':()=>{const _0x5e98ab=_0x5ac10b;var _0x1cf243,_0x591532;const _0x443613=new Cartesian2(((_0x1cf243=this['options']['displayRange'])===null||_0x1cf243===void 0x0?void 0x0:_0x1cf243['min'])??this['computing']['windData']['speed']['min'],((_0x591532=this['options'][_0x5e98ab(0x1a7)])===null||_0x591532===void 0x0?void 0x0:_0x591532['max'])??this['computing']['windData']['speed']['max']);return _0x443613;},'particleHeight':()=>this['options']['fixedHeight']||0x0,'aspect':()=>this[_0x5ac10b(0x1c3)][_0x5ac10b(0x1b7)]/this['context']['drawingBufferHeight'],'pixelSize':()=>this['viewerParameters'][_0x5ac10b(0x207)],'lineWidth':()=>{const _0x422f9e=_0x5ac10b,_0x53e572=this['options']['lineWidth']||{'min':0x1,'max':0x2};return new Cartesian2(_0x53e572['min'],_0x53e572[_0x422f9e(0x250)]);},'lineLength':()=>{const _0x154257=this['options']['lineLength']||{'min':0x14,'max':0x64};return new Cartesian2(_0x154257['min'],_0x154257['max']);},'is3D':()=>this['viewerParameters']['sceneMode']===SceneMode['SCENE3D'],'segmentsDepthTexture':()=>this['textures']['segmentsDepth']},'vertexShaderSource':ShaderManager['getSegmentDrawVertexShader'](),'fragmentShaderSource':ShaderManager[_0x5ac10b(0x201)](),'rawRenderState':this[_0x5ac10b(0x271)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![],'blending':{'enabled':!![],'blendEquation':WebGLRenderingContext[_0x5ac10b(0x1f3)],'blendFuncSource':WebGLRenderingContext['SRC_ALPHA'],'blendFuncDestination':WebGLRenderingContext['ONE_MINUS_SRC_ALPHA']}})});return{'segments':_0x48e53a};}['onParticlesTextureSizeChange'](){const _0xb735b8=_0x41c01c,_0x25658e=this['createSegmentsGeometry']();this['primitives'][_0xb735b8(0x20c)]['geometry']=_0x25658e;const _0x34e1b1=VertexArray['fromGeometry']({'context':this['context'],'geometry':_0x25658e,'attributeLocations':this['primitives']['segments']['attributeLocations'],'bufferUsage':BufferUsage['STATIC_DRAW']});this['primitives'][_0xb735b8(0x20c)]['commandToExecute']&&(this[_0xb735b8(0x264)]['segments']['commandToExecute']['vertexArray']=_0x34e1b1);}['onColorTableChange'](){const _0x352209=_0x41c01c;this['colorTable']['destroy'](),this['colorTable']=this[_0x352209(0x270)]();}['updateOptions'](_0x3321f5){const _0x3c2310=_0x41c01c,_0x1716ff=_0x3321f5[_0x3c2310(0x272)]&&JSON['stringify'](_0x3321f5[_0x3c2310(0x272)])!==JSON['stringify'](this['options']['colors']);this[_0x3c2310(0x1a5)]=deepMerge(_0x3321f5,this['options']),_0x1716ff&&this['onColorTableChange']();}['destroy'](){const _0x22e84=_0x41c01c;Object['values'](this[_0x22e84(0x268)])['forEach'](_0x5729da=>{const _0x30cd17=_0x22e84;_0x5729da[_0x30cd17(0x1ca)]();}),Object['values'](this[_0x22e84(0x264)])['forEach'](_0x2ed027=>{const _0x4f6406=_0x22e84;_0x2ed027[_0x4f6406(0x1ca)]();}),this[_0x22e84(0x1b5)]['destroy']();}}const {ClearCommand,Color,Pass}=mars3d__namespace['Cesium'];class WindParticleSystem{constructor(_0x3cb467,_0x5bfca0,_0x3b8a68,_0x2d0c0a,_0x578e8f){const _0x272998=_0x41c01c;this['context']=_0x3cb467,this['options']=_0x3b8a68,this[_0x272998(0x276)]=_0x2d0c0a,this['computing']=new WindParticlesComputing(_0x3cb467,_0x5bfca0,_0x3b8a68,_0x2d0c0a,_0x578e8f),this['rendering']=new WindParticlesRendering(_0x3cb467,_0x3b8a68,_0x2d0c0a,this['computing']),this['clearFramebuffers']();}[_0x41c01c(0x21e)](){const _0x4856c1=[this['computing']['primitives']['calculateSpeed'],this['computing']['primitives']['updatePosition'],this['computing']['primitives']['postProcessingPosition'],this['rendering']['primitives']['segments']];return _0x4856c1;}['clearFramebuffers'](){const _0x47425b=_0x41c01c,_0xff32b=new ClearCommand({'color':new Color(0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Pass[_0x47425b(0x26a)]});Object['keys'](this['rendering']['framebuffers'])['forEach'](_0x200f0d=>{const _0x59962c=_0x47425b;_0xff32b['framebuffer']=this['rendering']['framebuffers'][_0x200f0d],_0xff32b['execute'](this[_0x59962c(0x1c3)]);});}['changeOptions'](_0x1f084e){const _0x7d7562=_0x41c01c;let _0x515564=![];_0x1f084e['particlesTextureSize']&&this['options']['particlesTextureSize']!==_0x1f084e[_0x7d7562(0x24c)]&&(_0x515564=!![]);const _0x1dd0b5=deepMerge(_0x1f084e,this['options']);if(_0x1dd0b5['particlesTextureSize']<0x1)throw new Error(_0x7d7562(0x1ec));this['options']=_0x1dd0b5,this[_0x7d7562(0x246)]['updateOptions'](_0x1f084e),this['computing']['updateOptions'](_0x1f084e),_0x515564&&(this['computing']['destroyParticlesTextures'](),this['computing']['createParticlesTextures'](),this['rendering']['onParticlesTextureSizeChange']());}['applyViewerParameters'](_0x139de4){const _0x538460=_0x41c01c;this[_0x538460(0x276)]=_0x139de4,this['computing'][_0x538460(0x276)]=_0x139de4,this['rendering'][_0x538460(0x276)]=_0x139de4;}['destroy'](){const _0x14baa3=_0x41c01c;this['computing']['destroy'](),this[_0x14baa3(0x246)]['destroy']();}}const Cesium$1=mars3d__namespace[_0x41c01c(0x1c1)],BaseLayer$1=mars3d__namespace['layer']['BaseLayer'],DEF_OPTIONS={'particlesTextureSize':0x64,'fixedHeight':0x0,'lineWidth':{'min':0x1,'max':0x2},'lineLength':{'min':0x14,'max':0x64},'speedFactor':0x1,'dropRate':0.003,'dropRateBump':0.001,'colors':['rgb(206,255,255)'],'flipY':![],'dynamic':!![]};class WindLayer extends BaseLayer$1{constructor(_0xfe8486={}){const _0x50ede8=_0x41c01c;_0xfe8486={...DEF_OPTIONS,..._0xfe8486},super(_0xfe8486),this[_0x50ede8(0x277)](_0xfe8486,_0xfe8486);}get[_0x41c01c(0x1ee)](){return this['primitives'];}get['data'](){return this['options']['data'];}set['data'](_0x3866d8){const _0x3dd18b=_0x41c01c;this['options'][_0x3dd18b(0x1f1)]=_0x3866d8,this['setData'](_0x3866d8);}get['colors'](){return this['options']['colors'];}set['colors'](_0x513844){const _0x39a292=_0x41c01c;this['options']['colors']=_0x513844,this[_0x39a292(0x277)](this['options'],{'colors':_0x513844});}[_0x41c01c(0x1b8)](_0x2ab6b8){const _0x13d436=_0x41c01c;_0x2ab6b8?this['_addedHook']():this[_0x13d436(0x20a)]();}['_mountedHook'](){}['_addedHook'](){const _0xbe6dea=_0x41c01c;this['scene']=this['_map']['scene'],this['camera']=this['_map'][_0xbe6dea(0x226)];this['options']['data']&&this['setData'](this[_0xbe6dea(0x1a5)]['data']);if(!this[_0xbe6dea(0x1de)]||!this['show'])return;this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](-0xb4,0xb4),'latRange':new Cesium$1[(_0xbe6dea(0x20f))](-0x5a,0x5a),'pixelSize':0x3e8,'sceneMode':this['scene']['mode']},this['updateViewerParameters'](),this[_0xbe6dea(0x1d1)]=new WindParticleSystem(this[_0xbe6dea(0x1d0)]['context'],this['windData'],this['options'],this['viewerParameters'],this[_0xbe6dea(0x1d0)]),this[_0xbe6dea(0x264)]=this[_0xbe6dea(0x1d1)]['getPrimitives'](),this['primitives'][_0xbe6dea(0x1b3)](_0x49a5a4=>{this['scene']['primitives']['add'](_0x49a5a4);}),this['camera']['percentageChanged']=0.01,this['camera'][_0xbe6dea(0x267)]['addEventListener'](this[_0xbe6dea(0x23f)]['bind'](this)),this[_0xbe6dea(0x1d0)][_0xbe6dea(0x218)]['addEventListener'](this['updateViewerParameters'][_0xbe6dea(0x22d)](this)),window['addEventListener'](_0xbe6dea(0x1d9),this['updateViewerParameters']['bind'](this));}['_removedHook'](){const _0x46782f=_0x41c01c;this[_0x46782f(0x226)]['changed']['removeEventListener'](this[_0x46782f(0x23f)]['bind'](this)),this[_0x46782f(0x1d0)][_0x46782f(0x218)][_0x46782f(0x253)](this['updateViewerParameters']['bind'](this)),window[_0x46782f(0x253)]('resize',this['updateViewerParameters']['bind'](this)),this['primitives']&&(this['primitives']['forEach'](_0x280294=>{this['scene']['primitives']['remove'](_0x280294);}),delete this['primitives']),this['particleSystem']&&(this[_0x46782f(0x1d1)]['destroy'](),delete this[_0x46782f(0x1d1)]);}['setData'](_0x52b76a,_0xd54815){const _0x17c3a=_0x41c01c;this[_0x17c3a(0x1de)]=this[_0x17c3a(0x1fd)](_0x52b76a);if(_0xd54815){this['_removedHook'](),this['_addedHook']();return;}this[_0x17c3a(0x1d1)]?(this[_0x17c3a(0x1d1)]['computing']['updateWindData'](this['windData']),this['scene']['requestRender']()):this['_addedHook']();}['_setOptionsHook'](_0x116d12,_0x4c7836){const _0x35c517=_0x41c01c;this['particleSystem']&&(this[_0x35c517(0x1d1)]['changeOptions'](_0x4c7836),this['scene']['requestRender']());}['processWindData'](_0x348440){const _0xc06428=_0x41c01c;var _0x541ac1,_0x14d8b4;const _0xdc4742={..._0x348440};!_0xdc4742['height']&&_0xdc4742[_0xc06428(0x25c)]&&(_0xdc4742[_0xc06428(0x256)]=_0xdc4742['rows']);!_0xdc4742[_0xc06428(0x24b)]&&_0xdc4742['cols']&&(_0xdc4742['width']=_0xdc4742['cols']);!_0xdc4742[_0xc06428(0x1f2)]&&(_0xdc4742['bounds']={'west':_0xdc4742['xmin'],'south':_0xdc4742['ymin'],'east':_0xdc4742['xmax'],'north':_0xdc4742['ymax']});!_0xdc4742['u']&&(_0xdc4742['u']={'array':_0x348440[_0xc06428(0x21b)],'min':_0x348440['umin'],'max':_0x348440['umax']});!_0xdc4742['v']&&(_0xdc4742['v']={'array':_0x348440['vdata'],'min':_0x348440[_0xc06428(0x21a)],'max':_0x348440['vmax']});if(((_0x541ac1=_0xdc4742['speed'])===null||_0x541ac1===void 0x0?void 0x0:_0x541ac1[_0xc06428(0x1d3)])===undefined||((_0x14d8b4=_0xdc4742['speed'])===null||_0x14d8b4===void 0x0?void 0x0:_0x14d8b4[_0xc06428(0x250)])===undefined||_0xdc4742[_0xc06428(0x1bb)]['array']===undefined){const _0x55cb72={'array':new Float32Array(_0xdc4742['u']['array']['length']),'min':Number['MAX_VALUE'],'max':Number['MIN_VALUE']};for(let _0x3df221=0x0;_0x3df221<_0xdc4742['u']['array']['length'];_0x3df221++){_0x55cb72['array'][_0x3df221]=Math['sqrt'](_0xdc4742['u']['array'][_0x3df221]*_0xdc4742['u']['array'][_0x3df221]+_0xdc4742['v']['array'][_0x3df221]*_0xdc4742['v'][_0xc06428(0x221)][_0x3df221]),_0x55cb72[_0xc06428(0x221)][_0x3df221]!==0x0&&(_0x55cb72['min']=Math['min'](_0x55cb72['min'],_0x55cb72['array'][_0x3df221]),_0x55cb72['max']=Math['max'](_0x55cb72['max'],_0x55cb72[_0xc06428(0x221)][_0x3df221]));}_0xdc4742['speed']=_0x55cb72;}return _0xdc4742;}['updateViewerParameters'](){const _0x3fe11d=_0x41c01c;var _0x4b7845;const _0xff97fa=this['scene'];if(!_0xff97fa)return;const _0x59544a=_0xff97fa[_0x3fe11d(0x234)],_0x9e5776=[{'x':0x0,'y':0x0},{'x':0x0,'y':_0x59544a['clientHeight']},{'x':_0x59544a[_0x3fe11d(0x255)],'y':0x0},{'x':_0x59544a[_0x3fe11d(0x255)],'y':_0x59544a['clientHeight']}];let _0x86070a=0xb4,_0x46b243=-0xb4,_0x177688=0x5a,_0x484523=-0x5a,_0x262f83=![];for(const _0x368aeb of _0x9e5776){const _0x144777=_0xff97fa['camera']['pickEllipsoid'](new Cesium$1['Cartesian2'](_0x368aeb['x'],_0x368aeb['y']),_0xff97fa['globe']['ellipsoid']);if(!_0x144777){_0x262f83=!![];break;}const _0x882eac=_0xff97fa['globe']['ellipsoid']['cartesianToCartographic'](_0x144777),_0x5aa701=Cesium$1[_0x3fe11d(0x23b)]['toDegrees'](_0x882eac['longitude']),_0x58f1c5=Cesium$1['Math']['toDegrees'](_0x882eac['latitude']);_0x86070a=Math['min'](_0x86070a,_0x5aa701),_0x46b243=Math['max'](_0x46b243,_0x5aa701),_0x177688=Math['min'](_0x177688,_0x58f1c5),_0x484523=Math['max'](_0x484523,_0x58f1c5);}if(!_0x262f83){const _0x465bad=new Cesium$1['Cartesian2'](Math['max'](this['windData']['bounds']['west'],_0x86070a),Math[_0x3fe11d(0x1d3)](this['windData'][_0x3fe11d(0x1f2)][_0x3fe11d(0x1eb)],_0x46b243)),_0x3c01a9=new Cesium$1['Cartesian2'](Math['max'](this[_0x3fe11d(0x1de)]['bounds']['south'],_0x177688),Math[_0x3fe11d(0x1d3)](this[_0x3fe11d(0x1de)][_0x3fe11d(0x1f2)][_0x3fe11d(0x23d)],_0x484523)),_0x40b058=(_0x465bad['y']-_0x465bad['x'])*0.05,_0x42e2ea=(_0x3c01a9['y']-_0x3c01a9['x'])*0.05;_0x465bad['x']=Math['max'](this['windData'][_0x3fe11d(0x1f2)]['west'],_0x465bad['x']-_0x40b058),_0x465bad['y']=Math['min'](this[_0x3fe11d(0x1de)]['bounds'][_0x3fe11d(0x1eb)],_0x465bad['y']+_0x40b058),_0x3c01a9['x']=Math['max'](this['windData'][_0x3fe11d(0x1f2)]['south'],_0x3c01a9['x']-_0x42e2ea),_0x3c01a9['y']=Math['min'](this[_0x3fe11d(0x1de)][_0x3fe11d(0x1f2)]['north'],_0x3c01a9['y']+_0x42e2ea),this['viewerParameters']['lonRange']=_0x465bad,this['viewerParameters']['latRange']=_0x3c01a9;const _0x50a4ea=this['windData']['bounds']['east']-this['windData']['bounds'][_0x3fe11d(0x212)],_0x21dfce=this['windData']['bounds']['north']-this[_0x3fe11d(0x1de)]['bounds']['south'],_0x3312dc=(_0x465bad['y']-_0x465bad['x'])/_0x50a4ea,_0x2d7631=(_0x3c01a9['y']-_0x3c01a9['x'])/_0x21dfce,_0x1324fe=Math[_0x3fe11d(0x1d3)](_0x3312dc,_0x2d7631),_0x2fd447=0x3e8*_0x1324fe;_0x2fd447>0x0&&(this[_0x3fe11d(0x276)]['pixelSize']=Math['max'](0x0,Math['min'](0x3e8,_0x2fd447)));}this[_0x3fe11d(0x276)]['sceneMode']=this[_0x3fe11d(0x1d0)]['mode'],(_0x4b7845=this['particleSystem'])===null||_0x4b7845===void 0x0||_0x4b7845['applyViewerParameters'](this['viewerParameters']);}[_0x41c01c(0x1ab)](_0x93cc36,_0x505adf){const _0x1a3e99=_0x41c01c,{bounds:_0x27522d,width:_0x2da882,height:_0x1fc74e,u:_0x274ca3,v:_0x32d56a,speed:_0x46fc78}=this['windData'],{flipY:_0x53b5e4}=this['options'];if(_0x93cc36<_0x27522d['west']||_0x93cc36>_0x27522d['east']||_0x505adf<_0x27522d['south']||_0x505adf>_0x27522d[_0x1a3e99(0x23d)])return null;const _0x3fa195=(_0x93cc36-_0x27522d['west'])/(_0x27522d['east']-_0x27522d['west'])*(_0x2da882-0x1);let _0x9c659f=(_0x505adf-_0x27522d['south'])/(_0x27522d['north']-_0x27522d[_0x1a3e99(0x1c5)])*(_0x1fc74e-0x1);_0x53b5e4&&(_0x9c659f=_0x1fc74e-0x1-_0x9c659f);const _0x15b89b=Math['floor'](_0x3fa195),_0x143842=Math['floor'](_0x9c659f),_0x52266d=Math['floor'](_0x3fa195),_0x35e5d0=Math[_0x1a3e99(0x1d3)](_0x52266d+0x1,_0x2da882-0x1),_0x3f9518=Math['floor'](_0x9c659f),_0x485888=Math['min'](_0x3f9518+0x1,_0x1fc74e-0x1),_0xc6591e=_0x3fa195-_0x52266d,_0xc467f5=_0x9c659f-_0x3f9518,_0x4963b=_0x143842*_0x2da882+_0x15b89b,_0x132a1e=_0x3f9518*_0x2da882+_0x52266d,_0x37581e=_0x3f9518*_0x2da882+_0x35e5d0,_0xb441ce=_0x485888*_0x2da882+_0x52266d,_0x500db1=_0x485888*_0x2da882+_0x35e5d0,_0x502da7=_0x274ca3['array'][_0x132a1e],_0x824554=_0x274ca3['array'][_0x37581e],_0x3ff909=_0x274ca3['array'][_0xb441ce],_0x105227=_0x274ca3[_0x1a3e99(0x221)][_0x500db1],_0x13df9f=(0x1-_0xc6591e)*(0x1-_0xc467f5)*_0x502da7+_0xc6591e*(0x1-_0xc467f5)*_0x824554+(0x1-_0xc6591e)*_0xc467f5*_0x3ff909+_0xc6591e*_0xc467f5*_0x105227,_0xfe74b4=_0x32d56a['array'][_0x132a1e],_0x5d8bc9=_0x32d56a[_0x1a3e99(0x221)][_0x37581e],_0x20fcd1=_0x32d56a[_0x1a3e99(0x221)][_0xb441ce],_0x5d0990=_0x32d56a['array'][_0x500db1],_0x15f918=(0x1-_0xc6591e)*(0x1-_0xc467f5)*_0xfe74b4+_0xc6591e*(0x1-_0xc467f5)*_0x5d8bc9+(0x1-_0xc6591e)*_0xc467f5*_0x20fcd1+_0xc6591e*_0xc467f5*_0x5d0990,_0x2c0169=Math[_0x1a3e99(0x249)](_0x13df9f*_0x13df9f+_0x15f918*_0x15f918);return{'original':{'u':_0x274ca3['array'][_0x4963b],'v':_0x32d56a[_0x1a3e99(0x221)][_0x4963b],'speed':_0x46fc78['array'][_0x4963b]},'interpolated':{'u':_0x13df9f,'v':_0x15f918,'speed':_0x2c0169}};}}mars3d__namespace[_0x41c01c(0x1e0)]['register']('wind',WindLayer),mars3d__namespace[_0x41c01c(0x1ee)][_0x41c01c(0x236)]=WindLayer;class CanvasParticle{constructor(){const _0x1ffec6=_0x41c01c;this[_0x1ffec6(0x266)]=null,this['lat']=null,this['tlng']=null,this[_0x1ffec6(0x1b1)]=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0x3a08bc in this){delete this[_0x3a08bc];}}}class CanvasWindField{constructor(_0x4bd73e){this['setOptions'](_0x4bd73e);}get['speedRate'](){return this['_speedRate'];}set[_0x41c01c(0x1c0)](_0x39961e){const _0x14a1fa=_0x41c01c;this['_speedRate']=(0x64-(_0x39961e>0x63?0x63:_0x39961e))*0x64,this['_calc_speedRate']=[(this['xmax']-this['xmin'])/this[_0x14a1fa(0x1be)],(this['ymax']-this['ymin'])/this['_speedRate']];}get[_0x41c01c(0x215)](){return this['_maxAge'];}set['maxAge'](_0x27b331){this['_maxAge']=_0x27b331;}[_0x41c01c(0x1f8)](_0x471241){const _0x138603=_0x41c01c;this['options']=_0x471241,this['maxAge']=_0x471241[_0x138603(0x215)]||0x78,this['speedRate']=_0x471241['speedRate']||0x32,this['particles']=[];const _0x647eb1=_0x471241['particlesNumber']||0x1000;for(let _0x286fb5=0x0;_0x286fb5<_0x647eb1;_0x286fb5++){const _0x56436b=this['_randomParticle'](new CanvasParticle());this[_0x138603(0x1f7)]['push'](_0x56436b);}}['setDate'](_0x423f2c){const _0xbd9b97=_0x41c01c;this['rows']=_0x423f2c['rows'],this['cols']=_0x423f2c[_0xbd9b97(0x1e1)],this['xmin']=_0x423f2c['xmin'],this['xmax']=_0x423f2c[_0xbd9b97(0x239)],this[_0xbd9b97(0x23c)]=_0x423f2c[_0xbd9b97(0x23c)],this['ymax']=_0x423f2c['ymax'],this['grid']=[];const _0x4a0f1a=_0x423f2c['udata'],_0x21cb7a=_0x423f2c['vdata'];let _0x287679=![];_0x4a0f1a['length']===this['rows']&&_0x4a0f1a[0x0][_0xbd9b97(0x233)]===this[_0xbd9b97(0x1e1)]&&(_0x287679=!![]);let _0x3e6ca3=0x0,_0x2ab796=null,_0x409b97=null;for(let _0x5dc8c0=0x0;_0x5dc8c0=this['cols']||_0xa5e4eb>=this[_0x4556a6(0x25c)])return[0x0,0x0,0x0];const _0x5d0c11=Math[_0x4556a6(0x1a4)](_0x5c669e),_0x273571=Math[_0x4556a6(0x1a4)](_0xa5e4eb);if(_0x5d0c11===_0x5c669e&&_0x273571===_0xa5e4eb)return this['grid'][_0xa5e4eb][_0x5c669e];const _0x322d4c=_0x5d0c11+0x1,_0x519675=_0x273571+0x1,_0x250eb7=this['getUVByXY'](_0x5d0c11,_0x273571),_0x121c42=this['getUVByXY'](_0x322d4c,_0x273571),_0x3a9db4=this[_0x4556a6(0x258)](_0x5d0c11,_0x519675),_0x5101e6=this[_0x4556a6(0x258)](_0x322d4c,_0x519675);let _0x2870f6=null;try{_0x2870f6=this[_0x4556a6(0x26e)](_0x5c669e-_0x5d0c11,_0xa5e4eb-_0x273571,_0x250eb7,_0x121c42,_0x3a9db4,_0x5101e6);}catch(_0xe7205e){console[_0x4556a6(0x1fe)](_0x5c669e,_0xa5e4eb);}return _0x2870f6;}['_bilinearInterpolation'](_0x374414,_0x5d953d,_0x5270d1,_0x3c30cf,_0x5035ee,_0x4a28bd){const _0x12506d=_0x41c01c,_0x422217=0x1-_0x374414,_0x4bad30=0x1-_0x5d953d,_0x483025=_0x422217*_0x4bad30,_0x3444e6=_0x374414*_0x4bad30,_0xcdfb24=_0x422217*_0x5d953d,_0x35517d=_0x374414*_0x5d953d,_0x7407ec=_0x5270d1[0x0]*_0x483025+_0x3c30cf[0x0]*_0x3444e6+_0x5035ee[0x0]*_0xcdfb24+_0x4a28bd[0x0]*_0x35517d,_0xd65cb3=_0x5270d1[0x1]*_0x483025+_0x3c30cf[0x1]*_0x3444e6+_0x5035ee[0x1]*_0xcdfb24+_0x4a28bd[0x1]*_0x35517d;return this[_0x12506d(0x22c)](_0x7407ec,_0xd65cb3);}['_calcUV'](_0x5b277c,_0xa7ffcc){return[+_0x5b277c,+_0xa7ffcc,Math['sqrt'](_0x5b277c*_0x5b277c+_0xa7ffcc*_0xa7ffcc)];}['getUVByPoint'](_0x3957b8,_0x3ddd42){if(!this['isInExtent'](_0x3957b8,_0x3ddd42))return null;const _0x19df01=this['toGridXY'](_0x3957b8,_0x3ddd42),_0x4c191e=this['getUVByXY'](_0x19df01[0x0],_0x19df01[0x1]);return _0x4c191e;}['isInExtent'](_0x542f39,_0x366361){return _0x542f39>=this['xmin']&&_0x542f39<=this['xmax']&&_0x366361>=this['ymin']&&_0x366361<=this['ymax']?!![]:![];}['getRandomLatLng'](){const _0x296ff4=_0x41c01c,_0x2f6bce=fRandomByfloat(this[_0x296ff4(0x219)],this['xmax']),_0x473d17=fRandomByfloat(this['ymin'],this['ymax']);return{'lat':_0x473d17,'lng':_0x2f6bce};}['getParticles'](){const _0x23c6e4=_0x41c01c;let _0x187333,_0x374d11,_0x5f119f;for(let _0x802e0e=0x0,_0x4e5dc6=this['particles'][_0x23c6e4(0x233)];_0x802e0e<_0x4e5dc6;_0x802e0e++){let _0xef5196=this['particles'][_0x802e0e];_0xef5196['age']<=0x0&&(_0xef5196=this['_randomParticle'](_0xef5196));if(_0xef5196['age']>0x0){const _0x2738a1=_0xef5196[_0x23c6e4(0x1ac)],_0x1e69cd=_0xef5196['tlat'];_0x5f119f=this['getUVByPoint'](_0x2738a1,_0x1e69cd),_0x5f119f?(_0x187333=_0x2738a1+this['_calc_speedRate'][0x0]*_0x5f119f[0x0],_0x374d11=_0x1e69cd+this['_calc_speedRate'][0x1]*_0x5f119f[0x1],_0xef5196['lng']=_0x2738a1,_0xef5196['lat']=_0x1e69cd,_0xef5196['tlng']=_0x187333,_0xef5196[_0x23c6e4(0x1b1)]=_0x374d11,_0xef5196['speed']=_0x5f119f[0x2],_0xef5196[_0x23c6e4(0x242)]--):_0xef5196[_0x23c6e4(0x242)]=0x0;}}return this['particles'];}[_0x41c01c(0x269)](_0x54bd48){const _0x126644=_0x41c01c;let _0x3ac3f0,_0x37c452;for(let _0x47a5c7=0x0;_0x47a5c7<0x1e;_0x47a5c7++){_0x3ac3f0=this['getRandomLatLng'](),_0x37c452=this['getUVByPoint'](_0x3ac3f0['lng'],_0x3ac3f0['lat']);if(_0x37c452&&_0x37c452[0x2]>0x0)break;}if(!_0x37c452)return _0x54bd48;const _0x565e92=_0x3ac3f0['lng']+this['_calc_speedRate'][0x0]*_0x37c452[0x0],_0x5902c1=_0x3ac3f0['lat']+this['_calc_speedRate'][0x1]*_0x37c452[0x1];return _0x54bd48['lng']=_0x3ac3f0['lng'],_0x54bd48['lat']=_0x3ac3f0['lat'],_0x54bd48['tlng']=_0x565e92,_0x54bd48[_0x126644(0x1b1)]=_0x5902c1,_0x54bd48['age']=Math[_0x126644(0x216)](0xa+Math['random']()*this['maxAge']),_0x54bd48['speed']=_0x37c452[0x2],_0x54bd48;}[_0x41c01c(0x1ca)](){for(const _0x8842da in this){delete this[_0x8842da];}}}function fRandomByfloat(_0x12fbbf,_0x50c1d2){return _0x12fbbf+Math['random']()*(_0x50c1d2-_0x12fbbf);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x521a99={}){const _0x178301=_0x41c01c;super(_0x521a99),this[_0x178301(0x277)](_0x521a99),this[_0x178301(0x234)]=null,_0x521a99['colors']&&_0x521a99['steps']&&(this['_colorRamp']=new mars3d__namespace[(_0x178301(0x24e))](_0x521a99));}['_setOptionsHook'](_0x501670,_0x16d5d0){const _0x23424e=_0x41c01c;this[_0x23424e(0x1e4)]=0x3e8/(_0x501670[_0x23424e(0x1c4)]||0xa),this['_pointerEvents']=this[_0x23424e(0x1a5)]['pointerEvents']??![],this['color']=_0x501670['color']||_0x23424e(0x1fa),this['lineWidth']=_0x501670['lineWidth']||0x1,this['fixedHeight']=_0x501670['fixedHeight']??0x0,this['flipY']=_0x501670['flipY']??![],this['windField']&&this['windField']['setOptions'](_0x501670);}get['layer'](){return this['canvas'];}get['canvasWidth'](){return this['_map']['scene']['canvas']['clientWidth'];}get[_0x41c01c(0x24a)](){const _0x5da187=_0x41c01c;return this[_0x5da187(0x262)]['scene'][_0x5da187(0x234)]['clientHeight'];}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0x569ea8){const _0x3fc80c=_0x41c01c;this['_pointerEvents']=_0x569ea8;if(!this['canvas'])return;_0x569ea8?this[_0x3fc80c(0x234)][_0x3fc80c(0x1f6)]['pointer-events']='all':this['canvas']['style']['pointer-events']=_0x3fc80c(0x20e);}get['particlesNumber'](){const _0x1871a8=_0x41c01c;return this[_0x1871a8(0x1a5)][_0x1871a8(0x1e5)];}set['particlesNumber'](_0x5748f7){this['options']['particlesNumber']=_0x5748f7,clearTimeout(this['_canrefresh']),this['_canrefresh']=setTimeout(()=>{this['redraw']();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x529ce6){const _0x600e8c=_0x41c01c;this['options']['speedRate']=_0x529ce6,this['windField']&&(this['windField'][_0x600e8c(0x1c0)]=_0x529ce6);}get[_0x41c01c(0x215)](){const _0x4992fa=_0x41c01c;return this[_0x4992fa(0x1a5)]['maxAge'];}set['maxAge'](_0x31302b){const _0x3131ba=_0x41c01c;this[_0x3131ba(0x1a5)]['maxAge']=_0x31302b,this['windField']&&(this['windField']['maxAge']=_0x31302b);}get['data'](){const _0x332198=_0x41c01c;return this[_0x332198(0x1de)];}set['data'](_0x2d71f9){this['setData'](_0x2d71f9);}get['rectangle'](){const _0x323000=_0x41c01c;let _0x5b52d4=this[_0x323000(0x1de)]['xmin'],_0x45ffb7=this['windData'][_0x323000(0x239)],_0x1dc064=this['windData']['ymin'],_0x520f92=this['windData']['ymax'];return _0x45ffb7>=0x167&&_0x5b52d4===0x0&&(_0x5b52d4=-0xb4,_0x45ffb7=0xb4),_0x5b52d4=Math['max'](_0x5b52d4,-0xb4),_0x45ffb7=Math[_0x323000(0x1d3)](_0x45ffb7,0xb4),_0x1dc064=Math['max'](_0x1dc064,-0x5a),_0x520f92=Math['min'](_0x520f92,0x5a),Cesium['Rectangle']['fromDegrees'](_0x5b52d4,_0x1dc064,_0x45ffb7,_0x520f92);}['_showHook'](_0x19c08b){const _0x9de461=_0x41c01c;_0x19c08b?this['_addedHook']():(this[_0x9de461(0x1de)]&&(this[_0x9de461(0x1a5)]['data']=this[_0x9de461(0x1de)]),this[_0x9de461(0x20a)]());}['_mountedHook'](){const _0x3b2888=_0x41c01c;this[_0x3b2888(0x1a5)]['worker']?this['initWorker']():this['windField']=new CanvasWindField(this['options']);}[_0x41c01c(0x1ae)](){const _0xc9b9e0=_0x41c01c;this['canvas']=this['_createCanvas'](),this['canvasContext']=this['canvas'][_0xc9b9e0(0x1e2)]('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options'][_0xc9b9e0(0x1f1)]&&this['setData'](this['options']['data']);}['_removedHook'](){const _0x484262=_0x41c01c;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map'][_0x484262(0x1cd)]['removeChild'](this['canvas']),delete this['canvas']);}['_createCanvas'](){const _0x54d5fc=_0x41c01c,_0x28f67e=mars3d__namespace['DomUtil']['create'](_0x54d5fc(0x234),'mars3d-canvasWind',this['_map']['container']);return _0x28f67e['style']['position']='absolute',_0x28f67e['style']['top']='0px',_0x28f67e[_0x54d5fc(0x1f6)]['left']='0px',_0x28f67e['style']['width']=this['_map']['scene']['canvas'][_0x54d5fc(0x255)]+'px',_0x28f67e['style']['height']=this[_0x54d5fc(0x262)]['scene']['canvas']['clientHeight']+'px',_0x28f67e['style']['pointerEvents']=this[_0x54d5fc(0x202)]?'auto':'none',_0x28f67e['style']['zIndex']=this[_0x54d5fc(0x1a5)][_0x54d5fc(0x210)]??0x9,_0x28f67e['width']=this['_map']['scene'][_0x54d5fc(0x234)]['clientWidth'],_0x28f67e['height']=this[_0x54d5fc(0x262)][_0x54d5fc(0x1d0)][_0x54d5fc(0x234)]['clientHeight'],_0x28f67e;}['resize'](){const _0x289f6c=_0x41c01c;this['canvas']&&(this['canvas'][_0x289f6c(0x1f6)]['width']=this['_map']['scene']['canvas']['clientWidth']+'px',this[_0x289f6c(0x234)]['style']['height']=this[_0x289f6c(0x262)][_0x289f6c(0x1d0)]['canvas']['clientHeight']+'px',this['canvas']['width']=this[_0x289f6c(0x262)]['scene']['canvas']['clientWidth'],this[_0x289f6c(0x234)][_0x289f6c(0x256)]=this['_map']['scene']['canvas'][_0x289f6c(0x1b2)]);}['bindEvent'](){const _0x578030=_0x41c01c,_0x23ed3c=this;let _0x16012d=Date['now']();(function _0x461fa3(){const _0x2bc655=_0x46b6;if(_0x23ed3c['isDestroy'])return;_0x23ed3c['_animateFrame']=window[_0x2bc655(0x1d7)](_0x461fa3);if(_0x23ed3c[_0x2bc655(0x1c7)]&&_0x23ed3c['windField']){const _0x1705a8=Date['now'](),_0x46609d=_0x1705a8-_0x16012d;_0x46609d>_0x23ed3c['frameTime']&&(_0x16012d=_0x1705a8-_0x46609d%_0x23ed3c[_0x2bc655(0x1e4)],_0x23ed3c[_0x2bc655(0x1f9)]());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this[_0x578030(0x1a9)]=![],this['mouse_move']=![],this[_0x578030(0x1a5)]['mouseHidden']&&(this[_0x578030(0x262)]['on'](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x578030(0x235)],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseUp'],this[_0x578030(0x251)],this)));}['unbindEvent'](){const _0x5e15ab=_0x41c01c;window[_0x5e15ab(0x1c8)](this['_animateFrame']),delete this[_0x5e15ab(0x1b4)],window[_0x5e15ab(0x253)](_0x5e15ab(0x1d9),this['resize']),this['options']['mouseHidden']&&(this['_map']['off'](mars3d__namespace['EventType'][_0x5e15ab(0x1a2)],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this[_0x5e15ab(0x24f)],this),this['_map']['off'](mars3d__namespace[_0x5e15ab(0x1cb)]['mouseUp'],this['_onMouseUpEvent'],this),this['_map']['off'](mars3d__namespace[_0x5e15ab(0x1cb)]['mouseMove'],this['_onMouseMoveEvent'],this));}['_onMapWhellEvent'](_0x17792f){clearTimeout(this['refreshTimer']);if(!this['show']||!this['canvas'])return;this['canvas']['style']['visibility']='hidden',this['refreshTimer']=setTimeout(()=>{const _0x16f1c9=_0x46b6;if(!this['show'])return;this['redraw'](),this['canvas']['style']['visibility']=_0x16f1c9(0x26b);},0xc8);}[_0x41c01c(0x24f)](_0x53d593){const _0x417912=_0x41c01c;this[_0x417912(0x1a9)]=!![],this[_0x417912(0x262)][_0x417912(0x217)](mars3d__namespace[_0x417912(0x1cb)]['mouseMove'],this['_onMouseMoveEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this);}[_0x41c01c(0x21d)](_0x40d8e0){const _0x432393=_0x41c01c;if(!this['show']||!this['canvas'])return;this[_0x432393(0x1a9)]&&(this['canvas']['style'][_0x432393(0x247)]=_0x432393(0x1dc),this['mouse_move']=!![]);}['_onMouseUpEvent'](_0x1f3625){const _0xafe291=_0x41c01c;if(!this['show']||!this['canvas'])return;this['_map'][_0xafe291(0x217)](mars3d__namespace[_0xafe291(0x1cb)]['mouseMove'],this[_0xafe291(0x21d)],this),this[_0xafe291(0x1a9)]&&this['mouse_move']&&this['redraw'](),this[_0xafe291(0x234)]['style']['visibility']='visible',this[_0xafe291(0x1a9)]=![],this[_0xafe291(0x22a)]=![];}['setData'](_0x32575b){this['clear'](),this['windData']=_0x32575b,this['windField']['setDate'](_0x32575b),this['redraw']();}[_0x41c01c(0x205)](){const _0x2b4b93=_0x41c01c;if(!this['show'])return;this[_0x2b4b93(0x1af)][_0x2b4b93(0x1f8)](this['options']),this[_0x2b4b93(0x1f9)]();}[_0x41c01c(0x1f9)](){const _0x5c899c=_0x41c01c;if(this['_updateIng'])return;this[_0x5c899c(0x1ed)]=!![];if(this[_0x5c899c(0x1cf)])this['windField']['update']();else{const _0x20bd2e=this['windField']['getParticles']();this[_0x5c899c(0x1d8)](_0x20bd2e);}this[_0x5c899c(0x1ed)]=![];}['_drawLines'](_0x2e32aa){const _0x5a322c=_0x41c01c;this['_canvasParticles']=_0x2e32aa,this[_0x5a322c(0x254)][_0x5a322c(0x1bc)]='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']='lighter',this['canvasContext']['globalAlpha']=0.9;const _0x249061=this['_map'][_0x5a322c(0x1d0)]['mode']!==Cesium['SceneMode'][_0x5a322c(0x22e)],_0x2212fd=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x21fb72=0x0,_0x22b467=_0x2e32aa['length'];_0x21fb72<_0x22b467;_0x21fb72++){const _0x3c068c=_0x2e32aa[_0x21fb72],_0x3db122=this[_0x5a322c(0x263)](_0x3c068c,_0x3c068c['lng'],_0x3c068c['lat'],_0x3c068c['alt']),_0x11ec5d=this['_tomap'](_0x3c068c,_0x3c068c[_0x5a322c(0x1ac)],_0x3c068c[_0x5a322c(0x1b1)],_0x3c068c['talt']);if(!_0x3db122||!_0x11ec5d)continue;if(_0x249061&&Math['abs'](_0x3db122[0x0]-_0x11ec5d[0x0])>=_0x2212fd)continue;this['canvasContext'][_0x5a322c(0x275)](),this[_0x5a322c(0x254)][_0x5a322c(0x1df)]=this['lineWidth'],this['canvasContext']['strokeStyle']=this[_0x5a322c(0x21c)]['getColor'](_0x3c068c['speed']),this[_0x5a322c(0x254)][_0x5a322c(0x23a)](_0x3db122[0x0],_0x3db122[0x1]),this['canvasContext']['lineTo'](_0x11ec5d[0x0],_0x11ec5d[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext'][_0x5a322c(0x275)](),this['canvasContext']['lineWidth']=this[_0x5a322c(0x1df)],this['canvasContext']['strokeStyle']=this[_0x5a322c(0x26c)];for(let _0x266bc5=0x0,_0x15410b=_0x2e32aa[_0x5a322c(0x233)];_0x266bc5<_0x15410b;_0x266bc5++){const _0x50d00d=_0x2e32aa[_0x266bc5],_0x1cf0a9=this[_0x5a322c(0x263)](_0x50d00d,_0x50d00d['lng'],_0x50d00d['lat'],_0x50d00d[_0x5a322c(0x252)]),_0x3896db=this['_tomap'](_0x50d00d,_0x50d00d[_0x5a322c(0x1ac)],_0x50d00d['tlat'],_0x50d00d['talt']);if(!_0x1cf0a9||!_0x3896db)continue;if(_0x249061&&Math[_0x5a322c(0x222)](_0x1cf0a9[0x0]-_0x3896db[0x0])>=_0x2212fd)continue;this['canvasContext'][_0x5a322c(0x23a)](_0x1cf0a9[0x0],_0x1cf0a9[0x1]),this['canvasContext']['lineTo'](_0x3896db[0x0],_0x3896db[0x1]);}this[_0x5a322c(0x254)]['stroke']();}}['_tomap'](_0x4e8888,_0x40927a,_0x2fd6f1,_0xfad38a){const _0x553fc5=_0x41c01c,_0x146b81=Cesium['Cartesian3'][_0x553fc5(0x245)](_0x40927a,_0x2fd6f1,_0xfad38a??this['fixedHeight']),_0x23cf0f=this[_0x553fc5(0x262)]['scene'];if(_0x23cf0f['mode']===Cesium['SceneMode']['SCENE3D']){const _0x4dd3ce=new Cesium[(_0x553fc5(0x227))](_0x23cf0f[_0x553fc5(0x1e8)][_0x553fc5(0x1d5)],_0x23cf0f['camera']['positionWC']),_0x495c22=_0x4dd3ce['isPointVisible'](_0x146b81);if(!_0x495c22)return _0x4e8888['age']=0x0,null;}const _0x4b07be=mars3d__namespace[_0x553fc5(0x1b0)]['toWindowCoordinates'](this[_0x553fc5(0x262)]['scene'],_0x146b81);return _0x4b07be?[_0x4b07be['x'],_0x4b07be['y']]:null;}['clear'](){const _0x5a3ba3=_0x41c01c;this['windField'][_0x5a3ba3(0x1da)](),delete this['windData'];}[_0x41c01c(0x237)](){const _0xcc947f=_0x41c01c;this['worker']=new Worker(this['options']['worker']),this[_0xcc947f(0x1cf)][_0xcc947f(0x26f)]=_0x43c162=>{this['_drawLines'](_0x43c162['data']['particles']),this['_updateIng2']=![];},this['windField']={'init':_0x44da1f=>{this['worker']['postMessage']({'type':'init','options':_0x44da1f});},'setOptions':_0x6174f2=>{const _0x583012=_0xcc947f;this['worker'][_0x583012(0x1aa)]({'type':'setOptions','options':_0x6174f2});},'setDate':_0x5bf682=>{const _0x172153=_0xcc947f;this['worker'][_0x172153(0x1aa)]({'type':_0x172153(0x204),'data':_0x5bf682});},'update':()=>{if(this['_updateIng2'])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':'update'});},'clear':()=>{const _0xc32ba6=_0xcc947f;this['worker'][_0xc32ba6(0x1aa)]({'type':'clear'});}},this['windField'][_0xcc947f(0x220)](this['options']);}}mars3d__namespace[_0x41c01c(0x1e0)]['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace[_0x41c01c(0x1d4)]=CanvasWindField,mars3d__namespace['Log']['logInfo']('mars3d-wind插件注册成功\x20\x20\x20\x20\x20版本:'+version+'\x20\x20\x20\x20编译日期:'+buildTime),mars3d__namespace['WindUtil']=WindUtil,exports[_0x41c01c(0x1d4)]=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports[_0x41c01c(0x236)]=WindLayer,exports['WindUtil']=WindUtil,Object['defineProperty'](exports,'__esModule',{'value':!![]}); }));