mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
box
This commit is contained in:
parent
d4e7ac476f
commit
3ed539553a
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user