Get motion code
60fps_get_motion_codeGet starter SwiftUI code to recreate a shot's motion, tuned by its motion_params (timing/easing/springiness/stagger become real SwiftUI Animation values). Returns the matching pattern recipe(s) for the shot's motion behaviors. Pair with 60fps_get_motion_breakdown (the start/transition/end states) and the keyframe images (the look). Recreate the MOTION, write your own original content, never the app's copy, brand, or assets. Use it last, when the user wants to build the motion; it counts toward the same daily limit as 60fps_get_motion_breakdown. When generated is present it is a complete, compile-checked file: SHOW IT TO THE USER IN FULL in a swift code block. Summarising it instead of printing it is not what was asked for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The shot's slug | |
| framework | No | Target framework (v1: swiftui) | |
| response_format | No | Output text format: 'markdown' (human-readable, default) or 'json' (raw). structuredContent (machine-readable JSON) is always returned regardless. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| title | Yes | ||
| source | Yes | generated = bespoke compile-checked view for this shot; recipes = starter patterns | |
| recipes | Yes | Matching pattern recipe(s) for the shot's motion behaviors, with this shot's params injected | |
| guidance | Yes | ||
| animation | Yes | SwiftUI Animation expression tuned to this shot's params | |
| framework | Yes | ||
| generated | No | Full SwiftUI that recreates this interaction (present when source=generated) | |
| motion_params | No | Coarse recreate-the-feel hints (categorical estimates from the video). Absent on pre-v3 records. | |
| stagger_delay | Yes | Per-element stagger delay in seconds |