Skip to content

Commit

Permalink
Set panning bounds based on view3d size
Browse files Browse the repository at this point in the history
  • Loading branch information
bananu7 committed Jun 23, 2024
1 parent 8fec996 commit f0dc5af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/client/src/gfx/View3D.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ export function View3D(props: Props) {
//zIndex: -1
}

const minPan = new THREE.Vector3(15, 0, 15);
const maxPan = new THREE.Vector3(85, 10, 85);
const border = 15.0;
const minPan = new THREE.Vector3(border, 0, border);
const maxPan = new THREE.Vector3(props.viewX - border, 10, props.viewY - border);

return (
<Suspense fallback={null}>
Expand Down

0 comments on commit f0dc5af

Please sign in to comment.