effects

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicEffect

type BasicEffect struct {
	shared.TimeSpan
	Rank int
}

func (BasicEffect) Priotity

func (e BasicEffect) Priotity() int

type ColorFunc

type ColorFunc func(t time.Time) color.HSLA

ColorFunc is used by effects to provide colors. Often placed under Effect.color

func NewColorFuncHueBounce

func NewColorFuncHueBounce(colorStart, colorEnd color.HSLA, direction int, shiftFunc ShiftFunc) ColorFunc

NewColorFuncStatic creates a ColorFunc which produces shifting colors, bouncing between colorStart and colorEnd, starting at colorStart and shifting in the direction specified by upSpectrum

func NewColorFuncHueShift

func NewColorFuncHueShift(colorStart color.HSLA, shiftFunc ShiftFunc) ColorFunc

NewColorFuncStatic creates a ColorFunc which produces shifting colors starting at colorStart.

func NewColorFuncStatic

func NewColorFuncStatic(onlyColor color.HSLA) ColorFunc

NewColorFuncStatic creates a ColorFunc which only produces onlyColor.

type ShiftFunc

type ShiftFunc func(t time.Time) float32

func NewShiftFuncLinear

func NewShiftFuncLinear(start time.Time, shiftPerMillisecond float32) ShiftFunc

func NewShiftFuncSinusoidal

func NewShiftFuncSinusoidal(start time.Time, millisecondsPerCycle int, baseShiftPerMillisecond, rangeShift float32) ShiftFunc

type Solid

type Solid struct {
	BasicEffect
	Color ColorFunc
}

func (Solid) Render

func (e Solid) Render(t time.Time, lights []effect.Light) []color.HSLA

Jump to

Keyboard shortcuts

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