Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
caewok committed Feb 25, 2023
2 parents f7683fc + ee0ec68 commit 2f3490c
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions scripts/TravelElevationCalculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,10 +886,14 @@ export class TravelElevationCalculator {
};

const opts = { stepT, startT };
if ( tec.averageTerrain ) {
opts.frame = tec.token.bounds; // TODO: Keep bounds or move to slower token shape?
opts.skip = this.averageTerrain;
}
// TODO: Use average terrain with a countFunction?
// if ( tec.averageTerrain ) {
// opts.frame = tec.token.bounds; // TODO: Keep bounds or move to slower token shape?
// opts.skip = tec.averageTerrain;
// const percentThreshold = this.tilePercentThreshold; // Default 50%
// opts.countFn = PixelCache.countFunction(pixelThreshold);
//
// }

const ix = evCache.nextPixelValueAlongCanvasRay(travelRay, cmp, opts);
if ( !ix ) return null;
Expand Down Expand Up @@ -1014,10 +1018,11 @@ export class TravelElevationCalculator {
const pixelThreshold = ev.elevationToPixelValue(elevationThreshold);
const cmp = value => value > pixelThreshold;
const opts = { stepT, startT };
if ( averageTerrain ) {
opts.frame = this.TEC.token.bounds; // TODO: Keep bounds or move to slower token shape?
opts.skip = averageTerrain;
}
// TODO: Use average terrain with a count function?
// if ( averageTerrain ) {
// opts.frame = this.TEC.token.bounds; // TODO: Keep bounds or move to slower token shape?
// opts.skip = averageTerrain;
// }

const ix = evCache.nextPixelValueAlongCanvasRay(travelRay, cmp, opts);
if ( !ix ) return null;
Expand Down

0 comments on commit 2f3490c

Please sign in to comment.