浏览代码

Fix handling of some cameras in Mirror.js

Mirror.js assumes that the mirror camera has .matrixAutoUpdate = true. If the mirror camera is cloned from an original camera that has .matrixAutoUpdate = false, this must be corrected.
Densaugeo 10 年之前
父节点
当前提交
9af3f082e8
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/js/Mirror.js

+ 2 - 1
examples/js/Mirror.js

@@ -110,6 +110,7 @@ THREE.Mirror = function ( renderer, camera, options ) {
 	this.textureMatrix = new THREE.Matrix4();
 
 	this.mirrorCamera = this.camera.clone();
+	this.mirrorCamera.matrixAutoUpdate = true;
 
 	this.texture = new THREE.WebGLRenderTarget( width, height );
 	this.tempTexture = new THREE.WebGLRenderTarget( width, height );
@@ -142,7 +143,7 @@ THREE.Mirror = function ( renderer, camera, options ) {
 };
 
 THREE.Mirror.prototype = Object.create( THREE.Object3D.prototype );
-THREE.Mirror.prototype.constructor = THREE.Mirror;
+THREE.Mirror.prototype.constructor = THREE.Mirror;
 
 THREE.Mirror.prototype.renderWithMirror = function ( otherMirror ) {