A React-first 3D editor with reactive geometry system, built with Next.js and modern web technologies.
- Reactive Geometry System: Built on Zustand stores with reactive data structures
- Dual View Modes: Object Mode and Edit Mode for different interaction paradigms
- Component Selection: Vertex, Edge, and Face selection in Edit Mode
- Scene Hierarchy: Nested objects with parent-child relationships
- Real-time Updates: All changes are immediately reflected across the UI
- Custom Format: Proprietary
.t3d
format for saving/loading scenes - Full Data Preservation: Complete scene state including meshes, materials, hierarchy, and viewport
- Browser-based: Entirely client-side export/import using ZIP compression
- Version Control: Built-in version compatibility system
- ID Stability: Preserves all object IDs across export/import cycles
- Multiple mesh creation and management
- Material system with PBR properties
- Transform operations (position, rotation, scale)
- Selection state management
- Viewport camera controls
- Debug panels and test suites
- Frontend: Next.js 15, React 19, TypeScript
- State Management: Zustand with Immer middleware
- 3D Math: Custom geometry utilities
- File Handling: JSZip for T3D format
- Styling: Tailwind CSS
- Development: Turbopack for fast builds
src/
├── app/ # Next.js app directory
├── components/ # React components
│ ├── GeometryDebugPanel.tsx
│ ├── T3DToolbar.tsx # Export/Import controls
│ ├── T3DTestSuite.tsx # Testing utilities
│ └── DemoContentCreator.tsx
├── stores/ # Zustand stores
│ ├── geometryStore.ts # Meshes and materials
│ ├── sceneStore.ts # Scene hierarchy
│ ├── selectionStore.ts # Selection state
│ └── viewportStore.ts # Camera and viewport
├── types/ # TypeScript definitions
│ ├── geometry.ts # Core 3D types
│ └── t3d.ts # T3D format types
└── utils/ # Utilities
├── geometry.ts # Math and geometry helpers
├── t3dExporter.ts # T3D export functionality
└── t3dImporter.ts # T3D import functionality
-
Install dependencies:
npm install
-
Run development server:
npm run dev
-
Open in browser: Navigate to
http://localhost:3000
- Create Demo Content: Click "Create Demo Scene" to populate the scene
- Switch Modes: Use Tab key to toggle between Object and Edit modes
- Select Elements: Click objects/vertices/edges/faces based on current mode
- Export Scene: Click "Export as .t3d" to save your work
- Import Scene: Click "Import .t3d" to load a saved scene
- Tab: Toggle between Object Mode and Edit Mode
- 1: Switch to Vertex selection (Edit Mode)
- 2: Switch to Edge selection (Edit Mode)
- 3: Switch to Face selection (Edit Mode)
- Alt+A or Esc: Clear all selections
The T3D format is a ZIP archive containing:
scene.json
: Complete scene data in JSON formatassets/
: Folder for textures and other assets (future)
- Versioned: Semantic versioning for compatibility
- Complete: Preserves all scene data including IDs
- Compressed: ZIP compression for smaller files
- Extensible: Designed for future enhancements
See T3D_FORMAT.md for detailed specification.
The project includes comprehensive testing tools:
- T3D Test Suite: Automated round-trip testing for export/import
- Filter Tests: Verify selective export functionality
- Demo Content: Sample scenes for testing
Run tests through the web interface or use the programmatic test suite.
The application follows a reactive architecture pattern:
- Stores: Centralized state management with Zustand
- Components: React components that subscribe to store changes
- Utilities: Pure functions for calculations and data transformations
- Types: Comprehensive TypeScript definitions
- Define Types: Add TypeScript definitions in
src/types/
- Update Stores: Extend Zustand stores with new state and actions
- Create Components: Build React components that consume store data
- Add Utilities: Implement pure functions for complex operations
- Functional Components: Use React function components with hooks
- Immutable Updates: All state changes use Immer for immutability
- TypeScript: Strict typing for all code
- Modular: Clear separation of concerns
Phase 1: Reactive Foundation ✅
- Core stores and data structures implemented
- Basic geometry creation and manipulation
- Selection system with dual modes
- Scene hierarchy management
Phase 2: File System ✅
- T3D format design and implementation
- Export/import functionality
- Data integrity testing
- Browser-based file operations
Phase 3: 3D Rendering (Coming Soon)
- Three.js integration
- Real-time 3D viewport
- Material rendering
- Interactive 3D manipulators
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is in active development. License to be determined.
- 3D viewport with Three.js
- Interactive transformers and gizmos
- Advanced material system
- Animation timeline
- Plugin system
- Multi-user collaboration
- Cloud storage integration