import { PluginManager, type MotionEvent } from 'sn-plugin-lib';
/**
* Example: register a touch move event listener.
*/
export async function exampleRegisterMotionListener() {
const sub = PluginManager.registerMotionListener(1, {
onMsg(msg) {
const motion = msg as MotionEvent;
console.log('touch move pointer count:', motion.pointerCount);
console.log('first pointer id:', motion.pointers[0]?.pointerId);
},
});
return sub;
}