add getter mode on wireframe()

This commit is contained in:
Stewart Allen 2021-12-30 23:28:36 -05:00
commit 1a2504a4b4

View file

@ -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;