mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/RoboCommander.git
synced 2026-06-16 03:36:01 +00:00
Initial commit
This commit is contained in:
14
node_modules/d3-shape/src/symbol/diamond.js
generated
vendored
Normal file
14
node_modules/d3-shape/src/symbol/diamond.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
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();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user