Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (11 sloc) 0.305 kb

Convert pngs to heightmaps in Voxel.js! For example:

var heightmap = require('png-heightmap')

var chunkDistance = 2
var chunkSize = 32

heightmap('simple_sf.png', chunkDistance * 2 * chunkSize , function(err, pngGenerate) {
  var game = createGame({
    generate: pngGenerate
Jump to Line
Something went wrong with that request. Please try again.