All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.symbol.diamond.js Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
var tan30 = Math.sqrt(1 / 3),
    tan30_2 = tan30 * 2;

export default {
  draw: function(context, size) {
    var y = Math.sqrt(size / tan30_2),
        x = y * tan30;
    context.moveTo(0, -y);
    context.lineTo(x, 0);
    context.lineTo(0, y);
    context.lineTo(-x, 0);
    context.closePath();
  }
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy