Events
viewer3d.click
invoked when the user clicks inside the viewer example usage const onclick = function (event) { const { intersects } = event; console log("viewer3d click", "intersects ", intersects); }; viewer3d addeventlistener("viewer3d click", onclick); jquery const onclick = function (event, objectid, intersects) { console log("viewer click", "objectid ", objectid, "intersects ", intersects); }; $("#viewer 3d") on("viewer click", onclick); parameters onclick 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 object selection for click event srcevent object original dom event intersects name type description objectid string id of the object point vector3 docid\ kewrhktc8iq2hlt48srfq intersection point of the object normal vector3 docid\ kewrhktc8iq2hlt48srfq normal vector at the intersection point 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 jquery event https //api jquery com/category/events/event object/ 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 docid\ kewrhktc8iq2hlt48srfq intersection point of the object normal vector3 docid\ kewrhktc8iq2hlt48srfq normal vector at the intersection point