Passer au contenu principal

GESTURE_MOVE

Description

Emits when the user moves their finger(s) on the screen.

ecs.input.GESTURE_MOVE.detail : { touchCount, position, startPosition, positionChange, spread, startSpread, spreadChange, nextTouchCount }

Event Properties

PropertyTypeDescription
touchCountnumberThe number of points contributing to the touch, for example a pinch gesture on mobile will be touchCount: 2
positionobjectThe screen position in pixels ({x: number, y: number})
startPositionobjectOn move/end, this will be the first position emitted in start ({x: number, y: number})
positionChangeobjectOn move, the delta of movement since the last event ({x: number, y: number})
spreadnumberThe average distance between pointers from the center point, a metric of how pinched or spread the touches are.
startSpreadnumberOn move, the first spread emitted in start.
spreadChangenumberOn move, the delta of spread since the last event.
nextTouchCountnumberOn end, the number of pointers involved in the following gesture. For example if the gesture is changing from 2 to 3 fingers, the two finger gesture will be ended with nextTouchCount: 3