Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ktuukkan/codecamp16
Browse files Browse the repository at this point in the history
  • Loading branch information
Miko Mynttinen committed Apr 1, 2016
2 parents 9783c8a + 2d2c5b7 commit 859cbd9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions demo1.elm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ type alias State =
, stars: Starfield.Stars
}

muzak : Html
muzak : Element
muzak =
Html.audio [ src "muzak.mp3", preload "true", autoplay True ] []
|> toElement 1 1

initialState : State
initialState =
Expand Down Expand Up @@ -68,17 +69,17 @@ view : State -> (Int, Int) -> Element
view state (w, h) =
case state.effect of
Cornfield ->
flow outward [cornfield w h state.time, toElement 1 1 muzak]
flow outward [cornfield w h state.time, muzak]
Hypnocorn ->
flow outward [hypnocorn w h state.time, toElement 1 1 muzak]
flow outward [hypnocorn w h state.time, muzak]
Starfield ->
flow outward [Starfield.view state.stars (w, h), toElement 1 1 muzak]
flow outward [Starfield.view state.stars (w, h) (w, h), muzak]
Chilicorn ->
flow outward [chilicorn w h state.time, toElement 1 1 muzak]
flow outward [chilicorn w h state.time, muzak]
Rotozoom ->
flow outward [rotozoom w h state.time, toElement 1 1 muzak]
flow outward [rotozoom w h state.time, muzak]
Plasma ->
flow outward [plasma w h state.time, toElement 1 1 muzak]
flow outward [plasma w h state.time, muzak]

chilicorn w h t =
collage w h
Expand Down

0 comments on commit 859cbd9

Please sign in to comment.