diff --git a/src/meshes/Box.js b/src/meshes/Box.js index e0b97c9..4d528eb 100644 --- a/src/meshes/Box.js +++ b/src/meshes/Box.js @@ -1,4 +1,3 @@ -import { watch } from 'vue'; import Mesh from './Mesh.js'; import { props, createGeometry } from '../geometries/BoxGeometry.js'; @@ -7,11 +6,7 @@ export default { props, created() { this.createGeometry(); - Object.keys(props).forEach(prop => { - watch(() => this[prop], () => { - this.refreshGeometry(); - }); - }); + this.addGeometryWatchers(props); }, methods: { createGeometry() {