Mouse Pointer Visualizer
Import
Section titled “Import”import { startMousePointerVisualizer } from "webotron/plugins/mouse-pointer-visualizer";Entry Point
Section titled “Entry Point”startMousePointerVisualizer(view, options?)
const pointer = await startMousePointerVisualizer(view, { color: "#ff3b30", withLabel: true, trackPageMouseMoves: true,});
await pointer.moveTo(300, 200);await pointer.visualizeClick("left"); // pulse only, no actual page clickawait pointer.click();await pointer.stop();Controller API
Section titled “Controller API”moveTo(x, y, options?)moveBy(dx, dy, options?)visualizeClick(button?, clickCount?): shows click pulse overlay only; does not dispatch mouse events.click(button?, clickCount?): dispatches real mouse events and visual pulse.scroll(dx, dy)setVisible(visible)onMove(handler)getPosition()stop()
Overlay Options
Section titled “Overlay Options”| Option | Type | Purpose |
|---|---|---|
color | string | Cursor overlay color. |
size | number | Cursor overlay size in pixels. |
withLabel | boolean | Show position label beside cursor. |
trackPageMouseMoves | boolean | Forward page-originated pointer movement events. |
What It Does
Section titled “What It Does”- Renders a cursor overlay in the page.
- Supports animated movement and optional labels.
- Can track page-originated pointer moves through a binding.