effects

package
v0.0.0-...-98f2a0b Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cycle

type Cycle struct {
	// contains filtered or unexported fields
}

A full cycle goes across 128*6=768 steps: R->R+G->G->G+B->B->B+R->R with each of the six arrows representing the 128 increments between 127 and 0 inclusive of the relevant increase or decrease.

func NewCycle

func NewCycle(cycleTime time.Duration) *Cycle

func (*Cycle) Name

func (f *Cycle) Name() string

func (*Cycle) NextStep

func (c *Cycle) NextStep(pa *pixarray.PixArray, now time.Time) time.Duration

func (*Cycle) Start

func (c *Cycle) Start(pa *pixarray.PixArray, now time.Time)

type Effect

type Effect interface {
	Start(pa *pixarray.PixArray, now time.Time)
	NextStep(pa *pixarray.PixArray, now time.Time) time.Duration
	Name() string
}

type Fade

type Fade struct {
	// contains filtered or unexported fields
}

func NewFade

func NewFade(fadeTime time.Duration, dest pixarray.Pixel) *Fade

func (*Fade) Name

func (f *Fade) Name() string

func (*Fade) NextStep

func (f *Fade) NextStep(pa *pixarray.PixArray, now time.Time) time.Duration

func (*Fade) Start

func (f *Fade) Start(pa *pixarray.PixArray, now time.Time)

type KnightRider

type KnightRider struct {
	// contains filtered or unexported fields
}

func NewKnightRider

func NewKnightRider(pulseTime time.Duration, pulseLen int) *KnightRider

func (*KnightRider) Name

func (f *KnightRider) Name() string

func (*KnightRider) NextStep

func (kr *KnightRider) NextStep(pa *pixarray.PixArray, now time.Time) time.Duration

func (*KnightRider) Start

func (kr *KnightRider) Start(pa *pixarray.PixArray, now time.Time)

type Rainbow

type Rainbow struct {
	// contains filtered or unexported fields
}

func NewRainbow

func NewRainbow(cycleTime time.Duration) *Rainbow

func (*Rainbow) Name

func (r *Rainbow) Name() string

func (*Rainbow) NextStep

func (r *Rainbow) NextStep(pa *pixarray.PixArray, now time.Time) time.Duration

func (*Rainbow) Start

func (r *Rainbow) Start(pa *pixarray.PixArray, now time.Time)

type Zip

type Zip struct {
	// contains filtered or unexported fields
}

func NewZip

func NewZip(zipTime time.Duration, dest pixarray.Pixel) *Zip

func (*Zip) Name

func (f *Zip) Name() string

func (*Zip) NextStep

func (z *Zip) NextStep(pa *pixarray.PixArray, now time.Time) time.Duration

func (*Zip) Start

func (z *Zip) Start(pa *pixarray.PixArray, now time.Time)

Jump to

Keyboard shortcuts

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