examples/lib/leap-plugins-0.1.6.js
function(){
    this.frameIndex++;
    if (this.frameIndex >= this.rightCropPosition) {
      this.frameIndex = this.frameIndex % (this.rightCropPosition || 1);

      if ((this.frameIndex < this.leftCropPosition)) {
        this.frameIndex = this.leftCropPosition;
      }
    }else{
      this.frameIndex--;
    }
  }
function(){
    this.frameIndex++;
    if (this.frameIndex >= this.rightCropPosition) {
      this.frameIndex = this.frameIndex % (this.rightCropPosition || 1);

      if ((this.frameIndex < this.leftCropPosition)) {
        this.frameIndex = this.leftCropPosition;
      }
    }else{
      this.frameIndex--;
    }
  }
function ( ) { this . frameIndex ++ ; if ( this . frameIndex >= this . rightCropPosition ) { this . frameIndex = this . frameIndex % ( this . rightCropPosition || 1 ) ; if ( ( this . frameIndex < this . leftCropPosition ) ) { this . frameIndex = this . leftCropPosition ; } } else { this . frameIndex -- ; } }
resets to beginning if at end
resets to beginning if at end