Updated layout

This commit is contained in:
Robert 2020-09-27 03:07:05 +02:00
parent fd1c493e91
commit 9172ffb41a
2 changed files with 49 additions and 5 deletions

View file

@ -13,9 +13,54 @@
<script src="orbitals/rendering.js" defer></script> <script src="orbitals/rendering.js" defer></script>
<style> <style>
body
{
background-color: black;
color: white;
font-family: "Arial";
}
h1
{
margin-top: 100px;
font-family: "Trebuchet MS";
}
p
{
margin-right: 100px;
text-align: justify;
}
a
{
text-decoration: none;
}
i
{
font-family: Georgia, 'Times New Roman', Times, serif;
}
button
{
width: 100px;
height: 50px;
background-color: rgb(57, 135, 224);
color: white;
border: 0px;
font-weight: bold;
}
button:hover
{
background-color: rgb(33, 110, 199);
}
#screen #screen
{ {
border: 1px solid red; height: 95vh;
width: 95vh;
} }
</style> </style>
</head> </head>

View file

@ -24,9 +24,8 @@ function HSVtoRGB(h, s, v) {
} }
var canvas = document.querySelector('#screen'); var canvas = document.querySelector('#screen');
canvas.height = screen.height - 200; canvas.height = canvas.clientHeight;
canvas.width = canvas.height; canvas.width = canvas.clientHeight;
console.log(window.height)
var gl = canvas.getContext("webgl"); var gl = canvas.getContext("webgl");
var VBO = gl.createBuffer(); var VBO = gl.createBuffer();
@ -131,7 +130,7 @@ function drawScene()
gl.vertexAttribPointer(coord, 3, gl.FLOAT, false, 0, 0); gl.vertexAttribPointer(coord, 3, gl.FLOAT, false, 0, 0);
gl.enableVertexAttribArray(coord); gl.enableVertexAttribArray(coord);
gl.viewport(0,0,canvas.width,canvas.height); gl.viewport(0,0, gl.canvas.width, gl.canvas.height);
gl.drawArrays(gl.POINTS, 0, vertices.length / 3); gl.drawArrays(gl.POINTS, 0, vertices.length / 3);
} }