Skip to content

Commit

Permalink
Adding custom phase length options for WiggleRate and ShakeRate (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergesort authored May 19, 2024
1 parent ebf05a2 commit 5ac7140
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/Pow/Effects/ShakeEffect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ public extension AnyChangeEffect {
enum ShakeRate {
case `default`
case fast
case phaseLength(CGFloat)

fileprivate var phaseLength: CGFloat {
switch self {
case .default: return 0.8
case .fast: return 0.3
case .phaseLength(let phaseLength): return phaseLength
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/Pow/Effects/WiggleEffect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ public extension AnyChangeEffect {
enum WiggleRate {
case `default`
case fast
case phaseLength(CGFloat)

fileprivate var phaseLength: CGFloat {
switch self {
case .default: return 0.8
case .fast: return 0.3
case .phaseLength(let phaseLength): return phaseLength
}
}
}
Expand Down

0 comments on commit 5ac7140

Please sign in to comment.