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

16 lines
80 KiB
JavaScript
Raw Permalink Normal View History

/**
* Mars3D平台插件,支持气象 风向图 功能插件 mars3d-wind
*
* 版本信息v3.7.3
* 编译日期2024-02-05 13:29:13
* 版权所有Copyright by 火星科技 http://mars3d.cn
* 使用单位免费公开版 2024-01-15
*/
(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 _0x3fd775=_0x35e7;(function(_0x46fd85,_0x4dc0d9){const _0x36ae32=_0x35e7,_0x2fd198=_0x46fd85();while(!![]){try{const _0x16e866=parseInt(_0x36ae32(0x212))/0x1+-parseInt(_0x36ae32(0x206))/0x2*(parseInt(_0x36ae32(0x215))/0x3)+parseInt(_0x36ae32(0x27a))/0x4*(parseInt(_0x36ae32(0x295))/0x5)+parseInt(_0x36ae32(0x2a0))/0x6*(parseInt(_0x36ae32(0x219))/0x7)+-parseInt(_0x36ae32(0x2b9))/0x8*(parseInt(_0x36ae32(0x2aa))/0x9)+parseInt(_0x36ae32(0x24e))/0xa*(-parseInt(_0x36ae32(0x2e1))/0xb)+parseInt(_0x36ae32(0x247))/0xc*(parseInt(_0x36ae32(0x27c))/0xd);if(_0x16e866===_0x4dc0d9)break;else _0x2fd198['push'](_0x2fd198['shift']());}catch(_0x411739){_0x2fd198['push'](_0x2fd198['shift']());}}}(_0x3adb,0xbe343));function _interopNamespace(_0x34263b){if(_0x34263b&&_0x34263b['__esModule'])return _0x34263b;var _0x2eb2eb=Object['create'](null);return _0x34263b&&Object['keys'](_0x34263b)['forEach'](function(_0x373d47){const _0x25764c=_0x35e7;if(_0x373d47!==_0x25764c(0x26d)){var _0x47b6c0=Object[_0x25764c(0x241)](_0x34263b,_0x373d47);Object[_0x25764c(0x2d5)](_0x2eb2eb,_0x373d47,_0x47b6c0[_0x25764c(0x284)]?_0x47b6c0:{'enumerable':!![],'get':function(){return _0x34263b[_0x373d47];}});}}),_0x2eb2eb['default']=_0x34263b,_0x2eb2eb;}var mars3d__namespace=_interopNamespace(mars3d);const Cesium$7=mars3d__namespace['Cesium'];function getU(_0x39d31c,_0x49d8c4){const _0x9fa55d=_0x35e7,_0x19418b=_0x39d31c*Math[_0x9fa55d(0x286)](Cesium$7['Math']['toRadians'](_0x49d8c4));return _0x19418b;}function getV(_0x258727,_0x3f0b1d){const _0x4de3ae=_0x35e7,_0x2ed739=_0x258727*Math[_0x4de3ae(0x216)](Cesium$7['Math'][_0x4de3ae(0x254)](_0x3f0b1d));return _0x2ed739;}function getSpeed(_0x179f22,_0x22326f){const _0x26396a=_0x35e7,_0x15d0cc=Math[_0x26396a(0x291)](Math[_0x26396a(0x227)](_0x179f22,0x2)+Math['pow'](_0x22326f,0x2));return _0x15d0cc;}function getDirection(_0x361df9,_0x1ba0e0){const _0x39a67a=_0x35e7;let _0xc8725a=Cesium$7[_0x39a67a(0x211)]['toDegrees'](Math['atan2'](_0x1ba0e0,_0x361df9));return _0xc8725a+=_0xc8725a<0x0?0x168:0x0,_0xc8725a;}var WindUtil={'__proto__':null,'getU':getU,'getV':getV,'getSpeed':getSpeed,'getDirection':getDirection};const Cesium$6=mars3d__namespace[_0x3fd775(0x2c9)];class CustomPrimitive{constructor(_0x4b3cb2){const _0x3465aa=_0x3fd775;this['commandType']=_0x4b3cb2['commandType'],this[_0x3465aa(0x1fe)]=_0x4b3cb2['geometry'],this['attributeLocations']=_0x4b3cb2['attributeLocations'],this['primitiveType']=_0x4b3cb2['primitiveType'],this['uniformMap']=_0x4b3cb2['uniformMap'],this['vertexShaderSource']=_0x4b3cb2['vertexShaderSource'],this['fragmentShaderSource']=_0x4b3cb2['fragmentShaderSource'],this['rawRenderState']=_0x4b3cb2['rawRenderState'],this['framebuffer']=_0x4b3cb2['framebuffer'],this['outputTexture']=_0x4b3cb2[_0x3465aa(0x288)],this[_0x3465aa(0x2bc)]=_0x4b3cb2[_0x3465aa(0x2bc)]??![],this['preExecute']=_0x4b3cb2['preExecute'],this[_0x3465aa(0x24b)]=!![],this['commandToExecute']=undefined,this['clearCommand']=undefined,this['autoClear']&&(this['clearCommand']=new Cesium$6['ClearCommand']({'color':new Cesium$6['Color'](0x0,0x0,0x0,0x0),'depth':0x1,'framebuffer':this['framebuffer'],'pass':Cesium$6['Pass']['OPAQUE']}));}[_0x3fd775(0x2c8)](_0x551de3){const _0x29f5e6=_0x3fd775;switch(this['commandType']){case _0x29f5e6(0x2c2):{const _0x193c77=Cesium$6['VertexArray']['fromGeometry']({'context':_0x551de3,'geometry':this['geometry'],'attributeLocations':this[_0x29f5e6(0x2ae)],'bufferUsage':Cesium$6['BufferUsage']['STATIC_DRAW']}),_0x39d2d6=Cesium$6['ShaderProgram']['fromCache']({'context':_0x551de3,'attributeLocations':this['attributeLocations'],'vertexShaderSource':this[_0x29f5e6(0x242)],'fragmentShaderSource':this[_0x29f5e6(0x1fd)]}),_0x2f317e=Cesium$6['RenderState'][_0x29f5e6(0x29c)](this['rawRenderState']);return new Cesium$6['DrawCommand']({'primitiveType':this['primitiveType'],'shaderProgram':_0x39d2d6,'vertexArray':_0x193c77,'modelMatrix':Cesium$6['Matrix4']['IDENTITY'],'renderState':_0x2f317e,'uniformMap':this['uniformMap'],'castShadows':![],'receiveShadows':![],'framebuffer':this['framebuffer'],'pass':Cesium$6['Pas
}));