Browse Source

Merge pull request #13467 from aardgoose/callback-on-prototype

BufferAttribute: Define default callback function on prototype instead of in constructor
Mr.doob 7 years ago
parent
commit
da3e02d36e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/BufferAttribute.js

+ 2 - 2
src/core/BufferAttribute.js

@@ -25,8 +25,6 @@ function BufferAttribute( array, itemSize, normalized ) {
 	this.dynamic = false;
 	this.updateRange = { offset: 0, count: - 1 };
 
-	this.onUploadCallback = function () {};
-
 	this.version = 0;
 
 }
@@ -45,6 +43,8 @@ Object.assign( BufferAttribute.prototype, {
 
 	isBufferAttribute: true,
 
+	onUploadCallback: function () {},
+
 	setArray: function ( array ) {
 
 		if ( Array.isArray( array ) ) {