styling fixes
This commit is contained in:
parent
396d750a70
commit
4ff9d3934c
5 changed files with 20 additions and 5 deletions
|
@ -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" />
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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,
|
||||
`
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue