HtmlPlatformDevice provides the HTML5 versions of the key parts of a PlatformDevice. It is the default implementation.

Implements

Constructors

Properties

Methods

Constructors

  • Construct an HtmlPlatformDevice

    Parameters

    • accelerometerMode: AccelerometerMode = AccelerometerMode.DISABLED

      The desired mode for the accelerometer. Defaults to DISABLED

    Returns HtmlPlatformDevice

Properties

accelerometerMode: AccelerometerMode = AccelerometerMode.DISABLED

The desired mode for the accelerometer. Defaults to DISABLED

Methods

  • Quit the game and close its window

    Returns void

  • Vibrate the device for some number of milliseconds

    Parameters

    • ms: number

      The number of milliseconds to vibrate

    Returns void