Skip to content

Commit 503d4f4

Browse files
committed
Fixed EditorControls.
1 parent e3c5619 commit 503d4f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/js/controls/EditorControls.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ THREE.EditorControls = function ( object, domElement ) {
6060

6161
var distance = object.position.distanceTo( center );
6262

63-
delta.multiplyScalar( distance * this.panSpeed );
63+
delta.multiplyScalar( distance * scope.panSpeed );
6464
delta.applyMatrix3( normalMatrix.getNormalMatrix( object.matrix ) );
6565

6666
object.position.add( delta );
@@ -74,7 +74,7 @@ THREE.EditorControls = function ( object, domElement ) {
7474

7575
var distance = object.position.distanceTo( center );
7676

77-
delta.multiplyScalar( distance * this.zoomSpeed );
77+
delta.multiplyScalar( distance * scope.zoomSpeed );
7878

7979
if ( delta.length() > distance ) return;
8080

@@ -147,7 +147,7 @@ THREE.EditorControls = function ( object, domElement ) {
147147

148148
if ( state === STATE.ROTATE ) {
149149

150-
scope.rotate( new THREE.Vector3( - movementX * this.rotationSpeed, - movementY * this.rotationSpeed, 0 ) );
150+
scope.rotate( new THREE.Vector3( - movementX * scope.rotationSpeed, - movementY * scope.rotationSpeed, 0 ) );
151151

152152
} else if ( state === STATE.ZOOM ) {
153153

@@ -270,7 +270,7 @@ THREE.EditorControls = function ( object, domElement ) {
270270
case 1:
271271
touches[ 0 ].set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY, 0 );
272272
touches[ 1 ].set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY, 0 );
273-
scope.rotate( touches[ 0 ].sub( getClosest( touches[ 0 ], prevTouches ) ).multiplyScalar( - this.rotationSpeed ) );
273+
scope.rotate( touches[ 0 ].sub( getClosest( touches[ 0 ], prevTouches ) ).multiplyScalar( - scope.rotationSpeed ) );
274274
break;
275275

276276
case 2:

0 commit comments

Comments
 (0)