1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2021-03-15 19:55:04 +01:00
parent d4e7ac476f
commit 3ed539553a

View File

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