mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-10 15:42:21 +00:00
* 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
14 lines
421 B
Haskell
Executable file
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
|