feat: on click display

This commit is contained in:
TrèsAbhi committed 2024-02-02 16:08:41 -06:00
1 parent b01a03c6ce
commit c2e550e33d
5 files changed
+191 -9

No files matched your search

+22
View File
@@ -1,4 +1,5 @@
import { produce } from 'immer';
import { Vector3Tuple } from 'three';
import { create } from 'zustand';
import { persist, subscribeWithSelector } from 'zustand/middleware';
import { TankType, TreeType } from '../components/Tanks';
@@ -63,6 +64,27 @@ interface TankopediaTemporary {
consumables: number[];
provisions: number[];
camouflage: boolean;
shot?: Shot;
}
type Shot = {
point: Vector3Tuple;
surfaceNormal: Vector3Tuple;
shellNormal: Vector3Tuple;
thicknesses: ArmorPiercingLayer[];
type: 'ricochet' | 'penetration' | 'block';
};
export const SHOT_NAMES: Record<Shot['type'], string> = {
ricochet: 'Ricochet',
penetration: 'Penetration',
block: 'Blocked',
};
export interface ArmorPiercingLayer {
nominal: number;
angled: number;
ricochet: boolean;
}
export const useTankopediaPersistent = create<TankopediaPersistent>()(