Safe Haskell | None |
---|
Contains miscellaneous utility functions and the main functions for interfacing with the engine.
Engine
run :: SignalGen (Signal Element) -> IO ()Source
Initializes and runs the game engine. The supplied signal generator is constantly sampled for an element to render until the user quits.
import FRP.Helm import qualified FRP.Helm.Window as Window render :: (Int, Int) -> Element render (w, h) = collage w h [filled red $ rect (fromIntegral w) (fromIntegral h)] main :: IO () main = run $ do dims <- Window.dimensions return $ fmap render dims
Utilities
turns :: Double -> DoubleSource
Converts turns into the standard angle measurement (radians). Turns are essentially full revolutions of the unit circle.
Prelude
module FRP.Helm.Color
module FRP.Helm.Graphics