Builder

Factory class for ViewRenderable

Functions

Link copied to clipboard
fun <T : Renderable, B : Renderable.Builder<T, B>> Renderable.Builder<T, B>.asDeferred(engine: Engine): Deferred<T>

Deferred renderable loading is a non-blocking cancellable future.

Link copied to clipboard
suspend fun <T : Renderable, B : Renderable.Builder<T, B>> Renderable.Builder<T, B>.await(engine: Engine): T

Awaits for loading a Renderable with the parameters of the builder without blocking a thread.

Link copied to clipboard
open fun build(engine: Engine): CompletableFuture<ViewRenderable>
Constructs a Renderable with the parameters of the builder.
Link copied to clipboard
suspend fun <T : Renderable, B : Renderable.Builder<T, B>> Renderable.Builder<T, B>.build(engine: Engine, coroutineScope: LifecycleCoroutineScope)

Load a Renderable in a coroutine scope without blocking a thread.

Link copied to clipboard
open fun hasSource(): Boolean
True if a source function will be called during build
Link copied to clipboard
open fun setAnimationFrameRate(frameRate: Int): B
Sets the number of frames per seconds defined in the asset.
Link copied to clipboard
open fun setAsyncLoadEnabled(asyncLoadEnabled: Boolean): B
Enable textures async loading after first rendering.
Link copied to clipboard
Sets the HorizontalAlignment that controls where the ViewRenderable is positioned relative to the Node it is attached to along the x-axis.
Link copied to clipboard
open fun setIsFilamentGltf(isFilamentGltf: Boolean): B
Link copied to clipboard
open fun setRegistryId(@Nullable registryId: Any): B
Link copied to clipboard
Set the ViewSizer that controls the size of the built ViewRenderable in the SceneView.
Link copied to clipboard
open fun setSource(definition: RenderableDefinition): B
open fun setSource(context: Context, sourceUri: Uri): B
open fun setSource(context: Context, resource: Int): B
open fun setSource(context: Context, inputStreamCreator: Callable<InputStream>): B
open fun setSource(context: Context, sourceUri: Uri, uriResolver: (String) -> Uri): B
Link copied to clipboard
Sets the VerticalAlignment that controls where the ViewRenderable is positioned relative to the Node it is attached to along the y-axis.
Link copied to clipboard
open fun setView(context: Context, view: View): ViewRenderable.Builder
open fun setView(context: Context, resourceId: Int): ViewRenderable.Builder