A TypeScript-based procedural generation system for creating dynamic, biome-specific 3D towers using Three.js. The system features customizable nodes, materials, decorations, and animations with a comprehensive parameter control system.
- Node Generation: Create procedural nodes with different shapes (cube, cylinder, arch)
- Material System: Biome-specific materials with dynamic variations
- Decoration System: Procedural placement of decorations (moss, vines, coral)
- Tower Generation: Stack nodes with different patterns and rules
- Parameter Control: Comprehensive GUI for real-time parameter adjustments
Three distinct biomes with unique characteristics:
- Forest: Green tones with moss and vine decorations
- Desert: Sandy colors with minimal decorations
- Ocean: Blue tones with coral formations
- Node.js (v14 or higher)
- npm (v6 or higher)
- Clone the repository:
git clone [repository-url]
cd procedural-nodes- Install dependencies:
npm install- Start the development server:
npm startThe application will open in your default browser at http://localhost:3000.
- Start Development Server:
npm start - Build for Production:
npm run build - Preview Production Build:
npm run serve - Run Linter:
npm run lint - Fix Linting Issues:
npm run lint:fix
- three: ^0.158.0 - 3D graphics library
- dat.gui: ^0.7.9 - Parameter control interface
- simplex-noise: ^4.0.1 - Procedural noise generation
- typescript: ^5.2.2 - Type safety and modern JavaScript features
- vite: ^4.5.0 - Development and build tool
- @types/three: ^0.158.0 - Three.js type definitions
- @types/dat.gui: ^0.7.10 - dat.GUI type definitions
- @types/node: ^22.10.2 - Node.js type definitions
- eslint: ^8.54.0 - Code quality and style enforcement
- vite-tsconfig-paths: ^4.2.1 - Path alias support
src/
├── types/
│ ├── nodes.ts # Type definitions for nodes
│ └── parameters.ts # Type definitions for parameters
├── generators/
│ ├── MaterialFactory.ts # Material generation
│ ├── NodeGenerator.ts # Node creation
│ └── DecorationGenerator.ts # Decoration system
├── controllers/
│ └── ParameterController.ts # GUI controls
├── config/
│ └── parameters.ts # Default parameters
└── main.ts # Main applicationThe project uses path aliases for cleaner imports:
@/*resolves tosrc/*
- Strict type checking enabled
- Modern ECMAScript features
- Path alias support
- Node.js type definitions
- Development server on port 3000
- Path alias resolution
- TypeScript support
- Auto-opening in browser
- Fork the repository
- Create a feature branch
- Commit your changes using conventional commits:
git add .
git commit -m "type: description
- Detailed bullet points
- About the changes"- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.