Schemas / Geometry / paint

rig.geometry.rectangle

v0.31.0 · draft 5 fields 4 required

Fields

FieldTypeMeaning
x float required Left edge, local space
y float required Top edge, local space
width float required Extent along +X; negative is invalid
height float required Extent along +Y; negative is invalid
cornerRadius float optional Optional. Corner rounding in units; absent or 0 = square corners

Axis-aligned rectangle. Format when present.

Position is the top-left corner, not the centre. A host that models rectangles from the centre converts on read. To place a different registration at rig.spatial.transform position, compose rig.spatial.anchor - do not dual-author the rectangle from the centre.

Rotation belongs to rig.spatial.transform - there is no angle field here.

Appearance: rig.paint.fill_stroke.

JSON Schema

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

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.geometry.rectangle.schema.json",
  "title": "rig.geometry.rectangle",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "x": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "y": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "width": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "height": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "cornerRadius": {
      "$ref": "./_defs.schema.json#/$defs/float"
    }
  },
  "required": [
    "x",
    "y",
    "width",
    "height"
  ]
}

Seen in

minimal-scene.json · page-anchor.json