remagicaDocs home
API referenceSprites

Update a frame

PATCH
/sprites/frames/{frameId}

Needs a key withsprites:write

Changes a frame's gameplay data (hurt and hit boxes, events, root motion), whether it's locked, or its hold.

Requires scope sprites:write.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Path Parameters

frameId*string
Length1 <= length <= 128

Request Body

application/json
  1. body
gameplay?|null
holdMs?|null
locked?boolean

Response Body

The frame.

application/json
  1. response

A frame of a take.

clipIndex*|

The clip frame it plays; null: it isn't from a clip.

editedFromKey*|

The key before a touch-up, kept for undo.

gameplay*|null
holdMs*|

How long it holds, in ms; null: the action's fps.

id*string
Length1 <= length <= 128
index*integer
isTween*boolean
key*string
locked*boolean

Kept as is when the take is generated again.

offsetX*integer

Where preview and export draw it, in canvas px.

offsetY*integer
score*|

How close it is to the master, 0 to 1.

scoreModel*string|null
takeId*string
Length1 <= length <= 128
url*string

A short-lived download URL.

Example Request
curl -X PATCH 'https://api.remagica.com/api/v1/sprites/frames/f68c2bb4-5b3d-4f60-8e2a-1d9c6b4f7e05' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "clipIndex": 1,  "editedFromKey": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",  "gameplay": {    "events": [      "string"    ],    "hit": {      "h": 1,      "w": 1,      "x": 1,      "y": 1,      "damage": 1,      "knockback": {        "x": 1,        "y": 1      },      "on": true    },    "hurt": {      "h": 1,      "w": 1,      "x": 1,      "y": 1    },    "root": 1  },  "holdMs": 1,  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "index": 1,  "isTween": true,  "key": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",  "locked": true,  "offsetX": 1,  "offsetY": 1,  "score": 1,  "scoreModel": "string",  "takeId": "2a6faac1-5b3d-4f60-8e2a-1d9c6b4f7e05",  "url": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"}