Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
Terrain.js
example.html

README.md

Diamond Square Algorithm

Generates a terrain by using a diamond square algorithm. See more info.

Usage:

A Terrain instance returns a two dimensional Array with values from 0 to 1

var terrain = new Terrain({
  size  : 33,
  noise : 5
});

terrain.eachNode(function( value, x, y )){
  console.log('Node:', [x, y], value );
});