class DeviceRotationEvent
package openfl.events
extends Event
Available on AIR, Android, HashLink, Linux, Neko, Windows, iOS, macOS
The DeviceRotation class dispatches DeviceRotationEvent and returns roll, yaw, pitch and quaternion data when DeviceRotation updates are obtained from the combined readings from Accelerometer and Gyroscope sensors' readings installed on the device.
See also:
Static variables
staticinlineread onlyUPDATE:EventType<DeviceRotationEvent> = "update"
Defines the value of the type
property of a update
event object.
Constructor
new(type:String, bubbles:Bool = false, cancelable:Bool = false, timestamp:Float = 0, roll:Float = 0, pitch:Float = 0, yaw:Float = 0, ?quaternion:Array<Float>)
Creates an DeviceRotationEvent object that contains information about roll, yaw, pitch along the three dimensional axis. Event objects are passed as parameters to event listeners.
Variables
timestamp:Float
The number of milliseconds at the time of the event since the runtime was initialized. For example, if the device captures DeviceRotation data 4 seconds after the application initializes, then the timestamp property of the event is set to 4000.