Skip to content

Commit

Permalink
set var changes
Browse files Browse the repository at this point in the history
  • Loading branch information
camoconnell committed Sep 13, 2015
1 parent 53dd0f1 commit 9b76075
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/set.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
var $range = $('.input-range');
var $logo = $('#logo');

var tg = 0.5;
var target = 0.5;
var position = 0.5;
var friction = 0.05;

Expand All @@ -53,14 +53,14 @@
* Setup range input
*/
$range.on('input', function(){
tg = this.value;
target = this.value;
});

function step(timestamp) {

window.requestAnimationFrame(step);

position += (tg - position) * friction;
position += (target - position) * friction;
$logo.lazylinepainter('set', position);
}

Expand Down

0 comments on commit 9b76075

Please sign in to comment.