Browse Source

Vector: Added warning to .fromAttribute()

Mugen87 8 years ago
parent
commit
87f0b391f1
3 changed files with 21 additions and 3 deletions
  1. 7 1
      src/math/Vector2.js
  2. 7 1
      src/math/Vector3.js
  3. 7 1
      src/math/Vector4.js

+ 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 );