Skip to main content
assetsforwordpress

Ascii Sky

Ascii Sky turns a canvas into a living ASCII landscape: monospace characters (dots, slashes, `$`, `#`) are driven by layered wave functions, forming flowing ridges and valleys like a topographic map, and the cursor acts as a torch, brightening glyphs and casting a soft glow around itself. The animation pauses when off-screen or when the tab is hidden, and it respects **`prefers-reduced-motion`**: for users with reduced motion enabled, it renders as a single static frame instead.

Instructions

Synergizing Disruption Since Tuesday

It's still Tuesday. It's always been Tuesday.

We Leverage Paradigms to Unlock Your Synergy

We don't know what any of those words mean, and honestly, neither do you.

Circling Back: The Website

As discussed in the meeting about the meeting.

Thought Leadership, Thoughtfully Delivered

We had one thought in 2021 and we're still riding it.

Instructions

Open the JS script in the Supa Code Block element and edit the options at the end of the script. Each option is explained below:

Grid & Text Rendering

  • cellWidth: 12 — Horizontal spacing (in pixels) between cells of the ASCII grid. Smaller values pack more glyphs side by side, making the field denser and more detailed (but heavier to render). Minimum enforced value is 4.
  • cellHeight: 14 — Vertical spacing between grid rows. Kept slightly larger than cellWidth here because monospace characters are taller than they are wide; this keeps the glyph grid visually even. Minimum is 4.
  • fontSize: 12 — The pixel size of the glyphs drawn on the canvas. It should roughly match the cell dimensions so characters fit in their cells without overlapping. Minimum is 1.
  • fontFamily: "ui-monospace, monospace" — The font used for the glyphs. A monospace font is important here so every character occupies the same box; ui-monospace uses the system's default monospace font with monospace as fallback.

Animation & Field Shape

  • speed: 0.9 — Multiplier applied to the elapsed time that drives the wave animation. 1 is "normal" speed, 0.5 is half speed, 2 is double. A value of 0 (or anything that fails the rate > 0 check) stops the animation entirely, leaving a static frame.
  • terrainScale: 0.13 — How "zoomed in" the noise field is. Each grid cell maps into the wave function multiplied by this scale. Smaller values stretch the pattern out (large, smooth blobs); larger values compress it (fine, busy detail). Minimum is 0.001.
  • contourSpacing: 0.08 — Controls how frequently "contour lines" appear in the brightness field. The wave value is wrapped into bands of this width, and cells near band edges get brighter, ridge-like highlighting (similar to topographic map lines). Smaller values produce more, thinner contour lines; larger values produce fewer, wider ones.

Appearance

  • opacity: 1 — Global transparency of everything drawn, clamped between 0 and 1. 1 is fully opaque; 0.5 would make the whole field half-faded into the background.
  • background: "#0c0c0b" — Sets the canvas's CSS background color (a near-black warm tone here). Applied by directly setting canvas.style.backgroundColor; the original inline value is restored if you call destroy().
  • paused: false — If true, the animation loop doesn't run and you get a single static frame (still rendered once, so it's not blank). You can toggle this later with the pause() / resume() API methods.

Mouse Interaction

  • mouseEffect: true — Master switch for pointer interaction. When enabled, moving the cursor over the canvas brightens nearby glyphs and (optionally) adds a glow. When false, all pointer handlers are ignored and the presence value is forced to 0.
  • mouseRadius: 285 — Radius in pixels of the cursor's area of influence. Cells within this distance of the pointer get a brightness boost that falls off toward the edge (with a squared falloff, so the center is much brighter than the rim). Minimum is 8. Note the glow (below) paints a circle 1.7× this radius.
  • mouseStrength: 0.9 — How strongly the pointer lifts cell brightness. At the exact cursor position the boost can reach roughly strength × 150 brightness points, scaled by the falloff and by how "present" the cursor is (it eases in/out as you enter/leave the canvas).
  • mouseGlow: 0.72 — Intensity of the soft radial light painted under the cursor using additive blending, clamped 0–1. 0 disables the glow entirely; the value scales the gradient's center alpha (up to 0.30 × glow × presence at the very center).
  • mouseGlowColor: "#ff0000" — Color of that glow, given as a hex string. It's converted to RGB for the gradient; if the hex is invalid, it falls back to a warm 255,215,161 (peach) tone.

Determinism

  • seed: "random" — Seeds the pseudo-random offsets of the wave field (its x/y position in "noise space" and its time offset). If the value is undefined, null, an empty string, or the literal "random", a fresh seed is generated each time, so every load looks different. Any other string (e.g., "forest", "42") is hashed (FNV-1a) into a deterministic RNG — the same seed always produces the same terrain, which is useful for reproducible visuals. Changing the seed later via setOptions() re-rolls the field.

Custom Glyphs

  • glyphs: [...] — An array replacing the built-in character set entirely. Each entry has three properties:
    • min — The brightness threshold (0–255) a cell must reach to display this glyph. Higher min = rarer, brighter character.
    • char — The character(s) to draw, e.g. "·", "/", "$", "#".
    • color — The fill color for that glyph.

      The array is sorted by min ascending, and each cell is assigned the highest-threshold glyph its brightness qualifies for. Anything dimmer than the lowest min (15 here) renders nothing, showing just the background — that's what creates the dark/empty regions. In this config, the default £ glyph is swapped for #.

Interaction Target

  • interactionTarget: null — Which element listens for pointermove/pointerleave/pointercancel events. Defaults to the canvas's parent element (or the canvas itself if it has no parent). Accepts an actual element or a CSS selector string. Handy when the canvas is covered by an overlay: point this at the overlay so mouse tracking still works.