Skip to content

Commit

Permalink
initial proposal to allow excavation depth
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-cooper committed Oct 19, 2023
1 parent 4ce2d16 commit 96d9660
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/engine/Source/Core/ApproximateTerrainHeights.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ ApproximateTerrainHeights.initialize = function () {
initPromise = Resource.fetchJson(
buildModuleUrl("Assets/approximateTerrainHeights.json")
).then(function (json) {
const MAX_EXCAVATION_DEPTH = -250;

// Subtract the max excavation depth from the heights
Object.keys(json).map(function (key) {
json[key][0] += MAX_EXCAVATION_DEPTH;
});

ApproximateTerrainHeights._terrainHeights = json;
});
ApproximateTerrainHeights._initPromise = initPromise;
Expand Down

0 comments on commit 96d9660

Please sign in to comment.