diff --git a/index.html b/index.html
index 23f3344..3b74579 100644
--- a/index.html
+++ b/index.html
@@ -311,7 +311,7 @@
`null`
- List of generated touch events.
+ List of generated touches.
|
@@ -477,9 +477,9 @@
- A list of {{GamepadTouch}} events generated from all touch
- surfaces. If the device does not support touch events, MUST be set
- to `null`.
+ A list of {{GamepadTouch}} objects generated from all touch
+ surfaces. If the device does not support touches, MUST be set to
+ `null`.
The {{Gamepad/touches}} getter steps are:
@@ -683,26 +683,19 @@
steps:
- - Let |surfaceId:unsigned long| be 0.
-
- - Remove any existing events from
+
- Remove any existing objects from
{{Gamepad}}.{{Gamepad/[[touches]]}}.
- Repeat the following steps for each touch surface on |gamepad| in
touch surface enumeration order:
- - Let |surfaceDimensions| be an `null`.
+
- Let |surfaceId:unsigned long| be the current surface
+ enumeration index.
- If the touch surface exposes maximum surface dimensions in
- device units:
-
- - Set |touchEvent|.{{GamepadTouch/surfaceDimensions}}[0] to
- the maximum X dimension on the touch surface in device units.
-
- - Set |touchEvent|.{{GamepadTouch/surfaceDimensions}}[1] to
- the maximum Y dimension on the touch surface in device units.
-
-
+ device units, then set |touch|.{{GamepadTouch/surfaceDimensions}}
+ to a {{DOMRect}} with `width` and `height` initialized to the
+ maximum X and Y dimensions on the touch surface in device units.
- Repeat the following steps for each active touch point
reported by the |gamepad| for the current touch surface.
@@ -710,16 +703,15 @@
- Let |nextTouchId:unsigned long| be the next available
touchId for the |gamepad|.
- - Let |touchEvent:GamepadTouch| be a {{GamepadTouch}}.
+
- Let |touch:GamepadTouch| be a {{GamepadTouch}}.
- - Set |touchEvent|.{{GamepadTouch/surfaceId}} to be
- |surfaceId|.
+
- Set |touch|.{{GamepadTouch/surfaceId}} to be |surfaceId|.
- If the touch data is part of an existing active touch
point tracked by the user agent:
- - Set |touchEvent|.{{GamepadTouch/touchId}} to the
- touchId of the active touch point.
+
- Set |touch|.{{GamepadTouch/touchId}} to the touchId
+ of the active touch point.
- Otherwise, set touchId to nextTouchId and increment
nextTouchId.
@@ -731,48 +723,28 @@
- - Let |position| be a [=new=] {{Float32Array}} with length
- 2.
+
- Let |position| be a [=new=] {{DOMPoint}} with `x`
+ initialized to device X coordinate relative to the device
+ touch surface and normalized to [-1.0,1.0] where -1.0 is the
+ leftmost coordinate and 1.0 is the rightmost coordinate and
+ `y` initialized to the device touch surface and normalized to
+ [-1.0,1.0] where -1.0 is the leftmost coordinate and 1.0 is
+ the rightmost coordinate.
- -
-
- |position|[0] should be set to the device X coordinate
- relative to the device touch surface and normalized to
- [-1.0,1.0] where -1.0 is the leftmost coordinate and 1.0
- is the rightmost coordinate.
-
-
- `position[0] = (2.0 * touchData.x / surfaceDimensions[0])
- - 1`
-
-
- -
-
- |position|[1] should be set to the device Y coordinate
- relative to the device touch surface and normalized to
- [-1.0,1.0] where -1.0 is the topmost coordinate and 1.0
- is the bottommost coordinate.
-
-
- `position[1] = (2.0 * touchData.y / surfaceDimensions[1])
- - 1`
-
+
+ `x = (2.0 * touchData.x / surfaceDimensions.width) - 1`
+
+
+ `y = (2.0 * touchData.y / surfaceDimensions.height) - 1`
+
+ - Add |touch| to {{Gamepad}}.{{Gamepad/[[touches]]}}.
- - Set |touchEvent|.{{GamepadTouch/position}} to be
- |position:Float32Array|.
-
- - Add |touchEvent| to {{Gamepad}}.{{Gamepad/[[touches]]}}.
-
-
Increment |surfaceId|
-
- Increment |surfaceId|
-
@@ -1214,18 +1186,19 @@
position
- x, y coordinates of the touch event. Range of each coordinate is
- normalized to [-1.0, 1.0]. Along the x-axis, -1.0 references the
+ A {{DOMPoint}} which holds the x, y coordinates of the touch event.
+ The z and w value are currently unused. The range of each coordinate
+ is normalized to [-1.0, 1.0]. Along the x-axis, -1.0 references the
leftmost coordinate and 1.0 references the rightmost coordinate.
Along the y-axis, -1.0 references the topmost coordinate and 1.0
- references the bottommost coordinate. MUST be a two-element array.
+ references the bottommost coordinate.
surfaceDimensions
- Width and height of the touch surface in integer units. When not
- null
, MUST be a two-element array.
+ A {{DOMRect}} initialized with the width and height of the touch
+ surface in integer units. If not available then null
.