xxxxxxxxxx
72
let pg;
let font;
let img;
function preload() {
// font = loadFont("RobotoMono-Regular.ttf", 60);
}
function setup() {
img = loadImage("sketch-1-1.jpg");
font = loadFont("RobotoMono-Regular.ttf");
createCanvas(windowWidth, 1000);
pg = createGraphics(windowWidth, height);
// frameRate(10);
}
function draw() {
background(0);
//image(img,0,0,windowWidth,windowHeight);
//pg.beginDraw();
pg.background(0);
pg.fill(255);
pg.textFont(font);
pg.textSize(600);
pg.push();
pg.translate(pg.width/2, pg.height/2-150);
pg.textAlign(CENTER, CENTER);
pg.text("CID", 0, 0);
pg.pop();
//pg.endDraw();
let tilesX = 4;
let tilesY = 10;
let tileW = int(width/tilesX);
let tileH = int(height/tilesY);
for (let y = 0; y < tilesY; y++) {
for (let x = 0; x < tilesX; x++) {
// WAVE
let wave = int(sin((frameCount + ( x+y )) * 0.55) * 100);
// SOURCE
let sx = x*tileW + wave;
let sy = y*tileH;
let sw = tileW;
let sh = tileH;
// DESTINATION
let dx = x*tileW;
let dy = y*tileH;
let dw = tileW;
let dh = tileH;
copy(pg, sx, sy, sw, sh, dx, dy, dw, dh);
}
}
}