jetlag2d
    Preparing search index...

    Interface PlatformDevice

    PlatformDevice provides an abstract way of describing things that depend on the platform:

    • Device Vibration
    • App Termination
    • Tilt/Accelerometer

    At the current time, this is over-engineered. But if you wish to support mobile devices (e.g., by using Capacitor.js), then this will be useful.

    interface PlatformDevice {
        accelerometerMode: AccelerometerMode;
        quitter(): void;
        vibrate(ms: number): void;
    }

    Implemented by

    Index
    accelerometerMode: AccelerometerMode

    The behavior of the device accelerometer

    • Vibrate the device for some number of milliseconds

      Parameters

      • ms: number

        The number of milliseconds to vibrate

      Returns void