Schemas / Pixel / raster
rig.pixel.tile_map
v0.31.0 · draft 6 fields 4 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
tileSet |
entity | required | Entity with rig.pixel.tile_set |
width |
int | required | Width in tiles |
height |
int | required | Height in tiles |
originX |
int | optional | Optional. Column where this region sits inside a larger host map; absent = 0 |
originY |
int | optional | Optional. Row where this region sits inside a larger host map; absent = 0 |
tiles |
array<int> | required | Row-major tile indices into the tile set; length = width * height |
Tile-index grid over a tile set. Format when present.
Compose rig.meta.named for a label. The sheet is rig.pixel.tile_set via tileSet.
width × height is the meaningful area, not the host's allocation. A 16×2 banner inside a 128×32 console map is a 16×2 map with an origin - not a 128×32 grid padded with zeros.
Camera / scroll / clip stay in the host.
JSON Schema
Resolves at https://rig.works/schemas/rig.pixel.tile_map.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.pixel.tile_map.schema.json",
"title": "rig.pixel.tile_map",
"type": "object",
"additionalProperties": false,
"properties": {
"tileSet": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"width": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"height": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"originX": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"originY": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"tiles": {
"type": "array",
"items": {
"$ref": "./_defs.schema.json#/$defs/int"
}
}
},
"required": [
"tileSet",
"width",
"height",
"tiles"
]
}