imj-base-0.1.0.2: Game engine with geometry, easing, animated text, delta rendering.

Safe HaskellNone
LanguageHaskell2010

Imj.Graphics.Text.Animation

Contents

Description

Examples

Examples are available in Imj.Example.SequentialTextTranslationsAnchored:

  • Run imj-base-examples-exe to see these examples displayed in the terminal

Synopsis

TextAnimation

Interpolates between various ColorStrings, and at the same time interpolates their anchors.

Anchors interpolation can occur :

data AnchorChars Source #

One anchor per Character

data AnchorStrings Source #

One anchor per String

Constructors

mkTextTranslation Source #

Arguments

:: ColorString 
-> Float

Duration in seconds

-> Coords Pos

Left anchor at the beginning

-> Coords Pos

Left anchor at the end

-> TextAnimation AnchorChars 

Translates a ColorString between two anchors.

mkSequentialTextTranslationsCharAnchored Source #

Arguments

:: [([ColorString], Coords Pos, Coords Pos)]

List of (texts, from anchor, to anchor)

-> Float

duration in seconds

-> TextAnimation AnchorChars 

Translates text in an animated way,ete character by character.

Examples are given in Imj.Example.SequentialTextTranslationsAnchored.

mkSequentialTextTranslationsStringAnchored Source #

Arguments

:: [([ColorString], Coords Pos, Coords Pos)]

List of (texts, from anchor, to anchor)

-> Float

Duration in seconds

-> TextAnimation AnchorStrings 

Translates text in an animated way, ColorString by ColorString.

Examples are given in Imj.Example.SequentialTextTranslationsAnchored.

Draw

renderAnimatedTextCharAnchored :: (Draw e, MonadReader e m, MonadIO m) => TextAnimation AnchorChars -> Frame -> m () Source #

Render a char-anchored TextAnimation for a given Frame

renderAnimatedTextStringAnchored :: (Draw e, MonadReader e m, MonadIO m) => TextAnimation AnchorStrings -> Frame -> m () Source #

Render a string-anchored TextAnimation for a given Frame

Reexports