UNPKG

bytev-charts

Version:

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

49 lines (45 loc) 1.85 kB
import _Object$assign from "@babel/runtime-corejs2/core-js/object/assign"; import _Object$create from "@babel/runtime-corejs2/core-js/object/create"; console.warn("THREE.VRMLoader: As part of the transition to ES6 Modules, the files in 'examples/js' were deprecated in May 2020 (r117) and will be deleted in December 2020 (r124). You can find more information about developing using ES6 Modules in https://threejs.org/docs/#manual/en/introduction/Installation."); // VRM Specification: https://dwango.github.io/vrm/vrm_spec/ // // VRM is based on glTF 2.0 and VRM extension is defined // in top-level json.extensions.VRM THREE.VRMLoader = function () { function VRMLoader(manager) { if (THREE.GLTFLoader === undefined) { throw new Error('THREE.VRMLoader: Import THREE.GLTFLoader.'); } THREE.Loader.call(this, manager); this.gltfLoader = new THREE.GLTFLoader(this.manager); } VRMLoader.prototype = _Object$assign(_Object$create(THREE.Loader.prototype), { constructor: VRMLoader, load: function load(url, onLoad, onProgress, onError) { var scope = this; this.gltfLoader.load(url, function (gltf) { try { scope.parse(gltf, onLoad); } catch (e) { if (onError) { onError(e); } else { console.error(e); } scope.manager.itemError(url); } }, onProgress, onError); }, setDRACOLoader: function setDRACOLoader(dracoLoader) { this.gltfLoader.setDRACOLoader(dracoLoader); return this; }, parse: function parse(gltf, onLoad) { // var gltfParser = gltf.parser; // var gltfExtensions = gltf.userData.gltfExtensions || {}; // var vrmExtension = gltfExtensions.VRM || {}; // handle VRM Extension here onLoad(gltf); } }); return VRMLoader; }();