disable fake terrain (for image optimization) that fails more normal cases
This commit is contained in:
parent
28962e7f4e
commit
d28744c6a8
2 changed files with 7 additions and 5 deletions
1
notes.md
1
notes.md
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue