xxxxxxxxxx
60
//tap and or drag your mouse/finger around the program.
let hue = 200;
let saturation = 100;
let brightness = 50;
let radius = 6;
let picture;
//this is my background and my photos size
function setup() {
createCanvas(500, 500);
background(220);
colorMode(HSB);
image(picture, 0, 0, 500, 500);
//these are all my text codes
textSize(32);
textFont
text('NICS JOYFUL TISSUE BOXES', 10, 30);
fill(0, 102, 153);
textSize(12)
textFont
text('TW:FLASHING LIGHTS', 10, 50)
}
//this is the code that imports the image
function preload() {
picture = loadImage('B47BB99E-B4D6-48C0-949C-EACF3A3DD7E1.jpeg');
}
//this is the code that adds the shapes and changes their sizes and colors.
function draw() {
if (mouseIsPressed) {
brightness = random(50, 100);
hue = random(90, 360);
strokeWeight(1)
stroke(hue, saturation, brightness);
noFill();
rectMode(CENTER);
circle(mouseX, mouseY, radius);
square(mouseX, mouseY, radius);
radius = radius + 2;
radius = radius % 70;
}
//these are the lines that surround the box
strokeWeight(6);
line(355, 155, 30, 190);
line(122, 235, 470, 195)
line(355, 155, 470, 195)
line(30, 190, 122, 235)
line(30, 190, 31, 350)
line(122, 235, 122, 405)
line(31, 350, 122, 405)
line(122, 405, 467, 350)
line(470, 195, 467, 350)
}