Motion kit command

layer.liftShadow

Lift Shadow

Gives a `layer` a lift shadow driven by an Elevation slider (px): a tight contact Drop Shadow (opacity 12%/(1+e/24)) and a wide ambient one (opacity 8%+22%*min(e,64)/64), distance and softness growing with elevation. `elevation` static, or `to` reached `frames` after `start`, or `keys` [[comp s, elevation]]. One undo step; answers the effects added.

Kit
Motion 0.1.0 (.kmotion)
Changes the document
yes
Acts on
layer (one id), which a run step’s on fills

Parameters

Parameters of layer.liftShadow
NameTypeRequiredDescription
colorstringnoa colour such as #rrggbb
compinteger | stringnoread by the command beside its listed parameters
directionnumbernodegrees; default 180, straight down
easestring | number[]noa curve name (snappy, out, smooth, swift, settle, pop, reseat, fly, linear) or [x1, y1, x2, y2]
elevationnumbernopx, default 3
framesnumbernodefault 18
keysnumber[][]no[[comp seconds, elevation], …]
layerinteger | stringnodefault the first selected layer
startnumbernoseconds; comp time
tonumbernoelevation reached `frames` after `start`

Call through motion_run

text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "layer.liftShadow" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: color, comp, direction, ease, elevation, frames, keys, layer, start, to. motion_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "color": {
      "description": "a colour such as #rrggbb",
      "type": "string"
    },
    "comp": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "comp's item id as motion_inspect lists it",
          "type": "integer"
        },
        {
          "description": "the item id as receipts print it (\"1\"), or the comp's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "direction": {
      "description": "degrees; default 180, straight down",
      "type": "number"
    },
    "ease": {
      "description": "a curve name (snappy, out, smooth, swift, settle, pop, reseat, fly, linear) or [x1, y1, x2, y2]",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "elevation": {
      "description": "px, default 3",
      "type": "number"
    },
    "frames": {
      "description": "default 18",
      "type": "number"
    },
    "keys": {
      "description": "[[comp seconds, elevation], …]",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "layer": {
      "description": "default the first selected layer",
      "oneOf": [
        {
          "description": "layer id or 1-based index",
          "type": "integer"
        },
        {
          "description": "layer name or #n",
          "type": "string"
        }
      ],
      "x-khp-index": "#",
      "x-khp-index-numbers": true,
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "start": {
      "description": "seconds; comp time",
      "type": "number"
    },
    "to": {
      "description": "elevation reached `frames` after `start`",
      "type": "number"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (motion_commands through @kition/[email protected], built from KitionAI/kition-motion@4719aa7). As data: commands.jsonl.