Unreal-Dan / lightshow.lol

A demo site to show off Vortex Engine
GNU General Public License v3.0
2 stars 0 forks source link

Weird pattern randomization behavior #10

Open LivingSynthesis opened 3 months ago

LivingSynthesis commented 3 months ago

When randomizing from any pattern in the "Strobe Pattern", "Blend Pattern", or "Solid Pattern" list, the result is always either "Strobe" or "Blend" although the parameters appear properly random.

Whenever randomizing from any pattern in the "Multiled Pattern" list, the results always fall into a repeating cycle of "Fill", "Lighthouse", "Dripmorph", then "Sparkletrace" with consistent parameters each time. This behavior changes slightly if you change the default parameters before randomizing.

Unreal-Dan commented 3 months ago

this is likely related to the way randomization is achieved:

https://github.com/Unreal-Dan/lightshow.lol/blob/dab75657bd7256d047b5147313e50ebb216c41da/js/Lightshow.js#L289-L315

This function simply sends input commands to the embedded webassembly vortex engine, these commands tell it to enter the randomizer menu then randomize.

We really should be exposing raw randomization apis to webassembly, or customizing the injected commands to select different leds based on the current pattern

Unreal-Dan commented 2 months ago

going to classify this as enhancement because technically it works but it could be improved