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

How to regenerate terrain? #127

Open greenSnot opened 7 years ago

greenSnot commented 7 years ago

If I change voxel.generate at runtime. How to make it generate again?

haitaoli commented 6 years ago

The following code resets the world:

game.voxels.chunks = {};
game.voxels.requestMissingChunks(game.worldOrigin)
game.loadPendingChunks(game.pendingChunks.length)