fix shadow and lathe progress reporting
This commit is contained in:
parent
f81e002766
commit
68ff3391ce
3 changed files with 3 additions and 11 deletions
|
|
@ -7,10 +7,6 @@ export class OpIndex extends CamOp {
|
||||||
super(state, op);
|
super(state, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
weight() {
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
async slice(progress) {
|
async slice(progress) {
|
||||||
let { op, state } = this;
|
let { op, state } = this;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,6 @@ class OpShadow extends CamOp {
|
||||||
super(state, op);
|
super(state, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
weight() {
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
async slice(progress) {
|
async slice(progress) {
|
||||||
let state = this.state;
|
let state = this.state;
|
||||||
|
|
||||||
|
|
@ -68,7 +64,7 @@ class OpShadow extends CamOp {
|
||||||
.setLayer("shadow", {line: 0x888800, thin: true })
|
.setLayer("shadow", {line: 0x888800, thin: true })
|
||||||
.addPolys(shadow, { thin: true });
|
.addPolys(shadow, { thin: true });
|
||||||
}
|
}
|
||||||
progress(0.5 + i / tzindex.length, 'shadow');
|
progress(0.5 + (i / tzindex.length) * 0.5, 'shadow');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (devel && slices.length) {
|
if (devel && slices.length) {
|
||||||
|
|
|
||||||
|
|
@ -203,13 +203,13 @@ export class Topo {
|
||||||
await gpu.loadTerrain({
|
await gpu.loadTerrain({
|
||||||
triangles: vertices,
|
triangles: vertices,
|
||||||
boundsOverride,
|
boundsOverride,
|
||||||
onProgress(pct) { onupdate(pct/100) }
|
onProgress: (pct) => onupdate(pct / 1000)
|
||||||
});
|
});
|
||||||
let output = await gpu.generateToolpaths({
|
let output = await gpu.generateToolpaths({
|
||||||
xStep,
|
xStep,
|
||||||
yStep: 1,
|
yStep: 1,
|
||||||
zFloor: zBottom,
|
zFloor: zBottom,
|
||||||
onProgress(i,j) { onupdate(i/j) }
|
onProgress: (i,j) => onupdate(0.1 + i / j)
|
||||||
});
|
});
|
||||||
gpu.terminate();
|
gpu.terminate();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue