-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtile.html
More file actions
47 lines (41 loc) · 1.16 KB
/
Copy pathtile.html
File metadata and controls
47 lines (41 loc) · 1.16 KB
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
<!DOCTYPE html>
<head>
<title>Crowd Rects</title>
<style type="text/css">@import "rectdraw.css";</style>
<script type="text/javascript" src="rectdraw.js"></script>
<script>
var args = window.location.href.slice(window.location.href.indexOf('?') + 1);
var urlvars = getUrlVars(args);
var tx = urlvars['tx'];
var ty = urlvars['ty'];
var layer = urlvars['layer'];
var itype = urlvars['itype'];
var filename = ty+'-'+tx+layer;
function getUrlVars(args)
{
var vars = [], hash;
var hashes = args.split('&');
for(var i = 0; i < hashes.length; i++){
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
</script>
</head>
<body onload="setup(filename);">
<p class="title">Crowd Source</p>
<div class="frame" id="frame">
<div class="chip">
<script>
document.write('<img width=700 height=550 src="tiles/' + ty+'-'+tx+itype + '.png">\n');
</script>
<canvas class="chip" id="rectlayer"></canvas>
<canvas class="chip" id="mouselayer"></canvas>
<canvas class="chip" id="hitbuffer"></canvas>
</div>
<button class="chip" onclick="javascript:submit(filename)">Submit</button>
</div>
</body>
</html>