Mgameplay

deki-tween

Tweening with 30+ easing functions. Use TweenComponent in the inspector or TweenManager in code.

What it does

deki-tween animates any numeric property over time with a chosen easing curve. The module exposes two surfaces: a TweenComponent you configure in the inspector, and a TweenManager for programmatic control from C++.

Easing functions

30+ named easings, each in In, Out, and InOut variants where applicable:

  • Linear
  • SineSineIn, SineOut, SineInOut
  • Quad / Cubic / Quart / Quint – standard polynomial families
  • ExpoExpoIn, ExpoOut, ExpoInOut
  • CircCircIn, CircOut, CircInOut
  • Back – overshoot at the end
  • Elastic – spring oscillation
  • Bounce – discrete-bounce decay

Example

Inspector-driven (drop a TweenComponent on an object, set fields):

auto* tween = obj->AddComponent<TweenComponent>();
tween->target_property = "x";
tween->from_value = 0.0f;
tween->to_value = 100.0f;
tween->duration = 1.0f;
tween->ease_type = EaseType::QuadOut;
tween->Play();

Code-driven, with a completion callback:

TweenManager::Get().TweenTo(
    &object->x,
    100.0f,
    1.0f,
    EaseType::BackOut,
    [](){ /* on complete */ }
);