This commit is contained in:
tresabhi committed 2026-10-29 14:58:40 -05:00
1 parent 93c1e6e761
commit 14126d05a1
7 files changed
+14 -30

No files matched your search

@@ -33,7 +33,7 @@ import type {
ArmorUserData, ArmorUserData,
ExternalModuleVariant, ExternalModuleVariant,
} from "./SpacedArmorSceneComponent"; } from "./SpacedArmorSceneComponent";
import type { ThicknessRange } from "./StaticArmor"; import type { ThicknessRange } from "./TankStaticArmor";
type StaticArmorSceneComponentProps = { type StaticArmorSceneComponentProps = {
name: string; name: string;
@@ -33,18 +33,6 @@ export function TankModel() {
return ( return (
<> <>
{/* <mesh
scale={0.1}
position={[
trackModelDefinition.origin!.x + tankModelDefinition.turret_origin!.x,
trackModelDefinition.origin!.y + tankModelDefinition.turret_origin!.y,
trackModelDefinition.origin!.z + tankModelDefinition.turret_origin!.z,
]}
>
<sphereGeometry />
<meshBasicMaterial color="red" depthTest={false} />
</mesh> */}
{nodes.map((node) => { {nodes.map((node) => {
const isHull = node.name === "hull"; const isHull = node.name === "hull";
const isWheel = node.name.startsWith("chassis_wheel_"); const isWheel = node.name.startsWith("chassis_wheel_");
@@ -27,7 +27,7 @@ export interface ThicknessRange {
value: number; value: number;
} }
export const StaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => { export const TankStaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => {
const turretContainer = useRef<Group>(null!); const turretContainer = useRef<Group>(null!);
const gunContainer = useRef<Group>(null!); const gunContainer = useRef<Group>(null!);
@@ -7,7 +7,7 @@ import { useFullScreen } from "../../../hooks/useFullScreen";
import { Duel } from "../../../stores/duel"; import { Duel } from "../../../stores/duel";
import { Tankopedia } from "../../../stores/tankopedia"; import { Tankopedia } from "../../../stores/tankopedia";
import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps"; import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps";
import type { ThicknessRange } from "../../StaticArmor"; import type { ThicknessRange } from "../../TankStaticArmor";
import { TankopediaOptions } from "../../TankopediaOptions"; import { TankopediaOptions } from "../../TankopediaOptions";
import { TankSandbox } from "./components/TankSandbox"; import { TankSandbox } from "./components/TankSandbox";
import { Title } from "./components/TankSandbox/Title"; import { Title } from "./components/TankSandbox/Title";
@@ -7,7 +7,7 @@ import { Tankopedia } from "../../../stores/tankopedia";
import { TankopediaPersistent } from "../../../stores/tankopediaPersistent"; import { TankopediaPersistent } from "../../../stores/tankopediaPersistent";
import { TankopediaDisplay } from "../../../stores/tankopediaPersistent/constants"; import { TankopediaDisplay } from "../../../stores/tankopediaPersistent/constants";
import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps"; import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps";
import type { ThicknessRange } from "../../StaticArmor"; import type { ThicknessRange } from "../../TankStaticArmor";
import { DynamicArmorSwitcher } from "./DynamicArmorSwitcher"; import { DynamicArmorSwitcher } from "./DynamicArmorSwitcher";
type ThicknessesProps = MaybeSkeletonComponentProps & { type ThicknessesProps = MaybeSkeletonComponentProps & {
@@ -1,6 +1,5 @@
import type { QuicklimeEvent } from "quicklime"; import type { QuicklimeEvent } from "quicklime";
import { Suspense, useEffect, useRef } from "react"; import { Suspense, useEffect, useRef } from "react";
import { Scene } from "three";
import { applyPitchYawLimits } from "../../core/blitz/applyPitchYawLimits"; import { applyPitchYawLimits } from "../../core/blitz/applyPitchYawLimits";
import { modelTransformEvent } from "../../core/blitzkit/modelTransform"; import { modelTransformEvent } from "../../core/blitzkit/modelTransform";
import { Pose, poseEvent } from "../../core/blitzkit/pose"; import { Pose, poseEvent } from "../../core/blitzkit/pose";
@@ -20,12 +19,13 @@ import { Lighting, transitionEvent } from "../Lighting";
import { SceneProps } from "../SceneProps"; import { SceneProps } from "../SceneProps";
import { ShotDisplay } from "../ShotDisplay"; import { ShotDisplay } from "../ShotDisplay";
import { SmartCanvas } from "../SmartCanvas"; import { SmartCanvas } from "../SmartCanvas";
import { SpacedArmorScene } from "../SpacedArmorScene"; import { TankDynamicArmor } from "../TankDynamicArmor";
import { StaticArmor, type ThicknessRange } from "../StaticArmor"; import { TankModel } from "../TankModel";
import { TankopediaAntagonistControl } from "../TankopediaAntagonistControl"; import { TankopediaAntagonistControl } from "../TankopediaAntagonistControl";
import { TankopediaOptions } from "../TankopediaOptions"; import { TankopediaOptions } from "../TankopediaOptions";
import { TankopediaSkinSwitcher } from "../TankopediaSkinSwitcher"; import { TankopediaSkinSwitcher } from "../TankopediaSkinSwitcher";
import { TankSandboxLoader } from "../TankSandboxLoader"; import { TankSandboxLoader } from "../TankSandboxLoader";
import { TankStaticArmor, type ThicknessRange } from "../TankStaticArmor";
import styles from "./index.module.css"; import styles from "./index.module.css";
type TankSandboxProps = MaybeSkeletonComponentProps & { type TankSandboxProps = MaybeSkeletonComponentProps & {
@@ -200,13 +200,13 @@ function Content({ thicknessRange }: { thicknessRange: ThicknessRange }) {
<SceneProps /> <SceneProps />
{/* {(display === TankopediaDisplay.Model || {(display === TankopediaDisplay.Model ||
(display === TankopediaDisplay.DynamicArmor && (display === TankopediaDisplay.DynamicArmor &&
!hideTankModelUnderArmor)) && <TankModel />} */} !hideTankModelUnderArmor)) && <TankModel />}
{display === TankopediaDisplay.DynamicArmor && <TankDynamicArmor />}
{/* {display === TankopediaDisplay.DynamicArmor && <TankDynamicArmor />} */} {display === TankopediaDisplay.StaticArmor && (
<TankStaticArmor thicknessRange={thicknessRange} />
<SpacedArmorScene scene={new Scene()} /> )}
<ShotDisplay /> <ShotDisplay />
<ArmorPlateDisplay /> <ArmorPlateDisplay />
@@ -215,10 +215,6 @@ function Content({ thicknessRange }: { thicknessRange: ThicknessRange }) {
<Suspense> <Suspense>
{/* Controls within Suspense to allow for frame-perfect start of camera auto-rotate */} {/* Controls within Suspense to allow for frame-perfect start of camera auto-rotate */}
<CanvasControl /> <CanvasControl />
{display === TankopediaDisplay.StaticArmor && (
<StaticArmor thicknessRange={thicknessRange} />
)}
</Suspense> </Suspense>
<InitialCameraAligner /> <InitialCameraAligner />
@@ -1,7 +1,7 @@
import { useMemo } from "react"; import { useMemo } from "react";
import { api } from "../../../../../api/dynamic"; import { api } from "../../../../../api/dynamic";
import { Scroller } from "../../../../../components/Scroller"; import { Scroller } from "../../../../../components/Scroller";
import type { ThicknessRange } from "../../../../../components/StaticArmor"; import type { ThicknessRange } from "../../../../../components/TankStaticArmor";
import { TankopediaCharacteristics } from "../../../../../components/TankopediaCharacteristics"; import { TankopediaCharacteristics } from "../../../../../components/TankopediaCharacteristics";
import { TankopediaGameModeAbilities } from "../../../../../components/TankopediaGameModeAbilities"; import { TankopediaGameModeAbilities } from "../../../../../components/TankopediaGameModeAbilities";
import { TankopediaLoadout } from "../../../../../components/TankopediaLoadout"; import { TankopediaLoadout } from "../../../../../components/TankopediaLoadout";