xxxxxxxxxx
//Sunrise Project Michael Khoury
//Variable settings
var sunY=600
var sunX=0
var cloudX=0
//Background
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
}
//Prevents the sun from leaving a trail
function draw () {
background(50)
//Sun size, location, and color
fill(250,100,0)
ellipse(sunX,sunY,100,100)
//Hills size, location, and color
fill(0,180,90)
ellipse(100,600,600,400)
ellipse(500,700,500,500)
ellipse(900,800,700,800)
ellipse(1200,800,650,780)
ellipse(900,800,700,650)
//Cloud size, location, and color
fill(255,255,255,50)
ellipse(cloudX,100,600,70,)
//House size, location, and color
fill(200,200,255)
rect(480,350,400,350)
triangle(400,350,1000,350,670,150)
//Variable rates of increase/decrease
sunY=sunY-1
sunX=sunX+1.8
cloudX=cloudX+1.6
}