Skip to content

Instantly share code, notes, and snippets.

@veev
Created January 27, 2014 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veev/8643315 to your computer and use it in GitHub Desktop.
Save veev/8643315 to your computer and use it in GitHub Desktop.
function buildRippleNode(index){
var ripple, title, bottomLetter, topLetter;
var offset = 180;
var pos = (offset * index) + offset; //radius of Home Button
var titleOffset = config.titleOffset;
var titleHeight = config.titleHeight;
ripple = paper.path("M0,0 L"+pos+",0 A"+pos+","+pos+" 0 0,1 0,"+pos+"z")
ripple.attr({'fill': COLORS[index], 'fill': URL[index], 'stroke': COLORS[index]})
.data('id', RIPPLE_ID[index]);
title = paper.text(pos - titleOffset, titleHeight, LABELS[index]).attr({'font-size': '24px', 'font-style': 'italic', 'opacity': 1});
topLetter = paper.text(pos - titleOffset, titleHeight, LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0});
bottomLetter = paper.text((w-155), (h - titleHeight), LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0});
}
@veev
Copy link
Author

veev commented Jan 27, 2014

function buildRippleNode(index){
var button = new Object();
var ripple, title, bottomLetter, topLetter;
var offset = 180;
var pos = (offset * index) + offset; //radius of Home Button
var titleOffset = config.titleOffset;
var titleHeight = config.titleHeight;
ripple = paper.path("M0,0 L"+pos+",0 A"+pos+","+pos+" 0 0,1 0,"+pos+"z")
ripple.attr({'fill': COLORS[index], 'fill': URL[index], 'stroke': COLORS[index]})
.data('id', RIPPLE_ID[index]);
title = paper.text(pos - titleOffset, titleHeight, LABELS[index]).attr({'font-size': '24px', 'font-style': 'italic', 'opacity': 1});
topLetter = paper.text(pos - titleOffset, titleHeight, LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0});
bottomLetter = paper.text((w-155), (h - titleHeight), LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0});
var button = new Object(ripple, title, topLetter, bottomLetter);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment