43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
# Property Assignment Demo
|
|
# Shows how to set animation properties after creation
|
|
|
|
strip length 60
|
|
|
|
# Define colors
|
|
color red_custom = 0xFF0000
|
|
color blue_custom = 0x0000FF
|
|
color green_custom = 0x00FF00
|
|
|
|
# Create animations
|
|
animation left_pulse = pulse_position_animation(red_custom, 15, 15, 3)
|
|
animation center_pulse = pulse_position_animation(blue_custom, 30, 15, 3)
|
|
animation right_pulse = pulse_position_animation(green_custom, 45, 15, 3)
|
|
|
|
# Set different opacities
|
|
left_pulse.opacity = 255 # Full brightness
|
|
center_pulse.opacity = 200 # Slightly dimmed
|
|
right_pulse.opacity = 150 # More dimmed
|
|
|
|
# Set priorities (higher numbers have priority)
|
|
left_pulse.priority = 10
|
|
center_pulse.priority = 15 # Center has highest priority
|
|
right_pulse.priority = 5
|
|
|
|
# Create a sequence that shows all three
|
|
sequence demo {
|
|
play left_pulse for 3s
|
|
wait 500ms
|
|
play center_pulse for 3s
|
|
wait 500ms
|
|
play right_pulse for 3s
|
|
wait 500ms
|
|
|
|
# Play all together for final effect
|
|
repeat 3 times:
|
|
play left_pulse for 2s
|
|
play center_pulse for 2s
|
|
play right_pulse for 2s
|
|
wait 1s
|
|
}
|
|
|
|
run demo |