add getter mode on wireframe()
This commit is contained in:
parent
5ddf4aeb18
commit
1a2504a4b4
1 changed files with 9 additions and 0 deletions
|
|
@ -86,6 +86,15 @@ mesh.model = class MeshModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
wireframe(bool, opt = {}) {
|
wireframe(bool, opt = {}) {
|
||||||
|
if (bool === undefined) {
|
||||||
|
return this._wire ? {
|
||||||
|
enabled: true,
|
||||||
|
opacity: this._wireo,
|
||||||
|
color: this._wire ? this._wire.material.color : undefined,
|
||||||
|
} : {
|
||||||
|
enabled: false
|
||||||
|
};
|
||||||
|
}
|
||||||
if (this._wire) {
|
if (this._wire) {
|
||||||
this.mesh.remove(this._wire);
|
this.mesh.remove(this._wire);
|
||||||
this._wire = undefined;
|
this._wire = undefined;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue