This mask saves for which types of events, event.preventDefault should be called. This is useful to disallow some kinds of standard events like scrolling or clicking on links.
Time frame for events to be buffered (windowTime in rxjs per ReplaySubject).
Enable/disable pointer lock on click. If true, the next click on this event provider's canvas will invoke a pointer lock request on the canvas element.
Enable/disable pointer lock on click. If true, the next click on this event provider's canvas will invoke a pointer lock request on the canvas element.
Allow default event handling on specific event types (not calling preventDefault on the event).
Event types to allow default handling on.
Prevent default event handling on specific event types (using preventDefault on the event).
Event types to prevent default handling on.
Checks whether or not to prevent the default handling of the given event. This depends on the internal
preventDefaultMask
which can be modified using preventDefault
function @seepreventDefault.
Internal event type of the incoming event.
Actual event to prevent default handling on (if masked).
The pointer lock API requires a little workaround in order to avoid something like '... not called from inside a short running user-generated event handler'. A click event listener is registered and whenever a pointer lock is requested, e.g., from an event handler (which in turn exposes this interface to, e.g., a navigation), the next click will result in a probably more successful pointer lock.
HTML canvas element within the HTML5 document to register event listeners to.