forked from jerome-wang/jerome-wang.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (33 loc) · 892 Bytes
/
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
---
layout: 2dball_index
title: Jerome's Blog
---
<script type="text/javascript">
init();
play();
function reset() {
var i;
var titleStr = "<span style='font-size:26px;'>Welcome to {{ page.title }}</span>";
if ( bodies ) {
for ( i = 0; i < bodies.length; i++ ) {
var body = bodies[ i ]
canvas.removeChild( body.GetUserData().element );
world.DestroyBody( body );
body = null;
}
}
// color theme
theme = themes[ Math.random() * themes.length >> 0 ];
document.body.style[ 'backgroundColor' ] = theme[ 0 ];
bodies = [];
elements = [];
createInstructions(titleStr);
{% for post in site.posts %}
titleStr = "<span style='font-size:26px;'>{{ post.date | date_to_string }} </br> <a href=\"{{ site.baseurl }}{{ post.url }}\">{{ post.title }}</a></span>";
createInstructions(titleStr);
{% endfor %}
for( i = 0; i < 10; i++ ) {
createBall();
}
}
</script>