0
Dude I really need help!
This code is doing wierd things to all my devices. No matter where I try to run it, none of my devices can do it and either the browser says error cannot load or my sololearn app has to restart!! Please help!! I'm using the JavaScript framework p5.js. https://code.sololearn.com/Wh6wEEbexGpM/?ref=app
11 Respuestas
+ 3
for(i = 0; i < particles.length; i++){
particles.push(p);
}
This would make particles keep increase infinitely
+ 2
Where is your function execution?
+ 2
https://code.sololearn.com/W7374Rvqe5zP/?ref=app
Tried to modify some... I dont know p5, but I guess this the code, in order to be functional workable.
+ 1
Then p5.js should be run before your script.
Put all your script before end of closing body tag
+ 1
Yes that is the point for the particles to keep being made and yes I will fix the performance issues
+ 1
Don't put your p5 codes on javascript tag, cause it would run before p5 library loaded
+ 1
Actually this is pretty much exactly how i wanted it Thank You !!
0
In p5.js Setup and Draw do not need to be executed ad they are functions the library run themselves https://youtu.be/8j0UDiN7my4
this is Daniel Shiffman Teaching about this if you are interested.
0
I do not believe I have an error really but maybe the infinite loop I have is too much? All my devices could run this same program before it's just that NOW it like breaks a bunch of stuff
0
p5.js is the only thing I link in my html. It's the only thing I added to my html, and it is already inside the body tags.
0
What tag should I run them with?