Created
May 28, 2026 19:00
-
-
Save flordefuego/bd489c8eaca11d5f5fb7495cede35e08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| await loadScript("https://cdn.jsdelivr.net/npm/textmode.js@latest/dist/textmode.umd.js") | |
| // Initialize textmodifier | |
| const canvas = document.getElementById('hydra-canvas') | |
| // Initialize textmodifier | |
| const tm = textmode.create({ | |
| canvas: canvas, | |
| overlay: true | |
| }); | |
| tm.setup(() => { | |
| // Configure overlay settings | |
| tm.fontSize(32); | |
| tm.overlay | |
| .characters(" .:-=+*KUOKO") // Character set for brightness mapping | |
| .cellColorMode("fixed") // Use fixed cell color | |
| .cellColor(0, 0, 0) // Black cell background | |
| .charColorMode("sampled") // Sample character color from image | |
| .background(0, 0, 0, 255); // Black background for transparent pixels | |
| }); | |
| tm.draw(() => { | |
| tm.background(0); | |
| tm.image(tm.overlay, tm.grid.cols, tm.grid.rows); | |
| }); | |
| osc(10, 0.1, 0.5) | |
| .color(1, 0, 1) | |
| .rotate() | |
| .diff(osc(5, 0.1, 0.5)) | |
| .modulate(osc(10) | |
| .rotate(() => Math.PI / 2)) | |
| .invert() | |
| .layer(src(o0).mask(shape(4,[0,1].smooth()).repeat(4,4))) | |
| .out(o0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment