This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
blocks_3.html
86 lines (69 loc) · 3.97 KB
/
blocks_3.html
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
<!DOCTYPE html>
<html >
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.css" />
<link rel="stylesheet" href="./css/blocks.css">
</head>
<body>
<div ng-app="AnimationChainsApp" ng-controller="AnimationController">
<gs-timeline id="main">
<gs-timeline id="purple" target="div.block.purple" >
<gs-step target="#btnReset" style="opacity:0" ></gs-step>
<gs-step style="autoAlpha:1, scale:1, rotation:0, x:0" ></gs-step>
<gs-step style="rotation:0" ></gs-step>
<gs-step style="repeat:1,yoyo:true,x:400,ease:'Bounce.easeOut'" duration="1.0" ></gs-step>
<gs-step style="delay:0.03, rotation:180" duration="1.0" ></gs-step>
<gs-step style="delay:0.03, scaleX:2, x:50" duration="1.0" ></gs-step>
<gs-step style="delay:0.03, autoAlpha:0.2,scaleX:1,scaleY:0.5;" duration="1.0" ></gs-step>
<gs-step target="#btnReset" style="opacity:1" duration="1.0" ></gs-step>
</gs-timeline>
<gs-timeline id="orange" target="div.block.orange" position="1.0">
<gs-step target="#btnReset" style="opacity:0" ></gs-step>
<gs-step style="autoAlpha:1, scale:1, rotation:0, x:0" ></gs-step>
<gs-step style="rotation:0" ></gs-step>
<gs-step style="repeat:1, yoyo:true, x:400" duration="1.0" ></gs-step>
<gs-step style="delay:0.03, rotation:180" duration="1.0" ></gs-step>
<gs-step style="delay:0.03, scaleX:2, x:50" duration="1.0" ></gs-step>
<gs-step style="delay:0.03, autoAlpha:0.2, scaleX:1, scaleY:0.5" duration="1.0" ></gs-step>
</gs-timeline>
</gs-timeline>
<button class="btn btn-default" ng-click="animate()" ng-disabled="animating">
Start Animations
</button>
<button id="btnReset" class="btn btn-default" ng-click="reset()" >
Reset
</button>
<span style="padding-left:30px;">Duration = {{ elapsedTime }} msecs.</span>
<hr />
<status-table progress="progress.main"></status-table>
<div class="block purple"></div>
<div class="block orange"></div>
<hr />
<p>
This Demo #3 Animation uses a the new AngularJS-GSAP DSL and $timeline() service.<br/>
<br/>
The controller uses `$timeline()` to lookup the animation, register callbacks and<br/>
<br/>
Pro: Animation details are specified in the HTML layer as markup [AngularJS directives]<br/>
Pro: Databinding is used to update the status-table details<br/>
Pro: Application directives know nothing about animations<br/>
Pro: Application Services know nothing about animations<br/>
Pro: ngAnimate is not required<br/>
Pro: Sophisticated choreographies are easily supported and maintained in HTML/UI layers<br/>
<br/>
Con: DSL needs hooks into ngAnimate enter, leave activities... still missing<br/>
<br/>
</p>
</div>
<!-- vendor -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.15.0/TweenMax.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
<!-- app -->
<script type="text/javascript" src="../libs/angularjs-gsap/supplant.js"></script>
<script type="text/javascript" src="../libs/angularjs-gsap/timelines.js"></script>
<script type="text/javascript" src="./js/blocks_3.js"></script>
<script type="text/javascript" src="./js/statusTable.js"></script>
</body>
</html>