Simple flat land terrain generator (voxel.js plugin)
Requires voxel-registry. Load with voxel-plugins, options:
block
(required): name of a block to fill the terrain with, for example bedrock
(provided by voxel-bedrock.
The voxel-engine-stackgl game options should have generateChunks: false
. voxel-flatland
will listen on game.voxel
for the missingChunk
event and generate the new
chunks. The generator can be unregistered by disabling the plugin.
Listens for missingChunk
events from game.voxels
(emitted by
voxel, accessed via the voxel-engine-stackgl
game instance), then calls game.showChunk
with the voxel chunk array data.
Chunks at y=0 and below are filled entirely with the given block. Chunks above y=0 are left empty (air, not generated).
- voxel-land, a more sophisticated terrain generation example
- another terrain generation example
- voxel-example
MIT