Slide kit command
animation.add
Add Animation
Adds an animation effect to shapes in `ids` or the selection, after their existing ones, with start, duration and delay; a `customPath` motion path goes through `points` ([[dx, dy]] in points from the shape's place).
- Kit
- Slide 0.1.0 (.kslide and .pptx)
- Changes the document
- yes
- Acts on
ids(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
class | "entrance" | "emphasis" | "exit" | "path" | no | animation class |
closed | boolean | no | |
delay | number (≥ 0, ≤ 600000) | no | milliseconds |
duration | number (≥ 0, ≤ 600000) | no | milliseconds |
effect | string | no | an effect id from animation.list |
ids | (integer | string)[] | no | |
onSlide | integer | no | the slide the ids are on, from 1 |
option | string | no | an effect option from animation.list |
points | number[][] | no | customPath: where the path goes, in points from the shape's place |
smooth | boolean | no | |
start | "onClick" | "withPrevious" | "afterPrevious" | no |
Call through slide_run
text
slide_run {
"path": "<file>.pptx",
"steps": [{ "command": "animation.add" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: class, closed, delay, duration, effect, ids, onSlide, option, points, smooth, start. slide_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": {
"class": {
"description": "animation class",
"enum": [
"entrance",
"emphasis",
"exit",
"path"
],
"type": "string"
},
"closed": {
"type": "boolean"
},
"delay": {
"description": "milliseconds",
"maximum": 600000,
"minimum": 0,
"type": "number"
},
"duration": {
"description": "milliseconds",
"maximum": 600000,
"minimum": 0,
"type": "number"
},
"effect": {
"description": "an effect id from animation.list",
"type": "string"
},
"ids": {
"items": {
"description": "an id",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array",
"x-khp-types": [
"Shape"
]
},
"onSlide": {
"description": "the slide the ids are on, from 1",
"type": "integer"
},
"option": {
"description": "an effect option from animation.list",
"type": "string"
},
"points": {
"description": "customPath: where the path goes, in points from the shape's place",
"items": {
"description": "[dx, dy]",
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"smooth": {
"type": "boolean"
},
"start": {
"enum": [
"onClick",
"withPrevious",
"afterPrevious"
],
"type": "string"
}
},
"type": "object",
"x-khp-position": "independent"
}Generated from the command list of @kition/[email protected] and the kit itself (slide_commands through @kition/[email protected], built from KitionAI/kition-slide@7ef3d11). As data: commands.jsonl.