Home Reference Source
import {SMAAImageGenerator} from 'postprocessing'
public class | source

SMAAImageGenerator

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.disableCache.

Constructor Summary

Public Constructor
public

Constructs a new SMAA image generator.

Member Summary

Public Members
public

Indicates whether data image caching is disabled.

Method Summary

Public Methods
public

generate(): Promise<Image[]>

Generates the SMAA data images.

Public Constructors

public constructor() source

Constructs a new SMAA image generator.

Public Members

public disableCache: Boolean source

Indicates whether data image caching is disabled.

Public Methods

public generate(): Promise<Image[]> source

Generates the SMAA data images.

Return:

Promise<Image[]>

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);
});