Interface and input
Input
25 symbols, imported from @driftengine/core.
Explained in Moving things.
Classes
ActionMapInputSourceTouchControls- A reusable mobile scheme: dynamic stick on the first zone; look plus a primary tap/hold and secondary downward swipe on the second. The class reports generic control state. A game decides whether those signals mean jump, fire, crouch, slide, or anything else.
Interfaces
AnalogAction- Move, look: a direction rather than a state.
DigitalAction- Jump, fire, pause: a state, bound to keys and buttons.
GamepadIdentity- What a pad is, as opposed to where its buttons are. See
gamepadIdentity.ts. GamepadView- One connected pad, as a consumer holds it.
InputCallbacksInputOptionsRightGestureOptionsTouchControlsOptionsTouchPoint
Functions
classifyRightGesture- Classify a drag from its travel and duration.
isTypingTargetINPUTcovers buttons and checkboxes too, which do not take text — but a Space on a focused button is the browser's own "press it", so leaving those alone is right for the same reason.
Types
ActionDefinitionBinding- One thing that can satisfy an action.
GamepadAxisGamepadButton- The W3C Standard Gamepad, by position rather than by anybody's lettering.
GamepadFamily- What the pad in the player's hands calls a position, so a consumer can draw the right prompt.
InputDevice- Which device the player is actually using, so a consumer can redraw its prompts.
InputSourceName- The devices this source watches, and the granularity a consumer may switch off.
MouseButton- A mouse button by what it is, in
MouseEvent.buttonorder. RightGesture- What a drag on the look zone turns out to be.
Constants
DEFAULT_DEADZONE- How far a stick must travel before it is moving at all.
MAX_RUMBLE_MS- The specification's ceiling on one effect, in milliseconds.