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

Deprecated

Use three/addons/loaders/LUTCubeLoader.js instead.

Hierarchy

  • Loader
    • LUTCubeLoader

Constructors

  • Parameters

    • Optional manager: LoadingManager

    Returns LUTCubeLoader

Properties

crossOrigin: string

Default

'anonymous'
manager: LoadingManager
path: string

Default

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

Type declaration

  • [header: string]: string

Default

{}
resourcePath: string

Default

''
withCredentials: boolean

Default

false
DEFAULT_MATERIAL_NAME: string

Methods

  • Loads a LUT.

    Parameters

    • url: string

      The URL of the CUBE-file.

    • Optional onLoad: ((data) => void)

      A callback that receives the loaded lookup texture.

    • Optional onProgress: ((event) => void)

      A progress callback that receives the XMLHttpRequest instance.

        • (event): void
        • Parameters

          • event: ProgressEvent<EventTarget>

          Returns void

    • Optional onError: ((err) => void)

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

        • (err): void
        • Parameters

          • err: unknown

          Returns void

    Returns void

  • Loads a LUT asynchronously.

    Parameters

    • url: string

      The URL of the CUBE-file.

    • Optional onProgress: ((event) => void)

      A progress callback that receives the XMLHttpRequest instance.

        • (event): void
        • Parameters

          • event: ProgressEvent<EventTarget>

          Returns void

    Returns Promise<LookupTexture>

    A promise that returns the lookup texture.

  • Parses the given data.

    Parameters

    • input: string

      The LUT data.

    Returns LookupTexture

    The lookup texture.

    Throws

    Fails if the data is invalid.

  • Parameters

    • crossOrigin: string

    Returns LUTCubeLoader

  • Parameters

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

    Returns LUTCubeLoader

  • Parameters

    • resourcePath: string

    Returns LUTCubeLoader

  • Parameters

    • value: boolean

    Returns LUTCubeLoader