refactor major parts of topo generation

This commit is contained in:
Stewart Allen 2020-11-14 19:13:17 -05:00
commit c8530981bc
3 changed files with 91 additions and 68 deletions

View file

@ -68,6 +68,11 @@
function updateStock(args, event) {
const SPACE = API.const.SPACE;
const STACKS = API.const.STACKS;
if (isCamMode && isArrange) {
STACKS.clear();
}
if (!isCamMode) {
if (camStock) {
@ -77,7 +82,6 @@
return;
}
const STACKS = API.const.STACKS;
const refresh = (event === "selection.scale" || event === 'selection.rotate');
let settings = API.conf.get();
@ -157,10 +161,6 @@
delta = 0;
}
if (isArrange) {
STACKS.clear();
}
const {x, y, z} = stock;
if (x && y && z && !STACKS.getStack('bounds')) {
const render = new KIRI.Render().setLayer('bounds', { face: 0xaaaaaa, line: 0xaaaaaa });