This project is a simple guide to help you set up a WebAR experience using Google's Model Viewer. It includes step-by-step instructions to host your 3D models (GLB for Android and USDZ for iOS) on GitHub Pages.
You can [Test this app here]: (https://gunteralce.github.io/webar-tutorial/)
- Cross-platform AR: Supports Android (GLB) and iOS (USDZ) 3D models.
- GitHub Pages Deployment: Easily host your WebAR experience online.
- Customizable Design: Modify the
index.html
andstyle.css
files to personalize your page.
Before starting, make sure you have:
- A GitHub account. If you don't have one, sign up here.
- A 3D model:
- GLB format (for Android devices).
- USDZ format (for iOS devices).
Download free models from Poly Pizza, Sketchfab, or create your own.
Click the "Fork" button in the top-right corner to create a copy of this repository in your GitHub account.
Clone the forked repository to your local machine:
git clone https://github.com/<your-username>/webar-tutorial.git
cd webar-tutorial
### 3. Add Your 3D Models
Upload your GLB and USDZ files into the repository. Replace the file paths in the index.html file with your model's filenames:
```bash
src="https://raw.githubusercontent.com/<your-username>/webar-tutorial/main/your-model.glb"
ios-src="https://raw.githubusercontent.com/<your-username>/webar-tutorial/main/your-model.usdz"
- Go to Settings in your repository.
- Scroll down to GitHub Pages.
- Under Branch, select main and click Save.
- Your WebAR page will be published at:
https://<your-username>.github.io/webar-tutorial/.
- Open the URL on an AR-compatible device.
- Tap the AR button to view your model in augmented reality.
- Edit Layout: Modify style.css for a custom design.
- Change AR Behavior: Update the tag in index.html.