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

LUTCubeLoader

Extends:

three~Loader → LUTCubeLoader

A 3D LUT loader that supports the .cube file format.

Based on an implementation by Garrett Johnson: https://github.com/gkjohnson/threejs-sandbox/tree/master/3d-lut

For more details see: https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf

Method Summary

Public Methods
public

load(url: String, onLoad: Function, onProgress: Function, onError: Function): Promise<LookupTexture3D>

Loads a LUT.

public

Parses the given data.

Public Methods

public load(url: String, onLoad: Function, onProgress: Function, onError: Function): Promise<LookupTexture3D> source

Loads a LUT.

Params:

NameTypeAttributeDescription
url String

The URL of the CUBE-file.

onLoad Function
  • optional

A callback that receives the loaded lookup texture.

onProgress Function
  • optional

A progress callback that receives the XMLHttpRequest instance.

onError Function
  • optional

An error callback that receives the URL of the file that failed to load.

Return:

Promise<LookupTexture3D>

A promise that returns the lookup texture.

public parse(input: String): LookupTexture3D source

Parses the given data.

Params:

NameTypeAttributeDescription
input String

The LUT data.

Return:

LookupTexture3D

The lookup texture.

Throw:

Error

Fails if the data is invalid.