@@ -13,6 +13,9 @@ THREE.EditorControls = function ( object, domElement ) {
13
13
14
14
this . enabled = true ;
15
15
this . center = new THREE . Vector3 ( ) ;
16
+ this . panSpeed = 0.001
17
+ this . zoomSpeed = 0.001
18
+ this . rotationSpeed = 0.005
16
19
17
20
// internals
18
21
@@ -57,7 +60,7 @@ THREE.EditorControls = function ( object, domElement ) {
57
60
58
61
var distance = object . position . distanceTo ( center ) ;
59
62
60
- delta . multiplyScalar ( distance * 0.001 ) ;
63
+ delta . multiplyScalar ( distance * this . panSpeed ) ;
61
64
delta . applyMatrix3 ( normalMatrix . getNormalMatrix ( object . matrix ) ) ;
62
65
63
66
object . position . add ( delta ) ;
@@ -71,7 +74,7 @@ THREE.EditorControls = function ( object, domElement ) {
71
74
72
75
var distance = object . position . distanceTo ( center ) ;
73
76
74
- delta . multiplyScalar ( distance * 0.001 ) ;
77
+ delta . multiplyScalar ( distance * this . zoomSpeed ) ;
75
78
76
79
if ( delta . length ( ) > distance ) return ;
77
80
@@ -144,7 +147,7 @@ THREE.EditorControls = function ( object, domElement ) {
144
147
145
148
if ( state === STATE . ROTATE ) {
146
149
147
- scope . rotate ( new THREE . Vector3 ( - movementX * 0.005 , - movementY * 0.005 , 0 ) ) ;
150
+ scope . rotate ( new THREE . Vector3 ( - movementX * this . rotationSpeed , - movementY * this . rotationSpeed , 0 ) ) ;
148
151
149
152
} else if ( state === STATE . ZOOM ) {
150
153
@@ -267,7 +270,7 @@ THREE.EditorControls = function ( object, domElement ) {
267
270
case 1 :
268
271
touches [ 0 ] . set ( event . touches [ 0 ] . pageX , event . touches [ 0 ] . pageY , 0 ) ;
269
272
touches [ 1 ] . set ( event . touches [ 0 ] . pageX , event . touches [ 0 ] . pageY , 0 ) ;
270
- scope . rotate ( touches [ 0 ] . sub ( getClosest ( touches [ 0 ] , prevTouches ) ) . multiplyScalar ( - 0.005 ) ) ;
273
+ scope . rotate ( touches [ 0 ] . sub ( getClosest ( touches [ 0 ] , prevTouches ) ) . multiplyScalar ( - this . rotationSpeed ) ) ;
271
274
break ;
272
275
273
276
case 2 :
0 commit comments