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

Vector: Added warning to .fromAttribute()

Mugen87 8 жил өмнө
parent
commit
87f0b391f1

+ 7 - 1
src/math/Vector2.js

@@ -453,7 +453,13 @@ Vector2.prototype = {
 
 	},
 
-	fromAttribute: function ( attribute, index ) {
+	fromAttribute: function ( attribute, index, offset ) {
+
+		if ( offset !== undefined ) {
+
+			console.warn( 'THREE.Vector2: offset has been removed from .fromAttribute().' );
+
+		}
 
 		this.x = attribute.getX( index );
 		this.y = attribute.getY( index );

+ 7 - 1
src/math/Vector3.js

@@ -761,7 +761,13 @@ Vector3.prototype = {
 
 	},
 
-	fromAttribute: function ( attribute, index ) {
+	fromAttribute: function ( attribute, index, offset ) {
+
+		if ( offset !== undefined ) {
+
+			console.warn( 'THREE.Vector3: offset has been removed from .fromAttribute().' );
+
+		}
 
 		this.x = attribute.getX( index );
 		this.y = attribute.getY( index );

+ 7 - 1
src/math/Vector4.js

@@ -611,7 +611,13 @@ Vector4.prototype = {
 
 	},
 
-	fromAttribute: function ( attribute, index ) {
+	fromAttribute: function ( attribute, index, offset ) {
+
+		if ( offset !== undefined ) {
+
+			console.warn( 'THREE.Vector4: offset has been removed from .fromAttribute().' );
+
+		}
 
 		this.x = attribute.getX( index );
 		this.y = attribute.getY( index );