Okazari / Rythm.js

A javascript library that makes your page dance.
https://okazari.github.io/Rythm.js/
GNU General Public License v3.0
3.93k stars 252 forks source link

✨ Add text-neon dance #107

Open maici opened 5 years ago

maici commented 5 years ago

Add neon-text dance, based on the css property text-shadow

rythm.addRythm('neon-text','textNeon', 0, 50, {
        min: 0,
        max: 30,
        neons: [
            {strength: 10, color: 'white'},
            {strength: 20, color: 'white'},
            {strength: 30, color: 'red'},
            {strength: 40, color: 'crimson'},
            {strength: 50, color: 'firebrick'},
    ]})

it will generate this style

text-shadow: 0 0 10px color: white, 0 0 20px color: white, 0 0 30px color: red, 0 0 40px color: crimson, 0 0 50px color: firebrick; 

A demo here https://2360n746pr.codesandbox.io/

Okazari commented 5 years ago

The nice demo isn't working anymore :cry: