| 703 | |
| 704 | |
| 705 | void drawWave(uint32_t now) { |
| 706 | // Update wave parameters from UI |
| 707 | waveFx->setSpeed(waveSpeed.value()); |
| 708 | waveFx->setDampening(waveDampening.value()); |
| 709 | waveFx->setHalfDuplex(waveHalfDuplex.value()); |
| 710 | waveFx->setXCylindrical(true); // Always keep cylindrical for corkscrew |
| 711 | waveFx->setStencil(waveIsotropicStencil |
| 712 | ? fl::LaplacianStencil::NinePointIsotropic |
| 713 | : fl::LaplacianStencil::FivePoint); |
| 714 | |
| 715 | // Update wave color palette |
| 716 | fl::CRGBPalette16 currentPalette = getWavePalette(); |
| 717 | crgMap->setGradient(currentPalette); |
| 718 | |
| 719 | |
| 720 | |
| 721 | // Apply blur settings to the wave blend (for smoother wave effects) |
| 722 | waveBlend->setGlobalBlurAmount(waveBlurAmount.value()); |
| 723 | waveBlend->setGlobalBlurPasses(waveBlurPasses.value()); |
| 724 | |
| 725 | // Check if manual trigger button was pressed |
| 726 | if (waveTriggerButton.value()) { |
| 727 | triggerWaveRipple(); |
| 728 | } |
| 729 | |
| 730 | // Handle auto-triggering |
| 731 | processWaveAutoTrigger(now); |
| 732 | |
| 733 | // Draw the wave effect directly to the frame buffer |
| 734 | // Create a DrawContext for the wave renderer |
| 735 | fl::Fx::DrawContext waveContext(now, frameBufferPtr->span()); |
| 736 | waveBlend->draw(waveContext); |
| 737 | } |
| 738 | |
| 739 | void drawAnimartrix(uint32_t now) { |
| 740 | // Update animartrix parameters from UI |
no test coverage detected