xxxxxxxxxx
26
let teapot;
function preload() {
// Load model with normalise parameter set to true
teapot = loadModel('debris.obj', true);
}
function setup() {
createCanvas(800, 800, WEBGL);
}
function draw() {
background(200);
orbitControl();
rotateX(180);
// rotateX(frameCount * 0.001);
// rotateY(frameCount * 0.001);
normalMaterial(); // For effect
scale(10); // Scaled to make model fit into canvas
model(teapot);
push();
model(teapot);
translate(200,100,100);
pop();
}