Clean up scaling example.

This commit is contained in:
David 2019-02-14 16:05:19 +01:00
commit 1b4c8fe4fc
2 changed files with 8 additions and 12 deletions

View file

@ -23,13 +23,11 @@ so they're all in sync, and increases the playback speed.
``` ```
scaling :: Ani () scaling :: Ani ()
scaling = adjustSpeed 2 $ defineAnimation $ syncAll scaling = adjustSpeed 2 $ syncAll
[ proc () -> [ defineAnimation $ proc () ->
annotate' (defineAnimation animation) annotate' animation -< g_ [transform_ $ translate x y <> " " <> scale 0.5 0.5]
-< g_ [transform_ $ translate x y] . g_ [transform_ $ scale 0.5 0.5]
| x <- [0,160] | x <- [0,160]
, y <- [0,90] , y <- [0,90]
| animation <- [sinewave, morph_wave, highlight, progressMeters] | animation <- [sinewave, morph_wave, highlight, progressMeters]]
]
``` ```
![Scaling](gifs/scaling.gif) ![Scaling](gifs/scaling.gif)

View file

@ -223,11 +223,9 @@ circle_clip sub = proc () -> do
scaling :: Ani () scaling :: Ani ()
scaling = adjustSpeed 2 $ defineAnimation $ syncAll scaling = adjustSpeed 2 $ syncAll
[ proc () -> [ defineAnimation $ proc () ->
annotate' (defineAnimation animation) annotate' animation -< g_ [transform_ $ translate x y <> " " <> scale 0.5 0.5]
-< g_ [transform_ $ translate x y] . g_ [transform_ $ scale 0.5 0.5]
| x <- [0,160] | x <- [0,160]
, y <- [0,90] , y <- [0,90]
| animation <- [sinewave, morph_wave, highlight, progressMeters] | animation <- [sinewave, morph_wave, highlight, progressMeters]]
]