From cd7fbd8dccfcd72231166a4a30980351b2e5395b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 17:06:17 +0000 Subject: [PATCH 1/2] Initial plan From b2b4d592540111e493bfb5d960b5cf6497781aba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 17:12:04 +0000 Subject: [PATCH 2/2] Add basic three.js wireframe tutorials with HTML5 Canvas and Three.js implementations Co-authored-by: griffinhampton <194532452+griffinhampton@users.noreply.github.com> --- README.md | 45 +++++++++++- index.html | 105 ++++++++++++++++++++++++++++ threejs-wireframe.html | 130 +++++++++++++++++++++++++++++++++++ wireframe.html | 152 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 index.html create mode 100644 threejs-wireframe.html create mode 100644 wireframe.html 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 @@ + + +
+ + ++ Learning 3D rendering with interactive wireframe examples +
+ ++ 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 ++ 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 +More tutorials coming soon...
+Rotating wireframe cube and sphere
+Rotating wireframe cube (HTML5 Canvas)
+