-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
62 lines (47 loc) · 929 Bytes
/
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
var t = gsap.timeline({scrollTrigger:{
trigger:"#page2",
start:"0% 95%",
end:"50% 50%",
scrub:true,
}})
t.to("#fanta",{
top:"100%",
left:"7%"
},'with fanta')
t.to("#png1",{
top:"115%",
left:"32%"
},'with fanta')
t.to("#png2",{
width:"13%",
top:"170%",
right:"0%"
},'with fanta')
var t2 = gsap.timeline({scrollTrigger:{
trigger:"#page3",
start:"20% 95%",
end:"50% 50%",
scrub:true,
}})
t2.from("#coke",{
rotate:"120deg",
},'together')
t2.from("#grape",{
rotate:"-120deg",
},'together')
t2.to("#fanta",{
left:"33%",
top:"200%",
height:"80vh",
rotate:"360deg",
},'together')
t2.to("#png2",{
right:"3%",
top:"270%",
width:"13%"
},'together')
t2.to("#purple",{
top:"210%",
left:"3%",
rotate:"15deg"
},'together')