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


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 “

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.

Many thanks Mugen.

: )

I will keep this in mind;