diff --git a/docs/changelogs/1.27.14.md b/docs/changelogs/1.27.14.md index cff532b8e..4e2d3782d 100644 --- a/docs/changelogs/1.27.14.md +++ b/docs/changelogs/1.27.14.md @@ -1,6 +1,6 @@ # BlitzKit 1.27.14 -This is the 14th path for `1.12`, making it the new longest lasting version beating the previous record of `1.15.13`! +This is the 14th patch for `1.12`, making it the new longest lasting version beating the previous record of `1.15.13`! ## Fixes diff --git a/docs/changelogs/1.27.15.md b/docs/changelogs/1.27.15.md new file mode 100644 index 000000000..65a42d1f5 --- /dev/null +++ b/docs/changelogs/1.27.15.md @@ -0,0 +1,7 @@ +# BlitzKit 1.27.15 + +I did not see this coming + +## Fixes + +- The Assault Shell graph now supports damage factors of above 100% now diff --git a/package.json b/package.json index 9a2e054de..ea5120699 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "blitzkit", "private": true, - "version": "1.27.14", + "version": "1.27.15", "description": "🎉 Tools for everything World of Tanks Blitz", "type": "module", "types": "./types.d.ts", diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/components/Cursor/index.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/components/Cursor/index.tsx index 7c67c5017..2e6f62f82 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/components/Cursor/index.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/components/Cursor/index.tsx @@ -3,8 +3,8 @@ import { Box, Flex, Text } from '@radix-ui/themes'; import { useEffect, useRef, useState } from 'react'; import { clamp } from 'three/src/math/MathUtils.js'; import { - fakeLog, - fakeLogInverse, + fakeLogSquishyHigh, + fakeLogSquishyHighInverse, } from '../../../../../../../../../core/blitzkit/fakeLog'; import { Var } from '../../../../../../../../../core/radix/var'; import { Duel } from '../../../../../../../../../stores/duel'; @@ -19,7 +19,7 @@ export function AssaultCursor({ maxDistance, maxFakeDistance }: Props) { const assaultDistance = Duel.use( (state) => state.protagonist.assaultDistance, ); - const [x, setX] = useState(fakeLog(assaultDistance / maxDistance, 2)); + const [x, setX] = useState(fakeLogSquishyHigh(assaultDistance / maxDistance)); const cursor = useRef(null); const mutateDuel = Duel.useMutation(); @@ -56,7 +56,7 @@ export function AssaultCursor({ maxDistance, maxFakeDistance }: Props) { function handlePointerUp() { mutateDuel((draft) => { draft.protagonist.assaultDistance = - fakeLogInverse(localX * maxFakeDistance, 2) * maxDistance; + fakeLogSquishyHighInverse(localX * maxFakeDistance) * maxDistance; }); window.removeEventListener('pointermove', handlePointerMove); diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/index.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/index.tsx index 0b2d8ca13..cdd089725 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/index.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/AssaultRangesVisualizer/index.tsx @@ -2,7 +2,10 @@ import type { AssaultRanges } from '@blitzkit/core'; import { literals } from '@blitzkit/i18n'; import { Box, Card, Flex, Text } from '@radix-ui/themes'; import { clamp } from 'three/src/math/MathUtils.js'; -import { fakeLog } from '../../../../../../../core/blitzkit/fakeLog'; +import { + fakeLogSquishyHigh, + fakeLogSquishyLow, +} from '../../../../../../../core/blitzkit/fakeLog'; import type { TankCharacteristics } from '../../../../../../../core/blitzkit/tankCharacteristics'; import { Var } from '../../../../../../../core/radix/var'; import { useLocale } from '../../../../../../../hooks/useLocale'; @@ -18,9 +21,10 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) { const ranges = _ranges.ranges.map((range) => ({ factor: range.factor, distance: range.distance, - fakeDistance: fakeLog(range.distance / maxDistance, 2), + fakeDistance: fakeLogSquishyHigh(range.distance / maxDistance), })); const maxFakeDistance = ranges.at(-1)!.fakeDistance; + const maxFactor = ranges[0].factor; const { strings } = useLocale(); @@ -54,8 +58,8 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) { style={{ position: 'absolute', left: 0, - top: `${(1 - range.factor) * 100}%`, - transform: 'translateY(-50%)', + bottom: `${fakeLogSquishyLow(range.factor / maxFactor) * 100}%`, + transform: 'translateY(50%)', }} color="gray" size="1" @@ -70,7 +74,8 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) { {ranges.map((range, index) => { - const mix = clamp(1.5 * (range.factor - 1) + 1, 0, 1) * 100; + const mix = + clamp(2 * (range.factor / maxFactor - 1) + 1, 0, 1) * 100; const color0 = `color-mix(in hsl, ${Var('tomato-9')}, ${Var('jade-9')} ${mix}%)`; const color1 = `color-mix(in hsl, ${Var('tomato-7')}, ${Var('jade-7')} ${mix}%)`; const last = ranges[index - 1]; @@ -81,7 +86,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) { return (