소스 검색

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 년 전
부모
커밋
812ab9178b
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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 );
 
 			} );