Skip to content

ImageController

rech edited this page Jun 15, 2026 · 1 revision

Description

Controller for a canvas image object.

Remarks

Inherited from Controller

Properties


Name Type Description
active ValueChannel value 1 means object is enabled, 0 means object is disabled
translationX ValueChannel The image's position
translationY ValueChannel The image's position
translationZ ValueChannel The image's position
rotationX ValueChannel The image's rotation
rotationY ValueChannel The image's rotation
rotationZ ValueChannel The image's rotation
scaleX ValueChannel The image's scaling
scaleY ValueChannel The image's scaling
scaleZ ValueChannel The image's scaling
colorR ValueChannel The image's color
colorG ValueChannel The image's color
colorB ValueChannel The image's color
colorA ValueChannel The image's color
colorH ValueChannel Hue shift modification of the color
colorS ValueChannel Saturation modification of the color
colorV ValueChannel Brightness modification of the color
rectW ValueChannel The image's width
rectH ValueChannel The image's height
anchorMinX ValueChannel The image's rect transform anchor
anchorMinY ValueChannel The image's rect transform anchor
anchorMaxX ValueChannel The image's rect transform anchor
anchorMaxY ValueChannel The image's rect transform anchor
pivotX ValueChannel The image's rect transform pivot
pivotY ValueChannel The image's rect transform pivot

Remarks

anchorMinX, anchorMinY, anchorMaxX, anchorMaxY will affect how width and height will convert into actual size of the object.

pivotX, pivotY will affect how translationX and translationY will convert into actual position of the object.

Methods


copy()

Description

Create a copy of this controller, along with all of its chilren.

Parameters

_

Return types

ImageController

Remarks

A copied controller will never be persistent.

Example

local img = Scene.createImage("test.png")
local copy = img.copy()

getChildren()

Description

Return all controllers parented to this controller.

Parameters

_

Return types

Table of Controller

Remarks

_

Example

local children = img.getChildren()

setParent(controller)

Description

Set the parent to another controller.

Parameters

Name Type Description
controller Controller The controller to parent to

Return types

nil

Remarks

_

Example

local img = Scene.createImage("test.png")
img.setParent(Scene.worldCanvas)

Clone this wiki locally