Issue with GLTFLoader and objects with dots in their name attribute?

Hi.

I think the GLTFLoader has a bug when loading objects which name attribute contain dots.

In order to demonstrate, just open THREEJS editor, create a Box object and rename object to “box.1.2.new

Then just export the scene to GLB or GLTF , you will see that in the generated files the names are correct, but when loading the files using GLTFLoader.js, you will realize that names don’t contain dots anymore. In the example above, the resultant name when loading the exported GLB scene should appear as “box12new

Best regards

That’s happening because of this line:

Dots have a special semantic in context of three.js's animation system. The loader processes node names in order to avoid a potential breakage when using animations.

If possible, try to use another symbol like “-”. For example box-1-2-new stays unchanged.

1 Like

Many thanks Mugen.

: )

I will keep this in mind;

it happens when the name has a “:” too
“box:mental” will be change to “boxmetal”.
Many thanks Mugen.
: )
I will keep this in mind;