diff --git a/README.md b/README.md index 2150f30..1bd1810 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,45 @@ # three.js-tutorial -learning 3d rendering +Learning 3D rendering with interactive wireframe examples + +## Wireframe Tutorials + +This repository contains basic three.js wireframe tutorials demonstrating 3D graphics concepts. + +### 🎯 [View Live Demos](index.html) + +#### 1. HTML5 Canvas Wireframe (`wireframe.html`) +- **Pure JavaScript implementation** - No external dependencies +- **3D Mathematics** - Demonstrates rotation matrices and perspective projection +- **Interactive Animation** - Rotating wireframe cube with vertex visualization +- **Educational Value** - Shows fundamental 3D rendering concepts + +#### 2. Three.js Wireframe (`threejs-wireframe.html`) +- **Three.js Library** - Professional 3D graphics framework +- **Multiple Geometries** - Rotating cube and sphere wireframes +- **WebGL Rendering** - Hardware-accelerated graphics +- **Advanced Features** - Proper camera controls and optimizations + +## Getting Started + +1. Clone the repository +2. Start a local web server: `python3 -m http.server 8000` +3. Open `http://localhost:8000` in your browser +4. Click on any demo to see the wireframe in action + +## What You'll Learn + +- Basic 3D coordinate systems and transformations +- Wireframe rendering techniques +- Animation loops and frame timing +- Camera and perspective projection +- Vertex and edge representation +- Both pure JavaScript and Three.js approaches + +## Files Structure + +``` +├── index.html # Main tutorial landing page +├── wireframe.html # HTML5 Canvas wireframe demo +├── threejs-wireframe.html # Three.js wireframe demo +└── README.md # This documentation +``` diff --git a/index.html b/index.html new file mode 100644 index 0000000..e4a175a --- /dev/null +++ b/index.html @@ -0,0 +1,105 @@ + + + + + + Three.js Tutorial Collection + + + +
+

Three.js Tutorial Collection

+

+ Learning 3D rendering with interactive wireframe examples +

+ +
+
+

HTML5 Canvas Wireframe

+

+ A basic 3D wireframe cube implemented using HTML5 Canvas and pure JavaScript. + This example demonstrates fundamental 3D mathematics including rotation matrices + and perspective projection without external dependencies. +

+ View Demo +
Tech: HTML5 Canvas, JavaScript, 3D Math
+
+ +
+

Three.js Wireframe

+

+ An advanced wireframe example using the Three.js library. Features both a + rotating cube and sphere with proper 3D rendering, camera controls, and + optimized performance using WebGL. +

+ View Demo +
Tech: Three.js, WebGL, ES6 Modules
+
+
+ +
+

More tutorials coming soon...

+
+
+ + \ No newline at end of file diff --git a/threejs-wireframe.html b/threejs-wireframe.html new file mode 100644 index 0000000..44baa7e --- /dev/null +++ b/threejs-wireframe.html @@ -0,0 +1,130 @@ + + + + + + Three.js Wireframe Tutorial + + + +
+

Three.js Wireframe Tutorial

+

Rotating wireframe cube and sphere

+
+ + + + + + + + \ No newline at end of file diff --git a/wireframe.html b/wireframe.html new file mode 100644 index 0000000..0851e5f --- /dev/null +++ b/wireframe.html @@ -0,0 +1,152 @@ + + + + + + Basic 3D Wireframe Tutorial + + + +
+

Basic 3D Wireframe Tutorial

+

Rotating wireframe cube (HTML5 Canvas)

+
+ + + + + + \ No newline at end of file