-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.html
More file actions
69 lines (69 loc) · 1.67 KB
/
index.html
File metadata and controls
69 lines (69 loc) · 1.67 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Lightboard</title>
<style type="text/css">
body {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
#container {
bottom: 0;
-webkit-box-pack: center;
-webkit-box-align: center;
display: -webkit-box;
left: 0;
position: absolute;
right: 0;
top: 0;
}
#canvases {
position: relative;
}
h1 {
color: #ccc;
font-size: 18px;
font-weight: 100;
left: 10px;
letter-spacing: 0.1em;
position: absolute;
top: -36px;
}
#video_canvas {
visibility: hidden;
}
#lightboard, #cursor {
border: 1px solid #ddd;
border-radius: 2px;
left: 0;
position: absolute;
top: 0;
}
</style>
</head>
<body>
<div id="container">
<div id="canvases">
<h1>Lightboard</h1>
<canvas id="video_canvas" width="640px" height="480px"></canvas>
<canvas id="lightboard" width="640px" height="480px"></canvas>
<canvas id="cursor" width="640px" height="480px"></canvas>
</div>
</div>
<script type="text/javascript" src="adapter.js"></script>
<script type="text/javascript" src="https://cdn.firebase.com/v0/firebase.js"></script>
<script type="text/javascript" src="Lightboard.js"></script>
<script type="text/javascript">
var lb_firebase = new Firebase(
"https://lightboard.firebaseIO.com");
var room = lb_firebase.child("hackmit");
var lightboard = new Lightboard();
// room.set({mode: "idle", color: "#000", size: 2});
room.on("value", function(data) {
var settings = data.val();
lightboard.mode = settings.mode;
lightboard.color = settings.color;
lightboard.size = settings.size;
});
</script>
</body>
</html>