Skip to content
tweens.gd

Porting from Godot

Legacy eases carry the names of Godot’s transitions and draw the same curves, so a ported tween moves as it did with Godot’s Tween. For most families, the composable In and Out flags draw them too.

Examples use using Godot; and using tweens.gd; in a Node method, with targets inside the scene tree.

Examples use the global Tweens class in a node script, with targets inside the scene tree.

Join the transition and the ease into one name: TransitionType.Elastic with EaseType.Out becomes EaseType.ElasticOut.

Godot's Tween
var tween = sprite.CreateTween();
tween.TweenProperty(sprite, "position", new Vector2(400, 180), 0.8)
.SetTrans(Tween.TransitionType.Elastic)
.SetEase(Tween.EaseType.Out);
tweens.gd
sprite.TweenPosition((400, 180), 0.8, EaseType.ElasticOut);

Join the transition and the ease into one name: TRANS_ELASTIC with EASE_OUT becomes Tweens.Ease.ELASTIC_OUT.

Godot's Tween
var tween := sprite.create_tween()
tween.set_trans(Tween.TRANS_ELASTIC)
tween.set_ease(Tween.EASE_OUT)
tween.tween_property(sprite, "position", Vector2(400, 180), 0.8)
tweens.gd
var arrive := Tweens.position_2d([400, 180], 0.8, Tweens.Ease.ELASTIC_OUT)
Tweens.play(sprite, arrive)

Legacy names

EaseType.SineIn, EaseType.BounceOut: Godot’s transition and ease in one name, with Godot’s curve. Use them to port motion unchanged.

In and Out flags

In.Sine, Out.Cubic, InOut.Back10: mix families, choose overshoot strength, and tune the join. Use them for new motion.

Each Godot transition has a legacy name per ease. Where a flag draws the same curve, either works:

Godot transition Legacy names Same curve with flags
Linear Linear InOut.Linear
Sine SineIn, SineOut, SineInOut In.Sine, Out.Sine, InOut.Sine
Quad QuadIn, QuadOut, QuadInOut In.Quad, Out.Quad, InOut.Quad
Cubic CubicIn, CubicOut, CubicInOut In.Cubic, Out.Cubic, InOut.Cubic
Quart QuartIn, QuartOut, QuartInOut In.Quart, Out.Quart, InOut.Quart
Quint QuintIn, QuintOut, QuintInOut In.Quint, Out.Quint, InOut.Quint
Expo ExpoIn, ExpoOut, ExpoInOut In.Expo, Out.Expo, InOut.Expo
Circ CircIn, CircOut, CircInOut In.Circ, Out.Circ, InOut.Circ
Back BackIn, BackOut, BackInOut In.Back10, Out.Back10, InOut.Back10
Elastic ElasticIn, ElasticOut, ElasticInOut None
Bounce BounceIn, BounceOut, BounceInOut None
Spring None None; see Spring and out-in
  • Flags measure overshoot as a share of the range, so Godot’s Back is Back10. Elastic and Bounce flags are calibrated the same way; only their legacy names keep Godot’s shapes, such as EaseType.BounceOut’s 25% first rebound.
  • Expo matches to within 0.1% of the range: Godot offsets its Expo curves slightly.
  • Don’t combine legacy names with flags.
  • EaseType.Linear, zero, is the default.

Legacy names

Tweens.Ease.SINE_IN, Tweens.Ease.BOUNCE_OUT: Godot’s transition and ease in one name, with Godot’s curve. Use them to port motion unchanged.

In and Out flags

In.SINE, Out.CUBIC, InOut.BACK10: mix families, choose overshoot strength, and tune the join. Use them for new motion.

Each Godot transition has a legacy name per ease in Tweens.Ease. Where a flag draws the same curve, either works:

Godot transition Legacy names Same curve with flags
TRANS_LINEAR LINEAR InOut.LINEAR
TRANS_SINE SINE_IN, SINE_OUT, SINE_IN_OUT In.SINE, Out.SINE, InOut.SINE
TRANS_QUAD QUAD_IN, QUAD_OUT, QUAD_IN_OUT In.QUAD, Out.QUAD, InOut.QUAD
TRANS_CUBIC CUBIC_IN, CUBIC_OUT, CUBIC_IN_OUT In.CUBIC, Out.CUBIC, InOut.CUBIC
TRANS_QUART QUART_IN, QUART_OUT, QUART_IN_OUT In.QUART, Out.QUART, InOut.QUART
TRANS_QUINT QUINT_IN, QUINT_OUT, QUINT_IN_OUT In.QUINT, Out.QUINT, InOut.QUINT
TRANS_EXPO EXPO_IN, EXPO_OUT, EXPO_IN_OUT In.EXPO, Out.EXPO, InOut.EXPO
TRANS_CIRC CIRC_IN, CIRC_OUT, CIRC_IN_OUT In.CIRC, Out.CIRC, InOut.CIRC
TRANS_BACK BACK_IN, BACK_OUT, BACK_IN_OUT In.BACK10, Out.BACK10, InOut.BACK10
TRANS_ELASTIC ELASTIC_IN, ELASTIC_OUT, ELASTIC_IN_OUT None
TRANS_BOUNCE BOUNCE_IN, BOUNCE_OUT, BOUNCE_IN_OUT None
TRANS_SPRING None None; see Spring and out-in
  • Flags measure overshoot as a share of the range, so Godot’s Back is BACK10. Elastic and Bounce flags are calibrated the same way; only their legacy names keep Godot’s shapes, such as Tweens.Ease.BOUNCE_OUT’s 25% first rebound.
  • Expo matches to within 0.1% of the range: Godot offsets its Expo curves slightly.
  • Don’t combine legacy names with flags.
  • Tweens.Ease.LINEAR, zero, is the default.

tweens.gd has no Spring transition and no out-in ease. To keep these curves, let Godot sample them in an ease function:

var arrive = new Tweens.Position2D((400, 180), 0.8)
{
EaseFunction = t => Tween.InterpolateValue(0f, 1f, t, 1,
Tween.TransitionType.Spring, Tween.EaseType.Out).AsSingle(),
};
sprite.Tween(arrive);

Tween.InterpolateValue samples any transition and ease, including Tween.EaseType.OutIn.

var arrive := Tweens.position_2d([400, 180], 0.8)
arrive.ease_function = func(t: float) -> float:
return Tween.interpolate_value(0.0, 1.0, t, 1.0, Tween.TRANS_SPRING, Tween.EASE_OUT)
Tweens.play(sprite, arrive)

Tween.interpolate_value() samples any transition and ease, including Tween.EASE_OUT_IN.

The easing reference lists every flag, and Functions explains ease functions.

The easing reference lists every flag, and Functions explains ease functions.

tweens.gd is made with math & ferrets, copyright © 2026 its contributors.

Godot logo by Andrea Calabró, licensed under CC BY 4.0.

"Easy, the Ferret" illustrations drawn by foxy_maria.

tweens.gd is released under the MIT License.

Godot is licensed under the MIT License.
tweens.gd is not affiliated with or endorsed by the Godot Foundation.