Skip to content

Instantly share code, notes, and snippets.

@brianewing
Created October 3, 2017 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianewing/bc80833f1d87fd85df60b1631bf75802 to your computer and use it in GitHub Desktop.
Save brianewing/bc80833f1d87fd85df60b1631bf75802 to your computer and use it in GitHub Desktop.
redshift server types
type Animator struct {
Strip *strip.LEDStrip
Effects []effects.Effect
Running bool
}
func (a *Animator) Run(interval time.Duration) {}
func (a *Animator) Render() {
for _, effect := range a.Effects {
effect.Render(a.Strip)
}
}
type Effect interface {
Render(strip *strip.LEDStrip)
}
type LEDStrip struct {
Size int
Buffer [][]uint8
sync.Mutex
}
func New(size int) *LEDStrip {}
func NewBuffer(size int) [][]uint8 {}
func clearBuffer(buffer [][]uint8) {}
func (s *LEDStrip) Clear() {}
func (s *LEDStrip) SetPixel(i int, color []uint8) {}
func (s *LEDStrip) Randomize() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment