3 ms·
Would it be possible to add a seed option so that you could request the same set of random colors if needed?
by jbranchaud 12y ago
Would it be possible to add a seed option so that you could request the same set of random colors if needed?
- tstrimple 12y agoIt's using Math.random, so no it's not currently possible. You'd have to replace the Math.random calls with something like this: https://github.com/davidbau/seedrandom https://github.com/davidbau/seedrandom
- jere 12y agoSelf plug. Autumn.js will do this if you pass it the same keys both times. Or it will do it by default if you call it with no arguments. https://github.com/nluqo/autumn https://github.com/nluqo/autumn