ASCIIGround - v1.1.2
    Preparing search index...

    Class ASCIIGround

    The main ASCIIGround class that orchestrates pattern generation and rendering.

    This class provides a high-level interface for creating animated ASCII backgrounds. It manages the lifecycle of patterns and renderers, offering methods for initialization, animation control, and configuration updates.

    const asciiGround = new ASCIIGround();

    // Initialize with canvas and pattern.
    asciiGround.init(canvas, pattern, options);

    // Control animation.
    asciiGround.startAnimation();
    asciiGround.stopAnimation();

    // Update configuration.
    asciiGround.setOptions({ fontSize: 14, color: '#667eea' });

    // Clean up when done.
    asciiGround.destroy();
    Index

    Accessors

    Constructors

    Methods

    • Initialize the ASCIIGround instance with a canvas, a pattern and renderer options.

      Parameters

      • canvas: HTMLCanvasElement

        The HTML canvas element to render on.

      • pattern: Pattern

        The pattern to use for rendering.

      • Optionaloptions: Partial<ASCIIRendererOptions>

        Optional renderer options.

      Returns ASCIIGround

    • Destroy the ASCIIGround instance, cleaning up resources. This will stop the animation and nullify the renderer.

      Returns void