If generateChunks is true (and it is by default), then the engine will generate chunks itself, synchronously, through opts.generate
The alternative asynchronous chunk generation technique is to listen for missingChunk events, generate asynchronously, then call showChunk when finished. If this technique is used with generateChunks: true, there is a confusing failure case: the initial chunks generate, but then no new chunks as the player explores. Found in https://github.com/voxel/voxel-example/issues/9
The correct configuration is to set generateChunks: false when using missingChunk/showChunk. This is now documented in voxel-flatland and voxel-land but maybe it could be improved further. Perhaps remove generateChunks and always require listening for missingChunk events? Or have the plugins detect and fail if the option is not set. Or/and get synchronous chunk gen to work again (worked in the three.js-based voxel-engine), so the conflicting chunks won't be empty.
If
generateChunks
is true (and it is by default), then the engine will generate chunks itself, synchronously, throughopts.generate
The alternative asynchronous chunk generation technique is to listen for
missingChunk
events, generate asynchronously, then callshowChunk
when finished. If this technique is used withgenerateChunks: true
, there is a confusing failure case: the initial chunks generate, but then no new chunks as the player explores. Found in https://github.com/voxel/voxel-example/issues/9The correct configuration is to set
generateChunks: false
when using missingChunk/showChunk. This is now documented in voxel-flatland and voxel-land but maybe it could be improved further. Perhaps remove generateChunks and always require listening for missingChunk events? Or have the plugins detect and fail if the option is not set. Or/and get synchronous chunk gen to work again (worked in the three.js-based voxel-engine), so the conflicting chunks won't be empty.