Back to Blog










Hamburger
December 2023
•
Harshit Raj
3DThree.jsWebGLInteractiveVisualizationJavaScriptFrontend

3D Hamburger
An interactive 3D hamburger viewer built with Three.js and Vite. This project displays a 3D hamburger model that rotates dynamically as you move your mouse across the screen, along with a custom animated cursor.
Features
- 3D hamburger model visualization using Three.js
- Interactive model rotation that follows mouse movement
- Custom animated cursor with hover effects
- Responsive design that works across different screen sizes
- Built with Vite for fast development and optimized production builds
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
Installation
-
Clone this repository:
cd hamburger
-
Install the dependencies:
npm install # or yarn
-
Start the development server:
npm run dev # or yarn dev
-
Open your browser and navigate to
http://localhost:5173
Building for Production
To create a production-ready build:
npm run build
# or
yarn build
The build files will be in the dist
directory.
Project Structure
├── public/ # Static assets
│ ├── scene.glb # 3D model (glb format)
│ ├── scene.gltf # 3D model (gltf format)
│ └── vite.svg # Vite logo
├── index.html # Main HTML file
├── main.js # Main JavaScript entry point
├── counter.js # Counter component
├── style.css # CSS styles
├── package.json # Project dependencies
└── README.md # This file
Technology Stack
- Three.js - 3D graphics library
- Vite - Build tool and development server
- GLTFLoader - For loading 3D models
Controls
- Mouse movement: Rotates the hamburger model
- Cursor: Features custom animation on hover and click
Credits
- 3D Hamburger Model: "Cute Hamburger - Free 3D Model"
License
Check the license information in the included cute_hamburger_-_free_3d_model/license.txt
file for details about the 3D model usage rights.
Author
Your Name
Made with ❤️ and JavaScript
More Stories
April
Anton
Gen Ai+3
April
BeatsNotFound
Node.js+2
April
The Tea Project
Tea Tourism+7
March
Nightcrawler
Web Crawler+6
January
Freelynce
Next.js+3
December
No captcha
Web Security+3

August
MetaFrazo Landing Page
Landing Page+4
May
Project-Redbull
Three.js+8
May
SeoVew
SEO+6
February
EDI Dashobard
React.js+2
Discover more content