Documentation ¶
Index ¶
- Variables
- func MapInt(m map[string]interface{}, key string, defaultValue int) int
- func MapString(m map[string]interface{}, key string, defaultValue string) string
- func ParseHexColor(s string) (c color.RGBA, err error)
- func ParseStringToUint8(s string) (uint8, error)
- type Effect
- type EffectKind
- type EffectParam
- type Mode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PixelLoopFx = &EffectKind{Code: 0, Name: "Pixel Loop", Description: "Loop a single pixel", AllowedParams: []*EffectParam{ ForegroundFxParam, BackgroundFxParam, SpeedFxParam, }} RandomPixelLoopFx = &EffectKind{Code: 1, Name: "Random Pixel Loop", Description: "Loop a single pixel", AllowedParams: []*EffectParam{ ForegroundFxParam, BackgroundFxParam, SpeedFxParam, }} ForegroundBackgroundLoopFx = &EffectKind{Code: 2, Name: "Foreground/Background Loop", Description: "Loop the foreground and the background", AllowedParams: []*EffectParam{ ForegroundFxParam, BackgroundFxParam, SpeedFxParam, }} ForegroundBackgroundSwitchFx = &EffectKind{Code: 3, Name: "Foreground/Background Switch", Description: "Switch the foreground and the background", AllowedParams: []*EffectParam{ ForegroundFxParam, BackgroundFxParam, SpeedFxParam, }} Fire2021Fx = &EffectKind{Code: 4, Name: "Fire 2021", Description: "Fire !!!", AllowedParams: []*EffectParam{ SpeedFxParam, CrossfadeFxParam, }} Rainbow = &EffectKind{Code: 5, Name: "Rainbow", Description: "Rainbow", AllowedParams: []*EffectParam{}} RainbowSpread = &EffectKind{Code: 6, Name: "Rainbow Spread", Description: "Rainbow Spread", AllowedParams: []*EffectParam{}} )
View Source
var ( ForegroundFxParam = &EffectParam{"fg", "The foreground color"} BackgroundFxParam = &EffectParam{"bg", "The background color"} SpeedFxParam = &EffectParam{"speed", "The speed of the effect"} CrossfadeFxParam = &EffectParam{"crossover", "The amount of crossover between effect cycles"} )
View Source
var ( ExternallySet = &Mode{0, "External", false} DmxIn = &Mode{1, "DMX in", false} DmxOut = &Mode{2, "DMX out", false} DmxToPixelsWithIr = &Mode{3, "DMX > Pixels, IR enabled", true} DmxToPixels = &Mode{4, "DMX > Pixels", false} RgbToPixelsWithIr = &Mode{5, "RGB > Pixels, IR enabled", true} RgbToPixels = &Mode{6, "RGB > Pixels", false} FxToPixelsWithIr = &Mode{7, "Fx > Pixels, IR enabled", true} FxToPixels = &Mode{8, "Fx > Pixels", false} AutoFxWithIr = &Mode{9, "Auto Fx, IR enabled", true} AutoFx = &Mode{10, "Auto Fx", false} Emergency = &Mode{11, "Emergency", false} )
View Source
var Effects = []*EffectKind{ PixelLoopFx, RandomPixelLoopFx, ForegroundBackgroundLoopFx, ForegroundBackgroundSwitchFx, Fire2021Fx, Rainbow, RainbowSpread, }
View Source
var Modes = []*Mode{ ExternallySet, DmxIn, DmxOut, DmxToPixelsWithIr, DmxToPixels, RgbToPixelsWithIr, RgbToPixels, FxToPixelsWithIr, FxToPixels, AutoFxWithIr, AutoFx, Emergency, }
Functions ¶
func ParseStringToUint8 ¶
Types ¶
type Effect ¶
type Effect struct { Kind *EffectKind `json:"kind"` Speed uint8 `json:"speed"` Crossfade uint8 `json:"crossfade"` Foreground color.RGBA `json:"foreground" swaggertype:"string"` Background color.RGBA `json:"background" swaggertype:"string"` }
func (Effect) MarshalJSON ¶
func (*Effect) UnmarshalJSON ¶
type EffectKind ¶
type EffectKind struct { Name string `json:"name"` Description string `json:"description"` Code uint8 `json:"code"` AllowedParams []*EffectParam `json:"allowedParams"` }
type EffectParam ¶
Click to show internal directories.
Click to hide internal directories.