···11+Copyright 2024 flo-bit
22+33+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:
44+55+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
66+77+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.
···11+# Text effect: Fluid Simulation demo
22+33+[Live demo](https://flo-bit.github.io/text_effect_fluid/) (currently sometimes breaks on first open, just reload once or twice)
44+55+[](https://flo-bit.github.io/text_effect_fluid/)
66+77+Inspired by the current (Jan 2024) version of [the lumalabs homepage](https://lumalabs.ai/) (obviously, their effect looks *way* better, than my quick and dirty version):
88+99+
1010+1111+Adjusted version of this awesome [WebGL Fluid Simulation](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation).
1212+1313+## How it works
1414+1515+I wrote a short [blog post](https://flobit.substack.com/p/how-i-recreated-this-awesome-text) about my approach.
1616+1717+## Usage
1818+1919+- Add `script.js` and `LDR_LLL1_0.png` to your project
2020+2121+- Add this to your html
2222+2323+```html
2424+<div id="canvasContainer">
2525+ <canvas></canvas>
2626+ <canvas id="maskCanvas"> </canvas>
2727+</div>
2828+2929+<script src="./script.js"></script>
3030+```
3131+3232+- Add this styling
3333+3434+```css
3535+html,
3636+body {
3737+ overflow: hidden;
3838+ background-color: #000;
3939+}
4040+4141+body {
4242+ margin: 0;
4343+}
4444+4545+#canvasContainer {
4646+ position: relative;
4747+ width: 100vw;
4848+ height: 100vh;
4949+}
5050+5151+canvas {
5252+ width: 100%;
5353+ height: 100%;
5454+ position: absolute;
5555+}
5656+```
5757+5858+5959+## License
6060+6161+MIT License
6262+6363+```
6464+Copyright 2024 flo-bit
6565+6666+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:
6767+6868+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6969+7070+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.
7171+```