Library system for shared variables

This commit is contained in:
2024-07-30 15:06:23 -07:00
parent 723b769fcd
commit 27c0cb7c2a
7 changed files with 42 additions and 24 deletions

1
make
View File

@ -73,6 +73,7 @@ if len(sys.argv) != 1:
sys.argv.pop(1) sys.argv.pop(1)
print("Removing output directory...") print("Removing output directory...")
shutil.rmtree("output") # Scary shutil.rmtree("output") # Scary
print("Output directory removed")
if sys.argv[1] == "all": if sys.argv[1] == "all":
if len(sys.argv) == 3: if len(sys.argv) == 3:

1
src/global.asy Normal file
View File

@ -0,0 +1 @@
int unit_size = 20;

10
src/zakhat/zakhat.asy Normal file
View File

@ -0,0 +1,10 @@
access "src/global.asy" as global;
int size_small = 70;
int size_medium = 50;
path brim = (0,-28) .. (3.5,-31) .. (10,-33) -- (30,-33) .. (36.5,-31) .. (40,-28);
path top = box((10,0), (30,-26));
path belt = box((10,-26), (30,-33));

View File

@ -1,12 +0,0 @@
unitsize(20);
pen p=defaultpen+linewidth(50); // Set the pen width
// Brim
draw((0,-28) .. (3.5,-31) .. (10,-33) -- (30,-33) .. (36.5,-31) .. (40,-28), p);
// Top
draw(box((10,0), (30,-26)), p);
// Belt
draw(box((10,-26), (30,-33)), p);

View File

@ -0,0 +1,15 @@
access "src/global.asy" as global;
access "src/zakhat/zakhat.asy" as zakhat;
unitsize(global.unit_size);
pen p=defaultpen+linewidth(zakhat.size_medium); // Set the pen width
// Brim
draw(zakhat.brim, p);
// Top
draw(zakhat.top, p);
// Belt
draw(zakhat.belt, p);

View File

@ -0,0 +1,15 @@
access "src/global.asy" as global;
access "src/zakhat/zakhat.asy" as zakhat;
unitsize(global.unit_size);
pen p=defaultpen+linewidth(zakhat.size_medium); // Set the pen width
// Brim
draw(zakhat.brim, p);
// Top
filldraw(zakhat.top, drawpen=p);
// Belt
draw(zakhat.belt, p);

View File

@ -1,12 +0,0 @@
unitsize(20);
pen p=defaultpen+linewidth(50); // Set the pen width
// Brim
draw((0,-28) .. (3.5,-31) .. (10,-33) -- (30,-33) .. (36.5,-31) .. (40,-28), p);
// Top
filldraw(box((10,0), (30,-26)), drawpen=p);
// Belt
draw(box((10,-26), (30,-33)), p);