GitHunt
HA

harshsankhla18/Meal-Globe-Website

🌍 Meal Globe Website

A captivating interactive experience to explore global cuisines! Users can spin through a 3D globe of meal dishes and click on any to view full recipes fetched from TheMealDB API. Built with React, WebGL (WebGL2 + gl-matrix), and CSS animations.


image

πŸš€ Live Demo

Check it out here: https://meal-globe-website.netlify.app/


Created using React JS


πŸ”§ Features

  • 3D rotating globe of dishes with smooth mouse drag rotation using a custom Arcball control in WebGL2.
  • Dynamic fetching of recipe listings by cuisine (e.g., β€œIndian”, β€œAmerican”)
  • Click a dish to seamlessly fetch & display full recipe details β€” including ingredients, instructions, and images
  • Clean, responsive UI to present the globe, spinner, recipe card, and cuisine-selection navbar.

πŸ› οΈ Tech Stack

  • πŸ”Ή React (Functional Components, Hooks)
  • πŸ”Ή WebGL2 + GLSL + gl-matrix β€” for 3D instanced graphics
  • πŸ”Ή Axios β€” for API calls
  • πŸ”Ή CSS β€” for layout, responsive design, and visual effects

βš™οΈ Installation

  1. Clone the repo
    git clone https://github.com/harshsankhla18/Meal-Globe-Website.git
    cd Meal-Globe-Website
  2. Install dependencies
    npm install
    
  3. Start Development server*
    npm start
    
  4. Open your browser and visit http://localhost:3000

🧩 Project Structure

src/
β”œβ”€β”€ Components/
β”‚ └── InfiniteMenu/ # Main spinning globe + recipe modal
β”œβ”€β”€ Navbar/ # Cuisine selector component
β”œβ”€β”€ App.jsx # Main application entry & state handling
└── index.js # React DOM bootstrap

public/
└── index.html

πŸ‘‰ Usage

  1. Select a cuisine from the navbar (e.g., "Indian").

  2. The globe populates with dishes from that cuisine.

  3. Drag or rotate your mouse to spin and inspect.

  4. Hover shows the dish title; click the πŸ” icon to reveal the recipe.

  5. The recipe card displays instructions, ingredients, and more.

  6. Click the X in the card to close it and return to the globe.

πŸ—οΈ Custom Implementation Highlights

  1. InfiniteGridMenu handles instanced WebGL rendering of circular disks (disc geometry).

  2. Arcball rotating via pointer events, with inertia and snapping to highlight dishes.

  3. Texture atlas creation using an offscreen canvas to pack dish images efficiently.

  4. React state controls selected dish and fetches recipe details with Axios.

  5. Pure CSS modals for recipe overlay, hover animations, and responsive UI.

Made with ❀️ by Harsh Sankhla
BTech @ IIIT Bhagalpur

harshsankhla18/Meal-Globe-Website | GitHunt