Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonyyu-1 authored Jul 15, 2024
1 parent 273bab7 commit bbfa179
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,9 @@ async function main() {
if (e.buttons === 1) { // Check if the left mouse button is pressed
if (lastY !== null) {
const deltaY = (5 * (e.clientY - startY)) / innerHeight;
totalVerticalDistance += deltaY;
if((totalVerticalDistance < -0.6 && deltaY > 0 )||(totalVerticalDistance > 0.6 && deltaY < 0)||(totalVerticalDistance>=-0.6 && totalVerticalDistance <= 0.6)){
totalVerticalDistance += deltaY;
}
}
lastY = e.clientY;
} else {
Expand Down

0 comments on commit bbfa179

Please sign in to comment.