Hello,
I am attempting to texture an obj file with an image array.
It will load an image but not loop through the array. Outside of WebGL loading and displaying an image array is fairly simple, but it seems there may be additional steps here that I can’t find documentation on. Thank you in advance for help!
Here is the relevant code:
//object
let berg;
//texture for berg
var texturesArray = ;
function preload() {
//preload for array to texture obj
for (var i=0; i<74; i++) {
texturesArray[i] = loadImage(“DataImg/Data”+i+“.png”);
}
}
function setup() {
createCanvas(770, 700, WEBGL)
}
function draw() {
background(0);
//for loop to texture obj from array
for(var i=0; i<74; i++) {
texture(texturesArray[i]);
}
model(berg);
}