Duplicate layer
duplicate_layerComposition primitive: clone a leaf (image. / video. / shapes. / text.) count times, applying a cumulative per-step transform — copy i is offset by i·(dx,dy) px, rotated by i·d_rotation°, and scaled by d_scale^i. One call instead of dozens: a circle of stars (dx/dy + d_rotation), a row of chevrons (dx), a fractal (d_scale<1 + d_rotation), a staggered grid. Styles are copied; animate the result afterwards (e.g. group + a cycle-loop track for endless marching).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"elementId": "<elementId>",
"count": "<count>",
"projectId": "<projectId>"
},
"name": "duplicate_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dx | No | Per-step x offset in px. | |
| dy | No | Per-step y offset in px. | |
| count | Yes | Number of copies to create. | |
| d_scale | No | Per-step size multiplier (1 = no change). | |
| elementId | Yes | Leaf to clone (e.g. shapes.chevron-1). | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. | |
| d_rotation | No | Per-step rotation in degrees. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The payload, shaped by the tool. | |
| note | No | What to do next when not ready. | |
| error | No | Why it failed. | |
| status | No | For cache-backed readers: whether the answer was ready. | |
| editorUrl | No | Opens this project in the editor. |