Skip to content

$translate

Adds a translation transformation.

Usage

$translate[canvas;x;y]

Parameters

FieldTypeDescriptionRequired
canvasStringName of the canvas to add a translation transformation in.True
xNumberDistance to move in the horizontal direction. positive = right, negative = left.True
yNumberDistance to move in the vertical direction. positive = right, negative = left.True

Example(s)

No examples for this function.

meow

Raw Info

{
"name": "$translate",
"description": "Adds a translation transformation.",
"params": [
{
"name": "canvas",
"description": "Name of the canvas to add a translation transformation in.",
"type": "String",
"required": true
},
{
"name": "x",
"description": "Distance to move in the horizontal direction. positive = right, negative = left.",
"type": "Number",
"required": true
},
{
"name": "y",
"description": "Distance to move in the vertical direction. positive = right, negative = left.",
"type": "Number",
"required": true
}
],
"usage": "$translate[canvas;x;y]",
"category": "canvas",
"src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/translate.ts",
"docs": "https://aoicanvas.vercel.app/functions/translate"
}