feat: add steel texture for doors
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -70,6 +70,7 @@ interface DoorProps {
|
||||
function Door({ position, rotation }: DoorProps) {
|
||||
const [soundUrl, setSoundUrl] = useState<string | null>(null);
|
||||
const currentSound = useRef<string | null>(null);
|
||||
const steelTex = useTexture('fear/img/steel.png');
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
@@ -91,19 +92,22 @@ function Door({ position, rotation }: DoorProps) {
|
||||
|
||||
return (
|
||||
<group position={position} rotation={rotation}>
|
||||
<mesh position={[0, 2, -0.14]}>
|
||||
<boxGeometry args={[2.4, 4.0, 0.2]} />
|
||||
<meshStandardMaterial color="#8a8585" roughness={0.8} metalness={0.2} />
|
||||
{/* frame */}
|
||||
<mesh position={[0, 2, -0.1]}>
|
||||
<boxGeometry args={[2.4, 4.0, 0.2, 4, 4, 1]} />
|
||||
<meshStandardMaterial map={steelTex} color="#8d8d8d" onBeforeCompile={ShaderPatch} />
|
||||
</mesh>
|
||||
|
||||
<mesh position={[0, 1.95, -0.08]}>
|
||||
<boxGeometry args={[2.1, 3.8, 0.1]} />
|
||||
<meshStandardMaterial color="#4e4b4b" roughness={0.7} metalness={0.2} />
|
||||
{/* panel */}
|
||||
<mesh position={[0, 1.95, -0.0]}>
|
||||
<boxGeometry args={[2.1, 3.8, 0.1, 4, 4, 1]} />
|
||||
<meshStandardMaterial map={steelTex} color="#4e4a4a" onBeforeCompile={ShaderPatch} />
|
||||
</mesh>
|
||||
|
||||
<mesh position={[0.9, 1.8, 0.08]}>
|
||||
<boxGeometry args={[0.08, 0.08, 0.15]} />
|
||||
<meshStandardMaterial color="#4e4b4b" roughness={0.4} metalness={0.2} />
|
||||
{/* handle */}
|
||||
<mesh position={[0.75, 1.8, .085]}>
|
||||
<boxGeometry args={[0.3, 0.08, 0.1]} />
|
||||
<meshStandardMaterial map={steelTex} color="#ffffff" onBeforeCompile={ShaderPatch} />
|
||||
</mesh>
|
||||
|
||||
{soundUrl && (
|
||||
|
||||
Reference in New Issue
Block a user