forked from JVerdret/pwew-pwew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
81 lines (68 loc) · 1.59 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
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Pwew Pwew</title>
<style>
body {
background: #000000;
}
#container {
margin : auto;
border: 1px solid white;
background: #000000;
}
#player1 {
margin : auto;
text-align: center;
}
.life {
color:white;
}
</style>
</head>
<body>
<div id="container"></div>
<div id="player1">
<strong>Joueur 1</strong>
<span class="life">3</span> vies
</div>
</body>
<script src="js/three.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/OrbitControls.js"></script>
<script src="js/THREEx.KeyboardState.js"></script>
<script src="game/player.js"></script>
<script src="game/graphic.js"></script>
<script src="game/physic.js"></script>
<script src="game/shoot.js"></script>
<script type="text/javascript">
var container, scene, camera, renderer, controls, stats;
var keyboard = new THREEx.KeyboardState();
var clock = new THREE.Clock();
var player1,
player2;
var WIDTH = 600,
HEIGHT = 400;
init();
animate();
function animate()
{
requestAnimationFrame(animate);
render();
update();
player1.displayInfo();
shoot();
collisions();
}
function render()
{
renderer.render(scene, camera);
}
$(document).ready(function() {
$('#container')
.css('width', WIDTH)
.css('height', HEIGHT)
;
});
</script>
</html>