Events

viewer2d.click

Invoked when the user clicks inside the viewer.

Example



Usage

JS
jQuery


Parameters

onClick

JS
jQuery

Function called when the user clicks inside the viewer.

Type

(event: Object) => Void

event

Name

Type

Description

intersects

Object

Object below the cursor, undefined if none

preventDefault

Function

Disable space selection for click event

srcEvent

Object

Original DOM event

intersects

Name

Type

Description

objectId

String

Id of the object

point

Vector3

Intersection point of the object

normal

Vector3

Normal vector at the intersection point