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

SMAAImageLoader

Extends:

three~Loader → SMAAImageLoader
this class is experimental. Added for testing, API might change in patch or minor releases. Requires three >= r108.

An SMAA image loader.

This loader 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, please refer to SMAAImageLoader.disableCache.

Constructor Summary

Public Constructor
public

constructor(manager: LoadingManager)

Constructs a new SMAA image loader.

Member Summary

Public Members
public

Indicates whether data image caching is disabled.

Method Summary

Public Methods
public

load(onLoad: Function, onError: Function): Promise<Image[]>

Loads the SMAA data images.

Public Constructors

public constructor(manager: LoadingManager) source

Constructs a new SMAA image loader.

Params:

NameTypeAttributeDescription
manager LoadingManager
  • optional

A loading manager.

Public Members

public disableCache: Boolean source

Indicates whether data image caching is disabled.

Public Methods

public load(onLoad: Function, onError: Function): Promise<Image[]> source

Loads the SMAA data images.

Params:

NameTypeAttributeDescription
onLoad Function
  • optional

A function to call when the loading process is done.

onError Function
  • optional

A function to call when an error occurs.

Return:

Promise<Image[]>

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