/breakout

Primary LanguageJavaScript

breakout

Js codealong to learn how to use the canvas api and the request animation frame api

Canvas API: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API

Request Animation Frame API: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame

[ x ] - Create canvas context [ x ] - Create and draw ball [ x ] - Create and draw paddle [ x ] - Create bricks - we will need a nested array for all the bricks and those bricks will need a visible property for us to manipulate [ x ] - Draw score [ x ] - Create canvas context [ x ] - Add update() - Animate - requestAnimationFrame(cb) [ x ] - Move paddle with keyboard events [ x ] - Move ball [ x ] - Add wall boundaries [ x ]- Increase score on bricks broken action [ x ] - Lose - redraw and reset