From c0e38b3d008c2aa07c7cd03a0ce74edbaf05f8e5 Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 14 Apr 2020 11:49:04 +0000 Subject: added a bunch of the hackvr-server scripts --- share/hackvr/examples/hackvrd/list_to_cubes.sh | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 share/hackvr/examples/hackvrd/list_to_cubes.sh (limited to 'share/hackvr/examples/hackvrd/list_to_cubes.sh') diff --git a/share/hackvr/examples/hackvrd/list_to_cubes.sh b/share/hackvr/examples/hackvrd/list_to_cubes.sh new file mode 100755 index 0000000..0dfca06 --- /dev/null +++ b/share/hackvr/examples/hackvrd/list_to_cubes.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# blank lines deleteallexcept epoch +# expected input format: +# +# line1 +# line2 +# line3 +# +# line1 +# line2 +j=1 +r=200 +while read -r line;do + if [ "_$line" != '_' ];then +# ../tools/obj2hackvr.pl "$line" ../meshes/cube.obj + #turn line into hex to prevent stupid shit + hexline="$(printf "%s" "$line" | xxd -p | tr -d '\n')" + printf "%s addshape 18 3 8 %d %d 0 %d %d 0 %d %d\n" "$hexline" "$j" "$r" "$[$j+8]" "$r" "$j" "$r" + cd .. + printf "%s\n" "$line" | tee /dev/stderr | makelabel.sh "$hexline" 15 $j $r + cd filebrowser + #printf "%s move 0 %d %d 0 0 0 0 0 0\n" "$hexline" "$i" "$r" + printf "%s rotate 0 %d 0\n" "$hexline" "$[i * 3]" + #somehow printf '%s\n' "$line" | ./testfont.sh and make its output belong to same group as $line.. sed? + i=$[i+10] + j=$[j+4] + else + cat camera.pos + printf "USER deleteallexcept USER\n" #deleteallexcept doesn't have gr deletions yet I think. + j=0 + i=0 + fi +done -- cgit v1.2.3