Browse Source

Fix BufferAttribute accessors

Tristan VALCKE 9 năm trước cách đây
mục cha
commit
9757d97f67
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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,

粤ICP备19079148号