Style and animations fixes
- Add a requestAnimationFrame for TitleSite (would not fire from a location to credits/choose) - Center and adjust parallax scroll for massive titles - Place illustration: max width and center
This commit is contained in:
@@ -21,12 +21,11 @@ export const animateIn = (scope, init) => {
|
||||
})
|
||||
|
||||
// On scroll animation
|
||||
const title = ScrollOut({
|
||||
once: true,
|
||||
targets: scope,
|
||||
onShown: () => {
|
||||
console.log('TitleSite show')
|
||||
letters.restart()
|
||||
}
|
||||
requestAnimationFrame(() => {
|
||||
const title = ScrollOut({
|
||||
once: true,
|
||||
targets: scope,
|
||||
onShown: () => letters.restart()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export const animateIn = () => {
|
||||
// Title: Parallax on scroll
|
||||
const translate = anime({
|
||||
targets: '#title-houses',
|
||||
translateX: ['7%', '-15%'],
|
||||
translateX: window.innerWidth <= 1920 ? ['25%', '-15%'] : ['7%', '-7%'],
|
||||
translateZ: [0, 0],
|
||||
easing: 'linear',
|
||||
duration: animDuration,
|
||||
|
||||
Reference in New Issue
Block a user