mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
fix: spaced armor layering
This commit is contained in:
1 parent
578f6f4d0f
commit
a11975adec
5 files changed
+11
-8
No files matched your search
@@ -20,8 +20,6 @@ export async function buildTankArmors() {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
nations.map(async (nation) => {
|
nations.map(async (nation) => {
|
||||||
if (nation !== 'european') return;
|
|
||||||
|
|
||||||
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
||||||
`${DATA}/${DOI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
`${DATA}/${DOI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
||||||
);
|
);
|
||||||
@@ -30,6 +28,8 @@ export async function buildTankArmors() {
|
|||||||
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
||||||
const id = toUniqueId(nation, tank.id);
|
const id = toUniqueId(nation, tank.id);
|
||||||
|
|
||||||
|
if (id !== 9489) return;
|
||||||
|
|
||||||
console.log(`Building armor ${id} @ ${nation}/${tankKey}`);
|
console.log(`Building armor ${id} @ ${nation}/${tankKey}`);
|
||||||
|
|
||||||
const model = await extractArmor(DATA, `${nation}-${tankKey}`);
|
const model = await extractArmor(DATA, `${nation}-${tankKey}`);
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ export async function buildTankModels() {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
nations.map(async (nation) => {
|
nations.map(async (nation) => {
|
||||||
if (nation !== 'european') return;
|
|
||||||
|
|
||||||
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
||||||
`${DATA}/${DOI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
`${DATA}/${DOI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
||||||
);
|
);
|
||||||
@@ -45,6 +43,8 @@ export async function buildTankModels() {
|
|||||||
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
||||||
const id = toUniqueId(nation, tank.id);
|
const id = toUniqueId(nation, tank.id);
|
||||||
|
|
||||||
|
if (id !== 9489) return;
|
||||||
|
|
||||||
console.log(`Building model ${id} @ ${nation}/${tankKey}`);
|
console.log(`Building model ${id} @ ${nation}/${tankKey}`);
|
||||||
|
|
||||||
const parameters = await readYAMLDVPL<TankParameters>(
|
const parameters = await readYAMLDVPL<TankParameters>(
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ export function TankDisplay({ duel }: TankDisplayProps) {
|
|||||||
>
|
>
|
||||||
<TankModel duel={duel} />
|
<TankModel duel={duel} />
|
||||||
<TankArmor duel={duel} />
|
<TankArmor duel={duel} />
|
||||||
|
{/* <SpacedArmorDepth duel={duel} /> */}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -50,9 +50,11 @@ export function ArmorMesh({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<mesh {...props} renderOrder={0}>
|
{!isSpaced && (
|
||||||
<meshBasicMaterial colorWrite={false} />
|
<mesh {...props} renderOrder={0}>
|
||||||
</mesh>
|
<meshBasicMaterial colorWrite={false} />
|
||||||
|
</mesh>
|
||||||
|
)}
|
||||||
|
|
||||||
<mesh {...props} renderOrder={1}>
|
<mesh {...props} renderOrder={1}>
|
||||||
<ThreeCustomShaderMaterial
|
<ThreeCustomShaderMaterial
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export function ArmorMeshSpacedArmorDepth({
|
|||||||
}: ArmorMeshSpacedArmorDepthProps) {
|
}: ArmorMeshSpacedArmorDepthProps) {
|
||||||
return (
|
return (
|
||||||
<mesh {...props}>
|
<mesh {...props}>
|
||||||
<meshBasicMaterial />
|
<meshBasicMaterial colorWrite={false} />
|
||||||
</mesh>
|
</mesh>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user