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

added a new dance type with border radius #55

Closed ajaymathur closed 7 years ago

ajaymathur commented 7 years ago

refers feature https://github.com/Okazari/Rythm.js/issues/40

ajaymathur commented 7 years ago

thanks for reviewing :) I think reverse option is not needed for border-radius, as border radius cannot be in other direction (less than 0)

Please suggest if my understanding is wrong. :)

Okazari commented 7 years ago

I was thinking about going from max to min instead of min to max ;)

ajaymathur commented 7 years ago

cool, I will make the change. :)

ajaymathur commented 7 years ago

Hope I have go it correct :)

Okazari commented 7 years ago

You code do exactly what it should ;) ! But in, a worry of having a unified code base, could you use the same trick as the shake dance ? it would be perfect ! Thanks for you work :)

if( option.reverse ) {
  max = -max
  min = -min
}
ajaymathur commented 7 years ago

This technique is not applicable for border-radius, as we use (max - min) * value to calculate border radius with pulse.

Always max will be > min. Therefore if we do max = -max and min = -min then (max - min) * value will be negative and negative border-radius is not valid.

Thanks :)