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

Hierarchy

  • Loader
    • LUTCubeLoader

Constructors

  • Parameters

    • Optionalmanager: LoadingManager

    Returns LUTCubeLoader

Properties

crossOrigin: string
'anonymous'
manager: LoadingManager
path: string
''
requestHeader: {
    [header: string]: string;
}
{}
resourcePath: string
''
withCredentials: boolean
false
DEFAULT_MATERIAL_NAME: string

Methods

  • Loads a LUT.

    Parameters

    • url: string

      The URL of the CUBE-file.

    • OptionalonLoad: Function

      A callback that receives the loaded lookup texture.

    • OptionalonProgress: Function

      A progress callback that receives the XMLHttpRequest instance.

    • OptionalonError: Function

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

    Returns Promise<LookupTexture>

    A promise that returns the lookup texture.

  • Parameters

    • url: string
    • OptionalonProgress: ((event: ProgressEvent<EventTarget>) => void)
        • (event): void
        • Parameters

          • event: ProgressEvent<EventTarget>

          Returns void

    Returns Promise<unknown>

  • Parses the given data.

    Parameters

    • input: string

      The LUT data.

    Returns LookupTexture

    The lookup texture.

    Fails if the data is invalid.

  • Parameters

    • crossOrigin: string

    Returns this

  • Parameters

    • path: string

    Returns this

  • Parameters

    • requestHeader: {
          [header: string]: string;
      }
      • [header: string]: string

    Returns this

  • Parameters

    • resourcePath: string

    Returns this

  • Parameters

    • value: boolean

    Returns this