Răsfoiți Sursa

Fix BufferAttribute accessors

Tristan VALCKE 9 ani în urmă
părinte
comite
9757d97f67
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  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,