Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Remove duplicative assignment to translateFraction.
Browse files Browse the repository at this point in the history
Also remove associated waveGravityToCenterPercentageFn().
  • Loading branch information
nhunzaker committed Jul 14, 2014
1 parent 705d386 commit e7dd64b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions paper-ripple.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,6 @@
return Math.max(0, Math.min(outerOpacity, waveOpacity));
}

function waveGravityToCenterPercentageFn(td, tu, r) {
// Convert from ms to s.
var touchDown = td / 1000;
var touchUp = tu / 1000;
var totalElapsed = touchDown + touchUp;

return Math.min(1.0, touchUp * 6);
}

// Determines whether the wave should be completely removed.
function waveDidFinish(wave, radius, anim) {
var waveOpacity = waveOpacityFn(wave.tDown, wave.tUp, anim);
Expand Down Expand Up @@ -383,8 +374,6 @@
// Ripple gravitational pull to the center of the canvas.
if (wave.endPosition) {

var translateFraction = waveGravityToCenterPercentageFn(tDown, tUp, wave.maxRadius);

// This translates from the origin to the center of the view based on the max dimension of
var translateFraction = Math.min(1, radius / wave.containerSize * 2 / Math.sqrt(2) );

Expand Down

0 comments on commit e7dd64b

Please sign in to comment.