ease

package
v0.0.0-...-621cc8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2022 License: BSD-3-Clause, MIT Imports: 1 Imported by: 38

Documentation

Overview

Package ease provides default easing functions to be used in a Tween.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InBack

func InBack(t, b, c, d float32) float32

InBack is a much like InQuint, but extends beyond the start away from end before snapping quickly to the end

func InBounce

func InBounce(t, b, c, d float32) float32

InBounce is a bouncing transition that slowly bounces away from start at increasing amounts before finally accelerating toward end

func InCirc

func InCirc(t, b, c, d float32) float32

InCirc is a circular transition based on the equation for half of a circle, taking the square root of t, that starts slow and speeds up

func InCubic

func InCubic(t, b, c, d float32) float32

InCubic is a cubic transition based on the cube of t that starts slow and speeds up

func InElastic

func InElastic(t, b, c, d float32) float32

InElastic is an elastic transition that wobbles around from the start value, extending past start and away from end, and then accelerates towards the end value at the end of the transition.

func InExpo

func InExpo(t, b, c, d float32) float32

InExpo is a exponential transition based on the 2 to power 10*t that starts slow and speeds up

func InOutBack

func InOutBack(t, b, c, d float32) float32

InOutBack is a much like InOutQuint, but extends beyond both start and end values on both sides of the transition

func InOutBounce

func InOutBounce(t, b, c, d float32) float32

InOutBounce is a bouncing transition that bounces off of the start value, then accelerates toward the average of start and end, then does the opposite toward the end value

func InOutCirc

func InOutCirc(t, b, c, d float32) float32

InOutCirc is a circular transition based on the equation for half of a circle, taking the square root of t, that starts and ends slow, accelerating through the middle

func InOutCubic

func InOutCubic(t, b, c, d float32) float32

InOutCubic is a cubic transition based on the cube of t that starts and ends slow, accelerating through the middle

func InOutElastic

func InOutElastic(t, b, c, d float32) float32

InOutElastic is an elastic transition that wobbles around from the start value, towards the middle of the transition extending beyond start away from end, then rapidly toward, and beyond end value, then wobbling toward end

func InOutExpo

func InOutExpo(t, b, c, d float32) float32

InOutExpo is a exponential transition based on the 2 to power 10*t that starts and ends slow, accelerating through the middle

func InOutQuad

func InOutQuad(t, b, c, d float32) float32

InOutQuad is a quadratic transition based on the square of t that starts and ends slow, accelerating through the middle

func InOutQuart

func InOutQuart(t, b, c, d float32) float32

InOutQuart is a quartic transition based on the fourth power of t that starts and ends slow, accelerating through the middle

func InOutQuint

func InOutQuint(t, b, c, d float32) float32

InOutQuint is a quintic transition based on the fifth power of t that starts and ends slow, accelerating through the middle

func InOutSine

func InOutSine(t, b, c, d float32) float32

InOutSine is a sinusoidal transition based on the cosine of t that starts and ends slow, accelerating through the middle

func InQuad

func InQuad(t, b, c, d float32) float32

InQuad is a quadratic transition based on the square of t that starts slow and speeds up

func InQuart

func InQuart(t, b, c, d float32) float32

InQuart is a quartic transition based on the fourth power of t that starts slow and speeds up

func InQuint

func InQuint(t, b, c, d float32) float32

InQuint is a quintic transition based on the fifth power of t that starts slow and speeds up

func InSine

func InSine(t, b, c, d float32) float32

InSine is a sinusoidal transition based on the cosine of t that starts slow and speeds up

func Linear

func Linear(t, b, c, d float32) float32

Linear is a linear interpolation of some t with respect to a total duration d between the values b and b+c

func OutBack

func OutBack(t, b, c, d float32) float32

OutBack is a much like OutQuint, but extends beyond the end away from start before easing toward end

func OutBounce

func OutBounce(t, b, c, d float32) float32

OutBounce is a bouncing transition that accelerates toward the end value and then bounces back slightly in decreasing amounts until coming to reset at end

func OutCirc

func OutCirc(t, b, c, d float32) float32

OutCirc is a circular transition based on the equation for half of a circle, taking the square root of t, that starts fast and slows down

func OutCubic

func OutCubic(t, b, c, d float32) float32

OutCubic is a cubic transition based on the cube of t that starts fast and slows down

func OutElastic

func OutElastic(t, b, c, d float32) float32

OutElastic is an elastic transition that accelerates quickly away from the start and beyond the end value and then wobbles towards the end value at the end of the transition.

func OutExpo

func OutExpo(t, b, c, d float32) float32

OutExpo is a exponential transition based on the 2 to power 10*t that starts fast and slows down

func OutInBack

func OutInBack(t, b, c, d float32) float32

OutInBack is a much like OutInQuint, but extends beyond the average of start and end during the middle of the transition

func OutInBounce

func OutInBounce(t, b, c, d float32) float32

OutInBounce is a bouncing transition that accelerates toward the average of start and end, bouncing off of the average toward start, then flips and bounces off of average toward end in increasing amounts before accelerating toward end

func OutInCirc

func OutInCirc(t, b, c, d float32) float32

OutInCirc is a circular transition based on the equation for half of a circle, taking the square root of t, that starts and ends fast, slowing through the middle

func OutInCubic

func OutInCubic(t, b, c, d float32) float32

OutInCubic is a cubic transition based on the cube of t that starts and ends fast, slowing through the middle

func OutInElastic

func OutInElastic(t, b, c, d float32) float32

OutInElastic is an elastic transition that accelerates towards and beyond the average of the start and end values, wobbles toward the average, wobbles out and slight away from end before accelerating toward the end value

func OutInExpo

func OutInExpo(t, b, c, d float32) float32

OutInExpo is a exponential transition based on the 2 to power 10*t that starts and ends fast, slowing through the middle

func OutInQuad

func OutInQuad(t, b, c, d float32) float32

OutInQuad is a quadratic transition based on the square of t that starts and ends fast, slowing through the middle

func OutInQuart

func OutInQuart(t, b, c, d float32) float32

OutInQuart is a quartic transition based on the fourth power of t that starts and ends fast, slowing through the middle

func OutInQuint

func OutInQuint(t, b, c, d float32) float32

OutInQuint is a quintic transition based on the fifth power of t that starts and ends fast, slowing through the middle

func OutInSine

func OutInSine(t, b, c, d float32) float32

OutInSine is a sinusoidal transition based on the sine or cosine of t that starts and ends fast, slowing through the middle

func OutQuad

func OutQuad(t, b, c, d float32) float32

OutQuad is a quadratic transition based on the square of t that starts fast and slows down

func OutQuart

func OutQuart(t, b, c, d float32) float32

OutQuart is a quartic transition based on the fourth power of t that starts fast and slows down

func OutQuint

func OutQuint(t, b, c, d float32) float32

OutQuint is a quintic transition based on the fifth power of t that starts fast and slows down

func OutSine

func OutSine(t, b, c, d float32) float32

OutSine is a sinusoidal transition based on the sine or cosine of t that starts fast and slows down

Types

type TweenFunc

type TweenFunc func(t, b, c, d float32) float32

TweenFunc provides an interface used for the easing equation. You can use one of the provided easing functions or provide your own. t = current time, b = begin value, c = change from begin, d = duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL