提交 0a3a110b 编写于 作者: M Mr.doob

CI: Simpler generateUUID's Math.random() replacement.

上级 51e91685
......@@ -6,6 +6,8 @@
/* Deterministic random */
window.Math._random = window.Math.random;
let seed = Math.PI / 4;
window.Math.random = function () {
......
......@@ -91,7 +91,7 @@ const pup = puppeteer.launch( {
await page.evaluateOnNewDocument( injection );
const threeJsBuild = fs.readFileSync( 'build/three.module.js', 'utf8' )
.replace( /Math\.random\(\) \* 0xffffffff/g, 'crypto.getRandomValues(new Uint32Array(1))[0]' );
.replace( /Math\.random\(\) \* 0xffffffff/g, 'Math._random() * 0xffffffff' );
await page.setRequestInterception( true );
page.on( 'console', msg => ( msg.text().slice( 0, 8 ) === 'Warning.' ) ? console.null( msg.text() ) : {} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册