From b25939875ef7eb5181bffe7c4cc57d5e3422c699 Mon Sep 17 00:00:00 2001 From: rlx Date: Fri, 12 Jan 2018 14:52:42 +0100 Subject: [PATCH] change acceleration, preload one more timeline tile --- icf.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icf.js b/icf.js index 56f31df..0f92db6 100644 --- a/icf.js +++ b/icf.js @@ -9,13 +9,13 @@ let timelinesLeft let timelineLink = document.getElementById('link') let timelineLinkEntered = false +let fps = 25 +let fpsAnimation = 60 let paused = true let speed = 0 let acceleration = 0 let maxSpeed = 2 -let maxAcceleration = maxSpeed / 100 -let fps = 25 -let fpsAnimation = 60 +let maxAcceleration = 1 / fpsAnimation function api(action, data, callback) { fetch('https://indiancine.ma/api/', { @@ -154,7 +154,7 @@ function renderTimeline() { left: timelines[0].left - timelineWidth }) } - while (last(timelines).left + timelineWidth < windowWidth) { + while (last(timelines).left < windowWidth) { timelines.push({ index: mod(last(timelines).index + 1, timelineTiles), left: last(timelines).left + timelineWidth