-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (46 loc) · 1.26 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>WebGL Lab 1</title>
<script type="module" src="webgl-main.js"></script>
<style>
body {
margin: 0;
background-color: white;
}
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
align-items: center;
}
.grid-container > div {
text-align: center;
font-size: 10px;
}
#gl-canvas {
display: block;
width: 100vw;
height: 90vh;
outline: none;
grid-column-start: 1;
grid-column-end: 4;
}
button {
height: 5vh;
}
</style>
</head>
<body>
<div class="grid-container">
<canvas id="gl-canvas" tabindex="0"></canvas>
<button id="clear-canvas" type="button">Clear Canvas</button>
<div><input id="bg-color" type="color" value="#dfdfdf" /><label for="bg-color">Background Color</label></div>
<div><input id="sh-color" type="color" value="#000000" /><label for="sh-color">Shape Color</label></div>
<button id="point" type="button">Draw Point</button>
<button id="triangle" type="button">Draw Triangle</button>
<button id="circle" type="button">Draw Circle</button>
</div>
</body>
</html>