disable fake terrain (for image optimization) that fails more normal cases

This commit is contained in:
Stewart Allen 2020-12-05 13:31:19 -05:00
commit d28744c6a8
2 changed files with 7 additions and 5 deletions

View file

@ -86,6 +86,7 @@
* `P` crossing open space check point is outside camshell before returning max z
* `P` detect render message backlog and pause or warn
* `P` redo all path route / planning in prepare to account for terrain before camOut
* `P` fast forward animation with "chunking" or "skip animation"
# Laser

View file

@ -169,10 +169,11 @@
let tshadow = [];
let tzindex = slicer.interval(minStepDown, { fit: true, off: 0.01, down: true, flats: true });
let fakeTerrain = false;
if (tzindex.length > 100) {
fakeTerrain = tzindex[0];
tzindex = [ tzindex.pop() ];
}
// if (tzindex.length > 200) {
// fakeTerrain = tzindex[0];
// tzindex = [ tzindex.pop() ];
// }
let terrain = slicer.slice(tzindex, { each: (data, index, total) => {
tshadow = POLY.union(tshadow.slice().appendAll(data.tops), 0.01, true);
tslices.push(data.slice);
@ -180,7 +181,7 @@
const slice = data.slice;
sliceAll.push(slice);
slice.output()
.setLayer("debug", {line: 0x888800, thin: true })
.setLayer("terrain", {line: 0x888800, thin: true })
.addPolys(POLY.setZ(tshadow.clone(true), data.z), { thin: true });
}
updateOp(index, total);