Package-level declarations

Types

Link copied to clipboard
@Stable
sealed class Brightness

Presents Stage's brightness

Link copied to clipboard

Interface that defines the properties of a WindowContainer.

Link copied to clipboard

ContainerProxy is used to describe a window container instance.

Link copied to clipboard
enum Form : Enum<Form>
Link copied to clipboard
class Immersion

The range of Stage's immersion

Link copied to clipboard
class Placement

Placement is used to describe the original position of a window container relative to anchorContainer when a new window container is created.

Link copied to clipboard

PlacementContext holds necessary information for window container placement.

Link copied to clipboard
interface SpatialAppScope

A interface which be used to attach PICO OS concept. ONLY could be touched by developers at app entry point

Link copied to clipboard

Represents how a WindowContainer of form Form.Volumetric will align.

Link copied to clipboard

The size of the WindowContainer. support both Dp and LengthUnit.

Link copied to clipboard
enum WorldScale : Enum<WorldScale>

The way how a WindowContainer will be scaled in the world. Available options include:

Functions

Link copied to clipboard
fun SpatialAppScope.DefaultStage(content: @Composable StageScope.() -> Unit)

The first Stage of app, started by PICO OS. Currently must be configured at app's AndroidManifest.xml

Link copied to clipboard
fun SpatialAppScope.DefaultWindowContainer(content: @Composable WindowContainerScope.() -> Unit)

The first WindowContainer of app, started by PICO OS. Currently must be configured at app's AndroidManifest.xml

Link copied to clipboard
fun Immersion(@IntRange(from = 0, to = 100) default: Int, @IntRange(from = 0, to = 100) min: Int = 0, @IntRange(from = 0, to = 100) max: Int = 100): Immersion

The range of Stage's immersion

Link copied to clipboard
fun Application.launch(block: SpatialAppScope.() -> Unit)

Extension function for android platform, use Application as receiver to start a spatial app context so we can create dsl like this

Link copied to clipboard
inline fun <T : Component> registerComponent()

Extensions for Component to easily register new Component type

Link copied to clipboard
inline fun <T : System> registerSystem()

Extensions for System to easily register new system type

Link copied to clipboard
fun SpatialAppScope.Stage(id: String, immersion: Immersion? = null, brightness: Brightness? = null, upperLimbRenderMode: UpperLimbRenderMode? = null, targetActivity: Class<out ComponentActivity>? = null, content: @Composable StageScope.() -> Unit)

Declare a Stage with unique id. the id is used to executes open/close operation

Link copied to clipboard

Unregister Component by type

Link copied to clipboard
inline fun <T : System> unregisterSystem()

Unregister System by type

Link copied to clipboard
fun SpatialAppScope.WindowContainer(id: String, form: Form? = null, properties: ContainerProperties.() -> Unit = {}, content: @Composable WindowContainerScope.() -> Unit)
fun SpatialAppScope.WindowContainer(id: String, form: Form? = null, defaultSize: WindowContainerSize? = null, resizeType: ContainerResizeType? = null, defaultResizeRestriction: ContainerResizeRestriction? = null, enableMaterialBackground: Boolean? = null, volumeAlignment: VolumeAlignment? = null, defaultVolumeBasePanelType: VolumeBasePanelType? = null, defaultCaptionBarType: CaptionBarType? = null, placement: PlacementContext.() -> Placement? = null, targetActivity: Class<out ComponentActivity>? = null, worldScale: WorldScale? = null, content: @Composable WindowContainerScope.() -> Unit)

Declare a WindowContainer with unique id. the id is used to open/close the WindowContainer.