From cce25aa5e644e1fbc77b3df664ad32db887442a6 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Tue, 27 Sep 2016 16:14:36 -0700 Subject: [PATCH] VREffect: Clean up. --- examples/js/effects/VREffect.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/js/effects/VREffect.js b/examples/js/effects/VREffect.js index 702a965cf7..eab02a3f10 100644 --- a/examples/js/effects/VREffect.js +++ b/examples/js/effects/VREffect.js @@ -137,10 +137,6 @@ THREE.VREffect = function ( renderer, onError ) { window.addEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange, false ); - this.dispose = function () { - window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange, false ); - }; - this.setFullScreen = function ( boolean ) { return new Promise( function ( resolve, reject ) { @@ -280,7 +276,6 @@ THREE.VREffect = function ( renderer, onError ) { } - renderRectL = { x: Math.round( size.width * leftBounds[ 0 ] ), y: Math.round( size.height * leftBounds[ 1 ] ), @@ -398,6 +393,12 @@ THREE.VREffect = function ( renderer, onError ) { }; + this.dispose = function () { + + window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange, false ); + + }; + // function fovToNDCScaleOffset( fov ) { -- GitLab