yampa-gloss-0.2.1: A GLOSS backend for Yampa
Copyright(c) 2018-2023 Ivan Perez
(c) 2015-2018 Konstantin Saveljev
LicenseMIT License (MIT)
Maintainerivan.perez@keera.co.uk
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.Gloss.Interface.FRP.Yampa

Description

Gloss backend for Yampa.

Gloss is a purely functional library to create pictures and animations. Yampa is a Functional Reactive Programming DSL structured around signal functions.

This module provides a function to create an interactive Gloss animation driven by a signal function that transforms a Gloss input signal into a Gloss Picture.

Synopsis

Documentation

type InputEvent = Event Source #

Type representing input events to the signal function.

Note that this type represents the kind of information placed inside the Yampa Event. It will still be wrapped in an Event to represent the fact that an InputEvent may or may not be present at one particular point in time, and that it changes discretely.

playYampa Source #

Arguments

:: Display

The display method

-> Color

The background color

-> Int

The refresh rate, in Hertz

-> SF (Event InputEvent) Picture

Signal function

-> IO () 

Play the game in a window, updating when the value of the provided