浏览代码

Add missing onUpload feature (from BufferAttribute)

Al McElrath 8 年之前
父节点
当前提交
ab9605b9b5
共有 1 个文件被更改,包括 10 次插入0 次删除
  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.dynamic = false;
 	this.updateRange = { offset: 0, count: - 1 };
 	this.updateRange = { offset: 0, count: - 1 };
 
 
+	this.onUploadCallback = function () {};
+
 	this.version = 0;
 	this.version = 0;
 
 
 }
 }
@@ -92,6 +94,14 @@ InterleavedBuffer.prototype = {
 
 
 		return new this.constructor().copy( this );
 		return new this.constructor().copy( this );
 
 
+	},
+
+	onUpload: function ( callback ) {
+
+		this.onUploadCallback = callback;
+
+		return this;
+
 	}
 	}
 
 
 };
 };