Skip to content

Helm Extras contains functions that are incompatible with the goals of Helm.

License

Notifications You must be signed in to change notification settings

niilohlin/helm-extras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

helm-extras

##Animation Example.

import FRP.Helm
import FRP.Helm.Window
import FRP.Helm.Time
import FRP.Helm.Extras.Animation

frames :: Signal Form
frames = animate (fps 60) (constant Cycle) $ relative [
   (filled red   $ square 100, second)
  ,(filled green $ square 100, second)
  ,(filled blue  $ square 100, second)
  ]

render :: (Int, Int) -> Form -> Element
render (w, h) animation = centeredCollage w h [animation]

main :: IO ()
main = run defaultConfig $ render <~ dimensions ~~ frames

##Transition Example

import FRP.Helm
import FRP.Helm.Window
import FRP.Helm.Time
import FRP.Helm.Extras.Transition

trans :: Signal Color
trans = transition (fps 60) (constant Cycle) $ fromList [
   (white, 0)
  ,(green, 2 * second)
  ,(red, 5 * second)
  ,(black, 1 * second)
  ,(yellow, 2 * second)
  ]

render :: (Int, Int) -> Color -> Element
render (w, h) color = centeredCollage w h [filled color $ square 100]

main :: IO ()
main = run defaultConfig $ render <~ dimensions ~~ trans

About

Helm Extras contains functions that are incompatible with the goals of Helm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published