Available on AIR, Android, Flash, 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.
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.
The pitch along the x-axis, measured in degrees.
Quaternion data for the device rotation in the [w, x, y, z] format.
The roll along the y-axis, measured in degrees.
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.
The yaw along the z-axis, measured in degrees.