Happy Coding

Bouncing Gradients p5js

Dear Kevin,

love your „bouncing gradient“ Bouncing Gradient - Happy Coding.

I’m struggling to transfer it to p5js.

Would you be so awesome to help me?

I could give a tiny reward if it helps. J

Hope to hear from you soon.

Kind regards

Which part is giving you trouble?

Generally, when I think about converting a project from one coding language to another, I don’t try to translate the code one line at a time. Instead, I try to describe what the project does in my own words. That gives you an algorithm that you can then implement with code.

So instead of thinking about converting the original code, try to think about it in terms of: how would you implement that in p5.js?

Maybe start with something smaller. Can you get it working in grayscale? Try to get that working before you worry about adding colors.

If you get stuck on something specific, let us know what your code looks like and what error you’re getting. And we’ll be happy to help you without any rewards involved!