add visibility toggle
This commit is contained in:
parent
4797a72810
commit
885bda5c65
5 changed files with 34 additions and 1 deletions
|
|
@ -71,6 +71,18 @@ mesh.object = class MeshObject {
|
|||
return this;
|
||||
}
|
||||
|
||||
visible(opt) {
|
||||
if (opt === undefined) {
|
||||
return this.object.visible;
|
||||
}
|
||||
if (opt.toggle) {
|
||||
this.visible(!this.visible());
|
||||
} else {
|
||||
this.object.visible = opt;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
floor(clazz) {
|
||||
if (!clazz || this instanceof clazz) {
|
||||
let b = this.bounds;
|
||||
|
|
|
|||
Loading…
Reference in a new issue