reanimate/examples/raster.hs
Jan Hrcek 0aca2333e2
Fix some hlint warnings, and more consistency in examples (#167)
* Remove redundant brackets

* Various hlint fixes

* Remove unused language pragrams and other fixes

* Use addStatic more consistently in examples

* Rename remaining usages of sceneAnimation to scene
2020-09-20 22:51:22 +08:00

14 lines
421 B
Haskell
Executable file

#!/usr/bin/env stack
-- stack runghc --package reanimate
module Main (main) where
import Reanimate
import Codec.Picture
main :: IO ()
main = reanimate $ addStatic bg $ mkAnimation 5 $ \t ->
rotate (t*360) $ scaleToWidth 6 $ embedImage img
where
bg = mkBackground "black"
img = generateImage pixelRenderer 255 255
pixelRenderer x y = PixelRGB8 (fromIntegral x) (fromIntegral y) 128