Skip to content

Commit cce25aa

Browse files
committed
VREffect: Clean up.
1 parent 5cf791f commit cce25aa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/js/effects/VREffect.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ THREE.VREffect = function ( renderer, onError ) {
137137

138138
window.addEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange, false );
139139

140-
this.dispose = function () {
141-
window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange, false );
142-
};
143-
144140
this.setFullScreen = function ( boolean ) {
145141

146142
return new Promise( function ( resolve, reject ) {
@@ -280,7 +276,6 @@ THREE.VREffect = function ( renderer, onError ) {
280276

281277
}
282278

283-
284279
renderRectL = {
285280
x: Math.round( size.width * leftBounds[ 0 ] ),
286281
y: Math.round( size.height * leftBounds[ 1 ] ),
@@ -398,6 +393,12 @@ THREE.VREffect = function ( renderer, onError ) {
398393

399394
};
400395

396+
this.dispose = function () {
397+
398+
window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange, false );
399+
400+
};
401+
401402
//
402403

403404
function fovToNDCScaleOffset( fov ) {

0 commit comments

Comments
 (0)