checkpoint sketch work
This commit is contained in:
parent
c00e4995e6
commit
32e57fd00e
6 changed files with 111 additions and 32 deletions
|
|
@ -281,17 +281,6 @@ mesh.model = class MeshModel extends mesh.object {
|
|||
return this.vertices / 3;
|
||||
}
|
||||
|
||||
// get, set, or toggle visibility of model and wireframe
|
||||
visible(bool) {
|
||||
if (bool === undefined) {
|
||||
return this.mesh.visible;
|
||||
}
|
||||
if (bool.toggle) {
|
||||
return this.visible(!this.mesh.visible);
|
||||
}
|
||||
this.mesh.visible = bool;
|
||||
}
|
||||
|
||||
// get, set, or toggle selection of model (coloring)
|
||||
select(bool, stool) {
|
||||
const cmat = this.mesh.material[0];
|
||||
|
|
@ -344,6 +333,18 @@ mesh.model = class MeshModel extends mesh.object {
|
|||
space.update();
|
||||
}
|
||||
|
||||
highlight() {
|
||||
if (!this.wireframe().enabled) {
|
||||
this.opacity({temp: 0.5});
|
||||
}
|
||||
}
|
||||
|
||||
unhighlight() {
|
||||
if (!this.wireframe().enabled) {
|
||||
this.opacity({restore: true});
|
||||
}
|
||||
}
|
||||
|
||||
wireframe(bool, opt = {}) {
|
||||
let was = this._wire ? true : false;
|
||||
if (bool === undefined) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue