mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 04:41:28 +00:00
Refactor Starlight Smooth matrix effect (#25442)
This commit is contained in:
parent
e92f1fb220
commit
584ad807cc
@ -9,7 +9,7 @@ static uint8_t phase_offsets[RGB_MATRIX_LED_COUNT];
|
||||
|
||||
hsv_t STARLIGHT_SMOOTH_math(hsv_t hsv, uint8_t i, uint8_t time) {
|
||||
if (phase_offsets[i] == 0) {
|
||||
phase_offsets[i] = rand() % 255;
|
||||
phase_offsets[i] = random8();
|
||||
}
|
||||
hsv.v = scale8(abs8(sin8((time + phase_offsets[i]) / 2) - 128) * 2, hsv.v);
|
||||
return hsv;
|
||||
|
Loading…
Reference in New Issue
Block a user