-
Notifications
You must be signed in to change notification settings - Fork 0
/
masks.py
90 lines (86 loc) · 2 KB
/
masks.py
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import numpy as np
mask_list = {
1: {"cliff_right": "cliff_r_left.png", "flat_land": "flat_right.png"},
4: {"flat_land": "flat_left.png", "cliff_left": "cliff_l_right.png"},
5: {"cliff_right": "cliff_r_left.png", "cliff_left": "cliff_l_right.png"},
11: {"flat_land": "flat_left.png", "cliff_right": "cliff_r_right.png"},
14: {"cliff_left": "cliff_l_left.png", "flat_land": "flat_right.png"},
2: {"cliff_back": "cliff_b_lower.png", "flat_land": "flat_upper.png"},
7: {"flat_land": "flat_lower.png", "cliff_back": "cliff_b_upper.png"},
8: {"flat_land": "flat_lower.png", "cliff_front": "cliff_f_upper.png"},
10: {"cliff_back": "cliff_b_lower.png", "cliff_front": "cliff_f_upper.png"},
13: {"cliff_front": "cliff_f_lower.png", "flat_land": "flat_upper.png"},
}
order_translation = {
"flat_land": 0,
"slope_back_right": 3,
"slope_back_left": 6,
"slope_front_right": 9,
"slope_front_left": 12,
"cliff_front": 15,
"cliff_back": 16,
"cliff_right": 17,
"cliff_left": 18,
}
TRANSFORM_MATRIX = {
"flat_land": np.array(
[
[-2, 2],
[1, 1],
]
),
"slope_front_right": np.array(
[
[-2, 2],
[1.5, 1],
]
),
"slope_front_left": np.array(
[
[-2, 2],
[1, 1.5],
]
),
"cliff_front": np.array(
[
[-2, 2],
[1.5, 1.5],
]
),
"cliff_right": np.array(
[
[-2, 2],
[1.5, 0.5],
]
),
"slope_back_right": np.array(
[
[-2, 2],
[1, 0.5],
]
),
"slope_back_left": np.array(
[
[-2, 2],
[0.5, 1],
]
),
"cliff_back": np.array(
[
[-2, 2],
[0.5, 0.5],
]
),
"cliff_left": np.array(
[
[-2, 2],
[0.5, 1.5],
]
),
}
MIRROR = np.array(
[
[0, 1],
[1, 0],
]
)