conditionnal animation on window height
This commit is contained in:
parent
f5c2814ee8
commit
040bc7347e
@ -12,6 +12,12 @@ enable_animations = true
|
||||
const rotateYCard = '200deg'
|
||||
const offsetCard = '10'
|
||||
|
||||
let innerWidth = window.innerWidth;
|
||||
document.onresize(event=> {
|
||||
innerWidth = window.innerWidth;
|
||||
console.log('innerWidth', innerWidth)
|
||||
})
|
||||
|
||||
function animateCard (id, side) {
|
||||
|
||||
console.log('animateCard', '#content-' + id + ' .flip-handle', side, offsetCard)
|
||||
@ -86,6 +92,7 @@ if (enable_animations) {
|
||||
})
|
||||
|
||||
|
||||
|
||||
gsap.to('#main_title', {
|
||||
delay: 1,
|
||||
// xPercent: ()=>nav.offsetHeight,
|
||||
@ -94,7 +101,7 @@ if (enable_animations) {
|
||||
scrub: 1,
|
||||
markers: development_debug,
|
||||
},
|
||||
top: '15vw',
|
||||
top: innerWidth > 1300 ? '15vw' : '30vw',
|
||||
width: '-40vw',
|
||||
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user