Safe Haskell | None |
---|
Contains miscellaneous utility functions and the main functions for interfacing with the engine.
Types
A type describing an amount of time in an arbitary unit. Use the time composing/converting functions to manipulate time values.
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 $ fmap (fmap render) Window.dimensions
Utilities
turns :: Double -> DoubleSource
Converts turns into the standard angle measurement (radians). Turns are essentially full revolutions of the unit circle.