소스 검색

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.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;
+
 	}
 
 };