summaryrefslogtreecommitdiff
path: root/frontend/site/projects/museum/views/petros.nav.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/site/projects/museum/views/petros.nav.js')
-rw-r--r--frontend/site/projects/museum/views/petros.nav.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/frontend/site/projects/museum/views/petros.nav.js b/frontend/site/projects/museum/views/petros.nav.js
index 22e49a1..7cf82f5 100644
--- a/frontend/site/projects/museum/views/petros.nav.js
+++ b/frontend/site/projects/museum/views/petros.nav.js
@@ -8,7 +8,7 @@ import { connect } from 'react-redux'
import './petros.nav.css'
import { history } from "site/store"
-import { preloadImage } from "app/utils"
+import { preloadImage, pad, randint } from "app/utils"
import actions from "site/actions"
import { generateTransform } from 'app/views/tile/tile.utils'
@@ -52,7 +52,7 @@ const INITIAL_VIEW = {
const FASTFORWARD = 1.0
const LOOP_TIMEOUT = 6000 * FASTFORWARD
-const MOVEMENT_TIMEOUT = 40500 * FASTFORWARD
+const MOVEMENT_TIMEOUT = 45000 * FASTFORWARD
const TEXT_LOAD_TIMEOUT = 15000 * FASTFORWARD
const SHOW_NAV_TIMEOUT = 10000 * FASTFORWARD
const TEXT_HIDE_TIMEOUT = 20000 * FASTFORWARD
@@ -165,8 +165,8 @@ class PetrosNav extends Component {
// Fetch the subtitles
const subtitle_index = 1
- const subtitle_choice = randint(SUBTITLE_COUNT) + 1
- fetch(`/thelastmuseum/static/media/last-museum/petros-moris/texts/${subtitle_index}/${subtitle_choice}.txt`, {
+ const subtitle_choice = pad(randint(SUBTITLE_COUNT) + 1, 3)
+ fetch(`/thelastmuseum/static/media/last-museum/petros-moris/texts/Oracle${subtitle_index}/Oracle${subtitle_index}-${subtitle_choice}.txt`, {
method: 'GET',
})
.then(res => res.text())
@@ -314,8 +314,6 @@ class PetrosNav extends Component {
}
}
-const randint = n => Math.floor(Math.random() * n)
-
const mapStateToProps = state => ({
interactive: state.site.interactive,
popups: state.site.popups,