v0.4.20 translate() bug?

Not sure if you want bug reports here, or if this even is a bug. In the reference for the translate function, it states that translations are cumulative, but that they are reset after each draw(). This is certainly the behavior that I was seeing up until I updated my lib this afternoon to v0.4.20. This simple sketch, indicates that the translations are cumulative even between draw()'s (i.e. the translation is not reset after each draw()).

var i;
function setup() {
 // put setup code here
 createCanvas(600,600);
 ellipseMode(RADIUS);
 i=0;
}

function draw() {
 translate(i,i);
 ellipse(0,0,20,20);
 i+=1;
}

Answers

Sign In or Register to comment.