Explorar o código

Move onUploadCallback from constructor to prototype scope (#21770)

Kai Salmen %!s(int64=4) %!d(string=hai) anos
pai
achega
43b59f942c
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 2 2
      src/core/BufferAttribute.js
  2. 2 2
      src/core/InterleavedBuffer.js

+ 2 - 2
src/core/BufferAttribute.js

@@ -29,10 +29,10 @@ class BufferAttribute {
 
 
 		this.version = 0;
 		this.version = 0;
 
 
-		this.onUploadCallback = function () {};
-
 	}
 	}
 
 
+	onUploadCallback() {}
+
 	set needsUpdate( value ) {
 	set needsUpdate( value ) {
 
 
 		if ( value === true ) this.version ++;
 		if ( value === true ) this.version ++;

+ 2 - 2
src/core/InterleavedBuffer.js

@@ -16,10 +16,10 @@ class InterleavedBuffer {
 
 
 		this.uuid = MathUtils.generateUUID();
 		this.uuid = MathUtils.generateUUID();
 
 
-		this.onUploadCallback = function () {};
-
 	}
 	}
 
 
+	onUploadCallback() {}
+
 	set needsUpdate( value ) {
 	set needsUpdate( value ) {
 
 
 		if ( value === true ) this.version ++;
 		if ( value === true ) this.version ++;