diff --git a/ed/algorithms/gamepad-extensions.json b/ed/algorithms/gamepad-extensions.json deleted file mode 100644 index cffad64a9e59..000000000000 --- a/ed/algorithms/gamepad-extensions.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "spec": { - "title": "Gamepad Extensions", - "url": "https://w3c.github.io/gamepad/extensions.html" - }, - "algorithms": [ - { - "name": "Gamepad/touchEvents", - "href": "https://w3c.github.io/gamepad/extensions.html#dom-gamepad-touchevents", - "html": "The touchEvents getter steps are:", - "rationale": "if", - "steps": [ - { - "html": "If this.[[touchEvents]] not null and not\n empty, return this.[[touchEvents]]." - }, - { - "html": "Otherwise return null." - } - ] - }, - { - "name": "updating touchEvents", - "href": "https://w3c.github.io/gamepad/extensions.html#dfn-updating-touchevents", - "html": "In addtion to the steps defined in the main Gamepad specification. When the\n user agent modifies the list of active touch points for a touch\n surface by adding touch points, removing touch points, or updating\n the values of existing touch points, update touchEvents by running the\n following steps:", - "rationale": ".algorithm", - "steps": [ - { - "html": "Let surfaceId be 0." - }, - { - "html": "Remove any existing events from\n Gamepad.[[touchEvents]]." - }, - { - "html": "Repeat the following steps for each touch surface on\n gamepad in touch surface enumeration order:", - "rationale": "let", - "steps": [ - { - "html": "Let surfaceDimensions be an null." - }, - { - "html": "If the touch surface exposes maximum surface dimensions in\n device units:", - "rationale": "set", - "steps": [ - { - "html": "Set touchEvent.surfaceDimensions[0] to\n the maximum X dimension on the touch surface in device\n units." - }, - { - "html": "Set touchEvent.surfaceDimensions[1] to\n the maximum Y dimension on the touch surface in device\n units." - } - ] - }, - { - "html": "Repeat the following steps for each active touch point\n reported by the gamepad for the current touch surface.", - "rationale": "let", - "steps": [ - { - "html": "Let nextTouchId be the next available\n touchId for the gamepad." - }, - { - "html": "Let touchEvent be a GamepadTouch." - }, - { - "html": "Set touchEvent.surfaceId to be\n surfaceId." - }, - { - "html": "If the touch data is part of an existing active touch\n point tracked by the user agent:", - "rationale": "set", - "steps": [ - { - "html": "Set touchEvent.touchId to the\n touchId of the active touch point." - }, - { - "html": "Otherwise, set touchId to nextTouchId and increment\n nextTouchId." - } - ] - }, - { - "html": "Let position be a new Float32Array with length\n 2." - }, - { - "html": "

\n position[0] should be set to the device X coordinate\n relative to the device touch surface and normalized\n to [-1.0,1.0] where -1.0 is the leftmost coordinate and\n 1.0 is the rightmost coordinate.\n

" - }, - { - "html": "

\n position[1] should be set to the device Y coordinate\n relative to the device touch surface and normalized\n to [-1.0,1.0] where -1.0 is the topmost coordinate and\n 1.0 is the bottommost coordinate.\n

" - } - ] - }, - { - "html": "Set touchEvent.position to be\n position." - }, - { - "html": "Add touchEvent to Gamepad.[[touchEvents]]." - } - ] - }, - { - "html": "Increment surfaceId" - }, - { - "html": "Increment surfaceId" - } - ] - }, - { - "name": "a new Gamepad", - "href": "https://w3c.github.io/gamepad/extensions.html#dfn-a-new-gamepad", - "html": "In addtion to the steps defined in the main Gamepad specification. When\n constructing a new Gamepad representing a connected\n gamepad device perform the following steps:", - "rationale": "let", - "steps": [ - { - "html": "Let gamepad be a newly created Gamepad instance:", - "rationale": "if", - "steps": [ - { - "html": "If the gamepad has touch surfaces, initialize gamepad's\n touchEvents to an empty list." - }, - { - "html": "Otherwise, initialize gamepad's touchEvents\n null." - } - ] - } - ] - } - ] -} \ No newline at end of file