Piece animation, as on Lichess
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:
parent
c7a8f0d453
commit
d250ddf2cc
9 changed files with 284 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue