You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual: c is undefined, so the sketch renders black.
This works as expected in 2.3.4 and 1.11.13.
The regression appears to come from the p5.strands override of paletteLerp(): when no Strands context is active, it returns without falling back to the original CPU implementation.
lerpColor() has the expected fallback behavior, and paletteLerp() still works correctly inside Strands on both WebGL and WebGPU.
I couldn't find an existing issue or PR covering this regression.
Thanks for the report, @bhabishnu, I can confirm this on current main.
The override I added in #8817 (src/strands/strands_api.js, for #8751) starts with if (!strandsContext.active) return;, so outside Strands it never reaches the CPU implementation in src/color/creating_reading.js. Unlike lerpColor, red, green, blue and random, it also never saves the original function. The existing tests only call paletteLerp inside Strands, so nothing caught it.
I'd like to fix this since it came from my change. The plan is to save const originalPaletteLerp = fn.paletteLerp; before the augmentFn call, delegate to it when Strands is inactive, and add a unit test for the non-Strands path. @davepagurek, is it okay if I take this?
Activity
LalitNarayanYadav commentedon Oct 26, 2026
Thanks for the report, @bhabishnu, I can confirm this on current
main.The override I added in #8817 (
src/strands/strands_api.js, for #8751) starts withif (!strandsContext.active) return;, so outside Strands it never reaches the CPU implementation insrc/color/creating_reading.js. UnlikelerpColor,red,green,blueandrandom, it also never saves the original function. The existing tests only callpaletteLerpinside Strands, so nothing caught it.I'd like to fix this since it came from my change. The plan is to save
const originalPaletteLerp = fn.paletteLerp;before theaugmentFncall, delegate to it when Strands is inactive, and add a unit test for the non-Strands path. @davepagurek, is it okay if I take this?davepagurek commentedon Oct 26, 2026
Thanks, go ahead!
Thanks for testing and catching this @bhabishnu!
bhabishnu commentedon Oct 27, 2026
Sounds good, thanks! Happy to help test the PR once it’s up.