Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

BlockMap

BlockMap<Name>(props): Element

A terrain of blocks: a grid of cells, each a block of the set at a height in whole steps, with a cliff where a neighbour stands lower, stairs and water, as Godot’s GridMap stands a MeshLibrary’s cells. The room spawns one entity for each 32 by 32 chunk, with a voxel collider a character slides along, and every page draws each chunk as merged Lambert meshes. setBlockCell changes a cell as the game runs.

Type Parameter
Name extends string
Parameter Type
props BlockMapProps<Name>

Element

<BlockMap
blockSet={village}
legend={{ g: "grass", s: "stairs" }}
cells={["ggs", "ggg"]}
heights={[[1, 1, 0], [1, 1, 1]]}
/>