feat: optimized state handling x2

This commit is contained in:
TrèsAbhi committed 2024-01-13 16:48:20 -06:00
1 parent 230b2df5fd
commit 586cd84349
13 files changed
+138 -149

No files matched your search

+20 -12
View File
@@ -28,12 +28,16 @@ type Tankopedia = {
test: TankopediaTestTankDisplay;
};
model: {
hullYaw: number;
turretYaw: number;
gunPitch: number;
controlsEnabled: boolean;
showGrid: boolean;
showSpacedArmor: boolean;
physical: {
hullYaw: number;
turretYaw: number;
gunPitch: number;
};
visual: {
controlsEnabled: boolean;
showGrid: boolean;
showSpacedArmor: boolean;
};
};
mode: TankopediaMode;
} & (
@@ -69,12 +73,16 @@ export const useTankopedia = create<Tankopedia>()(
test: 'include',
},
model: {
gunPitch: 0,
hullYaw: 0,
turretYaw: 0,
controlsEnabled: true,
showGrid: true,
showSpacedArmor: true,
physical: {
gunPitch: 0,
hullYaw: 0,
turretYaw: 0,
},
visual: {
controlsEnabled: true,
showGrid: true,
showSpacedArmor: true,
},
},
areTanksAssigned: false,
mode: 'model',