-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·187 lines (131 loc) · 4.4 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
---
layout: default
title: home
---
<div class="content">
<div id="about">
<p>
My name is <span class="bold">Eberhard Gräther</span>.
</p>
<p>
I'm founder and developer at <a href="http://coati.io">Coati Software</a> working on <a href="http://sourcetrail.com">Sourcetrail</a>, a visual source explorer for C, C++ and Java.
</p>
<p>
This page contains earlier projects of mine developed during my undergraduate degree
in <a href="http://multimediatechnology.at/in-english/">MultiMediaTechnology</a>
at <a href="http://www.fh-salzburg.ac.at/en/">Salzburg University of Applied Sciences</a>,
where I majored in games.
</p>
</div>
<div id="contact">
<p>Contact:</p>
<ul>
<li>mail: <a href="mailto:mail@egraether.com">mail@egraether.com</a></li>
<li>twitter: <a href="http://twitter.com/#!/egraether">@egraether</a></li>
<li>github: <a href="http://github.com/egraether/">egraether</a></li>
<li>project euler: <a href="http://projecteuler.net/profile/egraether.png">egraether</a></li>
</ul>
</div>
<div class="clear"></div>
</div>
<div class="line"></div>
<div class="content">
<h2>Games</h2>
<ul class="left">
{% for post in site.posts %}
{% if post.type == "game" %}
<li class="project">
<a name="{{ post.name }}" href="{{ post.titlelink }}">
<div class="projectTitle" style="background-image: url(/images/{{ post.name }}_pic.png)">
<div class="left">{{ post.title }}</div>
{% if post.note %}
<div class="right workInProgress">[{{ post.note }}]</div>
{% endif %}
<div class="clear projectLanguage">{ {{ post.language }} }</div>
</div>
</a>
<div class="projectContent">
{{ post.content }}
</div>
</li>
{% endif %}
{% if forloop.index == 7 %}
</ul><ul class="left">
{% endif %}
{% endfor %}
</ul>
<div class="clear"></div>
</div>
<div id="container"></div>
<div class="line"></div>
<div class="content">
<h2>Demos</h2>
<ul class="left">
{% for post in site.posts %}
{% if post.type == "demo" %}
<li class="project">
<a name="{{ post.name }}" href="{{ post.titlelink }}">
<div class="projectTitle" style="background-image: url(/images/{{ post.name }}_pic.png)">
<div>{{ post.title }}</div>
<div class="projectLanguage">{ {{ post.language }} }</div>
</div>
</a>
<div class="projectContent">
{{ post.content }}
</div>
</li>
{% endif %}
{% if forloop.index == 4 %}
</ul><ul class="left">
{% endif %}
{% endfor %}
</ul>
<div class="clear"></div>
</div>
<script type="text/javascript" charset="utf-8" src="demos/lib/requestAnimationFrame.js"></script>
<script type="text/javascript" charset="utf-8" src="demos/life/GameOfLife.js"></script>
<script type="text/javascript" charset="utf-8">
var life, time = 0;
function run() {
setTimeout( function() {
requestAnimationFrame( run );
}, 100 );
life.update();
};
function start() {
life.reset();
life.random( 0.08 );
}
window.onload = function() {
var container = document.getElementById( "container" );
life = new GameOfLife( container );
if ( !life ) {
return;
}
window.onresize = function() {
life.setCanvasSize( container.clientWidth, container.clientHeight );
start();
}
life.getCanvas().onmouseup = function(event) {
var newTime = new Date().getTime(),
diffTime = newTime - time;
if ( diffTime < 200 ) {
window.location = "demos/life/index.html"
} else {
start();
}
time = newTime;
}
life.drawCell = function( context, x, y, size, isLife ) {
var s = size * ( isLife ? 1 : 0.9 ),
t = ( size - s ) / 2;
context.fillRect( x * size + t, y * size + t, s, s );
};
life.setCellSize( 4 );
life.setLifeColor( 110, 174, 13 );
life.setDeathColor( 220, 255, 150 );
life.setClearColor( 255, 255, 255 );
start();
run();
};
</script>