client/js/renderer/shapebuilder.js
changeset 467 fd2b5a7ec356
parent 458 423bdf56d103
equal deleted inserted replaced
466:884b35feb04b 467:fd2b5a7ec356
    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() {