anim

package
v0.0.0-...-cf2a200 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clamp01

func Clamp01(t float32) float32

func EaseIn

func EaseIn(t float32) float32

func EaseInOut

func EaseInOut(t float32) float32

func EaseOut

func EaseOut(t float32) float32

func Flip

func Flip(t float32) float32

func Lerp

func Lerp(start, end, pct float32) float32

func None

func None(t float32) float32

Types

type Anim

type Anim struct {
	T    float32
	Loop bool
	// contains filtered or unexported fields
}

func (*Anim) Advance

func (a *Anim) Advance(dt time.Duration)

func (*Anim) Next

func (a *Anim) Next(V float32, dt time.Duration, easings ...Easing)

func (*Anim) Value

func (a *Anim) Value() float32

type Easing

type Easing func(t float32) float32

type KeyFrame

type KeyFrame struct {
	V    float32
	T    float32
	Ease Easing
}

func (*KeyFrame) Lerp

func (kf *KeyFrame) Lerp(next *KeyFrame, t float32) float32

type KeyFrames

type KeyFrames []KeyFrame

func (KeyFrames) Next

func (kf KeyFrames) Next(V, T float32, easings ...Easing) KeyFrames

func (KeyFrames) Value

func (a KeyFrames) Value(t float32) float32

Jump to

Keyboard shortcuts

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