Skip to content

Step into the vault of the Universe Conqueror! A 3D interactive gallery built with React Three Fiber, showcasing Marvel artifacts and featuring a sassy AI Butler, Alfred, powered by WebLLM. Explore, interact, and chat—all in your browser!

License

Notifications You must be signed in to change notification settings

Varun-Patkar/universe-conqueror-ai

Repository files navigation

AI Gallery - Universe Conqueror's Vault

Description

This project presents a 3D interactive gallery showcasing powerful artifacts from the Marvel Universe. The premise places the user in the role of the Universe Conqueror, visiting their private vault to reminisce about the "good old days".

The scene is built using React, Three.js, React Three Fiber, Drei, and Rapier for physics. A key feature is the AI Butler, Alfred, powered locally in the user's browser using WebLLM and the Llama 3.1 8B model. Alfred is designed with a distinct personality, programmed with sass and wit.

This project was developed by the creator primarily as an exercise to showcase 3D and AI integration skills within a short timeframe.

Features

  • 3D Gallery: Explore a detailed vault environment.
  • First-Person Controls: Navigate the vault using standard WASD controls and mouse look.
  • Interactable Artifacts: Look at artifacts like Iron Man's Mk 1 Armor, Captain America's Shield, Mjolnir, and Spider-Man's Mask.
  • AI Butler (Alfred): Press 'P' to chat with Alfred. He's aware of what the user is looking at (sometimes) and will respond with characteristic sass. Powered by WebLLM running locally.
  • Background Music: Toggle ambient music with the 'M' key.

Local Setup

  1. Clone the repository:
    git clone https://github.com/Varun-Patkar/universe-conqueror-ai.git
    cd ai-gallery
  2. Install dependencies:
    npm install
  3. Run the development server:
    npm run dev
  4. Open http://localhost:3000 in your browser.

Note: WebLLM requires downloading the language model (approx. 4GB) the first time the page is loaded. Ensure sufficient disk space and a stable internet connection. Performance depends heavily on the user's hardware (GPU is recommended).

Deployed Version

YouTube Demo

Development Notes

This project was developed casually by the creator over approximately 3 days alongside other activities.

  • AI Assistance: Roughly 50% of the code was generated or assisted by GitHub Copilot.
  • Bug Fixing: Around 20% of the development time was spent debugging issues, often related to AI suggestions or library integrations.
  • Manual Coding: The remaining 30% involved manual coding by the creator, particularly when integrating complex features or when AI suggestions were insufficient.
  • Optimization: Performance optimization was not a primary goal. The project is resource-intensive, especially due to the local LLM and 3D rendering. It serves mainly as a proof-of-concept.

Attributions

  • 3D Model: "Metallic Showroom Gallery" by jimbogies licensed under CC BY 4.0. (Individual artifact licenses are in their respective /public folders).
  • Music: "Calm Gaming Flow" by Fopihe from Pixabay.

About

Step into the vault of the Universe Conqueror! A 3D interactive gallery built with React Three Fiber, showcasing Marvel artifacts and featuring a sassy AI Butler, Alfred, powered by WebLLM. Explore, interact, and chat—all in your browser!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published