A 3D VR web experience of a Walmart store built with React, Three.js (via @react-three/fiber), and physics powered by Cannon.js.
- Minecraft-inspired voxel visual style
- First-person controls (WASD + mouse)
- Interactive product displays
- Product filtering and search
- Popup modals with product details
- Shopping cart functionality
- Voice assistant (mock)
- Ambient lighting and background music
-
Install dependencies:
npm install
-
Create required assets directories:
mkdir -p public/assets/images public/assets/audio
-
Add placeholder audio: You'll need to add an ambient music file at
public/assets/audio/ambient.mp3. If you don't have one, you can download royalty-free music or the app will continue to work without music. -
Add placeholder images: Product images should be placed in
public/assets/images/(e.g., tv.png, apples.png, tshirt.png, etc.) -
Run the development server:
npm run dev
or
npm start
- WASD or Arrow Keys: Move
- Mouse: Look around
- Click: Select products
- Space: Jump
src/components/Scene.jsx: Main Three.js scene setupsrc/components/Player.jsx: First-person controllersrc/components/StoreLayout.jsx: Store environmentsrc/components/ProductsDisplay.jsx: Interactive product itemssrc/components/UI.jsx: Overlay UI componentssrc/store.js: Global state management with Zustandpublic/products.json: Mock product data
- React
- Three.js (@react-three/fiber)
- Cannon.js (@react-three/cannon)
- GSAP for animations
- Zustand for state management