({ position, mirrored = false }: ScreenSetProps)
| 6 | } |
| 7 | |
| 8 | function ScreenSet({ position, mirrored = false }: ScreenSetProps) { |
| 9 | const baseRotation = mirrored ? -0.16 : 0.16; |
| 10 | const wingRotation = mirrored ? -0.34 : 0.34; |
| 11 | |
| 12 | const panelOffsets: Array<{ x: number; z: number; rotation: number }> = [ |
| 13 | { x: -0.94, z: -0.05, rotation: wingRotation }, |
| 14 | { x: 0, z: 0, rotation: 0 }, |
| 15 | { x: 0.94, z: -0.05, rotation: -wingRotation }, |
| 16 | ]; |
| 17 | |
| 18 | return ( |
| 19 | <group position={position} rotation={[0, baseRotation, 0]}> |
| 20 | {panelOffsets.map(({ x, z, rotation }, panelIndex) => ( |
| 21 | <group key={`screen-panel-${panelIndex}`} position={[x, 0, z]} rotation={[0, rotation, 0]}> |
| 22 | <mesh position={[0, 1.45, 0]} castShadow receiveShadow> |
| 23 | <boxGeometry args={[0.9, 2.9, 0.06]} /> |
| 24 | <meshStandardMaterial color="#ECE6DC" roughness={0.62} /> |
| 25 | </mesh> |
| 26 | <mesh position={[0, 1.45, 0.025]}> |
| 27 | <boxGeometry args={[0.72, 2.6, 0.02]} /> |
| 28 | <meshStandardMaterial color="#F7F4EE" transparent opacity={0.62} roughness={0.16} metalness={0.04} /> |
| 29 | </mesh> |
| 30 | {[ |
| 31 | [0, 2.86, 0], |
| 32 | [0, 0.04, 0], |
| 33 | ].map(([px, py, pz], frameIndex) => ( |
| 34 | <mesh key={`frame-top-bottom-${frameIndex}`} position={[px, py, pz]} castShadow> |
| 35 | <boxGeometry args={[0.94, 0.08, 0.08]} /> |
| 36 | <meshStandardMaterial color="#D4BE9B" roughness={0.62} /> |
| 37 | </mesh> |
| 38 | ))} |
| 39 | {[-0.41, 0.41].map((frameX, frameIndex) => ( |
| 40 | <mesh key={`frame-side-${frameIndex}`} position={[frameX, 1.45, 0]} castShadow> |
| 41 | <boxGeometry args={[0.08, 2.94, 0.08]} /> |
| 42 | <meshStandardMaterial color="#D4BE9B" roughness={0.62} /> |
| 43 | </mesh> |
| 44 | ))} |
| 45 | {[-0.25, 0, 0.25].map((slatX, slatIndex) => ( |
| 46 | <mesh key={`slat-${slatIndex}`} position={[slatX, 1.45, 0.028]} castShadow> |
| 47 | <boxGeometry args={[0.04, 2.52, 0.02]} /> |
| 48 | <meshStandardMaterial color="#DCCAAE" roughness={0.68} /> |
| 49 | </mesh> |
| 50 | ))} |
| 51 | {[-0.22, 0.22].map((footX, footIndex) => ( |
| 52 | <mesh key={`foot-${footIndex}`} position={[footX, 0.06, 0.08]} castShadow> |
| 53 | <boxGeometry args={[0.18, 0.12, 0.24]} /> |
| 54 | <meshStandardMaterial color="#B69A78" roughness={0.74} /> |
| 55 | </mesh> |
| 56 | ))} |
| 57 | </group> |
| 58 | ))} |
| 59 | </group> |
| 60 | ); |
| 61 | } |
| 62 | |
| 63 | export default function FoldingScreen() { |
| 64 | return ( |
nothing calls this directly
no outgoing calls
no test coverage detected