-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
115 lines (108 loc) · 2.54 KB
/
script.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
var crsr = document.querySelector(".cursor")
var blur = document.querySelector(".cursor-blur")
document.addEventListener("mousemove", function(dets) {
crsr.style.left = dets.x+10 + "px"
crsr.style.top = dets.y + "px"
blur.style.left = dets.x - 150 + "px"
blur.style.top = dets.y -150 +"px"
})
var h4 = document.querySelectorAll("nav ")
h4.forEach(function (elem) {
elem.addEventListener("mouseenter", function(){
crsr.style.scale = 3;
crsr.style.border = " 0.5px solid white";
crsr.style.backgroundColor = "transparent";
crsr.style.transition = "all ease 0.2s";
crsr.style.cursor = "pointer"
})
elem.addEventListener("mouseleave", function(){
crsr.style.scale = 1;
crsr.style.border = " 0px solid #95C11E";
crsr.style.backgroundColor = "#95C11E";
})
})
gsap.to("nav", {
backgroundColor: "#000",
duration: 0.3,
height: "90",
scrollTrigger: {
Trigger: "nav",
scroller: "body",
// markers: true,
start: "top -10%",
end: "top -11%",
scrub: 1
}
})
gsap.to("#main", {
backgroundColor: "#000",
scrollTrigger: {
Trigger: "#main",
scroller: "body",
// markers: true,
start: "top -25%",
end: "top -75%",
scrub: 1,
}
})
gsap.from(".about img , .info", {
y: 50,
opacity: 0,
duartion: 1,
scrollTrigger: {
trigger: ".about",
scroller: "body",
start: "top 70%",
end: "top 65%",
scrub:2
}
})
gsap.from(".card", {
scale:0.8,
opacity: 0,
duartion: 1,
stagger:0.1,
scrollTrigger: {
trigger: ".card",
scroller: "body",
start: "top 85%",
end: "top 75%",
// markers:true,
scrub:1
}
})
gsap.from("#colon1", {
x: -70,
y: -70,
scrollTrigger: {
trigger: "#colon1",
scroller: "body",
start: "top 55%",
end: "top 45%",
// markers:true,
scrub:4
}
})
gsap.from("#colon2", {
x: 70,
y: 70,
scrollTrigger: {
trigger: "#colon2",
scroller: "body",
start: "top 100%",
end: "top 80%",
// markers:true,
scrub:4
}
})
gsap.from(".page4 h1",{
y: 70,
scrollTrigger: {
trigger: "#colon2",
scroller: "body",
start: "top 50%",
end: "top 40%",
// markers:true,
scrub:4
}
})