Skip to content

AradhyaDixit18/WebglFluid_Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebGL Fluid Simulation

This project implements a WebGL fluid simulation using a variety of modern web technologies, including React, Three.js, and various supporting libraries. The goal is to create an interactive and visually appealing fluid simulation that can run efficiently in a web browser.

Table of Contents

Installation

To get started with the project, you need to have Node.js and npm installed. Then, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/webgl-fluid-simulation.git
    cd webgl-fluid-simulation
  2. Install the dependencies:

    npm install

Usage

To run the project locally, use the following command:

npm start

This will start the development server and open the application in your default web browser. The application will automatically reload if you make changes to the code.

Project Structure

The project structure is organized as follows:

webgl-fluid-simulation/
├── public/
│   ├── index.html
│   └── ...
├── src/
│   ├── components/
│   │   ├── FluidCanvas.js
│   │   └── ...
│   ├── App.js
│   ├── index.js
│   └── ...
├── .gitignore
├── package.json
├── README.md
└── ...
  • public/: Contains the public assets and the main HTML file.
  • src/: Contains the source code of the application.
    • components/: Contains the React components used in the application.
    • App.js: The main application component.
    • index.js: The entry point of the application.

Technologies Used

This project uses the following technologies:

  • React: A JavaScript library for building user interfaces.
  • Three.js: A 3D library that makes WebGL simpler.
  • @react-three/fiber: A React renderer for Three.js.
  • fluid-canvas: A library for creating fluid simulations on a canvas.
  • fluid-simulation-react: A React component for fluid simulation.
  • webgl-fluid: A WebGL-based fluid simulation library.
  • @babel/runtime: Babel's modular runtime helpers.
  • @emotion/react and @emotion/styled: Libraries for writing CSS styles with JavaScript.
  • @mui/material: Material-UI, a popular React UI framework.
  • typescript: A typed superset of JavaScript that compiles to plain JavaScript.

Features

  • Interactive Fluid Simulation: Users can interact with the fluid simulation using mouse or touch inputs.
  • Real-time Rendering: The simulation runs in real-time, providing a smooth and responsive experience.
  • Modern UI: Built with React and Material-UI for a modern and responsive interface.

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

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


Thank you for checking out the WebGL Fluid Simulation project! If you have any questions or feedback, feel free to reach out.