src/aframe/component/tour.js
function getNormalizeRotations(start, end) {
  // normalize both rotations
  var normStart = normalizeRotation(start)
  var normEnd = normalizeRotation(end)
  // find the shortest arc for each rotation
  Object.keys(start).forEach(function(axis) {
    if (normEnd[axis] - normStart[axis] > 180) normEnd[axis] -= 360
  })
  return { start: normStart, end: normEnd }
}
function getNormalizeRotations(start, end) {
  // normalize both rotations
  var normStart = normalizeRotation(start)
  var normEnd = normalizeRotation(end)
  // find the shortest arc for each rotation
  Object.keys(start).forEach(function(axis) {
    if (normEnd[axis] - normStart[axis] > 180) normEnd[axis] -= 360
  })
  return { start: normStart, end: normEnd }
}
function getNormalizeRotations ( start , end ) { // normalize both rotations var normStart = normalizeRotation ( start ) var normEnd = normalizeRotation ( end ) // find the shortest arc for each rotation Object . keys ( start ) . forEach ( function ( axis ) { if ( normEnd [ axis ] - normStart [ axis ] > 180 ) normEnd [ axis ] -= 360 } ) return { start : normStart , end : normEnd } }
we want to prevent excessive spinning in rotations
we want to prevent excessive spinning in rotations