-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·41 lines (37 loc) · 1.28 KB
/
index.html
File metadata and controls
executable file
·41 lines (37 loc) · 1.28 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
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>wheel of foodtune</title>
<script src="src/phaser.js"></script>
<script src="src/wheel.js"></script>
</head>
<body>
<script type="text/javascript">
window.onload = function() {
function getSearchParameters() {
var prmstr = window.location.search.substr(1);
prmstr = decodeURIComponent(prmstr);
return prmstr != null && prmstr != "" ? transformToAssocArray(prmstr) : {};
}
function transformToAssocArray( prmstr ) {
var params = {};
var prmarr = prmstr.split("&");
for ( var i = 0; i < prmarr.length; i++) {
var tmparr = prmarr[i].split("=");
params[tmparr[0]] = tmparr[1];
}
return params;
}
var params = getSearchParameters();
if (params.hasOwnProperty('speed')) {
var speed = params.speed;
delete(params.speed);
}
var wheel = Wheel(params);
wheel.setAcceleration(speed);
wheel.start();
};
</script>
</body>
</html>