A Pen by Krzysztof

Thumbnail
This awesome code was written by krte85, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright krte85 ©
  • HTML
  • CSS
  • JavaScript
    <canvas id="game1" width="400" height="400">1</canvas>


<script>
	
  window.onload = function () {
	board = document.getElementById("game1");
	ctx = board.getContext("2d");
	
	setInterval(game,1000/15);
}

function game(){
  
  ctx.fillStyle="black";
	ctx.fillRect(0,0,400,400);
  
  
  ctx.fillStyle="red";
	ctx.fillRect(80,80,40,40);
  
  
  
}







</script>

/*Downloaded from https://www.codeseek.co/krte85/a-pen-by-krzysztof-EoEpap */
    


/*Downloaded from https://www.codeseek.co/krte85/a-pen-by-krzysztof-EoEpap */
    

Comments