Wider ranges, an agent guide, patch and effects commands

Every effect's sliders and clamps now reach far (a nudge from a tremor
to an earthquake, a banner that stays minutes). AGENTS.md documents the
file schema, every option and range, the CLI, verification and worked
scenarios for scripts and coding agents; attention-required effects
prints the catalog as JSON, patch merges keys into a rule, docs prints
the guide.
This commit is contained in:
2026-09-08 17:21:44 +01:00
parent bd752d0968
commit e5053de6a7
12 changed files with 259 additions and 40 deletions
+2 -2
View File
@@ -11,7 +11,7 @@
#
# Options (set on the effect in rules.json):
# duration seconds, default 1
# intensity 0.5..30, how far the picture moves, default 1.5 (a phone buzz; 6 is a proper MSN nudge)
# intensity 0.1..100, how far the picture moves, default 1.5 (a phone buzz; 6 is a proper MSN nudge)
# speed new positions per second, default 200: at or above the refresh rate every frame differs
set -uo pipefail
@@ -34,7 +34,7 @@ shader=$run_dir/nudge.frag
exec 9>"$run_dir/nudge.lock"
flock -n 9 || exit 0
amp=$(awk -v i="$intensity" 'BEGIN { printf "%.5f", (i > 30 ? 30 : i) / 1000 }')
amp=$(awk -v i="$intensity" 'BEGIN { printf "%.5f", (i > 100 ? 100 : i) / 1000 }')
rate=$(awk -v s="$speed" 'BEGIN { printf "%.1f", (s < 1 ? 1 : s) }')
cat > "$shader" <<FRAG
+1
View File
@@ -13,6 +13,7 @@ volume=${AR_OPT_INTENSITY:-${AR_OPT_VOLUME:-1}}
times=${AR_OPT_SPEED:-${AR_OPT_REPEAT:-1}}
[[ $volume =~ ^[0-9]*\.?[0-9]+$ ]] || volume=1
[[ $times =~ ^[0-9]+$ ]] || times=1
(( times > 50 )) && times=50
file=${file/#\~/$HOME}
[[ -r $file ]] || { echo "sound: cannot read $file" >&2; exit 1; }