-
Notifications
You must be signed in to change notification settings - Fork 0
/
Credits.elm
59 lines (54 loc) · 1.67 KB
/
Credits.elm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 < 36000) 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 "-=[ squarething - mmyn & aahv ]=-"
else if t < 28000 then
fromString "-=[ credits - ktuu ]=-"
else if t < 32000 then
fromString "-=[ greetz to Hummeripojat! ]=-"
else
fromString "chilicorn.org"