feat: 3d ofis deneyimini ve etkilesimleri gelistir
This commit is contained in:
@@ -3,11 +3,21 @@ import { TextureLoader } from "three";
|
||||
import { DoubleSide } from "three";
|
||||
import Chair from "./Chair.jsx";
|
||||
|
||||
export default function Desk({ position = [0, 0, 0], nameplateColor = "#52b6ff" }) {
|
||||
export default function Desk({ position = [0, 0, 0], nameplateColor = "#52b6ff", onSelect }) {
|
||||
const appleLogoTexture = useLoader(TextureLoader, "/apple-logo.png");
|
||||
|
||||
return (
|
||||
<group position={position}>
|
||||
<group
|
||||
position={position}
|
||||
onPointerDown={(event) => {
|
||||
event.stopPropagation();
|
||||
onSelect?.();
|
||||
}}
|
||||
>
|
||||
<mesh position={[0, 0.72, -0.08]}>
|
||||
<boxGeometry args={[2.1, 1.5, 2.1]} />
|
||||
<meshBasicMaterial transparent opacity={0} />
|
||||
</mesh>
|
||||
<mesh castShadow receiveShadow position={[0, 0.78, 0]}>
|
||||
<boxGeometry args={[1.9, 0.16, 1.15]} />
|
||||
<meshStandardMaterial color="#b78256" roughness={0.86} />
|
||||
@@ -34,8 +44,8 @@ export default function Desk({ position = [0, 0, 0], nameplateColor = "#52b6ff"
|
||||
<boxGeometry args={[0.62, 0.03, 0.4]} />
|
||||
<meshStandardMaterial color="#c8ced6" roughness={0.28} metalness={0.58} />
|
||||
</mesh>
|
||||
<mesh position={[0, 0.016, 0.2]} rotation={[-Math.PI / 2, 0, Math.PI]}>
|
||||
<planeGeometry args={[0.114, 0.114]} />
|
||||
<mesh position={[0, 0.022, 0.2]} rotation={[-Math.PI / 2, 0, Math.PI]}>
|
||||
<planeGeometry args={[0.18, 0.18]} />
|
||||
<meshBasicMaterial
|
||||
map={appleLogoTexture}
|
||||
transparent
|
||||
|
||||
Reference in New Issue
Block a user