New Text Document
New Text Document
New Text Document
// Declare, position, set the radius and the fill of a new Circle object named dot.
var dot = new Circle(250, 250, 15, 'red');
// The animate function runs the code inside of it 30 times every second.
function animate() {
// Reset the background each frame of the animate function.
background();
// Draw circle a.
a.draw();
// Draw the circle named b.
b.draw();
// Draw the circle named dot.
dot.draw();
// Draw the text named display on the canvas.
display.draw();
// Draw the tether on the canvas.
tether.draw();