Tasmota/lib/libesp32/berry_animation/anim_examples/compiled/rainbow_cycle.be
2025-08-01 23:19:24 +02:00

39 lines
1.2 KiB
Plaintext

# Generated Berry code from Animation DSL
# Source: rainbow_cycle.anim
# Generated automatically
#
# This file was automatically generated by compile_all_dsl_examples.sh
# Do not edit manually - changes will be overwritten
# Original DSL source:
# # Rainbow Cycle - Classic WLED effect
# # Smooth rainbow colors cycling across the strip
#
# strip length 60
#
# # Create smooth rainbow cycle animation
# animation rainbow_cycle = color_cycle_animation(
# [0xFF0000, 0xFF8000, 0xFFFF00, 0x00FF00, 0x0000FF, 0x8000FF, 0xFF00FF], # rainbow colors
# 5s # cycle period
# )
#
# # Start the animation
# run rainbow_cycle
import animation
# Rainbow Cycle - Classic WLED effect
# Smooth rainbow colors cycling across the strip
var engine = animation.init_strip(60)
# Create smooth rainbow cycle animation
var rainbow_cycle_ = animation.color_cycle_animation([0xFFFF0000, 0xFFFF8000, 0xFFFFFF00, 0xFF00FF00, 0xFF0000FF, 0xFF8000FF, 0xFFFF00FF], 5000)
# Start the animation
# Start all animations/sequences
if global.contains('sequence_rainbow_cycle')
var seq_manager = global.sequence_rainbow_cycle()
engine.add_sequence_manager(seq_manager)
else
engine.add_animation(animation.global('rainbow_cycle_'))
end
engine.start()