2
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
812ab9178b

+ 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 );
 
 			} );