Re: [w3c/pointerlock] Add lock options to requestPointerLock (#49)

@alvinjiooo commented on this pull request.



> -        to using the keyboard to move the magnified point of focus around
-        instead. When a pointerlockchange event is fired, web browsers
-        therefore need to make sure the event is communicated to assistive
-        technologies like screen magnifiers.
-      </p>
+      <section>
+        <h3>
+          The <dfn>pointer lock state</dfn> definition
+        </h3>
+        <p>
+          The [=pointer lock state=] is the state where a single DOM element,
+          which we will call the <dfn>pointer-lock target</dfn>, receives all
+          mouse events and the cursor is hidden.
+        </p>
+        <p>
+          Once in the [=pointer lock state=] the [=user agent=] has a

How about,

```
    <section>
      <h2>
        Glossary
      </h2>
...
<dt>
          <dfn>Cursor position</dfn>
        </dt>
        <dd>
          Location of the system mouse cursor represented by the pair of
          {{MouseEvent/screenX}} and {{MouseEvent/screenY}}.
        </dd>
...
<section>
      <h2>
        Pointer Lock and Interfaces
      </h2>
      <section>
        <h3>
          The <dfn>pointer lock state</dfn> definition
        </h3>
        <p>
          The [=pointer lock state=] is the state when a single DOM element
          become <dfn>pointer-lock target</dfn>. The [=pointer-lock target=]
          receives all relevant user generated {{MouseEvent}} events: namely,
          all user-generated `mousemove`, `mousedown`, `mouseup`, `click`,
          `dblclick`, `auxclick`, and `wheel` [[ui-events]]. No other elements
          may receive these events while in [=pointer lock state=]. There will
          be no dispatching of events that require the concept of a mouse
          cursor: namely, `mouseenter`, `mouseleave`, `mouseover`, `mouseout`,
          `drag`, and `drop`.
        </p>
        <p>
          The boolean member {{PointerLockOptions/unadjustedMovement}} in
          {{PointerLockOptions}} can be used to change the mouse acceleration
          behavior in the [=pointer lock state=]. If
          {{PointerLockOptions/unadjustedMovement}} is `true`, the event
          coordinates must not be affected by the underlying platform behaviors
          such as mouse acceleration. In other words, UA must use the APIs
          provided by the underlying platform to guarantee getting the raw
          events. If {{PointerLockOptions/unadjustedMovement}} is `false`, UA
          must rely on the default behavior of the underlying platform
          regarding the mouse acceleration.
        </p>
```
What this does
 - move the <dfn>cursor position</dfn> into section of glossary.
 - move the MouseEvent description from original 2nd paragraph into 1st paragraph of definition.
 - refine original 3rd paragraph for description of PointerLockOptions/unadjustedMovement.

Also agree that we should drop the pointer-lock options concept and directly refer to PointerLockOptions.

Thanks,
Alvin

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/pointerlock/pull/49#discussion_r1373986170
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/pointerlock/pull/49/review/1700875190@github.com>

Received on Friday, 27 October 2023 01:38:39 UTC