-
Notifications
You must be signed in to change notification settings - Fork 58
/
index.html
98 lines (91 loc) · 4.07 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
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
<!DOCTYPE html>
<html style="-webkit-overflow-scrolling: touch;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Rotate HTML elements by mouse in JavaScript - Propeller.js</title>
<meta name="viewport" content="width=device-width, target-densitydpi=device-dpi">
<link rel="stylesheet" href="example/css/normalize.css">
<link rel="stylesheet" href="example/css/turbine.css">
</head>
<body>
<img src="example/img/turbineforthumbs.jpg" width="0px" height="0px">
<img id="turbine" src="example/img/turbine.png" onmousedown="showLibraryInfo()" ontouchstart="showLibraryInfo()">
<div class="content">
<h1 class="propeller">
Propeller.js
</h1>
<h1 class="title wind">
Wind energy facts
</h1>
<ul class="facts">
<li class="wind">Wind mills have been in use since 2000 B.C. and were first developed in China and Persia</li>
<li class="wind">There’s enough on-shore wind in America to power the country 10 times over</li>
<li class="wind">Google has invested $5 billion in a new underwater transmission line to connect offshore wind
farms in the Atlantic Ocean with 1.9 million households on the East Coast.
</li>
<li class="propeller">JavaScript library to rotate elements by mouse or touch gestures.</li>
<li class="propeller">Easy-to-use as jQuery
plugin:<br><strong>$(nodeOrSelector).propeller(options);</strong><br/> <br> or zero-dependancy library <br>
<strong>new Propeller(nodeOrSelector,
options)</strong></li>
<li class="propeller">Propeller uses requestAnimationFrame and GPU compositing for better performance. It is
also compatible with touch devices.
</li>
</ul>
<a class="propeller" href="./example/jquerygrid.html">More examples</a>
<a class="propeller"
href="http://pixelscommander.com/en/javascript/rotate-html-elements-with-mouse/">Documentation</a>
<a class="propeller" href="https://github.com/PixelsCommander/Propeller/archive/master.zip">Download</a>
<a class="propeller" href="https://github.com/PixelsCommander/Propeller">GitHub</a>
<div class="social_stuff">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_tweet"></a>
<iframe style="display: inline-block;"
src="http://ghbtns.com/github-btn.html?user=PixelsCommander&repo=Propeller&type=watch"
allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe>
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar": true};</script>
<script type="text/javascript"
src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4ea2f9164143bcfb"></script>
<!-- AddThis Button END -->
</div>
</div>
<div class="arrow">
<img src="example/img/arrow.png">
<p>
Drag or swipe propeller
</p>
</div>
<script src="dist/propeller.min.js"></script>
<script>
new Propeller(document.getElementById('turbine'), {
inertia: 0.99,
onDragStop: function() {
console.log('stop');
},
onDragStart: function () {
console.log('start');
}
});
function showLibraryInfo() {
if (window.libInfoShown !== true) {
var windStuff = document.getElementsByClassName('wind');
var libStuff = document.getElementsByClassName('propeller');
for (var i = 0; i < windStuff.length; i++) {
var obj = windStuff[i];
obj.style.display = 'none';
}
for (var i = 0; i < libStuff.length; i++) {
var obj = libStuff[i];
obj.style.display = 'inline-block';
}
window.libInfoShown = true;
}
}
</script>
</body>
</html>