A scripted effect applied to a path
For effects that can change over time, even
when the path does not change, markNeedsUpdate()
should be called on its context in the advance functionFor more information, see Path Effect Scripts.
Called once when the effect is created or attached.
Return true to keep the effect active, or false to disable it.
-- Called once when the script initializes.function init(self: MyPathEffect, context: Context): boolean -- Return false to stop the script. return trueend
Called any time an input changes or an update is requested.
You receive the original PathData and the node it belongs to, and
must return the path that should be used for rendering.
function update(self: MyPathEffect, inPath: PathData, node: NodeReadData): PathData local path = Path.new() return pathend
Called every frame to advance the effect over time.
seconds is the time delta since the last frame.
Return true to keep the effect active, or false to disable it.
function advance(self: MyPathEffect, seconds: number): boolean return falseend