mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-18 14:19:30 -07:00
Further smushing
This commit is contained in:
0
.gitmodules
vendored
0
.gitmodules
vendored
6
TODO.txt
6
TODO.txt
@@ -1,6 +0,0 @@
|
|||||||
TODO:
|
|
||||||
|
|
||||||
Simplify!
|
|
||||||
Get as much into one file as you possibly can
|
|
||||||
Remove regl
|
|
||||||
Record WebGL debug calls
|
|
||||||
@@ -17,10 +17,6 @@
|
|||||||
background: black;
|
background: black;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 2em;
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas {
|
canvas {
|
||||||
@@ -29,5 +25,8 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body><script type="module" src="js/main.js"></script></body>
|
<body>
|
||||||
|
<canvas></canvas>
|
||||||
|
<script type="module" src="main.js"></script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,23 +1,10 @@
|
|||||||
import { init, load, resize, draw } from "./unraveled.js";
|
import { init, load, resize, draw } from "./unraveled.js";
|
||||||
|
|
||||||
const canvas = document.createElement("canvas");
|
document.body.onload = async () => {
|
||||||
document.body.appendChild(canvas);
|
|
||||||
document.addEventListener("touchmove", (e) => e.preventDefault(), {
|
|
||||||
passive: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
const dimensions = { width: 1, height: 1 };
|
document.addEventListener("touchmove", (e) => e.preventDefault(), { passive: false });
|
||||||
|
const canvas = document.querySelector("canvas");
|
||||||
const loadJS = (src) =>
|
const dimensions = { width: 1, height: 1 };
|
||||||
new Promise((resolve, reject) => {
|
|
||||||
const tag = document.createElement("script");
|
|
||||||
tag.onload = resolve;
|
|
||||||
tag.onerror = reject;
|
|
||||||
tag.src = src;
|
|
||||||
document.body.appendChild(tag);
|
|
||||||
});
|
|
||||||
|
|
||||||
const start = async () => {
|
|
||||||
|
|
||||||
const resizeViewport = () => {
|
const resizeViewport = () => {
|
||||||
const devicePixelRatio = window.devicePixelRatio ?? 1;
|
const devicePixelRatio = window.devicePixelRatio ?? 1;
|
||||||
@@ -31,7 +18,7 @@ const start = async () => {
|
|||||||
|
|
||||||
const image = new Image();
|
const image = new Image();
|
||||||
image.crossOrigin = "anonymous";
|
image.crossOrigin = "anonymous";
|
||||||
image.src = "./assets/matrixcode_msdf.png";
|
image.src = "msdf.png";
|
||||||
await image.decode();
|
await image.decode();
|
||||||
|
|
||||||
const palette = [
|
const palette = [
|
||||||
@@ -74,7 +61,3 @@ const start = async () => {
|
|||||||
update();
|
update();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
document.body.onload = () => {
|
|
||||||
start();
|
|
||||||
};
|
|
||||||
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
@@ -1 +0,0 @@
|
|||||||
prettier --write --use-tabs --print-width 160 "index.html" "./js/**/**.js" "./lib/gpu-buffer.js"
|
|
||||||
Reference in New Issue
Block a user