diff --git a/Makefile b/Makefile index 8de8dd0..a300c50 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ COV := $(DENO) coverage cov_profile FMT := $(DENO) fmt *.ts examples/*.ts NPM_PUB := npm publish -D2 := nix run git+https://git.pleshevski.ru/mynix/tools\\\#d2_unstable -- +D2 := nix run git+https://git.pleshevski.ru/mynix/tools\\\#d2 -- DIAGRAMS := \ turnstile @@ -40,7 +40,7 @@ clean: rm -rf assets/*.svg define d2rule -d2_$(1)_args := $(D2) $$($(1)_theme_args) assets/$(1).d2 assets/$(1).svg +$(1)_args := $(D2) $$($(1)_theme_args) assets/$(1).d2 assets/$(1).svg $(1): ; $$($(1)_args) $(1)-w: ; $$($(1)_args) -w diff --git a/assets/turnstile.d2 b/assets/turnstile.d2 index 2ab84b5..5275062 100644 --- a/assets/turnstile.d2 +++ b/assets/turnstile.d2 @@ -1,6 +1,18 @@ direction: right Turnstile: { - Locked -> Unlocked: coin - Unlocked -> Locked: push + l: Locked { + shape: circle + style.fill: "#fd7373" + } + u: Unlocked { + shape: circle + style.fill: "#59c061" + } + + l -> l: push + u -> l: push + + l -> u: coin + u -> u: coin } diff --git a/assets/turnstile.svg b/assets/turnstile.svg index 713a4d3..3da87e0 100644 --- a/assets/turnstile.svg +++ b/assets/turnstile.svg @@ -2,7 +2,7 @@