0
Why aren’t the ball objects appearing on the screen?
https://code.sololearn.com/WEE5bJCAUhow/?ref=app I’m creating objects with a constructor/class and manipulating them with prototype functions. I’ve created my ball objects and called them on the prototype but they do not appear on screen and I can’t seem to figure out why yet. This has me stumped for now. If anyone has any insight or a solution, that would be very much appreciated
1 ответ
+ 4
Thomas
In the Ball class constructor
this.ballXPos = this.ballXPos;
this.ballYPos = this.ballYPos;
It getting XPos and YPos passed to it.
this.ballXPos = ballXPos;
this.ballYPos = ballYPos;
You also need to check your draw function because you also have a color problem.