Motion kit command
keyframe.applyEase
Apply Ease Preset
Eases every segment between consecutive keyframes of one property (`path` or `prop`; `from`/`to` in layer seconds limit the keys) with a named curve: snappy, out, smooth, swift, linear, or the overshoot landings settle, pop, reseat, fly (`bezier: [x1,y1,x2,y2]` for any CSS cubic-bezier). Curves become exact temporal ease (speed and influence); on a motion path an overshoot inserts a key at each turning point. Spring presets (crisp, lively, noBounce, cardFlip, or spring with damping/stiffness/mass) attach an expression that springs the motion into the last key. One undo step.
- Kit
- Motion 0.1.0 (.kmotion)
- Changes the document
- yes
- Acts on
layer(one id), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
bezier | number[] | no | [x1, y1, x2, y2] |
comp | integer | string | no | read by the command beside its listed parameters |
damping | number | no | |
from | number | no | seconds; layer time |
layer | integer | string | no | default the first selected layer |
mass | number | no | |
merge | string | no | |
path | string | no | |
preset | "snappy" | "out" | "smooth" | "swift" | "settle" | "pop" | "reseat" | "fly" | "linear" | "crisp" | "lively" | "noBounce" | "cardFlip" | "spring" | no | |
prop | integer | no | |
stiffness | number | no | |
to | number | no | seconds; layer time |
Call through motion_run
motion_run {
"path": "<file>.kmotion",
"steps": [{ "command": "keyframe.applyEase" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: bezier, comp, damping, from, layer, mass, merge, path, preset, prop, stiffness, to. motion_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"bezier": {
"description": "[x1, y1, x2, y2]",
"items": {
"type": "number"
},
"type": "array"
},
"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"
]
},
"damping": {
"type": "number"
},
"from": {
"description": "seconds; layer time",
"type": "number"
},
"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"
]
},
"mass": {
"type": "number"
},
"merge": {
"type": "string"
},
"path": {
"type": "string"
},
"preset": {
"enum": [
"snappy",
"out",
"smooth",
"swift",
"settle",
"pop",
"reseat",
"fly",
"linear",
"crisp",
"lively",
"noBounce",
"cardFlip",
"spring"
],
"type": "string"
},
"prop": {
"type": "integer"
},
"stiffness": {
"type": "number"
},
"to": {
"description": "seconds; layer time",
"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.