--- a/client/js/renderer/shapebuilder.js Mon Jun 01 11:53:03 2015 +0200
+++ b/client/js/renderer/shapebuilder.js Tue Jun 02 00:39:47 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;
});