Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | None |
- foreverTick :: MonadFree (UI n) m => m a -> m any
- untick :: (Functor n, MonadFree (UI n) m) => Free (UI n) a -> m (Either (Free (UI n) a) a)
- untickInfinite :: (Functor n, MonadFree (UI n) m) => Free (UI n) Void -> m (Free (UI n) Void)
- randomness :: (Random r, MonadFree (UI n) m) => (r, r) -> m r
- degrees :: Float -> Float
- radians :: Float -> Float
- unitV2 :: Floating a => a -> V2 a
- angleV2 :: RealFloat a => V2 a -> a
- loadPictureFromFile :: (Picture2D p, MonadFree (UI n) m) => FilePath -> m (p ())
- loadBitmaps :: FilePath -> Q [Dec]
- loadBitmapsWith :: ExpQ -> FilePath -> Q [Dec]
Controlling
foreverTick :: MonadFree (UI n) m => m a -> m anySource
An infinite loop that run tick
every frame after the given action.
untick :: (Functor n, MonadFree (UI n) m) => Free (UI n) a -> m (Either (Free (UI n) a) a)Source
Extract the next frame of the action.
untickInfinite :: (Functor n, MonadFree (UI n) m) => Free (UI n) Void -> m (Free (UI n) Void)Source
An infinite version of untick
.
Random
randomness :: (Random r, MonadFree (UI n) m) => (r, r) -> m rSource
Get a given range of value.
Helper
Loading
loadPictureFromFile :: (Picture2D p, MonadFree (UI n) m) => FilePath -> m (p ())Source
Create a Picture
from the given file.
loadBitmaps :: FilePath -> Q [Dec]Source
Load and define all pictures in the specified directory.