SpatialExternalSurface360Sphere

Functions summary

Unit
@Composable
@SubspaceComposable
SpatialExternalSurface360Sphere(
    stereoMode: StereoMode,
    modifier: SubspaceModifier,
    radius: Dp,
    featheringEffect: SpatialFeatheringEffect?,
    surfaceProtection: SurfaceProtection,
    interactionPolicy: InteractionPolicy?,
    superSamplingPattern: SuperSamplingPattern,
    onSurface: SpatialExternalSurfaceScope.() -> Unit
)

A Composable that creates and owns an Android Surface into which the application can render stereo image content inside a 360 degree sphere dome.

Functions

SpatialExternalSurface360Sphere

@Composable
@SubspaceComposable
fun SpatialExternalSurface360Sphere(
    stereoMode: StereoMode,
    modifier: SubspaceModifier = SubspaceModifier,
    radius: Dp = SpatialExternalSurfaceDefaults.sphereRadius,
    featheringEffect: SpatialFeatheringEffect? = null,
    surfaceProtection: SurfaceProtection = SurfaceProtection.None,
    interactionPolicy: InteractionPolicy? = null,
    superSamplingPattern: SuperSamplingPattern = SuperSamplingPattern.Pentagon,
    onSurface: SpatialExternalSurfaceScope.() -> Unit
): Unit

A Composable that creates and owns an Android Surface into which the application can render stereo image content inside a 360 degree sphere dome. This Surface is then texture mapped to the canvas, and if a stereoscopic StereoMode is specified, then the User will see left and right eye content mapped to the appropriate display.

This Composable orients itself to match the parent Pose and has no layout size. While this Composable is active, a temporary preferred environment will be set, if one isn't already set, to put the user inside a boundary. In cases where the user has not consented to the boundary or if passthrough is ever fully enabled, a transparent feathered surface will display instead.

It is not currently possible to synchronize StereoMode changes with application rendering or video decoding.

Playing certain content will require the proper SurfaceProtection. This is mainly used to protect DRM video content.

Parameters
stereoMode: StereoMode

The StereoMode which describes how parts of the surface are displayed to the user's eyes. This will affect how the content is interpreted and displayed on the surface.

modifier: SubspaceModifier = SubspaceModifier

SubspaceModifiers to apply to the sphere. A sphere's measured size is automatically inferred from radius and does not need to be set through a modifier.

radius: Dp = SpatialExternalSurfaceDefaults.sphereRadius

The radius of the dome displaying the video.

featheringEffect: SpatialFeatheringEffect? = null

A SpatialFeatheringEffect to apply to to canvas of the surface exposed from SpatialExternalSurfaceScope.onSurfaceCreated. For sphere domes, vertical feathering applies to the top and bottom poles of the dome, while horizontal feathering applies to the left and right sides where the video is stitched together.

surfaceProtection: SurfaceProtection = SurfaceProtection.None

Sets the Surface's content protection. Use this to redact content in screen recordings. Setting this to SurfaceProtection.Protected is required if decoding DRM media content.

interactionPolicy: InteractionPolicy? = null

An optional InteractionPolicy that can be set to detect input events.

superSamplingPattern: SuperSamplingPattern = SuperSamplingPattern.Pentagon

The pattern to use to super sample this surface, or SuperSamplingPattern.None to disable super sampling.

onSurface: SpatialExternalSurfaceScope.() -> Unit

Lambda invoked when the surface is created through SpatialExternalSurfaceScope.onSurfaceCreated and destroyed through SpatialExternalSurfaceScope.onSurfaceDestroyed.