How do i remove my drawing and canvas after it completes then change the canvas to a bigger size

edited December 2016 in Questions about Code

I'm using pj5 on code pen if that helps.

function setup() {
createCanvas(1349, 30)
}
var x = 4;
var y = 1000;

function draw() { 
var preX = x;
var preY = y;
if (x < 5000) {
x = x + 10;
y = .000000000000000001 * x
fill(color(x - 200, y - 200, x - 500, y - 150));
stroke(color(255, 100, 00));
strokeWeight(100);
line(preX, preY, x, y);
}
frameRate(30);
}
Tagged:
Sign In or Register to comment.