xxxxxxxxxx
110
let pinyin = ('IM Fell English SC');
let simplified = ('ZCOOL XiaoWei');
let traditional = ('ZCOOL QingKe HuangYou');
function setup() {
createCanvas(600, 600);
// angleMode(DEGREES);
}
function draw() {
// //mosaic
// push();
// for (let x = 5; x <= mouseX; x += 15) {
// for (let y = 5; y <= width; y += 15) {
// // fill(random(255), random(255), random(255));
// // noStroke();
// stroke(random(255), random(255), random(255), random(255));
// // stroke(150, random(255), random(55));
// noFill();
// // stroke(170, random(255));
// // rect(x, y, 5, 5);
// }
// }
// pop();
// //lines
// push();
// for (let x = 0; x <= mouseX; x += 35) {
// for (let y = 0; y <= width; y += 35) {
// // fill(random(255), random(255), random(255));
// // noStroke();
// stroke(random(255), random(255), random(255), random(255));
// // stroke(150, random(255), random(55));
// noFill();
// line(x + 10, y + 10, 300, 300);
// // stroke(170, random(255));
// }
// }
// pop();
// //ellipse
// push();
// for (let x = 5; x <= mouseX; x += 10) {
// for (let y = 5; y <= width; y += 10) {
// // fill(random(255), random(255), random(255));
// // noStroke();
// stroke(random(255), random(255), random(255));
// noFill();
// // ellipse(x, y, 10, 10);
// ellipse(x, y, 5, 5);
// }
// }
// pop();
bgCol = map(mouseX, 0, 600, 200, 30);
background(bgCol);
fontSize = map(mouseX, 0, 600, 10, 120);
fontSize2 = map(mouseX, 0, 600, 5, 15);
if (mouseX > 325) {
// background(3);
fill(232, 232, 223, random(150, 255));
textAlign(CENTER);
textSize(fontSize2);
textFont(pinyin);
text('chuán tóng jín shú yú guò qù', 300, 259);
textFont(traditional);
textSize(fontSize);
text('傳 統 僅 屬 於 過 去', 300, 305);
// filter(BLUR, x);
// x = map(mouseX, 0, 300, 1, 8);
} else {
push();
// background(232, 232, 223);
fill(164, 50, 16, random(150, 255));
textAlign(CENTER);
textSize(fontSize2);
textFont(pinyin);
text('wēn huà zhèng zaì liú shī', 298, 259);
textFont(simplified);
textSize(fontSize);
text('文 化 正 在 流 失', 300, 305);
// filter(BLUR, 1);
pop();
}
bgText();
}
function bgText() {
push();
for (let x = -75; x <= mouseX; x += 85) {
for (let y = 17; y <= 610; y += 70) {
textSize(15);
textFont(simplified);
fill(random(190), 50, 16, random(150, 255));
text('这就是你\n想要的吗?', x, y);
// noFill();
// if (mouseX < 400) {
// text('这是你想要的吗', x, y);
// } else {
// text('再見', x, y);
// }
}
}
pop();
}