Skip to content

Commit

Permalink
Fix to not duplicate default camera controls
Browse files Browse the repository at this point in the history
  • Loading branch information
jtran committed Aug 26, 2024
1 parent e9985b2 commit 9341387
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/clientSideScene/CameraControls.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MouseGuard } from 'lib/cameraControls'
import { cameraMouseDragGuards, MouseGuard } from 'lib/cameraControls'
import {
Euler,
MathUtils,
Expand Down Expand Up @@ -81,24 +81,7 @@ export class CameraControls {
pendingZoom: number | null = null
pendingRotation: Vector2 | null = null
pendingPan: Vector2 | null = null
interactionGuards: MouseGuard = {
pan: {
description: 'Right click + Shift + drag or middle click + drag',
callback: (e) => !!(e.buttons & 4) && !e.ctrlKey,
},
zoom: {
description: 'Scroll wheel or Right click + Ctrl + drag',
dragCallback: (e) => e.button === 2 && e.ctrlKey,
scrollCallback: () => true,
},
rotate: {
description: 'Right click + drag',
callback: (e) => {
console.log('event', e)
return !!(e.buttons & 2)
},
},
}
interactionGuards: MouseGuard = cameraMouseDragGuards.KittyCAD
isFovAnimationInProgress = false
fovBeforeOrtho = 45
get isPerspective() {
Expand Down

0 comments on commit 9341387

Please sign in to comment.