forked from heartcode/CanvasLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
heartcode-canvasloader.html
138 lines (131 loc) · 4.1 KB
/
heartcode-canvasloader.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2011 Róbert Pataki
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
comyCles of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all comyCles or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
----------------------------------------------------------------------------------------
Check out my GitHub: http://github.com/heartcode/
Send me an email: [email protected]
Follow me on Twitter: http://twitter.com/#iHeartcode
Blog: http://heartcode.robertpataki.com
-->
<title>Heartcode CanvasLoader test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script src="js/heartcode-canvasloader-min.js"></script>
<style>
body, html {
margin:0;
padding:0;
}
.wrapper {
width:600px;
height:100%;
margin:50px auto 50px auto;
}
.loader {
position:relative;
left:50%;
}
</style>
</head>
<body>
<div class='wrapper'>
<fieldset>
<legend>Spiral</legend>
<div id='cl_spiral' class="loader" style="margin-left:-10px;">
<script>
var cl0 = new CanvasLoader("cl_spiral", {id: "canvasLoader", safeVML: true});
cl0.setShape("spiral");
cl0.setDiameter(20);
cl0.setDensity(40);
cl0.setSpeed(4);
cl0.setFPS(24);
cl0.setDensity(400);
cl0.setSpeed(4);
cl0.setFPS(12);
cl0.show();
</script>
</div>
</fieldset>
<fieldset>
<legend>Oval</legend>
<div id='cl_oval' class="loader" style="margin-left:-5px;">
<script>
var cl1 = new CanvasLoader("cl_oval", {id: "canvasLoader", safeVML: true});
cl1.setShape("oval");
cl1.setDiameter(10);
cl1.setDensity(80);
cl1.setSpeed(2);
cl1.setFPS(36);
cl1.setFPS(12);
cl1.setRange(0.95);
cl1.show();
</script>
</div>
</fieldset>
<fieldset>
<legend>Square</legend>
<div id='cl_square' class="loader" style="margin-left:-10px;">
<script>
var cl2 = new CanvasLoader("cl_square", {id: "canvasLoader", safeVML: true});
cl2.setShape("square");
cl2.setDiameter(20);
cl2.setDensity(40);
cl2.setSpeed(2);
cl2.setFPS(12);
cl2.setRange(0.95);
cl2.show();
</script>
</div>
</fieldset>
<fieldset>
<legend>Rectangle</legend>
<div id='cl_rect' class="loader" style="margin-left:-9px;">
<script>
var cl3 = new CanvasLoader("cl_rect", {id: "canvasLoader", safeVML: true});
cl3.setShape("rect");
cl3.setDiameter(20);
cl3.setDensity(12);
cl3.setSpeed(1);
cl3.setFPS(2);
cl3.setRange(0.95);
cl3.show();
</script>
</div>
</fieldset>
<fieldset>
<legend>Rounded rectangle</legend>
<div id='cl_roundRect' class="loader" style="margin-left:-20px;">
<script>
var cl4 = new CanvasLoader("cl_roundRect", {id: "canvasLoader", safeVML: true});
cl4.setShape("roundRect");
cl4.setDiameter(40);
cl4.setDensity(12);
cl4.setSpeed(1);
cl4.setFPS(2);
cl4.setRange(0.95);
cl4.show();
</script>
</div>
</fieldset>
</div>
</body>
</html>