Home > three-story-controls > SwipeAdaptor
Emits events in response to swipe gestures above a given threshold.
Signature:
export declare class SwipeAdaptor extends BaseAdaptor
Extends: BaseAdaptor
See SwipeAdaptorProps for all properties that can be passed to the constructor. See SwipeAdaptorEvent for emitted event signatures. Note: CSS property touch-action: none will probably be needed on listener element
Swipe adaptor
const swipeAdaptor = new SwipeAdaptor()
swipeAdaptor.connect()
swipeAdaptor.addEventListener('trigger', (event) => {
cube.scale.y += event.y*0.1
})
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(props) | Constructs a new instance of the SwipeAdaptor class |
| Method | Modifiers | Description |
|---|---|---|
| connect() | ||
| disconnect() | ||
| isEnabled() | ||
| update() |