# Generated Berry code from Animation DSL # Source: twinkle_stars.anim # # This file was automatically generated by compile_all_examples.sh # Do not edit manually - changes will be overwritten import animation # Twinkle Stars - Random sparkling white stars # White sparkles on dark blue background #strip length 60 # Dark blue background # Auto-generated strip initialization (using Tasmota configuration) var engine = animation.init_strip() var night_sky_ = 0xFF000033 var background_ = animation.solid(engine) background_.color = night_sky_ # White twinkling stars var stars_ = animation.twinkle_animation(engine) stars_.color = 0xFFFFFFFF # White stars stars_.density = 8 # density (number of stars) stars_.twinkle_speed = 500 # twinkle speed (twinkle duration) stars_.priority = 10 # Add occasional bright flash var bright_flash_ = animation.twinkle_animation(engine) bright_flash_.color = 0xFFFFFFAA # Bright yellow-white bright_flash_.density = 2 # density (fewer bright flashes) bright_flash_.twinkle_speed = 300 # twinkle speed (quick flash) bright_flash_.priority = 15 # Start all animations engine.add(background_) engine.add(stars_) engine.add(bright_flash_) engine.run() #- Original DSL source: # Twinkle Stars - Random sparkling white stars # White sparkles on dark blue background #strip length 60 # Dark blue background color night_sky = 0x000033 animation background = solid(color=night_sky) # White twinkling stars animation stars = twinkle_animation( color=0xFFFFFF # White stars density=8 # density (number of stars) twinkle_speed=500ms # twinkle speed (twinkle duration) ) stars.priority = 10 # Add occasional bright flash animation bright_flash = twinkle_animation( color=0xFFFFAA # Bright yellow-white density=2 # density (fewer bright flashes) twinkle_speed=300ms # twinkle speed (quick flash) ) bright_flash.priority = 15 # Start all animations run background run stars run bright_flash -#