Skip to content

Commit

Permalink
Editorial: use more bikeshed shorthands (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres authored May 8, 2024
1 parent abbeb98 commit 4188005
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Device Orientation {#device-orientation-model}

This specification expresses a device's physical orientation as a series of rotations relative to an [=implementation-defined=] reference coordinate frame.

The sequence of rotation steps is a set of intrinsic Tait-Bryan angles of type Z - X' - Y'' ([[EULERANGLES]]) that are applied on the <a>device coordinate system</a> defined in [[!ACCELEROMETER]] and summarized below:
The sequence of rotation steps is a set of intrinsic Tait-Bryan angles of type Z - X' - Y'' ([[EULERANGLES]]) that are applied on the [=device coordinate system=] defined in [[!ACCELEROMETER]] and summarized below:
* <dfn for="Device Orientation">x</dfn> is in the plane of the screen or keyboard and is positive towards the right hand side of the screen or keyboard.
* <dfn for="Device Orientation">y</dfn> is in the plane of the screen or keyboard and is positive towards the top of the screen or keyboard.
Expand Down Expand Up @@ -211,7 +211,7 @@ Note: In native platform terms, this is similar to an absolute <a href="https://
Device Motion {#device-motion-model}
-------------

This specification expresses a device's motion in space by measuring its acceleration and rotation rate, which are obtained from an accelerometer and a gyroscope. The data is provided relative to the <a>device coordinate system</a> summarized in the previous section.
This specification expresses a device's motion in space by measuring its acceleration and rotation rate, which are obtained from an accelerometer and a gyroscope. The data is provided relative to the [=device coordinate system=] summarized in the previous section.

Acceleration is the rate of change of velocity of a device with respect to time. Is is expressed in meters per second squared (m/s<sup>2</sup>).

Expand All @@ -221,7 +221,7 @@ When the acceleration <dfn lt="acceleration with gravity">includes gravity</dfn>

Note: In practice, <a>acceleration with gravity</a> represents the raw readings obtained from an [[MOTION-SENSORS#accelerometer]], or the [[G-FORCE]] whereas <a>linear acceleration</a> provides the readings of a [[MOTION-SENSORS#linear-acceleration-sensor]] and is likely a fusion sensor. [[MOTION-SENSORS]] and [[ACCELEROMETER]] both contain a more detailed discussion about the different types of accelerometers and accelerations that can be measured.

The <dfn>rotation rate</dfn> measures the rate at which the device rotates about a specified axis in the <a>device coordinate system</a>. As with device orientation, rotations must use the right-hand convention, such that positive rotation around an axis is clockwise when viewed along the positive direction of the axis. The <a>rotation rate</a> is measured in degrees per second (deg/s).
The <dfn>rotation rate</dfn> measures the rate at which the device rotates about a specified axis in the [=device coordinate system=]. As with device orientation, rotations must use the right-hand convention, such that positive rotation around an axis is clockwise when viewed along the positive direction of the axis. The [=rotation rate=] is measured in degrees per second (deg/s).

Note: [[MOTION-SENSORS]] and [[GYROSCOPE]] both contain a more detailed discussion of gyroscopes, rotation rates and measurements.

Expand Down Expand Up @@ -288,7 +288,7 @@ The <dfn attribute for="DeviceOrientationEvent">beta</dfn> attribute must return

The <dfn attribute for="DeviceOrientationEvent">gamma</dfn> attribute must return the value it was initialized to. It represents the rotation around the Y'' axis (produced after the rotation around the Z and X' axes have been applied in this order) in the Z - X' - Y'' intrinsic Tait-Bryan angles described in [[#device-orientation-model]].

The <dfn attribute for="DeviceOrientationEvent">absolute</dfn> attribute must return the value it was initialized to. It indicates whether <a>relative orientation</a> or <a>absolute orientation</a> data is being provided.
The <dfn attribute for="DeviceOrientationEvent">absolute</dfn> attribute must return the value it was initialized to. It indicates whether [=relative orientation=] or [=absolute orientation=] data is being provided.

<div algorithm>
The <dfn method for="DeviceOrientationEvent">requestPermission(|absolute|)</dfn> method steps are:
Expand Down Expand Up @@ -352,9 +352,9 @@ To <dfn>fire an orientation event</dfn> given a {{DOMString}} |event|, {{Window}

</div>

A <dfn>significant change in orientation</dfn> indicates a difference in orientation values compared to the previous ones that warrants the firing of a <a event for="Window"><code>deviceorientation</code></a> or <a event for="Window"><code>deviceorientationabsolute</code></a> event. The process of determining whether a <a>significant change in orientation</a> has occurred is [=implementation-defined=], though a maximum threshold for change of 1 degree is recommended. Implementations may also consider that it has occurred if they have reason to believe that the page does not have sufficiently fresh data.
A <dfn>significant change in orientation</dfn> indicates a difference in orientation values compared to the previous ones that warrants the firing of a <a event for="Window">deviceorientation</a> or <a event for="Window">deviceorientationabsolute</a> event. The process of determining whether a [=significant change in orientation=] has occurred is <a>implementation-defined</a>, though a maximum threshold for change of 1 degree is recommended. Implementations may also consider that it has occurred if they have reason to believe that the page does not have sufficiently fresh data.

Note: Implementations must take [[#automation]] into account to determine whether a <a>significant change in orientation</a> has occurred, so that a virtual sensor reading update causes it to be assessed.
Note: Implementations must take [[#automation]] into account to determine whether a [=significant change in orientation=] has occurred, so that a virtual sensor reading update causes it to be assessed.

<div algorithm="deviceorientation firing steps">
Whenever a <a>significant change in orientation</a> occurs, the user agent must execute the following steps on a <a for="/">navigable</a>'s <a for="navigable">active window</a> <var>window</var>:
Expand Down Expand Up @@ -393,10 +393,10 @@ partial interface Window {
The <dfn attribute for="Window">ondeviceorientationabsolute</dfn> attribute is an [=event handler IDL attribute=] for the <code>ondeviceorientationabsolute</code> [=event handler=], whose [=event handler event type=] is <dfn event for="Window" id="def-deviceorientationabsolute"><code>deviceorientationabsolute</code></dfn>.

A <a event for="Window"><code>deviceorientationabsolute</code></a> event is completely analogous to the <a event for="Window"><code>deviceorientation</code></a> event, except that it must always provide <a>absolute orientation</a> data.
A <a event for="Window">deviceorientationabsolute</a> event is completely analogous to the <a event for="Window">deviceorientation</a> event, except that it must always provide [=absolute orientation=] data.

<div algorithm="deviceorientationabsolute firing steps">
Whenever a <a>significant change in orientation</a> occurs, the user agent must execute the following steps on a <a for="/">navigable</a>'s <a for="navigable">active window</a> <var>window</var>:
Whenever a [=significant change in orientation=] occurs, the user agent must execute the following steps on a [=/navigable=]'s [=navigable/active window=] |window|:

1. [=Fire an orientation event=] with <a event for="Window">deviceorientationabsolute</a>, |window|, and true.

Expand Down Expand Up @@ -430,11 +430,11 @@ The {{DeviceMotionEventAcceleration}} interface represents the device's accelera
: <dfn for="DeviceMotionEventAcceleration">z axis acceleration</dfn>
:: The device's acceleration rate along the Z axis, or null. It is initially null.

The <dfn attribute for="DeviceMotionEventAcceleration">x</dfn> getter steps are to return the value of <a>this</a>'s <a for="DeviceMotionEventAcceleration">x axis acceleration</a>.
The <dfn attribute for="DeviceMotionEventAcceleration">x</dfn> getter steps are to return the value of [=this=]'s [=DeviceMotionEventAcceleration/x axis acceleration=].

The <dfn attribute for="DeviceMotionEventAcceleration">y</dfn> getter steps are to return the value of <a>this</a>'s <a for="DeviceMotionEventAcceleration">y axis acceleration</a>.
The <dfn attribute for="DeviceMotionEventAcceleration">y</dfn> getter steps are to return the value of [=this=]'s [=DeviceMotionEventAcceleration/y axis acceleration=].

The <dfn attribute for="DeviceMotionEventAcceleration">z</dfn> getter steps are to return the value of <a>this</a>'s <a for="DeviceMotionEventAcceleration">z axis acceleration</a>.
The <dfn attribute for="DeviceMotionEventAcceleration">z</dfn> getter steps are to return the value of [=this=]'s [=DeviceMotionEventAcceleration/z axis acceleration=].

### The DeviceMotionEventRotationRate interface ### {#device-motion-event-rotation-rate-api}

Expand All @@ -447,7 +447,7 @@ interface DeviceMotionEventRotationRate {
};
</pre>

The {{DeviceMotionEventRotationRate}} interface represents the device's <a>rotation rate</a> as described in [[#device-motion-model]]. It has the following associated data:
The {{DeviceMotionEventRotationRate}} interface represents the device's [=rotation rate=] as described in [[#device-motion-model]]. It has the following associated data:

: <dfn for="DeviceMotionEventRotationRate">x axis rotation rate</dfn>
:: The device's rotation rate about the X axis, or null. It is initially null.
Expand All @@ -456,11 +456,11 @@ The {{DeviceMotionEventRotationRate}} interface represents the device's <a>rotat
: <dfn for="DeviceMotionEventRotationRate">z axis rotation rate</dfn>
:: The device's rotation rate about the Z axis, or null. It is initially null.

The <dfn attribute for="DeviceMotionEventRotationRate">alpha</dfn> getter steps are to return the value of <a>this</a>'s <a for="DeviceMotionEventRotationRate">x axis rotation rate</a>.
The <dfn attribute for="DeviceMotionEventRotationRate">alpha</dfn> getter steps are to return the value of [=this=]'s <a for="DeviceMotionEventRotationRate">x axis rotation rate</a>.

The <dfn attribute for="DeviceMotionEventRotationRate">beta</dfn> getter steps are to return the value of <a>this</a>'s <a for="DeviceMotionEventRotationRate">y axis rotation rate</a>.
The <dfn attribute for="DeviceMotionEventRotationRate">beta</dfn> getter steps are to return the value of [=this=]'s <a for="DeviceMotionEventRotationRate">y axis rotation rate</a>.

The <dfn attribute for="DeviceMotionEventRotationRate">gamma</dfn> getter steps are to return the value of <a>this</a>'s <a for="DeviceMotionEventRotationRate">z axis rotation rate</a>.
The <dfn attribute for="DeviceMotionEventRotationRate">gamma</dfn> getter steps are to return the value of [=this=]'s <a for="DeviceMotionEventRotationRate">z axis rotation rate</a>.

### The DeviceMotionEvent interface ### {#device-motion-event-api}

Expand Down

0 comments on commit 4188005

Please sign in to comment.