Skip to content

Instantly share code, notes, and snippets.

@humaan
Created May 14, 2014 06:45
Show Gist options
  • Save humaan/fc5076b643d78a93c553 to your computer and use it in GitHub Desktop.
Save humaan/fc5076b643d78a93c553 to your computer and use it in GitHub Desktop.
Humaan SVG Logo Setup
//Initialize an SVG node & add it to the DOM
var svg = $('<svg xmlns="http://www.w3.org/2000/svg" >').css({
width: '41px',
height: '41px'
});
$('#logo').append( svg );
// Initialize the Snap svg canvas using the svg DOM node (not the jquery object)
var paper = Snap( svg[0] );
//Create and assemble the individual parts onto the canvas
var parts = {};
parts.head = paper.path( paths.head );
parts.ring = paper.path( paths.ring );
// Group them
var logo_group = paper.group( parts.head, parts.ring );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment