xxxxxxxxxx
26
let pic;
function preload(){
pic = loadImage("world.png");
}
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
}
let sunX = 50;
let sunY = 50;
let sunAngle = 45;
function draw(){
}
function draw() {
background(220);
image(pic,200,200,60,60);
translate(200,200);
rotate(sunAngle);
fill(0);
ellipse(sunX,sunY,50,50);
sunAngle = sunAngle +1;
}