INACTIVE - http://mzl.la/ghe-archive - A framework-agnostic input library that progressively handles flat, portal, and immersive web apps.
Перейти к файлу
Fernando Serrano 1e991618ae
Merge pull request #20 from Mozilla-GitHub-Standards/master
Add Mozilla Code of Conduct
2019-03-30 08:45:14 +01:00
example Address more feedback. Removed default action map. Add helper functions to ActionManager. Update samples. 2018-07-19 11:55:39 -07:00
src Typo 2018-10-23 11:15:05 -07:00
.esdoc.json Stub out classes, a build method, and auto-doc generation. 2018-02-12 16:11:21 -08:00
.gitignore Stub out classes, a build method, and auto-doc generation. 2018-02-12 16:11:21 -08:00
.prettierignore Added the same eslint and prettier config as mr-social-client. 2018-02-14 14:13:30 -08:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-29 23:49:10 -07:00
LICENSE Initial commit 2018-02-09 10:25:01 -08:00
README.md Addressed review concerns: 2018-07-16 14:05:12 -07:00
package-lock.json Bump more dependencies. Fix the license string in package.json. 2018-08-02 16:38:02 -07:00
package.json Bump more dependencies. Fix the license string in package.json. 2018-08-02 16:38:02 -07:00
webpack.config.js Rough out the ActionManager, ActionMap, a simple default binding map, and KeyboardInputSource. 2018-03-16 18:35:37 -07:00

README.md

Mozilla XR Input

A framework-agnostic input library for the web.

High level features

Map low level events like button pushes and hand gestures to semantic actions like point, select, and activate.

Main classes

ActionManager

This is the class that web apps will use to configure and then react to user actions. It exposes a polling API and an event API.

ActionMap

This maps low level input state to high level semantic actions. For example, a button press on a controller or a keyboard could be mapped to an action like "jump".

ActionMaps are usually configured by initializing them with a JSON file.

Multiple ActionMaps can be activated at any time using the API on ActionManager.

InputSource

This is a class that holds low level input state, like whether or not a keyboard key is down, the current position of a tracked wand, or the sensor reading from an accelerometer.

Included in the library are InputSources for common hardware like keyboards, gamepads, and wands.

Device

This holds information about a specific piece of hardware, such as a tracked wand or a keyboard. InputSources may reference a Device to indicate the source of input, and applications can query Devices for metadata such as their 3D models and the positions of their buttons.

Possible future work

Provide 3D models, reference images, and metadata (including control position) for input hardware.

Provide default input maps for existing hardware and regularly release new maps for new hardware.

Provide end users with the ability to create their own input configurations to enable apps to support users preferences and accessibility needs.

Recording and playback library

This library would provide web apps with the ability to record and serialize time-lines of actions, for use in testing frameworks as well as in production.

Action map editor UI

This library would provide a user facing UI for editing ActionMaps.