ball = new BallSwing(150, 0, 300, 150, 10) function setup() { // put setup code here createCanvas(300,300); //frameRate(60); } function draw() { // put drawing code here background(32); fill(128); stroke(128); strokeWeight(2); ball.draw(); ball.update(); }