modules/datguivr/index.js
/*
    Creates a generic Input type.
    Takes any THREE.Object3D type object and uses its position
    and orientation as an input device.

    A laser pointer is included and will be updated.
    Contains state about which Interaction is currently being used or hover.
  */
Creates a generic Input type.
Takes any THREE.Object3D type object and uses its position
and orientation as an input device.

A laser pointer is included and will be updated.
Contains state about which Interaction is currently being used or hover.
Creates a generic Input type . Takes any THREE . Object3D type object and uses its position and orientation as an input device . A laser pointer is included and will be updated . Contains state about which Interaction is currently being used or hover .
function createInput( inputObject = new THREE.Group() ){
    const input = {
      raycast: new THREE.Raycaster( new THREE.Vector3(), new THREE.Vector3() ),
      laser: createLaser(),
      cursor: createCursor(),
      object: inputObject,
      pressed: false,
      gripped: false,
      events: new Emitter(),
      interaction: {
        grip: undefined,
        press: undefined,
        hover: undefined
      }
    };
    input.laser.add( input.cursor );
    return input;
  }
function createInput ( inputObject = new THREE . Group ( ) ) { const input = { raycast : new THREE . Raycaster ( new THREE . Vector3 ( ) , new THREE . Vector3 ( ) ) , laser : createLaser ( ) , cursor : createCursor ( ) , object : inputObject , pressed : false , gripped : false , events : new Emitter ( ) , interaction : { grip : undefined , press : undefined , hover : undefined } } ; input . laser . add ( input . cursor ) ; return input ; }
Creates a generic Input type.
Creates a generic Input type .