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
|
// developed by Francisco Dans
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|
||||||
function BallRenderer(canvas){
|
function BallRenderer(thecanvas){
|
||||||
this.canvas = typeof canvas === "string"? document.getElementById(canvas) : canvas;
|
this.canvas = thecanvas;
|
||||||
this.ctx = this.canvas.getContext("2d");
|
this.ctx = this.canvas.getContext("2d");
|
||||||
this.width = this.canvas.width;
|
this.width = this.canvas.width;
|
||||||
this.height = this.canvas.height;
|
this.height = this.canvas.height;
|
||||||
|
Loading…
Reference in New Issue
Block a user