|
@@ -1,6 +1,6 @@
|
|
const currentScores = {};
|
|
const currentScores = {};
|
|
|
|
|
|
-const rescore = (target, { name, jab, rgb }) => {
|
|
|
|
|
|
+const rescoreAll = target => pokemonData.forEach(({ name, jab, rgb }) => {
|
|
currentScores[name] = {
|
|
currentScores[name] = {
|
|
jab: {
|
|
jab: {
|
|
total: applyMetrics(jab.total, target.jab),
|
|
total: applyMetrics(jab.total, target.jab),
|
|
@@ -11,9 +11,7 @@ const rescore = (target, { name, jab, rgb }) => {
|
|
clusters: rgb.clusters.map(c => applyMetrics(c, target.rgb)),
|
|
clusters: rgb.clusters.map(c => applyMetrics(c, target.rgb)),
|
|
},
|
|
},
|
|
};
|
|
};
|
|
-};
|
|
|
|
-
|
|
|
|
-const rescoreAll = target => pokemonData.forEach(pkmn => rescore(target, pkmn));
|
|
|
|
|
|
+});
|
|
|
|
|
|
const getBestClusterIndex = (pkmn, space, { sortMetric, scaleOption, sortOrder }) => {
|
|
const getBestClusterIndex = (pkmn, space, { sortMetric, scaleOption, sortOrder }) => {
|
|
// get the scales
|
|
// get the scales
|