Hi there,
in my current project I need to tell BJS the names (actually IDs) of meshes, that I want to create.
The names are chosen by my App like this:
var srmName = null; // mesh ID für die RBGs
var lhaName = null; // mesh ID für die LAMs
for (var middleValue = 0; middleValue <= aislePositionsZ.length - 2; middleValue++){
srmName = "SRM-" + middleValue; // Nummerierung RBGs
lhaName = "LHA-" + middleValue; // Nummerierung LAMs
srmX = aislePositionsZ[middleValue];
let newSRM = new SRM(srmX, srmY, srmZ, srmName, lhaName, multiMaterial, rackRowLength, scene);
newSRM.drawSRM();
};
My problem is, that my class creates merged meshes which IDs are like “(…)_merged”.
The first part of a merged mesh´s ID is based on the ID of the first mesh in my “merging array”.
My code is like:
var finalLHA = BABYLON.Mesh.MergeMeshes(lhaMerge, true, true, undefined, true);
I know 'I could use tag-system for this, but I want to know:
-
How can I pick the ID by myself when I create a merged mesh?
-
Is there a way to change a mesh´s ID?
Thanks,
Topper