From 17b6cf814f10f25bb3efebeb5129a6797ea7a24e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Sep 2021 18:08:54 +0200 Subject: regenerate again... --- frontend/site/projects/museum/views/petros.nav.js | 25 +++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'frontend/site/projects/museum/views/petros.nav.js') diff --git a/frontend/site/projects/museum/views/petros.nav.js b/frontend/site/projects/museum/views/petros.nav.js index 7a54c72..7c7dbd2 100644 --- a/frontend/site/projects/museum/views/petros.nav.js +++ b/frontend/site/projects/museum/views/petros.nav.js @@ -21,6 +21,7 @@ const RESET_STATE = { textPrep: false, textActive: false, textDone: false, + textAgain: false, textOpacity: 0.0, iconFade: false, text: null, @@ -54,10 +55,10 @@ const INITIAL_VIEW = { const FASTFORWARD = 1.0 const LOOP_TIMEOUT = 2000 * FASTFORWARD -const MOVEMENT_TIMEOUT = 41000 * FASTFORWARD +const MOVEMENT_TIMEOUT = 45000 * FASTFORWARD const TEXT_LOAD_TIMEOUT = 6000 * FASTFORWARD const SHOW_NAV_TIMEOUT = 2000 * FASTFORWARD -const TEXT_HIDE_TIMEOUT = 20000 * FASTFORWARD +const TEXT_HIDE_TIMEOUT = 7000 * FASTFORWARD const SUBTITLE_COUNT = 12 @@ -111,8 +112,6 @@ class PetrosNav extends Component { }) return } - preloadImage(`/thelastmuseum/static/media/last-museum/petros-moris/OracleTextButton${index}-White.png`) - preloadImage(`/thelastmuseum/static/media/last-museum/petros-moris/OracleTextButton${index}.png`) preloadImage(`/thelastmuseum/static/media/last-museum/petros-moris/NavBW${index}.png`) preloadImage(`/thelastmuseum/static/media/last-museum/petros-moris/Loading Animation ${index}.png`) this.setState({ @@ -156,11 +155,12 @@ class PetrosNav extends Component { /** Start text generation sequence */ handleClickText() { - if (this.state.textActive || this.state.text) return + if (!this.state.textAgain && (this.state.textActive || this.state.text)) return this.setState({ textPrep: false, textActive: true, textDone: false, + textAgain: false, hovering: false, textOpacity: 0.0, text: null @@ -207,7 +207,10 @@ class PetrosNav extends Component { this.setState({ iconFade: true }) // After a longer delay, hide the text this.textTimeout = setTimeout(() => { - this.setState({ textOpacity: 0.0 }) + this.setState({ textOpacity: 0.0}) + this.textTimeout = setTimeout(() => { + this.setState({ textAgain: true }) + }, 500) }, TEXT_HIDE_TIMEOUT) }, SHOW_NAV_TIMEOUT) } @@ -259,7 +262,7 @@ class PetrosNav extends Component { const { index, ready, hovering, iconFade, - textPrep, textActive, textDone, textOpacity, text, + textPrep, textActive, textDone, textAgain, textOpacity, text, glyphTransform, } = this.state if (!this.props.interactive || (!index)) return null @@ -278,8 +281,8 @@ class PetrosNav extends Component {