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;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="stylesheet" href="index.css" />
|
<link rel="stylesheet" href="index.css" />
|
||||||
|
|
|
@ -8,6 +8,13 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="stylesheet" href="index.css" />
|
<link rel="stylesheet" href="index.css" />
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Shader } from "./lib/shader.js";
|
||||||
import { BasicPlane } from "./lib/basic-plane.js";
|
import { BasicPlane } from "./lib/basic-plane.js";
|
||||||
|
|
||||||
main((gl, core) => {
|
main((gl, core) => {
|
||||||
const shader = new Shader(gl)
|
const shader = new Shader(gl, core)
|
||||||
.attach(
|
.attach(
|
||||||
gl.VERTEX_SHADER,
|
gl.VERTEX_SHADER,
|
||||||
`
|
`
|
||||||
|
|
|
@ -11,9 +11,9 @@ export const main = (next) => {
|
||||||
|
|
||||||
// Only continue if WebGL is available and working
|
// Only continue if WebGL is available and working
|
||||||
if (gl === null) {
|
if (gl === null) {
|
||||||
alert(
|
document.querySelector(
|
||||||
"Unable to initialize WebGL. Your browser or machine may not support it."
|
"main"
|
||||||
);
|
).innerHTML = `<div><i>your browser didn't let me set up webgl</i></div>`;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
export class Shader {
|
export class Shader {
|
||||||
constructor(gl) {
|
constructor(gl, core) {
|
||||||
this.gl = gl;
|
this.gl = gl;
|
||||||
|
this.core = core;
|
||||||
this.program = gl.createProgram();
|
this.program = gl.createProgram();
|
||||||
this.startTime = Date.now();
|
this.startTime = Date.now();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue