2
0
Эх сурвалжийг харах

moved Math.random16 to legacy

looeee 8 жил өмнө
parent
commit
6037b41cef

+ 9 - 3
src/Three.Legacy.js

@@ -46,6 +46,7 @@ import { Box2 } from './math/Box2.js';
 import { Box3 } from './math/Box3.js';
 import { Color } from './math/Color.js';
 import { Line3 } from './math/Line3.js';
+import { _Math } from './math/Math.js';
 import { Matrix3 } from './math/Matrix3.js';
 import { Matrix4 } from './math/Matrix4.js';
 import { Plane } from './math/Plane.js';
@@ -160,7 +161,7 @@ export function Float64Attribute( array, itemSize ) {
 
 //
 
-function ClosedSplineCurve3( points ) {
+export function ClosedSplineCurve3( points ) {
 
 	console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3.' );
 
@@ -173,8 +174,6 @@ function ClosedSplineCurve3( points ) {
 ClosedSplineCurve3.prototype = Object.create( CatmullRomCurve3.prototype );
 
 
-export { ClosedSplineCurve3 };
-
 //
 
 export function EdgesHelper( object, hex ) {
@@ -251,6 +250,13 @@ Object.assign( Line3.prototype, {
 	}
 } );
 
+Object.assign( _Math, {
+	random16: function () {
+		console.warn( 'THREE.Math.random16() has been deprecated. Use Math.random() instead.' );
+		return Math.random();
+	},
+} );
+
 Object.assign( Matrix3.prototype, {
 	multiplyVector3: function ( vector ) {
 		console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );

+ 0 - 7
src/math/Math.js

@@ -100,13 +100,6 @@ var _Math = {
 
 	},
 
-	random16: function () {
-
-		console.warn( 'THREE.Math.random16() has been deprecated. Use Math.random() instead.' );
-		return Math.random();
-
-	},
-
 	// Random integer from <low, high> interval
 
 	randInt: function ( low, high ) {