Alias GLSL's mix function as lerp in p5.strands (#7875)#7887
Alias GLSL's mix function as lerp in p5.strands (#7875)#7887davepagurek merged 8 commits intoprocessing:dev-2.0from
Conversation
|
fixes #7875 |
lukeplowden
left a comment
There was a problem hiding this comment.
Thank you Lalit for working on this! I've left a couple of suggestions. What was causing a reference error, however? I can't recreate it. If you could let me know a bit about your dev environment that might help. How are you building the library or importing this module?
|
I was using VS Code but the issue I was facing was not because of environment. I had created a syntax error by mistake which I was not noticing. |
|
Thank you, almost there! Could you also remove the unused variable |
|
I have made the changes as you suggested. Please review it when you have time. |
|
Thank you for working on this! It looks good to me. @davepagurek could you review too? |
davepagurek
left a comment
There was a problem hiding this comment.
Looks great, thanks @LalitNarayanYadav! Let us know if you're interested in taking on more strands functions 🙂
|
@all-contributors please add @LalitNarayanYadav for code |
|
I've put up a pull request to add @LalitNarayanYadav! 🎉 |
You're very welcome @davepagurek ! 😊 And thank you@ I'd be glad to take on more p5.strands functions or any other related work! Just let me know where help is needed next. happy to contribute more. |
Resolves #7875
Changes:
mixfunction under the namelerpinp5.strands.lerp()withinp5.strandsmaps tomix()when generating shader expressions.lerp()function outside ofp5.strands.Rationale:
This change bridges the gap between core
p5.jsandp5.strandsby makinglerp()work seamlessly within shader code. It increases accessibility by allowing familiar p5.js functions to be used in new contexts.A short inline comment was also added for clarity:
PR Checklist
npm run lintpasses