Piece animation, as on Lichess
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

A move slides with chessground's easing: each piece of the new position slides
from the nearest square that held the same piece, a piece left over fades out,
so castling moves king and rook and a jump over several moves slides each piece
once. Settings → Board: Off, Fast 120 ms, Normal 250 ms (default), Slow 500 ms.
A piece dropped by dragging does not slide (the castling rook still does);
picking up a piece in flight takes it from its square.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-21 19:57:54 +03:00
parent c7a8f0d453
commit d250ddf2cc
9 changed files with 284 additions and 2 deletions

View file

@ -704,6 +704,7 @@ impl GameView {
show_coords: settings.show_coords,
theme: settings.board_theme.theme(),
pieces: settings.piece_set,
animation: settings.animation.seconds(),
};
if let Some(m) = view.show(ui, &mut self.board) {
self.play_move(m, actions);