Schemas / Animation / modulators

rig.anim.curve

v0.31.0 · draft 3 fields 1 required

Fields

FieldTypeMeaning
points array<vec2>min 2 items required Control points. Each x/y in [0,1]. Sorted by ascending x. At least two points; hosts ensure endpoints at x=0 and x=1.
interpolation enumlinear · smooth optional Optional. linear, smooth; absent = smooth.
preset enumlinear · ease-in · ease-out · ease-in-out · s-curve · bulge · squeeze · custom optional Optional. Named seed for points: linear, ease-in, ease-out, ease-in-out, s-curve, bulge, squeeze, custom. Absent = custom when points are authored, else linear.

1D transfer curve - remap a normalized input t in [0,1] to an output in [0,1]. Format when present.

Used for easing, distribution, bulge/squeeze, and any host that needs an editable response curve. Not a 2D draw path - that is rig.geometry.path. Named tween easings on rig.anim.tween stay as the short enum; this schema is the editable shape those names seed.

Rules

  • Evaluating at t interpolates in x and returns y (clamped to [0,1]).
  • Changing preset to a named seed regenerates points. Editing points sets preset to custom.
  • Runtime LUTs / caches are host-only - do not serialize.
  • Treat unknown interpolation / preset as smooth / custom (keep points).

JSON Schema

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

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.anim.curve.schema.json",
  "title": "rig.anim.curve",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "points": {
      "type": "array",
      "minItems": 2,
      "items": {
        "$ref": "./_defs.schema.json#/$defs/vec2"
      }
    },
    "interpolation": {
      "type": "string",
      "enum": [
        "linear",
        "smooth"
      ]
    },
    "preset": {
      "type": "string",
      "enum": [
        "linear",
        "ease-in",
        "ease-out",
        "ease-in-out",
        "s-curve",
        "bulge",
        "squeeze",
        "custom"
      ]
    }
  },
  "required": [
    "points"
  ]
}