priorityOf static method

VrInputPriority priorityOf(
  1. VrInputSource source
)

Maps a source to the stable VRlizate priority hierarchy.

Implementation

static VrInputPriority priorityOf(VrInputSource source) {
  return switch (source) {
    VrInputSource.remotePhone ||
    VrInputSource.touch => VrInputPriority.maximum,
    VrInputSource.gaze => VrInputPriority.base,
    VrInputSource.templeTap ||
    VrInputSource.voice ||
    VrInputSource.sonar ||
    VrInputSource.cameraHand ||
    VrInputSource.gamepad ||
    VrInputSource.externalPeripheral => VrInputPriority.medium,
  };
}