displace sesame

This commit is contained in:
Tykayn 2023-07-03 16:17:42 +02:00 committed by tykayn
parent fbcf46bbb8
commit 432f20783f
2 changed files with 24 additions and 19 deletions

View File

@ -14424,8 +14424,12 @@ responsive land
@media all and (min-width: 1300px){
#hand{
top: 15vh;
}
#main_title{
top: 10vh;
min-height: 35vw;
max-width: 1300px;
max-height: 500px;
}

View File

@ -12,11 +12,14 @@ enable_animations = true
const rotateYCard = '200deg'
const offsetCard = '10'
let innerWidth = window.innerWidth;
let innerWidth = window.innerWidth
if (document.onresize) {
document.onresize(event => {
innerWidth = window.innerWidth;
innerWidth = window.innerWidth
console.log('innerWidth', innerWidth)
})
}
function animateCard (id, side) {
@ -38,8 +41,8 @@ function animateCard (id, side) {
markers: development_debug,
}
}
fromObject[side] = 1;
toObject[side] = offsetCard;
fromObject[side] = 1
toObject[side] = offsetCard
gsap.fromTo('#content-' + id, fromObject,
toObject)
@ -91,8 +94,6 @@ if (enable_animations) {
}
})
gsap.to('#main_title', {
delay: 1,
// xPercent: ()=>nav.offsetHeight,
@ -219,7 +220,7 @@ if (enable_animations) {
gsap.fromTo('#content_all_img',
{
scale: 1,
left: "-100"
left: '-100'
},
{
scale: 1.1,