xxxxxxxxxx
24
//draw a spinning octahedron
let octahedron;
let img;
function preload() {
octahedron = loadModel("AnyConv.com__model.obj");
// octahedron.noStroke();
img=loadImage(
"gltf_embedded_0.png");
}
function setup() {
createCanvas(700, 700, WEBGL);
}
function draw() {
background(200);
rotateX(mouseX * 0.01);
rotateY(mouseY * 0.01);
//pass image as texture
texture(img);
model(octahedron);
}