Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeviceSourceManager

Class to keep track of devices

Hierarchy

  • DeviceSourceManager

Implements

Index

Constructors

constructor

  • Default Constructor

    Parameters

    • engine: Engine

      engine to pull input element from

    Returns DeviceSourceManager

Properties

Readonly onDeviceConnectedObservableSearch playground for onDeviceConnectedObservable

onDeviceConnectedObservable: Observable<DeviceSource<DeviceType>>

Observable to be triggered when after a device is connected, any new observers added will be triggered against already connected devices

Readonly onDeviceDisconnectedObservableSearch playground for onDeviceDisconnectedObservable

onDeviceDisconnectedObservable: Observable<DeviceSource<DeviceType>>

Observable to be triggered when after a device is disconnected

Methods

disposeSearch playground for dispose

  • dispose(): void
  • Dispose of DeviceInputSystem and other parts

    Returns void

getDeviceSourceSearch playground for getDeviceSource

  • Gets a DeviceSource, given a type and slot

    Type parameters

    Parameters

    • deviceType: T

      Enum specifying device type

    • Optional deviceSlot: number

      "Slot" or index that device is referenced in

    Returns Nullable<DeviceSource<T>>

    DeviceSource object

getDeviceSourcesSearch playground for getDeviceSources

  • getDeviceSources<T>(deviceType: T): ReadonlyArray<DeviceSource<T>>
  • Gets an array of DeviceSource objects for a given device type

    Type parameters

    Parameters

    • deviceType: T

      Enum specifying device type

    Returns ReadonlyArray<DeviceSource<T>>

    Array of DeviceSource objects

getDevicesSearch playground for getDevices

  • Returns a read-only list of all available devices

    Returns ReadonlyArray<DeviceSource<DeviceType>>

    Read-only array with active devices

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method