add_code_animation
Adds procedural motion to a normal object: `function animate(t, o, params, ctx)` runs every frame; set o.x/o.y/o.rotation/o.skewX/o.skewY (added), o.scale/o.scaleX/o.scaleY/o.opacity (multiplied), o.text, o.color. Offsets apply to the object's static transform and override its keyframed transform, so to combine with keyframes put the keyframes on a parent Frame (not a Group, which re-centres on its moving child). Use for orbits, wobble, noise drift, counters and seamless loops while the object stays editable.
add_code_animation is an official Exode MCP tool that allows AI coding assistants like Claude Code, Cursor, and Windsurf to adds procedural motion to a normal object: `function animate(t, o, params, ctx)` runs every frame; set o.x/o.y/o.rotation/o.skewx/o.skewy (added), o.scale/o.scalex/o.scaley/o.opacity (multiplied), o.text, o.color. offsets apply to the object's static transform and override its keyframed transform, so to combine with keyframes put the keyframes on a parent frame (not a group, which re-centres on its moving child). use for orbits, wobble, noise drift, counters and seamless loops while the object stays editable.. It directly inspects and modifies local .exode JSON files with precision without manual UI tweaking.
Example Prompt for Claude Code & Cursor
Give this instruction to your AI coding agent to execute this tool on your active .exode workspace:
"Use add_code_animation to configure the motion properties in my active .exode workspace"Tool Parameters & Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | JavaScript defining function animate(t, o, params, ctx) |
| name | string | Optional | The name parameter for add_code_animation. |
| objectId | string | Yes | Object id or name |
| params | object | Optional | The params parameter for add_code_animation. |
| path | string | Yes | The path parameter for add_code_animation. |
| replace | boolean | Optional | Replace the object's existing code animations |
More Animation & Physics Tools
Build & Review Motion Visually
Let Claude or Cursor run add_code_animation, then fine-tune timing, spring physics, and export ready-to-ship code in ExodeUI.