EnvironmentMapImagery that supports cube maps.

Use this class if you want to load the images (or URLs) yourself.

You can use createCubeMapImagery to create CubeMapImagery with URLs.

Since

2021.1

Hierarchy

Constructors

Accessors

Methods

Constructors

Accessors

  • get credentials(): boolean
  • Indicates whether or not credentials should be included with HTTP requests.

    Set this to true if the server requires credentials, like HTTP basic authentication headers or cookies. You should disable if the server is configured to allow cross-origin requests from all domains (Acces-Control-Allow-Origin=*). If the server allows CORS requests from all domains, the browser will block all requests where credentials=true.

    Once set, all subsequent HTTP requests will use the newly set value.

    The default value is false.

    Returns boolean

  • set credentials(credentials): void
  • Parameters

    • credentials: boolean

    Returns void

  • get requestHeaders(): null | HttpRequestHeaders
  • Headers to send with every HTTP request.

    An object literal that represents the headers to send with every HTTP request. The property names represent HTTP header names, the property values represent the HTTP header values. This property can be set dynamically (post-construction). Once set, all subsequent HTTP requests will use the newly set headers.

    Note that when custom headers are being sent to a server on another domain, the server will have to properly respond to pre-flight CORS requests (a HTTP OPTION request sent by the browser before doing the actual request). The server has to indicate that the header can be used in the actual request, by including it in the pre-flight's Access-Control-Allow-Headers response header.

    The default value is null.

    Returns null | HttpRequestHeaders

  • set requestHeaders(requestHeaders): void
  • Parameters

    Returns void

Methods

  • Loads a face image or URL.

    Parameters

    • face: CubeMapFace

      the cube map face

    • onSuccess: ((face, imageOrURL) => void)

      the callback function that should be invoked when the image or URL was successfully loaded. The function will receive the face that was passed to this function and an image object or an URL.

    • onError: ((face, error?) => void)

      the callback function that should be invoked when the image or URL could not be loaded. The function will receive the face that was passed to this function and an optional Error object.

        • (face, error?): void
        • Parameters

          Returns void

    Returns void