diff -r e0c7be5dc02c -r 6dcff4438175 client/js/renderer/shapebuilder.js --- a/client/js/renderer/shapebuilder.js Wed Jun 03 17:27:46 2015 +0200 +++ b/client/js/renderer/shapebuilder.js Fri Jun 05 12:17:16 2015 +0200 @@ -35,7 +35,7 @@ return new paper.Path.RegularPolygon([0, 0], 6, 1); }, getImageShape: function(center, radius) { - return new paper.Path.RegularPolygon([0, 0], 6, radius); + return new paper.Path.RegularPolygon(center, 6, radius); } }, "diamond":{ @@ -55,7 +55,7 @@ return new paper.Path.Star([0, 0], 8, 1, 0.7); }, getImageShape: function(center, radius) { - return new paper.Path.Star([0, 0], 8, radius*1, radius*0.7); + return new paper.Path.Star(center, 8, radius*1, radius*0.7); } }, "cloud": { @@ -71,6 +71,14 @@ return path; } }, + "triangle": { + getShape: function() { + return new paper.Path.RegularPolygon([0,0], 3, 1); + }, + getImageShape: function(center, radius) { + return new paper.Path.RegularPolygon(center, 3, radius); + } + }, "svg": function(path){ return { getShape: function() { @@ -97,6 +105,8 @@ return builders[shape]; }; + ShapeBuilder.builders = builders; + return ShapeBuilder; });