xxxxxxxxxx
let img;
let angle = 0;
function preload() {
img = loadImage('2k_mars.jpg');
}
function setup() {
frameRate(30);
createCanvas(windowWidth, windowHeight, WEBGL);
}
function draw() {
orbitControl();
rotateX(angle);
rotateY(angle * 0.3);
rotateZ(angle * 1.2);
perspective();
background(0);
ambientLight(60);
pointLight(255,255,255, mouseX - 200, mouseY - 200, 200);
ambientMaterial(183, 73, 50);
noStroke();
texture(img);
textureMode(NORMAL);
sphere(100);
angle+= 0.005;
}