xxxxxxxxxx
60
let mytext;
let steps = 8;
let gradientIncrement = 10;
let alpha = ['sf', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
function preload() {
myFont = loadFont('Tortellini-Regular.ttf');
}
function setup(){
createCanvas(windowWidth, windowHeight);
mytext = 'R'
}
function draw(){
let offset = 0;
let c = 255-steps*gradientIncrement;
background(0);
translate(width/2, height/2)
translate(offset, 0)
for (let o = 0; o < 1; o++) {
push()
for (let i = 0; i < steps; i++) {
textFont(myFont)
textSize(200)
fill(255,255,255, c)
yval = int(map(mouseY, 0, height, 0, alpha.length));
mytext = alpha[yval]
text(mytext, 0, 0);
rval = map(mouseX, width*.75, width*.25, 0, PI/4);
rval = max(0, min(rval, PI/4))
rotate(rval)
c += gradientIncrement;
}
pop()
offset += 100
}
}
function keyTyped() {
console.log(key)
let mytext = key;
}