mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-04 23:32:54 +01:00
migrate compare and tankopedia loadout to new data-driven components, splitting the old monolithic loadout and compare UI into smaller pieces and adding shared Table, Dialog and Scroller primitives
This commit is contained in:
111 files changed
+4009
-3917
No files matched your search
@@ -24,7 +24,7 @@ import {
|
||||
type ModelTransformEventData,
|
||||
} from "../core/blitzkit/modelTransform";
|
||||
import { discardClippingPlane } from "../core/three/discardClippingPlane";
|
||||
import { DuelModule, useDuel } from "../hooks/useDuel";
|
||||
import { useDuelModules } from "../hooks/useDuelModules";
|
||||
import { useEquipment } from "../hooks/useEquipment";
|
||||
import { Tankopedia } from "../stores/tankopedia";
|
||||
import { transitionEvent } from "./Lighting";
|
||||
@@ -75,9 +75,10 @@ export function StaticArmorSceneComponent({
|
||||
}: StaticArmorSceneComponentProps) {
|
||||
const camera = useThree((state) => state.camera);
|
||||
const hasEnhancedArmor = useEquipment("protagonist", 110);
|
||||
const tank = useDuel("protagonist", DuelModule.Tank);
|
||||
const equalize = Tankopedia.use((state) => state.equalize);
|
||||
const equalizer = (equalize ? tank.equalizer : undefined) ?? defaultEqualizer;
|
||||
const protagonist = useDuelModules("protagonist");
|
||||
const equalize = Tankopedia.use((state) => state.environment.equalize);
|
||||
const equalizer =
|
||||
(equalize ? protagonist.tank.equalizer : undefined) ?? defaultEqualizer;
|
||||
const thicknessCoefficient = (hasEnhancedArmor ? 1.04 : 1) * equalizer.armor;
|
||||
const thickness = thicknessRaw * thicknessCoefficient;
|
||||
const x = thickness / thicknessRange.value;
|
||||
|
||||
Reference in new issue
Block a user