-
Notifications
You must be signed in to change notification settings - Fork 682
/
Copy pathwebgl-same-code-canvas-partscreen.html
56 lines (54 loc) · 1.36 KB
/
webgl-same-code-canvas-partscreen.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
<!-- Licensed under a BSD license. See license.html for license -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>WebGL - Same Code - Canvas Partscreen</title>
<style>
html {
box-sizing: border-box;
height: 100%;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
margin: 0;
width: 100%;
height: 100%;
}
#canvas {
display: block;
width: 70%;
height: 100%;
}
#controls {
background-color:#666;
color: white;
padding: 0.5em;
position: absolute;
right: 0;
top: 0;
width: 30%;
height: 100%;
font-size: large;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<div id="controls">Controls<br/>for<br/>an<br/>Editor<br/>would<br/>go<br/>here</div>
</body>
<!--
for most samples webgl-utils only provides shader compiling/linking and
canvas resizing because why clutter the examples with code that's the same in every sample.
See https://webglfundamentals.org/webgl/lessons/webgl-boilerplate.html
and https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html
for webgl-utils, m3, m4, and webgl-lessons-ui.
-->
<script src="resources/webgl-utils.js"></script>
<script src="resources/m4.js"></script>
<script src="resources/primitives.js"></script>
<script src="resources/same-code.js"></script>
</html>