xxxxxxxxxx
139
let rect1 = 0
function setup() {
createCanvas(600, 600);
frameRate(2000)
}
function draw() {
background(186, 255, 208);
blendMode(LIGHTEST)
rectx()
rectm()
push()
translate(60,80)
frase();
pop()
translate(60, 80)
frase2()
translate(-60,0)
grid2()
translate(525,-150)
grid()
function frase(){
for (let i = 0; i < 40; i++) {
translate(0,10)
fill(0,255,0)
text("No vas a poder entender lo que dice aqui si no sabes hablar en Español", 50,20)
}
}
function frase2(){
for (let i = 0; i < 40; i++) {
translate(0,10)
fill(300,0,0)
text("You will not be able to read this if you do not know how to speak English", 50,20)
}
}
// push()
// if (mouseIsPressed){
// blendMode(MULTIPLY);
// fill(0,250,250);
// translate(-400,-300);
// ellipse(mouseX,mouseY,300,300);
// pop()
//}
function rectx(){
push()
blendMode(MULTIPLY);
fill(250,0,0)
translate(0,-50)
rect(rect1,200,100, 300)
pop()
}
function rectm(){
rect1 = rect1 +1
if(rect1 > width){
rect1 = 0
}
}
function grid(){
push()
translate(-20,-270)
for (let i = 0; i < 6; i++) {
for (let j = 0; j < 40; j++) {
fill(0,255,0)
ellipse(i*20,j*20,20,20);
}
}
pop()
}
function grid2(){
push()
translate(-10,-400)
for (let i = 0; i < 6; i++) {
for (let j = 0; j < 40; j++) {
fill(0,255,0)
square(i*20,j*20,20,20);
}
}
pop()
}
// function title(){
// push()
// fill(0,0,0)
// textSize(40)
// text("circles, squares, palabras and words...",0,0)
// pop()
// }
}