GuavaGltfModel
public final class GuavaGltfModel
Summary
Public methods |
|
|---|---|
static final @NonNull ListenableFuture<@NonNull GltfModel> |
@MainThreadPublic factory for a GltfModel, where the glTF is asynchronously loaded from a |
static final @NonNull ListenableFuture<@NonNull GltfModel> |
@MainThreadPublic factory for a GltfModel, where the glTF is asynchronously loaded from a |
Public methods
createGltfModelAsync
@MainThread
public static final @NonNull ListenableFuture<@NonNull GltfModel> createGltfModelAsync(@NonNull Session session, @NonNull Path path)
Public factory for a GltfModel, where the glTF is asynchronously loaded from a Path relative to the application's assets/ folder.
Currently, only binary glTF (.glb) files are supported.
| Parameters | |
|---|---|
@NonNull Session session |
The |
@NonNull Path path |
The Path of the binary glTF (.glb) model to be loaded, relative to the application's |
| Returns | |
|---|---|
@NonNull ListenableFuture<@NonNull GltfModel> |
a ListenableFuture |
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if path.isAbsolute is true, as this method requires a relative path. |
createGltfModelAsync
@MainThread
public static final @NonNull ListenableFuture<@NonNull GltfModel> createGltfModelAsync(@NonNull Session session, @NonNull Uri uri)
Public factory for a GltfModel, where the glTF is asynchronously loaded from a Uri.
Currently, only binary glTF (.glb) files are supported.
| Parameters | |
|---|---|
@NonNull Session session |
The |
@NonNull Uri uri |
The Uri for a binary glTF (.glb) model to be loaded. |
| Returns | |
|---|---|
@NonNull ListenableFuture<@NonNull GltfModel> |
a ListenableFuture |