MotionScript

@motion-script/core


@motion-script/core / AsciiCharset

Type Alias: AsciiCharset

AsciiCharset = "standard" | "blocks" | "braille" | "binary" | "hex"

Defined in: attributes/shape/effects/implementations/ascii.ts:25

Built-in glyph ramps, each ordered least ink first: charset[0] stands in for the darkest cells and the last entry for the lightest.

That ordering is about the result, not the glyph. On the default white ink over black, an empty cell is the darkest thing the effect can draw and a solid one the brightest, so least-ink-first is exactly dark-to-light. Invert the ink and background — black on white, the paper look — and the same ramp is used back to front automatically, so a custom ramp only ever has to be written once.

  • 'standard' — the classic ten-step ASCII ramp.
  • 'blocks' — Unicode shading blocks; the most legible at small cell sizes, because each step really is a fixed fraction of coverage.
  • 'braille' — braille dot patterns, the finest ramp of the set.
  • 'binary' — just 0 and 1: a two-tone cut rather than a ramp.
  • 'hex'0F, the hex-dump look. Its "ramp" is nominal, since a glyph's ink doesn't track its digit, so expect texture rather than tone.