Gesture
MMO.inputs · 1 symbol · generated 5 Oct 2026
Gesture
Gesture.js:18- Namespace
MMO.inputs- Extends
- EventEmitter
Index
| node readonly accessor | ||
| constructor(input, name, opts) | ||
| toString() | ||
| remove() | Unregister this gesture from its input. | |
| isInTarget(e) | Tells if event happened inside input element or one of its children | |
| clear(status) | [internal] Stop gesture by setting its status and unscheduling everything left | |
| cancel() | [internal] | |
| done() | [internal] | |
| start() | [internal] | |
| stop() | [internal] | |
| update(e) | Called everytime an event is captured from the element | |
| allowDispatch(gesture) | Called if status = S_IN and another gesture is completed. | |
| statusProgress() | Get the progress of the gesture before completion | |
| setStatus(status) | Set gesture status : - S_IDDLE: the gesture has not started. | |
| schedule(name, time) | Schedule a function | |
| unschedule(name) | Unschedule a function |
Properties1
node
readonlyaccessorGesture.js:36- Type
Element
Methods15
constructor(input, name, opts)
Gesture.js:19| input | ||
| name | ||
| opts |
toString()
Gesture.js:43| returns | string |
remove()
Gesture.js:51Unregister this gesture from its input.
isInTarget(e)
Gesture.js:60Tells if event happened inside input element or one of its children
| e | Event | |
| returns | Boolean |
clear(status)
Gesture.js:78[internal] Stop gesture by setting its status and unscheduling everything left
| status | int | by default MMO.inputs.S_IDDLE |
| returns |
cancel()
Gesture.js:88[internal]
done()
Gesture.js:99[internal]
start()
Gesture.js:111[internal]
stop()
Gesture.js:121[internal]
update(e)
Gesture.js:132Called everytime an event is captured from the element
| e | Event | the event |
| returns | bool | true if gesture is completed |
allowDispatch(gesture)
Gesture.js:146Called if status = S_IN and another gesture is completed.
| gesture | Gesture | |
| returns | bool |
statusProgress()
Gesture.js:154Get the progress of the gesture before completion
| returns | float | [0,1] |
setStatus(status)
Gesture.js:169| status | number |
schedule(name, time)
Gesture.js:188Schedule a function
| name | string | the gesture's function to call |
| time | int | in ms. The time to wait before calling function |
| returns |
unschedule(name)
Gesture.js:202Unschedule a function
| name | string | the gesture's function to call |
| returns |