Events

viewer3d.contextmenu

invoked when the user performs a right click inside the viewer example usage const oncontextmenu = function (event) { const { intersects } = event; console log("viewer3d contextmenu", "intersects ", intersects); }; viewer3d addeventlistener("viewer3d contextmenu", oncontextmenu); jquery const oncontextmenu = function (event, objectid, intersects) { console log("viewer contextmenu", "objectid ", objectid, "intersects ", intersects); }; $("#viewer 3d") on("viewer contextmenu", oncontextmenu); parameters oncontextmenu function called when the user performs a right click inside the viewer type (event object) => void event name type description intersects object object below the cursor, undefined if none 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 performs a right click inside the viewer type (event object, objectid string, intersects object) => 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