Class ViewRenderable.Builder
- java.lang.Object
-
- com.google.ar.sceneform.rendering.ViewRenderable.Builder
-
- Enclosing class:
- ViewRenderable
public static final class ViewRenderable.Builder extends java.lang.ObjectFactory class forViewRenderable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<ViewRenderable>build()Constructs aRenderablewith the parameters of the builder.java.lang.BooleanhasSource()True if a source function will be called during buildBsetAnimationFrameRate(int frameRate)Sets the number of frames per seconds defined in the asset.BsetAsyncLoadEnabled(boolean asyncLoadEnabled)Enable textures async loading after first rendering.ViewRenderable.BuildersetHorizontalAlignment(ViewRenderable.HorizontalAlignment horizontalAlignment)Sets theViewRenderable.HorizontalAlignmentthat controls where theViewRenderableis positioned relative to theNodeit is attached to along the x-axis.BsetIsFilamentGltf(boolean isFilamentGltf)BsetRegistryId(java.lang.Object registryId)ViewRenderable.BuildersetSizer(ViewSizer viewSizer)BsetSource(android.content.Context context, int resource)BsetSource(android.content.Context context, android.net.Uri sourceUri)BsetSource(android.content.Context context, android.net.Uri sourceUri, boolean enableCaching)BsetSource(android.content.Context context, java.util.concurrent.Callable<java.io.InputStream> inputStreamCreator)BsetSource(RenderableDefinition definition)Build aRenderablefrom aRenderableDefinition.ViewRenderable.BuildersetVerticalAlignment(ViewRenderable.VerticalAlignment verticalAlignment)Sets theViewRenderable.VerticalAlignmentthat controls where theViewRenderableis positioned relative to theNodeit is attached to along the y-axis.ViewRenderable.BuildersetView(android.content.Context context, int resourceId)ViewRenderable.BuildersetView(android.content.Context context, android.view.View view)
-
-
-
Method Detail
-
setView
public ViewRenderable.Builder setView(android.content.Context context, android.view.View view)
-
setView
public ViewRenderable.Builder setView(android.content.Context context, int resourceId)
-
setSizer
public ViewRenderable.Builder setSizer(ViewSizer viewSizer)
-
setHorizontalAlignment
public ViewRenderable.Builder setHorizontalAlignment(ViewRenderable.HorizontalAlignment horizontalAlignment)
Sets theViewRenderable.HorizontalAlignmentthat controls where theViewRenderableis positioned relative to theNodeit is attached to along the x-axis. The default isViewRenderable.HorizontalAlignment.CENTER.
-
setVerticalAlignment
public ViewRenderable.Builder setVerticalAlignment(ViewRenderable.VerticalAlignment verticalAlignment)
Sets theViewRenderable.VerticalAlignmentthat controls where theViewRenderableis positioned relative to theNodeit is attached to along the y-axis. The default isViewRenderable.VerticalAlignment.BOTTOM.
-
build
public java.util.concurrent.CompletableFuture<ViewRenderable> build()
Constructs aRenderablewith the parameters of the builder.- Returns:
- the constructed
Renderable
-
setSource
public B setSource(android.content.Context context, java.util.concurrent.Callable<java.io.InputStream> inputStreamCreator)
-
setSource
public B setSource(android.content.Context context, android.net.Uri sourceUri)
-
setSource
public B setSource(android.content.Context context, android.net.Uri sourceUri, boolean enableCaching)
-
setSource
public B setSource(android.content.Context context, int resource)
-
setSource
public B setSource(RenderableDefinition definition)
Build aRenderablefrom aRenderableDefinition.
-
setRegistryId
public B setRegistryId(@Nullable java.lang.Object registryId)
-
setIsFilamentGltf
public B setIsFilamentGltf(boolean isFilamentGltf)
-
setAsyncLoadEnabled
public B setAsyncLoadEnabled(boolean asyncLoadEnabled)
Enable textures async loading after first rendering. Default is false.
-
setAnimationFrameRate
public B setAnimationFrameRate(int frameRate)
Sets the number of frames per seconds defined in the asset.- Parameters:
frameRate- The number of frames during one second
-
hasSource
public java.lang.Boolean hasSource()
True if a source function will be called during build
-
-