This commit is contained in:
Tykayn 2023-06-21 12:09:00 +02:00 committed by tykayn
commit 4df685986f
5 changed files with 25070 additions and 3095 deletions

File diff suppressed because it is too large Load Diff

16294
css/sprint_4_converted.scss Normal file

File diff suppressed because it is too large Load Diff

View File

@ -10,20 +10,21 @@ let enable_animations = false
enable_animations = true enable_animations = true
const rotateYCard = '200deg' const rotateYCard = '200deg'
const offsetCard = '-=100' const offsetCard = '10'
function animateCard (id, side) { function animateCard (id, side) {
console.log('animateCard', id, side, offsetCard)
const fromObject = { const fromObject = {
rotateY: rotateYCard, rotateY: rotateYCard,
side: offsetCard // side: offsetCard
} }
let toObject = { let toObject = {
rotateY: 0, rotateY: 0,
duration: 0.2, duration: 0.2,
ease: 'easeInOut', ease: 'easeInOut',
side: 0, // side: 1,
scrollTrigger: { scrollTrigger: {
trigger: '#content-' + id + ' .flip-handle', trigger: '#content-' + id + ' .flip-handle',
start: 'top 80%', start: 'top 80%',
@ -31,7 +32,8 @@ function animateCard (id, side) {
markers: development_debug, markers: development_debug,
} }
} }
// toObject[side] = offsetCard; // fromObject[side] = 1;
toObject[side] = offsetCard;
gsap.fromTo('#content-' + id, fromObject, gsap.fromTo('#content-' + id, fromObject,
toObject) toObject)
@ -79,7 +81,7 @@ if (enable_animations) {
trigger: '#unlock_white', trigger: '#unlock_white',
delay: 1, delay: 1,
scrub:2, scrub:2,
start: '+=50% 80%' start: '+50% 80%'
} }
}) })
@ -92,19 +94,9 @@ if (enable_animations) {
scrub: 1, scrub: 1,
markers: development_debug, markers: development_debug,
}, },
keyframes: [ top: '30vw',
{ width: '-40vw',
top: '-=50',
width: '100vw',
},
{
top: '-=50',
width: "-=5vw",
},
{
top: '-=100',
width: '-=40vw',
}]
}) })
gsap.fromTo('#hand', gsap.fromTo('#hand',
@ -115,7 +107,7 @@ if (enable_animations) {
{ {
top: 500, top: 500,
duration: 1, duration: 1,
opacity: 0.02, opacity: 0,
scrollTrigger: { scrollTrigger: {
trigger: '#cover', trigger: '#cover',
scrub: 1, scrub: 1,
@ -126,7 +118,7 @@ if (enable_animations) {
gsap.to('#phone-watches-1', gsap.to('#phone-watches-1',
{ {
left: 500, left: 500,
top: (531 - 400), top: -200,
scale: 0.8, scale: 0.8,
duration: 1.5, duration: 1.5,
ease: 'sine', ease: 'sine',
@ -179,24 +171,10 @@ if (enable_animations) {
} }
}) })
gsap.to('#phone-watches-4',
{
left: '50vw',
top: -10,
scale: 0.5,
duration: 3,
ease: 'sine',
scrollTrigger: {
trigger: '#welcome',
scrub: 2,
markers: development_debug,
}
})
gsap.fromTo('#content_first', gsap.fromTo('#content_first',
{ {
scale: 0.5, scale: 0.5,
opacity: 0.5, opacity: 0.15,
}, },
{ {
opacity: 1, opacity: 1,
@ -213,7 +191,7 @@ if (enable_animations) {
{ {
scale: 0.8, scale: 0.8,
left: -50, left: -50,
opacity: 0.5, opacity: 0.15,
top: -20, top: -20,
}, },
{ {
@ -234,7 +212,7 @@ if (enable_animations) {
gsap.fromTo('#content_all_img', gsap.fromTo('#content_all_img',
{ {
scale: 1, scale: 1,
left: "-=100" left: "-100"
}, },
{ {
scale: 1.1, scale: 1.1,
@ -252,7 +230,7 @@ if (enable_animations) {
{ {
opacity: 0.5, opacity: 0.5,
scale: 1, scale: 1,
bottom: '-=100vh', bottom: '-100vh',
height: '10rem', height: '10rem',
}, },
{ {

5321
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,9 @@
"start": "serve" "start": "serve"
}, },
"devDependencies": { "devDependencies": {
"node-sass": "^9.0.0",
"parcel-bundler": "^1.8.1", "parcel-bundler": "^1.8.1",
"sass-loader": "^13.3.2",
"serve": "^14.2.0" "serve": "^14.2.0"
} }
} }