25 lines
435 B
Bash
Executable File
25 lines
435 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "You must pass the basename for the animation folder"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Building"
|
|
go build -o render
|
|
mkdir -p $1
|
|
|
|
echo "Running"
|
|
|
|
frame=0
|
|
for x in $(seq -3 0.1 3); do
|
|
ff=$(printf "%03d" $frame)
|
|
./render "-repeat=1" "-xofs=$x" "-zofs=-1.8" "-fov=70" "-p6file=$1/$ff.ppm"
|
|
frame=$((frame + 1))
|
|
done
|
|
|
|
echo "Converting animation"
|
|
|
|
cd $1
|
|
convert -delay 5 -loop 0 *.ppm -resize 256x256 anim.gif
|