From 1a2504a4b4e9ac6f2f078f053b17902f0a59d977 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Thu, 30 Dec 2021 23:28:36 -0500 Subject: [PATCH] add getter mode on wireframe() --- src/mesh/model.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mesh/model.js b/src/mesh/model.js index c8ca51ad..94c05e54 100644 --- a/src/mesh/model.js +++ b/src/mesh/model.js @@ -86,6 +86,15 @@ mesh.model = class MeshModel { } 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) { this.mesh.remove(this._wire); this._wire = undefined;