src/scripts/Movement.js
/**
   * Update object directional rotation.
   * This changes the DOF vector position and the orientation of the object's body.
   *
   * @param {THREE.Object2D} obj
   * @param {int} delta
   */
Update object directional rotation.
This changes the DOF vector position and the orientation of the object's body.

@param {THREE.Object2D} obj
@param {int} delta
Update object directional rotation . This changes the DOF vector position and the orientation of the object ' s body . @param { THREE . Object2D } obj @param { int } delta
static updateObjectDirectionRotation(obj, delta) {
    let rotation = obj.userData.rotation;
    let direction = obj.userData.rotationDir;
    direction = obj.userData.speed > 0 ? direction : -direction;
    rotation = direction * rotation * delta;
    obj.userData.dof.applyAxisAngle(obj.userData.vuv, rotation);
    obj.rotateOnAxis(obj.userData.vuv, rotation);
  }
static updateObjectDirectionRotation ( obj , delta ) { let rotation = obj . userData . rotation ; let direction = obj . userData . rotationDir ; direction = obj . userData . speed > 0 ? direction : - direction ; rotation = direction * rotation * delta ; obj . userData . dof . applyAxisAngle ( obj . userData . vuv , rotation ) ; obj . rotateOnAxis ( obj . userData . vuv , rotation ) ; }
Update object directional rotation.
Update object directional rotation .