fix(gacha): park the pointer off the card after tearing the pack

The scripted drag released the mouse over where the card lands. Once the
card arrived under it, pack-cards tilted the hovered card toward the
pointer over its .22s transition, so the face kept moving after the spin
stopped. The pointer now moves to the corner when the drag ends.
This commit is contained in:
tiennm99 committed 2026-10-01 22:43:05 +07:00
1 parent 9d5a207f54
commit 9e3cf9d78a
1 file changed
+5
+5
View File
@@ -276,6 +276,11 @@ const captureFrames = async (cdp, sessionId, request, dir, guard) => {
} else if (pressed) {
mouse({type: 'mouseReleased', button: 'left', clickCount: 1});
pressed = false;
// Park the pointer in the corner, off the card. Left where the drag ended,
// it sits over the card once the card lands, and pack-cards tilts a
// hovered card toward the pointer, nudging the face after the spin stops.
pointer = {x: 0, y: 0};
mouse({type: 'mouseMoved'});
}
// Input is acknowledged only once a frame consumes it, so draw before
// awaiting it. BeginFrame omits the screenshot when nothing changed.