forked from SapplyValues/SapplyValues.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
results.html
87 lines (74 loc) · 3.55 KB
/
results.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
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-99715444-7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-99715444-7');
</script>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:400,700" rel="stylesheet">
<link href='style.css' rel='stylesheet' type='text/css'>
<title>SapplyValues Results</title>
<link rel="icon" type="x-icon" href="icon.png">
<link rel="shortcut icon" type="x-icon" href="icon.png">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1 class="title">SapplyValues</h1>
<svg id="svgHeader" style="width: 100%;" viewBox="0 0 112 19">
<text x="50%" y="15" class="svgHeader">SapplyValues</text>
</svg>
<hr>
<h1 class="title">Results</h1></br>
<p style="text-align:center;margin:-2px auto">If you like this site, <a href="https://ko-fi.com/sunkdatadiver">consider chucking me a few bucks</a> :)))</p></br>
<svg id="svgHeader" style="width: 100%;" viewBox="0 0 112 19">
<text x="50%" y="15" class="svgHeader">Results</text>
</svg>
<img src="" id="banner"></canvas></br>
<p style="text-align:center;margin:-2px auto">Hint: you can download this image directly. No need to screenshot!</p></br>
<button class="button" onclick="location.href='index.html';" style="background-color: #2196f3;">Back</button> <br>
<script>
const urlParams = new URLSearchParams(window.location.search);
x_axis = parseFloat(urlParams.get("right"))
y_axis = parseFloat(urlParams.get("auth"))
z_axis = parseFloat(urlParams.get("prog"))
window.onload = function() {
var background = new Image();
background.onload = function() {
var c = document.createElement("canvas");
c.width = 1850;
c.height = 1600;
var ctx = c.getContext("2d");
ctx.fillStyle = "#EEEEEE"
ctx.fillRect(0, 0, 1850, 1600);
ctx.drawImage(background, 0, 0);
var dot = c.getContext("2d");
dot.beginPath();
dot.arc(200 + (1000 * (x_axis+10)/20), 1150 - (1000 * (y_axis + 10)/20), 25, 0, 2 * Math.PI);
dot.fillStyle = 'red';
dot.fill();
dot.stroke();
var line = c.getContext("2d");
line.beginPath();
line.moveTo(1500, 1145 - (1000 * (z_axis + 10)/20));
line.lineTo(1650, 1145 - (1000 * (z_axis + 10)/20));
line.lineWidth = 10;
line.strokeStyle = "red";
line.stroke();
ctx.font="50px Montserrat"
ctx.textAlign="center"
ctx.fillStyle="#222222"
ctx.fillText("Left / Right Axis (x): " + x_axis, 725, 1375)
ctx.fillText("Auth / Lib Axis (y): " + y_axis, 725, 1450)
ctx.fillText("Prog / Con Axis (z): " + z_axis, 725, 1525)
ctx.textAlign="right"
ctx.font="60px Montserrat"
ctx.fillText("SapplyValues.github.io", 1820, 1560)
document.getElementById("banner").src = c.toDataURL();
}
background.src = "./compass.png";
}
</script>
</body>