uses only canvas object, renames it to avoid future problems

This commit is contained in:
Francisco Dans 2015-02-24 12:08:11 +01:00
parent 4b240a4485
commit 169de36bcf

View File

@ -4,8 +4,8 @@
// developed by Francisco Dans
////////////////////////////////
function BallRenderer(canvas){
this.canvas = typeof canvas === "string"? document.getElementById(canvas) : canvas;
function BallRenderer(thecanvas){
this.canvas = thecanvas;
this.ctx = this.canvas.getContext("2d");
this.width = this.canvas.width;
this.height = this.canvas.height;