feat: some updates

This commit is contained in:
tresabhi committed 2025-03-22 18:43:59 -05:00
1 parent 7605e1d6f2
commit d785588cf9
5 files changed
+14 -10

No files matched your search

@@ -16,7 +16,8 @@ interface DissectorSceneComponentProps {
group: string;
}
const armorColor = new Color().multiplyScalar(1 / 16);
const armorColor = new Color().multiplyScalar(2 ** -8);
const armorOutlineColor = armorColor.clone().multiplyScalar(2 ** 4.5);
const moduleColor: Record<string, Color> = {
Armor: armorColor,
@@ -38,10 +39,14 @@ const moduleColor: Record<string, Color> = {
TurretRotator: new Color('blue'),
Transmission: new Color('cyan'),
};
const moduleOutlineColor: Record<string, Color> = {};
const moduleOutlineColor: Record<string, Color> = {
Armor: armorOutlineColor,
ArmorScreen: armorOutlineColor,
};
for (const key in moduleColor) {
moduleOutlineColor[key] = moduleColor[key].clone().multiplyScalar(4);
if (key in moduleOutlineColor) continue;
moduleOutlineColor[key] = moduleColor[key].clone().multiplyScalar(0.5);
}
export function DissectorSceneComponent({
@@ -1,7 +1,6 @@
import { BLITZKIT_TANK_ICON_SIZE } from '@blitzkit/core';
import { Canvas } from '@react-three/fiber';
import { forwardRef, Suspense, useImperativeHandle, useRef } from 'react';
import { Plane, Vector3 } from 'three';
import { useOnScreen } from '../../../../../hooks/useOnScreen';
import { TankopediaEphemeral } from '../../../../../stores/tankopediaEphemeral';
import { TankopediaPersistent } from '../../../../../stores/tankopediaPersistent';
@@ -160,7 +159,7 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
: 'never'
}
gl={{
clippingPlanes: [new Plane(new Vector3(0, 0, 1))],
// clippingPlanes: [new Plane(new Vector3(0, 0, 1))],
localClippingEnabled: true,
preserveDrawingBuffer: true,
}}
@@ -20,7 +20,7 @@ export function jsxTree(
scale: node.scale,
};
return mergers?.mesh?.(node, props) ?? <mesh {...props} />;
return mergers?.mesh ? mergers.mesh(node, props) : <mesh {...props} />;
} else if (node instanceof Object3D) {
const props = {
key,
@@ -32,7 +32,7 @@ export function jsxTree(
),
};
return mergers?.group?.(node, props) ?? <group {...props} />;
return mergers?.group ? mergers.group(node, props) : <group {...props} />;
}
return null;
@@ -137,7 +137,7 @@ export const TankopediaEphemeral = createContextualStore(
armor,
controlsEnabled: true,
xpMultiplier: 1,
display: TankopediaDisplay.Dissector,
display: TankopediaDisplay.StaticArmor,
})),
);
},
+2 -2
View File
@@ -227,8 +227,8 @@ namespace BlitzKit.CLI.Functions
slug = TrailingDashRegex().Replace(slug, "");
await MangleCollision(id, pda);
// await MangleIcon(pda);
// await MangleArmor(pda);
await MangleIcon(pda);
await MangleArmor(pda);
Tank tank = new()
{