ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
Easing.hpp File Reference

Easing curves used by transitions and CSS animations. More...

#include "Common.hpp"
#include "CoreTypes.hpp"
#include <cctype>

Go to the source code of this file.

Enumerations

enum class  ZenitUI::TransitionFunction {
  Linear , EaseInQuad , EaseOutQuad , EaseInOutQuad ,
  EaseInCubic , EaseOutCubic , EaseInOutCubic , EaseInBack ,
  EaseOutBack , EaseOutElastic , EaseOutBounce
}
 Timing function applied between two keyframe values. More...

Functions

float ZenitUI::getRatio (float t, TransitionFunction fn)
 Map a normalized time t in [0, 1] through the given easing.
bool ZenitUI::parseEasing (std::string_view name, TransitionFunction &out)
 Parse an easing name (CSS-like) into a TransitionFunction.

Detailed Description

Easing curves used by transitions and CSS animations.