An interactive 3D furniture placement application with a solarpunk aesthetic. Design eco-futuristic interior spaces with intuitive drag-and-drop controls, real-time 3D rendering, and persistent layout storage.
- Orbital Camera Controls: Drag to rotate, scroll to zoom, right-drag to pan
- Dynamic Lighting: Adjustable ambient, point, and directional lights via Leva GUI
- Post-Processing Effects: Optional pixelation shader for retro aesthetic
- Responsive Controls: Smooth camera interaction with min/max zoom limits
- Library Panel: Browse and add furniture items (Solar Succulent, Solar Panel Station, Hydroponic Tower)
- Drag & Drop: Intuitive 3D furniture placement by clicking and dragging
- Selection System: Click to select furniture with visual feedback
- Advanced Operations: Duplicate, delete, and reposition furniture items
- Keyboard Shortcuts: Fast editing with Delete, Ctrl+D, and Esc keys
- Undo/Redo: Full-featured history tracking (50-state buffer)
- Keyboard Shortcuts: Ctrl+Z to undo, Ctrl+Y to redo
- Visual Indicators: Toolbar shows when undo/redo actions are available
- Smart State Management: Automatic history snapshots on furniture changes
- Save Layouts: Name and store your furniture arrangements
- Load Instantly: Restore saved layouts with one click
- Browser Storage: Uses localStorage for client-side persistence
- Manage Library: Delete unwanted saved layouts
- Screenshots: Capture canvas as downloadable image
- Share Designs: Share button for distribution
- Help System: Toggle instructions panel
- Designer Reality Mixer: Upload interior photos and convert them to 3D models
- Local Processing: Uses TripoSR on your GPU (RTX 2070 8GB optimized)
- Instant Integration: Converted models appear directly in your scene
- Free & Open Source: No API keys or cloud services required
- Node.js 20+ (recommended)
- npm, yarn, pnpm, or bun
- For Photo-to-3D: Python 3.9+, CUDA-capable GPU (RTX 2070 or better)
# Install dependencies
npm install
# Run the development server
npm run devOpen http://localhost:3000 in your browser.
cd triposr-service
setup.bat # Run first-time setup (Windows)
start-server.bat # Start the serviceSee triposr-service/README.md for detailed instructions.
Copy .env.local.example to .env.local:
TRIPOSR_API_URL=http://127.0.0.1:8000npm run devNow the "Import Designer Photo" button will be functional!
npm run dev # Start development server
npm run build # Build for production
npm start # Start production server
npm run lint # Run ESLint- Left Drag: Rotate camera around scene
- Right Drag: Pan camera horizontally/vertically
- Scroll: Zoom in/out
- Click Furniture: Select item
- Drag Furniture: Move selected item in 3D space
- Import Photo Button: Open photo upload dialog
Ctrl+Z: Undo last actionCtrl+YorCtrl+Shift+Z: Redo actionDelete: Delete selected furnitureCtrl+D: Duplicate selected furnitureEsc: Deselect current furnitureArrow Keys: Fine-tune furniture position (0.5 units)Q/E: Rotate furniture (15ยฐ increments)+/-: Scale furniture (10% increments)
- Drag and drop images directly onto the import dialog
- Supports JPG, PNG (max 4MB)
- Processing takes 10-20 seconds on RTX 2070
- Next.js 16: React framework with Turbopack
- React 19: Latest UI library
- TypeScript 5: Type-safe development
- Tailwind CSS 4: Utility-first styling
- Three.js 0.183: 3D engine
- React Three Fiber 9: React renderer for Three.js
- React Three Drei 10: Useful Three.js helpers
- React Three Postprocessing: Visual effects
- Leva: GUI controls for scene parameters
- ESLint: Code quality and consistency
- TripoSR: Stability AI's single-image 3D reconstruction
- FastAPI: Python service backend
- PyTorch: ML framework for 3D generation
- Rembg: Automatic background removal
src/
โโโ app/
โ โโโ layout.tsx # Root layout with HistoryProvider
โ โโโ page.tsx # Main app with state management
โ โโโ globals.css # Global styles
โโโ components/
โ โโโ Scene.tsx # 3D canvas wrapper
โ โโโ 3d/ # 3D-specific components
โ โ โโโ EditableFurniture.tsx
โ โ โโโ FurnitureInstances.tsx
โ โ โโโ Model.tsx
โ โโโ leva/ # Leva GUI controls
โ โ โโโ SceneControls.tsx
โ โโโ ui/ # UI components
โ โโโ FurniturePanel.tsx
โ โโโ LayoutControls.tsx
โ โโโ Toolbar.tsx
โโโ experiences/
โ โโโ SolarpunkRoom.tsx # Main 3D scene composition
โ โโโ RoomEnvironment.tsx
โ โโโ RoomModels.tsx
โโโ hooks/
โ โโโ useHistory.tsx # Undo/redo state management
โ โโโ useUndoRedo.ts # Keyboard shortcut hook
โ โโโ useFurnitureKeyboard.ts
โโโ lib/
โ โโโ constants.ts
โ โโโ furnitureLibrary.ts # Furniture item definitions
โ โโโ materials.ts
โ โโโ share.ts # Export/share utilities
โ โโโ storage.ts # localStorage utilities
โโโ types/
โโโ index.ts # TypeScript definitions
- Next.js 16 - React framework with App Router
- React 19 - UI library
- React Three Fiber - React renderer for Three.js
- @react-three/drei - Useful R3F helpers
- @react-three/postprocessing - Post-processing effects
- Three.js - 3D graphics library
- Leva - GUI controls
- Tailwind CSS 4 - Utility-first CSS
- TypeScript 5 - Type safety
- GSAP - Animation library
Place .glb or .gltf files in /public/models/ and reference them in src/lib/furnitureLibrary.ts:
{
id: 'my-furniture',
name: 'My Custom Furniture',
modelPath: '/models/my-furniture.glb',
position: [0, 0, 0],
rotation: [0, 0, 0],
scale: 1,
}Use the Leva GUI (top-right panel) to adjust:
- Ambient light intensity & color
- Point light intensity & color
- Auto-rotation speed
- Pixelation effect intensity
Edit src/lib/furnitureLibrary.ts to add/remove furniture items.
Update Tailwind colors in src/app/globals.css and component class names.
-
Rotation & scale controls for furnitureโ Done (Q/E keys, +/- keys) -
Photo-to-3D conversionโ Done (TripoSR integration) - Multiple room templates (bedroom, office, greenhouse)
- Snap-to-grid placement option
- Export layouts as JSON/3D formats
- Real-time collaborative editing
- Mobile touch controls optimization
- VR/AR mode support
- Material & texture customization
- AI-powered layout suggestions
- Multi-photo photogrammetry mode
-
Check TripoSR service is running:
curl http://127.0.0.1:8000/health
-
Verify
.env.localhas:TRIPOSR_API_URL=http://127.0.0.1:8000
-
Check service logs for errors
If you get GPU memory errors:
-
Edit
triposr-service/server.py:MAX_IMAGE_SIZE = 384 # Lower from 512
-
Close other GPU applications
-
Restart the TripoSR service
- Ensure image is under 4MB
- Use JPG or PNG format
- Check for valid image file (not corrupted)
# Clean build
rm -rf .next node_modules
npm install
npm run buildThis project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
Built with โค๏ธ using React Three Fiber ecosystem and Next.js.
Status: โ Fully functional with all core features integrated (as of March 6, 2026)
See PROJECT_STATUS.md for detailed implementation notes.