effect

package
v0.0.0-...-d0bc179 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Effects = make(map[string]Effect, 0)

Functions

func Fill

func Fill(canvas *ledclient.Canvas, col colorful.Color)

Fill fills the entire color with one color.

func FillFunc

func FillFunc(canvas *ledclient.Canvas, f func(x, y int, c colorful.Color) colorful.Color)

FillFunc executes a callback function for every LED in the canvas. The callback function must return the new LED color. Arguments to the callback function is the physical LED coordinates and the existing color.

func Run

func Run(canvas *ledclient.Canvas, ch chan Parameters, terminate chan int)

Run runs an effect forever.

Types

type Effect

type Effect interface {
	Draw(*ledclient.Canvas, Parameters)
	Delay() time.Duration
}

type Parameters

type Parameters struct {
	Name   string
	Color  colorful.Color
	Adjust float64
	Angle  float64
}

Jump to

Keyboard shortcuts

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