Skip to content

This project demonstrates a fake hacking program with a 3D model viewer built using Three.js, GLTFLoader, and OrbitControls. It loads and displays a 3D model, allowing the user to rotate it and interact with it through basic controls.

Notifications You must be signed in to change notification settings

ManthanThakor/FakeHackingProgram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fake Hacking Program - 3D Model Viewer

This project demonstrates a fake hacking program with a 3D model viewer built using Three.js, GLTFLoader, and OrbitControls. It loads and displays a 3D model, allowing the user to rotate it and interact with it through basic controls.

Features

  • 3D Model Viewer: A 3D model is loaded from a GLTF file and displayed on the screen.
  • Camera Controls: Allows the user to control the view with mouse interactions (zoom, pan, rotate).
  • Loading Indicator: Displays a loading message while the model is being loaded.
  • Responsive Design: Automatically adjusts the canvas size when the window is resized.

Getting Started

To get the project up and running locally, follow these steps:

Prerequisites

Ensure that you have the following installed on your machine:

  • A modern web browser (such as Google Chrome, Mozilla Firefox, or Safari).
  • A local server for serving static files (optional, but recommended for better performance).

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/manthanthakor/FakeHackingProgram.git
  2. Navigate into the project folder:

    cd FakeHackingProgram
  3. Open the index.html file in your browser, or use a local server to serve the files.

Files and Structure

  • index.html: The main HTML file that includes the 3D model container.
  • script.js: The main JavaScript file where Three.js, OrbitControls, and GLTFLoader are used to display the 3D model and handle user interactions.
  • models/scene.gltf: The 3D model file in GLTF format.
  • textures/: Folder containing the textures used in the 3D model (if applicable).
  • style.css: Basic styling for the webpage and loading indicator.

How it Works

  1. Scene Setup: A Three.js scene is created along with a camera and renderer.
  2. Lighting: Two light sources are added: a directional light to simulate sunlight and an ambient light for softer shadows.
  3. Model Loading: The 3D model (scene.gltf) is loaded using the GLTFLoader and added to the scene. A loading message is shown while the model is being fetched.
  4. Camera Controls: OrbitControls is used to allow the user to interact with the scene by rotating, zooming, and panning the camera.
  5. Animation Loop: The 3D model rotates continuously on the Y-axis to give it some motion. The scene is re-rendered at each frame to reflect changes.

Known Issues

  • Ensure that the model path (models/scene.gltf) is correct and the model is in the right directory.
  • The loading text may not disappear if the model fails to load. Check the console for errors.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

About

This project demonstrates a fake hacking program with a 3D model viewer built using Three.js, GLTFLoader, and OrbitControls. It loads and displays a 3D model, allowing the user to rotate it and interact with it through basic controls.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published