Extend gestures with Plugins
mainPlugins are side effects used to enhance gestures with visual, audio, or haptic feedback (e.g., highlighting a path or vibrating the device). Plugins do not modify the gesture logic itself.
A plugin is a function that accepts an options object and returns an object implementing the plugin interface.
type Plugin = (options: any) => {
onMove: PluginEventCallback;
onDown: PluginEventCallback;
onUp: PluginEventCallback;
onDestroy?: () => void;
onInit?: (activeEvents: PointerEvent[]) => void;
};