function () {
    var changed = false;
    var controllerAxes = this.controller.axes;
    var i;
    var previousAxis = this.axis;
    var changedAxes = this.changedAxes;

    // Check if axis changed.
    this.changedAxes.length = 0;
    for (i = 0; i < controllerAxes.length; ++i) {
      changedAxes.push(previousAxis[i] !== controllerAxes[i]);
      if (changedAxes[i]) { changed = true; }
    }
    if (!changed) { return false; }

    this.axis.length = 0;
    for (i = 0; i < controllerAxes.length; i++) {
      this.axis.push(controllerAxes[i]);
    }
    this.el.emit(EVENTS.AXISMOVE, this.axisMoveEventDetail, false);
    return true;
  }
function () {
    var changed = false;
    var controllerAxes = this.controller.axes;
    var i;
    var previousAxis = this.axis;
    var changedAxes = this.changedAxes;

    // Check if axis changed.
    this.changedAxes.length = 0;
    for (i = 0; i < controllerAxes.length; ++i) {
      changedAxes.push(previousAxis[i] !== controllerAxes[i]);
      if (changedAxes[i]) { changed = true; }
    }
    if (!changed) { return false; }

    this.axis.length = 0;
    for (i = 0; i < controllerAxes.length; i++) {
      this.axis.push(controllerAxes[i]);
    }
    this.el.emit(EVENTS.AXISMOVE, this.axisMoveEventDetail, false);
    return true;
  }
function ( ) { var changed = false ; var controllerAxes = this . controller . axes ; var i ; var previousAxis = this . axis ; var changedAxes = this . changedAxes ; // Check if axis changed. this . changedAxes . length = 0 ; for ( i = 0 ; i < controllerAxes . length ; ++ i ) { changedAxes . push ( previousAxis [ i ] !== controllerAxes [ i ] ) ; if ( changedAxes [ i ] ) { changed = true ; } } if ( ! changed ) { return false ; } this . axis . length = 0 ; for ( i = 0 ; i < controllerAxes . length ; i ++ ) { this . axis . push ( controllerAxes [ i ] ) ; } this . el . emit ( EVENTS . AXISMOVE , this . axisMoveEventDetail , false ) ; return true ; }
An axis is an array of values from -1 (up, left) to 1 (down, right).
Compare each component of the axis to the previous value to determine change.

@returns {boolean} Whether axes changed.
An axis is an array of values from - 1 ( up left ) to 1 ( down right ) . Compare each component of the axis to the previous value to determine change .
Check if axis has changed