uses only canvas object, renames it to avoid future problems
This commit is contained in:
parent
4b240a4485
commit
169de36bcf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user