diff --git a/rpi/animations.yaml b/rpi/animations.yaml new file mode 100644 index 0000000..20aa5b1 --- /dev/null +++ b/rpi/animations.yaml @@ -0,0 +1,64 @@ +# This is an example animation definition yaml file + +animations: + - name: Animation1 + description: This is the first animation + loop_count: 1 # Number of loops (1 for single play, 0 for infinite) + + # Define the trigger for this animation. + # In this case, it triggers when a button is pressed. + trigger: button_press + + # Specify whether this animation can be overridden by another animation. + overrideable: true + + graphics: + - type: transition + from: current # A keyvalue describing the current state + to: animation1_frame1.png # Specify the new PNG image for the transition + duration: 10 # The amount of frames the transition will take. + + - type: image + source: animation1_frame1.png + duration: 10 # The amount of frames the image will be shown. + # This is the initial frame of the animation. + + - type: transition + from: animation1_frame1.png + to: animation1_frame2.png + duration: 10 # The amount of frames the transition will take. + # This is a transition from the initial frame to the next frame. + # Transitions can be used to create smooth animations. + + - type: animation + source: animation1.gif + # This is an animated GIF that plays as part of the animation. + # It can add dynamic elements to the animation. + + # You can add more graphics elements as needed for this animation. + + # Additional comments or configuration options for Animation1 can go here. + # For example, you can specify the duration, sound effects, or other details. + + - name: blink + description: Animation for blinking + loop_count: 1 + + trigger: idle_timer + + overrideable: true # blink can be interupted at any time + + graphics: + - type: transition # close the eye from whatever the current state + from: current + to: eyesClosed_neutral.png + duration: 10 + + - type: image # hold eye closed + source: eyesClosed_neutral.png + duration: 20 + + - type: transition # open the eye again from being closed + from: eyesClosed_neutral.png + to: neutral.png + duration: 10