moarpatterns #1
|
@ -32,6 +32,11 @@ var previousEffect queue.QueueItem
|
|||
|
||||
var msDelay = 0
|
||||
|
||||
func isColorSet(c RGBcolor) bool {
|
||||
// Any color so long as it's NOT black!
|
||||
return c[0] != 0 || c[1] != 0 || c[2] != 0
|
||||
}
|
||||
|
||||
func foreverLoop() {
|
||||
for /*ever*/ {
|
||||
time.Sleep(time.Duration(msDelay) * time.Millisecond) //25fps
|
||||
|
@ -169,7 +174,11 @@ func main() {
|
|||
case "line":
|
||||
rearranged = remapping.SliceRearrange(PanelWidth, PanelHeight, true, remapping.XYGridToLinear(PanelWidth, PanelHeight, patterns.ZigZag(PanelWidth, PanelHeight)))
|
||||
case "plasma":
|
||||
rearranged = remapping.SliceRearrange(PanelWidth, PanelHeight, true, remapping.XYGridToLinear(PanelWidth, PanelHeight, patterns.PlasmaPanel(PanelWidth, PanelHeight, currentEffect.Speed)))
|
||||
if isColorSet(currentEffect.SeedColour) {
|
||||
rearranged = remapping.SliceRearrange(PanelWidth, PanelHeight, true, remapping.XYGridToLinear(PanelWidth, PanelHeight, patterns.PlasmaPanelSingleColor(PanelWidth, PanelHeight, currentEffect.Speed, currentEffect.SeedColour)))
|
||||
} else {
|
||||
rearranged = remapping.SliceRearrange(PanelWidth, PanelHeight, true, remapping.XYGridToLinear(PanelWidth, PanelHeight, patterns.PlasmaPanel(PanelWidth, PanelHeight, currentEffect.Speed)))
|
||||
}
|
||||
case "red":
|
||||
rearranged = remapping.SliceRearrange(PanelWidth, PanelHeight, false, remapping.XYGridToLinear(PanelWidth, PanelHeight, patterns.RedPanel(PanelWidth, PanelHeight)))
|
||||
case "random":
|
||||
|
|
Loading…
Reference in New Issue