-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·60 lines (53 loc) · 1.6 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Oscillate Wildly - Default Examples</title>
<style>
#switch {
list-style-type: none;
float: left;
margin-right: 1em;
padding-left: 0;
}
#switch li {
display: block;
}
.oscillate-wildly {
border: 1px solid black;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="oscillate-wildly.jquery.js"></script>
<script type="text/javascript">
$(window).ready(function() {
$("#switch a").each(function(i, a) {
a = $(a);
a.click(function(e) {
e.preventDefault();
var type = a.attr("href").replace(/#/, '');
var $sel = $(".oscillate-wildly");
$sel.each(function(i, sel) {
cancelAnimationFrame($(sel).attr("data-raf"));
});
$sel.OscillateWildly(type);
});
});
});
</script>
</head>
<body>
<h1>Oscillate Wildly</h1>
<p><strong>Default Examples</strong></p>
<ul id="switch">
<li><a href="#ellipse">Ellipse</a></li>
<li><a href="#rose">Rose</a></li>
<li><a href="#lissajous">Lissajous</a></li>
<li><a href="#vanderpol">Van der Pol</a></li>
<li><a href="#duffing">Duffing</a></li>
<li><a href="#lorenz">Lorenz</a></li>
<li><a href="#helix">Helix</a></li>
</ul>
<canvas class="oscillate-wildly" width="600" height="300"></canvas>
</body>
</html>