Compare commits

..
1 Commits
Author SHA1 Message Date
TrèsAbhi 74b9e19187 New translations en.json (Ukrainian) 2025-08-05 10:23:17 -05:00
8 changed files with 18 additions and 82 deletions

No files matched your search

+2 -28
View File
@@ -1,12 +1,12 @@
# BlitzKit License
Version 1.1, August 5th, 2025. Copyright (c) TrèsAbhi.
Version 1.0, August 5th, 2025. Copyright (c) TrèsAbhi.
Permission is hereby granted to anyone to:
- Fork, clone, and download the contents of this repository.
- Modify the code locally in private.
- Use and run the code **only for personal, non-public testing, or educational purposes**.
- Use and run the code **only for personal, non-public testing and educational purposes**.
The following restrictions apply:
@@ -16,35 +16,9 @@ The following restrictions apply:
- You may **not** redistribute modified or unmodified versions of this project.
Contributions:
- You are encouraged to propose changes or improvements via pull requests to the original BlitzKit repository.
- Any such contributions will be considered under the same license terms unless explicitly stated otherwise.
Violations of this license may result in revocation of usage rights and takedown requests.
For questions or licensing inquiries, contact support@blitzkit.app.
## Notes on Existing Forks
All forks fall under these categories:
- If your fork was made from commit `8462901` (Apr 17, 2023) or between commits `2958124` (Jul 3, 2023) and `85e483e` (Jul 13, 2024), your fork falls under the **MIT license**.
- If your fork was made from commits between `5646093` (Jul 13, 2024) and `e3f131c` (Aug 5, 2025), your fork falls under the **AGPL-3.0 license**.
- If your fork was made between commit `f7c356d` (Apr 17, 2023) and `2958124` (Jul 3, 2023), your fork falls under **a default exclusive copyright**.
- If your fork was made from commits between `e3f131c` (Aug 5, 2025) and today, your fork falls under **this license**.
MIT and AGPL-3.0 licensed fork owners:
- You may continue to use your fork of BlitzKit under the corresponding license.
- You may upgrade your fork up to commit `5cab394` (Aug 4, 2025) and keep the AGPL-3.0 license.
- You may upgrade to commit `e3f131c` (Aug 5, 2025) or beyond but have to **switch to this license** where all rules apply.
- If you upgrade to commit `e3f131c` (Aug 5, 2025) or beyond, you must retract all public deployments of BlitzKit.
- Existing screenshots, recordings, or any form of media can remain.
Default exclusive copyright fork owners:
- You may continue to use their forks under the AGPL-3.0 license as no license was applied to BlitzKit at the time of forking.
BlitzKit licensed fork owners:
- You may continue to upgrade to the latest commits only under the conditions of this license.
-8
View File
@@ -1,8 +0,0 @@
# BlitzKit 1.27.14
This is the 14th patch for `1.12`, making it the new longest lasting version beating the previous record of `1.15.13`!
## Fixes
- Optimized the rendering of the shells in the Tankopedia search
- The Assault Shells cursor now works on iOS devices
-7
View File
@@ -1,7 +0,0 @@
# BlitzKit 1.27.15
I did not see this coming
## Fixes
- The Assault Shell graph now supports damage factors of above 100% now
+1 -2
View File
@@ -1,7 +1,7 @@
{
"name": "blitzkit",
"private": true,
"version": "1.27.15",
"version": "1.27.13",
"description": "🎉 Tools for everything World of Tanks Blitz",
"type": "module",
"types": "./types.d.ts",
@@ -21,7 +21,6 @@
"start:bot": "bun dist/bot/main.js",
"dev:docs": "vitepress dev docs",
"dev:website": "cd packages/website && bun run dev",
"dev": "bun run dev:website",
"dev:api": "bun --filter=@blitzkit/api run dev",
"setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader",
"setup:patches": "bun --filter=@blitzkit/scripts run setup:patches",
@@ -84,7 +84,6 @@ function ShellFilter({ index, premium }: { index: number; premium?: boolean }) {
return (
<IconButton
key={shellType}
value={`${shellType}`}
radius="none"
variant={selected ? 'solid' : 'soft'}
@@ -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 {
fakeLogSquishyHigh,
fakeLogSquishyHighInverse,
fakeLog,
fakeLogInverse,
} from '../../../../../../../../../core/blitzkit/fakeLog';
import { Var } from '../../../../../../../../../core/radix/var';
import { Duel } from '../../../../../../../../../stores/duel';
@@ -19,36 +19,31 @@ export function AssaultCursor({ maxDistance, maxFakeDistance }: Props) {
const assaultDistance = Duel.use(
(state) => state.protagonist.assaultDistance,
);
const [x, setX] = useState(fakeLogSquishyHigh(assaultDistance / maxDistance));
const [x, setX] = useState(fakeLog(assaultDistance / maxDistance, 2));
const cursor = useRef<HTMLDivElement>(null);
const mutateDuel = Duel.useMutation();
useEffect(() => {
let localX = x;
let lastX = 0;
function handlePointerDown(event: PointerEvent) {
event.preventDefault();
lastX = event.clientX;
window.addEventListener('pointermove', handlePointerMove);
window.addEventListener('pointerup', handlePointerUp);
}
function handlePointerMove(event: PointerEvent) {
event.preventDefault();
const parent = cursor.current?.parentElement;
if (!parent) return;
const width = parent.clientWidth;
const movementX = event.clientX - lastX;
lastX = event.clientX;
setX((state) => {
localX = clamp(state + movementX / width, 0, 1);
localX = clamp(state + event.movementX / width, 0, 1);
return localX;
});
}
@@ -56,7 +51,7 @@ export function AssaultCursor({ maxDistance, maxFakeDistance }: Props) {
function handlePointerUp() {
mutateDuel((draft) => {
draft.protagonist.assaultDistance =
fakeLogSquishyHighInverse(localX * maxFakeDistance) * maxDistance;
fakeLogInverse(localX * maxFakeDistance, 2) * maxDistance;
});
window.removeEventListener('pointermove', handlePointerMove);
@@ -67,8 +62,6 @@ export function AssaultCursor({ maxDistance, maxFakeDistance }: Props) {
return () => {
cursor.current?.removeEventListener('pointerdown', handlePointerDown);
window.removeEventListener('pointermove', handlePointerMove);
window.removeEventListener('pointerup', handlePointerUp);
};
}, []);
@@ -82,7 +75,6 @@ export function AssaultCursor({ maxDistance, maxFakeDistance }: Props) {
width="2pt"
id="assault-cursor"
style={{
touchAction: 'none',
transform: 'translateX(-50%)',
backgroundColor: Var('accent-11'),
}}
@@ -2,10 +2,7 @@ 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 {
fakeLogSquishyHigh,
fakeLogSquishyLow,
} from '../../../../../../../core/blitzkit/fakeLog';
import { fakeLog } from '../../../../../../../core/blitzkit/fakeLog';
import type { TankCharacteristics } from '../../../../../../../core/blitzkit/tankCharacteristics';
import { Var } from '../../../../../../../core/radix/var';
import { useLocale } from '../../../../../../../hooks/useLocale';
@@ -21,10 +18,9 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
const ranges = _ranges.ranges.map((range) => ({
factor: range.factor,
distance: range.distance,
fakeDistance: fakeLogSquishyHigh(range.distance / maxDistance),
fakeDistance: fakeLog(range.distance / maxDistance, 2),
}));
const maxFakeDistance = ranges.at(-1)!.fakeDistance;
const maxFactor = ranges[0].factor;
const { strings } = useLocale();
@@ -58,8 +54,8 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
style={{
position: 'absolute',
left: 0,
bottom: `${fakeLogSquishyLow(range.factor / maxFactor) * 100}%`,
transform: 'translateY(50%)',
top: `${(1 - range.factor) * 100}%`,
transform: 'translateY(-50%)',
}}
color="gray"
size="1"
@@ -74,8 +70,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
<Flex flexGrow="1" align="end" position="relative">
{ranges.map((range, index) => {
const mix =
clamp(2 * (range.factor / maxFactor - 1) + 1, 0, 1) * 100;
const mix = clamp(1.5 * (range.factor - 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];
@@ -86,7 +81,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
return (
<Box
width={`${fraction * 100}%`}
height={`${fakeLogSquishyLow(range.factor / maxFactor) * 100}%`}
height={`${range.factor * 100}%`}
style={{
background: `linear-gradient(45deg, ${color1}, ${color0})`,
}}
@@ -100,7 +95,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
key={index}
position="absolute"
left="0"
bottom={`${fakeLogSquishyLow(range.factor / maxFactor) * 100}%`}
bottom={`${range.factor * 100}%`}
width="100%"
height="1pt"
style={{
+2 -10
View File
@@ -1,17 +1,9 @@
const GAMMA = 1.2;
export function fakeLogSquishyHigh(x: number) {
export function fakeLog(x: number, a = 1) {
return Math.sin((Math.PI / 2) * x) ** (1 / GAMMA);
}
export function fakeLogSquishyHighInverse(y: number) {
export function fakeLogInverse(y: number, a = 1) {
return (2 / Math.PI) * Math.asin(y ** GAMMA);
}
export function fakeLogSquishyLow(x: number) {
return x ** 2;
}
export function fakeLogSquishyLowInverse(y: number) {
return y ** (1 / 2);
}