The OccViewer.MouseEventInfo interface defines the structure for representing mouse event data in the Open CASCADE Web Viewer. It captures essential details about mouse interactions, including:

  • X Position (x): The horizontal coordinate of the mouse cursor during the event.
  • Y Position (y): The vertical coordinate of the mouse cursor during the event.
  • Button Index (button): Indicates which mouse button was pressed (0 for left, 1 for middle, and 2 for right).
  • Event Type (eventType): Represents the specific type of mouse event, aligned with EmscriptenMouseEvent standards.

This interface ensures precise and consistent mouse interaction tracking, enabling responsive and interactive user experiences in 3D applications.

const aMouseEvent = OccViewerModule.eventManager.getLastMouseEventInfo();