forked from Rezmason/matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
73 lines (69 loc) · 2.38 KB
/
index.html
File metadata and controls
73 lines (69 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html lang="en">
<head>
<title>Matrix digital rain</title>
<meta charset="utf-8" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="theme-color" content="#000000" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<link rel="manifest" href="manifest.webmanifest" />
<link rel="icon" type="image/png" sizes="192x192" href="icon-192.png" />
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png" />
<link rel="apple-touch-icon" href="icon-192.png" />
<style>
@supports (padding-top: env(safe-area-inset-top)) {
body {
padding: 0;
height: calc(100% + env(safe-area-inset-top));
}
}
body {
background: black;
overflow: hidden;
margin: 0;
font-family: monospace;
font-size: 2em;
text-align: center;
}
canvas {
width: 100vw;
height: 100vh;
}
p {
color: hsl(108, 90%, 70%);
text-shadow: hsl(108, 90%, 40%) 1px 0 10px;
}
</style>
</head>
<body>
<!--
This is an implementation of the green code seen in The Matrix film and video game franchise.
This project demonstrates five concepts:
1. Drawing to floating point frame buffer objects, or 'FBO's,
for performing computation and post-processing
2. GPU-side computation, with fragment shaders
updating two alternating FBOs
3. Rendering crisp "vector" graphics with a multiple-channel
signed distance field (or 'MSDF')
4. Creating a blur/bloom effect from a texture pyramid
5. Color mapping with noise, to hide banding
For more information, please visit: https://github.com/Rezmason/matrix
-->
<script type="module" src="js/main.js"></script>
<script>
// Register service worker for offline functionality (PWA)
if ("serviceWorker" in navigator) {
navigator.serviceWorker
.register("service-worker.js", { updateViaCache: "none" })
.then((registration) => {
console.log("[Matrix] Service Worker registered successfully:", registration.scope);
})
.catch((error) => {
console.error("[Matrix] Service Worker registration failed:", error);
});
}
</script>
</body>
</html>