lg_frontend/static/libs/mars3d/plugins/wind/mars3d-wind-worker.js

16 lines
8.4 KiB
JavaScript
Raw Permalink Normal View History

/**
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
*
* 版本信息v3.6.1
* 编译日期2023-08-14 21:01:55
* 版权所有Copyright by 火星科技 http://mars3d.cn
* 使用单位免费公开版 2023-03-17
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-wind"] = {}));
})(this, (function (exports) {
'use strict';const _0x5e819d=_0x537a;(function(_0x31b8ab,_0x70c04d){const _0x1ed75c=_0x537a,_0x3a6cb1=_0x31b8ab();while(!![]){try{const _0x4d118e=-parseInt(_0x1ed75c(0x180))/0x1*(-parseInt(_0x1ed75c(0x1a0))/0x2)+-parseInt(_0x1ed75c(0x18f))/0x3+parseInt(_0x1ed75c(0x193))/0x4*(parseInt(_0x1ed75c(0x190))/0x5)+-parseInt(_0x1ed75c(0x17e))/0x6*(-parseInt(_0x1ed75c(0x196))/0x7)+-parseInt(_0x1ed75c(0x1a3))/0x8*(-parseInt(_0x1ed75c(0x198))/0x9)+-parseInt(_0x1ed75c(0x185))/0xa*(-parseInt(_0x1ed75c(0x197))/0xb)+-parseInt(_0x1ed75c(0x19c))/0xc;if(_0x4d118e===_0x70c04d)break;else _0x3a6cb1['push'](_0x3a6cb1['shift']());}catch(_0x89e314){_0x3a6cb1['push'](_0x3a6cb1['shift']());}}}(_0x6287,0x34b2c));function _0x537a(_0x5505bb,_0x59e38b){const _0x62870f=_0x6287();return _0x537a=function(_0x537a01,_0x2dc1b7){_0x537a01=_0x537a01-0x17e;let _0x1cd55a=_0x62870f[_0x537a01];return _0x1cd55a;},_0x537a(_0x5505bb,_0x59e38b);}function _0x6287(){const _0x83a214=['33938MtDWIm','getUVByXY','setOptions','18272egTfSh','particles','getParticles','random','push','115572uglyFO','grid','11Ouygme','xmin','particlesNumber','ymax','age','13150BVOFes','cols','destroy','rows','ymin','defineProperty','_speedRate','toGridXY','reverseY','lat','138348nawBKG','1343130NruaHn','lng','vdata','4qQZumV','round','_calc_speedRate','70OnatPz','649FnzjIZ','603NjsTyV','length','_calcUV','tlat','7398600GUWjXQ','maxAge','speedRate','tlng'];_0x6287=function(){return _0x83a214;};return _0x6287();}class CanvasParticle{constructor(){const _0x8ef4=_0x537a;this['lng']=null,this[_0x8ef4(0x18e)]=null,this[_0x8ef4(0x19f)]=null,this['tlat']=null,this[_0x8ef4(0x184)]=null,this['speed']=null;}[_0x5e819d(0x187)](){for(const _0x4da5d8 in this){delete this[_0x4da5d8];}}}class CanvasWindField{constructor(_0x3e9853){const _0x30bc7e=_0x5e819d;this[_0x30bc7e(0x1a2)](_0x3e9853);}get[_0x5e819d(0x19e)](){const _0xfa0d10=_0x5e819d;return this[_0xfa0d10(0x18b)];}set['speedRate'](_0x337bae){const _0x5cad3b=_0x5e819d;this[_0x5cad3b(0x18b)]=(0x64-(_0x337bae>0x63?0x63:_0x337bae))*0x64,this['_calc_speedRate']=[(this['xmax']-this['xmin'])/this['_speedRate'],(this['ymax']-this['ymin'])/this['_speedRate']];}get['maxAge'](){return this['_maxAge'];}set[_0x5e819d(0x19d)](_0x1223ce){this['_maxAge']=_0x1223ce;}['setOptions'](_0xdddc84){const _0x2a2b13=_0x5e819d;this['options']=_0xdddc84,this['maxAge']=_0xdddc84['maxAge']||0x78,this[_0x2a2b13(0x19e)]=_0xdddc84['speedRate']||0x32,this['particles']=[];const _0x4e0e55=_0xdddc84[_0x2a2b13(0x182)]||0x1000;for(let _0x31d651=0x0;_0x31d651<_0x4e0e55;_0x31d651++){const _0x29b81b=this['_randomParticle'](new CanvasParticle());this['particles']['push'](_0x29b81b);}}['setDate'](_0x3e6a90){const _0x5019a0=_0x5e819d;this['rows']=_0x3e6a90[_0x5019a0(0x188)],this['cols']=_0x3e6a90['cols'],this['xmin']=_0x3e6a90[_0x5019a0(0x181)],this['xmax']=_0x3e6a90['xmax'],this[_0x5019a0(0x189)]=_0x3e6a90['ymin'],this[_0x5019a0(0x183)]=_0x3e6a90['ymax'],this[_0x5019a0(0x17f)]=[];const _0x1bb4ec=_0x3e6a90['udata'],_0x58c97f=_0x3e6a90[_0x5019a0(0x192)];let _0x33eff4=![];_0x1bb4ec[_0x5019a0(0x199)]===this['rows']&&_0x1bb4ec[0x0]['length']===this[_0x5019a0(0x186)]&&(_0x33eff4=!![]);let _0x18c7cb=0x0,_0x108122=null,_0x3fb8a4=null;for(let _0x55ad89=0x0;_0x55ad89<this['rows'];_0x55ad89++){_0x108122=[];for(let _0x4fad41=0x0;_0x4fad41<this['cols'];_0x4fad41++,_0x18c7cb++){_0x33eff4?_0x3fb8a4=this[_0x5019a0(0x19a)](_0x1bb4ec[_0x55ad89][_0x4fad41],_0x58c97f[_0x55ad89][_0x4fad41]):_0x3fb8a4=this['_calcUV'](_0x1bb4ec[_0x18c7cb],_0x58c97f[_0x18c7cb]),_0x108122[_0x5019a0(0x1a7)](_0x3fb8a4);}this['grid'][_0x5019a0(0x1a7)](_0x108122);}this['options'][_0x5019a0(0x18d)]&&this['grid']['reverse']();}['clear'](){delete this['rows'],delete this['cols'],delete this['xmin'],delete this['xmax'],delete this['ymin'],delete this['ymax'],delete this['grid'],delete this['particles'];}['toGridXY'](_0x476bb4,_0x4d127e){const _0x288665=_0x5e819d,_0x11f5dd=(_0x476bb4-this[_0x288665(0x181)])/(this['xmax']-this['xmin'])*(this['cols']-0x1),_0x2e2633=(this['ymax']-_0x4d127e)/(this['ymax']-this[_0x288665(0x189)])*(this[_0x288665(0x18
}));