fix laser + animation, hide model on starting animation, outline negative z bottom
This commit is contained in:
parent
5f07f82eb3
commit
3d50c10acb
2 changed files with 11 additions and 4 deletions
|
|
@ -177,6 +177,7 @@ kiri.load(() => {
|
|||
if (steps !== 1) {
|
||||
playButton.style.display = 'none';
|
||||
pauseButton.style.display = '';
|
||||
$('render-hide').onclick();
|
||||
}
|
||||
kiri.client.animate({
|
||||
speed,
|
||||
|
|
@ -190,6 +191,7 @@ kiri.load(() => {
|
|||
updateSpeed(1);
|
||||
playButton.style.display = 'none';
|
||||
pauseButton.style.display = '';
|
||||
$('render-hide').onclick();
|
||||
kiri.client.animate({
|
||||
speed,
|
||||
steps: steps || Infinity,
|
||||
|
|
@ -408,7 +410,12 @@ kiri.load(() => {
|
|||
return;
|
||||
}
|
||||
|
||||
const next = path[pathIndex];
|
||||
let next = path[pathIndex];
|
||||
while (next && next.type === 'laser') {
|
||||
last = next;
|
||||
next = path[++pathIndex];
|
||||
}
|
||||
|
||||
if (!next) {
|
||||
animating = false;
|
||||
renderPath(send);
|
||||
|
|
@ -418,7 +425,7 @@ kiri.load(() => {
|
|||
|
||||
if (next.tool >= 0 && (!tool || tool.getNumber() !== next.tool)) {
|
||||
// on real tool change, go to safe Z first
|
||||
if (tool) {
|
||||
if (tool && last.point) {
|
||||
let pos = last.point = {
|
||||
x: last.point.x,
|
||||
y: last.point.y,
|
||||
|
|
@ -435,7 +442,7 @@ kiri.load(() => {
|
|||
const lp = last.point, np = next.point;
|
||||
last = next;
|
||||
// dwell ops have no point
|
||||
if (!np) {
|
||||
if (!np || !lp) {
|
||||
return renderPath(send);
|
||||
}
|
||||
const dx = np.x - lp.x, dy = np.y - lp.y, dz = np.z - lp.z;
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ class OpOutline extends CamOp {
|
|||
let shadow = [];
|
||||
let slices = [];
|
||||
let intopt = {
|
||||
down: true, min: zBottom, fit: true, off: 0.01,
|
||||
down: true, min: Math.max(0, zBottom), fit: true, off: 0.01,
|
||||
max: op.top ? zMax + ztOff : undefined
|
||||
};
|
||||
let indices = slicer.interval(op.down, intopt);
|
||||
|
|
|
|||
Loading…
Reference in a new issue