mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
Merge pull request #278 from Hitjack007/reload-visualiser
This commit is contained in:
2 files changed
+11
-11
No files matched your search
+4
-4
@@ -17,7 +17,7 @@ import { AssaultRangesVisualizer } from "./AssaultRangesVisualizer";
|
||||
import { GunFlexibilityVisualizer } from "./GunFlexibilityVisualizer";
|
||||
import { Info } from "./Info";
|
||||
import { InfoWithDelta } from "./InfoWithDelta";
|
||||
import { ReloadVisualizer } from "./ReloadVisualizer";
|
||||
import { RELOAD_PRECISION, ReloadVisualizer } from "./ReloadVisualizer";
|
||||
import { RicochetVisualizer } from "./RicochetVisualizer";
|
||||
import { StatsTableWrapper } from "./StatsTableWrapper";
|
||||
import type { StatsAcceptorProps } from "./TraverseVisualizer";
|
||||
@@ -163,7 +163,7 @@ export function Firepower({
|
||||
.shell_index,
|
||||
{ index: index + 1 },
|
||||
)}
|
||||
decimals={2}
|
||||
decimals={RELOAD_PRECISION}
|
||||
deltaType="lowerIsBetter"
|
||||
noRanking
|
||||
value={() => reload}
|
||||
@@ -173,7 +173,7 @@ export function Firepower({
|
||||
) : (
|
||||
<InfoWithDelta
|
||||
stats={stats}
|
||||
decimals={2}
|
||||
decimals={RELOAD_PRECISION}
|
||||
deltaType="lowerIsBetter"
|
||||
value="shellReload"
|
||||
/>
|
||||
@@ -183,7 +183,7 @@ export function Firepower({
|
||||
<InfoWithDelta
|
||||
stats={stats}
|
||||
indent
|
||||
decimals={2}
|
||||
decimals={RELOAD_PRECISION}
|
||||
deltaType="lowerIsBetter"
|
||||
value="intraClip"
|
||||
/>
|
||||
|
||||
+7
-7
@@ -11,7 +11,7 @@ import { Shell } from './components/Shell';
|
||||
import { Target } from './components/Target';
|
||||
import './index.css';
|
||||
|
||||
const PRECISION = 2;
|
||||
export const RELOAD_PRECISION = 1;
|
||||
|
||||
export interface ReloadUpdateData {
|
||||
reload: number;
|
||||
@@ -82,9 +82,9 @@ export function ReloadVisualizer({ stats }: StatsAcceptorProps) {
|
||||
);
|
||||
}
|
||||
|
||||
totalTime.current.innerHTML = shellReload.toFixed(PRECISION);
|
||||
totalTime.current.innerHTML = shellReload.toFixed(RELOAD_PRECISION);
|
||||
progressTime.current.innerHTML = ((1 - reload) * shellReload).toFixed(
|
||||
PRECISION,
|
||||
RELOAD_PRECISION,
|
||||
);
|
||||
|
||||
if (state.current >= reloadThreshold) shoot();
|
||||
@@ -117,9 +117,9 @@ export function ReloadVisualizer({ stats }: StatsAcceptorProps) {
|
||||
shells = times(stats.shells, (index) => index > state.current - 1);
|
||||
}
|
||||
|
||||
totalTime.current.innerHTML = interval.toFixed(PRECISION);
|
||||
totalTime.current.innerHTML = interval.toFixed(RELOAD_PRECISION);
|
||||
progressTime.current.innerHTML = ((1 - reload) * interval).toFixed(
|
||||
PRECISION,
|
||||
RELOAD_PRECISION,
|
||||
);
|
||||
|
||||
if (lastState % 1 > state.current % 1) shoot();
|
||||
@@ -262,7 +262,7 @@ export function ReloadVisualizer({ stats }: StatsAcceptorProps) {
|
||||
transform: 'translate(50%, -50%)',
|
||||
}}
|
||||
>
|
||||
0.00
|
||||
{(0).toFixed(RELOAD_PRECISION)}
|
||||
</Code>
|
||||
<Code
|
||||
ref={totalTime}
|
||||
@@ -277,7 +277,7 @@ export function ReloadVisualizer({ stats }: StatsAcceptorProps) {
|
||||
transform: 'translate(-50%, -50%)',
|
||||
}}
|
||||
>
|
||||
0.00
|
||||
{(0).toFixed(RELOAD_PRECISION)}
|
||||
</Code>
|
||||
|
||||
{stats.shells > 1 &&
|
||||
|
||||
Reference in new issue
Block a user