From 3ed539553ad01fae7741bcc6a3724f84d985f1f2 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Mon, 15 Mar 2021 19:55:04 +0100 Subject: [PATCH] box --- src/meshes/Box.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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() {