diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_10_palette_rotation.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_10_palette_rotation.anim deleted file mode 100644 index c891d09e4..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_10_palette_rotation.anim +++ /dev/null @@ -1,20 +0,0 @@ -# @desc Rainbow colors cycling through the entire strip over time - -# define a palette of rainbow colors including white with constant brightness -palette rainbow_with_white = [ - 0xFC0000 # Red - 0xFF8000 # Orange - 0xFFFF00 # Yellow - 0x00FF00 # Green - 0x00FFFF # Cyan - 0x0080FF # Blue - 0x8000FF # Violet - 0xCCCCCC # White -] - -# define a color attribute that cycles over time, cycle is 5 seconds -color eye_color = color_cycle(palette=rainbow_with_white, cycle_period=5s) - -animation back = solid(color=eye_color) - -run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_00_plain.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_10_plain.anim similarity index 100% rename from lib/libesp32/berry_animation/anim_tutorials/chap_1_00_plain.anim rename to lib/libesp32/berry_animation/anim_tutorials/chap_1_10_plain.anim diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_20_color_transition.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_20_color_transition.anim deleted file mode 100644 index b22c4cb9a..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_20_color_transition.anim +++ /dev/null @@ -1,22 +0,0 @@ -# @desc Smooth color transitions using rich_palette with sine interpolation - -# define a palette of rainbow colors including white with constant brightness -palette rainbow_with_white = [ - 0xFC0000 # Red - 0xFF8000 # Orange - 0xFFFF00 # Yellow - 0x00FF00 # Green - 0x00FFFF # Cyan - 0x0080FF # Blue - 0x8000FF # Violet - 0xCCCCCC # White - 0xFC0000 # Red - need to add the first color at last position to ensure roll-over -] - -# define a color attribute that cycles over time, cycle is 10 seconds -color rainbow_rich_color = rich_palette(palette=rainbow_with_white, cycle_period=10s, transition_type=SINE) - -animation back = solid(color=rainbow_rich_color) - -run back - diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_20_plain_custom_color.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_20_plain_custom_color.anim new file mode 100644 index 000000000..5231724f4 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_1_20_plain_custom_color.anim @@ -0,0 +1,5 @@ +# @desc Solid dark clue - using a custom color + +color space_blue = 0x000066 # Note: opaque 0xFF alpha channel is implicitly added +animation back = solid(color=space_blue) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_30_color_pattern.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_30_color_pattern.anim deleted file mode 100644 index 31c3ccfa6..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_30_color_pattern.anim +++ /dev/null @@ -1,21 +0,0 @@ -# @desc Rainbow gradient pattern across the LED strip - -# define a palette of rainbow colors including white with constant brightness -palette rainbow_with_white = [ - 0xFC0000 # Red - 0xFF8000 # Orange - 0xFFFF00 # Yellow - 0x00FF00 # Green - 0x00FFFF # Cyan - 0x0080FF # Blue - 0x8000FF # Violet - 0xCCCCCC # White -] - -# define a color attribute that cycles over time, cycle is 10 seconds -color rainbow_rich_color = rich_palette(palette=rainbow_with_white, cycle_period=10s, transition_type=SINE) - -# define a gradient across the whole strip -animation back_pattern = palette_gradient_animation(color_source = rainbow_rich_color) - -run back_pattern diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_30_twinkle.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_30_twinkle.anim new file mode 100644 index 000000000..977e8e3c7 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_1_30_twinkle.anim @@ -0,0 +1,4 @@ +# @desc Twinkle stars - using predefined animations + +animation stars = twinkle_animation() +run stars \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_31_color_pattern_spatial_2.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_31_color_pattern_spatial_2.anim deleted file mode 100644 index 7c58b9475..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_31_color_pattern_spatial_2.anim +++ /dev/null @@ -1,25 +0,0 @@ -# @desc Rainbow gradient with 2 repetitions across the strip - -# define a palette of rainbow colors including white with constant brightness -palette rainbow_with_white = [ - 0xFC0000 # Red - 0xFF8000 # Orange - 0xFFFF00 # Yellow - 0x00FF00 # Green - 0x00FFFF # Cyan - 0x0080FF # Blue - 0x8000FF # Violet - 0xCCCCCC # White - 0xFC0000 # Red - need to add the first color at last position to ensure roll-over -] - -# define a color attribute that cycles over time, cycle is 10 seconds -color rainbow_rich_color = rich_palette(palette=rainbow_with_white, cycle_period=10s, transition_type=SINE) - -# since strip_length is dynamic, we need to map it to a variable -set strip_len = strip_length() - -# define a gradient across the whole strip -animation back_pattern = palette_gradient_animation(color_source = rainbow_rich_color, spatial_period = strip_len / 2) - -run back_pattern diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_32_color_pattern_spatial_osc.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_32_color_pattern_spatial_osc.anim deleted file mode 100644 index 73f0f51ae..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_32_color_pattern_spatial_osc.anim +++ /dev/null @@ -1,28 +0,0 @@ -# @desc Rainbow gradient with oscillating spatial period (breathing effect) - -# define a palette of rainbow colors including white with constant brightness -palette rainbow_with_white = [ - 0xFC0000 # Red - 0xFF8000 # Orange - 0xFFFF00 # Yellow - 0x00FF00 # Green - 0x00FFFF # Cyan - 0x0080FF # Blue - 0x8000FF # Violet - 0xCCCCCC # White - 0xFC0000 # Red - need to add the first color at last position to ensure roll-over -] - -# define a color attribute that cycles over time, cycle is 10 seconds -color rainbow_rich_color = rich_palette(palette=rainbow_with_white, cycle_period=0, transition_type=SINE) - -# since strip_length is dynamic, we need to map it to a variable -set strip_len = strip_length() - -# define the oscillator for spatial period between 1/2 strip_len and 3/2 -set period = sine_osc(min_value = strip_len / 2, max_value = (3 * strip_len) / 2, duration = 5s) - -# define a gradient across the whole strip -animation back_pattern = palette_gradient_animation(color_source = rainbow_rich_color, spatial_period = period) - -run back_pattern diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_33_color_pattern_spatial_rotate.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_33_color_pattern_spatial_rotate.anim deleted file mode 100644 index 6665725a5..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_33_color_pattern_spatial_rotate.anim +++ /dev/null @@ -1,22 +0,0 @@ -# @desc Rainbow gradient rotating along the strip over 5 seconds - -# define a palette of rainbow colors including white with constant brightness -palette rainbow_with_white = [ - 0xFC0000 # Red - 0xFF8000 # Orange - 0xFFFF00 # Yellow - 0x00FF00 # Green - 0x00FFFF # Cyan - 0x0080FF # Blue - 0x8000FF # Violet - 0xCCCCCC # White - 0xFC0000 # Red - need to add the first color at last position to ensure roll-over -] - -# define a color attribute cycles color in space -color rainbow_rich_color = rich_palette(palette=rainbow_with_white, cycle_period=0, transition_type=SINE) - -# define a gradient across the whole strip -animation back_pattern = palette_gradient_animation(color_source = rainbow_rich_color, shift_period = 5s) - -run back_pattern diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_40_color_pattern_meter.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_40_color_pattern_meter.anim deleted file mode 100644 index 5b7def77e..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_40_color_pattern_meter.anim +++ /dev/null @@ -1,21 +0,0 @@ -# @desc VU-meter style animation with green-yellow-red gradient at 85% - -# define a palette of rainbow colors including white with constant brightness -palette vue_meter_palette = [ - ( 0, 0x00FF00) # Green - (143, 0x00FF00) - - (164, 0xFFFF00) # Yellow - (207, 0xFFFF00) - - (228, 0xFF0000) # Red - (255, 0xFF0000) -] - -# define a color palette pattern for 'vue_meter_palette' -color rainbow_rich_color = rich_palette(palette=vue_meter_palette, cycle_period=0, transition_type=LINEAR) - -# define a vue-meter based on all elements above -animation back_pattern = palette_meter_animation(color_source = rainbow_rich_color, level = 85%) - -run back_pattern diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_40_twinke_params.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_40_twinke_params.anim new file mode 100644 index 000000000..87775c142 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_1_40_twinke_params.anim @@ -0,0 +1,10 @@ +# @desc Twinkle stars with parameters - using animation parameters + +# Note: when parameters are in separate lines, you don't need a comma ',' +animation stars = twinkle_animation( + color=0xFFFFAA # Light yellow sparkles + density=8 # density (moderate sparkles) + twinkle_speed=100ms # twinkle speed + fade_speed=50 # when no unit, time unit is 'ms' +) +run stars \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_50_twinke_night.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_1_50_twinke_night.anim new file mode 100644 index 000000000..a3dc5a5aa --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_1_50_twinke_night.anim @@ -0,0 +1,16 @@ +# @desc Twinkle night - twinkle stars over a dark night + +# Dark blue background +color space_blue = 0x000066 # Note: opaque 0xFF alpha channel is implicitly added +animation background = solid(color=space_blue) +run background + +# Note: when parameters are in separate lines, you don't need a comma ',' +animation stars = twinkle_animation( + color=0xFFFFAA # Light yellow sparkles + density=8 # density (moderate sparkles) + twinkle_speed=100ms # twinkle speed + fade_speed=50 # when no unit, time unit is 'ms' + priority=8 # default priority is 10, so being lower than background puts it on top +) +run stars \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_2_10_palette_rotation.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_2_10_palette_rotation.anim new file mode 100644 index 000000000..c67652c79 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_2_10_palette_rotation.anim @@ -0,0 +1,8 @@ +# @desc Rainbow colors cycling through the entire strip over time + +# Define a color attribute that cycles over time, cycle is 5 seconds +# PALETTE_RAINBOW defines 7 rainbow colors at roughly the same brightness +# PALETTE_RAINBOW_W adds 8th color white +color rainbow_color = color_cycle(palette=PALETTE_RAINBOW_W, cycle_period=5s) +animation back = solid(color=rainbow_color) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_2_10_sky.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_2_10_sky.anim deleted file mode 100644 index 3dd728c94..000000000 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_2_10_sky.anim +++ /dev/null @@ -1,17 +0,0 @@ -# @desc Night sky with twinkling stars on dark blue background - -# Dark blue background -color space_blue = 0x000066 # Note: opaque 0xFF alpha channel is implicitly added -animation background = solid(color=space_blue) - -# Add sparkle trail behind comets but on top of blue background -animation stars = twinkle_animation( - color=0xFFFFAA # Light blue sparkles - density=8 # density (moderate sparkles) - twinkle_speed=400ms # twinkle speed (quick sparkle) - priority = 8 -) - -# Start all animations -run background -run stars diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_2_20_palette_rotation.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_2_20_palette_rotation.anim new file mode 100644 index 000000000..b794a432b --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_2_20_palette_rotation.anim @@ -0,0 +1,21 @@ +# @desc Rainbow colors cycling with custom palette + +# Define a palette of rainbow colors including white with constant brightness +# By default spacing in time is evenly spread over all colors +palette rainbow_with_white = [ + 0xFC0000 # Red + 0xFF8000 # Orange + 0xFFFF00 # Yellow + 0x00FF00 # Green + 0x00FFFF # Cyan + 0x0080FF # Blue + 0x8000FF # Violet + 0xCCCCCC # White +] + +# Define a color attribute that cycles over time, cycle is 5 seconds +color rainbow_color = color_cycle(palette=rainbow_with_white, cycle_period=5s) + +# Define a solid background with this dynamic color +animation back = solid(color=rainbow_color) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_3_10_color_transition.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_3_10_color_transition.anim new file mode 100644 index 000000000..c8e94d536 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_3_10_color_transition.anim @@ -0,0 +1,7 @@ +# @desc Smooth cycling through rainbow colors with custom palette + +animation back = rich_palette_animation() +# Equivalent to +# animation back = rich_palette_animation(palette=PALETTE_PALETTE_RAINBOW, cycle_period=5s, +# transition_type=SINE, brightness=100%) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_3_20_color_transition_palette.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_3_20_color_transition_palette.anim new file mode 100644 index 000000000..38e057998 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_3_20_color_transition_palette.anim @@ -0,0 +1,22 @@ +# @desc Smooth cycling through rainbow colors with custom palette + +# This is the more explicit version +# Define a palette of rainbow colors including white with constant brightness +palette rainbow_with_white = [ + 0xFC0000 # Red + 0xFF8000 # Orange + 0xFFFF00 # Yellow + 0x00FF00 # Green + 0x00FFFF # Cyan + 0x0080FF # Blue + 0x8000FF # Violet + 0xCCCCCC # White + 0xFC0000 # Red - need to add the first color at last position to ensure roll-over +] + +# Define a color attribute that cycles over time, cycle is 10 seconds +color rainbow_color_rollover = rich_palette(cycle_period=10s) + +# Use the dynamic color in a simple 'solid' animation +animation back = solid(color=rainbow_color_rollover) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_4_10_color_pattern.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_4_10_color_pattern.anim new file mode 100644 index 000000000..725e20acf --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_4_10_color_pattern.anim @@ -0,0 +1,9 @@ +# @desc Rainbow pattern + +# Define a smooth palette using PALETTE_RAINBOW_W (7 colors + white) +# 'cycle_period = 0' means that the colors don't change in time, only spatial change +color rainbow_rich_color = rich_palette(palette=PALETTE_RAINBOW_W, cycle_period=0) + +# Define a gradient across the whole strip +animation back_pattern = palette_gradient_animation(color_source = rainbow_rich_color) +run back_pattern \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_4_12_color_pattern_spatial_2.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_4_12_color_pattern_spatial_2.anim new file mode 100644 index 000000000..f5c704fce --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_4_12_color_pattern_spatial_2.anim @@ -0,0 +1,14 @@ +# @desc Rainbow gradient with 2 repetitions across the strip + + +# Define a smooth palette using PALETTE_RAINBOW_W (7 colors + white) +# 'cycle_period = 0' means that the colors don't change in time, only spatial change +color rainbow_rich_color = rich_palette(palette=PALETTE_RAINBOW_W, cycle_period=0) + +# Because strip_length is dynamic, we need to map it to a variable and can't use the function directly in formulas +set strip_len = strip_length() + +# define a gradient across the whole strip +animation back_pattern = palette_gradient_animation(color_source = rainbow_rich_color, + spatial_period = strip_len / 2) +run back_pattern \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_4_15_color_pattern_spatial_osc.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_4_15_color_pattern_spatial_osc.anim new file mode 100644 index 000000000..77ac0b88a --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_4_15_color_pattern_spatial_osc.anim @@ -0,0 +1,15 @@ +# @desc Rainbow gradient with oscillating spatial period between 100% and 50% + +# Define a smooth palette using PALETTE_RAINBOW_W (7 colors + white) +# 'cycle_period = 0' means that the colors don't change in time, only spatial change +color rainbow_rich_color = rich_palette(palette=PALETTE_RAINBOW_W, cycle_period=0) + +# Because strip_length is dynamic, we need to map it to a variable and can't use the function directly in formulas +set strip_len = strip_length() + +# Define the sine oscillator for spatial period between 1/2 strip_len and 3/2 +set period = sine_osc(min_value = (strip_len - 1) / 2, max_value = (3 * strip_len) / 2, duration = 5s) + +# Define a gradient across the whole strip with variable spatial_period +animation back = palette_gradient_animation(color_source = rainbow_rich_color, spatial_period = period) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_4_18_color_pattern_spatial_rotate.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_4_18_color_pattern_spatial_rotate.anim new file mode 100644 index 000000000..189b1a247 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_4_18_color_pattern_spatial_rotate.anim @@ -0,0 +1,9 @@ +# @desc Rainbow gradient rotating along the strip over 5 seconds + +# Define a smooth palette using PALETTE_RAINBOW_W (7 colors + white) +# 'cycle_period = 0' means that the colors don't change in time, only spatial change +color rainbow_rich_color = rich_palette(palette=PALETTE_RAINBOW_W, cycle_period=0) + +# define a gradient across the whole strip +animation back = palette_gradient_animation(color_source = rainbow_rich_color, shift_period = 5s) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_4_30_color_pattern_meter.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_4_30_color_pattern_meter.anim new file mode 100644 index 000000000..b3516240f --- /dev/null +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_4_30_color_pattern_meter.anim @@ -0,0 +1,23 @@ +# @desc VU-meter style animation with green-yellow-red gradient with sawtooth level + +# Define a palette of rainbow colors including white with constant brightness +palette vue_meter_palette = [ + ( 0, 0x00FF00) # Green + (143, 0x00FF00) + + (164, 0xFFFF00) # Yellow + (207, 0xFFFF00) + + (228, 0xFF0000) # Red + (255, 0xFF0000) +] + +# Define a color palette pattern for 'vue_meter_palette' +color rainbow_rich_color = rich_palette(palette=vue_meter_palette, cycle_period=0, transition_type=LINEAR) + +# Define a sawtooth value from 0% to 100% +set level = sawtooth(min_value = 0%, max_value=100%, duration = 2s) + +# Define a vue-meter based on all elements above +animation back = palette_meter_animation(color_source = rainbow_rich_color, level = level) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_1_41_color_pattern_meter_random.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_4_35_color_pattern_meter_random.anim similarity index 54% rename from lib/libesp32/berry_animation/anim_tutorials/chap_1_41_color_pattern_meter_random.anim rename to lib/libesp32/berry_animation/anim_tutorials/chap_4_35_color_pattern_meter_random.anim index a8fd63a7a..60ef64b30 100644 --- a/lib/libesp32/berry_animation/anim_tutorials/chap_1_41_color_pattern_meter_random.anim +++ b/lib/libesp32/berry_animation/anim_tutorials/chap_4_35_color_pattern_meter_random.anim @@ -1,5 +1,6 @@ # @desc VU-meter with random level using custom Berry function +# Embed native Berry code to define a random generator function berry """ # define a pseudo-random generator, returns value in range 0..255 def rand_meter(engine) @@ -7,9 +8,10 @@ def rand_meter(engine) end """ -extern function rand_meter # declare the external function +# Declare the external function so it can be used in the animation +extern function rand_meter -# define a palette of rainbow colors including white with constant brightness +# Define a palette of rainbow colors including white with constant brightness palette vue_meter_palette = [ ( 0, 0x00FF00) # Green (143, 0x00FF00) @@ -21,10 +23,9 @@ palette vue_meter_palette = [ (255, 0xFF0000) ] -# define a color palette pattern for 'vue_meter_palette' +# Define a color palette pattern for 'vue_meter_palette' color rainbow_rich_color = rich_palette(palette=vue_meter_palette, cycle_period=0, transition_type=LINEAR) -# define a vue-meter based on all elements above -animation back_pattern = palette_meter_animation(color_source = rainbow_rich_color, level = rand_meter()) - -run back_pattern +# Define a vue-meter based on all elements above +animation back = palette_meter_animation(color_source = rainbow_rich_color, level = rand_meter()) +run back \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_5_10_template_cylon_simple.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_8_10_template_cylon_simple.anim similarity index 100% rename from lib/libesp32/berry_animation/anim_tutorials/chap_5_10_template_cylon_simple.anim rename to lib/libesp32/berry_animation/anim_tutorials/chap_8_10_template_cylon_simple.anim diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_5_21_template_shutter_bidir_flags.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_8_21_template_shutter_bidir_flags.anim similarity index 100% rename from lib/libesp32/berry_animation/anim_tutorials/chap_5_21_template_shutter_bidir_flags.anim rename to lib/libesp32/berry_animation/anim_tutorials/chap_8_21_template_shutter_bidir_flags.anim diff --git a/lib/libesp32/berry_animation/anim_tutorials/chap_5_22_template_shutter_bidir.anim b/lib/libesp32/berry_animation/anim_tutorials/chap_8_22_template_shutter_bidir.anim similarity index 100% rename from lib/libesp32/berry_animation/anim_tutorials/chap_5_22_template_shutter_bidir.anim rename to lib/libesp32/berry_animation/anim_tutorials/chap_8_22_template_shutter_bidir.anim diff --git a/lib/libesp32/berry_animation/src/animations/palettes.be b/lib/libesp32/berry_animation/src/animations/palettes.be index 2c5a74723..790a1d67c 100644 --- a/lib/libesp32/berry_animation/src/animations/palettes.be +++ b/lib/libesp32/berry_animation/src/animations/palettes.be @@ -9,14 +9,14 @@ # Standard rainbow palette (7 colors with roughly constant brightness) var PALETTE_RAINBOW = bytes( - "00FC0000" # Red (value 0) - "24FF8000" # Orange (value 36) - "49FFFF00" # Yellow (value 73) - "6E00FF00" # Green (value 110) - "9200FFFF" # Cyan (value 146) - "B70080FF" # Blue (value 183) - "DB8000FF" # Violet (value 219) - "FFFF0000" # Red (value 255) + "FFFC0000" # Red + "FFFF8000" # Orange + "FFFFFF00" # Yellow + "FF00FF00" # Green + "FF00FFFF" # Cyan + "FF0080FF" # Blue + "FF8000FF" # Violet + "FFFC0000" # Red ) # Simple RGB palette (3 colors) diff --git a/lib/libesp32/berry_animation/src/animations/twinkle.be b/lib/libesp32/berry_animation/src/animations/twinkle.be index 29ff23e88..63f4b8349 100644 --- a/lib/libesp32/berry_animation/src/animations/twinkle.be +++ b/lib/libesp32/berry_animation/src/animations/twinkle.be @@ -16,9 +16,9 @@ class TwinkleAnimation : animation.animation # Parameter definitions with constraints static var PARAMS = animation.enc_params({ - "color": {"default": 0xFFFFFFFF}, - "density": {"min": 0, "max": 255, "default": 128}, - "twinkle_speed": {"min": 1, "max": 5000, "default": 6}, + "color": {"default": 0xFFFFFFBB}, # slightly yellow stars + "density": {"min": 0, "max": 255, "default": 64}, + "twinkle_speed": {"min": 1, "max": 5000, "default": 100}, "fade_speed": {"min": 0, "max": 255, "default": 180}, "min_brightness": {"min": 0, "max": 255, "default": 32}, "max_brightness": {"min": 0, "max": 255, "default": 255} diff --git a/lib/libesp32/berry_animation/src/solidify/solidified_animation.h b/lib/libesp32/berry_animation/src/solidify/solidified_animation.h index 9ab121b21..27050e483 100644 --- a/lib/libesp32/berry_animation/src/solidify/solidified_animation.h +++ b/lib/libesp32/berry_animation/src/solidify/solidified_animation.h @@ -9505,11 +9505,11 @@ be_local_class(TwinkleAnimation, { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(twinkle_speed, 1), be_const_bytes_instance(0700010188130006) }, + { be_const_key_weak(twinkle_speed, 1), be_const_bytes_instance(0700010188130064) }, { be_const_key_weak(min_brightness, -1), be_const_bytes_instance(07000001FF000020) }, - { be_const_key_weak(density, -1), be_const_bytes_instance(07000001FF00018000) }, + { be_const_key_weak(density, -1), be_const_bytes_instance(07000001FF000040) }, { be_const_key_weak(max_brightness, 2), be_const_bytes_instance(07000001FF0001FF00) }, - { be_const_key_weak(color, -1), be_const_bytes_instance(0400FF) }, + { be_const_key_weak(color, -1), be_const_bytes_instance(0400BB) }, { be_const_key_weak(fade_speed, 0), be_const_bytes_instance(07000001FF0001B400) }, })) ) } )) }, { be_const_key_weak(update, -1), be_const_closure(class_TwinkleAnimation_update_closure) },