Cosm
The entirety of the Microcosm API outside of game loop functions is exposed under the Cosm
namespace. This includes accessing and manipulating the current world, the player cursor, math helpers, and more.
LayerType
An enum of the available voxel layer types.
Cosm.LayerType.Solid
Cosm.LayerType.Transparent
DrawMode
An enum of the available voxel drawing modes.
Cosm.DrawMode.Create
Cosm.DrawMode.Replace
Cosm.DrawMode.Delete
Cosm.DrawMode.Set
currentWorld
The currently open world.
getVoxel
Gets the voxel at the given coordinate. Returns a voxel table or nil
if no voxel is there.
drawVoxel
Draws a single voxel at the given coordinate.