UNPKG

bytev-charts

Version:

基于echarts和JavaScript及ES6封装的一个可以直接调用的图表组件库,内置主题设计,简单快捷,且支持用户自定义配置; npm 安装方式: npm install bytev-charts 若启动提示还需额外install插件,则运行 npm install @babel/runtime-corejs2 即可;

127 lines (103 loc) 3.73 kB
import _classCallCheck from "@babel/runtime-corejs2/helpers/classCallCheck"; import _createClass from "@babel/runtime-corejs2/helpers/createClass"; import _defineProperty from "@babel/runtime-corejs2/helpers/defineProperty"; import AxesHelper from "./component/helper/AxesHelper.class.js"; import GridHelper from "./component/helper/GridHelper.class.js"; import Sun from "./component/light/Sun.class.js"; import AmbientLight from "./component/light/AmbientLight.class.js"; import LoadModel from "./component/LoadModel.class.js"; import SkyBall from "./component/sky/SkyBall.class.js"; import Floor from "./component/floor/Floor.class.js"; import Liftoff from "./component/effect/Liftoff.class.js"; import Diffusion from "./component/effect/Diffusion.class.js"; import CircleRound from "./component/effect/CircleRound.class.js"; import ewsn from "./component/ewsn/ewsn.class.js"; import Rain from "./component/weather/impl/Rain.class.js"; import Snow from "./component/weather/impl/Snow.class.js"; import Map from "./component/map/Map.class.js"; /* * three组件对象工厂<br> * 负责创建three场景中的各个子对象(如:太阳、地面、升空、扩散等) * */ var ComponentFactory = /*#__PURE__*/function () { /* * 构造器 * @param {Object} option 包含场景、相机、渲染器、轨道控制器 * */ function ComponentFactory() { var threeComponentThis = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, ComponentFactory); _defineProperty(this, "threeComponentThis", { //three场景 scene: null, //three相机 camera: null, //three渲染器 renderer: null, //轨道控制器 controls: null }); this.threeComponentThis = threeComponentThis; } _createClass(ComponentFactory, [{ key: "getComponent", value: function getComponent(componentName) { var component = null; switch (componentName) { case 'helper': component = new Helper(this.threeComponentThis); break; case 'sun': case 'theSun': component = new Sun(this.threeComponentThis); break; case 'ambientLight': component = new AmbientLight(this.threeComponentThis); break; case 'loadModel': component = new LoadModel(this.threeComponentThis); break; case 'skyBall': component = new SkyBall(this.threeComponentThis); break; case 'axesHelper': component = new AxesHelper(this.threeComponentThis); break; case 'gridHelper': component = new GridHelper(this.threeComponentThis); break; case 'floor': component = new Floor(this.threeComponentThis); break; case 'liftoff': component = new Liftoff(this.threeComponentThis); break; case 'diffusion': component = new Diffusion(this.threeComponentThis); break; case 'circleRound': component = new CircleRound(this.threeComponentThis); break; case 'ewsn': case 'orientation': component = new ewsn(this.threeComponentThis); break; case 'rain': component = new Rain(this.threeComponentThis); break; case 'snow': component = new Snow(this.threeComponentThis); break; case 'map': component = new Map(this.threeComponentThis); break; default: component = null; break; } return component; } }]); return ComponentFactory; }(); export { ComponentFactory as default };