As a shameless plug, I wrote a JS port of this RNG algorithm a while back: <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;pcg-random" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;pcg-random</a> .