-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
36 lines (31 loc) · 662 Bytes
/
app.js
File metadata and controls
36 lines (31 loc) · 662 Bytes
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
const flightPath={
curviness:1.25,
autoRotate:true,
values:[
{x:100,y:-20},
{x:300,y:10},
{x:500,y:100},
{x:750,y:-100},
{x:350,y:-50},
{x:600,y:100},
{x:800,y:0},
{x:window.innerWidth,y:-250}
]
};
const tween = new TimelineLite();
tween.add(
TweenLite.to(".paper-plane",1,{
bezier:flightPath,
ease:Power1.easeInOut
})
);
const controller=new ScrollMagic.Controller();
const scene=new ScrollMagic.Scene({
triggerElement:".animation",
duration:3000,
triggerHook:0
})
.setTween(tween)
.addIndicators()
.setPin(".animation")
.addTo(controller);