-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
53 lines (43 loc) · 905 Bytes
/
index.html
File metadata and controls
53 lines (43 loc) · 905 Bytes
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
<html>
<head>
<title>John Akers | Crypt</title>
<script src="https://cdn.jsdelivr.net/npm/p5@1.4.0/lib/p5.js"></script>
<style>
html,
body {
/* background-color: #333; */
margin: 0;
padding: 0;
}
#rooms{
height: 100vh;
position: fixed;
right: 10;
top: 10;
}
</style>
</head>
<body>
<div id="rooms">
</div>
<script src="./js/Room.js"></script>
<script src="./js/Floor.js"></script>
<script>
// main
const floor = new Floor({
size: 3,
doorCreationChance: 0.5
});
floor.build();
console.log(floor)
// --- p5js ---
function setup() {
createCanvas(window.innerWidth, window.innerHeight);
}
function draw() {
background(50);
floor.draw();
}
</script>
</body>
</html>