Schemas / I/O

rig.input.axes

v1.0.0 · stable maturity: draft 9 fields 0 required

Fields

FieldTypeMeaning
player int optional Optional. Player index (0-based); absent = 0
moveX number-1 – 1 optional Optional. Move stick X, -1..1; absent = 0
moveY number-1 – 1 optional Optional. Move stick Y, -1..1; absent = 0
lookX number-1 – 1 optional Optional. Look stick X, -1..1; absent = 0
lookY number-1 – 1 optional Optional. Look stick Y, -1..1; absent = 0
leftTrigger number0 – 1 optional Optional. 0-1; absent = 0
rightTrigger number0 – 1 optional Optional. 0-1; absent = 0
leftGrip number0 – 1 optional Optional. Left squeeze, 0-1; absent = 0
rightGrip number0 – 1 optional Optional. Right squeeze, 0-1; absent = 0

Logical sticks and triggers for one player. Format when present.

Compose rig.meta.named for a label. Device handles and edge caches stay in the host. Which physical control feeds a field is rig.input.binding.

Hosts poll hardware into these fields during Update. Face buttons stay on rig.input.buttons. A VR controller's squeeze maps here - docs/vr.md.

JSON Schema

Resolves at https://rig.works/schemas/rig.input.axes.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.input.axes.schema.json",
  "title": "rig.input.axes",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "player": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "moveX": {
      "type": "number",
      "minimum": -1,
      "maximum": 1
    },
    "moveY": {
      "type": "number",
      "minimum": -1,
      "maximum": 1
    },
    "lookX": {
      "type": "number",
      "minimum": -1,
      "maximum": 1
    },
    "lookY": {
      "type": "number",
      "minimum": -1,
      "maximum": 1
    },
    "leftTrigger": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "rightTrigger": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "leftGrip": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "rightGrip": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    }
  },
  "x-rig-maturity": "draft"
}

Seen in

play-scene.json · vr-room.json