|
@@ -203,8 +203,8 @@ THREE.Water.prototype.updateTextureMatrix = function () {
|
|
|
this.normal.applyMatrix4( this.rotationMatrix );
|
|
|
|
|
|
var view = this.mirrorWorldPosition.clone().sub( this.cameraWorldPosition );
|
|
|
- var reflectView = view.reflect( this.normal );
|
|
|
- reflectView.add( this.mirrorWorldPosition );
|
|
|
+ view.reflect( this.normal ).negate();
|
|
|
+ view.add( this.mirrorWorldPosition );
|
|
|
|
|
|
this.rotationMatrix.extractRotation( this.camera.matrixWorld );
|
|
|
|
|
@@ -213,16 +213,16 @@ THREE.Water.prototype.updateTextureMatrix = function () {
|
|
|
this.lookAtPosition.add( this.cameraWorldPosition );
|
|
|
|
|
|
var target = this.mirrorWorldPosition.clone().sub( this.lookAtPosition );
|
|
|
- var reflectTarget = target.reflect( this.normal );
|
|
|
- reflectTarget.add( this.mirrorWorldPosition );
|
|
|
+ target.reflect( this.normal ).negate();
|
|
|
+ target.add( this.mirrorWorldPosition );
|
|
|
|
|
|
this.up.set(0, -1, 0);
|
|
|
this.up.applyMatrix4( this.rotationMatrix );
|
|
|
- var reflectUp = this.up.reflect( this.normal );
|
|
|
+ this.up.reflect( this.normal ).negate();
|
|
|
|
|
|
- this.mirrorCamera.position.copy(reflectView);
|
|
|
- this.mirrorCamera.up = reflectUp;
|
|
|
- this.mirrorCamera.lookAt(reflectTarget);
|
|
|
+ this.mirrorCamera.position.copy( view );
|
|
|
+ this.mirrorCamera.up = this.up;
|
|
|
+ this.mirrorCamera.lookAt( target );
|
|
|
this.mirrorCamera.aspect = this.camera.aspect;
|
|
|
|
|
|
this.mirrorCamera.updateProjectionMatrix();
|