aboutsummaryrefslogtreecommitdiff
path: root/quantum/led_matrix_animations/cycle_out_in_anim.h
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-05-11 13:41:06 +1000
committerGitHub <noreply@github.com>2021-05-11 13:41:06 +1000
commit3edc43964d35986a4cc5eb4602e1d79b8be1bf01 (patch)
tree710e7e74e33d85ceda14f3b422f0debc0ace2c5c /quantum/led_matrix_animations/cycle_out_in_anim.h
parentf41fc6b70c48b7fde36a4af1da99033edf4ffc74 (diff)
downloadqmk_firmware-3edc43964d35986a4cc5eb4602e1d79b8be1bf01.tar.gz
qmk_firmware-3edc43964d35986a4cc5eb4602e1d79b8be1bf01.zip
LED Matrix: Effects! (#12651)
Diffstat (limited to 'quantum/led_matrix_animations/cycle_out_in_anim.h')
-rw-r--r--quantum/led_matrix_animations/cycle_out_in_anim.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/quantum/led_matrix_animations/cycle_out_in_anim.h b/quantum/led_matrix_animations/cycle_out_in_anim.h
new file mode 100644
index 000000000..3f5fc5b18
--- /dev/null
+++ b/quantum/led_matrix_animations/cycle_out_in_anim.h
@@ -0,0 +1,14 @@
1#ifndef DISABLE_LED_MATRIX_CYCLE_OUT_IN
2LED_MATRIX_EFFECT(CYCLE_OUT_IN)
3# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
4
5static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
6 return scale8(3 * dist / 2 + time, val);
7}
8
9bool CYCLE_OUT_IN(effect_params_t* params) {
10 return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math);
11}
12
13# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
14#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN