constructor(options?)
→ Supermousenew Supermouse(options?: SupermouseOptions)
Creates the runtime, applies options, and prepares the plugin pipeline. If autoStart is left enabled, the animation loop begins immediately during construction. If you set autoStart: false, call start() later to begin the frame loop explicitly.
import { Supermouse } from '@supermousejs/core';
import { Dot } from '@supermousejs/dot';
import { Ring } from '@supermousejs/ring';
const app = new Supermouse({
smoothness: 0.15,
hideCursor: true,
rules: {
'a, button': { pointer: true },
'[data-supermouse-magnetic]': { magnetic: true }
},
plugins: [Dot({ size: 8 }), Ring({ size: 32 })]
});
// Equivalent imperative registration
// const app = new Supermouse({ smoothness: 0.15 });
// app.use(Dot({ size: 8 })).use(Ring({ size: 32 }));