w3c / gamepad

Gamepad
https://w3c.github.io/gamepad/
Other
142 stars 48 forks source link

Fold touchEvents from extensions.html into index.html #198

Open bradleyneedham opened 7 months ago

bradleyneedham commented 7 months ago

Partially Closes #165

The following tasks have been completed:

Implementation commitment:

Standards positions:

Resources:


Preview | Diff

bradleyneedham commented 7 months ago

I believe the failure of the tidy action is an indentation error on line 19 of .github/workflows/tidy.yml. The with needs to be even with the start of uses. Current is:

line 18:             - uses:
line 19:             with:

Should be:

line 18:             - uses:
line 19:               with:
bradleyneedham commented 7 months ago

I am moving this from "Draft". Any help with spotting the reason for the validate failure is appreciated.

Also I think that newline: LF should be added to the tidyconfig.txt to prevent local runs of tidy on windows from adding all CRLF.

marcoscaceres commented 6 months ago

@bradleyneedham, sorry, I just need to double check if this is in scope of the Working Group. I seem to recall there was some concerns from some members around anything "touch" related, so just need to make sure it's all fine.

Shouldn't be too long!

bradleyneedham commented 4 months ago

Just getting to back to this and wanted to verify our discussion at the last meeting. In general is the following the suggested approach?

        dictionary GamepadTouch {
          unsigned long touchId;
          Float32Array position;
        };

        dictionary GamepadSurface {
          octet surfaceId;
          FrozenArray<GamepadTouch>? touches;
          Uint32Array surfaceDimensions;
        };

        interface Gamepad {
...
          readonly attribute FrozenArray<GamepadSurface>? surfaces;
...
        };
nondebug commented 4 months ago

If I remember correctly, we decided on maplike interfaces for the surfaceId -> GamepadSurface and touchId -> sequence<GamepadTouch> maps. I think it should look something like this:

        dictionary GamepadTouch {
          Float32Array position;
        };

        interface GamepadTouchMap {
          readonly maplike<unsigned long, sequence<GamepadTouch>>;
        };

        dictionary GamepadSurface {
          GamepadTouchMap touches;
          Uint32Array surfaceDimensions;
        };

        interface GamepadSurfaceMap {
          readonly maplike<octet, GamepadSurface>;
        };

        interface Gamepad {
...
          readonly attribute GamepadSurfaceMap surfaces;
...
        };