blob: 086f8a40b84e4cb939c962b5e2e0764b45ddf769 (
plain)
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
|
module Point where
import Vec2 (..)
import Board (boardDiagonal)
type Point =
{ initTime : Float
, initPos : Vec2
, initDest : Vec2
, move : Float -> Vec2 -> Vec2 -> Float -> Vec2
}
pointMove : Point -> Float -> Vec2
pointMove {initTime, initPos, initDest, move} time =
move initTime initPos initDest time
pointSize : Float
pointSize = 5
pointSpeed : Float -> Float
pointSpeed dt = dt / 20
pointSpawnDist : Float
pointSpawnDist = boardDiagonal * 3 / 5
pointAwayDist : Float
pointAwayDist = boardDiagonal * 3 / 4
|