Inputs.PinchInput Class
Detects two-finger pinching motion and emits start
, update
and
end
events with the payload data:
value
- Distance between the two touches
delta
- Differential in successive distances
velocity
- Relative velocity between two touches
displacement
- Total accumulated displacement
center
- Midpoint between the two touches
Constructor
Inputs.PinchInput
(
-
options
Parameters:
Example:
var pinchInput = new PinchInput();
pinchInput.subscribe(Engine) // listens on window
events
pinchInput.on('start', function(payload){
console.log('start', payload);
});
pinchInput.on('update', function(payload){
console.log('update', payload);
});
pinchInput.on('end', function(payload){
console.log('end', payload);
});