reanimate-1.0.0.0: Animation library based on SVGs.

Safe HaskellSafe
LanguageHaskell2010

Reanimate.Ease

Description

Easing functions modify the rate of change in animations. More examples can be seen here: https://easings.net/.

Synopsis

Documentation

type Signal = Double -> Double Source #

Signals are time-varying variables. Signals can be composed using function composition.

constantS :: Double -> Signal Source #

Constant signal.

Example:

signalA (constantS 0.5) drawProgress

fromToS :: Double -> Double -> Signal Source #

Signal with new starting and end values.

Example:

signalA (fromToS 0.8 0.2) drawProgress

reverseS :: Signal Source #

Reverse signal order.

Example:

signalA reverseS drawProgress

curveS :: Double -> Signal Source #

S-curve signal. Takes a steepness parameter. 2 is a good default.

Example:

signalA (curveS 2) drawProgress

powerS :: Double -> Signal Source #

Power curve signal. Takes a steepness parameter. 2 is a good default.

Example:

signalA (powerS 2) drawProgress

bellS :: Double -> Signal Source #

Bell-curve signal. Takes a steepness parameter. 2 is a good default.

Example:

signalA (bellS 2) drawProgress

cubicBezierS :: (Double, Double, Double, Double) -> Signal Source #

Cubic Bezier signal. Gives you a fair amount of control over how the signal will curve.

Example:

signalA (cubicBezierS (0.0, 0.8, 0.9, 1.0)) drawProgress