allow default layer off. disable moves layers default

This commit is contained in:
Stewart Allen 2020-11-09 09:08:13 -05:00
commit 024be442bd
4 changed files with 13 additions and 5 deletions

View file

@ -18,7 +18,7 @@
};
}
setLayer(layer, colors) {
setLayer(layer, colors, off) {
let layers = this.layers;
if (typeof(colors) === 'number') {
colors = {
@ -28,6 +28,7 @@
};
}
this.current = layers[layer] = layers[layer] || {
off: off === true,
lines: [],
polys: [],
faces: [],