Gestures in the Open CASCADE Web Viewer provide intuitive user interaction capabilities by mapping specific mouse movements or key combinations to predefined actions. Key points include:
Mouse Gestures (MouseGesture): Represent various user inputs such as selection, zooming, panning, rotation, and dragging. These gestures can be customized and associated with mouse keys or modifier keys.
Scroll Actions (ScrollActions): Enable scrolling to perform operations like zooming, panning, or rotating the view. The behavior can be adjusted using modifier keys and scroll multipliers.
Bindings:
Customization and Management The InputBindings interface allows users to configure, retrieve, or remove these bindings programmatically, ensuring flexibility for tailored interaction setups.
// setting gesture for left mouse button
const aLeftMouseBtnBinding = anInputBindings.getMouseKeyBinding(MouseKey.LeftButton);
aLeftMouseBtnBinding.gesture = MouseGesture.Zoom;