xxxxxxxxxx
110
//what was that noise
//why am i here
//did you hear that?
//did i say the wrong thing?
//am i being followed?
let img;
let hear= "did you hear that?"
let whyami= "why am i here?"
let didu="did you hear that?"
let didi="did i say the wrong thing?"
let ami="am i being followed?"
let dont="dont leave"
let circleSize = 200;
function preload() {
heart = loadImage("heart.webp");
}
function setup() {
//createCanvas(500, 500);
createCanvas(windowWidth,windowHeight)
// background(255)
noStroke();
textAlign(CENTER,CENTER)
}
function draw() {
background(1);
print (mouseX,mouseY)
textSize(20)
fill(112,41,26)
//text("X",20,20)
// let textX=width*.5
// let textY=height*.5
//TEXT
if ((mouseY>340) && (mouseY<360)&&(mouseX<330)&&(mouseX>160)){
fill(112,41,26)
textSize(15)
text(hear,250,350)
}
if ((mouseY>240) && (mouseY<257)&&(mouseX<370)&&(mouseX>250)){
fill(112,41,26)
textSize(15)
text(whyami,320,250)
}
if ((mouseY>480) && (mouseY<580)&&(mouseX<660)&&(mouseX>540)){
fill(112,41,26)
textSize(15)
text(didu,600,500)
}
if ((mouseY>540) && (mouseY<560)&&(mouseX<180)&&(mouseX>20)){
fill(112,41,26)
textSize(15)
text(didi,100,550)
}
if ((mouseY>245) && (mouseY<270)&&(mouseX<115)&&(mouseX>5)){
fill(112,41,26)
textSize(15)
text(ami,50,250)
}
if ((mouseY>5) && (mouseY<30)&&(mouseX<40)&&(mouseX>2)){
fill(112,41,26)
textSize(17)
text(dont,40,50)
}
let distance = dist(mouseX, mouseY, width/2, height /2);
circleSize = 50+(distance/5);
let red = 100 + (mouseX/width) * 155;
let green = 100 + (mouseY /height) * 155;
let blue = 100 + (distance / 5);
tint(red, green, blue);
imageMode(CENTER);
image(heart, width/ 2, height /2, circleSize, circleSize);
noTint();
}