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

Move onUploadCallback from constructor to prototype scope (#21770)

Kai Salmen 4 жил өмнө
parent
commit
43b59f942c

+ 2 - 2
src/core/BufferAttribute.js

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

+ 2 - 2
src/core/InterleavedBuffer.js

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