Skip to content

Commit

Permalink
fixed main script
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuukkan committed Apr 2, 2016
1 parent e22e18c commit 22aefa6
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions demo1.elm
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import Starfield
import SquareThing
import Html exposing (..)
import Html.Attributes exposing (..)
import Credits exposing (..)


type Effect = Rotozoom | Hypnocorn | Plasma | Starfield | Chilicorn | SquareThing
type Effect = Rotozoom | Hypnocorn | Plasma | Starfield | Credits | SquareThing

type alias State =
{ effect : Effect
Expand All @@ -31,7 +31,7 @@ muzak =

initialState : State
initialState =
{ effect = Chilicorn
{ effect = Starfield
, effectStart = 0
, time = 0
, stars = Starfield.stars
Expand Down Expand Up @@ -69,7 +69,7 @@ selectEffect t =
else if t < 100 then
SquareThing
else
Chilicorn
Credits


main : Signal Element
Expand All @@ -86,8 +86,8 @@ view state (w, h) =
hypnocorn w h time
Starfield ->
Starfield.view state.stars (w, h)
Chilicorn ->
chilicorn w h time
Credits ->
credits w h time
Rotozoom ->
rotozoom w h time
Plasma ->
Expand All @@ -96,11 +96,3 @@ view state (w, h) =
SquareThing.view state.squares (w, h)
in
flow outward [effectView, muzak]

chilicorn w h t =
collage w h
[ image h h "chilicorn.png"
|> toForm
|> scale (0.33)
|> alpha (0 + sin(t/1000))
]

0 comments on commit 22aefa6

Please sign in to comment.