forked from infoburp/webmona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
75 lines (75 loc) · 3.78 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>webmona</title>
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js" async defer></script>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js" async defer></script>
</head>
<body>
<canvas id="input-canvas" class='default-hidden'></canvas><br>
<canvas id="best-canvas" class='default-hidden'></canvas><br>
<canvas id="test-canvas" class='default-hidden'></canvas><br>
<div id='gallerydiv'><iframe src="gallery.html"></iframe></div>
<div id='minmaxdiv'>
<button id='minmax'>▲</button>
</div>
<div id='toolbox'>
<div id="social">
<a href="http://twitter.com/share" class="twitter-share-button"
data-url="http://infoburp.github.io/webmona/"
data-text="Evolve a match to an image from random polygons"
data-count="horizontal" data-via="29a_ch">Tweet</a>
<div class="fb-like" data-href="http://infoburp.github.io/webmona/" data-send="true" data-layout="button_count" data-width="145" data- show-faces="true" data-font="arial" data-colorscheme="light"></div>
<div class="g-plusone" data-size="medium"
data-href="http://infoburp.github.io/webmona/" data-count="true"></div>
<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><br>
<label>Upload image</label>
<input type='file' id='image-input' /><br>
<div id='top-button-container'>
<button id='b_new_random_image'>Random image from gallery</button><br>
<button id='b_upload_image'>Upload best match to imgur</button><br>
<button id='start'>▶ Start</button>
<button id='pause'>ll Pause</button><br><br></div><br>
Fitness <output id='fitness'></output><br><br>
Time elapsed <output id='time-elapsed'></output><br><br>
Mutations <output id='evolution-count'></output><br>
.Failed <output id='fail-total'></output><br>
.Succesful <output id='win-total'></output><br><br>
Win / fail ratio <output id='win-fail-ratio'></output><br><br>
Mutations/s <output id='evolutions-per-second'></output><br>
Average mutations/s <output id='average-evolutions-per-second'></output><br>
.Average fails per second <output id='fails-per-second'></output><br>
.Average wins per second <output id='wins-per-second'></output><br><br>
Consecutive failed mutations <output id='consecutive-failures'></output><br>
Consecutive successful mutations <output id='consecutive-wins'></output><br><br>
Most fails in a row <output id='fail-streak'></output><br>
Most wins in a row <output id='win-streak'></output><br><br>
<label for='num-polys'>Polygons</label>
<input id='num-polys' type='number' step='1' min='1' max='1000' value='64' /><br>
<label for='num-verts'>Vertices </label>
<input id='num-verts' type='number' step='1' min='3' max='30' value='3' /><br><br>
<div id='bottom-button-container'>
<textarea id='clipboard'></textarea><br>
<button id='b_export_dna'>Export DNA</button>
<button id='b_export_svg'>Export SVG</button>
<button id='b_import_dna'>Import DNA</button></div><br>
<input type="checkbox" id="auto_image_change" checked>Get new image when evolution slows down
</div>
<script type="text/javascript" src="webmona.js"></script>
</body>
</html>