public final class GltfModel implements Model


GltfModel represents a glTF resource in SceneCore. These can be used as part of the Environment or to display 3D models with GltfModelEntity. These are created by the Session.

Summary

Public methods

static final @NonNull ListenableFuture<@NonNull GltfModel>

Public factory function for a GltfModel, where the glTF is asynchronously loaded.

boolean
equals(Object other)
final @NonNull JxrPlatformAdapter.GltfModelResource
int

Public methods

create

Added in 1.0.0-alpha02
@MainThread
public static final @NonNull ListenableFuture<@NonNull GltfModelcreate(@NonNull Session session, @NonNull String name)

Public factory function for a GltfModel, where the glTF is asynchronously loaded.

This method must be called from the main thread. https://developer.android.com/guide/components/processes-and-threads

Currently, only URLs and relative paths from the android_assets/ directory are supported. Currently, only binary glTF (.glb) files are supported.

Parameters
@NonNull Session session

The Session to use for loading the model.

@NonNull String name

The URL or asset-relative path of a binary glTF (.glb) model to be loaded

Returns
@NonNull ListenableFuture<@NonNull GltfModel>

a ListenableFuture. Listeners will be called on the main thread if Runnable::run is supplied.

equals

public boolean equals(Object other)

hashCode

public int hashCode()