Examples / node-graph

node-graph.json

targets v0.41.0 2 entities 3 schemas

A two-node graph on one entity: a float constant with a rig.node.param value wired from its out pin to a brightness node's in pin. Nodes, pins, and links are nested POD inside rig.node.graph, not separate entities.

Speaks

rig.meta.named · rig.node.graph · rig.node.publish

Document

Validates under npm run check — raw file · open in RigPlayer — drop it in, press play, remix it, share the link.

{
  "rig": "0.41.0",
  "document": {
    "title": "Node graph",
    "defaultUnit": "px"
  },
  "entities": [
    {
      "id": "graph",
      "components": {
        "rig.meta.named": {
          "name": "Brightness graph",
          "stableId": "brightness-graph"
        },
        "rig.node.graph": {
          "nodes": [
            {
              "id": 1,
              "typeId": "float.const",
              "title": "Level",
              "position": [
                40,
                40
              ],
              "pins": [
                {
                  "id": 1,
                  "name": "value",
                  "kind": "out",
                  "type": "float"
                }
              ],
              "params": [
                {
                  "key": "value",
                  "type": "float",
                  "f": 0.75
                }
              ]
            },
            {
              "id": 2,
              "typeId": "visual.brightness",
              "title": "Brightness",
              "position": [
                260,
                40
              ],
              "pins": [
                {
                  "id": 1,
                  "name": "in",
                  "kind": "in",
                  "type": "float"
                }
              ],
              "params": []
            }
          ],
          "links": [
            {
              "id": 1,
              "fromNode": 1,
              "fromPin": 1,
              "toNode": 2,
              "toPin": 1
            }
          ],
          "nextId": 3
        }
      }
    },
    {
      "id": "graph-out",
      "components": {
        "rig.meta.named": {
          "name": "graph output",
          "stableId": "graph-out"
        },
        "rig.node.publish": {
          "pin": 1,
          "innerNode": 2,
          "innerPin": 1
        }
      }
    }
  ]
}