client/js/renderer/shapebuilder.js
changeset 475 e3537f6de112
parent 467 fd2b5a7ec356
equal deleted inserted replaced
474:4f9aa2f4af8c 475:e3537f6de112
    74         "triangle": {
    74         "triangle": {
    75             getShape: function() {
    75             getShape: function() {
    76                 return new paper.Path.RegularPolygon([0,0], 3, 1);
    76                 return new paper.Path.RegularPolygon([0,0], 3, 1);
    77             },
    77             },
    78             getImageShape: function(center, radius) {
    78             getImageShape: function(center, radius) {
    79                 return new paper.Path.RegularPolygon(center, 3, radius);
    79                 var shape = new paper.Path.RegularPolygon([0,0], 3, 1);
       
    80                 shape.scale(radius);
       
    81                 shape.translate(center);
       
    82                 return shape;
    80             }
    83             }
    81         },
    84         },
    82         "svg": function(path){
    85         "svg": function(path){
    83             return {
    86             return {
    84                 getShape: function() {
    87                 getShape: function() {