Schemas / Pixel / raster

rig.pixel.raster

v0.31.0 · draft 6 fields 3 required

Fields

FieldTypeMeaning
role enumworking · output · layer-pixels · mask · composite required working, output, layer-pixels, mask, composite
width int required Pixels
height int required Pixels
rgba array<uint8> optional Optional. Tight RGBA, length ≥ w×h×4; omit when derived
derived bool optional Optional. Pixels rebuild from source + chain; absent = false
rebake bool optional Optional. Host should rebuild on load; absent = false

RGBA buffer. Usually runtime-only; may appear in small documents when needed.

No texture ids. Prefer rebuilding from source + chain over shipping large buffers.

Honesty: a size-only document must not fake rgba[]. Omit the buffer and set derived / rebake when pixels rebuild from source + chain.

JSON Schema

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

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.pixel.raster.schema.json",
  "title": "rig.pixel.raster",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "working",
        "output",
        "layer-pixels",
        "mask",
        "composite"
      ]
    },
    "width": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "height": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "rgba": {
      "type": "array",
      "items": {
        "$ref": "./_defs.schema.json#/$defs/uint8"
      }
    },
    "derived": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "rebake": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    }
  },
  "required": [
    "role",
    "width",
    "height"
  ]
}