forked from robinduval/chocopops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
88 lines (77 loc) · 1.84 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
<!DOCTYPE html>
<html lang="fr">
<head>
<title>EPITA 2023 - SIGL</title>
<style>
body {
background: #000000;
}
#container {
margin : auto;
border: 1px solid white;
background: #000000;
}
#player1 {
margin : auto;
text-align: center;
}
#player2 {
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>
<div id="player2">
<strong>Joueur 2</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();
player2.displayInfo();
shoot();
collisions();
}
function render()
{
renderer.render(scene, camera);
}
$(document).ready(function() {
$('#container')
.css('width', WIDTH)
.css('height', HEIGHT)
;
});
</script>
</html>