freeze pet when pet menu is opened
This commit is contained in:
@@ -63,7 +63,9 @@
|
|||||||
// 100ms per frame for the animation loop
|
// 100ms per frame for the animation loop
|
||||||
if (timestamp - lastFrameTimestamp > 100) {
|
if (timestamp - lastFrameTimestamp > 100) {
|
||||||
lastFrameTimestamp = timestamp;
|
lastFrameTimestamp = timestamp;
|
||||||
updatePosition(targetX, targetY, window.innerWidth, window.innerHeight);
|
if (!isPetMenuOpen) {
|
||||||
|
updatePosition(targetX, targetY, window.innerWidth, window.innerHeight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
animationFrameId = requestAnimationFrame(frame);
|
animationFrameId = requestAnimationFrame(frame);
|
||||||
|
|||||||
Reference in New Issue
Block a user