diff --git a/lib/torque/animator.js b/lib/torque/animator.js index a7dc61a..dec73ff 100644 --- a/lib/torque/animator.js +++ b/lib/torque/animator.js @@ -30,7 +30,7 @@ var cancelAnimationFrame = global.cancelAnimationFrame this.options = torque.extend({ animationDelay: 0, maxDelta: 0.2, - loop: true + loop: options.loop }, this.options); this.rescale(); @@ -118,6 +118,9 @@ var cancelAnimationFrame = global.cancelAnimationFrame this.time(this._time); if(this.step() >= this.options.steps) { this._time = 0; + if(!this.options.loop){ + this.pause(); + } } if(this.running) { requestAnimationFrame(this._tick);