flo-bit / text_effect_fluid

cool text fluid effect for your website

Home Page:https://flo-bit.github.io/text_effect_fluid/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text effect: Fluid Simulation demo

Live demo (currently sometimes breaks on first open, just reload once or twice)

cover

Inspired by the current (Jan 2024) version of the lumalabs homepage (obviously, their effect looks way better, than my quick and dirty version):

lumalabs

Adjusted version of this awesome WebGL Fluid Simulation.

How it works

I wrote a short blog post about my approach.

Usage

  • Add script.js and LDR_LLL1_0.png to your project

  • Add this to your html

<div id="canvasContainer">
    <canvas></canvas>
    <canvas id="maskCanvas"> </canvas>
</div>

<script src="./script.js"></script>
  • Add this styling
html,
body {
    overflow: hidden;
    background-color: #000;
}

body {
    margin: 0;
}

#canvasContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
}

canvas {
    width: 100%;
    height: 100%;
    position: absolute;
}

License

MIT License

Copyright 2024 flo-bit

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.

About

cool text fluid effect for your website

https://flo-bit.github.io/text_effect_fluid/

License:MIT License


Languages

Language:JavaScript 98.1%Language:HTML 1.9%