Skip to content

Latest commit

 

History

History
427 lines (351 loc) · 9.86 KB

File metadata and controls

427 lines (351 loc) · 9.86 KB

🏗️ React Three Fiber Tutorial Series - Repository Structure

📁 Complete Repository Structure

react-three-fiber-tutorials/
├── README.md                          # Main repository README
├── PROJECT_SUMMARY.md                 # Summary of all projects
├── REPOSITORY_DESCRIPTION.md         # Repository metadata
├── .gitignore                         # Git ignore file
│
├── Course-0-Foundation-Setup/
│   ├── README.md                      # Course overview and theory
│   ├── examples/
│   │   ├── example-1-hello-3d/
│   │   │   ├── src/
│   │   │   │   ├── App.jsx
│   │   │   │   ├── App.css
│   │   │   │   └── main.jsx
│   │   │   ├── public/
│   │   │   ├── package.json
│   │   │   └── README.md
│   │   ├── example-2-camera-controls/
│   │   ├── example-3-lighting/
│   │   ├── example-4-materials/
│   │   └── example-5-geometries/
│   └── project/
│       └── 3d-scene-viewer/
│           ├── src/
│           ├── public/
│           ├── package.json
│           └── README.md
│
├── Course-1-Core-Concepts/
│   ├── README.md
│   ├── examples/
│   │   ├── example-1-primitives/
│   │   ├── example-2-transforms/
│   │   ├── example-3-groups/
│   │   ├── example-4-interactions/
│   │   ├── example-5-animation/
│   │   └── example-6-refs/
│   └── project/
│       ├── interactive-3d-gallery/
│       └── 3d-product-showcase/
│
├── Course-2-Advanced-Geometry-Materials/
│   ├── README.md
│   ├── examples/
│   │   ├── example-1-custom-geometry/
│   │   ├── example-2-load-models/
│   │   ├── example-3-textures/
│   │   ├── example-4-pbr-materials/
│   │   ├── example-5-shaders/
│   │   └── example-6-environment/
│   └── project/
│       ├── 3d-model-viewer/
│       └── material-showcase/
│
├── Course-3-Lighting-PostProcessing/
│   ├── README.md
│   ├── examples/
│   │   ├── example-1-shadows/
│   │   ├── example-2-multiple-lights/
│   │   ├── example-3-post-processing/
│   │   ├── example-4-bloom-effect/
│   │   ├── example-5-ssao/
│   │   └── example-6-performance/
│   └── project/
│       ├── lighting-studio/
│       └── post-processing-demo/
│
├── Course-4-Animation-Physics/
│   ├── README.md
│   ├── examples/
│   │   ├── example-1-react-spring/
│   │   ├── example-2-physics-basics/
│   │   ├── example-3-collisions/
│   │   ├── example-4-rigid-bodies/
│   │   ├── example-5-particles/
│   │   └── example-6-timeline/
│   └── project/
│       ├── physics-playground/
│       └── animated-3d-scene/
│
├── Course-5-Performance-Optimization/
│   ├── README.md
│   ├── examples/
│   │   ├── example-1-performance-monitor/
│   │   ├── example-2-lod/
│   │   ├── example-3-instancing/
│   │   ├── example-4-geometry-optimization/
│   │   ├── example-5-texture-optimization/
│   │   └── example-6-lazy-loading/
│   └── project/
│       ├── optimized-3d-city/
│       └── performance-benchmark/
│
└── Course-6-Advanced-Techniques-Production/
    ├── README.md
    ├── examples/
    │   ├── example-1-custom-hooks/
    │   ├── example-2-state-management/
    │   ├── example-3-webxr/
    │   ├── example-4-multiplayer/
    │   ├── example-5-testing/
    │   └── example-6-deployment/
    └── project/
        ├── 3d-portfolio-website/
        └── interactive-3d-experience/

📝 File Templates

Main README.md Template

# 🎨 React Three Fiber Tutorial Series

A complete hands-on React Three Fiber (R3F) learning roadmap from fundamentals to advanced 3D web development.

## 🎯 Learning Goals

[Course goals and outcomes]

## 📚 Course Overview

[Table of courses with status, focus, duration, projects]

## 🛠️ Prerequisites

[Required knowledge and tools]

## 🗺️ Learning Path

[Phase breakdown]

## 🚀 Quick Start

[Setup instructions]

## 📖 Course Structure

[Structure explanation]

## 🤝 Contributing

[Contributing guidelines]

## 📄 License

MIT License

Course README.md Template

# Course X: [Course Name]

## Overview

[Course description]

## Learning Objectives

- [Objective 1]
- [Objective 2]
- [Objective 3]

## Topics Covered

1. [Topic 1]
2. [Topic 2]
3. [Topic 3]

