Documentation ¶
Overview ¶
Package ledgend is a Go library aiming to provide a simple api for creating animations You can use to display on a LED strip.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func (*Buffer) AddAnimation ¶
AddAnimation adds an Animation to Buffer's animation queue
func (*Buffer) ApplyQueue ¶
func (b *Buffer) ApplyQueue()
ApplyQueue applies every animation from Buffer's animation_queue in order
If the animation is finished, it removes it from the animation_queue
func (*Buffer) ClearQueue ¶
func (b *Buffer) ClearQueue()
ClearQueue empties the buffer's animation_queue
func (*Buffer) GetAnimationQueue ¶
GetAnimationQueue returns Buffer's animation queue
type SyncBuffer ¶
type SyncBuffer struct {
// contains filtered or unexported fields
}
func GenSyncBuffer ¶
func GenSyncBuffer(length uint16) SyncBuffer
func (*SyncBuffer) AddAnimation ¶
func (sb *SyncBuffer) AddAnimation(a ...Animation)
func (*SyncBuffer) ApplyQueue ¶
func (sb *SyncBuffer) ApplyQueue()
func (*SyncBuffer) ClearQueue ¶
func (sb *SyncBuffer) ClearQueue()
func (*SyncBuffer) GetAnimationQueue ¶
func (sb *SyncBuffer) GetAnimationQueue() []Animation
func (*SyncBuffer) GetPixels ¶
func (sb *SyncBuffer) GetPixels() []Color
Directories ¶
Path | Synopsis |
---|---|
Package animations provides preprogrammed animations You can use in github.com/franeklubi/ledgend! Example usage: buffer.AddAnimation(animations.FromMiddleFullSweep( ledgend.Color{5, 5, 5}, ledgend.Color{8, 8, 8}, time.Millisecond*1000, ))
|
Package animations provides preprogrammed animations You can use in github.com/franeklubi/ledgend! Example usage: buffer.AddAnimation(animations.FromMiddleFullSweep( ledgend.Color{5, 5, 5}, ledgend.Color{8, 8, 8}, time.Millisecond*1000, )) |
Click to show internal directories.
Click to hide internal directories.