xxxxxxxxxx
20
let earthTexture
let t = 0
function preload() {
earthTexture = loadImage("earth-texture.jpg")
}
function setup() {
const canvas = createCanvas(400, 400, WEBGL)
noStroke()
}
function draw() {
background(220)
camera(150*sin(t), 200*cos(t), 500*cos(t)+100, 0, 0, 0, 0, 1, 0)
texture(earthTexture);
sphere(100)
t += 0.01
}