Repository

DualShock4

Extends:

Component → DualShock4

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

buttons: {}

public
public
public
public
public

leftPad: {"x": *, "y": *}

public
public
public
public

prevLeftPad: {"x": *, "y": *}

public

prevRightPad: {"x": *, "y": *}

public

rightPad: {"x": *, "y": *}

public

Method Summary

Public Methods
public

getButton(name: *): *

public
public
public

isDualShock(gamepad: *): boolean

public
public
public

updatePad(side: *)

Inherited Summary

From class Component
public
public
public

events: *

public

id: *

public

name: *

private

_nexts: *[]

private
public
public

chain(component: Component)

Adds a component to this chained component array

public

Returns the array of attached children components

public

off()

Deactivate the component

public

on()

Activate the component A call to this method calls the setup method if it has not been run yet

public

Run code after the update of all components is run This empty method is usually overriden to perform post-update actions for the component It is called periodically by an internal Mobilizing mechanism

public

preLoad the component This empty method is usually overriden to perform preLoad actions for the component.

public

Run code before the update of all components is run This empty method is usually overriden to perform pre-update actions for the component It is called once per component by an internal Mobilizing mechanism

public

prepare the component This empty method is usually overriden to perform preparation actions for the component, from external process as a server.

public

Set's up the component This empty method is usually overriden to perform setup actions for the component This is where all the initialization (such as adding event listeners)should be done It is called automatically by an internal Mobilizing mechanism and should thus not be called directly

public

Update the component This empty method is usually overriden to perform update actions for the component It is called periodically by an internal Mobilizing mechanism

Public Constructors

public constructor() source

Override:

Component#constructor

Public Members

public buttons: {} source

public buttonsOrder: string[] source

public connected: boolean source

public dualShock4: * source

public gamepad: * source

public leftPad: {"x": *, "y": *} source

public leftPadScaleFactor: * source

public padSensitivity: * source

public prevButtons: {} source

public prevLeftPad: {"x": *, "y": *} source

public prevRightPad: {"x": *, "y": *} source

public rightPad: {"x": *, "y": *} source

public rightPadScaleFactor: * source

Public Methods

public getButton(name: *): * source

Params:

NameTypeAttributeDescription
name*

Return:

*

public getLeftPad(): * source

Return:

*

public getRightPad(): * source

Return:

*

public isDualShock(gamepad: *): boolean source

Params:

NameTypeAttributeDescription
gamepad*

Return:

boolean

public setup() source

Set's up the component This empty method is usually overriden to perform setup actions for the component This is where all the initialization (such as adding event listeners)should be done It is called automatically by an internal Mobilizing mechanism and should thus not be called directly

Override:

Component#setup

public update() source

Update the component This empty method is usually overriden to perform update actions for the component It is called periodically by an internal Mobilizing mechanism

Override:

Component#update

public updatePad(side: *) source

Params:

NameTypeAttributeDescription
side*