mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
feat: rename core armor to primary armor
This commit is contained in:
1 parent
b1685bcc12
commit
3889c0f75d
13 files changed
+57
-50
No files matched your search
@@ -15,8 +15,8 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) {
|
|||||||
const showSpacedArmor = TankopediaPersistent.use(
|
const showSpacedArmor = TankopediaPersistent.use(
|
||||||
(state) => state.model.visual.showSpacedArmor,
|
(state) => state.model.visual.showSpacedArmor,
|
||||||
);
|
);
|
||||||
const showCoreArmor = TankopediaPersistent.use(
|
const showPrimaryArmor = TankopediaPersistent.use(
|
||||||
(state) => state.model.visual.showCoreArmor,
|
(state) => state.model.visual.showPrimaryArmor,
|
||||||
);
|
);
|
||||||
const mutateTankopediaPersistent = TankopediaPersistent.useMutation();
|
const mutateTankopediaPersistent = TankopediaPersistent.useMutation();
|
||||||
const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation();
|
const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation();
|
||||||
@@ -35,11 +35,11 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) {
|
|||||||
<Flex
|
<Flex
|
||||||
height="64px"
|
height="64px"
|
||||||
gap="2"
|
gap="2"
|
||||||
style={{ opacity: showCoreArmor ? 1 : 0.5, cursor: 'pointer' }}
|
style={{ opacity: showPrimaryArmor ? 1 : 0.5, cursor: 'pointer' }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
mutateTankopediaPersistent((draft) => {
|
mutateTankopediaPersistent((draft) => {
|
||||||
draft.model.visual.showCoreArmor =
|
draft.model.visual.showPrimaryArmor =
|
||||||
!draft.model.visual.showCoreArmor;
|
!draft.model.visual.showPrimaryArmor;
|
||||||
});
|
});
|
||||||
mutateTankopediaEphemeral((draft) => {
|
mutateTankopediaEphemeral((draft) => {
|
||||||
draft.highlightArmor = undefined;
|
draft.highlightArmor = undefined;
|
||||||
@@ -51,8 +51,8 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) {
|
|||||||
{thicknessRange.quartile.toFixed(0)}
|
{thicknessRange.quartile.toFixed(0)}
|
||||||
</Text>
|
</Text>
|
||||||
<Flex gap="1">
|
<Flex gap="1">
|
||||||
{showCoreArmor ? <EyeOpenIcon /> : <EyeClosedIcon />}
|
{showPrimaryArmor ? <EyeOpenIcon /> : <EyeClosedIcon />}
|
||||||
<Text size="1">Core</Text>
|
<Text size="1">Primary</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Text color="gray" size="1">
|
<Text color="gray" size="1">
|
||||||
0
|
0
|
||||||
|
|||||||
+8
-5
@@ -8,10 +8,10 @@ import { useModelDefinitions } from '../../../hooks/useModelDefinitions';
|
|||||||
import { useTankTransform } from '../../../hooks/useTankTransform';
|
import { useTankTransform } from '../../../hooks/useTankTransform';
|
||||||
import * as Duel from '../../../stores/duel';
|
import * as Duel from '../../../stores/duel';
|
||||||
import * as TankopediaPersistent from '../../../stores/tankopediaPersistent';
|
import * as TankopediaPersistent from '../../../stores/tankopediaPersistent';
|
||||||
import { CoreArmorSceneComponent } from './CoreArmorSceneComponent';
|
|
||||||
import { ModelTankWrapper } from './ModelTankWrapper';
|
import { ModelTankWrapper } from './ModelTankWrapper';
|
||||||
|
import { PrimaryArmorSceneComponent } from './PrimaryArmorSceneComponent';
|
||||||
|
|
||||||
export const CoreArmorScene = memo(() => {
|
export const PrimaryArmorScene = memo(() => {
|
||||||
const wrapper = useRef<Group>(null);
|
const wrapper = useRef<Group>(null);
|
||||||
const modelDefinitions = useModelDefinitions();
|
const modelDefinitions = useModelDefinitions();
|
||||||
const turretContainer = useRef<Group>(null);
|
const turretContainer = useRef<Group>(null);
|
||||||
@@ -49,7 +49,7 @@ export const CoreArmorScene = memo(() => {
|
|||||||
if (!isVisible || spaced || thickness === undefined) return null;
|
if (!isVisible || spaced || thickness === undefined) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CoreArmorSceneComponent
|
<PrimaryArmorSceneComponent
|
||||||
key={node.uuid}
|
key={node.uuid}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
@@ -75,7 +75,7 @@ export const CoreArmorScene = memo(() => {
|
|||||||
return (
|
return (
|
||||||
<group position={hullOrigin}>
|
<group position={hullOrigin}>
|
||||||
<group key={node.uuid} position={turretOrigin}>
|
<group key={node.uuid} position={turretOrigin}>
|
||||||
<CoreArmorSceneComponent
|
<PrimaryArmorSceneComponent
|
||||||
key={node.uuid}
|
key={node.uuid}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
@@ -105,7 +105,10 @@ export const CoreArmorScene = memo(() => {
|
|||||||
key={node.uuid}
|
key={node.uuid}
|
||||||
position={turretOrigin.clone().add(gunOrigin)}
|
position={turretOrigin.clone().add(gunOrigin)}
|
||||||
>
|
>
|
||||||
<CoreArmorSceneComponent thickness={thickness} node={node} />
|
<PrimaryArmorSceneComponent
|
||||||
|
thickness={thickness}
|
||||||
|
node={node}
|
||||||
|
/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
);
|
);
|
||||||
+3
-3
@@ -15,7 +15,7 @@ import fragmentShader from './shaders/fragment.glsl';
|
|||||||
import vertexShader from './shaders/vertex.glsl';
|
import vertexShader from './shaders/vertex.glsl';
|
||||||
import { spacedArmorRenderTarget } from './target';
|
import { spacedArmorRenderTarget } from './target';
|
||||||
|
|
||||||
interface CoreArmorSceneComponentProps {
|
interface PrimaryArmorSceneComponentProps {
|
||||||
thickness: number;
|
thickness: number;
|
||||||
node: Object3D;
|
node: Object3D;
|
||||||
}
|
}
|
||||||
@@ -24,10 +24,10 @@ const excludeMaterial = new MeshBasicMaterial({
|
|||||||
colorWrite: false,
|
colorWrite: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function CoreArmorSceneComponent({
|
export function PrimaryArmorSceneComponent({
|
||||||
node,
|
node,
|
||||||
thickness,
|
thickness,
|
||||||
}: CoreArmorSceneComponentProps) {
|
}: PrimaryArmorSceneComponentProps) {
|
||||||
const tankopediaPersistentStore = TankopediaPersistent.useStore();
|
const tankopediaPersistentStore = TankopediaPersistent.useStore();
|
||||||
const duelStore = Duel.useStore();
|
const duelStore = Duel.useStore();
|
||||||
const material = new ShaderMaterial({
|
const material = new ShaderMaterial({
|
||||||
+2
-2
@@ -45,8 +45,8 @@ void main() {
|
|||||||
// world space in meters
|
// world space in meters
|
||||||
vec4 spacedArmorDepthFragment = texture2D(spacedArmorDepth, screenCoordinates);
|
vec4 spacedArmorDepthFragment = texture2D(spacedArmorDepth, screenCoordinates);
|
||||||
float spacedArmorDistance = depthToDistance(spacedArmorDepthFragment.r);
|
float spacedArmorDistance = depthToDistance(spacedArmorDepthFragment.r);
|
||||||
float coreArmorDistance = depthToDistance(gl_FragCoord.z);
|
float primaryArmorDistance = depthToDistance(gl_FragCoord.z);
|
||||||
float distanceFromSpacedArmor = coreArmorDistance - spacedArmorDistance;
|
float distanceFromSpacedArmor = primaryArmorDistance - spacedArmorDistance;
|
||||||
|
|
||||||
if (canSplash && isUnderSpacedArmor) {
|
if (canSplash && isUnderSpacedArmor) {
|
||||||
float spacedArmorThickness = spacedArmorBufferFragment.r * penetration;
|
float spacedArmorThickness = spacedArmorBufferFragment.r * penetration;
|
||||||
File renamed without changes.
File renamed without changes.
@@ -14,7 +14,7 @@ import { ArmorType } from './SpacedArmorScene';
|
|||||||
import { ExternalModuleVariant } from './SpacedArmorSceneComponent';
|
import { ExternalModuleVariant } from './SpacedArmorSceneComponent';
|
||||||
|
|
||||||
export const layerTypeNames: Record<ArmorType | 'null', string> = {
|
export const layerTypeNames: Record<ArmorType | 'null', string> = {
|
||||||
[ArmorType.Core]: 'Core',
|
[ArmorType.Primary]: 'Primary',
|
||||||
[ArmorType.Spaced]: 'Spaced',
|
[ArmorType.Spaced]: 'Spaced',
|
||||||
[ArmorType.External]: 'External',
|
[ArmorType.External]: 'External',
|
||||||
null: 'Gap',
|
null: 'Gap',
|
||||||
@@ -50,7 +50,7 @@ function LayerEntry({
|
|||||||
<Text size="1" color="gray" style={{ width: 12 }}>
|
<Text size="1" color="gray" style={{ width: 12 }}>
|
||||||
{layerIndex}
|
{layerIndex}
|
||||||
</Text>
|
</Text>
|
||||||
<Text size="2" color={shotStatusColor} style={{ width: 47 }}>
|
<Text size="2" color={shotStatusColor} style={{ width: 48 }}>
|
||||||
{layerName}
|
{layerName}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
@@ -74,7 +74,8 @@ function LayerEntry({
|
|||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(layer.type === ArmorType.Core || layer.type === ArmorType.Spaced) && (
|
{(layer.type === ArmorType.Primary ||
|
||||||
|
layer.type === ArmorType.Spaced) && (
|
||||||
<>
|
<>
|
||||||
<Text size="2" color={shotStatusColor} style={{ width: 80 }}>
|
<Text size="2" color={shotStatusColor} style={{ width: 80 }}>
|
||||||
{Math.round(layer.thicknessAngled).toLocaleString()}
|
{Math.round(layer.thicknessAngled).toLocaleString()}
|
||||||
@@ -140,7 +141,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) {
|
|||||||
layerName={layerName}
|
layerName={layerName}
|
||||||
shotStatusColor={shotStatusColor}
|
shotStatusColor={shotStatusColor}
|
||||||
angle={
|
angle={
|
||||||
layer.type === ArmorType.Core ||
|
layer.type === ArmorType.Primary ||
|
||||||
layer.type === ArmorType.Spaced
|
layer.type === ArmorType.Spaced
|
||||||
? layer.angle
|
? layer.angle
|
||||||
: undefined
|
: undefined
|
||||||
@@ -206,7 +207,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) {
|
|||||||
layerName={layerName}
|
layerName={layerName}
|
||||||
shotStatusColor={shotStatusColor}
|
shotStatusColor={shotStatusColor}
|
||||||
angle={
|
angle={
|
||||||
layer.type === ArmorType.Core ||
|
layer.type === ArmorType.Primary ||
|
||||||
layer.type === ArmorType.Spaced
|
layer.type === ArmorType.Spaced
|
||||||
? layer.angle
|
? layer.angle
|
||||||
: undefined
|
: undefined
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { ModelTankWrapper } from './ModelTankWrapper';
|
|||||||
import { SpacedArmorSceneComponent } from './SpacedArmorSceneComponent';
|
import { SpacedArmorSceneComponent } from './SpacedArmorSceneComponent';
|
||||||
|
|
||||||
export enum ArmorType {
|
export enum ArmorType {
|
||||||
Core,
|
Primary,
|
||||||
Spaced,
|
Spaced,
|
||||||
External,
|
External,
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ export const SpacedArmorScene = memo<SpacedArmorSceneProps>(({ scene }) => {
|
|||||||
<SpacedArmorSceneComponent
|
<SpacedArmorSceneComponent
|
||||||
scene={scene}
|
scene={scene}
|
||||||
key={node.uuid}
|
key={node.uuid}
|
||||||
type={spaced ? ArmorType.Spaced : ArmorType.Core}
|
type={spaced ? ArmorType.Spaced : ArmorType.Primary}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
/>
|
/>
|
||||||
@@ -114,7 +114,7 @@ export const SpacedArmorScene = memo<SpacedArmorSceneProps>(({ scene }) => {
|
|||||||
<SpacedArmorSceneComponent
|
<SpacedArmorSceneComponent
|
||||||
scene={scene}
|
scene={scene}
|
||||||
key={node.uuid}
|
key={node.uuid}
|
||||||
type={spaced ? ArmorType.Spaced : ArmorType.Core}
|
type={spaced ? ArmorType.Spaced : ArmorType.Primary}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
/>
|
/>
|
||||||
@@ -145,7 +145,7 @@ export const SpacedArmorScene = memo<SpacedArmorSceneProps>(({ scene }) => {
|
|||||||
>
|
>
|
||||||
<SpacedArmorSceneComponent
|
<SpacedArmorSceneComponent
|
||||||
scene={scene}
|
scene={scene}
|
||||||
type={spaced ? ArmorType.Spaced : ArmorType.Core}
|
type={spaced ? ArmorType.Spaced : ArmorType.Primary}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export function SpacedArmorSceneComponent({
|
|||||||
let depthWrite = true;
|
let depthWrite = true;
|
||||||
|
|
||||||
switch (props.type) {
|
switch (props.type) {
|
||||||
case ArmorType.Core:
|
case ArmorType.Primary:
|
||||||
color = new Color(-((1 - x) ** 2) + 1, -(x ** 2) + 1, 0);
|
color = new Color(-((1 - x) ** 2) + 1, -(x ** 2) + 1, 0);
|
||||||
opacity = 1;
|
opacity = 1;
|
||||||
break;
|
break;
|
||||||
@@ -280,7 +280,7 @@ export function SpacedArmorSceneComponent({
|
|||||||
} else {
|
} else {
|
||||||
noDuplicateIntersections.push(intersection);
|
noDuplicateIntersections.push(intersection);
|
||||||
|
|
||||||
if (intersection.object.userData.type === ArmorType.Core) {
|
if (intersection.object.userData.type === ArmorType.Primary) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ export function SpacedArmorSceneComponent({
|
|||||||
if (
|
if (
|
||||||
!allowRicochet &&
|
!allowRicochet &&
|
||||||
!noDuplicateIntersections.some((intersection) => {
|
!noDuplicateIntersections.some((intersection) => {
|
||||||
intersection.object.userData.type === ArmorType.Core;
|
intersection.object.userData.type === ArmorType.Primary;
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
@@ -386,7 +386,7 @@ export function SpacedArmorSceneComponent({
|
|||||||
point: intersection.point,
|
point: intersection.point,
|
||||||
surfaceNormal: intersection.face!.normal,
|
surfaceNormal: intersection.face!.normal,
|
||||||
status:
|
status:
|
||||||
shell.type === ShellType.HE && layer.type !== ArmorType.Core
|
shell.type === ShellType.HE && layer.type !== ArmorType.Primary
|
||||||
? 'blocked'
|
? 'blocked'
|
||||||
: blocked
|
: blocked
|
||||||
? 'blocked'
|
? 'blocked'
|
||||||
@@ -416,7 +416,7 @@ export function SpacedArmorSceneComponent({
|
|||||||
if (shell.type === ShellType.HE) {
|
if (shell.type === ShellType.HE) {
|
||||||
const totalSpacedArmorThickness = shot.in.layers.reduce(
|
const totalSpacedArmorThickness = shot.in.layers.reduce(
|
||||||
(acc, layer) => {
|
(acc, layer) => {
|
||||||
if (layer.type === null || layer.type === ArmorType.Core) {
|
if (layer.type === null || layer.type === ArmorType.Primary) {
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -515,14 +515,14 @@ export function SpacedArmorSceneComponent({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{props.type === ArmorType.Core &&
|
{props.type === ArmorType.Primary &&
|
||||||
jsxTree(
|
jsxTree(
|
||||||
node,
|
node,
|
||||||
{
|
{
|
||||||
renderOrder: 0,
|
renderOrder: 0,
|
||||||
material: omitMaterial,
|
material: omitMaterial,
|
||||||
userData: {
|
userData: {
|
||||||
type: ArmorType.Core,
|
type: ArmorType.Primary,
|
||||||
thickness,
|
thickness,
|
||||||
} satisfies ArmorUserData,
|
} satisfies ArmorUserData,
|
||||||
async onClick(event) {
|
async onClick(event) {
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
import { createPortal, useFrame } from '@react-three/fiber';
|
import { createPortal, useFrame } from '@react-three/fiber';
|
||||||
import { memo, useState } from 'react';
|
import { memo, useState } from 'react';
|
||||||
import { DepthTexture, Scene, Vector2 } from 'three';
|
import { DepthTexture, Scene, Vector2 } from 'three';
|
||||||
import { CoreArmorScene } from './components/CoreArmorScene';
|
import { PrimaryArmorScene } from './components/PrimaryArmorScene';
|
||||||
import { spacedArmorRenderTarget } from './components/CoreArmorSceneComponent/target';
|
import { spacedArmorRenderTarget } from './components/PrimaryArmorSceneComponent/target';
|
||||||
import { SpacedArmorScene } from './components/SpacedArmorScene';
|
import { SpacedArmorScene } from './components/SpacedArmorScene';
|
||||||
|
|
||||||
export const Armor = memo(() => {
|
export const Armor = memo(() => {
|
||||||
const [spacedArmorScene] = useState(() => new Scene());
|
const [spacedArmorScene] = useState(() => new Scene());
|
||||||
const [coreArmorScene] = useState(() => new Scene());
|
const [primaryArmorScene] = useState(() => new Scene());
|
||||||
const spacedArmorPortal = createPortal(
|
const spacedArmorPortal = createPortal(
|
||||||
<SpacedArmorScene scene={spacedArmorScene} />,
|
<SpacedArmorScene scene={spacedArmorScene} />,
|
||||||
spacedArmorScene,
|
spacedArmorScene,
|
||||||
);
|
);
|
||||||
const coreArmorPortal = createPortal(<CoreArmorScene />, coreArmorScene);
|
const primaryArmorPortal = createPortal(
|
||||||
|
<PrimaryArmorScene />,
|
||||||
|
primaryArmorScene,
|
||||||
|
);
|
||||||
|
|
||||||
const renderSize = new Vector2();
|
const renderSize = new Vector2();
|
||||||
const newRenderSize = new Vector2();
|
const newRenderSize = new Vector2();
|
||||||
@@ -40,13 +43,13 @@ export const Armor = memo(() => {
|
|||||||
gl.render(scene, camera);
|
gl.render(scene, camera);
|
||||||
|
|
||||||
gl.clearDepth();
|
gl.clearDepth();
|
||||||
gl.render(coreArmorScene, camera);
|
gl.render(primaryArmorScene, camera);
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{spacedArmorPortal}
|
{spacedArmorPortal}
|
||||||
{coreArmorPortal}
|
{primaryArmorPortal}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -48,8 +48,8 @@ export const StaticArmorScene = memo<StaticArmorSceneProps>(
|
|||||||
gunModelDefinition.mask === undefined
|
gunModelDefinition.mask === undefined
|
||||||
? undefined
|
? undefined
|
||||||
: gunModelDefinition.mask + hullOrigin.y + turretOrigin.y + gunOrigin.y;
|
: gunModelDefinition.mask + hullOrigin.y + turretOrigin.y + gunOrigin.y;
|
||||||
const showCoreArmor = TankopediaPersistent.use(
|
const showPrimaryArmor = TankopediaPersistent.use(
|
||||||
(state) => state.model.visual.showCoreArmor,
|
(state) => state.model.visual.showPrimaryArmor,
|
||||||
);
|
);
|
||||||
const showSpacedArmor = TankopediaPersistent.use(
|
const showSpacedArmor = TankopediaPersistent.use(
|
||||||
(state) => state.model.visual.showSpacedArmor,
|
(state) => state.model.visual.showSpacedArmor,
|
||||||
@@ -75,7 +75,7 @@ export const StaticArmorScene = memo<StaticArmorSceneProps>(
|
|||||||
if (
|
if (
|
||||||
!isVisible ||
|
!isVisible ||
|
||||||
thickness === undefined ||
|
thickness === undefined ||
|
||||||
(!showCoreArmor && !spaced) ||
|
(!showPrimaryArmor && !spaced) ||
|
||||||
(!showSpacedArmor && spaced)
|
(!showSpacedArmor && spaced)
|
||||||
)
|
)
|
||||||
return null;
|
return null;
|
||||||
@@ -86,7 +86,7 @@ export const StaticArmorScene = memo<StaticArmorSceneProps>(
|
|||||||
thicknessRange={thicknessRange}
|
thicknessRange={thicknessRange}
|
||||||
static
|
static
|
||||||
key={node.uuid}
|
key={node.uuid}
|
||||||
type={spaced ? ArmorType.Spaced : ArmorType.Core}
|
type={spaced ? ArmorType.Spaced : ArmorType.Primary}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
/>
|
/>
|
||||||
@@ -130,7 +130,7 @@ export const StaticArmorScene = memo<StaticArmorSceneProps>(
|
|||||||
if (
|
if (
|
||||||
!isVisible ||
|
!isVisible ||
|
||||||
thickness === undefined ||
|
thickness === undefined ||
|
||||||
(!showCoreArmor && !spaced) ||
|
(!showPrimaryArmor && !spaced) ||
|
||||||
(!showSpacedArmor && spaced)
|
(!showSpacedArmor && spaced)
|
||||||
)
|
)
|
||||||
return null;
|
return null;
|
||||||
@@ -143,7 +143,7 @@ export const StaticArmorScene = memo<StaticArmorSceneProps>(
|
|||||||
thicknessRange={thicknessRange}
|
thicknessRange={thicknessRange}
|
||||||
static
|
static
|
||||||
key={node.uuid}
|
key={node.uuid}
|
||||||
type={spaced ? ArmorType.Spaced : ArmorType.Core}
|
type={spaced ? ArmorType.Spaced : ArmorType.Primary}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
/>
|
/>
|
||||||
@@ -167,7 +167,7 @@ export const StaticArmorScene = memo<StaticArmorSceneProps>(
|
|||||||
if (
|
if (
|
||||||
!isVisible ||
|
!isVisible ||
|
||||||
thickness === undefined ||
|
thickness === undefined ||
|
||||||
(!showCoreArmor && !spaced) ||
|
(!showPrimaryArmor && !spaced) ||
|
||||||
(!showSpacedArmor && spaced)
|
(!showSpacedArmor && spaced)
|
||||||
)
|
)
|
||||||
return null;
|
return null;
|
||||||
@@ -182,7 +182,7 @@ export const StaticArmorScene = memo<StaticArmorSceneProps>(
|
|||||||
name={node.name}
|
name={node.name}
|
||||||
thicknessRange={thicknessRange}
|
thicknessRange={thicknessRange}
|
||||||
static
|
static
|
||||||
type={spaced ? ArmorType.Spaced : ArmorType.Core}
|
type={spaced ? ArmorType.Spaced : ArmorType.Primary}
|
||||||
thickness={thickness}
|
thickness={thickness}
|
||||||
node={node}
|
node={node}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ interface TankopediaEphemeral {
|
|||||||
color: string;
|
color: string;
|
||||||
} & (
|
} & (
|
||||||
| {
|
| {
|
||||||
type: ArmorType.Core | ArmorType.Spaced;
|
type: ArmorType.Primary | ArmorType.Spaced;
|
||||||
thicknessAngled: number;
|
thicknessAngled: number;
|
||||||
angle: number;
|
angle: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export interface TankopediaPersistent {
|
|||||||
showEnvironment: boolean;
|
showEnvironment: boolean;
|
||||||
showSpacedArmor: boolean;
|
showSpacedArmor: boolean;
|
||||||
showExternalModules: boolean;
|
showExternalModules: boolean;
|
||||||
showCoreArmor: boolean;
|
showPrimaryArmor: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sort: {
|
sort: {
|
||||||
@@ -50,7 +50,7 @@ export const { Provider, use, useMutation, useStore } = createNextSafeStore(
|
|||||||
visual: {
|
visual: {
|
||||||
showSpacedArmor: true,
|
showSpacedArmor: true,
|
||||||
showExternalModules: true,
|
showExternalModules: true,
|
||||||
showCoreArmor: true,
|
showPrimaryArmor: true,
|
||||||
wireframe: false,
|
wireframe: false,
|
||||||
opaque: false,
|
opaque: false,
|
||||||
environment: ENVIRONMENTS[0],
|
environment: ENVIRONMENTS[0],
|
||||||
|
|||||||
Reference in new issue
Block a user