xxxxxxxxxx
21
let img;
let theta = 0;
function setup() {
img = loadImage('https://fractalkitty.com/wp-content/uploads/2020/08/smallmap-1.png');//change the path here to your image
createCanvas(410, 400, WEBGL);
strokeWeight(0.5)
stroke(255)
}
function draw() {
strokeWeight(0.1);
orbitControl();
background(0);
push();
rotateY(theta * 50 * 0.001);
if (mouseX <= 0 || mouseX >=700|| mouseY>=700){
theta += 0.05;}
texture(img);
sphere(150);
pop();
translate(340, 0, 0);
}