Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
These are the standard easing equations. All of the functions in this module expect a fractional between 0 and 1, and give back a fractional between 0 and 1. Some eases require some configuration. These options are provided via types with default instances.
Synopsis
- type Ease a = Fractional a => a -> a
- newtype Overshoot a = Overshoot a
- backIn :: Overshoot a -> Ease a
- backOut :: Overshoot a -> Ease a
- backInOut :: Ord a => Overshoot a -> Ease a
- bounceIn :: Ord a => Ease a
- bounceOut :: Ord a => Ease a
- bounceInOut :: Ord a => Ease a
- circIn :: Floating a => Ease a
- circOut :: Floating a => Ease a
- circInOut :: (Ord a, Floating a) => Ease a
- newtype Amplitude a = Amplitude a
- data Period a
- = Period a
- | PeriodDefault
- elasticIn :: forall a. (Eq a, Ord a, Floating a) => Amplitude a -> Period a -> Ease a
- elasticOut :: forall a. (Eq a, Ord a, Floating a) => Amplitude a -> Period a -> Ease a
- elasticInOut :: forall a. (Eq a, Ord a, Floating a) => Amplitude a -> Period a -> Ease a
- expoIn :: (Eq a, Floating a) => Ease a
- expoOut :: (Eq a, Floating a) => Ease a
- expoInOut :: (Eq a, Ord a, Floating a) => Ease a
- linear :: Ease a
- quadIn :: Ease a
- quadOut :: Ease a
- quadInOut :: Ord a => Ease a
- cubicIn :: Ease a
- cubicOut :: Ease a
- cubicInOut :: Ord a => Ease a
- quartIn :: Ease a
- quartOut :: Ease a
- quartInOut :: Ord a => Ease a
- quintIn :: Ease a
- quintOut :: Ease a
- quintInOut :: Ord a => Ease a
- sineIn :: Floating a => Ease a
- sineOut :: Floating a => Ease a
- sineInOut :: Floating a => Ease a
- def :: Default a => a
Documentation
type Ease a = Fractional a => a -> a Source #
An Ease is just a function from some fractional to another fractional. Eases expects a term between 0 and 1 and gives a term between 0 and 1. This is not statically checked, but maybe should be.
Back
Bounce
bounceInOut :: Ord a => Ease a Source #
Circ
Elastic
Exponential
Linear
Quad
Cubic
cubicInOut :: Ord a => Ease a Source #
Quart
quartInOut :: Ord a => Ease a Source #
Quint
quintInOut :: Ord a => Ease a Source #