RGBMatrix.Engine (rgb_matrix v0.1.0) View Source
Renders Animation
s and outputs colors to be
displayed by anything that registers itself with register_paintable/2
.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Sends interaction events to the engine. Animations may or may not respond to these interaction events.
Register a paint function for the engine to send frames to.
Sets the given animation as the currently active animation.
Start the engine.
Unregister a paint function so the engine no longer sends frames to it.
Link to this section Types
Specs
frame() :: %{required(KeyboardLayout.LED.id()) => RGBMatrix.any_color_model()}
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
interact(led :: KeyboardLayout.LED.t()) :: :ok
Sends interaction events to the engine. Animations may or may not respond to these interaction events.
Specs
Register a paint function for the engine to send frames to.
This function is idempotent.
Specs
set_animation(animation :: RGBMatrix.Animation.t()) :: :ok
Sets the given animation as the currently active animation.
Specs
start_link(any()) :: GenServer.on_start()
Start the engine.
This module registers its process globally and is expected to be started by a supervisor.
Specs
unregister_paintable(paint_fn :: function()) :: :ok
Unregister a paint function so the engine no longer sends frames to it.
This function is idempotent.