diff --git a/rollup.config.js b/rollup.config.js index 4de726a..2db192a 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -17,7 +17,8 @@ const plugins = [ commonjs(), vue(), buble({ - transforms: { forOf: false }, + // transforms: { forOf: false }, + objectAssign: 'Object.assign', }), ]; diff --git a/src/core/useThree.js b/src/core/useThree.js index 614b917..df6426f 100644 --- a/src/core/useThree.js +++ b/src/core/useThree.js @@ -68,9 +68,9 @@ export default function useThree() { */ function init(params) { if (params) { - for (const [key, value] of Object.entries(params)) { + Object.entries(params).forEach(([key, value]) => { conf[key] = value; - } + }); } if (!obj.scene) { @@ -88,9 +88,9 @@ export default function useThree() { if (conf.orbit_ctrl) { obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement); if (conf.orbit_ctrl instanceof Object) { - for (const [key, value] of Object.entries(conf.orbit_ctrl)) { + Object.entries(conf.orbit_ctrl).forEach(([key, value]) => { obj.orbitCtrl[key] = value; - } + }); } } diff --git a/src/materials/SubSurfaceMaterial.js b/src/materials/SubSurfaceMaterial.js index 347d3be..467327a 100644 --- a/src/materials/SubSurfaceMaterial.js +++ b/src/materials/SubSurfaceMaterial.js @@ -1,6 +1,6 @@ import { Color, ShaderMaterial as TShaderMaterial, UniformsUtils } from 'three'; -import ShaderMaterial from './ShaderMaterial.js'; import SubsurfaceScatteringShader from './SubsurfaceScatteringShader.js'; +import ShaderMaterial from './ShaderMaterial.js'; export default { extends: ShaderMaterial, diff --git a/src/tools.js b/src/tools.js index 39d7132..23efd52 100644 --- a/src/tools.js +++ b/src/tools.js @@ -1,8 +1,8 @@ export function setFromProp(o, prop) { if (prop instanceof Object) { - for (const [key, value] of Object.entries(prop)) { + Object.entries(prop).forEach(([key, value]) => { o[key] = value; - } + }); } };