Browse Source

GLTFLoader: Compute world matrices before calling `onLoad()`. (#27877)

* GLTFLoader: Compute world matrices before calling `onLoad()`.

* Update examples/jsm/loaders/GLTFLoader.js

Co-authored-by: Don McCurdy <[email protected]>

---------

Co-authored-by: Don McCurdy <[email protected]>
Michael Herzog 1 year ago
parent
commit
812ab9178b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      examples/jsm/loaders/GLTFLoader.js

+ 6 - 0
examples/jsm/loaders/GLTFLoader.js

@@ -2627,6 +2627,12 @@ class GLTFParser {
 
 			} ) ).then( function () {
 
+				for ( const scene of result.scenes ) {
+
+					scene.updateMatrixWorld();
+
+				}
+
 				onLoad( result );
 
 			} );