Fill colors randomly changing in processingJS

My code can be found here: https://www.openprocessing.org/sketch/525303

It's a simple interactive neural network. When I run it in the Processing IDE, the neurons (circles) are all white (as they should be) when they don't get any input. However, when I tried to upload it, the neurons start white but quickly start to cycle through the colors of the rainbow. Anyone know why and how to fix this?

Answers

  • Can you please narrow your problem down to a MCVE? Try to isolate the problem and create an example program that just shows a single circle for example.

  • Thanks Kevin! While I was trying to make an MCVE I found the problem! I forgot to constrain a variable and it was going below 0, which I never expected. I was using that variable to determine the color :|

Sign In or Register to comment.