updaters

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

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

Go to latest
Published: Nov 3, 2016 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	From    color.RGBA      // From the color we transition from
	To      color.RGBA      // To the color we transition to
	Updates chan color.RGBA // A channel that receives color updates
	Done    chan int        // A channel to receive a done signal
	// contains filtered or unexported fields
}

Color provides tween support for colors.

func NewColor

func NewColor(from, to color.Color) *Color

NewColor creates a new color updater with the provided colors and initializes unbuffered channels for Updates and Done signal.

func (*Color) End

func (c *Color) End()

End terminates the color updates.

func (*Color) Start

func (c *Color) Start(framerate, frames int, frameTime, runningTime time.Duration)

Start begins the color update.

func (*Color) Update

func (c *Color) Update(frame tween.Frame)

Update interpolates the color between start and end.

Jump to

Keyboard shortcuts

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