Skip to content

Commit

Permalink
fix: mouseButtons and touches allow undefined in OrbitControls (pmndr…
Browse files Browse the repository at this point in the history
  • Loading branch information
yosipy authored Jan 2, 2023
1 parent 202c94c commit c0211c9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/controls/OrbitControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,20 @@ class OrbitControls extends EventDispatcher {
// The four arrow keys
keys = { LEFT: 'ArrowLeft', UP: 'ArrowUp', RIGHT: 'ArrowRight', BOTTOM: 'ArrowDown' }
// Mouse buttons
mouseButtons = {
mouseButtons: Partial<{
LEFT: MOUSE
MIDDLE: MOUSE
RIGHT: MOUSE
}> = {
LEFT: MOUSE.ROTATE,
MIDDLE: MOUSE.DOLLY,
RIGHT: MOUSE.PAN,
}
// Touch fingers
touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN }
touches: Partial<{
ONE: TOUCH
TWO: TOUCH
}> = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN }
target0: Vector3
position0: Vector3
zoom0: number
Expand Down

0 comments on commit c0211c9

Please sign in to comment.