DeviceMotionEvent

open class DeviceMotionEvent(val type: EventType<DeviceMotionEvent>, init: DeviceMotionEventInit = definedExternally) : Event(source)

The DeviceMotionEvent interface of the Device Orientation Events provides web developers with information about the speed of changes for the device's position and orientation. Available only in secure contexts.

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<DeviceMotionEvent>, init: DeviceMotionEventInit = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The acceleration read-only property of the DeviceMotionEvent interface returns the acceleration recorded by the device, in meters per second squared (m/s²).

Link copied to clipboard

The accelerationIncludingGravity read-only property of the DeviceMotionEvent interface returns the amount of acceleration recorded by the device, in meters per second squared (m/s²).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The interval read-only property of the DeviceMotionEvent interface returns the interval, in milliseconds, at which data is obtained from the underlying hardware.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The rotationRate read-only property of the DeviceMotionEvent interface returns the rate at which the device is rotating around each of its axes in degrees per second.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val type: EventType<DeviceMotionEvent>

Functions

Link copied to clipboard
open override fun asInit(): DeviceMotionEventInit
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard