VFX-JS
    Preparing search index...

    Type Alias AsciiParams

    type AsciiParams = {
        background: AsciiColor;
        charAspect?: number;
        chars?: AsciiCharRamp;
        color: AsciiColor;
        colorFromSource: boolean;
        dither: number;
        font: string;
        fontWeight: string | number;
        grid: number | [number, number];
        invert: boolean;
        preset: AsciiPresetName;
        tiles?: readonly AsciiImageSource[];
    }
    Index

    Properties

    background: AsciiColor

    Cell backdrop behind the glyphs, non-premultiplied.

    charAspect?: number

    Character box aspect ratio (width / height) used to keep glyphs
    undistorted when the cell is non-square.

    Omit (default) to auto-measure it from the font — the glyph advance
    (measureText) over the em height. That is exact for monospace
    fonts; set it explicitly for proportional fonts, non-browser
    builds, or to force a specific look (e.g. 0.5 for tall, narrow
    characters). Construction-time only (see chars).

    Character ramp, ordered dark → light. Overrides preset.

    Baked into the glyph atlas at init(); changing it (or font /
    fontWeight) after the effect is added has no effect until it is
    re-added.

    color: AsciiColor

    Fixed glyph colour, used when colorFromSource is false.

    colorFromSource: boolean

    Tint each glyph with the average colour of its source cell.

    dither: number

    Ordered (Bayer 4×4) dithering amount, [0, 1]. 0 disables it; 1
    spreads each quantisation step across a full ramp level so short
    ramps (e.g. minimal, dots) render smooth gradients instead of
    hard bands. Applied per cell, so each character stays consistent.

    font: string

    CSS font family used to render the glyph atlas (e.g. "monospace",
    "Helvetica"). Loaded via the Font Loading API before the atlas is
    built. Construction-time only (see chars).

    fontWeight: string | number

    CSS font weight for the glyph atlas — a keyword ("normal",
    "bold") or numeric weight (100900). Construction-time only
    (see chars).

    grid: number | [number, number]

    Cell size in CSS px. A single number is a square cell; a
    [width, height] tuple sets the axes independently.

    Glyphs always keep their native aspect ratio — a cell wider/taller
    than the character box letterboxes the glyph rather than stretching
    it. Set the cell to the font's character aspect (≈ advance : em, so
    cells narrower than they are tall) for gap-free tiling.

    invert: boolean

    Flip the luminance → glyph mapping (for dark-on-light output).

    Built-in ramp to use when chars is omitted.

    tiles?: readonly AsciiImageSource[]

    Image tiles, ordered dark → light — an alternative to character
    glyphs. Takes precedence over chars / preset when
    non-empty. Each tile keeps its own colour (the color RGB /
    colorFromSource tint is bypassed, though color's alpha still
    scales opacity), is contain-fitted into the cell at a shared aspect
    (taken from the first tile), and the atlas is auto-downscaled to
    stay within GPU texture limits.

    Baked into the atlas at init(); change by re-adding the effect.