Events

viewer3d.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.

Returning false from the onClick function will disable object selection for click event

Type

(event: Object, objectId: String, intersects: Object) => Boolean/Void

event

objectId

Id of the object clicked, undefined if no object under cursor.

intersects

Intersection point of the object below the cursor, undefined if no object under cursor.

Name

Type

Description

point

Vector3

Intersection point of the object

normal

Vector3

Normal vector at the intersection point