mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: some updates
This commit is contained in:
1 parent
7605e1d6f2
commit
d785588cf9
5 files changed
+14
-10
No files matched your search
@@ -16,7 +16,8 @@ interface DissectorSceneComponentProps {
|
|||||||
group: string;
|
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> = {
|
const moduleColor: Record<string, Color> = {
|
||||||
Armor: armorColor,
|
Armor: armorColor,
|
||||||
@@ -38,10 +39,14 @@ const moduleColor: Record<string, Color> = {
|
|||||||
TurretRotator: new Color('blue'),
|
TurretRotator: new Color('blue'),
|
||||||
Transmission: new Color('cyan'),
|
Transmission: new Color('cyan'),
|
||||||
};
|
};
|
||||||
const moduleOutlineColor: Record<string, Color> = {};
|
const moduleOutlineColor: Record<string, Color> = {
|
||||||
|
Armor: armorOutlineColor,
|
||||||
|
ArmorScreen: armorOutlineColor,
|
||||||
|
};
|
||||||
|
|
||||||
for (const key in moduleColor) {
|
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({
|
export function DissectorSceneComponent({
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,6 @@
|
|||||||
import { BLITZKIT_TANK_ICON_SIZE } from '@blitzkit/core';
|
import { BLITZKIT_TANK_ICON_SIZE } from '@blitzkit/core';
|
||||||
import { Canvas } from '@react-three/fiber';
|
import { Canvas } from '@react-three/fiber';
|
||||||
import { forwardRef, Suspense, useImperativeHandle, useRef } from 'react';
|
import { forwardRef, Suspense, useImperativeHandle, useRef } from 'react';
|
||||||
import { Plane, Vector3 } from 'three';
|
|
||||||
import { useOnScreen } from '../../../../../hooks/useOnScreen';
|
import { useOnScreen } from '../../../../../hooks/useOnScreen';
|
||||||
import { TankopediaEphemeral } from '../../../../../stores/tankopediaEphemeral';
|
import { TankopediaEphemeral } from '../../../../../stores/tankopediaEphemeral';
|
||||||
import { TankopediaPersistent } from '../../../../../stores/tankopediaPersistent';
|
import { TankopediaPersistent } from '../../../../../stores/tankopediaPersistent';
|
||||||
@@ -160,7 +159,7 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
|
|||||||
: 'never'
|
: 'never'
|
||||||
}
|
}
|
||||||
gl={{
|
gl={{
|
||||||
clippingPlanes: [new Plane(new Vector3(0, 0, 1))],
|
// clippingPlanes: [new Plane(new Vector3(0, 0, 1))],
|
||||||
localClippingEnabled: true,
|
localClippingEnabled: true,
|
||||||
preserveDrawingBuffer: true,
|
preserveDrawingBuffer: true,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function jsxTree(
|
|||||||
scale: node.scale,
|
scale: node.scale,
|
||||||
};
|
};
|
||||||
|
|
||||||
return mergers?.mesh?.(node, props) ?? <mesh {...props} />;
|
return mergers?.mesh ? mergers.mesh(node, props) : <mesh {...props} />;
|
||||||
} else if (node instanceof Object3D) {
|
} else if (node instanceof Object3D) {
|
||||||
const props = {
|
const props = {
|
||||||
key,
|
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;
|
return null;
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export const TankopediaEphemeral = createContextualStore(
|
|||||||
armor,
|
armor,
|
||||||
controlsEnabled: true,
|
controlsEnabled: true,
|
||||||
xpMultiplier: 1,
|
xpMultiplier: 1,
|
||||||
display: TankopediaDisplay.Dissector,
|
display: TankopediaDisplay.StaticArmor,
|
||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -227,8 +227,8 @@ namespace BlitzKit.CLI.Functions
|
|||||||
slug = TrailingDashRegex().Replace(slug, "");
|
slug = TrailingDashRegex().Replace(slug, "");
|
||||||
|
|
||||||
await MangleCollision(id, pda);
|
await MangleCollision(id, pda);
|
||||||
// await MangleIcon(pda);
|
await MangleIcon(pda);
|
||||||
// await MangleArmor(pda);
|
await MangleArmor(pda);
|
||||||
|
|
||||||
Tank tank = new()
|
Tank tank = new()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user