mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29: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;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
|
||||
font-family: monospace;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
canvas {
|
||||
@@ -29,5 +25,8 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body><script type="module" src="js/main.js"></script></body>
|
||||
<body>
|
||||
<canvas></canvas>
|
||||
<script type="module" src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
import { init, load, resize, draw } from "./unraveled.js";
|
||||
|
||||
const canvas = document.createElement("canvas");
|
||||
document.body.appendChild(canvas);
|
||||
document.addEventListener("touchmove", (e) => e.preventDefault(), {
|
||||
passive: false,
|
||||
});
|
||||
document.body.onload = async () => {
|
||||
|
||||
const dimensions = { width: 1, height: 1 };
|
||||
|
||||
const loadJS = (src) =>
|
||||
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 () => {
|
||||
document.addEventListener("touchmove", (e) => e.preventDefault(), { passive: false });
|
||||
const canvas = document.querySelector("canvas");
|
||||
const dimensions = { width: 1, height: 1 };
|
||||
|
||||
const resizeViewport = () => {
|
||||
const devicePixelRatio = window.devicePixelRatio ?? 1;
|
||||
@@ -31,7 +18,7 @@ const start = async () => {
|
||||
|
||||
const image = new Image();
|
||||
image.crossOrigin = "anonymous";
|
||||
image.src = "./assets/matrixcode_msdf.png";
|
||||
image.src = "msdf.png";
|
||||
await image.decode();
|
||||
|
||||
const palette = [
|
||||
@@ -74,7 +61,3 @@ const start = async () => {
|
||||
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