Compare commits

..

No commits in common. "efdedb23b8becfdaf7b43b431007fc369bae318d" and "3e3211b7e17abfb39cb0c1170df95d8b3c0db8bf" have entirely different histories.

2 changed files with 4 additions and 12 deletions

View file

@ -3,7 +3,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>have you tried crying more?</title>
<title>WebGL Demo</title>
<!-- <script -->
<!-- src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js" -->
<!-- integrity="sha512-zhHQR0/H5SEBL3Wn6yYSaTTZej12z0hVZKOv3TwCUXT1z5qeqGcXJLLrbERYRScEDDpYIJhPC1fk31gqR783iQ==" -->

View file

@ -70,29 +70,21 @@ function renderShader(gl, vsSource, fsSource) {
// Draw the scene
// drawScene(gl, programInfo, buffers, 0);
const fpsLimit = 30;
const fpsDelta = 1000 / 30;
// let timePrev = 0;
// requestAnimationFrame asks the browser to call render,
// providing the time in milliseconds since the page loaded
function render(time) {
time *= 0.001; // convert to seconds
// delta = time - timePrev;
// deltaTime = time - prevTime;
// prevTime = time;
drawScene(gl, programInfo, buffers, time);
setTimeout(() => requestAnimationFrame(render), fpsDelta);
}
function update() {
requestAnimationFrame(render);
}
requestAnimationFrame(render);
// XXX: TODO: read this guide it's great! https://stackoverflow.com/questions/56998225/why-is-rendering-blurred-in-webgl
// window.addEventListener('resize', render);
requestAnimationFrame(render);
// update();
// setInterval(update, 1000 / fpsLimit);
}
function fetchShader(name) {