androidx.xr.compose.subspace
Interfaces
FollowTarget |
A FollowTarget can be used with |
SceneCoreEntitySizeAdapter |
The sizing strategy used by |
SpatialBoxScope |
Scope for the children of |
SpatialColumnScope |
Scope for customizing the layout of children within a |
SpatialExternalSurfaceScope |
|
SpatialGltfModelSource |
Defines the source for a 3D model to be rendered by the |
SpatialRowScope |
Scope for customizing the layout of children within a |
Classes
AnchorPolicy |
Represents the anchoring behavior of a spatial object. |
DragPolicy |
Base Policy for motion behavior of spatial objects. |
FollowBehavior |
A FollowBehavior controls the motion of content as it is following another target, such as a user's head. |
MovePolicy |
This class is deprecated. Use SubspaceModifier.movable() instead. |
ResizePolicy |
This class is deprecated. Use SubspaceModifier.resizable() instead. |
SpatialExternalSurfaceProtection |
Specifies if the Surface should be backed by |
SpatialGltfModelAnimation |
An animation that is attached to a glTF model. |
SpatialGltfModelAnimation.AnimationState |
The current animation state of the |
SpatialGltfModelState |
A state object that can be hoisted to observe and control a |
SpatialGltfModelStatus |
An object that describes and contains information relevant to the current loading state of the glTF model. |
SpatialGltfModelStatus.Failed |
The glTF model has failed to load properly. |
StereoMode |
Mode for |
SuperSamplingPattern |
Specifies the super sampling setting for this Surface. |
TrackedDimensions |
A set of boolean flags which determine the dimensions of movement that are tracked. |
Objects
SpatialCurvedRowDefaults |
Contains the default values used by |
SpatialGltfModelStatus.Loaded |
The glTF model is fully loaded and ready to be displayed. |
SpatialGltfModelStatus.Loading |
The glTF model is currently loading and is not ready to be displayed. |
SpatialPanelDefaults |
Contains default values used by spatial panels. |
Annotations
ExperimentalSpatialGltfAnimationApi |
Marks the SpatialGltfModel animation APIs as experimental. |
SubspaceComposable |
Marks a composable function or other code element as intended for use within the context of |
Composables
SceneCoreEntity |
A composable that attaches to a SceneCore entity and allow compose to size, position, reparent, add children, and apply modifiers to the entity. |
SpatialActivityPanel |
Creates a |
SpatialAndroidViewPanel |
Creates a |
SpatialBox |
A layout composable that sizes itself to fit its content, subject to incoming constraints. |
SpatialColumn |
A layout composable that arranges its children in a vertical sequence. |
SpatialCurvedRow |
A layout composable that arranges its children in a curved horizontal sequence. |
SpatialExternalSurface |
A Composable that creates and owns an Android Surface into which the application can render stereo image content. |
SpatialExternalSurfaceHemisphere |
A Composable that creates and owns an Android Surface into which the application can render stereo image content inside a 180 degree hemisphere dome. |
SpatialExternalSurfaceSphere |
A Composable that creates and owns an Android Surface into which the application can render stereo image content inside a 360 degree sphere dome. |
SpatialGltfModel |
This composable renders a glTF or .glb model that is loaded asynchronously from the provided source. |
SpatialMainPanel |
A composable that renders the Activity's main window's 2D UI content, defined in |
SpatialPanel |
Creates a |
SpatialRow |
A layout composable that arranges its children in a horizontal sequence. |
SpatialSpacer |
A composable that represents an empty space layout. |
rememberSpatialGltfModelState |
Remembers a |
Type aliases
SurfaceProtection |
This type alias is deprecated. Use SpatialExternalSurfaceProtection instead. |
Top-level functions summary
SceneCoreEntitySizeAdapter<T> |
<T : Entity> This function is deprecated. SceneCoreEntitySizeAdapter is now an interface and intrinsicSize has been renamed to currentSize. |
Top-level functions
SceneCoreEntitySizeAdapter
fun <T : Entity>SceneCoreEntitySizeAdapter(
onLayoutSizeChanged: T.(IntVolumeSize) -> Unit,
intrinsicSize: (T.() -> IntVolumeSize)? = null
): SceneCoreEntitySizeAdapter<T>
The sizing strategy used by SceneCoreEntity to control and read the size of an entity.
The developer should use onLayoutSizeChanged to apply compose layout size changes to the entity. Compose will not inherently affect the size of the Entity.
If the developer uses onLayoutSizeChanged to change the size of the entity, but intrinsicSize is not provided, then the intrinsic size of the entity will be ignored and the layout size as determined solely by compose will be used to size the entity. If the SceneCoreEntity has no children or size modifiers then compose doesn't know how to size this node and it will be size 0, causing it not to render at all. In such a case, please do one of the following: (1) provide intrinsicSize so compose can infer the size from the entity, (2) add a sizing modifier to control the size of the entity, or (3) remove the adapter from the SceneCoreEntity as without an adapter compose will not try to control the size of this entity.
Note that many SceneCore entities accept sizes in meter units instead of pixels. androidx.xr.scenecore.Scene.virtualPixelDensity can be used to convert between pixels and meters.
pixelDensity.convertPixelsToMeters(px)
Deprecated constructor function to maintain backwards compatibility after changing SceneCoreEntitySizeAdapter from a class to an interface.
| Parameters | |
|---|---|
onLayoutSizeChanged: T.(IntVolumeSize) -> Unit |
a callback that is invoked with the final layout size of the composable in pixels. |
intrinsicSize: (T.() -> IntVolumeSize)? = null |
a getter method that returns the current |