LoadGltfListener

  • LoadGltfListener is an interface that provides callbacks for events during the loading of a glTF file into a renderable.

  • It offers methods to track the loading progress, such as onFinishedReadingFiles, onFinishedFetchingMaterials, and onFinishedLoadingModel.

  • LoadGltfListener includes a nested enum GltfLoadStage to indicate the current stage of the loading process.

  • Error handling is facilitated through the onReadingFilesFailed callback, which provides details about any loading failures.

  • The interface allows for monitoring data download progress with the reportBytesDownloaded and model size information with setModelSize.

public interface LoadGltfListener

Interface callbacks for events that occur when loading a gltf file into a renderable.

Nested Classes

enum LoadGltfListener.GltfLoadStage Defines the current stage of the load operation, each value supersedes the previous. 

Public Methods

abstract void
abstract void
onFinishedLoadingModel(long durationMs)
abstract void
onFinishedReadingFiles(long durationMs)
abstract void
abstract void
reportBytesDownloaded(long bytes)
abstract void
abstract void
setModelSize(float modelSizeMeters)

Public Methods

public abstract void onFinishedFetchingMaterials ()

public abstract void onFinishedLoadingModel (long durationMs)

Parameters
durationMs

public abstract void onFinishedReadingFiles (long durationMs)

Parameters
durationMs

public abstract void onReadingFilesFailed (Exception exception)

Parameters
exception

public abstract void reportBytesDownloaded (long bytes)

Parameters
bytes

public abstract void setLoadingStage (LoadGltfListener.GltfLoadStage stage)

Parameters
stage

public abstract void setModelSize (float modelSizeMeters)

Parameters
modelSizeMeters