| 46 | } |
| 47 | |
| 48 | void triggerRipple(fl::WaveSimulation1D &waveSim, int x) { |
| 49 | |
| 50 | for (int i = x - 1; i <= x + 1; i++) { |
| 51 | if (i < 0 || i >= NUM_LEDS) |
| 52 | continue; |
| 53 | waveSim.setf(i, -1.f); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | // Wave simulation looks better when you render at a higher resolution then |
| 58 | // downscale the result to the display resolution. |