if you want this code copy this
// Diameter of sun
var sunSize = 75;
// Sun position
var sunY = 361;
// Sky colour
var skyRed = 0;
var skyGreen = 0;
var skyBlue = 0;
var draw = function() {
background(skyRed, skyGreen, skyBlue);
noStroke();
fill(235, 235, 18);
ellipse (200, sunY, sunSize, sunSize);
fill(0, 255, 9);
rect (0, 350, 400, 50);
sunY -= 0.5;
skyBlue+=1;
if (sunY < 40){
sunY = 40;
}
No comments:
Post a Comment