feat: tweak a few things and enable guess game

This commit is contained in:
TrèsAbhi committed 2025-08-27 17:43:42 -05:00
1 parent aea4905d20
commit 5747d7549f
6 files changed
+49 -56

No files matched your search

@@ -5,7 +5,7 @@ import { Controls } from './Tankopedia/HeroSection/components/TankSandbox/compon
import { Lighting } from './Tankopedia/HeroSection/components/TankSandbox/components/Lighting';
import { TankModel } from './Tankopedia/HeroSection/components/TankSandbox/components/TankModel';
const BRIGHTNESS = 2 ** -5;
const BRIGHTNESS = 2 ** -5.5;
const CONTRAST = 2 ** 2;
export function GuessRenderer() {
@@ -16,13 +16,12 @@ export function GuessRenderer() {
<SmartCanvas
style={{
filter: `grayscale(${isRevealed ? 0 : 1}) contrast(${isRevealed ? 1 : CONTRAST}) brightness(${isRevealed ? 1 : BRIGHTNESS})`,
// filter: `drop-shadow(0 0 1rem ${Var('black-a11')})`,
transitionDuration: isRevealed ? '2s' : undefined,
transitionProperty: 'filter',
}}
camera={{ position: [-5, 5, -5] }}
>
<Controls distanceScale={2} zoomable={false} />
<Controls zoomable={false} />
<Lighting display={TankopediaDisplay.Model} />
<TankModel />
</SmartCanvas>
+1 -1
View File
@@ -88,7 +88,7 @@ export function Guesser() {
position="absolute"
bottom="0"
left="50%"
style={{ transform: 'translateX(-50%)' }}
style={{ transform: 'translateX(-50%)', pointerEvents: 'none' }}
width="100%"
p="4"
maxWidth="25rem"
@@ -24,7 +24,6 @@ interface ControlsProps {
autoRotate?: boolean;
zoomable?: boolean;
enableRotate?: boolean;
distanceScale?: number;
}
export function Controls({
@@ -32,7 +31,6 @@ export function Controls({
autoRotate = true,
zoomable = true,
enableRotate = true,
distanceScale = 1,
}: ControlsProps) {
const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation();
const duelStore = Duel.useStore();
@@ -86,7 +84,7 @@ export function Controls({
-8,
gunHeight + (naked ? 10 : 2),
-13,
).multiplyScalar(distanceScale);
);
const t0 = useRef(Date.now() / 1000);
useFrame(() => {