提交 42544a0f 编写于 作者: A alteredq

Moved GeometryUtils.random16 => Math.random16

上级 89bddf38
......@@ -20,6 +20,15 @@ THREE.Math = {
return b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );
},
// Get 16 bits of randomness
// (standard Math.random() creates repetitive patterns when applied over larger space)
random16: function() {
return ( 65280 * Math.random() + 255 * Math.random() ) / 65535;
}
};
......@@ -4,7 +4,7 @@
*/
THREE.GeometryUtils = {
merge: function ( geometry1, object2 /* mesh | geometry */ ) {
var matrix, matrixRotation,
......@@ -437,15 +437,6 @@ THREE.GeometryUtils = {
},
// Get 16 bits of randomness
// (standard Math.random() creates repetitive patterns when applied over larger space)
random16: function() {
return ( 65280 * Math.random() + 255 * Math.random() ) / 65535;
},
center: function( geometry ) {
geometry.computeBoundingBox();
......@@ -467,6 +458,6 @@ THREE.GeometryUtils = {
};
THREE.GeometryUtils.random = THREE.GeometryUtils.random16;
THREE.GeometryUtils.random = THREE.Math.random16;
THREE.GeometryUtils.__v1 = new THREE.Vector3();
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册