cg1-visualisations/src/index.html

72 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CG1 MDI</title>
<script src="matrix-math.js"></script>
<script src="shader.js"></script>
<script src="script.js"></script>
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-color: #1e1e2e;
color: #cdd6f4;
font-family: monospace;
font-size: 20px;
gap: 20px;
}
#cv {
border: solid 2px #11111b;
border-radius: 20px;
}
#content {
width: 100%;
max-width: 800px;
box-sizing: border-box;
padding: 20px;
border: solid 2px #11111b;
border-radius: 20px;
background-color: #181825;
}
</style>
</head>
<body>
<canvas id="cv" width="1000" height="700"></canvas>
<div id="content">
Stats:
<ul>
<li>FPS: <span id="fps"></span></li>
<li>Frame time: <span id="ms"></span></li>
</ul>
Controls:
<ul>
<li>
Click & Drag to move camera
</li>
<li>
Scroll to zoom
</li>
<li>
LookAt Matrix: <input type="range" min=0 max=1 step=0.01 value=0 id="interpolateLookAt" autocomplete="off">
</li>
<li>
Projection Matrix: <input type="range" min=0 max=1 step=0.01 value=0 id="interpolateProjection" autocomplete="off" disabled="yes">
</li>
<li>
Use virtual camera: <input type="checkbox" id="displayMatricesVirtually" checked autocomplete="off">
</li>
<li>
Backface Culling: <input type="checkbox" id="backfaceCulling" autocomplete="off">
</li>
</ul>
</div>
</body>
</html>