mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-10 23:52:22 +00:00
16 lines
429 B
Haskell
Executable file
16 lines
429 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 $ mkAnimation 5 $ \t ->
|
|
mkGroup
|
|
[ mkBackground "black"
|
|
, rotate (t*360) $ scaleToWidth 6 $ embedImage img
|
|
]
|
|
where
|
|
img = generateImage pixelRenderer 255 255
|
|
pixelRenderer x y = PixelRGB8 (fromIntegral x) (fromIntegral y) 128
|