|
JNGL
Easy to use cross-platform 2D game library
|
Effects that can be applied to jngl::Widget. More...
Go to the source code of this file.
Classes | |
| class | Effect |
| Base class for effects that can be applied to jngl::Widget. More... | |
| class | UpdateModelview |
| class | Zoom |
| Scales the ModelView matrix. More... | |
| class | Executor |
| Executes a specific action, e.g. removes the Widget. More... | |
| class | Move |
Namespaces | |
| namespace | jngl |
| JNGL's main namespace. | |
Functions | |
| float | linear (float) |
| Easing functions f(t) mapping t in [0, 1] to a value in [0, 1] (values outside this range are clamped). | |
| float | elastic (float) |
| Overshoots past 1 and oscillates back, like a spring settling into place. | |
| float | cubic (float) |
| Ease-out: starts fast, decelerates into the target (1 - (1 - t)^3). | |
| float | expo (float) |
| Ease-out like cubic(), but with a sharper start and flatter tail. | |
Effects that can be applied to jngl::Widget.
Definition in file effects.hpp.
| float linear | ( | float | ) |
Easing functions f(t) mapping t in [0, 1] to a value in [0, 1] (values outside this range are clamped).
They share the same shape: f(0) == 0 and f(1) == 1, only the path between differs. Constant speed, no easing.
1| / | / | / | / 0|/_________ 0 1
| float elastic | ( | float | ) |
Overshoots past 1 and oscillates back, like a spring settling into place.
1| /\ ___ | / \/ | / | / 0|/_________ 0 1
| float cubic | ( | float | ) |
Ease-out: starts fast, decelerates into the target (1 - (1 - t)^3).
1| ____-— | / | / | / 0|/_________ 0 1
| float expo | ( | float | ) |
Ease-out like cubic(), but with a sharper start and flatter tail.
1| _------— |/ | | 0|__________ 0 1