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 SMAAImageGenerator.setCacheEnabled.

Constructors

Properties

Methods

Constructors

Properties

disableCache: boolean

Indicates whether data image caching is disabled.

Use setCacheEnabled() instead.

Methods

  • Generates the SMAA data images.

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

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

    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