Links

Quick API

This API is all you need to utilize Lightfield displays. Our modules may have public functions but are intended to be used through their prefab or component GUI.

Switching Lightfield Mode

Lightfield mode can be changed using the LeiaDisplay Instance.
using LeiaLoft;
LeiaDisplay.Instance.DesiredLightfieldMode = LeiaDisplay.LightfieldMode.Off;
LeiaDisplay.Instance.DesiredLightfieldMode = LeiaDisplay.LightfieldMode.On;
The following API has been deprecated in 0.6.14+, replaced with Lightfield Mode.
LeiaDisplay.Instance.DesiredLeiaStateID = "HPO"; LeiaDisplay.Instance.DesiredLeiaStateID = "2D";

Setting Convergence Distance

Editor: Use the inspector to change the Convergence Distance variable on the LeiaCamera component attached to a Camera GameObject.
using LeiaLoft;
LeiaCamera _LeiaCam = LeiaCamera.Instance;
_LeiaCam.convergenceDistance = 10f;

Setting Baseline Scaling

Editor: Use the inspector to change the Convergence Distance variable on the LeiaCamera component that is attached to a Camera GameObject.
using LeiaLoft;
LeiaCamera _LeiaCam = LeiaCamera.Instance;
_LeiaCam.baselineScaling = 0.3f;