tween

package
Version: v0.0.0-...-a54a77b Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clerp

func Clerp(start, end, value float32) float32

func Color

func Color(t *Tween, arr []float32) []float32

func ColorFmt

func ColorFmt(v engine.Color, arr []float32, s string) engine.Color

func EaseInBack

func EaseInBack(start, end, value float32) float32

func EaseInBounce

func EaseInBounce(start, end, value float32) float32

func EaseInCirc

func EaseInCirc(start, end, value float32) float32

func EaseInCubic

func EaseInCubic(start, end, value float32) float32

func EaseInElastic

func EaseInElastic(start, end, value float32) float32

func EaseInExpo

func EaseInExpo(start, end, value float32) float32

func EaseInOutBack

func EaseInOutBack(start, end, value float32) float32

func EaseInOutBounce

func EaseInOutBounce(start, end, value float32) float32

func EaseInOutCirc

func EaseInOutCirc(start, end, value float32) float32

func EaseInOutCubic

func EaseInOutCubic(start, end, value float32) float32

func EaseInOutElastic

func EaseInOutElastic(start, end, value float32) float32

func EaseInOutExpo

func EaseInOutExpo(start, end, value float32) float32

func EaseInOutQuad

func EaseInOutQuad(start, end, value float32) float32

func EaseInOutQuint

func EaseInOutQuint(start, end, value float32) float32

func EaseInOutSine

func EaseInOutSine(start, end, value float32) float32

func EaseInQuad

func EaseInQuad(start, end, value float32) float32

func EaseInQuart

func EaseInQuart(start, end, value float32) float32

func EaseInQuint

func EaseInQuint(start, end, value float32) float32

func EaseInSine

func EaseInSine(start, end, value float32) float32

func EaseOutBack

func EaseOutBack(start, end, value float32) float32

func EaseOutBounce

func EaseOutBounce(start, end, value float32) float32

func EaseOutCirc

func EaseOutCirc(start, end, value float32) float32

func EaseOutCubic

func EaseOutCubic(start, end, value float32) float32

func EaseOutElastic

func EaseOutElastic(start, end, value float32) float32

func EaseOutExpo

func EaseOutExpo(start, end, value float32) float32

func EaseOutInQuart

func EaseOutInQuart(start, end, value float32) float32

func EaseOutQuad

func EaseOutQuad(start, end, value float32) float32

func EaseOutQuint

func EaseOutQuint(start, end, value float32) float32

func EaseOutSine

func EaseOutSine(start, end, value float32) float32

func EeaseOutQuart

func EeaseOutQuart(start, end, value float32) float32

func Linear

func Linear(start, end, value float32) float32

func Loop

func Loop(t *Tween, progress float32) (newProgress float32, destroy bool)

func None

func None(t *Tween, progress float32) (newProgress float32, destroy bool)

func PingPong

func PingPong(t *Tween, progress float32) (newProgress float32, destroy bool)

func Position

func Position(t *Tween, arr []float32) []float32

func Punch

func Punch(amplitude, value float32) float32

func Rotation

func Rotation(t *Tween, arr []float32) []float32

func Scale

func Scale(t *Tween, arr []float32) []float32

func Spring

func Spring(start, end, value float32) float32

func VectorFmt

func VectorFmt(v engine.Vector, arr []float32, s string) engine.Vector

func VectorFmtRotation

func VectorFmtRotation(v engine.Vector, arr []float32, s string) engine.Vector

func WorldPosition

func WorldPosition(t *Tween, arr []float32) []float32

func WorldRotation

func WorldRotation(t *Tween, arr []float32) []float32

func WorldScale

func WorldScale(t *Tween, arr []float32) []float32

Types

type Algorithm

type Algorithm func(float32, float32, float32) float32

type LoopFunc

type LoopFunc func(t *Tween, progress float32) (newProgress float32, destroy bool)

type Tween

type Tween struct {
	Target *engine.GameObject
	From   []float32
	To     []float32
	Time   time.Duration
	Algo   Algorithm
	Loop   LoopFunc

	StartCallback func()
	EndCallback   func()
	Update        func([]float32)

	Type TypeFunc

	Format string
	// contains filtered or unexported fields
}

func Create

func Create(t *Tween) *Tween

func CreateHelper

func CreateHelper(target *engine.GameObject, typef TypeFunc, from []float32, to []float32, time time.Duration) *Tween

func CreateHelper2

func CreateHelper2(target *engine.GameObject, typef TypeFunc, from []float32, to []float32, time time.Duration, algo Algorithm) *Tween

func CreateHelper3

func CreateHelper3(target *engine.GameObject, typef TypeFunc, from []float32, to []float32, time time.Duration, algo Algorithm, loop LoopFunc) *Tween

func CreateHelper4

func CreateHelper4(target *engine.GameObject, typef TypeFunc, from []float32, to []float32, time time.Duration, algo Algorithm, loop LoopFunc, format string) *Tween

func CreateHelper5

func CreateHelper5(target *engine.GameObject, typef TypeFunc, from []float32, to []float32, time time.Duration, format string) *Tween

func CreateHelper6

func CreateHelper6(target *engine.GameObject, typef TypeFunc, from []float32, to []float32, time time.Duration, algo Algorithm, format string) *Tween

func (*Tween) Progress

func (this *Tween) Progress() float32

func (*Tween) SetFunc

func (this *Tween) SetFunc(typeFunc TypeFunc)

func (*Tween) Value

func (t *Tween) Value() []float32

type Tweens

type Tweens struct {
	engine.BaseComponent
	TweensArr []*Tween
}

func (*Tweens) AddTween

func (this *Tweens) AddTween(tween *Tween)

func (*Tweens) RemoveTween

func (this *Tweens) RemoveTween(tween *Tween)

func (*Tweens) Update

func (this *Tweens) Update()

type TypeFunc

type TypeFunc func(*Tween, []float32) []float32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL