-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (89 loc) · 2.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Star Control 2/UQM resources map</title>
<style>
* {
margin: 0;
box-sizing: border-box;
}
#wrapper {
overflow: hidden;
width: 100vw;
height: 100vh;
touch-action: none;
}
#field {
transform-origin: top left;
display: block;
}
#card {
position: fixed;
top: 0;
left: 0;
display: none;
}
#readme {
font-family: sans-serif;
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
color: black;
padding: 10px;
border-radius: 5px;
pointer-events: none;
width: 30rem;
max-width: 100%;
}
#readme > * + * {
margin-top: 0.5rem;
}
#readme > h4 {
text-align: center;
}
#wrapper.readme #readme {
display: block;
}
#touch-pointer {
position: fixed;
width: 15px;
height: 15px;
border: 2px solid lightgray;
transform: rotate(45deg);
transform-origin: top left;
border-bottom-color: transparent;
border-right-color: transparent;
top: 0;
left: 0;
display: none;
}
</style>
<script type="module">
import './data.js'
import './field.js'
import './card.js'
import './index.js'
</script>
</head>
<body>
<div id="wrapper">
<canvas id="field"></canvas>
<canvas id="card"></canvas>
<div id="readme">
<h4>Star Control 2/UQM resources map</h4>
<p>
Drag to pan. Use the mouse wheel to zoom. Hover over a star to get a quick overview of the planets and moons in the star system.
</p>
<p>
There is one row per planet/moon. Every row stars with an icon which roughly depicts the planet's size and color, and if it's a moon the icon is off centered. Then a three digit figure describes the planetary environment - thermal, weather and tectonic hazards. Then is the total mineral value of the planet, followed by the value per unit of volume, or '+' for non-signle digit values. And the final figure shows the total amount of bio data for the planet.
</p>
</div>
<div id="touch-pointer"></div>
</div>
</body>
</html>