And try
const tn = scene.getTransformNodeByName(“stant1”)?.dispose();
as well… Maybe it’s a TransformNode not a mesh
And try
const tn = scene.getTransformNodeByName(“stant1”)?.dispose();
as well… Maybe it’s a TransformNode not a mesh
same result
I’m intermediate in babylonjs, I did everything by myself, but this ridiculous event killed me.
it’s not a TransformNode
Console.log result
Array(25) [ “root”, “modengel”, “modrenk1”, “modrenk2”, “moddikyazi1”, “modzemin”, “modlogo1”, “modlogo2”, “modlogo3”, “moddikyazi3”, … ]
0: “root”
1: “modengel”
2: “modrenk1”
3: “modrenk2”
4: “moddikyazi1”
5: “modzemin”
6: “modlogo1”
7: “modlogo2”
8: “modlogo3”
9: “moddikyazi3”
10: “modlogo4”
11: “modvideo1”
12: “moddikgorsel1”
13: “moddikgorsel2”
14: “moddikgorsel3”
15: “moddikgorsel4”
16: “moddikgorsel5”
17: “moddikgorsel6”
18: “moddikgorsel7”
19: “moddikgorsel8”
20: “modgorsel1”
21: “modgorsel2”
22: “modyazi1”
23: “moddikyazi2”
24: “modlogo5”
length: 25
So why do you use stant1
for the name of the mesh in the getMeshByName
function if it’s not on the list?
Do this:
const standLoader = SceneLoader.ImportMesh(
"",
"/assets/booth/",
gltfName,
scene,
(meshes) => {
meshes[0].name = 'mymesh'
meshes[0].scaling.x = 100.0;
meshes[0].scaling.y = 100.0;
meshes[0].scaling.z = -100.0;
}
);
and later you can
scene.getMeshByName(`mymesh`).dispose()
you are my hero
thanks you so so so much
now their colors don’t change but it doesn’t matter i’ll take care of them
You’re welcome Please mark as solved. Thank you!
EDIT: I mean mark the solution as solved