Skip to content

drygiel/wardrobe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

31 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Wardrobe 2025

A modern 3D wardrobe visualization application built with React Three Fiber, featuring interactive 3D models, VR/AR support, and responsive design.

Live Demo

๐Ÿš€ Features

Core Functionality

  • Interactive 3D Wardrobe Model: Fully interactive wardrobe with openable doors, drawers, and compartments
  • Multiple View Modes: Switch between texture, wireframe, and orthographic views
  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • VR/AR Support: Full VR and AR capabilities with proper head tracking
  • Measurement Tools: Interactive measurement system with visual guides
  • Image Gallery: Built-in photo gallery showcasing project stages

Technical Features

  • Real-time 3D Rendering: High-performance WebGL rendering with shadows
  • Smooth Animations: Tweened camera transitions and interactive animations
  • Layer Management: Multi-layer rendering system for complex scenes
  • Grid System: Optional grid overlay for spatial reference
  • Gizmo Controls: 3D navigation helpers for better user experience

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 19 - Modern React with latest features
  • Next.js 15 - Full-stack React framework with Turbopack
  • TypeScript - Type-safe development
  • Sass - CSS preprocessing with modules

3D Graphics

  • Three.js - Core 3D graphics library
  • React Three Fiber - React renderer for Three.js
  • React Three Drei - Useful helpers and abstractions
  • React Three XR - VR/AR support
  • Tween.js - Smooth animations

UI Components

  • Ant Design - Professional UI component library
  • React Image Gallery - Photo gallery functionality

Development Tools

  • ESLint - Code linting and formatting
  • Prettier - Code formatting
  • Yarn - Package management

๐Ÿ“ Project Structure

app/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ Scene.tsx          # Main 3D scene with camera controls
โ”‚   โ”œโ”€โ”€ Wardrobe.tsx       # Interactive wardrobe model
โ”‚   โ”œโ”€โ”€ Mesh.tsx           # Custom mesh component with measurement
โ”‚   โ””โ”€โ”€ LineHint.tsx       # Measurement line hints
โ”œโ”€โ”€ contexts/
โ”‚   โ””โ”€โ”€ AppContext.tsx     # Global state management
โ”œโ”€โ”€ hooks/
โ”‚   โ”œโ”€โ”€ useEventListener.ts
โ”‚   โ””โ”€โ”€ useNonInitialEffect.ts
โ”œโ”€โ”€ Intro.tsx              # Landing page with project info
โ”œโ”€โ”€ App.tsx                # Main application component
โ””โ”€โ”€ *.module.scss          # Component-specific styles

๐ŸŽฎ Controls & Navigation

Desktop Controls

  • Mouse: Orbit around the wardrobe
  • Scroll: Zoom in/out
  • Click: Interact with doors and drawers
  • Keyboard: Layer switching (0-3)

Mobile Controls

  • Touch: Pan and zoom gestures
  • Tap: Interact with wardrobe elements
  • Swipe: Navigate image gallery

VR/AR Controls

  • Head Movement: Natural head tracking
  • Controllers: Hand tracking for interactions
  • Teleportation: Move around the scene

๐Ÿ”ง Development

Prerequisites

  • Node.js 18+
  • Yarn package manager

Installation

# Clone the repository
git clone <repository-url>
cd wardrobe

# Install dependencies
yarn install

# Start development server
yarn dev

Available Scripts

yarn dev          # Start development server (port 4000)
yarn build         # Build for production
yarn start         # Start production server (port 4001)
yarn lint          # Run ESLint
yarn deploy        # Deploy to production

Environment Variables

NEXT_PUBLIC_BASEPATH=/your-base-path  # Optional base path for assets

๐ŸŽจ Customization

Adding New Wardrobe Models

  1. Place GLB files in /public/models/
  2. Update the model path in Wardrobe.tsx
  3. Adjust materials and animations as needed

Styling

  • Component styles: *.module.scss files
  • Global styles: App.module.scss
  • Responsive breakpoints: 768px (tablet), 480px (mobile)

State Management

The application uses React Context for state management:

  • wireframe: Toggle wireframe mode
  • orthographic: Switch camera projection
  • grid: Show/hide grid overlay
  • hideFronts: Hide wardrobe fronts
  • layer: Current rendering layer (0-3)
  • view: Camera view state
  • gizmo: Show navigation gizmo

๐Ÿ“ฑ Responsive Design

Breakpoints

  • Desktop: > 768px - Full feature set
  • Tablet: โ‰ค 768px - Optimized layout
  • Mobile: โ‰ค 480px - Touch-optimized interface

Mobile Optimizations

  • Touch-friendly controls
  • Responsive typography
  • Optimized 3D performance
  • Full-screen VR support

๐Ÿšง Roadmap

Must Have

  • Texture/solid/wireframe mode
  • Camera animations on site scroll
  • Project stages navigation
  • Wardrobe-only renders
  • Full room renders

Nice to Have

  • HDR environment mapping
  • Interior lighting system
  • Disassembly animations
  • Advanced measurement tools

Optional

  • Smooth scroll integration
  • Video rendering capabilities
  • Advanced vertex measurement tools

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

๐Ÿ“„ License

This project is private and proprietary.

๐Ÿ”— Links

About

Site for the wardrobe project 2015

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors