浏览代码

Fix BufferAttribute accessors

Tristan VALCKE 9 年之前
父节点
当前提交
9757d97f67
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/core/BufferAttribute.js

+ 6 - 0
src/core/BufferAttribute.js

@@ -32,6 +32,12 @@ function BufferAttribute( array, itemSize, normalized ) {
 
 }
 
+Object.defineProperty( BufferAttribute.prototype, "needsUpdate", {
+
+	set: function(value) { if ( value === true ) this.version ++; }
+
+});
+
 Object.assign( BufferAttribute.prototype, {
 
 	constructor: BufferAttribute,