Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2025-12-24 14:57:22 -06:00
parent 582ed3237d
commit 889e91a8ca
3 changed files with 11 additions and 2 deletions

View File

@ -117,6 +117,15 @@ enum Design {
/// Duration all toasts stay visible (in seconds). /// Duration all toasts stay visible (in seconds).
static let duration: Duration = .seconds(2) static let duration: Duration = .seconds(2)
} }
// MARK: - Card Deal Animation
enum DealAnimation {
/// Horizontal offset for card deal (from upper-right, simulating shoe)
static let offsetX: CGFloat = 150
/// Vertical offset for card deal (from above the table)
static let offsetY: CGFloat = -200
}
} }
// MARK: - Blackjack App Colors // MARK: - Blackjack App Colors

View File

@ -63,7 +63,7 @@ struct DealerHandView: View {
.zIndex(Double(index)) .zIndex(Double(index))
.transition( .transition(
.asymmetric( .asymmetric(
insertion: .move(edge: .top) insertion: .offset(x: Design.DealAnimation.offsetX, y: Design.DealAnimation.offsetY)
.combined(with: .opacity) .combined(with: .opacity)
.combined(with: .scale(scale: Design.Scale.slightShrink)), .combined(with: .scale(scale: Design.Scale.slightShrink)),
removal: .scale.combined(with: .opacity) removal: .scale.combined(with: .opacity)

View File

@ -133,7 +133,7 @@ struct PlayerHandView: View {
.zIndex(Double(index)) .zIndex(Double(index))
.transition( .transition(
.asymmetric( .asymmetric(
insertion: .move(edge: .top) insertion: .offset(x: Design.DealAnimation.offsetX, y: Design.DealAnimation.offsetY)
.combined(with: .opacity) .combined(with: .opacity)
.combined(with: .scale(scale: Design.Scale.slightShrink)), .combined(with: .scale(scale: Design.Scale.slightShrink)),
removal: .scale.combined(with: .opacity) removal: .scale.combined(with: .opacity)