Skip to content

needle-engine/ar-restaurant-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍽️ AR Restaurant Example

A modern restaurant website showcasing dishes in 3D and Augmented Reality using Needle Engine and SvelteKit.

🚀 Live Demo

Try it now: https://ar-restaurant-example-zubcks1t14le.needle.run/

🌟 Features

  • Interactive 3D Menu: View dishes in stunning 3D before ordering
  • AR Experience: Experience dishes in augmented reality on supported devices
  • QR Code Sharing: Share menu items via QR codes for mobile AR viewing
  • Responsive Design: Works seamlessly across desktop and mobile devices

🏗️ Project Structure

ar-restaurant-example/
├── Website/                      # SvelteKit web application
│   ├── src/routes/              # App pages
│   ├── static/
│   │   ├── assets/             # 3D models (.glb files)
│   │   ├── data/dishes.json    # Dish data
│   │   └── images/             # Preview images
│   └── package.json
├── Unity Project/ # Unity project with Needle Engine
└── README.md

🚀 Quick Start

  1. Open the Unity project in Unity Project/ and click Play
  2. Your local browser starts and you're already setup for adding new dishes

Manual flow

# Clone and install
git clone https://github.com/your-username/ar-restaurant-example.git
cd ar-restaurant-example/Website
npm install

# Run development server
npm run dev

Open http://localhost:5173 in your browser (or use the ip address to be able to open the local website on your phone).

🎨 Adding New Dishes

1. Unity Setup

  1. Open the Unity project in Unity Project/
  2. Add a new Dish Prefab to the scene and give it a unique name
  3. Add your model inside the Dish Prefab instance
  4. Needle Engine automatically exports individual GLTF files when you click Play or save the scene

2. Update Dish Data

Edit Website/static/data/dishes.json:

{
  "yourDishSlug": {
    "name": "Amazing New Dish",
    "price": "$24.99",
    "description": "Delicious description here.",
    "ingredients": ["Ingredient 1", "Ingredient 2"],
    "image": "dish-preview.svg",
    "model": "assets/yourDishSlug.glb",
    "slug": "yourDishSlug"
  }
}

3. Add Preview Image

Save dish preview image to Website/static/images/

That's it! The website automatically loads new dishes from the JSON data.

📱 AR Functionality

The app automatically detects device capabilities:

  • AR Supported: Shows "🥽 Open in AR" button
  • Non-AR Devices: Shows "📱 Open on Phone" with QR code

🌐 Deployment

Push to main branch for automatic deployment via GitHub Actions to Needle Cloud.

🛠️ Key Technologies


Made by 🌵 Needle

Contact ✒️

🌵 Needle@NeedleTools