module Brillo.Interface.Pure.Animate (
module Brillo.Data.Display,
module Brillo.Data.Picture,
module Brillo.Data.Color,
animate,
)
where
import Brillo.Data.Color
import Brillo.Data.Display
import Brillo.Data.Picture
import Brillo.Internals.Interface.Animate
import Brillo.Internals.Interface.Backend
animate
:: Display
-> Color
-> (Float -> Picture)
-> IO ()
animate :: Display -> Color -> (Float -> Picture) -> IO ()
animate Display
display Color
backColor Float -> Picture
frameFun =
GLFWState
-> Bool
-> Display
-> Color
-> (Float -> IO Picture)
-> (Controller -> IO ())
-> IO ()
forall a.
Backend a =>
a
-> Bool
-> Display
-> Color
-> (Float -> IO Picture)
-> (Controller -> IO ())
-> IO ()
animateWithBackendIO
GLFWState
defaultBackendState
Bool
True
Display
display
Color
backColor
(Picture -> IO Picture
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Picture -> IO Picture)
-> (Float -> Picture) -> Float -> IO Picture
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Float -> Picture
frameFun)
(IO () -> Controller -> IO ()
forall a b. a -> b -> a
const (() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()))