Underscores removed from node names in GLTFLoader de-duplication process
See original GitHub issueDescribe the bug
I see in (#16639) that duplicate node names are now appended with _i
when using GLTFLoader. I have noticed in my application though that when i use an underscore _
in the node name string, the de-duplicated node process is removing them, which is breaking my application.
Live example
The duplicated node name in the below jsfiddle is cool_box
Note that the 2nd and 3rd node names are then renamed cool box_1
& cool box_2
(first underscores removed)
https://jsfiddle.net/vthyra4c/
Expected behavior
De-duplicated node names are appended with _i
but the rest of the name string should remain intact.
Screenshots
Platform:
- Device: Deskto
- OS: Linux
- Browser: Chrome
- Three.js version: r123
PS. this is one of my first bug reports, let me know if i should have done something differently or included some other helpful info!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (1 by maintainers)
Top GitHub Comments
@mrdoob Yes, thanks to all
@donmccurdy Tried to track it down:
In the for loop here, should
name = originalName + '_' + i;
bename = name + '_' + i
… otherwise the sanitized node name is thrown out and not used, which correlates to what we are seeing