Commits

Michele Bini  committed 677ad41

viewport-scrolling.jl: Tweak a bit eliminate or at least reduce animation trembling

  • Participants
  • Parent commits 255d861

Comments (0)

Files changed (1)

File viewport-scrolling.jl

        (ma   viewport-scrolling--max-acceleration)
        (vx   (- viewport-scrolling--goalx viewport-scrolling--x))
        (vy   (- viewport-scrolling--goaly viewport-scrolling--y))
-       (r    (max 0.7 (/ (* (sqrt (+ (expt ovx 2) (expt ovy 2))) 2) ma)))
+       (r    (max 0.4 (round (/ (* (sqrt (+ (expt ovx 2) (expt ovy 2))) 2) ma))))
        (vx   (- vx (* r viewport-scrolling--x-speed)))
        (vy   (- vy (* r viewport-scrolling--y-speed)))
        (ms   viewport-scrolling--max-speed))