@Generated(value="org.realityforge.webtack") @JsType(isNative=true, namespace="<global>", name="DeviceOrientationEvent") public class DeviceOrientationEvent extends Event
AT_TARGET, BUBBLING_PHASE, cancelBubble, CAPTURING_PHASE, NONE, returnValue
Constructor and Description |
---|
DeviceOrientationEvent(java.lang.String type)
The DeviceOrientationEvent constructor creates a new DeviceOrientationEvent.
|
DeviceOrientationEvent(java.lang.String type,
DeviceOrientationEventInit eventInitDict)
The DeviceOrientationEvent constructor creates a new DeviceOrientationEvent.
|
Modifier and Type | Method and Description |
---|---|
boolean |
absolute()
Indicates whether or not the device is providing orientation data absolutely (that is, in reference to the Earth's coordinate frame) or using some arbitrary frame determined by the device.
|
java.lang.Double |
alpha()
Returns the rotation of the device around the Z axis; that is, the number of degrees by which the device is being twisted around the center of the screen.
|
java.lang.Double |
beta()
Returns the rotation of the device around the X axis; that is, the number of degrees, ranged between -180 and 180, by which the device is tipped forward or backward.
|
java.lang.Double |
gamma()
Returns the rotation of the device around the Y axis; that is, the number of degrees, ranged between -90 and 90, by which the device is tilted left or right.
|
static Promise<java.lang.String> |
requestPermission() |
bubbles, cancelable, composed, composedPath, currentTarget, defaultPrevented, eventPhase, initEvent, initEvent, initEvent, isTrusted, preventDefault, srcElement, stopImmediatePropagation, stopPropagation, target, timeStamp, type
public DeviceOrientationEvent(@Nonnull java.lang.String type, @Nonnull DeviceOrientationEventInit eventInitDict)
public DeviceOrientationEvent(@Nonnull java.lang.String type)
@JsProperty(name="absolute") public boolean absolute()
@JsProperty(name="alpha") @Nullable public java.lang.Double alpha()
@JsProperty(name="beta") @Nullable public java.lang.Double beta()
@JsProperty(name="gamma") @Nullable public java.lang.Double gamma()
@Nonnull public static Promise<java.lang.String> requestPermission()