Skip to content

Commit 918ecea

Browse files
committed
Add consistent random function
1 parent 48ebe6e commit 918ecea

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

examples/geometry.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,17 @@ function updateCSG() {
252252

253253
function randomizeBrushes() {
254254

255+
// function mulberry32(seed) {
256+
// return function() {
257+
// let t = (seed += 0x6D2B79F5);
258+
// t = Math.imul(t ^ (t >>> 15), t | 1);
259+
// t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
260+
// return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
261+
// };
262+
// }
263+
264+
// Math.random = surfaceSampler.randomFunction = mulberry32( 0 );
265+
255266
for ( let i = 0; i < brushes.length; i ++ ) {
256267

257268
const b = brushes[ i ];

0 commit comments

Comments
 (0)