Skip to content

Instantly share code, notes, and snippets.

@humaan
Created May 14, 2014 06:57
Show Gist options
  • Save humaan/7d2909be2fc46bc5a534 to your computer and use it in GitHub Desktop.
Save humaan/7d2909be2fc46bc5a534 to your computer and use it in GitHub Desktop.
Masking
//Create a circle shape on the canvas & use it to mask the head
parts.circle_mask = paper.circle(20.5, 20.5, 20.5).attr({
fill : '#fff'
});
parts.head.attr({ mask : parts.circle_mask });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment