effect

package
v0.0.0-...-6db7017 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocater

type Allocater interface {
	Allocate(Vibe)
}

type Device

type Device interface {
	Allocater
	Render(time.Time) []*Light
	PruneEffects(time.Time)
}

type Effect

type Effect interface {
	Start() time.Time
	End() time.Time
	Priotity() int
	Render(time.Time, []*Light)
}

type Light

type Light struct {
	Position        int
	Color           color.HSLA
	GetLocationFunc func(position int) space.Vector
}

Light represents a NeoPixel in a line

func (Light) GetColor

func (l Light) GetColor() color.HSLA

GetColor returns the color of the light

func (Light) GetLocation

func (l Light) GetLocation() space.Vector

GetLocation returns the point in space where the Light is

func (Light) GetPosition

func (l Light) GetPosition() int

GetPosition returns the position of the Light (in a string)

func (*Light) SetColor

func (l *Light) SetColor(newColor color.HSLA)

SetColor changes the color of the light

type Vibe

type Vibe interface {
	Start() time.Time
	End() time.Time
	Stabalize() Vibe
	Materialize() []Effect
}

Directories

Path Synopsis
vibe

Jump to

Keyboard shortcuts

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