mzebley / dynamowaves

SVG wave HTML templates that shuffle themselves on render.
https://dynamowaves.markzebley.com
MIT License
39 stars 2 forks source link

Static waves #1

Open delphinas opened 1 year ago

delphinas commented 1 year ago

Hi. Cool project, works well and as intended. I was wondering - is it possible to just keep them static, without regenerating a new wave each time ? Thanks.

mzebley commented 1 year ago

Thank you! Do you mean "keeping them static" in the sense that each time you invoke a Dynamowave, you could set it to always render the same wave shape - regardless of how many times the page is refreshed?

delphinas commented 1 year ago

Hi, yes, exactly. It would be a cool feature, especially if one could select which one would be static and which ones dynamic!

mzebley commented 1 year ago

What would you find more useful?

  1. Setting a data attribute like "data-wave-static=true" and then it knows to only ever render the first wave from the curated list, or
  2. Specifying a number in a data attribute like "data-wave-static=3" and then it knows to always render the 3rd item in the curated list?

The only downside I can think of to option 2 is how to keep track of how many wave options there are to select from and having to add in error catching for numbers greater than the amount of options.