Examples / page-anchor

page-anchor.json

targets v0.14.0 3 entities 7 schemas

A page with rig.spatial.anchor center (page-local origin mid-trim) and a child rectangle with bottom-right registration plus a local offset - transform stays TRS; the 3×3 lives on the sibling component.

Speaks

rig.geometry.rectangle · rig.layout.page · rig.meta.named · rig.paint.fill_stroke · rig.spatial.anchor · rig.spatial.relationship · rig.spatial.transform

Document

Validates under npm run checkraw file.

{
  "rig": "0.14.0",
  "document": {
    "title": "Page + entity anchor",
    "defaultUnit": "px"
  },
  "entities": [
    {
      "id": "artboard",
      "components": {
        "rig.meta.named": {
          "name": "Artboard"
        },
        "rig.layout.page": {
          "width": 800,
          "height": 600,
          "index": 0
        },
        "rig.spatial.anchor": {
          "point": "center"
        },
        "rig.spatial.transform": {
          "position": [
            0,
            0,
            0
          ]
        }
      }
    },
    {
      "id": "badge",
      "components": {
        "rig.meta.named": {
          "name": "Badge"
        },
        "rig.spatial.relationship": {
          "parent": "artboard",
          "order": 0
        },
        "rig.spatial.transform": {
          "position": [
            200,
            -100,
            0
          ]
        },
        "rig.spatial.anchor": {
          "point": "bottom-right",
          "offset": [
            12,
            -4
          ]
        },
        "rig.geometry.rectangle": {
          "x": 0,
          "y": 0,
          "width": 120,
          "height": 40
        },
        "rig.paint.fill_stroke": {
          "fillRgba": [
            0.9,
            0.35,
            0.2,
            1
          ]
        }
      }
    },
    {
      "id": "fixture",
      "components": {
        "rig.meta.named": {
          "name": "Bed fixture (3x3x3)"
        },
        "rig.spatial.anchor": {
          "point": "bottom-left",
          "height": "min"
        },
        "rig.spatial.transform": {
          "position": [
            0,
            0,
            0
          ]
        },
        "rig.geometry.rectangle": {
          "x": 0,
          "y": 0,
          "width": 40,
          "height": 40
        }
      }
    }
  ]
}