src/controls.js
function onMouseDown(event, env, isSideEffectsDisabled) {
    mouse.down(event, env ? env.camera : null);

    if (!env || isSideEffectsDisabled) {
        return;
    }

    if (mouse.keys[1] && !mouse.keys[3]) {
        let focusedObject = focusObject(env.library, env.camera, env.selector);

        if (env.selector.selectFocused()) {
            events.triggerSelect(focusedObject);
        }   
    }
}
function onMouseDown(event, env, isSideEffectsDisabled) {
    mouse.down(event, env ? env.camera : null);

    if (!env || isSideEffectsDisabled) {
        return;
    }

    if (mouse.keys[1] && !mouse.keys[3]) {
        let focusedObject = focusObject(env.library, env.camera, env.selector);

        if (env.selector.selectFocused()) {
            events.triggerSelect(focusedObject);
        }   
    }
}
function onMouseDown ( event , env , isSideEffectsDisabled ) { mouse . down ( event , env ? env . camera : null ) ; if ( ! env || isSideEffectsDisabled ) { return ; } if ( mouse . keys [ 1 ] && ! mouse . keys [ 3 ] ) { let focusedObject = focusObject ( env . library , env . camera , env . selector ) ; if ( env . selector . selectFocused ( ) ) { events . triggerSelect ( focusedObject ) ; } } }
Triggers object select
@alias module:lib3d.onMouseDown
@param {Object} event - mouse event
@param {Environment} env - affected environment
@param {Boolean} isSideEffectsDisabled - disable side effects like focusing, selecting, moving objects
Triggers object select