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 Answer
+ 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.