CiscoTheProot/yaml parse test/testAnimationYaml.yaml
CiscoTheWolf 9c008eb58d Further optimisations and rustification of interpolation
Co-authored-by: Patrickfen <Patrickfen@users.noreply.github.com>
2023-10-03 23:17:32 +02:00

95 lines
No EOL
2.7 KiB
YAML

animations:
- name: example animation
description: This is the example animation to showcase some of the options
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: Butn_0001_0001 #Button 1 pressed
# Specify whether this animation can be overridden by another animation.
overrideable: true
graphics:
- type: transition
to_file: animation1_frame1.png # Specify the new PNG image for the transition
duration: 10 # The amount of frames the transition will take.
- type: image
source_file: animation1_frame1.png
duration: 10 # The amount of frames the image will be shown.
# This is the initial frame of the animation.
- type: transition
to_file: 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.
# 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: blinkTimer #Button 2 pressed
overrideable: true # blink can be interupted at any time
graphics:
- type: transition # close the eye from whatever the current state
to_file: eyesClosed_neutral.png
duration: 6
- type: image # hold eye closed
source_file: eyesClosed_neutral.png
duration: 10
- type: transition # open the eye again from being closed
to_file: neutral.png
duration: 6
- name: openEye
description: Animation for blinking
loop_count: 1
trigger: boot
overrideable: true # blink can be interupted at any time
graphics:
- type: image # hold eye closed
source_file: eyesClosed_neutral.png
duration: 1
- type: transition
to_file: dizzyFace.png
duration: 10
- type: transition
to_file: angryFace.png
duration: 10
- type: transition
to_file: loveFace.png
duration: 10
- type: transition
to_file: neutral.png
duration: 10
- name: make dizzy
description: Animation for making dizzy
loop_count: 1
trigger: Butn_0002_0001
overrideable: true # blink can be interupted at any time
graphics:
- type: transition # open the eye again from being closed
to_file: dizzyFace.png
duration: 5