mirror of
https://github.com/arendst/Tasmota.git
synced 2025-11-25 02:37:41 +00:00
57 lines
1.2 KiB
Plaintext
57 lines
1.2 KiB
Plaintext
# Generated Berry code from Animation DSL
|
|
# Source: swipe_rainbow.anim
|
|
#
|
|
# This file was automatically generated by compile_all_examples.sh
|
|
# Do not edit manually - changes will be overwritten
|
|
|
|
import animation
|
|
|
|
# Swipe Rainbow
|
|
# Auto-generated strip initialization (using Tasmota configuration)
|
|
var engine = animation.init_strip()
|
|
|
|
var strip_len_ = animation.strip_length(engine)
|
|
var palette_olivary_ = bytes("FFFF0000" "FFFFA500" "FFFFFF00" "FF008000" "FF0000FF" "FF4B0082" "FFEE82EE" "FFFFFFFF")
|
|
var olivary_ = animation.color_cycle(engine)
|
|
olivary_.palette = palette_olivary_
|
|
olivary_.cycle_period = 0
|
|
var swipe_animation_ = animation.solid(engine)
|
|
swipe_animation_.color = olivary_
|
|
var slide_colors_ = animation.SequenceManager(engine)
|
|
.push_play_step(swipe_animation_, 1000)
|
|
.push_closure_step(def (engine) olivary_.next = 1 end)
|
|
engine.add(slide_colors_)
|
|
engine.run()
|
|
|
|
|
|
#- Original DSL source:
|
|
# Swipe Rainbow
|
|
|
|
set strip_len = strip_length()
|
|
|
|
palette palette_olivary = [
|
|
red,
|
|
orange,
|
|
yellow,
|
|
green,
|
|
blue,
|
|
indigo,
|
|
violet,
|
|
white
|
|
]
|
|
|
|
color olivary = color_cycle(palette=palette_olivary, cycle_period=0)
|
|
|
|
animation swipe_animation = solid(
|
|
color = olivary
|
|
)
|
|
|
|
sequence slide_colors {
|
|
play swipe_animation for 1s
|
|
olivary.next = 1
|
|
}
|
|
|
|
run slide_colors
|
|
|
|
-#
|