Skip to content

A lightweight 2.5D character player for the web, with lip sync and webcam face tracking.

2.3 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://livliv.ai/schema/livliv-keyforms-v1.json",
  "$comment": "keyforms.json, version 1 (FORMAT.md §4): unchanged from v3; a package declares it in files.keyforms.",
  "title": "LivLiv head-turn key poses (keyforms.json v1)",
  "type": "object",
  "required": ["version", "cell", "cols", "rows", "units", "turn", "nod", "keys"],
  "properties": {
    "version": { "const": 1 },
    "cell": { "type": "integer", "minimum": 1, "description": "The grid cell, in canvas pixels." },
    "cols": { "type": "integer", "minimum": 2 },
    "rows": { "type": "integer", "minimum": 2 },
    "units": { "type": "number", "exclusiveMinimum": 0, "description": "Pixels per unit in the displacement data." },
    "turn": { "type": "number", "description": "tuning.turn when the poses were measured." },
    "nod": { "type": "number", "description": "tuning.nod when the poses were measured." },
    "keys": {
      "type": "array", "minItems": 1, "maxItems": 32,
      "items": {
        "type": "object", "required": ["param", "value", "fields"],
        "properties": {
          "param": { "enum": ["angleX", "angleY", "diag"], "description": "diag: a pose only a caller weights (a multi-view player's corners), not an angle." },
          "value": { "type": "number" },
          "fields": {
            "type": "object",
            "additionalProperties": { "type": "string", "contentEncoding": "base64" },
            "description": "One displacement field per group: key head, hair, torso or a layer id; value base64 int16 (dx, dy interleaved, row-major, rows x cols). A converter that renames a layer renames its key here too."
          },
          "same": { "type": "array", "items": { "type": "string" }, "description": "Groups whose field is head's, stored once." }
        },
        "additionalProperties": false
      }
    },
    "mask": {
      "type": "object",
      "additionalProperties": { "type": "string", "contentEncoding": "base64" },
      "description": "Per group, uint8 weights on the same grid (255 = all): how much of the measured pose a vertex takes."
    },
    "interp": { "const": "hermite", "description": "Each angle's -v and +v poses blend as Hermite; missing: linear." }
  },
  "additionalProperties": false
}