Skip to content

Tween -> Tween<T>

function Fusion.Tween<T>(
    scope: Scope<unknown>,
    goal: UsedAs<T>,
    tweenInfo: UsedAs<TweenInfo>?
) -> Tween<T>

Constructs and returns a new tween state object.

Use scoped() method syntax

This function is intended to be accessed as a method on a scope:

local tween = scope:Tween(goal, info)


Parameters

scope : Scope<S>

The scope which should be used to store destruction tasks for this object.

goal : UsedAs<T>

The goal that this object should follow. For best results, the goal should be animatable.

info : UsedAs<TweenInfo>?

Determines the easing curve that the motion will follow.


Returns -> Tween<T>

A freshly constructed tween state object.


Learn More

Back to top