onClick(fn) | Callback function for object clicks with left mouse button. The object (or null if there's no object under the mouse line of sight) and the event object are included as arguments onClick(object, event) . | - |
onRightClick(fn) | Callback function for object right-clicks. The object (or null if there's no object under the mouse line of sight) and the event object are included as arguments onRightClick(object, event) . | - |
onHover(fn) | Callback function for object mouse over events. The object (or null if there's no object under the mouse line of sight) is included as the first argument, and the previous hovered object (or null ) as second argument: onHover(obj, prevObj) . | - |
hoverOrderComparator([fn]) | Getter/setter for the comparator function to use when hovering over multiple objects under the same line of sight. This function can be used to prioritize hovering some objects over others. | By default, hovering priority is based solely on camera proximity (closes object wins). |
lineHoverPrecision([int]) | Getter/setter for the precision to use when detecting hover events over Line objects. | 1 |
tooltipContent([str or fn]) | Object accessor function or attribute for label (shown in tooltip). Supports plain text or HTML content. | |
enablePointerInteraction([boolean]) | Getter/setter for whether to enable the mouse tracking events. This activates an internal tracker of the canvas mouse position and enables the functionality of object hover/click and tooltip labels, at the cost of performance. If you're looking for maximum gain in your render performance it's recommended to switch off this property. | true |
hoverDuringDrag([boolean]) | Getter/setter for whether to trigger hover events while using the controls via pointer dragging. | false |