Skip to content

1681-engine / index / dragSlop

Function: dragSlop() ​

ts
function dragSlop(
   ms, 
   early?, 
   tapSlop?, 
   earlySlop?, 
   pressMs?
): number;

Defined in: src/input/AimGesture.ts:47

How far the thumb must wander, ms into a press, before it drags. early false keeps the plain slop throughout (an attack button with nothing locked: there a slide is as good as a drag).

Parameters ​

ParameterTypeDefault value
msnumberundefined
earlybooleantrue
tapSlopnumberAIM_TAP_SLOP
earlySlopnumberAIM_EARLY_SLOP
pressMsnumberAIM_PRESS_MS

Returns ​

number

Released under the MIT License.