From 4ff9d3934ceb7b37f573ddde8bdef2da51be39e8 Mon Sep 17 00:00:00 2001 From: Noelle Calliope <1581674+mekanoe@users.noreply.github.com> Date: Sun, 1 Oct 2023 02:10:49 -0400 Subject: [PATCH] styling fixes --- generators/work.html.template | 7 +++++++ html/001-platform-provenance.html | 7 +++++++ html/001-platform-provenance.js | 2 +- html/lib/platform.js | 6 +++--- html/lib/shader.js | 3 ++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/generators/work.html.template b/generators/work.html.template index 7991358..1ee26a8 100644 --- a/generators/work.html.template +++ b/generators/work.html.template @@ -8,6 +8,13 @@ padding: 0; overflow: hidden; background-color: black; + color: white; + } + main { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; } diff --git a/html/001-platform-provenance.html b/html/001-platform-provenance.html index 5c7b817..dc4b33a 100644 --- a/html/001-platform-provenance.html +++ b/html/001-platform-provenance.html @@ -8,6 +8,13 @@ padding: 0; overflow: hidden; background-color: black; + color: white; + } + main { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; } diff --git a/html/001-platform-provenance.js b/html/001-platform-provenance.js index 805c9e9..a4b9645 100644 --- a/html/001-platform-provenance.js +++ b/html/001-platform-provenance.js @@ -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, ` diff --git a/html/lib/platform.js b/html/lib/platform.js index aaf0d48..29843b3 100644 --- a/html/lib/platform.js +++ b/html/lib/platform.js @@ -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 = `