提交 73f36b77 编写于 作者: D Don McCurdy

Update scene and camera matrices once, globally.

上级 6457d0a7
......@@ -107,6 +107,15 @@ THREE.GLTFLoader = ( function () {
update: function ( scene, camera ) {
// update scene graph
scene.updateMatrixWorld();
// update camera matrices and frustum
camera.updateMatrixWorld();
camera.matrixWorldInverse.getInverse( camera.matrixWorld );
for ( var name in objects ) {
var object = objects[ name ];
......@@ -174,15 +183,6 @@ THREE.GLTFLoader = ( function () {
// Update - update all the uniform values
GLTFShader.prototype.update = function ( scene, camera ) {
// update scene graph
scene.updateMatrixWorld();
// update camera matrices and frustum
camera.updateMatrixWorld();
camera.matrixWorldInverse.getInverse( camera.matrixWorld );
var boundUniforms = this.boundUniforms;
for ( var name in boundUniforms ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册