xxxxxxxxxx
114
let myTex = 'Expressi ns';
let myTex1 = 'artagallery';
let img;
let eyeSize = 10;
let r;
let g;
let b;
let h;
let s;
let c;
function setup() {
createCanvas(380, 440);
//angleMode(DEGREES);
//noStroke();
//colorMode(LIGHTEST);
img = loadImage ('ARTA GALLERY LOGO.png');
}
function draw() {
//console.log('x =', mouseX);
background(27,30,102);
//shapes
noStroke();
fill(229,223,0)
rect(mouseX,mouseY,4,400);
fill(211,200,196);
//fill(h, s, c)
rect(width/2-50, height/2-40, mouseX, mouseY+20, 80, 80, 0, 0)
//fill(255,255,255);
//fill(r, g, b)
noFill();
stroke(81,81,81);
strokeWeight(4);
circle((width/2, height/2-30), mouseX, mouseY);
fill(229,223,0);
//noStroke();
//stroke(229,223,0);
//strokeWeight(10);
circle((width/2, height/2-30), mouseX, mouseY/2+30);
noStroke();
//circle(334,343, mouseY);
eyeSize = map(mouseX, 0, width, 0, 10);
fill(229, 223,0);
ellipse(314, 377, eyeSize+25, eyeSize+25);
// push();
// scale(0.1);
// image (img, 0, 0);
// pop();
//frame
noFill();
stroke(255, 0, 0)
strokeWeight(4);
rectMode(CENTER);
rect(width/2, height/2, mouseX, mouseY, 5);
fill(0,0,0);
noStroke();
textSize(10);
textFont('Helvetica');
textAlign(CENTER);
text(myTex1, width/2 +40, height, mouseX, mouseY);
//Text
fill(0,0,0);
noStroke();
textSize(25);
textFont('Helvetica');
textAlign(CENTER);
text(myTex, 280, 385);
textSize(15);
text('of', 200, 390);
textSize(25);
text('Canadian Art', 260, 410);
textSize(12);
text('Jun 15 - Aug 14, 2022', 290, 424);
}
function mousePressed(){
//random color change
r = random (204, 255);
g = random (250, 255);
b = random (0, 204);
h = random (200, 211)
s = random (190, 200)
c = random (190, 196)
}
function keyPressed(){
r = random (204, 255);
console.log(r);
g = random (250, 255);
b = random (0, 204);
h = random (200, 211)
s = random (190, 200)
c = random (190, 196)
}