xxxxxxxxxx
90
let label = "gen-type-session-4-challenge-4-joeann";
let img;
let font;
let myShader;
function preload() {
font = loadFont("Gotham-Black.otf");
}
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
img = createGraphics(600, 600);
img.noStroke();
}
function draw() {
background(16,21,53);
fill(255);
textSize(240);
textFont(font);
for (i = 0; i < 50; i++) {
rotate(sin(frameCount*0.001) + HALF_PI);
translate(sin(frameCount*0.01)*500 +500, 0);
fill(i * 6, i * 5, i * 15);
text("MASH", i * 10 - 500, 0 + sin(i * 0.15 + frameCount * 0.1) * 25);
}
// for(i=0;i<10;i++) {
// fill(i%2==0?0:255);
// rect(i*30,0,30,height);
// }
// for(i=0;i<50;i++) {
// fill(i%2==0?0:255);
// text("MASH",300-i*5, 550+sin(i*0.2+frameCount*0.1)*25);
// }
// text("संदेश",50, 500);
}
// go to fullscreen
// copy lines below to add fullscreen toggle to
// your sketch. Notice that if you are already using
// the keyPressed function, add lines 20-22 to it.
function keyPressed() {
if (key === "f" || key === "F") {
enterFullscreen();
}
}
/* enter fullscreen-mode via
* https://editor.p5js.org/kjhollentoo/sketches/H199a0c-x
*/
function enterFullscreen() {
var fs = fullscreen();
if (!fs) {
fullscreen(true);
}
}
/* full screening will change the size of the canvas */
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}
/* prevents the mobile browser from processing some default
* touch events, like swiping left for "back" or scrolling
* the page.
*/
document.ontouchmove = function (event) {
event.preventDefault();
};