xxxxxxxxxx
192
// savedScapes | memory, code and photography
// coded by Morbeck
// Um salve pra comunidade BrxHash
// twitter: @morbeck_art
// License CC BY-NC-ND | Download and share them with mandatory attribution to the author, but without being able to change them in any way or use them for commercial purposes.
let t001 = fxrand();
t002 = fxrand();
t003 = fxrand();
t004 = fxrand();
t005 = fxrand();
n001 = rnd_int(1, 10);
n002 = rnd_int(1, 8);
n003 = rnd_int(1, 10);
n004 = rnd_int(1, 5);
N5 = fxrand();
n005 = N5 > 0.90 ? 1 : N5 > 0.875 ? 2 : N5 > 0.85 ? 3 : N5 > 0.75 ? 4 : N5 > 0.7 ? 5 : N5 > 0.55 ? 6 : N5 > 0.4 ? 7 : N5 > 0.25 ? 8 : N5 > 0.15 ? 9 : 10;
r001 = rnd_int(1, 2);
r002 = rnd_int(1, 2);
r003 = rnd_int(1, 2);
r004 = rnd_int(1, 2);
r005 = rnd_int(1, 2);
c001 = fxrand() * 255;
c001a = fxrand() * 255;
c001b = fxrand() * 255;
c002 = fxrand() * 255;
c002a = fxrand() * 255;
c002b = fxrand() * 255;
c003 = fxrand() * 255;
c003a = fxrand() * 255;
c003b = fxrand() * 255;
c004 = fxrand() * 255;
c004a = fxrand() * 255;
c004b = fxrand() * 255;
c005 = fxrand() * 255;
c005a = fxrand() * 255;
c005b = fxrand() * 255;
seed = fxrand();
pb = fxrand();
PB = pb > 0.9 ? 0 : 1;
cb = fxrand();
CB = cb > 0.8 ? 0 : 1;
// Carrega as imagens
function preload() {
m001 = loadImage(`image/001_${n001}.jpg`);
m002 = loadImage(`image/002_${n002}.jpg`);
m003 = loadImage(`image/003_${n003}.jpg`);
m004 = loadImage(`image/004_${n004}.jpg`);
m005 = loadImage(`image/005_${n005}.jpg`);
// m005 = loadImage(`image/001_1.gif`);
}
function setup() {
let canvas = createCanvas(
windowWidth > windowHeight ? windowHeight : windowWidth,
windowHeight < windowWidth ? windowHeight : windowWidth
);
xx = width;
yy = height;
colorMode(RGB);
background(0);
randomSeed(seed);
noiseSeed(seed);
frameRate(20)
}
function draw() {
push();
image(m001, 0, 0, xx, yy);
pop();
push();
m001B = rnd_int(0,1)
if (m001B == 0){
blendMode(EXCLUSION)}
else {blendMode(OVERLAY)}
if (CB == 1){tint(c002, c002a, c002b, 255)}; //colorfilter
if (r002 == 1) {
translate(xx, yy);
rotate(TAU / 2);
}
image(m002, 0, 0, xx, yy);
pop();
push();
blendMode(OVERLAY);
if (r003 == 1) {
translate(xx, yy);
rotate(TAU / 2);
}
image(m003, 0, 0, xx, yy);
pop();
push();
blendMode(OVERLAY);
if (r004 == 1) {
translate(xx, yy);
rotate(TAU / 2);
}
image(m004, 0, 0, xx, yy);
pop()
push();
blendMode(OVERLAY);
if (r005 == 1) {
translate(xx, yy);
rotate(TAU / 2);
}
image(m005, 0, 0, xx, yy);
pop();
// if (frameCount == 1) {
push();
blendMode(BLEND);
strokeWeight(xx /30);
stroke("#FFFFFF");
noFill();
for (var a = 0; a < xx + xx / 2; a += xx / 2) {
rect(0, 0, xx, yy,xx/15);
rect(0, 0, xx, yy);
}
pop();
if (PB == 0){filter(GRAY)} //p&b
// noLoop();
if (frameCount == 5) {fxpreview();}
// }
}
// function windowResized by P1xelfool
function windowResized() {
resizeCanvas(
windowWidth > windowHeight ? windowHeight : windowWidth,
windowHeight < windowWidth ? windowHeight : windowWidth
);
}
function rnd_btw(a, b) {
return fxrand() * (b - a) + a;
}
function rnd_btwexp(a, b) {
return fxrand() ** 2 * (b - a) + a;
}
function rnd_int(a, b) {
return (
(a = Math.ceil(a)),
(b = Math.floor(b)),
Math.floor(fxrand() * (b - a + 1)) + a
);
}
window.$fxhashFeatures = {PLACE:getARQ(n005), MODE:getPB(PB)}
function getARQ(n005) {
if (n005 == 1) return "POA";
if (n005 == 2) return "LACERDA";
if (n005 == 3) return "TAIPA";
if (n005 == 4) return "IAPI";
if (n005 == 5) return "GAMBOA";
if (n005 == 6) return "VITRAIS";
if (n005 == 7) return "BOSCO";
if (n005 == 8) return "ANEXO";
if (n005 == 9) return "BSB";
if (n005 == 10) return "PANTEÃO";
}
function getPB(PB) {
if (PB == 0) return "P&B";
if (PB == 1) return "COLOR";
}