Fixed cars anaglyph example.

This commit is contained in:
Mr.doob
2011-06-01 08:47:22 +01:00
parent 11e9b06344
commit c8dee063f6
2 changed files with 6 additions and 6 deletions
@@ -197,7 +197,6 @@
webglRenderer = new THREE.AnaglyphWebGLRenderer();
webglRenderer.setSize( window.innerWidth, window.innerHeight );
webglRenderer.setFaceCulling( 0 );
webglRenderer.autoClear = false;
container.appendChild( webglRenderer.domElement );
if ( STATS_ENABLED ) {
@@ -6,7 +6,7 @@ THREE.AnaglyphWebGLRenderer = function ( parameters ) {
THREE.WebGLRenderer.call( this, parameters );
var that = this, setSize = this.setSize, render = this.render;
var _this = this, _setSize = this.setSize, _render = this.render;
var _cameraL = new THREE.Camera(), _cameraR = new THREE.Camera();
var params = { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter, format: THREE.RGBAFormat };
@@ -64,7 +64,7 @@ THREE.AnaglyphWebGLRenderer = function ( parameters ) {
this.setSize = function ( width, height ) {
setSize.call( that, width, height );
_setSize.call( _this, width, height );
_renderTargetL.width = width;
_renderTargetL.height = height;
@@ -86,9 +86,10 @@ THREE.AnaglyphWebGLRenderer = function ( parameters ) {
_cameraR.target.position.copy( camera.target.position );
_cameraR.translateX( 10 );
render.call( that, scene, _cameraL, _renderTargetL, true );
render.call( that, scene, _cameraR, _renderTargetR, true );
render.call( that, _scene, _camera );
_render.call( _this, scene, _cameraL, _renderTargetL, true );
_render.call( _this, scene, _cameraR, _renderTargetR, true );
_render.call( _this, _scene, _camera );
};