Loading img from Array

Hi, i want to display 20 image on different planes, i have create my planes from a loop. I also have my images in an array, but i can’t get the image to appear on the plane, do you have any idea ?

https://jsfiddle.net/bumpyshot/pbf97sr1/1/
thanks :pray:t2:

Hi!
const mesh = new THREE.Mesh( geometry, textures[i] );
needs to be like this:
const mesh = new THREE.Mesh( geometry, material );

2 Likes

Thanks prisoner, i update the mesh const, but it’s still not working :confused:
https://jsfiddle.net/bumpyshot/pbf97sr1/4/

There is a thing I can’t get:
textures[i]
, where i from 0 to 11, whereas your array of textures has only 4 items.

And also there is that error message in the console about CORS.

Ohh yeah it was part of the problem, thank you so much :pray:t2:
And i use a while to go through my array because the for only select the last img !
I don’t really jnow how to fix the CORS issue, for now i work in local so it’s not a problem for me :relaxed: