瀏覽代碼

Merge pull request #5909 from Densaugeo/Mirror.js

Mirror.js
Mr.doob 10 年之前
父節點
當前提交
027ee10eb9
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      examples/js/Mirror.js
  2. 1 1
      examples/webgl_mirror.html

+ 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 ) {
 

+ 1 - 1
examples/webgl_mirror.html

@@ -50,7 +50,7 @@
 			var NEAR = 1;
 			var FAR = 500;
 
-			var camera, scane, renderer;
+			var camera, scene, renderer;
 
 			var cameraControls;