xxxxxxxxxx
82
let c;
var col = {
r: 255,
g: 0,
b: 0
}
var spot = {
x: 100,
y: 100
}
function preload() {
img1 = loadImage("https://source.unsplash.com/1920x1080/?nature");
img2 = loadImage("https://source.unsplash.com/600x800/?woman/fashion");
img3 = loadImage("https://picsum.photos/800/1000?grayscale&random=3");
img4 = loadImage("https://picsum.photos/700/900?grayscale&random=4");
img5 = loadImage("OVERLAY_URBAN-01.png");
}
function setup() {
c = createCanvas (1920, 1080)
background(0)
noLoop();
}
function draw() {
image(img1, 0, 0);
blendMode(HARD_LIGHT);
spot.x = random(0, 960);
spot.y = random(0, 540);
filter(GRAY);
image(img2, spot.x, spot.y);
filter(GRAY);
//col.r = random(0, 255);
//col.g = random(0, 255);
//col.b = random(0, 255);
fill(139, 134, 101);
noStroke();
// rect(0, 0, 1920, 1080);
spot.x = random(0, 960);
spot.y = random(0, 1080);
image(img3, spot.x, spot.y);
spot.x = random(0, 960);
spot.y = random(0, 1080);
image(img4, spot.x, spot.y);
blendMode(HARD_LIGHT);
//image(img5, 0, 0, 150);
filter(DILATE);
// fill(139, 134, 101);
// noStroke();
// rect(0, 0, 1920, 1080);
// fill(139, 134, 101);
// noStroke();
// rect(0, 0, 1920, 1080);
}
//function mousePressed() {
// window.location.reload()
//}
function keyPressed() {
// If you hit the s key, save an image
if (key == '7') {
save("randomComposition.png");
}
}