mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: on click display
This commit is contained in:
1 parent
b01a03c6ce
commit
c2e550e33d
5 files changed
+191
-9
No files matched your search
@@ -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>()(
|
||||
|
||||
Reference in new issue
Block a user