checkpoint belt work

This commit is contained in:
Stewart Allen 2021-01-08 23:44:26 -05:00
commit 8798d060ac
6 changed files with 43 additions and 32 deletions

View file

@ -857,7 +857,7 @@
segtimes[`${segNumber}_draw`] = widget.render(stack);
// rotate stack for belt beds
if (settings.device.bedBelt && widget.rotinfo) {
STACKS.rotate(widget.rotinfo);
stack.obj.rotate(widget.rotinfo);
}
updateSliderMax(true);
setVisibleLayer(-1, 0);
@ -977,9 +977,9 @@
// rotate stack for belt beds
if (settings.device.bedBelt && WIDGETS[0].rotinfo) {
let ri = WIDGETS[0].rotinfo;
console.log({ri})
ri.dy = ri.dz = 0;
STACKS.rotate(WIDGETS[0].rotinfo);
ri.dy = settings.device.bedDepth / 2 - ri.ypos;
stack.obj.rotate(WIDGETS[0].rotinfo);
}
segtimes[`${segNumber}_draw`] = Date.now() - startTime;
}
@ -1685,7 +1685,8 @@
}
if (isBelt) {
let bounds = platformUpdateBounds(), movey = -(dev.bedDepth / 2 + bounds.min.y);
let bounds = platformUpdateBounds(),
movey = -(dev.bedDepth / 2 + bounds.min.y);
forAllWidgets(widget => widget.move(0, movey + 10, 0));
}