Files
Tasmota/lib/libesp32/berry_animation/anim_examples/compiled/comet_chase.be

86 lines
2.8 KiB
Plaintext

# Generated Berry code from Animation DSL
# Source: comet_chase.anim
# Generated automatically
#
# This file was automatically generated by compile_all_examples.sh
# Do not edit manually - changes will be overwritten
# Original DSL source:
# # Comet Chase - Moving comet with trailing tail
# # Bright head with fading tail
#
# #strip length 60
#
# # Dark blue background
# color space_blue = 0x000066 # Note: opaque 0xFF alpha channel is implicitly added
# animation background = solid(color=space_blue)
#
# # Main comet with bright white head
# animation comet_main = comet_animation(
# color=0xFFFFFF # White head
# tail_length=10 # tail length
# speed=2s # speed
# )
# comet_main.priority = 7
#
# # Secondary comet in different color, opposite direction
# animation comet_secondary = comet_animation(
# color=0xFF4500 # Orange head
# tail_length=8 # shorter tail
# speed=3s # slower speed
# direction=-1 # other direction
# )
# comet_secondary.priority = 5
#
# # Add sparkle trail behind comets but on top of blue background
# animation comet_sparkles = twinkle_animation(
# color=0xAAAAFF # Light blue sparkles
# density=8 # density (moderate sparkles)
# twinkle_speed=400ms # twinkle speed (quick sparkle)
# )
# comet_sparkles.priority = 8
#
# # Start all animations
# run background
# run comet_main
# run comet_secondary
# run comet_sparkles
import animation
# Comet Chase - Moving comet with trailing tail
# Bright head with fading tail
#strip length 60
# Dark blue background
# Auto-generated strip initialization (using Tasmota configuration)
var engine = animation.init_strip()
var space_blue_ = 0xFF000066 # Note: opaque 0xFF alpha channel is implicitly added
var background_ = animation.solid(engine)
background_.color = space_blue_
# Main comet with bright white head
var comet_main_ = animation.comet_animation(engine)
comet_main_.color = 0xFFFFFFFF # White head
comet_main_.tail_length = 10 # tail length
comet_main_.speed = 2000 # speed
comet_main_.priority = 7
# Secondary comet in different color, opposite direction
var comet_secondary_ = animation.comet_animation(engine)
comet_secondary_.color = 0xFFFF4500 # Orange head
comet_secondary_.tail_length = 8 # shorter tail
comet_secondary_.speed = 3000 # slower speed
comet_secondary_.direction = (-1) # other direction
comet_secondary_.priority = 5
# Add sparkle trail behind comets but on top of blue background
var comet_sparkles_ = animation.twinkle_animation(engine)
comet_sparkles_.color = 0xFFAAAAFF # Light blue sparkles
comet_sparkles_.density = 8 # density (moderate sparkles)
comet_sparkles_.twinkle_speed = 400 # twinkle speed (quick sparkle)
comet_sparkles_.priority = 8
# Start all animations
engine.add_animation(background_)
engine.add_animation(comet_main_)
engine.add_animation(comet_secondary_)
engine.add_animation(comet_sparkles_)
engine.start()