-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
57 lines (49 loc) · 1.26 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
Shery.mouseFollower();
Shery.makeMagnet(".magnet");
// Shery.hoverWithMediaCircle(".hvr", {videos: ["./1.mp4","./2.mp4","./3.mp4"]});
Shery.hoverWithMediaCircle(".hoverWithMedia",{
videos: [
"videos/1.mp4",
"videos/2.mp4",
"videos/3.mp4"
]
});
gsap.to(".fleftelm", {
scrollTrigger: {
trigger:"#fimages",
pin:true,
start:"top top",
end:"bottom bottom",
endTrigger: ".last",
scrub: 1,
},
y: "-300%",
ease: Power1,
});
let sections = document.querySelectorAll(".fleftelm");
Shery.imageEffect(".images", {
style: 4,
config: { onMouse: { value:1 } },
slideStyle: (setScroll) => {
sections.forEach(function (sections, index){
ScrollTrigger.create({
trigger:sections,
start:"top top",
scrub:1,
onUpdate: function(prog){
setScroll(prog.progress+index)
}
})
})
},
});
// sections.forEach(function (section, index) {
// ScrollTrigger.create({
// trigger: section,
// start: "top top",
// scrub: 1,
// onUpdate: function (prog) {
// setScroll(prog.progress + index);
// },
// });
// });