change acceleration, preload one more timeline tile

This commit is contained in:
rlx 2018-01-12 14:52:42 +01:00
parent 7381bfb955
commit b25939875e
1 changed files with 4 additions and 4 deletions

8
icf.js
View File

@ -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