mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
mesh
This commit is contained in:
parent
606dcfa9c9
commit
d4e7ac476f
@ -42,6 +42,13 @@ export default {
|
||||
|
||||
this.initObject3D(this.mesh);
|
||||
},
|
||||
addGeometryWatchers(props) {
|
||||
Object.keys(props).forEach(prop => {
|
||||
watch(() => this[prop], () => {
|
||||
this.refreshGeometry();
|
||||
});
|
||||
});
|
||||
},
|
||||
setGeometry(geometry) {
|
||||
this.geometry = geometry;
|
||||
if (this.mesh) this.mesh.geometry = geometry;
|
||||
|
Loading…
Reference in New Issue
Block a user