mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Adding "updated" glyph set from The Matrix Resurrections, and a corresponding effect version.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
- [Classic Matrix code](https://rezmason.github.io/matrix)
|
||||
- [3D mode](https://rezmason.github.io/matrix?volumetric=true)
|
||||
- [Matrix Resurrections code (WIP)](https://rezmason.github.io/matrix?version=resurrections)
|
||||
- [Matrix Resurrections's updated code (WIP)](https://rezmason.github.io/matrix?version=updated)
|
||||
- [Operator Matrix code (with ripple effects)](https://rezmason.github.io/matrix?version=operator)
|
||||
- [Code of the "Nightmare Matrix"](https://rezmason.github.io/matrix?version=nightmare)
|
||||
- [(you know, this stuff).](http://matrix.wikia.com/wiki/Nightmare_Matrix)
|
||||
|
||||
BIN
assets/resurrections_msdf.png
Normal file
BIN
assets/resurrections_msdf.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 237 KiB |
23
js/config.js
23
js/config.js
@@ -17,6 +17,12 @@ const fonts = {
|
||||
glyphSequenceLength: 57,
|
||||
glyphTextureGridSize: [8, 8],
|
||||
},
|
||||
resurrections: {
|
||||
// The glyphs seen in the film trilogy
|
||||
glyphTexURL: "assets/resurrections_msdf.png",
|
||||
glyphSequenceLength: 133,
|
||||
glyphTextureGridSize: [13, 12],
|
||||
},
|
||||
huberfishA: {
|
||||
glyphTexURL: "assets/huberfish_a_msdf.png",
|
||||
glyphSequenceLength: 34,
|
||||
@@ -149,6 +155,23 @@ const versions = {
|
||||
volumetric: true,
|
||||
fallSpeed: 0.4,
|
||||
},
|
||||
updated: {
|
||||
...defaults,
|
||||
...fonts.resurrections,
|
||||
numColumns: 108,
|
||||
fallSpeed: 0.35,
|
||||
cycleStyle: "cycleRandomly",
|
||||
cycleSpeed: 0.8,
|
||||
glyphEdgeCrop: 0.1,
|
||||
paletteEntries: [
|
||||
{ hsl: [0.39, 0.9, 0.0], at: 0.0 },
|
||||
{ hsl: [0.39, 1.0, 0.6], at: 0.5 },
|
||||
{ hsl: [0.39, 1.0, 1.0], at: 1.0 },
|
||||
],
|
||||
raindropLength: 1.4,
|
||||
highPassThreshold: 0.2,
|
||||
cursorEffectThreshold: 0.8,
|
||||
},
|
||||
palimpsest: {
|
||||
...defaults,
|
||||
...fonts.huberfishA,
|
||||
|
||||
@@ -117,15 +117,4 @@ const makePass = (loaded, build, run) => ({
|
||||
|
||||
const makePipeline = (context, steps) => steps.filter((f) => f != null).map((f) => f(context));
|
||||
|
||||
export {
|
||||
getCanvasSize,
|
||||
makeRenderTarget,
|
||||
makeComputeTarget,
|
||||
make1DTexture,
|
||||
loadTexture,
|
||||
loadShader,
|
||||
makeUniformBuffer,
|
||||
makePass,
|
||||
makePipeline,
|
||||
makeBindGroup,
|
||||
};
|
||||
export { getCanvasSize, makeRenderTarget, makeComputeTarget, make1DTexture, loadTexture, loadShader, makeUniformBuffer, makePass, makePipeline, makeBindGroup };
|
||||
|
||||
@@ -24,9 +24,9 @@ float median3(vec3 i) {
|
||||
}
|
||||
|
||||
vec2 getSymbolUV(float glyphCycle) {
|
||||
float symbol = floor(glyphSequenceLength * glyphCycle);
|
||||
float symbolX = mod(symbol, glyphTextureGridSize.x);
|
||||
float symbolY = floor(symbol / glyphTextureGridSize.y);
|
||||
float symbol = floor((glyphSequenceLength) * glyphCycle) + 1.0;
|
||||
float symbolX = mod(symbol, glyphTextureGridSize.x) - 1.0;
|
||||
float symbolY = glyphTextureGridSize.y - 1.0 - (mod(floor(symbol / glyphTextureGridSize.x), glyphTextureGridSize.y));
|
||||
return vec2(symbolX, symbolY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user