diff --git a/examples/js/loaders/VRMLLoader.js b/examples/js/loaders/VRMLLoader.js index 2b7191fc91373a..f3d9de821c9d6d 100644 --- a/examples/js/loaders/VRMLLoader.js +++ b/examples/js/loaders/VRMLLoader.js @@ -723,6 +723,12 @@ THREE.VRMLLoader = ( function () { } + if ( build !== undefined && node.DEF !== undefined && build.hasOwnProperty( 'name' ) === true ) { + + build.name = node.DEF; + + } + return build; } diff --git a/examples/jsm/loaders/VRMLLoader.js b/examples/jsm/loaders/VRMLLoader.js index d894d40c306a70..44ea131bfb2b98 100644 --- a/examples/jsm/loaders/VRMLLoader.js +++ b/examples/jsm/loaders/VRMLLoader.js @@ -761,6 +761,12 @@ var VRMLLoader = ( function () { } + if ( build !== undefined && node.DEF !== undefined && build.hasOwnProperty( 'name' ) === true ) { + + build.name = node.DEF; + + } + return build; }