GithubHelp home page GithubHelp logo

blend-fire's Introduction

CSS Fire Animation

Incredibly simple CSS animation, producing a very convincing fire effect.

Screenshot

Live demo

https://helderman.github.io/blend-fire/html5/index.html

Browser support

Works on recent versions of Google Chrome, Firefox, Microsoft Edge, Opera, Samsung Internet.

Works on Safari, but frame rate is low. Needs investigation; possibly Safari is throttling 'unimportant' animations in an attempt to balance the CPU load, as suggested here. For now, I'd recommend Apple users to use Firefox instead; the animation is a lot smoother there.

Does not work on Internet Explorer.

How it works

Two 'solid noise' images are continuously sliding along each other, blended together with 'difference' blend mode. A gradient is blended in to make the flames 'die out' as they rise. Additional filters are giving it the right contrast and color.

Video

https://www.youtube.com/watch?v=w3lhF7yMVfM

Credits

This is a fork of an earlier repo of mine, blend-smoke.

Image produced using GIMP. Thanks to Ken Perlin for the noise algorithm. This animation shows once more how versatile his noise is in modelling natural phenomena.

Thanks to Shadertoy for giving me the platform to experiment with noise algorithms. It is here that I first discovered that the sum (or difference) of two noise functions makes a great fire. Here's a demo I made:

https://www.shadertoy.com/view/fdtczl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.