zhitong.yu
7 天以前 378d781e6f35f89652aa36e079a8b7fc44cea77e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Mars3D平台插件,支持气象 风向图 功能插件  mars3d-wind
 *
 * 版本信息:v3.8.15
 * 编译日期:2025-04-10 11:42
 * 版权所有:Copyright by 火星科技  http://mars3d.cn
 * 使用单位:北京华星北斗智控技术有限公司 ,2024-12-05
 */
(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 _0x92baec=_0x1b21;(function(_0x3d59c6,_0x41d6bc){const _0x3f55df=_0x1b21,_0x327914=_0x3d59c6();while(!![]){try{const _0x1efbc6=parseInt(_0x3f55df(0x95))/0x1*(-parseInt(_0x3f55df(0x99))/0x2)+parseInt(_0x3f55df(0x144))/0x3*(parseInt(_0x3f55df(0x14b))/0x4)+parseInt(_0x3f55df(0xaa))/0x5+parseInt(_0x3f55df(0xf7))/0x6+-parseInt(_0x3f55df(0x118))/0x7+parseInt(_0x3f55df(0x115))/0x8*(parseInt(_0x3f55df(0xf4))/0x9)+parseInt(_0x3f55df(0x8e))/0xa*(parseInt(_0x3f55df(0x126))/0xb);if(_0x1efbc6===_0x41d6bc)break;else _0x327914['push'](_0x327914['shift']());}catch(_0x46d3d0){_0x327914['push'](_0x327914['shift']());}}}(_0x1d56,0xe527d));function _interopNamespace(_0x1a7505){const _0x6bc0ea=_0x1b21;if(_0x1a7505&&_0x1a7505[_0x6bc0ea(0xe7)])return _0x1a7505;var _0x3f151f=Object['create'](null);return _0x1a7505&&Object['keys'](_0x1a7505)['forEach'](function(_0x4b37c0){const _0x145eb4=_0x6bc0ea;if(_0x4b37c0!=='default'){var _0x2445cc=Object['getOwnPropertyDescriptor'](_0x1a7505,_0x4b37c0);Object['defineProperty'](_0x3f151f,_0x4b37c0,_0x2445cc[_0x145eb4(0x150)]?_0x2445cc:{'enumerable':!![],'get':function(){return _0x1a7505[_0x4b37c0];}});}}),_0x3f151f['default']=_0x1a7505,_0x3f151f;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$2=mars3d__namespace['Cesium'];function getU(_0x456d67,_0x3771c3){const _0x2c7117=_0x1b21,_0x4e33df=_0x456d67*Math['cos'](Cesium$2['Math'][_0x2c7117(0xd1)](_0x3771c3));return _0x4e33df;}function getV(_0x5f4c9e,_0x39a5cc){const _0x41573a=_0x1b21,_0x566faa=_0x5f4c9e*Math[_0x41573a(0xbe)](Cesium$2['Math']['toRadians'](_0x39a5cc));return _0x566faa;}function getSpeed(_0x3aa281,_0x1d5cf7){const _0x4e86bb=_0x1b21,_0x3a3239=Math[_0x4e86bb(0x135)](Math['pow'](_0x3aa281,0x2)+Math['pow'](_0x1d5cf7,0x2));return _0x3a3239;}function getDirection(_0x310a5f,_0x1f1d86){const _0x19e8f6=_0x1b21;let _0xc11c60=Cesium$2[_0x19e8f6(0x8f)]['toDegrees'](Math['atan2'](_0x1f1d86,_0x310a5f));return _0xc11c60+=_0xc11c60<0x0?0x168:0x0,_0xc11c60;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection},updatePositionShader=_0x92baec(0xe9),calculateSpeedShader=_0x92baec(0xe1),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';function _0x1d56(){const _0x2269be=['60eyGGBM','Math','updateViewerParameters','lineWidth','rows','mouse_move','longitude','8rsweUA','positionWC','east','scene','466392jJsNSP','LINEAR','updatePosition','xmin','lighter','sceneMode','_updateIng','colors','EventType','pixelSize','colorTable','lastFramesPerSecond','zIndex','dynamic','SCENE3D','drawingBufferHeight','latRange','4243160vtXkXZ','length','dropRateBump','createParticlesTextures','globalAlpha','_maxAge','segmentsDepth','createRenderingFramebuffers','framebuffers','windField','createRenderingTextures','_updateIng2','framebuffer','options','values','fragmentShaderSource','strokeStyle','drawingBufferWidth','create','_drawLines','sin','computing','steps','frameRateAdjustment','position','refreshTimer','ymax','setOptions','isInExtent','addEventListener','setData','vertexShaderSource','call','visibility','lng','flipY','off','changed','calculateSpeed','toRadians','cols','frameState.commandList\x20is\x20undefined','nextParticlesPosition','attributeLocations','redraw','postMessage','ymin','getSegmentDrawFragmentShader','particles','windTextures','commandType','vmax','updateWindData','stroke','applyViewerParameters','#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','defineProperty','createRawRenderState','red','createCommand','primitives','__esModule','max','#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','windData','commandToExecute','style','initFrameRate','_setOptionsHook','commandList','min','tlat','maxAge','age','1112346XwYDdy','speedRate','pointerEvents','5504916aYipox','data','lat','primitiveType','_calcUV','frameTime','fixedHeight','umin','_calc_speedRate','particlesTextureSize','clearFramebuffers','push','TRIANGLES','_onMouseMoveEvent','tlng','mouseMove','frameRate','canvas','MAX_VALUE','geometry','Cartesian2','blue','worker','camera','bounds','xmax','ONE_MINUS_SRC_ALPHA','mode','update','fill','104nfjrkb','removeChild','FLOAT','8985991PzUBRt','CanvasWindField','west','getUpdatePositionShader','frameRateMonitor','getUVByXY','_createCanvas','FUNC_ADD','_onMouseUpEvent','_removedHook','_animateFrame','_canrefresh','particleSystem','textures','183304Sozudq','ColorRamp','hidden','slice','clientHeight','forEach','rendering','_pointerEvents','umax','floor','Rectangle','clientWidth','width','getDataAtLonLat','segments','sqrt','clear','currentParticlesPosition','viewerParameters','0px','height','createPrimitives','segmentsColor','toDegrees','_randomParticle','_onMapWhellEvent','south','array','outputTexture','createSegmentsGeometry','3nQochk','clearCommand','requestRender','abs','canvasContext','createComputingPrimitives','particlesTextures','2460312jsaqUn','layer','context','Compute','_tomap','get','lineTo','RGBA','udata','speed','_map','_speedRate','destroy','canvasWidth','globe','wheel','DEPTH_COMPONENT','absolute','updateOptions','show','alt'];_0x1d56=function(){return _0x2269be;};return _0x1d56();}const {ShaderSource:ShaderSource$1}=mars3d__namespace['Cesium'];class ShaderManager{static['getCalculateSpeedShader'](){return new ShaderSource$1({'sources':[calculateSpeedShader]});}static[_0x92baec(0x11b)](){return new ShaderSource$1({'sources':[updatePositionShader]});}static['getSegmentDrawVertexShader'](){return new ShaderSource$1({'sources':[renderParticlesVertexShader]});}static['getSegmentDrawFragmentShader'](){return new ShaderSource$1({'sources':[renderParticlesFragmentShader]});}static['getPostProcessingPositionShader'](){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(_0x588a5c){const _0x89c9ce=_0x92baec;this[_0x89c9ce(0xdc)]=_0x588a5c['commandType'],this['geometry']=_0x588a5c['geometry'],this[_0x89c9ce(0xd5)]=_0x588a5c['attributeLocations'],this['primitiveType']=_0x588a5c[_0x89c9ce(0xfa)],this['uniformMap']=_0x588a5c['uniformMap']||{},this['vertexShaderSource']=_0x588a5c['vertexShaderSource'],this['fragmentShaderSource']=_0x588a5c[_0x89c9ce(0xb9)],this['rawRenderState']=_0x588a5c['rawRenderState'],this['framebuffer']=_0x588a5c['framebuffer'],this['outputTexture']=_0x588a5c['outputTexture'],this['autoClear']=_0x588a5c['autoClear']??![],this['preExecute']=_0x588a5c['preExecute'],this['show']=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['isDynamic']=_0x588a5c['isDynamic']??(()=>!![]),this['autoClear']&&(this[_0x89c9ce(0x145)]=new ClearCommand$1({'color':new Color$2(0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this[_0x89c9ce(0xb6)],'pass':Pass$1['OPAQUE']}));}['createCommand'](_0x307803){const _0x288ea4=_0x92baec;if(this['commandType']==='Draw'){const _0x2dfc34=VertexArray$1['fromGeometry']({'context':_0x307803,'geometry':this[_0x288ea4(0x10a)],'attributeLocations':this['attributeLocations'],'bufferUsage':BufferUsage$1['STATIC_DRAW']}),_0x2e295d=ShaderProgram['fromCache']({'context':_0x307803,'vertexShaderSource':this[_0x288ea4(0xc9)],'fragmentShaderSource':this['fragmentShaderSource'],'attributeLocations':this[_0x288ea4(0xd5)]}),_0x5ee9bd=RenderState['fromCache'](this['rawRenderState']);return new DrawCommand({'owner':this,'vertexArray':_0x2dfc34,'primitiveType':this['primitiveType'],'modelMatrix':Matrix4['IDENTITY'],'renderState':_0x5ee9bd,'shaderProgram':_0x2e295d,'framebuffer':this[_0x288ea4(0xb6)],'uniformMap':this['uniformMap'],'pass':Pass$1['OPAQUE']});}else{if(this[_0x288ea4(0xdc)]===_0x288ea4(0x14e))return new ComputeCommand({'owner':this,'fragmentShaderSource':this['fragmentShaderSource'],'uniformMap':this['uniformMap'],'outputTexture':this['outputTexture'],'persists':!![]});else throw new Error('Unknown\x20command\x20type');}}['setGeometry'](_0x5a4413,_0x4b9bf0){this['geometry']=_0x4b9bf0,defined(this['commandToExecute'])&&(this['commandToExecute']['vertexArray']=VertexArray$1['fromGeometry']({'context':_0x5a4413,'geometry':this['geometry'],'attributeLocations':this['attributeLocations'],'bufferUsage':BufferUsage$1['STATIC_DRAW']}));}['update'](_0x43d8ed){const _0x3940e5=_0x92baec;if(!this['isDynamic']())return;if(!this['show']||!defined(_0x43d8ed))return;!defined(this['commandToExecute'])&&(this['commandToExecute']=this[_0x3940e5(0xe5)](_0x43d8ed['context']));defined(this['preExecute'])&&this['preExecute']();if(!_0x43d8ed[_0x3940e5(0xef)]){console['warn'](_0x3940e5(0xd3));return;}defined(this['clearCommand'])&&_0x43d8ed[_0x3940e5(0xef)][_0x3940e5(0x102)](this['clearCommand']),defined(this['commandToExecute'])&&_0x43d8ed[_0x3940e5(0xef)][_0x3940e5(0x102)](this[_0x3940e5(0xeb)]);}['isDestroyed'](){return![];}[_0x92baec(0x157)](){const _0x5187b7=_0x92baec;if(defined(this['commandToExecute'])){var _0x9c9849;(_0x9c9849=this[_0x5187b7(0xeb)]['shaderProgram'])===null||_0x9c9849===void 0x0||_0x9c9849['destroy'](),this['commandToExecute']['shaderProgram']=undefined;}return destroyObject(this);}}function deepMerge(_0x227fcf,_0x3b1874){const _0x5d198f=_0x92baec;if(!_0x227fcf)return _0x3b1874;if(!_0x3b1874)return _0x227fcf;const _0x48e4f0={..._0x3b1874};for(const _0x2d540b in _0x227fcf){if(Object['prototype']['hasOwnProperty'][_0x5d198f(0xca)](_0x227fcf,_0x2d540b)){const _0x5a2fe2=_0x227fcf[_0x2d540b],_0x3124cd=_0x3b1874[_0x2d540b];if(Array['isArray'](_0x5a2fe2)){_0x48e4f0[_0x2d540b]=_0x5a2fe2[_0x5d198f(0x129)]();continue;}if(_0x5a2fe2&&typeof _0x5a2fe2==='object'){_0x48e4f0[_0x2d540b]=deepMerge(_0x5a2fe2,_0x3124cd||{});continue;}_0x5a2fe2!==undefined&&(_0x48e4f0[_0x2d540b]=_0x5a2fe2);}}return _0x48e4f0;}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(_0x4f15cd,_0x4d861c,_0x9803fd,_0x407423,_0x3b1a65){const _0x317db1=_0x92baec;this['context']=_0x4f15cd,this['options']=_0x9803fd,this[_0x317db1(0x138)]=_0x407423,this['windData']=_0x4d861c,this['frameRate']=0x3c,this['frameRateAdjustment']=0x1,this['frameRateMonitor']=new FrameRateMonitor({'scene':_0x3b1a65,'samplingWindow':0x1,'quietPeriod':0x0}),this[_0x317db1(0xed)](),this['createWindTextures'](),this[_0x317db1(0xad)](),this[_0x317db1(0x149)]();}[_0x92baec(0xed)](){const _0x5aa8fe=()=>{const _0x459fd6=_0x1b21;this[_0x459fd6(0x11c)][_0x459fd6(0xa4)]>0x14&&(this[_0x459fd6(0x107)]=this['frameRateMonitor']['lastFramesPerSecond'],this[_0x459fd6(0xc1)]=0x3c/Math['max'](this[_0x459fd6(0x107)],0x1));};_0x5aa8fe();const _0x5ebd3f=setInterval(_0x5aa8fe,0x3e8),_0x4b22a5=this['destroy']['bind'](this);this['destroy']=()=>{clearInterval(_0x5ebd3f),_0x4b22a5();};}['createWindTextures'](){const _0x468391=_0x92baec,_0xfd5efb={'context':this['context'],'width':this['windData'][_0x468391(0x132)],'height':this['windData'][_0x468391(0x13a)],'pixelFormat':PixelFormat$1['RED'],'pixelDatatype':PixelDatatype$1['FLOAT'],'flipY':this['options'][_0x468391(0xcd)]??![],'sampler':new Sampler$1({'minificationFilter':TextureMinificationFilter$1[_0x468391(0x9a)],'magnificationFilter':TextureMagnificationFilter$1['LINEAR']})};this[_0x468391(0xdb)]={'U':new Texture$1({..._0xfd5efb,'source':{'arrayBufferView':new Float32Array(this[_0x468391(0xea)]['u']['array'])}}),'V':new Texture$1({..._0xfd5efb,'source':{'arrayBufferView':new Float32Array(this['windData']['v']['array'])}})};}['createParticlesTextures'](){const _0x11b77d=_0x92baec,_0x492f04={'context':this['context'],'width':this[_0x11b77d(0xb7)][_0x11b77d(0x100)],'height':this['options']['particlesTextureSize'],'pixelFormat':PixelFormat$1['RGBA'],'pixelDatatype':PixelDatatype$1['FLOAT'],'flipY':![],'source':{'arrayBufferView':new Float32Array(this['options']['particlesTextureSize']*this['options']['particlesTextureSize']*0x4)[_0x11b77d(0x114)](0x0)},'sampler':new Sampler$1({'minificationFilter':TextureMinificationFilter$1['NEAREST'],'magnificationFilter':TextureMagnificationFilter$1['NEAREST']})};this['particlesTextures']={'previousParticlesPosition':new Texture$1(_0x492f04),'currentParticlesPosition':new Texture$1(_0x492f04),'nextParticlesPosition':new Texture$1(_0x492f04),'postProcessingPosition':new Texture$1(_0x492f04),'particlesSpeed':new Texture$1(_0x492f04)};}['destroyParticlesTextures'](){const _0x364733=_0x92baec;Object['values'](this['particlesTextures'])['forEach'](_0x5835a6=>_0x5835a6[_0x364733(0x157)]());}[_0x92baec(0x149)](){const _0x209d0c=_0x92baec;this['primitives']={'calculateSpeed':new CustomPrimitive({'commandType':'Compute','uniformMap':{'U':()=>this[_0x209d0c(0xdb)]['U'],'V':()=>this[_0x209d0c(0xdb)]['V'],'uRange':()=>new Cartesian2$1(this['windData']['u']['min'],this['windData']['u']['max']),'vRange':()=>new Cartesian2$1(this['windData']['v']['min'],this[_0x209d0c(0xea)]['v']['max']),'speedRange':()=>new Cartesian2$1(this[_0x209d0c(0xea)]['speed'][_0x209d0c(0xf0)],this['windData']['speed'][_0x209d0c(0xe8)]),'currentParticlesPosition':()=>this['particlesTextures']['currentParticlesPosition'],'speedScaleFactor':()=>{const _0x2dc26c=_0x209d0c;return(this[_0x2dc26c(0x138)][_0x2dc26c(0xa2)]+0x32)*this['options']['speedFactor'];},'frameRateAdjustment':()=>this[_0x209d0c(0xc1)],'dimension':()=>new Cartesian2$1(this[_0x209d0c(0xea)]['width'],this['windData']['height']),'minimum':()=>new Cartesian2$1(this['windData']['bounds']['west'],this[_0x209d0c(0xea)][_0x209d0c(0x10f)][_0x209d0c(0x140)]),'maximum':()=>new Cartesian2$1(this['windData'][_0x209d0c(0x10f)]['east'],this[_0x209d0c(0xea)][_0x209d0c(0x10f)]['north'])},'fragmentShaderSource':ShaderManager['getCalculateSpeedShader'](),'outputTexture':this['particlesTextures']['particlesSpeed'],'preExecute':()=>{const _0x5425cb=_0x209d0c,_0x586dc7=this['particlesTextures']['previousParticlesPosition'];this['particlesTextures']['previousParticlesPosition']=this[_0x5425cb(0x14a)]['currentParticlesPosition'],this['particlesTextures']['currentParticlesPosition']=this[_0x5425cb(0x14a)]['postProcessingPosition'],this['particlesTextures']['postProcessingPosition']=_0x586dc7,this[_0x5425cb(0xe6)]['calculateSpeed']['commandToExecute']&&(this['primitives'][_0x5425cb(0xd0)]['commandToExecute'][_0x5425cb(0x142)]=this['particlesTextures']['particlesSpeed']);},'isDynamic':()=>this['options'][_0x209d0c(0xa6)]}),'updatePosition':new CustomPrimitive({'commandType':_0x209d0c(0x14e),'uniformMap':{'currentParticlesPosition':()=>this[_0x209d0c(0x14a)][_0x209d0c(0x137)],'particlesSpeed':()=>this['particlesTextures']['particlesSpeed']},'fragmentShaderSource':ShaderManager[_0x209d0c(0x11b)](),'outputTexture':this['particlesTextures']['nextParticlesPosition'],'preExecute':()=>{const _0xac5fa8=_0x209d0c;this['primitives'][_0xac5fa8(0x9b)]['commandToExecute']&&(this['primitives']['updatePosition']['commandToExecute']['outputTexture']=this[_0xac5fa8(0x14a)][_0xac5fa8(0xd4)]);},'isDynamic':()=>this['options']['dynamic']}),'postProcessingPosition':new CustomPrimitive({'commandType':'Compute','uniformMap':{'nextParticlesPosition':()=>this['particlesTextures']['nextParticlesPosition'],'particlesSpeed':()=>this[_0x209d0c(0x14a)]['particlesSpeed'],'lonRange':()=>this[_0x209d0c(0x138)]['lonRange'],'latRange':()=>this[_0x209d0c(0x138)]['latRange'],'dataLonRange':()=>new Cartesian2$1(this['windData'][_0x209d0c(0x10f)]['west'],this[_0x209d0c(0xea)]['bounds'][_0x209d0c(0x97)]),'dataLatRange':()=>new Cartesian2$1(this[_0x209d0c(0xea)]['bounds']['south'],this[_0x209d0c(0xea)]['bounds']['north']),'randomCoefficient':function(){return Math['random']();},'dropRate':()=>this['options']['dropRate'],'dropRateBump':()=>this[_0x209d0c(0xb7)][_0x209d0c(0xac)],'useViewerBounds':()=>this[_0x209d0c(0xb7)]['useViewerBounds']},'fragmentShaderSource':ShaderManager['getPostProcessingPositionShader'](),'outputTexture':this['particlesTextures']['postProcessingPosition'],'preExecute':()=>{const _0x3bcdef=_0x209d0c;this['primitives']['postProcessingPosition']['commandToExecute']&&(this[_0x3bcdef(0xe6)]['postProcessingPosition']['commandToExecute'][_0x3bcdef(0x142)]=this['particlesTextures']['postProcessingPosition']);},'isDynamic':()=>this['options']['dynamic']})};}['reCreateWindTextures'](){const _0xdd32fc=_0x92baec;this[_0xdd32fc(0xdb)]['U']['destroy'](),this['windTextures']['V']['destroy'](),this['createWindTextures']();}['updateWindData'](_0x5a9254){this['windData']=_0x5a9254,this['reCreateWindTextures']();}[_0x92baec(0x15d)](_0x7d4ac4){const _0x271fba=_0x92baec,_0x5e4ebd=_0x7d4ac4['flipY']!==undefined&&_0x7d4ac4['flipY']!==this['options']['flipY'];this['options']=deepMerge(_0x7d4ac4,this[_0x271fba(0xb7)]),_0x5e4ebd&&this['reCreateWindTextures']();}['processWindData'](_0x3747ef){const _0x32df5c=_0x92baec,{array:_0x2419c8}=_0x3747ef;let {min:_0x33feca,max:_0x47f316}=_0x3747ef;const _0xa962e4=new Float32Array(_0x2419c8['length']);_0x33feca===undefined&&(console['warn']('min\x20is\x20undefined,\x20calculate\x20min'),_0x33feca=Math['min'](..._0x2419c8));_0x47f316===undefined&&(console['warn']('max\x20is\x20undefined,\x20calculate\x20max'),_0x47f316=Math['max'](..._0x2419c8));const _0x4c51a9=Math['max'](Math['abs'](_0x33feca),Math['abs'](_0x47f316));for(let _0x4cfed3=0x0;_0x4cfed3<_0x2419c8[_0x32df5c(0xab)];_0x4cfed3++){const _0x2814a4=_0x2419c8[_0x4cfed3]/_0x4c51a9;_0xa962e4[_0x4cfed3]=_0x2814a4;}return _0xa962e4;}['destroy'](){const _0x133a6e=_0x92baec;Object[_0x133a6e(0xb8)](this['windTextures'])['forEach'](_0x488385=>_0x488385[_0x133a6e(0x157)]()),Object['values'](this['particlesTextures'])[_0x133a6e(0x12b)](_0x3ba333=>_0x3ba333[_0x133a6e(0x157)]()),Object['values'](this['primitives'])['forEach'](_0x24b92f=>_0x24b92f[_0x133a6e(0x157)]()),this[_0x133a6e(0x11c)]['destroy']();}}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(_0x114a94,_0xc8f470,_0x5d48d5,_0x3a28fb){const _0x2aa27f=_0x92baec;this['context']=_0x114a94,this[_0x2aa27f(0xb7)]=_0xc8f470,this[_0x2aa27f(0x138)]=_0x5d48d5,this['computing']=_0x3a28fb,(typeof this['options']['particlesTextureSize']!=='number'||this[_0x2aa27f(0xb7)]['particlesTextureSize']<=0x0)&&(console['error']('Invalid\x20particlesTextureSize.\x20Using\x20default\x20value\x20of\x20256.'),this[_0x2aa27f(0xb7)][_0x2aa27f(0x100)]=0x100),this[_0x2aa27f(0xa3)]=this['createColorTableTexture'](),this['textures']=this['createRenderingTextures'](),this['framebuffers']=this[_0x2aa27f(0xb1)](),this[_0x2aa27f(0xe6)]=this[_0x2aa27f(0x13b)]();}[_0x92baec(0xb4)](){const _0x2f17b0=_0x92baec,_0xb4007e={'context':this[_0x2f17b0(0x14d)],'width':this['context'][_0x2f17b0(0xbb)],'height':this['context'][_0x2f17b0(0xa8)],'pixelFormat':PixelFormat[_0x2f17b0(0x152)],'pixelDatatype':PixelDatatype['UNSIGNED_BYTE']},_0x334035={'context':this['context'],'width':this[_0x2f17b0(0x14d)][_0x2f17b0(0xbb)],'height':this[_0x2f17b0(0x14d)]['drawingBufferHeight'],'pixelFormat':PixelFormat[_0x2f17b0(0x15b)],'pixelDatatype':PixelDatatype['UNSIGNED_INT']};return{'segmentsColor':new Texture(_0xb4007e),'segmentsDepth':new Texture(_0x334035)};}['createRenderingFramebuffers'](){const _0x56384d=_0x92baec;return{'segments':new Framebuffer({'context':this['context'],'colorTextures':[this[_0x56384d(0x125)][_0x56384d(0x13c)]],'depthTexture':this[_0x56384d(0x125)][_0x56384d(0xb0)]})};}['destoryRenderingFramebuffers'](){const _0x2c8a9b=_0x92baec;Object['values'](this[_0x2c8a9b(0xb2)])['forEach'](_0x2d95d3=>{const _0xfe4c43=_0x2c8a9b;_0x2d95d3[_0xfe4c43(0x157)]();});}['createColorTableTexture'](){const _0x50755a=_0x92baec,_0x33c1bc=new Float32Array(this['options']['colors']['flatMap'](_0x302a0d=>{const _0x2495c4=_0x1b21,_0x4e5e68=Color$1['fromCssColorString'](_0x302a0d);return[_0x4e5e68[_0x2495c4(0xe4)],_0x4e5e68['green'],_0x4e5e68[_0x2495c4(0x10c)],_0x4e5e68['alpha']];}));return new Texture({'context':this['context'],'width':this['options'][_0x50755a(0xa0)][_0x50755a(0xab)],'height':0x1,'pixelFormat':PixelFormat['RGBA'],'pixelDatatype':PixelDatatype[_0x50755a(0x117)],'sampler':new Sampler({'minificationFilter':TextureMinificationFilter['LINEAR'],'magnificationFilter':TextureMagnificationFilter['LINEAR'],'wrapS':TextureWrap['CLAMP_TO_EDGE'],'wrapT':TextureWrap['CLAMP_TO_EDGE']}),'source':{'width':this[_0x50755a(0xb7)][_0x50755a(0xa0)]['length'],'height':0x1,'arrayBufferView':_0x33c1bc}});}['createSegmentsGeometry'](){const _0x303f47=_0x92baec,_0x5ecb8e=0x4,_0x5ab5d7=this['options']['particlesTextureSize'];let _0x36c26a=[];for(let _0xc47f56=0x0;_0xc47f56<_0x5ab5d7;_0xc47f56++){for(let _0x13f17c=0x0;_0x13f17c<_0x5ab5d7;_0x13f17c++){for(let _0x20fb1e=0x0;_0x20fb1e<_0x5ecb8e;_0x20fb1e++){_0x36c26a[_0x303f47(0x102)](_0xc47f56/_0x5ab5d7),_0x36c26a[_0x303f47(0x102)](_0x13f17c/_0x5ab5d7);}}}_0x36c26a=new Float32Array(_0x36c26a);const _0x6a33f=this[_0x303f47(0xb7)]['particlesTextureSize']**0x2;let _0x333b20=[];for(let _0x5d3d44=0x0;_0x5d3d44<_0x6a33f;_0x5d3d44++){_0x333b20[_0x303f47(0x102)](-0x1,-0x1,0x0,-0x1,0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0);}_0x333b20=new Float32Array(_0x333b20);let _0x13b27=[];for(let _0x58fe38=0x0,_0x46e671=0x0;_0x58fe38<_0x6a33f;_0x58fe38++){_0x13b27['push'](_0x46e671+0x0,_0x46e671+0x1,_0x46e671+0x2,_0x46e671+0x2,_0x46e671+0x1,_0x46e671+0x3),_0x46e671+=_0x5ecb8e;}_0x13b27=new Uint32Array(_0x13b27);const _0x10c3c2=new Geometry({'attributes':new GeometryAttributes({'st':new GeometryAttribute({'componentDatatype':ComponentDatatype[_0x303f47(0x117)],'componentsPerAttribute':0x2,'values':_0x36c26a}),'normal':new GeometryAttribute({'componentDatatype':ComponentDatatype['FLOAT'],'componentsPerAttribute':0x3,'values':_0x333b20})}),'indices':_0x13b27});return _0x10c3c2;}[_0x92baec(0xe3)](_0x36be96){return Appearance['getDefaultRenderState'](!![],![],{'viewport':undefined,'depthTest':undefined,'depthMask':undefined,'blending':undefined,..._0x36be96});}[_0x92baec(0x13b)](){const _0xda78f1=_0x92baec,_0x5efbb8=new CustomPrimitive({'commandType':'Draw','attributeLocations':{'st':0x0,'normal':0x1},'geometry':this['createSegmentsGeometry'](),'primitiveType':PrimitiveType[_0xda78f1(0x103)],'uniformMap':{'previousParticlesPosition':()=>this[_0xda78f1(0xbf)][_0xda78f1(0x14a)]['previousParticlesPosition'],'currentParticlesPosition':()=>this['computing']['particlesTextures'][_0xda78f1(0x137)],'postProcessingPosition':()=>this[_0xda78f1(0xbf)]['particlesTextures']['postProcessingPosition'],'particlesSpeed':()=>this['computing'][_0xda78f1(0x14a)]['particlesSpeed'],'frameRateAdjustment':()=>this['computing']['frameRateAdjustment'],'colorTable':()=>this[_0xda78f1(0xa3)],'domain':()=>{const _0x1e779a=_0xda78f1;var _0xceb550,_0xbbd545;const _0x192d03=new Cartesian2(((_0xceb550=this[_0x1e779a(0xb7)]['domain'])===null||_0xceb550===void 0x0?void 0x0:_0xceb550[_0x1e779a(0xf0)])??this['computing'][_0x1e779a(0xea)][_0x1e779a(0x154)]['min'],((_0xbbd545=this['options']['domain'])===null||_0xbbd545===void 0x0?void 0x0:_0xbbd545['max'])??this['computing']['windData']['speed']['max']);return _0x192d03;},'displayRange':()=>{const _0x374e7a=_0xda78f1;var _0x20e433,_0x29dcee;const _0x4e8d2f=new Cartesian2(((_0x20e433=this['options']['displayRange'])===null||_0x20e433===void 0x0?void 0x0:_0x20e433['min'])??this[_0x374e7a(0xbf)]['windData']['speed']['min'],((_0x29dcee=this[_0x374e7a(0xb7)]['displayRange'])===null||_0x29dcee===void 0x0?void 0x0:_0x29dcee[_0x374e7a(0xe8)])??this['computing'][_0x374e7a(0xea)]['speed']['max']);return _0x4e8d2f;},'particleHeight':()=>this['options']['fixedHeight']||0x0,'aspect':()=>this[_0xda78f1(0x14d)]['drawingBufferWidth']/this['context']['drawingBufferHeight'],'pixelSize':()=>this[_0xda78f1(0x138)][_0xda78f1(0xa2)],'lineWidth':()=>{const _0x4f8c71=_0xda78f1,_0x287daa=this['options'][_0x4f8c71(0x91)]||{'min':0x1,'max':0x2};return new Cartesian2(_0x287daa[_0x4f8c71(0xf0)],_0x287daa[_0x4f8c71(0xe8)]);},'lineLength':()=>{const _0x4d49e3=this['options']['lineLength']||{'min':0x14,'max':0x64};return new Cartesian2(_0x4d49e3['min'],_0x4d49e3['max']);},'is3D':()=>this[_0xda78f1(0x138)]['sceneMode']===SceneMode[_0xda78f1(0xa7)],'segmentsDepthTexture':()=>this['textures']['segmentsDepth']},'vertexShaderSource':ShaderManager['getSegmentDrawVertexShader'](),'fragmentShaderSource':ShaderManager[_0xda78f1(0xd9)](),'rawRenderState':this[_0xda78f1(0xe3)]({'viewport':undefined,'depthTest':{'enabled':!![]},'depthMask':!![],'blending':{'enabled':!![],'blendEquation':WebGLRenderingContext[_0xda78f1(0x11f)],'blendFuncSource':WebGLRenderingContext['SRC_ALPHA'],'blendFuncDestination':WebGLRenderingContext[_0xda78f1(0x111)]}})});return{'segments':_0x5efbb8};}['onParticlesTextureSizeChange'](){const _0x34dedc=_0x92baec,_0x32417b=this[_0x34dedc(0x143)]();this['primitives']['segments']['geometry']=_0x32417b;const _0x488779=VertexArray['fromGeometry']({'context':this['context'],'geometry':_0x32417b,'attributeLocations':this['primitives']['segments']['attributeLocations'],'bufferUsage':BufferUsage['STATIC_DRAW']});this[_0x34dedc(0xe6)][_0x34dedc(0x134)]['commandToExecute']&&(this['primitives'][_0x34dedc(0x134)]['commandToExecute']['vertexArray']=_0x488779);}['onColorTableChange'](){const _0x1e9d00=_0x92baec;this['colorTable'][_0x1e9d00(0x157)](),this[_0x1e9d00(0xa3)]=this['createColorTableTexture']();}['updateOptions'](_0x1b81ee){const _0x53483f=_0x92baec,_0x12155a=_0x1b81ee['colors']&&JSON['stringify'](_0x1b81ee['colors'])!==JSON['stringify'](this['options'][_0x53483f(0xa0)]);this[_0x53483f(0xb7)]=deepMerge(_0x1b81ee,this['options']),_0x12155a&&this['onColorTableChange']();}['destroy'](){const _0x14b75f=_0x92baec;Object[_0x14b75f(0xb8)](this['framebuffers'])[_0x14b75f(0x12b)](_0x5ab93f=>{const _0xa8d833=_0x14b75f;_0x5ab93f[_0xa8d833(0x157)]();}),Object[_0x14b75f(0xb8)](this['primitives'])['forEach'](_0x25aac9=>{_0x25aac9['destroy']();}),this['colorTable'][_0x14b75f(0x157)]();}}const {ClearCommand,Color,Pass}=mars3d__namespace['Cesium'];function _0x1b21(_0x1d683f,_0x57cad1){const _0x1d5676=_0x1d56();return _0x1b21=function(_0x1b21f0,_0xc316dd){_0x1b21f0=_0x1b21f0-0x8e;let _0x2ab6f7=_0x1d5676[_0x1b21f0];return _0x2ab6f7;},_0x1b21(_0x1d683f,_0x57cad1);}class WindParticleSystem{constructor(_0x26d2e8,_0x4845d8,_0x316ed2,_0x41cda2,_0x41c210){const _0x1de254=_0x92baec;this['context']=_0x26d2e8,this['options']=_0x316ed2,this[_0x1de254(0x138)]=_0x41cda2,this[_0x1de254(0xbf)]=new WindParticlesComputing(_0x26d2e8,_0x4845d8,_0x316ed2,_0x41cda2,_0x41c210),this[_0x1de254(0x12c)]=new WindParticlesRendering(_0x26d2e8,_0x316ed2,_0x41cda2,this[_0x1de254(0xbf)]),this[_0x1de254(0x101)]();}['getPrimitives'](){const _0x174ce0=_0x92baec,_0x42af53=[this[_0x174ce0(0xbf)][_0x174ce0(0xe6)][_0x174ce0(0xd0)],this['computing']['primitives']['updatePosition'],this['computing']['primitives']['postProcessingPosition'],this['rendering']['primitives']['segments']];return _0x42af53;}['clearFramebuffers'](){const _0x3ed1ce=_0x92baec,_0x4366bf=new ClearCommand({'color':new Color(0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':undefined,'pass':Pass['OPAQUE']});Object['keys'](this['rendering'][_0x3ed1ce(0xb2)])['forEach'](_0x4d9222=>{_0x4366bf['framebuffer']=this['rendering']['framebuffers'][_0x4d9222],_0x4366bf['execute'](this['context']);});}['changeOptions'](_0x45858a){const _0xfdb9e0=_0x92baec;let _0x37133d=![];_0x45858a['particlesTextureSize']&&this[_0xfdb9e0(0xb7)][_0xfdb9e0(0x100)]!==_0x45858a['particlesTextureSize']&&(_0x37133d=!![]);const _0x91b239=deepMerge(_0x45858a,this['options']);if(_0x91b239[_0xfdb9e0(0x100)]<0x1)throw new Error('particlesTextureSize\x20must\x20be\x20greater\x20than\x200');this['options']=_0x91b239,this['rendering']['updateOptions'](_0x45858a),this['computing'][_0xfdb9e0(0x15d)](_0x45858a),_0x37133d&&(this['computing']['destroyParticlesTextures'](),this[_0xfdb9e0(0xbf)]['createParticlesTextures'](),this['rendering']['onParticlesTextureSizeChange']());}[_0x92baec(0xe0)](_0x3a53dc){const _0x21a129=_0x92baec;this['viewerParameters']=_0x3a53dc,this['computing']['viewerParameters']=_0x3a53dc,this[_0x21a129(0x12c)]['viewerParameters']=_0x3a53dc;}['destroy'](){const _0xff4b06=_0x92baec;this['computing'][_0xff4b06(0x157)](),this['rendering']['destroy']();}}const Cesium$1=mars3d__namespace['Cesium'],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(_0x409265={}){_0x409265={...DEF_OPTIONS,..._0x409265},super(_0x409265),this['_setOptionsHook'](_0x409265,_0x409265);}get['layer'](){return this['primitives'];}get['data'](){const _0x43e53f=_0x92baec;return this['options'][_0x43e53f(0xf8)];}set['data'](_0x31b325){this['options']['data']=_0x31b325,this['setData'](_0x31b325);}get[_0x92baec(0xa0)](){return this['options']['colors'];}set['colors'](_0xe5459e){const _0x23e96e=_0x92baec;this['options'][_0x23e96e(0xa0)]=_0xe5459e,this[_0x23e96e(0xee)](this['options'],{'colors':_0xe5459e});}['_mountedHook'](){}['_addedHook'](){const _0x1890e3=_0x92baec;this[_0x1890e3(0x98)]=this['_map'][_0x1890e3(0x98)],this[_0x1890e3(0x10e)]=this['_map']['camera'];this[_0x1890e3(0xb7)]['data']&&this[_0x1890e3(0xc8)](this['options'][_0x1890e3(0xf8)]);if(!this['windData'])return;this['viewerParameters']={'lonRange':new Cesium$1['Cartesian2'](-0xb4,0xb4),'latRange':new Cesium$1[(_0x1890e3(0x10b))](-0x5a,0x5a),'pixelSize':0x3e8,'sceneMode':this['scene']['mode']},this['updateViewerParameters'](),this['particleSystem']=new WindParticleSystem(this['scene']['context'],this['windData'],this['options'],this['viewerParameters'],this[_0x1890e3(0x98)]),this['primitives']=this['particleSystem']['getPrimitives'](),this[_0x1890e3(0xe6)][_0x1890e3(0x12b)](_0x90e46f=>{this['scene']['primitives']['add'](_0x90e46f);}),this[_0x1890e3(0x10e)]['percentageChanged']=0.01,this['camera'][_0x1890e3(0xcf)]['addEventListener'](this['updateViewerParameters']['bind'](this)),this['scene']['morphComplete'][_0x1890e3(0xc7)](this[_0x1890e3(0x90)]['bind'](this)),window[_0x1890e3(0xc7)]('resize',this[_0x1890e3(0x90)]['bind'](this));}['_removedHook'](){const _0x22bb4b=_0x92baec;this[_0x22bb4b(0x10e)]['changed']['removeEventListener'](this[_0x22bb4b(0x90)]['bind'](this)),this['scene']['morphComplete']['removeEventListener'](this[_0x22bb4b(0x90)]['bind'](this)),window['removeEventListener']('resize',this['updateViewerParameters']['bind'](this)),this['primitives']&&(this['primitives']['forEach'](_0x3ff3d8=>{this['scene']['primitives']['remove'](_0x3ff3d8);}),delete this['primitives']),this['particleSystem']&&(this['particleSystem'][_0x22bb4b(0x157)](),delete this['particleSystem']);}['setData'](_0x8937d8,_0x48629e){const _0x1c9ffe=_0x92baec;this['windData']=this['processWindData'](_0x8937d8);if(_0x48629e){this['_removedHook'](),this['_addedHook']();return;}this['particleSystem']?(this['particleSystem'][_0x1c9ffe(0xbf)][_0x1c9ffe(0xde)](this[_0x1c9ffe(0xea)]),this['scene']['requestRender']()):this['_addedHook']();}['_setOptionsHook'](_0x1a21c0,_0xb4c78a){const _0x412763=_0x92baec;this[_0x412763(0x124)]&&(this[_0x412763(0x124)]['changeOptions'](_0xb4c78a),this['scene'][_0x412763(0x146)]());}['processWindData'](_0x57183c){const _0x189e19=_0x92baec;var _0xccc080,_0x196232;const _0x8c4658={..._0x57183c};!_0x8c4658['height']&&_0x8c4658['rows']&&(_0x8c4658['height']=_0x8c4658[_0x189e19(0x92)]);!_0x8c4658['width']&&_0x8c4658['cols']&&(_0x8c4658['width']=_0x8c4658['cols']);!_0x8c4658['bounds']&&(_0x8c4658['bounds']={'west':_0x8c4658['xmin'],'south':_0x8c4658['ymin'],'east':_0x8c4658[_0x189e19(0x110)],'north':_0x8c4658['ymax']});!_0x8c4658['u']&&(_0x8c4658['u']={'array':_0x57183c[_0x189e19(0x153)],'min':_0x57183c[_0x189e19(0xfe)],'max':_0x57183c[_0x189e19(0x12e)]});!_0x8c4658['v']&&(_0x8c4658['v']={'array':_0x57183c['vdata'],'min':_0x57183c['vmin'],'max':_0x57183c[_0x189e19(0xdd)]});if(((_0xccc080=_0x8c4658['speed'])===null||_0xccc080===void 0x0?void 0x0:_0xccc080[_0x189e19(0xf0)])===undefined||((_0x196232=_0x8c4658['speed'])===null||_0x196232===void 0x0?void 0x0:_0x196232['max'])===undefined||_0x8c4658['speed'][_0x189e19(0x141)]===undefined){const _0x238749={'array':new Float32Array(_0x8c4658['u']['array']['length']),'min':Number[_0x189e19(0x109)],'max':Number['MIN_VALUE']};for(let _0x113dba=0x0;_0x113dba<_0x8c4658['u']['array']['length'];_0x113dba++){_0x238749['array'][_0x113dba]=Math[_0x189e19(0x135)](_0x8c4658['u'][_0x189e19(0x141)][_0x113dba]*_0x8c4658['u'][_0x189e19(0x141)][_0x113dba]+_0x8c4658['v']['array'][_0x113dba]*_0x8c4658['v']['array'][_0x113dba]),_0x238749['array'][_0x113dba]!==0x0&&(_0x238749['min']=Math['min'](_0x238749[_0x189e19(0xf0)],_0x238749['array'][_0x113dba]),_0x238749['max']=Math[_0x189e19(0xe8)](_0x238749['max'],_0x238749[_0x189e19(0x141)][_0x113dba]));}_0x8c4658['speed']=_0x238749;}return _0x8c4658;}[_0x92baec(0x90)](){const _0x66f33a=_0x92baec;var _0xe7178e;const _0x5429a1=this[_0x66f33a(0x98)];if(!_0x5429a1)return;const _0x20c09c=_0x5429a1[_0x66f33a(0x108)],_0x4d3a39=[{'x':0x0,'y':0x0},{'x':0x0,'y':_0x20c09c[_0x66f33a(0x12a)]},{'x':_0x20c09c[_0x66f33a(0x131)],'y':0x0},{'x':_0x20c09c[_0x66f33a(0x131)],'y':_0x20c09c[_0x66f33a(0x12a)]}];let _0x753121=0xb4,_0x3d5f6a=-0xb4,_0x5e46cb=0x5a,_0xc210c2=-0x5a,_0x5ce3b7=![];for(const _0x588dae of _0x4d3a39){const _0x49df6f=_0x5429a1['camera']['pickEllipsoid'](new Cesium$1[(_0x66f33a(0x10b))](_0x588dae['x'],_0x588dae['y']),_0x5429a1[_0x66f33a(0x159)]['ellipsoid']);if(!_0x49df6f){_0x5ce3b7=!![];break;}const _0x516a68=_0x5429a1['globe']['ellipsoid']['cartesianToCartographic'](_0x49df6f),_0x1957ff=Cesium$1['Math']['toDegrees'](_0x516a68[_0x66f33a(0x94)]),_0x3ec6f0=Cesium$1['Math'][_0x66f33a(0x13d)](_0x516a68['latitude']);_0x753121=Math['min'](_0x753121,_0x1957ff),_0x3d5f6a=Math['max'](_0x3d5f6a,_0x1957ff),_0x5e46cb=Math['min'](_0x5e46cb,_0x3ec6f0),_0xc210c2=Math['max'](_0xc210c2,_0x3ec6f0);}if(!_0x5ce3b7){const _0x3e5085=new Cesium$1[(_0x66f33a(0x10b))](Math['max'](this['windData'][_0x66f33a(0x10f)]['west'],_0x753121),Math['min'](this['windData']['bounds']['east'],_0x3d5f6a)),_0x28c072=new Cesium$1['Cartesian2'](Math[_0x66f33a(0xe8)](this['windData']['bounds']['south'],_0x5e46cb),Math[_0x66f33a(0xf0)](this[_0x66f33a(0xea)]['bounds']['north'],_0xc210c2)),_0x544704=(_0x3e5085['y']-_0x3e5085['x'])*0.05,_0x3be5b4=(_0x28c072['y']-_0x28c072['x'])*0.05;_0x3e5085['x']=Math['max'](this['windData'][_0x66f33a(0x10f)]['west'],_0x3e5085['x']-_0x544704),_0x3e5085['y']=Math['min'](this['windData']['bounds']['east'],_0x3e5085['y']+_0x544704),_0x28c072['x']=Math['max'](this[_0x66f33a(0xea)]['bounds'][_0x66f33a(0x140)],_0x28c072['x']-_0x3be5b4),_0x28c072['y']=Math[_0x66f33a(0xf0)](this[_0x66f33a(0xea)]['bounds']['north'],_0x28c072['y']+_0x3be5b4),this['viewerParameters']['lonRange']=_0x3e5085,this['viewerParameters'][_0x66f33a(0xa9)]=_0x28c072;const _0x13f8ec=this['windData']['bounds']['east']-this[_0x66f33a(0xea)]['bounds']['west'],_0x12e804=this['windData']['bounds']['north']-this['windData'][_0x66f33a(0x10f)]['south'],_0x2c09a9=(_0x3e5085['y']-_0x3e5085['x'])/_0x13f8ec,_0x25d614=(_0x28c072['y']-_0x28c072['x'])/_0x12e804,_0x4c3fc9=Math['min'](_0x2c09a9,_0x25d614),_0x23f236=0x3e8*_0x4c3fc9;_0x23f236>0x0&&(this[_0x66f33a(0x138)][_0x66f33a(0xa2)]=Math['max'](0x0,Math['min'](0x3e8,_0x23f236)));}this[_0x66f33a(0x138)][_0x66f33a(0x9e)]=this[_0x66f33a(0x98)][_0x66f33a(0x112)],(_0xe7178e=this['particleSystem'])===null||_0xe7178e===void 0x0||_0xe7178e['applyViewerParameters'](this[_0x66f33a(0x138)]);}[_0x92baec(0x133)](_0x581700,_0x10ebd7){const _0x4f7457=_0x92baec,{bounds:_0x16702f,width:_0x13cd06,height:_0x5b9457,u:_0x2e5eb0,v:_0x678ed5,speed:_0x243f2e}=this[_0x4f7457(0xea)],{flipY:_0x5c000e}=this[_0x4f7457(0xb7)];if(_0x581700<_0x16702f['west']||_0x581700>_0x16702f[_0x4f7457(0x97)]||_0x10ebd7<_0x16702f['south']||_0x10ebd7>_0x16702f['north'])return null;const _0x942eb4=(_0x581700-_0x16702f['west'])/(_0x16702f['east']-_0x16702f[_0x4f7457(0x11a)])*(_0x13cd06-0x1);let _0x25a044=(_0x10ebd7-_0x16702f['south'])/(_0x16702f['north']-_0x16702f['south'])*(_0x5b9457-0x1);_0x5c000e&&(_0x25a044=_0x5b9457-0x1-_0x25a044);const _0x3a06f1=Math['floor'](_0x942eb4),_0x53e9ff=Math['floor'](_0x25a044),_0x4b06fd=Math[_0x4f7457(0x12f)](_0x942eb4),_0x2b4b01=Math['min'](_0x4b06fd+0x1,_0x13cd06-0x1),_0x507f24=Math['floor'](_0x25a044),_0x16ff99=Math['min'](_0x507f24+0x1,_0x5b9457-0x1),_0x4084c4=_0x942eb4-_0x4b06fd,_0x4f0ad9=_0x25a044-_0x507f24,_0x5f05f6=_0x53e9ff*_0x13cd06+_0x3a06f1,_0x5f33cd=_0x507f24*_0x13cd06+_0x4b06fd,_0x30064f=_0x507f24*_0x13cd06+_0x2b4b01,_0x13ba79=_0x16ff99*_0x13cd06+_0x4b06fd,_0x1c73c2=_0x16ff99*_0x13cd06+_0x2b4b01,_0x53ab23=_0x2e5eb0['array'][_0x5f33cd],_0x1569ac=_0x2e5eb0['array'][_0x30064f],_0x4305e2=_0x2e5eb0['array'][_0x13ba79],_0x2a7042=_0x2e5eb0['array'][_0x1c73c2],_0x4935bf=(0x1-_0x4084c4)*(0x1-_0x4f0ad9)*_0x53ab23+_0x4084c4*(0x1-_0x4f0ad9)*_0x1569ac+(0x1-_0x4084c4)*_0x4f0ad9*_0x4305e2+_0x4084c4*_0x4f0ad9*_0x2a7042,_0x2c6210=_0x678ed5['array'][_0x5f33cd],_0x220cb1=_0x678ed5['array'][_0x30064f],_0x151ddd=_0x678ed5['array'][_0x13ba79],_0x155352=_0x678ed5['array'][_0x1c73c2],_0x7b828f=(0x1-_0x4084c4)*(0x1-_0x4f0ad9)*_0x2c6210+_0x4084c4*(0x1-_0x4f0ad9)*_0x220cb1+(0x1-_0x4084c4)*_0x4f0ad9*_0x151ddd+_0x4084c4*_0x4f0ad9*_0x155352,_0x4a6034=Math[_0x4f7457(0x135)](_0x4935bf*_0x4935bf+_0x7b828f*_0x7b828f);return{'original':{'u':_0x2e5eb0[_0x4f7457(0x141)][_0x5f05f6],'v':_0x678ed5[_0x4f7457(0x141)][_0x5f05f6],'speed':_0x243f2e['array'][_0x5f05f6]},'interpolated':{'u':_0x4935bf,'v':_0x7b828f,'speed':_0x4a6034}};}}mars3d__namespace['LayerUtil']['register']('wind',WindLayer),mars3d__namespace['layer']['WindLayer']=WindLayer;class CanvasParticle{constructor(){this['lng']=null,this['lat']=null,this['tlng']=null,this['tlat']=null,this['age']=null,this['speed']=null;}['destroy'](){for(const _0x42b277 in this){delete this[_0x42b277];}}}class CanvasWindField{constructor(_0x265ad0){this['setOptions'](_0x265ad0);}get[_0x92baec(0xf5)](){return this['_speedRate'];}set['speedRate'](_0x394f9f){const _0x1443c3=_0x92baec;this[_0x1443c3(0x156)]=(0x64-(_0x394f9f>0x63?0x63:_0x394f9f))*0x64,this['_calc_speedRate']=[(this[_0x1443c3(0x110)]-this['xmin'])/this['_speedRate'],(this['ymax']-this[_0x1443c3(0xd8)])/this['_speedRate']];}get['maxAge'](){const _0x38057d=_0x92baec;return this[_0x38057d(0xaf)];}set[_0x92baec(0xf2)](_0x31ce97){this['_maxAge']=_0x31ce97;}[_0x92baec(0xc5)](_0x578ab1){const _0x25083d=_0x92baec;this[_0x25083d(0xb7)]=_0x578ab1,this['maxAge']=_0x578ab1['maxAge']||0x78,this[_0x25083d(0xf5)]=_0x578ab1['speedRate']||0x32,this[_0x25083d(0xda)]=[];const _0x1717de=_0x578ab1['particlesNumber']||0x1000;for(let _0x2170e1=0x0;_0x2170e1<_0x1717de;_0x2170e1++){const _0x1cab99=this[_0x25083d(0x13e)](new CanvasParticle());this['particles'][_0x25083d(0x102)](_0x1cab99);}}['setDate'](_0x47a8bc){const _0x38472c=_0x92baec;this['rows']=_0x47a8bc[_0x38472c(0x92)],this['cols']=_0x47a8bc['cols'],this[_0x38472c(0x9c)]=_0x47a8bc['xmin'],this[_0x38472c(0x110)]=_0x47a8bc['xmax'],this['ymin']=_0x47a8bc['ymin'],this['ymax']=_0x47a8bc[_0x38472c(0xc4)],this['grid']=[];const _0x4bcb07=_0x47a8bc['udata'],_0x22a8ff=_0x47a8bc['vdata'];let _0x400bae=![];_0x4bcb07['length']===this['rows']&&_0x4bcb07[0x0]['length']===this['cols']&&(_0x400bae=!![]);let _0x125f0b=0x0,_0x5d2042=null,_0x11dff0=null;for(let _0x13dee5=0x0;_0x13dee5<this['rows'];_0x13dee5++){_0x5d2042=[];for(let _0x129b75=0x0;_0x129b75<this['cols'];_0x129b75++,_0x125f0b++){_0x400bae?_0x11dff0=this[_0x38472c(0xfb)](_0x4bcb07[_0x13dee5][_0x129b75],_0x22a8ff[_0x13dee5][_0x129b75]):_0x11dff0=this[_0x38472c(0xfb)](_0x4bcb07[_0x125f0b],_0x22a8ff[_0x125f0b]),_0x5d2042['push'](_0x11dff0);}this['grid']['push'](_0x5d2042);}!this[_0x38472c(0xb7)]['flipY']&&this['grid']['reverse']();}[_0x92baec(0x136)](){const _0x1fe020=_0x92baec;delete this['rows'],delete this['cols'],delete this[_0x1fe020(0x9c)],delete this['xmax'],delete this['ymin'],delete this[_0x1fe020(0xc4)],delete this['grid'],delete this['particles'];}['toGridXY'](_0x4d179c,_0x3f3120){const _0x2ecbe0=_0x92baec,_0x2bdcb3=(_0x4d179c-this[_0x2ecbe0(0x9c)])/(this[_0x2ecbe0(0x110)]-this['xmin'])*(this[_0x2ecbe0(0xd2)]-0x1),_0x2484bb=(this['ymax']-_0x3f3120)/(this[_0x2ecbe0(0xc4)]-this['ymin'])*(this['rows']-0x1);return[_0x2bdcb3,_0x2484bb];}['getUVByXY'](_0x5d3025,_0x3d2473){const _0x51a771=_0x92baec;if(_0x5d3025<0x0||_0x5d3025>=this['cols']||_0x3d2473>=this['rows'])return[0x0,0x0,0x0];const _0x145354=Math[_0x51a771(0x12f)](_0x5d3025),_0x453318=Math['floor'](_0x3d2473);if(_0x145354===_0x5d3025&&_0x453318===_0x3d2473)return this['grid'][_0x3d2473][_0x5d3025];const _0x260e26=_0x145354+0x1,_0x42f7de=_0x453318+0x1,_0x156169=this[_0x51a771(0x11d)](_0x145354,_0x453318),_0x329f8a=this['getUVByXY'](_0x260e26,_0x453318),_0x4d364a=this['getUVByXY'](_0x145354,_0x42f7de),_0x5e09ec=this['getUVByXY'](_0x260e26,_0x42f7de);let _0x555f77=null;try{_0x555f77=this['_bilinearInterpolation'](_0x5d3025-_0x145354,_0x3d2473-_0x453318,_0x156169,_0x329f8a,_0x4d364a,_0x5e09ec);}catch(_0x31dd17){console['log'](_0x5d3025,_0x3d2473);}return _0x555f77;}['_bilinearInterpolation'](_0x9517a8,_0x37b9ac,_0x484c2c,_0x4d83c6,_0x8f835c,_0x1eeea9){const _0x19c665=0x1-_0x9517a8,_0x4aa4ab=0x1-_0x37b9ac,_0x10b1bd=_0x19c665*_0x4aa4ab,_0x431b26=_0x9517a8*_0x4aa4ab,_0x23d257=_0x19c665*_0x37b9ac,_0x2d11a1=_0x9517a8*_0x37b9ac,_0x563da0=_0x484c2c[0x0]*_0x10b1bd+_0x4d83c6[0x0]*_0x431b26+_0x8f835c[0x0]*_0x23d257+_0x1eeea9[0x0]*_0x2d11a1,_0x263739=_0x484c2c[0x1]*_0x10b1bd+_0x4d83c6[0x1]*_0x431b26+_0x8f835c[0x1]*_0x23d257+_0x1eeea9[0x1]*_0x2d11a1;return this['_calcUV'](_0x563da0,_0x263739);}['_calcUV'](_0x285b53,_0x55b4a0){return[+_0x285b53,+_0x55b4a0,Math['sqrt'](_0x285b53*_0x285b53+_0x55b4a0*_0x55b4a0)];}['getUVByPoint'](_0x734826,_0x11d52f){const _0x3f9705=_0x92baec;if(!this[_0x3f9705(0xc6)](_0x734826,_0x11d52f))return null;const _0x2ba018=this['toGridXY'](_0x734826,_0x11d52f),_0x4f3744=this['getUVByXY'](_0x2ba018[0x0],_0x2ba018[0x1]);return _0x4f3744;}['isInExtent'](_0x5c4f63,_0x12cad4){const _0x492235=_0x92baec;return _0x5c4f63>=this['xmin']&&_0x5c4f63<=this['xmax']&&_0x12cad4>=this['ymin']&&_0x12cad4<=this[_0x492235(0xc4)]?!![]:![];}['getRandomLatLng'](){const _0x3700d8=_0x92baec,_0x1f55f5=fRandomByfloat(this[_0x3700d8(0x9c)],this[_0x3700d8(0x110)]),_0x3a62f0=fRandomByfloat(this['ymin'],this[_0x3700d8(0xc4)]);return{'lat':_0x3a62f0,'lng':_0x1f55f5};}['getParticles'](){const _0x1ae94a=_0x92baec;let _0x3744a1,_0xf4c04,_0x5abefb;for(let _0x2cba4c=0x0,_0x3bcaef=this['particles']['length'];_0x2cba4c<_0x3bcaef;_0x2cba4c++){let _0x336bca=this['particles'][_0x2cba4c];_0x336bca['age']<=0x0&&(_0x336bca=this['_randomParticle'](_0x336bca));if(_0x336bca[_0x1ae94a(0xf3)]>0x0){const _0x48e6d3=_0x336bca['tlng'],_0x2453a7=_0x336bca['tlat'];_0x5abefb=this['getUVByPoint'](_0x48e6d3,_0x2453a7),_0x5abefb?(_0x3744a1=_0x48e6d3+this[_0x1ae94a(0xff)][0x0]*_0x5abefb[0x0],_0xf4c04=_0x2453a7+this['_calc_speedRate'][0x1]*_0x5abefb[0x1],_0x336bca['lng']=_0x48e6d3,_0x336bca['lat']=_0x2453a7,_0x336bca['tlng']=_0x3744a1,_0x336bca[_0x1ae94a(0xf1)]=_0xf4c04,_0x336bca['speed']=_0x5abefb[0x2],_0x336bca['age']--):_0x336bca['age']=0x0;}}return this['particles'];}[_0x92baec(0x13e)](_0x18907e){const _0x40cbb2=_0x92baec;let _0x29d72e,_0x11ea83;for(let _0x4d9007=0x0;_0x4d9007<0x1e;_0x4d9007++){_0x29d72e=this['getRandomLatLng'](),_0x11ea83=this['getUVByPoint'](_0x29d72e['lng'],_0x29d72e[_0x40cbb2(0xf9)]);if(_0x11ea83&&_0x11ea83[0x2]>0x0)break;}if(!_0x11ea83)return _0x18907e;const _0x16f85d=_0x29d72e[_0x40cbb2(0xcc)]+this[_0x40cbb2(0xff)][0x0]*_0x11ea83[0x0],_0x53636d=_0x29d72e[_0x40cbb2(0xf9)]+this[_0x40cbb2(0xff)][0x1]*_0x11ea83[0x1];return _0x18907e[_0x40cbb2(0xcc)]=_0x29d72e['lng'],_0x18907e[_0x40cbb2(0xf9)]=_0x29d72e[_0x40cbb2(0xf9)],_0x18907e['tlng']=_0x16f85d,_0x18907e['tlat']=_0x53636d,_0x18907e['age']=Math['round'](0xa+Math['random']()*this['maxAge']),_0x18907e[_0x40cbb2(0x154)]=_0x11ea83[0x2],_0x18907e;}[_0x92baec(0x157)](){for(const _0x511824 in this){delete this[_0x511824];}}}function fRandomByfloat(_0x4caedb,_0x1b25d2){return _0x4caedb+Math['random']()*(_0x1b25d2-_0x4caedb);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x92baec(0x14c)]['BaseLayer'];class CanvasWindLayer extends BaseLayer{constructor(_0x1484d9={}){const _0x121b90=_0x92baec;super(_0x1484d9),this['_setOptionsHook'](_0x1484d9),this['canvas']=null,_0x1484d9['colors']&&_0x1484d9[_0x121b90(0xc0)]&&(this['_colorRamp']=new mars3d__namespace[(_0x121b90(0x127))](_0x1484d9));}['_setOptionsHook'](_0x147bb4,_0x22aa0d){const _0x29c73b=_0x92baec;this[_0x29c73b(0xfc)]=0x3e8/(_0x147bb4['frameRate']||0xa),this[_0x29c73b(0x12d)]=this['options'][_0x29c73b(0xf6)]??![],this['color']=_0x147bb4['color']||'#ffffff',this[_0x29c73b(0x91)]=_0x147bb4['lineWidth']||0x1,this[_0x29c73b(0xfd)]=_0x147bb4[_0x29c73b(0xfd)]??0x0,this['flipY']=_0x147bb4['flipY']??![],this['windField']&&this['windField']['setOptions'](_0x147bb4);}get['layer'](){const _0xa45fa2=_0x92baec;return this[_0xa45fa2(0x108)];}get[_0x92baec(0x158)](){return this['_map']['scene']['canvas']['clientWidth'];}get['canvasHeight'](){const _0x1b7ff3=_0x92baec;return this[_0x1b7ff3(0x155)][_0x1b7ff3(0x98)]['canvas']['clientHeight'];}get[_0x92baec(0xf6)](){const _0x163773=_0x92baec;return this[_0x163773(0x12d)];}set[_0x92baec(0xf6)](_0x175c09){const _0x519396=_0x92baec;this['_pointerEvents']=_0x175c09;if(!this[_0x519396(0x108)])return;_0x175c09?this['canvas'][_0x519396(0xec)]['pointer-events']='all':this['canvas'][_0x519396(0xec)]['pointer-events']='none';}get['particlesNumber'](){const _0x1f1a4f=_0x92baec;return this[_0x1f1a4f(0xb7)]['particlesNumber'];}set['particlesNumber'](_0x32381e){const _0x23e6fd=_0x92baec;this['options']['particlesNumber']=_0x32381e,clearTimeout(this[_0x23e6fd(0x123)]),this[_0x23e6fd(0x123)]=setTimeout(()=>{const _0x1ffb6d=_0x23e6fd;this[_0x1ffb6d(0xd6)]();},0x1f4);}get['speedRate'](){return this['options']['speedRate'];}set['speedRate'](_0x253c7c){const _0xeb7d34=_0x92baec;this['options']['speedRate']=_0x253c7c,this[_0xeb7d34(0xb3)]&&(this['windField'][_0xeb7d34(0xf5)]=_0x253c7c);}get[_0x92baec(0xf2)](){const _0x1a42be=_0x92baec;return this['options'][_0x1a42be(0xf2)];}set['maxAge'](_0x59838b){this['options']['maxAge']=_0x59838b,this['windField']&&(this['windField']['maxAge']=_0x59838b);}get[_0x92baec(0xf8)](){const _0x4f6283=_0x92baec;return this[_0x4f6283(0xea)];}set['data'](_0x3c41e7){this['setData'](_0x3c41e7);}get['rectangle'](){const _0xc68776=_0x92baec;let _0x2d0d0b=this['windData']['xmin'],_0x56d6d1=this['windData'][_0xc68776(0x110)],_0x2bc1e2=this['windData']['ymin'],_0x3889c7=this['windData']['ymax'];return _0x56d6d1>=0x167&&_0x2d0d0b===0x0&&(_0x2d0d0b=-0xb4,_0x56d6d1=0xb4),_0x2d0d0b=Math['max'](_0x2d0d0b,-0xb4),_0x56d6d1=Math['min'](_0x56d6d1,0xb4),_0x2bc1e2=Math['max'](_0x2bc1e2,-0x5a),_0x3889c7=Math['min'](_0x3889c7,0x5a),Cesium[_0xc68776(0x130)]['fromDegrees'](_0x2d0d0b,_0x2bc1e2,_0x56d6d1,_0x3889c7);}['_showHook'](_0x2aaf7f){const _0x3c084e=_0x92baec;_0x2aaf7f?this['_addedHook']():(this['windData']&&(this[_0x3c084e(0xb7)][_0x3c084e(0xf8)]=this[_0x3c084e(0xea)]),this['_removedHook']());}['_mountedHook'](){const _0x83eaaf=_0x92baec;this[_0x83eaaf(0xb7)]['worker']?this['initWorker']():this[_0x83eaaf(0xb3)]=new CanvasWindField(this[_0x83eaaf(0xb7)]);}['_addedHook'](){const _0x811ef2=_0x92baec;this[_0x811ef2(0x108)]=this[_0x811ef2(0x11e)](),this['canvasContext']=this['canvas']['getContext']('2d',{'willReadFrequently':!![]}),this['bindEvent'](),this['options']['data']&&this['setData'](this['options']['data']);}[_0x92baec(0x121)](){const _0x4b5efc=_0x92baec;this['clear'](),this['unbindEvent'](),this['canvas']&&(this['_map']['container'][_0x4b5efc(0x116)](this['canvas']),delete this['canvas']);}[_0x92baec(0x11e)](){const _0x5035b9=_0x92baec,_0x2583d0=mars3d__namespace['DomUtil'][_0x5035b9(0xbc)](_0x5035b9(0x108),'mars3d-canvasWind',this['_map']['container']);return _0x2583d0['style'][_0x5035b9(0xc2)]=_0x5035b9(0x15c),_0x2583d0['style']['top']='0px',_0x2583d0['style']['left']=_0x5035b9(0x139),_0x2583d0['style']['width']=this[_0x5035b9(0x155)]['scene']['canvas']['clientWidth']+'px',_0x2583d0['style']['height']=this['_map']['scene'][_0x5035b9(0x108)]['clientHeight']+'px',_0x2583d0['style']['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x2583d0['style']['zIndex']=this[_0x5035b9(0xb7)][_0x5035b9(0xa5)]??0x9,_0x2583d0[_0x5035b9(0x132)]=this['_map']['scene'][_0x5035b9(0x108)][_0x5035b9(0x131)],_0x2583d0['height']=this['_map']['scene'][_0x5035b9(0x108)]['clientHeight'],_0x2583d0;}['resize'](){const _0xd035f1=_0x92baec;this[_0xd035f1(0x108)]&&(this[_0xd035f1(0x108)]['style']['width']=this['_map'][_0xd035f1(0x98)]['canvas']['clientWidth']+'px',this[_0xd035f1(0x108)]['style']['height']=this['_map']['scene']['canvas'][_0xd035f1(0x12a)]+'px',this['canvas']['width']=this[_0xd035f1(0x155)][_0xd035f1(0x98)]['canvas']['clientWidth'],this['canvas']['height']=this['_map']['scene'][_0xd035f1(0x108)]['clientHeight']);}['bindEvent'](){const _0x59afdc=_0x92baec,_0x40a748=this;let _0x12d49f=Date['now']();(function _0x5b5b25(){const _0x4c86dc=_0x1b21;if(_0x40a748['isDestroy'])return;_0x40a748[_0x4c86dc(0x122)]=window['requestAnimationFrame'](_0x5b5b25);if(_0x40a748['show']&&_0x40a748['windField']){const _0x259e5e=Date['now'](),_0x25d233=_0x259e5e-_0x12d49f;_0x25d233>_0x40a748[_0x4c86dc(0xfc)]&&(_0x12d49f=_0x259e5e-_0x25d233%_0x40a748['frameTime'],_0x40a748['update']());}}(),window['addEventListener']('resize',this['resize']['bind'](this),![]),this['mouse_down']=![],this['mouse_move']=![],this['options']['mouseHidden']&&(this[_0x59afdc(0x155)]['on'](mars3d__namespace['EventType'][_0x59afdc(0x15a)],this[_0x59afdc(0x13f)],this),this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['on'](mars3d__namespace[_0x59afdc(0xa1)]['mouseUp'],this['_onMouseUpEvent'],this)));}['unbindEvent'](){const _0x537b8d=_0x92baec;window['cancelAnimationFrame'](this[_0x537b8d(0x122)]),delete this['_animateFrame'],window['removeEventListener']('resize',this['resize']),this['options']['mouseHidden']&&(this[_0x537b8d(0x155)][_0x537b8d(0xce)](mars3d__namespace['EventType']['wheel'],this['_onMapWhellEvent'],this),this['_map']['off'](mars3d__namespace[_0x537b8d(0xa1)]['mouseDown'],this['_onMouseDownEvent'],this),this['_map']['off'](mars3d__namespace[_0x537b8d(0xa1)]['mouseUp'],this[_0x537b8d(0x120)],this),this[_0x537b8d(0x155)]['off'](mars3d__namespace[_0x537b8d(0xa1)]['mouseMove'],this[_0x537b8d(0x104)],this));}['_onMapWhellEvent'](_0x713998){const _0x32fea9=_0x92baec;clearTimeout(this['refreshTimer']);if(!this[_0x32fea9(0x15e)]||!this['canvas'])return;this[_0x32fea9(0x108)]['style']['visibility']=_0x32fea9(0x128),this[_0x32fea9(0xc3)]=setTimeout(()=>{const _0x47a6be=_0x32fea9;if(!this[_0x47a6be(0x15e)])return;this[_0x47a6be(0xd6)](),this['canvas']['style'][_0x47a6be(0xcb)]='visible';},0xc8);}['_onMouseDownEvent'](_0x345c59){const _0x5215d9=_0x92baec;this['mouse_down']=!![],this['_map']['off'](mars3d__namespace['EventType']['mouseMove'],this['_onMouseMoveEvent'],this),this[_0x5215d9(0x155)]['on'](mars3d__namespace['EventType'][_0x5215d9(0x106)],this['_onMouseMoveEvent'],this);}[_0x92baec(0x104)](_0x4ba369){const _0x1dd092=_0x92baec;if(!this[_0x1dd092(0x15e)]||!this[_0x1dd092(0x108)])return;this['mouse_down']&&(this['canvas']['style']['visibility']='hidden',this[_0x1dd092(0x93)]=!![]);}[_0x92baec(0x120)](_0xb91c7c){const _0x314c05=_0x92baec;if(!this['show']||!this['canvas'])return;this['_map'][_0x314c05(0xce)](mars3d__namespace['EventType']['mouseMove'],this[_0x314c05(0x104)],this),this['mouse_down']&&this['mouse_move']&&this['redraw'](),this['canvas']['style'][_0x314c05(0xcb)]='visible',this['mouse_down']=![],this[_0x314c05(0x93)]=![];}['setData'](_0x8f771c){const _0x2a2a1e=_0x92baec;this['clear'](),this[_0x2a2a1e(0xea)]=_0x8f771c,this['windField']['setDate'](_0x8f771c),this[_0x2a2a1e(0xd6)]();}['redraw'](){const _0x2a7f93=_0x92baec;if(!this['show'])return;this['windField']['setOptions'](this['options']),this[_0x2a7f93(0x113)]();}[_0x92baec(0x113)](){const _0x292e08=_0x92baec;if(this['_updateIng'])return;this[_0x292e08(0x9f)]=!![];if(this['worker'])this[_0x292e08(0xb3)]['update']();else{const _0x5abf87=this['windField']['getParticles']();this['_drawLines'](_0x5abf87);}this[_0x292e08(0x9f)]=![];}[_0x92baec(0xbd)](_0x32a9dc){const _0x37ae71=_0x92baec;this['_canvasParticles']=_0x32a9dc,this['canvasContext']['globalCompositeOperation']='destination-in',this['canvasContext']['fillRect'](0x0,0x0,this['canvasWidth'],this['canvasHeight']),this['canvasContext']['globalCompositeOperation']=_0x37ae71(0x9d),this['canvasContext'][_0x37ae71(0xae)]=0.9;const _0x9fa4a1=this['_map'][_0x37ae71(0x98)]['mode']!==Cesium['SceneMode']['SCENE3D'],_0x85d898=this['canvasWidth']*0.25;if(this['_colorRamp'])for(let _0x2a4ce2=0x0,_0x257941=_0x32a9dc['length'];_0x2a4ce2<_0x257941;_0x2a4ce2++){const _0x3376df=_0x32a9dc[_0x2a4ce2],_0x315ef=this[_0x37ae71(0x14f)](_0x3376df,_0x3376df['lng'],_0x3376df[_0x37ae71(0xf9)],_0x3376df['alt']),_0x36a517=this[_0x37ae71(0x14f)](_0x3376df,_0x3376df[_0x37ae71(0x105)],_0x3376df[_0x37ae71(0xf1)],_0x3376df['talt']);if(!_0x315ef||!_0x36a517)continue;if(_0x9fa4a1&&Math[_0x37ae71(0x147)](_0x315ef[0x0]-_0x36a517[0x0])>=_0x85d898)continue;this['canvasContext']['beginPath'](),this['canvasContext']['lineWidth']=this['lineWidth'],this['canvasContext']['strokeStyle']=this['_colorRamp']['getColor'](_0x3376df['speed']),this['canvasContext']['moveTo'](_0x315ef[0x0],_0x315ef[0x1]),this['canvasContext'][_0x37ae71(0x151)](_0x36a517[0x0],_0x36a517[0x1]),this['canvasContext']['stroke']();}else{this['canvasContext']['beginPath'](),this[_0x37ae71(0x148)][_0x37ae71(0x91)]=this['lineWidth'],this['canvasContext'][_0x37ae71(0xba)]=this['color'];for(let _0x4aa921=0x0,_0x5eed7b=_0x32a9dc['length'];_0x4aa921<_0x5eed7b;_0x4aa921++){const _0x39359b=_0x32a9dc[_0x4aa921],_0x3d671c=this['_tomap'](_0x39359b,_0x39359b['lng'],_0x39359b['lat'],_0x39359b[_0x37ae71(0x15f)]),_0xe2a62e=this[_0x37ae71(0x14f)](_0x39359b,_0x39359b['tlng'],_0x39359b['tlat'],_0x39359b['talt']);if(!_0x3d671c||!_0xe2a62e)continue;if(_0x9fa4a1&&Math['abs'](_0x3d671c[0x0]-_0xe2a62e[0x0])>=_0x85d898)continue;this['canvasContext']['moveTo'](_0x3d671c[0x0],_0x3d671c[0x1]),this[_0x37ae71(0x148)]['lineTo'](_0xe2a62e[0x0],_0xe2a62e[0x1]);}this['canvasContext'][_0x37ae71(0xdf)]();}}['_tomap'](_0x3de354,_0x18c453,_0x4b220f,_0x249a50){const _0x23f384=_0x92baec,_0x41c4f4=Cesium['Cartesian3']['fromDegrees'](_0x18c453,_0x4b220f,_0x249a50??this[_0x23f384(0xfd)]),_0x5a8080=this['_map']['scene'];if(_0x5a8080['mode']===Cesium['SceneMode']['SCENE3D']){const _0x502a65=new Cesium['EllipsoidalOccluder'](_0x5a8080[_0x23f384(0x159)]['ellipsoid'],_0x5a8080['camera'][_0x23f384(0x96)]),_0x4cbe5e=_0x502a65['isPointVisible'](_0x41c4f4);if(!_0x4cbe5e)return _0x3de354[_0x23f384(0xf3)]=0x0,null;}const _0x4989ae=mars3d__namespace['PointTrans']['toWindowCoordinates'](this['_map']['scene'],_0x41c4f4);return _0x4989ae?[_0x4989ae['x'],_0x4989ae['y']]:null;}['clear'](){this['windField']['clear'](),delete this['windData'];}['initWorker'](){const _0x4bdb32=_0x92baec;this['worker']=new Worker(this['options'][_0x4bdb32(0x10d)]),this['worker']['onmessage']=_0x3f1e3c=>{const _0x3018a6=_0x4bdb32;this['_drawLines'](_0x3f1e3c['data'][_0x3018a6(0xda)]),this[_0x3018a6(0xb5)]=![];},this['windField']={'init':_0x257a64=>{this['worker']['postMessage']({'type':'init','options':_0x257a64});},'setOptions':_0x5d0c94=>{const _0x10dfdd=_0x4bdb32;this[_0x10dfdd(0x10d)][_0x10dfdd(0xd7)]({'type':'setOptions','options':_0x5d0c94});},'setDate':_0x44e279=>{this['worker']['postMessage']({'type':'setDate','data':_0x44e279});},'update':()=>{const _0xad4c10=_0x4bdb32;if(this[_0xad4c10(0xb5)])return;this['_updateIng2']=!![],this['worker']['postMessage']({'type':_0xad4c10(0x113)});},'clear':()=>{const _0xfdfce2=_0x4bdb32;this[_0xfdfce2(0x10d)]['postMessage']({'type':'clear'});}},this['windField']['init'](this['options']);}}mars3d__namespace['LayerUtil']['register']('canvasWind',CanvasWindLayer),mars3d__namespace['layer']['CanvasWindLayer']=CanvasWindLayer,mars3d__namespace['CanvasWindField']=CanvasWindField,mars3d__namespace['WindUtil']=WindUtil,exports[_0x92baec(0x119)]=CanvasWindField,exports['CanvasWindLayer']=CanvasWindLayer,exports['WindLayer']=WindLayer,exports['WindUtil']=WindUtil,Object[_0x92baec(0xe2)](exports,'__esModule',{'value':!![]});
}));