refactor: simplify applyRotation condition in handleMouseMove

This commit is contained in:
HorizonCode 2025-07-03 08:49:50 +02:00
parent 2fd74e5405
commit 76293a6529

View File

@ -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;