tween

package
v0.0.0-...-9a4be88 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Tween

Immediate mode tweening.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ease

type Ease int
const (
	EaseLinear Ease = iota
	EaseQuad
	EaseCubic
	EaseQuart
	EaseQuint
	EaseExpo
	EaseSine
	EaseCirc
	EaseBack
	EaseElastic
)

type Opts

type Opts struct {
	Ease       Ease
	Transition Transition
	Duration   time.Duration
	Delay      time.Duration
}

type Transition

type Transition int
const (
	TransIn Transition = iota
	TransOut
	TransInOut
)

type Tween

type Tween struct {
	Opts
	// contains filtered or unexported fields
}

func TweenValue

func TweenValue(dt float64, from *float64, to float64, opts *Opts) (done bool, tween *Tween)

func (*Tween) Delete

func (t *Tween) Delete()

func (*Tween) Reset

func (t *Tween) Reset()

func (*Tween) Reverse

func (t *Tween) Reverse()

func (*Tween) Update

func (t *Tween) Update(dt float64) (done bool)

Jump to

Keyboard shortcuts

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