fix z thru for large values in op outline

This commit is contained in:
Stewart Allen 2021-01-14 18:33:14 -05:00
commit 6cc27fd388
2 changed files with 11 additions and 13 deletions

View file

@ -431,13 +431,13 @@
// extend cut thru (only when z bottom is 0)
if (zThru) {
let last = slices[slices.length-1];
let add = last.clone(true);
add.tops.forEach(top => {
top.poly.setZ(add.z);
});
add.shadow = last.shadow.clone(true);
add.z -= zThru;
slices.push(add);
for (let zneg of BASE.util.lerp(0, zThru, op.down)) {
let add = last.clone(true);
add.tops.forEach(top => top.poly.setZ(add.z));
add.shadow = last.shadow.clone(true);
add.z -= zneg;
slices.push(add);
}
}
slices.forEach(slice => {