Skip to content

genialtechie/web-hoop

Repository files navigation

3D Basketball Swipe Game

A lightweight 3D basketball game where players swipe up on a basketball to shoot it into a hoop, built with Three.js.

Game Overview

This game simulates a simple basketball shooting experience. Players interact with a 3D basketball by swiping upward on their device to shoot the ball toward a hoop. The game uses realistic physics to simulate the ball's trajectory, bouncing, and interaction with the hoop and backboard.

Core Features

  • 3D rendering with Three.js
  • Realistic ball physics using Ammo.js (Bullet physics)
  • Swipe-to-shoot mechanics for mobile and desktop
  • Score tracking
  • Responsive design that works across devices

Technical Stack

  • Frontend: HTML5, CSS3, JavaScript
  • 3D Rendering: Three.js
  • Physics Engine: Ammo.js
  • Build Tools: Webpack/Vite

Getting Started

Prerequisites

  • Node.js (v14+)
  • npm or yarn

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/basketball-swipe-game.git
    cd basketball-swipe-game
    
  2. Install dependencies

    npm install
    
  3. Run development server

    npm run dev
    
  4. Build for production

    npm run build
    

Project Structure

├── src/ │ ├── index.html │ ├── js/ │ │ ├── main.js │ │ ├── game/ │ │ │ ├── Game.js │ │ │ ├── Ball.js │ │ │ ├── Hoop.js │ │ │ ├── Physics.js │ │ │ └── Controls.js │ │ └── utils/ │ │ └── helpers.js │ ├── assets/ │ │ ├── models/ │ │ ├── textures/ │ │ └── sounds/ │ └── style.css ├── public/ ├── package.json ├── docs/ │ ├── README.md │ ├── CONTRIBUTING.md │ ├── ARCHITECTURE.md │ └── MECHANICS.md └── .gitignore

About

A basketball swipe browser game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages