JxrPlatformAdapter.Component


interface JxrPlatformAdapter.Component

Known direct subclasses
JxrPlatformAdapter.InteractableComponent

Component to enable input interactions.

JxrPlatformAdapter.MovableComponent

Component to enable a high level user movement affordance.

JxrPlatformAdapter.PointerCaptureComponent

Component to enable pointer capture.

JxrPlatformAdapter.ResizableComponent

Component to enable resize semantics.


Base interface for all components.

Summary

Public functions

Boolean

Lifecycle event, called when component is attached to an Entity.

Unit

Lifecycle event, called when component is detached from an Entity.

Public functions

onAttach

Added in 1.0.0-alpha01
fun onAttach(entity: JxrPlatformAdapter.Entity): Boolean

Lifecycle event, called when component is attached to an Entity.

Parameters
entity: JxrPlatformAdapter.Entity

Entity the component is attached to.

Returns
Boolean

True if the component can attach to the given entity.

onDetach

Added in 1.0.0-alpha01
fun onDetach(entity: JxrPlatformAdapter.Entity): Unit

Lifecycle event, called when component is detached from an Entity.

Parameters
entity: JxrPlatformAdapter.Entity

Entity the component detached from.