Hello,
I have this function to remove certain meshes & materials:
function removePiece(rand)
{
var meshes = scene.getMeshesByTags('mesh' + rand);
for (var i = 0; i < meshes.length; i++)
{
console.log(meshes[i].name);
meshes[i].dispose();
}
var materials = scene.getMaterialByTags('material' + rand);
for (var i = 0; i < materials.length; i++)
{
console.log(materials[i].name);
materials[i].dispose();
}
}
I have added tags to the textures, but as we don't seem to have a getTexturesByTags it's probably not the right way.
Does anyone have a bright idea how do I go about removing textures?
Thank you,