144 lines
5.3 KiB
Plaintext
144 lines
5.3 KiB
Plaintext
# Generated Berry code from Animation DSL
|
|
# Source: plasma_wave.anim
|
|
# Generated automatically
|
|
#
|
|
# This file was automatically generated by compile_all_examples.sh
|
|
# Do not edit manually - changes will be overwritten
|
|
|
|
# Original DSL source:
|
|
# # Plasma Wave - Smooth flowing plasma colors
|
|
# # Continuous color waves like plasma display
|
|
#
|
|
# #strip length 60
|
|
#
|
|
# # Define plasma color palette with smooth transitions
|
|
# palette plasma_colors = [
|
|
# (0, 0xFF0080), # Magenta
|
|
# (51, 0xFF8000), # Orange
|
|
# (102, 0xFFFF00), # Yellow
|
|
# (153, 0x80FF00), # Yellow-green
|
|
# (204, 0x00FF80), # Cyan-green
|
|
# (255, 0x0080FF) # Blue
|
|
# ]
|
|
#
|
|
# # Base plasma animation with medium speed
|
|
# animation plasma_base = rich_palette_animation(palette=plasma_colors, cycle_period=6s, transition_type=SINE, brightness=200)
|
|
#
|
|
# # Add multiple wave layers for complexity
|
|
# color wave1_pattern = rich_palette(palette=plasma_colors, cycle_period=4s, transition_type=SINE, brightness=255)
|
|
# animation plasma_wave1 = beacon_animation(
|
|
# color=wave1_pattern # color source
|
|
# pos=0 # initial position
|
|
# beacon_size=20 # wide wave
|
|
# slew_size=10 # very smooth
|
|
# )
|
|
# plasma_wave1.priority = 10
|
|
# plasma_wave1.pos = smooth(min_value=0, max_value=40, duration=8s)
|
|
#
|
|
# color wave2_pattern = rich_palette(palette=plasma_colors, cycle_period=5s, transition_type=SINE, brightness=180)
|
|
# animation plasma_wave2 = beacon_animation(
|
|
# color=wave2_pattern # color source
|
|
# pos=45 # initial position
|
|
# beacon_size=15 # medium wave
|
|
# slew_size=8 # smooth
|
|
# )
|
|
# plasma_wave2.priority = 8
|
|
# plasma_wave2.pos = smooth(min_value=45, max_value=15, duration=10s) # Opposite direction
|
|
#
|
|
# color wave3_pattern = rich_palette(palette=plasma_colors, cycle_period=3s, transition_type=SINE, brightness=220)
|
|
# animation plasma_wave3 = beacon_animation(
|
|
# color=wave3_pattern # color source
|
|
# pos=20 # initial position
|
|
# beacon_size=12 # smaller wave
|
|
# slew_size=6 # smooth
|
|
# )
|
|
# plasma_wave3.priority = 12
|
|
# plasma_wave3.pos = smooth(min_value=20, max_value=50, duration=6s) # Different speed
|
|
#
|
|
# # Add subtle intensity variation
|
|
# plasma_base.opacity = smooth(min_value=150, max_value=255, duration=12s)
|
|
#
|
|
# # Start all animations
|
|
# run plasma_base
|
|
# run plasma_wave1
|
|
# run plasma_wave2
|
|
# run plasma_wave3
|
|
|
|
import animation
|
|
|
|
# Plasma Wave - Smooth flowing plasma colors
|
|
# Continuous color waves like plasma display
|
|
#strip length 60
|
|
# Define plasma color palette with smooth transitions
|
|
# Auto-generated strip initialization (using Tasmota configuration)
|
|
var engine = animation.init_strip()
|
|
|
|
var plasma_colors_ = bytes("00FF0080" "33FF8000" "66FFFF00" "9980FF00" "CC00FF80" "FF0080FF")
|
|
# Base plasma animation with medium speed
|
|
var plasma_base_ = animation.rich_palette_animation(engine)
|
|
plasma_base_.palette = plasma_colors_
|
|
plasma_base_.cycle_period = 6000
|
|
plasma_base_.transition_type = animation.SINE
|
|
plasma_base_.brightness = 200
|
|
# Add multiple wave layers for complexity
|
|
var wave1_pattern_ = animation.rich_palette(engine)
|
|
wave1_pattern_.palette = plasma_colors_
|
|
wave1_pattern_.cycle_period = 4000
|
|
wave1_pattern_.transition_type = animation.SINE
|
|
wave1_pattern_.brightness = 255
|
|
var plasma_wave1_ = animation.beacon_animation(engine)
|
|
plasma_wave1_.color = wave1_pattern_ # color source
|
|
plasma_wave1_.pos = 0 # initial position
|
|
plasma_wave1_.beacon_size = 20 # wide wave
|
|
plasma_wave1_.slew_size = 10 # very smooth
|
|
plasma_wave1_.priority = 10
|
|
var temp_smooth_153 = animation.smooth(engine)
|
|
temp_smooth_153.min_value = 0
|
|
temp_smooth_153.max_value = 40
|
|
temp_smooth_153.duration = 8000
|
|
plasma_wave1_.pos = temp_smooth_153
|
|
var wave2_pattern_ = animation.rich_palette(engine)
|
|
wave2_pattern_.palette = plasma_colors_
|
|
wave2_pattern_.cycle_period = 5000
|
|
wave2_pattern_.transition_type = animation.SINE
|
|
wave2_pattern_.brightness = 180
|
|
var plasma_wave2_ = animation.beacon_animation(engine)
|
|
plasma_wave2_.color = wave2_pattern_ # color source
|
|
plasma_wave2_.pos = 45 # initial position
|
|
plasma_wave2_.beacon_size = 15 # medium wave
|
|
plasma_wave2_.slew_size = 8 # smooth
|
|
plasma_wave2_.priority = 8
|
|
var temp_smooth_229 = animation.smooth(engine)
|
|
temp_smooth_229.min_value = 45
|
|
temp_smooth_229.max_value = 15
|
|
temp_smooth_229.duration = 10000
|
|
plasma_wave2_.pos = temp_smooth_229 # Opposite direction
|
|
var wave3_pattern_ = animation.rich_palette(engine)
|
|
wave3_pattern_.palette = plasma_colors_
|
|
wave3_pattern_.cycle_period = 3000
|
|
wave3_pattern_.transition_type = animation.SINE
|
|
wave3_pattern_.brightness = 220
|
|
var plasma_wave3_ = animation.beacon_animation(engine)
|
|
plasma_wave3_.color = wave3_pattern_ # color source
|
|
plasma_wave3_.pos = 20 # initial position
|
|
plasma_wave3_.beacon_size = 12 # smaller wave
|
|
plasma_wave3_.slew_size = 6 # smooth
|
|
plasma_wave3_.priority = 12
|
|
var temp_smooth_306 = animation.smooth(engine)
|
|
temp_smooth_306.min_value = 20
|
|
temp_smooth_306.max_value = 50
|
|
temp_smooth_306.duration = 6000
|
|
plasma_wave3_.pos = temp_smooth_306 # Different speed
|
|
# Add subtle intensity variation
|
|
var temp_smooth_329 = animation.smooth(engine)
|
|
temp_smooth_329.min_value = 150
|
|
temp_smooth_329.max_value = 255
|
|
temp_smooth_329.duration = 12000
|
|
plasma_base_.opacity = temp_smooth_329
|
|
# Start all animations
|
|
engine.add_animation(plasma_base_)
|
|
engine.add_animation(plasma_wave1_)
|
|
engine.add_animation(plasma_wave2_)
|
|
engine.add_animation(plasma_wave3_)
|
|
engine.start()
|