Explorar o código

Add missing onUpload feature (from BufferAttribute)

Al McElrath %!s(int64=8) %!d(string=hai) anos
pai
achega
ab9605b9b5
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      src/core/InterleavedBuffer.js

+ 10 - 0
src/core/InterleavedBuffer.js

@@ -15,6 +15,8 @@ function InterleavedBuffer( array, stride ) {
 	this.dynamic = false;
 	this.updateRange = { offset: 0, count: - 1 };
 
+	this.onUploadCallback = function () {};
+
 	this.version = 0;
 
 }
@@ -92,6 +94,14 @@ InterleavedBuffer.prototype = {
 
 		return new this.constructor().copy( this );
 
+	},
+
+	onUpload: function ( callback ) {
+
+		this.onUploadCallback = callback;
+
+		return this;
+
 	}
 
 };