Skip to content

Controller

rech edited this page Jun 15, 2026 · 1 revision

Description

The base class for all controllers.

Remarks

All other types of controller will have properties and methods of this class.

Properties


Name Type Description
active ValueChannel value 1 means object is enabled, 0 means object is disabled

Methods


getChildren()

Description

Return all controllers parented to this controller.

Parameters

_

Return types

Table of Controller

Remarks

_

Example

local trackChildren = Scene.track.getChildren()
for i, channel in ipairs(trackChildren) do
    channel.colorA = Channel.constant(0)
end

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 canvas = Scene.createCanvas()
local text = Scene.createText()
text.setParent(canvas)

copyAllChannelsFrom(controller)

Description

Copy all animatable channels from another controller to this one.

Parameters

Name Type Description
controller Controller The controller to copy channels from

Return types

nil

Remarks

_

Example

local source = Scene.createSprite("a.png")
local dest = Scene.createSprite("b.png")
dest.copyAllChannelsFrom(source)

Clone this wiki locally