Class Controller

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(host?: string): Controller

Parameters

  • host?: string optional

Returns

Controller

Properties

public _isConnected: boolean

public _isGesturesEnabled: boolean

public connection: WebSocket

public frameHistory: Frame[]

private latestFrame: any

private listener: any

Methods

public addEventListener(typeStr: string, listenerFunc: Function)

Parameters

  • typeStr: string
  • listenerFunc: Function

public dispatchEvent(evt: LeapEvent)

Parameters

public enableGesture(type: number, enable?: boolean)

Parameters

  • type: number
  • enable?: boolean optional

public frame(history?: number): Frame

Parameters

  • history?: number optional

Returns

Frame

private static getHandByID(frame: any, id: any): any

Parameters

  • frame: any
  • id: any

Returns

any

private static getPointableByID(frame: any, id: any): any

Parameters

  • frame: any
  • id: any

Returns

any

public hasEventListener(type: string, listener: Function): boolean

Parameters

  • type: string
  • listener: Function

Returns

boolean

public isConnected(): boolean

Returns

boolean

public isGestureEnabled(type: number): boolean

Parameters

  • type: number

Returns

boolean

public removeEventListener(typeStr: string, listenerFunc: Function)

Parameters

  • typeStr: string
  • listenerFunc: Function

public setListener(listener: Listener)

Parameters