diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 7e9166df9341b9..5f7b268b15db3a 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -66,6 +66,7 @@ import { InstancedBufferAttribute } from 'three'; import { toTrianglesDrawMode } from '../utils/BufferGeometryUtils.js'; +import { clone } from '../utils/SkeletonUtils.js'; /** * A loader for the glTF 2.0 format. @@ -4510,7 +4511,20 @@ class GLTFParser { for ( let i = 0, il = nodes.length; i < il; i ++ ) { - scene.add( nodes[ i ] ); + const node = nodes[ i ]; + + // If the node already has a parent, it means it's being reused across multiple scenes. + // Clone it to avoid the second scene's add() removing it from the first scene. + // See: https://github.com/mrdoob/three.js/issues/27993 + if ( node.parent !== null ) { + + scene.add( clone( node ) ); + + } else { + + scene.add( node ); + + } }