-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
122 lines (96 loc) · 2.53 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Flick</title>
<style>
html, body {
width: 100%;
height: 100%;
}
body {
background-color: #ffffff;
margin: 0;
overflow: hidden;
font-family: arial;
}
#blocker {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
#instructions {
width: 100%;
height: 100%;
top: 50%;
left: 50%;
position: absolute;
margin-left: -50%;
color: #ffffff;
text-align: center;
cursor: pointer;
}
.centered {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
min-height: 100vh;
}
.helper {
display: inline-block;
height: 50%;
vertical-align: middle;
}
div img {
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
margin:auto;
vertical-align: middle;
margin-top:40vh;
}
#container {
position: relative;
text-align: center;
}
#hud {
bottom: 10px;
position: absolute;
right: 10px;
z-index: 100;
}
</style>
</head>
<body>
<div id="container">
<img src="./images/reticle.png" alt="reticle">
</div>
<script src="http://threejs.org/build/three.min.js"></script>
<script src="http://threejs.org/examples/js/loaders/MTLLoader.js"></script>
<script src="http://threejs.org/examples/js/loaders/OBJLoader.js"></script>
<script src="http://threejs.org/build/three.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="http://threejs.org/examples/js/controls/PointerLockControls.js"></script>
<div id="blocker">
<div id="instructions">
<span style="font-size:40px">Click to play</span>
<br />
(CLICK = Shoot, ESC = Exit)
</div>
</div>
<script type="text/javascript" src="game.js"></script>
<div id="vertical" class="crosshair">
<div id="rectangle1" class="crosshairbar" style="width:20%; height:33.3%; top: -66.6%; left:-10%; "></div>
<div id="rectangle2" class="crosshairbar" style="width:20%; height:33.3%; top: 0; left:-10%"></div>
</div>
<div id="horiontal" class="crosshair">
<div id="rectangle3" class="crosshairbar" style="width:33.3%; height:20%; float: left; top: -10%; left: -66.6%"></div>
<div id="rectangle4" class="crosshairbar" style="width:33.3%; height:20%; float: right; top: -10%; right: 33.3%"></div>
</div>
</body>
</html>