Menu

Animations

MeduZaPaT Chris Newton

Animations

Animation configuration files stores the information about how actors and groups interact with each other.
The animation files are stored inside /usr/shared/ledspicer/animations
The animation can have one or more actors.

Root

The root node, like every other configuration file, is <LEDSpicer></LEDSpicer> with the following mandatory parameters: version, and type.

Parameters

version: leave it always to 1.0
type: is Animation

Code

<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
    version="1.0"
    type="Animation"
/>

Actors

Inside the Root node one or more Actors can be defined, every actor will have some generic parameters shared by all actors and some specific parameters.

Parameters

type: Can be one of the following actor types: Gradient, Pulse, Serpentine, Random, Filler, PulseAudio
group: The group that will affect this actor, the group name used on the main configuration file.
speed: Select the speed from: VeryFast, Fast, Normal, Slow, VerySlow (speed is mandatory for some actors).
direction: Select what direction the actor will move (direction is only mandatory for some actors):
Forward: the animation will start from the first element on the group, and when it reaches the last will start over from the first.
Backward: same as forward, but starting from the last element toward the first.
ForwardBouncing: will advance until the last element, and then it will revert to the first element and so on.
BackwardBouncing: same as forward bouncing, but beginning from the last element.
filter: (optional default to Normal) The filter will apply effects when drawing the elements on the layout, by default Normal is used for the first actor on the group and then combine is recommended.
Normal: will replace the color in the element with the new one, so if the element color is black, and the new color is red, the element will be red.
Combine: will combine the element color with the previous element color, so if the element color is red and the new color is blue, the element will be Magenta.
Mask: Will reveal the color under it only if not black, very useful to combine two animations like gradient and serpentine to obtain a gradient serpentine.
Invert: Will reverse the color.
startTime: Number of seconds before this actor will start.
endTime: Number of seconds until the actor will stop.

Special Parameters

Some Actors support the startAt and cycles parameters.

  • startAt: Percent (0 to 100) of the animation where the actor will start, example, an actor moving forward have 20 frames, and you set startAt=50 the actor will start on frame 10 instead of frame 0 like they normally do.
  • cycles: Number of full cycles until the actor stop displaying, if the actor have 20 frames, and you set cycles=3 the actor will stop after 60 frames.

Code

The actor will look like this:

    <actor
        type="Actor type"
        group="group name"
        speed="VerySlow"
        filter="Normal"
        direction="ForwardBouncing"
        actorParameter1="some value"
        actorParameter2="some value"
    />

Types

The program support this actor types:

Pulse

See Pulse.

Gradient

See Gradient

Serpentine

See Serpentine

Random

See Random

Filler

See Filler

PulseAudio

See PulseAudio

FileReader

See FileReader

Example

The animation configuration file can look like this:

<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
    version="1.0"
    type="Animation"
>
    <actor
        type="Gradient"
        group="All"
        colors="Red,Green,Blue"
        mode="Cyclic"
        speed="VerySlow"
        filter="Normal"
        direction="Forward"
    />
    <actor
        type="Serpentine"
        group="All"
        color="LightBlue"
        speed="Fast"
        filter="Combine"
        direction="ForwardBouncing"
        tailLength="3"
        tailColor="Blue"
        tailIntensity="75"
        startTime="10"
    />
</LEDSpicer>

Related

Wiki: FileReader
Wiki: Filler
Wiki: Gradient
Wiki: PC Setup
Wiki: Profiles
Wiki: Pulse
Wiki: PulseAudio
Wiki: Random
Wiki: Serpentine

MongoDB Logo MongoDB