@@ -14,22 +14,15 @@ function vtkVRButtonPanManipulator(publicAPI, model) {
14
14
// Set our className
15
15
model . classHierarchy . push ( 'vtkVRButtonPanManipulator' ) ;
16
16
17
- publicAPI . onButton3D = (
18
- interactorStyle ,
19
- renderer ,
20
- state ,
21
- device ,
22
- input ,
23
- pressed
24
- ) => {
25
- if ( pressed ) {
17
+ publicAPI . onButton3D = ( interactorStyle , renderer , state , eventData ) => {
18
+ if ( eventData . pressed ) {
26
19
interactorStyle . startCameraPose ( ) ;
27
20
} else if ( state === States . IS_CAMERA_POSE ) {
28
21
interactorStyle . endCameraPose ( ) ;
29
22
}
30
23
} ;
31
24
32
- publicAPI . onMove3D = ( interactorStyle , renderer , state , data ) => {
25
+ publicAPI . onMove3D = ( interactorStyle , renderer , state , eventData ) => {
33
26
if ( state !== States . IS_CAMERA_POSE ) {
34
27
return ;
35
28
}
@@ -40,13 +33,15 @@ function vtkVRButtonPanManipulator(publicAPI, model) {
40
33
const oldTrans = camera . getPhysicalTranslation ( ) ;
41
34
42
35
// look at the y axis to determine how fast / what direction to move
43
- const speed = data . gamepad . axes [ 1 ] ;
36
+ const speed = eventData . gamepad . axes [ 1 ] ;
44
37
45
38
// 0.05 meters / frame movement
46
39
const pscale = speed * 0.05 * camera . getPhysicalScale ( ) ;
47
40
48
41
// convert orientation to world coordinate direction
49
- const dir = camera . physicalOrientationToWorldDirection ( data . orientation ) ;
42
+ const dir = camera . physicalOrientationToWorldDirection (
43
+ eventData . orientation
44
+ ) ;
50
45
51
46
camera . setPhysicalTranslation (
52
47
oldTrans [ 0 ] + dir [ 0 ] * pscale ,
0 commit comments