UNPKG

261 BJavaScriptView Raw
1var Shape = require('./generic');
2
3module.exports = Shape(function(width, height){
4
5 this.width = width;
6 this.height = height;
7
8 var rx = width / 2, ry = height / 2;
9
10 this.path
11 .move(0, ry)
12 .arc(width, 0, rx, ry)
13 .arc(-width, 0, rx, ry)
14 .close();
15
16});
\No newline at end of file