terrain-map
ARCHIVED - repo for blog post http://www.vogt.world/writing/procedural-terrain-generation/
git clone https://git.vogt.world/terrain-map.git
Log | Files | README.md
← Commit log
commit
message
Cleaning up erosion parameters
author
Ben Vogt <[email protected]>
date
2016-05-14 02:36:50
stats
1 file(s) changed, 3 insertions(+), 10 deletions(-)
files
main.js
 1diff --git a/main.js b/main.js
 2index 5e68442..e8f0a94 100644
 3--- a/main.js
 4+++ b/main.js
 5@@ -263,11 +263,8 @@ $(document).ready(function() {
 6   };
 7 
 8   LandMap.prototype.erosion = function(options) {
 9-    var Kq = options.Kq;
10-    var Kw = options.evaporationSpeed;
11-    var Kr = options.erosionSpeed;
12+    var Kq = options.carryingCapacity;
13     var Kd = options.depositionSpeed;
14-    var Kg = options.gravity * 2;
15     var iterations = options.iterations;
16     var drops = options.drops;
17     var one = options.one;
18@@ -476,11 +473,8 @@ $(document).ready(function() {
19     });
20     terrain.generate(0.75, "standard");
21     terrain.erosion({
22-      Kq: 1.5,
23-      evaporationSpeed: 0.001,
24-      erosionSpeed: 1.01,
25+      carryingCapacity: 1.5,
26       depositionSpeed: 0.03,
27-      gravity: 10,
28       iterations: 10,
29       drops: 1000000,
30       one: "standard",