I completed the Adding bouncing balls features and am seeking an assessment of my solution (CodePen).
Notes
- I switched to ES2015 class syntax as I prefer it so far.
- I added a header with some minor controls.
- It looks ugly as sin. By the time I got it working, I had no time/energy for styling further.
- There is a bug where I think the velocity gets increased each time the game is restarted despite clearing the array of balls. Any pointers on how to fix would be appreciated.
- I wasn’t able to answer the question
…can you tell us why we’ve had to set
let _this = this;
in the position it is in? It is something to do with function scope.
Any explanation of direction where I might find one would be appreciated.
Thank you for your time