Skip to content

Commit

Permalink
Add arrow glyphs for Kachit
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Jan 31, 2025
1 parent 2c2cb57 commit 86aea72
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
Binary file modified contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion contact.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions src/sheets/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,53 @@ const sheet: ISheet = {
// The element's root `id` must be the same as its map key.
// Symbols must have a properly set `viewbox` for scaling to work correctly.

sheet.glyphs.set("arrows-diag", (canvas: SVGContainer) => {
const sym = canvas.symbol();
const group = sym.group();
group.path("M4.712,69.854l-4.69,28.273c-0.086,0.512,0.082,1.034,0.449,1.401c0.002,0.003,0.002,0.003,0.002,0.003c0.37,0.368,0.893,0.535,1.406,0.447l28.197-4.765c0.594-0.1,1.081-0.525,1.264-1.1c0.185-0.572,0.031-1.202-0.396-1.628l-5.513-5.513l14.802-14.802c0.63-0.629,0.63-1.647,0-2.277l-10.2-10.201c-0.63-0.629-1.648-0.629-2.278,0L12.954,74.493l-5.515-5.515c-0.425-0.425-1.055-0.577-1.63-0.394C5.234,68.768,4.811,69.258,4.712,69.854z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
group.path("M95.288,30.146l4.69-28.273c0.085-0.512-0.083-1.034-0.449-1.4C99.527,0.47,99.527,0.47,99.527,0.47c-0.37-0.367-0.893-0.534-1.406-0.447L69.924,4.788c-0.594,0.1-1.081,0.525-1.265,1.1c-0.185,0.572-0.031,1.202,0.396,1.628l5.513,5.513L59.766,27.83c-0.629,0.629-0.629,1.648,0,2.278l10.2,10.201c0.63,0.629,1.648,0.629,2.278,0l14.802-14.802l5.515,5.515c0.425,0.425,1.056,0.578,1.63,0.394C94.766,31.232,95.19,30.742,95.288,30.146z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
group.path("M69.854,95.288l28.271,4.69c0.512,0.086,1.035-0.082,1.401-0.449c0.002-0.003,0.002-0.003,0.002-0.003c0.368-0.37,0.535-0.892,0.448-1.406l-4.765-28.196c-0.1-0.594-0.525-1.081-1.1-1.265c-0.572-0.185-1.202-0.031-1.628,0.396l-5.513,5.513L72.169,59.765c-0.628-0.628-1.647-0.628-2.277,0.001L59.691,69.967c-0.629,0.629-0.629,1.648,0,2.277l14.802,14.802l-5.515,5.515c-0.425,0.425-0.577,1.055-0.393,1.63C68.768,94.766,69.258,95.19,69.854,95.288z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
group.path("M30.146,4.712L1.874,0.022C1.361-0.064,0.84,0.104,0.473,0.471C0.47,0.474,0.47,0.474,0.47,0.474C0.103,0.844-0.064,1.366,0.023,1.88l4.766,28.197c0.1,0.593,0.525,1.081,1.099,1.264c0.573,0.186,1.202,0.032,1.629-0.395l5.513-5.513L27.83,40.234c0.63,0.63,1.648,0.63,2.278,0.001l10.201-10.201c0.63-0.63,0.63-1.648,0-2.278L25.507,12.954l5.515-5.515c0.424-0.425,0.577-1.056,0.394-1.63C31.232,5.234,30.742,4.81,30.146,4.712z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
sym.viewbox(-1, -1, 102, 102);
return sym;
});

sheet.glyphs.set("arrows-orth", (canvas: SVGContainer) => {
const sym = canvas.symbol();
const group = sym.group();
group.path("M4.712,69.854l-4.69,28.273c-0.086,0.512,0.082,1.034,0.449,1.401c0.002,0.003,0.002,0.003,0.002,0.003c0.37,0.368,0.893,0.535,1.406,0.447l28.197-4.765c0.594-0.1,1.081-0.525,1.264-1.1c0.185-0.572,0.031-1.202-0.396-1.628l-5.513-5.513l14.802-14.802c0.63-0.629,0.63-1.647,0-2.277l-10.2-10.201c-0.63-0.629-1.648-0.629-2.278,0L12.954,74.493l-5.515-5.515c-0.425-0.425-1.055-0.577-1.63-0.394C5.234,68.768,4.811,69.258,4.712,69.854z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
group.path("M95.288,30.146l4.69-28.273c0.085-0.512-0.083-1.034-0.449-1.4C99.527,0.47,99.527,0.47,99.527,0.47c-0.37-0.367-0.893-0.534-1.406-0.447L69.924,4.788c-0.594,0.1-1.081,0.525-1.265,1.1c-0.185,0.572-0.031,1.202,0.396,1.628l5.513,5.513L59.766,27.83c-0.629,0.629-0.629,1.648,0,2.278l10.2,10.201c0.63,0.629,1.648,0.629,2.278,0l14.802-14.802l5.515,5.515c0.425,0.425,1.056,0.578,1.63,0.394C94.766,31.232,95.19,30.742,95.288,30.146z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
group.path("M69.854,95.288l28.271,4.69c0.512,0.086,1.035-0.082,1.401-0.449c0.002-0.003,0.002-0.003,0.002-0.003c0.368-0.37,0.535-0.892,0.448-1.406l-4.765-28.196c-0.1-0.594-0.525-1.081-1.1-1.265c-0.572-0.185-1.202-0.031-1.628,0.396l-5.513,5.513L72.169,59.765c-0.628-0.628-1.647-0.628-2.277,0.001L59.691,69.967c-0.629,0.629-0.629,1.648,0,2.277l14.802,14.802l-5.515,5.515c-0.425,0.425-0.577,1.055-0.393,1.63C68.768,94.766,69.258,95.19,69.854,95.288z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
group.path("M30.146,4.712L1.874,0.022C1.361-0.064,0.84,0.104,0.473,0.471C0.47,0.474,0.47,0.474,0.47,0.474C0.103,0.844-0.064,1.366,0.023,1.88l4.766,28.197c0.1,0.593,0.525,1.081,1.099,1.264c0.573,0.186,1.202,0.032,1.629-0.395l5.513-5.513L27.83,40.234c0.63,0.63,1.648,0.63,2.278,0.001l10.201-10.201c0.63-0.63,0.63-1.648,0-2.278L25.507,12.954l5.515-5.515c0.424-0.425,0.577-1.056,0.394-1.63C31.232,5.234,30.742,4.81,30.146,4.712z")
.attr("data-playerfill", true)
.stroke("#000")
.fill("#fff");
group.rotate(45);
sym.viewbox(-21.544, -21.544, 143.089, 143.089);
return sym;
});

sheet.glyphs.set("cannon-piece", (canvas: SVGContainer) => {
const group = canvas.symbol();
group.path("m 78.838853,129.34362 q 0.206705,0.20671 -0.124023,0.20671 -1.157549,1.03352 -2.893871,1.6123 l -0.578775,-0.95085 q 1.694982,-0.45475 2.893871,-1.48827 z m 4.175442,-6.49054 q 0.08268,0.20671 -0.289387,0.0827 -2.315097,0.24805 -4.960922,0.45475 l 0.04134,1.24024 h 5.70506 v 0.78547 H 81.56736 v 1.98437 h 2.604483 v 0.90951 h -9.260387 v -0.90951 h 2.149733 l -0.206705,-5.0436 0.950843,0.28939 q 2.521802,-0.33073 4.506171,-0.7028 z m -2.273756,4.54751 v -1.98437 h -2.893871 l 0.08268,1.98437 z m 0.248046,1.32292 q 1.157549,0.95084 3.100576,1.44693 l -0.454751,0.95084 q -1.860345,-0.45475 -3.26594,-1.69498 z")
Expand Down

0 comments on commit 86aea72

Please sign in to comment.