add focus. improve bounds with arrays

This commit is contained in:
Stewart Allen 2021-12-31 16:59:38 -05:00
commit 86b60cc715
4 changed files with 73 additions and 18 deletions

View file

@ -27,16 +27,6 @@ mesh.group = class MeshGroup extends mesh.object {
}
}
// center objects to group bounds
// dependent on first being added to world/scene
centerModels() {
let bounds = this.bounds();
for (let model of this.models) {
model.center(bounds);
}
return this;
}
object() {
return this.group;
}
@ -62,6 +52,28 @@ mesh.group = class MeshGroup extends mesh.object {
moto.Space.update();
return this;
}
// center objects to group bounds
// dependent on first being added to world/scene
centerModels() {
let bounds = this.bounds();
for (let model of this.models) {
model.center(bounds);
}
return this;
}
opacity() {
for (let model of this.models) {
model.opacity(...arguments);
}
}
wireframe() {
for (let model of this.models) {
model.wireframe(...arguments);
}
}
};
})();