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) {
|
if (steps !== 1) {
|
||||||
playButton.style.display = 'none';
|
playButton.style.display = 'none';
|
||||||
pauseButton.style.display = '';
|
pauseButton.style.display = '';
|
||||||
|
$('render-hide').onclick();
|
||||||
}
|
}
|
||||||
kiri.client.animate({
|
kiri.client.animate({
|
||||||
speed,
|
speed,
|
||||||
|
|
@ -190,6 +191,7 @@ kiri.load(() => {
|
||||||
updateSpeed(1);
|
updateSpeed(1);
|
||||||
playButton.style.display = 'none';
|
playButton.style.display = 'none';
|
||||||
pauseButton.style.display = '';
|
pauseButton.style.display = '';
|
||||||
|
$('render-hide').onclick();
|
||||||
kiri.client.animate({
|
kiri.client.animate({
|
||||||
speed,
|
speed,
|
||||||
steps: steps || Infinity,
|
steps: steps || Infinity,
|
||||||
|
|
@ -408,7 +410,12 @@ kiri.load(() => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const next = path[pathIndex];
|
let next = path[pathIndex];
|
||||||
|
while (next && next.type === 'laser') {
|
||||||
|
last = next;
|
||||||
|
next = path[++pathIndex];
|
||||||
|
}
|
||||||
|
|
||||||
if (!next) {
|
if (!next) {
|
||||||
animating = false;
|
animating = false;
|
||||||
renderPath(send);
|
renderPath(send);
|
||||||
|
|
@ -418,7 +425,7 @@ kiri.load(() => {
|
||||||
|
|
||||||
if (next.tool >= 0 && (!tool || tool.getNumber() !== next.tool)) {
|
if (next.tool >= 0 && (!tool || tool.getNumber() !== next.tool)) {
|
||||||
// on real tool change, go to safe Z first
|
// on real tool change, go to safe Z first
|
||||||
if (tool) {
|
if (tool && last.point) {
|
||||||
let pos = last.point = {
|
let pos = last.point = {
|
||||||
x: last.point.x,
|
x: last.point.x,
|
||||||
y: last.point.y,
|
y: last.point.y,
|
||||||
|
|
@ -435,7 +442,7 @@ kiri.load(() => {
|
||||||
const lp = last.point, np = next.point;
|
const lp = last.point, np = next.point;
|
||||||
last = next;
|
last = next;
|
||||||
// dwell ops have no point
|
// dwell ops have no point
|
||||||
if (!np) {
|
if (!np || !lp) {
|
||||||
return renderPath(send);
|
return renderPath(send);
|
||||||
}
|
}
|
||||||
const dx = np.x - lp.x, dy = np.y - lp.y, dz = np.z - lp.z;
|
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 shadow = [];
|
||||||
let slices = [];
|
let slices = [];
|
||||||
let intopt = {
|
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
|
max: op.top ? zMax + ztOff : undefined
|
||||||
};
|
};
|
||||||
let indices = slicer.interval(op.down, intopt);
|
let indices = slicer.interval(op.down, intopt);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue