Skip to content

Commit f82cbeb

Browse files
authored
Berry animation rename palette to colors (#24259)
1 parent 46b9823 commit f82cbeb

File tree

83 files changed

+267
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+267
-267
lines changed

lib/libesp32/berry_animation/anim_examples/breathing_colors.anim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ palette breathe_palette = [
2222

2323
# Create a rich palette color provider
2424
color palette_pattern = rich_palette(
25-
palette=breathe_palette # palette
25+
colors=breathe_palette # palette
2626
cycle_period=15s # cycle period (defaults: smooth transition, 255 brightness)
2727
)
2828

lib/libesp32/berry_animation/anim_examples/christmas_tree.anim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ palette ornament_colors = [
1717
]
1818

1919
# Colorful ornaments as twinkling lights
20-
color ornament_pattern = rich_palette(palette=ornament_colors, cycle_period=3s, transition_type=LINEAR, brightness=255)
20+
color ornament_pattern = rich_palette(colors=ornament_colors, cycle_period=3s, transition_type=LINEAR, brightness=255)
2121
animation ornaments = twinkle_animation(
2222
color=ornament_pattern # color source
2323
density=15 # density (many ornaments)
@@ -44,7 +44,7 @@ animation snow_sparkles = twinkle_animation(
4444
snow_sparkles.priority = 15
4545

4646
# Garland effect - moving colored lights
47-
color garland_pattern = rich_palette(palette=ornament_colors, cycle_period=2s, transition_type=LINEAR, brightness=200)
47+
color garland_pattern = rich_palette(colors=ornament_colors, cycle_period=2s, transition_type=LINEAR, brightness=200)
4848
animation garland = comet_animation(
4949
color=garland_pattern # color source
5050
tail_length=6 # garland length (tail length)

lib/libesp32/berry_animation/anim_examples/compiled/breathing_colors.be

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var breathe_palette_ = bytes(
2929
)
3030
# Create a rich palette color provider
3131
var palette_pattern_ = animation.rich_palette(engine)
32-
palette_pattern_.palette = breathe_palette_ # palette
32+
palette_pattern_.colors = breathe_palette_ # palette
3333
palette_pattern_.cycle_period = 15000 # cycle period (defaults: smooth transition, 255 brightness)
3434
# Create breathing animation using the palette
3535
var breathing_ = animation.breathe_animation(engine)
@@ -75,7 +75,7 @@ palette breathe_palette = [
7575
7676
# Create a rich palette color provider
7777
color palette_pattern = rich_palette(
78-
palette=breathe_palette # palette
78+
colors=breathe_palette # palette
7979
cycle_period=15s # cycle period (defaults: smooth transition, 255 brightness)
8080
)
8181

lib/libesp32/berry_animation/anim_examples/compiled/christmas_tree.be

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var ornament_colors_ = bytes(
2626
)
2727
# Colorful ornaments as twinkling lights
2828
var ornament_pattern_ = animation.rich_palette(engine)
29-
ornament_pattern_.palette = ornament_colors_
29+
ornament_pattern_.colors = ornament_colors_
3030
ornament_pattern_.cycle_period = 3000
3131
ornament_pattern_.transition_type = animation.LINEAR
3232
ornament_pattern_.brightness = 255
@@ -57,7 +57,7 @@ snow_sparkles_.twinkle_speed = 400 # twinkle speed (quick sparkles)
5757
snow_sparkles_.priority = 15
5858
# Garland effect - moving colored lights
5959
var garland_pattern_ = animation.rich_palette(engine)
60-
garland_pattern_.palette = ornament_colors_
60+
garland_pattern_.colors = ornament_colors_
6161
garland_pattern_.cycle_period = 2000
6262
garland_pattern_.transition_type = animation.LINEAR
6363
garland_pattern_.brightness = 200
@@ -95,7 +95,7 @@ palette ornament_colors = [
9595
]
9696
9797
# Colorful ornaments as twinkling lights
98-
color ornament_pattern = rich_palette(palette=ornament_colors, cycle_period=3s, transition_type=LINEAR, brightness=255)
98+
color ornament_pattern = rich_palette(colors=ornament_colors, cycle_period=3s, transition_type=LINEAR, brightness=255)
9999
animation ornaments = twinkle_animation(
100100
color=ornament_pattern # color source
101101
density=15 # density (many ornaments)
@@ -122,7 +122,7 @@ animation snow_sparkles = twinkle_animation(
122122
snow_sparkles.priority = 15
123123
124124
# Garland effect - moving colored lights
125-
color garland_pattern = rich_palette(palette=ornament_colors, cycle_period=2s, transition_type=LINEAR, brightness=200)
125+
color garland_pattern = rich_palette(colors=ornament_colors, cycle_period=2s, transition_type=LINEAR, brightness=200)
126126
animation garland = comet_animation(
127127
color=garland_pattern # color source
128128
tail_length=6 # garland length (tail length)

lib/libesp32/berry_animation/anim_examples/compiled/cylon_rainbow.be

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var strip_len_ = animation.strip_length(engine)
1515
var eye_duration_ = 5000 # duration for a cylon eye cycle
1616
var eye_palette_ = bytes("FFFF0000" "FFFFFF00" "FF008000" "FFEE82EE")
1717
var eye_color_ = animation.color_cycle(engine)
18-
eye_color_.palette = eye_palette_
18+
eye_color_.colors = eye_palette_
1919
eye_color_.cycle_period = 0
2020
var cosine_val_ = (def (engine)
2121
var provider = animation.cosine_osc(engine)
@@ -58,7 +58,7 @@ set eye_duration = 5s # duration for a cylon eye cycle
5858
5959
palette eye_palette = [ red, yellow, green, violet ]
6060
61-
color eye_color = color_cycle(palette=eye_palette, cycle_period=0)
61+
color eye_color = color_cycle(colors=eye_palette, cycle_period=0)
6262
6363
set cosine_val = cosine_osc(min_value = 0, max_value = strip_len - 2, duration = eye_duration)
6464
set triangle_val = triangle(min_value = 0, max_value = strip_len - 2, duration = eye_duration)

lib/libesp32/berry_animation/anim_examples/compiled/demo_pattern_fire_opacity.be

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var fire_colors_ = bytes(
1919
)
2020
var strip_len_ = animation.strip_length(engine)
2121
var fire_color_ = animation.rich_palette(engine)
22-
fire_color_.palette = fire_colors_
22+
fire_color_.colors = fire_colors_
2323
var background_ = animation.solid(engine)
2424
background_.color = 0xFF000088
2525
background_.priority = 20
@@ -58,7 +58,7 @@ palette fire_colors = [
5858
]
5959
6060
set strip_len = strip_length()
61-
color fire_color = rich_palette(palette=fire_colors)
61+
color fire_color = rich_palette(colors=fire_colors)
6262
6363
animation background = solid(color=0x000088, priority=20)
6464
run background

lib/libesp32/berry_animation/anim_examples/compiled/demo_shutter_rainbow2.be

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ var shutter_size_ = (def (engine)
2222
return provider
2323
end)(engine)
2424
var col1_ = animation.color_cycle(engine)
25-
col1_.palette = animation.PALETTE_RAINBOW
25+
col1_.colors = animation.PALETTE_RAINBOW
2626
col1_.cycle_period = 0
2727
var col2_ = animation.color_cycle(engine)
28-
col2_.palette = animation.PALETTE_RAINBOW
28+
col2_.colors = animation.PALETTE_RAINBOW
2929
col2_.cycle_period = 0
3030
col2_.next = 1
3131
var shutter_animation_ = animation.beacon_animation(engine)
@@ -57,8 +57,8 @@ set duration = 3s
5757
set strip_len = strip_length()
5858
set shutter_size = sawtooth(min_value = 0, max_value = strip_len, duration = duration)
5959
60-
color col1 = color_cycle(palette=PALETTE_RAINBOW, cycle_period=0)
61-
color col2 = color_cycle(palette=PALETTE_RAINBOW, cycle_period=0)
60+
color col1 = color_cycle(colors=PALETTE_RAINBOW, cycle_period=0)
61+
color col2 = color_cycle(colors=PALETTE_RAINBOW, cycle_period=0)
6262
col2.next = 1
6363
6464
animation shutter_animation = beacon_animation(

lib/libesp32/berry_animation/anim_examples/compiled/demo_shutter_rainbow_bidir.be

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class shutter_bidir_animation : animation.engine_proxy
2929
return provider
3030
end)(engine)
3131
var col1_ = animation.color_cycle(engine)
32-
col1_.palette = animation.create_closure_value(engine, def (engine) return self.colors end)
32+
col1_.colors = animation.create_closure_value(engine, def (engine) return self.colors end)
3333
col1_.cycle_period = 0
3434
var col2_ = animation.color_cycle(engine)
35-
col2_.palette = animation.create_closure_value(engine, def (engine) return self.colors end)
35+
col2_.colors = animation.create_closure_value(engine, def (engine) return self.colors end)
3636
col2_.cycle_period = 0
3737
col2_.next = 1
3838
# shutter moving from left to right
@@ -100,8 +100,8 @@ template animation shutter_bidir {
100100
set strip_len = strip_length()
101101
set shutter_size = sawtooth(min_value = 0, max_value = strip_len, duration = period)
102102
103-
color col1 = color_cycle(palette=colors, cycle_period=0)
104-
color col2 = color_cycle(palette=colors, cycle_period=0)
103+
color col1 = color_cycle(colors=colors, cycle_period=0)
104+
color col2 = color_cycle(colors=colors, cycle_period=0)
105105
col2.next = 1
106106
107107
# shutter moving from left to right

lib/libesp32/berry_animation/anim_examples/compiled/demo_shutter_rainbow_central.be

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class shutter_central_animation : animation.engine_proxy
3030
return provider
3131
end)(engine)
3232
var col1_ = animation.color_cycle(engine)
33-
col1_.palette = animation.create_closure_value(engine, def (engine) return self.colors end)
33+
col1_.colors = animation.create_closure_value(engine, def (engine) return self.colors end)
3434
col1_.cycle_period = 0
3535
var col2_ = animation.color_cycle(engine)
36-
col2_.palette = animation.create_closure_value(engine, def (engine) return self.colors end)
36+
col2_.colors = animation.create_closure_value(engine, def (engine) return self.colors end)
3737
col2_.cycle_period = 0
3838
col2_.next = 1
3939
# shutter moving in to out
@@ -101,8 +101,8 @@ template animation shutter_central {
101101
set strip_len2 = (strip_len + 1) / 2
102102
set shutter_size = sawtooth(min_value = 0, max_value = strip_len, duration = period)
103103
104-
color col1 = color_cycle(palette=colors, cycle_period=0)
105-
color col2 = color_cycle(palette=colors, cycle_period=0)
104+
color col1 = color_cycle(colors=colors, cycle_period=0)
105+
color col2 = color_cycle(colors=colors, cycle_period=0)
106106
col2.next = 1
107107
108108
# shutter moving in to out

lib/libesp32/berry_animation/anim_examples/compiled/demo_shutter_rainbow_leftright.be

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class shutter_lr_animation : animation.engine_proxy
2929
return provider
3030
end)(engine)
3131
var col1_ = animation.color_cycle(engine)
32-
col1_.palette = animation.create_closure_value(engine, def (engine) return self.colors end)
32+
col1_.colors = animation.create_closure_value(engine, def (engine) return self.colors end)
3333
col1_.cycle_period = 0
3434
var col2_ = animation.color_cycle(engine)
35-
col2_.palette = animation.create_closure_value(engine, def (engine) return self.colors end)
35+
col2_.colors = animation.create_closure_value(engine, def (engine) return self.colors end)
3636
col2_.cycle_period = 0
3737
col2_.next = 1
3838
# shutter moving from left to right
@@ -83,8 +83,8 @@ template animation shutter_lr {
8383
set strip_len = strip_length()
8484
set shutter_size = sawtooth(min_value = 0, max_value = strip_len, duration = period)
8585
86-
color col1 = color_cycle(palette=colors, cycle_period=0)
87-
color col2 = color_cycle(palette=colors, cycle_period=0)
86+
color col1 = color_cycle(colors=colors, cycle_period=0)
87+
color col2 = color_cycle(colors=colors, cycle_period=0)
8888
col2.next = 1
8989
9090
# shutter moving from left to right

0 commit comments

Comments
 (0)