solitaire: fly the cards home instead of blinking them there
A foundation only ever draws its top card, so the FLIP diff had nothing to animate for the fifty-one cards buried underneath: an auto-finish was every card vanishing at once, four kings stranded in the tableau row, and the foundation flashes firing on empty slots. Cards bound for a foundation now fly as ghosts, lifted out of the old DOM into a fixed layer so the board underneath can re-render in one go while they are still in the air. The card that lands is held invisible until its ghost arrives, so the destination doesn't show the ending first. The home counter was jumping straight to 52/52 over a board with fifty-one cards still travelling. It walks up behind them now, on the same step ladder as the ghosts, the flashes and the sound.
This commit is contained in:
@@ -1340,6 +1340,16 @@ html[data-phase="night"] {
|
||||
/* An empty place a card could be: the stock when it's spent, a foundation
|
||||
waiting for its ace, a column waiting for a king. Same footprint as a card,
|
||||
so nothing on the board reflows when one empties. */
|
||||
/* Where cards go home. Solitaire lifts a copy of every card bound for a
|
||||
foundation into here so it can keep flying while the board underneath it
|
||||
redraws in one go. It never takes a click and it never scrolls. */
|
||||
.pete-flight-layer {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 60;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.pete-slot {
|
||||
position: relative;
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user