react-fluid-animation
Version:
Fluid media animation for React powered by WebGL.
52 lines (33 loc) • 2.15 kB
Markdown
# react-fluid-animation ([demo](https://transitive-bullshit.github.io/react-fluid-animation/))
> Fluid media simulation for React powered by WebGL.
[](https://www.npmjs.com/package/react-fluid-animation) [](https://travis-ci.com/transitive-bullshit/react-fluid-animation) [](https://standardjs.com)
[](https://transitive-bullshit.github.io/react-fluid-animation/)
This is a port of the WebGL fluid animation by [Pavel Dobryakov](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation), which itself is a port of [GPU Gems Chapter 38](http://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch38.html). It provides a very fast, stable fluid simulation by iteratively solving the Navier-Stokes equations for incompressible flow.
## Install
```bash
npm install --save react-fluid-animation
```
## Usage
Check out the [demo](https://transitive-bullshit.github.io/react-fluid-animation/).
```jsx
import React, { Component } from 'react'
import FluidAnimation from 'react-fluid-animation'
export default class App extends Component {
render () {
return (
<FluidAnimation
style={{ height: '100vh' }}
/>
)
}
}
```
## Props
TODO
## Credits
- [Pavel Dobryakov](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation) - Original WebGL fluid experiment by Pavel Dobryakov. This project is a direct port and extension of Pavel's excellent work.
- [GPU Gems Chapter 38](http://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch38.html) - Fast fluid dynamics simulation on the GPU.
- [jwagner](https://github.com/jwagner/fluidwebgl) - Similar WebGL implementation.
- [haxiomic](https://github.com/haxiomic/GPU-Fluid-Experiments) - Alternative WebGL fluid experiment.
## License
MIT © [Travis Fischer](https://github.com/transitive-bullshit)