Skip to content

Commit

Permalink
lower timer to 60fps
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed Apr 12, 2024
1 parent 54168e1 commit 1200362
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ class ExpoScrollForwarderView: ExpoView, UIGestureRecognizerDelegate {
}

var animTranslation = -translation
self.animTimer = Timer.scheduledTimer(withTimeInterval: 1.0 / 120, repeats: true) { timer in
self.animTimer = Timer.scheduledTimer(withTimeInterval: 1.0 / 60, repeats: true) { timer in
velocity *= 0.9875
animTranslation = (-velocity / 120) + animTranslation
animTranslation = (-velocity / 60) + animTranslation

let nextOffset = self.dampenOffset(animTranslation + self.initialOffset)

Expand Down

0 comments on commit 1200362

Please sign in to comment.