Schemas / Pixel / raster

rig.pixel.tile_set

v0.31.0 · draft 7 fields 6 required

Fields

FieldTypeMeaning
palette entity required Entity with rig.pixel.palette
tileWidth int required Tile width in pixels
tileHeight int required Tile height in pixels
tilesAcross int required Columns in the sheet (≥ 1)
tileRows int required Rows in the sheet (≥ 1)
indices array<uint8> required Row-major palette indices for the full sheet; length = tilesAcross * tileRows * tileWidth * tileHeight
flags array<uint8> optional Optional. Per-tile flag byte; length = tilesAcross * tileRows; absent or empty = no flags

Indexed pixel sheet for tiles / sprites. Format when present.

Compose rig.meta.named for a label. Colour identity is rig.pixel.palette via palette. Prefer this over shipping large rig.pixel.raster RGBA when the host is palette-indexed.

No texture ids. Decode / atlas upload = fulfillment.

JSON Schema

Resolves at https://rig.works/schemas/rig.pixel.tile_set.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.pixel.tile_set.schema.json",
  "title": "rig.pixel.tile_set",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "palette": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "tileWidth": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "tileHeight": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "tilesAcross": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "tileRows": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "indices": {
      "type": "array",
      "items": {
        "$ref": "./_defs.schema.json#/$defs/uint8"
      }
    },
    "flags": {
      "type": "array",
      "items": {
        "$ref": "./_defs.schema.json#/$defs/uint8"
      }
    }
  },
  "required": [
    "palette",
    "tileWidth",
    "tileHeight",
    "tilesAcross",
    "tileRows",
    "indices"
  ]
}