Skip to content

Image Tracking Events

In addition to using the SourceShow Preview Design Time and Mask Objects Beneath Surface parameters, ImageTrackers expose event handlers that you can use to be notified of changes in the anchors or their visibility.

EventDescription
onAnchorNewEvent which is emitted when a new anchor (image target) is created by the tracker.
onAnchorVisibleEvent which is emitted when an anchor (image target) becomes visible in a camera frame.
onAnchorNotVisibleEvent which is emitted when an anchor (image target) goes from being visible in the previous camera frame, to being not visible in the current frame.
EventDescription
onClickEvent which is emitted when a mouse button is clicked.
onPointerDownEvent which is emitted when the user touches their device (e.g. taps a button) or when a mouse button is clicked.
onPointerUpEvent which is emitted when a touch or click has been released.
onPointerEnterEvent which is emitted when a pointer (e.g a mouse cursor or touch input) enters the bounding area of a specific element.
onPointerMoveEvent which is emitted when a pointer (e.g a mouse cursor or touch input) moves within the bounding area of a specific element.
onPointerLeaveEvent which is emitted when a pointer (e.g a mouse cursor or touch input) exits the bounding area of a specific element.
onIntersectionEnterEvent which is emitted when an individual element enters (intersects) with another individual element (e.g. Starting a 3D animation when the camera focuses on a 3D component).
onIntersectionLeaveEvent which is emitted when an individual element exits (intersects) another individual element (e.g. Pausing a 3D animation when the camera focuses away from a 3D component).

You can use events to increase engagement by adding interactive elements to your Mattercraft project.

You can use Behavior Actions to add such interactivity.