max-mapper / voxel-engine

3D HTML5 voxel game engine
http://maxogden.github.com/voxel-engine
BSD 3-Clause "New" or "Revised" License
1.29k stars 220 forks source link

Enable materialFlatColor option #76

Closed shama closed 11 years ago

shama commented 11 years ago

screen shot 2013-06-03 at 11 25 06 pm

voxel-texture@0.5.6 now has a materialFlatColor option. This will disable textures and use new this.THREE.MeshBasicMaterial({vertexColors: this.THREE.VertexColors}).

You can specify colors in the materials array:

var game = createGame({
  //materials: ['brick', ['grass', 'dirt', 'grass_dirt'], 'dirt'],
  materials: ['#E04006', '#C0D890', '#8A360F'],
  materialFlatColor: true
})

The AO isn't that great but I'll make it better in time. Thanks!

max-mapper commented 11 years ago

this is super awesome because i can get 30-60 fps with chunkDistance of 7