lia.ease

Helper library for easing animations.

Functions

easeIn(t, tMax, start, delta)

Eases in the value over time using an easing function.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeInBack(t, tMax, start, delta)

Eases in the value with a back effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeInBounce(t, tMax, start, delta)

Eases in the value with a bounce effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeInElastic(t, tMax, start, delta)

Eases in the value with an elastic effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeInOut(t, tMax, start, delta)

Eases in and then out the value over time using an easing function.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeInOutBack(t, tMax, start, delta)

Eases in and out the value with a back effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeInOutBounce(t, tMax, start, delta)

Eases in and out the value with a bounce effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeInOutElastic(t, tMax, start, delta)

Eases in and out the value with an elastic effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOut(t, tMax, start, delta)

Eases out the value over time using an easing function.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOutBack(t, tMax, start, delta)

Eases out the value with a back effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOutBounce(t, tMax, start, delta)

Eases out the value with a bounce effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOutElastic(t, tMax, start, delta)

Eases out the value with an elastic effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOutIn(t, tMax, start, delta)

Eases out and then in the value over time using an easing function.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOutInBack(t, tMax, start, delta)

Eases out and then in the value with a back effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOutInBounce(t, tMax, start, delta)

Eases out and then in the value with a bounce effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.

easeOutInElastic(t, tMax, start, delta)

Eases out and then in the value with an elastic effect.

Parameters

  • t Float

    Time elapsed.

  • tMax Float

    The duration of the animation.

  • start Float

    The starting value.

  • delta Float

    The total change in value.

Returns

  • any

    number The eased value.