Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
582ed3237d
commit
889e91a8ca
@ -117,6 +117,15 @@ enum Design {
|
||||
/// Duration all toasts stay visible (in seconds).
|
||||
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
|
||||
|
||||
@ -63,7 +63,7 @@ struct DealerHandView: View {
|
||||
.zIndex(Double(index))
|
||||
.transition(
|
||||
.asymmetric(
|
||||
insertion: .move(edge: .top)
|
||||
insertion: .offset(x: Design.DealAnimation.offsetX, y: Design.DealAnimation.offsetY)
|
||||
.combined(with: .opacity)
|
||||
.combined(with: .scale(scale: Design.Scale.slightShrink)),
|
||||
removal: .scale.combined(with: .opacity)
|
||||
|
||||
@ -133,7 +133,7 @@ struct PlayerHandView: View {
|
||||
.zIndex(Double(index))
|
||||
.transition(
|
||||
.asymmetric(
|
||||
insertion: .move(edge: .top)
|
||||
insertion: .offset(x: Design.DealAnimation.offsetX, y: Design.DealAnimation.offsetY)
|
||||
.combined(with: .opacity)
|
||||
.combined(with: .scale(scale: Design.Scale.slightShrink)),
|
||||
removal: .scale.combined(with: .opacity)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user