-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.elm
37 lines (31 loc) · 1.11 KB
/
Config.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
module Config where
import Text(defaultStyle)
hsv h s v = hsl (degrees h) (s/100) (v/100)
canvasWidth = 1000
canvasHeight = 600
platformSpeedIncreaseFactor = 0.02
platformSpeed h = 0.2 * (h * platformSpeedIncreaseFactor + 100) / 100
timeBetweenPlatforms h = 45/(platformSpeed h)
platformWidth = 100
maxRodLength = 1000
gravity = 0.0004
meMass = 200
rodRestLength = 60
rodElasticity = 0.001
damping = 0.1
barrierStunTime = 4000
meWidth = 30
meColour = hsv 30 90 50
meStunnedColour = hsv 0 100 50
rodColour = hsv 30 90 50
bgColour = hsv 200 90 90
groundColour = hsv 200 70 20
cursorTraceColour = groundColour
cursorTraceDetectedColour = hsv 0 100 50
platformColour = hsv 200 90 20
barrierWidth = 10
barrierFlashPeriod = 1000
barrierFill t = rgba 255 0 0 (0.25 * sin (toFloat (truncate t % barrierFlashPeriod) * 2 * pi / barrierFlashPeriod) + 0.25)
barrierGrad t = linear (0,0) (barrierWidth-10,0) [(0, rgba 255 0 0 (0.25 * sin (toFloat (truncate t % barrierFlashPeriod) * 2 * pi / barrierFlashPeriod) + 0.25)),
(1, rgba 255 0 0 1)]
scoreStyle = { defaultStyle | height <- Just 18 }