Berry animation rename from crenel_position_animation to crenel_animation (#24257)
@ -158,7 +158,7 @@ Animation|Description
|
|||||||
`pulsating_animation`|Breathing/pulsing effect with smooth transitions
|
`pulsating_animation`|Breathing/pulsing effect with smooth transitions
|
||||||
`breathe_animation`|Natural breathing effect with customizable curve
|
`breathe_animation`|Natural breathing effect with customizable curve
|
||||||
`beacon_animation`|Pulse/highlight at specific position with optional slew
|
`beacon_animation`|Pulse/highlight at specific position with optional slew
|
||||||
`crenel_position_animation`|Crenel/square wave pattern
|
`crenel_animation`|Crenel/square wave pattern
|
||||||
`comet_animation`|Moving comet with fading tail
|
`comet_animation`|Moving comet with fading tail
|
||||||
`twinkle_animation`|Twinkling stars effect
|
`twinkle_animation`|Twinkling stars effect
|
||||||
`fire_animation`|Realistic fire simulation
|
`fire_animation`|Realistic fire simulation
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
# @desc Shutter central inout with rotating colors, using sequence
|
||||||
|
|
||||||
|
# Define 'strip_len' to make calculations
|
||||||
|
set strip_len = strip_length()
|
||||||
|
set strip_len_2 = (strip_len + 1) / 2 # half length rounded
|
||||||
|
|
||||||
|
# Set a global variable for 'period'
|
||||||
|
set period = 1.5s
|
||||||
|
|
||||||
|
# Define shutter_size as a sawtootgh from 0 to strip_len
|
||||||
|
set shutter_size = sawtooth(min_value = 0, max_value = strip_len,
|
||||||
|
duration = period)
|
||||||
|
|
||||||
|
# Define 2 color providers cycling through palette rainbow with white
|
||||||
|
# 'col2' is shifted by 1 color from 'col1'
|
||||||
|
color col1 = color_cycle(palette=PALETTE_RAINBOW_W, cycle_period=0)
|
||||||
|
color col2 = color_cycle(palette=PALETTE_RAINBOW_W, cycle_period=0)
|
||||||
|
col2.next = 1 # Writing 1 to 'next' actually advances the color
|
||||||
|
|
||||||
|
# Using beacon_animation to move a shutter from in to out
|
||||||
|
animation shutter_inout_animation = beacon_animation(
|
||||||
|
color = col2 # Use two rotating colors
|
||||||
|
back_color = col1 # Use two rotating colors
|
||||||
|
pos = strip_len_2 - (shutter_size + 1) / 2
|
||||||
|
beacon_size = shutter_size
|
||||||
|
)
|
||||||
|
|
||||||
|
# Use sequence to advance after each shutter animation
|
||||||
|
sequence shutter_seq repeat forever {
|
||||||
|
restart shutter_size # Make sure that shutter_size is synced with the sequence
|
||||||
|
play shutter_inout_animation for period
|
||||||
|
col1.next = 1 # set 'col1' to next color
|
||||||
|
col2.next = 1 # set 'col2' to next color
|
||||||
|
}
|
||||||
|
run shutter_seq
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
# @desc Shutter central inout and outin with rotating colors, using sequence
|
||||||
|
|
||||||
|
# Define 'strip_len' to make calculations
|
||||||
|
set strip_len = strip_length()
|
||||||
|
set strip_len_2 = (strip_len + 1) / 2 # half length rounded
|
||||||
|
|
||||||
|
# Set a global variable for 'period'
|
||||||
|
set period = 1.5s
|
||||||
|
|
||||||
|
# Define shutter_size as a sawtootgh from 0 to strip_len
|
||||||
|
set shutter_size = sawtooth(min_value = 0, max_value = strip_len,
|
||||||
|
duration = period)
|
||||||
|
|
||||||
|
# Define 2 color providers cycling through palette rainbow with white
|
||||||
|
# 'col2' is shifted by 1 color from 'col1'
|
||||||
|
color col1 = color_cycle(palette=PALETTE_RAINBOW_W, cycle_period=0)
|
||||||
|
color col2 = color_cycle(palette=PALETTE_RAINBOW_W, cycle_period=0)
|
||||||
|
col2.next = 1 # Writing 1 to 'next' actually advances the color
|
||||||
|
|
||||||
|
# Using beacon_animation to move a shutter from in to out
|
||||||
|
animation shutter_inout_animation = beacon_animation(
|
||||||
|
color = col2 # Use two rotating colors
|
||||||
|
back_color = col1 # Use two rotating colors
|
||||||
|
pos = strip_len_2 - (shutter_size + 1) / 2
|
||||||
|
beacon_size = shutter_size
|
||||||
|
)
|
||||||
|
|
||||||
|
# Similar but out to in
|
||||||
|
animation shutter_outin_animation = beacon_animation(
|
||||||
|
color = col1
|
||||||
|
back_color = col2
|
||||||
|
pos = strip_len_2 - (strip_len - shutter_size + 1) / 2
|
||||||
|
beacon_size = strip_len - shutter_size
|
||||||
|
)
|
||||||
|
|
||||||
|
sequence shutter_seq repeat forever {
|
||||||
|
repeat col1.palette_size times {
|
||||||
|
restart shutter_size # Make sure that shutter_size is synced with the sequence
|
||||||
|
play shutter_inout_animation for period
|
||||||
|
col1.next = 1 # set 'col1' to next color
|
||||||
|
col2.next = 1 # set 'col2' to next color
|
||||||
|
}
|
||||||
|
repeat col1.palette_size times {
|
||||||
|
restart shutter_size # Make sure that shutter_size is synced with the sequence
|
||||||
|
play shutter_outin_animation for period
|
||||||
|
col1.next = 1 # set 'col1' to next color
|
||||||
|
col2.next = 1 # set 'col2' to next color
|
||||||
|
}
|
||||||
|
}
|
||||||
|
run shutter_seq
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
# @desc Crenel static
|
||||||
|
|
||||||
|
# Define a simple crenel 2+2 red/blue
|
||||||
|
animation back = crenel_animation(
|
||||||
|
color = red
|
||||||
|
back_color = blue
|
||||||
|
pulse_size = 2
|
||||||
|
low_size = 2
|
||||||
|
)
|
||||||
|
run back
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
# @desc Crenel static with variable number of pulses
|
||||||
|
|
||||||
|
# Move from 0 to 5 and back
|
||||||
|
set nb_pulse = triangle(min_value = 0, max_value = 5, duration = 2s)
|
||||||
|
|
||||||
|
# Define a simple crenel 2+2 red/blue
|
||||||
|
animation back = crenel_animation(
|
||||||
|
color = red
|
||||||
|
back_color = blue
|
||||||
|
pulse_size = 2
|
||||||
|
low_size = 2
|
||||||
|
nb_pulse = nb_pulse
|
||||||
|
)
|
||||||
|
run back
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
# @desc Crenel static with variable size
|
||||||
|
|
||||||
|
# Move from 0 to 5 and back
|
||||||
|
set pulse_size = triangle(min_value = 0, max_value = 4, duration = 2s)
|
||||||
|
|
||||||
|
# Define a simple crenel 2+2 red/blue
|
||||||
|
animation back = crenel_animation(
|
||||||
|
color = red
|
||||||
|
back_color = blue
|
||||||
|
pulse_size = pulse_size
|
||||||
|
low_size = 2
|
||||||
|
)
|
||||||
|
run back
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
# @desc Crenel static with variable color
|
||||||
|
|
||||||
|
# Define a color attribute that cycles over time, cycle is 5 seconds
|
||||||
|
color rainbow_color = rich_palette(palette=PALETTE_RAINBOW_W2, cycle_period=5s)
|
||||||
|
|
||||||
|
# Define a simple crenel 2+2
|
||||||
|
animation back = crenel_animation(
|
||||||
|
color = rainbow_color
|
||||||
|
back_color = blue
|
||||||
|
pulse_size = 2
|
||||||
|
low_size = 2
|
||||||
|
)
|
||||||
|
run back
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
# @desc Crenel used as opacity mask
|
||||||
|
|
||||||
|
# Set a blue background with low priority (background)
|
||||||
|
animation back = solid(color = blue, priority = 20)
|
||||||
|
run back
|
||||||
|
|
||||||
|
# Define a simple crenel 2+2 opaque/transparent
|
||||||
|
animation mask = crenel_animation(
|
||||||
|
color = white # plain color since it's used as opacity mask
|
||||||
|
back_color = transparent # background is transparent
|
||||||
|
pulse_size = 2
|
||||||
|
low_size = 2
|
||||||
|
)
|
||||||
|
|
||||||
|
# Define a smooth palette using PALETTE_RAINBOW_W (7 colors + white)
|
||||||
|
color rainbow_rich_color = rich_palette(palette=PALETTE_RAINBOW_W, cycle_period=0)
|
||||||
|
# Define a gradient across the whole strip and use crenel as opacity mask
|
||||||
|
animation pattern = palette_gradient_animation(
|
||||||
|
color_source = rainbow_rich_color # use the rainow pattern
|
||||||
|
shift_period = 2s # shifting over 2s
|
||||||
|
opacity = mask # mask it with crenel pattern
|
||||||
|
)
|
||||||
|
run pattern
|
||||||
BIN
lib/libesp32/berry_animation/anim_tutorials/png/chap_6_30.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
lib/libesp32/berry_animation/anim_tutorials/png/chap_6_40.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
lib/libesp32/berry_animation/anim_tutorials/png/chap_7_10.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
lib/libesp32/berry_animation/anim_tutorials/png/chap_7_20.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
lib/libesp32/berry_animation/anim_tutorials/png/chap_7_30.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
lib/libesp32/berry_animation/anim_tutorials/png/chap_7_40.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
lib/libesp32/berry_animation/anim_tutorials/png/chap_7_50.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
@ -906,7 +906,7 @@ The full period of the pattern is `pulse_size + low_size` pixels.
|
|||||||
**Status Indicators:**
|
**Status Indicators:**
|
||||||
```berry
|
```berry
|
||||||
# Slow blinking pattern for status indication
|
# Slow blinking pattern for status indication
|
||||||
animation status_indicator = crenel_position_animation(
|
animation status_indicator = crenel_animation(
|
||||||
color=green,
|
color=green,
|
||||||
pulse_size=1,
|
pulse_size=1,
|
||||||
low_size=9
|
low_size=9
|
||||||
@ -916,7 +916,7 @@ animation status_indicator = crenel_position_animation(
|
|||||||
**Rhythmic Effects:**
|
**Rhythmic Effects:**
|
||||||
```berry
|
```berry
|
||||||
# Fast rhythmic pattern
|
# Fast rhythmic pattern
|
||||||
animation rhythm_pattern = crenel_position_animation(
|
animation rhythm_pattern = crenel_animation(
|
||||||
color=red,
|
color=red,
|
||||||
pulse_size=2,
|
pulse_size=2,
|
||||||
low_size=2
|
low_size=2
|
||||||
@ -927,7 +927,7 @@ animation rhythm_pattern = crenel_position_animation(
|
|||||||
```berry
|
```berry
|
||||||
# Decorative border pattern
|
# Decorative border pattern
|
||||||
color gold = 0xFFFFD700
|
color gold = 0xFFFFD700
|
||||||
animation border_pattern = crenel_position_animation(
|
animation border_pattern = crenel_animation(
|
||||||
color=gold,
|
color=gold,
|
||||||
pulse_size=3,
|
pulse_size=3,
|
||||||
low_size=1,
|
low_size=1,
|
||||||
@ -938,7 +938,7 @@ animation border_pattern = crenel_position_animation(
|
|||||||
**Progress Indicators:**
|
**Progress Indicators:**
|
||||||
```berry
|
```berry
|
||||||
# Progress bar with limited pulses
|
# Progress bar with limited pulses
|
||||||
animation progress_bar = crenel_position_animation(
|
animation progress_bar = crenel_animation(
|
||||||
color=0xFF0080FF,
|
color=0xFF0080FF,
|
||||||
pulse_size=2,
|
pulse_size=2,
|
||||||
low_size=1,
|
low_size=1,
|
||||||
@ -954,7 +954,7 @@ animation progress_bar = crenel_position_animation(
|
|||||||
- **Framework Integration**: Seamless integration with animation engine
|
- **Framework Integration**: Seamless integration with animation engine
|
||||||
- **Testing**: Comprehensive test suite covering edge cases and performance
|
- **Testing**: Comprehensive test suite covering edge cases and performance
|
||||||
|
|
||||||
**Factory**: `animation.crenel_position_animation(engine)`
|
**Factory**: `animation.crenel_animation(engine)`
|
||||||
|
|
||||||
### RichPaletteAnimation
|
### RichPaletteAnimation
|
||||||
|
|
||||||
|
|||||||
@ -1435,7 +1435,7 @@ Animation classes create visual effects on LED strips:
|
|||||||
| `solid` | Solid color fill |
|
| `solid` | Solid color fill |
|
||||||
| `pulsating_animation` | Pulsing brightness effect |
|
| `pulsating_animation` | Pulsing brightness effect |
|
||||||
| `beacon_animation` | Positioned pulse effect |
|
| `beacon_animation` | Positioned pulse effect |
|
||||||
| `crenel_position_animation` | Square wave pulse at specific position |
|
| `crenel_animation` | Square wave pulse at specific position |
|
||||||
| `breathe_animation` | Breathing/fading effect |
|
| `breathe_animation` | Breathing/fading effect |
|
||||||
| `comet_animation` | Moving comet with trailing tail |
|
| `comet_animation` | Moving comet with trailing tail |
|
||||||
| `fire_animation` | Realistic fire simulation |
|
| `fire_animation` | Realistic fire simulation |
|
||||||
|
|||||||
@ -916,7 +916,7 @@ The full period of the pattern is `pulse_size + low_size` pixels.
|
|||||||
**Status Indicators:**
|
**Status Indicators:**
|
||||||
```berry
|
```berry
|
||||||
# Slow blinking pattern for status indication
|
# Slow blinking pattern for status indication
|
||||||
animation status_indicator = crenel_position_animation(
|
animation status_indicator = crenel_animation(
|
||||||
color=green,
|
color=green,
|
||||||
pulse_size=1,
|
pulse_size=1,
|
||||||
low_size=9
|
low_size=9
|
||||||
@ -926,7 +926,7 @@ animation status_indicator = crenel_position_animation(
|
|||||||
**Rhythmic Effects:**
|
**Rhythmic Effects:**
|
||||||
```berry
|
```berry
|
||||||
# Fast rhythmic pattern
|
# Fast rhythmic pattern
|
||||||
animation rhythm_pattern = crenel_position_animation(
|
animation rhythm_pattern = crenel_animation(
|
||||||
color=red,
|
color=red,
|
||||||
pulse_size=2,
|
pulse_size=2,
|
||||||
low_size=2
|
low_size=2
|
||||||
@ -937,7 +937,7 @@ animation rhythm_pattern = crenel_position_animation(
|
|||||||
```berry
|
```berry
|
||||||
# Decorative border pattern
|
# Decorative border pattern
|
||||||
color gold = 0xFFFFD700
|
color gold = 0xFFFFD700
|
||||||
animation border_pattern = crenel_position_animation(
|
animation border_pattern = crenel_animation(
|
||||||
color=gold,
|
color=gold,
|
||||||
pulse_size=3,
|
pulse_size=3,
|
||||||
low_size=1,
|
low_size=1,
|
||||||
@ -948,7 +948,7 @@ animation border_pattern = crenel_position_animation(
|
|||||||
**Progress Indicators:**
|
**Progress Indicators:**
|
||||||
```berry
|
```berry
|
||||||
# Progress bar with limited pulses
|
# Progress bar with limited pulses
|
||||||
animation progress_bar = crenel_position_animation(
|
animation progress_bar = crenel_animation(
|
||||||
color=0xFF0080FF,
|
color=0xFF0080FF,
|
||||||
pulse_size=2,
|
pulse_size=2,
|
||||||
low_size=1,
|
low_size=1,
|
||||||
@ -964,7 +964,7 @@ animation progress_bar = crenel_position_animation(
|
|||||||
- **Framework Integration**: Seamless integration with animation engine
|
- **Framework Integration**: Seamless integration with animation engine
|
||||||
- **Testing**: Comprehensive test suite covering edge cases and performance
|
- **Testing**: Comprehensive test suite covering edge cases and performance
|
||||||
|
|
||||||
**Factory**: `animation.crenel_position_animation(engine)`
|
**Factory**: `animation.crenel_animation(engine)`
|
||||||
|
|
||||||
### RichPaletteAnimation
|
### RichPaletteAnimation
|
||||||
|
|
||||||
|
|||||||
@ -1435,7 +1435,7 @@ Animation classes create visual effects on LED strips:
|
|||||||
| `solid` | Solid color fill |
|
| `solid` | Solid color fill |
|
||||||
| `pulsating_animation` | Pulsing brightness effect |
|
| `pulsating_animation` | Pulsing brightness effect |
|
||||||
| `beacon_animation` | Positioned pulse effect |
|
| `beacon_animation` | Positioned pulse effect |
|
||||||
| `crenel_position_animation` | Square wave pulse at specific position |
|
| `crenel_animation` | Square wave pulse at specific position |
|
||||||
| `breathe_animation` | Breathing/fading effect |
|
| `breathe_animation` | Breathing/fading effect |
|
||||||
| `comet_animation` | Moving comet with trailing tail |
|
| `comet_animation` | Moving comet with trailing tail |
|
||||||
| `fire_animation` | Realistic fire simulation |
|
| `fire_animation` | Realistic fire simulation |
|
||||||
|
|||||||
@ -139,8 +139,8 @@ import "animations/solid" as solid_impl
|
|||||||
register_to_animation(solid_impl)
|
register_to_animation(solid_impl)
|
||||||
import "animations/beacon" as beacon_animation
|
import "animations/beacon" as beacon_animation
|
||||||
register_to_animation(beacon_animation)
|
register_to_animation(beacon_animation)
|
||||||
import "animations/crenel_position" as crenel_position_animation
|
import "animations/crenel_position" as crenel_animation
|
||||||
register_to_animation(crenel_position_animation)
|
register_to_animation(crenel_animation)
|
||||||
import "animations/breathe" as breathe_animation
|
import "animations/breathe" as breathe_animation
|
||||||
register_to_animation(breathe_animation)
|
register_to_animation(breathe_animation)
|
||||||
import "animations/palette_pattern" as palette_pattern_animation
|
import "animations/palette_pattern" as palette_pattern_animation
|
||||||
|
|||||||
@ -121,4 +121,4 @@ class CrenelPositionAnimation : animation.animation
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'crenel_position_animation': CrenelPositionAnimation}
|
return {'crenel_animation': CrenelPositionAnimation}
|
||||||
|
|||||||
@ -14846,32 +14846,36 @@ be_local_class(OscillatorValueProvider,
|
|||||||
);
|
);
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: create_closure_value
|
** Solidified function: pulsating_animation
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(create_closure_value, /* name */
|
be_local_closure(pulsating_animation, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
5, /* nstack */
|
4, /* nstack */
|
||||||
2, /* argc */
|
1, /* argc */
|
||||||
0, /* varg */
|
0, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 3]) { /* constants */
|
( &(const bvalue[ 5]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(animation),
|
/* K0 */ be_nested_str_weak(animation),
|
||||||
/* K1 */ be_nested_str_weak(closure_value),
|
/* K1 */ be_nested_str_weak(breathe_animation),
|
||||||
/* K2 */ be_nested_str_weak(closure),
|
/* K2 */ be_nested_str_weak(curve_factor),
|
||||||
|
/* K3 */ be_const_int(1),
|
||||||
|
/* K4 */ be_nested_str_weak(period),
|
||||||
}),
|
}),
|
||||||
be_str_weak(create_closure_value),
|
be_str_weak(pulsating_animation),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[ 6]) { /* code */
|
( &(const binstruction[ 8]) { /* code */
|
||||||
0xB80A0000, // 0000 GETNGBL R2 K0
|
0xB8060000, // 0000 GETNGBL R1 K0
|
||||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||||
0x5C100000, // 0002 MOVE R4 R0
|
0x5C0C0000, // 0002 MOVE R3 R0
|
||||||
0x7C080400, // 0003 CALL R2 2
|
0x7C040400, // 0003 CALL R1 2
|
||||||
0x900A0401, // 0004 SETMBR R2 K2 R1
|
0x90060503, // 0004 SETMBR R1 K2 K3
|
||||||
0x80040400, // 0005 RET 1 R2
|
0x540A03E7, // 0005 LDINT R2 1000
|
||||||
|
0x90060802, // 0006 SETMBR R1 K4 R2
|
||||||
|
0x80040200, // 0007 RET 1 R1
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -15479,195 +15483,39 @@ be_local_closure(solid, /* name */
|
|||||||
);
|
);
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
// compact class 'CrenelPositionAnimation' ktab size: 19, total: 24 (saved 40 bytes)
|
|
||||||
static const bvalue be_ktab_class_CrenelPositionAnimation[19] = {
|
|
||||||
/* K0 */ be_nested_str_weak(back_color),
|
|
||||||
/* K1 */ be_nested_str_weak(pos),
|
|
||||||
/* K2 */ be_nested_str_weak(pulse_size),
|
|
||||||
/* K3 */ be_nested_str_weak(low_size),
|
|
||||||
/* K4 */ be_nested_str_weak(nb_pulse),
|
|
||||||
/* K5 */ be_nested_str_weak(color),
|
|
||||||
/* K6 */ be_const_int(-16777216),
|
|
||||||
/* K7 */ be_nested_str_weak(fill_pixels),
|
|
||||||
/* K8 */ be_nested_str_weak(pixels),
|
|
||||||
/* K9 */ be_const_int(0),
|
|
||||||
/* K10 */ be_const_int(1),
|
|
||||||
/* K11 */ be_nested_str_weak(set_pixel_color),
|
|
||||||
/* K12 */ be_nested_str_weak(get_param),
|
|
||||||
/* K13 */ be_nested_str_weak(animation),
|
|
||||||
/* K14 */ be_nested_str_weak(is_value_provider),
|
|
||||||
/* K15 */ be_nested_str_weak(0x_X2508x),
|
|
||||||
/* K16 */ be_nested_str_weak(CrenelPositionAnimation_X28color_X3D_X25s_X2C_X20pos_X3D_X25s_X2C_X20pulse_size_X3D_X25s_X2C_X20low_size_X3D_X25s_X2C_X20nb_pulse_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29),
|
|
||||||
/* K17 */ be_nested_str_weak(priority),
|
|
||||||
/* K18 */ be_nested_str_weak(is_running),
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
extern const bclass be_class_CrenelPositionAnimation;
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: render
|
** Solidified function: create_closure_value
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(class_CrenelPositionAnimation_render, /* name */
|
be_local_closure(create_closure_value, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
16, /* nstack */
|
5, /* nstack */
|
||||||
4, /* argc */
|
2, /* argc */
|
||||||
10, /* varg */
|
0, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
&be_ktab_class_CrenelPositionAnimation, /* shared constants */
|
( &(const bvalue[ 3]) { /* constants */
|
||||||
be_str_weak(render),
|
/* K0 */ be_nested_str_weak(animation),
|
||||||
|
/* K1 */ be_nested_str_weak(closure_value),
|
||||||
|
/* K2 */ be_nested_str_weak(closure),
|
||||||
|
}),
|
||||||
|
be_str_weak(create_closure_value),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[64]) { /* code */
|
( &(const binstruction[ 6]) { /* code */
|
||||||
0x88100100, // 0000 GETMBR R4 R0 K0
|
0xB80A0000, // 0000 GETNGBL R2 K0
|
||||||
0x88140101, // 0001 GETMBR R5 R0 K1
|
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||||
0x88180102, // 0002 GETMBR R6 R0 K2
|
0x5C100000, // 0002 MOVE R4 R0
|
||||||
0x881C0103, // 0003 GETMBR R7 R0 K3
|
|
||||||
0x88200104, // 0004 GETMBR R8 R0 K4
|
|
||||||
0x88240105, // 0005 GETMBR R9 R0 K5
|
|
||||||
0x60280009, // 0006 GETGBL R10 G9
|
|
||||||
0x002C0C07, // 0007 ADD R11 R6 R7
|
|
||||||
0x7C280200, // 0008 CALL R10 1
|
|
||||||
0x202C0906, // 0009 NE R11 R4 K6
|
|
||||||
0x782E0003, // 000A JMPF R11 #000F
|
|
||||||
0x8C2C0307, // 000B GETMET R11 R1 K7
|
|
||||||
0x88340308, // 000C GETMBR R13 R1 K8
|
|
||||||
0x5C380800, // 000D MOVE R14 R4
|
|
||||||
0x7C2C0600, // 000E CALL R11 3
|
|
||||||
0x182C1509, // 000F LE R11 R10 K9
|
|
||||||
0x782E0000, // 0010 JMPF R11 #0012
|
|
||||||
0x5828000A, // 0011 LDCONST R10 K10
|
|
||||||
0x1C2C1109, // 0012 EQ R11 R8 K9
|
|
||||||
0x782E0001, // 0013 JMPF R11 #0016
|
|
||||||
0x502C0200, // 0014 LDBOOL R11 1 0
|
|
||||||
0x80041600, // 0015 RET 1 R11
|
|
||||||
0x142C1109, // 0016 LT R11 R8 K9
|
|
||||||
0x782E0006, // 0017 JMPF R11 #001F
|
|
||||||
0x002C0A06, // 0018 ADD R11 R5 R6
|
|
||||||
0x042C170A, // 0019 SUB R11 R11 K10
|
|
||||||
0x102C160A, // 001A MOD R11 R11 R10
|
|
||||||
0x042C1606, // 001B SUB R11 R11 R6
|
|
||||||
0x002C170A, // 001C ADD R11 R11 K10
|
|
||||||
0x5C141600, // 001D MOVE R5 R11
|
|
||||||
0x70020007, // 001E JMP #0027
|
|
||||||
0x442C1400, // 001F NEG R11 R10
|
|
||||||
0x142C0A0B, // 0020 LT R11 R5 R11
|
|
||||||
0x782E0004, // 0021 JMPF R11 #0027
|
|
||||||
0x202C1109, // 0022 NE R11 R8 K9
|
|
||||||
0x782E0002, // 0023 JMPF R11 #0027
|
|
||||||
0x00140A0A, // 0024 ADD R5 R5 R10
|
|
||||||
0x0420110A, // 0025 SUB R8 R8 K10
|
|
||||||
0x7001FFF7, // 0026 JMP #001F
|
|
||||||
0x142C0A03, // 0027 LT R11 R5 R3
|
|
||||||
0x782E0014, // 0028 JMPF R11 #003E
|
|
||||||
0x202C1109, // 0029 NE R11 R8 K9
|
|
||||||
0x782E0012, // 002A JMPF R11 #003E
|
|
||||||
0x582C0009, // 002B LDCONST R11 K9
|
|
||||||
0x14300B09, // 002C LT R12 R5 K9
|
|
||||||
0x78320001, // 002D JMPF R12 #0030
|
|
||||||
0x44300A00, // 002E NEG R12 R5
|
|
||||||
0x5C2C1800, // 002F MOVE R11 R12
|
|
||||||
0x14301606, // 0030 LT R12 R11 R6
|
|
||||||
0x78320008, // 0031 JMPF R12 #003B
|
|
||||||
0x00300A0B, // 0032 ADD R12 R5 R11
|
|
||||||
0x14301803, // 0033 LT R12 R12 R3
|
|
||||||
0x78320005, // 0034 JMPF R12 #003B
|
|
||||||
0x8C30030B, // 0035 GETMET R12 R1 K11
|
|
||||||
0x00380A0B, // 0036 ADD R14 R5 R11
|
|
||||||
0x5C3C1200, // 0037 MOVE R15 R9
|
|
||||||
0x7C300600, // 0038 CALL R12 3
|
|
||||||
0x002C170A, // 0039 ADD R11 R11 K10
|
|
||||||
0x7001FFF4, // 003A JMP #0030
|
|
||||||
0x00140A0A, // 003B ADD R5 R5 R10
|
|
||||||
0x0420110A, // 003C SUB R8 R8 K10
|
|
||||||
0x7001FFE8, // 003D JMP #0027
|
|
||||||
0x502C0200, // 003E LDBOOL R11 1 0
|
|
||||||
0x80041600, // 003F RET 1 R11
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: tostring
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(class_CrenelPositionAnimation_tostring, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
12, /* nstack */
|
|
||||||
1, /* argc */
|
|
||||||
10, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
&be_ktab_class_CrenelPositionAnimation, /* shared constants */
|
|
||||||
be_str_weak(tostring),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[30]) { /* code */
|
|
||||||
0x4C040000, // 0000 LDNIL R1
|
|
||||||
0x8C08010C, // 0001 GETMET R2 R0 K12
|
|
||||||
0x58100005, // 0002 LDCONST R4 K5
|
|
||||||
0x7C080400, // 0003 CALL R2 2
|
0x7C080400, // 0003 CALL R2 2
|
||||||
0xB80E1A00, // 0004 GETNGBL R3 K13
|
0x900A0401, // 0004 SETMBR R2 K2 R1
|
||||||
0x8C0C070E, // 0005 GETMET R3 R3 K14
|
0x80040400, // 0005 RET 1 R2
|
||||||
0x5C140400, // 0006 MOVE R5 R2
|
|
||||||
0x7C0C0400, // 0007 CALL R3 2
|
|
||||||
0x780E0004, // 0008 JMPF R3 #000E
|
|
||||||
0x600C0008, // 0009 GETGBL R3 G8
|
|
||||||
0x5C100400, // 000A MOVE R4 R2
|
|
||||||
0x7C0C0200, // 000B CALL R3 1
|
|
||||||
0x5C040600, // 000C MOVE R1 R3
|
|
||||||
0x70020004, // 000D JMP #0013
|
|
||||||
0x600C0018, // 000E GETGBL R3 G24
|
|
||||||
0x5810000F, // 000F LDCONST R4 K15
|
|
||||||
0x88140105, // 0010 GETMBR R5 R0 K5
|
|
||||||
0x7C0C0400, // 0011 CALL R3 2
|
|
||||||
0x5C040600, // 0012 MOVE R1 R3
|
|
||||||
0x600C0018, // 0013 GETGBL R3 G24
|
|
||||||
0x58100010, // 0014 LDCONST R4 K16
|
|
||||||
0x5C140200, // 0015 MOVE R5 R1
|
|
||||||
0x88180101, // 0016 GETMBR R6 R0 K1
|
|
||||||
0x881C0102, // 0017 GETMBR R7 R0 K2
|
|
||||||
0x88200103, // 0018 GETMBR R8 R0 K3
|
|
||||||
0x88240104, // 0019 GETMBR R9 R0 K4
|
|
||||||
0x88280111, // 001A GETMBR R10 R0 K17
|
|
||||||
0x882C0112, // 001B GETMBR R11 R0 K18
|
|
||||||
0x7C0C1000, // 001C CALL R3 8
|
|
||||||
0x80040600, // 001D RET 1 R3
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified class: CrenelPositionAnimation
|
|
||||||
********************************************************************/
|
|
||||||
extern const bclass be_class_Animation;
|
|
||||||
be_local_class(CrenelPositionAnimation,
|
|
||||||
0,
|
|
||||||
&be_class_Animation,
|
|
||||||
be_nested_map(3,
|
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
|
||||||
{ be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
|
||||||
be_const_map( * be_nested_map(5,
|
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
|
||||||
{ be_const_key_weak(nb_pulse, -1), be_const_bytes_instance(0400FF) },
|
|
||||||
{ be_const_key_weak(low_size, 4), be_const_bytes_instance(0500000003) },
|
|
||||||
{ be_const_key_weak(pos, 1), be_const_bytes_instance(040000) },
|
|
||||||
{ be_const_key_weak(pulse_size, -1), be_const_bytes_instance(0500000001) },
|
|
||||||
{ be_const_key_weak(back_color, -1), be_const_bytes_instance(0402000000FF) },
|
|
||||||
})) ) } )) },
|
|
||||||
{ be_const_key_weak(render, 2), be_const_closure(class_CrenelPositionAnimation_render_closure) },
|
|
||||||
{ be_const_key_weak(tostring, -1), be_const_closure(class_CrenelPositionAnimation_tostring_closure) },
|
|
||||||
})),
|
|
||||||
be_str_weak(CrenelPositionAnimation)
|
|
||||||
);
|
|
||||||
// compact class 'TwinkleAnimation' ktab size: 40, total: 64 (saved 192 bytes)
|
// compact class 'TwinkleAnimation' ktab size: 40, total: 64 (saved 192 bytes)
|
||||||
static const bvalue be_ktab_class_TwinkleAnimation[40] = {
|
static const bvalue be_ktab_class_TwinkleAnimation[40] = {
|
||||||
/* K0 */ be_nested_str_weak(get_param),
|
/* K0 */ be_nested_str_weak(get_param),
|
||||||
@ -17895,44 +17743,196 @@ be_local_closure(twinkle_gentle, /* name */
|
|||||||
);
|
);
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
// compact class 'CrenelPositionAnimation' ktab size: 19, total: 24 (saved 40 bytes)
|
||||||
|
static const bvalue be_ktab_class_CrenelPositionAnimation[19] = {
|
||||||
|
/* K0 */ be_nested_str_weak(back_color),
|
||||||
|
/* K1 */ be_nested_str_weak(pos),
|
||||||
|
/* K2 */ be_nested_str_weak(pulse_size),
|
||||||
|
/* K3 */ be_nested_str_weak(low_size),
|
||||||
|
/* K4 */ be_nested_str_weak(nb_pulse),
|
||||||
|
/* K5 */ be_nested_str_weak(color),
|
||||||
|
/* K6 */ be_const_int(-16777216),
|
||||||
|
/* K7 */ be_nested_str_weak(fill_pixels),
|
||||||
|
/* K8 */ be_nested_str_weak(pixels),
|
||||||
|
/* K9 */ be_const_int(0),
|
||||||
|
/* K10 */ be_const_int(1),
|
||||||
|
/* K11 */ be_nested_str_weak(set_pixel_color),
|
||||||
|
/* K12 */ be_nested_str_weak(get_param),
|
||||||
|
/* K13 */ be_nested_str_weak(animation),
|
||||||
|
/* K14 */ be_nested_str_weak(is_value_provider),
|
||||||
|
/* K15 */ be_nested_str_weak(0x_X2508x),
|
||||||
|
/* K16 */ be_nested_str_weak(CrenelPositionAnimation_X28color_X3D_X25s_X2C_X20pos_X3D_X25s_X2C_X20pulse_size_X3D_X25s_X2C_X20low_size_X3D_X25s_X2C_X20nb_pulse_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29),
|
||||||
|
/* K17 */ be_nested_str_weak(priority),
|
||||||
|
/* K18 */ be_nested_str_weak(is_running),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extern const bclass be_class_CrenelPositionAnimation;
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: pulsating_animation
|
** Solidified function: render
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(pulsating_animation, /* name */
|
be_local_closure(class_CrenelPositionAnimation_render, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
4, /* nstack */
|
16, /* nstack */
|
||||||
1, /* argc */
|
4, /* argc */
|
||||||
0, /* varg */
|
10, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 5]) { /* constants */
|
&be_ktab_class_CrenelPositionAnimation, /* shared constants */
|
||||||
/* K0 */ be_nested_str_weak(animation),
|
be_str_weak(render),
|
||||||
/* K1 */ be_nested_str_weak(breathe_animation),
|
|
||||||
/* K2 */ be_nested_str_weak(curve_factor),
|
|
||||||
/* K3 */ be_const_int(1),
|
|
||||||
/* K4 */ be_nested_str_weak(period),
|
|
||||||
}),
|
|
||||||
be_str_weak(pulsating_animation),
|
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[ 8]) { /* code */
|
( &(const binstruction[64]) { /* code */
|
||||||
0xB8060000, // 0000 GETNGBL R1 K0
|
0x88100100, // 0000 GETMBR R4 R0 K0
|
||||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
0x88140101, // 0001 GETMBR R5 R0 K1
|
||||||
0x5C0C0000, // 0002 MOVE R3 R0
|
0x88180102, // 0002 GETMBR R6 R0 K2
|
||||||
0x7C040400, // 0003 CALL R1 2
|
0x881C0103, // 0003 GETMBR R7 R0 K3
|
||||||
0x90060503, // 0004 SETMBR R1 K2 K3
|
0x88200104, // 0004 GETMBR R8 R0 K4
|
||||||
0x540A03E7, // 0005 LDINT R2 1000
|
0x88240105, // 0005 GETMBR R9 R0 K5
|
||||||
0x90060802, // 0006 SETMBR R1 K4 R2
|
0x60280009, // 0006 GETGBL R10 G9
|
||||||
0x80040200, // 0007 RET 1 R1
|
0x002C0C07, // 0007 ADD R11 R6 R7
|
||||||
|
0x7C280200, // 0008 CALL R10 1
|
||||||
|
0x202C0906, // 0009 NE R11 R4 K6
|
||||||
|
0x782E0003, // 000A JMPF R11 #000F
|
||||||
|
0x8C2C0307, // 000B GETMET R11 R1 K7
|
||||||
|
0x88340308, // 000C GETMBR R13 R1 K8
|
||||||
|
0x5C380800, // 000D MOVE R14 R4
|
||||||
|
0x7C2C0600, // 000E CALL R11 3
|
||||||
|
0x182C1509, // 000F LE R11 R10 K9
|
||||||
|
0x782E0000, // 0010 JMPF R11 #0012
|
||||||
|
0x5828000A, // 0011 LDCONST R10 K10
|
||||||
|
0x1C2C1109, // 0012 EQ R11 R8 K9
|
||||||
|
0x782E0001, // 0013 JMPF R11 #0016
|
||||||
|
0x502C0200, // 0014 LDBOOL R11 1 0
|
||||||
|
0x80041600, // 0015 RET 1 R11
|
||||||
|
0x142C1109, // 0016 LT R11 R8 K9
|
||||||
|
0x782E0006, // 0017 JMPF R11 #001F
|
||||||
|
0x002C0A06, // 0018 ADD R11 R5 R6
|
||||||
|
0x042C170A, // 0019 SUB R11 R11 K10
|
||||||
|
0x102C160A, // 001A MOD R11 R11 R10
|
||||||
|
0x042C1606, // 001B SUB R11 R11 R6
|
||||||
|
0x002C170A, // 001C ADD R11 R11 K10
|
||||||
|
0x5C141600, // 001D MOVE R5 R11
|
||||||
|
0x70020007, // 001E JMP #0027
|
||||||
|
0x442C1400, // 001F NEG R11 R10
|
||||||
|
0x142C0A0B, // 0020 LT R11 R5 R11
|
||||||
|
0x782E0004, // 0021 JMPF R11 #0027
|
||||||
|
0x202C1109, // 0022 NE R11 R8 K9
|
||||||
|
0x782E0002, // 0023 JMPF R11 #0027
|
||||||
|
0x00140A0A, // 0024 ADD R5 R5 R10
|
||||||
|
0x0420110A, // 0025 SUB R8 R8 K10
|
||||||
|
0x7001FFF7, // 0026 JMP #001F
|
||||||
|
0x142C0A03, // 0027 LT R11 R5 R3
|
||||||
|
0x782E0014, // 0028 JMPF R11 #003E
|
||||||
|
0x202C1109, // 0029 NE R11 R8 K9
|
||||||
|
0x782E0012, // 002A JMPF R11 #003E
|
||||||
|
0x582C0009, // 002B LDCONST R11 K9
|
||||||
|
0x14300B09, // 002C LT R12 R5 K9
|
||||||
|
0x78320001, // 002D JMPF R12 #0030
|
||||||
|
0x44300A00, // 002E NEG R12 R5
|
||||||
|
0x5C2C1800, // 002F MOVE R11 R12
|
||||||
|
0x14301606, // 0030 LT R12 R11 R6
|
||||||
|
0x78320008, // 0031 JMPF R12 #003B
|
||||||
|
0x00300A0B, // 0032 ADD R12 R5 R11
|
||||||
|
0x14301803, // 0033 LT R12 R12 R3
|
||||||
|
0x78320005, // 0034 JMPF R12 #003B
|
||||||
|
0x8C30030B, // 0035 GETMET R12 R1 K11
|
||||||
|
0x00380A0B, // 0036 ADD R14 R5 R11
|
||||||
|
0x5C3C1200, // 0037 MOVE R15 R9
|
||||||
|
0x7C300600, // 0038 CALL R12 3
|
||||||
|
0x002C170A, // 0039 ADD R11 R11 K10
|
||||||
|
0x7001FFF4, // 003A JMP #0030
|
||||||
|
0x00140A0A, // 003B ADD R5 R5 R10
|
||||||
|
0x0420110A, // 003C SUB R8 R8 K10
|
||||||
|
0x7001FFE8, // 003D JMP #0027
|
||||||
|
0x502C0200, // 003E LDBOOL R11 1 0
|
||||||
|
0x80041600, // 003F RET 1 R11
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: tostring
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(class_CrenelPositionAnimation_tostring, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
12, /* nstack */
|
||||||
|
1, /* argc */
|
||||||
|
10, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
&be_ktab_class_CrenelPositionAnimation, /* shared constants */
|
||||||
|
be_str_weak(tostring),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[30]) { /* code */
|
||||||
|
0x4C040000, // 0000 LDNIL R1
|
||||||
|
0x8C08010C, // 0001 GETMET R2 R0 K12
|
||||||
|
0x58100005, // 0002 LDCONST R4 K5
|
||||||
|
0x7C080400, // 0003 CALL R2 2
|
||||||
|
0xB80E1A00, // 0004 GETNGBL R3 K13
|
||||||
|
0x8C0C070E, // 0005 GETMET R3 R3 K14
|
||||||
|
0x5C140400, // 0006 MOVE R5 R2
|
||||||
|
0x7C0C0400, // 0007 CALL R3 2
|
||||||
|
0x780E0004, // 0008 JMPF R3 #000E
|
||||||
|
0x600C0008, // 0009 GETGBL R3 G8
|
||||||
|
0x5C100400, // 000A MOVE R4 R2
|
||||||
|
0x7C0C0200, // 000B CALL R3 1
|
||||||
|
0x5C040600, // 000C MOVE R1 R3
|
||||||
|
0x70020004, // 000D JMP #0013
|
||||||
|
0x600C0018, // 000E GETGBL R3 G24
|
||||||
|
0x5810000F, // 000F LDCONST R4 K15
|
||||||
|
0x88140105, // 0010 GETMBR R5 R0 K5
|
||||||
|
0x7C0C0400, // 0011 CALL R3 2
|
||||||
|
0x5C040600, // 0012 MOVE R1 R3
|
||||||
|
0x600C0018, // 0013 GETGBL R3 G24
|
||||||
|
0x58100010, // 0014 LDCONST R4 K16
|
||||||
|
0x5C140200, // 0015 MOVE R5 R1
|
||||||
|
0x88180101, // 0016 GETMBR R6 R0 K1
|
||||||
|
0x881C0102, // 0017 GETMBR R7 R0 K2
|
||||||
|
0x88200103, // 0018 GETMBR R8 R0 K3
|
||||||
|
0x88240104, // 0019 GETMBR R9 R0 K4
|
||||||
|
0x88280111, // 001A GETMBR R10 R0 K17
|
||||||
|
0x882C0112, // 001B GETMBR R11 R0 K18
|
||||||
|
0x7C0C1000, // 001C CALL R3 8
|
||||||
|
0x80040600, // 001D RET 1 R3
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified class: CrenelPositionAnimation
|
||||||
|
********************************************************************/
|
||||||
|
extern const bclass be_class_Animation;
|
||||||
|
be_local_class(CrenelPositionAnimation,
|
||||||
|
0,
|
||||||
|
&be_class_Animation,
|
||||||
|
be_nested_map(3,
|
||||||
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
|
{ be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||||
|
be_const_map( * be_nested_map(5,
|
||||||
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
|
{ be_const_key_weak(nb_pulse, -1), be_const_bytes_instance(0400FF) },
|
||||||
|
{ be_const_key_weak(low_size, 4), be_const_bytes_instance(0500000003) },
|
||||||
|
{ be_const_key_weak(pos, 1), be_const_bytes_instance(040000) },
|
||||||
|
{ be_const_key_weak(pulse_size, -1), be_const_bytes_instance(0500000001) },
|
||||||
|
{ be_const_key_weak(back_color, -1), be_const_bytes_instance(0402000000FF) },
|
||||||
|
})) ) } )) },
|
||||||
|
{ be_const_key_weak(render, 2), be_const_closure(class_CrenelPositionAnimation_render_closure) },
|
||||||
|
{ be_const_key_weak(tostring, -1), be_const_closure(class_CrenelPositionAnimation_tostring_closure) },
|
||||||
|
})),
|
||||||
|
be_str_weak(CrenelPositionAnimation)
|
||||||
|
);
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: noise_fractal
|
** Solidified function: noise_fractal
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
@ -18969,7 +18969,7 @@ be_local_module(animation,
|
|||||||
"animation",
|
"animation",
|
||||||
be_nested_map(98,
|
be_nested_map(98,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(noise_single_color, 33), be_const_closure(noise_single_color_closure) },
|
{ be_const_key_weak(noise_single_color, 35), be_const_closure(noise_single_color_closure) },
|
||||||
{ be_const_key_weak(pulsating_animation, -1), be_const_closure(pulsating_animation_closure) },
|
{ be_const_key_weak(pulsating_animation, -1), be_const_closure(pulsating_animation_closure) },
|
||||||
{ be_const_key_weak(elastic, 16), be_const_closure(elastic_closure) },
|
{ be_const_key_weak(elastic, 16), be_const_closure(elastic_closure) },
|
||||||
{ be_const_key_weak(TRIANGLE, -1), be_const_int(2) },
|
{ be_const_key_weak(TRIANGLE, -1), be_const_int(2) },
|
||||||
@ -18986,12 +18986,12 @@ be_local_module(animation,
|
|||||||
{ be_const_key_weak(square, 47), be_const_closure(square_closure) },
|
{ be_const_key_weak(square, 47), be_const_closure(square_closure) },
|
||||||
{ be_const_key_weak(wave_single_sine, -1), be_const_closure(wave_single_sine_closure) },
|
{ be_const_key_weak(wave_single_sine, -1), be_const_closure(wave_single_sine_closure) },
|
||||||
{ be_const_key_weak(_math, 55), be_const_class(be_class_AnimationMath) },
|
{ be_const_key_weak(_math, 55), be_const_class(be_class_AnimationMath) },
|
||||||
{ be_const_key_weak(SAWTOOTH, 31), be_const_int(1) },
|
{ be_const_key_weak(SAWTOOTH, 32), be_const_int(1) },
|
||||||
{ be_const_key_weak(register_event_handler, -1), be_const_closure(register_event_handler_closure) },
|
{ be_const_key_weak(register_event_handler, -1), be_const_closure(register_event_handler_closure) },
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(animation_init_closure) },
|
{ be_const_key_weak(init, -1), be_const_closure(animation_init_closure) },
|
||||||
{ be_const_key_weak(gradient_two_color_linear, 35), be_const_closure(gradient_two_color_linear_closure) },
|
{ be_const_key_weak(gradient_two_color_linear, 38), be_const_closure(gradient_two_color_linear_closure) },
|
||||||
{ be_const_key_weak(breathe_animation, 97), be_const_class(be_class_BreatheAnimation) },
|
{ be_const_key_weak(breathe_animation, 97), be_const_class(be_class_BreatheAnimation) },
|
||||||
{ be_const_key_weak(gradient_rainbow_radial, 38), be_const_closure(gradient_rainbow_radial_closure) },
|
{ be_const_key_weak(gradient_rainbow_radial, 79), be_const_closure(gradient_rainbow_radial_closure) },
|
||||||
{ be_const_key_weak(EASE_IN, -1), be_const_int(6) },
|
{ be_const_key_weak(EASE_IN, -1), be_const_int(6) },
|
||||||
{ be_const_key_weak(LINEAR, -1), be_const_int(1) },
|
{ be_const_key_weak(LINEAR, -1), be_const_int(1) },
|
||||||
{ be_const_key_weak(color_provider, -1), be_const_class(be_class_ColorProvider) },
|
{ be_const_key_weak(color_provider, -1), be_const_class(be_class_ColorProvider) },
|
||||||
@ -19000,14 +19000,14 @@ be_local_module(animation,
|
|||||||
{ be_const_key_weak(COSINE, -1), be_const_int(4) },
|
{ be_const_key_weak(COSINE, -1), be_const_int(4) },
|
||||||
{ be_const_key_weak(static_color, 60), be_const_class(be_class_StaticColorProvider) },
|
{ be_const_key_weak(static_color, 60), be_const_class(be_class_StaticColorProvider) },
|
||||||
{ be_const_key_weak(noise_fractal, 72), be_const_closure(noise_fractal_closure) },
|
{ be_const_key_weak(noise_fractal, 72), be_const_closure(noise_fractal_closure) },
|
||||||
|
{ be_const_key_weak(PALETTE_RAINBOW, -1), be_const_bytes_instance(FFFC0000FFFF8000FFFFFF00FF00FF00FF00FFFFFF0080FFFF8000FF) },
|
||||||
{ be_const_key_weak(SQUARE, -1), be_const_int(3) },
|
{ be_const_key_weak(SQUARE, -1), be_const_int(3) },
|
||||||
{ be_const_key_weak(twinkle_gentle, -1), be_const_closure(twinkle_gentle_closure) },
|
{ be_const_key_weak(twinkle_gentle, -1), be_const_closure(twinkle_gentle_closure) },
|
||||||
{ be_const_key_weak(parameterized_object, -1), be_const_class(be_class_ParameterizedObject) },
|
|
||||||
{ be_const_key_weak(twinkle_intense, -1), be_const_closure(twinkle_intense_closure) },
|
{ be_const_key_weak(twinkle_intense, -1), be_const_closure(twinkle_intense_closure) },
|
||||||
{ be_const_key_weak(twinkle_animation, -1), be_const_class(be_class_TwinkleAnimation) },
|
{ be_const_key_weak(parameterized_object, -1), be_const_class(be_class_ParameterizedObject) },
|
||||||
{ be_const_key_weak(cosine_osc, -1), be_const_closure(cosine_osc_closure) },
|
{ be_const_key_weak(cosine_osc, -1), be_const_closure(cosine_osc_closure) },
|
||||||
{ be_const_key_weak(version_string, -1), be_const_closure(animation_version_string_closure) },
|
{ be_const_key_weak(version_string, -1), be_const_closure(animation_version_string_closure) },
|
||||||
{ be_const_key_weak(linear, -1), be_const_closure(linear_closure) },
|
{ be_const_key_weak(twinkle_animation, -1), be_const_class(be_class_TwinkleAnimation) },
|
||||||
{ be_const_key_weak(sequence_manager, -1), be_const_class(be_class_SequenceManager) },
|
{ be_const_key_weak(sequence_manager, -1), be_const_class(be_class_SequenceManager) },
|
||||||
{ be_const_key_weak(init_strip, -1), be_const_closure(animation_init_strip_closure) },
|
{ be_const_key_weak(init_strip, -1), be_const_closure(animation_init_strip_closure) },
|
||||||
{ be_const_key_weak(list_user_functions, 48), be_const_closure(list_user_functions_closure) },
|
{ be_const_key_weak(list_user_functions, 48), be_const_closure(list_user_functions_closure) },
|
||||||
@ -19042,17 +19042,17 @@ be_local_module(animation,
|
|||||||
{ be_const_key_weak(rich_palette_animation, 89), be_const_class(be_class_RichPaletteAnimation) },
|
{ be_const_key_weak(rich_palette_animation, 89), be_const_class(be_class_RichPaletteAnimation) },
|
||||||
{ be_const_key_weak(animation, -1), be_const_class(be_class_Animation) },
|
{ be_const_key_weak(animation, -1), be_const_class(be_class_Animation) },
|
||||||
{ be_const_key_weak(wave_animation, -1), be_const_class(be_class_WaveAnimation) },
|
{ be_const_key_weak(wave_animation, -1), be_const_class(be_class_WaveAnimation) },
|
||||||
{ be_const_key_weak(VERSION, 83), be_const_int(65536) },
|
{ be_const_key_weak(VERSION, 31), be_const_int(65536) },
|
||||||
{ be_const_key_weak(SINE, 25), be_const_int(5) },
|
{ be_const_key_weak(SINE, 25), be_const_int(5) },
|
||||||
{ be_const_key_weak(PALETTE_FIRE, -1), be_const_bytes_instance(FF000000FF800000FFFF0000FFFF8000FFFFFF00) },
|
{ be_const_key_weak(PALETTE_FIRE, -1), be_const_bytes_instance(FF000000FF800000FFFF0000FFFF8000FFFFFF00) },
|
||||||
{ be_const_key_weak(gradient_animation, -1), be_const_class(be_class_GradientAnimation) },
|
{ be_const_key_weak(gradient_animation, -1), be_const_class(be_class_GradientAnimation) },
|
||||||
{ be_const_key_weak(wave_rainbow_sine, 32), be_const_closure(wave_rainbow_sine_closure) },
|
{ be_const_key_weak(wave_rainbow_sine, 33), be_const_closure(wave_rainbow_sine_closure) },
|
||||||
{ be_const_key_weak(sawtooth, -1), be_const_closure(sawtooth_closure) },
|
{ be_const_key_weak(sawtooth, -1), be_const_closure(sawtooth_closure) },
|
||||||
{ be_const_key_weak(crenel_position_animation, -1), be_const_class(be_class_CrenelPositionAnimation) },
|
{ be_const_key_weak(linear, -1), be_const_closure(linear_closure) },
|
||||||
{ be_const_key_weak(sine_osc, 85), be_const_closure(sine_osc_closure) },
|
{ be_const_key_weak(sine_osc, 85), be_const_closure(sine_osc_closure) },
|
||||||
{ be_const_key_weak(static_value, -1), be_const_class(be_class_StaticValueProvider) },
|
{ be_const_key_weak(static_value, -1), be_const_class(be_class_StaticValueProvider) },
|
||||||
{ be_const_key_weak(get_user_function, -1), be_const_closure(get_user_function_closure) },
|
{ be_const_key_weak(get_user_function, -1), be_const_closure(get_user_function_closure) },
|
||||||
{ be_const_key_weak(PALETTE_RAINBOW, -1), be_const_bytes_instance(FFFC0000FFFF8000FFFFFF00FF00FF00FF00FFFFFF0080FFFF8000FF) },
|
{ be_const_key_weak(crenel_animation, -1), be_const_class(be_class_CrenelPositionAnimation) },
|
||||||
{ be_const_key_weak(fire_animation, 90), be_const_class(be_class_FireAnimation) },
|
{ be_const_key_weak(fire_animation, 90), be_const_class(be_class_FireAnimation) },
|
||||||
{ be_const_key_weak(gradient_rainbow_linear, -1), be_const_closure(gradient_rainbow_linear_closure) },
|
{ be_const_key_weak(gradient_rainbow_linear, -1), be_const_closure(gradient_rainbow_linear_closure) },
|
||||||
{ be_const_key_weak(comet_animation, 59), be_const_class(be_class_CometAnimation) },
|
{ be_const_key_weak(comet_animation, 59), be_const_class(be_class_CometAnimation) },
|
||||||
|
|||||||
@ -31,7 +31,7 @@ def run_tests()
|
|||||||
var engine = animation.create_engine(strip)
|
var engine = animation.create_engine(strip)
|
||||||
|
|
||||||
# Test 1: Basic construction with new parameterized pattern
|
# Test 1: Basic construction with new parameterized pattern
|
||||||
var crenel = animation.crenel_position_animation(engine)
|
var crenel = animation.crenel_animation(engine)
|
||||||
test_assert(crenel != nil, "Crenel position animation creation")
|
test_assert(crenel != nil, "Crenel position animation creation")
|
||||||
|
|
||||||
# Set parameters via virtual member assignment
|
# Set parameters via virtual member assignment
|
||||||
|
|||||||
@ -18,7 +18,7 @@ def test_crenel_with_integer_color()
|
|||||||
var red_color = 0xFFFF0000 # Red
|
var red_color = 0xFFFF0000 # Red
|
||||||
|
|
||||||
# Create animation with new parameterized pattern
|
# Create animation with new parameterized pattern
|
||||||
var crenel = animation.crenel_position_animation(engine)
|
var crenel = animation.crenel_animation(engine)
|
||||||
|
|
||||||
# Set parameters via virtual member assignment
|
# Set parameters via virtual member assignment
|
||||||
crenel.color = red_color
|
crenel.color = red_color
|
||||||
@ -60,7 +60,7 @@ def test_crenel_with_color_provider()
|
|||||||
color_provider.color = blue_color
|
color_provider.color = blue_color
|
||||||
|
|
||||||
# Create animation with new parameterized pattern
|
# Create animation with new parameterized pattern
|
||||||
var crenel = animation.crenel_position_animation(engine)
|
var crenel = animation.crenel_animation(engine)
|
||||||
|
|
||||||
# Set parameters via virtual member assignment
|
# Set parameters via virtual member assignment
|
||||||
crenel.color = color_provider # ColorProvider
|
crenel.color = color_provider # ColorProvider
|
||||||
@ -102,7 +102,7 @@ def test_crenel_with_dynamic_color_provider()
|
|||||||
palette_provider.cycle_period = 2000 # 2 second cycle
|
palette_provider.cycle_period = 2000 # 2 second cycle
|
||||||
|
|
||||||
# Create animation with new parameterized pattern
|
# Create animation with new parameterized pattern
|
||||||
var crenel = animation.crenel_position_animation(engine)
|
var crenel = animation.crenel_animation(engine)
|
||||||
|
|
||||||
# Set parameters via virtual member assignment
|
# Set parameters via virtual member assignment
|
||||||
crenel.color = palette_provider # dynamic ColorProvider
|
crenel.color = palette_provider # dynamic ColorProvider
|
||||||
@ -150,7 +150,7 @@ def test_crenel_with_generic_value_provider()
|
|||||||
static_provider.value = 0xFFFF00FF # Magenta
|
static_provider.value = 0xFFFF00FF # Magenta
|
||||||
|
|
||||||
# Create animation with new parameterized pattern
|
# Create animation with new parameterized pattern
|
||||||
var crenel = animation.crenel_position_animation(engine)
|
var crenel = animation.crenel_animation(engine)
|
||||||
|
|
||||||
# Set parameters via virtual member assignment
|
# Set parameters via virtual member assignment
|
||||||
crenel.color = static_provider # generic ValueProvider
|
crenel.color = static_provider # generic ValueProvider
|
||||||
@ -187,7 +187,7 @@ def test_crenel_set_color_methods()
|
|||||||
var frame = animation.frame_buffer(5)
|
var frame = animation.frame_buffer(5)
|
||||||
|
|
||||||
# Create animation with new parameterized pattern
|
# Create animation with new parameterized pattern
|
||||||
var crenel = animation.crenel_position_animation(engine)
|
var crenel = animation.crenel_animation(engine)
|
||||||
|
|
||||||
# Set initial parameters
|
# Set initial parameters
|
||||||
crenel.color = 0xFFFF0000 # red
|
crenel.color = 0xFFFF0000 # red
|
||||||
@ -231,7 +231,7 @@ def test_crenel_tostring()
|
|||||||
var engine = animation.create_engine(strip)
|
var engine = animation.create_engine(strip)
|
||||||
|
|
||||||
# Test with integer color
|
# Test with integer color
|
||||||
var crenel_int = animation.crenel_position_animation(engine)
|
var crenel_int = animation.crenel_animation(engine)
|
||||||
crenel_int.color = 0xFFFF0000
|
crenel_int.color = 0xFFFF0000
|
||||||
crenel_int.back_color = 0xFF000000
|
crenel_int.back_color = 0xFF000000
|
||||||
crenel_int.pos = 0
|
crenel_int.pos = 0
|
||||||
@ -252,7 +252,7 @@ def test_crenel_tostring()
|
|||||||
var color_provider = animation.static_color(engine)
|
var color_provider = animation.static_color(engine)
|
||||||
color_provider.color = 0xFF00FF00
|
color_provider.color = 0xFF00FF00
|
||||||
|
|
||||||
var crenel_provider = animation.crenel_position_animation(engine)
|
var crenel_provider = animation.crenel_animation(engine)
|
||||||
crenel_provider.color = color_provider
|
crenel_provider.color = color_provider
|
||||||
crenel_provider.back_color = 0xFF000000
|
crenel_provider.back_color = 0xFF000000
|
||||||
crenel_provider.pos = 0
|
crenel_provider.pos = 0
|
||||||
|
|||||||
@ -192,7 +192,7 @@
|
|||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"name": "entity.name.function.animation.animation-dsl",
|
"name": "entity.name.function.animation.animation-dsl",
|
||||||
"match": "\\b(solid|pulsating_animation|beacon_animation|comet_animation|rich_palette_animation|twinkle_animation|breathe_animation|fire_animation|crenel_position_animation)\\b"
|
"match": "\\b(solid|pulsating_animation|beacon_animation|comet_animation|rich_palette_animation|twinkle_animation|breathe_animation|fire_animation|crenel_animation)\\b"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||