Scene kit command
camera.shake
Camera Shake
Adds a decaying shake on top of the camera's keys from `frame` on (nothing before), as one undo step: jolts of `amplitude` metres and `rotation` degrees at `frequency` per second, dying away at `decay` per second; seeded noise, so the same `seed` gives the same shake. Run it after the camera moves it rides on.
- Kit
- Scene 0.1.0 (.kscene)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
amplitude | number | no | Metres the camera jolts sideways and up at first, 0 to 10 (0.03) |
camera | integer | string | no | The camera; the scene's camera when left out |
decay | number | no | How fast it dies away, per second: the strength falls by e every 1/decay seconds, 0.1 to 1000 (9) |
frame | number | no | The frame the shake hits, at full strength (the current frame) |
frequency | number | no | Jolts per second, 0.1 to 120 (14) |
rotation | number | no | Degrees it jolts in pitch and yaw at first (half that in roll), 0 to 45 (0.6) |
seed | integer | no | Picks a different, repeatable shake (0) |
Call through scene_run
scene_run {
"path": "<file>.kscene",
"steps": [{ "command": "camera.shake" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: amplitude, camera, decay, frame, frequency, rotation, seed. scene_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": {
"amplitude": {
"description": "Metres the camera jolts sideways and up at first, 0 to 10 (0.03)",
"type": "number"
},
"camera": {
"description": "The camera; the scene's camera when left out",
"oneOf": [
{
"description": "the object's id",
"type": "integer"
},
{
"description": "the object's name",
"type": "string"
}
],
"x-khp-name": "name",
"x-khp-types": [
"Object"
]
},
"decay": {
"description": "How fast it dies away, per second: the strength falls by e every 1/decay seconds, 0.1 to 1000 (9)",
"type": "number"
},
"frame": {
"description": "The frame the shake hits, at full strength (the current frame)",
"type": "number"
},
"frequency": {
"description": "Jolts per second, 0.1 to 120 (14)",
"type": "number"
},
"rotation": {
"description": "Degrees it jolts in pitch and yaw at first (half that in roll), 0 to 45 (0.6)",
"type": "number"
},
"seed": {
"description": "Picks a different, repeatable shake (0)",
"type": "integer"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.