60 lines
1.5 KiB
HTML
60 lines
1.5 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;
|
|
}
|
|
#stats {
|
|
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="stats">
|
|
<div>FPS: <span id="fps"></span></div>
|
|
<div>Frame time: <span id="ms"></span></div>
|
|
<div id="controls">
|
|
<div>
|
|
LookAt Matrix: <input type="range" min=0 max=1 step=0.01 value=0 id="interpolateLookAt" autocomplete="off">
|
|
</div>
|
|
<div>
|
|
Projection Matrix: <input type="range" min=0 max=1 step=0.01 value=0 id="interpolateProjection" autocomplete="off" disabled="yes">
|
|
</div>
|
|
<div>
|
|
Use virtual camera: <input type="checkbox" id="displayMatricesVirtually" checked autocomplete="off">
|
|
</div>
|
|
<div>
|
|
Backface Culling: <input type="checkbox" id="backfaceCulling" autocomplete="off">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |