styling fixes

This commit is contained in:
41666 2023-10-01 02:10:49 -04:00
parent 396d750a70
commit 4ff9d3934c
5 changed files with 20 additions and 5 deletions

View file

@ -8,6 +8,13 @@
padding: 0;
overflow: hidden;
background-color: black;
color: white;
}
main {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>
<link rel="stylesheet" href="index.css" />

View file

@ -8,6 +8,13 @@
padding: 0;
overflow: hidden;
background-color: black;
color: white;
}
main {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>
<link rel="stylesheet" href="index.css" />

View file

@ -3,7 +3,7 @@ import { Shader } from "./lib/shader.js";
import { BasicPlane } from "./lib/basic-plane.js";
main((gl, core) => {
const shader = new Shader(gl)
const shader = new Shader(gl, core)
.attach(
gl.VERTEX_SHADER,
`

View file

@ -11,9 +11,9 @@ export const main = (next) => {
// Only continue if WebGL is available and working
if (gl === null) {
alert(
"Unable to initialize WebGL. Your browser or machine may not support it."
);
document.querySelector(
"main"
).innerHTML = `<div><i>your browser didn't let me set up webgl</i></div>`;
return;
}

View file

@ -1,6 +1,7 @@
export class Shader {
constructor(gl) {
constructor(gl, core) {
this.gl = gl;
this.core = core;
this.program = gl.createProgram();
this.startTime = Date.now();
}