diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-09-13 18:08:54 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-09-13 18:08:54 +0200 |
| commit | 17b6cf814f10f25bb3efebeb5129a6797ea7a24e (patch) | |
| tree | b399c63182487b91d9d09298908d0963f16d539f /frontend/site/projects/museum/views | |
| parent | 7076bb3c9927602805e1bbb5476223fad69ddb53 (diff) | |
regenerate again...
Diffstat (limited to 'frontend/site/projects/museum/views')
| -rw-r--r-- | frontend/site/projects/museum/views/petros.nav.css | 4 | ||||
| -rw-r--r-- | frontend/site/projects/museum/views/petros.nav.js | 25 |
2 files changed, 16 insertions, 13 deletions
diff --git a/frontend/site/projects/museum/views/petros.nav.css b/frontend/site/projects/museum/views/petros.nav.css index a23c657..2dd3c29 100644 --- a/frontend/site/projects/museum/views/petros.nav.css +++ b/frontend/site/projects/museum/views/petros.nav.css @@ -30,8 +30,8 @@ .petros-text svg { pointer-events: none; - width: 100px; - height: 101px; + width: 130px; + height: 131px; } .petros-text svg path { fill: none; 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 { <div className={[ "petros-text", - ready && !(textActive || textDone) ? "visible" : "", - hovering === "text" || textActive || textDone ? "white" : "", + ready && (textAgain || !(textActive || textDone)) ? "visible" : "", + hovering === "text" || (!textAgain && (textActive || textDone)) ? "white" : "", ].join(" ")} style={glyphTransform} onMouseEnter={this.handleEnter} @@ -295,7 +298,7 @@ class PetrosNav extends Component { (textDone && iconFade) ? "petros-left visible" : "petros-left", index === 1 ? "noclick" : "" ].join(" ")} - src={(hovering === "left" || textActive || index === 1) + src={(hovering === "left" || (!textAgain && textActive) || index === 1) ? `/thelastmuseum/static/media/last-museum/petros-moris/NavBW${leftIndex}.png` : `/thelastmuseum/static/media/last-museum/petros-moris/NavB${leftIndex}.png` } @@ -307,7 +310,7 @@ class PetrosNav extends Component { {ready && ( <img className={(textDone && iconFade) ? "petros-right visible" : "petros-right"} - src={(hovering === "right" || textActive) + src={(hovering === "right" || (!textAgain && textActive)) ? `/thelastmuseum/static/media/last-museum/petros-moris/NavBW${rightIndex}.png` : `/thelastmuseum/static/media/last-museum/petros-moris/NavB${rightIndex}.png` } |
