| | |
| | | return useGLTF('/models/shelf/row.glb'); |
| | | }, []) |
| | | |
| | | const model = useMemo(() => { |
| | | const fbx = useFBX('/models/shelf/row2.fbx'); |
| | | if (!fbx.castShadow) { |
| | | Common.setShadow(fbx); |
| | | } |
| | | // Common.setColor(fbx) |
| | | fbx.scale.set(MODEL_SHELF_SCALE * 1.5, MODEL_SHELF_SCALE, MODEL_SHELF_SCALE); |
| | | return fbx.clone(); |
| | | }, []) |
| | | |
| | | useEffect(() => { |
| | | state.shelfList[no] = position; |
| | | }, [props]); |
| | |
| | | position={[0, 99, 0]} |
| | | scale={50000} |
| | | /> */} |
| | | <mesh position={[0, 100, 0]}> |
| | | |
| | | <primitive object={model} castShadow position={[0, 25, 0]} /> |
| | | {/* <mesh position={[0, 100, 0]}> |
| | | <boxGeometry args={[150, 200, 30]} /> |
| | | <meshStandardMaterial color={'orange'} transparent={true} opacity={.5} /> |
| | | </mesh> |
| | | </mesh> */} |
| | | {/* <Box rotationY={0} position={[0, 0, 0]} /> */} |
| | | </group> |
| | | </> |
| | |
| | | |
| | | export const MODEL_BOX_SCALE = .5; |
| | | |
| | | export const MODEL_SHELF_SCALE = 1; |
| | | export const MODEL_SHELF_SCALE = .6; |
| | | |
| | | // shelf scale & offset |
| | | |