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

defineBlockSet

defineBlockSet<Name>(name, options): BlockSet<Name>

Declares a block set under name at module scope, in a module src/game.ts imports, so the room, every page and the cli find it by the name a map file’s blockSet gives.

Type Parameter
Name extends string
Parameter Type
name string
options BlockSetOptions<Name>

BlockSet<Name>

export const village = defineBlockSet("village", {
blocks: {
grass: { top: "#4a7d3a", side: "#6b5a4a" },
stairs: { top: "#9aa3ad", stairs: true },
},
});