How can I refresh my skybox textures by selecting thumbnails?
You can check out this example for reference: canvas_geometry_panorama.html
Each thumbnail title corresponds to a folder that contains the skybox images. By using a simple jQuery script, a link to the folder can be generated:
$('.thumbs img').click(function() {
var myPath = 'img/' + $(this).attr("title") + '/';
});
Then, the variable can be used to load textures in the following code snippet:
var materials = [
loadTexture(myPath+'lx.jpg'), // right
loadTexture(myPath+'rx.jpg' ), // left
loadTexture(myPath+'ly.jpg' ), // top
loadTexture(myPath+'ry.jpg' ), // bottom
loadTexture(myPath+'lz.jpg' ), // back
loadTexture(myPath+'rz.jpg' ) // front
];
However, if the textures are not updating, what could be the reason?