-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
240 lines (206 loc) · 11.3 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE HTML>
<html itemscope itemtype="http://schema.org/Article">
<!--
Copyright 2013 Manfred Hantschel
This file is part of xkcd Time Catapult.
xkcd Time Catapult is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
xkcd Time Catapult is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with xkcd Time Catapult. If not, see <http://www.gnu.org/licenses/>.
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="Bullet physics simulation of a sand Catapult for the xkcd Time Cartoon implemented in JavaScript" />
<meta name="google" content="notranslate" />
<meta itemprop="name" content="xkcd Time Catapult">
<meta itemprop="description" content="Bullet physics simulation of a sand Catapult for the xkcd Time Cartoon implemented in JavaScript">
<meta itemprop="image" content="http://thred.github.com/xkcd-time-catapult/logo.png">
<meta name="og:title" content="xkcd Time Catapult" />
<meta name="og:type" content="game" />
<meta name="og:image" content="http://thred.github.com/xkcd-time-catapult/logo.png" />
<meta name="og:url" content="http://thred.github.com/xkcd-time-catapult/" />
<meta name="og:site_name" content="xkcd Time Catapult" />
<meta property="fb:admins" content="100005515154298" />
<title>xkcd Time Catapult</title>
<link href="asset/time.css" rel="stylesheet" type="text/css"></link>
<link href="http://thred.github.io/xkcd-time-catapult/" rel="canonical"></link>
<script data-main="script/time" src="script/require.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="box">
<div class="main" style="float: right">
Version 1.6<br/>
<sub>2013-05-06</sub>
</div>
<h1><span style="font-variant: normal;">xkcd</span> Time Catapult</h1>
<div class="main">
A physics simulation of a <a href="http://en.wikipedia.org/wiki/Trebuchet" target="_blank">trebuchet</a> based
on the <a href="http://xkcd.com/1190/" target="_blank">"Time" comic</a> at xkcd.
</div>
<div id="sniffer" class="main">
<div class="g-plusone" data-size="medium" data-width="450"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<div class="fb-like" data-href="http://thred.github.com/xkcd-time-catapult/" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>
<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-39745817-1', 'github.io');
ga('send', 'pageview');
</script>
</div>
</div>
<div class="box">
<div id="content" class="main">
<div id="placeholder">
<span id="loading">Loading...</span>
</div>
</div>
<div id="navigation" class="main">
<a class="button" href="javascript:require('Global').BUTTONS.reload.click();" title="Reload"><img id="reload-button" src="asset/button.png" alt="Reload"/></a>
<a class="button" href="javascript:require('Global').BUTTONS.speed.click();" title="Speed"><img id="speed-button" src="asset/button.png" alt="Speed"/></a>
<br/>
<a class="button" href="javascript:require('Global').BUTTONS.gravity.click();" title="Gravity and Atmosphere"><img id="gravity-button" src="asset/button.png" alt="Gravity and Atmosphere"/></a>
<a class="button" href="javascript:require('Global').BUTTONS.particle.click();" title="Partcle Material"><img id="particle-button" src="asset/button.png" alt="Partcle Material"/></a>
<a class="button" href="javascript:require('Global').BUTTONS.boulderSize.click();" title="Boulder Size"><img id="boulder-size-button" src="asset/button.png" alt="Boulder Size"/></a>
<a class="button" href="javascript:require('Global').BUTTONS.boulderCount.click();" title="Boulder Count"><img id="boulder-count-button" src="asset/button.png" alt="Boulder Count"/></a>
<table class="statistics small-table">
<tbody>
<tr>
<th style="width: 5em;">Planet:</th>
<td><span id="planet"></span></td>
</tr>
<tr>
<th style="width: 5em;">Granulate:</th>
<td><span id="material">Bouncy Sand</span></td>
</tr>
<tr>
<th style="width: 5em;">FPS:</th>
<td><span id="fps">0</span></td>
</tr>
</tbody>
</table>
<div class="statistics">
<input type="checkbox" name="debug" id="draw-compactness-checkbox" value="draw-compactness" onchange="require('Main').checkboxChanged(this)" /><label for="draw-compactness-checkbox">Show Density</label><br/>
<input type="checkbox" name="debug" id="draw-movement-checkbox" value="draw-movement" onchange="require('Main').checkboxChanged(this)" /><label for="draw-movement-checkbox">Show Movement</label><br/>
<input type="checkbox" name="debug" id="draw-projections-checkbox" value="draw-projections" onchange="require('Main').checkboxChanged(this)" /><label for="draw-projections-checkbox">Show Projections</label><br/>
<input type="checkbox" name="debug" id="collapsing-checkbox" value="draw-projections" checked="true" onchange="require('Main').checkboxChanged(this)" /><label for="collapsing-checkbox">Collapsing</label><br/>
</div>
</div>
<table class="statistics main" style="clear: both;">
<tbody>
<tr>
<th>Particle Count:</th>
<td style="width: 4em;"><span id="particles">0</span></td>
<th>Launch Mass:</th>
<td style="width: 7em;"><span id="launchMass">0.0</span> <span class="unit">kg</span></td>
<th>max. Velocity:</th>
<td style="width: 7em;"><span id="maxVelocity">0.0</span> <span class="unit">m/s</span></td>
<th>Size of Pixel:</th>
<td style="width: 7em;"><span id="size_of_pixel">0.00</span> <span class="unit">cm</span></td>
<th>g:</th>
<td style="width: 7em;"><span id="g">0.00</span> <span class="unit">m/s²</span></td>
<th>Density:</th>
<td style="width: 7em;"><span id="particle_density">0</span> <span class="unit">kg/m³</span></td>
<th>Absorbsion:</th>
<td style="width: 7em;"><span id="particle_absorbsion">0</span> <span class="unit">%</span></td>
</tr>
<tr>
<th>Pending Particles:</th>
<td style="width: 4em;"><span id="pendingParticles">0</span></td>
<th>Moving Mass:</th>
<td style="width: 7em;"><span id="movingMass">0.0</span> <span class="unit">kg</span></td>
<th></th>
<td style="width: 7em;"></td>
<th>Mass/Pixel:</th>
<td style="width: 7em;"><span id="mass_per_pixel">0.00</span> <span class="unit">kg</span></td>
<th>Medium:</th>
<td style="width: 7em;"><span id="densityAtmosphere">0.00</span> <span class="unit">kg/m³</span></td>
<th>Friction:</th>
<td style="width: 7em;"><span id="particle_friction">0.00</span> <span class="unit">µ<sub>s</sub></span></td>
<th>Bouncyness:</th>
<td style="width: 7em;"><span id="particle_bouncyness">0</span> <span class="unit">%</span></td>
</tr>
</tbody>
</table>
<div id="message" class="main"></div>
</div>
<div class="box">
<h2>Links</h2>
<div id="links" class="main">
<ul>
<li>The comic <a href="http://xkcd.com/1190/" target="_blank">"Time" (#1190) at xkcd</a>.</li>
<li>The reference at the <a href="http://www.explainxkcd.com/wiki/index.php?title=1190" target="_blank">Explain xkcd Wiki</a>.</li>
<li>A wiki dedicated to this particular comic at <a href="http://xkcd-time.wikia.com/wiki/XKCD_Time_Wiki" target="_blank">xkcd-time.wikia.com</a>.</li>
<li>Navigable versions of the comic:</li>
<ul>
<li>at <a href="http://xkcd.aubronwood.com/" target="_blank">xkcd.aubronwood.com</a></li>
<li>at <a href="http://richardwestenra.com/xkcds-time-animated-time-lapse/" target="_blank">richardwestenra.com/xkcds-time-animated-time-lapse/</a></li>
<li>at <a href="http://geekwagon.net/projects/xkcd1190/" target="_blank">geekwagon.net/projects/xkcd1190/</a> (code also on GitHub)</li>
</ul>
<li>Hosted on <a href="https://github.com/thred/xkcd-time-catapult">GitHub</a>.</li>
</ul>
</div>
<h2>Awards</h2>
<div id="awards" class="main">
<ul>
<li>Jeff - This is awesome. I love the internet.<sup>[<a href="http://www.explainxkcd.com/wiki/index.php?title=1190" target="_blank">ref</a>]</sup></li>
</ul>
</div>
</div>
<div class="box">
<a href="https://github.com/thred/xkcd-time-catapult" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
<h2>Changelog</h2>
<div id="changelog" class="main">
<ul>
<li>1.6 - Optimized rendering</li>
<li>1.5 - Added planets and materials, activated collapsing</li>
<li>1.4 - Added visual sugar, physics now use real world values</li>
<li>1.3 - Integrated RequireJS, splitted into multiple files</li>
<li>1.2 - Fixed physics and speeding issues, added buttons</li>
<li>1.1 - Updated layout, some fixes</li>
<li>1.0 - Initial version, basic physics</li>
</ul>
</div>
<h2>Legal</h2>
<div id="legal" class="main">
<p>
<a href="http://www.gnu.org/" target="_blank"><img src="http://www.gnu.org/graphics/gplv3-88x31.png" alt="GPL V3 Logo"/></a>
xkcd Time Catapult is free software: you can redistribute it and/or modify
it under the terms of the <a href="http://www.gnu.org/" target="_blank">GNU General Public License</a>.
</p>
<p>
<a href="http://creativecommons.org/licenses/by-nc/2.5/" target="_blank"><img src="http://creativecommons.org/images/public/somerights20.png" alt="Creative Commons Attribution-NonCommercial 2.5 License"/></a>
The images are from <a href="http://xkcd.com/1190/" target="_blank">http://xkcd.com/1190/</a> licensed under a <a href="http://creativecommons.org/licenses/by-nc/2.5/" target="_blank">Creative Commons Attribution-NonCommercial 2.5 License</a>.
</p>
<p>
Copyright © Manfred Hantschel 2013
</p>
</div>
</div>
</body>
</html>