CAMO-GEN is a advanced web application for generating and customizing seamless camouflage patterns for design, art, and gaming applications.
- Multiple Pattern Types: Including Woodland, Desert, Urban, Digital, Tiger Stripe, and Flecktarn.
- Seamless Pattern Generation: Create patterns that can be tiled without visible seams.
- Real-time Customization: Adjust scale, complexity, contrast, and sharpness to perfect your pattern.
- Color Customization: Customize the color palette for any pattern.
- Pattern Gallery: Save your favorite patterns for later use.
- Export Options: Download patterns as PNG or SVG files.
- Full-screen Preview: View your patterns in a tiled grid to see how they repeat.
- Responsive Design: Works on desktop and mobile devices.
The application has been significantly improved from the original version:
-
Performance Optimization:
- Added memoization with useCallback to prevent unnecessary renders
- Implemented prevSettingsRef to compare settings and only regenerate when actual changes occur
- Added proper patterns tiling using div elements instead of CSS background-image
-
UI Enhancements:
- Created collapsible sections with toggle buttons
- Added full-screen mode with a floating toolbar
- Implemented a gallery at the bottom of the screen
-
Pattern Generation:
- Enhanced all pattern algorithms to be more responsive to settings
- Added seamless pattern verification
- Improved edge handling for seamless tiling
-
Stability:
- Added error handling for pattern generation
- Improved download functionality with status indicators
- Fixed issues with canvas resizing and window dimensions
- Node.js 18+ and npm/yarn
- Clone the repository:
git clone https://github.com/yourusername/camo-gen.git
cd camo-gen/camo-gen-next-fixed
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser to http://localhost:3000
- Select a Pattern Type: Choose from Woodland, Desert, Urban, Digital, etc.
- Customize Settings: Adjust scale, complexity, contrast, and sharpness.
- Change Colors: Modify the color palette to suit your needs.
- Preview: Toggle the seamless preview to see how the pattern will tile.
- Export: Download your pattern as PNG or SVG.
This project is licensed under the MIT License - see the LICENSE file for details.
- Pattern algorithms inspired by real-world camouflage designs
- Perlin noise implementation adapted from p5.js