An SMAA image generator.

This class uses a worker thread to generate the search and area images. The generated data URLs will be cached using localStorage, if available. To disable caching use setCacheEnabled.

Hierarchy

  • SMAAImageGenerator

Constructors

Properties

Methods

Constructors

Properties

disableCache: boolean

Indicates whether data image caching is disabled.

Deprecated

Use setCacheEnabled() instead.

Methods

  • Generates the SMAA data images.

    Returns Promise<(new (width?, height?) => HTMLImageElement)[]>

    A promise that returns the search image and area image as a pair.

    Example

    SMAAImageGenerator.generate().then(([search, area]) => {
    const smaaEffect = new SMAAEffect(search, area);
    });
  • Enables or disables caching via localStorage.

    Parameters

    • value: boolean

      Whether the cache should be enabled.

    Returns void