-
Notifications
You must be signed in to change notification settings - Fork 0
/
loadPathData.js
172 lines (155 loc) · 7.9 KB
/
loadPathData.js
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
let mapping = {};
let counters = {};
const data = {
svgHeader: `
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1296 1728" style="enable-background:new 0 0 1296 1728;" xml:space="preserve">
<style>
svg * {
fill: none;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.back {
stroke: #636e72;
}
.ghost {
stroke: #636e72;
}
.front {
stroke: #ffffff;
}
</style>
`.replace(/\s+/g, " "),
svgFooter: "</svg>",
classesOrder: ["back", "ghosts", "front"],
edges: [
{ class: "back", 0: [571.3, 660.3], 1: [574.3, 753.5] },
{ class: "back", 0: [522.8, 676.7], 1: [528.4, 778.4] },
{ class: "back", 0: [463.4, 696.9], 1: [472.4, 808.5] },
{ class: "back", 0: [574.3, 753.5], 1: [528.4, 778.4] },
{ class: "back", 0: [472.4, 808.5], 1: [528.4, 778.4] },
{ class: "back", 0: [402.9, 844], 1: [472.4, 808.5] },
{ class: "back", 0: [574.3, 753.5], 1: [577.2, 839.6] },
{ class: "back", 0: [528.4, 778.4], 1: [533.5, 871.4] },
{ class: "back", 0: [472.4, 808.5], 1: [480.5, 909.6] },
{ class: "back", 0: [577.2, 839.6], 1: [533.5, 871.4] },
{ class: "back", 0: [480.5, 909.6], 1: [533.5, 871.4] },
{ class: "back", 0: [415.6, 955], 1: [480.5, 909.6] },
{ class: "back", 0: [488.3, 1002.1], 1: [480.5, 909.6] },
{ class: "back", 0: [538, 956.9], 1: [533.5, 871.4] },
{ class: "back", 0: [579.8, 919.5], 1: [577.2, 839.6] },
{ class: "back", 0: [538, 956.9], 1: [579.8, 919.5] },
{ class: "back", 0: [488.3, 1002.1], 1: [538, 956.9] },
{ class: "back", 0: [427.1, 1055.1], 1: [488.3, 1002.1] },
{ class: "back", 0: [660.2, 666.7], 1: [660.2, 763.3] },
{ class: "back", 0: [756.5, 673.6], 1: [751.9, 773.6] },
{ class: "back", 0: [574.3, 753.5], 1: [660.2, 763.3] },
{ class: "back", 0: [751.9, 773.6], 1: [660.2, 763.3] },
{ class: "back", 0: [851.8, 785.2], 1: [751.9, 773.6] },
{ class: "back", 0: [659.3, 852.1], 1: [747.6, 865.5] },
{ class: "back", 0: [751.9, 773.6], 1: [747.6, 865.5] },
{ class: "back", 0: [843.2, 880], 1: [747.6, 865.5] },
{ class: "back", 0: [577.2, 839.6], 1: [659.3, 852.1] },
{ class: "back", 0: [660.2, 763.3], 1: [659.3, 852.1] },
{ class: "back", 0: [658.9, 934.1], 1: [579.8, 919.5] },
{ class: "back", 0: [659.3, 852.1], 1: [658.9, 934.1] },
{ class: "back", 0: [747.6, 865.5], 1: [743.7, 949.9] },
{ class: "back", 0: [658.9, 934.1], 1: [743.7, 949.9] },
{ class: "back", 0: [835.1, 967], 1: [743.7, 949.9] },
{ class: "back", 0: [622.9, 974.6], 1: [538, 956.9] },
{ class: "back", 0: [658.9, 934.1], 1: [622.9, 974.6] },
{ class: "back", 0: [743.7, 949.9], 1: [714.5, 993.6] },
{ class: "back", 0: [622.9, 974.6], 1: [714.5, 993.6] },
{ class: "back", 0: [813.9, 1014.4], 1: [714.5, 993.6] },
{ class: "back", 0: [679.2, 1046.7], 1: [788, 1072.4] },
{ class: "back", 0: [714.5, 993.6], 1: [679.2, 1046.7] },
{ class: "back", 0: [635.1, 1110.7], 1: [679.2, 1046.7] },
{ class: "back", 0: [622.9, 974.6], 1: [579.5, 1023.5] },
{ class: "back", 0: [526.1, 1081.6], 1: [579.5, 1023.5] },
{ class: "back", 0: [679.2, 1046.7], 1: [579.5, 1023.5] },
{ class: "back", 0: [488.3, 1002.1], 1: [579.5, 1023.5] },
{ class: "ghost", 0: [427.1, 1055.1], 1: [861.3, 681.2] },
{ class: "ghost", 0: [755.5, 1143], 1: [571.3, 660.3] },
{ class: "ghost", 0: [835.1, 967], 1: [388.7, 720.1] },
{ class: "ghost", 0: [579.8, 919.5], 1: [777.5, 762.5] },
{ class: "front", 0: [415.6, 955], 1: [427.1, 1055.1] },
{ class: "front", 0: [402.9, 844], 1: [415.6, 955] },
{ class: "front", 0: [388.7, 720.1], 1: [402.9, 844] },
{ class: "front", 0: [526.1, 1081.6], 1: [519.5, 978] },
{ class: "front", 0: [512, 862.3], 1: [519.5, 978] },
{ class: "front", 0: [503.8, 732.7], 1: [512, 862.3] },
{ class: "front", 0: [632.3, 746.6], 1: [633.4, 882.9] },
{ class: "front", 0: [634.1, 1003.3], 1: [633.4, 882.9] },
{ class: "front", 0: [635.1, 1110.7], 1: [634.1, 1003.3] },
{ class: "front", 0: [777.5, 762.5], 1: [769, 905.6] },
{ class: "front", 0: [761.9, 1031.4], 1: [769, 905.6] },
{ class: "front", 0: [755.5, 1143], 1: [761.9, 1031.4] },
{ class: "front", 0: [388.7, 720.1], 1: [503.8, 732.7] },
{ class: "front", 0: [632.3, 746.6], 1: [503.8, 732.7] },
{ class: "front", 0: [777.5, 762.5], 1: [632.3, 746.6] },
{ class: "front", 0: [402.9, 844], 1: [512, 862.3] },
{ class: "front", 0: [633.4, 882.9], 1: [512, 862.3] },
{ class: "front", 0: [769, 905.6], 1: [633.4, 882.9] },
{ class: "front", 0: [519.5, 978], 1: [415.6, 955] },
{ class: "front", 0: [634.1, 1003.3], 1: [519.5, 978] },
{ class: "front", 0: [761.9, 1031.4], 1: [634.1, 1003.3] },
{ class: "front", 0: [427.1, 1055.1], 1: [526.1, 1081.6] },
{ class: "front", 0: [635.1, 1110.7], 1: [526.1, 1081.6] },
{ class: "front", 0: [755.5, 1143], 1: [635.1, 1110.7] },
{ class: "front", 0: [777.5, 762.5], 1: [812.7, 729.3] },
{ class: "front", 0: [839.9, 702.5], 1: [812.7, 729.3] },
{ class: "front", 0: [861.3, 681.2], 1: [839.9, 702.5] },
{ class: "front", 0: [851.8, 785.2], 1: [830.3, 816.8] },
{ class: "front", 0: [769, 905.6], 1: [803.5, 856.6] },
{ class: "front", 0: [761.9, 1031.4], 1: [795.4, 970.1] },
{ class: "front", 0: [821.8, 920.3], 1: [795.4, 970.1] },
{ class: "front", 0: [843.2, 880], 1: [821.8, 920.3] },
{ class: "front", 0: [835.1, 967], 1: [813.9, 1014.4] },
{ class: "front", 0: [788, 1072.4], 1: [813.9, 1014.4] },
{ class: "front", 0: [755.5, 1143], 1: [788, 1072.4] },
{ class: "front", 0: [861.3, 681.2], 1: [851.8, 785.2] },
{ class: "front", 0: [839.9, 702.5], 1: [830.3, 816.8] },
{ class: "front", 0: [812.7, 729.3], 1: [803.5, 856.6] },
{ class: "front", 0: [851.8, 785.2], 1: [843.2, 880] },
{ class: "front", 0: [830.3, 816.8], 1: [821.8, 920.3] },
{ class: "front", 0: [803.5, 856.6], 1: [795.4, 970.1] },
{ class: "front", 0: [843.2, 880], 1: [835.1, 967] },
{ class: "front", 0: [821.8, 920.3], 1: [813.9, 1014.4] },
{ class: "front", 0: [795.4, 970.1], 1: [788, 1072.4] },
{ class: "front", 0: [388.7, 720.1], 1: [463.4, 696.9] },
{ class: "front", 0: [522.8, 676.7], 1: [463.4, 696.9] },
{ class: "front", 0: [571.3, 660.3], 1: [522.8, 676.7] },
{ class: "front", 0: [660.2, 666.7], 1: [619.1, 684.6] },
{ class: "front", 0: [568, 706.6], 1: [619.1, 684.6] },
{ class: "front", 0: [503.8, 732.7], 1: [568, 706.6] },
{ class: "front", 0: [632.3, 746.6], 1: [684.1, 717.3] },
{ class: "front", 0: [724.5, 693.1], 1: [684.1, 717.3] },
{ class: "front", 0: [756.5, 673.6], 1: [724.5, 693.1] },
{ class: "front", 0: [571.3, 660.3], 1: [660.2, 666.7] },
{ class: "front", 0: [756.5, 673.6], 1: [660.2, 666.7] },
{ class: "front", 0: [861.3, 681.2], 1: [756.5, 673.6] },
{ class: "front", 0: [839.9, 702.5], 1: [724.5, 693.1] },
{ class: "front", 0: [619.1, 684.6], 1: [724.5, 693.1] },
{ class: "front", 0: [522.8, 676.7], 1: [619.1, 684.6] },
{ class: "front", 0: [812.7, 729.3], 1: [684.1, 717.3] },
{ class: "front", 0: [568, 706.6], 1: [684.1, 717.3] },
{ class: "front", 0: [463.4, 696.9], 1: [568, 706.6] },
{ class: "front", 0: [830.3, 816.8], 1: [803.5, 856.6] },
].map(e => {
[0, 1].map(i => {
let str = e[i] + "";
counters[str] = (counters[str] || 0) + 1;
if(mapping[str]) return e[i] = mapping[str];
mapping[str] = e[i];
return;
});
return e;
}),
};
let discrepancies = Object.assign({}, ...Object.entries(counters).filter(([_,n]) => n !== 4).map(([k,v]) => ({ [k]: v })));
const util = require("util");
if(Object.keys(discrepancies).length) throw util.inspect(discrepancies);
module.exports = data;