animate
Tweens or steps a property on something already on stage. Not the same as show/hide Transitions.
{
"type": "animate",
"target": "char:left",
"property": "position_x",
"to": 40,
"duration": 0.4,
"relative": true
}
Usually you need
| Field | Type | Default | Effect |
|---|---|---|---|
target | string | — | bg, char:slot, sprite:id, obj:id, panel, … |
property | string | — | opacity, position_x / y, scale, modulate, shader:u, … |
to | any | — | End value |
duration | ≥ 0 | 0.5 (tween) | Seconds |
preset | string | — | shake / pulse / flash / bob or author preset |
All fields
| Field | Type | Default | Effect |
|---|---|---|---|
id | string | auto | For stop_animate |
preset | string | — | Built-in or animations/presets.json |
mode | "tween" | "keyframes" | "frames" | inferred | Mode |
target | string | — | Target grammar |
layer | string | — | Optional layer hint for some targets |
property | string | — | Property path |
from / to | any | from = current | Ends |
duration | ≥ 0 | 0.5 | Seconds |
ease | in | out | in_out | out_in | "in_out" | Ease |
trans | linear | sine | … | "linear" | Curve |
loop | bool | "ping_pong" | false | Loop |
count | ≥ 0 | 0 (= ∞ when looping) | Iterations |
relative | bool | false | Offsets |
keyframes / frames / fps / start_frame | … | fps min 0.001 | Advanced |
intensity / decay / scale_from / scale_to / distance / color / opacity | preset extras | shake 5 / true; pulse 0.95–1.05; bob 10 | Preset knobs |
when | expression | — | Skip when falsy |
Preset duration defaults: shake 0.4, pulse 0.6, flash 0.3, bob 2.0.
Do not animate opacity while a fade transition runs on the same node. Animations · presets · stop_animate.