## Examples

### Example 1: [Name]
[Description and key concepts]

### Example 2: [Name]
[Description and key concepts]

## Projects

### Project 1: [Name]
[Project description, features, learning outcomes]

## Exercises

1. [Exercise 1]
2. [Exercise 2]

## Next Steps

[What comes next]

---

_Last updated: [Date]_

Example Project Structure

example-name/
├── src/
│   ├── App.jsx              # Main component
│   ├── App.css              # Styles
│   ├── components/         # Additional components (if needed)
│   ├── hooks/              # Custom hooks (if needed)
│   └── main.jsx            # Entry point
├── public/
│   └── index.html
├── package.json
└── README.md

package.json Template

{
  "name": "example-name",
  "version": "0.1.0",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "three": "^0.158.0",
    "@react-three/fiber": "^8.15.0",
    "@react-three/drei": "^9.88.0"
  },
  "devDependencies": {
    "@types/react": "^18.2.0",
    "@types/react-dom": "^18.2.0",
    "@vitejs/plugin-react": "^4.2.0",
    "vite": "^5.0.0"
  }
}

🎯 Implementation Checklist

Repository Setup

  • Create GitHub repository
  • Initialize with README
  • Add .gitignore
  • Set up repository description
  • Add topics/tags

Course 0: Foundation

  • Create course folder structure
  • Write course README
  • Create 5 examples with code
  • Create 1 project with code
  • Test all examples

Course 1: Core Concepts

  • Create course folder structure
  • Write course README
  • Create 6 examples with code
  • Create 2 projects with code
  • Test all examples

Course 2: Advanced Geometry

  • Create course folder structure
  • Write course README
  • Create 6 examples with code
  • Create 2 projects with code
  • Test all examples

Course 3: Lighting & Post-Processing

  • Create course folder structure
  • Write course README
  • Create 6 examples with code
  • Create 2 projects with code
  • Test all examples

Course 4: Animation & Physics

  • Create course folder structure
  • Write course README
  • Create 6 examples with code
  • Create 2 projects with code
  • Test all examples

Course 5: Performance

  • Create course folder structure
  • Write course README
  • Create 6 examples with code
  • Create 2 projects with code
  • Test all examples

Course 6: Advanced & Production

  • Create course folder structure
  • Write course README
  • Create 6 examples with code
  • Create 2 projects with code
  • Test all examples

Documentation

  • Write main README
  • Create PROJECT_SUMMARY.md
  • Create REPOSITORY_DESCRIPTION.md
  • Add learning checklist
  • Add resources section

📦 Dependencies by Course

Course 0-1: Basic Setup

{
  "three": "^0.158.0",
  "@react-three/fiber": "^8.15.0",
  "@react-three/drei": "^9.88.0"
}

Course 2: Models & Textures

{
  // Add to above
  "gltf-pipeline": "^2.1.0"  // For model optimization
}

Course 3: Post-Processing

{
  // Add to above
  "postprocessing": "^6.36.0"
}

Course 4: Animation & Physics

{
  // Add to above
  "@react-spring/three": "^9.7.0",
  "@react-three/rapier": "^1.2.0"
}

Course 5: Performance

{
  // Add to above
  "stats.js": "^0.17.0"  // For performance monitoring
}

Course 6: Advanced

{
  // Add to above
  "zustand": "^4.4.0",
  "leva": "^0.9.0"  // For GUI controls
}

🚀 Quick Start Commands

Create New Example

npm create vite@latest example-name -- --template react
cd example-name
npm install three @react-three/fiber @react-three/drei
npm run dev

Create New Project

npm create vite@latest project-name -- --template react
cd project-name
npm install three @react-three/fiber @react-three/drei
# Add additional dependencies as needed
npm run dev

📊 Statistics

  • Total Courses: 7
  • Total Examples: ~36
  • Total Projects: ~12
  • Estimated Code Files: 150+
  • Estimated Duration: 16-22 weeks

🎨 Asset Requirements

3D Models Needed

  • Basic shapes (cube, sphere, etc.) - can be generated
  • GLTF models for examples:
    • Simple character/model
    • Product model
    • Environment scene
    • Complex scene for optimization

Textures Needed

  • Diffuse maps
  • Normal maps
  • Roughness maps
  • Metalness maps
  • HDRI environment maps

Sources

  • Free models: Sketchfab, Poly Haven
  • Free textures: Poly Haven, Texture Haven
  • Create simple models in Blender

📝 Notes

  • All examples should be self-contained
  • Each example should have a README explaining concepts
  • Projects should be production-ready examples
  • Code should be well-commented
  • Follow React and R3F best practices

This structure will be implemented when creating the repository.
Last updated: January 2025