-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
module Credits(credits, main) where | ||
|
||
import Color exposing (..) | ||
import Graphics.Collage exposing (..) | ||
import Graphics.Element exposing (..) | ||
import Time exposing (..) | ||
import Random exposing (..) | ||
import Basics exposing (..) | ||
import Window | ||
import Text exposing (..) | ||
|
||
main = | ||
Signal.map3 credits Window.width Window.height (Signal.foldp (+) 0 (fps 30)) | ||
|
||
credits w h t = | ||
if (t < 33000) then | ||
collage w h | ||
[ rect (toFloat w) (toFloat h) | ||
|> filled black | ||
,image h h "chilicorn.png" | ||
|> toForm | ||
|> scale (0.33) | ||
--|> alpha (1.5 - sin(t/1000)) | ||
|> rotate (degrees (cos(t/1000)*10)) | ||
, | ||
textElement t | ||
] | ||
else | ||
collage w h | ||
[ rect (toFloat w) (toFloat h) | ||
|> filled black | ||
] | ||
|
||
textElement : Float -> Form | ||
textElement t = | ||
text (monospace (Text.color grey (message t))) | ||
|> scale(3) | ||
|> move (cos(t/1000)*200, -200 + sin(t/150)*10) | ||
|
||
message : Float -> Text | ||
message t = | ||
if t < 4000 then | ||
fromString "-=[ FTRC - Code-Camp '16 ]=-" | ||
else if t < 8000 then | ||
fromString "-=[ starfield - mmyn & aahv ]=-" | ||
else if t < 12000 then | ||
fromString "-=[ rotocorn - ktuu ]=-" | ||
else if t < 16000 then | ||
fromString "-=[ hypnocorn - ktuu ]=-" | ||
else if t < 20000 then | ||
fromString "-=[ plasma - aahv ]=-" | ||
else if t < 24000 then | ||
fromString "-=[ pixelmajick - mmyn ]=-" | ||
else if t < 28000 then | ||
fromString "-=[ greetz to Hummeripojat! ]" | ||
else | ||
fromString "chilicorn.org" |