Added Logging Options to Improve Performance

This commit is contained in:
Onyx Azryn 2020-10-21 09:45:42 -05:00
parent e480c1c8e5
commit 6cbcc81332
18 changed files with 193 additions and 186 deletions

View file

@ -5,7 +5,7 @@
}(this, (function () {'use strict';
const generate = function(changeHeights = true) {
console.time('generateRivers');
TIME && console.time('generateRivers');
Math.seedrandom(seed);
const cells = pack.cells, p = cells.p, features = pack.features;
@ -136,7 +136,7 @@
// apply change heights as basic one
if (changeHeights) cells.h = Uint8Array.from(h);
console.timeEnd('generateRivers');
TIME && console.timeEnd('generateRivers');
}
// depression filling algorithm (for a correct water flux modeling)