p5.js draw() function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

p5.js draw() function

Hello, javascript library p5.js by default has a function draw() which is an infinite loop, I've tried to use it on SoloLearn, and it did not work. It draws elements only once. Is there a workaround? Or should I use a JS timer instead?

17th Aug 2018, 10:48 AM
MarJan
MarJan - avatar
1 Answer
+ 2
It seems to work just fine for me. https://code.sololearn.com/WvpvJ44OrFib/
17th Aug 2018, 11:40 AM
Just A Rather Ridiculously Long Username