feat: add steel texture for doors

This commit is contained in:
2026-06-02 03:29:17 -03:00
parent 8dcc888d5c
commit ebda4b281e
2 changed files with 13 additions and 9 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+13 -9
View File
@@ -70,6 +70,7 @@ interface DoorProps {
function Door({ position, rotation }: DoorProps) { function Door({ position, rotation }: DoorProps) {
const [soundUrl, setSoundUrl] = useState<string | null>(null); const [soundUrl, setSoundUrl] = useState<string | null>(null);
const currentSound = useRef<string | null>(null); const currentSound = useRef<string | null>(null);
const steelTex = useTexture('fear/img/steel.png');
useEffect(() => { useEffect(() => {
const interval = setInterval(() => { const interval = setInterval(() => {
@@ -91,19 +92,22 @@ function Door({ position, rotation }: DoorProps) {
return ( return (
<group position={position} rotation={rotation}> <group position={position} rotation={rotation}>
<mesh position={[0, 2, -0.14]}> {/* frame */}
<boxGeometry args={[2.4, 4.0, 0.2]} /> <mesh position={[0, 2, -0.1]}>
<meshStandardMaterial color="#8a8585" roughness={0.8} metalness={0.2} /> <boxGeometry args={[2.4, 4.0, 0.2, 4, 4, 1]} />
<meshStandardMaterial map={steelTex} color="#8d8d8d" onBeforeCompile={ShaderPatch} />
</mesh> </mesh>
<mesh position={[0, 1.95, -0.08]}> {/* panel */}
<boxGeometry args={[2.1, 3.8, 0.1]} /> <mesh position={[0, 1.95, -0.0]}>
<meshStandardMaterial color="#4e4b4b" roughness={0.7} metalness={0.2} /> <boxGeometry args={[2.1, 3.8, 0.1, 4, 4, 1]} />
<meshStandardMaterial map={steelTex} color="#4e4a4a" onBeforeCompile={ShaderPatch} />
</mesh> </mesh>
<mesh position={[0.9, 1.8, 0.08]}> {/* handle */}
<boxGeometry args={[0.08, 0.08, 0.15]} /> <mesh position={[0.75, 1.8, .085]}>
<meshStandardMaterial color="#4e4b4b" roughness={0.4} metalness={0.2} /> <boxGeometry args={[0.3, 0.08, 0.1]} />
<meshStandardMaterial map={steelTex} color="#ffffff" onBeforeCompile={ShaderPatch} />
</mesh> </mesh>
{soundUrl && ( {soundUrl && (