API reference
API reference
Select your platform
No SDKs available
No versions available

HoverEffectOverlayManager Class

Modifiers: final
Manages a transparent overlay surface for rendering hover effects on top of panels.
This class:
  • Creates and manages an overlay bound to the panel's SceneObject
  • Manages CanvasHoverEffect instances for each hovered element
  • Runs an animation loop to update and render effects at ~60fps
Supports two overlay methods:
  • HoverEffectMethod.Surface: Uses SurfaceControl parented to the panel's root surface. Works for in-process panels (view-based + IPAB). Supports occlusion.
  • HoverEffectMethod.Compositor: Uses SceneQuadLayer + SceneSwapchain. Works for all panel types including out-of-process panels. Does not support occlusion.
Ported from VrShell InputVisualizer.java orchestration pattern.

Signature

class HoverEffectOverlayManager(val method: HoverEffectMethod)

Constructors

HoverEffectOverlayManager ( method )
Signature
constructor(method: HoverEffectMethod)
Parameters
method: HoverEffectMethod  The hover effect overlay method to use

Properties

[Get]
The hover effect overlay method to use
Signature
val method: HoverEffectMethod

Methods

destroy ()
Releases all resources. Call when the manager is no longer needed.
Signature
fun destroy()
ensureOverlay ( panelSceneObject , scene , shapeConfig , fallbackSurfaceControl )
Ensures the overlay surface exists for the given panel. Creates a new overlay bound to the panel's SceneObject. If the panel changes, the overlay is recreated on the new panel.
Signature
fun ensureOverlay(panelSceneObject: PanelSceneObject, scene: Scene? = null, shapeConfig: PanelShapeConfig? = null, fallbackSurfaceControl: AttachedSurfaceControl?): Boolean
Parameters
panelSceneObject: PanelSceneObject  The panel to create the overlay on
scene: Scene?  The Scene to create the overlay layer in (Compositor mode only)
shapeConfig: PanelShapeConfig?  The panel's shape config for physical dimensions (Compositor mode only)
fallbackSurfaceControl: AttachedSurfaceControl?  Optional surface control when rootView is unavailable (Surface mode only)
Returns
Boolean  true if the overlay surface is ready for rendering
isHovering ()
Returns true if there is an active hover effect being rendered.
Signature
fun isHovering(): Boolean
Returns
Boolean
onHover ( bounds )
Called when hovering over an element. Creates or updates the hover effect for the element.
Signature
fun onHover(bounds: Rect)
Parameters
bounds: Rect  The pixel bounds of the hovered element
onUnhover ()
Called when no longer hovering over any element. Fades out all active effects.
Signature
fun onUnhover()