Fix gallery code and add default_cube.

Former-commit-id: 9e064988a9483772cbd2cc02b3d1415ea37b0c2b
This commit is contained in:
David Himmelstrup 2019-11-29 10:31:12 +08:00
commit 585a2145ae
2 changed files with 8 additions and 38 deletions

View file

@ -136,47 +136,17 @@ This file is auto-generated by docs/render_all.sh. DO NOT EDIT.
<br/><hr><br/>
## sunflower
## blender_default_cube
<details>
<summary>View sunflower.hs</summary>
<summary>View blender_default_cube.hs</summary>
<pre><code class="haskell">
{!examples/sunflower.hs!}
{!examples/blender_default_cube.hs!}
</code></pre>
</details>
<br/>
<video width="640" height="360" autoplay loop>
<source src="https://github.com/Lemmih/reanimate/raw/master/docs/rendered/sunflower.mp4">
</video>
<br/><hr><br/>
## tangent_and_normal
<details>
<summary>View tangent_and_normal.hs</summary>
<pre><code class="haskell">
{!examples/tangent_and_normal.hs!}
</code></pre>
</details>
<br/>
<video width="640" height="360" autoplay loop>
<source src="https://github.com/Lemmih/reanimate/raw/master/docs/rendered/tangent_and_normal.mp4">
</video>
<br/><hr><br/>
## vector_field
<details>
<summary>View vector_field.hs</summary>
<pre><code class="haskell">
{!examples/vector_field.hs!}
</code></pre>
</details>
<br/>
<video width="640" height="360" autoplay loop>
<source src="https://github.com/Lemmih/reanimate/raw/master/docs/rendered/vector_field.mp4">
<source src="https://github.com/Lemmih/reanimate/raw/master/docs/rendered/blender_default_cube.mp4">
</video>
<br/><hr><br/>

View file

@ -2,7 +2,7 @@
ROOT=`stack path --project-root`
EXAMPLES='boundingbox colormaps goo latex_basic latex_color latex_draw
latex_wheel raster sphere sunflower tangent_and_normal vector_field'
latex_wheel raster sphere blender_default_cube'
WIDTH=640
HEIGHT=$((WIDTH*9/16))
@ -10,7 +10,7 @@ FPS=30
SRC_DIR=$ROOT/examples
DST_DIR=$ROOT/docs/rendered
OPTS='--fps $FPS --width $WIDTH --height $HEIGHT'
OPTS="--fps $FPS --width $WIDTH --height $HEIGHT"
cat << EOF > $ROOT/docs/gallery.md
# Gallery
@ -37,8 +37,8 @@ for e in $EXAMPLES; do
EOF
SRC_FILE=./$SRC_DIR/$e.hs
DST_FILE=./$DST_DIR/$e.mp4
SRC_FILE=$SRC_DIR/$e.hs
DST_FILE=$DST_DIR/$e.mp4
if [[ "$SRC_FILE" -nt "$DST_FILE" ]]; then
stack $SRC_FILE render --compile -o $DST_FILE $OPTS
fi