zenno/mspeed: show spot struggle and lane combo on each others' charts

This commit is contained in:
2026-05-23 00:13:21 -04:00
parent 09f099171b
commit 4bd7962182

View File

@@ -70,9 +70,15 @@
const lcY: Array<ComputedSeries | null> = $derived([ const lcY: Array<ComputedSeries | null> = $derived([
{ label: 'Ideal Lane Combo', y: (x) => speedGain(moveLaneModifier(x), lcDur, accel[0], decel[0]) / HORSE_LENGTH }, { label: 'Ideal Lane Combo', y: (x) => speedGain(moveLaneModifier(x), lcDur, accel[0], decel[0]) / HORSE_LENGTH },
]); ]);
const yRule: HorizontalRule[] = $derived([ const pcRuler = $derived({ y: speedGain(0.35, skillDuration(2.4, raceLen), accel[1], decel[1]) / HORSE_LENGTH, label: 'Professor of Curvature' });
{ y: speedGain(0.35, skillDuration(2.4, raceLen), accel[1], decel[1]) / HORSE_LENGTH, label: 'Professor of Curvature' }, const ssYRule = $derived([
]); pcRuler,
{ y: speedGain(lcBoost, lcDur, accel[0], decel[0]) / HORSE_LENGTH, label: 'Lane Combo' },
]);
const lcYRule = $derived([
pcRuler,
{ y: speedGain(ssBoost, ssDur, accel[0], decel[1]) / HORSE_LENGTH, label: 'Spot Struggle' },
]);
</script> </script>
<h1 class="text-4xl">Front Runner Mechanical Speed Comparator</h1> <h1 class="text-4xl">Front Runner Mechanical Speed Comparator</h1>
@@ -132,10 +138,10 @@
{/each} {/each}
</div> </div>
<div class="mx-auto h-60 py-4 md:h-96 md:w-3xl"> <div class="mx-auto h-60 py-4 md:h-96 md:w-3xl">
<StatChart class="flex-1" stat={Stat.Guts} y={ssY} yLabel="Lengths Gained" range={[0, 1.5, 2.5]} xRule={gutsStat} {yRule} /> <StatChart class="flex-1" stat={Stat.Guts} y={ssY} yLabel="Lengths Gained" range={[0, 1.5, 2.5]} xRule={gutsStat} yRule={ssYRule} />
</div> </div>
<div class="mx-auto mt-4 h-60 py-4 md:mt-0 md:h-96 md:w-3xl"> <div class="mx-auto mt-4 h-60 py-4 md:mt-0 md:h-96 md:w-3xl">
<StatChart class="flex-1" stat={Stat.Power} y={lcY} yLabel="Lengths Gained" range={[0, 1.5, 2.5]} xRule={powerStat} {yRule} /> <StatChart class="flex-1" stat={Stat.Power} y={lcY} yLabel="Lengths Gained" range={[0, 1.5, 2.5]} xRule={powerStat} yRule={lcYRule} />
</div> </div>
<div class="mx-auto mt-12 w-full max-w-4xl border-t md:mt-8"> <div class="mx-auto mt-12 w-full max-w-4xl border-t md:mt-8">
<ul class="ml-4 list-disc"> <ul class="ml-4 list-disc">