Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class (MonadReflex t m, RealFrac time) => MonadTime t time m | m -> t time where
- delay_ :: MonadTime t time m => Event t time -> m (Event t ())
- animate :: (Reflex t, RealFrac time) => Animation time a -> Behavior t time -> Behavior t a
- animateClip :: (Reflex t, RealFrac time) => Clip time a -> Behavior t time -> Behavior t (Maybe a)
- animateOn :: (Reflex t, RealFrac time) => Event t (Animation time a) -> Behavior t time -> Event t (Behavior t a)
- play :: MonadTime t time m => Animation time a -> m (Behavior t a)
- playClip :: MonadTime t time m => Clip time a -> m (Behavior t (Maybe a), Event t ())
- playClamp :: MonadTime t time m => Clip time a -> m (Behavior t a, Event t ())
- playOn :: MonadTime t time m => Event t (Clip time a) -> m (Behavior t (Maybe a), Event t ())
- match :: (Reflex t, Eq a) => a -> Event t a -> Event t ()
- matchBy :: Reflex t => (a -> Bool) -> Event t a -> Event t ()
- pushFor :: Reflex t => Event t a -> (a -> PushM t b) -> Event t b
Documentation
class (MonadReflex t m, RealFrac time) => MonadTime t time m | m -> t time where Source
getTime :: m (Behavior t time) Source
A behavior for time, must be up to date (i.e. represents current time not previous time)
after :: time -> m (Event t ()) Source
Fire an event at or just after a period of time
delay :: Event t (a, time) -> m (Event t (NonEmpty a)) Source
Delay an event by a period of time, returns a list in case two delayed events occur within the sampling rate of the framework
animate :: (Reflex t, RealFrac time) => Animation time a -> Behavior t time -> Behavior t a Source
Animate an infinite animation using framework time
animateClip :: (Reflex t, RealFrac time) => Clip time a -> Behavior t time -> Behavior t (Maybe a) Source
Sample a Clip during it's period, outside it's period return Nothing
animateOn :: (Reflex t, RealFrac time) => Event t (Animation time a) -> Behavior t time -> Event t (Behavior t a) Source
Create a Behavior from an infinite animation on the occurance of the event
play :: MonadTime t time m => Animation time a -> m (Behavior t a) Source
Play an infinite animation starting now
playClip :: MonadTime t time m => Clip time a -> m (Behavior t (Maybe a), Event t ()) Source
Play an animation clip, giving a Behavior of it's value and an Event firing as it finishes
playClamp :: MonadTime t time m => Clip time a -> m (Behavior t a, Event t ()) Source
Play an animation clip, except clamp the ends so the Behavior is no longer 'Maybe a'
playOn :: MonadTime t time m => Event t (Clip time a) -> m (Behavior t (Maybe a), Event t ()) Source
Play an animation clip starting on the occurance of an Event if another play event occurs before the last one has finished, switch to that one instead.