jasondavies/d3-cloud — pull request #35 by mthome (2014-04-04 16:50:33+00:00)
Title: add a call to allow specification of RNG function

I've added a cloud.random(f) call that allows one to supply an alternative random number generator function to the layout engine. If you supply a function returning a constant value, you get behavior like https://github.com/jasondavies/d3-cloud/pull/14. A more interesting case to supply a seeded RNG so that you can get the visual effect of a random cloud but a repeatable layout by either seeding with a constant or a value computed simply from the tag field. The default behavior is to use Math.random() as before.
Example1:
cloud.random(function() { return 0.5; })
Example2:
var myrng = SeedRandom.rng("myseed");
cloud.random(function() { return myrng.random(); } )