Fix: Address review on animated legendary camouflages

- Inline the camouflage preset lookup instead of a one-off `camouflagePreset` helper
- Move the `primitive` override into the `jsxTree` mergers, so `skinTree` takes plain mergers and falls back to `<primitive>` like the mesh and group defaults
This commit is contained in:
Mark Greene committed 2026-11-05 17:26:56 +13:00
1 parent 2150fb3758
commit fddf407cc0
5 files changed
+15 -22

No files matched your search

@@ -1,5 +1,4 @@
import {
camouflagePreset,
parseHierarchies,
Sc2ReadStream,
type CamouflagesXml,
@@ -74,7 +73,9 @@ export async function GET({ props }: APIContext<{ skin: number }>) {
include as { vehicle: { name: string } }
).vehicle.name.split(":");
const { customEntities } = camouflagesYaml[key];
const preset = camouflagePreset(camouflagesYaml[key], nation, tankKey);
const preset =
camouflagesYaml[key].preset ??
camouflagesYaml[key].override?.[nation]?.override?.[tankKey]?.preset;
const parameters = await vfs.yaml<TankParameters>(
`Data/3d/Tanks/Parameters/${nation}/${tankKey}.yaml`,
);