xxxxxxxxxx
49
let word = "ROTATE";
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
textAlign(CENTER, CENTER);
textSize(50);
}
function draw() {
background(220);
translate(width/2, height/2);
rotate(frameCount * 5);
//rotate(frameCount * 8);
for (let index=0; index< word.length; index+=1) {
//text("SPIN", 0, 100);
push();
let amountToRotate= map(index, 0, word.length,0,360)
//let letter = word[index];
rotate(amountToRotate);
text(word[index], 0, -100)
pop();
}
//text("ROTATE", 0, 0);
//noStroke();
//circle(0,100,40)
//circle(0, 200, 30)
//circle(0,100,40)
//circle(0, 200, 30)
}