Schemas / Node graph

rig.node.node

v0.31.0 · draft 8 fields 6 required

Fields

FieldTypeMeaning
id uint required Stable id within the graph
typeId string required Catalog behavior key (host vocabulary, e.g. float.add) - not a property datatype
title string required Display label
position vec2 required Editor canvas position (not world transform)
pins array<rig.node.pin> required See rig.node.pin - pin type uses property datatypes
params array<rig.node.param> required See rig.node.param - same datatype table
nested rig.node.graph optional When present, this node is a group; interior is a full rig.node.graph
publishes array<rig.node.publish> optional Outer pin to interior pin - see rig.node.publish

One node inside a rig.node.graph. Nested POD - not a separate ECS entity unless a host chooses that layout.

Leaf vs group

  • Leaf: omit nested (and usually publishes). typeId selects catalog evaluation.
  • Group: nested is present. Outer pins[] are the only interface other nodes link to. Author publishes chosen interior pins; host keeps outer pin name / kind / type aligned with (or renamed from) the inner pin. typeId is host vocabulary (e.g. group); eval runs the nested graph, not a maths catalog entry.

Groups nest recursively: nodes inside nested may themselves have nested.

typeId selects evaluation / catalog entry for leaves. Pin and param type fields describe values, using the Contract property table.

JSON Schema

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

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.node.node.schema.json",
  "title": "rig.node.node",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "typeId",
    "title",
    "position",
    "pins",
    "params"
  ],
  "properties": {
    "id": {
      "$ref": "./_defs.schema.json#/$defs/uint"
    },
    "typeId": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "title": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "position": {
      "$ref": "./_defs.schema.json#/$defs/vec2"
    },
    "pins": {
      "type": "array",
      "items": {
        "$ref": "./rig.node.pin.schema.json"
      }
    },
    "params": {
      "type": "array",
      "items": {
        "$ref": "./rig.node.param.schema.json"
      }
    },
    "nested": {
      "$ref": "./rig.node.graph.schema.json"
    },
    "publishes": {
      "type": "array",
      "items": {
        "$ref": "./rig.node.publish.schema.json"
      }
    }
  }
}