Created
January 31, 2019 23:06
-
-
Save willyandan/38aede4ed5fc3e8ba517bd8812b61444 to your computer and use it in GitHub Desktop.
pong.js - drawRect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function drawRect(x,y,w,h,color="#fff"){ | |
ctx.fillStyle = color | |
ctx.fillRect(x,y,w,h) | |
ctx.fillStyle = "#000" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment