From 98f84c1b26a1d0506859b3aff3bf937ceb69478a Mon Sep 17 00:00:00 2001 From: Brian Peiris Date: Tue, 26 Jun 2018 14:04:01 -0700 Subject: [PATCH] Normalize scroll wheel --- examples/js/controls/EditorControls.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/js/controls/EditorControls.js b/examples/js/controls/EditorControls.js index 64b99496ef..8bbafe4f3f 100644 --- a/examples/js/controls/EditorControls.js +++ b/examples/js/controls/EditorControls.js @@ -14,7 +14,7 @@ THREE.EditorControls = function ( object, domElement ) { this.enabled = true; this.center = new THREE.Vector3(); this.panSpeed = 0.001; - this.zoomSpeed = 0.001; + this.zoomSpeed = 0.1; this.rotationSpeed = 0.005; // internals @@ -187,9 +187,8 @@ THREE.EditorControls = function ( object, domElement ) { event.preventDefault(); - // if ( scope.enabled === false ) return; - - scope.zoom( new THREE.Vector3( 0, 0, event.deltaY ) ); + // Normalize deltaY due to https://bugzilla.mozilla.org/show_bug.cgi?id=1392460 + scope.zoom( new THREE.Vector3( 0, 0, event.deltaY > 0 ? 1 : - 1 ) ); } -- GitLab