Methods
Navigation
setNavigationMode
sets the navigation mode for the viewer example usage const navigationmode = "orbit"; viewer3d setnavigationmode(navigationmode); parameters navigationmode the navigation mode to use true 330,331left unhandled content type left unhandled content type left unhandled content type left unhandled content type some predefined navigation modes are available true 205,456left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type advanced usage you can also set a custom navigation mode by providing a map of device to list of event actions the mapping provided replaces all default navigation and interaction actions example usage const navigationmode = { mouse \[ { event "click", action "select", filter { button 0 } }, { event "doubleclick", action "fittoview", filter { button 0 } }, { event "drag", action "orbit", filter { button 0 } } ] }; viewer3d setnavigationmode(navigationmode); event action true 220,220,221left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type device valid values are mouse touch action valid values are click doubleclick select contextmenu fittoview zoom zoommove rotatez rotatex moveleft moveup moveforward orbit pivot pan event valid mouse device values are click doubleclick wheel drag valid touch device values are tap doubletap longpress pinch pan actions are executed in the order specified by the event actions list if you have cancelled an action (e g a viewer3d click event has preventdefault set to true ), the rest of the matching actions are not executed filter true 661left unhandled content type left unhandled content type filter mouse button events with the button key, valid values are 0 for left button 1 for middle button 2 for right button mouse \[ { event "click", action "contextmenu", filter { button 2 } } ]; filter touch events by number of active pointers and long press with the pointers and longpress keys touch \[ { event "tap", action "select", filter { pointers 2, longpress true } } ]; scale scale the movement of the action by a factor, default value is 1 0 increase the value to make the movement from the action more sensitive providing a negative value will invert the movement