This sketch basically duplicates the work of Sonny Sandberg where he suggestes a method of putting multiple canvases on the same web page in his video using a BallInDiv class. However, it uses MyCanvases instead of p5 canvases. Another difference is that he created the 3 <div>s in the web page. In this version the BallInDiv method creates its own <div>.
The p5.js file: ball.pjs
James Brink, 5/12/2020