xxxxxxxxxx
147
let pizza = 0
let pep1 = 3
let pep2 = 20
let pep3 = 30
let pep4 = 10
let pep5 = 2
let pep6 = -20
let pep7 = -30
let pep8 = -18
let x = 0
function setup() {
createCanvas(500, 500);
background(0)
}
function draw() {
//heat
for (let x = 0; x < width; x += 40) {
for (let y = 0; y < height; y += 40) {
fill(random(0, 255), 20, 13)
circle(x, y, 20)
}
}
//conveyor belt
fill('grey')
noStroke()
rect(0, 160, 500, 180)
for (let x = 0; x < width; x += 25) {
fill('black');
rect(x, 160, 5, 180);
}
pizza = pizza + .5
//pizza
fill('red')
stroke(245, 156, 37)
strokeWeight(9)
circle(pizza, 250, 128)
//cheese
fill(245, 227, 110)
noStroke()
circle(pizza, 250, 100)
if (pizza > width) {
pizza = 0
}
//toppings
//pep1
pep1 = pep1 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep1, 245, 10)
if (pep1 > 503) {
pep1 = 3
}
//pep2
pep2 = pep2 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep2, 230, 10)
if (pep2 > 520) {
pep2 = 20
}
//pep3
pep3 = pep3 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep3, 260, 10)
if (pep3 > 530) {
pep3 = 30
}
//pep4
pep4 = pep4 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep4, 275, 10)
if (pep4 > 510) {
pep4 = 10
}
//pep5
pep5 = pep5 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep5, 215, 10)
if (pep5 > 502) {
pep5 = 2
}
//pep6
pep6 = pep6 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep6, 225, 10)
if (pep6 > 480) {
pep6 = -20
}
//pep7
pep7 = pep7 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep7, 258, 10)
if (pep7 > 470) {
pep7 = -30
}
//pep8
pep8 = pep8 + .5
fill('red')
stroke('black')
strokeWeight(.5)
circle(pep8, 278, 10)
if (pep8 > 482) {
pep8 = -18
}
}