-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.html
executable file
·125 lines (113 loc) · 3.18 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
121
122
123
124
125
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>.: Head controlled Pacman :.</title>
<link rel="icon" href="pacmanIcon.png" />
<style type="text/css">
body {
background-color: #2A2A2A;
color: white;
margin: 0px;
width: 100vw;
font-family:sans-serif;
}
@font-face {
font-family: 'BDCartoonShoutRegular';
src: url('BD_Cartoon_Shout-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.content {
margin-left: auto;
margin-right: auto;
width: 1024px;
text-align: center;
background-color: black;
padding-bottom: 32px;
padding-top: 16px;
}
.laius {
display: block;
width: 300px;
height: 300px;
float: left;
text-align: justify;
line-height: 2em;
margin-left: 32px;
margin-top: 64px;
}
.laius p {
margin-right: 16px;
}
.laius a {
color: yellow;
text-decoration: none
}
.laius a:hover {
color: white;
}
#pacman {
height:450px;
width:342px;
display: inline-block;
}
#shim {
font-family: BDCartoonShoutRegular;
position:absolute;
visibility:hidden
}
h1 { font-family: BDCartoonShoutRegular; text-align:center; color: white; }
a { text-decoration:none; }
#headControlsCanvas{
display: block;
float: right;
width: 300px !important;
margin-right: 32px;
margin-top: 64px;
}
#start {
width: 300px;
padding: 8px;
font-size: 32pt;
cursor: pointer;
font-family: BDCartoonShoutRegular;
background-color: red;
border-color: red;
color: white;
display: none;
}
</style>
<!-- modified pacman -->
<script src="pacman.js"></script>
<script src="modernizr-1.5.min.js"></script>
<!-- JEELIZ FACE FILTER API (required by HeadControls.js) : -->
<script src="../../dist/jeelizFaceFilter.js"></script>
<!-- HEAD CONTROLLER : -->
<script src="../../helpers/HeadControls.js"></script>
<!-- INCLUDE FORK ME ON GITHUB BANNER -->
<script type="text/javascript" src="../appearance/widget.js"></script>
<!-- main script : -->
<script src="main.js"></script>
</head>
<body onload='main()'>
<div id="shim">shim for font face</div>
<div class='content'>
<h1>Head controlled Pacman</h1>
<div class='laius'>
<p>
Your face orientation is detected with <a href='https://github.com/jeeliz/jeelizFaceFilter' target='_blank'>Jeeliz Facefilter API</a>. It detects and tracks the face using a deep learning neural network running on your GPU thanks to WebGL.
</p>
<p>
The Pacman game comes from <a href='https://github.com/daleharvey/pacman' target='_blank'>This Github repository</a>
</p>
<p>
<input id='disableGhosts' type='checkbox' />Disable ghosts (for testing purpose)
</p>
</div>
<div id="pacman"></div>
<canvas id='headControlsCanvas' width='512' height='512'></canvas>
<button id='start'>START</button>
</div>
</body>
</html>