-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.js
More file actions
34 lines (32 loc) · 1014 Bytes
/
main.js
File metadata and controls
34 lines (32 loc) · 1014 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
// add the new timeline by timeline.add(id_of_timeline , DOM element can be null, {framse} , options )
timeline.add("slide1",document.querySelector('.hello'),
{
// new frame should begin with f_ and the duration to exicut the frame exemple f_100
f_100 : function(){
// this frame will exicuted time = 100
this.$el.innerHTML ="Hi i'm frame 100 one";
},
f_1 : function(){
// this frame will exicuted at time = 1
this.$el.innerHTML ="Hi i'm frame 1 one";
}
},
{
complete : function(){
// On animation is completed
},
tick : function(){
// callback on each tick
},
step : function(){
// each step each translate to other frames
},
onrepeat : function(){
// On each repeat of timeline
// i fthe loop is loop
},
loop : 0,
fps : 20
}
);
timeline.play("slide1");