function setup() {
  createCanvas(600, 600, WEBGL);
  colorMode(HSB, 360, 100, 100);
  cursor(CROSS);

  // ------ mesh ------
  tileCount = 50;
  zScale = 150;

  // ------ noise ------
  noiseXRange = 10;
  noiseYRange = 10;
  octaves = 4;
  falloff = 0.5;

  // ------ mesh coloring ------
  topColor = color(0, 0, 100);
  midColor = color(191, 99, 63);
  bottomColor = color(0, 0, 0);
  threshold = 0.30;

  // ------ mouse interaction ------
  offsetX = 0;
  offsetY = 0;
  clickX = 0;
  clickY = 0;
  zoom = -300;
  rotationX = 0;
  rotationZ = 0;
  targetRotationX = PI / 3;
  targetRotationZ = 0;
}
creates a terrain like mesh based on noise values.

MOUSE
position x/y + left drag   : specify noise input range
position x/y + right drag  : camera controls

KEYS
arrow up                   : noise falloff +
arrow down                 : noise falloff -
arrow left                 : noise octaves -
arrow right                : noise octaves +
space                      : new noise seed
+                          : zoom in
-                          : zoom out
s                          : save png