Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vhiribarren/fluid-effects-js

Toy project to test some fluid effect algorithms
https://github.com/vhiribarren/fluid-effects-js

fluid fluid-simulation javascript shaders three-js

Last synced: 5 days ago
JSON representation

Toy project to test some fluid effect algorithms

Awesome Lists containing this project

README

        

# Fluid effects in JavaScript

Toy project to test some fluid effect algorithms using shaders.

Technology currently used:

- Vanilla JavaScript and HTML without transpilation and bundling
- Three.js to ease WebGL setup
- Tweakpane for parameter control

## Resources

### Reference articles and papers on fluid simulation

- [Mark J. Harris, in GPU Gems Chapter 38, NVidia publication](https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-38-fast-fluid-dynamics-simulation-gpu)
- [Jos Stam, "Stable Fluids", In SIGGRAPH 99 Conference Proceedings, Annual Conference Series, August 1999, 121-128.](https://www.dgp.toronto.edu/people/stam/reality/Research/pdf/ns.pdf)
- [Jos Stam, "Real-Time Fluid Dynamics for Games". Proceedings of the Game Developer Conference, March 2003.](https://www.dgp.toronto.edu/public_user/stam/reality/Research/pdf/GDC03.pdf)
- [Other publications from Jos Stem](https://www.dgp.toronto.edu/public_user/stam/reality/Research/pub.html)

### Tutorials or simple examples

- [Omar Shehata, "How to Write a Smoke Shader"](https://code.tutsplus.com/how-to-write-a-smoke-shader--cms-25587t)
- [Shahriar Shahrabi, "Gentle Introduction to Realtime Fluid Simulation for Programmers and Technical Artists"](https://shahriyarshahrabi.medium.com/gentle-introduction-to-fluid-simulation-for-programmers-and-technical-artists-7c0045c40bac)

### Some existing implementations

- https://github.com/PavelDoGreat/WebGL-Fluid-Simulation
- https://github.com/haxiomic/GPU-Fluid-Experiments
- https://github.com/mharrys/fluids-2d
- https://github.com/rachelbhadra/smoke_simulator

### Other resources

- Inigo Quilez, "A Simple formula to create beautiful color palettes",
[Video](https://www.youtube.com/shorts/TH3OTy5fTog) &
[Article](https://iquilezles.org/articles/palettes/)

## License

```
MIT License

Copyright (c) 2024 Vincent Hiribarren

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```