API reference

StereoCanvasPanelScope Interface

Draw scope that writes content into eye viewports of a stereo canvas panel surface.

Signature

interface StereoCanvasPanelScope

Properties

ipdMeters : Float
[Get]
IPD in meters — measured from the runtime, or StereoCanvasPanelScope.Companion.defaultStereoFallbackIpdMeters when the backend returns no eye offset data.
Signature
abstract val ipdMeters: Float
[Get]
Signature
abstract val layout: StereoCanvasLayout
panelDistanceMeters : Float
[Get]
Head-to-panel distance in meters, sampled when this scope was created.
Signature
abstract val panelDistanceMeters: Float
panelWidthMeters : Float
[Get]
Panel width in meters from the configured shape options. 0 if unknown (e.g. equirect).
Signature
abstract val panelWidthMeters: Float
perEyeHeightPx : Int
[Get]
Signature
abstract val perEyeHeightPx: Int
perEyeWidthPx : Int
[Get]
Signature
abstract val perEyeWidthPx: Int

Methods

clear ( color )
Signature
abstract fun clear(color: Int = Color.TRANSPARENT)
Parameters
color: Int
drawFlat ( draw )
Parameters
draw: Function1
drawStereo ( depthOffsetMeters , draw )
Draws stereo content offset by a world-space depth from the panel surface.
Positive values float content in front of the panel (toward the viewer); negative values push it behind the panel. The SDK converts to per-eye pixel disparity using the current viewer pose, panel pose, panel pixel density, and IPD. Sampling happens at draw time, so disparity auto-adjusts as the viewer moves.
Parameters
depthOffsetMeters: Float  Depth offset from the panel surface in meters (positive = forward).
draw: Function1  Block that receives a Canvas clipped to the current eye viewport.
drawStereoRaw ( disparityPx , draw )
Draws stereo content offset by a raw pixel disparity.
Prefer StereoCanvasPanelScope.drawStereo — pixel disparity does not account for the distance between the viewer and the panel, so the perceived depth changes as the viewer moves. Use this when the caller already computes a pixel value (for example, depth sampled from an image).
Parameters
disparityPx: Float  Horizontal offset in surface pixels between left and right eyes.
draw: Function1  Block that receives a Canvas clipped to the current eye viewport.

Companion Object

Properties

defaultStereoFallbackIpdMeters : Float
[Get][Set]
Global fallback IPD in meters used when runtime eye offsets are unavailable for stereo depth calculations.
Signature
var defaultStereoFallbackIpdMeters: Float