refactor: simplify applyRotation condition in handleMouseMove
This commit is contained in:
parent
2fd74e5405
commit
76293a6529
@ -51,9 +51,7 @@
|
||||
|
||||
const dist = Math.sqrt(velocityX * velocityX + velocityY * velocityY);
|
||||
|
||||
if (!applyRotation && isMouseDown && dist > 10) {
|
||||
applyRotation = true;
|
||||
}
|
||||
if (!applyRotation && isMouseDown && dist > 10) applyRotation = true;
|
||||
|
||||
let newDegrees = (Math.atan2(-deltaX, deltaY) * 180) / Math.PI + 24.3;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user