-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
96 lines (90 loc) · 1.54 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// other pages animations
let tl2 = gsap.timeline();
let tl3 = gsap.timeline();
tl2.from(".about-content",{
opacity:0,
x:-150,
duration:0.5,
})
tl2.from(".about-img",{
opacity:0,
x:150,
duration:0.5,
})
gsap.from(".project-heading",{
opacity:0,
y:-80,
duration:0.5,
})
gsap.from(".project-card",{
opacity:0,
x:-150,
duration:0.5,
})
tl3.from(".contact-heading",{
opacity:0,
x:150,
duration:0.3,
})
tl3.from(".contact-form",{
opacity:0,
x:-150,
duration:0.3,
})
var typed = new Typed('#element', {
strings: ['Web Developer', 'Quick Learner','Web Designer'],
typeSpeed: 50,
});
// home page animations
let tl = gsap.timeline();
tl.from(".nav",{
y:-50,
opacity:0,
duration:0.5,
})
tl.from(".page1 .circle",{
x:-150,
opacity:0,
duration:0.2,
})
tl.from(".page1 .content",{
x:-150,
opacity:0,
duration:0.5,
})
tl.from(".page1 .img-container",{
x:150,
opacity:0,
duration:0.5,
})
gsap.from(".page2-heading",{
scale:0.7,
opacity:0,
y:50,
scrollTrigger:{
trigger:".page2-heading",
scroller:"body",
start:"top 90%",
end:"top 110%",
},
})
gsap.from(".bar-section1",{
opacity:0,
x:-100,
scrollTrigger:{
trigger:".bar-section1",
scroller:"body",
start:"top 70%",
end:"top 110%",
},
})
gsap.from(".bar-section2",{
opacity:0,
x:100,
scrollTrigger:{
trigger:".bar-section1",
scroller:"body",
start:"top 70%",
end:"top 110%",
},
})