2

Is there a way to toggle the trackball controller in three.js on and off?

I have this as my event handler

function onDocumentMouseMove(event){


    if (CAN_MOVE == 1){
        // update the mouse variable
        mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
        mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
    }
    else
    {
        //do nothing
        event.preventDefault();
    }
}
4

1 に答える 1

3

はい。

controls.enabled = false;
于 2013-01-07T15:48:05.123 に答える