After seeing @UberGoober get into using voxels, we felt we should port the Craft voxels into the next release. In the modern renderer the voxel world is a component you can attach to an entity — not quite as full-featured as Craft yet (no scripting to make things like TNT, etc)
Sample code:
function setup()
scene.main = scene.default3d()
-- 2 x 1 x 2 chunks, each 16 x 128 x 16 blocks
local island = scene.main:entity("island")
world = island:add(voxel.world, vec3(2, 1, 2))
world:box(vec3(0, 0, 0), vec3(31, 3, 31), "Water")
world:sphere(vec3(16, 0, 16), 10, "Sand")
world:line(vec3(16, 11, 16), vec3(16, 14, 16), "Wood")
world:sphere(vec3(16, 18, 16), 3, "Leaves")
island.position = vec3(-16, -4, -16)
scene.main.camera:add(camera.rigs.orbit).distance = 40
end
Generating a voxel riverbed for an improved Froggy adaptation to the modern renderer
Voxel world generation
Froggy running in modern, with new effects
